/* Quizify website. Layout: variant B "Phone first" (design round 2026-10-21).
   Visual language: the app's own "Soft Parlor" system (Quizify DESIGN.md,
   www/css/src/00-tokens.css): cream paper, coral / sage / sky / sun,
   DM Sans + JetBrains Mono, 6-14 px radii, soft shadows, no gradients on
   buttons, no confetti. No inline styles anywhere, so the CSP can stay
   style-src 'self'. Fonts are self-hosted. */

@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 100 1000; font-display: swap;
  src: url('/fonts/dm-sans-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'DM Sans'; font-style: normal; font-weight: 100 1000; font-display: swap;
  src: url('/fonts/dm-sans-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('/fonts/jetbrains-mono-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'JetBrains Mono'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('/fonts/jetbrains-mono-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+1E00-1E9F, U+2113, U+A720-A7FF; }

:root {
  --bg: #FAF6EC;
  --surface: #FFFFFF;
  --surface-2: #F3EEDF;
  --text: #2A2820;
  --text-2: #3C3930;
  --muted: #6E6A5C;
  --hairline: #E5DFCF;
  --border: #D4CEBC;
  --coral: #E88A7F;
  --coral-ink: #B9574B;      /* coral dark enough for small text on cream */
  --coral-hover: #D97568;
  --sage: #7FA897;
  --sage-ink: #4F7A68;
  --sky: #7FA8C4;
  --sun: #E8C47F;
  --mauve: #B78FC7;
  --error: #D66A6A;
  --coral-wash: rgba(232, 138, 127, 0.14);
  --sage-wash: rgba(127, 168, 151, 0.18);
  --sky-wash: rgba(127, 168, 151, 0.0);
  --sun-wash: rgba(232, 196, 127, 0.24);
  --clay-wash: rgba(110, 106, 92, 0.10);
  --shadow-sm: 0 1px 2px rgba(42, 40, 32, 0.06);
  --shadow-md: 0 2px 8px rgba(42, 40, 32, 0.08);
  --shadow-lg: 0 6px 20px rgba(42, 40, 32, 0.10);
  --shadow-xl: 0 16px 40px rgba(42, 40, 32, 0.14);
  --shadow-coral: 0 4px 12px rgba(232, 138, 127, 0.28);
  --r-sm: 6px; --r-md: 10px; --r-lg: 12px; --r-xl: 14px;
  --font: 'DM Sans', ui-sans-serif, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;
  --wrap: 1200px;
  --gutter: 16px;
  color-scheme: light;
}
@media (min-width: 720px) { :root { --gutter: 32px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { margin: 0; line-height: 1.1; letter-spacing: -0.02em; text-wrap: balance; }
h1 { font-weight: 800; font-size: clamp(36px, 8.6vw, 64px); letter-spacing: -0.035em; }
h2 { font-weight: 800; font-size: clamp(28px, 6vw, 44px); letter-spacing: -0.03em; }
h3 { font-weight: 700; font-size: 19px; }
h1 .num, h2 .num { font-family: inherit; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

.skip { position: absolute; left: -9999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: var(--r-md); z-index: 50; }
.skip:focus { left: 8px; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }

/* Soft Parlor page glows: coral top-right, sky bottom-left, 6–10 %. */
.glow { position: relative; isolation: isolate; }
.glow::before, .glow::after { content: ""; position: absolute; z-index: -1; pointer-events: none; border-radius: 50%; }
.glow::before { width: 640px; height: 640px; right: -260px; top: -220px; background: radial-gradient(closest-side, rgba(232, 138, 127, 0.16), transparent); }
.glow::after { width: 560px; height: 560px; left: -240px; bottom: -220px; background: radial-gradient(closest-side, rgba(127, 168, 196, 0.14), transparent); }
.glow-wrap { overflow: hidden; }

/* ---------- Header ---------- */
.top { position: sticky; top: 0; z-index: 20; background: rgba(250, 246, 236, 0.92); border-bottom: 1px solid var(--hairline); }
@supports (backdrop-filter: blur(8px)) { .top { backdrop-filter: blur(8px); background: rgba(250, 246, 236, 0.8); } }
.top .wrap { display: flex; align-items: center; gap: 16px; min-height: 60px; }
.wordmark { font-weight: 800; font-size: 26px; letter-spacing: -0.04em; text-decoration: none; color: var(--text); line-height: 1; }
.wordmark b { font-weight: 800; color: var(--coral); }
.nav { display: none; gap: 22px; margin-left: auto; font-size: 15px; font-weight: 500; }
.nav a { text-decoration: none; color: var(--text-2); }
.nav a:hover { color: var(--coral-ink); }
.top .btn { margin-left: auto; }
@media (min-width: 900px) {
  .nav { display: flex; }
  .top .btn { margin-left: 0; }
}

/* ---------- Type helpers ---------- */
.eyebrow { font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: var(--coral-ink); }
.eyebrow.muted { color: var(--muted); }
.eyebrow.rule { display: inline-block; padding-bottom: 6px; border-bottom: 1px solid var(--coral); }
.lead { font-size: 18px; color: var(--muted); max-width: 60ch; }
.deck { font-size: clamp(18px, 2.4vw, 21px); color: var(--text-2); max-width: 52ch; }
.coral { color: var(--coral); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }

.sec { padding: 64px 0; }
@media (min-width: 900px) { .sec { padding: 96px 0; } }
.sec-head { display: grid; gap: 12px; margin-bottom: 32px; max-width: 760px; }
.sec-head.center { margin-left: auto; margin-right: auto; text-align: center; justify-items: center; }
.alt { background: var(--surface-2); border-top: 1px solid var(--hairline); border-bottom: 1px solid var(--hairline); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px;
  border-radius: var(--r-md); font-weight: 700; font-size: 16px; text-decoration: none; white-space: nowrap;
  transition: transform 120ms ease-out, box-shadow 120ms ease-out, background 120ms ease-out; }
.btn:hover { transform: translateY(-1px); }
.btn-primary { background: var(--coral); color: #fff; box-shadow: var(--shadow-coral); }
.btn-primary:hover { background: var(--coral-hover); }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--hairline); box-shadow: var(--shadow-sm); }
.btn-sm { min-height: 40px; padding: 8px 16px; font-size: 15px; }
.btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* Star on GitHub: count is static, written by scripts/build-packs.py at build time (no third-party widget, CSP stays strict) */
.btn-star .star, .foot-star .star { color: var(--sun); }
.btn-star:hover .star, .foot-star:hover .star { fill: var(--sun); }
.star-count { font-family: var(--mono); font-size: 13px; font-weight: 500; color: var(--muted); padding: 2px 8px; margin-left: 2px; border-radius: 999px; background: var(--clay-wash); }
.foot-star { display: inline-flex; align-items: center; gap: 6px; }
.foot-star svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.foot-star .star-count { font-size: 12px; padding: 1px 7px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
@media (max-width: 420px) { .cta-row .btn { flex: 1 1 100%; } }

/* Fact pills under the hero (all checkable facts, no invented stats) */
.facts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.facts li { font-size: 14px; font-weight: 500; padding: 6px 12px; border-radius: 9999px; background: var(--surface); border: 1px solid var(--hairline); color: var(--text-2); }
.facts li b { font-family: var(--mono); font-weight: 600; }

/* ---------- Cards ---------- */
.card { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-lg); box-shadow: var(--shadow-md); }

/* ---------- Duotone icon disc (app: .qz-icon) ---------- */
.qz { flex: none; display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r-lg); }
.qz svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.qz svg .d { fill: currentColor; stroke: none; }
.qz--coral { background: var(--coral-wash); color: #C9685C; }
.qz--sage { background: var(--sage-wash); color: #5E8A77; }
.qz--sky { background: rgba(127, 168, 196, 0.20); color: #5C88A6; }
.qz--sun { background: var(--sun-wash); color: #B48A3E; }
.qz--mauve { background: rgba(183, 143, 199, 0.20); color: #8E68A0; }
.qz--mix { background: var(--clay-wash); color: var(--muted); }
.qz-sm { width: 36px; height: 36px; border-radius: var(--r-md); }
.qz-sm svg { width: 20px; height: 20px; }

/* ---------- Device frames ---------- */
.phone { position: relative; width: 100%; max-width: 280px; border-radius: 34px; padding: 9px; background: #2A2820;
  box-shadow: var(--shadow-xl); }
.phone img { border-radius: 26px; width: 100%; aspect-ratio: 1 / 2; object-fit: cover; object-position: top; background: var(--bg); }
.tv { position: relative; }
.tv-screen { border-radius: var(--r-xl); padding: 10px; background: #2A2820; box-shadow: var(--shadow-xl); }
.tv-screen img { border-radius: 6px; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: var(--bg); }
.tv-stand { width: 22%; height: 14px; margin: 0 auto; background: linear-gradient(#3C3930, #2A2820); border-radius: 0 0 6px 6px; }
.tv-foot { width: 34%; height: 6px; margin: 0 auto; background: #3C3930; border-radius: 6px; }

/* ---------- Answer-tile list (the app's A/B/C tiles) ---------- */
.tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.tile { display: flex; gap: 14px; align-items: flex-start; padding: 18px; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-md); box-shadow: var(--shadow-sm); }
.tile .ltr { flex: none; font-family: var(--mono); font-weight: 600; font-size: 20px; color: var(--coral); line-height: 1.2; width: 22px; }
.tile h3 { margin-bottom: 4px; }
.tile p { color: var(--muted); }
.tile.is-correct { background: #EEF2EA; border-color: var(--sage); }
.tile.is-correct .ltr { color: var(--sage-ink); }

/* Steps */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; counter-reset: s; }
.step { padding: 22px; display: grid; gap: 10px; align-content: start; }
.step-n { font-family: var(--mono); font-weight: 600; font-size: 13px; letter-spacing: 0.2em; color: var(--coral-ink); }
.step p { color: var(--muted); }
@media (min-width: 900px) { .steps { grid-template-columns: repeat(3, 1fr); gap: 24px; } }

/* ---------- Modes / power-ups ---------- */
.pu-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; grid-template-columns: 1fr; }
.pu { display: flex; gap: 14px; padding: 16px; align-items: flex-start; }
.pu h3 { font-size: 17px; margin-bottom: 2px; }
.pu p { color: var(--muted); font-size: 15px; }
@media (min-width: 600px) { .pu-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .pu-grid.five { grid-template-columns: repeat(5, 1fr); } .pu-grid.five .pu { flex-direction: column; } }

.mode-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
@media (min-width: 720px) { .mode-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .mode-grid.three { grid-template-columns: repeat(3, 1fr); } }
.mode { padding: 22px; display: grid; gap: 8px; align-content: start; }
.mode .k { font-family: var(--mono); font-size: 12px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--muted); }
.mode p { color: var(--muted); }
.mode .big { font-family: var(--mono); font-weight: 700; font-size: 34px; line-height: 1; color: var(--coral); }
.mode .big.sage { color: var(--sage-ink); }
.mode .big.sky { color: #5C88A6; }
.mode .big.sun { color: #B48A3E; }
.sub-h { margin: 40px 0 16px; font-size: 22px; }

/* ---------- Pack library ---------- */
.pack-total { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: baseline; margin: 0 0 24px; color: var(--muted); }
.pack-total b { font-family: var(--mono); color: var(--text); font-weight: 700; }
.lang-flag { display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 6px; border-radius: var(--r-sm); font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.08em; }
.lang-de { background: var(--coral-wash); color: #A9544A; }
.lang-en { background: rgba(127, 168, 196, 0.22); color: #4D7895; }
.lang-es { background: var(--sun-wash); color: #8F6A25; }
.season { display: inline-block; font-family: var(--mono); font-size: 11px; letter-spacing: 0.06em; padding: 2px 8px; border-radius: 9999px; background: var(--sun-wash); color: #7E5D1E; white-space: nowrap; }

/* Pack card (app: category tile — icon disc, display name, mono count) */
.pk { display: flex; gap: 12px; align-items: center; padding: 12px; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-md); box-shadow: var(--shadow-sm); min-width: 0; }
.pk-name { font-weight: 700; font-size: 15px; line-height: 1.25; overflow-wrap: anywhere; }
.pk-meta { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.pk-body { display: grid; gap: 2px; min-width: 0; }

/* ---------- Install ---------- */
.install { display: grid; gap: 16px; }
@media (min-width: 900px) { .install { grid-template-columns: 1.1fr 0.9fr; gap: 24px; } }
.install-col { min-width: 0; padding: 24px; display: grid; gap: 16px; align-content: start; }
.path { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.path li { display: flex; align-items: center; gap: 6px; }
.path li + li::before { content: "\203A"; color: var(--muted); }
.path span { padding: 5px 10px; border-radius: var(--r-sm); background: var(--surface-2); border: 1px solid var(--hairline); font-size: 14px; }
.path span.hi { background: var(--coral-wash); border-color: rgba(232, 138, 127, 0.5); font-weight: 600; }
.path code, .code { font-family: var(--mono); font-size: 13px; }
.first { margin: 0; padding: 0; list-style: none; display: grid; gap: 12px; counter-reset: f; }
.first li { display: flex; gap: 12px; counter-increment: f; }
.first li::before { content: counter(f); flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--coral); color: #fff; font-family: var(--mono); font-size: 13px; font-weight: 700; }
.help { font-size: 14px; color: var(--muted); }
.code { display: block; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--hairline); border-radius: var(--r-sm); overflow-wrap: anywhere; }

/* ---------- FAQ ---------- */
.faq-list { display: grid; gap: 10px; max-width: 820px; }
.faq { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--r-md); box-shadow: var(--shadow-sm); }
.faq summary { cursor: pointer; list-style: none; padding: 16px 48px 16px 18px; font-weight: 700; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-family: var(--mono); font-size: 20px; color: var(--coral); }
.faq[open] summary::after { content: "\2212"; }
.faq-a { padding: 0 18px 18px; color: var(--text-2); }
.faq-a code { font-family: var(--mono); font-size: 14px; overflow-wrap: anywhere; }
.faq-a p + p { margin-top: 8px; }

/* ---------- Footer ---------- */
.foot { border-top: 1px solid var(--hairline); padding: 32px 0 40px; font-size: 15px; color: var(--muted); }
.foot .wrap { display: flex; flex-wrap: wrap; gap: 12px 24px; align-items: center; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--coral-ink); }
.foot .wordmark { font-size: 22px; margin-right: auto; }

/* Legal page */
.legal { padding: 48px 0 80px; }
.legal .wrap { max-width: 760px; display: grid; gap: 16px; }
.legal h2 { font-size: 22px; margin-top: 16px; }
.legal p { color: var(--text-2); }

/* ---- Phone-first layout (variant B) ---- */

.b-hero { padding: 40px 0 56px; }
.b-hero-in { display: grid; gap: 40px; align-items: center; }
.b-copy { display: grid; gap: 20px; justify-items: start; }
@media (min-width: 900px) {
  .b-hero { padding: 72px 0 96px; }
  .b-hero-in { grid-template-columns: 1.2fr 0.8fr; gap: 56px; }
}

.b-phone-wrap { display: grid; justify-items: center; gap: 16px; }
.b-phone { max-width: 270px; display: grid; }
.b-phone .b-shot { grid-area: 1 / 1; opacity: 0; transition: opacity 400ms ease-in-out; }
.b-phone .b-shot.is-on { opacity: 1; }
html:not(.js) .b-phone .b-shot { opacity: 0; }
html:not(.js) .b-phone .b-shot:first-child { opacity: 1; }
.b-dots { list-style: none; margin: 0; padding: 0; display: flex; gap: 6px; flex-wrap: wrap; justify-content: center; }
.b-dots li { font-family: var(--mono); font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase; padding: 4px 10px; border-radius: 9999px; color: var(--muted); border: 1px solid var(--hairline); background: var(--surface); }
.b-dots li.is-on { color: #fff; background: var(--coral); border-color: var(--coral); }

.b-steps .step { grid-template-columns: 1fr 96px; gap: 16px; align-items: start; }
.b-step-t { display: grid; gap: 10px; }
.b-mini { padding: 4px; border-radius: 16px; box-shadow: var(--shadow-lg); }
.b-mini img { border-radius: 12px; }
@media (min-width: 900px) {
  .b-steps .step { grid-template-columns: 1fr; }
  .b-mini { max-width: 180px; justify-self: center; padding: 6px; border-radius: 24px; }
  .b-mini img { border-radius: 18px; }
}

.mode-top { display: flex; align-items: center; gap: 10px; }
.b-finale { margin-top: 24px; padding: 16px 18px; border-left: 3px solid var(--sun); background: var(--surface); border-radius: 0 var(--r-md) var(--r-md) 0; color: var(--text-2); max-width: 820px; }

.b-tv-grid { display: grid; gap: 24px; align-items: center; }
@media (min-width: 900px) { .b-tv-grid { grid-template-columns: 0.8fr 1.2fr; gap: 48px; } .b-tv-grid .sec-head { margin-bottom: 0; } }

/* Library: language tabs (JS) or three stacked groups (no JS) */
.b-tabs { display: flex; gap: 8px; margin-bottom: 20px; flex-wrap: wrap; }
.b-tabs[hidden] { display: none; }
.b-tab { font: inherit; font-weight: 600; font-size: 15px; min-height: 44px; padding: 8px 16px; border-radius: var(--r-md); border: 1px solid var(--hairline); background: var(--surface); color: var(--text-2); cursor: pointer; }
.b-tab .num { color: var(--muted); font-size: 13px; margin-left: 4px; }
.b-tab[aria-selected="true"] { border-color: var(--coral); background: var(--coral-wash); color: var(--text); }
.b-panel + .b-panel { margin-top: 32px; }
.js .b-panel + .b-panel { margin-top: 0; }
.b-panel[hidden] { display: none; }
.b-panel-h { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 17px; margin-bottom: 14px; color: var(--text-2); }
.b-grid { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; grid-template-columns: 1fr 1fr; }
.b-grid .pk { align-items: flex-start; }
.b-grid .season { justify-self: start; margin-top: 4px; }
@media (max-width: 380px) { .b-grid .pk { flex-direction: column; } }
@media (min-width: 720px) { .b-grid { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1100px) { .b-grid { grid-template-columns: repeat(4, 1fr); } }

/* ---- Legal and 404 pages ---- */
.legal-date { color: var(--muted); font-size: 14px; margin-top: 16px; }
.nf { padding: 72px 0 96px; }
.nf .wrap { display: grid; gap: 16px; justify-items: start; max-width: 760px; }
.nf-code { font-family: var(--mono); font-size: clamp(64px, 18vw, 120px); font-weight: 700; line-height: 1; color: var(--coral); letter-spacing: -0.02em; }
