/* The Unruly — site design system
   Palette and typography modeled on TurfMend (turfmend.com):
   brand greens, purple accent, warm gold, paper neutrals.
   No golf-ball print or pattern backgrounds. Self-hosted OFL fonts. */

:root {
  --ink: #27211E;
  --ink-soft: #3D4A41;
  --ink-faint: #5C6B60;
  --parchment: #F3F5F2;
  --parchment-deep: #E6EDE4;
  --paper: #F7F7F7;
  --cream: #FFFFFF;
  --rule: #D3DCD0;
  --rule-strong: #B7C4B4;
  --gold: #D0AC68;
  --gold-bright: #DCBE7A;
  --gold-soft: #F0E4C4;
  --brand: #388C37;
  --brand-bright: #20850F;
  --brand-deep: #255D25;
  --brand-dark: #132F12;
  --brand-light: #ADD9AD;
  --brand-wash: #EFFAE5;
  --purple: #8922AA;
  --purple-mid: #B06BC4;
  --purple-light: #D4A8E0;
  --purple-soft: #EDD4F4;
  --purple-wash: #F6EAF9;
  --purple-deep: #502161;
  --purple-dark: #281130;
  --terracotta: #388C37;
  --terracotta-deep: #255D25;
  --olive: #255D25;
  --olive-soft: #4B916D;
  --wine: #8922AA;
  --danger: #9A3A3A;
  --sky: #3D4A41;
  --wash: rgba(56, 140, 55, 0.08);
  --shadow: 0 18px 40px -24px rgba(19, 47, 18, 0.45);
  --shadow-soft: 0 8px 24px -16px rgba(19, 47, 18, 0.28);
  --serif-display: "Archivo", "Segoe UI", system-ui, sans-serif;
  --serif: "Work Sans", "Segoe UI", system-ui, sans-serif;
  --sans: "Work Sans", "Segoe UI", system-ui, sans-serif;
  --poem: "Source Serif 4", Georgia, "Times New Roman", serif;
  --radius: 14px;
  --wrap: 1120px;
  --header-h: 4.75rem;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

@font-face { font-family: "Archivo"; src: url("../assets/fonts/archivo_5.2.5_latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("../assets/fonts/archivo_5.2.5_latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("../assets/fonts/archivo_5.2.5_latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("../assets/fonts/archivo_5.2.5_latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("../assets/fonts/archivo_5.2.5_latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Archivo"; src: url("../assets/fonts/archivo_5.2.5_latin-600-italic.woff2") format("woff2"); font-weight: 600; font-style: italic; font-display: swap; }
@font-face { font-family: "Work Sans"; src: url("../assets/fonts/work-sans_5.2.5_latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Work Sans"; src: url("../assets/fonts/work-sans_5.2.5_latin-500-normal.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "Work Sans"; src: url("../assets/fonts/work-sans_5.2.5_latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Work Sans"; src: url("../assets/fonts/work-sans_5.2.5_latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Work Sans"; src: url("../assets/fonts/work-sans_5.2.5_latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("../assets/fonts/source-serif-4_5.2.8_latin-400-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("../assets/fonts/source-serif-4_5.2.8_latin-600-normal.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url("../assets/fonts/source-serif-4_5.2.8_latin-400-italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--sans);
  font-size: 1.0625rem;
  line-height: 1.65;
  color: var(--ink);
  background:
    radial-gradient(1100px 520px at 8% -12%, rgba(56, 140, 55, 0.12), transparent 55%),
    radial-gradient(800px 480px at 108% -8%, rgba(137, 34, 170, 0.05), transparent 50%),
    var(--parchment);
  min-height: 100%;
}
body::before {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 200;
  opacity: 0.03;
  background-image: url("../assets/icons/grain.svg");
  background-size: 280px 280px;
}
img, svg { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-deep); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--brand-dark); }
:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 3px;
  border-radius: 4px;
}
.skip {
  position: absolute;
  left: 1rem;
  top: -4rem;
  background: var(--ink);
  color: var(--cream);
  padding: 0.6rem 1rem;
  z-index: 1000;
  border-radius: 8px;
}
.skip:focus { top: 1rem; }

.wrap {
  width: min(calc(100% - 2.5rem), var(--wrap));
  margin-inline: auto;
}
.wrap-narrow { width: min(calc(100% - 2.5rem), 760px); margin-inline: auto; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, #FFFFFF 92%, transparent);
  backdrop-filter: blur(14px) saturate(1.1);
  -webkit-backdrop-filter: blur(14px) saturate(1.1);
  border-bottom: 0;
  box-shadow: inset 0 -3px 0 0 var(--brand), inset 0 -6px 0 0 var(--purple);
}
.site-header .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(calc(100% - 2.5rem), var(--wrap));
  margin-inline: auto;
  min-width: 0;
}
.menu-toggle { flex-shrink: 0; }
.mark {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
  color: var(--ink);
  min-width: 0;
  flex: 0 1 auto;
}
.mark img {
  display: block;
  max-width: none;
  height: auto;
  width: auto;
  flex-shrink: 0;
}
.mark .logo-header {
  height: 3.35rem;
  width: auto;
  max-height: 3.35rem;
}
.mark .mark-compact { display: none; }
.mark .logo-mark {
  height: 2.55rem;
  width: auto;
  max-height: 2.55rem;
}
.mark .logo-wordmark {
  height: 1.4rem;
  width: auto;
  max-height: 1.4rem;
  flex-shrink: 1;
  min-width: 0;
  max-width: 46vw;
}
.wordmark {
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: 1.35rem;
  letter-spacing: -0.02em;
  line-height: 1;
  font-optical-sizing: auto;
}
.wordmark em { font-style: italic; font-weight: 600; color: var(--brand); }
.site-nav { display: flex; align-items: center; gap: 0.25rem 1.35rem; }
.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--ink); }
.site-nav a[aria-current="page"] { box-shadow: inset 0 -2px 0 var(--purple); color: var(--purple-deep); }
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--rule);
  border-radius: 8px;
  padding: 0.4rem 0.65rem;
  font: inherit;
  font-weight: 600;
  color: var(--ink);
  cursor: pointer;
}

