/* Sudomancer palette: night slate, warm hearth parchment, Lamplit Accord brass/gold, and Mere-Bell deep teal.
   Solid fills and painted parchment texture only; never CSS gradients or rounded pills. */
:root {
  --night: #0e1412;
  --parchment-ink: #181410;
  --earth: #221c14;
  --gold: #e8c766;
  --brass: #9e7e36;
  --brass-dim: #5e4a20;
  --teal: #0c3439;
  --teal-hover: #134a51;
  --teal-line: #2d6f77;
  --text: #f1e9d8;
  --soft: #b8ad96;
  --serif: "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --edge: 34px;
  --rail-w: 214px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font: 18px/1.6 var(--sans);
}

@media (min-width: 1100px) {
  body { padding-left: var(--rail-w); }
}

h1, h2, h3, h4 {
  font-family: var(--serif);
  font-weight: 700;
  line-height: 1.18;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(1.9rem, 3.6vw, 3.2rem); }
h2 { font-size: clamp(1.75rem, 3.2vw, 2.7rem); color: var(--gold); }
h3 { font-size: 1.32rem; color: var(--gold); }
h4 { font-size: 1.1rem; color: var(--text); }

p { margin: 0 0 1em; }

a { color: var(--gold); text-underline-offset: 3px; }
a:hover, a:focus-visible { color: var(--text); }

img { display: block; max-width: 100%; height: auto; }

[hidden] { display: none !important; }

.clipboard-fallback {
  position: fixed;
  top: 0;
  left: 0;
  opacity: 0;
  pointer-events: none;
}

/* Global sticky left-side navigation rail */
.rail {
  background: var(--night);
  border-bottom: 1px solid var(--brass-dim);
  z-index: 50;
}

.rail-bar {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 1rem;
}

.rail-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  text-decoration: none;
  color: var(--gold);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.08rem;
}

.rail-brand img {
  width: 32px;
  height: 32px;
  border: 1px solid var(--brass-dim);
}

.rail-toggle {
  appearance: none;
  background: var(--teal);
  color: var(--gold);
  border: 1px solid var(--brass);
  outline: 1px solid rgba(232, 199, 102, 0.25);
  outline-offset: -4px;
  padding: 0.38rem 0.85rem;
  font: 700 0.95rem/1.2 var(--serif);
  cursor: pointer;
}

.rail-toggle:hover,
.rail-toggle:focus-visible {
  background: var(--teal-hover);
  color: var(--text);
}

.rail-drawer {
  padding: 0.5rem 1.1rem 1.1rem;
  border-top: 1px solid var(--brass-dim);
  background: var(--night);
}

.rail-nav {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.rail-nav a {
  position: relative;
  display: block;
  padding: 0.34rem 0.55rem 0.34rem 1.1rem;
  color: var(--text);
  text-decoration: none;
  font-family: var(--serif);
  font-size: 1.03rem;
  line-height: 1.3;
}

.rail-nav a:hover,
.rail-nav a:focus-visible {
  color: var(--gold);
  background: var(--parchment-ink);
}

.rail-nav a[aria-current="page"],
.rail-nav a.active {
  color: var(--gold);
  font-weight: 700;
}

.rail-nav a[aria-current="page"]::before,
.rail-nav a.active::before {
  content: "";
  position: absolute;
  left: 0.28rem;
  top: 50%;
  width: 6px;
  height: 6px;
  background: var(--gold);
  transform: translateY(-50%) rotate(45deg);
}

.rail-sub {
  display: flex;
  flex-direction: column;
  gap: 0.08rem;
  margin: 0.1rem 0 0.35rem 1.1rem;
  padding-left: 0.65rem;
  border-left: 1px solid var(--brass-dim);
}

.rail-sub a {
  padding: 0.18rem 0.4rem;
  font-family: var(--sans);
  font-size: 0.86rem;
  color: var(--soft);
}

.rail-sub a.active {
  color: var(--gold);
  font-weight: 600;
}

.rail-sub a.active::before {
  display: none;
}

.rail-social {
  margin-top: 0.9rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--brass-dim);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.35rem 0.6rem;
}

.rail-social a {
  color: var(--soft);
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.2rem 0.3rem;
}

.rail-social a:hover,
.rail-social a:focus-visible {
  color: var(--gold);
}

@media (max-width: 1099px) {
  html { scroll-padding-top: 3.5rem; }

  .rail {
    position: sticky;
    top: 0;
  }

  .rail-drawer {
    position: absolute;
    top: 100%;
    left: 0;
    width: min(100%, 21rem);
    max-height: calc(100dvh - 3.5rem);
    overflow-y: auto;
    overscroll-behavior: contain;
    border-right: 1px solid var(--brass-dim);
    border-bottom: 1px solid var(--brass-dim);
    box-shadow: 0 14px 28px #0008;
    transform: translateY(-0.5rem);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform 180ms ease, opacity 180ms ease, visibility 180ms;
  }

  .rail.open .rail-drawer {
    transform: none;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .rail-drawer { transition: none; }
}

@media (min-width: 1100px) {
  .rail {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    width: var(--rail-w);
    border-bottom: 0;
    border-right: 1px solid var(--brass);
    box-shadow: inset -3px 0 0 var(--night), inset -4px 0 0 var(--brass-dim);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    padding: 1.1rem 0.95rem 1rem;
  }

  .rail-bar {
    padding: 0 0.2rem 0.85rem;
    border-bottom: 1px solid var(--brass-dim);
    margin-bottom: 0.75rem;
  }

  .rail-toggle {
    display: none;
  }

  .rail-drawer {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    flex: 1;
    padding: 0;
    border-top: 0;
  }
}

/* Carved brass & two-faction buttons (Lamplit Accord gold + Mere-Bell deep teal) */
.actions {
  display: flex;
  gap: 0.85rem;
  justify-content: center;
  flex-wrap: wrap;
  align-items: center;
}

.button {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.76rem 1.55rem;
  border-radius: 1px;
  background: var(--gold);
  color: var(--night);
  border: 1px solid var(--brass);
  outline: 1px solid rgba(14, 20, 18, 0.42);
  outline-offset: -4px;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.06rem;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
}

.button:hover,
.button:focus-visible {
  background: var(--text);
  color: var(--night);
  border-color: var(--gold);
}

.button.quiet {
  background: var(--teal);
  color: var(--gold);
  border: 1px solid var(--brass);
  outline: 1px solid rgba(232, 199, 102, 0.28);
  outline-offset: -4px;
}

.button.quiet:hover,
.button.quiet:focus-visible {
  background: var(--teal-hover);
  color: var(--text);
  border-color: var(--gold);
}

.button.earth {
  background: var(--parchment-ink);
  color: var(--text);
  border: 1px solid var(--brass-dim);
  outline: 1px solid rgba(232, 199, 102, 0.18);
  outline-offset: -4px;
}

.button.earth:hover,
.button.earth:focus-visible {
  background: var(--earth);
  color: var(--gold);
  border-color: var(--brass);
}

.button.small {
  padding: 0.5rem 1.05rem;
  font-size: 0.96rem;
}

/* Hero */
.hero {
  position: relative;
  min-height: clamp(610px, 86svh, 860px);
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  background: var(--night);
  overflow: hidden;
  padding: clamp(1.5rem, 3.5vw, 3rem) 1.25rem clamp(3.2rem, 5vw, 4.4rem);
}

.hero-art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 82% bottom;
  animation: hero-drift 54s ease-in-out infinite alternate;
}

