/* teste·cidadania·portuguesa — single stylesheet, system fonts, no framework */
:root {
  --bg: #faf8f4;
  --surface: #ffffff;
  --surface-2: #f3efe7;
  --ink: #1d2433;
  --muted: #535c6c;
  --line: #e2ddd2;
  --brand: #0d5c63;
  --brand-ink: #0a474d;
  --brand-soft: #e3f0f0;
  --on-brand: #ffffff;
  --accent: #b03f17;
  --accent-ink: #8e3112;
  --on-accent: #ffffff;
  --link: #0b5560;
  --warn-bg: #fff2d1;
  --warn-ink: #4d3300;
  --warn-dot: #c98a00;
  --ok: #1b6b3a;
  --ok-bg: #e7f3ea;
  --bad: #9f2427;
  --bad-bg: #fbe9e9;
  --focus: #1a73e8;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(29, 36, 51, .06), 0 4px 16px rgba(29, 36, 51, .06);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --serif: ui-serif, "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --maxw: 72rem;
  --readw: 44rem;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #12161b;
    --surface: #1a2027;
    --surface-2: #20272f;
    --ink: #ebe8e1;
    --muted: #aab2bd;
    --line: #2e3640;
    --brand: #5fc2c9;
    --brand-ink: #8fd8dd;
    --brand-soft: #18343a;
    --on-brand: #0b1d20;
    --accent: #f08a5d;
    --accent-ink: #f6a985;
    --on-accent: #1f0d05;
    --link: #8fd8dd;
    --warn-bg: #3a2e12;
    --warn-ink: #f5dfa8;
    --warn-dot: #f0b429;
    --ok: #7ed39a;
    --ok-bg: #173323;
    --bad: #f19a9c;
    --bad-bg: #3b1d1f;
    --focus: #8ab4f8;
    --shadow: none;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 1.0625rem/1.65 var(--sans);
  overflow-wrap: break-word;
}
img, svg { max-width: 100%; }
a { color: var(--link); text-underline-offset: .15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
main:focus { outline: none; }

h1, h2, h3 { font-family: var(--serif); line-height: 1.2; letter-spacing: -.01em; font-weight: 700; }
h1 { font-size: clamp(1.85rem, 1.3rem + 2.6vw, 2.9rem); margin: .6rem 0 1rem; }
h2 { font-size: clamp(1.4rem, 1.15rem + 1.1vw, 1.85rem); margin: 2.4rem 0 .8rem; }
h3 { font-size: 1.2rem; margin: 1.6rem 0 .5rem; }
p, ul, ol { margin: 0 0 1rem; }
li { margin-bottom: .35rem; }
strong { font-weight: 650; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }
.prose { max-width: var(--readw); }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--surface); color: var(--ink); padding: .6rem 1rem; border-radius: 8px; z-index: 10; box-shadow: var(--shadow); }
.skip:focus { top: 8px; }
.fine { font-size: .875rem; color: var(--muted); }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 40rem; }

/* status banner — one line on mobile (P0-1) */
.status-banner { background: var(--warn-bg); color: var(--warn-ink); font-size: .875rem; border-bottom: 1px solid rgba(0,0,0,.06); }
.status-banner p { max-width: var(--maxw); margin: 0 auto; padding: .4rem 16px; line-height: 1.45; }
.status-banner a { color: inherit; font-weight: 700; display: inline-block; padding: .6rem 0; margin: -.6rem 0; }
.status-banner .dot { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; background: var(--warn-dot); margin-right: .45rem; vertical-align: .05em; }
.status-banner.is-published { background: var(--ok-bg); color: var(--ink); }
.status-banner.is-published .dot { background: var(--ok); }
@media (max-width: 419px) { .status-banner .sb-date { display: none; } }