/* Hero */
.hero {
  padding: 2.75rem 0 3.25rem;
  text-align: center;
  position: relative;
}
.kicker {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--purple);
  margin-bottom: 1rem;
}
.hero-logo {
  display: block;
  width: min(20.5rem, 82vw);
  height: auto;
  margin: 0 auto 1.15rem;
}
.hero h1, .hero-tagline {
  font-family: var(--sans);
  font-weight: 600;
  font-size: clamp(1.02rem, 3.4vw, 1.45rem);
  line-height: 1.3;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 1.15rem;
  color: var(--brand-deep);
}
.hero h1 em {
  font-style: italic;
  font-weight: 600;
  color: var(--brand);
}
.lede {
  font-family: var(--serif);
  font-size: clamp(1.15rem, 2.2vw, 1.45rem);
  line-height: 1.5;
  color: var(--ink-soft);
  max-width: 34em;
  margin: 0 auto 1.75rem;
}
.ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.85rem;
  color: var(--gold);
  margin: 1.5rem 0 1.75rem;
}
.ornament::before, .ornament::after {
  content: "";
  width: 4.5rem;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-bright), transparent);
  background: var(--rule-strong);
}
.ornament span { font-size: 0.85rem; letter-spacing: 0.2em; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; justify-content: center; }

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  font-family: var(--sans);
  font-weight: 650;
  font-size: 0.98rem;
  letter-spacing: 0.01em;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.8rem 1.35rem;
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: transform 0.15s var(--ease), background 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
  background: var(--purple);
  color: #fff;
  box-shadow: var(--shadow-soft);
}
.btn-primary:hover { background: var(--brand); color: #fff; }
.btn-secondary {
  background: var(--brand);
  color: #fff;
  box-shadow: var(--shadow-soft);
}
.btn-secondary:hover { background: var(--purple); color: #fff; }
.btn-ghost {
  background: transparent;
  color: var(--purple-deep);
  border-color: var(--purple-light);
}
.btn-ghost:hover { background: var(--purple-wash); color: var(--purple-deep); }
.btn-gold {
  background: var(--brand);
  color: #fff;
}
.btn-gold:hover { background: var(--purple); color: #fff; }

/* Sections */
.section { padding: 3.25rem 0 4rem; }
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
}
.section h2, .page-title {
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: clamp(2rem, 4vw, 2.8rem);
  letter-spacing: -0.03em;
  line-height: 1.1;
  margin: 0 0 0.35rem;
  color: var(--purple-deep);
}
.section .sub, .deck {
  color: var(--ink-soft);
  font-family: var(--serif);
  font-size: 1.15rem;
  margin: 0;
  max-width: 40em;
}

/* Library tools */
.library-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem 1.25rem;
  align-items: center;
  margin-bottom: 1.5rem;
}
.search {
  flex: 1 1 100%;
  max-width: 28rem;
  min-width: min(100%, 16rem);
  position: relative;
}
.search input {
  width: 100%;
  font: inherit;
  font-size: 1rem;
  padding: 0.7rem 1rem 0.7rem 2.5rem;
  border: 1px solid var(--rule);
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink);
}
.search .icon {
  position: absolute;
  left: 0.95rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--ink-faint);
  pointer-events: none;
}
.filters { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.chip {
  font: inherit;
  font-size: 0.88rem;
  font-weight: 650;
  padding: 0.4rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--rule);
  background: transparent;
  color: var(--ink-soft);
  cursor: pointer;
}
.chip:hover { border-color: var(--ink-faint); color: var(--ink); }
.chip[aria-pressed="true"], .chip.is-on {
  background: var(--purple);
  color: #fff;
  border-color: var(--purple-deep);
}
.chip:hover { border-color: var(--purple-mid); color: var(--purple-deep); }

/* Cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.15rem;
}
.card {
  background: var(--cream);
  border: 1px solid color-mix(in srgb, var(--rule) 80%, #fff);
  border-top: 3px solid var(--purple);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: 1.25rem 1.25rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s var(--ease), box-shadow 0.2s var(--ease);
  position: relative;
  min-height: 100%;
}
a.card:hover, a.card:focus-visible {
  transform: translateY(-3px);
  box-shadow: var(--shadow);
  color: inherit;
  outline: none;
}
a.card:focus-visible { box-shadow: var(--shadow), 0 0 0 3px var(--purple-light); }
.card .subject {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--purple);
}
.card h3 {
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: 1.45rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0;
}
.card p { margin: 0; color: var(--ink-soft); flex: 1; }
.card .meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.4rem;
}
.tag {
  font-size: 0.75rem;
  font-weight: 650;
  color: var(--olive);
  background: color-mix(in srgb, var(--olive) 12%, var(--cream));
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
}
.tag.soon {
  color: var(--wine);
  background: color-mix(in srgb, var(--wine) 10%, var(--cream));
}
.card .go {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--purple);
  margin-top: 0.35rem;
}
.card.featured {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.4rem;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--purple-wash) 72%, var(--cream)), var(--cream));
  padding: 1.6rem 1.5rem 1.5rem;
}
@media (min-width: 720px) {
  .card.featured {
    grid-template-columns: 1.3fr 0.9fr;
    align-items: center;
    padding: 2rem 2.1rem;
  }
  .card.featured .go { justify-self: end; }
}
.card.is-hidden { display: none; }
.empty-msg { display: none; text-align: center; color: var(--ink-soft); padding: 2rem; }
.empty-msg.show { display: block; }

/* Pillars / about teaser */
.pillars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1.25rem;
}
.pillar {
  padding: 0.4rem 0.2rem 0.2rem;
}
.pillar h3 {
  font-family: var(--serif-display);
  font-size: 1.4rem;
  margin: 0 0 0.4rem;
  font-weight: 600;
}
.pillar p { margin: 0; color: var(--ink-soft); }

.about-band {
  background: color-mix(in srgb, var(--parchment-deep) 70%, var(--cream));
  border-block: 1px solid var(--rule);
}
.prose { font-family: var(--serif); font-size: 1.12rem; }
.prose h2, .prose h3 { font-family: var(--serif-display); }
.prose p { margin: 0 0 1rem; }
.prose ul, .prose ol { padding-left: 1.2rem; }
.prose li { margin: 0.3rem 0; }
.prose hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin: 2rem 0;
}