@keyframes hero-drift {
  from { transform: scale(1.07) translateX(-2.2%); }
  to { transform: scale(1.07) translateX(2.2%); }
}

.hero-content {
  position: relative;
  width: min(920px, 94vw);
  z-index: 2;
}

.logo {
  width: clamp(250px, 31vw, 450px);
  margin: 0 auto 0.55rem;
}

.hero-pitch {
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.22rem, 2vw, 1.62rem);
  line-height: 1.32;
  max-width: 34em;
  text-wrap: balance;
  margin: 0 auto 1.35rem;
  color: var(--text);
  text-shadow: 0 2px 14px var(--night), 0 0 4px var(--night);
}

/* Hero Agent Quickstart panel */
.quickstart {
  max-width: 720px;
  margin: 1.2rem auto 0;
  padding: 1.15rem 1.3rem;
  background: var(--parchment-ink);
  border: 1px solid var(--brass);
  box-shadow: inset 0 0 0 3px var(--night), inset 0 0 0 4px var(--brass-dim);
  text-align: left;
}

.quickstart-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.65rem;
}

.quickstart-head h2 {
  font-size: 1.28rem;
  margin: 0;
  color: var(--gold);
}

.quickstart p {
  color: var(--soft);
  font-size: 0.95rem;
  margin: 0 0 0.75rem;
}

.copy-row {
  display: flex;
  align-items: stretch;
  gap: 0.6rem;
  margin-bottom: 0.75rem;
  flex-wrap: wrap;
}

.copy-box {
  flex: 1 1 340px;
  margin: 0;
  padding: 0.62rem 0.85rem;
  background: var(--night);
  border: 1px solid var(--brass-dim);
  color: var(--text);
  font: 0.88rem/1.45 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  overflow-x: auto;
  white-space: pre-wrap;
  word-break: break-word;
}

.quickstart-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.4rem;
  font-size: 0.92rem;
  color: var(--soft);
}

/* Hero 4-unit Mere-Bell countdown */
.bell-clock {
  max-width: 580px;
  margin: 1.5rem auto 0;
  padding: 0.9rem 1.2rem 0.8rem;
  background: rgba(14, 20, 18, 0.84);
  border-top: 1px solid var(--brass);
  border-bottom: 1px solid var(--brass);
}

.bell-clock-grid {
  display: flex;
  justify-content: center;
  gap: clamp(1rem, 3.6vw, 2.4rem);
}

.bell-clock-grid .n {
  display: block;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.85rem, 3.8vw, 2.65rem);
  line-height: 1;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}

.bell-clock-grid .u {
  display: block;
  margin-top: 0.25rem;
  color: var(--soft);
  font-size: 0.86rem;
}

.countdown-caption {
  margin: 0.6rem 0 0;
  font-family: var(--serif);
  font-size: 0.98rem;
  color: var(--text);
}

.countdown-local {
  margin: 0.25rem 0 0;
  font-size: 0.88rem;
  color: var(--soft);
}

/* Sections */
section {
  position: relative;
  padding: clamp(4.2rem, 8vw, 6.8rem) clamp(1.25rem, 4.5vw, 3.5rem);
}

.night { background: var(--night); }

.parchment {
  position: relative;
  z-index: 1;
  background: var(--earth) url("/img/parchment.jpg") center / cover;
}

/* Torn parchment edges, top and bottom */
.parchment::before,
.parchment::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  height: var(--edge);
  background: inherit;
  -webkit-mask: url("/img/edge.svg") center / 100% 100% no-repeat;
  mask: url("/img/edge.svg") center / 100% 100% no-repeat;
  pointer-events: none;
}

.parchment::before { top: calc(var(--edge) * -1 + 1px); }
.parchment::after { bottom: calc(var(--edge) * -1 + 1px); transform: scaleY(-1); }

footer.parchment::after { display: none; }

.feature {
  display: grid;
  grid-template-columns: 1fr;
  gap: clamp(1.5rem, 4vw, 3.2rem);
  align-items: center;
  max-width: 1180px;
  margin: 0 auto;
}

.feature img { border-radius: 2px; width: 100%; }

.feature p,
.three p,
.note { color: var(--soft); }

.feature p { max-width: 34em; }

@media (min-width: 860px) {
  .feature { grid-template-columns: 1.12fr 1fr; }
  .feature.flip > img { order: 2; }
}

.narrow { max-width: 1060px; margin: 0 auto; text-align: center; }
.wide { max-width: 1180px; margin: 0 auto; text-align: center; }

.three {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  margin-top: 2.2rem;
}

@media (min-width: 760px) {
  .three { grid-template-columns: repeat(3, 1fr); gap: 2.6rem; }
}

.note { margin-bottom: 1.8rem; }

.banner {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  border-radius: 2px;
  margin: 0.6rem 0 2rem;
}

.feature .actions.start {
  justify-content: flex-start;
  margin-top: 1.35rem;
}

/* #world 3 feature points + Ways to play 6-icon strip */
.world-points {
  display: grid;
  gap: 0.95rem;
  margin: 1rem 0 1.2rem;
}

.world-points div h3 {
  font-size: 1.16rem;
  margin-bottom: 0.18rem;
}

.world-points div p {
  margin: 0;
  font-size: 0.97rem;
  line-height: 1.5;
}

