/* ============================================================
   THE MAELSTROM: LAIR OF THE TYRANT
   Theme: Grimdark Red/Black/White — matching the official book
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Pinyon+Script&family=Cinzel:wght@400;600;700;900&family=Rajdhani:wght@300;400;500;600;700&display=swap');

/* ---------- tokens ---------- */
:root {
  --bg:           #06040a;
  --bg2:          #0d0810;
  --bg3:          #110d18;
  --surface:      rgba(255,255,255,.03);
  --red:          #9b1a1a;
  --red-bright:   #c0392b;
  --red-glow:     rgba(155,26,26,.4);
  --red-dim:      rgba(155,26,26,.2);
  --crimson:      #6b0f0f;
  --white:        #f5f2ee;
  --white-dim:    rgba(245,242,238,.85);
  --gold:         #d4b87a;
  --gold-dim:     rgba(212,184,122,.45);
  --border:       rgba(155,26,26,.4);
  --border-dim:   rgba(155,26,26,.18);
  --txt:          #f0ece6;
  --txt-dim:      #b8b3ac;

  --f-aeldari:   #2e6db4;
  --f-votann:    #c97e1c;
  --f-rcorsairs: #b52b1e;
  --f-ec:        #7b3fa0;
  --f-huron:     #993322;
  --f-necrons:   #1e8a4a;

  --font-script:  'Pinyon Script', cursive;
  --font-display: 'Cinzel', serif;
  --font-body:    'Rajdhani', sans-serif;
  --nav-h: 58px;
}

/* ---------- reset ---------- */
*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html {
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: var(--red) var(--bg);
}
body {
  font-family: var(--font-body);
  font-size: 1.05rem;
  background: var(--bg);
  color: var(--txt);
  line-height: 1.65;
  overflow-x: hidden;
}
a { color: inherit; text-decoration: none; }
ul { list-style: none; }
img { max-width: 100%; display: block; }
::-webkit-scrollbar { width: 7px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: var(--red); border-radius: 4px; }

/* ============================================================
   NAV
   ============================================================ */
#main-nav {
  position: fixed; top: 0; left: 0; right: 0;
  height: var(--nav-h); z-index: 900;
  background: rgba(6,4,10,.6);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: background .3s, border-color .3s, box-shadow .3s;
}
#main-nav.scrolled {
  background: rgba(6,4,10,.96);
  border-bottom-color: var(--border);
  box-shadow: 0 2px 30px rgba(155,26,26,.2);
}
.nav-inner {
  max-width: 1400px; margin: 0 auto; height: 100%;
  display: flex; justify-content: space-between; align-items: center;
  padding: 0 2rem;
}
.nav-brand {
  font-family: var(--font-script);
  font-size: 1.8rem;
  color: var(--white);
  text-shadow: 0 0 20px var(--red-glow);
  letter-spacing: 1px;
}
.nav-links { display: flex; gap: 2rem; }
.nav-link {
  font-family: var(--font-display);
  font-size: .82rem; text-transform: uppercase; letter-spacing: 2.5px;
  padding: .4rem .6rem;
  color: var(--white-dim);
  border-bottom: 1px solid transparent;
  transition: color .25s, border-color .25s, text-shadow .25s;
}
.nav-link:hover, .nav-link.active {
  color: var(--white);
  border-bottom-color: var(--red-bright);
  text-shadow: 0 0 12px var(--red-glow);
}

/* ============================================================
   ZONE 1 — DEEP SPACE HERO
   ============================================================ */
