/*
 * styles.css — Main Ever After visual theme.
 *
 * Look: dark teal adventure map, warm gold wayfinding, parchment quiz cards. No AI art: the hero
 *   map and the class crests are drawn in code (src/js/hero-art.mjs, src/js/crests.mjs).
 * Colors live in :root variables. Faction colors are never the only carrier of meaning.
 *
 * Sections (search for "==="):
 *   1. Fonts           self-hosted variable fonts (no Google Fonts request)
 *   2. Tokens + base   colors, typography, buttons, focus states
 *   3. Header + hero   site header, intro hero, journey strip, footer
 *   4. Quiz            setup + question cards, answer options, progress bar
 *   5. Results         match card, side cards, trait sliders, referral, dialogs
 *   6. Responsive      ≥1600px, ≤1000px, ≤700px
 *   7. Adjustments     later accessibility/layout fixes. They rely on coming AFTER the
 *                      responsive rules (same specificity, later wins) — keep them last.
 */

/* === 1. Fonts ============================================================ */
/* Latin subsets of OFL fonts from Fontsource. Family names match the canvas card code. */
@font-face {
  font-family: 'DM Sans';
  font-style: normal;
  font-display: swap;
  font-weight: 100 1000;
  src: url('/assets/fonts/dm-sans-latin-wght-normal.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url('/assets/fonts/cormorant-garamond-latin-wght-normal.woff2') format('woff2-variations');
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-display: swap;
  font-weight: 300 700;
  src: url('/assets/fonts/cormorant-garamond-latin-wght-italic.woff2') format('woff2-variations');
}

/* === 2. Tokens + base ==================================================== */
:root {
  color-scheme: dark;
  --ink: #102b2d;
  --deep: #091f22;
  --surface: #17373a;
  --gold: #e4b963;
  --text: #f3eee0;
  --muted: #cad7d2;
  --line: #365052;
  --paper: #f2eddf;
  --body: 'DM Sans', Arial, sans-serif;
  --display: 'Cormorant Garamond', Georgia, serif;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--deep);
  color: var(--text);
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.6;
}
button,
input,
select {
  font: inherit;
}
button,
a {
  -webkit-tap-highlight-color: transparent;
}
button {
  cursor: pointer;
}
a {
  color: inherit;
}
button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 5px;
}
button {
  color: inherit;
}
button:not(.button) {
  background: none;
  border: 0;
}
button,
a {
  touch-action: manipulation;
}
[hidden] {
  display: none !important;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2,
h3 {
  font-family: var(--display);
  font-weight: 500;
  line-height: 1.06;
}
h1 {
  font-size: clamp(2.8rem, 4.7vw, 5.1rem);
  letter-spacing: -0.025em;
  margin-bottom: 24px;
}
h1 em {
  color: var(--gold);
  font-weight: 500;
}
h2 {
  font-size: 2.9rem;
}
h3 {
  font-size: 1.9rem;
}
a {
  text-underline-offset: 4px;
}
/* === 3. Header + hero ==================================================== */
.site-header {
  height: 106px;
  max-width: 1536px;
  margin: auto;
  padding: 0 6%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #ffffff16;
}
.brand {
  display: flex;
  gap: 13px;
  align-items: center;
  text-decoration: none;
  font-family: var(--display);
  font-size: 1.45rem;
  letter-spacing: 0.05em;
  line-height: 1.1;
}
.brand b {
  font-weight: 600;
}
.brand small {
  display: block;
  font-family: var(--body);
  font-size: 0.62rem;
  letter-spacing: 0.17em;
  color: var(--muted);
  margin-top: 9px;
}
.brand-mark {
  font-family: Georgia, serif;
  font-size: 3.6rem;
  color: var(--gold);
  font-weight: 400;
}
nav {
  display: flex;
  gap: 30px;
  align-items: center;
}
nav button,
nav a {
  font-size: 0.88rem;
  text-decoration: none;
}
nav button {
  padding: 12px 0;
  color: var(--muted);
}
.nav-quiz {
  color: var(--gold);
  border: 1px solid #e4b96370;
  padding: 10px 20px;
  border-radius: 4px;
}
.nav-quiz span {
  margin-left: 18px;
}
.intro {
  position: relative;
  min-height: 640px;
  display: flex;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
  max-width: 1800px;
  margin: auto;
}
.intro:after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, #091f22 1%, #091f22ed 24%, #091f2299 46%, #091f2210 70%),
    linear-gradient(0deg, #091f22 0%, transparent 25%);
}
.intro-content {
  width: 100%;
  max-width: 1536px;
  margin: auto;
  padding: 68px 6% 84px;
}
.eyebrow {
  font-size: 0.71rem;
  letter-spacing: 0.18em;
  font-weight: 600;
  color: var(--gold);
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 24px;
}
.eyebrow span {
  width: 20px;
  height: 1px;
  background: var(--gold);
}
.intro-copy {
  font-size: 1.03rem;
  line-height: 1.7;
  color: #d3ded6;
  margin-bottom: 29px;
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 30px;
  min-height: 52px;
  padding: 14px 24px;
  border-radius: 4px;
  font-size: 0.94rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--text);
  transition:
    background 0.18s,
    transform 0.18s;
}
.button:hover {
  transform: translateY(-2px);
}
.gold {
  background: var(--gold);
  border-color: var(--gold);
  color: #172b29;
  box-shadow: 0 4px 30px #c8993214;
}
.gold:hover {
  background: #f0cd88;
}
.quiz-meta {
  display: flex;
  gap: 18px;
  font-size: 0.75rem;
  color: var(--muted);
  margin: 18px 0 34px;
}
.quiz-meta span + span:before {
  content: '·';
  margin-right: 18px;
  color: #64807c;
}
.intro-aside {
  color: #96aca6;
  font-family: var(--display);
  font-size: 1.09rem;
  font-style: italic;
  line-height: 1.35;
  margin-bottom: 0;
}
.site-footer {
  max-width: 1350px;
  margin: auto;
  padding: 33px 2% 22px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px 30px;
}
.site-footer p {
  font-size: 0.77rem;
  color: var(--muted);
  margin: 3px 0;
}
.footer-links {
  display: flex;
  gap: 22px;
}
.footer-links button {
  font-size: 0.77rem;
  color: var(--muted);
  padding: 8px 0;
}
.site-footer .trademark {
  width: 100%;
  font-size: 0.65rem;
  color: #8baba5;
  margin-top: 15px;
}
/* === 4. Quiz ============================================================= */
.quiz-shell {
  max-width: 900px;
  margin: 50px auto 70px;
  padding: 0 28px;
}
.quiz-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.81rem;
  color: var(--muted);
  margin-bottom: 16px;
}
.text-button {
  padding: 10px 0;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.progress-track {
  height: 4px;
  background: var(--line);
  border-radius: 5px;
  overflow: hidden;
  margin-bottom: 35px;
}
.progress-fill {
  height: 100%;
  background: var(--gold);
  transition: width 0.2s;
}
.quiz-card {
  background: var(--paper);
  color: var(--ink);
  padding: 38px 45px 32px;
  border-radius: 8px;
  box-shadow: 0 20px 70px #0002;
}
.quiz-card .eyebrow {
  color: #766030;
  margin-bottom: 14px;
}
.quiz-card h2 {
  font-size: 2.55rem;
  margin-bottom: 17px;
}
.quiz-card .hint {
  font-size: 0.9rem;
  color: #586561;
  margin-bottom: 26px;
}
.setup-grid {
  display: grid;
  gap: 24px;
}
.field-label {
  display: block;
  font-weight: 600;
  margin-bottom: 9px;
  font-size: 0.95rem;
}
.field-help {
  color: #586561;
  font-size: 0.8rem;
  margin: 6px 0 0;
}
select {
  color: var(--ink);
  background: #fbf8ef;
  border: 1px solid #a6aca0;
  border-radius: 4px;
  padding: 13px;
  width: 100%;
  min-height: 50px;
}
.quiz-card select:focus-visible,
.quiz-card input:focus-visible {
  outline-color: #2c7170;
}
.answer-options {
  display: grid;
  gap: 11px;
  margin: 25px 0;
}
.answer-label {
  display: flex;
  align-items: center;
  gap: 15px;
  background: #faf7ef;
  border: 1px solid #c7cbbb;
  border-radius: 5px;
  padding: 16px 17px;
  cursor: pointer;
  min-height: 64px;
  font-size: 0.94rem;
  transition:
    background 0.15s,
    border-color 0.15s;
}
@media (hover: hover) {
  /* Mouse only: on touch screens a hover tint sticks after a tap and looks pre-selected. */
  .answer-label:hover {
    border-color: #557e75;
    background: #e9ede0;
  }
}
.answer-label:has(input:checked) {
  background: #dce8dd;
  border: 2px solid #356e63;
  padding: 15px 16px;
}
.answer-label:has(input:focus-visible) {
  outline: 3px solid #2c7170;
  outline-offset: 3px;
}
.answer-label input {
  accent-color: #326458;
  width: 18px;
  height: 18px;
  flex-shrink: 0;
}
.answer-options legend {
  padding: 0;
}
.quiz-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: 26px;
  gap: 15px;
}
.quiz-actions .button {
  min-width: 160px;
}
.quiz-card .text-button {
  color: #52665d;
}
.quiz-card .gold {
  background: #193f3c;
  color: #fff;
  border-color: #193f3c;
}
.quiz-card .gold:hover {
  background: #27574c;
}
.quiz-note {
  text-align: center;
  color: var(--muted);
  font-size: 0.78rem;
  margin: 20px 0;
}
.question-category {
  color: #567069;
}
.question-category span {
  color: #9b8757;
}
/* === 5. Results ========================================================== */
.result-shell {
  max-width: 1180px;
  margin: 48px auto 70px;
  padding: 0 30px;
}
.result-lead {
  text-align: center;
  max-width: 760px;
  margin: auto;
}
.result-lead .eyebrow {
  justify-content: center;
}
.result-lead h1 {
  font-size: 4rem;
  margin: 18px 0;
}
.result-lead p {
  color: var(--muted);
}
.result-grid {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 26px;
  margin-top: 34px;
}
.match-card {
  background: var(--paper);
  color: var(--ink);
  border-radius: 8px;
  padding: 32px;
}
.match-card h2 {
  font-size: 2.5rem;
  margin: 18px 0;
}
.match-card .eyebrow {
  color: #6f5725;
}
.match-badge {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  background: #dae4d6;
  border: 1px solid #b0c5ad;
  padding: 6px 12px;
  border-radius: 30px;
  font-size: 0.76rem;
  color: #2f5645;
}
.class-symbol {
  font-size: 3rem;
  font-family: Georgia, serif;
  line-height: 1;
  border: 1px solid #b9a471;
  display: grid;
  place-items: center;
  width: 90px;
  height: 90px;
  transform: rotate(45deg);
  margin: 20px auto 40px;
  color: #655124;
}
.class-symbol span {
  transform: rotate(-45deg);
}
.match-title {
  text-align: center;
}
.result-description {
  color: #4b6057;
}
.result-facts {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 14px 0 23px;
}
.pill {
  font-size: 0.74rem;
  border: 1px solid #b5c2b2;
  border-radius: 4px;
  padding: 4px 10px;
}
.result-detail {
  border-top: 1px solid #bbc4b4;
  padding-top: 22px;
  margin-top: 22px;
}
.result-detail h3 {
  font-size: 1.7rem;
  margin-bottom: 12px;
}
.result-detail p,
.result-detail li {
  font-size: 0.91rem;
}
.result-detail ul {
  padding-left: 20px;
}
.side-card {
  background: #163236;
  border: 1px solid #385052;
  border-radius: 8px;
  padding: 28px;
  margin-bottom: 20px;
}
.side-card h3 {
  margin-bottom: 13px;
}
.side-card p {
  color: var(--muted);
  font-size: 0.95rem;
}
.alternate {
  padding: 17px 0;
  border-top: 1px solid var(--line);
}
.alternate h4 {
  font-size: 1rem;
  margin: 0 0 5px;
  font-weight: 500;
}
.alternate p {
  margin: 0 0 10px;
  font-size: 0.9rem;
}
.alternate button {
  color: var(--gold);
  padding: 7px 0;
  font-size: 0.8rem;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.result-controls {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin: 30px 0 20px;
}
.result-controls .text-button {
  font-size: 0.86rem;
}
.traits {
  display: grid;
  gap: 15px;
}
.trait-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  margin-bottom: 6px;
  color: var(--muted);
}
.trait-track {
  height: 5px;
  background: #3b5351;
  position: relative;
  border-radius: 3px;
}
.trait-track:after {
  content: '';
  position: absolute;
  left: 50%;
  top: -3px;
  bottom: -3px;
  border-left: 1px solid #8faaa1;
}
.trait-marker {
  width: 11px;
  height: 11px;
  border: 2px solid #183b3b;
  background: var(--gold);
  border-radius: 50%;
  position: absolute;
  top: -3px;
  transform: translateX(-50%);
}
.referral {
  max-width: 800px;
  margin: 30px auto 0;
  border-top: 1px solid var(--line);
  padding-top: 28px;
  text-align: center;
}
.referral p {
  font-size: 0.86rem;
  color: var(--muted);
}
.referral a {
  color: var(--gold);
}
.referral small {
  display: block;
  color: var(--muted);
  margin: 12px 0;
  font-size: 0.77rem;
}
.status-message {
  text-align: center;
  min-height: 26px;
  font-size: 0.85rem;
  color: var(--gold);
}
dialog {
  background: var(--paper);
  color: var(--ink);
  border: 1px solid #aaa98d;
  border-radius: 9px;
  max-width: 680px;
  width: calc(100% - 36px);
  padding: 28px 35px;
  max-height: 85vh;
  box-shadow: 0 30px 100px #0005;
}
dialog::backdrop {
  background: #041516d9;
  backdrop-filter: blur(4px);
}
.dialog-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 15px;
}
.dialog-top .eyebrow {
  color: #736030;
  margin: 0;
}
.dialog-top button {
  color: var(--ink);
  padding: 10px;
}
.dialog-top button:focus-visible {
  outline-color: #377966;
}
dialog h2 {
  font-size: 2.5rem;
  margin-bottom: 22px;
}
dialog h3 {
  font-size: 1.7rem;
  margin: 25px 0 10px;
}
dialog p,
dialog li {
  font-size: 0.95rem;
  color: #455b53;
}
dialog a {
  color: #225e58;
}
dialog button:focus-visible,
dialog a:focus-visible {
  outline-color: #326557;
}
.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;
}
.skip-link {
  position: absolute;
  top: -80px;
  left: 20px;
  z-index: 20;
  background: var(--gold);
  color: var(--ink);
  padding: 12px;
}
.skip-link:focus {
  top: 10px;
}
fieldset {
  border: 0;
  padding: 0;
  margin: 0;
}
body.in-quiz .nav-quiz,
body.in-result .nav-quiz {
  display: none;
}
.results-notice {
  max-width: 850px;
  margin: 20px auto 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.8rem;
}
.source-note {
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 18px;
}
.paid {
  color: #885015;
  font-weight: 600;
}
.no-data {
  text-align: center;
  max-width: 640px;
  margin: auto;
  padding: 50px 25px;
}
.no-data h2 {
  font-size: 3rem;
}
/* === 6. Responsive ======================================================= */
@media (min-width: 1600px) {
  .intro-content {
    padding-left: 90px;
  }
  .intro {
    min-height: 700px;
  }
}
@media (max-width: 1000px) {
  .site-header {
    padding: 0 5%;
    height: 95px;
  }
  nav {
    gap: 18px;
  }
  nav button {
    font-size: 0.8rem;
  }
  .brand {
    font-size: 1.2rem;
  }
  .brand-mark {
    font-size: 3rem;
  }
  .intro {
    min-height: 615px;
  }
  .intro:after {
    background:
      linear-gradient(90deg, #091f22f7, #091f22b0 55%, #091f2230),
      linear-gradient(0deg, #091f22, transparent 50%);
  }
  .intro-content {
    padding: 58px 5% 75px;
  }
  h1 {
    font-size: 3.9rem;
  }
  .site-footer {
    padding-left: 5%;
    padding-right: 5%;
  }
  .result-lead h1 {
    font-size: 3.3rem;
  }
  .result-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (max-width: 700px) {
  .site-header {
    height: 86px;
  }
  .brand {
    font-size: 1.1rem;
    gap: 8px;
  }
  .brand small {
    font-size: 0.5rem;
    letter-spacing: 0.1em;
  }
  .brand-mark {
    font-size: 2.7rem;
  }
  nav {
    gap: 14px;
  }
  nav button {
    font-size: 0.76rem;
  }
  nav button[data-dialog='basics'],
  .nav-quiz {
    display: none;
  }
  .intro {
    min-height: 690px;
    align-items: flex-end;
  }
  .intro:after {
    background: linear-gradient(0deg, #091f22 1%, #091f22ed 33%, #091f2290 60%, #091f2220);
  }
  .intro-content {
    padding: 205px 6% 43px;
  }
  .eyebrow {
    font-size: 0.59rem;
    letter-spacing: 0.13em;
    margin-bottom: 18px;
  }
  h1 {
    font-size: 2.95rem;
    line-height: 1.02;
  }
  .intro-copy {
    font-size: 0.94rem;
    margin-bottom: 24px;
  }
  .intro .button {
    width: 100%;
    gap: 25px;
  }
  .quiz-meta {
    justify-content: center;
    font-size: 0.63rem;
    gap: 9px;
    margin-bottom: 25px;
  }
  .quiz-meta span + span:before {
    margin-right: 9px;
  }
  .intro-aside {
    text-align: center;
    font-size: 0.98rem;
  }
  .site-footer {
    padding-top: 27px;
  }
  .footer-links {
    gap: 18px;
  }
  .footer-links button {
    font-size: 0.72rem;
  }
  .site-footer .trademark {
    font-size: 0.66rem;
  }
  .quiz-shell {
    padding: 0 16px;
    margin-top: 23px;
  }
  .quiz-card {
    padding: 27px 21px 24px;
  }
  .quiz-card h2 {
    font-size: 2.05rem;
  }
  .quiz-card .hint {
    font-size: 0.83rem;
  }
  .answer-label {
    font-size: 0.9rem;
    padding: 15px 12px;
    gap: 10px;
  }
  .answer-label:has(input:checked) {
    padding: 14px 11px;
  }
  .quiz-actions .button {
    min-width: 125px;
    padding: 12px 18px;
    gap: 13px;
  }
  .quiz-top {
    font-size: 0.75rem;
  }
  .result-shell {
    padding: 0 17px;
    margin-top: 30px;
  }
  .result-lead h1 {
    font-size: 2.8rem;
  }
  .result-grid {
    grid-template-columns: 1fr;
    gap: 18px;
  }
  .match-card,
  .side-card {
    padding: 25px;
  }
  .result-lead p {
    font-size: 0.93rem;
  }
  .result-controls .button {
    width: 100%;
  }
  dialog {
    padding: 23px;
  }
  dialog h2 {
    font-size: 2.1rem;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

/* === 7. Adjustments (keep last — see header) ============================= */

.match-title .eyebrow {
  justify-content: center;
}
.noscript {
  padding: 25px;
  text-align: center;
}

.optional {
  font-size: 0.78rem;
  font-weight: 400;
  color: #535f58;
}
.shared-match {
  max-width: 650px;
  margin: 32px auto;
}
.intro-notice {
  font-size: 0.72rem;
  color: #b8c7c2;
  margin: 17px 0 0;
}
.status-message a {
  overflow-wrap: anywhere;
}
h1:focus,
h2:focus {
  outline: none;
}

.brand small {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
}
.eyebrow,
.site-footer .trademark {
  font-size: 0.75rem;
}
.quiz-meta {
  font-size: 0.8rem;
}
.footer-links button,
.site-footer p {
  font-size: 0.875rem;
}
@media (max-width: 700px) {
  .brand small {
    display: none;
  }
  .quiz-meta {
    font-size: 0.75rem;
    gap: 7px;
    flex-wrap: wrap;
  }
  .eyebrow {
    font-size: 0.75rem;
    letter-spacing: 0.06em;
  }
  .footer-links {
    flex-wrap: wrap;
    gap: 16px;
  }
  .intro-content {
    padding-top: 180px;
  }
}

.result-grid {
  align-items: start;
}
.question-category {
  color: var(--muted);
}
.quiz-card,
.match-card,
dialog {
  color-scheme: light;
}

.site-header {
  height: auto;
  min-height: 106px;
  padding-top: 16px;
  padding-bottom: 16px;
}
@media (max-width: 700px) {
  .site-header {
    min-height: 86px;
  }
}

/* === 8. Crests, match reveal, journey road, home showcase (2026-09-27) ==== */
:root {
  --alliance: #6f9bd8;
  --horde: #d0644d;
  --card-dark: #11292c;
  --card-line: #2c4a4b;
}
[data-faction='alliance'] {
  --faction: var(--alliance);
}
[data-faction='horde'] {
  --faction: var(--horde);
}

/* Crests (see js/crests.mjs) */
.crest {
  display: block;
  overflow: visible;
}

/* Match hero: the reveal at the top of results and share pages */
.match-hero {
  position: relative;
  text-align: center;
  max-width: 820px;
  margin: 0 auto 34px;
  padding: 18px 16px 6px;
  isolation: isolate;
}
.hero-glow {
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 0;
  width: min(420px, 100%);
  aspect-ratio: 1;
  transform: translate(-50%, -18%);
  background: radial-gradient(circle, #e4b96333 0%, #e4b96312 38%, transparent 68%);
  pointer-events: none;
}
.hero-crest {
  color: var(--gold);
  display: flex;
  justify-content: center;
  margin-bottom: 18px;
  filter: drop-shadow(0 0 18px #e4b96340);
}
.hero-eyebrow {
  justify-content: center;
  margin-bottom: 10px;
}
.hero-name {
  font-size: clamp(3rem, 7vw, 5.2rem);
  margin: 0 0 6px;
  line-height: 0.98;
}
.hero-race {
  display: block;
  font-size: 0.46em;
  letter-spacing: 0.06em;
  color: #d9cfb6;
  margin-bottom: 8px;
}
.hero-archetype {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.6rem;
  color: var(--gold);
  margin: 0 0 8px;
}
.hero-tagline {
  font-family: var(--display);
  font-size: 1.25rem;
  color: #e8e0cc;
  max-width: 560px;
  margin: 0 auto 14px;
}
.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 16px 0 6px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 5px 12px;
  border-radius: 30px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  border: 1px solid #e4b96366;
  color: #f1e3bf;
  background: #e4b96314;
}
.badge-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--faction, var(--gold));
  box-shadow: 0 0 0 2px #00000040;
}
.badge-new {
  background: var(--gold);
  border-color: var(--gold);
  color: #1a2b27;
}
.badge-paid {
  border-color: #f0b27a88;
  color: #f6cfa8;
  background: #f0b27a14;
}
.badge-small {
  font-size: 0.66rem;
  padding: 2px 8px;
  vertical-align: 2px;
  margin-left: 4px;
}
.shared-note {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  margin: -12px auto 26px;
}
.result-grid {
  margin-top: 8px;
}
.match-card .result-facts {
  margin-top: 0;
}

/* Alternatives with small crests */
.alternate {
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 16px;
  align-items: start;
}
.alternate-crest {
  color: var(--gold);
  padding-top: 2px;
}
.dialog-crest {
  color: #7a6128;
  float: right;
  margin: 0 0 8px 16px;
}

/* Reveal animation: only when the visitor hasn't asked for reduced motion */
@media (prefers-reduced-motion: no-preference) {
  .reveal .crest-animate circle,
  .reveal .crest-animate path,
  .reveal .crest-animate ellipse {
    stroke-dasharray: 400;
    stroke-dashoffset: 400;
    animation: crest-draw 1.3s cubic-bezier(0.55, 0.1, 0.25, 1) forwards;
  }
  .reveal .crest-animate .crest-emblem * {
    animation-delay: 0.35s;
  }
  .reveal .crest-animate .crest-dots {
    stroke-dasharray: 0 6.93;
    stroke-dashoffset: 0;
    animation: crest-dots-in 0.8s 0.3s both;
  }
  .reveal .crest-animate g[fill='currentColor'] {
    fill-opacity: 0;
    animation: crest-fill 0.4s 1.3s forwards;
  }
  .reveal .crest-animate [fill='currentColor'] {
    fill-opacity: 0;
    animation:
      crest-draw 1.3s 0.35s cubic-bezier(0.55, 0.1, 0.25, 1) forwards,
      crest-fill 0.4s 1.3s forwards;
  }
  .reveal .hero-glow {
    opacity: 0;
    animation: glow-in 1.8s 0.2s ease-out forwards;
  }
  .reveal .hero-eyebrow,
  .reveal .hero-name,
  .reveal .hero-archetype,
  .reveal .hero-tagline,
  .reveal .hero-badges,
  .reveal .source-note {
    opacity: 0;
    animation: rise-in 0.7s ease-out forwards;
  }
  .reveal .hero-eyebrow {
    animation-delay: 0.1s;
  }
  .reveal .hero-name {
    animation-delay: 1s;
  }
  .reveal .hero-archetype {
    animation-delay: 1.2s;
  }
  .reveal .hero-tagline {
    animation-delay: 1.3s;
  }
  .reveal .hero-badges,
  .reveal .source-note {
    animation-delay: 1.45s;
  }
  .reveal ~ .result-grid {
    opacity: 0;
    animation: rise-in 0.6s 0.9s ease-out forwards;
  }
  .journey-walked {
    transition: stroke-dashoffset 0.5s ease;
  }
  .spot-card,
  .sky-branch {
    transition:
      transform 0.18s,
      border-color 0.18s,
      background 0.18s;
  }
}
@keyframes crest-draw {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes crest-dots-in {
  from {
    opacity: 0;
  }
}
@keyframes crest-fill {
  to {
    fill-opacity: 1;
  }
}
@keyframes rise-in {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}
@keyframes glow-in {
  from {
    opacity: 0;
    transform: translate(-50%, -18%) scale(0.6);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -18%) scale(1);
  }
}

/* Journey road progress (question screens) */
.journey {
  margin: -6px 0 22px;
}
.journey svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}
.journey-road {
  fill: none;
  stroke: #3b5654;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-dasharray: 2 7;
}
.journey-walked {
  fill: none;
  stroke: var(--gold);
  stroke-width: 3.5;
  stroke-linecap: round;
}
.journey-stop path {
  fill: var(--deep);
  stroke: #8f7a4c;
  stroke-width: 1.6;
}
.journey-stop.reached path {
  fill: var(--gold);
  stroke: var(--gold);
}
.journey-stop .journey-star {
  fill: var(--deep);
  stroke: none;
}
.journey-marker {
  fill: #f6dc9f;
  stroke: var(--deep);
  stroke-width: 2;
  filter: drop-shadow(0 0 6px #e4b963aa);
}

/* Home showcase sections */
.home-extra {
  max-width: 1350px;
  margin: 0 auto;
  padding: 64px 2% 20px;
}
body.in-quiz .home-extra,
body.in-result .home-extra {
  display: none;
}
.section-head {
  max-width: 720px;
  margin-bottom: 30px;
}
.section-head h2,
.sky-intro h2 {
  font-size: clamp(2.2rem, 3.6vw, 3.1rem);
  margin-bottom: 12px;
}
.section-head p,
.sky-intro p {
  color: var(--muted);
  font-size: 1rem;
}
.spotlight-grid {
  display: grid;
  grid-template-columns: 1fr 1.15fr;
  gap: 18px;
}
.spotlight-list {
  display: grid;
  gap: 12px;
}
.spot-card,
.sky-branch {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 18px;
  align-items: center;
  text-decoration: none;
  background: var(--card-dark);
  border: 1px solid var(--card-line);
  border-left: 3px solid var(--faction, var(--gold));
  border-radius: 8px;
  padding: 16px 20px;
  color: var(--text);
}
.spot-card:hover,
.sky-branch:hover {
  border-color: #e4b96388;
  border-left-color: var(--faction, var(--gold));
  background: #153236;
  transform: translateY(-2px);
}
.spot-crest,
.sky-branch-crest {
  color: var(--gold);
}
.spot-body {
  display: grid;
  gap: 3px;
}
.spot-meta {
  display: block;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #a9bdb7;
  font-weight: 600;
}
.spot-name {
  display: block;
  font-family: var(--display);
  font-size: 1.55rem;
  line-height: 1.1;
}
.spot-tagline {
  display: block;
  font-family: var(--display);
  font-style: italic;
  color: #e1d6bc;
  font-size: 1.05rem;
}
.spot-link {
  font-size: 0.82rem;
  color: var(--gold);
  margin-top: 4px;
}
.spot-feature {
  grid-template-columns: 1fr;
  justify-items: center;
  align-content: center;
  text-align: center;
  padding: 34px 30px;
  background:
    radial-gradient(circle at 50% 22%, #e4b96322, transparent 55%),
    linear-gradient(160deg, #173a3d, #0e2427);
}
.spot-feature .spot-name {
  font-size: 2.4rem;
}
.spot-feature .spot-tagline {
  font-size: 1.3rem;
}
.spot-stat {
  display: block;
  margin: 12px auto 6px;
  max-width: 380px;
  font-size: 0.9rem;
  color: var(--muted);
}

.skyborne {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 40px;
  align-items: center;
}
.sky-intro h2 em {
  color: var(--gold);
}
.swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 20px 0 8px;
}
.swatch {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  box-shadow:
    0 0 0 2px #0a1f22,
    0 0 0 3px #e4b96355;
}
.swatch-note {
  font-size: 0.78rem !important;
  color: #8fa7a1 !important;
}
.swatch-note a {
  color: var(--gold);
}
.sky-looks {
  padding-left: 20px;
  color: #d3ded6;
  margin: 14px 0;
}
.sky-looks li {
  margin-bottom: 4px;
}
.sky-branches {
  display: grid;
  gap: 14px;
}
.sky-classes {
  display: block;
  font-size: 0.8rem;
  color: #a9bdb7;
  margin-top: 4px;
}

.faction-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 18px;
}
.faction-card {
  background: var(--card-dark);
  border: 1px solid var(--card-line);
  border-top: 3px solid var(--faction);
  border-radius: 8px;
  padding: 26px 28px;
}
.faction-card h3 {
  font-family: var(--display);
  font-size: 1.9rem;
  font-weight: 500;
  margin: 6px 0 10px;
  color: var(--text);
}
.faction-card p {
  color: #d3ded6;
  font-size: 0.95rem;
}
.faction-races {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.faction-races li {
  font-size: 0.8rem;
  border: 1px solid var(--card-line);
  border-left: 3px solid var(--faction);
  border-radius: 4px;
  padding: 4px 10px;
  color: #d3ded6;
}
.faction-note {
  font-size: 0.85rem;
  color: #a9bdb7;
  margin-top: 16px;
  max-width: 820px;
}

/* Share pages: static crest in the pre-JS hero */
.shared-static-crest {
  color: var(--gold);
  margin-bottom: 14px;
}

@media (max-width: 1000px) {
  .spotlight-grid,
  .skyborne {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 700px) {
  .home-extra {
    padding: 48px 16px 10px;
  }
  .hero-crest .crest {
    width: 132px;
    height: 132px;
  }
  .hero-archetype {
    font-size: 1.35rem;
  }
  .spot-card,
  .sky-branch {
    padding: 14px 14px;
    gap: 14px;
  }
  .spot-card .crest,
  .sky-branch .crest {
    width: 58px;
    height: 58px;
  }
  .spot-feature .crest {
    width: 112px;
    height: 112px;
  }
  .spot-feature .spot-name {
    font-size: 2rem;
  }
  .faction-grid {
    grid-template-columns: 1fr;
  }
  .faction-card {
    padding: 20px;
  }
  .swatches {
    gap: 7px;
  }
  .swatch {
    width: 29px;
    height: 29px;
  }
  .alternate {
    grid-template-columns: 44px 1fr;
    gap: 12px;
  }
  .alternate-crest .crest {
    width: 44px;
    height: 44px;
  }
}

/* Look note under "Why you got this" (when the pictured look can't be the match's race) */
.result-detail .look-note {
  margin-top: 12px;
  padding: 10px 14px;
  border-left: 3px solid #c89a3c;
  background: #ece4cf;
  border-radius: 0 6px 6px 0;
  font-size: 0.86rem;
  color: #3a3a30;
}

/* Race lore line under "Who they are" */
.result-detail .race-lore {
  margin-top: 8px;
  font-style: italic;
  color: #4a5249;
}

/* Keep the match card in view beside the taller right-hand column on wide screens */
@media (min-width: 1001px) {
  .result-main {
    position: sticky;
    top: 24px;
    align-self: start;
  }
}

/* Q1 follow-up: "Which class do you usually play?" */
.usual-class {
  margin: 18px 0 6px;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(228, 185, 99, 0.06);
}
.usual-class select {
  width: 100%;
  max-width: 420px;
}
.usual-class .field-help {
  margin-top: 8px;
}

/* === 9. Readability pass (round-5 personas: small, faint text everywhere) ================
   Minimum sizes around 0.85rem for fine print, brighter greys on the dark background, and
   links that look like buttons. Later rules win, so this section overrides the ones above. */
.quiz-meta {
  font-size: 0.86rem;
  color: #d3ded6;
}
.intro-aside {
  color: #d0ddd7;
  font-size: 1.18rem;
}
.intro-notice {
  font-size: 0.86rem;
  color: #c7d5cf;
}
.results-notice,
.source-note {
  font-size: 0.92rem;
  color: #d3dfda;
}
.site-footer .trademark {
  font-size: 0.85rem;
  color: #c3d3cd;
}
.pill {
  font-size: 0.82rem;
  color: #26312b;
}
.trait-label {
  font-size: 0.92rem;
  color: #dde7e2;
}
.swatch-note {
  font-size: 0.86rem !important;
  color: #b4c7c1 !important;
}
.alternate button,
.spot-link {
  display: inline-block;
  margin-top: 8px;
  padding: 7px 14px;
  border: 1px solid var(--gold);
  border-radius: 6px;
  color: var(--gold);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
}
.alternate button:hover,
.alternate button:focus-visible {
  background: rgba(228, 185, 99, 0.12);
}

/* Collapsible extras on the result page: the leanings and the Recruit a Friend note */
.traits-card summary,
.referral summary {
  cursor: pointer;
  color: var(--gold);
  font-weight: 600;
  font-size: 0.98rem;
  list-style-position: inside;
}
.traits-card[open] summary {
  margin-bottom: 12px;
}
.traits-card p {
  color: #c7d5cf;
  font-size: 0.9rem;
}
.referral {
  border-top: 1px solid var(--line);
}
.referral p {
  font-size: 0.92rem;
  color: #c7d5cf;
}
.referral small {
  font-size: 0.84rem;
  color: #c7d5cf;
}
.referral[open] summary {
  margin-bottom: 14px;
}

/* Skyborne skin tones on a Skyborne result */
.result-swatches {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 12px 0 6px;
}
.swatch-small {
  width: 26px;
  height: 26px;
  box-shadow: 0 0 0 1px #9aa89b;
}
.result-detail .swatch-note {
  color: #4a5249 !important;
}

/* Personal match portraits, quick setup, and comparison. */
.setup-extras {
  border-block: 1px solid #c9c9b8;
  padding: 16px 0;
}
.setup-extras summary {
  color: var(--ink);
  font-weight: 600;
  cursor: pointer;
  min-height: 28px;
}
.setup-extras summary span {
  color: #586561;
  font-size: 0.875rem;
  font-weight: 400;
  margin-left: 8px;
}
.setup-extras summary:focus-visible,
.match-comparison summary:focus-visible {
  outline: 3px solid #7a9e80;
  outline-offset: 5px;
}
.setup-extra-fields {
  display: grid;
  gap: 22px;
  margin-top: 22px;
}
.setup-grid .quiz-actions {
  margin-top: 0;
}
.setup-grid .field-help {
  font-size: 0.875rem;
}
.race-portrait {
  width: 184px;
  aspect-ratio: 1;
  background-image: url('/assets/race-portraits.webp');
  background-size: 500% 200%;
  background-position: var(--portrait-x) var(--portrait-y);
  background-repeat: no-repeat;
  border-radius: 20px;
  border: 1px solid #c7a25b;
  box-shadow: 0 12px 36px #0005;
}
.hero-identity {
  position: relative;
  width: 184px;
  margin: 0 auto 26px;
}
.hero-identity .hero-crest {
  position: absolute;
  right: -25px;
  bottom: -16px;
  margin: 0;
  background: #0d292c;
  border-radius: 50%;
  border: 1px solid #c7a25b;
}
.hero-identity .hero-crest .crest {
  width: 76px;
  height: 76px;
}
.portrait-compact {
  width: 64px;
  border-radius: 10px;
  box-shadow: none;
}
.alternate {
  grid-template-columns: 64px minmax(0, 1fr);
}
.alternate .match-difference {
  color: #d9e2d9;
  font-size: 0.9rem;
  margin-top: 10px;
}
.portrait-note {
  font-size: 0.875rem;
  color: #586561;
  margin-top: 8px;
}
.match-comparison {
  border: 1px solid #60736a;
  border-radius: 10px;
  margin-top: 28px;
  padding: 22px;
  background: #0d292c;
}
.match-comparison > summary {
  color: var(--gold);
  font-size: 1.125rem;
  font-weight: 600;
  cursor: pointer;
}
.match-comparison > p {
  color: #c7d5cf;
  font-size: 0.9375rem;
  margin: 14px 0 20px;
}
.comparison-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.comparison-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 22px;
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
}
.comparison-card .eyebrow {
  color: #6b5426;
  font-size: 0.8rem;
  letter-spacing: 0.08em;
}
.comparison-card .portrait-compact {
  width: 104px;
  margin: 16px 0;
}
.comparison-card h3 {
  font-size: 1.8rem;
  line-height: 1.1;
  margin-bottom: 20px;
}
.comparison-card dl {
  width: 100%;
  margin: 0;
}
.comparison-card dt {
  font-weight: 600;
  font-size: 0.875rem;
  margin-top: 16px;
}
.comparison-card dd {
  margin: 4px 0 0;
  font-size: 0.9375rem;
  line-height: 1.5;
}
.comparison-card .text-button {
  color: #245d53;
  margin-top: auto;
  padding-top: 20px;
  min-height: 44px;
}
.comparison-card .text-button:focus-visible {
  outline-color: #245d53;
}
.home-return {
  text-align: center;
  padding-bottom: 52px;
}
.home-return .eyebrow {
  justify-content: center;
}
.home-return h2 {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
}
.home-return > p:not(.eyebrow) {
  color: #c7d5cf;
  margin: 14px 0 24px;
}
.home-return .button {
  margin-top: 4px;
}
@media (max-width: 800px) {
  .comparison-grid {
    grid-template-columns: 1fr;
  }
  .comparison-card .portrait-compact {
    float: right;
    width: 84px;
    margin: 0 0 16px 16px;
  }
  .comparison-card dl {
    clear: both;
  }
  .match-comparison {
    padding: 18px;
  }
}
@media (max-width: 400px) {
  .alternate {
    grid-template-columns: 48px minmax(0, 1fr);
  }
  .alternate .portrait-compact {
    width: 48px;
  }
  .comparison-card {
    padding: 18px;
  }
}
/* Share buttons sit right under the match card, so phones don't need a long scroll to reach them */
.result-main .result-controls {
  margin: 22px 0 0;
}
.alternate-why {
  font-size: 0.95rem !important;
  line-height: 1.5;
  color: #dde7e2 !important;
}

/* === 10. Hand-made hero (round 6: replaced the AI painting) ===============================
   An old map drawn in code (src/js/hero-art.mjs) behind the text, and three example result
   cards fanned on the right. Same line-art language as the class crests. */
.brand-mark {
  width: 44px;
  height: 44px;
  color: var(--gold);
  flex: none;
}
.intro {
  background:
    radial-gradient(ellipse 60% 70% at 78% 45%, #1c4a4a 0%, #0f3033 45%, transparent 80%),
    var(--deep);
  gap: 40px;
  padding-right: 6%;
}
.intro:after {
  background: linear-gradient(90deg, #091f22 0%, #091f22cc 30%, #091f2233 60%, transparent 80%);
}
.intro-map {
  position: absolute;
  inset: 0;
  z-index: -2;
  width: 100%;
  height: 100%;
}
.map-label {
  letter-spacing: 0.04em;
}
.intro-content {
  max-width: 720px;
  margin: 0;
  flex: 1 1 auto;
}
.quiz-meta {
  list-style: none;
  padding: 0;
  flex-wrap: wrap;
  gap: 8px 22px;
}
.quiz-meta li + li:before {
  content: '◆';
  font-size: 0.5rem;
  vertical-align: 2px;
  margin-right: 22px;
  color: var(--gold);
  opacity: 0.7;
}
.intro-peek {
  position: relative;
  flex: 0 0 440px;
  height: 470px;
  margin-left: auto;
}
.peek-card {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  width: 290px;
  padding: 22px 24px 24px;
  border-radius: 10px;
  background: linear-gradient(160deg, #173a3c, #0d2a2c);
  border: 1px solid #e4b96355;
  box-shadow: 0 18px 40px #0008;
  color: var(--text);
}
.peek-card:before {
  content: '';
  position: absolute;
  inset: 6px;
  border: 1px solid #e4b96322;
  border-radius: 6px;
  pointer-events: none;
}
.peek-crest {
  color: var(--gold);
  margin-bottom: 6px;
}
.peek-meta {
  font-size: 0.75rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faction, var(--muted));
}
.peek-name {
  font-family: var(--display);
  font-size: 1.9rem;
  font-weight: 600;
  line-height: 1.05;
}
.peek-line {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--gold);
}
.peek-why {
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid #e4b96333;
  font-size: 0.9rem;
  line-height: 1.45;
  color: #d3ded6;
}
.intro-peek {
  height: 540px;
  flex-basis: 470px;
}
.peek-1,
.peek-2 {
  width: 240px;
  padding: 18px 20px 20px;
}
.peek-1 .peek-name,
.peek-2 .peek-name {
  font-size: 1.55rem;
}
.peek-1 .peek-line,
.peek-2 .peek-line {
  font-size: 1.05rem;
}
.peek-1 {
  top: 0;
  left: -20px;
  transform: rotate(-7deg);
  opacity: 0.85;
}
.peek-2 {
  top: 24px;
  right: -20px;
  transform: rotate(6deg);
  opacity: 0.92;
}
.peek-3 {
  top: 190px;
  left: 70px;
  width: 320px;
  transform: rotate(-1.5deg);
}
.peek-caption {
  position: absolute;
  bottom: 0;
  left: 84px;
  margin: 0;
  font-family: var(--display);
  font-style: italic;
  font-size: 1rem;
  color: #c7d5cf;
}
.site-footer p {
  margin: 0;
}
@media (max-width: 1100px) {
  .map-label {
    display: none;
  }
  .intro {
    flex-direction: column;
    align-items: stretch;
    padding-right: 0;
    gap: 0;
  }
  .intro-content {
    max-width: none;
  }
  .intro-peek {
    flex: none;
    height: auto;
    margin: 0 5% 48px;
    display: flex;
    justify-content: center;
  }
  .peek-1,
  .peek-2 {
    display: none;
  }
  .peek-3 {
    position: relative;
    top: 0;
    left: 0;
    width: min(100%, 420px);
    transform: none;
  }
  .peek-caption {
    position: static;
    align-self: flex-end;
  }
  .intro-peek {
    flex-direction: column;
    align-items: center;
    gap: 8px;
  }
}
@media (max-width: 700px) {
  .intro {
    min-height: 0;
    align-items: stretch;
  }
  .intro:after {
    background: linear-gradient(0deg, #091f22 0%, #091f22cc 45%, #091f2266 100%);
  }
  .intro-content {
    padding-top: 56px;
  }
  .brand-mark {
    width: 36px;
    height: 36px;
  }
  .quiz-meta {
    justify-content: center;
    gap: 6px 14px;
  }
  .quiz-meta li + li:before {
    margin-right: 14px;
  }
  .intro-aside br {
    display: none;
  }
}

/* Round 7: newcomer glossary on the result, and class nicknames outside the result hero. */
.glossary {
  margin: 14px 0 18px;
  padding: 10px 14px;
  border-radius: 6px;
  background: #e9e3d1;
  color: #2c3b37;
  font-size: 0.92rem;
  line-height: 1.5;
}
.dialog-nickname,
.shared-nickname {
  font-family: var(--display);
  font-style: italic;
  font-size: 1.3rem;
  color: var(--gold);
  margin: 0 0 8px;
}
dialog .dialog-nickname {
  color: #7a5a1c;
}
/* Round 7: the compact combo cards are links already, so their "See the profile" is plain text,
   which keeps the list about as tall as the Undead Paladin feature beside it. */
.spotlight-list .spot-link {
  border: 0;
  padding: 0;
  margin-top: 2px;
  justify-self: start;
}
.spot-feature .spot-link {
  justify-self: center;
}

/* Round 8: the class description on the parchment card was pale grey on cream. */
.match-card .result-description {
  color: #2c3b37;
}

/* Launch check: a line said once above the three comparison cards, and a plain note under
   the leanings when most dots sit near the middle. */
.match-comparison > .comparison-shared {
  margin: 12px 0 0;
  color: var(--muted);
}
.traits-note {
  margin-top: 16px;
  color: var(--muted);
}

.story-seed {
  margin-top: 14px;
  padding: 10px 14px;
  border-left: 3px solid var(--gold);
  background: rgba(228, 185, 99, 0.12);
  border-radius: 0 6px 6px 0;
}

/* Release check: comfortable touch targets and no wrapped arrows on small phones. */
.traits-card summary,
.referral summary,
.setup-extras summary,
.match-comparison > summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.traits-card summary::before,
.referral summary::before,
.setup-extras summary::before,
.match-comparison > summary::before {
  content: '▸';
  transition: transform 0.15s;
}
.traits-card[open] summary::before,
.referral[open] summary::before,
.setup-extras[open] summary::before,
.match-comparison[open] > summary::before {
  transform: rotate(90deg);
}
.traits-card summary::-webkit-details-marker,
.referral summary::-webkit-details-marker,
.setup-extras summary::-webkit-details-marker,
.match-comparison > summary::-webkit-details-marker {
  display: none;
}
.traits-card summary,
.referral summary,
.setup-extras summary,
.match-comparison > summary {
  list-style: none;
}
.referral summary {
  justify-content: center;
}
.referral a {
  display: inline-block;
  padding: 10px 4px;
}
.alternate button,
.spot-link {
  white-space: nowrap;
}
@media (max-width: 359px) {
  select {
    font-size: 0.94rem;
  }
}