.ways-wrap {
  max-width: 1180px;
  margin: 3.2rem auto 0;
  padding-top: 2.2rem;
  border-top: 1px solid var(--brass-dim);
  text-align: center;
}

.ways-wrap h3 {
  font-size: 1.5rem;
  margin-bottom: 1.2rem;
}

.ways-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
}

@media (min-width: 640px) {
  .ways-strip { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 980px) {
  .ways-strip { grid-template-columns: repeat(6, 1fr); }
}

.way-tab {
  appearance: none;
  background: var(--parchment-ink);
  color: var(--soft);
  border: 1px solid var(--brass-dim);
  padding: 0.8rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.55rem;
  cursor: pointer;
  font: 700 0.96rem/1.25 var(--serif);
  text-align: center;
}

.way-tab:hover,
.way-tab:focus-visible {
  color: var(--text);
  border-color: var(--brass);
}

.way-tab.active {
  background: var(--night);
  color: var(--gold);
  border-color: var(--gold);
  box-shadow: inset 0 0 0 1px var(--brass);
}

.way-detail {
  max-width: 44em;
  margin: 1.25rem auto 0;
  padding: 1rem 1.35rem;
  background: var(--parchment-ink);
  border-left: 3px solid var(--gold);
  text-align: left;
}

.way-detail h4 {
  color: var(--gold);
  font-size: 1.18rem;
  margin-bottom: 0.25rem;
}

.way-detail p {
  margin: 0;
  color: var(--text);
  font-size: 0.98rem;
}

/* The lands: one slowly drifting painting at a time */
.lands { padding: 0; background: var(--night); text-align: center; }

.lands input { position: absolute; opacity: 0; pointer-events: none; }

.lands-view {
  position: relative;
  aspect-ratio: 21 / 9;
  min-height: 340px;
  max-height: 82svh;
  width: 100%;
  overflow: hidden;
}

.pan {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.9s ease;
  animation: drift 48s ease-in-out infinite alternate;
}

@keyframes drift {
  from { transform: scale(1.1) translateX(-3.5%); }
  to { transform: scale(1.1) translateX(3.5%); }
}

#land-vale:checked ~ .lands-view .vale,
#land-fells:checked ~ .lands-view .fells,
#land-road:checked ~ .lands-view .road { opacity: 1; }

.lands-view h2 {
  position: relative;
  margin: 0;
  padding-top: clamp(1.5rem, 5vw, 4.5rem);
  color: var(--text);
  text-shadow: 0 2px 14px var(--night), 0 0 3px var(--night);
}

.lands-tabs {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.5rem clamp(1rem, 4vw, 3rem);
  padding: 1.6rem 1rem 0;
}

.lands-tabs label {
  cursor: pointer;
  font-family: var(--serif);
  font-weight: 700;
  font-size: clamp(1.05rem, 2vw, 1.4rem);
  color: var(--soft);
  padding-bottom: 0.35rem;
  border-bottom: 3px solid transparent;
}

.lands-tabs label:hover { color: var(--text); }

#land-vale:checked ~ .lands-tabs [for="land-vale"],
#land-fells:checked ~ .lands-tabs [for="land-fells"],
#land-road:checked ~ .lands-tabs [for="land-road"] {
  color: var(--text);
  border-bottom-color: var(--gold);
}

.lands input:focus-visible + input,
.lands input:focus-visible { outline: none; }

#land-vale:focus-visible ~ .lands-tabs [for="land-vale"],
#land-fells:focus-visible ~ .lands-tabs [for="land-fells"],
#land-road:focus-visible ~ .lands-tabs [for="land-road"] { outline: 2px solid var(--gold); outline-offset: 4px; }

.lands-text { padding: 1.2rem 1.25rem clamp(4rem, 8vw, 6rem); }
.lands-text p { display: none; max-width: 40em; margin: 0 auto; color: var(--soft); }

#land-vale:checked ~ .lands-text .vale,
#land-fells:checked ~ .lands-text .fells,
#land-road:checked ~ .lands-text .road { display: block; }

.section-actions {
  margin-top: 2.2rem;
}

/* Screenshots + gameplay video gallery + carousel viewer */
.gallery-subhead {
  font-size: 1.15rem;
  color: var(--gold);
  text-align: left;
  margin: 1.6rem 0 0.75rem;
}

