/* Screenlint: one stylesheet for the landing page (/) and the upload page (/upload).
   Light and dark follow the visitor's system setting. Report pages under /r/ carry
   their own copy of these tokens (mac/report.js), since their CSP allows no stylesheets. */
:root {
  --bg: #fafafa; --surface: #fff; --line: #e5e5ea; --line-strong: #d2d2d7; --line-hover: #86868b;
  /* Text and button colours keep 4.5:1 against what they sit on (WCAG 2.2 AA, external review R33):
     accent text on the page and on --accent-soft, white on --accent-fill, placeholders in --faint. */
  --ink: #1d1d1f; --muted: #6e6e73; --faint: #737378;
  --accent: #0063cc; --accent-hover: #0050a8; --accent-soft: #e8f1ff; --on-accent: #fff;
  --accent-fill: #0063cc; --accent-fill-hover: #0050a8;
  --code-bg: #1d1d1f; --code-fg: #f5f5f7; --code-dim: #8e8e93; --code-key: #ff7ab2; --code-str: #ff8170;
  --critical: #b91c1c; --critical-bg: #fee2e2; --major: #b45309; --major-bg: #fef3c7;
  --minor: #6b5b00; --minor-bg: #fbf3c4; --polish: #6e6e73; --polish-bg: #f2f2f7;
  --ok: #1f7a3d; --ok-bg: #e3f4e8;
  --sans: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
  --radius: 10px; --shadow: 0 1px 3px rgba(0, 0, 0, .06); --maxw: 1080px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f0f10; --surface: #1c1c1e; --line: #2c2c2e; --line-strong: #3a3a3c; --line-hover: #8e8e93;
    --ink: #f5f5f7; --muted: #a1a1a6; --faint: #8e8e93;
    --accent: #409cff; --accent-hover: #6cb4ff; --accent-soft: #0a2540;
    --accent-fill: #0a6fd6; --accent-fill-hover: #0063cc;
    --code-bg: #000; --code-fg: #f5f5f7; --code-dim: #8e8e93;
    --critical: #ff8a80; --critical-bg: #3a1517; --major: #ffb35c; --major-bg: #3a2a12;
    --minor: #e6d36a; --minor-bg: #33300f; --polish: #c7c7cc; --polish-bg: #2c2c2e;
    --ok: #7ee2a0; --ok-bg: #133020;
    --shadow: none;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 var(--sans); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
h1 { font-size: 46px; font-weight: 700; line-height: 1.08; letter-spacing: -.025em; }
h2 { font-size: 32px; font-weight: 700; line-height: 1.2; letter-spacing: -.015em; }
h3 { font-size: 18px; font-weight: 600; line-height: 1.35; }
p { margin: 0; text-wrap: pretty; }
a { color: inherit; }
code { font: 13px/1.5 var(--mono); background: var(--polish-bg); border-radius: 5px; padding: 1px 5px; overflow-wrap: anywhere; }
pre { background: var(--code-bg); color: var(--code-fg); border-radius: var(--radius); padding: 14px 16px; overflow-x: auto; margin: 0 0 12px; font: 13px/1.55 var(--mono); }
pre code { padding: 0; background: none; color: inherit; font: inherit; }
.muted { color: var(--muted); }
.small { font-size: 13px; line-height: 1.5; color: var(--muted); }
.wrap { max-width: var(--maxw); margin: 0 auto; padding-inline: 24px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* Buttons and links */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px;
  font: 600 16px/1.2 var(--sans); padding: 12px 24px; border-radius: var(--radius); border: 1px solid transparent;
  cursor: pointer; text-decoration: none; white-space: nowrap; transition: transform .12s ease-out, background-color .16s, border-color .16s, opacity .16s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--accent-fill); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-fill-hover); }
.btn-secondary { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-secondary:hover { border-color: var(--line-hover); }
.btn:disabled { opacity: .35; cursor: not-allowed; transform: none; }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); text-decoration: none; cursor: pointer; }
.link:hover { text-decoration: underline; text-underline-offset: 2px; }
.contact-known { margin: 0 0 18px; }

/* Nav */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(180%) blur(12px); -webkit-backdrop-filter: saturate(180%) blur(12px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; justify-content: space-between; gap: 24px; height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; letter-spacing: -.01em; text-decoration: none; color: var(--ink); }
.brand svg { width: 22px; height: 22px; flex: none; color: var(--accent); }
.nav-links { display: flex; align-items: center; gap: 28px; }
.nav-links a:not(.btn) { text-decoration: none; color: var(--muted); font-size: 15px; }
.nav-links a:not(.btn):hover { color: var(--ink); }
.nav .btn { min-height: 38px; padding: 8px 16px; font-size: 15px; }

