/* ad-studio — IMB brand tokens (CLAUDE_CODING.md), self-hosted Source Sans 3 / Noto. */
:root {
  --ink: #1B365D;
  --accent: #487A7B;
  --accent-light: rgba(72, 122, 123, 0.09);
  --muted: #707372;
  --line: #d9dcdc;
  --bg: #f6f7f7;
  --card: #ffffff;
  --text: #1d2530;
  --red: #B83A4B;
  --teal: #009681;
  --orange: #E87722;
  --yellow: #F3D54E;
  --sans: "Source Sans 3", "Noto Sans", system-ui, -apple-system, sans-serif;
  --radius: 10px;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #c9d6ea; --accent: #6fa9aa; --accent-light: rgba(111, 169, 170, 0.14);
    --muted: #9aa1a0; --line: #2d3742; --bg: #11161c; --card: #19212a; --text: #e6eaee;
  }
  .brand img { filter: brightness(0) invert(1); }
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--sans); background: var(--bg); color: var(--text); line-height: 1.5; font-size: 16px; }
h1, h2, h3 { color: var(--ink); line-height: 1.2; margin: 0 0 .5rem; }
h2 { font-size: 1.4rem; } h3 { font-size: 1.1rem; }
code { font-size: .85em; background: var(--accent-light); padding: 0 .3em; border-radius: 4px; }
.skip { position: absolute; left: -999px; } .skip:focus { left: 1rem; top: 1rem; z-index: 10; background: var(--card); padding: .5rem; }

.top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .75rem 1.25rem;
  background: var(--card); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; }
.brand img { height: 30px; width: auto; }
.brand .name { font-weight: 700; color: var(--ink); font-size: 1.1rem; border-left: 1px solid var(--line); padding-left: .75rem; }
.brand { flex-shrink: 0; }
.who { display: flex; gap: .75rem; align-items: center; color: var(--muted); font-size: .9rem; min-width: 0; white-space: nowrap; }
/* A long email address shortens with an ellipsis (full address on hover) instead of pushing the page wide. */
.who .who-email { min-width: 0; overflow: hidden; text-overflow: ellipsis; }

.layout { display: grid; grid-template-columns: 220px 1fr; gap: 1.5rem; max-width: 1400px; margin: 0 auto; padding: 1.25rem; }
.saved { font-size: .9rem; }
.saved h2 { font-size: 1rem; }
.saved ul { list-style: none; padding: 0; margin: .75rem 0; }
.saved li { padding: .35rem 0; border-bottom: 1px solid var(--line); display: flex; flex-direction: column; }
main { min-width: 0; }
main:focus { outline: none; }

.stepbar { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem 1rem; margin-bottom: 1rem; }
.stepper { display: flex; flex-wrap: wrap; gap: .25rem; }
.savestate { display: flex; align-items: center; gap: .6rem; }
.spent { font-size: .85rem; font-weight: 600; color: var(--ink); background: var(--accent-light); padding: .15rem .55rem; border-radius: 999px; font-variant-numeric: tabular-nums; }
.costbar { display: grid; gap: .15rem; padding: .55rem .9rem; border-radius: 8px; background: var(--card); border: 1px solid var(--line); border-left: 4px solid var(--ink); margin-bottom: 1rem; font-variant-numeric: tabular-nums; }
.estimate { display: grid; gap: .2rem; padding: .7rem .9rem; border-radius: 8px; background: var(--accent-light); border-left: 4px solid var(--accent); }
.step { display: flex; align-items: center; gap: .4rem; border: 1px solid var(--line); background: var(--card); color: var(--text);
  padding: .4rem .75rem; border-radius: 999px; font: inherit; font-size: .9rem; cursor: pointer; }
