/* Judgment Visualizer — paper, ink and a red pen (matches the Editorial Marker template) */
:root {
  --paper: #f6f3ec;
  --paper-2: #efe9dc;
  --sheet: #fffdf8;
  --ink: #17140f;
  --ink-2: #4a4336;
  --muted: #7a705e;
  --rule: #ddd4c2;
  --red: #d7261e;
  --red-ink: #b51d16;
  --yellow: #ffd84a;
  --blue: #1d4ed8;
  --green: #15803d;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --sans: "Inter", "Mukta", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  background-image: radial-gradient(ellipse 90% 60% at 50% 0%, #fbf8f1, transparent 70%),
    repeating-linear-gradient(0deg, rgba(60, 40, 10, .022) 0 2px, transparent 2px 5px);
  color: var(--ink);
  font: 16px/1.6 var(--sans);
}
:lang(hi), .hi { font-family: "Mukta", var(--sans); }
img, video { max-width: 100%; display: block; }
a { color: var(--blue); }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; border-radius: 4px; }

.wrap { max-width: 1120px; margin: 0 auto; padding-left: max(18px, env(safe-area-inset-left)); padding-right: max(18px, env(safe-area-inset-right)); }
.narrow { max-width: 860px; }

/* header */
.top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 18px; }
.brand { display: inline-flex; align-items: baseline; gap: 10px; text-decoration: none; color: var(--ink); }
.brand b { font: 700 22px/1 var(--serif); letter-spacing: -.01em; position: relative; }
.brand b::after { content: ""; position: absolute; left: -2px; right: -4px; bottom: -6px; height: 7px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 10' preserveAspectRatio='none'%3E%3Cpath d='M2 6 C 50 2, 120 9, 198 4' fill='none' stroke='%23d7261e' stroke-width='3.5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%; }
.brand small { font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--red); }
.studio { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; color: var(--ink-2);
  padding: 5px 12px; border: 1px solid var(--rule); border-radius: 999px; background: rgba(255, 253, 248, .7); white-space: nowrap; }
