/* Tally Interactive — "Studio Scoreboard" */
:root {
  --bg: #FBF8F2;
  --text: #0F1B3D;
  --primary: #FF5A4E;
  --accent: #3DDC97;
  --surface: #FFFFFF;
  --muted: #4A5470;
  --link: #C2352B;
  --stage: #0F1B3D;
  --on-stage: #FBF8F2;
  --on-stage-muted: #B8C0D9;
  --stage-2: #1B2A55;
  --outline: #7A8199;
  --rule: #E3DED3;
  --error: #B3261E;
  --success: #1F7A50;
  --ink: #0F1B3D;
  --shadow: #0F1B3D;
  --focus: #C2352B;
  --font-head: "Archivo Black", "Arial Black", system-ui, sans-serif;
  --font-body: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  --radius: 6px;
  --bw: 2px;
  --gutter: clamp(16px, 5vw, 32px);
  --max: 1200px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F1B3D;
    --text: #FBF8F2;
    --surface: #1B2A55;
    --muted: #B8C0D9;
    --link: #FF8A80;
    --stage: #08112B;
    --stage-2: #1B2A55;
    --outline: #8F97B0;
    --rule: #2B3A66;
    --error: #FFB4AB;
    --success: #3DDC97;
    --shadow: #000000;
    --focus: #3DDC97;
  }
}