.step .num { display: inline-grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; background: var(--accent-light); font-size: .8rem; }
.step.current { background: var(--ink); color: #fff; border-color: var(--ink); }
.step.current .num { background: rgba(255,255,255,.2); }
.step:disabled { opacity: .45; cursor: default; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; }
.card header { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.narrow { max-width: 760px; }
.brief { max-width: 820px; display: grid; gap: .9rem; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 1rem; }
.grid.two { grid-template-columns: repeat(auto-fill, minmax(380px, 1fr)); }
.section-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .5rem 1rem; margin-bottom: .75rem; }
.section-head .hint { max-width: 70ch; }
.angle-group { margin: 1.25rem 0; }
.angle-group h3 { display: flex; gap: .5rem; align-items: center; }

.field { display: grid; gap: .25rem; }
.field.inline { display: flex; align-items: center; gap: .5rem; }
.label { font-weight: 600; font-size: .9rem; display: flex; justify-content: space-between; gap: .5rem; }
.hint { color: var(--muted); font-size: .85rem; font-weight: 400; }
input[type=text], textarea, select { font: inherit; color: var(--text); background: var(--card); border: 1px solid var(--line);
  border-radius: 8px; padding: .5rem .6rem; width: 100%; }
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus, button:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: .6rem .8rem; margin: 0; }
legend { font-weight: 600; font-size: .9rem; padding: 0 .3rem; }
.chips { display: flex; flex-wrap: wrap; gap: .4rem; }
.chip { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--line); border-radius: 999px; padding: .25rem .65rem; font-size: .9rem; cursor: pointer; }
.chip.on { background: var(--accent-light); border-color: var(--accent); }
.chip .x { border: 0; background: none; cursor: pointer; font-size: 1rem; color: var(--muted); }
.row { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin: .5rem 0; }
.row input { flex: 1; min-width: 12rem; }

