/* A Hill To Die On - tabloid-poster look: warm newsprint, heavy ink, a hot red and a teal, a sunflower highlighter. */
:root {
  --paper: #fff4e0; --paper-2: #ffe9c2; --card: #fffaf0; --ink: #1d1424; --ink-2: #4a3d52; --muted: #7a6b80;
  --hot: #e8304f; --hot-ink: #ffffff; --teal: #088f87; --sun: #ffd23f; --line: #1d1424; --soft: rgba(29, 20, 36, 0.12);
  --warn: #b4410f; --info: #2c5f8a; --ok: #1f7a3a;
  --display: Impact, "Haettenschweiler", "Arial Narrow Bold", "Arial Black", sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --shadow: 5px 5px 0 var(--ink);
}
:root[data-theme="dark"] {
  --paper: #17111c; --paper-2: #221a29; --card: #1f1726; --ink: #fff1d6; --ink-2: #e2d3c0; --muted: #a596a8;
  --hot: #ff5370; --hot-ink: #17111c; --teal: #37c9bf; --sun: #ffd23f; --line: #fff1d6; --soft: rgba(255, 241, 214, 0.14);
  --warn: #ff9a5c; --info: #8ec5ff; --ok: #6fdc8c; --shadow: 5px 5px 0 #000;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { background: var(--paper); color: var(--ink); font: 16px/1.5 var(--body); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; color: inherit; cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: 0.55; }
.hidden { display: none !important; }

/* header */
.bar { display: flex; align-items: center; gap: 12px; padding: 10px 16px; border-bottom: 3px solid var(--line); background: var(--paper); position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
.back { font-size: 14px; text-decoration: none; color: var(--ink-2); }
.brand { display: flex; align-items: center; gap: 8px; font-family: var(--display); font-size: 22px; letter-spacing: 0.5px; text-transform: uppercase; margin-right: auto; }
.brand strong { font-weight: 400; }
.flag { width: 26px; height: 26px; background: url("/favicon.svg") center / contain no-repeat; display: inline-block; }
.session { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.credits { font: 600 13px var(--mono); padding: 4px 8px; border: 2px solid var(--line); border-radius: 999px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border: 2px solid var(--line); border-radius: 999px; background: var(--card); font-size: 14px; font-weight: 600; text-decoration: none; }
.pill:hover:not(:disabled) { background: var(--sun); color: #1d1424; }
.pill.ink { background: var(--ink); color: var(--paper); }
.pill.ink:hover:not(:disabled) { background: var(--hot); color: var(--hot-ink); }
.pill.hot { background: var(--hot); color: var(--hot-ink); border-color: var(--line); }
.pill.hot:hover:not(:disabled) { background: var(--sun); color: #1d1424; }
.link { background: none; border: 0; padding: 0; text-decoration: underline; color: var(--ink-2); font-size: 14px; }

/* marquee */
.marquee { padding: 28px 16px 8px; max-width: 1180px; margin: 0 auto; }
.marquee h1 { font-family: var(--display); font-weight: 400; font-size: clamp(40px, 8vw, 84px); line-height: 0.95; margin: 0; text-transform: uppercase; letter-spacing: 0.5px; }
.marquee h1 em { font-style: normal; color: var(--hot); background: linear-gradient(transparent 62%, var(--sun) 62%); padding: 0 4px; }
:root[data-theme="dark"] .marquee h1 em { background: none; }
.sub { max-width: 640px; color: var(--ink-2); margin: 10px 0 14px; }
.tries { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.tries .lbl { font: 700 12px var(--mono); text-transform: uppercase; color: var(--muted); }
.try { border: 2px solid var(--line); background: var(--card); padding: 6px 12px; border-radius: 4px; font-weight: 600; font-size: 14px; box-shadow: 3px 3px 0 var(--line); }
.try:hover { transform: translate(-1px, -1px); box-shadow: 4px 4px 0 var(--line); background: var(--sun); color: #1d1424; }
.try.plain { box-shadow: none; background: transparent; border-style: dashed; }

/* arena */
.arena { display: grid; grid-template-columns: 1fr; gap: 24px; max-width: 1180px; margin: 0 auto; padding: 16px; }
@media (min-width: 900px) { .arena { grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr); align-items: start; } .stagewrap { position: sticky; top: 72px; } }
.podium { background: var(--card); border: 3px solid var(--line); border-radius: 6px; padding: 18px; box-shadow: var(--shadow); min-width: 0; }
.bubble-label { display: block; font-family: var(--display); font-size: 20px; text-transform: uppercase; margin-bottom: 6px; }
.bubble { position: relative; background: #fff; border: 3px solid var(--line); border-radius: 22px; padding: 4px 6px; }
:root[data-theme="dark"] .bubble { background: var(--paper-2); }
.bubble::after { content: ""; position: absolute; left: 34px; bottom: -16px; width: 22px; height: 22px; background: inherit; border-right: 3px solid var(--line); border-bottom: 3px solid var(--line); transform: rotate(45deg) skew(10deg, 10deg); }
.bubble textarea { width: 100%; border: 0; background: transparent; resize: vertical; font: 700 clamp(20px, 3.4vw, 28px)/1.25 var(--body); color: var(--ink); padding: 10px 12px; outline: none; min-height: 84px; }
.stat { font: 13px var(--mono); color: var(--muted); margin: 18px 0 8px; }
.scan { border-top: 2px dashed var(--soft); padding-top: 10px; margin-bottom: 8px; }
.spice { display: flex; align-items: center; gap: 10px; font: 700 13px var(--mono); text-transform: uppercase; }
.spice-track { flex: 1; height: 14px; border: 2px solid var(--line); border-radius: 999px; overflow: hidden; background: var(--paper); }
.spice-fill { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--sun), var(--hot)); transition: width 0.3s ease; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.chip { font: 600 12px var(--mono); border: 1.5px solid var(--line); border-radius: 4px; padding: 2px 6px; background: var(--paper); }
.chip.cat { background: var(--teal); color: #fff; border-color: var(--teal); }
.chip.hedge { background: transparent; border-style: dashed; color: var(--warn); border-color: var(--warn); text-decoration: line-through; }
.chip.abs { background: var(--sun); color: #1d1424; }
.issues { list-style: none; padding: 0; margin: 4px 0; font-size: 14px; }
.issues li { padding-left: 18px; position: relative; margin: 3px 0; }
.issues li::before { content: "!"; position: absolute; left: 2px; font-weight: 900; color: var(--warn); }
.issues li.error::before { color: var(--hot); }
fieldset { border: 0; padding: 0; margin: 14px 0 0; min-width: 0; }
legend { font: 700 12px var(--mono); text-transform: uppercase; color: var(--muted); margin-bottom: 6px; padding: 0; }
.tones { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.tones legend { grid-column: 1 / -1; }
.tone { position: relative; }
.tone input, .secs input { position: absolute; opacity: 0; pointer-events: none; }
.tone span { display: block; border: 2px solid var(--line); border-radius: 6px; padding: 8px 10px; background: var(--paper); height: 100%; }
.tone b { display: block; font-size: 15px; }
.tone small { color: var(--muted); font-size: 12px; }
.tone input:checked + span { background: var(--ink); color: var(--paper); box-shadow: 3px 3px 0 var(--hot); }
.tone input:checked + span small { color: var(--sun); }
.tone input:focus-visible + span, .secs input:focus-visible + span { outline: 3px solid var(--teal); outline-offset: 2px; }
.row2 { display: flex; gap: 16px; flex-wrap: wrap; align-items: end; margin-top: 14px; }
.conv { flex: 1 1 220px; display: flex; flex-direction: column; gap: 4px; font-size: 14px; }
.conv i { font-style: normal; font: 700 12px var(--mono); text-transform: uppercase; color: var(--hot); margin-left: 6px; }
.conv input { accent-color: var(--hot); width: 100%; }
.secs { display: flex; gap: 0; flex-wrap: nowrap; margin: 0; }
.secs legend { width: 100%; }
.secs label span { display: inline-block; border: 2px solid var(--line); padding: 5px 10px; font: 700 13px var(--mono); background: var(--paper); margin-left: -2px; }
.secs label:first-of-type span { border-radius: 6px 0 0 6px; margin-left: 0; }
.secs label:last-of-type span { border-radius: 0 6px 6px 0; }
.secs input:checked + span { background: var(--teal); color: #fff; }
.lanes { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 14px 0 10px; border: 2px solid var(--line); border-radius: 6px; overflow: hidden; }
.lane { border: 0; background: var(--paper); padding: 10px; text-align: left; }
.lane + .lane { border-left: 2px solid var(--line); }
.lane b { display: block; font-family: var(--display); font-weight: 400; font-size: 18px; text-transform: uppercase; }
.lane small { color: var(--muted); font-size: 12px; }
.lane.on { background: var(--sun); color: #1d1424; }
.lane.on small { color: #4a3d52; }
.meter { font: 13px var(--mono); color: var(--ink-2); margin: 8px 0; }
.notice, .note, .gate { font-size: 14px; margin: 6px 0; padding: 8px 10px; border-radius: 4px; border-left: 4px solid var(--info); background: var(--paper); }
.gate { border-left-color: var(--hot); }
.gate-act { font-weight: 700; color: var(--hot); cursor: pointer; }
.go { width: 100%; margin-top: 10px; padding: 14px; border: 3px solid var(--line); border-radius: 6px; background: var(--hot); color: var(--hot-ink); font-family: var(--display); font-size: 24px; text-transform: uppercase; letter-spacing: 1px; box-shadow: var(--shadow); }
.go:hover:not(:disabled) { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--line); }
.go:active:not(:disabled) { transform: translate(2px, 2px); box-shadow: 2px 2px 0 var(--line); }
.progress, .how, .raw { margin-top: 14px; border: 2px solid var(--line); border-radius: 6px; padding: 10px 14px; background: var(--paper); }
.progress h3, .how h3, .raw h3 { margin: 0 0 4px; font-family: var(--display); font-weight: 400; text-transform: uppercase; }
.status { font: 13px var(--mono); color: var(--muted); margin: 0 0 6px; }
.steps { list-style: none; padding: 0; margin: 0; font-size: 14px; }
.step { color: var(--muted); }
.step.active { color: var(--ink); font-weight: 700; }
.step.done { color: var(--ok); }
.step-ic { display: inline-block; width: 1.2em; }
.raw pre { white-space: pre-wrap; word-break: break-word; font: 12px var(--mono); max-height: 300px; overflow: auto; }

/* stage */
.stagewrap { min-width: 0; }
.phone { position: relative; margin: 0 auto; width: min(100%, 360px); aspect-ratio: 9 / 16; background: #120c17; color: #fff; border: 10px solid #000; border-radius: 34px; overflow: hidden; display: flex; flex-direction: column; box-shadow: 8px 8px 0 var(--hot); }
.phone::before { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at 50% 38%, rgba(255, 210, 63, 0.22), transparent 60%), repeating-conic-gradient(from 0deg at 50% 38%, rgba(255, 255, 255, 0.04) 0 8deg, transparent 8deg 16deg); pointer-events: none; }
.phone-top { display: flex; justify-content: space-between; padding: 12px 14px 0; font: 700 11px var(--mono); position: relative; }
.src { text-transform: uppercase; background: rgba(255, 255, 255, 0.14); padding: 2px 8px; border-radius: 999px; }
.src.coach { background: var(--teal); }
.src.example { background: #6b4fa0; }
.clock { opacity: 0.85; }
.placard { position: relative; margin: 14px 16px 0; background: #fff; color: #1d1424; font: 400 clamp(18px, 5vw, 24px)/1.05 var(--display); text-transform: uppercase; padding: 10px 12px; border: 3px solid #000; box-shadow: 4px 4px 0 #e8304f; transform: rotate(-2deg); overflow-wrap: anywhere; }
.caption-zone { position: relative; flex: 1; display: flex; flex-direction: column; justify-content: center; padding: 0 18px; text-align: center; }
.line { font: 800 clamp(20px, 5.6vw, 27px)/1.2 var(--body); margin: 0; text-shadow: 0 2px 0 #000, 0 0 18px rgba(0, 0, 0, 0.6); overflow-wrap: anywhere; }
.line[data-kind="claim"] { color: #ffd23f; }
.line[data-kind="closer"] { color: #ff8fa3; }
.line.pop { animation: pop 0.28s ease-out; }
@keyframes pop { from { transform: scale(0.92); opacity: 0.3; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .line.pop { animation: none; } }
.next { font-size: 13px; opacity: 0.5; margin: 14px 0 0; min-height: 2.6em; }
.cue { position: relative; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 0 14px 8px; }
.gesture { font: 700 12px var(--mono); text-transform: uppercase; background: #ffd23f; color: #1d1424; padding: 4px 8px; border-radius: 4px; }
.gesture:empty { display: none; }
.beatno { font: 11px var(--mono); opacity: 0.7; }
.segbar { position: relative; display: flex; gap: 3px; padding: 0 12px 14px; height: 20px; }
.seg { flex: 1 1 0; height: 6px; border-radius: 3px; background: rgba(255, 255, 255, 0.22); overflow: hidden; }
.seg i { display: block; height: 100%; width: 0; background: #fff; }
.transport { display: flex; justify-content: center; gap: 8px; margin: 14px 0 6px; flex-wrap: wrap; }
.tbtn { border: 2px solid var(--line); background: var(--card); border-radius: 6px; padding: 6px 12px; font-weight: 700; font-size: 14px; }
.tbtn.big { background: var(--ink); color: var(--paper); min-width: 88px; }
.tbtn:hover:not(:disabled) { background: var(--sun); color: #1d1424; }
.tbtn[aria-pressed="true"] { background: var(--sun); color: #1d1424; }
.tele-hint, .tele-exit { display: none; }
.phone.tele { position: fixed; inset: 0; z-index: 1000; width: 100vw; height: 100vh; height: 100dvh; max-width: none; aspect-ratio: auto; margin: 0; border: 0; border-radius: 0; box-shadow: none; cursor: pointer; outline: none; }
.phone.tele .line { font-size: clamp(30px, 7vw, 64px); }
.phone.tele .next { font-size: clamp(16px, 2.6vw, 24px); }
.phone.tele .placard { font-size: clamp(22px, 4vw, 40px); max-width: 900px; align-self: center; }
.phone.tele .gesture { font-size: 16px; }
.phone.tele .tele-hint { display: block; position: relative; margin: 0 0 12px; text-align: center; font: 12px var(--mono); opacity: 0.6; }
.phone.tele .tele-exit { display: block; position: absolute; top: 40px; right: 14px; z-index: 4; border: 2px solid #fff; background: rgba(0, 0, 0, 0.5); color: #fff; border-radius: 6px; padding: 6px 12px; font-weight: 700; }
.phone.mirror .caption-zone, .phone.mirror .cue { transform: scaleX(-1); }
.phone.mirror .placard { transform: scaleX(-1) rotate(2deg); }
.countin { position: absolute; inset: 0; z-index: 3; display: flex; align-items: center; justify-content: center; font: 400 120px/1 var(--display); color: #ffd23f; background: rgba(18, 12, 23, 0.6); }
body.tele-on { overflow: hidden; }
.fit { font: 13px var(--mono); text-align: center; color: var(--ink-2); margin: 4px 0 8px; }
.fit.over { color: var(--hot); font-weight: 700; }
.beats { list-style: none; counter-reset: b; padding: 0; margin: 0; font-size: 14px; }
.beats li { counter-increment: b; display: grid; grid-template-columns: 28px minmax(0, 1fr) auto; gap: 8px; align-items: start; padding: 6px 4px; border-bottom: 1px dashed var(--soft); }
.beats li::before { content: counter(b); font: 700 12px var(--mono); color: var(--muted); padding-top: 2px; }
.beats li.now { background: var(--paper-2); }
.beats .bl { background: none; border: 0; padding: 0; text-align: left; overflow-wrap: anywhere; }
.beats .bk { display: block; font: 11px var(--mono); color: var(--muted); text-transform: uppercase; }
.beats .rm { border: 1.5px solid var(--soft); background: none; border-radius: 4px; font-size: 12px; padding: 1px 6px; color: var(--muted); }
.beats .rm:hover { border-color: var(--hot); color: var(--hot); }

/* verdict */
.verdict, .exports, .history { max-width: 1180px; margin: 0 auto; padding: 0 16px 16px; }
.partial { background: var(--sun); color: #1d1424; padding: 8px 12px; border-radius: 4px; font-weight: 600; }
.checks { border: 2px dashed var(--line); border-radius: 6px; padding: 10px 14px; margin-bottom: 16px; }
.checks h3 { margin: 0 0 4px; font: 700 13px var(--mono); text-transform: uppercase; }
.checks ul { margin: 0; padding-left: 18px; font-size: 14px; }
.checks li.warn { color: var(--warn); }
.checks li.info { color: var(--info); }
.checks li.ok { color: var(--ok); }
.card { background: var(--card); border: 3px solid var(--line); border-radius: 6px; padding: 18px; box-shadow: var(--shadow); margin-bottom: 18px; }
.card h2 { font-family: var(--display); font-weight: 400; font-size: clamp(26px, 4vw, 38px); text-transform: uppercase; margin: 0 0 6px; line-height: 1; }
.card h3 { font: 700 13px var(--mono); text-transform: uppercase; color: var(--muted); margin: 18px 0 6px; }
.restated { font-size: 18px; font-weight: 700; margin: 0; }
.k { font: 600 11px var(--mono); text-transform: uppercase; color: var(--muted); display: block; }
.counter { list-style: none; padding: 0; margin: 0; }
.counter li { margin: 8px 0; padding: 8px 12px; border-left: 4px solid var(--teal); background: var(--paper); }
.counter .obj { display: block; color: var(--muted); font-size: 14px; }
.counter .obj::before { content: "commenter: "; font: 600 11px var(--mono); text-transform: uppercase; }
.counter .cb { font-weight: 700; }
.anatomy { display: grid; grid-template-columns: minmax(90px, max-content) minmax(0, 1fr); gap: 4px 14px; margin: 0; font-size: 15px; }
.anatomy dt { font: 700 12px var(--mono); text-transform: uppercase; color: var(--hot); padding-top: 3px; }
.anatomy dd { margin: 0; }
.caption { font-size: 17px; margin: 0; }
.tags { font: 600 14px var(--mono); color: var(--teal); }
.acts { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }
.hooks { padding-left: 0; list-style: none; margin: 0; counter-reset: h; }
.hooks li { counter-increment: h; border: 2px solid var(--line); border-radius: 6px; padding: 10px 12px; margin: 10px 0; background: var(--paper); }
.hooks li.best { border-color: var(--hot); box-shadow: 4px 4px 0 var(--hot); }
.hooks .ht { display: flex; justify-content: space-between; gap: 8px; font: 700 12px var(--mono); text-transform: uppercase; color: var(--muted); }
.hooks .hs { color: var(--hot); }
.hooks .hx { font-size: 19px; font-weight: 800; margin: 4px 0; }
.hooks .ho { display: inline-block; background: #1d1424; color: #fff; font: 400 15px var(--display); text-transform: uppercase; padding: 2px 8px; letter-spacing: 0.5px; }
.hooks .hf, .hooks .hc { font-size: 14px; color: var(--ink-2); margin: 4px 0 0; }
.hooks .hc { font-style: italic; }
.hooks .use { margin-top: 6px; }
.why { font-weight: 600; }
.avoid { font-size: 14px; color: var(--ink-2); }
.meta { font: 12px var(--mono); color: var(--muted); }
.exports h3, .history h3 { font-family: var(--display); font-weight: 400; text-transform: uppercase; font-size: 22px; margin: 10px 0 4px; }
.hist { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.hist li { border: 2px solid var(--line); border-radius: 6px; background: var(--card); padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.hist li.cur { box-shadow: 4px 4px 0 var(--teal); }
.hist .htake { font-weight: 800; overflow-wrap: anywhere; }
.hist .hmeta { font: 11px var(--mono); color: var(--muted); }
.hist .hrow { display: flex; gap: 6px; }
.foot { max-width: 1180px; margin: 24px auto 0; padding: 16px; border-top: 3px solid var(--line); font-size: 14px; color: var(--ink-2); }
.toasts { position: fixed; right: 16px; bottom: 16px; left: 16px; display: flex; flex-direction: column; align-items: flex-end; gap: 8px; z-index: 20; pointer-events: none; }
.toast { pointer-events: auto; max-width: 420px; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 6px; font-size: 14px; box-shadow: 4px 4px 0 var(--teal); transition: opacity 0.5s; }
.toast.err { box-shadow: 4px 4px 0 var(--hot); }
.toast.gone { opacity: 0; }
.toast a { color: var(--sun); font-weight: 700; }

/* docs pages */
.doc { max-width: 860px; margin: 0 auto; padding: 16px; }
.doc pre { background: #120c17; color: #f6ead6; padding: 12px; border-radius: 6px; overflow-x: auto; font: 13px/1.5 var(--mono); }
.doc code { font-family: var(--mono); font-size: 0.92em; }
.doc table { border-collapse: collapse; width: 100%; font-size: 14px; display: block; overflow-x: auto; }
.doc th, .doc td { border: 1px solid var(--soft); padding: 6px 8px; text-align: left; vertical-align: top; }
.codegroup { margin: 10px 0 18px; }
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 4px; }
.tab { border: 2px solid var(--line); background: var(--card); padding: 3px 10px; font: 600 12px var(--mono); border-radius: 4px; }
.tab.active { background: var(--ink); color: var(--paper); }
.statebox { border: 2px solid var(--line); border-radius: 6px; padding: 10px 14px; background: var(--card); }
.tokenrow { display: flex; gap: 8px; flex-wrap: wrap; margin: 8px 0; }
.tokenbox { font: 13px var(--mono); padding: 8px 10px; border: 2px dashed var(--line); border-radius: 4px; overflow-wrap: anywhere; flex: 1; }
.mini { border: 2px solid var(--line); background: var(--card); border-radius: 4px; padding: 4px 10px; font-size: 14px; }
.primary { border: 2px solid var(--line); background: var(--hot); color: var(--hot-ink); border-radius: 4px; padding: 6px 12px; font-weight: 700; }
.muted { color: var(--muted); } .small { font-size: 13px; } .mono { font-family: var(--mono); }
@media (max-width: 600px) { .bar { position: static; } .brand { font-size: 19px; } .phone { width: min(100%, 320px); } }