.studio i { width: 9px; height: 9px; border-radius: 50%; background: #b8ae9b; display: inline-block; }
.studio.on i { background: #16a34a; box-shadow: 0 0 0 4px rgba(22, 163, 74, .15); }
.studio.off i { background: #d97706; }

/* type */
h1, h2, h3 { font-family: var(--serif); line-height: 1.12; letter-spacing: -.015em; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(36px, 6vw, 64px); font-weight: 700; }
h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 700; }
h3 { font-size: 21px; font-weight: 700; }
.kicker { font-size: 12.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--red); margin-bottom: 12px; }
.lede { font-size: 19px; color: var(--ink-2); max-width: 54ch; margin: 18px 0 0; }
mark, .hl { background: linear-gradient(transparent 58%, var(--yellow) 58%, var(--yellow) 92%, transparent 92%); color: inherit; padding: 0 .06em; }
.pen { position: relative; white-space: nowrap; }
.pen::after { content: ""; position: absolute; left: -2%; right: -2%; bottom: -.12em; height: .28em;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 300 20' preserveAspectRatio='none'%3E%3Cpath d='M4 12 C 80 4, 180 18, 296 8' fill='none' stroke='%23d7261e' stroke-width='6' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%; }

/* hero */
.hero { display: grid; grid-template-columns: 1.02fr 1fr; gap: 48px; align-items: center; padding-block: 36px 64px; }
.hero > * { min-width: 0; }
.hero .ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 26px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.facts span::before { content: "✓"; color: var(--red); font-weight: 800; margin-right: 7px; }
.player { background: var(--sheet); border-radius: var(--r-lg); padding: 12px; box-shadow: 0 30px 60px -20px rgba(60, 40, 10, .35), 0 0 0 1px rgba(60, 40, 10, .08); transform: rotate(.6deg); }
.screen { position: relative; aspect-ratio: 16 / 9; border-radius: var(--r-md); overflow: hidden; background: #1c1914; }
.screen video { width: 100%; height: 100%; object-fit: cover; }
.screen .fallback { position: absolute; inset: 0; display: none; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center; padding: 20px;
  background: radial-gradient(ellipse at 50% 40%, #fbf8f1, #efe8d9); color: var(--ink-2); }
.screen .fallback b { font: 700 22px var(--serif); color: var(--ink); }
.screen.missing .fallback { display: flex; }
.screen.missing video { visibility: hidden; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.chip { border: 1px solid var(--rule); background: transparent; border-radius: 999px; padding: 5px 12px; font-size: 13px; font-weight: 600; color: var(--ink-2); cursor: pointer; }
.chip[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0; border-radius: var(--r-md); padding: 14px 22px; font-weight: 700; font-size: 16px; cursor: pointer; text-decoration: none; transition: transform .12s ease, box-shadow .12s ease, background .12s; }
.btn.primary { background: var(--ink); color: var(--paper); box-shadow: 0 2px 0 #000; }
.btn.primary:hover { background: #2a251c; transform: translateY(-1px); }
.btn.red { background: var(--red); color: #fff; box-shadow: 0 2px 0 var(--red-ink); }
.btn.red:hover { background: var(--red-ink); transform: translateY(-1px); }
.btn.ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 1.5px var(--ink); }
.btn.ghost:hover { background: rgba(23, 20, 15, .05); }
.btn[disabled] { opacity: .55; cursor: progress; transform: none; }

/* section */
section.block { padding-block: 64px; border-top: 1px solid var(--rule); }
.head { margin-bottom: 30px; }
.head p { color: var(--ink-2); margin: 10px 0 0; max-width: 60ch; }

/* form */
.formcard { background: var(--sheet); border-radius: var(--r-lg); box-shadow: 0 24px 50px -24px rgba(60, 40, 10, .3), 0 0 0 1px rgba(60, 40, 10, .08); padding: clamp(20px, 4vw, 40px); }
.field { display: grid; gap: 8px; margin-bottom: 26px; }
.field > label, .field > .lab { font-weight: 700; font-size: 14px; letter-spacing: .02em; }
.field .hint { font-size: 13px; color: var(--muted); margin: 0; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--paper-2); border-radius: var(--r-md); width: fit-content; max-width: 100%; }
.tabs button { border: 0; background: transparent; padding: 8px 16px; border-radius: var(--r-sm); font-weight: 600; font-size: 14px; color: var(--ink-2); cursor: pointer; }
.tabs button[aria-selected="true"] { background: var(--sheet); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.input, textarea.input { width: 100%; border: 1.5px solid var(--rule); background: #fff; border-radius: var(--r-md); padding: 13px 15px; font-size: 16px; }
.input:focus { border-color: var(--ink); outline: none; box-shadow: 0 0 0 3px rgba(23, 20, 15, .1); }
.drop { display: flex; align-items: center; gap: 14px; border: 1.5px dashed #c9bea8; border-radius: var(--r-md); padding: 18px; background: #fffefb; cursor: pointer; }
.drop:hover, .drop.drag { border-color: var(--ink); background: #fff; }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop .ico { width: 44px; height: 52px; flex: none; border-radius: 4px; background: #fff; border: 1.5px solid var(--ink); position: relative; }
.drop .ico::after { content: "PDF"; position: absolute; left: -6px; bottom: 8px; background: var(--red); color: #fff; font-size: 10px; font-weight: 800; padding: 1px 4px; border-radius: 2px; }
.drop .t { min-width: 0; }
.drop .t b { display: block; }
.drop .t span { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.seg label { cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span { display: inline-block; padding: 9px 16px; border: 1.5px solid var(--rule); border-radius: var(--r-md); font-weight: 600; font-size: 15px; background: #fff; }
.seg input:checked + span { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.seg input:focus-visible + span { outline: 3px solid var(--blue); outline-offset: 2px; }
.styles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.styles label { cursor: pointer; position: relative; }
.styles input { position: absolute; opacity: 0; pointer-events: none; }
.styles .card { height: 100%; border: 1.5px solid var(--rule); border-radius: var(--r-md); padding: 10px; background: #fff; display: grid; gap: 8px; align-content: start; }
.styles input:checked + .card { border-color: var(--ink); box-shadow: 0 0 0 2px var(--ink); }
.styles input:focus-visible + .card { outline: 3px solid var(--blue); outline-offset: 2px; }
.styles .card b { font-size: 14px; line-height: 1.25; }
.styles .card small { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.swatch { aspect-ratio: 16 / 7; border-radius: 5px; position: relative; overflow: hidden; }
.sw-auto { background: conic-gradient(from 210deg, #f6f3ec 0 20%, #7a5a3a 0 40%, #0b1b36 0 60%, #0a1f44 0 80%, #24494d 0); }
.sw-auto::after { content: "Auto"; position: absolute; inset: 0; display: grid; place-items: center; font: 800 15px var(--sans); color: #fff; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); }
.sw-marker { background: #f6f3ec; }
.sw-marker::before { content: ""; position: absolute; left: 12%; top: 34%; width: 52%; height: 22%; background: linear-gradient(transparent 50%, #ffd84a 50%); }
.sw-marker::after { content: ""; position: absolute; left: 50%; top: 22%; width: 34%; height: 50%; border: 2.5px solid #d7261e; border-radius: 50%; transform: rotate(-6deg); }
.sw-dossier { background: #7a5a3a radial-gradient(rgba(40, 25, 10, .45) 1px, transparent 1.4px) 0 0 / 6px 6px; }
.sw-dossier::before { content: ""; position: absolute; left: 14%; top: 18%; width: 46%; height: 64%; background: #e8d4a2; transform: rotate(-4deg); box-shadow: 0 3px 6px rgba(0, 0, 0, .4); }
.sw-dossier::after { content: "HELD"; position: absolute; right: 10%; top: 30%; font: 800 11px "Courier New", monospace; color: #b3141b; border: 2px solid #b3141b; padding: 1px 4px; transform: rotate(-12deg); }
.sw-live { background: #0b1b36; }
.sw-live::before { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 18%; background: #e11d48; }
.sw-live::after { content: "VERDICT"; position: absolute; left: 10%; top: 26%; font: 800 13px Oswald, Inter, sans-serif; color: #fff; letter-spacing: .05em; }
.sw-blueprint { background: #0a1f44; background-image: linear-gradient(rgba(125, 211, 252, .18) 1px, transparent 1px), linear-gradient(90deg, rgba(125, 211, 252, .18) 1px, transparent 1px); background-size: 10px 10px; }
.sw-blueprint::before { content: ""; position: absolute; left: 12%; right: 12%; top: 58%; height: 3px; background: #7dd3fc; }
.sw-blueprint::after { content: ""; position: absolute; right: 12%; top: calc(58% - 6px); width: 14px; height: 14px; border-radius: 50%; background: #22c55e; }
.sw-courtroom { background: linear-gradient(#24494d 62%, #6b4423 62%); }
.sw-courtroom::before { content: ""; position: absolute; left: 30%; right: 30%; top: 48%; height: 26%; background: #8b5a2b; border-radius: 3px; }
.sw-courtroom::after { content: ""; position: absolute; left: 50%; top: 12%; width: 40%; height: 4px; margin-left: -20%; background: #eab308; transform: rotate(-6deg); }
.submitrow { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 6px; }
.submitrow p { margin: 0; font-size: 13px; color: var(--muted); }
.alert { display: none; margin-top: 16px; padding: 12px 16px; border-radius: var(--r-md); background: #fdecea; color: #8b1a14; border: 1px solid #f3c2bd; font-weight: 600; }
.alert.show { display: block; }

/* how */
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; counter-reset: s; }
.steps li { counter-increment: s; background: var(--sheet); border-radius: var(--r-lg); padding: 22px; box-shadow: 0 0 0 1px rgba(60, 40, 10, .08); }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 14px; border: 2.5px solid var(--red); border-radius: 50%; color: var(--red); font: 700 20px var(--serif); }
.steps p { margin: 8px 0 0; color: var(--ink-2); font-size: 15px; }

/* gallery */
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 18px; }
.gcard { background: var(--sheet); border-radius: var(--r-lg); overflow: hidden; box-shadow: 0 0 0 1px rgba(60, 40, 10, .08); display: grid; grid-template-rows: auto 1fr; }
.gcard .swatch { aspect-ratio: 16 / 8; border-radius: 0; }
.gcard .body { padding: 18px 20px 20px; display: grid; gap: 6px; align-content: start; }
.gcard p { margin: 0; color: var(--ink-2); font-size: 15px; }
.gcard .best { font-size: 13px; font-weight: 700; color: var(--red); }

/* faq */
.faq details { border-bottom: 1px solid var(--rule); padding: 16px 0; }
.faq summary { cursor: pointer; font: 700 19px var(--serif); list-style: none; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--red); font: 700 24px var(--sans); line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 10px 0 0; color: var(--ink-2); max-width: 70ch; }

/* footer */
.foot { border-top: 1px solid var(--rule); padding-block: 28px 40px; font-size: 13px; color: var(--muted); display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; }
.foot p { margin: 0; max-width: 70ch; }

/* job page */
.job { padding-block: 22px 60px; }
.jobhead h1 { font-size: clamp(28px, 4.6vw, 46px); }
.jobhead .meta { margin-top: 10px; color: var(--ink-2); font-size: 14px; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.stepper { list-style: none; padding: 0; margin: 30px 0; display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.stepper li { position: relative; padding-top: 34px; font-size: 13.5px; font-weight: 600; color: var(--muted); text-align: center; }
.stepper li::before { content: ""; position: absolute; top: 4px; left: 50%; width: 22px; height: 22px; margin-left: -11px; border-radius: 50%; background: var(--paper); border: 2.5px solid #c9bea8; z-index: 1; }
.stepper li::after { content: ""; position: absolute; top: 15px; left: -50%; width: 100%; height: 2.5px; background: #d9cfbd; }
.stepper li:first-child::after { display: none; }
.stepper li.done { color: var(--ink-2); }
.stepper li.done::before { background: var(--ink); border-color: var(--ink); }
.stepper li.done::after, .stepper li.now::after { background: var(--ink); }
.stepper li.now { color: var(--ink); }
.stepper li.now::before { border-color: var(--red); background: var(--sheet); box-shadow: 0 0 0 5px rgba(215, 38, 30, .15); animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { box-shadow: 0 0 0 9px rgba(215, 38, 30, .06); } }
.panel { background: var(--sheet); border-radius: var(--r-lg); box-shadow: 0 24px 50px -28px rgba(60, 40, 10, .3), 0 0 0 1px rgba(60, 40, 10, .08); padding: clamp(20px, 4vw, 36px); }
.status { display: flex; align-items: center; gap: 18px; }
.status .spin { width: 34px; height: 34px; flex: none; border-radius: 50%; border: 3.5px solid #e5dccb; border-top-color: var(--red); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.status b { display: block; font: 700 21px var(--serif); }
.status span { color: var(--ink-2); font-size: 15px; }
.note { margin-top: 18px; padding: 12px 16px; border-radius: var(--r-md); background: #fff7d6; border: 1px solid #f1e2a4; font-size: 14px; color: #5b4a0f; }
.chapter { border-top: 1px solid var(--rule); padding-block: 22px; display: grid; grid-template-columns: 190px 1fr; gap: 20px; }
.chapter:first-of-type { border-top: 0; }
.chapter > * { min-width: 0; }
.chapter .ch { font-size: 12.5px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--red); }
.chapter .ch small { display: block; font-size: 12px; letter-spacing: 0; text-transform: none; color: var(--muted); font-weight: 600; margin-top: 6px; line-height: 1.45; overflow-wrap: anywhere; }
.chapter textarea { width: 100%; min-height: 64px; resize: vertical; border: 1.5px solid var(--rule); border-radius: var(--r-md); padding: 11px 13px; background: #fff; font-size: 16px; line-height: 1.5; margin-bottom: 8px; }
.chapter textarea:focus { border-color: var(--ink); outline: none; }
.chapter textarea.bad { border-color: var(--red); }
.approvebar { position: sticky; bottom: 0; margin: 0 calc(-1 * clamp(20px, 4vw, 36px)) calc(-1 * clamp(20px, 4vw, 36px)); padding: 16px clamp(20px, 4vw, 36px) calc(16px + env(safe-area-inset-bottom)); background: rgba(255, 253, 248, .96); border-top: 1px solid var(--rule); border-radius: 0 0 var(--r-lg) var(--r-lg); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.approvebar p { margin: 0; font-size: 14px; color: var(--ink-2); }
.result video { width: 100%; border-radius: var(--r-md); background: #000; aspect-ratio: 16 / 9; }
.result .actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.credit { display: flex; align-items: center; gap: 14px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--rule); color: var(--ink-2); font-size: 14px; }
.credit img { width: 44px; height: auto; }
.credit b { color: var(--ink); }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%) translateY(20px); opacity: 0; background: var(--ink); color: var(--paper); padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 14px; transition: .2s; pointer-events: none; }
.toast.show { opacity: 1; transform: translateX(-50%); }
.hidden { display: none !important; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 32px; padding-top: 16px; }
  .player { transform: none; }
  .steps { grid-template-columns: 1fr 1fr; }
  .styles { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .row2 { grid-template-columns: 1fr; }
  .steps { grid-template-columns: 1fr; }
  .chapter { grid-template-columns: 1fr; gap: 10px; }
  .stepper { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .stepper li { font-size: 11px; }
  .brand small { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
