:root {
  --bg: #f6f4ef; --surface: #ffffff; --surface2: #efece4; --ink: #1b1d21; --muted: #5d6169;
  --line: #dcd7cc; --accent: #d9822b; --brand: #1f3a5f; --brand-ink: #ffffff;
  --real: #1d7a55; --real-bg: #e3f3eb; --fake: #b3392f; --fake-bg: #fbe7e4;
  --shadow: 0 1px 2px rgba(0,0,0,.05), 0 6px 24px rgba(0,0,0,.06);
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #14161a; --surface: #1d2026; --surface2: #262a31; --ink: #eceae4; --muted: #a2a6ad;
    --line: #343941; --accent: #f2a541; --brand: #8fb4e3; --brand-ink: #10161f;
    --real: #5cc79a; --real-bg: #17322a; --fake: #f0857a; --fake-bg: #3a1f1d;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 24px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #14161a; --surface: #1d2026; --surface2: #262a31; --ink: #eceae4; --muted: #a2a6ad;
  --line: #343941; --accent: #f2a541; --brand: #8fb4e3; --brand-ink: #10161f;
  --real: #5cc79a; --real-bg: #17322a; --fake: #f0857a; --fake-bg: #3a1f1d;
  --shadow: 0 1px 2px rgba(0,0,0,.3), 0 6px 24px rgba(0,0,0,.35);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--brand); }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 8px; top: 8px; background: var(--surface); padding: 6px 10px; z-index: 10; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.top {
  display: flex; align-items: center; gap: 12px; padding: 10px 16px;
  max-width: 880px; margin: 0 auto;
}
.back { font-size: 14px; text-decoration: none; color: var(--muted); white-space: nowrap; }
.back:hover { color: var(--ink); }
.brand { display: flex; align-items: center; gap: 8px; margin-right: auto; font-weight: 700; }
.brand .logo { color: var(--brand); display: inline-flex; }
.iconbtn {
  border: 1px solid var(--line); background: var(--surface); color: var(--ink);
  width: 40px; height: 40px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; cursor: pointer;
}

main { max-width: 880px; margin: 0 auto; padding: 0 16px 24px; }
.view { padding-top: 8px; }

.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: 12px; font-weight: 700; color: var(--accent); margin: 0 0 6px; }
h1 { font-size: clamp(28px, 6vw, 44px); line-height: 1.12; margin: 0 0 12px; letter-spacing: -.01em; }
h2 { font-size: 24px; line-height: 1.2; margin: 0 0 6px; }
.lede { font-size: 18px; color: var(--muted); max-width: 640px; margin: 0 0 22px; }
.hero { padding: 28px 0 8px; }
.cta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 22px; }
.facts { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.facts li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; color: var(--muted); font-size: 14px; }
.facts strong { display: block; color: var(--ink); font-size: 15px; }
.note { margin-top: 16px; background: var(--surface2); border-radius: var(--radius); padding: 10px 14px; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

button { font: inherit; }
.primary, .ghost {
  border-radius: 999px; padding: 10px 18px; cursor: pointer; font-weight: 600; border: 1px solid transparent;
  min-height: 44px;
}
.primary { background: var(--brand); color: var(--brand-ink); }
.primary:hover { filter: brightness(1.08); }
.ghost { background: var(--surface); color: var(--ink); border-color: var(--line); }
.ghost:hover { border-color: var(--muted); }
.big { padding: 14px 24px; font-size: 17px; }
.small { font-size: 14px; }
.ghost.small { padding: 6px 12px; min-height: 36px; }
.link { background: none; border: 0; padding: 0; color: var(--brand); text-decoration: underline; cursor: pointer; }
.muted { color: var(--muted); }
button:disabled { opacity: .45; cursor: default; }

/* quiz */
.quizhead { display: flex; align-items: center; gap: 12px; margin: 12px 0 18px; }
.progress { flex: 1; height: 8px; background: var(--surface2); border-radius: 99px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .25s ease; }
.count { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--muted); min-width: 52px; text-align: right; }
.instr { margin: 0 0 12px; }
.headline {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 32px 24px; min-height: 180px; display: flex; align-items: center;
  font-family: Georgia, "Times New Roman", serif; font-size: clamp(22px, 4.6vw, 32px); line-height: 1.25; font-weight: 700;
}
.headline.flash { animation: pop .18s ease; }
@keyframes pop { from { transform: translateY(4px); opacity: .4; } to { transform: none; opacity: 1; } }
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 16px 0 8px; }
.choice {
  min-height: 64px; border-radius: var(--radius); font-size: 20px; font-weight: 700; cursor: pointer;
  border: 2px solid; display: flex; align-items: center; justify-content: center; gap: 10px;
}
.choice.real { background: var(--real-bg); color: var(--real); border-color: var(--real); }
.choice.fake { background: var(--fake-bg); color: var(--fake); border-color: var(--fake); }
.choice.picked { box-shadow: inset 0 0 0 3px currentColor; }
.choice:hover { filter: brightness(1.03); }
.choice .k { font-size: 12px; border: 1px solid currentColor; border-radius: 5px; padding: 0 5px; opacity: .7; }
.hint { font-size: 13px; text-align: center; margin: 4px 0; }
kbd { font: 12px ui-monospace, Menlo, monospace; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 0 4px; background: var(--surface); }
.quizfoot { text-align: center; margin-top: 18px; font-size: 14px; }
@media (hover: none) { .hint { display: none; } }

