:root {
  --paper: #fff7ec;
  --card: #ffffff;
  --ink: #1b1a17;
  --ink-2: #4a463f;
  --muted: #6b655b;
  --line: #eadfce;
  --hot: #ff5a36;
  --hot-dark: #d93f1d;
  --blue: #2b59ff;
  --display: 'Bricolage Grotesque', 'Avenir Next', system-ui, sans-serif;
  --body: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --radius: 22px;
  --accent: var(--hot);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--paper); }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: 17px; line-height: 1.5; overflow-x: hidden; }
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; border-radius: 8px; }
h1, h2, h3 { font-family: var(--display); margin: 0; line-height: 1.08; letter-spacing: -0.02em; }
p { margin: 0; }
[hidden] { display: none !important; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 28px; } }

/* Header */
.top { position: sticky; top: 0; z-index: 5; background: rgba(255, 247, 236, 0.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--line); }
.top-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; height: 58px; }
.mark { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 20px; letter-spacing: -0.02em; white-space: nowrap; }
.mark svg { width: 30px; height: 30px; flex: none; }
.top-nav { display: flex; gap: 4px; }
.top-nav a { font-weight: 600; font-size: 15px; text-decoration: none; padding: 8px 10px; border-radius: 999px; white-space: nowrap; }
.top-nav a:hover { background: var(--line); }
@media (max-width: 440px) { .top-nav a:first-child { display: none; } }

/* Hero and feature */
.hero { padding: 22px 0 16px; }
.hero h1 { font-size: clamp(34px, 7vw, 60px); font-weight: 800; max-width: 17ch; }
.hero h1 em { font-style: normal; color: var(--hot); }
.hero p { margin-top: 10px; font-size: 17px; color: var(--ink-2); max-width: 46ch; }
.hero-sm h1 { font-size: clamp(32px, 6vw, 52px); }

.feature { display: grid; background: var(--card); border-radius: var(--radius); overflow: hidden; text-decoration: none; box-shadow: 0 1px 0 var(--line), 0 8px 24px rgba(60, 40, 10, 0.08); margin-bottom: 30px; }
.feature .art { aspect-ratio: 3 / 2; max-height: 300px; overflow: hidden; background: var(--line); }
.feature .art img { width: 100%; height: 100%; object-fit: cover; }
.feature .body { padding: 18px 18px 20px; display: grid; gap: 8px; justify-items: start; }
.feature h2 { font-size: clamp(28px, 5vw, 44px); font-weight: 800; }
.feature .blurb { color: var(--ink-2); }
.feature .btn { margin-top: 6px; width: 100%; }
@media (min-width: 820px) {
  .feature { grid-template-columns: 1.2fr 1fr; align-items: center; }
  .feature .art { max-height: none; height: 100%; }
  .feature .body { padding: 34px 36px; }
  .feature .btn { width: auto; }
}
.kicker { font: 700 13px/1.2 var(--body); text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent); }

/* Shelves: a swipeable row on phones, a grid on wider screens */
.shelf { margin: 0 0 34px; }
.shelf-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.shelf h2 { font-size: clamp(24px, 4vw, 32px); font-weight: 800; }
.shelf-sub { color: var(--ink-2); margin: -4px 0 12px; }
.see-all { font-weight: 600; font-size: 15px; white-space: nowrap; }
.row { display: grid; grid-auto-flow: column; grid-auto-columns: 74%; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 2px 16px 10px; margin: 0 -16px; scrollbar-width: none; }
.row::-webkit-scrollbar { display: none; }
.row > * { scroll-snap-align: start; }
@media (min-width: 640px) { .row { grid-auto-columns: 44%; } }
@media (min-width: 980px) { .row { grid-auto-flow: row; grid-template-columns: repeat(4, 1fr); overflow: visible; padding: 0; margin: 0; } .row-tight { grid-template-columns: repeat(3, 1fr); } }
.grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding-bottom: 20px; }
@media (min-width: 760px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 20px; } }
@media (min-width: 1040px) { .grid { grid-template-columns: repeat(4, 1fr); } }