/* header — single 56px row on mobile, <details> menu (P0-1) */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: .5rem 1rem; min-height: 56px; padding-top: .35rem; padding-bottom: .35rem; flex-wrap: nowrap; }
.brand { display: inline-flex; align-items: center; gap: .5rem; color: var(--ink); text-decoration: none; font-weight: 700; letter-spacing: -.01em; min-height: 44px; flex: none; }
.brand-mark { color: var(--brand); flex: none; }
.brand-mark .bm-ring { fill: var(--surface); }
.brand-text { font-size: 1.05rem; white-space: nowrap; }
.brand-dot { color: var(--accent); padding: 0 .05em; }
@media (max-width: 419px) { .brand-long { display: none; } }
.header-actions { display: flex; align-items: center; gap: .4rem; flex: none; }
.header-cta { display: inline-flex; align-items: center; min-height: 44px; padding: .5rem .95rem; border-radius: 999px; background: var(--accent); color: var(--on-accent); font-weight: 700; font-size: .95rem; text-decoration: none; white-space: nowrap; }
.header-cta:hover { background: var(--accent-ink); }
.lang-switch { font-size: .9rem; font-weight: 600; text-decoration: none; border: 1px solid var(--line); padding: .35rem .8rem; border-radius: 999px; color: var(--ink); white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; }
.lang-switch:hover { border-color: var(--brand); }
.menu { position: static; }
.menu > summary { list-style: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; cursor: pointer; color: var(--ink); }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary:hover, .menu[open] > summary { background: var(--surface-2); }
.menu-panel { position: absolute; left: 0; right: 0; top: 100%; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 12px 24px rgba(0,0,0,.12); }
.menu-panel ul { list-style: none; margin: 0 auto; padding: .4rem 16px 1rem; max-width: var(--maxw); }
.menu-panel li { margin: 0; border-bottom: 1px solid var(--line); }
.menu-panel li:last-child { border-bottom: 0; }
.menu-panel a { display: flex; align-items: center; min-height: 48px; font-size: 1.0625rem; color: var(--ink); text-decoration: none; font-weight: 600; }
.menu-panel a[aria-current="page"] { color: var(--brand); }
.menu-panel a.nav-cta { color: var(--accent-ink); }
.site-nav.nav-desktop ul { list-style: none; display: flex; flex-wrap: wrap; gap: .1rem .2rem; margin: 0; padding: 0; }
.site-nav li { margin: 0; flex: none; }
.site-nav a { display: flex; align-items: center; min-height: 44px; padding: 0 .65rem; border-radius: 8px; text-decoration: none; color: var(--muted); font-size: .95rem; font-weight: 550; white-space: nowrap; }
.site-nav a:hover { color: var(--ink); background: var(--surface-2); }
.site-nav a[aria-current="page"] { color: var(--ink); background: var(--brand-soft); }
.site-nav a.nav-cta { color: var(--accent-ink); }
.nav-desktop { display: none !important; }
@media (min-width: 960px) {
  .nav-desktop { display: flex !important; }
  .site-nav.nav-desktop { flex: 1; justify-content: center; }
  .menu, .header-cta { display: none; }
}

/* breadcrumbs */
.crumbs ol { list-style: none; padding: 0; margin: 1.2rem 0 0; display: flex; flex-wrap: wrap; gap: .3rem; font-size: .875rem; color: var(--muted); }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "›"; margin-right: .3rem; color: var(--line); }
.crumbs a { color: var(--muted); }

/* hero */
.hero { padding: 2rem 0 1rem; }
.hero .eyebrow, .eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--brand); margin-bottom: .2rem; }
.hero h1 { max-width: 46rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: .75rem; margin: 1.4rem 0 .6rem; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 48px; padding: .7rem 1.25rem; border-radius: 10px; border: 2px solid transparent; font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; line-height: 1.2; text-align: center; }
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { background: var(--accent-ink); }
.btn-brand { background: var(--brand); color: var(--on-brand); }
.btn-brand:hover { background: var(--brand-ink); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--brand); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn-block { width: 100%; }

/* cards & grids */
.grid { display: grid; gap: 1rem; }
@media (min-width: 720px) { .grid-2 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: repeat(3, 1fr); } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem 1.25rem .5rem; box-shadow: var(--shadow); }
.card h3 { margin-top: 0; }
.card.known { border-top: 4px solid var(--ok); }
.card.unknown { border-top: 4px solid var(--warn-dot); }
.check-list, .x-list, .q-list { list-style: none; padding: 0; }
.check-list li, .x-list li, .q-list li { position: relative; padding-left: 1.6rem; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--ok); font-weight: 700; }
.x-list li::before { content: "?"; position: absolute; left: .15rem; color: var(--warn-ink); font-weight: 800; }
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps li { counter-increment: s; position: relative; padding-left: 2.6rem; margin-bottom: 1rem; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: -.05rem; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--brand-soft); color: var(--brand-ink); font-weight: 700; display: grid; place-items: center; }

/* law quotes & callouts */
blockquote.law { margin: 1rem 0 1.4rem; padding: 1rem 1.2rem; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--brand); border-radius: 0 var(--radius) var(--radius) 0; font-family: var(--serif); font-size: 1.05rem; }
blockquote.law p { margin-bottom: .5rem; }
blockquote.law footer { font-family: var(--sans); font-size: .85rem; color: var(--muted); }
blockquote.law cite { font-style: normal; }
.callout { border-radius: var(--radius); padding: 1rem 1.2rem; margin: 1.4rem 0; border: 1px solid var(--line); background: var(--surface-2); }
.callout p:last-child { margin-bottom: 0; }
.callout-warn { background: var(--warn-bg); color: var(--warn-ink); border-color: transparent; }
.callout-warn a { color: inherit; }
.callout-note { font-size: .95rem; }
.tag { display: inline-block; font-size: .78rem; font-weight: 700; padding: .15rem .55rem; border-radius: 999px; background: var(--surface-2); color: var(--muted); vertical-align: middle; }
.tag-warn { background: var(--warn-bg); color: var(--warn-ink); }
.tag-ok { background: var(--ok-bg); color: var(--ok); }