.zone-space {
  position: relative;
  min-height: 200vh;
  background: linear-gradient(180deg,
    #04020a 0%,
    #080516 25%,
    #0e0a1e 55%,
    #180d1a 80%,
    #200d12 100%);
  overflow: hidden;
}

/* --- fixed Maelstrom galaxy background (rules section and below) --- */
.galaxy-bg-fixed {
  position: fixed;
  inset: 0;
  width: 100vw; height: 100vh;
  pointer-events: none;
  z-index: 0;
  opacity: 0;
  transition: opacity 1.8s ease;
}
.galaxy-bg-fixed.visible { opacity: 1; }

/* --- hero video background --- */
.hero-video-bg {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  pointer-events: none;
  z-index: 1;
}
.hero-video-overlay {
  position: absolute; inset: 0;
  z-index: 2;
  background:
    linear-gradient(to bottom, rgba(4,2,10,.35) 0%, rgba(4,2,10,.15) 50%, rgba(4,2,10,.65) 100%);
  pointer-events: none;
}
.sound-toggle {
  position: fixed;
  top: calc(var(--nav-h) + 1rem); right: 3.5rem;
  z-index: 200;
  background: rgba(0,0,0,.70);
  border: 2px solid rgba(255,255,255,.35);
  border-radius: 50%;
  width: 3.5rem; height: 3.5rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer;
  font-size: 1.4rem;
  transition: background .2s, border-color .2s, transform .15s;
  backdrop-filter: blur(8px);
  box-shadow: 0 2px 20px rgba(0,0,0,.6);
}
.sound-toggle:hover {
  background: rgba(155,26,26,.70);
  border-color: var(--red-bright);
  transform: scale(1.1);
}

/* --- Standings section with galaxy map zoomed in as background --- */
.zone-standings-galaxy {
  position: relative;
  overflow: hidden;
  background: #04020a;
  padding: 5rem 0 3rem;
}
.galaxy-map-bg-layer {
  position: absolute;
  inset: -10%;          /* overscan so the map fills edge to edge when scaled */
  pointer-events: none;
  z-index: 0;
  animation: mapDrift 72s ease-in-out infinite;
  transform-origin: center center;
}
.galaxy-map-bg-layer svg {
  width: 100%; height: 100%;
}
.galaxy-map-overlay {
  position: absolute; inset: 0;
  z-index: 1;
  background:
    radial-gradient(ellipse 80% 60% at 50% 50%, rgba(4,2,10,.55) 0%, rgba(4,2,10,.82) 70%, #04020a 100%);
}
.galaxy-map-svg {
  width: 100%; height: 100%;
}
@keyframes mapDrift {
  0%   { transform: scale(1.10) translate(0px,   0px); }
  25%  { transform: scale(1.12) translate(-8px, -4px); }
  50%  { transform: scale(1.10) translate(5px,  -6px); }
  75%  { transform: scale(1.12) translate(-3px,  4px); }
  100% { transform: scale(1.10) translate(0px,   0px); }
}

/* --- hero content --- */
.hero-content {
  position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  text-align: center; z-index: 10; pointer-events: none;
  padding: 0 1rem;
}

/* Big script "The Maelstrom" */
.hero-the {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2vw, 1.55rem);
  font-weight: 600;
  letter-spacing: 8px;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: .25rem;
}
.hero-title {
  font-family: var(--font-script);
  font-size: clamp(4rem, 11vw, 9rem);
  color: var(--white);
  line-height: .95;
  text-shadow:
    0 0 60px rgba(155,26,26,.9),
    0 0 120px rgba(155,26,26,.4),
    2px 2px 4px rgba(0,0,0,.8);
  display: block;
}
.hero-sub {
  font-family: var(--font-display);
  font-size: clamp(1rem, 2.4vw, 1.8rem);
  font-weight: 700;
  letter-spacing: 6px;
  text-transform: uppercase;
  color: var(--red-bright);
  margin-top: .5rem;
  text-shadow: 0 0 20px var(--red-glow);
}
.hero-tagline {
  font-family: var(--font-display);
  font-size: clamp(.85rem, 1.5vw, 1.1rem);
  letter-spacing: 4px;
  text-transform: uppercase;
  color: var(--white-dim);
  margin-top: 1.2rem;
}

/* Red horizontal rule */
.hero-rule {
  width: 200px; height: 1px;
  background: linear-gradient(90deg, transparent, var(--red-bright), transparent);
  margin: 1.2rem auto .6rem;
}

/* --- campaign info (below fold) --- */
.campaign-info {
  position: relative; z-index: 10;
  max-width: 1100px; margin: 0 auto;
  padding: 3rem 2rem 8rem;
}
.flavor-text {
  font-size: clamp(1.05rem, 1.6vw, 1.3rem);
  font-style: italic;
  color: var(--white-dim);
  text-align: center;
  line-height: 2;
  border-left: 3px solid var(--red-bright);
  padding: 1.25rem 2rem;
  background: rgba(155,26,26,.06);
  border-radius: 0 4px 4px 0;
  margin: 0 auto 3rem;
  max-width: 850px;
}

/* stats */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem; margin-bottom: 3rem;
}
.stat-box {
  text-align: center; padding: 1.5rem 1rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: rgba(155,26,26,.07);
  backdrop-filter: blur(4px);
  transition: transform .25s, box-shadow .25s;
}
.stat-box:hover {
  transform: translateY(-4px);
  box-shadow: 0 0 20px var(--red-dim);
}
.stat-num {
  display: block;
  font-family: var(--font-display);
  font-size: 2.5rem; font-weight: 700; color: var(--white);
}
.stat-lbl {
  font-size: .72rem; text-transform: uppercase;
  letter-spacing: 2.5px; color: var(--txt-dim);
  margin-top: .25rem;
}

