/* Trope Deck: cool paper, ink outlines with hard drop shadows, a volt highlight, one accent per quiz
   (--tone, set inline by the templates). Phone layout first; the wide layout starts at 900px. */
:root {
  --paper: #eef0f6;
  --card: #ffffff;
  --ink: #161827;
  --copy: #33374a;
  --dim: #555a6e;
  --line: #c5cad9;
  --volt: #c8f03c;
  --tone: var(--ink);
  --display: "Bricolage Grotesque", "Arial Narrow", sans-serif;
  --text: "Figtree", system-ui, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --edge: 1.5px solid var(--ink);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 16px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.5 var(--text); }
img, svg { max-width: 100%; }
a { color: var(--ink); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 800; line-height: 1.14; letter-spacing: -0.015em; }
h2 { font-weight: 700; }
p { margin: 0 0 16px; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 2px; }
.shell { width: min(100% - 32px, 1120px); margin-inline: auto; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; z-index: 5; padding: 8px 12px; border: var(--edge); border-radius: 10px; background: var(--volt); }
.num { font-family: var(--mono); font-weight: 700; }
.eyebrow { margin: 0 0 8px; color: var(--tone); font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.lede { color: var(--dim); text-wrap: pretty; }
.volt { padding: 0 0.16em; border-radius: 8px; background: var(--volt); -webkit-box-decoration-break: clone; box-decoration-break: clone; }

/* buttons: ink outline, hard shadow, pressed state moves onto the shadow */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 22px; border: var(--edge); border-radius: 14px; font: 700 16px/1.2 var(--text); text-align: center; text-decoration: none; cursor: pointer; transition: transform 120ms, box-shadow 120ms; }
.btn-ink { background: var(--ink); color: #ffffff; box-shadow: 0 4px 0 var(--dim); }
.btn-tone { background: var(--tone); color: #ffffff; box-shadow: 0 4px 0 var(--ink); }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }

/* card marks */
.sigil { display: block; flex: none; }
.sigil-rim { fill: none; stroke: currentColor; stroke-width: 2.5; stroke-linejoin: round; }
.sigil-mid { fill: none; stroke: currentColor; stroke-opacity: 0.45; stroke-width: 1.5; }
.sigil-body { fill: currentColor; fill-opacity: 0.92; }
.sigil-dot { fill: var(--volt); stroke: var(--ink); stroke-width: 1.5; }

/* top bar */
.bar-in { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; }
.logo { display: inline-flex; align-items: center; gap: 8px; font: 800 19px/1 var(--display); letter-spacing: -0.01em; text-decoration: none; }
.logo img { display: block; width: 32px; height: 32px; border: var(--edge); border-radius: 8px; }
.bar-nav { display: flex; gap: 4px; font-size: 14px; font-weight: 600; }
.bar-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 8px; text-decoration: none; }
.bar-nav a:hover { text-decoration: underline; }

/* home: title, the three quiz cards, then the lede and the start button */
.hero { display: grid; gap: 16px; padding: 12px 0 28px; }
.hero h1 { font-size: 30px; line-height: 1.16; }
.hero-more .lede { margin-bottom: 18px; }
.hero-more .btn { width: 100%; }
.hand { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.trope { display: grid; grid-template-columns: 60px 1fr; grid-template-areas: "mark top" "mark text"; align-items: center; column-gap: 14px; min-height: 84px; padding: 10px 14px; border: var(--edge); border-radius: 16px; background: var(--tone); color: #ffffff; text-decoration: none; box-shadow: 0 4px 0 var(--ink); transition: transform 150ms; }
.trope .sigil { grid-area: mark; width: 60px; height: 60px; }
.trope-top { grid-area: top; display: flex; justify-content: space-between; gap: 8px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.trope-text { grid-area: text; display: flex; flex-direction: column; }
.trope-text strong { font: 700 19px/1.2 var(--display); }
.trope-meta { font-size: 13px; }

/* home: catalog groups */
.shelf { display: flex; flex-wrap: wrap; gap: 32px 24px; padding: 20px 0 24px; }
.shelf-group { flex: var(--n, 1) 1 calc(var(--n, 1) * 300px); display: flex; flex-direction: column; min-width: 0; }
.shelf-head h2 { font: 700 14px/1.4 var(--text); letter-spacing: 0.08em; text-transform: uppercase; }
.shelf-head p { margin: 2px 0 14px; color: var(--dim); font-size: 15px; }
.shelf-row { flex: 1; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 24px; }
.tile { display: flex; flex-direction: column; overflow: hidden; border: var(--edge); border-radius: 20px; background: var(--card); box-shadow: 0 5px 0 var(--ink); }
.tile-face { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; border-bottom: var(--edge); background: var(--tone); color: #ffffff; }
.tile-face p { display: flex; flex-direction: column; gap: 4px; margin: 0; font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.tile-face .num { font-size: 26px; letter-spacing: 0; }
.tile-face .sigil { width: 84px; height: 84px; }
.tile-body { flex: 1; display: flex; flex-direction: column; padding: 18px 20px 22px; }
.tile h3 { font-size: 22px; font-weight: 700; }
.tile h3 a { text-decoration: none; }
.tile h3 a:hover { text-decoration: underline; }
.tile-blurb { margin: 8px 0 0; color: var(--dim); font-size: 15px; }
.tile-types { margin: 12px 0 0; font-size: 13px; font-weight: 600; }
.tile-meta { margin: 6px 0 18px; color: var(--dim); font-size: 13px; }
.tile .btn { margin-top: auto; }

/* home: four steps */
.steps { padding: 24px 0 40px; }
.steps h2, .faq h2, .cast h2, .more h2, .kin h2 { font-size: 24px; }
.steps-row { list-style: none; counter-reset: step; margin: 18px 0 0; padding: 0; display: grid; gap: 16px; }
.steps-row li { counter-increment: step; display: grid; grid-template-columns: 40px 1fr; column-gap: 14px; }
.steps-row li::before { content: counter(step); grid-row: span 2; display: grid; place-items: center; width: 40px; height: 40px; border: var(--edge); border-radius: 11px; background: var(--volt); font: 700 18px/1 var(--mono); box-shadow: 0 3px 0 var(--ink); }
.steps-row strong { font-size: 17px; }
.steps-row span { color: var(--dim); font-size: 15px; }

/* long copy on a white sheet; the list of sections sits beside it on wide screens (theme script) */
.sheet { padding: 32px 0 40px; border-block: var(--edge); background: var(--card); }
.toc { display: none; }
.toc p { margin: 0 0 8px; color: var(--dim); font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.toc ol { list-style: none; margin: 0; padding: 0; }
.toc a { display: flex; align-items: center; min-height: 40px; padding: 4px 0 4px 12px; border-left: 2px solid var(--line); font-size: 15px; font-weight: 600; line-height: 1.3; text-decoration: none; }
.toc a:hover { border-left-color: var(--ink); }
.prose { max-width: 720px; color: var(--copy); }
.prose h2 { margin: 36px 0 12px; color: var(--ink); font-size: 24px; scroll-margin-top: 16px; }
.prose > h2:first-child { margin-top: 0; }
.prose h3 { margin: 24px 0 8px; color: var(--ink); font-size: 19px; font-weight: 700; }
.prose p, .prose li { line-height: 1.65; }
.prose ul, .prose ol { margin: 0 0 16px; padding-left: 22px; }
.prose li + li { margin-top: 6px; }
.prose strong { color: var(--ink); }
.prose a { font-weight: 600; text-decoration-color: var(--tone); text-decoration-thickness: 2px; }
.prose table { width: 100%; margin: 0 0 16px; border: var(--edge); border-radius: 12px; border-collapse: separate; border-spacing: 0; overflow: hidden; font-size: 15px; }
.prose th, .prose td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.prose th { background: var(--paper); color: var(--ink); }
.prose tr:last-child td { border-bottom: 0; }
.prose-go { margin: 24px 0 0; }
.plate { margin: 24px 0; }
.plate img { display: block; width: 100%; height: auto; border: var(--edge); border-radius: 16px; box-shadow: 0 5px 0 var(--ink); }

/* questions and answers */
.faq { padding: 40px 0 16px; }
.faq-grid { display: grid; gap: 14px; margin: 18px 0 0; }
.faq-grid div { padding: 16px 18px; border: var(--edge); border-radius: 14px; background: var(--card); box-shadow: 0 3px 0 var(--ink); }
.faq-grid dt { font-size: 17px; font-weight: 700; }
.faq-grid dd { margin: 6px 0 0; color: var(--dim); }

/* quiz page: compact header that folds away while answering, then the tool */
.play-head { display: grid; gap: 8px; padding: 8px 0 12px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; color: var(--dim); font-size: 14px; }
.crumbs a { color: var(--dim); }
.play-head h1 { font-size: 24px; line-height: 1.2; }
.pills { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; font-size: 13px; font-weight: 700; }
.pills li { padding: 3px 10px; border: var(--edge); border-radius: 999px; background: var(--card); }
[data-qz-focus] [data-qz-head] { display: none; }
.stage-tool, .stage-lede, .cheer { max-width: 880px; margin-inline: auto; }
.stage-lede { margin-top: 22px; margin-bottom: 0; color: var(--dim); text-wrap: pretty; }
.cheer { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 14px; }
.chip { min-height: 44px; padding: 0 16px; border: var(--edge); border-radius: 999px; background: var(--card); color: var(--ink); font: 700 14px/1 var(--text); cursor: pointer; box-shadow: 0 3px 0 var(--ink); }
.chip:active { transform: translateY(2px); box-shadow: 0 1px 0 var(--ink); }
.cheer-msg { color: var(--dim); font-size: 14px; }

/* quiz page: one small card per result type */
.cast { padding: 40px 0; }
.cast-lede { max-width: 720px; margin: 8px 0 0; color: var(--dim); }
.cast-row { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.mini { display: flex; flex-direction: column; padding: 14px 16px 16px; border: var(--edge); border-radius: 16px; background: var(--card); box-shadow: 0 4px 0 var(--ink); }
.mini-face { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "no mark" "name mark"; gap: 4px 12px; text-decoration: none; }
.mini-face .num { grid-area: no; color: var(--tone); font-size: 15px; }
.mini-face .sigil { grid-area: mark; width: 60px; height: 60px; color: var(--tone); }
.mini-face strong { grid-area: name; align-self: end; font: 700 19px/1.2 var(--display); }
.mini-face:hover strong { text-decoration: underline; }
.mini em { margin-top: 8px; color: var(--dim); font-size: 13px; font-style: normal; font-weight: 600; }
.mini p { margin: 8px 0 0; color: var(--copy); font-size: 14px; }

/* links to other quizzes: a row with the quiz card's face on the left */
.more { padding: 24px 0 48px; }
.rows { list-style: none; display: grid; gap: 12px; margin: 14px 0 0; padding: 0; }
.row { display: flex; min-height: 96px; overflow: hidden; border: var(--edge); border-radius: 16px; background: var(--card); text-decoration: none; box-shadow: 0 4px 0 var(--ink); }
.row-face { flex: 0 0 92px; display: flex; flex-direction: column; justify-content: space-between; padding: 10px; border-right: var(--edge); background: var(--tone); color: #ffffff; }
.row-face .num { font-size: 13px; }
.row-face .sigil { align-self: center; width: 50px; height: 50px; }
.row-text { display: flex; flex-direction: column; justify-content: center; gap: 2px; padding: 10px 14px; }
.row-group { color: var(--dim); font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.row-text strong { font: 700 19px/1.2 var(--display); }
.row:hover strong { text-decoration: underline; }
.row-meta { color: var(--dim); font-size: 13px; }

/* result type page: the type's card, then the heading block */
.lead { display: grid; gap: 18px; padding: 8px 0 28px; }
.face { display: grid; grid-template-columns: 88px 1fr; grid-template-areas: "top top" "mark name" "mark tag"; align-items: center; gap: 6px 14px; padding: 14px 16px 16px; border: var(--edge); border-radius: 18px; background: var(--tone); color: #ffffff; box-shadow: 0 5px 0 var(--ink); }
.face p { margin: 0; }
.face-top { grid-area: top; display: flex; justify-content: space-between; gap: 12px; font-size: 12px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; }
.face .sigil { grid-area: mark; width: 88px; height: 88px; }
.face-name { grid-area: name; align-self: end; display: flex; flex-direction: column; }
.face-name strong { font: 800 34px/1 var(--display); letter-spacing: -0.02em; }
.face-name span { margin-top: 4px; font-size: 16px; font-weight: 700; }
.face-tag { grid-area: tag; align-self: start; font-size: 14px; font-weight: 600; line-height: 1.35; }
.lead-copy .crumbs { margin-bottom: 10px; }
.lead-copy .eyebrow { margin-bottom: 4px; }
.lead-copy h1 { font-size: 28px; }
.lead-copy .lede { margin: 10px 0 0; }
.glance-title { margin-top: 20px; font-size: 19px; }
.glance { display: grid; gap: 8px; margin: 10px 0 0; }
.glance div { padding: 10px 14px; border: var(--edge); border-radius: 14px; background: var(--card); }
.glance dt { color: var(--tone); font-size: 13px; font-weight: 700; }
.glance dd { margin: 0; }
.lead-go { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 20px 0 0; }
.lead-go span { color: var(--dim); font-size: 14px; }
[data-qz-view="result"] .lead-go, [data-qz-view="shared"] .lead-go { display: none; }

/* result type page: the other types and the matching type of the paired quiz */
.kin { padding: 40px 0 48px; }
.kin-row { list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(156px, 1fr)); gap: 14px 12px; }
.kin-row .mini-face { grid-template-areas: "no mark" "name name" "tag tag"; height: 100%; padding: 14px; border: var(--edge); border-radius: 16px; background: var(--card); box-shadow: 0 4px 0 var(--ink); }
.kin-row .mini-face .sigil { width: 52px; height: 52px; }
.mini-tag { grid-area: tag; color: var(--dim); font-size: 13px; line-height: 1.4; }
.band { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; margin-top: 22px; padding: 16px 20px; border: var(--edge); border-radius: 16px; background: var(--volt); text-decoration: none; box-shadow: 0 4px 0 var(--ink); }
.band span { font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.band strong { flex: 1 1 200px; font: 700 20px/1.2 var(--display); }
.band:hover strong { text-decoration: underline; }
.band .band-arrow { font-size: 20px; letter-spacing: 0; }

/* about, privacy, terms, 404 */
.plain { padding: 24px 0 56px; }
.plain h1 { margin-bottom: 18px; color: var(--ink); font-size: 32px; }

/* footer */
.foot { padding: 40px 0 24px; background: var(--ink); color: #c9cddb; font-size: 14px; }
.foot a { color: #ffffff; }
.foot-cols { display: grid; gap: 24px; }
.foot-name { margin: 0 0 8px; color: #ffffff; font: 800 20px/1 var(--display); }
.foot-about p:last-child { max-width: 520px; margin: 0; }
.foot-list p { margin: 0 0 4px; color: #ffffff; font-size: 13px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.foot-list a { display: flex; align-items: center; min-height: 40px; }
.foot-legal { margin-top: 24px; margin-bottom: 0; padding-top: 16px; border-top: 1px solid #3a3d52; font-size: 13px; }

@media (hover: hover) {
  .chip:hover { background: var(--volt); }
  .trope:hover { transform: translateY(-3px); }
}

@media (min-width: 900px) {
  .bar-in { min-height: 72px; }
  .logo { gap: 10px; font-size: 22px; }
  .logo img { width: 36px; height: 36px; border-radius: 9px; }
  .bar-nav { gap: 20px; font-size: 15px; }

  .hero { grid-template-columns: minmax(0, 600px) 1fr; grid-template-areas: "title hand" "more hand"; column-gap: 40px; row-gap: 20px; padding: 36px 0 52px; }
  .hero-title { grid-area: title; align-self: end; }
  .hero-more { grid-area: more; align-self: start; }
  .hero h1 { font-size: 50px; line-height: 1.1; }
  .volt { white-space: nowrap; }
  .hero-more .lede { max-width: 560px; margin-bottom: 26px; font-size: 18px; line-height: 1.55; }
  .hero-more .btn { width: auto; }
  .hand { grid-area: hand; display: flex; align-items: center; justify-content: center; gap: 18px; }
  .trope { display: flex; flex-direction: column; justify-content: space-between; width: 164px; height: 236px; min-height: 0; padding: 14px; border-radius: 18px; box-shadow: 0 6px 0 var(--ink); }
  .trope .sigil { align-self: center; width: 104px; height: 104px; }
  .trope-meta { display: none; }
  .hand li:nth-child(odd) .trope { transform: rotate(-3deg); }
  .hand li:nth-child(even) .trope { transform: translateY(-14px) rotate(2deg); }
  .hand li .trope:hover { transform: translateY(-8px) rotate(0deg); }

  .shelf { padding: 16px 0 32px; }
  .shelf-head p { min-height: 3em; }
  .steps { padding: 32px 0 56px; }
  .steps h2, .faq h2, .cast h2, .more h2, .kin h2 { font-size: 32px; }
  .steps-row { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-top: 26px; }
  .steps-row li { display: flex; flex-direction: column; }
  .steps-row li::before { margin-bottom: 14px; }

  .sheet { padding: 56px 0 64px; }
  .reader.has-toc { display: grid; grid-template-columns: 220px minmax(0, 720px); gap: 56px; align-items: start; }
  .has-toc .toc { display: block; position: sticky; top: 16px; }
  .prose h2 { font-size: 26px; }
  .prose p, .prose li { font-size: 17px; }

  .faq { padding: 56px 0 24px; }
  .faq-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 24px; }

  .play-head { gap: 8px; padding: 14px 0 12px; }
  .play-head h1 { font-size: 38px; line-height: 1.15; }
  .pills li { padding: 4px 12px; }
  .cast { padding: 56px 0; }
  .rows { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .more { padding: 32px 0 64px; }

  .lead { grid-template-columns: 320px minmax(0, 1fr); gap: 56px; align-items: center; padding: 28px 0 56px; }
  .face { display: flex; flex-direction: column; align-items: stretch; justify-content: space-between; height: 410px; padding: 22px; border-radius: 22px; box-shadow: 0 8px 0 var(--ink); transform: rotate(-2deg); }
  .face .sigil { align-self: center; width: 184px; height: 184px; }
  .face-name, .face-tag { align-self: stretch; }
  .face-name strong { font-size: 54px; }
  .face-name span { font-size: 19px; }
  .lead-copy h1 { font-size: 46px; line-height: 1.1; }
  .lead-copy .lede { max-width: 640px; font-size: 18px; line-height: 1.55; }
  .glance { max-width: 640px; }
  [data-qz-view="result"] .lead, [data-qz-view="shared"] .lead { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .kin { padding: 56px 0 64px; }

  .plain { padding: 40px 0 72px; }
  .plain h1 { font-size: 44px; }
  .foot { padding: 56px 0 28px; }
  .foot-cols { grid-template-columns: 2fr 1fr 1fr; gap: 40px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; scroll-behavior: auto !important; }
}
