/* Design Critic: light, editorial, strict. Red means blocker. */
:root {
  --bg: #f4f3ef;
  --paper: #ffffff;
  --ink: #141414;
  --ink-2: #555550;
  --ink-3: #8a8a83;
  --line: #e3e1da;
  --line-2: #cfccc2;
  --accent: #141414;

  --blocker: #c8231b;
  --blocker-bg: #fdecea;
  --major: #d9620b;
  --major-bg: #fdf0e4;
  --minor: #8a7a12;
  --minor-bg: #f7f3d9;

  --st-open: #6b6b66;
  --st-progress: #2563eb;
  --st-fixed: #15803d;
  --st-wont: #7c3aed;

  --ui: Inter, "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
}

/* Black mode: chosen with the White/Black switch on Review Deck (/review-deck/theme.js).
   The drawn screens and before/after stages keep the app's own colours. */
:root[data-theme="dark"] {
  --bg: #0e0e0f;
  --paper: #18181a;
  --ink: #f4f3ef;
  --ink-2: #b4b3ad;
  --ink-3: #85847e;
  --line: #2a2a2d;
  --line-2: #3a3a3e;
  --accent: #f4f3ef;

  --blocker: #ef4b40;
  --blocker-bg: rgba(239, 75, 64, .14);
  --major: #f07a2a;
  --major-bg: rgba(240, 122, 42, .14);
  --minor: #c9b33a;
  --minor-bg: rgba(201, 179, 58, .14);

  --st-open: #9a9a94;
  --st-progress: #5b8def;
  --st-fixed: #3fbf6f;
  --st-wont: #a07cf5;
  color-scheme: dark;
}
:root[data-theme="dark"] .brand-logo { border-radius: 9px; box-shadow: 0 0 0 1px var(--line-2); }
:root[data-theme="dark"] code, :root[data-theme="dark"] .tag { background: #242427; }
:root[data-theme="dark"] .grade b { color: #0e0e0f; }
:root[data-theme="dark"] .grade-F b, :root[data-theme="dark"] .grade-D b, :root[data-theme="dark"] .grade-C b, :root[data-theme="dark"] .grade-B b, :root[data-theme="dark"] .grade-A b { color: #fff; }
:root[data-theme="dark"] .grade-B b { background: #4d7c0f; }
:root[data-theme="dark"] .grade-A b { background: #15803d; }
:root[data-theme="dark"] .p-bar { background: #2a2a2e; }
:root[data-theme="dark"] .filters { background: #141416; }
:root[data-theme="dark"] .scr:hover { background: #242427; }
:root[data-theme="dark"] .scr.on, :root[data-theme="dark"] .chip.on { color: #0e0e0f; }
:root[data-theme="dark"] .scr.on small, :root[data-theme="dark"] .scr.on em, :root[data-theme="dark"] .chip.on small { color: #55554f; }
:root[data-theme="dark"] .chip.sev-blocker.on, :root[data-theme="dark"] .chip.sev-major.on, :root[data-theme="dark"] .chip.sev-minor.on { color: #fff; }
:root[data-theme="dark"] .chip.sev-blocker.on small, :root[data-theme="dark"] .chip.sev-major.on small, :root[data-theme="dark"] .chip.sev-minor.on small { color: rgba(255,255,255,.75); }
:root[data-theme="dark"] .issue:hover { background: #1f1f22; }
:root[data-theme="dark"] .issue.sel { background: #242427; }
:root[data-theme="dark"] .phone-holder { box-shadow: 0 0 0 1px var(--line-2), 0 12px 30px rgba(0,0,0,.5); }
:root[data-theme="dark"] .marker.focus { box-shadow: 0 0 0 4000px rgba(0,0,0,.45); }
:root[data-theme="dark"] .marker.whole em { color: #141414; }
:root[data-theme="dark"] .gone-note { background: rgba(63,191,111,.13); }
:root[data-theme="dark"] .st-btn.on.st-open, :root[data-theme="dark"] .st-btn.on.st-progress, :root[data-theme="dark"] .st-btn.on.st-fixed, :root[data-theme="dark"] .st-btn.on.st-wont { color: #0e0e0f; }
:root[data-theme="dark"] .ai-btn { color: #0e0e0f; }
:root[data-theme="dark"] .ai-btn:hover { background: #ffffff; }
:root[data-theme="dark"] #pdText { background: #111113; }
:root[data-theme="dark"] .primary-btn:hover { background: #d6372d; }

* { box-sizing: border-box; }
html, body { height: 100%; margin: 0; }
body { background: var(--bg); color: var(--ink); font: 14px/1.5 var(--ui); display: flex; flex-direction: column; overflow: hidden; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: 0; padding: 0; }
[hidden] { display: none !important; }
code { font-family: var(--mono); font-size: .88em; background: #ecebe5; padding: 1px 5px; border-radius: 4px; }
.muted { color: var(--ink-3); }

/* ---------------------------------------------------------------- top bar */
.topbar { flex: none; height: 60px; display: flex; align-items: center; justify-content: space-between; padding: 0 20px; border-bottom: 1px solid var(--line); background: var(--paper); }
.brand { display: flex; align-items: center; gap: 12px; }
.brand-logo { width: 34px; height: 34px; }
.brand h1 { margin: 0; font-size: 17px; font-weight: 800; letter-spacing: -.02em; }
.brand-sub { margin: 0; font-size: 12.5px; color: var(--ink-3); }
.top-actions { display: flex; gap: 8px; }
.pill-btn { height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line-2); background: var(--paper); font-weight: 500; }
.pill-btn:hover { border-color: var(--ink); }

main { flex: 1; min-height: 0; display: flex; }

/* ---------------------------------------------------------------- landing */
.landing { margin: auto; display: grid; grid-template-columns: 1.1fr 1fr; gap: 56px; align-items: center; max-width: 1060px; padding: 40px; }
.kicker { text-transform: uppercase; letter-spacing: .14em; font-size: 12px; font-weight: 700; color: var(--blocker) !important; margin: 0 0 10px !important; }
.landing h2 { font-size: 42px; line-height: 1.05; margin: 0 0 16px; letter-spacing: -.035em; font-weight: 800; }
.landing p { color: var(--ink-2); font-size: 16px; margin: 0 0 24px; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 9px; }
.checks li { color: var(--ink-2); display: grid; grid-template-columns: 110px 1fr; gap: 12px; padding-bottom: 9px; border-bottom: 1px solid var(--line); }
.checks b { color: var(--ink); }
.drop { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 8px; min-height: 320px; padding: 32px; border: 2px dashed var(--line-2); border-radius: 18px; background: var(--paper); cursor: pointer; transition: border-color .15s; }
.drop:hover, .drop.over { border-color: var(--ink); }
.drop svg { width: 48px; height: 48px; fill: none; stroke: var(--ink); stroke-width: 1.6; margin-bottom: 6px; }
.drop strong { font-size: 17px; }
.drop span { color: var(--ink-2); }
.drop small { color: var(--ink-3); margin-top: 10px; }
.error { grid-column: 1 / -1; color: var(--blocker); margin: 0; }
.loading { margin: auto; text-align: center; color: var(--ink-2); }
.spinner { width: 38px; height: 38px; margin: 0 auto 16px; border-radius: 50%; border: 3px solid var(--line-2); border-top-color: var(--ink); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- review layout */
.review { flex: 1; min-height: 0; display: flex; flex-direction: column; }
.cols { flex: 1; min-height: 0; display: grid; grid-template-columns: 230px minmax(300px, 400px) 1fr; }

/* summary */
.summary { flex: none; display: grid; grid-template-columns: auto minmax(260px, 1fr) auto minmax(260px, 340px); gap: 24px; align-items: center; padding: 14px 20px; background: var(--paper); border-bottom: 1px solid var(--line); }
.grade { display: flex; align-items: center; gap: 12px; }
.grade b { width: 56px; height: 56px; border-radius: 12px; display: grid; place-items: center; font-size: 32px; font-weight: 800; color: #fff; background: var(--ink); }
.grade-F b, .grade-D b { background: var(--blocker); }
.grade-C b { background: var(--major); }
.grade-B b { background: #3f6212; }
.grade-A b { background: var(--st-fixed); }
.grade span { font-size: 26px; font-weight: 800; letter-spacing: -.02em; }
.grade small { font-size: 13px; color: var(--ink-3); font-weight: 500; }
.v-title { margin: 0; font-size: 16px; font-weight: 700; letter-spacing: -.01em; }
.v-sub { margin: 2px 0 0; font-size: 12.5px; color: var(--ink-2); }
.v-sub.unreviewed { margin-top: 6px; color: var(--blocker); font-weight: 600; }
.sev-counts { display: flex; gap: 8px; }
.sev-count { min-width: 74px; padding: 6px 12px; border-radius: 10px; border: 1px solid var(--line); text-align: left; }
.sev-count b { display: block; font-size: 20px; line-height: 1.1; }
.sev-count span { font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.sev-count.sev-blocker { color: var(--blocker); background: var(--blocker-bg); }
.sev-count.sev-major { color: var(--major); background: var(--major-bg); }
.sev-count.sev-minor { color: var(--minor); background: var(--minor-bg); }
.sev-count.on { border-color: currentColor; box-shadow: inset 0 0 0 1px currentColor; }
.p-head { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-2); margin-bottom: 5px; gap: 10px; }
.p-head span:first-child { font-weight: 700; color: var(--ink); }
.p-bar { height: 8px; border-radius: 4px; background: #e6e4dc; display: flex; overflow: hidden; }
.p-bar i.st-fixed { background: var(--st-fixed); }
.p-bar i.st-progress { background: var(--st-progress); }
.p-bar i.st-wont { background: var(--st-wont); }
.p-hist { display: flex; align-items: center; gap: 8px; margin-top: 6px; font-size: 11.5px; color: var(--ink-3); }
.spark { width: 120px; height: 28px; flex: none; }
.spark polyline, .spark line { fill: none; stroke: var(--ink-2); stroke-width: 1.6; }

/* filters */
.filters { overflow-y: auto; padding: 16px; border-right: 1px solid var(--line); background: #faf9f6; }
.f-group { margin-bottom: 18px; }
.f-group h4 { margin: 0 0 8px; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); }
.screen-list { display: grid; gap: 1px; }
.scr { display: flex; align-items: center; gap: 6px; text-align: left; padding: 6px 8px; border-radius: 7px; font-size: 13.5px; }
.scr em { font-style: normal; font-size: 10.5px; color: var(--ink-3); }
.scr small, .chip small { margin-left: auto; font-size: 11.5px; color: var(--ink-3); font-weight: 600; }
.scr:hover { background: #efeee8; }
.scr.on { background: var(--ink); color: #fff; }
.scr.on small, .scr.on em { color: #cfcfcf; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; }
.chip { display: inline-flex; gap: 6px; align-items: center; padding: 4px 9px; border: 1px solid var(--line-2); border-radius: 999px; font-size: 12.5px; background: var(--paper); }
.chip small { margin-left: 0; }
.chip:hover { border-color: var(--ink); }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip.on small { color: #cfcfcf; }
.chip.sev-blocker.on { background: var(--blocker); border-color: var(--blocker); }
.chip.sev-major.on { background: var(--major); border-color: var(--major); }
.chip.sev-minor.on { background: var(--minor); border-color: var(--minor); }
.link-btn { font-size: 12.5px; color: var(--ink-2); text-decoration: underline; }

/* issue list */
.list-col { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--line); background: var(--paper); }
.list-head { flex: none; display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.list-head input { flex: 1; height: 34px; border: 1px solid var(--line-2); border-radius: 8px; padding: 0 10px; font: inherit; background: var(--bg); }
.list-head input:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
.list-head span { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.issue-list { flex: 1; overflow-y: auto; }
.issue { width: 100%; display: grid; grid-template-columns: 10px 1fr auto; gap: 10px; align-items: start; text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.issue:hover { background: #faf9f5; }
.issue.sel { background: #f1efe8; box-shadow: inset 3px 0 0 var(--ink); }
.issue.gone { opacity: .6; }
.sev-dot { width: 10px; height: 10px; border-radius: 3px; margin-top: 4px; }
.sev-blocker .sev-dot { background: var(--blocker); }
.sev-major .sev-dot { background: var(--major); }
.sev-minor .sev-dot { background: var(--minor); }
.i-title { display: block; font-size: 13.5px; font-weight: 600; line-height: 1.35; }
.i-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; margin-top: 3px; font-size: 11.5px; color: var(--ink-3); }
.st-pill { font-size: 10.5px; font-weight: 600; padding: 2px 7px; border-radius: 999px; white-space: nowrap; border: 1px solid currentColor; }
.st-pill.st-open { color: var(--st-open); }
.st-pill.st-progress { color: var(--st-progress); }
.st-pill.st-fixed { color: var(--st-fixed); }
.st-pill.st-wont { color: var(--st-wont); }
.empty { padding: 30px 16px; color: var(--ink-3); text-align: center; }

/* detail */
.detail { overflow-y: auto; min-width: 0; }
.detail-empty { padding: 60px 40px; color: var(--ink-2); font-size: 15px; max-width: 460px; }
.detail-inner { display: flex; gap: 28px; padding: 22px 26px 40px; align-items: flex-start; }
.phone-col { flex: none; position: sticky; top: 0; }
.phone-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; font-size: 13px; }
.phone-head span { font: 11.5px var(--mono); color: var(--ink-3); }
.phone-head label { margin-left: auto; font-size: 12px; color: var(--ink-2); display: flex; gap: 5px; align-items: center; cursor: pointer; }
.phone-holder { position: relative; border-radius: 18px; overflow: hidden; box-shadow: 0 0 0 1px var(--line-2), 0 12px 30px rgba(0,0,0,.12); background: #fff; }
.phone-scale, .markers { position: absolute; left: 0; top: 0; transform-origin: 0 0; }
.markers { pointer-events: none; }
.marker { position: absolute; pointer-events: auto; border: 2px solid; border-radius: 6px; background: transparent; }
.marker.sev-blocker { border-color: var(--blocker); background: rgba(200,35,27,.08); }
.marker.sev-major { border-color: var(--major); background: rgba(217,98,11,.07); }
.marker.sev-minor { border-color: var(--minor); background: rgba(138,122,18,.06); }
.marker.sel { border-width: 3px; z-index: 2; }
.marker.focus { box-shadow: 0 0 0 4000px rgba(20,20,20,.28); }
.marker span { position: absolute; left: -10px; top: -10px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; color: #fff; font: 700 11px/20px var(--ui); text-align: center; }
.marker.sev-blocker span { background: var(--blocker); }
.marker.sev-major span { background: var(--major); }
.marker.sev-minor span { background: var(--minor); }
.marker.whole { left: 8px; right: 8px; bottom: 8px; top: auto; display: flex; gap: 8px; align-items: center; padding: 8px 10px 8px 14px; border-radius: 10px; background: #fff; box-shadow: 0 6px 20px rgba(0,0,0,.25); }
.marker.whole span { position: static; }
.marker.whole span:empty { display: none; }
.marker.whole em { font: 600 13px/1.3 var(--ui); font-style: normal; color: var(--ink); }
.target-ring { position: absolute; width: 48px; height: 48px; border: 2px dashed var(--st-fixed); border-radius: 8px; z-index: 3; }

.explain { flex: 1; min-width: 280px; max-width: 640px; }
.explain h2 { margin: 8px 0 4px; font-size: 22px; line-height: 1.25; letter-spacing: -.02em; }
.explain h3 { margin: 22px 0 6px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); }
.where { margin: 0; color: var(--ink-2); font-size: 13px; }
.why, .fix-text { margin: 0; font-size: 15px; line-height: 1.6; }
.fix-text { font-weight: 500; }
.ex-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.sev-tag, .tag { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; padding: 3px 8px; border-radius: 5px; }
.sev-tag.sev-blocker { background: var(--blocker); color: #fff; }
.sev-tag.sev-major { background: var(--major); color: #fff; }
.sev-tag.sev-minor { background: var(--minor); color: #fff; }
.tag { background: #ecebe5; color: var(--ink-2); }
.tag.plat { background: transparent; border: 1px solid var(--line-2); }
.gone-note { background: #e9f6ee; color: var(--st-fixed); padding: 8px 12px; border-radius: 8px; font-size: 13px; }
.status-row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 14px; }
.st-btn { height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--line-2); font-size: 13px; font-weight: 500; background: var(--paper); }
.st-btn:hover { border-color: var(--ink); }
.st-btn.on.st-open { background: var(--st-open); border-color: var(--st-open); color: #fff; }
.st-btn.on.st-progress { background: var(--st-progress); border-color: var(--st-progress); color: #fff; }
.st-btn.on.st-fixed { background: var(--st-fixed); border-color: var(--st-fixed); color: #fff; }
.st-btn.on.st-wont { background: var(--st-wont); border-color: var(--st-wont); color: #fff; }
.status-row .muted { font-size: 12px; margin-left: 4px; }
.meter { display: flex; gap: 12px; align-items: center; margin-top: 12px; font-size: 13px; color: var(--ink-2); }
.meter .sw { width: 56px; height: 40px; border-radius: 8px; display: grid; place-items: center; font: 600 18px Roboto, sans-serif; box-shadow: 0 0 0 1px var(--line-2); }

/* before / after */
.ba { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; }
.ba:empty { display: none; }
.ba-pane { min-width: 0; }
.ba-label { display: inline-block; font-size: 11px; text-transform: uppercase; letter-spacing: .1em; font-weight: 700; color: var(--ink-3); margin-bottom: 6px; }
.ba-pane:last-child .ba-label { color: var(--st-fixed); }
.ba-stage { position: relative; min-height: 90px; display: flex !important; align-items: center; justify-content: center; padding: 18px; border-radius: 12px; box-shadow: 0 0 0 1px var(--line-2); overflow: auto; width: auto !important; height: auto !important; }
.ba-stage > .v { flex: none; }
.ba-note { grid-column: 1 / -1; margin: 0; font-size: 12px; color: var(--ink-3); }
.show-target { outline: 2px dashed var(--blocker); outline-offset: 0; }
.ba-pane:last-child .show-target { outline-color: var(--st-fixed); }
.swatch { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.swatch i { width: 64px; height: 64px; border-radius: 12px; box-shadow: 0 0 0 1px var(--line-2); }
.scale-col { display: grid; gap: 2px; font-family: Roboto, sans-serif; color: #222; }
.scale-col small { font: 11px var(--mono); color: var(--ink-3); }
.palette { display: flex; flex-wrap: wrap; gap: 4px; max-width: 220px; }
.palette i { width: 22px; height: 22px; border-radius: 5px; box-shadow: 0 0 0 1px rgba(0,0,0,.12); }
.roles { display: grid; gap: 4px; }
.mock-field { position: relative; width: 210px; height: 50px; border-bottom: 1px solid #999; margin: 6px 0; display: flex; align-items: center; padding: 0 12px; font: 15px Roboto, sans-serif; color: #999; }
.mock-field.typed { color: #222; }
.mock-field.outlined { border: 1.5px solid #6750a4; border-radius: 6px; color: #222; }
.mock-field label { position: absolute; top: -9px; left: 9px; background: #fff; padding: 0 4px; font-size: 12px; color: #6750a4; }
.mock-cap { margin: 4px 0 0; font-size: 12px; color: var(--ink-3); }
.mini-phone { position: relative; width: 180px; height: 380px; overflow: hidden; border-radius: 12px; box-shadow: 0 0 0 1px var(--line-2); }
.state-layer { position: absolute; inset: 0; display: grid; place-items: center; font-family: Roboto, sans-serif; }
.st-loading { background: rgba(255,255,255,.92); border-radius: 12px; padding: 14px 16px; display: flex; gap: 10px; align-items: center; box-shadow: 0 4px 16px rgba(0,0,0,.18); font-size: 12px; }
.st-loading i { width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid #ddd; border-top-color: #6750a4; animation: spin 1s linear infinite; }
.st-error { align-self: end; margin: 0 8px 12px; background: #322f35; color: #fff; border-radius: 6px; padding: 10px 12px; display: grid; gap: 2px; font-size: 11px; width: calc(100% - 16px); }
.st-error em { font-style: normal; color: #d0bcff; font-weight: 600; justify-self: end; }
.st-empty { background: #fff; width: 100%; height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-align: center; padding: 20px; font-size: 11px; color: #555; }
.st-empty i { width: 44px; height: 44px; border-radius: 50%; background: #ece6f0; margin-bottom: 6px; }
.st-empty b { font-size: 13px; color: #1d1b20; }
.st-empty em { font-style: normal; margin-top: 8px; background: #6750a4; color: #fff; border-radius: 14px; padding: 5px 12px; }
.st-field { align-self: start; margin-top: 120px; background: #fff; padding: 8px; border-radius: 8px; display: grid; gap: 3px; width: 85%; box-shadow: 0 4px 16px rgba(0,0,0,.15); font-size: 10px; }
.st-field .lbl { color: #b3261e; }
.st-field .box { height: 26px; border: 2px solid #b3261e; border-radius: 4px; }
.st-field .err { color: #b3261e; }

/* XML */
.xml-cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
.xml-cols > div { min-width: 0; }
.mapping { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.xml-cols > div:only-child { grid-column: 1 / -1; }
.xml-cols pre { margin: 0; padding: 10px 0; background: #1b1b1f; color: #d6d6dc; border-radius: 10px; font: 11.5px/1.6 var(--mono); overflow: auto; max-height: 320px; }
.xl { padding: 0 12px; white-space: pre; }
.xl q { quotes: none; color: #a5d6a7; }
.xl.hl { background: rgba(200,35,27,.32); }
.xl.add { background: rgba(21,128,61,.35); }
.mini-list { padding-left: 22px; display: grid; gap: 6px; }
.mini-list li::marker { font-weight: 700; }
.mini-list li.sev-blocker::marker { color: var(--blocker); }
.mini-list li.sev-major::marker { color: var(--major); }
.mini-list li.sev-minor::marker { color: var(--minor); }
.mini-list button { text-align: left; font-size: 13.5px; }
.mini-list button:hover { text-decoration: underline; }

/* AI prompt */
.ai-btn { display: inline-flex; align-items: center; gap: 7px; background: var(--ink); color: #fff; border-color: var(--ink); }
.ai-btn:hover { background: #000; }
.ai-btn svg { width: 16px; height: 16px; fill: #e5372c; stroke: none; }
.ai-one { margin-left: auto; border-color: var(--ink); }
.prompt-dialog { width: min(880px, calc(100vw - 40px)); max-height: calc(100vh - 60px); padding: 0; border: 0; border-radius: 16px; background: var(--paper); color: var(--ink); box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.prompt-dialog[open] { display: flex; flex-direction: column; }
.prompt-dialog::backdrop { background: rgba(20,20,20,.45); backdrop-filter: blur(3px); }
.pd-head { display: flex; gap: 16px; align-items: flex-start; padding: 20px 22px 12px; border-bottom: 1px solid var(--line); }
.pd-head h2 { margin: 0 0 4px; font-size: 20px; letter-spacing: -.02em; }
.pd-head p { margin: 0; color: var(--ink-2); font-size: 13.5px; }
.pd-close { margin-left: auto; width: 34px; height: 34px; flex: none; border-radius: 8px; border: 1px solid var(--line-2); }
.pd-close:hover { border-color: var(--ink); }
.pd-body { display: flex; flex-direction: column; gap: 10px; padding: 14px 22px 18px; min-height: 0; flex: 1; }
.pd-scopes { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 13.5px; }
.pd-scopes label, .pd-opt { display: flex; align-items: center; gap: 6px; cursor: pointer; }
.pd-opt { font-size: 13px; color: var(--ink-2); }
.pd-scopes input, .pd-opt input { accent-color: var(--ink); margin: 0; }
#pdText { flex: 1; min-height: 340px; width: 100%; resize: vertical; border: 0; border-radius: 10px; padding: 14px 16px; background: #1b1b1f; color: #d6d6dc; font: 12px/1.6 var(--mono); }
#pdText:focus { outline: 2px solid var(--blocker); }
.pd-foot { display: flex; align-items: center; gap: 8px; }
.pd-foot span { margin-right: auto; font-size: 12.5px; color: var(--ink-3); }
.primary-btn { height: 36px; padding: 0 16px; border-radius: 8px; background: var(--blocker); color: #fff; font-weight: 600; }
.primary-btn:hover { background: #a91c15; }

/* off-screen stage where screens are drawn to be measured */
#stage { position: fixed; left: -20000px; top: 0; width: 400px; pointer-events: none; }

@media (max-width: 1200px) {
  .cols { grid-template-columns: 200px 320px 1fr; }
  .summary { grid-template-columns: auto 1fr auto; }
  .summary .progress { grid-column: 1 / -1; }
  .detail-inner { flex-direction: column; }
}
@media (max-width: 860px) {
  body { overflow: auto; }
  main, .review, .cols { display: block; }
  .landing { grid-template-columns: 1fr; }
  .filters, .list-col { border-right: 0; }
  .issue-list { max-height: 60vh; }
}

/* ---------------------------------------------------------------- the rendered phone */

.phone {
  position: relative; display: flex; flex-direction: column; overflow: hidden;
  font-family: Roboto, "Segoe UI", system-ui, sans-serif; color: #000; text-align: left;
  font-size: 14px; line-height: 1.2; user-select: none;
}
.phone *, .phone *::before { box-sizing: border-box; }
.phone.standalone { min-height: 40px; }
.status-bar { flex: none; height: 24px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; font-size: 12px; font-weight: 500; }
.status-icons { display: flex; gap: 5px; align-items: center; }
.status-icons i { width: 12px; height: 9px; border-radius: 2px 2px 0 0; background: currentColor; opacity: .85; clip-path: polygon(100% 0, 100% 100%, 0 100%); }
.status-icons b { width: 16px; height: 8px; border: 1.5px solid currentColor; border-radius: 2px; opacity: .85; }
.action-bar { flex: none; height: 56px; display: flex; align-items: center; padding: 0 16px; font-size: 20px; font-weight: 500; box-shadow: 0 2px 4px rgba(0,0,0,.2); z-index: 1; }
.screen-content { flex: 1; position: relative; min-height: 0; display: grid; grid-template: minmax(0, 1fr) / minmax(0, 1fr); overflow: hidden; }
.standalone .screen-content { display: block; }
.no-layout { display: grid; place-items: center; color: #888; font-size: 14px; padding: 24px; text-align: center; }

.v { position: relative; min-width: 0; min-height: 0; flex-shrink: 1; }
.v-text, .v-button, .v-edit, .v-check, .v-radio, .v-switch, .v-chip, .v-spinner, .v-efab { overflow: hidden; }
.v .txt { overflow-wrap: anywhere; white-space: pre-wrap; }
.v .txt.clamp { display: -webkit-box; -webkit-box-orient: vertical; overflow: hidden; }
.v img.icon { display: block; max-width: 100%; max-height: 100%; }
.v .icon { flex: none; }
.bg-layer { position: absolute; z-index: -1; pointer-events: none; }
.mark { display: grid; place-items: center; }
.mark-radio i { width: 10px; height: 10px; border-radius: 50%; display: block; }
.sw-track { position: relative; flex: none; }
.sw-track i { position: absolute; top: 50%; translate: 0 -50%; border-radius: 50%; }
.seek-track { height: 4px; border-radius: 2px; position: relative; }
.seek-fill { height: 100%; border-radius: 2px; }
.seek-thumb { position: absolute; top: 50%; width: 18px; height: 18px; border-radius: 50%; translate: -50% -50%; }
.til-end { width: 40px; display: grid; place-items: center; flex: none; }
.til-help { font-size: 12px; padding: 4px 16px 0; }
.spin-arrow { padding: 0 8px; opacity: .7; }
.tb-icon { width: 48px; height: 48px; display: grid; place-items: center; flex: none; font-size: 20px; }
.tb-title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tb-sub { font-size: 14px; opacity: .8; }
.bn-item { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; min-width: 0; }
.bn-pill { width: 64px; height: 32px; border-radius: 16px; display: grid; place-items: center; }
.bn-label { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.tab { flex: 1; display: grid; place-items: center; font-size: 14px; font-weight: 500; }
.placeholder {
  display: grid; place-items: center; width: 100%; height: 100%; min-height: inherit; padding: 6px;
  font: 500 11px/1.2 Roboto, sans-serif; color: #8a8aa0; text-align: center;
  background: repeating-linear-gradient(45deg, rgba(128,128,128,.08) 0 8px, rgba(128,128,128,.16) 8px 16px);
  border: 1px dashed rgba(128,128,128,.5); border-radius: 4px;
}
.empty-image { background: repeating-linear-gradient(45deg, rgba(128,128,128,.08) 0 8px, rgba(128,128,128,.16) 8px 16px); }
.list-skeleton { display: flex; gap: 12px; align-items: center; padding: 12px 16px; }
.list-skeleton i { width: 40px; height: 40px; border-radius: 50%; background: rgba(128,128,128,.25); flex: none; }
.list-skeleton span { flex: 1; display: grid; gap: 6px; }
.list-skeleton b { height: 10px; border-radius: 5px; background: rgba(128,128,128,.25); }
.list-skeleton b + b { width: 60%; opacity: .7; }
.list-row { flex: none; }
.dialog-scrim { grid-area: 1 / 1; z-index: 2; background: rgba(0,0,0,.5); display: grid; place-items: center; padding: 24px; }
.dialog-card { width: 100%; max-height: 100%; overflow: hidden; box-shadow: 0 10px 30px rgba(0,0,0,.4); }
.under-dialog { grid-area: 1 / 1; }

/* link back to Review Deck (shown when you came from there) */
.deck-back { flex: none; display: inline-flex; align-items: center; height: 30px; padding: 0 11px; margin-right: 4px; border-radius: 999px; border: 1px solid #cfccc2; background: #fff; color: #141414; font: 600 12.5px Inter, system-ui, sans-serif; text-decoration: none; white-space: nowrap; }
.deck-back:hover { border-color: #141414; }
:root[data-theme="dark"] .deck-back { border-color: #3a3a3e; background: #18181a; color: #f4f3ef; }
:root[data-theme="dark"] .deck-back:hover { border-color: #f4f3ef; }
.topbar .brand { margin-right: auto; }
