/* =========================================================
   Riddles in the Dark — shared stylesheet
   Aesthetic: light editorial · warm ivory · antique gold
   Type: Cormorant Garamond (display) + EB Garamond (body)

   NOTE: quiz.js and quiz.css read these CSS variables
   (--gold, --ink, --rule-soft, --card-bg, --quiz-accent, …).
   The variable NAMES are preserved on purpose; only values change.
   ========================================================= */

/* ---------- Self-hosted webfonts ----------
   Served from /fonts instead of fonts.googleapis.com so that no visitor IP is
   sent to Google (GDPR). Both families are SIL Open Font License 1.1; the
   licence travels with them in fonts/OFL.txt.

   Cormorant Garamond and EB Garamond upright are variable fonts, so one file
   covers a weight RANGE. EB Garamond italic ships static at 400 — that is what
   Google served too, so italic body text is unchanged.
   unicode-range is Google's own, so a subset downloads only when a glyph in it
   is actually used. */
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/cormorant-garamond-normal-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: 'Cormorant Garamond';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/cormorant-garamond-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url('fonts/cormorant-garamond-italic-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: 'Cormorant Garamond';
  font-style: italic;
  font-weight: 400 500;
  font-display: swap;
  src: url('fonts/cormorant-garamond-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'EB Garamond';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/eb-garamond-normal-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: 'EB Garamond';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('fonts/eb-garamond-normal-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'EB Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/eb-garamond-italic-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: 'EB Garamond';
  font-style: italic;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/eb-garamond-italic-latin-ext.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* ---- Core palette (from the mockups) ---- */
  --ivory:        #f7f3ea;
  --ivory-hi:     #fbf8f1;
  --sand:         #efe9db;
  --sand-deep:    #e7ddc9;
  --ink:          #2c2823;   /* headings / near-black text; also the black rules */
  --ink-soft:     #6f6252;
  --ink-faint:    #9a8a72;
  --gold:         #b0894f;
  --gold-deep:    #8a6a39;
  --gold-bright:  #c6a267;
  --charcoal:     #26221d;
  --border:       #e3dccb;
  --rule:         #d9d1c0;
  --rule-soft:    #e6dfce;

  /* ---- Compatibility aliases (older classes + quiz engine) ---- */
  --parchment:      var(--ivory);
  --parchment-soft: var(--sand);
  --parchment-deep: var(--sand-deep);
  --parchment-dim:  var(--ink-faint);
  --card-bg:        var(--ivory-hi);
  --card-border:    var(--border);
  --shadow:         rgba(60, 46, 26, 0.10);
  --leather:        var(--gold);
  --leather-deep:   var(--gold-deep);
  --moss:           var(--gold);
  --forest:         #5a7150;
  --forest-deep:    #43563a;
  --oxblood:        #a9553f;

  /* ---- Quiz difficulty tiers ---- */
  --tier-normal:      #8a6a39;   /* gold-deep — the blue tier was dropped in favour of a warm bronze */
  --tier-normal-soft: rgba(138, 106, 57, 0.35);
  --tier-hard:        #4a6140;
  --tier-hard-soft:   rgba(74, 97, 64, 0.35);

  /* ---- Type ---- */
  --font-head: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  --font-body: "EB Garamond", Georgia, "Times New Roman", serif;
  --font-ui:   "EB Garamond", Georgia, serif;

  --measure: 1120px;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scrollbar-gutter: stable; }  /* smooth scrolling handled in JS (see index.html) */

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink-soft);
  font-family: var(--font-body);
  font-size: 1.04rem;
  line-height: 1.6;
  background-color: var(--ivory);
  background-image:
    radial-gradient(120% 70% at 50% -10%, rgba(255, 252, 244, 0.8) 0%, rgba(255, 252, 244, 0) 60%);
  background-attachment: fixed;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--gold-deep); text-decoration: none; transition: color 0.15s ease; }
a:hover { color: var(--gold); }
h1, h2, h3, h4 { color: var(--ink); font-family: var(--font-head); font-weight: 500; }

/* ---------- Layout ---------- */
.container { width: 100%; max-width: var(--measure); margin: 0 auto; padding: 0 1.75rem; }
main { padding: 2rem 0 2.5rem; }

/* ---------- Shared eyebrow ---------- */
.eyebrow {
  font-family: var(--font-ui);
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--ink-faint);
}
.eyebrow--accent { color: var(--gold-deep); }

/* ---------- Header / Nav (light, thin, black content-width rule) ---------- */
.site-header { position: sticky; top: 0; z-index: 60; background: var(--ivory); }
.site-header .container {
  display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between;
  gap: 0.6rem 1.5rem; padding-top: 0.85rem; padding-bottom: 0.85rem;
  border-bottom: 1px solid var(--ink);
}