/* faction cards */
.faction-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}
.faction-card {
  text-align: center; padding: 1.5rem 1rem;
  border: 1px solid var(--fc);
  border-top: 3px solid var(--fc);
  border-radius: 4px;
  background: rgba(0,0,0,.4);
  backdrop-filter: blur(4px);
  transition: transform .25s, box-shadow .25s;
}
.faction-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 0 24px var(--fc);
}
.fc-icon { font-size: 1.8rem; margin-bottom: .5rem; }
.fc-name {
  font-family: var(--font-display);
  font-size: .78rem; font-weight: 700;
  color: var(--fc); margin-bottom: .2rem;
  text-transform: uppercase; letter-spacing: 1px;
}
.fc-handle { font-size: .82rem; color: var(--white-dim); }
.fc-army { font-size: .72rem; color: var(--txt-dim); font-style: italic; margin-top: .4rem; }

/* ============================================================
   SECTION TITLE — used across all zones
   ============================================================ */
.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 3rem);
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 4px;
  color: var(--white);
  text-align: center;
  margin-bottom: .5rem;
}
.section-title-bar {
  width: 100px; height: 2px; margin: 0 auto 2.5rem;
  background: linear-gradient(90deg, transparent, var(--red-bright), transparent);
}
.section-subtitle {
  font-family: var(--font-display);
  font-size: .95rem; letter-spacing: 3px;
  color: var(--red-bright); text-transform: uppercase;
  text-align: center; margin-bottom: .75rem;
}

/* ============================================================
   ZONE 2 — ATMOSPHERE / ROSTERS
   ============================================================ */
.zone-atmo {
  position: relative;
  background: linear-gradient(180deg,
    #200d12 0%, #1a0d16 15%,
    #140b14 40%, #110b12 70%,
    #0e0910 100%);
  padding: 6rem 0;
  overflow: hidden;
}

/* clouds */
.cloud-layer { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.cloud {
  position: absolute; border-radius: 50%;
  background: radial-gradient(ellipse, rgba(155,26,26,.06), transparent 70%);
  filter: blur(45px);
  animation: cloudDrift var(--dur) linear infinite;
}
@keyframes cloudDrift { 0%{transform:translateX(0)} 100%{transform:translateX(var(--dx))} }

.lightning-layer { position: absolute; inset: 0; pointer-events: none; z-index: 3; }
.lightning-flash {
  position: absolute; width: 100%; height: 100%;
  background: radial-gradient(ellipse at var(--x) var(--y), rgba(180,40,40,.12), transparent 55%);
  opacity: 0;
  animation: flash var(--dur) ease-out infinite;
  animation-delay: var(--delay);
}
@keyframes flash { 0%,94%,100%{opacity:0} 2%,4%{opacity:1} 3%,5%{opacity:0} }

.zone-content {
  position: relative; z-index: 10;
  max-width: 1400px; margin: 0 auto; padding: 0 2rem;
}

/* ---------- roster cards ---------- */
.rosters-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}
.roster-card {
  border: 1px solid var(--border);
  border-top: 3px solid var(--fc);
  border-radius: 4px;
  background: rgba(0,0,0,.5);
  backdrop-filter: blur(6px);
  overflow: hidden;
  transition: transform .25s, box-shadow .25s;
}
.roster-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 0 20px var(--fc);
}
.roster-head {
  padding: 1.25rem 1.5rem;
  background: rgba(0,0,0,.3);
  border-left: 4px solid var(--fc);
}
.rh-handle {
  font-family: var(--font-display);
  font-size: 1.2rem; font-weight: 700; color: var(--white);
}
.rh-army { font-size: .85rem; color: var(--txt-dim); font-style: italic; margin-top: .1rem; }
.rh-meta { display: grid; gap: .3rem; margin-top: .75rem; font-size: .85rem; }
.rh-row { display: flex; justify-content: space-between; }
.rh-row span:first-child { color: var(--txt-dim); text-transform: uppercase; letter-spacing: 1px; }
.rh-row span:last-child { color: var(--white); font-weight: 600; }