/* tables */
.table-wrap { overflow-x: auto; margin: 1rem 0 1.4rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
table { border-collapse: collapse; width: 100%; font-size: .95rem; }
th, td { text-align: left; padding: .65rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: var(--surface-2); font-weight: 650; }
tr:last-child td { border-bottom: 0; }

/* timeline / changelog */
.timeline { list-style: none; padding: 0; border-left: 2px solid var(--line); margin-left: .4rem; }
.timeline li { position: relative; padding: 0 0 .9rem 1.2rem; }
.timeline li::before { content: ""; position: absolute; left: -.42rem; top: .45rem; width: .7rem; height: .7rem; border-radius: 50%; background: var(--brand); }
.timeline li.pending::before { background: var(--warn-dot); }
.timeline time { font-weight: 700; display: block; font-size: .9rem; }

/* faq */
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; margin-bottom: .6rem; }
.faq summary { cursor: pointer; padding: .9rem 1rem; font-weight: 650; list-style-position: outside; }
.faq summary::marker { color: var(--brand); }
.faq .faq-a { padding: 0 1rem .5rem; }

/* signup */
.signup-box { background: var(--brand-soft); border-radius: var(--radius); padding: 1.3rem 1.2rem .6rem; margin: 2rem 0; max-width: 40rem; }
.signup-box h2 { margin-top: 0; font-size: 1.4rem; }
.signup .field { margin-bottom: .8rem; }
.signup label { font-weight: 600; display: block; margin-bottom: .3rem; }
.signup input[type="email"] { width: 100%; min-height: 48px; padding: .6rem .8rem; font: inherit; border: 2px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); }
.signup input[type="email"]:focus { border-color: var(--brand); outline: none; box-shadow: 0 0 0 3px var(--focus); }
.signup .consent { display: flex; gap: .6rem; align-items: flex-start; margin-bottom: 1rem; font-size: .92rem; }
.signup .consent input { width: 1.25rem; height: 1.25rem; margin-top: .2rem; flex: none; accent-color: var(--brand); }
.signup .consent label { font-weight: 400; margin: 0; }
.signup .hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-msg { margin: .8rem 0 0; font-weight: 600; min-height: 1px; }
.form-msg.is-ok { color: var(--ok); }
.form-msg.is-err { color: var(--bad); }

/* price box */
.price-box { background: var(--surface); border: 2px solid var(--brand); border-radius: var(--radius); padding: 1.4rem 1.3rem 1rem; max-width: 34rem; box-shadow: var(--shadow); margin: 1.5rem 0; }
.price { font-family: var(--serif); font-size: 2.6rem; font-weight: 700; line-height: 1; }
.price small { font-family: var(--sans); font-size: 1rem; color: var(--muted); font-weight: 500; }

/* quiz */
.quiz { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; box-shadow: var(--shadow); margin: 1.5rem 0 2rem; max-width: 46rem; }
.quiz.quiz-main { background: transparent; border: 0; box-shadow: none; padding: 0; }
.quiz-top { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; flex-wrap: wrap; font-size: .9rem; color: var(--muted); }
.quiz progress { width: 100%; height: .5rem; appearance: none; -webkit-appearance: none; border: 0; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin: .4rem 0 1rem; }
.quiz progress::-webkit-progress-bar { background: var(--surface-2); }
.quiz progress::-webkit-progress-value { background: var(--brand); border-radius: 999px; }
.quiz progress::-moz-progress-bar { background: var(--brand); border-radius: 999px; }
.quiz fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.quiz legend { font-family: var(--serif); font-size: 1.3rem; font-weight: 700; line-height: 1.3; margin-bottom: 1rem; padding: 0; }
.quiz .opt { display: flex; gap: .75rem; align-items: flex-start; border: 2px solid var(--line); border-radius: 10px; padding: .8rem .9rem; margin-bottom: .6rem; cursor: pointer; background: var(--bg); }
.quiz .opt:hover { border-color: var(--brand); }
.quiz .opt input { width: 1.2rem; height: 1.2rem; margin-top: .2rem; flex: none; accent-color: var(--brand); }
.quiz .opt.is-correct { border-color: var(--ok); background: var(--ok-bg); }
.quiz .opt.is-wrong { border-color: var(--bad); background: var(--bad-bg); }
.quiz .opt.is-locked { cursor: default; }
.quiz .opt .mark { margin-left: auto; font-weight: 700; padding-left: .5rem; }
.quiz .feedback { border-radius: 10px; padding: 1rem; margin: 1rem 0; background: var(--surface-2); }
.quiz .feedback:focus { outline: 3px solid var(--focus); }
.quiz .feedback .verdict { font-weight: 700; margin-bottom: .4rem; }
.quiz .feedback .verdict.ok { color: var(--ok); }
.quiz .feedback .verdict.bad { color: var(--bad); }
.quiz .sources { font-size: .875rem; margin: .5rem 0 0; padding-left: 1.1rem; }
.quiz .actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: 1rem; }
.quiz .theme-tag { display: inline-block; font-size: .8125rem; font-weight: 700; color: var(--brand); }
.quiz .score { font-family: var(--serif); font-size: 3rem; font-weight: 700; line-height: 1; margin: .3rem 0; }
.quiz .review-item { border-top: 1px solid var(--line); padding-top: 1rem; margin-top: 1rem; }
.quiz .review-item p { margin-bottom: .5rem; }
.quiz .yours { color: var(--bad); }
.quiz .right { color: var(--ok); }
.quiz-error { color: var(--bad); font-weight: 600; }