/* Footer */
.site-footer {
  border-top: 3px solid var(--brand);
  padding: 2.5rem 0 3rem;
  color: #F4EAF8;
  background: var(--purple-deep);
  font-size: 0.95rem;
}
.site-footer .bar {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
}
.site-footer a { color: #FFFFFF; text-decoration: none; }
.site-footer a:hover { color: var(--brand-light); }
.site-footer p { color: var(--purple-soft); }
.foot-tagline {
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-size: 0.78rem;
  color: #FFFFFF;
  margin: 0 0 0.35rem;
}
.foot-links { display: flex; flex-wrap: wrap; gap: 0.3rem 1.2rem; }

/* Interior pages */
.page-hero { padding: 3rem 0 1.5rem; }
.crumb {
  font-size: 0.88rem;
  color: var(--ink-faint);
  margin-bottom: 1rem;
}
.crumb a { color: var(--ink-soft); text-decoration: none; }
.crumb a:hover { color: var(--ink); }

/* 404 */
.lost { text-align: center; padding: 5rem 0 6rem; }
.lost h1 {
  font-family: var(--serif-display);
  font-size: clamp(2.6rem, 7vw, 5rem);
  letter-spacing: -0.03em;
  margin: 0 0 1rem;
}

/* Course chrome */
.course-main { padding: 1.25rem 0 3rem; }

/* Celebration canvas */
#celebrate {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 150;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .btn:hover, a.card:hover { transform: none; }
}

/* Print */
@media print {
  body::before, .site-header, .site-footer, .hero-actions, .menu-toggle, .skip { display: none !important; }
  body { background: #fff; }
  a { color: inherit; }
}

/* Responsive nav */
@media (max-width: 720px) {
  .mark .logo-header { display: none; }
  .mark .mark-compact {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
  }
  .menu-toggle { display: inline-flex; }
  .site-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    padding: 0.5rem 0 0.8rem;
  }
  .site-header.is-open .site-nav { display: flex; }
  .site-nav a { padding: 0.7rem 1.25rem; }
  .hero { padding-top: 3rem; }
  .wrap, .site-header .bar { width: min(calc(100% - 1.5rem), var(--wrap)); }
}


