/* Stumpreel's one stylesheet: every page (app, sign-in, dialogs, terms, privacy, admin, setup) is built from these
   components. The look is "Yard Sign" (docs/BRANDING.md):
   1. Condensed caps only for page titles, section titles and the main button; everything else is sentence case.
   2. One heavy thing per screen (thick ink border, hard shadow): the main button (.btn.gold) or the video being
      reviewed. Everything else gets a thin line.
   3. Square corners. Round only for things that are round: the swipe buttons, Stumpy's eyes.
   4. Color: ink, paper, one brand color, three status colors. No tints, gradients or soft shadows.
   5. A campaign's pages use its main color as --brand (applyTheme in app.js), with black or white text on it.
   6. Dark mode follows the phone: the ink flips, the brand color stays. */
:root {
  --orange: #E5532D;
  --brand: var(--orange); --on-brand: #0B0B0C;
  --bg: #FFFFFF; --surface: #FFFFFF; --sunk: #F4F4F2; --field: #FFFFFF;
  --ink: #0B0B0C; --ink-2: #2A2A2E; --muted: #5A5B61; --line: #C9C9CC;
  --ok: #1E6B3A; --warn: #7A5200; --bad: #B42318; --on-ok: #FFFFFF;
  --media: #0E1016;
  --heavy: 2px solid var(--ink); --hard: 4px 4px 0 var(--ink); --thin: 1px solid var(--line);
  --head: "Barlow Condensed", "Arial Narrow", sans-serif; --body: Barlow, system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121214; --surface: #1B1B1F; --sunk: #0B0B0D; --field: #0B0B0D;
    --ink: #F3F3F1; --ink-2: #D2D2D6; --muted: #A3A3AA; --line: #3B3B42;
    --ok: #7BD69B; --warn: #F2C94C; --bad: #FF8A80; --on-ok: #0B0B0C;
  }
}
@font-face { font-family: Barlow; src: url(/fonts/Barlow-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: Barlow; src: url(/fonts/Barlow-600.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: Barlow; src: url(/fonts/Barlow-700.woff2) format("woff2"); font-weight: 700 900; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url(/fonts/BarlowCondensed-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Barlow Condensed"; src: url(/fonts/BarlowCondensed-800.woff2) format("woff2"); font-weight: 800 900; font-display: swap; }

/* ── base ── */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.5 var(--body); }
h1, h2, .brand { font-family: var(--head); font-weight: 800; text-transform: uppercase; line-height: 1; letter-spacing: 0; }
h3 { font-size: 16px; font-weight: 700; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.muted { color: var(--muted); } .center { text-align: center; } .pad { padding: 48px 16px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; margin-top: 16px; }
.hint { font-size: 14px; color: var(--muted); margin: 10px 0 0; }
.hint.center { text-align: center; }
.fine { font-size: 14px; color: var(--muted); margin-top: 16px; }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); }
main { max-width: 760px; margin: 0 auto; padding: 0 16px 80px; }

/* ── header: the brand bar (Stumpreel orange, or the campaign's main color) ── */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px max(16px, calc((100% - 728px) / 2)); background: var(--brand); color: var(--on-brand); border-bottom: var(--heavy); border-color: #0B0B0C; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 26px; text-decoration: none; }
.mark { width: 30px; height: 33px; flex: none; }
.top .btn, .top .btn.ghost, .top .link { color: var(--on-brand); border-color: currentColor; background: transparent; box-shadow: none; }
.top .muted { color: inherit; opacity: .85; }
.beta { font-size: 14px; font-weight: 600; }
.acct-email { font-size: 14px; max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 420px) { .acct-email { display: none; } }

/* ── buttons: .btn (solid ink), .btn.ghost (outline), .btn.gold (THE main button), .link (text) ── */
.btn { appearance: none; border: 1px solid var(--ink); border-radius: 0; padding: 0 16px; min-height: 46px; font-weight: 700; font-size: 16px; cursor: pointer; background: var(--ink); color: var(--bg); display: inline-flex; align-items: center; justify-content: center; gap: 8px; text-decoration: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.ghost { background: var(--surface); color: var(--ink); font-weight: 600; }
.btn.gold { background: var(--brand); color: var(--on-brand); border: var(--heavy); box-shadow: var(--hard); font: 800 22px/1 var(--head); text-transform: uppercase; letter-spacing: .02em; min-height: 52px; transition: transform .06s, box-shadow .06s; }
.btn.gold:active:not(:disabled) { transform: translate(4px, 4px); box-shadow: none; }
.btn.ok { background: var(--ok); border-color: var(--ok); color: var(--on-ok); }
.btn.bad { background: var(--bad); border-color: var(--bad); color: var(--bg); }
.btn.sm { min-height: 40px; padding: 0 12px; font-size: 14px; }
.btn.big { min-height: 56px; font-size: 24px; }
.btn.wide { width: 100%; }
.link { background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 15px; font-weight: 600; }
.link .ic { margin-right: 6px; }
.f .link { justify-self: start; font-size: 13px; text-align: left; }
.x { border: 0; background: none; width: 44px; height: 44px; cursor: pointer; color: var(--muted); font-size: 24px; line-height: 1; display: grid; place-items: center; }
.round { width: 60px; height: 60px; border-radius: 50%; border: 1px solid var(--ink); cursor: pointer; background: var(--surface); color: var(--ink); display: grid; place-items: center; }
.round.skip { color: var(--bad); }
.round.keep { color: var(--on-ok); background: var(--ok); border-color: var(--ok); }
.round.undo { width: 44px; height: 44px; color: var(--muted); }
.round:disabled { opacity: .35; cursor: default; }

/* ── fields ── */
label.f { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
label.f small { font-weight: 400; color: var(--muted); }
label.f input, label.f textarea, label.f select, .start input, .snd select { width: 100%; min-height: 48px; padding: 10px 12px; border: var(--thin); border-radius: 0; background: var(--field); font-size: 16px; font-weight: 400; color: var(--ink); }
label.f textarea { resize: vertical; min-height: 72px; }
label.f input:focus, label.f textarea:focus, label.f select:focus, .start input:focus, .issue input:focus, .issue textarea:focus { outline: 2px solid var(--ink); outline-offset: -1px; border-color: var(--ink); }
label.f.req input { border: 2px solid var(--warn); }
label.f.req small { color: var(--warn); }
.grid { display: grid; gap: 12px; grid-template-columns: 1fr 1fr; }
.grid .full { grid-column: 1 / -1; }
@media (max-width: 560px) { .grid { grid-template-columns: 1fr; } }
.colors { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.colors input[type=color] { width: 48px; height: 44px; padding: 2px; border: 1px solid var(--ink); border-radius: 0; background: var(--field); }
.sw-lbl { display: grid; justify-items: center; gap: 2px; font-size: 12px; color: var(--muted); }
.swatches { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 10px 0 4px; font-size: 14px; }
.swatch { width: 32px; height: 32px; border-radius: 0; border: 1px solid var(--ink); cursor: pointer; padding: 0; }

/* ── choices: segmented (.fmt), tabs (.vtabs), chips ── */
.fmt { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--ink); }
.fmt button { border: 0; background: transparent; min-height: 44px; padding: 0 6px; font-weight: 400; color: var(--ink-2); cursor: pointer; }
.fmt button + button { border-left: 1px solid var(--ink); }
.fmt button[aria-pressed=true] { background: var(--ink); color: var(--bg); font-weight: 700; }
.vtabs { display: flex; gap: 22px; border-bottom: var(--thin); padding: 0 16px; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; overscroll-behavior-x: contain; } /* more tabs than fit: the row scrolls, the page doesn't */
.vtabs::-webkit-scrollbar { display: none; }
.vtabs button { flex: none; white-space: nowrap; border: 0; background: none; padding: 12px 0 8px; min-height: 44px; font-weight: 400; color: var(--muted); border-bottom: 4px solid transparent; margin-bottom: -1px; cursor: pointer; font-size: 16px; }
.vtabs button span { font-weight: 400; color: var(--muted); margin-left: 4px; }
.vtabs button[aria-selected=true] { color: var(--ink); font-weight: 700; border-color: var(--ink); }
.chip { border: 1px solid var(--line); background: transparent; border-radius: 0; min-height: 36px; padding: 0 12px; font-size: 14px; font-weight: 600; cursor: pointer; color: var(--ink); }
.chip[aria-pressed=true] { border-color: var(--ink); background: var(--ink); color: var(--bg); }
.chip.sm { min-height: 32px; padding: 0 9px; font-size: 13px; }
.reasons { display: flex; flex-wrap: wrap; gap: 8px; }

/* ── status labels (.pill) and notices (.note) ── */
.pill { font-size: 13px; font-weight: 700; padding: 1px 8px; border: 1px solid var(--line); color: var(--ink-2); white-space: nowrap; }
.pill.ok { border-color: var(--ok); color: var(--ok); } .pill.bad { border-color: var(--bad); color: var(--bad); } .pill.gold { border-color: var(--warn); color: var(--warn); }
.btn .pill { margin-left: 6px; color: inherit; border-color: currentColor; }
.note { background: var(--sunk); border: 1px solid var(--ink); padding: 12px 14px; font-size: 15px; margin: 12px 0; display: flex; gap: 10px; align-items: center; justify-content: space-between; }
.note.bad { border-color: var(--bad); color: var(--bad); }
#toast { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 12px 16px; font-size: 15px; font-weight: 600; max-width: calc(100% - 32px); z-index: 10; }
#toast.bad { background: var(--bad); color: var(--bg); }
.spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--line); border-top-color: var(--ink); animation: spin 1s linear infinite; margin: 0 auto 10px; }
.spin.sm { width: 16px; height: 16px; border-width: 2.5px; margin: 0; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ── sections (.card: one container for every page) ── */
.card { background: var(--surface); border: var(--thin); margin: 16px 0; }
.card > summary, .card > .head { list-style: none; padding: 14px 16px; min-height: 56px; display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.card > summary::-webkit-details-marker { display: none; }
.card[open] > summary { border-bottom: var(--thin); }
.card h2 { font-size: 26px; margin: 0; }
.card .body { padding: 16px; }
.chev { transition: transform .2s; color: var(--muted); }
.chev .ic { --ic: 20px; display: block; }
details[open] .chev { transform: rotate(180deg); }
h3.sub { margin: 20px 0 8px; font: 800 20px/1 var(--head); text-transform: uppercase; }
details.more { margin-top: 16px; border-top: var(--thin); padding-top: 12px; }
details.more > summary { cursor: pointer; font-weight: 700; font-size: 16px; list-style: none; display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; min-height: 32px; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "+"; font-weight: 800; width: 14px; }
details.more[open] > summary::before { content: "\2212"; }
details.more > summary .muted { font-weight: 400; font-size: 14px; }
details.more .grid { margin-top: 12px; }
.danger { margin-top: 18px; padding-top: 14px; border-top: var(--thin); }
.danger .link { color: var(--bad); }
footer.legal { max-width: 760px; margin: 0 auto; padding: 0 16px 40px; font-size: 13px; color: var(--muted); }
footer.legal a { color: inherit; }

/* ── dialogs: sign-in, report, voice, carousel, Advanced ── */
dialog { border: var(--heavy); border-radius: 0; padding: 0; background: var(--surface); color: var(--ink); box-shadow: var(--hard); width: min(440px, calc(100% - 24px)); max-height: calc(100dvh - 24px); }
dialog::backdrop { background: rgb(0 0 0 / 55%); }
dialog.carousel { width: min(520px, calc(100% - 24px)); }
dialog.adv { width: min(900px, calc(100% - 16px)); max-height: calc(100dvh - 16px); }
.sheet { padding: 20px; display: grid; gap: 12px; }
[hidden] { display: none !important; } /* a component's own display (e.g. .note's flex) never shows something marked hidden */
.signin-lead { margin: 0; font-size: 17px; color: var(--ink-2); line-height: 1.5; text-align: left; }
.signin .codein { font: 800 34px/1 var(--head); letter-spacing: .32em; text-align: center; min-height: 64px; padding-left: .32em; }
.signin-more { justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.sheet h2 { margin: 0; font-size: 30px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; margin: 6px 0; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* ── start page ── */
.hero { padding: 32px 0 12px; }
.hero h1 { font-size: clamp(42px, 11vw, 64px); margin: 0 0 16px; }
.hero p { font-size: 18px; color: var(--ink-2); margin: 0 0 24px; max-width: 34em; }
.start { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.start input { flex: 1 1 260px; min-width: 0; font-size: 17px; }
.hero .how { font-size: 28px; margin: 28px 0 8px; padding-top: 18px; border-top: var(--thin); }
.steps { padding-left: 20px; margin: 0; display: grid; gap: 6px; color: var(--ink-2); }
.progress { margin-top: 22px; padding: 16px; border: var(--thin); background: var(--surface); }
.progress p { margin: 0; }
.trust { display: flex; gap: 12px; align-items: center; margin-top: 20px; font-size: 15px; color: var(--muted); }
.mine { display: grid; }
.mine-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 4px; min-height: 48px; border-bottom: var(--thin); text-decoration: none; }
.mine-row:last-child { border-bottom: 0; }

/* ── campaign page ── */
.who { padding: 22px 0 8px; }
.who h1 { margin: 0; font-size: 44px; }
.who p { margin: 8px 0 0; color: var(--muted); }
.issue { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-bottom: 12px; }
.issue > div { display: grid; gap: 6px; }
.issue input, .issue textarea { width: 100%; border: var(--thin); padding: 10px 12px; background: var(--field); font-size: 16px; border-radius: 0; }
.issue input { font-weight: 600; min-height: 44px; } .issue textarea { color: var(--ink-2); resize: vertical; min-height: 64px; }
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.ph { position: relative; aspect-ratio: 3 / 4; overflow: hidden; background: var(--sunk); border: 1px solid var(--line); }
.ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ph .tag, .ph .kind { position: absolute; left: 6px; font-size: 12px; font-weight: 700; padding: 1px 6px; }
.ph .tag { top: 6px; background: var(--brand); color: var(--on-brand); }
.ph .kind { bottom: 42px; background: rgb(255 255 255 / 92%); color: #0B0B0C; font-weight: 600; }
.ph .acts { position: absolute; inset: auto 6px 6px 6px; display: flex; gap: 6px; justify-content: flex-end; }
.ph .acts button { border: 0; background: rgb(11 11 12 / 82%); color: #FFFFFF; font-size: 13px; min-height: 30px; padding: 0 8px; cursor: pointer; }
.addph { aspect-ratio: 3 / 4; border: 2px dashed var(--line); display: grid; place-items: center; text-align: center; color: var(--muted); font-size: 15px; font-weight: 600; cursor: pointer; background: transparent; }
.addph input { display: none; }

/* videos: make bar, Your look, review stack, kept/skipped grid */
.make { display: grid; gap: 12px; padding: 16px; }
.make > div:empty, .settings > div:empty { display: none; } /* no look or music yet: no gap where they would be */
.make .look { margin: 0; }
.settings, .makebar { display: grid; gap: 10px; }
.setrow { display: grid; grid-template-columns: 56px 1fr; gap: 10px; align-items: center; font-size: 15px; font-weight: 600; color: var(--ink-2); }
.make .soundbar { padding: 0; }
.make .snd > span { flex: 0 0 56px; }
.make .snd { gap: 10px; }
.count { display: flex; justify-content: center; align-items: center; gap: 2px; margin-top: -4px; font-size: 14px; color: var(--muted); }
.count button { min-width: 40px; min-height: 40px; border: 0; background: none; color: var(--muted); font-size: 15px; cursor: pointer; }
.count button[aria-pressed=true] { color: var(--ink); font-weight: 700; text-decoration: underline 2px; text-underline-offset: 5px; }
.btn.big .spin { margin-right: 10px; }
.make .status { display: flex; gap: 8px; align-items: center; font-size: 15px; color: var(--muted); margin: 0; }
.make .note { margin: 0; }
.badges { display: flex; gap: 6px; flex-wrap: wrap; }
.look { display: flex; gap: 12px; align-items: flex-start; margin: 0 16px 14px; padding: 12px; border: var(--thin); background: var(--sunk); }
.lookprev { flex: none; width: 64px; aspect-ratio: 9 / 16; padding: 0; border: 1px solid var(--ink); overflow: hidden; background: var(--media); cursor: pointer; }
.lookprev canvas, .advprev canvas { width: 100%; height: 100%; display: block; }
.lookinfo { display: grid; gap: 2px; min-width: 0; font-size: 15px; line-height: 1.4; color: var(--ink-2); }
.lookinfo b { font: 800 24px/1.05 var(--head); text-transform: uppercase; color: var(--ink); }
.lookinfo .muted { font-size: 14px; }
.lbl-sm { font-size: 14px; font-weight: 600; color: var(--muted); }
.lookacts { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-top: 8px; }
.lookacts .btn[aria-pressed=true] { border-color: var(--ok); color: var(--ok); }
.tag-beta { font: 600 12px var(--body); color: var(--muted); border: 1px solid var(--line); padding: 0 5px; vertical-align: middle; text-decoration: none; text-transform: none; display: inline-block; margin-left: 6px; }
.soundbar { display: flex; gap: 10px; align-items: center; padding: 0 16px; flex-wrap: wrap; }
.snd { display: flex; gap: 8px; align-items: center; flex: 1 1 240px; font-size: 15px; font-weight: 600; color: var(--ink-2); }
.snd select { flex: 1; min-width: 0; }
.stackwrap { padding: 16px; display: grid; gap: 16px; }
.stack { position: relative; display: grid; justify-items: center; min-height: 200px; }
.scard { grid-area: 1 / 1; width: min(100%, 340px); background: var(--surface); border: var(--heavy); box-shadow: var(--hard); touch-action: pan-y; user-select: none; -webkit-user-select: none; will-change: transform; --keep: 0; --skip: 0; }
.scard.wide { width: 100%; max-width: 560px; }
.scard.is-next { transform: translate(8px, 10px); box-shadow: none; opacity: .6; pointer-events: none; }
.scard.is-top { cursor: grab; z-index: 2; }
.scard.dragging { cursor: grabbing; transition: none; }
.scard .media { position: relative; aspect-ratio: 9 / 16; background: var(--media); }
.scard.wide .media { aspect-ratio: 16 / 9; }
.scard video, .scard img { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.scard .stamp { position: absolute; top: 22px; padding: 4px 12px; border: 4px solid; font: 800 34px/1 var(--head); text-transform: uppercase; background: #FFFFFF; }
.scard .stamp.keep { left: 18px; color: #1E6B3A; border-color: #1E6B3A; transform: rotate(-10deg); opacity: var(--keep); }
.scard .stamp.skip { right: 18px; color: #B42318; border-color: #B42318; transform: rotate(10deg); opacity: var(--skip); }
.scard .tapplay { position: absolute; inset: 0; display: grid; place-items: center; --ic: 54px; color: #FFFFFF; opacity: 0; transition: opacity .15s; }
.scard .tapplay .ic { filter: drop-shadow(0 2px 8px rgb(0 0 0 / 50%)); }
.scard.paused .tapplay { opacity: .9; }
.scard .info { padding: 12px 14px 14px; display: grid; gap: 6px; border-top: var(--heavy); }
.scard .hook { font-weight: 700; font-size: 17px; line-height: 1.3; }
.scard .cap { font-size: 14px; color: var(--ink-2); }
.scard .mute { position: absolute; right: 10px; bottom: 10px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgb(0 0 0 / 60%); color: #FFFFFF; cursor: pointer; z-index: 3; display: grid; place-items: center; }
.sacts { display: flex; justify-content: center; align-items: center; gap: 22px; }
.sempty { width: min(100%, 340px); aspect-ratio: 9 / 13; border: 2px dashed var(--line); display: grid; place-content: center; justify-items: center; gap: 6px; text-align: center; padding: 24px; color: var(--muted); }
.sempty b { color: var(--ink); font: 800 26px/1 var(--head); text-transform: uppercase; }
.vbtns { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 4px; width: 100%; }
.flag { border: 0; background: none; width: 36px; height: 36px; margin-left: auto; color: var(--muted); opacity: .5; cursor: pointer; order: 9; display: grid; place-items: center; }
.flag:hover, .flag:focus-visible { opacity: 1; color: var(--bad); }
.vids { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; padding: 16px; }
.vid { border: var(--thin); background: var(--surface); display: flex; flex-direction: column; }
.vid video { width: 100%; aspect-ratio: 9 / 16; background: var(--media); display: block; }
.vid.wide video { aspect-ratio: 16 / 9; }
.vid .meta { padding: 12px; display: grid; gap: 8px; flex: 1; }
.vid .hook { font-weight: 700; line-height: 1.3; }
.vid .cap { font-size: 14px; color: var(--ink-2); }
.vid .acts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 12px 12px; }
.vid .acts .wide2 { grid-column: 1 / -1; }

/* voice recorder, carousel */
.vrec { position: relative; width: min(100%, 200px); margin: 0 auto; aspect-ratio: 9 / 16; overflow: hidden; background: var(--media); border: 1px solid var(--ink); }
.vrec.wide { width: 100%; aspect-ratio: 16 / 9; }
.vrec video { width: 100%; height: 100%; object-fit: cover; display: block; }
.vrec .count { position: absolute; inset: 0; display: grid; place-items: center; font: 800 80px var(--head); color: #FFFFFF; background: rgb(0 0 0 / 40%); }
.prompter { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 4px; }
.prompter li { font-size: 18px; line-height: 1.3; font-weight: 600; color: var(--muted); padding: 6px 10px; border-left: 4px solid transparent; }
.prompter li.on { color: var(--ink); border-color: var(--brand); }
.vctl { display: flex; gap: 8px; flex-wrap: wrap; }
.vctl .btn { flex: 1; }
.slides { display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; }
.slides img { flex: 0 0 82%; max-width: 360px; aspect-ratio: 4 / 5; object-fit: cover; scroll-snap-align: center; border: 1px solid var(--ink); }

/* Advanced (Beta): preview beside the settings (on top on a phone, staying in view) */
dialog.adv .sheet { max-height: calc(100dvh - 20px); overflow-y: auto; padding-bottom: 0; }
.advgrid { display: grid; grid-template-columns: 260px 1fr; gap: 20px; align-items: start; }
.advprev { position: sticky; top: 0; display: grid; gap: 8px; justify-items: center; background: var(--surface); padding: 4px 0 8px; z-index: 1; }
.advprev canvas { width: 100%; max-width: 260px; aspect-ratio: 9 / 16; height: auto; background: var(--media); border: var(--heavy); box-shadow: var(--hard); }
.prevctl { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: center; }
.prevctl .round.sm { width: 40px; height: 40px; }
.shots { display: flex; gap: 4px; flex-wrap: wrap; justify-content: center; }
.advset { display: grid; gap: 12px; min-width: 0; }
.advset .hint { margin: 0; }
.grp { border: var(--thin); }
.grp > summary { padding: 12px 14px; min-height: 52px; cursor: pointer; display: flex; justify-content: space-between; align-items: center; font: 800 22px/1 var(--head); text-transform: uppercase; list-style: none; }
.grp > summary::-webkit-details-marker { display: none; }
.grp[open] > summary { border-bottom: var(--thin); }
.grp .cnt { font: 600 13px var(--body); text-transform: none; color: var(--ink); }
.sets { display: grid; gap: 16px; padding: 14px; }
.set { display: grid; gap: 6px; }
.set .lbl { font-size: 14px; font-weight: 600; color: var(--ink-2); }
.set.changed .lbl::after { content: ' · changed'; font-weight: 700; color: var(--ink); }
.set .chips { display: flex; flex-wrap: wrap; gap: 6px; }
.marks { display: grid; gap: 8px; }
.bmark { display: flex; gap: 10px; align-items: center; padding: 8px; border: var(--thin); }
.bmark img { width: 56px; height: 40px; object-fit: contain; background: repeating-conic-gradient(#E6E6E6 0 25%, #FFFFFF 0 50%) 0 0 / 12px 12px; }
.bmark span { display: grid; flex: 1; min-width: 0; font-size: 14px; } .bmark small { color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bmark input { width: 24px; height: 24px; accent-color: var(--ink); }
.advfoot { justify-content: space-between; position: sticky; bottom: 0; background: var(--surface); padding: 12px 0 16px; border-top: var(--thin); margin-top: 6px; }
@media (max-width: 640px) {
  .advgrid { grid-template-columns: 1fr; gap: 10px; }
  .advprev { grid-template-columns: auto 1fr; justify-items: start; align-items: center; align-content: center; column-gap: 12px; row-gap: 10px; }
  .advprev canvas { width: 124px; grid-row: span 2; box-shadow: none; }
  .advprev .link { grid-column: 2; }
  .prevctl { justify-content: flex-start; }
}

/* ── terms, privacy, setup ── */
main.doc { padding-top: 28px; max-width: 680px; }
.doc h1 { font-size: 48px; margin: 0 0 8px; }
.doc h2 { font-size: 28px; margin: 32px 0 8px; }
.doc p, .doc li { color: var(--ink-2); line-height: 1.6; }
.doc ul { padding-left: 20px; display: grid; gap: 6px; }
.doc a { color: var(--ink); }
/* Back, at the top of the info pages: a drawn chevron and a bold word, a comfortable tap target. */
.doc a.back { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; margin: -8px 0 8px; padding-right: 12px; font-size: 17px; font-weight: 700; text-decoration: none; }
.doc a.back::before { content: ''; width: 9px; height: 9px; border-left: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(45deg); margin-left: 4px; }
.doc a.back:hover { text-decoration: underline; text-underline-offset: 4px; }
/* FAQ: each question opens in place; one thin line between questions; the chevron is drawn, not a glyph (BRANDING.md rule 7). */
.faq h2 { margin: 40px 0 0; padding-bottom: 10px; }
.faq details { border-bottom: var(--thin); }
.faq h2 + details { border-top: var(--thin); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; min-height: 56px; padding: 14px 0; font-size: 18px; font-weight: 700; line-height: 1.3; color: var(--ink); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ''; flex: none; width: 9px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); margin: -5px 4px 0 0; transition: transform .15s; }
.faq details[open] summary::after { transform: rotate(-135deg); margin-top: 5px; }
.faq details p { margin: -4px 0 18px; }
/* Links that lead somewhere worth going: full-width rows with a drawn arrow, easy to tap, plain to read. */
.linkrows { display: grid; margin: 28px 0 8px; border-top: var(--thin); }
.linkrows a { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; padding: 12px 0; border-bottom: var(--thin); color: var(--ink); text-decoration: none; }
.linkrows a span { display: grid; gap: 2px; }
.linkrows b { font-size: 18px; line-height: 1.3; }
.linkrows small { font-size: 15px; color: var(--muted); line-height: 1.4; }
.linkrows a::after { content: ''; flex: none; width: 9px; height: 9px; border-right: 2px solid currentColor; border-top: 2px solid currentColor; transform: rotate(45deg); margin-right: 6px; }
.linkrows a:hover b { text-decoration: underline; text-underline-offset: 3px; }
.doc a.btn { text-decoration: none; }
.doc a.btn.gold { color: var(--on-brand); display: inline-flex; margin-top: 16px; padding: 0 28px; }

/* ── admin ── */
main.admin { max-width: 1100px; }
.atabs { margin: 12px 0 18px; padding: 0; }
.stats { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: var(--thin); padding: 16px; display: grid; gap: 2px; }
.stat b { font: 800 40px/1 var(--head); } .stat span { font-size: 14px; color: var(--ink-2); } .stat small { font-size: 13px; color: var(--muted); }
.rfilter { grid-template-columns: repeat(4, 1fr); margin-bottom: 14px; }
.rep { display: grid; grid-template-columns: 200px 1fr; gap: 16px; padding: 14px; }
.rep-media video { width: 100%; background: var(--media); max-height: 360px; }
.rep-body { display: grid; gap: 6px; align-content: start; }
.rep-body p { margin: 0; }
@media (max-width: 640px) { .rep { grid-template-columns: 1fr; } }
.table { overflow-x: auto; background: var(--surface); border: var(--thin); }
.table table { width: 100%; border-collapse: collapse; font-size: 15px; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: var(--thin); vertical-align: top; }
.table th { font-size: 14px; font-weight: 600; color: var(--muted); }
/* Phones: each row is a card, each cell a "heading: value" line (labels come from public/admin.js). */
@media (max-width: 640px) {
  .table { background: none; border: 0; overflow: visible; }
  .table table, .table tbody, .table tr { display: block; }
  .table thead { display: none; }
  .table tr { background: var(--surface); border: var(--thin); margin-bottom: 10px; padding: 6px 0; }
  .table td { display: grid; grid-template-columns: 92px 1fr; justify-items: start; gap: 10px; border: 0; padding: 5px 12px; overflow-wrap: anywhere; }
  .table td[data-label]::before { content: attr(data-label); font-size: 13px; font-weight: 600; color: var(--muted); }
  .table td:not([data-label]) { display: block; }
}

/* ── Stumpy, the mascot (stumpy() in app.js): empty states, tips, loading and the start page only ── */
.stumpy { width: 84px; height: 96px; flex: none; color: var(--ink); }
.stumpy.sm { width: 48px; height: 56px; }
.stumpy .face { color: var(--orange); }
.stumpy .sign { fill: var(--surface); }
.stumpy.loading .bob { animation: bob 1.1s ease-in-out infinite; transform-origin: 70px 120px; }
@keyframes bob { 50% { transform: translateY(-4px) rotate(2deg); } }
@media (prefers-reduced-motion: reduce) { .stumpy.loading .bob { animation: none; } .btn.gold { transition: none; } }

/* ── icons (app.js icon()): one line set, sized by --ic ── */
.ic { width: var(--ic, 18px); height: var(--ic, 18px); flex: none; vertical-align: -3px; }
.round .ic { --ic: 28px; } .round.undo .ic { --ic: 20px; } .prevctl .round.sm .ic { --ic: 16px; }
.scard .mute .ic, .flag .ic { --ic: 18px; }
.top.wide { padding-inline: max(16px, calc((100% - 1068px) / 2)); }

/* ── phone and desktop layout ──
   Phone: one column; until the profile is filled in, it comes first. Desktop (1024 px and up): the campaign page
   spreads out, videos on the left and profile and photos in a column on the right that stays in view. */
.camp { display: flex; flex-direction: column; }
.camp.setup .camp-side { order: -1; }
@media (min-width: 1024px) {
  body.wide main, body.wide footer.legal { max-width: 1212px; }
  body.wide .top { padding-inline: max(16px, calc((100% - 1180px) / 2)); }
  .camp { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 24px; align-items: start; }
  .camp.setup .camp-side { order: 0; }
  .camp-side { position: sticky; top: 16px; max-height: calc(100dvh - 32px); overflow-y: auto; overscroll-behavior: contain; }
  .scard { width: min(100%, 400px); }
  .hero { padding-top: 56px; }
}
/* Tap targets: 44 px for anything that stands on its own (inline links inside sentences excepted). */
.lookacts .link, .danger .link, .advprev .link, .advfoot .link, .row .link { min-height: 44px; }
.note .x { flex: none; }
#nextRace { flex-wrap: wrap; }
#nextRace > span:first-child { flex: 1 1 280px; }
#nextRace .row { gap: 8px; align-items: center; flex-wrap: wrap; }
#nextRace .btn { flex: none; white-space: nowrap; }
.ph .acts button { min-height: 36px; padding: 0 10px; white-space: nowrap; }
.chip.sm { min-height: 36px; min-width: 36px; }
@media (hover: hover) { .btn:hover:not(:disabled), .chip:hover, .fmt button:hover { filter: brightness(.94); } }

/* ── finding a candidate by name (start page) and verifying a campaign ── */
.found { margin-top: 18px; border: var(--thin); background: var(--surface); }
.found .lbl-sm { margin: 0; padding: 12px 14px; border-bottom: var(--thin); }
.found-row { display: grid; gap: 2px; width: 100%; text-align: left; padding: 12px 14px; min-height: 60px; border: 0; border-bottom: var(--thin); background: var(--surface); color: var(--ink); cursor: pointer; }
.found-row:last-child { border-bottom: 0; }
.found-row .go { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }
.who .verified { display: inline-flex; align-items: center; gap: 4px; margin-top: 10px; }
.who .verified .ic { --ic: 15px; }
dialog.verify { width: min(560px, calc(100% - 24px)); }
dialog.verify .sheet { max-height: calc(100dvh - 28px); overflow-y: auto; }
.way { display: grid; gap: 10px; border-top: var(--thin); padding-top: 14px; }
.way h3 { margin: 0; font: 800 22px/1 var(--head); text-transform: uppercase; }
.way p { margin: 0; }
.fmt.ways { grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--ink); } /* verify: four ways, 2x2 on phones */
.fmt.ways button { background: var(--bg); border-left: 0; min-height: 56px; padding: 6px 10px; font-size: 16px; line-height: 1.2; }
.fmt.ways button[aria-pressed=true] { background: var(--ink); color: var(--bg); }
@media (min-width: 640px) { .fmt.ways { grid-template-columns: repeat(4, 1fr); } }
.ways + .way { border-top: 0; padding-top: 8px; }
.way p, .way label.f { font-size: 17px; }
.codebox { display: flex; gap: 10px; align-items: center; border: 1px solid var(--ink); background: var(--sunk); padding: 8px 10px; }
.codebox code { flex: 1; min-width: 0; font: 600 15px/1.4 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; overflow-wrap: anywhere; }
.make > .note { margin: 0; }
.sheet > .row:first-child { flex-wrap: nowrap; align-items: flex-start; }
.sheet > .row:first-child h2 { flex: 1; min-width: 0; }
.x .ic { --ic: 22px; }

/* ── team (verified campaigns) ── */
.team { display: grid; }
.trow { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 0; border-bottom: var(--thin); min-height: 56px; }
.trow > span:first-child { display: grid; min-width: 0; overflow-wrap: anywhere; }
.trow .row { gap: 14px; }
.danger-link { color: var(--bad); }
.invite { display: grid; gap: 10px; margin-top: 14px; }
.invite .btn { justify-self: start; }
#invLink { display: grid; gap: 8px; margin-top: 10px; }
#invLink p { margin: 0; }
.found-row .src { font-size: 13px; color: var(--muted); }
.records .note { margin: 8px 0 0; } .records .hint { margin-top: 12px; }
.steps.perform { list-style: square; }

/* ── what voters care about (polls) ── */
.poll { padding-bottom: 14px; margin-bottom: 14px; border-bottom: var(--thin); }
.poll .lbl-sm { margin: 0; }
.ptitle { margin: 4px 0 10px; font: 800 20px/1.1 var(--head); text-transform: uppercase; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bars li { display: grid; grid-template-columns: minmax(0, 9em) 1fr auto; gap: 10px; align-items: center; font-size: 14px; }
.bars .bl { overflow-wrap: anywhere; }
.bars .bar { height: 12px; border: 1px solid var(--ink); background: var(--surface); }
.bars .bar i { display: block; height: 100%; background: var(--brand); }
.bars b { font-variant-numeric: tabular-nums; min-width: 3ch; text-align: right; }
.lead { padding-left: 22px; margin: 6px 0 12px; display: grid; gap: 8px; }
.lead li b { display: block; }
.lead li .muted { font-size: 14px; }

/* Launch waitlist (start page): one card, one button, the email pre-filled. */
.wait { padding: 16px; display: grid; gap: 12px; margin-top: 12px; }
.wait .sub, .wait p { margin: 0; }
.wait .link { justify-self: start; }
/* Admin polls: why a poll wasn't approved on its own. */
.flags { margin: 0; padding-left: 20px; color: var(--bad); font-size: 14px; }