.shots {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 600px) {
  .shots { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 980px) {
  .shots { grid-template-columns: repeat(4, 1fr); }
  .shots.shots-video { grid-template-columns: repeat(6, 1fr); }
  .shots.shots-video > a { grid-column: span 2; }
  .shots.shots-video > a.shot-featured { grid-column: span 3; }
}

.shots a {
  display: block;
  text-decoration: none;
  color: var(--soft);
  background: var(--parchment-ink);
  border: 1px solid var(--brass-dim);
  cursor: zoom-in;
}

.shots a.shot-video {
  cursor: pointer;
}

.shot-thumb {
  position: relative;
}

.play-tag {
  position: absolute;
  left: 0.65rem;
  bottom: 0.65rem;
  padding: 0.25rem 0.6rem;
  background: rgba(14, 20, 18, 0.88);
  border: 1px solid var(--brass);
  color: var(--gold);
  font-style: normal;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.shots a.shot-video:hover .play-tag,
.shots a.shot-video:focus-visible .play-tag {
  background: var(--earth);
  border-color: var(--gold);
  color: var(--text);
}

.shots a:hover,
.shots a:focus-visible {
  border-color: var(--gold);
  color: var(--text);
}

.shots img {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.shots span {
  display: block;
  padding: 0.48rem 0.65rem;
  font-size: 0.86rem;
  line-height: 1.35;
  text-align: left;
}

.viewer {
  max-width: 96vw;
  max-height: 96vh;
  padding: 0.9rem 1rem 1rem;
  border: 1px solid var(--brass);
  background: var(--night);
  color: var(--text);
  text-align: center;
}

.viewer::backdrop {
  background: var(--night);
  opacity: 0.92;
}

.viewer img,
.viewer video {
  display: block;
  max-width: min(92vw, 100%);
  max-height: 76vh;
  margin: 0 auto;
  border: 1px solid var(--brass-dim);
  background: #090d0c;
}

.viewer [hidden] {
  display: none;
}

.viewer-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-top: 0.8rem;
}

.viewer-meta {
  text-align: left;
  font-size: 0.95rem;
  color: var(--soft);
}

.viewer-count {
  color: var(--gold);
  font-family: var(--serif);
  font-weight: 700;
  margin-right: 0.6rem;
}

/* Drafts stay off the live page; ?draft shows them in a preview. */
.draft { display: none; }
.show-drafts .draft { display: block; }
.show-drafts a.draft { display: inline-flex; }

.closing { text-align: center; }
.closing p { color: var(--soft); max-width: 36em; margin: 0 auto 1.6rem; }

/* Roadmap: six steps with horizontal brass line & right-pointing arrow */
.timeline {
  position: relative;
  list-style: none;
  padding: 0;
  margin: 2.5rem auto 2.8rem;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  text-align: center;
}

@media (min-width: 700px) {
  .timeline { grid-template-columns: repeat(3, 1fr); gap: 2rem 1.5rem; }
}

@media (min-width: 1120px) {
  .timeline {
    grid-template-columns: repeat(6, 1fr);
    gap: 1.15rem;
    padding-right: 1.2rem;
  }

  .timeline::before {
    content: "";
    position: absolute;
    left: 4%;
    right: 0.65rem;
    top: 7px;
    height: 2px;
    background: var(--brass);
    z-index: 0;
  }

  .timeline::after {
    content: "";
    position: absolute;
    right: 0.1rem;
    top: 2px;
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 11px solid var(--gold);
    z-index: 1;
  }
}

.timeline li {
  position: relative;
  z-index: 1;
}

.timeline li::before {
  content: "";
  display: block;
  width: 14px;
  height: 14px;
  margin: 1px auto 0.9rem;
  background: var(--parchment-ink);
  border: 2px solid var(--brass);
  transform: rotate(45deg);
}

.timeline li.now::before {
  background: var(--gold);
  border-color: var(--gold);
  width: 16px;
  height: 16px;
  margin-top: 0;
}

.timeline .when { display: block; color: var(--soft); font-size: 0.93rem; margin-bottom: 0.25rem; }
.timeline .now .when { color: var(--gold); font-weight: 600; }
.timeline h3 { color: var(--text); margin-bottom: 0.25rem; font-size: 1.2rem; }
.timeline p { font-size: 0.93rem; margin: 0 auto; color: var(--soft); }

/* Footer */
footer {
  padding: 3.2rem 1.25rem 2.5rem;
  text-align: center;
  color: var(--soft);
  font-size: 0.94rem;
  border-top: 1px solid var(--brass-dim);
}

footer nav {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.45rem 1.65rem;
  margin-bottom: 1rem;
  font-family: var(--serif);
  font-size: 1.06rem;
}

footer nav a { color: var(--text); text-decoration: none; }
footer nav a:hover, footer nav a:focus-visible { color: var(--gold); }

.footer-social {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.4rem 1.35rem;
  margin-bottom: 1.25rem;
  font-size: 0.92rem;
}

.footer-social a {
  color: var(--gold);
  text-decoration: none;
}

.footer-social a:hover,
.footer-social a:focus-visible {
  color: var(--text);
}

footer p { margin: 0.25em 0; }

/* Document & subpage headers */
.doc { max-width: 820px; margin: 0 auto; }
.doc p, .doc li { color: var(--soft); }
.doc ul, .doc ol { padding-left: 1.3rem; margin: 0 0 1em; }
.doc li { margin-bottom: 0.55em; }
.doc h3 { margin-top: 1.7rem; }

.doc-top { padding: 2.2rem clamp(1.25rem, 5vw, 4rem) 1.5rem; }
.doc-top .home { display: inline-block; margin-bottom: 1.2rem; }
.doc-top .lede { font-size: 1.18rem; max-width: 36em; }

.doc-top.centred {
  text-align: center;
  padding-bottom: 3rem;
}

.doc-top.centred .home img {
  margin: 0 auto;
}

.doc-top.centred .lede {
  margin: 0 auto 0.6em;
  color: var(--soft);
}

code, pre { font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 0.9rem; }
code { color: var(--text); }
pre {
  margin: 0 0 1.1em;
  padding: 0.95rem 1.15rem;
  overflow-x: auto;
  background: var(--night);
  border: 1px solid var(--brass-dim);
  color: var(--text);
  line-height: 1.5;
  border-radius: 1px;
}
.night pre { background: var(--parchment-ink); }
pre code { font-size: inherit; }
li pre { margin-top: 0.55rem; }

/* Collapsible <details class="fold"> menus (how-it-works, rules, privacy) */
.fold-list {
  max-width: 860px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

details.fold {
  background: var(--parchment-ink);
  border: 1px solid var(--brass-dim);
}

.night details.fold {
  background: var(--parchment-ink);
}

.parchment details.fold {
  background: rgba(14, 20, 18, 0.72);
}

details.fold[open] {
  border-color: var(--brass);
}

details.fold > summary {
  list-style: none;
  cursor: pointer;
  padding: 0.95rem 1.2rem;
  display: flex;
  align-items: center;
  gap: 0.85rem;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.22rem;
  color: var(--gold);
}

details.fold > summary::-webkit-details-marker { display: none; }

details.fold > summary::after {
  content: "";
  margin-left: auto;
  width: 0.55rem;
  height: 0.55rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.18s ease;
  flex-shrink: 0;
}

details.fold[open] > summary::after {
  transform: rotate(45deg);
}

details.fold > summary:hover,
details.fold > summary:focus-visible {
  color: var(--text);
}

.fold-body {
  padding: 0.2rem 1.3rem 1.25rem;
  border-top: 1px solid rgba(158, 126, 54, 0.28);
}

.fold-body > :first-child { margin-top: 0.9rem; }
.fold-body > :last-child { margin-bottom: 0; }
.fold-body p, .fold-body li { color: var(--soft); }

/* Quickstart cards on how-it-works.html */
.ways-in-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.4rem;
  margin-top: 1.6rem;
}

@media (min-width: 860px) {
  .ways-in-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1220px) {
  .ways-in-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.way-card {
  min-width: 0;
  background: var(--parchment-ink);
  border: 1px solid var(--brass);
  padding: 1.25rem 1.35rem;
  text-align: left;
}

.way-card h3 {
  margin-top: 0;
}

.way-card p {
  color: var(--soft);
  font-size: 0.96rem;
}

.way-card pre {
  font-size: 0.8rem;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* Contact hub rows/cards */
.contact-grid {
  max-width: 920px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}

@media (min-width: 720px) {
  .contact-grid { grid-template-columns: repeat(2, 1fr); }
}

.contact-card {
  background: var(--parchment-ink);
  border: 1px solid var(--brass-dim);
  padding: 1.2rem 1.35rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.75rem;
  text-align: left;
}

.contact-card.featured {
  border-color: var(--brass);
}

.contact-card h3 {
  margin: 0 0 0.25rem;
}

.contact-card p {
  margin: 0;
  color: var(--soft);
  font-size: 0.96rem;
}

.contact-card .actions {
  justify-content: flex-start;
}

/* Story page: Interactive Mere-Bell Opposing Sides & 6-Age Timeline */
.feature img.bell { width: 100%; max-width: 380px; margin: 0 auto; border-radius: 0; }

.bell-stage {
  max-width: 1200px;
  margin: 2rem auto 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.6rem;
  align-items: stretch;
}

@media (min-width: 960px) {
  .bell-stage {
    grid-template-columns: minmax(0, 1fr) 270px minmax(0, 1fr);
    align-items: stretch;
  }
}

.bell-center {
  align-self: center;
  text-align: center;
  padding: 1rem 0.5rem;
}

.bell-visual {
  position: relative;
  width: min(240px, 65vw);
  margin: 0 auto 0.85rem;
}

.bell-visual img {
  width: 100%;
  transition: transform 0.25s ease;
}

.bell-hit-left,
.bell-hit-right {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 50%;
  appearance: none;
  background: transparent;
  border: 0;
  cursor: pointer;
}

.bell-hit-left { left: 0; }
.bell-hit-right { right: 0; }

.bell-hit-left:focus-visible,
.bell-hit-right:focus-visible {
  outline: 2px solid var(--gold);
}

.bell-toggles {
  display: flex;
  justify-content: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.bell-side-btn {
  appearance: none;
  padding: 0.42rem 0.8rem;
  font: 700 0.9rem/1.2 var(--serif);
  cursor: pointer;
  border: 1px solid var(--brass-dim);
  background: var(--parchment-ink);
  color: var(--soft);
}

.bell-side-btn[data-bell-trigger="accord"].active,
.bell-stage[data-active-side="accord"] .bell-side-btn[data-bell-trigger="accord"] {
  background: var(--gold);
  color: var(--night);
  border-color: var(--gold);
}

.bell-side-btn[data-bell-trigger="clamour"].active,
.bell-stage[data-active-side="clamour"] .bell-side-btn[data-bell-trigger="clamour"] {
  background: var(--teal);
  color: var(--gold);
  border-color: var(--teal-line);
}

.bell-stage[data-active-side="accord"] .bell-visual img {
  transform: rotate(-3deg);
  filter: drop-shadow(-8px 0 14px rgba(232, 199, 102, 0.42));
}

.bell-stage[data-active-side="clamour"] .bell-visual img {
  transform: rotate(3deg);
  filter: drop-shadow(8px 0 14px rgba(45, 111, 119, 0.65));
}

.bell-hint {
  margin: 0.55rem 0 0;
  font-size: 0.86rem;
  color: var(--soft);
}

.faction-card {
  background: var(--parchment-ink);
  border: 1px solid var(--brass-dim);
  padding: 1.25rem;
  text-align: left;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.faction-card img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  margin-bottom: 1rem;
  border: 1px solid var(--brass-dim);
}

.faction-card h3 {
  font-size: 1.55rem;
  margin-bottom: 0.4rem;
}

.faction-card p {
  color: var(--soft);
  font-size: 0.96rem;
}

.faction-card.accord {
  border-top: 3px solid var(--gold);
}

.faction-card.clamour {
  border-top: 3px solid var(--teal-line);
}

.bell-stage[data-active-side="accord"] .faction-card.accord {
  border-color: var(--gold);
  box-shadow: inset 0 0 0 1px var(--gold);
}

.bell-stage[data-active-side="accord"] .faction-card.clamour {
  opacity: 0.72;
}

.bell-stage[data-active-side="clamour"] .faction-card.clamour {
  border-color: var(--teal-line);
  background: #102428;
  box-shadow: inset 0 0 0 1px var(--gold);
}

.bell-stage[data-active-side="clamour"] .faction-card.accord {
  opacity: 0.72;
}

/* Lore 6-Age Interactive Timeline */
.ages-wrap {
  max-width: 1120px;
  margin: 0 auto;
}

.ages-wrap > h2 {
  margin-bottom: 1.5rem;
}

.ages-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1.6rem;
}

@media (min-width: 680px) {
  .ages-track { grid-template-columns: repeat(3, 1fr); }
}

@media (min-width: 1020px) {
  .ages-track {
    grid-template-columns: repeat(6, 1fr);
    padding-right: 1.2rem;
  }

  .ages-track::before {
    content: "";
    position: absolute;
    left: 5%;
    right: 0.7rem;
    top: 36px;
    height: 2px;
    background: var(--brass);
    z-index: 0;
  }

  .ages-track::after {
    content: "";
    position: absolute;
    right: 0.1rem;
    top: 31px;
    width: 0;
    height: 0;
    border-top: 6px solid transparent;
    border-bottom: 6px solid transparent;
    border-left: 11px solid var(--gold);
    z-index: 1;
  }
}

.era-tab {
  position: relative;
  z-index: 1;
  appearance: none;
  background: var(--parchment-ink);
  border: 1px solid var(--brass-dim);
  color: var(--soft);
  padding: 0.7rem 0.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font: 700 0.94rem/1.25 var(--serif);
  text-align: center;
}

.era-tab:hover,
.era-tab:focus-visible {
  color: var(--text);
  border-color: var(--brass);
}

.era-tab.active {
  background: var(--night);
  color: var(--gold);
  border-color: var(--gold);
  box-shadow: inset 0 0 0 1px var(--brass);
}

.era-tab .gi {
  width: 3.75rem;
  height: 3.75rem;
}

.era-panel {
  background: var(--parchment-ink);
  border: 1px solid var(--brass);
  padding: 1.4rem 1.6rem;
  text-align: left;
  margin-bottom: 1rem;
}

.era-panel h3 {
  margin-top: 0;
  font-size: 1.45rem;
}

.era-panel p {
  color: var(--text);
  max-width: 46em;
}

.era-panel img.inline {
  width: 100%;
  max-width: 760px;
  border: 1px solid var(--brass-dim);
  margin: 0.8rem 0 1.2rem;
}

.measure {
  margin: 0.8rem 0 1rem;
  padding: 0.9rem 1.2rem;
  border-left: 3px solid var(--gold);
  background: var(--night);
}

.measure p {
  font-family: var(--serif);
  font-size: 1.22rem;
  line-height: 1.5;
  color: var(--text);
  margin: 0;
}

.closing .hook {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.45rem;
  color: var(--gold);
}

/* Peoples page & mirrored racial tables with painted icons and lore crests */
.jump {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.85rem;
  max-width: 980px;
  margin: 2rem auto 0;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.04rem;
}

@media (min-width: 860px) {
  .jump { grid-template-columns: repeat(4, 1fr); }
}

.jump a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 0.8rem 0.6rem;
  background: var(--parchment-ink);
  border: 1px solid var(--brass-dim);
  color: var(--gold);
  text-decoration: none;
  text-align: center;
}

.jump a:hover,
.jump a:focus-visible {
  color: var(--text);
  border-color: var(--gold);
  background: var(--night);
}

.jump-crests {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.jump-crests .pc {
  width: clamp(2.5rem, 5vw, 3.25rem);
  height: clamp(2.5rem, 5vw, 3.25rem);
}

.people-head .pc {
  width: 3.5rem;
  height: 3.5rem;
}

.gift-row .gi {
  width: clamp(2.5rem, 4.5vw, 3rem);
  height: clamp(2.5rem, 4.5vw, 3rem);
}

.gift-row .gi-faction-passive {
  background-image: url("/img/unsung-unstilled-passives.webp");
  background-size: 300% 200%;
}

.gi-past-hushing { background-position: 0 0; }
.gi-lamp-within { background-position: 50% 0; }
.gi-knows-the-way { background-position: 100% 0; }
.gi-half-here { background-position: 0 100%; }
.gi-called-back { background-position: 50% 100%; }
.gi-drum-led-home { background-position: 100% 100%; }

.narrow > .note { max-width: 42em; margin-left: auto; margin-right: auto; }

.pair {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
  margin-top: 2.2rem;
}

@media (min-width: 760px) {
  .pair { grid-template-columns: 1fr 1fr; gap: 3rem; }
}

.portrait {
  width: 100%;
  max-width: 390px;
  aspect-ratio: 4 / 5;
  margin: 0 auto 1.2rem;
  border: 1px solid var(--brass-dim);
  object-fit: cover;
}

.people-head {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  margin-bottom: 0.3rem;
}

.people-head h3 { font-size: 1.6rem; margin: 0; }
.people .home { color: var(--text); margin-bottom: 0.55rem; font-family: var(--serif); }
.people p { color: var(--soft); max-width: 30em; margin-left: auto; margin-right: auto; }

.gifts {
  max-width: 1020px;
  margin: 2.6rem auto 0;
  background: var(--parchment-ink);
  border: 1px solid var(--brass);
  padding: 0.85rem 1.15rem;
  text-align: left;
}

.gifts-head {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 1rem;
  padding-bottom: 0.55rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid var(--brass);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 0.96rem;
  color: var(--soft);
}

.gifts-head span:first-child { color: var(--gold); text-align: right; }
.gifts-head span:nth-child(2) { text-align: center; }
.gifts-head span:last-child { color: var(--gold); text-align: left; }

.gift-row {
  display: grid;
  grid-template-columns: 1fr minmax(0, 1.45fr) 1fr;
  gap: 1rem;
  align-items: center;
  padding: 0.55rem 0;
  border-top: 1px solid rgba(158, 126, 54, 0.22);
}

.gifts-head + .gift-row { border-top: 0; }

.gift-a,
.gift-c {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--serif);
  font-weight: 700;
  color: var(--gold);
  font-size: 1.02rem;
}

.gift-a { justify-content: flex-end; text-align: right; }
.gift-c { justify-content: flex-start; text-align: left; }

.gift-what {
  text-align: center;
  color: var(--soft);
  font-size: 0.95rem;
  line-height: 1.4;
}

.gift-row.active-racial .gift-what {
  color: var(--text);
}

@media (max-width: 759px) {
  .gifts-head { display: none; }
  .gift-row {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "what what"
      "a c";
    gap: 0.45rem 0.8rem;
    padding: 0.7rem 0;
  }
  .gift-what { grid-area: what; text-align: left; }
  .gift-a { grid-area: a; justify-content: flex-end; text-align: left; flex-direction: row-reverse; }
  .gift-c { grid-area: c; justify-content: flex-start; text-align: right; flex-direction: row-reverse; }
}

/* Classes: index with crests & role icons, ability lists, and 4x3 WoW-style talent trees */
.intro { max-width: 42em; margin-left: auto; margin-right: auto; }

.class-index {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
  margin-top: 2rem;
}

@media (min-width: 920px) {
  .class-index { grid-template-columns: repeat(5, 1fr); }
}

.class-index a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.4rem;
  padding: 0.85rem 0.65rem;
  background: var(--parchment-ink);
  border: 1px solid var(--brass-dim);
  text-decoration: none;
  text-align: center;
}

.class-index a:hover,
.class-index a:focus-visible {
  border-color: var(--gold);
  background: var(--night);
}

.class-index strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.2rem;
  color: var(--gold);
}

.class-roles {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.35rem;
  color: var(--soft);
  font-size: 0.88rem;
  line-height: 1.3;
}

.feature.class { align-items: start; }

@media (min-width: 860px) {
  .feature.class.flip > .art { order: 2; }
}

.class .art {
  width: 100%;
  aspect-ratio: 3 / 2;
  border: 1px solid var(--brass-dim);
  object-fit: cover;
}

.class-title {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 0.45rem;
}

.class-title h2 {
  margin: 0;
}

.feature.class p.role { color: var(--text); font-size: 1.12rem; margin-bottom: 0.65rem; }

dl.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 0.32rem 1.2rem;
  margin: 0 0 1.4rem;
}