.card { position: relative; display: flex; flex-direction: column; background: var(--card); border-radius: 18px; overflow: hidden; text-decoration: none; box-shadow: 0 1px 0 var(--line), 0 6px 18px rgba(60, 40, 10, 0.06); transition: transform 0.15s ease, box-shadow 0.15s ease; }
.card:hover { transform: translateY(-3px); box-shadow: 0 1px 0 var(--line), 0 14px 30px rgba(60, 40, 10, 0.12); }
@media (prefers-reduced-motion: reduce) { .card, .card:hover { transition: none; transform: none; } }
.card .art { aspect-ratio: 3 / 2; background: var(--line); overflow: hidden; }
.card .art img { width: 100%; height: 100%; object-fit: cover; }
.card .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 4px; flex: 1; }
.card h3 { font-size: 19px; font-weight: 800; }
.card .blurb { color: var(--ink-2); font-size: 15px; line-height: 1.4; }
.grid .card .blurb { display: none; }
@media (min-width: 760px) { .grid .card .blurb { display: block; } .card h3 { font-size: 21px; } }
.meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: auto; padding-top: 4px; font-size: 13px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.badge { background: var(--hot); color: #fff; border-radius: 999px; padding: 3px 10px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.card .badge { position: absolute; top: 10px; left: 10px; }

/* All quizzes list */
.all { margin: 10px 0 40px; }
.all h2 { font-size: clamp(24px, 4vw, 32px); font-weight: 800; margin-bottom: 12px; }
.all-list { list-style: none; padding: 0; margin: 0; columns: 1; }
@media (min-width: 760px) { .all-list { columns: 2; column-gap: 40px; } }
.all-list li { break-inside: avoid; padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; }
.all-list a { font-weight: 600; text-decoration: none; }
.all-list a:hover { text-decoration: underline; }
.all-list span { color: var(--muted); font-size: 14px; white-space: nowrap; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; padding: 0 26px; border-radius: 999px; border: 0; font: 700 18px/1 var(--body); text-decoration: none; cursor: pointer; }
.btn-hot { background: var(--hot); color: #fff; box-shadow: 0 4px 0 var(--hot-dark); }
.btn-hot:hover { background: var(--hot-dark); }
.btn-wide { width: 100%; margin-top: 22px; }
@media (min-width: 640px) { .btn-wide { width: auto; } }

/* Breadcrumbs */
.crumbs { padding: 14px 0 0; font-size: 14px; color: var(--muted); }
.crumbs a { color: var(--muted); }

/* Quiz page */
.quiz-wrap { max-width: 820px; }
.quiz { padding: 8px 0 30px; }
.quiz-head h1 { font-size: clamp(28px, 6vw, 46px); font-weight: 800; }
.quiz-head .meta { margin-top: 8px; }
.embed-box { margin-top: 16px; border: 2px solid var(--ink); border-radius: var(--radius); overflow: hidden; background: var(--paper); box-shadow: 0 4px 0 var(--ink); min-height: 300px; }
.embed-box iframe { display: block; }
.embed-fallback { margin-top: 12px; font-size: 15px; color: var(--muted); }
.embed-fallback a { color: var(--muted); }

.after { margin-top: 26px; padding: 22px 18px; background: var(--card); border-radius: var(--radius); box-shadow: 0 1px 0 var(--line), 0 8px 24px rgba(60, 40, 10, 0.08); }
.after:focus { outline: none; }
.after h2 { font-size: 26px; font-weight: 800; }
.after-sub { color: var(--ink-2); margin-top: 4px; }
.after-next { margin: 26px 0 12px; }
.after .row { margin: 0 -18px; padding-left: 18px; padding-right: 18px; }
@media (min-width: 980px) { .after .row { margin: 0; padding: 0; } }
.chips { list-style: none; padding: 0; margin: 14px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--ink); background: var(--paper); font-weight: 600; text-decoration: none; }
.chips a:hover { background: var(--ink); color: var(--paper); }

.make { margin-top: 26px; background: var(--ink); color: var(--paper); border-radius: 18px; padding: 22px 20px; display: grid; gap: 10px; justify-items: start; }
.make h2 { font-size: 24px; color: var(--paper); }
.make p { color: #d8cfc2; max-width: 56ch; }
.make .btn { margin-top: 6px; }
@media (max-width: 520px) { .make .btn { width: 100%; } }

.about { margin-top: 34px; }
.about h2 { font-size: 26px; font-weight: 800; margin-bottom: 10px; }
.about h3 { font-size: 21px; font-weight: 800; margin: 26px 0 10px; }
.about > p { color: var(--ink-2); max-width: 64ch; }
.about > p + p { margin-top: 12px; }
.result-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
@media (min-width: 640px) { .result-list { grid-template-columns: 1fr 1fr; } }
.result-list a { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; background: var(--card); border-radius: 14px; text-decoration: none; border: 1px solid var(--line); height: 100%; }
.result-list a:hover { border-color: var(--ink); }
.result-list .emo { font-size: 28px; line-height: 1; padding-top: 2px; }
.result-list span { font-size: 15px; color: var(--ink-2); }
.result-list strong { color: var(--ink); font-size: 16px; }
.wyr { margin: 0; padding-left: 26px; color: var(--ink-2); display: grid; gap: 8px; }

.share-row { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.share-row p { flex-basis: 100%; font-weight: 600; }
.share-btn { min-height: 44px; padding: 0 16px; border-radius: 999px; border: 2px solid var(--ink); background: transparent; font: 600 15px/1 var(--body); color: var(--ink); cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; }
.share-btn:hover { background: var(--ink); color: var(--paper); }
.status { flex-basis: 100%; font-size: 14px; color: var(--muted); min-height: 1.4em; overflow-wrap: anywhere; }
.more { margin-top: 10px; }

/* Result page */
.result-wrap { max-width: 820px; }
.result { padding: 14px 0 26px; }
.result-card { width: 100%; border-radius: 18px; box-shadow: 0 8px 24px rgba(60, 40, 10, 0.12); }
.result .kicker { margin-top: 22px; }
.result h1 { font-size: clamp(34px, 7vw, 56px); font-weight: 800; margin-top: 6px; }
.result .lede { font-size: 20px; font-weight: 600; margin: 10px 0 12px; }
.result p { color: var(--ink-2); max-width: 64ch; }
.result .pair { margin-top: 14px; }
.others-h { font-size: 22px; font-weight: 800; margin-top: 30px; }

/* Text pages */
.page { max-width: 720px; padding: 36px 16px 48px; }
.page h1 { font-size: clamp(34px, 6vw, 52px); font-weight: 800; margin-bottom: 18px; }
.page h2 { font-size: 24px; font-weight: 800; margin: 28px 0 8px; }
.page p, .page li { color: var(--ink-2); }
.page p + p { margin-top: 12px; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 24px 0 40px; font-size: 15px; color: var(--muted); }
.foot-cats { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-bottom: 14px; }
.foot-cats a { font-weight: 600; color: var(--ink); }
.foot-row { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; }
.foot a { color: var(--ink); }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 18px; }

@media (min-width: 980px) { .shelf .row > :nth-child(n+5) { display: none; } }
