/* =============================================================
   1. Tokens
   ============================================================= */
:root {
  --bg: #f7f3ea;
  --surface: #ffffff;
  --surface-2: #efe8d6;
  --border: #ddd2b3;
  --text: #201b12;
  --text-soft: #665c47;
  --ink: #17151b;
  --ink-soft: #2a2730;
  --cream: #f7f3ea;
  --accent: #a9781f;
  --accent-strong: #825c17;
  --accent-soft: #f1e3c1;
  --outer-color: #2f6fed;
  --inner-color: #e0912a;
  --good: #1f8a4c;
  --good-soft: #e3f3e8;
  --warn: #9a6a05;
  --warn-soft: #fbf0d6;
  --bad: #b3392f;
  --bad-soft: #fbe6e3;
  --sans: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display: "Space Grotesk", var(--sans);
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --radius: 14px;
  --radius-sm: 8px;
  --shadow-sm: 0 1px 3px rgba(20, 16, 10, 0.08);
  --shadow-md: 0 10px 30px rgba(20, 16, 10, 0.14);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14120e;
    --surface: #1c1912;
    --surface-2: #262117;
    --border: #3c3423;
    --text: #f2ecdd;
    --text-soft: #bcaf90;
    --ink: #0e0d10;
    --cream: #f2ecdd;
    --accent: #d7a747;
    --accent-strong: #eabc63;
    --accent-soft: #362a12;
    --good-soft: #16301f;
    --warn-soft: #3a2c0a;
    --bad-soft: #3a1d19;
  }
}

/* =============================================================
   2. Reset & base
   ============================================================= */