.roster-toggle {
  padding: .65rem 1rem;
  border-top: 1px solid var(--border-dim);
  background: rgba(0,0,0,.2);
}
.toggle-btn {
  width: 100%; padding: .55rem .75rem; cursor: pointer;
  background: rgba(155,26,26,.12);
  border: 1px solid var(--border);
  color: var(--white);
  font-family: var(--font-display);
  text-transform: uppercase; letter-spacing: 1.5px; font-size: .72rem;
  border-radius: 3px;
  display: flex; justify-content: space-between; align-items: center;
  transition: background .2s, border-color .2s;
}
.toggle-btn:hover { background: rgba(155,26,26,.22); border-color: var(--red-bright); }
.toggle-icon { transition: transform .3s; }
.toggle-btn.open .toggle-icon { transform: rotate(180deg); }

.roster-units {
  max-height: 0; overflow: hidden;
  padding: 0 1.25rem;
  transition: max-height .4s ease, padding .3s;
}
.roster-units.show { max-height: 2500px; padding: 1.25rem; }

.champ-box {
  background: rgba(155,26,26,.1);
  border: 1px solid var(--red-bright);
  border-radius: 3px;
  padding: .85rem 1rem; margin-bottom: 1rem;
}
.champ-label {
  font-family: var(--font-display);
  font-size: .65rem; text-transform: uppercase;
  letter-spacing: 2.5px; color: var(--red-bright);
}
.champ-name {
  font-family: var(--font-display);
  font-size: 1.05rem; font-weight: 700; color: var(--white);
  margin-top: .15rem;
}
.champ-role { font-size: .8rem; color: var(--txt-dim); margin-top: .1rem; }

.unit-row {
  display: flex; justify-content: space-between; align-items: flex-start;
  padding: .5rem .7rem;
  border-left: 2px solid var(--red);
  background: rgba(0,0,0,.25);
  border-radius: 0 3px 3px 0;
  margin-bottom: .45rem;
  transition: border-color .2s, background .2s;
}
.unit-row:hover { border-left-color: var(--red-bright); background: rgba(155,26,26,.1); }
.unit-name { font-weight: 600; font-size: .88rem; color: var(--white); }
.unit-gear { font-size: .75rem; color: var(--txt-dim); font-style: italic; margin-top: .08rem; }
.unit-pts {
  white-space: nowrap; font-weight: 700; font-size: .8rem;
  color: var(--white);
  background: rgba(155,26,26,.2);
  padding: .12rem .45rem; border-radius: 2px;
  margin-left: .75rem; flex-shrink: 0;
}

.zone-content-bottom { position: relative; z-index: 10; }

/* ---------- leaderboard cards ---------- */
.leaderboard-wrap {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-bottom: 1rem;
}
.lb-card {
  display: flex;
  align-items: flex-start;
  gap: 1.1rem;
  background: rgba(8,4,14,.75);
  border: 1px solid var(--border-dim);
  border-left: 3px solid var(--border);
  border-radius: 4px;
  padding: 1rem 1.2rem;
  transition: border-color .2s, box-shadow .2s;
}
.lb-card:hover { border-left-color: var(--red); box-shadow: 0 0 18px rgba(155,26,26,.15); }
.lb-card--first {
  border-left-color: var(--gold);
  background: rgba(12,8,4,.8);
  box-shadow: 0 0 25px rgba(200,169,110,.1);
}

.lb-rank {
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--txt-dim);
  min-width: 2rem;
  text-align: center;
  padding-top: .15rem;
}
.lb-card--first .lb-rank { color: var(--gold); }

.lb-main { flex: 1; min-width: 0; }
.lb-top {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: .5rem 1rem;
  margin-bottom: .6rem;
}
.lb-handle {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}
.lb-faction { font-size: .88rem; font-weight: 700; }
.lb-army    { font-size: .88rem; color: var(--txt-dim); font-style: italic; }
.lb-battles { font-size: .82rem; color: var(--txt-dim); margin-left: auto; }

