:root {
  --bg: #0e1620;
  --duct: #1a2634;
  --brass: #c79c3d;
  --water: #3fb8c4;
  --bone: #e7e5dc;
  --mute: #8a98a7;
  --rust: #b14a3c;
  --rail: 4.5rem;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--bone);
  font: 16px/1.55 "Iowan Old Style", "Palatino Linotype", Palatino, serif;
}

.shaft-rail {
  position: fixed;
  left: 0;
  bottom: 0;
  height: 100vh;
  width: var(--rail);
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.35rem;
  padding: 1rem 0.4rem;
  background: #0a1118;
  border-right: 1px solid rgba(199, 156, 61, 0.28);
  z-index: 20;
}

.shaft-rail a {
  color: var(--mute);
  text-decoration: none;
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font: 700 0.68rem/1 ui-monospace, "SF Mono", Menlo, monospace;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.7rem 0.2rem;
  border-left: 2px solid transparent;
}

.shaft-rail a.is-on,
.shaft-rail a:hover {
  color: var(--brass);
  border-left-color: var(--brass);
}

.stage {
  margin-left: var(--rail);
  padding: 1.5rem 1.25rem 4rem;
  max-width: 52rem;
}

.inset-hero {
  position: relative;
  min-height: 22rem;
  background:
    radial-gradient(120% 80% at 80% 10%, rgba(63, 184, 196, 0.18), transparent 55%),
    linear-gradient(165deg, var(--duct), var(--bg) 70%);
  border: 1px solid rgba(231, 229, 220, 0.08);
  border-radius: 1.35rem;
  overflow: hidden;
  padding: 1.25rem;
}

.inset-card {
  position: relative;
  z-index: 2;
  max-width: 28rem;
  background: rgba(14, 22, 32, 0.82);
  border: 1px solid rgba(199, 156, 61, 0.35);
  border-radius: 1rem;
  padding: 1.35rem 1.4rem 1.5rem;
}

.stamp {
  margin: 0 0 0.6rem;
  font: 700 0.68rem/1 ui-monospace, Menlo, monospace;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--water);
}

h1 {
  margin: 0;
  font: 800 2.05rem/1.05 "Avenir Next", "Segoe UI", sans-serif;
}

.deck {
  margin: 0.45rem 0 0.8rem;
  color: var(--brass);
  font: 600 1.05rem/1.3 "Avenir Next", sans-serif;
}

.lede { margin: 0; color: var(--mute); }

.inset-art {
  margin: 1rem 0 0;
}

.inset-art img {
  display: block;
  width: 100%;
  height: 11rem;
  object-fit: cover;
  border-radius: 0.85rem;
}

.band {
  margin: 2.2rem auto;
  max-width: 34rem;
  text-align: center;
  color: var(--mute);
  font-size: 1.02rem;
}

.icon-grid h2,
.annotated h2,
.legal-pair h2 {
  font: 700 1.25rem/1.2 "Avenir Next", sans-serif;
  margin: 0 0 1rem;
}

.icon-grid ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem;
}

.icon-grid li {
  background: rgba(26, 38, 52, 0.7);
  border: 1px solid rgba(63, 184, 196, 0.18);
  border-radius: 0.85rem;
  padding: 0.9rem 0.95rem 1rem;
}

.icon-grid h3 {
  margin: 0 0 0.35rem;
  font: 700 0.95rem/1.2 "Avenir Next", sans-serif;
  color: var(--brass);
}

.icon-grid p { margin: 0; font-size: 0.92rem; color: var(--mute); }

.annotated article {
  display: grid;
  grid-template-columns: minmax(0, 11rem) 1fr;
  gap: 1rem;
  align-items: center;
  margin: 0 0 1.1rem;
}

.annotated img {
  width: 100%;
  border-radius: 0.7rem;
  border: 1px solid rgba(199, 156, 61, 0.25);
}

.annotated p { margin: 0; color: var(--mute); }
.annotated strong { color: var(--bone); }

.legal-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
  margin-top: 2.4rem;
  padding-top: 1.6rem;
  border-top: 1px solid rgba(231, 229, 220, 0.1);
}

.legal-pair p { color: var(--mute); font-size: 0.92rem; }
.legal-pair a { color: var(--water); }

@media (max-width: 720px) {
  .shaft-rail {
    position: fixed;
    left: 0;
    right: 0;
    top: auto;
    bottom: 0;
    width: auto;
    height: auto;
    flex-direction: row;
    justify-content: space-around;
    border-right: 0;
    border-top: 1px solid rgba(199, 156, 61, 0.28);
    padding: 0.45rem 0.4rem calc(0.45rem + env(safe-area-inset-bottom));
  }
  .shaft-rail a {
    writing-mode: horizontal-tb;
    transform: none;
    border-left: 0;
    border-bottom: 2px solid transparent;
    padding: 0.35rem 0.2rem;
  }
  .shaft-rail a.is-on,
  .shaft-rail a:hover { border-bottom-color: var(--brass); }
  .stage { margin-left: 0; padding-bottom: 5.5rem; }
  .icon-grid ul,
  .legal-pair,
  .annotated article { grid-template-columns: 1fr; }
}