.btn { font: inherit; font-weight: 600; border: 1px solid var(--accent); color: var(--accent); background: var(--card);
  border-radius: 8px; padding: .5rem 1rem; cursor: pointer; text-decoration: none; display: inline-block; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.small { padding: .25rem .6rem; font-size: .85rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.link { border: 0; background: none; color: var(--accent); font: inherit; cursor: pointer; padding: 0; text-align: start; text-decoration: underline; }
.actions { display: flex; justify-content: flex-end; gap: .75rem; align-items: center; margin-top: 1rem; flex-wrap: wrap; }
.actions.left { justify-content: flex-start; }

.tag { font-size: .75rem; text-transform: uppercase; letter-spacing: .04em; background: var(--accent-light); color: var(--accent);
  padding: .1rem .45rem; border-radius: 4px; font-weight: 600; }
.meta { color: var(--muted); font-size: .85rem; margin: .25rem 0; }
.insight { font-style: italic; color: var(--muted); }
.angle.off { opacity: .5; }
.angle .field { margin: .4rem 0; }
.check { display: flex; gap: .4rem; align-items: center; }
details { margin: .4rem 0; } summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: .9rem; }
.coaching { border-left: 4px solid var(--accent); background: var(--accent-light); padding: .6rem .8rem; border-radius: 0 8px 8px 0; margin-bottom: 1rem; }

.count { font-weight: 400; font-size: .8rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.count.fold { color: var(--orange); } .count.over { color: var(--red); font-weight: 700; }
.ad .field { margin: .35rem 0; }
.hashtags { color: var(--accent); font-size: .9rem; }
.findings { list-style: none; padding: 0; margin: .5rem 0 0; display: grid; gap: .3rem; font-size: .85rem; }
.findings li { padding: .3rem .5rem; border-radius: 6px; background: rgba(232,119,34,.1); }
.findings li.error { background: rgba(184,58,75,.12); }
.sev { font-weight: 700; text-transform: uppercase; font-size: .7rem; margin-right: .35rem; }
.findings li.error .sev { color: var(--red); } .findings li.warn .sev { color: var(--orange); }

.banner { padding: .65rem .9rem; border-radius: 8px; margin: 0 0 1rem; }
.banner.canva { background: var(--accent-light); border: 1px solid var(--accent); display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.preview figcaption .btn { margin-top: .35rem; }
.banner.warn { background: rgba(232,119,34,.12); border: 1px solid var(--orange); }
.busy { display: flex; gap: .6rem; align-items: center; padding: .6rem .9rem; background: var(--accent-light); border-radius: 8px; margin-bottom: 1rem; font-weight: 600; }
.spinner { width: 1rem; height: 1rem; border: 2px solid var(--accent); border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

.tabs { display: flex; flex-wrap: wrap; gap: .25rem; border-bottom: 1px solid var(--line); margin: 1rem 0; }
.tab { font: inherit; border: 0; background: none; padding: .5rem .8rem; cursor: pointer; border-bottom: 3px solid transparent; color: var(--text); display: flex; gap: .4rem; align-items: center; }
.tab.on { border-bottom-color: var(--accent); font-weight: 700; }
.pill { font-size: .75rem; padding: .05rem .45rem; border-radius: 999px; background: var(--line); }
.pill.ok { background: rgba(0,150,129,.15); color: var(--teal); } .pill.warn { background: rgba(232,119,34,.15); color: var(--orange); }
.pair { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-bottom: 1rem; }
.back p { margin: .4rem 0; font-size: .95rem; }
.flags { display: grid; gap: .4rem; margin-top: .6rem; }
.flag { margin: 0; font-size: .85rem; padding: .3rem .5rem; border-radius: 6px; background: var(--accent-light); }
.flag.medium { background: rgba(232,119,34,.1); }
.ok { color: var(--teal); font-weight: 600; }
.ack { display: flex; gap: .5rem; align-items: flex-start; padding: .5rem .6rem; border-radius: 8px; background: rgba(184,58,75,.08); border: 1px solid rgba(184,58,75,.3); font-size: .9rem; }
.ack.decision { background: rgba(243,213,78,.15); border-color: rgba(200,160,0,.4); }
.ack.done { background: rgba(0,150,129,.08); border-color: rgba(0,150,129,.3); }
.decisions { margin-bottom: 1rem; display: grid; gap: .5rem; }
[dir=rtl] { text-align: right; }

.creative { margin-bottom: 1rem; }
.previews { display: flex; gap: 1rem; flex-wrap: wrap; align-items: flex-start; margin-top: .75rem; }
/* The column is as wide as the preview itself, so the caption wraps under it instead of widening it. */
.preview { margin: 0; text-align: center; font-size: .8rem; color: var(--muted); display: grid; grid-template-columns: min-content; }
.preview figcaption { display: grid; gap: .1rem; margin-top: .3rem; }
.preview figcaption strong { color: var(--text); }
.preview .placements { font-size: .78rem; }
/* Height-led with no percentage width: the canvas keeps its true aspect ratio, and its column sizes to it. */
.preview-canvas { height: 260px; width: auto; border-radius: 6px; border: 1px solid var(--line); display: block; }

.checklist { list-style: none; padding: 0; display: grid; gap: .4rem; }
.checklist li::before { margin-right: .5rem; font-weight: 700; }
.checklist .yes::before { content: "✓"; color: var(--teal); }
.checklist .no::before { content: "✕"; color: var(--red); }
.checklist .maybe::before { content: "•"; color: var(--orange); }
.cautions { border-color: var(--orange); }

.hero { max-width: 720px; margin: 3rem auto; text-align: center; }
.hero h1 { font-size: 2.2rem; }
.lede { font-size: 1.15rem; color: var(--muted); margin-bottom: 1.5rem; }
.muted { color: var(--muted); } .error { color: var(--red); }

.toasts { position: fixed; bottom: 1rem; right: 1rem; display: grid; gap: .5rem; z-index: 20; max-width: min(480px, 90vw); }
.toast { background: var(--ink); color: #fff; padding: .6rem .9rem; border-radius: 8px; box-shadow: 0 4px 16px rgba(0,0,0,.2); }
.toast.error { background: var(--red); } .toast.ok { background: var(--teal); }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; padding: 1rem; }
  .saved { order: 2; }
  .pair { grid-template-columns: 1fr; }
  .grid, .grid.two { grid-template-columns: 1fr; }
  .preview-canvas { height: 150px; } /* the 1.91:1 preview is then ~287px wide, inside the card on a 400px phone */
  .brand .name { display: none; }
}
/* Phones: the top bar keeps the logo, Admin and Sign out; the email is dropped. */
@media (max-width: 600px) {
  .top { padding: .6rem 1rem; }
  .brand img { height: 26px; }
  .who .who-email { display: none; }
}

/* ── admin ── */
.admin-nav { display: flex; flex-wrap: wrap; gap: .25rem; margin-bottom: 1rem; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .75rem; margin-bottom: 1rem; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; }
.kpi .v { font-size: 1.6rem; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.kpi .l { color: var(--muted); font-size: .85rem; }
table.data { width: 100%; border-collapse: collapse; font-size: .9rem; }
table.data th, table.data td { text-align: start; padding: .45rem .5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
table.data td.num, table.data th.num { text-align: end; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
.grid > *, .grid.two > * { min-width: 0; } /* a wide table scrolls inside its card, not the page */
.bars { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding-top: .5rem; }
.bars .bar { flex: 1; background: var(--accent); border-radius: 3px 3px 0 0; min-height: 1px; }
.bars-axis { display: flex; justify-content: space-between; color: var(--muted); font-size: .75rem; }
.badge { font-size: .75rem; padding: .05rem .45rem; border-radius: 999px; background: var(--line); }
.badge.red { background: rgba(184,58,75,.15); color: var(--red); } .badge.teal { background: rgba(0,150,129,.15); color: var(--teal); }
.form-row { display: flex; gap: .5rem; flex-wrap: wrap; align-items: end; margin: .75rem 0; }
.form-row .field { flex: 1; min-width: 14rem; }
.layout.admin { grid-template-columns: 1fr; }
pre.json { white-space: pre-wrap; word-break: break-word; font-size: .8rem; background: var(--bg); padding: .75rem; border-radius: 8px; max-height: 60vh; overflow: auto; }
.access textarea { width: 100%; }
.note { font-style: italic; color: var(--text); margin-top: .2rem; font-size: .9rem; }
.row-actions { white-space: nowrap; text-align: end; }
.row-actions .btn + .btn { margin-left: .4rem; }
.image-test .sample { margin: .75rem 0 0; }
.image-test .sample img { max-width: 100%; max-height: 320px; border-radius: 8px; display: block; }
.image-test figcaption { font-size: .85rem; color: var(--muted); margin-top: .3rem; }
.banner.usage { border: 1px solid var(--orange); background: rgba(232,119,34,.1); }
.banner.usage.heavy { border-color: var(--accent); background: var(--accent-light); }
.banner.usage.resting { border-color: var(--red); background: rgba(184,58,75,.1); }
.badge.warn { background: rgba(232,119,34,.15); color: var(--orange); }
.banner.conflict { border: 1px solid var(--red); background: rgba(184,58,75,.08); display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; justify-content: space-between; }
.banner.conflict .row { margin: 0; }
.ws-switch { margin-bottom: .75rem; }
.preview-canvas.draggable { cursor: grab; touch-action: none; }
.preview-canvas.draggable.dragging { cursor: grabbing; }
.preview-canvas.draggable.over-text { cursor: move; }
.preview-canvas.draggable:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.ws-links { display: grid; gap: .2rem; margin-bottom: .75rem; font-size: .9rem; }
.ws-page { display: grid; gap: 1rem; }
.ws-page > .link { justify-self: start; }

/* What comes next: a small floating button, bottom right. */
.next-fab { position: fixed; right: 1.25rem; bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px)); z-index: 30;
  padding: .6rem 1.1rem; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font: inherit;
  font-weight: 700; cursor: pointer; box-shadow: 0 6px 18px rgba(10,20,35,.25); }
.next-fab:hover { filter: brightness(1.08); }
.next-fab:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.next-fab:disabled { opacity: .5; cursor: default; }
body:has(.next-fab) .toasts { bottom: 4.75rem; }
body:has(.tour) .next-fab { display: none; }
main:has(.next-fab) { padding-bottom: 4rem; } /* the last controls never hide under it */
/* A step's instructions, at the bottom beside its actions. */
.step-guide { margin: 1.5rem 0 .5rem; padding-top: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .92rem; max-width: 70ch; }
.stepper .step.next:not(:disabled) { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-light); }

/* A language's background choice on the Creative step. */
.scenebox { display: grid; gap: .5rem; padding: .75rem 1rem; margin-bottom: .75rem; border-radius: 8px;
  border: 1px dashed var(--accent); background: var(--accent-light); }
.scenebox.adapted { border-style: solid; }
.scenebox p, .scenebox ul { margin: 0; }
.scenebox .row { display: flex; flex-wrap: wrap; gap: .5rem; }

/* Zoom and reset under each preview. */
.framing { display: flex; align-items: center; gap: .5rem; margin-top: .4rem; }
.framing input[type=range] { flex: 1; min-width: 0; accent-color: var(--accent); }
.scenebox > .btn { justify-self: start; }

/* Share panel, community gallery, read-only campaign view. */
.share-panel { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem 2rem; margin-bottom: 1rem; }
.share-col { display: grid; gap: .6rem; align-content: start; min-width: 0; }
.share-col h3, .share-col p { margin: 0; }
.share-col > .btn { justify-self: start; }
.inline-form { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.inline-form select { min-width: 0; max-width: 100%; }
.chip.shared { background: var(--accent-light); color: var(--accent); border-radius: 999px; padding: .1rem .6rem; font-weight: 600; font-size: .85em; }
.btn.on { background: var(--accent-light); }
.community-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 1rem; }
.community-card { display: grid; gap: .35rem; text-align: left; cursor: pointer; font: inherit; color: inherit; }
.community-card img, .community-card .thumb-empty { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 6px; background: var(--accent-light); }
.community-card:hover, .community-card:focus-visible { border-color: var(--accent); }
.community-view .card { display: grid; gap: .5rem; margin-bottom: 1rem; }
.community-view .card p { margin: 0; }
.ro-ad { border-top: 1px solid var(--line, #e3e7e8); padding-top: .5rem; }
.ro-fields { display: grid; grid-template-columns: max-content 1fr; gap: .25rem .75rem; margin: .35rem 0 0; }
.ro-fields dt { font-weight: 600; color: var(--muted, #5f6b70); }
.ro-fields dd { margin: 0; white-space: pre-wrap; min-width: 0; overflow-wrap: anywhere; }

/* Creative: where to start, and the text controls. */
.startbox { display: grid; gap: .6rem; padding: .85rem 1rem; margin-bottom: .75rem; border-radius: 8px;
  border: 1px solid var(--accent); border-left-width: 4px; background: var(--accent-light); }
.startbox p { margin: 0; }
.startbox > .btn { justify-self: start; }
.text-controls { flex-wrap: wrap; gap: .5rem 1rem; align-items: end; }

/* Angles: pick two of four to run. */
.pickbar { padding: .6rem 1rem; margin-bottom: 1rem; border-radius: 8px; border: 1px solid var(--line); background: var(--card); }
.pickbar.ok { border-color: var(--accent); background: var(--accent-light); }
.pickbar.warn { border-color: #e87722; }
.card.angle header { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }
.card.angle h3 { margin: .25rem 0 0; }
.card.angle.on { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-light); }
.card.angle.off { opacity: .72; }
.switch { display: inline-flex; align-items: center; gap: .5rem; cursor: pointer; font-weight: 600; font-size: .9rem; }
.switch.locked { cursor: not-allowed; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 2.4rem; height: 1.35rem; border-radius: 999px; background: var(--line); position: relative; transition: background .15s; flex: none; }
.switch .track::after { content: ''; position: absolute; top: .15rem; left: .15rem; width: 1.05rem; height: 1.05rem; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0,0,0,.25); }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track::after { transform: translateX(1.05rem); }
.switch input:focus-visible + .track { outline: 3px solid var(--accent); outline-offset: 2px; }
.switch input:disabled + .track { opacity: .5; }

/* Sign-in walkthrough: a card in the corner, and a ring around what it describes. */
.tour { position: fixed; right: 1.25rem; bottom: calc(1.25rem + env(safe-area-inset-bottom, 0px)); z-index: 50;
  width: min(26rem, calc(100vw - 2rem)); display: grid; gap: .6rem; padding: 1rem 1.1rem;
  background: var(--card); color: var(--text, inherit); border: 1px solid var(--line); border-top: 4px solid var(--accent);
  border-radius: 10px; box-shadow: 0 12px 32px rgba(10,20,35,.22); }
.tour h3, .tour p { margin: 0; }
.tour-head, .tour-foot { display: flex; justify-content: space-between; align-items: center; gap: .5rem; flex-wrap: wrap; }
.tour-nav { display: flex; gap: .5rem; margin-left: auto; }
.tour .check { font-size: .85rem; color: var(--muted); display: inline-flex; gap: .4rem; align-items: center; }
.tour-target { outline: 3px solid var(--accent) !important; outline-offset: 4px; border-radius: 8px; }
@media (max-width: 600px) { .tour { right: 1rem; left: 1rem; width: auto; bottom: calc(1rem + env(safe-area-inset-bottom, 0px)); } }

/* Retargeting: the offer at the end of Export, and the banner on a retargeting campaign. */
.card.retarget { margin-top: 1rem; border-left: 4px solid var(--accent); }
.card.retarget p { margin: .4rem 0; }
.retarget-banner { margin: 0 0 1rem; padding: .55rem 1rem; border-radius: 8px; background: var(--accent-light); border: 1px solid var(--accent); }

/* Results: the verdict and the numbers. */
.results-grid { margin-bottom: 1rem; }
.results-grid .card { display: grid; gap: .5rem; align-content: start; }
.results-grid h3, .results-grid p { margin: 0; }
.verdict { padding: .75rem 1rem; border-radius: 8px; border: 1px solid var(--line); background: var(--card); margin: 0 0 1rem; }
.verdict p { margin: .35rem 0 0; color: var(--muted); }
.verdict.winner { border-color: var(--accent); background: var(--accent-light); border-left-width: 4px; }
.verdict.leaning { border-left: 4px solid #e8a33d; }
tr.win td { font-weight: 700; }
.verdict-chip { justify-self: start; background: var(--accent-light); color: var(--accent); border-radius: 999px; padding: .1rem .6rem; font-weight: 600; font-size: .8rem; }
.verdict-chip.leaning, .verdict-chip.too-early { background: transparent; border: 1px solid var(--line); color: var(--muted); }

.digest-preview { white-space: pre-wrap; font-size: .85rem; max-height: 24rem; overflow: auto; background: var(--accent-light); padding: .75rem; border-radius: 6px; }

label.check { display: inline-flex; align-items: center; gap: .45rem; width: auto; }

/* Video step */
.video-copy { border-top: 1px solid var(--line); padding: .5rem 0; }
.video-copy h4 { margin: .2rem 0; }
.video-copy p { margin: .2rem 0; }
.video-row { border-top: 1px solid var(--line); padding: .6rem 0; }
.video-player { width: 100%; max-width: 360px; max-height: 480px; background: #000; border-radius: 8px; display: block; }