/* Condition progress pips */
.lb-pips {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  margin-bottom: .6rem;
}
.pip {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 70px;
  padding: .3rem .25rem .25rem;
  border-radius: 3px;
  border: 1px solid transparent;
  font-size: .6rem;
  line-height: 1.2;
  cursor: default;
}
.pip-label { color: var(--txt); text-transform: uppercase; letter-spacing: .3px; font-size: .58rem; text-align: center; word-break: break-word; line-height: 1.3; }
.pip-val   { font-family: var(--font-display); font-weight: 700; font-size: .95rem; margin-top: .15rem; }

.pip-none  { background: rgba(255,255,255,.03); border-color: rgba(255,255,255,.06); }
.pip-none .pip-val  { color: rgba(255,255,255,.2); }
.pip-t1    { background: rgba(200,169,110,.1);  border-color: rgba(200,169,110,.3); }
.pip-t1 .pip-val    { color: var(--gold); }
.pip-t2    { background: rgba(217,122,80,.12); border-color: rgba(217,122,80,.35); }
.pip-t2 .pip-val    { color: #d97a50; }
.pip-t3    { background: rgba(192,57,43,.15);  border-color: rgba(192,57,43,.4); }
.pip-t3 .pip-val    { color: var(--red-bright); }

/* NP progress bar */
.lb-bar-wrap {
  height: 3px;
  background: rgba(255,255,255,.07);
  border-radius: 2px;
  overflow: hidden;
}
.lb-bar { height: 100%; border-radius: 2px; transition: width .4s ease; }

/* Score block */
.lb-score-block {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  text-align: center;
}
.lb-score-total {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 900;
  color: var(--white);
  line-height: 1;
}
.lb-card--first .lb-score-total { color: var(--gold); }
.lb-score-label {
  font-size: .65rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  color: var(--txt-dim);
  margin-top: .1rem;
}
.lb-booty {
  font-size: .65rem;
  color: var(--gold);
  margin-top: .25rem;
}

.lb-note {
  text-align: center;
  font-size: .75rem;
  color: var(--txt-dim);
  font-style: italic;
  margin-top: .5rem;
  margin-bottom: 3rem;
}

/* ============================================================
   RULEBOOK PAGES SECTION
   ============================================================ */
.zone-rules {
  position: relative;
  z-index: 1;
  background: linear-gradient(180deg, rgba(14,9,16,0.72) 0%, rgba(10,7,13,0.65) 100%);
  padding: 5rem 0;
}

/* Book-style panel */
.book-panel {
  background: rgba(0,0,0,.45);
  border: 1px solid var(--border);
  border-left: 4px solid var(--red-bright);
  border-radius: 4px;
  padding: 2rem;
  backdrop-filter: blur(4px);
  transition: box-shadow .25s;
}
.book-panel:hover { box-shadow: 0 0 20px rgba(155,26,26,.15); }
.book-panel h3 {
  font-family: var(--font-display);
  font-size: 1.1rem; font-weight: 900;
  text-transform: uppercase; letter-spacing: 3px;
  color: var(--white); margin-bottom: 1rem;
}
.book-panel p {
  color: var(--txt); font-size: 1rem;
  line-height: 1.8; margin-bottom: .75rem;
}
.book-panel p:last-child { margin-bottom: 0; }

/* ── Notoriety Scoring Table ─────────────────────────────── */
.scoring-intro {
  max-width: 760px;
  margin: 0 auto 2rem;
  text-align: center;
  color: var(--txt-dim);
  font-size: .9rem;
  line-height: 1.7;
  font-style: italic;
}
.scoring-table-scroll {
  overflow-x: auto;
  margin-bottom: 3.5rem;
  border: 1px solid var(--border-dim);
  border-radius: 4px;
}
.scoring-table {
  width: 100%;
  border-collapse: collapse;
  font-family: var(--font-body);
  min-width: 780px;
}
/* Header */
.scoring-table thead tr {
  background: rgba(155,26,26,.18);
  border-bottom: 2px solid var(--red);
}
.scoring-table th {
  padding: .8rem 1rem;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-family: var(--font-display);
  font-size: .7rem;
  font-weight: 700;
  color: var(--white);
}
.sc-head-condition { text-align: left; width: 30%; color: var(--gold); }
.sc-head-tier { text-align: center; width: 23.3%; }
.sc-tier-label {
  display: block;
  font-size: .75rem;
  color: var(--white);
  letter-spacing: 2px;
}
.sc-tier-np {
  display: block;
  font-size: 1.3rem;
  font-weight: 900;
  color: var(--red-bright);
  line-height: 1.1;
  margin-top: .1rem;
}
.sc-np-word { font-size: .65rem; font-weight: 600; letter-spacing: 1px; color: var(--txt-dim); }

/* Body rows */
.scoring-table tbody tr {
  border-bottom: 1px solid var(--border-dim);
  transition: background .2s;
}
.scoring-table tbody tr:last-child { border-bottom: none; }
.scoring-table tbody tr:hover { background: rgba(155,26,26,.07); }

/* Condition cell */
.sc-condition {
  padding: 1rem;
  font-size: .82rem;
  color: var(--txt-dim);
  line-height: 1.65;
  font-style: italic;
  vertical-align: top;
  border-right: 1px solid var(--border-dim);
}

/* Title cells — each tier gets a subtle colour shift */
.sc-title-cell {
  padding: .9rem 1rem;
  vertical-align: top;
  text-align: center;
  border-right: 1px solid var(--border-dim);
}
.sc-title-cell:last-child { border-right: none; }
.sc-title-name {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gold);
  margin-bottom: .4rem;
}
.sc-title-desc {
  display: block;
  font-size: .88rem;
  color: var(--txt);
  line-height: 1.6;
  text-align: left;
}

