/*
  Greybear's Rest — shared chronicle-article chassis.
  Loaded after tokens.css/components.css/hub-<world>.css/world-header.css on
  every chronicle detail page (worlds/<world>/chronicles/<slug>.html). Was
  previously a ~280-line inline <style> block copy-pasted into every article;
  extracted here once 10+ pages had reproduced it byte-for-byte.

  A handful of articles (the-difficulty-trap, the-bourbon-circuit,
  the-one-way-door, d3's puzzle-ring-problem) layer a small bespoke
  <style> block on top of this file for components unique to that one
  article (.recipe-box, .step--loop, .mat-list, .callout, .compare) —
  this file only owns the shared chassis, not those one-offs.

  --bg/--bg-panel/--bg-panel-2/--hairline/--text-muted alias tokens.css's
  --ink/--panel-solid/--panel-solid-2/--hairline-soft/--text-mute rather than
  redefining them, so this file doesn't ship a second copy of the same
  values under different names. --legendary/--ancient/--blood and their
  variants already share identical names with tokens.css, so no aliasing
  needed there.
*/

:root {
  --bg: var(--ink);
  --bg-panel: var(--panel-solid);
  --bg-panel-2: var(--panel-solid-2);
  --hairline: var(--hairline-soft);
  --text-muted: var(--text-mute);
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 80% 50% at 50% -10%, rgba(154,35,35,0.16), transparent),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(240,195,77,0.05), transparent);
  color: var(--text);
  font-family: 'Source Sans 3', sans-serif;
  font-size: 17px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--legendary); }

.wrap {
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Hero ---------- */

.hero {
  padding: 100px 0 70px;
  text-align: center;
  position: relative;
}

.beam-signature {
  width: 100%;
  max-width: 420px;
  height: 90px;
  margin: 0 auto 36px;
  display: block;
}

.eyebrow {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12.5px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 22px;
}

.eyebrow .dot { color: var(--blood-bright); }

h1 {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: clamp(2.1rem, 5vw, 3.1rem);
  line-height: 1.15;
  margin: 0 0 22px;
  letter-spacing: 0.01em;
  background: linear-gradient(180deg, #f6ead4 0%, #e9ded0 60%, #c9b998 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero-sub {
  font-size: 1.08rem;
  color: var(--text-muted);
  max-width: 520px;
  margin: 0 auto;
}

.hero-sub strong { color: var(--text); font-weight: 600; }

.hero-cover {
  display: block;
  width: 100%;
  max-width: 620px;
  margin: 32px auto 0;
  border: 1px solid var(--hairline);
  border-radius: 6px;
}

/* ---------- Section chrome ---------- */

section { padding: 54px 0; }

.rule {
  border: none;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--hairline) 15%, var(--hairline) 85%, transparent);
  margin: 0;
}

.kicker {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--blood-bright);
  margin: 0 0 14px;
}

h2 {
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: 1.6rem;
  color: var(--text);
  margin: 0 0 18px;
  letter-spacing: 0.01em;
}

h2 .accent-ancient { color: var(--ancient); }
h2 .accent-legendary { color: var(--legendary); }

p { margin: 0 0 16px; color: var(--text); }
p.lede { font-size: 1.08rem; color: var(--text-muted); }

.muted { color: var(--text-muted); }

code, .inline-mono {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.88em;
  background: rgba(240,195,77,0.09);
  color: var(--ancient);
  padding: 0.1em 0.4em;
  border-radius: 4px;
}

/* ---------- Step cards ---------- */

.step {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 20px;
  padding: 26px 0;
  border-top: 1px solid var(--hairline);
}

.step:first-of-type { border-top: none; }

.step-index {
  font-family: 'Cinzel', serif;
  font-weight: 700;
  font-size: 1.5rem;
  color: var(--legendary-dim);
  line-height: 1;
  padding-top: 2px;
}

.step h3 {
  font-family: 'Source Sans 3', sans-serif;
  font-weight: 700;
  font-size: 1.08rem;
  margin: 0 0 8px;
  color: var(--text);
}

.step p { margin-bottom: 10px; font-size: 0.98rem; }
.step p:last-child { margin-bottom: 0; }

/* ---------- Cluster headings + location lists ---------- */

.cluster-heading {
  font-family: 'Cinzel', serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ancient);
  margin: 32px 0 6px;
}

.cluster-heading:first-of-type { margin-top: 0; }

.loc-list {
  list-style: none;
  margin: 0 0 8px;
  padding: 0;
  display: grid;
  gap: 10px;
}

.loc-list li {
  position: relative;
  padding-left: 20px;
  font-size: 0.95rem;
  color: var(--text);
}

.loc-list li::before {
  content: '';
  position: absolute;
  left: 2px;
  top: 8px;
  width: 7px;
  height: 7px;
  border-radius: 1px;
  background: var(--legendary-dim);
  transform: rotate(45deg);
}

.loc-list li strong { color: var(--ancient); }

/* ---------- TL;DR ---------- */

.tldr {
  background: var(--bg-panel-2);
  border: 1px solid var(--hairline);
  border-radius: 8px;
  padding: 28px 30px;
  margin-top: 6px;
}

.tldr ol {
  margin: 0;
  padding-left: 22px;
}

.tldr li {
  margin-bottom: 10px;
  padding-left: 4px;
}

.tldr li:last-child { margin-bottom: 0; }
.tldr li strong { color: var(--ancient); }

/* ---------- Footer ---------- */

footer {
  padding: 50px 0 90px;
  text-align: center;
}

footer .sigil {
  width: 34px;
  height: 34px;
  margin: 0 auto 18px;
  opacity: 0.55;
}

footer .fine-print {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  color: var(--text-muted);
  letter-spacing: 0.04em;
}

@media (max-width: 560px) {
  .hero { padding: 70px 0 46px; }
  .step { grid-template-columns: 36px 1fr; gap: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

/* ---------- Back-to-chronicles CTA ---------- */

.article-cta {
  text-align: center;
  padding: 6px 0 60px;
}