@media (prefers-contrast: more) {
  :root { --muted: var(--text); --outline: #4A5470; --bw: 3px; }
  a { text-decoration: underline !important; }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
}
img { max-width: 100%; height: auto; display: block; }
h1, h2, h3 { font-family: var(--font-head); font-weight: 400; line-height: 1.12; letter-spacing: -0.01em; margin: 0 0 0.6em; }
h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3rem); }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.6vw, 2.25rem); }
h3 { font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.4rem); }
p { margin: 0 0 1em; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.stage :focus-visible, .site-footer :focus-visible, .board :focus-visible, .output :focus-visible { outline-color: var(--accent); }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--surface); color: var(--text); padding: 10px 14px; border: var(--bw) solid var(--text); border-radius: var(--radius); }
.skip-link:focus { top: 8px; }
.container { width: min(100%, var(--max)); margin-inline: auto; padding-inline: var(--gutter); }
.measure { max-width: 40rem; }
.lead { font-size: clamp(1.1rem, 1rem + 0.4vw, 1.25rem); color: var(--muted); }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--bg); border-bottom: var(--bw) solid var(--text); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 68px; }
.logo-chip { display: inline-flex; align-items: center; background: #FFFFFF; border: var(--bw) solid var(--ink); border-radius: var(--radius); padding: 3px 8px; }
.logo-chip img { height: 38px; width: auto; }
.nav-toggle { display: inline-flex; align-items: center; gap: 8px; min-height: 48px; padding: 0 14px; background: var(--surface); color: var(--text); border: var(--bw) solid var(--text); border-radius: var(--radius); font: 600 1rem var(--font-body); cursor: pointer; }
.nav-toggle svg { width: 20px; height: 20px; }
.site-nav { display: none; }
.site-nav.open { display: block; position: absolute; left: 0; right: 0; top: 100%; background: var(--bg); border-bottom: var(--bw) solid var(--text); padding: 12px var(--gutter) 20px; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.site-nav a:not(.btn) { display: block; padding: 10px 4px; color: var(--text); text-decoration: none; font-weight: 600; }
.site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--primary); text-decoration-thickness: 3px; }
.site-nav .nav-cta { margin-top: 10px; }
@media (min-width: 1140px) {
  .nav-toggle { display: none; }
  .site-nav, .site-nav.open { display: block; position: static; border: 0; padding: 0; background: none; }
  .site-nav ul { flex-direction: row; align-items: center; gap: 4px; }
  .site-nav a:not(.btn) { padding: 8px 9px; font-size: 0.95rem; }
  .site-nav a:not(.btn):hover { text-decoration: underline; text-decoration-color: var(--primary); text-decoration-thickness: 3px; }
  .site-nav .nav-cta { margin: 0 0 0 8px; }
}

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px; border: var(--bw) solid var(--ink); border-radius: var(--radius); font: 700 1rem/1.2 var(--font-body); text-decoration: none; cursor: pointer; box-shadow: 4px 4px 0 var(--shadow); transition: transform 120ms ease, box-shadow 120ms ease; }
.btn-primary { background: var(--primary); color: #0F1B3D; }
.btn-secondary { background: #FFFFFF; color: #0F1B3D; }
.btn-ghost { background: transparent; color: inherit; border-color: currentColor; box-shadow: none; }
.btn:hover { box-shadow: 6px 6px 0 var(--shadow); }
.btn:active { transform: translate(2px, 2px); box-shadow: 0 0 0 var(--shadow); }
.btn-ghost:hover, .btn-ghost:active { box-shadow: none; }
.btn[disabled] { opacity: 0.6; cursor: progress; }
.btn-sm { min-height: 40px; padding: 8px 14px; font-size: 0.9rem; box-shadow: 3px 3px 0 var(--shadow); }
.stage .btn, .output .btn, .board .btn { --shadow: #000; }
.btn-row { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; }

/* Chips */
.chip { display: inline-block; font: 600 0.75rem/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; padding: 5px 8px; border-radius: 3px; border: var(--bw) solid transparent; vertical-align: middle; }
.chip-example { background: #3DDC97; color: #0F1B3D; }
.chip-early { background: #0F1B3D; color: #FBF8F2; border-color: #0F1B3D; }
.chip-soon { background: var(--bg); color: var(--text); border-color: var(--text); }
@media (prefers-color-scheme: dark) { .chip-early { background: #FBF8F2; color: #0F1B3D; border-color: #FBF8F2; } }

/* Plates & sections */
.plate { background: var(--surface); border: var(--bw) solid var(--text); border-radius: var(--radius); box-shadow: 4px 4px 0 var(--shadow); padding: clamp(18px, 3vw, 28px); min-width: 0; }
.section { padding-block: clamp(48px, 7vw, 96px); }
.section-tight { padding-block: clamp(32px, 4vw, 56px); }
.stage { background: var(--stage); color: var(--on-stage); }
.stage .muted, .stage .lead { color: var(--on-stage-muted); }
.stage a:not(.btn) { color: var(--accent); }
.grid { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
.grid > * { min-width: 0; }
@media (min-width: 640px) { .grid-2, .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.section-head { margin-bottom: 32px; max-width: 44rem; }
.card { display: flex; flex-direction: column; gap: 8px; color: inherit; text-decoration: none; transition: box-shadow 120ms ease, transform 120ms ease; }
.card p { color: var(--muted); margin: 0; }
.card .more { margin-top: auto; padding-top: 10px; color: var(--link); font-weight: 700; }
a.card:hover { box-shadow: 6px 6px 0 var(--shadow); }
a.card:hover h3 { text-decoration: underline; text-decoration-color: var(--primary); }
.card h3 { margin: 0; }

ul.tally { list-style: none; padding: 0; margin: 0 0 1em; }
ul.tally li { position: relative; padding-left: 22px; margin-bottom: 8px; }
ul.tally li::before { content: ""; position: absolute; left: 4px; top: 0.3em; width: 4px; height: 1em; border-radius: 2px; background: var(--primary); }

/* Hero */
.hero { position: relative; border-bottom: var(--bw) solid var(--text); overflow: hidden; }
.hero-inner { position: relative; z-index: 1; display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); padding-block: 40px 28px; }
.hero h1 { font-size: clamp(2.25rem, 1.4rem + 3.6vw, 3.75rem); line-height: 1.05; margin-top: 14px; }
.hero .offer { font-size: clamp(1.1rem, 1rem + 0.4vw, 1.25rem); color: var(--muted); max-width: 34rem; }
.hero .note { font-size: 0.875rem; color: var(--muted); margin-top: 14px; }
.hero-art img { width: 100%; height: auto; aspect-ratio: 3 / 2; object-fit: cover; }
.hero-art { position: relative; z-index: 0; border-top: var(--bw) solid var(--text); }
@media (min-width: 960px) {
  /* Illustration sits in its own full-width band below the copy and board: it never overlaps text. */
  .hero-inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; padding-block: 64px 56px; }
  .hero-copy { max-width: 36rem; }
  .hero-art img { height: clamp(280px, 30vw, 440px); aspect-ratio: auto; object-fit: cover; object-position: 50% 70%; }
}

/* Tally board (data-driven demo) */
.board { background: #0F1B3D; color: #FBF8F2; border: var(--bw) solid #0F1B3D; border-radius: var(--radius); box-shadow: 6px 6px 0 var(--primary); padding: 20px; min-width: 0; }
@media (prefers-color-scheme: dark) { .board { border-color: #FBF8F2; background: #08112B; } }
.board-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.board-q { font-weight: 700; font-size: 1.1rem; line-height: 1.35; margin: 0; }
.board-rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.board-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; }
.board-label { font-weight: 600; color: #FBF8F2; }
.board-count { font: 700 clamp(1.6rem, 1.2rem + 1.4vw, 2.4rem)/1 var(--font-mono); font-variant-numeric: tabular-nums; color: #3DDC97; text-align: right; min-width: 2ch; }
.board-strokes { grid-column: 1 / -1; height: 26px; }
.board-strokes svg { height: 26px; width: auto; display: block; }
.board-bar { grid-column: 1 / -1; height: 14px; background: #1B2A55; border-radius: 3px; overflow: hidden; }
.board-bar span { display: block; height: 100%; width: 0; background: #3DDC97; border-radius: 3px; }
.board-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; font-size: 0.875rem; color: #B8C0D9; flex-wrap: wrap; }
.board-foot button { background: none; border: var(--bw) solid #B8C0D9; color: #FBF8F2; border-radius: var(--radius); min-height: 40px; padding: 6px 14px; font: 600 0.9rem var(--font-body); cursor: pointer; }
.board-foot button:hover { border-color: #3DDC97; }

/* Steps */
ol.steps { list-style: none; padding: 0; margin: 0; }
.stage .plate { background: var(--stage-2); color: var(--on-stage); border-color: #3DDC97; box-shadow: 4px 4px 0 #000; }
.stage .step-num { color: #3DDC97; }
.faq-block { margin-top: 40px; }
.stage .help { color: var(--on-stage-muted); }
.stage .error { color: #FFB4AB; }
.stage .success-plate h3, .stage .success-plate p { color: var(--on-stage); }
.settings-title { margin: 48px 0 16px; }
.status-strip { margin-top: 40px; }
.status-strip h3 { margin-top: 12px; }
.case .example { margin: 8px 0 18px; }
.example .chip { margin-bottom: 4px; }
.h3-size { font-size: clamp(1.15rem, 1.05rem + 0.4vw, 1.4rem); margin-top: 1em; }
.cta-row { margin-top: 36px; }
.contact-grid { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) { .contact-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); } }
.contact-grid dl { margin: 0; }
.contact-grid dt { font-weight: 700; margin-top: 12px; }
.contact-grid dd { margin: 2px 0 0; overflow-wrap: anywhere; }
.step-num { font: 700 2.4rem/1 var(--font-mono); color: var(--link); display: block; margin-bottom: 10px; }

/* Pricing */
.plan { display: flex; flex-direction: column; gap: 10px; position: relative; }
.plan h3 { margin: 6px 0 0; }
.plan-status { font: 700 1rem var(--font-mono); }
.plan-featured { border-top-width: 8px; border-top-color: var(--primary); }
.plan .btn { margin-top: auto; align-self: flex-start; }

/* Roadmap */
.roadmap { list-style: none; margin: 0; padding: 0; display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 800px) { .roadmap { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.roadmap li { background: var(--stage-2); border: var(--bw) solid #3DDC97; border-radius: var(--radius); padding: 20px; min-width: 0; }
.roadmap .chip { background: #3DDC97; color: #0F1B3D; margin-bottom: 12px; }
.roadmap p { margin: 0; font-weight: 600; }

/* Forms */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 18px; min-width: 0; }
.field label, .field legend, .label { font-weight: 700; }
.help { font-size: 0.875rem; color: var(--muted); margin: 0; }
input[type="text"], input[type="email"], textarea, select {
  width: 100%; max-width: 100%; min-height: 48px; padding: 10px 12px; font: 400 1rem/1.4 var(--font-body);
  color: var(--text); background: var(--surface); border: var(--bw) solid var(--outline); border-radius: 4px;
}
textarea { resize: vertical; }
input:focus-visible, textarea:focus-visible, select:focus-visible { border-color: var(--text); }
[aria-invalid="true"] { border-color: var(--error) !important; }
.error { color: var(--error); font-size: 0.9rem; font-weight: 600; margin: 0; }
.error:empty { display: none; }
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.inline-form { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.inline-form .field { flex: 1 1 240px; margin: 0; }
.success-plate { border-left: 8px solid var(--accent); }
.success-plate h3 { margin-bottom: 6px; }
fieldset { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; }
legend { padding: 0; margin-bottom: 8px; }
.check { display: flex; gap: 10px; align-items: center; min-height: 44px; font-weight: 600; }
.check input { width: 22px; height: 22px; accent-color: var(--primary); }

/* Radio cards */
.radio-cards { display: grid; gap: 10px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.radio-card { position: relative; }
.radio-card input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.radio-card span { display: flex; align-items: center; min-height: 56px; height: 100%; padding: 10px 12px; background: var(--surface); border: var(--bw) solid var(--outline); border-radius: var(--radius); font-weight: 600; line-height: 1.25; overflow-wrap: anywhere; }
.radio-card input:checked + span { border: 3px solid var(--primary); box-shadow: 3px 3px 0 var(--shadow); }
.radio-card input:checked + span::after { content: "✓"; margin-left: auto; padding-left: 8px; color: var(--link); font-weight: 800; }
.radio-card input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }

/* Segmented EN/ES */
.seg { display: inline-flex; border: var(--bw) solid var(--text); border-radius: var(--radius); overflow: hidden; }
.seg label { position: relative; }
.seg input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.seg span { display: inline-flex; align-items: center; justify-content: center; min-width: 56px; min-height: 44px; padding: 0 14px; font: 700 0.95rem var(--font-mono); background: var(--surface); color: var(--text); }
.seg input:checked + span { background: var(--text); color: var(--bg); }
.seg input:checked + span::before { content: "✓"; margin-right: 6px; }
/* On dark plates: unselected = transparent outline, selected = mint fill (same "filled = active" rule) */
.output .seg { border-color: #FBF8F2; }
.output .seg span { background: transparent; color: #FBF8F2; }
.output .seg input:checked + span { background: #3DDC97; color: #0F1B3D; }
.output .label { color: #FBF8F2; }
@media (prefers-color-scheme: dark) {
  .seg input:checked + span { background: #3DDC97; color: #0F1B3D; }
  .seg span { background: transparent; }
}
.seg input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: -5px; }
.seg-wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 18px; }

/* Tool pages */
.tool-intro { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); align-items: center; padding-block: 36px 28px; }
.tool-intro img { width: 100%; max-width: 360px; aspect-ratio: 1; object-fit: cover; border: var(--bw) solid var(--text); border-radius: var(--radius); box-shadow: 4px 4px 0 var(--shadow); justify-self: center; }
@media (min-width: 860px) { .tool-intro { grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); } .tool-intro img { justify-self: end; } }
.crumbs { font-size: 0.9rem; margin-bottom: 10px; color: var(--muted); }
.crumbs a { color: var(--muted); }
.privacy-line { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border: var(--bw) dashed var(--text); border-radius: var(--radius); font-weight: 700; font-size: 0.9rem; background: var(--bg); }
.privacy-line svg { width: 18px; height: 18px; flex: none; }
.tool { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); align-items: start; padding-bottom: clamp(40px, 6vw, 72px); }
@media (min-width: 900px) {
  .tool { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .tool-wide { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .sticky { position: sticky; top: 92px; }
}
.output { background: #0F1B3D; color: #FBF8F2; border: var(--bw) solid #0F1B3D; border-radius: var(--radius); box-shadow: 4px 4px 0 var(--primary); padding: clamp(18px, 3vw, 26px); min-width: 0; }
@media (prefers-color-scheme: dark) { .output { border-color: #FBF8F2; background: #08112B; } }
.output h2 { font-size: 1.4rem; color: #FBF8F2; }
.output .muted { color: #B8C0D9; }
.output .empty { color: #B8C0D9; border: var(--bw) dashed #4A5A8A; border-radius: var(--radius); padding: 20px; margin: 0; }
.q-card { background: #1B2A55; border-radius: var(--radius); padding: 14px 16px; margin-bottom: 12px; }
.q-card pre { margin: 0 0 10px; font: 500 0.98rem/1.55 var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere; color: #FBF8F2; }
.q-card .btn-ghost { color: #FBF8F2; min-height: 40px; padding: 6px 14px; font-size: 0.9rem; }
.output-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 16px; }
.output .btn-secondary { background: #FBF8F2; }
.output .btn-ghost { color: #FBF8F2; }
.output .note { color: #B8C0D9; font-size: 0.9rem; }
.result-in { animation: slidein 160ms ease-out; }
@keyframes slidein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
.example { border-left: 8px solid var(--accent); }
.example pre { font: 500 0.98rem/1.6 var(--font-mono); white-space: pre-wrap; overflow-wrap: anywhere; margin: 12px 0 0; }
.info-grid { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 860px) { .info-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
ol.howto { margin: 0; padding-left: 1.4em; }
ol.howto li { margin-bottom: 8px; }
ol.howto li::marker { font-family: var(--font-mono); font-weight: 700; color: var(--link); }

/* Tabs & tables */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; border-bottom: var(--bw) solid var(--rule); margin-bottom: 16px; }
.tabs button { background: none; border: 0; border-bottom: 3px solid transparent; margin-bottom: -2px; min-height: 46px; padding: 8px 12px; font: 700 0.95rem var(--font-body); color: var(--muted); cursor: pointer; }
.tabs button[aria-selected="true"] { color: var(--text); border-bottom-color: var(--primary); }
.table-wrap { overflow-x: auto; max-width: 100%; }
table { width: 100%; border-collapse: collapse; font-size: 0.97rem; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--rule); vertical-align: top; overflow-wrap: anywhere; }
th { font-weight: 700; font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
td.num, th.num { text-align: right; font-family: var(--font-mono); font-variant-numeric: tabular-nums; white-space: nowrap; overflow-wrap: normal; }
.pct-cell { position: relative; min-width: 84px; }
.pct-cell .bar { position: absolute; left: 0; top: 50%; height: 6px; transform: translateY(8px); background: var(--accent); border-radius: 2px; }
.counter { font: 600 0.9rem var(--font-mono); color: var(--muted); }
.counter.over { color: var(--link); }

/* Group board */
.groups { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 640px) { .groups { grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); } }
.group { border: var(--bw) solid var(--text); border-radius: var(--radius); padding: 12px; background: var(--bg); min-width: 0; min-height: 110px; }
.group.drop-over { border-style: dashed; border-color: var(--primary); }
.group-head { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.group-head input { min-height: 40px; font-weight: 700; }
.group-head .gcount { font: 700 0.9rem var(--font-mono); white-space: nowrap; }
.group-head button { flex: none; min-width: 40px; min-height: 40px; border: var(--bw) solid var(--outline); background: var(--surface); color: var(--text); border-radius: 4px; cursor: pointer; font-weight: 700; }
.group h4 { margin: 0; font-size: 1rem; flex: 1; }
.answer-chip { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; background: var(--surface); border: var(--bw) solid var(--outline); border-radius: 4px; padding: 6px 8px; margin-bottom: 8px; cursor: grab; }
.answer-chip .txt { flex: 1 1 120px; min-width: 0; overflow-wrap: anywhere; font-weight: 600; }
.answer-chip .n { font: 700 0.85rem var(--font-mono); }
.answer-chip select { min-height: 36px; padding: 4px 6px; font-size: 0.85rem; width: auto; max-width: 100%; }
.answer-chip.dragging { opacity: 0.5; }

/* Checker */
.highlighted { font-size: 1.1rem; line-height: 1.8; padding: 14px 16px; background: var(--bg); border: var(--bw) solid var(--rule); border-radius: var(--radius); overflow-wrap: anywhere; margin-bottom: 16px; }
mark { background: #FFE1DE; color: #0F1B3D; text-decoration: underline 2px #C2352B; text-underline-offset: 4px; padding: 0 2px; border-radius: 2px; }
.flag { border-left: 8px solid var(--primary); margin-bottom: 14px; padding: 16px 18px; box-shadow: 3px 3px 0 var(--shadow); }
.flag h3 { font-size: 1.1rem; margin-bottom: 6px; }
.flag .triggers { font-family: var(--font-mono); font-size: 0.92rem; margin-bottom: 6px; overflow-wrap: anywhere; }
.clean { border-left: 8px solid var(--accent); }
.clean h3 { color: var(--success); }
.phrasebook td:first-child { font-weight: 600; }
@media (max-width: 560px) {
  .phrasebook thead { position: absolute; left: -9999px; }
  .phrasebook tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--rule); }
  .phrasebook td { display: block; border: 0; padding: 2px 0; }
  .phrasebook td::before { content: attr(data-l) " · "; font-family: var(--font-mono); font-size: 0.8rem; color: var(--muted); }
}

/* Use cases */
.jump { position: sticky; top: 70px; z-index: 20; background: var(--bg); border-bottom: var(--bw) solid var(--rule); }
.jump ul { list-style: none; display: flex; gap: 8px; overflow-x: auto; margin: 0; padding: 10px 0; }
.jump a { display: inline-flex; align-items: center; min-height: 40px; white-space: nowrap; padding: 6px 12px; border: var(--bw) solid var(--text); border-radius: 999px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 0.92rem; background: var(--surface); }
.jump a:hover, .jump a.active { background: var(--text); color: var(--bg); }
.case { scroll-margin-top: 140px; border-top: var(--bw) solid var(--rule); }
.case-grid { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 900px) { .case-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); } .case-grid.flip > :first-child { order: 2; } }
.case-img { border: var(--bw) solid var(--text); border-radius: var(--radius); box-shadow: 4px 4px 0 var(--shadow); width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.label-mono { display: block; font: 700 0.75rem/1 var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); margin: 18px 0 6px; }
.settings { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 700px) { .settings { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1040px) { .settings { grid-template-columns: repeat(5, minmax(0, 1fr)); } }
.settings li { background: var(--surface); border: var(--bw) solid var(--text); border-radius: var(--radius); padding: 14px; min-width: 0; }
.settings strong { display: block; font-family: var(--font-head); font-weight: 400; margin-bottom: 4px; }
.status-strip { border: var(--bw) dashed var(--text); border-radius: var(--radius); padding: clamp(18px, 3vw, 28px); }

/* About */
.split { display: grid; gap: 28px; grid-template-columns: minmax(0, 1fr); align-items: center; }
@media (min-width: 900px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.split img { border: var(--bw) solid var(--text); border-radius: var(--radius); box-shadow: 4px 4px 0 var(--shadow); width: 100%; }

/* FAQ */
.faq details { background: var(--surface); border: var(--bw) solid var(--text); border-radius: var(--radius); margin-bottom: 10px; }
.faq summary { cursor: pointer; padding: 14px 44px 14px 16px; font-weight: 700; position: relative; list-style: none; min-height: 48px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 16px; top: 10px; font: 700 1.3rem var(--font-mono); }
.faq details[open] summary::after { content: "–"; }
.faq details > p { padding: 0 16px 14px; margin: 0; color: var(--muted); }

/* Legal */
.legal { max-width: 46rem; }
.legal h2 { font-size: 1.4rem; margin-top: 1.8em; }
.legal ul { padding-left: 1.2em; }

/* 404 */
.nf { text-align: center; padding-block: clamp(64px, 12vw, 140px); }
.nf .btn-row { justify-content: center; }
.nf .big { font: 700 clamp(3rem, 2rem + 6vw, 6rem)/1 var(--font-mono); color: var(--link); margin-bottom: 16px; }

/* Footer */
.site-footer { background: var(--stage); color: var(--on-stage); padding-block: 56px 28px; }
.site-footer a { color: var(--on-stage); }
.site-footer a:hover { color: #3DDC97; }
.footer-grid { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 720px) { .footer-grid { grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr)); } }
.footer-grid h2 { font-size: 0.8rem; font-family: var(--font-mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--on-stage-muted); margin-bottom: 12px; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 6px; }
.footer-grid li a { display: inline-block; padding: 4px 0; }
.footer-brand p { color: var(--on-stage-muted); margin-top: 14px; }
.footer-bottom { margin-top: 40px; padding-top: 20px; border-top: 1px solid #2B3A66; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: 0.9rem; color: var(--on-stage-muted); }
.footer-bottom nav ul { display: flex; flex-wrap: wrap; gap: 16px; list-style: none; margin: 0; padding: 0; }
.site-footer .chip-early { background: #3DDC97; color: #0F1B3D; border-color: #3DDC97; }

/* Toast */
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 90; background: #0F1B3D; color: #FBF8F2; border: var(--bw) solid #3DDC97; padding: 10px 18px; border-radius: 999px; font-weight: 600; opacity: 0; pointer-events: none; transition: opacity 160ms ease; max-width: calc(100% - 32px); }
.toast.show { opacity: 1; }
