:root {
  --bg: #20242b;
  --bg-soft: #262b33;
  --panel: #2c323b;
  --panel-hover: #313844;
  --text: #edf1f5;
  --muted: #aeb7c2;
  --faint: #7f8996;
  --line: #3a424d;
  --accent: #8fb6d9;
  --accent-strong: #b8d2ea;
  --max: 1120px;
  --reading: 760px;
  --radius: 16px;
  --shadow: 0 12px 32px rgba(0,0,0,.16);
  --sans: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background: var(--bg);
  font-family: var(--sans);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { display: block; max-width: 100%; }
.site-shell { min-height: 100vh; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(32,36,43,.9);
  backdrop-filter: blur(18px);
  border-bottom: 1px solid var(--line);
}

.brand {
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
  letter-spacing: -.02em;
}

.nav {
  display: flex;
  gap: 1rem;
  font-size: .9rem;
}

.nav a {
  color: var(--muted);
  text-decoration: none;
}

.nav a:hover { color: var(--text); }

.hero {
  width: min(var(--max), calc(100% - 2rem));
  margin: 2rem auto 0;
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr);
  min-height: 520px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 22px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.hero::after { display: none; }
.hero-image {
  position: static;
  width: 100%;
  height: 100%;
  min-height: 520px;
  object-fit: cover;
}

.hero-copy {
  position: static;
  width: auto;
  margin: 0;
  padding: clamp(2rem, 5vw, 4rem);
  color: var(--text);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.kicker {
  margin: 0 0 .8rem;
  color: var(--accent);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.hero h1, .chapter-title {
  margin: 0;
  max-width: 14ch;
  font-size: clamp(2.8rem, 6vw, 6rem);
  line-height: .98;
  letter-spacing: -.055em;
}

.hero-deck {
  max-width: 36rem;
  margin: 1.25rem 0 0;
  color: var(--muted);
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  line-height: 1.5;
}

.button {
  align-self: flex-start;
  display: inline-flex;
  margin-top: 1.6rem;
  padding: .72rem 1rem;
  color: #16202a;
  background: var(--accent-strong);
  border: 0;
  border-radius: 10px;
  text-decoration: none;
  font-size: .9rem;
  font-weight: 750;
}

.button:hover { filter: brightness(1.05); }

.section {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(3.25rem, 7vw, 6rem) 0 0;
}

.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.3rem;
}

.section-heading h2 {
  margin: 0;
  font-size: clamp(1.55rem, 3vw, 2.3rem);
  letter-spacing: -.035em;
}

.section-heading span {
  color: var(--faint);
  font-size: .78rem;
}

.status-grid, .party-grid, .archive-grid {
  display: grid;
  gap: 1rem;
}
.status-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.party-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.archive-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }

.card {
  padding: 1.3rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: none;
  transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.card:hover {
  background: var(--panel-hover);
  border-color: #46515e;
}

.card small {
  display: block;
  margin-bottom: .5rem;
  color: var(--faint);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.card h3 {
  margin: 0 0 .5rem;
  font-size: 1.2rem;
  letter-spacing: -.02em;
}

.card h3 a { text-decoration-thickness: 1px; text-underline-offset: 3px; }
.card p { margin: 0; color: var(--muted); }
.card.feature { border-color: #4a5e72; }
.party-card { min-height: 0; }
.party-card strong {
  display: block;
  margin-bottom: .15rem;
  font-size: 1.35rem;
  letter-spacing: -.02em;
}
.party-card em {
  display: block;
  margin-bottom: .7rem;
  color: var(--accent);
  font-style: normal;
  font-size: .9rem;
  font-weight: 700;
}

.chapter-page { background: var(--bg); }
.chapter-masthead {
  width: min(900px, calc(100% - 2rem));
  margin: 0 auto;
  padding: clamp(4rem, 9vw, 7rem) 0 2rem;
}

.chapter-meta {
  display: flex;
  gap: .7rem 1rem;
  flex-wrap: wrap;
  margin-bottom: 1rem;
  color: var(--faint);
  font-size: .76rem;
  font-weight: 650;
}

.chapter-title { max-width: 12ch; }
.chapter-deck {
  max-width: 42rem;
  margin: 1.4rem 0 0;
  color: var(--muted);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
  line-height: 1.5;
}

.chapter-figure {
  width: min(var(--max), calc(100% - 2rem));
  margin: 0 auto 3rem;
}

.chapter-figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
}

.chapter-figure figcaption {
  padding-top: .75rem;
  color: var(--faint);
  font-size: .9rem;
}

.prose {
  width: min(var(--reading), calc(100% - 2rem));
  margin: 0 auto;
  padding-bottom: 6rem;
  color: #dbe1e7;
  font-size: clamp(1.05rem, 1.6vw, 1.16rem);
  line-height: 1.78;
}

.prose p { margin: 0 0 1.4rem; }
.prose h2 {
  margin: 3.2rem 0 1rem;
  color: var(--text);
  font-size: clamp(1.65rem, 3.4vw, 2.5rem);
  line-height: 1.1;
  letter-spacing: -.035em;
}

.prose .dropcap::first-letter {
  float: none;
  margin: 0;
  color: inherit;
  font-size: inherit;
  line-height: inherit;
  font-weight: inherit;
}

.pullquote {
  margin: 2.8rem 0;
  padding: 1.4rem 1.5rem;
  color: var(--text);
  background: var(--panel);
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  font-size: clamp(1.25rem, 2.6vw, 1.75rem);
  line-height: 1.35;
  font-weight: 650;
}

.endmark {
  margin-top: 4rem;
  padding-top: 1.2rem;
  color: var(--faint);
  border-top: 1px solid var(--line);
  font-size: .8rem;
}

.site-footer {
  width: min(var(--max), calc(100% - 2rem));
  margin: 5rem auto 0;
  padding: 2rem 0 3rem;
  color: var(--faint);
  background: transparent;
  border-top: 1px solid var(--line);
  text-align: left;
  font-size: .78rem;
}

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .hero-image { min-height: 360px; max-height: 52vh; }
  .status-grid, .archive-grid { grid-template-columns: 1fr; }
  .party-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .site-header { position: static; align-items: flex-start; }
  .nav { flex-wrap: wrap; justify-content: flex-end; }
  .party-grid { grid-template-columns: 1fr; }
  .hero { margin-top: 1rem; min-height: 0; }
  .hero-copy { padding: 1.5rem; }
  .hero-image { min-height: 280px; }
}