.facts dt { font-family: var(--serif); font-weight: 700; color: var(--gold); }
.facts dd { margin: 0; color: var(--soft); display: flex; align-items: center; flex-wrap: wrap; gap: 0.4rem; }

.abilities {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.abilities li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  color: var(--soft);
  line-height: 1.45;
}

.abilities li .gi {
  margin-top: 0.1rem;
}

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

/* WoW-style 4-row x 3-column talent choice tree */
.choices {
  max-width: 1180px;
  margin: 2.4rem auto 0;
}

.choices summary {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  cursor: pointer;
  list-style: none;
  padding: 0.6rem 1.1rem;
  background: var(--parchment-ink);
  border: 1px solid var(--brass);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.18rem;
  color: var(--gold);
}

.choices summary::-webkit-details-marker { display: none; }

.choices summary::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform 0.2s ease;
}

.choices[open] summary::before { transform: rotate(45deg); }
.choices summary:hover, .choices summary:focus-visible { color: var(--text); border-color: var(--gold); }

.talent-tree {
  margin-top: 1.1rem;
  padding: 1.4rem 1.25rem;
  background: var(--parchment-ink);
  border: 1px solid var(--brass);
  box-shadow: inset 0 0 0 3px var(--night), inset 0 0 0 4px var(--brass-dim);
  display: flex;
  flex-direction: column;
  gap: 1.7rem;
}