/* ---------- Poetry room ---------- */
.poem-app { display: grid; gap: 1.25rem; }
@media (min-width: 900px) {
  .poem-app { grid-template-columns: 260px 1fr; align-items: start; }
}
.poem-nav {
  background: var(--cream);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1rem 0.85rem 1.1rem;
  position: sticky;
  top: calc(var(--header-h) + 0.75rem);
  max-height: calc(100vh - var(--header-h) - 1.5rem);
  overflow: auto;
}
.poem-nav h2 { font-size: 0.78rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); margin: 0.8rem 0.6rem 0.35rem; font-family: var(--sans); font-weight: 700; }
.poem-nav h2:first-child { margin-top: 0.15rem; }
.poem-nav a {
  display: block;
  color: var(--ink-soft);
  text-decoration: none;
  padding: 0.28rem 0.6rem;
  border-radius: 8px;
  font-size: 0.95rem;
}
.poem-nav a:hover, .poem-nav a.is-current { background: var(--parchment-deep); color: var(--ink); }
.poem-stage {
  background: var(--cream);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  padding: clamp(1.4rem, 4vw, 2.6rem);
  min-height: 60vh;
}
.poem-stage header h1 {
  font-family: var(--serif-display);
  font-weight: 600;
  font-size: clamp(1.8rem, 4vw, 2.6rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.25rem;
}
.poem-stage .by { font-style: italic; color: var(--ink-faint); margin: 0 0 1.25rem; }
.verse {
  font-family: var(--poem);
  font-size: clamp(1.12rem, 2.2vw, 1.28rem);
  line-height: 1.7;
  white-space: pre-wrap;
  max-width: 38em;
}
.verse .stanza { margin: 0 0 1.15em; }
.poem-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.4rem 0 1.6rem; }
.discuss { border-top: 1px solid var(--rule); padding-top: 1.2rem; }
.discuss h2 { font-family: var(--serif-display); font-size: 1.35rem; margin: 0 0 0.6rem; }
.discuss ol { font-family: var(--poem); padding-left: 1.2rem; }
.quiz-box { margin-top: 1.25rem; }
.quiz-box .opt, .opt {
  display: block;
  width: 100%;
  text-align: left;
  font: inherit;
  margin: 0.4rem 0;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  border: 1px solid var(--rule);
  background: var(--paper);
  cursor: pointer;
}
.quiz-box .opt:hover { border-color: var(--ink-faint); }
.opt.right, .quiz-box .opt.right { background: color-mix(in srgb, var(--olive) 18%, #fff); border-color: var(--olive); }
.opt.wrong, .quiz-box .opt.wrong { background: color-mix(in srgb, var(--danger) 14%, #fff); border-color: var(--danger); }

/* ---------- Times tables & geography interiors ---------- */
.unit-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 0.8rem; }
.unit {
  background: var(--cream);
  border: 1px solid var(--rule);
  border-radius: 12px;
  padding: 1rem 0.8rem;
  text-align: center;
  cursor: pointer;
  font: inherit;
  color: inherit;
}
.unit:hover { border-color: var(--gold); box-shadow: var(--shadow-soft); }
.unit .big { font-family: var(--serif-display); font-size: 2rem; font-weight: 600; display: block; }
.unit:disabled, .unit[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }
.panel, .course-card {
  background: var(--cream);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 1.2rem 1.25rem;
  margin: 0 0 1rem;
  box-shadow: var(--shadow-soft);
}
.flash {
  font-family: var(--serif-display);
  font-size: clamp(2.4rem, 8vw, 4.2rem);
  text-align: center;
  padding: 1.6rem 1rem;
  background: var(--parchment);
  border-radius: 12px;
  user-select: none;
}
input.ans {
  font: inherit;
  font-family: var(--serif-display);
  font-size: 2rem;
  width: 7rem;
  text-align: center;
  border-radius: 10px;
  border: 2px solid var(--rule-strong);
  background: var(--cream);
  color: var(--ink);
}
.chart { border-collapse: collapse; margin: 0 auto; }
.chart th, .chart td {
  border: 1px solid var(--rule);
  width: 2.6rem; height: 2.2rem;
  text-align: center;
  font-size: 0.95rem;
}
.chart th { background: var(--gold-soft); }
.strip { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.strip span, .strip button {
  background: var(--olive);
  color: var(--cream);
  border: 0;
  border-radius: 999px;
  min-width: 2.6rem; height: 2.6rem;
  display: inline-flex; align-items: center; justify-content: center;
  font: inherit; font-weight: 650; cursor: pointer;
}
.strip .hid { background: var(--rule); color: var(--rule); }
.dots { display: inline-grid; gap: 5px; margin: 0.5rem 0; }
.dot { width: 16px; height: 16px; border-radius: 50%; background: var(--terracotta); }
.progress-bar, .bar-track { height: 10px; background: var(--parchment-deep); border-radius: 999px; overflow: hidden; }
.progress-bar > div, .bar-track > div { height: 100%; background: var(--olive); }
.map-wrap svg.map, svg.map { width: 100%; max-height: 70vh; display: block; margin: auto; background: #c9e4f0; border-radius: 12px; touch-action: manipulation; }
svg.map path { fill: #E8EEE6; stroke: #5C6B60; stroke-width: .6; }
svg.map .t { fill: #e8c56b; stroke: #7a5a00; stroke-width: 1; cursor: pointer; }
svg.map .t:hover { fill: #d4a84a; }
svg.map circle.t { fill: var(--terracotta); stroke: #fff; stroke-width: 2; fill-opacity: .9; }
svg.map .ok { fill: #5a7a4a !important; }
svg.map .bad { fill: #9a3a3a !important; }
svg.map .show { fill: #6b2e38 !important; animation: pulse 0.4s 3; }
@keyframes pulse { 50% { opacity: 0.3; } }
.prompt { font-family: var(--serif-display); font-size: 1.6rem; text-align: center; margin: 0.6rem 0; min-height: 1.4em; }
.stars { color: var(--gold); letter-spacing: 0.05em; }
@media print {
  .poem-nav, .poem-actions, .discuss, .quiz-box { display: none; }
  .poem-stage { border: 0; box-shadow: none; }
}

/* Coming soon */
.soon-page { text-align: center; padding: 3.5rem 0 5rem; }
.soon-page h1 { font-family: var(--serif-display); font-size: clamp(2.4rem, 6vw, 4.2rem); letter-spacing: -0.03em; margin: 0 0 0.8rem; }
.soon-page .lede { margin-bottom: 2rem; }


/* Family Library locked tile (public shelf) */
.card-locked {
  border-style: dashed;
  border-color: color-mix(in srgb, var(--purple) 45%, var(--rule));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--purple) 5%, var(--cream)), var(--cream));
}
.card-locked .subject { color: var(--purple); }
.card-locked .go { color: var(--purple); }
.card-locked .lock {
  position: absolute;
  top: 1.15rem;
  right: 1.15rem;
  width: 1.35rem;
  height: 1.35rem;
  color: var(--purple);
}
.card-locked .lock svg { width: 100%; height: 100%; }