*, *::before, *::after { box-sizing: border-box; margin: 0; }
html { -webkit-text-size-adjust: 100%; tab-size: 2; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
  overscroll-behavior-y: none;
}
img, svg, video { display: block; max-width: 100%; }
button { font: inherit; color: inherit; cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
p { text-wrap: pretty; }
h1, h2, h3, h4 { font-family: var(--display); text-wrap: balance; line-height: 1.15; letter-spacing: -0.01em; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

/* =============================================================
   3. Utilities
   ============================================================= */
.container { width: 100%; max-width: 1080px; margin-inline: auto; padding-inline: 1.25rem; }
.skip-link {
  position: fixed; top: -100px; left: 1rem; z-index: 9999;
  padding: .6rem 1rem; background: var(--ink); color: var(--cream);
  border-radius: 8px; font-weight: 600;
}
.skip-link:focus { top: 1rem; }
.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* =============================================================
   4. Header & footer (dark "grading lab" bookends)
   ============================================================= */
.site-header {
  background: var(--ink); color: var(--cream);
  position: sticky; top: 0; z-index: 40;
  border-bottom: 1px solid rgba(215, 167, 71, 0.25);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: .55rem; font-family: var(--display); font-weight: 700; font-size: 1.15rem; color: var(--cream); }
.header-right { display: flex; align-items: center; gap: 1rem; }
.header-nav { display: none; gap: 1.5rem; font-weight: 600; font-size: .95rem; }
.header-nav a { color: #d8d0bd; transition: color .15s var(--ease-out); }
.header-nav a:hover { color: var(--accent); }
@media (min-width: 720px) { .header-nav { display: flex; } }

.lang-switch {
  background: rgba(215,167,71,.12); color: var(--cream);
  border: 1px solid rgba(215,167,71,.35); border-radius: 999px;
  padding: .35rem 1.7rem .35rem .7rem; font: inherit; font-size: .82rem; font-weight: 700;
  cursor: pointer; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d7a747' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right .5rem center; background-size: 14px;
}
.lang-switch option { background: var(--ink); color: var(--cream); }
.lang-switch:focus-visible { outline-color: var(--accent); }

.site-footer { background: var(--ink); color: #cfc7b2; padding-block: 2.4rem; }
.footer-inner { display: flex; flex-direction: column; gap: 1.2rem; }
@media (min-width: 720px) { .footer-inner { flex-direction: row; justify-content: space-between; align-items: flex-start; } }
.footer-brand { display: flex; align-items: center; gap: .5rem; margin-bottom: .5rem; }
.footer-brand strong { font-family: var(--display); color: var(--cream); font-size: 1.02rem; }
.site-footer p { color: #a89c80; font-size: .85rem; max-width: 46ch; }
.footer-links { display: flex; gap: 1.2rem; font-weight: 600; font-size: .9rem; }
.footer-links a { color: #d8d0bd; }
.footer-links a:hover { color: var(--accent); }

/* =============================================================
   5. Hero & tool frame
   ============================================================= */
.hero {
  position: relative;
  background: var(--ink);
  color: var(--cream);
  padding-block: 2.6rem 3.4rem;
  overflow: clip;
}
.hero-pattern {
  position: absolute; inset: 0;
  opacity: 0.5;
  background-image:
    linear-gradient(135deg, rgba(215,167,71,.10) 1px, transparent 1px),
    repeating-linear-gradient(115deg, transparent 0 64px, rgba(215,167,71,.06) 64px 66px);
  background-size: 100% 100%, 88px 88px;
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 30%, transparent 85%);
}
.hero-inner { position: relative; text-align: center; }

.hero-illustration { display: block; margin: 0 auto 1.2rem; width: min(220px, 55vw); height: auto; }
.hero-scan-sweep { transform: translateY(0); animation: heroScanSweep 3.6s ease-in-out infinite; }
@keyframes heroScanSweep {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(150px); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-scan-sweep { animation: none; transform: translateY(60px); }
}
.eyebrow {
  display: inline-block; font-family: var(--mono); font-size: .74rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent); background: rgba(215,167,71,.12);
  border: 1px solid rgba(215,167,71,.35); border-radius: 999px; padding: .35rem .9rem;
  margin-bottom: 1.1rem;
}
.hero h1 { font-size: clamp(1.7rem, 4.6vw, 2.7rem); max-width: 20ch; margin-inline: auto; color: var(--cream); }
.hero-sub { color: #c9c0a8; max-width: 56ch; margin: .9rem auto 2rem; font-size: 1.02rem; }

.tool-frame {
  position: relative;
  max-width: 720px;
  margin-inline: auto;
  padding: 20px;
}
.scan-corner {
  position: absolute; width: 26px; height: 26px; z-index: 2;
  border-color: var(--accent); border-style: solid; border-width: 0;
}
.scan-corner--tl { top: 0; left: 0; border-top-width: 3px; border-left-width: 3px; border-radius: 6px 0 0 0; }
.scan-corner--tr { top: 0; right: 0; border-top-width: 3px; border-right-width: 3px; border-radius: 0 6px 0 0; }
.scan-corner--bl { bottom: 0; left: 0; border-bottom-width: 3px; border-left-width: 3px; border-radius: 0 0 0 6px; }
.scan-corner--br { bottom: 0; right: 0; border-bottom-width: 3px; border-right-width: 3px; border-radius: 0 0 6px 0; }

.tool-card {
  position: relative;
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 1.1rem;
  text-align: left;
}
@media (min-width: 720px) { .tool-card { padding: 1.6rem; } }

.tool-tabs { display: flex; gap: .4rem; border-bottom: 1px solid var(--border); margin-bottom: 1rem; }
.tool-tab {
  padding: .6rem 1rem; font-weight: 700; font-family: var(--display); border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  color: var(--text-soft); border-bottom: 2px solid transparent; transform: translateY(1px);
}
.tool-tab.is-active { color: var(--accent-strong); border-bottom-color: var(--accent); background: var(--accent-soft); }
.tab-optional { font-weight: 500; font-size: .8em; opacity: .7; }

.privacy-badge {
  margin-top: 1rem; font-size: .92rem; padding: .7rem .9rem;
  background: var(--accent-soft); border-radius: var(--radius-sm); color: var(--text);
}
.honest-limit { margin-top: .6rem; font-size: .82rem; color: var(--text-soft); }

/* --- Analyzer --- */
.analyzer[hidden] { display: none; }

.upload-shell {
  display: flex;
  flex-direction: column;
}
.upload-zone {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  position: relative;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  padding: 2.2rem 1rem;
  text-align: center;
  cursor: pointer;
  transition: border-color .2s var(--ease-out), background .2s var(--ease-out);
}
.upload-zone:hover, .upload-zone.is-dragover { border-color: var(--accent); background: var(--accent-soft); }
.upload-zone svg { margin: 0 auto .8rem; opacity: .55; }
.upload-zone strong { display: block; margin-bottom: .3rem; font-size: 1.02rem; font-family: var(--display); }
.upload-zone span { color: var(--text-soft); font-size: .88rem; }
.upload-input, .upload-input-camera {
  position: absolute; top: 0; left: 0; width: 1px; height: 1px;
  overflow: hidden; opacity: 0; clip: rect(0 0 0 0);
}
/* Shown only on touch devices (phones/tablets), so the visitor gets an
   explicit choice between the camera and their gallery instead of the
   browser silently deciding — hidden on mouse/trackpad devices, where
   clicking the zone already opens a plain file picker. */
.upload-camera-btn {
  display: none;
  align-self: center;
  align-items: center;
  gap: .45rem;
  margin-top: .9rem;
  padding: .6rem 1.1rem;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--ink);
  font-weight: 700;
  font-size: .88rem;
  font-family: inherit;
  cursor: pointer;
  transition: transform .15s var(--ease-out), background .15s var(--ease-out);
}
.upload-camera-btn:hover { background: var(--accent); color: #fff; }
.upload-camera-btn:active { transform: scale(.96); }
@media (pointer: coarse) {
  .upload-camera-btn { display: inline-flex; }
}

.workspace { display: none; }
.workspace.is-visible { display: block; }

.analyzer[data-state="processing"] .canvas-wrap { position: relative; }
.analyzer[data-state="processing"] .canvas-wrap::after {
  content: "Escaneando la imagen…";
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  background: rgba(20, 16, 10, 0.5); color: #fff; font-weight: 700; font-size: .95rem; text-align: center; padding: 1rem;
}

.canvas-wrap {
  position: relative;
  width: 100%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: repeating-conic-gradient(#00000008 0% 25%, transparent 0% 50%) 50% / 20px 20px;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
}
.canvas-wrap canvas { width: 100%; height: auto; display: block; cursor: grab; touch-action: none; }

.analyzer-toolbar {
  display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .8rem;
}
.btn {
  display: inline-flex; align-items: center; gap: .4rem;
  padding: .55rem .9rem; border-radius: 999px; font-weight: 700; font-size: .86rem;
  border: 1px solid var(--border); background: var(--surface-2);
  transition: transform .15s var(--ease-out), background .15s var(--ease-out);
}
.btn:hover { background: var(--border); }
.btn:active { transform: scale(.97); }
.btn-primary {
  position: relative; overflow: hidden;
  background: var(--accent); border-color: var(--accent); color: #fff;
}
.btn-primary:hover { background: var(--accent-strong); }
.btn-primary::after {
  content: ""; position: absolute; inset: 0; translate: -120% 0;
  background: linear-gradient(115deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
}
.btn-primary:hover::after { translate: 120% 0; transition: translate .6s var(--ease-out); }
.btn-ghost { background: transparent; }

.legend { display: flex; gap: 1.1rem; margin-top: .7rem; font-size: .82rem; color: var(--text-soft); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: .35rem; }
.legend i { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.legend .i-outer { background: var(--outer-color); }
.legend .i-inner { background: var(--inner-color); }

.low-confidence-hint {
  margin-top: .7rem; font-size: .85rem; padding: .6rem .8rem;
  background: var(--warn-soft); border: 1px solid #e8cb7a; border-radius: var(--radius-sm); color: var(--warn);
  display: none;
}
.low-confidence-hint.is-visible { display: block; }

/* --- Results --- */
.results { margin-top: 1.4rem; display: none; }
.results.is-visible { display: block; }

.combined-results {
  margin-top: 1.6rem; padding-top: 1.4rem; border-top: 2px dashed var(--border);
}
.combined-results[hidden] { display: none; }
.combined-source { font-size: .84rem; color: var(--text-soft); margin-bottom: .8rem; margin-top: -.4rem; }
.combined-pending {
  font-size: .9rem; padding: .8rem .9rem; margin-top: -.2rem;
  background: var(--warn-soft); border: 1px solid #e8cb7a; border-radius: var(--radius-sm); color: var(--warn);
}
.combined-pending[hidden] { display: none; }
[data-combined-body][hidden] { display: none; }

.results-heading {
  font-family: var(--display); font-weight: 700; font-size: .78rem; text-transform: uppercase;
  letter-spacing: .08em; color: var(--text-soft); margin-bottom: .6rem;
}

.ratio-row { display: grid; grid-template-columns: 1fr; gap: .8rem; margin-bottom: 1.2rem; }
@media (min-width: 540px) { .ratio-row { grid-template-columns: 1fr 1fr; } }

.ratio-card {
  background: var(--surface-2); border-radius: var(--radius-sm); padding: 1rem; text-align: center;
  border: 1px solid var(--border);
}
.ratio-card .ratio-label { font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-soft); }
.ratio-card .ratio-value { font-family: var(--mono); font-size: clamp(1.7rem, 6vw, 2.3rem); font-weight: 700; margin-top: .2rem; color: var(--accent-strong); }
.ratio-card .ratio-sub { font-size: .82rem; color: var(--text-soft); margin-top: .2rem; }

.grade-row { display: grid; grid-template-columns: 1fr; gap: .8rem; margin-bottom: 1.2rem; }
@media (min-width: 540px) { .grade-row { grid-template-columns: 1fr 1fr; } }

.grade-card {
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1rem;
}
.grade-card .grade-org { font-weight: 800; font-family: var(--display); font-size: 1.05rem; }
.grade-card .grade-value { font-family: var(--mono); font-size: 1.6rem; font-weight: 700; margin-top: .3rem; }
.grade-card .grade-note { font-size: .8rem; color: var(--text-soft); margin-top: .3rem; }

/* --- Extra signals: corners / edges / surface --- */
.signals-card {
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 1rem; margin-bottom: 1.2rem; background: var(--surface);
}
.signals-intro { font-size: .82rem; color: var(--text-soft); margin-bottom: .8rem; }
.signal-row {
  display: flex; align-items: flex-start; gap: .7rem; padding-block: .6rem;
  border-top: 1px solid var(--border);
}
.signal-row:first-of-type { border-top: none; padding-top: 0; }
.signal-icon {
  flex-shrink: 0; width: 30px; height: 30px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center; font-size: 1rem;
  background: var(--surface-2);
}
.signal-body { flex: 1; min-width: 0; }
.signal-title { font-weight: 700; font-size: .92rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.signal-note { font-size: .82rem; color: var(--text-soft); margin-top: .15rem; }
.signal-badge {
  display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .03em;
  padding: .2rem .55rem; border-radius: 999px; text-transform: uppercase;
}
.signal-badge--good { background: var(--good-soft); color: var(--good); }
.signal-badge--warn { background: var(--warn-soft); color: var(--warn); }
.signal-badge--bad { background: var(--bad-soft); color: var(--bad); }
.signal-badge--na { background: var(--surface-2); color: var(--text-soft); }

.disclaimer-box {
  font-size: .84rem; line-height: 1.5; background: var(--surface-2);
  border-left: 3px solid var(--accent); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: .8rem 1rem; color: var(--text-soft); margin-bottom: 1.1rem;
}
.disclaimer-box strong { color: var(--text); }

.value-lookup { margin-bottom: 1.2rem; }
.value-lookup-intro { font-size: .82rem; color: var(--text-soft); margin-bottom: .7rem; }
.value-lookup-input {
  width: 100%; padding: .7rem .9rem; margin-bottom: .7rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--text); font: inherit; font-size: .92rem;
}
.value-lookup-input:focus-visible { border-color: var(--accent); }
.ocr-row { display: flex; gap: .5rem; margin-bottom: .5rem; }
.ocr-row .value-lookup-input { margin-bottom: 0; flex: 1; min-width: 0; }
.ocr-row .btn { flex-shrink: 0; white-space: nowrap; }
@media (max-width: 539px) { .ocr-row { flex-direction: column; } .ocr-row .btn { width: 100%; justify-content: center; } }
.ocr-status { font-size: .82rem; color: var(--text-soft); min-height: 1.2em; margin-bottom: .5rem; }
.ocr-raw { margin-bottom: .8rem; background: var(--surface-2); border-radius: var(--radius-sm); border: 1px solid var(--border); }
.ocr-raw summary { cursor: pointer; padding: .6rem .8rem; font-size: .82rem; font-weight: 700; }
.ocr-raw pre {
  margin: 0; padding: 0 .8rem .8rem; font-family: var(--mono); font-size: .78rem;
  white-space: pre-wrap; word-break: break-word; max-height: 160px; overflow-y: auto; color: var(--text-soft);
}
.value-lookup-links { display: grid; grid-template-columns: repeat(3, 1fr); gap: .6rem; }
@media (max-width: 539px) { .value-lookup-links { grid-template-columns: 1fr; } }
.value-link {
  display: flex; flex-direction: column; align-items: center; gap: .2rem; text-align: center;
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .7rem .5rem;
  font-weight: 700; font-size: .86rem;
  transition: border-color .15s var(--ease-out), transform .15s var(--ease-out);
}
.value-link:hover { border-color: var(--accent); transform: translateY(-2px); }
.value-link small { font-weight: 500; color: var(--text-soft); font-size: .72rem; }

.cta-lead { font-weight: 700; margin-bottom: .6rem; font-size: .9rem; font-family: var(--display); }
.cta-graders { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem; }
@media (min-width: 540px) { .cta-graders { grid-template-columns: repeat(4, 1fr); } }
.cta-grader {
  display: flex; flex-direction: column; align-items: center; gap: .3rem;
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: .8rem .5rem;
  font-weight: 700; font-size: .84rem; text-align: center;
  transition: border-color .15s var(--ease-out), transform .15s var(--ease-out);
}
.cta-grader:hover { border-color: var(--accent); transform: translateY(-2px); }
.cta-grader small { font-weight: 500; color: var(--text-soft); font-size: .72rem; }

/* =============================================================
   6. Ad slots
   ============================================================= */
.ad-slot {
  min-height: 90px; margin-block: 1.6rem;
  border: 1px dashed var(--border); border-radius: var(--radius-sm);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .3rem;
  color: var(--text-soft); background: var(--surface-2);
}
.ad-label { font-size: .72rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; opacity: .65; }
.ad-slot--leaderboard { min-height: 100px; }
.ad-slot--incontent { min-height: 250px; }
.ad-placeholder-text { font-size: .8rem; opacity: .55; }

.ad-rail {
  display: none;
  position: fixed; top: 50%; transform: translateY(-50%);
  width: 160px; height: 600px; max-height: 80vh;
  border: 1px dashed var(--border); border-radius: var(--radius-sm);
  background: var(--surface-2);
  align-items: center; justify-content: center;
  z-index: 20;
}
.ad-rail--left { left: max(12px, calc(50% - 720px)); }
.ad-rail--right { right: max(12px, calc(50% - 720px)); }
@media (min-width: 1440px) { .ad-rail { display: flex; } }

/* =============================================================
   7. Content sections
   ============================================================= */
.section { padding-block: 2.6rem; }
.section--alt { background: var(--surface); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section h2 { font-size: clamp(1.4rem, 3.2vw, 1.85rem); margin-bottom: 1.4rem; text-align: center; }

.steps-grid, .audience-grid { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 720px) { .steps-grid, .audience-grid { grid-template-columns: repeat(3, 1fr); } }

.step-item, .audience-item {
  position: relative;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 1.3rem; box-shadow: var(--shadow-sm);
}
.section--alt .step-item, .section--alt .audience-item { background: var(--bg); }
.step-num {
  width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff;
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-family: var(--mono);
  margin-bottom: .8rem;
}
.step-icon {
  position: absolute; top: 1.1rem; right: 1.1rem; width: 30px; height: 30px;
  color: var(--accent); opacity: .55;
}
.step-item h3, .audience-item h3 { font-size: 1.08rem; margin-bottom: .4rem; }
.step-item p, .audience-item p { color: var(--text-soft); font-size: .92rem; }

.prose { max-width: 68ch; margin-inline: auto; display: grid; gap: 1rem; color: var(--text-soft); }
.prose p:first-child { color: var(--text); }

.faq-list { max-width: 72ch; margin-inline: auto; display: grid; gap: .6rem; }
.faq-item { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); overflow: hidden; }
.faq-item summary {
  cursor: pointer; padding: 1rem 1.1rem; font-weight: 700; list-style: none; display: flex;
  justify-content: space-between; align-items: center; gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.3rem; color: var(--accent); flex-shrink: 0; }
.faq-item[open] summary::after { content: "–"; }
.faq-item p { padding: 0 1.1rem 1.1rem; color: var(--text-soft); font-size: .93rem; }

.disclaimer-inline { text-align: center; color: var(--text-soft); font-size: .88rem; margin-bottom: 1.2rem; }
.graders-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: .8rem; }
@media (min-width: 720px) { .graders-grid { grid-template-columns: repeat(4, 1fr); } }
.grader-card {
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 1rem; text-align: center;
  background: var(--surface);
}
.grader-card strong { display: block; font-family: var(--display); font-size: 1.05rem; margin-bottom: .2rem; }
.grader-card span { font-size: .78rem; color: var(--text-soft); }
.grader-card a { display: inline-block; margin-top: .6rem; font-size: .8rem; font-weight: 700; color: var(--accent); }

/* =============================================================
   8. Legal pages
   ============================================================= */
.legal-page { max-width: 68ch; margin: 0 auto; padding: 2.5rem 1.25rem 4rem; }
.legal-page h1 { font-size: 1.7rem; margin-bottom: 1rem; }
.legal-page h2 { font-size: 1.15rem; margin: 1.6rem 0 .5rem; }
.legal-page p, .legal-page li { color: var(--text-soft); font-size: .95rem; margin-bottom: .6rem; }
.legal-page a { color: var(--accent); font-weight: 600; }

/* =============================================================
   9. Result popup (ad placeholder) + corner toast
   ============================================================= */
.result-popup {
  border: none; border-radius: var(--radius); padding: 0; max-width: 360px; width: calc(100% - 2.5rem);
  box-shadow: var(--shadow-md); background: var(--surface); color: var(--text);
}
.result-popup::backdrop { background: rgba(10, 8, 5, 0.55); }
.result-popup-inner { position: relative; padding: 2.2rem 1.4rem 1.6rem; text-align: center; min-height: 160px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .5rem; }
.result-popup-close {
  position: absolute; top: .5rem; right: .5rem; width: 32px; height: 32px; border-radius: 50%;
  background: var(--surface-2); font-size: 1.2rem; line-height: 1; display: flex; align-items: center; justify-content: center;
}
.result-popup-close:hover { background: var(--border); }

.corner-toast {
  position: fixed; bottom: 1rem; right: 1rem; z-index: 60;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md); padding: .8rem 2.2rem .8rem 1rem; min-width: 160px; min-height: 54px;
  display: flex; align-items: center; justify-content: center;
}
.corner-toast[hidden] { display: none; }
.corner-toast-close {
  position: absolute; top: .3rem; right: .3rem; width: 22px; height: 22px; border-radius: 50%;
  font-size: 1rem; display: flex; align-items: center; justify-content: center; color: var(--text-soft);
}
.corner-toast-close:hover { background: var(--surface-2); }

.cookie-consent {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 80;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 1rem;
  padding: 1rem 1.2rem; background: var(--surface); border-top: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}
.cookie-consent[hidden] { display: none; }
.cookie-consent p { flex: 1 1 320px; margin: 0; font-size: .88rem; color: var(--text-soft); }
.cookie-consent p a { color: var(--accent); font-weight: 600; }
.cookie-consent-actions { display: flex; gap: .6rem; flex-shrink: 0; }
@media (max-width: 520px) {
  .cookie-consent { flex-direction: column; align-items: stretch; text-align: center; }
  .cookie-consent-actions { justify-content: center; }
}

/* =============================================================
   10. No-JS fallback
   ============================================================= */
.noscript-note {
  max-width: 720px; margin: 1rem auto 0; padding: 1rem; text-align: center;
  background: var(--accent-soft); border-radius: var(--radius-sm); font-weight: 600;
}