.tree-tier {
  position: relative;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

@media (min-width: 900px) {
  .tree-tier {
    grid-template-columns: 190px 1fr;
    align-items: center;
    gap: 1.25rem;
  }

  /* Vertical brass progression rail connecting tiers down the 3 columns */
  .tree-tier:not(:last-child) .tree-nodes::after {
    content: "";
    position: absolute;
    left: calc(190px + 1.25rem + 16.66%);
    right: 16.66%;
    bottom: -1.15rem;
    height: 0.6rem;
    border-left: 2px solid var(--brass);
    border-right: 2px solid var(--brass);
    pointer-events: none;
  }

  .tree-tier:not(:last-child)::after {
    content: "";
    position: absolute;
    left: calc(190px + 1.25rem + 50% - 95px - 0.625rem - 1px);
    bottom: -1.35rem;
    width: 2px;
    height: 1rem;
    background: var(--brass);
    pointer-events: none;
  }
}

.tier-label {
  text-align: left;
  padding-right: 0.5rem;
  border-left: 3px solid var(--gold);
  padding-left: 0.75rem;
}

.tier-level {
  display: block;
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--gold);
}

.tier-name {
  display: block;
  font-size: 0.9rem;
  color: var(--soft);
}

.tree-nodes {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
}

@media (min-width: 720px) {
  .tree-nodes { grid-template-columns: repeat(3, 1fr); }
}