/* misc */
.section-intro { color: var(--muted); max-width: 40rem; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
.site-footer { margin-top: 3.5rem; background: var(--surface); border-top: 1px solid var(--line); padding: 2rem 0 1.5rem; }
.footer-grid { display: grid; gap: 1.5rem; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 2fr 1fr; } }
.footer-brand { font-weight: 700; margin-bottom: .4rem; }
.footer-links { list-style: none; padding: 0; margin: 0; font-size: .95rem; }
.legal h2 { font-size: 1.35rem; }
.legal h3 { font-size: 1.1rem; }

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}
@media print {
  .status-banner, .site-nav, .signup-box, .site-footer, .lang-switch { display: none; }
}

.mt0 { margin-top: 0; }
.mt-lg { margin-top: 1.5rem; }
.quiz .src-label { margin: .6rem 0 0; }

/* preview / placeholder markers (only appear in preview builds) */
.preview-banner { background: #9f2427; color: #fff; text-align: center; font-size: .9rem; padding: .5rem 16px; }
mark.ph { background: #ffe08a; color: #3b2a00; padding: 0 .2em; border-radius: 3px; }

/* SEO week 1 (2026-10-05): embedded/themed quizzes, theme chips, sources, before/after table */
.quiz-embed { margin: 1.25rem 0 1.75rem; }
.quiz-embed legend { font-size: 1.15rem; }
.quiz-embed .score { font-size: 2.4rem; }
.quiz-mode { background: var(--brand-soft); color: var(--brand-ink); border-radius: 8px; padding: .6rem .8rem; font-size: .95rem; }
.quiz-mode a { color: inherit; font-weight: 700; }
.theme-links { list-style: none; padding: 0; margin: .5rem 0 1.25rem; display: flex; flex-wrap: wrap; gap: .5rem; }
.theme-links a { display: inline-block; padding: .35rem .8rem; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); text-decoration: none; font-size: .95rem; }
.theme-links a:hover { border-color: var(--brand); }
.sources-list ol { padding-left: 1.3rem; font-size: .95rem; }
.sources-list li { margin-bottom: .4rem; overflow-wrap: anywhere; }
.updated { font-size: .9rem; color: var(--muted); }
table.compare td:first-child { font-weight: 600; }
table.compare td { vertical-align: top; }
.verdict-tag { display: inline-block; font-size: .78rem; font-weight: 800; padding: .1rem .5rem; border-radius: 999px; margin-right: .35rem; vertical-align: middle; }
.verdict-tag.is-myth { background: var(--bad-bg); color: var(--bad); }
.verdict-tag.is-true { background: var(--ok-bg); color: var(--ok); }

/* =====================================================================================
   UX v2 (2026-10-05) — research/H-ux-review.md. P0/P1 fixes + mobile quiz v2.
   ===================================================================================== */
:root { --opt-line: #9a9182; --bar-h: 56px; } /* 3.1:1 on --surface (WCAG 1.4.11) */
@media (prefers-color-scheme: dark) { :root { --opt-line: #647080; } } /* 3.3:1 on dark --surface */

/* legibility (P1-6) and tap targets (P1-5) */
.fine { font-size: .9375rem; }
.signup .consent { font-size: .9375rem; }
.tag, .verdict-tag { font-size: .8125rem; }
.crumbs a { display: inline-block; padding: .6rem 0; }
.crumbs ol { margin-top: .4rem; }
.theme-links a { min-height: 44px; display: inline-flex; align-items: center; padding: .5rem 1rem; }
.footer-links { columns: 2; column-gap: 1.5rem; }
.footer-links li { margin: 0; break-inside: avoid; }
.footer-links a { display: block; padding: .6rem 0; }
.made-by { font-weight: 600; margin-bottom: .6rem; }

/* buttons */
.btn-lg { min-height: 52px; font-size: 1.0625rem; }
.btn-xl { min-height: 56px; font-size: 1.125rem; padding-inline: 1.6rem; }
.linkbtn { background: none; border: 0; padding: .6rem .2rem; font: inherit; color: var(--link); text-decoration: underline; text-underline-offset: .15em; cursor: pointer; min-height: 44px; }
@media (max-width: 719px) { .cta-row .btn { width: 100%; } }

/* hero (P0-2, P1-8) */
.hero { padding: 1.1rem 0 .5rem; }
.hero .eyebrow { text-transform: none; letter-spacing: 0; font-size: .95rem; font-weight: 700; margin-bottom: .1rem; }
.hero h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.75rem); margin: .3rem 0 .7rem; }
.hero .lead { font-size: 1.0625rem; margin-bottom: .2rem; }
.hero .cta-row { margin: 1rem 0 .4rem; }
.micro { font-size: .9375rem; color: var(--muted); margin: 0 0 .9rem; }
.trust-strip { display: flex; gap: .55rem; align-items: flex-start; font-size: .9375rem; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: .6rem .8rem; max-width: 40rem; }
.trust-strip .ts-dot { flex: none; width: .55rem; height: .55rem; border-radius: 50%; background: var(--brand); margin-top: .45rem; }
.hero-secondary { font-weight: 600; }
.hero-secondary a { display: inline-block; padding: .5rem 0; }
.hero-demo { margin: .5rem 0 0; }
@media (min-width: 900px) {
  .hero-grid { display: grid; grid-template-columns: 1.1fr .9fr; gap: 2.5rem; align-items: center; }
  .hero-demo { margin: 0; }
}
.teaser { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 1rem; box-shadow: var(--shadow); }
.teaser-label { display: flex; justify-content: space-between; align-items: center; gap: .5rem; font-size: .875rem; color: var(--muted); margin-bottom: .5rem; }
.teaser .fb-why { font-size: .95rem; }
.before-start { max-width: 44rem; background: var(--surface-2); border-radius: 10px; margin: 1rem 0 0; }
.before-start summary { cursor: pointer; padding: .8rem 1rem; font-weight: 650; min-height: 44px; }
.before-start p { padding: 0 1rem; font-size: .975rem; }
.before-start p:last-child { padding-bottom: .9rem; }

/* quiz page top (P0-3) */
.quiz-h1 { font-size: clamp(1.6rem, 1.2rem + 2vw, 2.4rem); margin: .4rem 0 .3rem; }
.subline { color: var(--muted); margin: 0 0 .5rem; }
.pill-note { display: inline-block; font-size: .9rem; background: var(--surface-2); border-radius: 999px; padding: .35rem .85rem; margin: 0 0 .25rem; }
.pill-note a { display: inline-block; padding: .4rem 0; margin: -.4rem 0; }

/* quiz home / mode picker (§3.7) */
.quiz-main { margin-top: .75rem; }
.qh-card { margin-bottom: 1rem; }
.qh-title { font-weight: 700; font-size: 1.1rem; margin-bottom: .6rem; }
.qh-back { margin: .4rem 0 0; }
.qh-last { margin-bottom: .8rem; }
.qh-modes { display: grid; gap: .6rem; }
.mode-card { display: flex; align-items: center; gap: .85rem; width: 100%; min-height: 64px; padding: .75rem .9rem; border: 2px solid var(--opt-line); border-radius: 14px; background: var(--surface); color: var(--ink); font: inherit; text-align: left; cursor: pointer; }
.mode-card:hover { border-color: var(--brand); }
.mode-card.is-primary { border-color: var(--brand); background: var(--brand-soft); }
.mode-ic { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--brand); font-size: 1.1rem; }
.mode-card.is-primary .mode-ic { background: var(--brand); color: var(--on-brand); }
.mode-txt { display: flex; flex-direction: column; gap: .1rem; flex: 1; }
.mode-txt span { font-size: .9375rem; color: var(--muted); line-height: 1.35; }
.mode-go { flex: none; color: var(--brand); font-weight: 700; }
details.mode-card { display: block; padding: 0; }
details.mode-card > summary { display: flex; align-items: center; gap: .85rem; min-height: 64px; padding: .75rem .9rem; cursor: pointer; list-style: none; }
details.mode-card > summary::-webkit-details-marker { display: none; }
details.mode-card .theme-links { padding: 0 .9rem .9rem; margin: 0; }
.chip { min-height: 44px; padding: .5rem 1rem; border: 1px solid var(--opt-line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: .95rem; cursor: pointer; }
.chip:hover { border-color: var(--brand); }
.qh-meter { margin-top: 1rem; }
.qh-meter p:first-child { font-weight: 650; margin-bottom: .35rem; }
.qh-foot { margin: .9rem 0 0; }
.bar { display: block; height: 8px; background: var(--surface-2); border-radius: 999px; overflow: hidden; }
.bar-fill { display: block; height: 100%; width: 0; background: var(--brand); border-radius: 999px; }
.bar-fill.is-bad { background: var(--bad); } .bar-fill.is-warn { background: var(--warn-dot); } .bar-fill.is-ok { background: var(--ok); }

/* answer buttons (§3.3, §3.9; P0-6) */
.ans-list { margin: 0; }
.ans { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 56px; padding: 12px 14px; margin: 0 0 10px; border: 2px solid var(--opt-line); border-radius: 14px; background: var(--surface); color: var(--ink); font: inherit; font-size: 1.0625rem; line-height: 1.35; text-align: left; cursor: pointer; }
.ans:hover { border-color: var(--brand); }
.ans .badge { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; border: 2px solid var(--opt-line); font-weight: 700; font-size: .95rem; }
.ans .ans-t { flex: 1; }
.ans .ans-tag { flex: none; font-size: .8125rem; font-weight: 700; color: var(--ok); }
.ans:active { transform: scale(.99); }
.ans.is-selected { border-color: var(--brand); background: var(--brand-soft); }
.ans.is-selected .badge { background: var(--brand); color: var(--on-brand); border-color: var(--brand); }
.ans.is-correct { border-color: var(--ok); background: var(--ok-bg); }
.ans.is-correct .badge { background: var(--ok); color: #fff; border-color: var(--ok); }
.ans.is-wrong { border-color: var(--bad); background: var(--bad-bg); }
.ans.is-wrong .badge { background: var(--bad); color: #fff; border-color: var(--bad); }
@media (prefers-color-scheme: dark) { .ans.is-correct .badge, .ans.is-wrong .badge { color: #0b1d20; } }
.ans[aria-disabled="true"] { cursor: default; }
.ans[aria-disabled="true"]:active { transform: none; }
.ans:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

/* quiz frame (shared by focus mode and inline widgets) */
.qz-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; min-height: 44px; }
.qz-top-inline { margin-bottom: .3rem; font-size: .9375rem; color: var(--muted); }
.qz-count { font-weight: 700; font-variant-numeric: tabular-nums; }
.qz-count-btn { background: none; border: 0; font: inherit; font-weight: 700; color: var(--ink); min-height: 44px; padding: 0 .5rem; cursor: pointer; }
.qz-right { display: flex; align-items: center; justify-content: flex-end; min-width: 44px; }
.qz-pill { display: inline-block; font-size: .8125rem; font-weight: 700; background: var(--brand-soft); color: var(--brand-ink); padding: .2rem .65rem; border-radius: 999px; white-space: nowrap; max-width: 52vw; overflow: hidden; text-overflow: ellipsis; }
.qz-pill-inline { margin-bottom: .5rem; }
.qz-x { width: 44px; height: 44px; display: grid; place-items: center; border: 0; background: none; color: var(--ink); font-size: 1.25rem; border-radius: 10px; cursor: pointer; }
.qz-x:hover { background: var(--surface-2); }
.qz-progress { height: 6px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin: .25rem 0 .9rem; }
.qz-progress-fill { display: block; height: 100%; width: 0; background: var(--brand); }
.qz-q { font-family: var(--sans); font-size: 1.25rem; font-weight: 700; line-height: 1.3; margin: 0 0 1rem; }
.qz-q:focus { outline: none; }
.qz-hint { font-size: .8125rem; color: var(--muted); margin: 0 0 .4rem; }
.kbd-hint { display: none; font-size: .8125rem; color: var(--muted); margin-top: .8rem; }
@media (min-width: 900px) and (hover: hover) { .kbd-hint { display: block; } }
.fb-sheet { border-radius: 12px; padding: .9rem 1rem; margin: .4rem 0 0; background: var(--surface-2); border-left: 4px solid var(--ok); }
.fb-sheet.is-bad { border-left-color: var(--bad); }
.fb-verdict { font-weight: 700; margin-bottom: .35rem; }
.fb-sheet.is-ok .fb-verdict { color: var(--ok); }
.fb-sheet.is-bad .fb-verdict { color: var(--bad); }
.fb-sheet.is-bad .fb-verdict strong { color: var(--ink); }
.fb-expl p { margin-bottom: .4rem; }
.fb-expl.is-clamped p { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.fb-more { background: none; border: 0; padding: .5rem 0; min-height: 44px; font: inherit; font-weight: 650; color: var(--link); cursor: pointer; }
.flag-btn { display: inline-flex; align-items: center; gap: .4rem; min-height: 44px; padding: .4rem .9rem; border: 1px solid var(--opt-line); border-radius: 999px; background: var(--surface); color: var(--ink); font: inherit; font-size: .9375rem; cursor: pointer; }
.flag-btn.is-on { border-color: var(--warn-dot); background: var(--warn-bg); color: var(--warn-ink); }
.q-bar { position: sticky; bottom: 0; z-index: 2; padding: 10px 0 calc(10px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); margin-top: 1rem; }
.q-bar .btn { min-height: 52px; font-size: 1.0625rem; }
.q-bar-row { display: flex; gap: .6rem; }
.q-bar-row .btn { flex: 1; }
.qz-timer { font-weight: 700; font-variant-numeric: tabular-nums; padding: .2rem .6rem; border-radius: 999px; background: var(--surface-2); }
.qz-timer.is-warn { background: var(--warn-bg); color: var(--warn-ink); }
.qz-timer.is-bad { background: var(--bad-bg); color: var(--bad); }
.qz-strip { display: flex; gap: 2px; width: 100%; padding: 6px 0; margin: 0 0 .7rem; border: 0; background: none; cursor: pointer; }
.qz-strip span { flex: 1; height: 6px; border-radius: 2px; background: var(--surface-2); }
.qz-strip span.is-ans { background: var(--brand); }
.qz-strip span.is-flag { background: var(--warn-dot); }
.qz-strip span.is-cur { outline: 2px solid var(--ink); outline-offset: 1px; }

/* inline widgets keep a card look */
.quiz { padding: 1rem 1rem 0; }
.quiz > .actions, .quiz > p.fine { margin-bottom: 1rem; }
.quiz .quiz-error { padding-bottom: 1rem; }

/* focus mode (§3.2) */
.quiz-focus body { overflow: hidden; }
.quiz.is-focus { position: fixed; inset: 0; z-index: 50; margin: 0; border: 0; border-radius: 0; max-width: none; box-shadow: none; display: flex; flex-direction: column; background: var(--bg); padding: 0; }
.quiz.is-focus > .qz-top { flex: none; padding: 6px 8px; background: var(--surface); border-bottom: 1px solid var(--line); }
.quiz.is-focus > .qz-progress, .quiz.is-focus > .qz-strip { flex: none; margin: 0; border-radius: 0; }
.quiz.is-focus > .qz-strip { padding: 6px 12px; background: var(--surface); }
.quiz.is-focus > .qz-body { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 16px; }
.quiz.is-focus > .qz-body > * { max-width: 40rem; margin-left: auto; margin-right: auto; }
.quiz.is-focus > .qz-body > .ans-list, .quiz.is-focus > .qz-body > .fb-slot { max-width: 40rem; }
.quiz.is-focus > .q-bar { flex: none; margin: 0; padding-left: 16px; padding-right: 16px; }
.quiz.is-focus > .q-bar > * { max-width: 40rem; margin: 0 auto; }
.quiz.is-focus > .q-bar > .btn { display: flex; }

/* results (§3.5, P0-5, P1-3, P1-4) */
.qz-timeup { font-weight: 700; color: var(--bad); }
.score-wrap { display: flex; align-items: center; gap: 1rem; margin-bottom: .6rem; }
.ring { width: 96px; height: 96px; flex: none; }
.ring-bg { fill: none; stroke: var(--surface-2); stroke-width: 3.6; }
.ring-fg { fill: none; stroke: var(--brand); stroke-width: 3.6; stroke-linecap: round; }
.ring-txt { font: 700 8px var(--sans); fill: var(--ink); }
.score-h { font-size: 1.15rem; margin: 0 0 .2rem; }
.score-line { font-size: 1.35rem; margin: 0; }
.score-line strong { font-size: 1.6rem; }
.theme-bars { list-style: none; padding: 0; margin: .5rem 0 1rem; }
.theme-bars li { display: grid; grid-template-columns: 1fr auto auto; grid-template-areas: "name num link" "bar bar bar"; gap: .1rem .75rem; align-items: center; padding: .35rem 0 .6rem; border-bottom: 1px solid var(--line); margin: 0; }
.tb-name { grid-area: name; font-weight: 600; }
.tb-num { grid-area: num; font-variant-numeric: tabular-nums; color: var(--muted); }
.theme-bars .bar { grid-area: bar; }
.tb-link { grid-area: link; justify-self: end; display: inline-block; padding: .55rem 0; font-weight: 650; }
@media (min-width: 560px) { .theme-bars li { grid-template-columns: 10rem 1fr 3rem 6rem; grid-template-areas: "name bar num link"; align-items: center; } .tb-link { justify-self: end; } }
.res-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0 1.25rem; }
@media (max-width: 559px) { .res-actions .btn { width: 100%; } }
.res-email .signup-box { margin: 0 0 1rem; max-width: none; }
.res-email .signup-box h2 { font-size: 1.25rem; }
.res-share { margin: 0 0 1rem; }
.btn-wa { border-color: #25d366; }
.res-install { background: var(--surface-2); border-radius: 12px; padding: .8rem 1rem; margin-bottom: 1rem; }
.res-install p { margin-bottom: .4rem; font-weight: 600; }
.review-item, .review-more { border: 1px solid var(--line); border-radius: 12px; background: var(--surface); margin: 0 0 .6rem; }
.review-item > summary, .review-more > summary { display: flex; gap: .6rem; align-items: flex-start; padding: .75rem .9rem; cursor: pointer; min-height: 44px; list-style: none; }
.review-item > summary::-webkit-details-marker, .review-more > summary::-webkit-details-marker { display: none; }
.review-more > summary { font-weight: 650; color: var(--link); }
.review-more > .review-item { margin: 0 .6rem .6rem; }
.rv-chip { flex: none; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; font-size: .8rem; font-weight: 700; color: #fff; background: var(--bad); margin-top: .1rem; }
.rv-chip.is-ok { background: var(--ok); }
@media (prefers-color-scheme: dark) { .rv-chip { color: #0b1d20; } }
.rv-q { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-weight: 600; }
.review-item[open] .rv-q { -webkit-line-clamp: unset; display: block; }
.rv-body { padding: 0 .9rem .6rem 2.7rem; }
.quiz .yours { color: var(--bad); }
.quiz .right { color: var(--ok); }
.res-home { margin: 1rem 0 2rem; }

/* sign-up success (P1-1) */
.signup-done { background: var(--surface); border: 2px solid var(--ok); border-radius: 12px; padding: .9rem 1rem; margin-bottom: 1rem; }
.signup-done:focus { outline: 3px solid var(--focus); }
.sd-title { font-weight: 800; font-size: 1.15rem; margin-bottom: .3rem; }

/* toast + dialogs */
.toast { position: fixed; left: 0; right: 0; margin: 0 auto; width: fit-content; bottom: calc(10px + env(safe-area-inset-bottom)); transform: translateY(150%); background: var(--ink); color: var(--bg); padding: .45rem .9rem; border-radius: 999px; font-size: .875rem; font-weight: 600; z-index: 80; max-width: min(21rem, calc(100% - 32px)); text-align: center; opacity: 0; pointer-events: none; box-shadow: 0 4px 14px rgba(0,0,0,.18); }
.toast.is-on { transform: translateY(0); opacity: 1; }
.qz-dialog { border: 0; border-radius: 16px; padding: 1.2rem; max-width: min(28rem, calc(100% - 32px)); background: var(--surface); color: var(--ink); box-shadow: 0 20px 50px rgba(0,0,0,.3); }
.qz-dialog::backdrop { background: rgba(0,0,0,.45); }
.qz-dialog p { font-weight: 600; }
.qz-dialog-actions { display: flex; flex-wrap: wrap; gap: .6rem; justify-content: flex-end; }
.qz-sheet { width: min(30rem, calc(100% - 24px)); }
.qz-grid-head { display: flex; align-items: center; justify-content: space-between; }
.qz-grid-title { margin: 0; }
.qz-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; margin: .6rem 0; }
.grid-cell { min-height: 44px; border: 2px solid var(--opt-line); border-radius: 10px; background: var(--surface); color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.grid-cell.is-ans { background: var(--brand); border-color: var(--brand); color: var(--on-brand); }
.grid-cell.is-flag { border-color: var(--warn-dot); box-shadow: inset 0 0 0 2px var(--warn-dot); }
.grid-cell.is-cur { outline: 3px solid var(--ink); outline-offset: 1px; }
.qz-legend { font-size: .875rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .3rem .8rem; align-items: center; }
.lg { display: inline-block; width: 14px; height: 14px; border-radius: 4px; border: 2px solid var(--opt-line); vertical-align: -2px; margin-right: .25rem; }
.lg-ans { background: var(--brand); border-color: var(--brand); } .lg-flag { border-color: var(--warn-dot); }
.qz-auto { display: flex; align-items: center; gap: .5rem; min-height: 44px; margin-bottom: .6rem; }
.qz-auto input { width: 1.2rem; height: 1.2rem; accent-color: var(--brand); }

/* tables as cards on mobile (P1-7) */
@media (max-width: 719px) {
  table.compare thead, table.stack thead { display: none; }
  table.compare tr, table.stack tr { display: block; border-bottom: 1px solid var(--line); padding: .7rem .8rem; }
  table.compare tr:last-child, table.stack tr:last-child { border-bottom: 0; }
  table.compare td, table.stack td { display: block; border: 0; padding: .2rem 0; }
  table.compare td::before, table.stack td::before { content: attr(data-label); display: block; font-size: .8125rem; font-weight: 700; color: var(--muted); }
  table.compare td:first-child, table.stack td:first-child { font-weight: 700; }
  table.compare td:first-child::before, table.stack td:first-child::before { display: none; }
}

/* early-access sticky bar (P1-12) */
.sticky-buy { position: fixed; left: 0; right: 0; bottom: 0; z-index: 30; display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .6rem 16px calc(.6rem + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line); box-shadow: 0 -6px 18px rgba(0,0,0,.08); }
.sticky-buy[hidden] { display: none; }
.sticky-buy .btn { min-height: 48px; }
@media (min-width: 720px) { .sticky-buy { display: none !important; } }

/* motion (P2-2) */
@media (prefers-reduced-motion: no-preference) {
  .ans, .mode-card, .chip { transition: background-color .15s, border-color .15s; }
  .fb-sheet { animation: tcp-up .2s ease-out; }
  .qz-progress-fill, .bar-fill { transition: width .3s ease-out; }
  .toast { transition: transform .25s ease-out, opacity .25s; }
  @keyframes tcp-up { from { opacity: 0; transform: translateY(8px); } }
}
@media print { .site-header, .sticky-buy { display: none; } }
.teaser .fb-why { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
[hidden] { display: none !important; }
.crumbs li { display: inline-flex; align-items: center; }
.lg-item { white-space: nowrap; }