/* Severity chips, shared with the sample report */
.chip { display: inline-flex; align-items: center; font: 600 11px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; border-radius: 6px; padding: 5px 7px 4px; white-space: nowrap; }
.chip.critical { color: var(--critical); background: var(--critical-bg); }
.chip.major { color: var(--major); background: var(--major-bg); }
.chip.minor { color: var(--minor); background: var(--minor-bg); }
.chip.polish { color: var(--polish); background: var(--polish-bg); }
.chip.accent { color: var(--accent); background: var(--accent-soft); }
.chip.ok { color: var(--ok); background: var(--ok-bg); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px; }
.works { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-size: 14px; color: var(--muted); }
.works b { color: var(--ink); font-weight: 600; }
.works .dot { color: var(--faint); }

/* Form fields */
label, .label { display: block; font-size: 13px; font-weight: 600; margin: 0 0 6px; }
.opt { color: var(--faint); font-weight: 400; }
input[type=text], input[type=email], input[type=password], textarea, select {
  width: 100%; font: 16px/1.3 var(--sans); color: var(--ink); background: var(--surface);
  border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 11px 13px; min-height: 46px;
  transition: border-color .15s, box-shadow .15s;
}
input::placeholder, textarea::placeholder { color: var(--faint); }
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.status { margin-top: 14px; padding: 10px 12px; border-radius: 9px; font-size: 14px; }
.status ul { margin: 4px 0; padding-left: 18px; }
.status.ok { background: var(--ok-bg); color: var(--ok); }
.status.error { background: var(--critical-bg); color: var(--critical); }
.status.info { background: var(--polish-bg); color: var(--muted); }
.status a { color: inherit; }
.ref { font-size: 12px; opacity: .8; margin-top: 4px; font-family: var(--mono); }
/* One block per upload waiting to be paid for (app.js showPay). */
.status .pay + .pay { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.status .pay .btn { margin-top: 8px; }

/* ---------- Landing page ---------- */
section { padding-block: 88px; }
.band { background: var(--surface); border-block: 1px solid var(--line); }
.section-head { display: grid; gap: 14px; max-width: 62ch; margin-bottom: 44px; }
.section-head p { color: var(--muted); font-size: 18px; }
.eyebrow { font: 600 13px/1 var(--sans); letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }

.hero { padding-block: 64px 88px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.hero-copy { display: grid; gap: 22px; min-width: 0; }
.hero-copy .sub { font-size: 19px; color: var(--muted); max-width: 52ch; }
.cred { display: flex; gap: 10px; font-size: 13px; line-height: 1.5; color: var(--muted); max-width: 60ch; padding-top: 16px; border-top: 1px solid var(--line); }
.cred svg { flex: none; width: 16px; height: 16px; margin-top: 1px; color: var(--ok); }

/* Request-access form */
.capture { display: grid; gap: 8px; max-width: 520px; }
.capture-row { display: flex; gap: 8px; }
.capture-row input { flex: 1; min-width: 0; }
.capture .more { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.capture .status { margin-top: 4px; }
.capture.sent .capture-row, .capture.sent .more, .capture.sent > button { display: none; }

/* Hero art: a phone mock-up (a regular iPhone) */
.phone { position: relative; aspect-ratio: 9 / 19; border-radius: 26px; border: 6px solid #1d1d1f; background: #fff; padding: 22px 10px 10px; display: grid; gap: 7px; align-content: start; box-shadow: 0 10px 30px rgba(0, 0, 0, .08); overflow: hidden; }
.phone::before { content: ""; position: absolute; top: 6px; left: 50%; translate: -50% 0; width: 34%; height: 9px; border-radius: 6px; background: #1d1d1f; }
.phone i { display: block; height: 8px; border-radius: 4px; background: #e5e5ea; }
.phone i.t { height: 13px; width: 70%; background: #1d1d1f; }
.phone i.s { width: 55%; }
.phone i.b { height: 26px; border-radius: 7px; background: #007aff; margin-top: auto; }
.phone i.row { height: 30px; border-radius: 7px; background: #f2f2f7; }
@media (prefers-color-scheme: dark) { .phone { border-color: #3a3a3c; } .phone::before { background: #3a3a3c; } }
.phone-cap { margin-top: 10px; font-size: 12px; color: var(--muted); text-align: center; }
.pin { position: absolute; z-index: 1; width: 20px; height: 20px; border-radius: 50%; background: #d70015; color: #fff; font: 700 11px/20px var(--sans); text-align: center; box-shadow: 0 0 0 3px var(--bg); }
.pin.major { background: #c45500; }

/* iPhone Duo: alert eyebrow, the cover-screen hero art, the dark "cover-screen test" section */
.eyebrow-alert { display: inline-flex; align-items: center; gap: 8px; color: var(--critical); }
.eyebrow-alert i { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 currentColor; animation: duo-pulse 2.4s ease-out infinite; }
@keyframes duo-pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, currentColor 45%, transparent); } 70%, 100% { box-shadow: 0 0 0 9px transparent; } }
@media (prefers-reduced-motion: reduce) { .eyebrow-alert i { animation: none; } }
.duo-art { display: grid; grid-template-columns: minmax(0, .69fr) minmax(0, 1fr); gap: 18px; align-items: end; }
.duo-art figure { margin: 0; position: relative; }
.duo-screen { position: relative; aspect-ratio: 11 / 16; border-radius: 26px; border: 6px solid #1d1d1f; background: #000; overflow: hidden; box-shadow: 0 18px 40px rgba(0, 0, 0, .14); }
.duo-app { position: absolute; inset: 9% 14%; background: #fff; padding: 22px 10px 10px; display: grid; gap: 7px; align-content: start; }
.duo-app i { display: block; height: 8px; border-radius: 4px; background: #e5e5ea; }
.duo-app i.t { height: 13px; width: 70%; background: #1d1d1f; }
.duo-app i.s { width: 55%; }
.duo-app i.row { height: 30px; border-radius: 7px; background: #f2f2f7; }
.duo-app i.b { height: 26px; border-radius: 7px; background: #007aff; position: absolute; left: 10px; right: 10px; bottom: 10px; }
.pin.p-band { top: 2%; left: calc(50% - 10px); }
.pin.p-strand { top: 30%; left: 3%; }
@media (prefers-color-scheme: dark) { .duo-screen { border-color: #3a3a3c; } }

.duo { background: radial-gradient(120% 90% at 85% 0%, #2a0d12 0%, transparent 55%), #0b0b0d; color: #f5f5f7; border-block: 1px solid #1f1f22; }
.duo .eyebrow { color: #ff8a80; }
.duo .section-head { max-width: 72ch; }
.duo .section-head p { color: #a1a1a6; }
.duo .card { background: #151517; border-color: #2c2c2e; box-shadow: none; }
.duo .problem .k { color: #ff8a80; }
.duo .problem p { color: #a1a1a6; }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
.stakes { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 48px; padding-top: 32px; border-top: 1px solid #2c2c2e; }
.stakes p { color: #a1a1a6; font-size: 15px; }
.stakes b { display: block; color: #f5f5f7; font-size: 17px; margin-bottom: 4px; }
.duo-scope { margin-top: 32px; color: #a1a1a6; font-size: 15px; }
.duo-scope b { color: #f5f5f7; }

/* Problem cards */
.grid-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.problem { display: grid; gap: 12px; align-content: start; }
.problem .k { font: 600 12px/1 var(--mono); color: var(--muted); }
.problem p { color: var(--muted); font-size: 15px; }
.snippet { background: var(--code-bg); color: var(--code-fg); border-radius: 8px; padding: 10px 12px; font: 12px/1.55 var(--mono); overflow-x: auto; white-space: pre; }
.snippet .d { color: var(--code-dim); } .snippet .k { color: var(--code-key); } .snippet .s { color: var(--code-str); }

/* Steps */
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-bottom: 64px; }
.step { display: grid; gap: 8px; align-content: start; }
.step p { color: var(--muted); }
.step-n { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line-strong); display: grid; place-items: center; font-weight: 600; font-size: 15px; margin-bottom: 6px; background: var(--surface); }

/* Sample report */
.demo { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 20px; }
.panel-label { font-size: 13px; color: var(--muted); margin-bottom: 8px; font-weight: 600; }
.demo .snippet { height: calc(100% - 29px); padding: 18px; font-size: 12.5px; border-radius: var(--radius); }
.report { display: grid; gap: 14px; }
.report-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; align-items: baseline; }
.report-head small { color: var(--muted); font-size: 13px; }
.tally { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.tally div { border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; display: grid; gap: 4px; }
.tally b { font-size: 22px; line-height: 1; }
.finding { border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; display: grid; gap: 6px; }
.finding header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.finding h4 { margin: 0; font-size: 15px; }
.finding p { font-size: 14px; color: var(--muted); }
.finding .fix { font-size: 14px; color: var(--ink); border-top: 1px solid var(--line); padding-top: 8px; }
.finding .fix b { color: var(--accent); }
.demo-intro { margin-bottom: 18px; font-size: 17px; }

/* Benefits */
.benefits { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px 32px; }
.benefit { display: grid; gap: 6px; align-content: start; }
.benefit svg { width: 22px; height: 22px; color: var(--accent); margin-bottom: 4px; }
.benefit p { color: var(--muted); font-size: 15px; }

/* Services */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; align-items: stretch; }
.plan { display: grid; grid-template-rows: auto auto 1fr auto auto; gap: 14px; position: relative; }
.plan.featured { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent), var(--shadow); }
.plan .tag { position: absolute; top: -11px; left: 20px; }
.plan .price { font-size: 15px; color: var(--muted); }
.plan .price b { font-size: 24px; color: var(--ink); letter-spacing: -.01em; }
.plan .price .free { display: flex; width: fit-content; margin-top: 8px; white-space: normal; line-height: 1.3; }
.after-plans { margin-top: 20px; max-width: 72ch; }
.after-plans a, .faq details p a { color: var(--accent); }
.plan ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; font-size: 15px; align-content: start; }
.plan li { padding-left: 24px; position: relative; }
.plan li::before { content: ""; position: absolute; left: 2px; top: 7px; width: 12px; height: 7px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); rotate: -45deg; }
.plan.soon { background: transparent; border-style: dashed; box-shadow: none; }
.plan.soon li::before { border-color: var(--faint); }
.plan .best { font-size: 13px; color: var(--muted); }
.plan .btn { width: 100%; white-space: normal; text-align: center; }
.early { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: -20px 0 32px; font-size: 15px; color: var(--muted); max-width: 72ch; }
dialog .plan-pick { font-size: 14px; font-weight: 600; color: var(--ink); margin: 0; }
dialog .capture { max-width: none; margin-top: 14px; }
dialog p b { color: var(--ink); }

/* FAQ */
.faq { max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); padding: 18px 0; }
.faq summary { cursor: pointer; list-style: none; font-weight: 600; font-size: 17px; display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--muted); font-weight: 400; font-size: 22px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin-top: 10px; color: var(--muted); }

footer { padding-block: 28px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; }
footer a { color: var(--muted); }
footer .legal { display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* ---------- Terms, privacy, refunds and other plain pages ---------- */
.doc { max-width: calc(72ch + 48px); margin: 0 auto; padding: 48px 24px 64px; }
.doc h1 { font-size: 40px; margin-bottom: 8px; }
.doc .updated { color: var(--muted); font-size: 14px; margin-bottom: 28px; }
.doc h2 { font-size: 22px; margin: 36px 0 10px; }
.doc p, .doc ul { margin: 0 0 12px; }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 6px; }
.doc a { color: var(--accent); }

/* ---------- Upload page ---------- */
.upload-shell { max-width: var(--maxw); margin: 0 auto; padding: 40px 24px 56px; display: grid; grid-template-columns: 1fr minmax(0, 500px); gap: 56px; align-items: start; }
.upload-shell h1 { font-size: 36px; margin: 14px 0; }
.upload-shell .lede { color: var(--muted); margin: 0 0 18px; max-width: 36em; }
.upload-shell .works { margin-bottom: 26px; }
.tips { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; max-width: 32em; }
.tip { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; font-size: 14px; color: var(--muted); }
.tip b { display: block; color: var(--ink); font-weight: 600; margin-bottom: 2px; }

.upload-form { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 24px; box-shadow: var(--shadow); }
.upload-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.upload-form .row[hidden] { display: none; }
.upload-form .field { margin-bottom: 14px; min-width: 0; }
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.tier { position: relative; display: block; margin: 0; font-weight: 400; cursor: pointer; }
.tier input { position: absolute; opacity: 0; }
.tier > span { display: block; height: 100%; border: 1px solid var(--line-strong); border-radius: var(--radius); padding: 10px 11px; font-size: 13px; color: var(--muted); line-height: 1.3; transition: border-color .15s; }
.tier strong { display: block; color: var(--ink); font-size: 14px; font-weight: 600; margin-bottom: 2px; }
.tier small { display: block; font-size: inherit; }
.tier input:checked + span { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); background: var(--accent-soft); }
.tier input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.tier.locked { cursor: not-allowed; }
.tier.locked > span { border-style: dashed; background: transparent; }
.tier.locked strong { color: var(--muted); }
.lock { display: inline-flex; align-items: center; gap: 4px; color: var(--accent); font-size: 12px; font-weight: 600; }
.lock svg { width: 11px; height: 11px; }

.drop {
  display: flex; align-items: center; gap: 14px; text-align: left; margin-bottom: 4px;
  border: 1.5px dashed var(--line-strong); border-radius: 12px; padding: 16px; cursor: pointer; min-height: 76px;
  transition: border-color .15s, background .15s;
}
.drop:hover, .drop.over, .drop:focus-within { border-color: var(--accent); background: var(--accent-soft); }
.drop input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.drop svg { flex: none; width: 30px; height: 30px; color: var(--accent); }
.drop .file { display: block; font-weight: 600; word-break: break-all; }
.drop .hint { display: block; color: var(--muted); font-size: 13px; }

.upload-form details { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 12px; }
.upload-form details[open] summary { margin-bottom: 10px; }
.upload-form summary { cursor: pointer; font-size: 14px; font-weight: 600; list-style: none; display: flex; align-items: center; gap: 8px; }
.upload-form summary::-webkit-details-marker { display: none; }
.upload-form summary::before { content: "+"; display: inline-grid; place-items: center; width: 18px; height: 18px; border: 1px solid var(--line-strong); border-radius: 5px; font-weight: 400; color: var(--muted); }
.upload-form details[open] summary::before { content: "−"; }
.upload-form details .field { margin-bottom: 10px; }
.upload-form .handling { font-size: 14px; color: var(--muted); }
.upload-form .handling h3 { margin: 14px 0 2px; font-size: 14px; color: var(--ink); }
.upload-form .handling p, .upload-form .handling ul { margin: 0 0 6px; }
.upload-form .handling ul { padding-left: 18px; }
.upload-form .handling .lead { color: var(--ink); }
.upload-form .handling a { color: var(--accent); }
.note { font-size: 13px; color: var(--muted); margin: 14px 0 0; }
progress { width: 100%; height: 6px; margin-top: 12px; accent-color: var(--accent); }
.upload-form button[type=submit] { margin-top: 16px; width: 100%; }

dialog { max-width: 580px; width: calc(100% - 32px); max-height: calc(100dvh - 32px); border: 1px solid var(--line); border-radius: 14px; padding: 0; background: var(--surface); color: var(--ink); }
dialog .box { padding: 22px 24px; } /* clicks inside land on this box; only the backdrop closes the dialog */
dialog::backdrop { background: rgba(0, 0, 0, .45); }
dialog h2 { font-size: 22px; margin: 0 0 8px; }
dialog h3 { font-size: 15px; margin: 18px 0 4px; }
dialog p { color: var(--muted); font-size: 14px; margin: 0 0 10px; }
dialog .close { float: right; font-size: 14px; }

/* ---------- Narrow screens ---------- */
@media (max-width: 899px) {
  h1 { font-size: 36px; }
  h2 { font-size: 26px; }
  section { padding-block: 64px; }
  .hero { padding-block: 40px 64px; }
  .hero-grid, .demo { grid-template-columns: 1fr; }
  .grid-3, .steps, .plans, .benefits, .stakes { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stakes { gap: 20px; margin-top: 36px; }
  .steps { gap: 24px; margin-bottom: 48px; }
  .plans { gap: 28px; }
  .nav-links a:not(.btn) { display: none; }
  .upload-shell { grid-template-columns: 1fr; gap: 24px; padding: 24px 16px 32px; }
  .upload-shell aside { display: contents; }
  .upload-shell .intro { order: 1; }
  .upload-form { order: 2; padding: 18px; }
  .tips { order: 3; max-width: none; }
}
@media (max-width: 520px) {
  .wrap { padding-inline: 16px; }
  h1, .upload-shell h1 { font-size: 30px; }
  .hero-copy .sub, .section-head p { font-size: 16px; }
  .capture-row { flex-direction: column; }
  .capture .more { grid-template-columns: 1fr; }
  .grid-4 { grid-template-columns: 1fr; }
  .duo-art { gap: 10px; }
  .duo-screen { border-width: 4px; border-radius: 18px; }
  .duo-app { padding: 16px 6px 6px; gap: 5px; }
  .phone { border-width: 4px; border-radius: 18px; padding: 16px 6px 6px; gap: 5px; }
  .tally { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .upload-form .row { grid-template-columns: 1fr; gap: 0; }
  .tier > span { padding: 8px; text-align: center; }
  .tier strong { font-size: 13px; margin: 0; }
  .tier small, .wide { display: none; }
  .drop { min-height: 64px; padding: 12px; }
}