.talent-node {
  background: var(--night);
  border: 1px solid var(--brass-dim);
  padding: 0.75rem 0.85rem;
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  text-align: left;
}

.talent-node:hover {
  border-color: var(--gold);
}

.talent-node[role="button"] {
  cursor: pointer;
}

.talent-node[role="button"]:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
  border-color: var(--gold);
}

.talent-node.is-picked {
  background: var(--teal);
  border-color: var(--gold);
  box-shadow: inset 0 0 0 1px var(--brass);
}

.talent-node strong {
  display: block;
  font-family: var(--serif);
  font-size: 1.03rem;
  color: var(--gold);
  margin-bottom: 0.15rem;
}

.talent-node span.desc {
  display: block;
  font-size: 0.9rem;
  line-height: 1.4;
  color: var(--soft);
}

.talent-node.is-picked span.desc {
  color: var(--text);
}

.build-bar {
  margin-top: 0.95rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1.2rem;
}

.build-summary {
  margin: 0;
  font-size: 0.96rem;
  color: var(--soft);
}

.build-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-art, .pan { animation: none; transform: none; transition: none; }
  .choices summary::before, details.fold > summary::after, .bell-visual img { transition: none; }
}

/* Data tables (costs, benchmark results, GPU tiers) */
.table-wrap {
  max-width: 1180px;
  margin: 1.6rem auto;
  overflow-x: auto;
  border: 1px solid var(--brass);
  background: var(--parchment-ink);
  text-align: left;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
  line-height: 1.45;
}

.data-table th,
.data-table td {
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid rgba(158, 126, 54, 0.24);
  vertical-align: top;
  color: var(--soft);
}

.data-table thead th {
  background: var(--night);
  color: var(--gold);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 0.96rem;
  border-bottom: 1px solid var(--brass);
  white-space: nowrap;
}

.data-table tbody th {
  color: var(--text);
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1rem;
}

.data-table tbody tr:nth-child(even) th,
.data-table tbody tr:nth-child(even) td {
  background: rgba(14, 20, 18, 0.42);
}

.data-table tbody tr:last-child th,
.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table th.num,
.data-table td.num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.data-table strong.metric {
  color: var(--gold);
  font-family: var(--serif);
  font-size: 1.02rem;
}

.data-table .sub {
  display: block;
  color: var(--soft);
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.83rem;
  margin-top: 0.18rem;
}

/* Cost callouts, token-saving levers & dated caveats */
.cost-callout {
  margin: 1.15rem 0 1.3rem;
  padding: 0.9rem 1.15rem;
  background: var(--parchment-ink);
  border: 1px solid var(--brass-dim);
  border-left: 3px solid var(--gold);
  color: var(--soft);
  font-size: 0.95rem;
  max-width: 36em;
}

.cost-callout strong {
  color: var(--gold);
}

.levers-head {
  margin: 2.4rem 0 0.6rem;
  font-size: 1.45rem;
}

.levers-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.1rem;
  max-width: 1180px;
  margin: 1.2rem auto 0;
  text-align: left;
}

@media (min-width: 760px) {
  .levers-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.lever-card {
  background: var(--parchment-ink);
  border: 1px solid var(--brass-dim);
  padding: 1.1rem 1.3rem;
}

.lever-card h3,
.lever-card h4 {
  color: var(--gold);
  font-size: 1.16rem;
  margin: 0 0 0.35rem;
}

.lever-card p {
  margin: 0;
  color: var(--soft);
  font-size: 0.94rem;
}

.caveat-box {
  max-width: 1180px;
  margin: 1.5rem auto 0;
  padding: 0.95rem 1.25rem;
  background: var(--parchment-ink);
  border: 1px solid var(--brass-dim);
  border-left: 3px solid var(--brass);
  text-align: left;
  color: var(--soft);
  font-size: 0.91rem;
}

.caveat-box strong {
  color: var(--text);
}

/* Roadmap expansion: In Founders' Beta now vs Planned next, Season 1 & Discord polls */
.roadmap-compare {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 2.2rem auto 0;
  text-align: left;
}

@media (min-width: 880px) {
  .roadmap-compare {
    grid-template-columns: 1fr 1.18fr;
  }
}

.roadmap-box {
  background: var(--parchment-ink);
  border: 1px solid var(--brass);
  padding: 1.35rem 1.5rem;
}

.roadmap-box h3 {
  margin: 0 0 0.9rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--brass-dim);
  font-size: 1.35rem;
  color: var(--gold);
}