.brand {
  font-family: var(--font-head); font-weight: 500; font-size: 1.7rem;
  letter-spacing: 0.01em; color: var(--ink); white-space: nowrap;
}
.brand::before {
  content: ""; display: inline-block; width: 0.5em; height: 0.5em;
  margin-right: 0.7rem; transform: rotate(45deg);
  border: 1.6px solid var(--gold); vertical-align: 0.08em;
}
.brand:hover { color: var(--gold-deep); }
.brand .brand-mark { color: inherit; }

.nav { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.35rem 1.6rem; list-style: none; margin: 0; padding: 0; }
.nav a {
  font-family: var(--font-ui); font-size: 0.78rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ink-soft); padding-bottom: 3px; border-bottom: 1.5px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.nav a:hover, .nav a.active { color: var(--gold-deep); border-bottom-color: var(--gold); }
.nav .nav-end { margin-left: 0.25rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; font-family: var(--font-ui);
  font-size: 0.74rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  padding: 0.72rem 1.65rem; border: 1px solid var(--gold); border-radius: 2px;
  color: var(--gold-deep); background: transparent; cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}
.btn:hover { background: var(--gold); color: #fff; border-color: var(--gold); }
.btn--solid { background: var(--charcoal); border-color: var(--charcoal); color: var(--ivory); }
.btn--solid:hover { background: #000; border-color: #000; color: var(--ivory); }
.btn--ghost { background: transparent; border-color: var(--gold); color: var(--gold-deep); }
.btn--block { display: block; width: 100%; text-align: center; }
.btn[aria-disabled="true"], .btn:disabled {
  border-color: var(--rule); color: var(--ink-faint); cursor: not-allowed; opacity: 0.7; background: transparent;
}
.btn[aria-disabled="true"]:hover { background: transparent; color: var(--ink-faint); }

/* ---------- Hero (Well met!) ---------- */
.hero { text-align: center; padding: 1.5rem 0 1.25rem; }
.ring-mark { margin: 0 auto 1.4rem; width: 64px; height: 64px; opacity: 0.9; }
.hero h1 { font-family: var(--font-head); font-weight: 500; font-size: clamp(2rem, 4.6vw, 3rem); line-height: 1.06; margin: 0 0 0.6rem; color: var(--ink); }
.hero .tagline { font-size: 1.1rem; font-style: italic; color: var(--ink-soft); max-width: 32rem; margin: 0 auto; }
.hero-cta {
  display: inline-block; margin-top: 1.8rem; padding: 0.72rem 2.1rem;
  font-family: var(--font-ui); font-weight: 600; font-size: 0.74rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--ivory); background: var(--charcoal); border: 1px solid var(--charcoal); border-radius: 2px; transition: background 0.15s ease;
}
.hero-cta:hover { color: var(--ivory); background: #000; }
.hero-latest { margin-top: 1.3rem; font-family: var(--font-ui); font-size: 0.8rem; letter-spacing: 0.06em; color: var(--ink-faint); }
.hero-latest .star { color: var(--gold); }
.hero-latest .lbl { color: var(--gold-deep); text-transform: uppercase; letter-spacing: 0.16em; font-weight: 600; }
.hero-latest .name { color: var(--ink-soft); }
/* The "Latest" name is a link to the newest quiz; the two-class selector above
   would otherwise beat a:hover, leaving it looking like plain text. */
.hero-latest a.name { border-bottom: 1px solid var(--rule); }
.hero-latest a.name:hover { color: var(--gold-deep); border-bottom-color: var(--gold); }
.hero-latest .date { color: var(--ink-faint); }

/* ---------- One-page sections + content-width separator rules ---------- */
section[id] { scroll-margin-top: 70px; }
.page-section { padding: 0; }
.page-section > .container { border-top: 1px solid var(--rule); padding-top: 2.75rem; padding-bottom: 2.75rem; }

.section-head { display: flex; align-items: baseline; gap: 1.1rem; margin: 0 0 1.4rem; }
.section-head .eyebrow { flex: 0 0 auto; }
.section-head h2 { font-size: clamp(1.4rem, 2.8vw, 1.95rem); font-weight: 500; margin: 0; }
.section-lead { color: var(--ink-soft); max-width: 46rem; margin: 0 0 2rem; font-size: 1.02rem; }

/* Quiz catalog */
/* Two lead paragraphs here (the flavour line, then the grading note) — identical
   styling; the first just sits closer so the pair reads as one block. */
#quizzes .section-lead { margin-bottom: 0.5rem; }
#quizzes .section-lead:last-of-type { margin-bottom: 2rem; }
.quiz-catalog { display: flex; flex-direction: column; gap: 1.7rem; }

/* Each group carries its own tier colour via --tier / --tier-soft. */
.cat-group { --tier: var(--gold); --tier-soft: var(--rule); }
.cat-group--normal { --tier: var(--tier-normal); --tier-soft: var(--tier-normal-soft); }
.cat-group--hard   { --tier: var(--tier-hard);   --tier-soft: var(--tier-hard-soft); }

.cat-head { display: flex; align-items: center; gap: 0.9rem; margin: 0 0 0.35rem; }
.cat-head h3 { font-family: var(--font-head); font-weight: 500; font-size: 1.35rem; color: var(--ink); margin: 0; }
.cat-head .cat-rule { flex: 1; height: 1px; background: var(--tier-soft); }
.cat-head .cat-note { font-family: var(--font-ui); font-size: 0.68rem; font-weight: 600; letter-spacing: 0.18em; text-transform: uppercase; color: var(--tier); }

/* One line per quiz — a table of contents rather than a wall of cards.
   Numbering restarts inside each difficulty group. The dotted leader is a
   flex spacer, so it always reaches exactly to the question count. */
.cat-list { display: flex; flex-direction: column; }

.cat-row {
  display: flex; align-items: baseline; gap: 0.85rem;
  padding: 0.6rem 0.35rem 0.55rem;
  border-bottom: 1px solid var(--rule-soft);
  color: var(--ink);
  transition: background 0.15s ease;
}
.cat-row:hover { background: var(--ivory-hi); color: var(--ink); }
.cat-row:hover .q-title { color: var(--tier); }
.cat-row:focus-visible { outline: 2px solid var(--tier); outline-offset: 2px; }
.cat-row .q-num { font-family: var(--font-ui); font-size: 0.72rem; letter-spacing: 0.1em; color: var(--tier); min-width: 1.5rem; font-variant-numeric: tabular-nums; }
.cat-row .q-title { font-family: var(--font-head); font-size: 1.26rem; line-height: 1.2; white-space: nowrap; transition: color 0.15s ease; }
.cat-row .q-leader { flex: 1; min-width: 1.5rem; border-bottom: 1px dotted var(--rule); transform: translateY(-0.32em); }
.cat-row .q-count { font-size: 0.84rem; font-style: italic; color: var(--ink-faint); white-space: nowrap; }

/* ---------- Three-column editorial (About 4.2/4.3/4.4) ---------- */
.about-lead { max-width: 46rem; margin: 0 0 2.75rem; }
.about-lead p { margin: 0 0 1rem; color: var(--ink-soft); }
.cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2.5rem; margin-top: 0.5rem; }
.col .col-rule { display: block; height: 1px; background: var(--rule); margin-bottom: 1.2rem; }
.col .numeral { font-family: var(--font-head); font-weight: 500; font-size: 1.9rem; line-height: 1; color: var(--gold); display: block; margin-bottom: 0.7rem; }
.col h3 { font-family: var(--font-head); font-weight: 500; font-size: 1.25rem; color: var(--ink); margin: 0 0 0.6rem; }
.col p { margin: 0; color: var(--ink-soft); font-size: 0.98rem; line-height: 1.58; }

/* ---------- Divider ---------- */
.divider { display: flex; align-items: center; gap: 1.1rem; margin: 2.25rem auto; max-width: 24rem; color: var(--gold); }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--gold) 45%, var(--gold) 55%, transparent); }
.divider .glyph { font-size: 0.8rem; opacity: 0.9; letter-spacing: 0.3em; }

/* ---------- Card grid (orphaned listing pages) ---------- */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1.6rem; }
.card {
  position: relative; display: flex; flex-direction: column;
  background: var(--sand); border: 1px solid var(--border); border-radius: 4px;
  padding: 1.7rem 1.6rem 1.5rem;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
a.card:hover { transform: translateY(-3px); box-shadow: 0 12px 26px var(--shadow); border-color: var(--gold); }
.card .eyebrow { margin-bottom: 0.55rem; }
.card h3 { font-family: var(--font-head); font-weight: 500; font-size: 1.35rem; margin: 0 0 0.45rem; color: var(--ink); }
.card p { margin: 0 0 1.2rem; color: var(--ink-soft); font-size: 1rem; }
.card .card-meta { margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.card .card-badge { font-family: var(--font-ui); font-size: 0.64rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-deep); border: 1px solid var(--gold); padding: 0.26rem 0.66rem; border-radius: 2px; }
.card .card-count { font-size: 0.88rem; font-style: italic; color: var(--ink-faint); }
.card .card-cta { margin-top: 1.1rem; font-family: var(--font-ui); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-deep); }
a.card:hover .card-cta { color: var(--gold); }

/* ---------- Page intro (orphaned listing pages) ---------- */
.section-title { font-family: var(--font-head); font-weight: 500; font-size: 1.6rem; text-align: center; color: var(--ink); margin: 0 0 0.4rem; }
.section-intro { text-align: center; color: var(--ink-soft); max-width: 40rem; margin: 0 auto 2.25rem; }
.page-head { margin-bottom: 2.25rem; }
.page-head .eyebrow { display: block; margin-bottom: 0.45rem; color: var(--gold-deep); }
.page-head h1 { font-family: var(--font-head); font-weight: 500; font-size: clamp(1.7rem, 3.5vw, 2.4rem); margin: 0 0 0.6rem; color: var(--ink); }
.page-head p { color: var(--ink-soft); max-width: 42rem; margin: 0; }

/* ---------- Prose ---------- */
.prose { max-width: 42rem; }
.prose p { margin: 0 0 1.1rem; }
.prose h2 { font-family: var(--font-head); font-weight: 500; font-size: 1.3rem; margin: 1.8rem 0 0.55rem; color: var(--ink); }

/* ---------- Contact form ---------- */
.form-wrap { max-width: 42rem; margin: 0 auto; }
.form-intro { color: var(--ink-soft); margin: 0 0 1.4rem; }
.form-callout { background: var(--sand); border: 1px solid var(--border); border-left: 3px solid var(--gold); border-radius: 4px; padding: 0.8rem 1.1rem; margin: 0 0 1.8rem; font-size: 0.98rem; color: var(--ink-soft); }
.form-callout a { color: var(--gold-deep); font-weight: 600; }
.form-field { margin-bottom: 1.15rem; }
.form-field label { display: block; font-family: var(--font-ui); font-size: 0.74rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 0.4rem; }
.form-field .form-hint { font-family: var(--font-body); font-size: 0.9rem; letter-spacing: 0; text-transform: none; font-style: italic; color: var(--ink-faint); }
.form-field .form-req { color: var(--gold-deep); }
.form-field input, .form-field textarea { width: 100%; font-family: var(--font-body); font-size: 1rem; color: var(--ink); padding: 0.62rem 0.9rem; background: var(--ivory-hi); border: 1.5px solid var(--border); border-radius: 3px; }
.form-field textarea { resize: vertical; min-height: 7rem; line-height: 1.55; }
.form-field input:focus, .form-field textarea:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 2px rgba(176, 137, 79, 0.15); }
.form-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-submit { display: block; width: 100%; margin-top: 0.4rem; padding: 0.78rem 1.4rem; font-family: var(--font-ui); font-weight: 600; font-size: 0.76rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ivory); background: var(--charcoal); border: 1px solid var(--charcoal); border-radius: 2px; cursor: pointer; transition: background 0.15s ease, transform 0.1s ease; }
.form-submit:hover:not(:disabled) { background: #000; transform: translateY(-1px); }
.form-submit:disabled { opacity: 0.6; cursor: not-allowed; }
.form-status { margin: 0.9rem 0 0; font-size: 0.98rem; min-height: 1.4rem; }
.form-status.is-pending { color: var(--ink-soft); font-style: italic; }
.form-status.is-error { color: var(--oxblood); }
.form-status.is-success { color: var(--forest-deep); font-weight: 600; }

/* ---------- Contact section: vertical compaction (~18% shorter) ----------
   Deliberately scoped to #contact. The .form-* rules above are SHARED with the
   in-quiz "report a mistake" form (quiz.css relies on inheriting them), which
   keeps the roomier spacing — so none of this may be folded into the base rules.
   Paired with rows="5" on #cf-message in index.html. */
#contact > .container { padding-top: 2rem; padding-bottom: 2rem; }
#contact .section-head { margin-bottom: 1rem; }
#contact .section-lead { margin-bottom: 1rem; }
#contact .form-callout { padding: 0.65rem 1.1rem; margin-bottom: 1.1rem; }
#contact .form-field { margin-bottom: 0.8rem; }
#contact .form-field label { margin-bottom: 0.25rem; }
#contact .form-field input,
#contact .form-field textarea { padding: 0.5rem 0.9rem; }
#contact .form-submit { margin-top: 0.3rem; padding: 0.68rem 1.4rem; }
#contact .form-status { margin-top: 0.6rem; min-height: 1.2rem; }
.contact-email { font-family: var(--font-head); font-size: 1.05rem; letter-spacing: 0.01em; padding: 0.8rem 1.1rem; background: var(--sand); border: 1px solid var(--border); border-left: 3px solid var(--gold); border-radius: 4px; }
.contact-email a { color: var(--gold-deep); }

/* ---------- Back link ---------- */
.back-link { display: inline-block; font-family: var(--font-ui); font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 1.4rem; }
.back-link:hover { color: var(--gold-deep); }

/* ---------- Footer (light, thin, black content-width rule) ---------- */
.site-footer { margin-top: 2.5rem; text-align: center; color: var(--ink-faint); font-size: 0.95rem; background: transparent; }
.site-footer .container { border-top: 1px solid var(--ink); padding-top: 1.4rem; padding-bottom: 1.6rem; }
.site-footer .divider { margin: 0 auto 1rem; max-width: 16rem; }
.site-footer a { color: var(--ink-soft); }
.site-footer a:hover { color: var(--gold-deep); }


/* =========================================================
   Motifs — ink-and-watercolour plates from pics/, exported to
   motifs/*.webp with the paper knocked out to transparency.
   One motif per station, never more than a couple in view:
     two trees  · page watermark, fixed, scrolls under everything
     elven star · hero medallion
     sun / moon · Normal and Hard tier marks
     white tree · About plate
     elven ship · Contact plate
   ========================================================= */

/* The Two Trees sit on the paper itself: fixed, so the page scrolls over them.
   The plate is the bare trees — the emblem, starburst and sparkle stars were
   stripped from the export so the watermark reads as texture, not decoration. */
body::before {
  content: "";
  position: fixed;
  top: 3.25rem;
  left: 50%;
  width: min(1040px, 122vw);
  aspect-ratio: 1200 / 928;
  transform: translateX(-50%);
  background: url("motifs/two-trees.webp") center top / contain no-repeat;
  opacity: 0.1;
  mix-blend-mode: multiply;
  pointer-events: none;
  z-index: 0;
}

/* The watermark sits at z-index 0, so the page content is lifted above it
   rather than relying on the body background being propagated to the root. */
main, .site-footer { position: relative; z-index: 1; }

/* Hero medallion (the .ring-mark slot). */
.hero .ring-mark { width: 88px; height: auto; margin: 0 auto 1.3rem; opacity: 0.95; }

/* Tier marks: the Sun for the gentler road, the Moon for the harder one. */
.cat-head .cat-mark { flex: 0 0 auto; width: 1.85rem; height: auto; margin-right: -0.15rem; }

/* Section plates — one per section, tucked into the top-right corner.
   Hidden on narrow screens, where there is no margin to spare. */
.section-plate { display: none; }

@media (min-width: 900px) {
  #about > .container, #contact > .container { position: relative; }
  .section-plate {
    display: block;
    position: absolute;
    top: 3.1rem;
    right: 1.75rem;
    width: 152px;
    height: auto;
    opacity: 0.94;
    filter: drop-shadow(0 6px 14px var(--shadow));
    pointer-events: none;
  }
  /* The ship is placed separately below, in the gutter beside the form. */
  .section-plate--ship { display: none; }
  #about .about-lead, #about .section-lead { max-width: 40rem; }
  #contact .section-lead, #contact .form-callout { max-width: 36rem; }
}

/* The ship sits in the left gutter beside the contact form, level with the
   first field, rather than in the top-right corner like the other plates.
   That gutter exists only because .form-wrap is centred at 42rem inside the
   1120px container: its width is (min(1120,vw) - 56 - 672) / 2, which is a
   mere 86px at the 900px breakpoint above and would put the ship on top of
   the fields. From 1060px up there is ~166px, so the plate is held back
   until then. */
@media (min-width: 1060px) {
  .section-plate--ship {
    display: block;
    width: 132px;
    top: 13rem;
    left: 1.75rem;
    right: auto;
    filter: none;
  }
}

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .cols { grid-template-columns: 1fr; gap: 2rem; }
}
@media (max-width: 720px) {
  /* Long titles need to wrap on a phone, so the leader is dropped and the
     count is pushed to the far end of the row instead. */
  .cat-row { flex-wrap: wrap; gap: 0.35rem 0.7rem; }
  .cat-row .q-title { white-space: normal; }
  .cat-row .q-leader { display: none; }
  .cat-row .q-count { margin-left: auto; }
}
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .site-header .container { flex-direction: column; align-items: center; text-align: center; }
  .nav { justify-content: center; }
  .section-head { flex-direction: column; gap: 0.35rem; }
}