/* Tier colour coding on names */
tbody tr td.sc-title-cell:nth-child(2) .sc-title-name { color: #c8a96e; }   /* Tier I  — gold */
tbody tr td.sc-title-cell:nth-child(3) .sc-title-name { color: #d97a50; }   /* Tier II — orange-red */
tbody tr td.sc-title-cell:nth-child(4) .sc-title-name { color: #c0392b; }   /* Tier III — red */

/* Mission grid */
.missions-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 1.5rem;
}
.mission-card {
  background: rgba(8,4,14,.7);
  border: 1px solid var(--border-dim);
  border-top: 3px solid var(--red-bright);
  border-radius: 4px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform .25s, box-shadow .25s;
}
.mission-card:hover { transform: translateY(-3px); box-shadow: 0 0 22px var(--red-dim); }

/* Mission header */
.mission-header {
  padding: .85rem 1.1rem .7rem;
  background: rgba(155,26,26,.08);
  border-bottom: 1px solid var(--border-dim);
}
.mission-type {
  font-size: .65rem; text-transform: uppercase;
  letter-spacing: 2px; color: var(--red-bright);
  margin-bottom: .2rem;
}
.mission-name {
  font-family: var(--font-display);
  font-size: 1.05rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 2px;
  color: var(--white);
}

/* Mission body */
.mission-body { padding: 1rem 1.1rem 1.1rem; flex: 1; }
.mission-flavor {
  font-size: .8rem; color: var(--txt-dim);
  line-height: 1.65; font-style: italic;
  border-left: 2px solid var(--red);
  padding-left: .75rem;
  margin-bottom: .9rem;
}
.mission-rules { display: flex; flex-direction: column; gap: .55rem; }
.mission-rule {
  display: flex;
  flex-direction: column;
  gap: .18rem;
}
.mission-rule-heading {
  font-family: var(--font-display);
  font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.5px;
  color: var(--gold);
}
.mission-rule-text {
  font-size: .78rem; color: var(--txt-dim); line-height: 1.6;
}

/* Spoils of War D66 reference tables */
.sw-tables {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
  margin-bottom: 2rem;
}
.sw-table {
  width: 100%; border-collapse: collapse;
  border: 1px solid var(--border);
  border-top: 3px solid var(--red-bright);
  background: rgba(0,0,0,.45);
  border-radius: 4px; overflow: hidden;
}
.sw-table thead th {
  padding: .7rem 1rem;
  background: rgba(155,26,26,.15);
  font-family: var(--font-display);
  font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 2px;
  color: var(--white);
  border-bottom: 2px solid var(--border);
  text-align: left;
}
.sw-table td {
  padding: .55rem 1rem;
  font-size: .85rem;
  border-bottom: 1px solid var(--border-dim);
  color: var(--txt);
}
.sw-table tr:last-child td { border-bottom: none; }
.sw-table tr:hover td { background: rgba(155,26,26,.06); }
.sw-d66 {
  font-family: var(--font-display);
  font-weight: 700; color: var(--red-bright);
  width: 42px;
}
.sw-cat {
  font-size: .78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 1px;
  width: 110px;
}
.sw-item { color: var(--white); }
@media (max-width: 640px) {
  .sw-tables { grid-template-columns: 1fr; }
}

/* Spoils of War rolls table */
.booty-table {
  width: 100%; border-collapse: collapse;
  border: 1px solid var(--border);
  border-top: 3px solid var(--red-bright);
  background: rgba(0,0,0,.45);
  border-radius: 4px; overflow: hidden;
}
.booty-table th {
  padding: .75rem 1rem; background: rgba(155,26,26,.15);
  font-family: var(--font-display);
  font-size: .7rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 2px; color: var(--white);
  border-bottom: 2px solid var(--border);
}
.booty-table td {
  padding: .65rem 1rem; font-size: .88rem;
  border-bottom: 1px solid var(--border-dim);
  color: var(--txt);
}
.booty-table tr:last-child td { border-bottom: none; }
.booty-table tr:hover td { background: rgba(155,26,26,.06); }
.booty-roll {
  font-family: var(--font-display);
  font-weight: 700; color: var(--red-bright);
}
.booty-result { color: var(--white); font-weight: 600; }

/* Stratagem cards */
.stratagem-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.25rem;
}
.strat-card {
  background: rgba(0,0,0,.45);
  border: 1px solid var(--border);
  border-radius: 4px; padding: 1.25rem;
  transition: box-shadow .2s;
}
.strat-card:hover { box-shadow: 0 0 14px var(--red-dim); }
.strat-cost {
  display: inline-block;
  background: rgba(155,26,26,.25); border: 1px solid var(--red);
  color: var(--white); padding: .15rem .6rem; border-radius: 3px;
  font-family: var(--font-display);
  font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 1.5px;
  margin-bottom: .5rem;
}
.strat-name {
  font-family: var(--font-display);
  font-size: .95rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: 2px;
  color: var(--white); margin-bottom: .25rem;
}
.strat-type {
  font-size: .68rem; text-transform: uppercase;
  letter-spacing: 1.5px; color: var(--red-bright);
  margin-bottom: .6rem;
}
.strat-desc { font-size: .82rem; color: var(--txt-dim); line-height: 1.65; }

/* ============================================================
   FOOTER
   ============================================================ */
.campaign-footer {
  position: relative; z-index: 10;
  text-align: center;
  padding: 3rem 1rem 1.5rem;
  font-family: var(--font-display);
  font-size: .65rem; color: var(--txt-dim);
  letter-spacing: 2.5px; text-transform: uppercase;
  border-top: 1px solid var(--border-dim);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .rosters-grid { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); }
  .bd-breakdown { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  .nav-inner { padding: 0 1rem; }
  .nav-links { gap: 1rem; }
  .nav-link { font-size: .65rem; padding: .3rem .4rem; }
  .nav-brand { font-size: 1.4rem; }
  .stats-row { grid-template-columns: repeat(2,1fr); }
  .faction-cards { grid-template-columns: repeat(2, 1fr); }
  .rosters-grid { grid-template-columns: 1fr; }
  .bc-matchup, .bc-scores { grid-template-columns: 1fr; text-align: center; }
  .bc-vs, .bc-scores-vs { display: none; }
  .missions-grid { grid-template-columns: 1fr; }
  .stratagem-grid { grid-template-columns: 1fr; }
  .leaderboard-table th.hide-sm, .leaderboard-table td.hide-sm { display: none; }
}
@media (max-width: 480px) {
  .nav-brand { display: none; }
  .nav-links { width: 100%; justify-content: space-around; }
  .stats-row { grid-template-columns: 1fr 1fr; gap: .6rem; }
  .faction-cards { grid-template-columns: 1fr; }
  .stat-num { font-size: 1.8rem; }
  .hero-title { font-size: clamp(3.5rem, 15vw, 7rem); }
  .matrix-table { font-size: .68rem; }
  .matrix-table th, .matrix-table td { padding: .4rem .25rem; }
}