.roadmap-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.72rem;
}

.roadmap-list li {
  position: relative;
  padding-left: 1.05rem;
  color: var(--soft);
  font-size: 0.95rem;
  line-height: 1.46;
}

.roadmap-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.52em;
  width: 6px;
  height: 6px;
  background: var(--gold);
  transform: rotate(45deg);
}

.roadmap-list li strong {
  color: var(--text);
}

.roadmap-callouts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.5rem;
  margin: 1.6rem auto 2.2rem;
  text-align: left;
}

@media (min-width: 880px) {
  .roadmap-callouts {
    grid-template-columns: 1.18fr 1fr;
  }
}

.roadmap-card {
  background: var(--night);
  border: 1px solid var(--brass);
  padding: 1.4rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1rem;
}

.roadmap-card.poll {
  background: #0d1e21;
  border-color: var(--teal-line);
}

.roadmap-card h3 {
  margin: 0 0 0.45rem;
  font-size: 1.35rem;
  color: var(--gold);
}

.roadmap-card p {
  margin: 0 0 0.65rem;
  max-width: none;
  color: var(--soft);
  font-size: 0.95rem;
}

.roadmap-card p:last-child {
  margin-bottom: 0;
}

.roadmap-card .actions {
  justify-content: flex-start;
}

/* News & Patch Notes page (pure-CSS filter + cards + patch folds) */
.news-shell {
  position: relative;
}

.news-radio {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.news-toolbar {
  background: var(--night);
  padding: 0 1.25rem 2.2rem;
  text-align: center;
}

.news-filter-bar {
  display: inline-flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
}

.news-filter-bar label {
  cursor: pointer;
  padding: 0.48rem 1.05rem;
  background: var(--parchment-ink);
  border: 1px solid var(--brass-dim);
  color: var(--soft);
  font: 700 0.96rem/1.2 var(--serif);
}

.news-filter-bar label:hover {
  color: var(--text);
  border-color: var(--brass);
}

#news-filter-all:checked ~ .news-toolbar label[for="news-filter-all"],
#news-filter-announcements:checked ~ .news-toolbar label[for="news-filter-announcements"],
#news-filter-patches:checked ~ .news-toolbar label[for="news-filter-patches"] {
  background: var(--gold);
  color: var(--night);
  border-color: var(--gold);
}

#news-filter-all:focus-visible ~ .news-toolbar label[for="news-filter-all"],
#news-filter-announcements:focus-visible ~ .news-toolbar label[for="news-filter-announcements"],
#news-filter-patches:focus-visible ~ .news-toolbar label[for="news-filter-patches"] {
  outline: 2px solid var(--gold);
  outline-offset: 2px;
}

#news-filter-announcements:checked ~ #patch-notes {
  display: none;
}

#news-filter-patches:checked ~ #announcements {
  display: none;
}

.news-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.3rem;
  max-width: 1080px;
  margin: 1.8rem auto 0;
  text-align: left;
}

@media (min-width: 820px) {
  .news-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .news-card.featured {
    grid-column: 1 / -1;
  }
}

.news-card {
  background: var(--parchment-ink);
  border: 1px solid var(--brass);
  padding: 1.3rem 1.45rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.85rem;
}

.news-card.featured {
  border-color: var(--gold);
  box-shadow: inset 0 0 0 1px var(--brass-dim);
}

.news-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 0.9rem;
  align-items: center;
  font-family: var(--serif);
  font-size: 0.9rem;
  color: var(--gold);
  margin-bottom: 0.25rem;
}

.news-kind {
  color: var(--soft);
}

.news-card h3 {
  margin: 0 0 0.4rem;
  font-size: 1.34rem;
  color: var(--text);
}

.news-card p {
  margin: 0;
  color: var(--soft);
  font-size: 0.96rem;
}

.news-card .actions {
  justify-content: flex-start;
}

.patch-summary-meta {
  margin-left: auto;
  margin-right: 0.55rem;
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.86rem;
  color: var(--soft);
}

details.fold > summary .patch-summary-meta + .patch-spacer {
  display: none;
}

details.fold.patch-fold > summary::after {
  margin-left: 0.35rem;
}

.patch-cat {
  font-size: 1.12rem;
  color: var(--gold);
  margin: 1.15rem 0 0.45rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid rgba(158, 126, 54, 0.22);
}

.patch-cat:first-child {
  margin-top: 0.6rem;
}

.fold-body ul.patch-items {
  margin: 0 0 0.85rem;
  padding-left: 1.25rem;
}

.fold-body ul.patch-items li {
  margin-bottom: 0.42rem;
  font-size: 0.95rem;
}

/* Benchmark command stack */
.bench-commands {
  max-width: 860px;
  margin: 1.6rem auto 0;
  text-align: left;
}

.bench-commands h3 {
  font-size: 1.18rem;
  margin: 1.3rem 0 0.45rem;
}

.bench-commands p {
  color: var(--soft);
  font-size: 0.95rem;
}

.data-table.compact-table th,
.data-table.compact-table td {
  padding: 0.5rem 0.42rem;
  font-size: 0.81rem;
}

/* Story page Dramatis Personae ("Voices of the Vale and the Fells") */
.voices-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.35rem;
  max-width: 1120px;
  margin: 2rem auto 0;
  text-align: left;
}

@media (min-width: 820px) {
  .voices-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

.voice-card {
  background: var(--parchment-ink);
  border: 1px solid var(--brass);
  padding: 1.35rem 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 0.9rem;
}

.voice-card.clamour-voice {
  border-color: var(--teal-line);
}

.voice-head {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.voice-titles h3 {
  margin: 0 0 0.15rem;
  font-size: 1.24rem;
  color: var(--gold);
}

.voice-role {
  margin: 0;
  font-family: var(--serif);
  font-size: 0.9rem;
  color: var(--soft);
}

.voice-bio {
  margin: 0;
  font-size: 0.96rem;
  color: var(--text);
}

.voice-quote {
  margin: 0;
  padding: 0.75rem 0 0 0.95rem;
  border-top: 1px solid var(--brass-dim);
  border-left: 2px solid var(--brass);
  font-family: var(--serif);
  font-style: italic;
  font-size: 0.98rem;
  line-height: 1.48;
  color: var(--gold);
}

.voice-card.clamour-voice .voice-quote {
  border-left-color: var(--teal-line);
}