/* results */
.banner { background: var(--surface2); border-left: 4px solid var(--accent); border-radius: 8px; padding: 10px 14px; margin: 12px 0; }
.scorecard { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; margin-top: 12px; }
.big-score { display: flex; gap: 22px; align-items: center; margin-bottom: 20px; }
.big-score p { margin: 0 0 4px; }
.ring { position: relative; width: 132px; height: 132px; flex: none; }
.ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.ring circle { fill: none; stroke-width: 12; }
.ring .track { stroke: var(--surface2); }
.ring .fill { stroke: var(--accent); stroke-linecap: round; stroke-dasharray: 326.73; stroke-dashoffset: 326.73; transition: stroke-dashoffset .8s ease; }
.ring-num { position: absolute; inset: 0; display: flex; align-items: baseline; justify-content: center; padding-top: 44px; gap: 3px; }
.ring-num strong { font-size: 40px; line-height: 1; }
.ring-num span { color: var(--muted); }
.norm { font-weight: 600; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.facet { background: var(--surface2); border-radius: 12px; padding: 14px; }
.facet p { margin: 0 0 6px; }
.facet .k { font-size: 13px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.facet .v strong { font-size: 26px; }
.bar { height: 8px; border-radius: 99px; background: var(--surface); overflow: hidden; margin: 4px 0 8px; }
.bar span { display: block; height: 100%; width: 0; background: var(--brand); transition: width .6s ease; }
.lean { position: relative; height: 10px; border-radius: 99px; margin: 10px 0 4px; background: linear-gradient(90deg, var(--fake), var(--surface) 50%, var(--real)); }
.lean .mid { position: absolute; left: 50%; top: -3px; bottom: -3px; width: 2px; background: var(--muted); }
.lean .dot { position: absolute; top: 50%; left: 50%; width: 18px; height: 18px; border-radius: 50%; background: var(--ink); border: 3px solid var(--surface); transform: translate(-50%, -50%); transition: left .6s ease; }
.leanlabels { display: flex; justify-content: space-between; margin-bottom: 6px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 18px 0 4px; }
.status { font-size: 14px; color: var(--real); }

details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin-top: 14px; }
summary { cursor: pointer; font-weight: 600; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 6px; }
.chip { border: 1px solid var(--line); background: var(--surface2); color: var(--ink); border-radius: 99px; padding: 4px 12px; cursor: pointer; font-size: 14px; }
.chip[aria-pressed="true"] { background: var(--brand); color: var(--brand-ink); border-color: var(--brand); }
.rlist { margin: 6px 0 0; padding-left: 0; list-style: none; }
.rlist li { display: grid; grid-template-columns: 26px 1fr; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); }
.rlist .mark { font-weight: 800; text-align: center; }
.rlist .ok { color: var(--real); }
.rlist .no { color: var(--fake); }
.rlist .hl { font-family: Georgia, serif; font-weight: 600; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 6px; padding: 1px 7px; margin-right: 6px; }
.tag.real { background: var(--real-bg); color: var(--real); }
.tag.fake { background: var(--fake-bg); color: var(--fake); }
dl dt { font-weight: 700; margin-top: 10px; }
dl dd { margin: 2px 0 0; color: var(--muted); }

.about { max-width: 880px; margin: 36px auto 0; padding: 18px 16px 0; }
.about::before { content: ""; display: block; border-top: 1px solid var(--line); margin: -18px 0 18px; }
.about h2 { font-size: 20px; }
.cite { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; font-size: 14px; }
.foot { max-width: 880px; margin: 0 auto; padding: 18px 16px 32px; display: flex; flex-wrap: wrap; gap: 14px; font-size: 14px; color: var(--muted); }
.foot a { color: var(--muted); }

@media (max-width: 640px) {
  .grid3 { grid-template-columns: 1fr; }
  .big-score { flex-direction: column; align-items: flex-start; gap: 12px; }
  .ring { width: 112px; height: 112px; }
  .ring-num { padding-top: 36px; }
  .ring-num strong { font-size: 34px; }
  .scorecard { padding: 16px; }
  .headline { padding: 22px 18px; min-height: 160px; }
  .back { display: none; }
  .actions > button { flex: 1 1 calc(50% - 10px); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } }
