/* =============================================================================
   WORDHOARD THEME  ·  v1  ·  2026-07-29
   The house style for every room of The Word Hoard.

   Type:   IM Fell English / IM Fell English SC / Courier Prime
   Colour, rhythm and ornament: the "specimen H" scheme.

   HOW TO ADOPT
     Front door and Florilegium already use these exact token names, so linking
     this file (or pasting it above the room's own <style>) rethemes them whole.
     Rooms with older token names need the alias block at the foot of this file.

   RULE: a room may override tokens for its own needs, but should not redefine
   the type stacks. One suite, one voice.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=IM+Fell+English:ital@0;1&family=IM+Fell+English+SC&family=Courier+Prime:wght@400;700&display=swap');
/* ── HYBRID — Gemini B's Fell types in Gemini A's palette and layout ────────
   Type from specimen GB. Colour, rhythm and ornament from specimen G.
   Every place G called for synthetic small caps now uses the real Fell SC cut. */
:root {
  --parchment:      #f9f6f0;   /* G: cleaner, cool-warm off-white */
  --parchment-deep: #eeeae1;   /* G: subtle shift for panels */
  --ink:            #2b2621;   /* G: soft but dense black */
  --ink-soft:       #5b5247;   /* G: dark taupe */
  --oxblood:        #872e26;   /* G: dried blood */
  --gold:           #7a6021;   /* G: darkened brass */
  --rule:           #d4c8b8;   /* G: delicate separator */
  --serif:    "IM Fell English", "Palatino Linotype", Palatino, Georgia, serif;
  --serif-sc: "IM Fell English SC", "IM Fell English", Georgia, serif;
  --mono:     "Courier Prime", ui-monospace, "SFMono-Regular", Consolas, monospace;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
/* root carries the scale so the breakpoint moves everything together;
   20px sits between G's 19 and GB's 21 — Fell sets small and needs the room,
   but G's layout is airier than GB's and does not want the full 21. */
html { font-size: 20px; }
body {
  background: var(--parchment);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1rem;
  line-height: 1.58;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
main { max-width: 34rem; margin: 0 auto; padding: 4rem 1.5rem 5rem; }   /* ≈66 characters */

/* ── TYPOGRAPHY — G's scale and centring, cut in Fell SC ─────────────── */
h1 {
  font-family: var(--serif-sc);
  font-size: 2.369rem; letter-spacing: .04em; line-height: 1.08;
  font-weight: 400; text-align: center;
}
h2 {
  font-family: var(--serif-sc);
  font-size: 1.333rem; letter-spacing: .07em; font-weight: 400;
  margin: 2.5rem 0 1rem;
}
h3 { font-size: 1.1rem; font-weight: 400; font-style: italic; margin: 1.5rem 0 .25rem; }
p { margin-bottom: 1.15em; }
a { color: var(--oxblood); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
small { font-size: .85rem; color: var(--ink-soft); }
/* G's rule: a hairline that fades out at both ends rather than butting the margin */
hr {
  border: 0; height: 1px; margin: 3rem 0;
  background: linear-gradient(to right, transparent, var(--rule) 20%, var(--rule) 80%, transparent);
}

/* ── SPECIFIC ELEMENTS ─────────────── */
.hoard-mark { text-align: center; color: var(--gold); font-size: 1.5rem; margin-bottom: 1.5rem; }
.epigraph { text-align: center; font-style: italic; color: var(--ink-soft); margin-top: 1.5rem; font-size: 1.05rem; }
.epigraph cite {
  display: block; font-family: var(--serif-sc); font-style: normal;
  font-size: .9rem; letter-spacing: .09em; color: var(--gold); margin-top: .5rem;
}
.lede { font-size: 1.15rem; color: var(--ink-soft); line-height: 1.5; }
.kicker {
  font-family: var(--serif-sc); font-size: .9rem; letter-spacing: .13em;
  color: var(--gold); margin-bottom: .2rem;
}

/* ── ROOMS & CARDS — G's double-ruled bookplate ─────────────── */
.rooms { list-style: none; display: grid; gap: 1.25rem; margin: 1.5rem 0; }
.room, .card { border: 3px double var(--rule); background: var(--parchment-deep); padding: 1.5rem; }
.room h3 { margin: 0 0 .25rem; font-family: var(--serif-sc); font-size: 1.25rem; font-style: normal; letter-spacing: .02em; }
.room h3 a { color: var(--ink); text-decoration: none; }
.room h3 a:hover { color: var(--oxblood); }
.room .gloss { font-style: italic; color: var(--ink-soft); font-size: .95rem; }
.room p.desc { margin: .75rem 0 0; font-size: 1rem; }
.room .go {
  display: inline-block; margin-top: .75rem; font-family: var(--serif-sc);
  font-size: .95rem; letter-spacing: .07em; color: var(--oxblood); text-decoration: none;
}
.room .go::after { content: " \2192"; font-family: sans-serif; font-size: .8em; }

/* ── UI CONTROLS ─────────────── */
.btn {
  display: inline-block; font-family: var(--serif-sc); font-size: 1rem;
  letter-spacing: .08em; background: var(--ink); color: var(--parchment);
  border: 1px solid var(--ink); padding: .55rem 1.5rem; cursor: pointer;
  text-decoration: none; transition: background .2s ease, color .2s ease;
}
.btn:hover { background: var(--oxblood); border-color: var(--oxblood); }
/* G had the ghost border on --rule, 1.53:1 — below the 3:1 WCAG 1.4.11 asks
   for the visual boundary of a control. --ink-soft is 7.10:1. */
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink-soft); }
.btn.ghost:hover { background: var(--ink); color: var(--parchment); border-color: var(--ink); }

/* ── TABLES & FIGURES ─────────────── */
table { border-collapse: collapse; width: 100%; font-size: .95rem; margin: 1.5rem 0; }
th, td { text-align: left; padding: .7rem .5rem; border-bottom: 1px solid var(--rule); }
th { font-family: var(--serif-sc); font-size: .9rem; letter-spacing: .08em; color: var(--ink-soft); font-weight: 400; }
td.num { font-family: var(--mono); text-align: right; font-size: .88rem; }
blockquote {
  margin: 2rem 0; padding-left: 1.5rem; border-left: 2px solid var(--gold);
  font-style: italic; color: var(--ink-soft); font-size: 1.05rem;
}
blockquote cite {
  display: block; font-family: var(--serif-sc); font-style: normal;
  font-size: .88rem; letter-spacing: .05em; color: var(--gold); margin-top: .5rem;
}
blockquote cite::before { content: "\2014 "; }
.note { background: var(--parchment-deep); border-left: 4px solid var(--rule);
  padding: 1.25rem 1.5rem; font-size: .95rem; color: var(--ink-soft); margin: 1.5rem 0; }
.fine { font-size: .85rem; color: var(--ink-soft); line-height: 1.5; }
.mono { font-family: var(--mono); font-size: .85rem; }
.stats {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
  gap: 1px; background: var(--rule); border: 1px solid var(--rule); margin: 2rem 0;
}
.stat { background: var(--parchment); padding: 1.25rem; text-align: center; }
.stat b { display: block; font-family: var(--mono); font-size: 1.45rem; font-weight: 400; color: var(--ink); }
.stat span { font-family: var(--serif-sc); font-size: .85rem; letter-spacing: .08em; color: var(--ink-soft); }

/* ── FORMS ─────────────── */
label { display: block; font-size: .9rem; color: var(--ink-soft); margin: 1.2rem 0 .3rem; }
input[type=text], input[type=email], select {
  font-family: inherit; font-size: 1rem; padding: .55rem .8rem;
  border: 1px solid var(--ink-soft); background: var(--parchment-deep);
  color: var(--ink); width: 100%; max-width: 22rem;
}
input:focus, select:focus { outline: none; border-color: var(--gold); background: var(--parchment); }

/* ── FOOTER & ORNAMENT ─────────────── */
footer { border-top: 1px solid var(--rule); margin-top: 4rem; padding: 2rem 0 4rem;
  text-align: center; color: var(--ink-soft); font-size: .9rem; }
footer .af { font-style: italic; color: var(--oxblood); }
.ornament { text-align: center; margin: 3rem 0; color: var(--gold); font-size: 1.5rem; }

/* ── ACCESSIBILITY & PRINT ─────────────── */
a:focus-visible, .btn:focus-visible, .room .go:focus-visible,
button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 2px solid var(--oxblood); outline-offset: 2px;
}
@media print {
  body { background: #fff; color: #000; font-size: 11pt; }
  main { max-width: none; padding: 0; }
  .btn, .room .go { display: none; }
  .stats { border-color: #999 } .stat { background: #fff }
  .room, .card { border: 1px solid #000; break-inside: avoid; }
}
@media (max-width: 480px) { html { font-size: 18px; } main { padding: 2.5rem 1.25rem; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important } }

/* =============================================================================
   ALIASES — for rooms whose tokens predate the contract.
   Include this block in those rooms only; harmless everywhere.
   ========================================================================== */
:root{
  --parchment-dark: var(--parchment-deep);  /* KCCS */
  --crimson:        var(--oxblood);         /* KCCS */
  --accent:         var(--oxblood);         /* Armarium */
  --paper:          var(--parchment);       /* older rooms */
  --rule-2:         var(--rule);
}
