/* =============================================================================
   BELLUM — FIELD MANUAL FM-01
   Astarte Industries internal publication stylesheet
   Document class: RESTRICTED — TRAINING USE ONLY
   -----------------------------------------------------------------------------
   Structure
     01  Tokens
     02  Reset & base typography
     03  Grain, scanlines, classification bars
     04  Masthead & controls
     05  Layout shell + TOC
     06  Hero
     07  Disclaimer / foreword
     08  Chapter scaffolding, paragraphs, callouts, briefing cards, shots
     09  Roles (ch 5)
     10  Controls / keybinds (ch 6)
     11  Watch & B-TAK device frames (ch 7)
     12  Comms (ch 8)
     13  Medical (ch 9)
     14  Spawn lives (ch 10)
     15  Mode compare (ch 12)
     16  Tips + factions (ch 13)
     17  End matter
     18  Help panel
     19  Paper mode + @media print
     20  Responsive breakpoints
   ============================================================================= */

/* ---------- 01  TOKENS ---------------------------------------------------- */
:root{
  /* Ground */
  --ink:        #0a0c08;   /* near-black, slight olive cast */
  --ink-2:      #13160f;   /* first lift */
  --ink-3:      #1c1f16;   /* second lift */
  --ink-4:      #262a1e;   /* rule/hairline base */

  /* Paper */
  --paper:      #e8e2d4;   /* bone printout */
  --paper-2:    #d9d1bd;   /* weathered edge */
  --paper-3:    #c4bb9f;   /* folded crease */

  /* Olive drab */
  --olive:      #2d3a1f;
  --olive-2:    #3d4d2a;
  --olive-3:    #556a3c;

  /* Dust / khaki */
  --khaki:      #8a7c5c;
  --khaki-2:    #a69572;
  --khaki-dim:  #6b6146;

  /* Signal inks */
  --rust:       #c73e1d;   /* SIGNAL RED — critical only */
  --rust-dim:   #7a2511;
  --signal:     #d4a017;   /* amber — B-TAK / watch */
  --signal-dim: #8a6a0f;
  --ok:         #6b8e3d;   /* OD green — ambulatory */

  /* Text */
  --text:       #c9c4b4;   /* primary body on ink */
  --text-dim:   #8c887a;
  --text-mute:  #5c5a52;
  --text-hi:    #e8e2d4;   /* bone-white highlight */

  /* Rules */
  --rule:       #3a3f2d;
  --rule-hi:    #5a5f47;
  --rule-lo:    #22261a;

  /* Type stacks (families already loaded via fonts.css) */
  --ff-display: 'Black Ops One', 'Impact', sans-serif;
  --ff-head:    'Oswald', 'Arial Narrow', sans-serif;
  --ff-body:    'IBM Plex Sans', 'Helvetica Neue', sans-serif;
  --ff-serif:   'IBM Plex Serif', 'Georgia', serif;
  --ff-mono:    'JetBrains Mono', 'Consolas', monospace;

  /* Rhythm */
  --lh-tight:   1.08;
  --lh-body:    1.62;

  /* Measurements */
  --content-max: 1320px;
  --toc-w:       248px;
  --gutter:      28px;
  --hair:        1px;
}

/* ---------- 02  RESET & BASE ---------------------------------------------- */
*,
*::before,
*::after{ box-sizing: border-box; }

html, body{ margin: 0; padding: 0; }

html{
  background: var(--ink);
  color: var(--text);
  font-family: var(--ff-body);
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scroll-behavior: smooth;
  scrollbar-color: var(--olive-2) var(--ink);
}

body{
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(0,0,0,.0) 0%, rgba(0,0,0,.25) 80%),
    var(--ink);
  overflow-x: hidden;
  line-height: var(--lh-body);
  font-feature-settings: "ss01","kern","liga";
}

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

a{
  color: var(--signal);
  text-decoration: none;
  border-bottom: 1px dotted var(--signal-dim);
  transition: color .12s linear, border-color .12s linear, background-color .12s linear;
}
a:hover{ color: var(--text-hi); border-bottom-color: var(--signal); }
a:focus-visible{
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

p{ margin: 0 0 1em; }
strong{ color: var(--text-hi); font-weight: 600; letter-spacing: .01em; }
em{ color: var(--khaki-2); font-style: italic; }

h1, h2, h3, h4, h5, h6{
  font-family: var(--ff-head);
  font-weight: 500;
  color: var(--text-hi);
  letter-spacing: .04em;
  line-height: var(--lh-tight);
  margin: 0 0 .6em;
  text-transform: uppercase;
}

kbd{
  display: inline-block;
  font-family: var(--ff-mono);
  font-size: .82em;
  letter-spacing: .02em;
  color: var(--text-hi);
  background: var(--ink-3);
  border: 1px solid var(--rule);
  border-bottom-width: 2px;
  padding: 1px 7px 2px;
  margin: 0 1px;
  box-shadow: inset 0 -1px 0 var(--ink);
  text-transform: uppercase;
  white-space: nowrap;
}

::selection{
  background: var(--signal);
  color: var(--ink);
}

/* ---------- 03  GRAIN, SCANLINES, CLASSIFICATION ------------------------- */

.grain{
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9000;
  opacity: .11;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='260' height='260'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='1.35' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.85  0 0 0 0 0.82  0 0 0 0 0.72  0 0 0 0.78 0'/></filter><rect width='100%25' height='100%25' filter='url(%23n)'/></svg>");
  background-size: 260px 260px;
}

.scanlines{
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9001;
  opacity: .08;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,.0) 0px,
    rgba(255,255,255,.0) 2px,
    rgba(0,0,0,.35) 3px,
    rgba(0,0,0,.0) 4px
  );
  mix-blend-mode: multiply;
}

.classification{
  position: relative;
  z-index: 10;
  background: var(--rust);
  color: #fef6e5;
  font-family: var(--ff-head);
  font-weight: 600;
  letter-spacing: .32em;
  text-transform: uppercase;
  font-size: 11px;
  padding: 6px 14px;
  display: flex;
  align-items: center;
  gap: 14px;
  border-top: 1px solid #1a0604;
  border-bottom: 1px solid #1a0604;
  box-shadow: 0 1px 0 var(--ink) inset, 0 -1px 0 var(--ink) inset;
}
.classification.top{
  border-top: none;
  border-bottom: 2px solid #1a0604;
}
.classification.bottom{
  border-top: 2px solid #1a0604;
  border-bottom: none;
}
.cls-bar{
  flex: 1 1 auto;
  height: 2px;
  background: repeating-linear-gradient(
    90deg,
    #fef6e5 0 6px,
    transparent 6px 10px
  );
  opacity: .72;
}
.cls-text{
  flex: 0 0 auto;
  white-space: nowrap;
}

/* ---------- 04  MASTHEAD & CONTROLS -------------------------------------- */
.masthead{
  position: relative;
  z-index: 9;
  background:
    linear-gradient(180deg, var(--ink-2) 0%, var(--ink) 100%),
    var(--ink);
  border-bottom: 1px solid var(--rule);
  box-shadow:
    0 3px 0 var(--ink),
    0 4px 0 var(--rule);
}

.masthead-inner{
  max-width: var(--content-max);
  margin: 0 auto;
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 24px;
  padding: 18px 28px 20px;
  position: relative;
}

.masthead-inner::after{
  content: "";
  position: absolute;
  left: 28px; right: 28px; bottom: -2px; height: 5px;
  background-image: repeating-linear-gradient(
    90deg,
    var(--rule-hi) 0 1px,
    transparent 1px 22px
  );
  opacity: .55;
}

.masthead-mark{
  display: flex;
  align-items: center;
  gap: 18px;
  flex: 1 1 auto;
  min-width: 0;
}
.masthead-icon{
  width: 56px;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 0 1px var(--ink));
}
.masthead-titles{ min-width: 0; }
.masthead-eyebrow{
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: .24em;
  text-transform: uppercase;
  color: var(--khaki);
  margin-bottom: 4px;
}
.masthead-title{
  font-family: var(--ff-head);
  font-weight: 700;
  font-size: clamp(22px, 2.4vw, 30px);
  letter-spacing: .06em;
  color: var(--text-hi);
  margin: 0;
  line-height: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.masthead-title span{
  color: var(--khaki-2);
  font-weight: 400;
}
.masthead-meta{
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--text-mute);
  text-transform: uppercase;
  margin-top: 5px;
}

.masthead-controls{
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.reading-progress{
  position: relative;
  width: 140px;
  height: 28px;
  border: 1px solid var(--rule);
  background: var(--ink-3);
  display: flex;
  align-items: center;
  padding: 0 9px;
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: .16em;
  color: var(--khaki-2);
  text-transform: uppercase;
}
.rp-bar{
  position: absolute;
  inset: 2px auto 2px 2px;
  width: 0;
  background: var(--signal);
  opacity: .18;
  transition: width .25s ease-out;
  pointer-events: none;
}
.rp-text{
  position: relative;
  color: var(--text-hi);
  font-weight: 600;
}
.rp-text span{ color: var(--signal); }

.ctrl-btn{
  appearance: none;
  border: 1px solid var(--rule);
  background: var(--ink-3);
  color: var(--khaki-2);
  font-family: var(--ff-head);
  font-weight: 500;
  letter-spacing: .16em;
  text-transform: uppercase;
  font-size: 11px;
  padding: 7px 12px 6px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  transition: color .1s linear, border-color .1s linear, background .1s linear;
}
.ctrl-btn:hover,
.ctrl-btn:focus-visible{
  color: var(--text-hi);
  border-color: var(--signal);
  background: var(--ink-2);
  outline: none;
}
.ctrl-btn[aria-pressed="true"]{
  color: var(--ink);
  background: var(--signal);
  border-color: var(--signal);
}
.ctrl-glyph{
  font-family: var(--ff-mono);
  font-size: 12px;
  line-height: 1;
  color: var(--signal);
}
.ctrl-btn[aria-pressed="true"] .ctrl-glyph{ color: var(--ink); }

/* ---------- 05  LAYOUT & TOC --------------------------------------------- */
.layout{
  max-width: var(--content-max);
  margin: 0 auto;
  display: grid;
  grid-template-columns: var(--toc-w) 1fr;
  gap: 0;
  position: relative;
  /* vertical rule between TOC and content — signature field-manual gutter */
  background:
    linear-gradient(to right,
      transparent 0,
      transparent calc(var(--toc-w) - 1px),
      var(--rule) calc(var(--toc-w) - 1px),
      var(--rule) var(--toc-w),
      transparent var(--toc-w),
      transparent 100%);
}

/* --- side TOC --- */
.toc{
  grid-column: 1;
  position: sticky;
  top: 0;
  align-self: start;
  max-height: 100vh;
  overflow: auto;
  padding: 26px 18px 24px 28px;
  border-right: 1px solid var(--rule);
  background:
    linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
  scrollbar-width: thin;
  scrollbar-color: var(--olive-2) transparent;
}
.toc::-webkit-scrollbar{ width: 6px; }
.toc::-webkit-scrollbar-thumb{ background: var(--olive-2); }

.toc-head{
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--khaki);
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.toc-head::after{
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 1px;
  background: var(--rule-lo);
}

.toc-list{
  list-style: none;
  margin: 0 0 24px;
  padding: 0;
  counter-reset: toc;
}
.toc-list li{
  display: block;
  border-left: 2px solid transparent;
  margin-left: -18px;
  padding-left: 16px;
  transition: border-color .12s linear;
}
.toc-list a{
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding: 7px 0 6px;
  border-bottom: 1px dashed var(--rule-lo);
  color: var(--text-dim);
  font-family: var(--ff-head);
  font-weight: 400;
  letter-spacing: .08em;
  text-transform: uppercase;
  font-size: 12px;
}
.toc-list a:hover{
  color: var(--text-hi);
}
.toc-list a.active,
.toc-list li.active a{
  color: var(--signal);
}
.toc-list li.active{
  border-left-color: var(--signal);
  background: linear-gradient(90deg, rgba(212,160,23,.08), transparent 60%);
}
.nav-num{
  font-family: var(--ff-mono);
  font-size: 10px;
  color: var(--khaki-dim);
  letter-spacing: .08em;
  flex: 0 0 auto;
  min-width: 20px;
}
.toc-list a.active .nav-num,
.toc-list li.active .nav-num{ color: var(--signal); }
.nav-name{
  flex: 1 1 auto;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toc-foot{
  border-top: 1px solid var(--rule);
  padding-top: 14px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px;
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.toc-foot-line{
  color: var(--text-mute);
  margin-top: 7px;
}
.toc-foot-val{
  color: var(--text-hi);
}

/* --- main content column --- */
.content{
  grid-column: 2;
  min-width: 0;
  padding: 0 0 56px 0;
  position: relative;
}

/* ---------- 06  HERO ----------------------------------------------------- */
.hero{
  position: relative;
  min-height: 78vh;
  margin: 0 0 0 0;
  overflow: hidden;
  border-bottom: 1px solid var(--rule);
  isolation: isolate;
}
/* background image — key art */
.hero-bg{
  position: absolute;
  inset: 0;
  background-position: center 40%;
  background-size: cover;
  background-repeat: no-repeat;
  z-index: 1;
  filter: contrast(1.06) saturate(.92) brightness(.85);
}
/* one permitted hero overlay — pulls the base toward ink so text reads */
.hero-bg::after{
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(10,12,8,.55) 0%, rgba(10,12,8,.05) 35%, rgba(10,12,8,.82) 100%),
    linear-gradient(90deg, rgba(10,12,8,.72) 0%, rgba(10,12,8,.1) 60%);
}
/* grid overlay — tactical plotting board */
.hero-grid{
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  opacity: .28;
  background-image:
    repeating-linear-gradient(90deg, rgba(232,226,212,.08) 0 1px, transparent 1px 64px),
    repeating-linear-gradient(0deg,  rgba(232,226,212,.08) 0 1px, transparent 1px 64px);
  mix-blend-mode: screen;
}

.hero-inner{
  position: relative;
  z-index: 3;
  max-width: 980px;
  padding: 72px 56px 60px;
}

.hero-eyebrow{
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: .3em;
  text-transform: uppercase;
  color: var(--signal);
  padding: 5px 10px 4px;
  display: inline-block;
  border: 1px solid var(--signal);
  margin-bottom: 26px;
  background: rgba(10,12,8,.6);
}

.hero-title{
  font-family: var(--ff-display);
  color: var(--text-hi);
  font-weight: 400;
  font-size: clamp(56px, 10vw, 148px);
  line-height: .88;
  letter-spacing: -0.01em;
  margin: 0 0 18px;
  text-shadow:
    0 2px 0 rgba(10,12,8,.85),
    0 0 42px rgba(10,12,8,.55);
  text-transform: uppercase;
}

.hero-sub{
  font-family: var(--ff-head);
  font-weight: 300;
  color: var(--paper-2);
  font-size: clamp(13px, 1.6vw, 17px);
  letter-spacing: .22em;
  text-transform: uppercase;
  max-width: 620px;
  margin-bottom: 36px;
  padding-left: 14px;
  border-left: 2px solid var(--signal);
}

.hero-meta-bar{
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  border: 1px solid var(--rule-hi);
  background: rgba(10,12,8,.72);
  margin-bottom: 34px;
  max-width: 720px;
}
.hero-meta-bar > div{
  flex: 1 1 0;
  min-width: 140px;
  padding: 10px 16px 12px;
  border-right: 1px solid var(--rule);
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.hero-meta-bar > div:last-child{ border-right: none; }
.hero-meta-bar span{
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--khaki);
}
.hero-meta-bar strong{
  font-family: var(--ff-head);
  color: var(--text-hi);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: .06em;
}

.hero-cta{ margin-top: 6px; }
.hero-link{
  display: inline-flex;
  align-items: center;
  gap: 14px;
  padding: 12px 22px 11px;
  border: 1px solid var(--signal);
  background: var(--signal);
  color: var(--ink);
  font-family: var(--ff-head);
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  font-size: 13px;
  border-bottom-width: 3px;
}
.hero-link:hover{
  background: transparent;
  color: var(--signal);
}
.hero-link span{
  font-family: var(--ff-mono);
  transform: translateY(1px);
}

/* corner brackets — diegetic UI marks */
.hero-corner{
  position: absolute;
  z-index: 4;
  width: 44px; height: 44px;
  pointer-events: none;
}
.hero-corner.tl{ top: 20px; left: 20px; border-top: 2px solid var(--signal); border-left: 2px solid var(--signal); }
.hero-corner.tr{ top: 20px; right: 20px; border-top: 2px solid var(--signal); border-right: 2px solid var(--signal); }
.hero-corner.bl{ bottom: 20px; left: 20px; border-bottom: 2px solid var(--signal); border-left: 2px solid var(--signal); }
.hero-corner.br{ bottom: 20px; right: 20px; border-bottom: 2px solid var(--signal); border-right: 2px solid var(--signal); }

/* ---------- 07  DISCLAIMER / FOREWORD ------------------------------------ */
.disclaimer{
  max-width: 820px;
  padding: 56px 56px 40px;
  margin: 0;
  border-bottom: 1px solid var(--rule);
  position: relative;
}
.disclaimer::before{
  content: "FM-01/FOREWORD";
  position: absolute;
  top: 20px; right: 28px;
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--khaki-dim);
  text-transform: uppercase;
}
.disc-head{
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--signal);
  margin: 28px 0 14px;
  padding-bottom: 5px;
  border-bottom: 1px solid var(--rule);
}
.disc-head:first-child{ margin-top: 0; }

.disclaimer p{
  font-family: var(--ff-serif);
  font-size: 16px;
  line-height: 1.68;
  color: var(--text);
  max-width: 68ch;
}
.welcome{
  font-family: var(--ff-head) !important;
  font-weight: 500;
  font-size: 28px !important;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--text-hi);
  line-height: 1.1 !important;
  margin-top: 10px;
}
.disc-sig{
  margin-top: 30px;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--signal);
  padding-top: 14px;
  border-top: 1px dashed var(--rule);
}

/* ---------- 08  CHAPTERS ------------------------------------------------- */
.chapter{
  position: relative;
  padding: 64px 56px 56px;
  border-bottom: 1px solid var(--rule);
  /* double rule effect — top hairline sits 3px above border-bottom chain */
  background:
    linear-gradient(180deg, transparent 0, transparent calc(100% - 4px), var(--rule-lo) calc(100% - 4px), var(--rule-lo) calc(100% - 3px), transparent calc(100% - 3px)) no-repeat;
}
.chapter:last-of-type{ border-bottom: none; }

/* tab marker on the right edge — like a printed field manual's section tabs */
.chapter::before{
  content: attr(data-chapter);
  position: absolute;
  top: 64px;
  right: 0;
  width: 26px;
  padding: 8px 0 9px;
  font-family: var(--ff-mono);
  font-weight: 600;
  font-size: 11px;
  text-align: center;
  letter-spacing: .04em;
  color: var(--ink);
  background: var(--signal);
  border: 1px solid var(--signal-dim);
  border-right: none;
  z-index: 3;
}

/* chapter header block */
.chapter-head{
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: end;
  gap: 28px;
  padding-bottom: 22px;
  margin-bottom: 32px;
  border-bottom: 1px solid var(--rule-hi);
  position: relative;
}
.chapter-head::after{
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  border-bottom: 1px solid var(--rule-lo);
}
.chapter-num{
  display: flex;
  align-items: baseline;
  gap: 6px;
  font-family: var(--ff-mono);
  font-size: 12px;
  color: var(--khaki);
  letter-spacing: .2em;
  text-transform: uppercase;
  line-height: 1;
}
.chapter-num-big{
  font-family: var(--ff-display);
  font-size: clamp(68px, 9vw, 112px);
  line-height: .82;
  color: var(--signal);
  letter-spacing: -.02em;
  text-shadow: 0 2px 0 var(--ink);
}
.chapter-title-block{
  min-width: 0;
  padding-bottom: 14px;
}
.chapter-eyebrow{
  font-family: var(--ff-mono);
  font-size: 10px;
  color: var(--khaki);
  letter-spacing: .22em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.chapter-title{
  font-family: var(--ff-head);
  font-weight: 500;
  font-size: clamp(28px, 4vw, 48px);
  color: var(--text-hi);
  letter-spacing: .04em;
  line-height: .96;
  margin: 0;
  text-transform: uppercase;
}
.chapter-subtitle{
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: 15px;
  color: var(--khaki-2);
  margin-top: 8px;
  letter-spacing: .01em;
  text-transform: none;
  font-weight: 400;
}
.chapter-stamp{
  align-self: center;
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--khaki);
  border: 1px solid var(--rule-hi);
  padding: 10px 14px 9px;
  text-align: center;
  min-width: 88px;
  background: var(--ink-2);
  line-height: 1.2;
}
.chapter-stamp span{
  display: block;
  font-size: 22px;
  color: var(--signal);
  font-weight: 600;
  margin-top: 2px;
  letter-spacing: .02em;
}

/* chapter body layout */
.chapter-body{
  max-width: 1140px;
}
.two-col{
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 360px);
  gap: 40px;
  align-items: start;
}
.two-col .two-col{
  /* nested */
  grid-template-columns: 1fr 1fr;
  gap: 32px;
}
.col-main{ min-width: 0; }
.col-aside{ min-width: 0; }

/* subsection headings */
.sub{
  font-family: var(--ff-head);
  font-weight: 500;
  font-size: 17px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--signal);
  margin: 30px 0 14px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--rule);
  position: relative;
}
.sub::before{
  content: "§";
  font-family: var(--ff-mono);
  color: var(--khaki-dim);
  margin-right: 10px;
}
.sub:first-child{ margin-top: 0; }

/* numbered paragraphs — the manual's core block */
.para{
  display: grid;
  grid-template-columns: 56px 1fr;
  gap: 0 14px;
  margin: 0 0 18px;
  padding: 2px 0 14px;
  border-bottom: 1px dotted var(--rule-lo);
}
.para:last-child{ border-bottom: none; }
.para-num{
  font-family: var(--ff-mono);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .04em;
  color: var(--signal);
  padding-top: 6px;
  text-align: right;
  padding-right: 10px;
  border-right: 1px solid var(--rule);
  align-self: stretch;
}
.para-body{
  font-family: var(--ff-serif);
  font-size: 16px;
  line-height: 1.68;
  color: var(--text);
  padding-left: 4px;
}
.para-body strong{ color: var(--text-hi); }

/* briefing card — the sidekick card on ch 1 */
.briefing-card{
  border: 1px solid var(--rule-hi);
  background: var(--ink-2);
  padding: 18px 20px 20px;
  position: relative;
  box-shadow: 2px 2px 0 var(--ink-4);
}
.briefing-card::before,
.briefing-card::after{
  content: "";
  position: absolute;
  width: 18px; height: 18px;
  border: 1px solid var(--signal);
}
.briefing-card::before{ top: -1px; left: -1px; border-right: none; border-bottom: none; }
.briefing-card::after{ bottom: -1px; right: -1px; border-left: none; border-top: none; }
.briefing-card-head{
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--signal);
  padding-bottom: 8px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--rule);
}
.briefing-list{
  list-style: none;
  margin: 0; padding: 0;
  font-family: var(--ff-body);
  font-size: 13px;
  color: var(--text);
}
.briefing-list li{
  padding: 7px 0 7px 18px;
  position: relative;
  border-bottom: 1px dashed var(--rule-lo);
  line-height: 1.45;
}
.briefing-list li:last-child{ border-bottom: none; }
.briefing-list li::before{
  content: "▸";
  position: absolute;
  left: 0;
  color: var(--signal);
  font-size: 10px;
  top: 9px;
}

/* callouts */
.callout{
  display: block;
  border: 1px solid var(--rule-hi);
  background: var(--ink-2);
  padding: 14px 18px 16px;
  margin: 24px 0;
  position: relative;
  font-family: var(--ff-body);
}
.callout p{
  font-size: 14px;
  line-height: 1.6;
  color: var(--text);
  margin: 0;
}
.callout ul{
  margin: 8px 0 0 0;
  padding: 0 0 0 18px;
  font-size: 13px;
  color: var(--text-dim);
}
.callout ul li{ margin-bottom: 2px; }
.callout-label{
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--signal);
  margin-bottom: 8px;
  display: inline-block;
  padding: 3px 8px 2px;
  background: rgba(212,160,23,.12);
  border: 1px solid var(--signal-dim);
}
.callout-code{
  display: block;
  font-family: var(--ff-mono);
  font-size: 13px;
  color: var(--text-hi);
  background: var(--ink);
  border: 1px solid var(--rule);
  padding: 10px 14px;
  letter-spacing: .02em;
  word-break: break-all;
}
.callout.signal{
  border-left: 3px solid var(--signal);
}
.callout.warn{
  border-left: 3px solid var(--rust);
  background: linear-gradient(90deg, rgba(199,62,29,.08), transparent 40%), var(--ink-2);
}
.callout.warn .callout-label{
  color: var(--rust);
  background: rgba(199,62,29,.12);
  border-color: var(--rust-dim);
}

/* screenshot grid + figures */
.screenshot-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
  margin: 26px 0 8px;
}
.shot{
  margin: 0;
  padding: 0;
  border: 1px solid var(--rule-hi);
  background: var(--ink-2);
  position: relative;
}
.shot::before{
  content: "";
  position: absolute;
  inset: 3px;
  border: 1px dashed var(--rule);
  pointer-events: none;
  z-index: 2;
}
.shot img{
  display: block;
  width: 100%;
  height: auto;
  filter: contrast(1.02) saturate(.92);
  padding: 5px;
  background: var(--ink);
}
.shot figcaption{
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--khaki-2);
  padding: 8px 12px;
  border-top: 1px solid var(--rule);
  background: var(--ink);
}
.shot.wide{
  grid-column: 1 / -1;
}


/* ---------- 09  ROLES (ch 5) --------------------------------------------- */
.role-controls{
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 14px 0 16px;
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  margin: 26px 0 28px;
}
.role-filter-label{
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--khaki);
  padding-right: 14px;
  border-right: 1px solid var(--rule);
  line-height: 1;
}
.role-filters{
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.rfltr{
  appearance: none;
  border: 1px solid var(--rule);
  background: var(--ink-2);
  color: var(--text-dim);
  font-family: var(--ff-head);
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  padding: 6px 11px 5px;
  cursor: pointer;
  transition: color .1s linear, border-color .1s linear, background .1s linear;
}
.rfltr:hover{ color: var(--text-hi); border-color: var(--rule-hi); }
.rfltr.active{
  color: var(--ink);
  background: var(--signal);
  border-color: var(--signal);
}

.role-grid{
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 0;
  border: 1px solid var(--rule-hi);
  background: var(--ink-2);
  margin-bottom: 28px;
}
.role-card{
  position: relative;
  padding: 20px 20px 22px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  background: linear-gradient(180deg, rgba(20,23,15,.6), transparent);
  cursor: default;
  transition: background .15s linear, border-color .15s linear;
  min-height: 220px;
  display: flex;
  flex-direction: column;
}
.role-card:hover{
  background: var(--ink-3);
  border-color: var(--rule-hi);
}
.role-card:focus-visible{ outline: 2px solid var(--signal); outline-offset: -2px; }
.role-card[hidden]{ display: none !important; }

/* index-card header strip */
.role-card::before{
  content: "ROLE " attr(data-role);
  position: absolute;
  top: 0; left: 0; right: 0;
  padding: 4px 10px 3px;
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: .22em;
  color: var(--khaki);
  background: var(--ink);
  border-bottom: 1px solid var(--rule);
  text-transform: uppercase;
}
.role-card > *{ margin-top: 0; }
.role-card > .role-icon-wrap{ margin-top: 22px; }

.role-icon-wrap{
  width: 92px;
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--ink);
  border: 1px solid var(--rule);
  padding: 6px;
  margin: 8px auto 14px;
  position: relative;
}
.role-icon-wrap::before,
.role-icon-wrap::after{
  content: "";
  position: absolute;
  width: 8px; height: 8px;
  border: 1px solid var(--khaki-dim);
}
.role-icon-wrap::before{ top: -1px; left: -1px; border-right: none; border-bottom: none; }
.role-icon-wrap::after { bottom: -1px; right: -1px; border-left: none; border-top: none; }
.role-icon-wrap img{
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  filter: brightness(1.25) contrast(1.05);
}

.role-meta{
  text-align: center;
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px dashed var(--rule);
}
.role-code{
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: .16em;
  color: var(--signal);
}
.role-name{
  font-family: var(--ff-head);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: .08em;
  color: var(--text-hi);
  text-transform: uppercase;
  margin-top: 2px;
}
.role-desc{
  font-family: var(--ff-body);
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-dim);
  flex: 1 1 auto;
}
.role-card.starter{
  background: linear-gradient(180deg, rgba(107,142,61,.06), transparent 60%), var(--ink-2);
  border-left: 2px solid var(--ok);
}
.role-tag{
  margin-top: 12px;
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--ok);
  padding: 4px 7px 3px;
  border: 1px solid var(--ok);
  background: rgba(107,142,61,.10);
  align-self: flex-start;
}

/* ---------- 10  CONTROLS / KEYBINDS (ch 6) ------------------------------- */
.keybind-block{
  border: 1px solid var(--rule-hi);
  background: var(--ink-2);
  margin: 26px 0;
}
.keybind-head{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px 14px;
  border-bottom: 1px solid var(--rule);
  background: var(--ink-3);
  flex-wrap: wrap;
}
.keybind-head .sub{
  margin: 0;
  border: none;
  padding: 0;
}
.keybind-head .sub::before{ content: ""; margin: 0; }
.kb-search-wrap{
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
}
.kb-search{
  appearance: none;
  border: 1px solid var(--rule);
  background: var(--ink);
  color: var(--text-hi);
  font-family: var(--ff-mono);
  font-size: 12px;
  padding: 7px 12px 6px;
  width: 260px;
  letter-spacing: .02em;
  outline: none;
  caret-color: var(--signal);
}
.kb-search::placeholder{ color: var(--text-mute); font-style: italic; }
.kb-search:focus{ border-color: var(--signal); }
.kb-search-hint{
  font-family: var(--ff-mono);
  font-size: 10px;
  color: var(--text-mute);
  letter-spacing: .1em;
}

.kb-table{
  width: 100%;
  border-collapse: collapse;
  font-family: var(--ff-mono);
  font-size: 12px;
  color: var(--text);
}
.kb-table tbody tr{
  border-bottom: 1px solid var(--rule-lo);
}
.kb-group-row td{
  padding: 12px 20px 8px;
  font-family: var(--ff-head);
  font-size: 11px;
  letter-spacing: .24em;
  color: var(--signal);
  background: var(--ink);
  border-top: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  text-transform: uppercase;
}
.kb-row td{
  padding: 8px 20px;
}
.kb-row:hover{
  background: var(--ink-3);
}
.kb-action{
  color: var(--text);
  width: 60%;
}
.kb-key{
  text-align: right;
  white-space: nowrap;
}
.kb-empty{
  padding: 30px 20px;
  text-align: center;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--rust);
  text-transform: uppercase;
  border-top: 1px solid var(--rule);
}

/* ---------- 11  WATCH & B-TAK DEVICE FRAMES (ch 7) ----------------------- */
.device-frame{
  position: relative;
  background: var(--ink);
  border: 1px solid var(--rule-hi);
  margin: 22px 0 8px;
  padding: 28px 20px 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.device-frame::before,
.device-frame::after{
  content: "";
  position: absolute;
  pointer-events: none;
}
/* outer corner brackets */
.device-frame::before{
  top: 6px; left: 6px; right: 6px; bottom: 6px;
  border: 1px dashed var(--rule);
}
/* top-left accent with status light */
.device-frame::after{
  top: 10px; left: 10px;
  width: 8px; height: 8px;
  background: var(--signal);
  box-shadow: 0 0 8px var(--signal), 0 0 2px var(--signal);
  animation: dev-pulse 2.2s ease-in-out infinite;
}
@keyframes dev-pulse{
  0%,100%{ opacity: .85; }
  50%{ opacity: .35; }
}
.device-label{
  position: absolute;
  top: 8px; right: 14px;
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: .18em;
  color: var(--signal);
  text-transform: uppercase;
  padding: 2px 8px 1px;
  background: var(--ink);
  border: 1px solid var(--rule-hi);
  z-index: 3;
}
.device-frame img{
  max-width: 100%;
  height: auto;
  border: 1px solid var(--rule);
  background: var(--ink-2);
  filter: contrast(1.04) saturate(.95);
  position: relative;
  z-index: 2;
}
.device-caption{
  margin-top: 14px;
  font-family: var(--ff-mono);
  font-size: 10px;
  letter-spacing: .14em;
  color: var(--khaki-2);
  text-transform: uppercase;
  text-align: center;
  padding-top: 12px;
  border-top: 1px dashed var(--rule);
  width: 100%;
  z-index: 2;
  position: relative;
}

/* watch-specific: layered hard-corner frame */
.device-frame.watch{
  max-width: 520px;
  margin: 22px auto 8px;
  padding: 36px 26px 24px;
  background:
    linear-gradient(180deg, var(--ink-2), var(--ink)),
    var(--ink);
}
.device-frame.watch::before{
  top: 14px; left: 14px; right: 14px; bottom: 14px;
  border: 1px solid var(--rule-hi);
}
.device-frame.watch img{
  max-width: 380px;
  padding: 4px;
  background: #060604;
}

/* b-tak: wider tablet frame */
.device-frame.btak{
  max-width: 620px;
  margin: 22px auto 8px;
  padding: 38px 28px 24px;
  background:
    linear-gradient(180deg, var(--ink-3), var(--ink-2) 80%),
    var(--ink);
}
.device-frame.btak::before{
  top: 14px; left: 14px; right: 14px; bottom: 14px;
  border: 1px solid var(--rule-hi);
}
.device-frame.btak img{
  width: 100%;
  padding: 4px;
}
/* extra status lights on b-tak */
.device-frame.btak .device-label{
  top: 10px; left: 30px; right: auto;
}
.device-frame.btak::after{
  right: 10px; left: auto;
  background: var(--ok);
  box-shadow: 0 0 8px var(--ok), 0 0 2px var(--ok);
}


/* ---------- 12  COMMS (ch 8) --------------------------------------------- */
.quote{
  margin: 0 0 28px;
  padding: 22px 28px 22px 46px;
  border-left: 3px solid var(--signal);
  background: linear-gradient(90deg, rgba(212,160,23,.06), transparent 70%);
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: 18px;
  color: var(--text-hi);
  position: relative;
  line-height: 1.5;
}
.quote-mark{
  font-family: var(--ff-display);
  font-size: 42px;
  color: var(--signal);
  opacity: .5;
  position: absolute;
  line-height: 1;
  font-style: normal;
}
.quote-mark:first-child{
  top: 12px;
  left: 14px;
}
.quote-mark:last-of-type{
  display: none; /* redundant on the trailing side */
}
.quote cite{
  display: block;
  margin-top: 10px;
  font-family: var(--ff-mono);
  font-size: 11px;
  font-style: normal;
  letter-spacing: .18em;
  color: var(--khaki);
  text-transform: uppercase;
}

.lede{
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: 17px;
  color: var(--text-hi);
  margin: 18px 0 22px;
  padding: 12px 0;
  border-top: 1px dashed var(--rule);
  border-bottom: 1px dashed var(--rule);
}
.lede strong{ font-style: normal; color: var(--signal); letter-spacing: .06em; }

.comm-stack{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 22px 0 30px;
}
.comm-channel{
  border: 1px solid var(--rule-hi);
  background: var(--ink-2);
  padding: 16px 16px 18px;
  position: relative;
  min-height: 220px;
  display: flex;
  flex-direction: column;
}
.comm-channel::before{
  content: "NET";
  position: absolute;
  top: -1px;
  right: -1px;
  padding: 3px 9px 2px;
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: .22em;
  color: var(--ink);
  background: var(--signal);
  text-transform: uppercase;
}
.comm-channel[data-channel="local"]{ border-top: 2px solid var(--ok); }
.comm-channel[data-channel="local"]::before{ background: var(--ok); }
.comm-channel[data-channel="squad"]{ border-top: 2px solid var(--signal); }
.comm-channel[data-channel="squad"]::before{ background: var(--signal); }
.comm-channel[data-channel="platoon"]{ border-top: 2px solid var(--rust); }
.comm-channel[data-channel="platoon"]::before{ background: var(--rust); color: #fef6e5; }

.comm-head{
  display: flex;
  align-items: center;
  gap: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--rule);
  margin-bottom: 12px;
}
.comm-key{
  font-family: var(--ff-mono);
  font-size: 16px;
}
.comm-key kbd{
  font-size: 14px;
  padding: 3px 10px 4px;
}
.comm-name{
  font-family: var(--ff-head);
  font-size: 14px;
  letter-spacing: .14em;
  color: var(--text-hi);
  text-transform: uppercase;
}

.comm-wave{
  display: flex;
  align-items: flex-end;
  gap: 3px;
  height: 24px;
  padding: 0 2px;
  margin-bottom: 14px;
  border-bottom: 1px dashed var(--rule);
}
.comm-wave span{
  display: block;
  width: 4px;
  background: var(--signal);
  opacity: .75;
  animation: wave 1.2s ease-in-out infinite;
  height: 40%;
}
.comm-wave span:nth-child(1){ animation-delay: -0.0s; }
.comm-wave span:nth-child(2){ animation-delay: -0.1s; }
.comm-wave span:nth-child(3){ animation-delay: -0.2s; }
.comm-wave span:nth-child(4){ animation-delay: -0.3s; }
.comm-wave span:nth-child(5){ animation-delay: -0.4s; }
.comm-wave span:nth-child(6){ animation-delay: -0.5s; }
.comm-wave span:nth-child(7){ animation-delay: -0.6s; }
.comm-wave span:nth-child(8){ animation-delay: -0.7s; }
.comm-wave span:nth-child(9){ animation-delay: -0.8s; }
.comm-wave span:nth-child(10){ animation-delay: -0.9s; }
.comm-wave span:nth-child(11){ animation-delay: -1.0s; }
.comm-wave span:nth-child(12){ animation-delay: -1.1s; }
@keyframes wave{
  0%, 100% { height: 22%; }
  50%      { height: 92%; }
}
.comm-channel[data-channel="local"] .comm-wave span{ background: var(--ok); }
.comm-channel[data-channel="platoon"] .comm-wave span{ background: var(--rust); }

.comm-body{
  font-family: var(--ff-body);
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-dim);
}

.three-d-card{
  border: 1px solid var(--rule-hi);
  background: var(--ink-2);
  margin: 22px 0;
  position: relative;
}
.three-d-head{
  padding: 10px 16px 8px;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--signal);
  background: var(--ink-3);
  border-bottom: 1px solid var(--rule);
}
.three-d-grid{
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}
.three-d-grid > div{
  padding: 20px 22px;
  border-right: 1px solid var(--rule);
  text-align: left;
}
.three-d-grid > div:last-child{ border-right: none; }
.three-d-num{
  font-family: var(--ff-display);
  font-size: 44px;
  color: var(--signal);
  line-height: 1;
  letter-spacing: -.02em;
}
.three-d-label{
  font-family: var(--ff-head);
  font-size: 13px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--text-hi);
  margin-top: 6px;
}
.three-d-eg{
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: 13px;
  color: var(--khaki-2);
  margin-top: 8px;
  line-height: 1.4;
}
.three-d-foot{
  padding: 14px 20px;
  border-top: 1px dashed var(--rule);
  background: var(--ink);
  font-family: var(--ff-serif);
  font-style: italic;
  font-size: 14px;
  color: var(--text-hi);
  text-align: center;
}

.proword-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0;
  border: 1px solid var(--rule-hi);
  margin: 24px 0 10px;
  background: var(--ink-2);
}
.proword{
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 12px 16px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
}
.proword kbd{
  display: inline-block;
  padding: 3px 9px 3px;
  font-size: 11px;
  letter-spacing: .12em;
  background: var(--ink);
  border: 1px solid var(--rule-hi);
  color: var(--signal);
  align-self: flex-start;
}
.proword span{
  font-family: var(--ff-body);
  font-size: 12px;
  color: var(--text-dim);
  font-style: italic;
}

/* ---------- 13  MEDICAL (ch 9) ------------------------------------------- */
.health-flow{
  margin: 24px 0 30px;
  border: 1px solid var(--rule-hi);
  background: var(--ink-2);
}
.hs-steps{
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0;
  border-bottom: 1px solid var(--rule);
}
.hs-step{
  appearance: none;
  border: none;
  border-right: 1px solid var(--rule);
  background: var(--ink-2);
  color: var(--text-dim);
  padding: 16px 10px 14px;
  font-family: var(--ff-head);
  text-align: center;
  cursor: pointer;
  transition: color .12s linear, background .12s linear, border-color .12s linear;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: center;
  border-top: 3px solid transparent;
}
.hs-step:last-child{ border-right: none; }
.hs-step:hover{
  color: var(--text-hi);
  background: var(--ink-3);
}
.hs-num{
  font-family: var(--ff-mono);
  font-size: 11px;
  color: var(--khaki-dim);
  letter-spacing: .1em;
}
.hs-label{
  font-family: var(--ff-head);
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.hs-step[data-state="ambulatory"].active{ border-top-color: var(--ok); color: var(--ok); background: var(--ink-3); }
.hs-step[data-state="incapacitated"].active{ border-top-color: var(--signal); color: var(--signal); background: var(--ink-3); }
.hs-step[data-state="unconscious"].active{ border-top-color: var(--signal); color: var(--signal); background: var(--ink-3); }
.hs-step[data-state="grace"].active{ border-top-color: var(--rust); color: var(--rust); background: var(--ink-3); }
.hs-step[data-state="dead"].active{ border-top-color: var(--text-mute); color: var(--text-hi); background: var(--ink); }

.hs-step.active .hs-num{ color: inherit; opacity: .8; }

.hs-panels{
  padding: 22px 24px 24px;
  min-height: 140px;
}
.hs-panel h4{
  font-family: var(--ff-head);
  font-size: 15px;
  letter-spacing: .18em;
  color: var(--signal);
  margin: 0 0 10px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--rule);
  text-transform: uppercase;
}
.hs-panel[data-panel="ambulatory"] h4{ color: var(--ok); }
.hs-panel[data-panel="grace"] h4{ color: var(--rust); }
.hs-panel[data-panel="dead"] h4{ color: var(--text-hi); }
.hs-panel p{
  font-family: var(--ff-serif);
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
  margin: 0;
}

.grace-timer{
  margin-top: 16px;
  padding: 10px 14px;
  background: var(--ink);
  border: 1px solid var(--rust-dim);
  position: relative;
  overflow: hidden;
}
.grace-bar{
  position: absolute;
  top: 0; left: 0; bottom: 0;
  width: 100%;
  background: linear-gradient(90deg, var(--rust) 0%, rgba(199,62,29,.2) 100%);
  opacity: .22;
  transform-origin: left center;
  animation: grace-drain 300s linear forwards paused;
}
.hs-panel[data-panel="grace"]:not([hidden]) .grace-bar{
  animation-play-state: running;
}
@keyframes grace-drain{
  from{ transform: scaleX(1); }
  to  { transform: scaleX(0); }
}
.grace-text{
  position: relative;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: .18em;
  color: var(--rust);
  text-transform: uppercase;
  font-weight: 600;
}

.med-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
  margin: 20px 0 28px;
}
.med-card{
  border: 1px solid var(--rule-hi);
  background: var(--ink-2);
  padding: 18px 18px 20px;
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.med-card.medic-only{
  border-left: 3px solid var(--rust);
}
.med-icon{
  width: 44px;
  height: 44px;
  border: 1px solid var(--rule-hi);
  background: var(--ink);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--ff-display);
  font-size: 22px;
  color: var(--signal);
  line-height: 1;
}
.med-card.medic-only .med-icon{ color: var(--rust); border-color: var(--rust-dim); }
.med-card h4{
  font-family: var(--ff-head);
  font-size: 13px;
  letter-spacing: .14em;
  color: var(--text-hi);
  margin: 0;
  text-transform: uppercase;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.med-tag{
  display: inline-block;
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: .18em;
  color: var(--rust);
  border: 1px solid var(--rust-dim);
  padding: 2px 6px 1px;
  background: rgba(199,62,29,.12);
  text-transform: uppercase;
}
.med-card p{
  font-family: var(--ff-body);
  font-size: 12px;
  line-height: 1.55;
  color: var(--text-dim);
  margin: 0;
}

.checklist-tabs{
  display: flex;
  gap: 0;
  margin: 20px 0 0;
  border-bottom: 1px solid var(--rule);
}
.cl-tab{
  appearance: none;
  background: transparent;
  border: 1px solid var(--rule);
  border-bottom: none;
  padding: 10px 18px 8px;
  font-family: var(--ff-head);
  font-size: 12px;
  letter-spacing: .16em;
  color: var(--text-dim);
  cursor: pointer;
  text-transform: uppercase;
  margin-bottom: -1px;
  transition: color .1s linear, background .1s linear;
}
.cl-tab:hover{ color: var(--text-hi); }
.cl-tab.active{
  color: var(--signal);
  background: var(--ink-2);
  border-bottom: 1px solid var(--ink-2);
}
.checklist{
  list-style: none;
  counter-reset: cl;
  margin: 0;
  padding: 20px 24px 22px;
  background: var(--ink-2);
  border: 1px solid var(--rule);
  border-top: none;
}
.checklist[hidden]{ display: none; }
.checklist li{
  counter-increment: cl;
  padding: 10px 0 10px 46px;
  position: relative;
  border-bottom: 1px dashed var(--rule-lo);
  font-family: var(--ff-serif);
  font-size: 14px;
  line-height: 1.55;
  color: var(--text);
}
.checklist li:last-child{ border-bottom: none; }
.checklist li::before{
  content: "☐ " counter(cl, decimal-leading-zero);
  position: absolute;
  left: 0; top: 10px;
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: .08em;
  color: var(--signal);
}
.checklist li em{
  display: block;
  margin-top: 4px;
  font-size: 12px;
  color: var(--khaki-2);
  font-style: italic;
}


/* ---------- 14  SPAWN LIVES (ch 10) -------------------------------------- */
.lives-card{
  border: 1px solid var(--rule-hi);
  background: var(--ink-2);
  margin: 20px 0 28px;
  padding: 0;
}
.lives-row{
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr) auto;
  align-items: center;
  gap: 20px;
  padding: 16px 22px;
  border-bottom: 1px solid var(--rule);
}
.lives-row:last-child{ border-bottom: none; }
.lives-faction{
  font-family: var(--ff-head);
  font-size: 13px;
  letter-spacing: .16em;
  color: var(--text-hi);
  text-transform: uppercase;
}
.lives-pips{
  font-family: var(--ff-mono);
  font-size: 26px;
  color: var(--signal);
  letter-spacing: .2em;
  line-height: 1;
}
.lives-row:last-child .lives-pips{ color: var(--rust); }
.lives-count{
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--text-dim);
  text-align: right;
  min-width: 74px;
}

/* ---------- 15  MODE COMPARE (ch 11/12) ---------------------------------- */
.mode-compare{
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--rule-hi);
  background: var(--ink-2);
  margin: 26px 0;
}
.mode-col{
  padding: 18px 22px 22px;
  border-right: 1px solid var(--rule);
}
.mode-col:last-child{ border-right: none; }
.mode-col h4{
  font-family: var(--ff-head);
  font-size: 17px;
  letter-spacing: .18em;
  color: var(--signal);
  margin: 0 0 12px;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--rule);
  text-transform: uppercase;
}
.mode-col ul{
  list-style: none;
  margin: 0;
  padding: 0;
  font-family: var(--ff-body);
  font-size: 13px;
  color: var(--text);
}
.mode-col li{
  padding: 7px 0 7px 22px;
  position: relative;
  border-bottom: 1px dotted var(--rule-lo);
}
.mode-col li:last-child{ border-bottom: none; }
.mode-col li::before{
  content: "▸";
  position: absolute;
  left: 4px;
  color: var(--signal);
}

/* ---------- 16  TIPS + FACTIONS (ch 13) ---------------------------------- */
.tips-grid{
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(270px, 1fr));
  gap: 0;
  border: 1px solid var(--rule-hi);
  background: var(--ink-2);
  margin: 20px 0 32px;
}
.tip{
  padding: 24px 24px 26px;
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.tip-num{
  font-family: var(--ff-display);
  font-size: 44px;
  line-height: 1;
  color: var(--signal);
  letter-spacing: -.02em;
}
.tip h4{
  font-family: var(--ff-head);
  font-size: 16px;
  letter-spacing: .12em;
  color: var(--text-hi);
  margin: 0;
  text-transform: uppercase;
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--rule);
}
.tip p{
  font-family: var(--ff-serif);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
  margin: 0;
}

/* faction tabs + panels */
.fac-tabs{
  display: flex;
  gap: 0;
  margin: 20px 0 0;
  border-bottom: 1px solid var(--rule-hi);
}
.fac-tab{
  appearance: none;
  background: var(--ink-2);
  border: 1px solid var(--rule);
  border-bottom: none;
  padding: 12px 22px 10px;
  font-family: var(--ff-head);
  font-size: 13px;
  letter-spacing: .16em;
  color: var(--text-dim);
  cursor: pointer;
  text-transform: uppercase;
  margin-bottom: -1px;
  margin-right: -1px;
  transition: color .1s linear, background .1s linear, border-color .1s linear;
}
.fac-tab:hover{ color: var(--text-hi); }
.fac-tab.active{
  color: var(--signal);
  background: var(--ink-3);
  border-bottom: 1px solid var(--ink-3);
  border-top: 2px solid var(--signal);
  padding-top: 11px;
}

.fac-panels{
  border: 1px solid var(--rule-hi);
  border-top: none;
  background: var(--ink-3);
}
.fac-panel{
  display: none;
  grid-template-columns: minmax(280px, 1fr) minmax(0, 2fr);
  gap: 0;
  min-height: 360px;
}
.fac-panel.active{ display: grid; }
.fac-art{
  min-height: 360px;
  background-size: cover;
  background-position: center center;
  border-right: 1px solid var(--rule);
  position: relative;
  filter: contrast(1.05) saturate(.95);
  overflow: hidden;
}
.fac-art::after{
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(10,12,8,.45) 0%, rgba(10,12,8,.1) 50%, rgba(10,12,8,.6) 100%);
}
.fac-panel{ position: relative; }
.fac-meta{
  grid-column: 2;
  padding: 20px 24px 10px;
  border-bottom: 1px solid var(--rule);
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px 20px;
}
.fac-row{
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 6px 0;
  border-bottom: 1px dashed var(--rule-lo);
}
.fac-row span{
  font-family: var(--ff-mono);
  font-size: 9px;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--khaki);
}
.fac-row strong{
  font-family: var(--ff-head);
  font-size: 14px;
  letter-spacing: .1em;
  color: var(--signal);
}
.fac-summary,
.fac-playstyle{
  grid-column: 2;
  padding: 16px 24px 18px;
  border-bottom: 1px solid var(--rule);
}
.fac-playstyle{ border-bottom: none; }
.fac-summary h4,
.fac-playstyle h4{
  font-family: var(--ff-head);
  font-size: 12px;
  letter-spacing: .22em;
  color: var(--signal);
  margin: 0 0 8px;
  padding-bottom: 6px;
  border-bottom: 1px dashed var(--rule);
  text-transform: uppercase;
}
.fac-summary p,
.fac-playstyle p{
  font-family: var(--ff-serif);
  font-size: 13px;
  line-height: 1.6;
  color: var(--text);
  margin: 0;
}
.fac-panel .fac-art{
  grid-row: 1 / span 3;
}

/* ---------- 17  END MATTER ----------------------------------------------- */
.end{
  padding: 64px 56px 64px;
  text-align: center;
  border-top: 1px solid var(--rule);
  position: relative;
  background: linear-gradient(180deg, var(--ink) 0%, var(--ink-2) 100%);
}
.end-rule{
  height: 5px;
  background-image: repeating-linear-gradient(
    90deg,
    var(--rule-hi) 0 12px,
    transparent 12px 18px
  );
  max-width: 460px;
  margin: 0 auto 22px;
}
.end-rule:last-child{ margin: 22px auto 0; }
.end-mark img{
  display: block;
  margin: 0 auto 22px;
  max-width: 220px;
  height: auto;
  opacity: .92;
  filter: drop-shadow(0 2px 0 var(--ink));
}
.end-text > div:first-child{
  font-family: var(--ff-head);
  font-size: 18px;
  letter-spacing: .3em;
  color: var(--text-hi);
  text-transform: uppercase;
  margin-bottom: 10px;
}
.end-meta{
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: .14em;
  color: var(--khaki);
  text-transform: uppercase;
  margin-top: 3px;
}

/* ---------- 18  HELP PANEL ----------------------------------------------- */
.help-panel{
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 9500;
  width: min(480px, 92vw);
  background: var(--ink-2);
  border: 1px solid var(--signal);
  box-shadow:
    0 0 0 4px var(--ink),
    0 0 0 5px var(--signal-dim);
  padding: 0;
}
.help-panel[hidden]{ display: none; }
.help-inner{
  padding: 22px 26px 24px;
  position: relative;
}
.help-head{
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: .22em;
  color: var(--signal);
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--rule);
  text-transform: uppercase;
}
.help-list{
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 18px;
  margin: 0 0 20px;
  font-family: var(--ff-body);
}
.help-list dt{
  font-family: var(--ff-mono);
  color: var(--signal);
  font-size: 12px;
  white-space: nowrap;
}
.help-list dd{
  margin: 0;
  font-size: 13px;
  color: var(--text);
  border-bottom: 1px dashed var(--rule-lo);
  padding-bottom: 6px;
}
.help-close{
  appearance: none;
  background: transparent;
  border: 1px solid var(--rule-hi);
  color: var(--text-hi);
  font-family: var(--ff-head);
  font-size: 12px;
  letter-spacing: .18em;
  padding: 7px 16px 6px;
  cursor: pointer;
  text-transform: uppercase;
  width: 100%;
}
.help-close:hover{
  background: var(--signal);
  color: var(--ink);
  border-color: var(--signal);
}


/* ---------- 19  PAPER MODE ----------------------------------------------- */
html[data-mode="paper"]{
  --ink:        #e8e2d4;
  --ink-2:      #ddd5c1;
  --ink-3:      #d0c7aa;
  --ink-4:      #bbb194;

  --text:       #1c1f14;
  --text-dim:   #4a4a3c;
  --text-mute:  #7a7866;
  --text-hi:    #0a0c08;

  --rule:       #6e6850;
  --rule-hi:    #4a462f;
  --rule-lo:    #a59c82;

  --signal:     #8a5a0f;
  --signal-dim: #5e3e08;

  --khaki:      #58503c;
  --khaki-2:    #3e3828;
  --khaki-dim:  #746a52;

  --ok:         #3d5a1a;
  --rust:       #8f2a10;
  --rust-dim:   #58190b;

  background: var(--ink);
}

html[data-mode="paper"] body{
  background:
    linear-gradient(180deg, rgba(0,0,0,.0) 0%, rgba(0,0,0,.06) 100%),
    var(--ink);
  color: var(--text);
}
html[data-mode="paper"] .grain{
  opacity: .18;
  mix-blend-mode: multiply;
}
html[data-mode="paper"] .scanlines{ opacity: 0; }

html[data-mode="paper"] .masthead,
html[data-mode="paper"] .toc,
html[data-mode="paper"] .chapter,
html[data-mode="paper"] .disclaimer,
html[data-mode="paper"] .end{
  background: var(--ink);
}
html[data-mode="paper"] .masthead{
  box-shadow: 0 3px 0 var(--ink), 0 4px 0 var(--rule);
}
html[data-mode="paper"] .briefing-card,
html[data-mode="paper"] .callout,
html[data-mode="paper"] .shot,
html[data-mode="paper"] .keybind-block,
html[data-mode="paper"] .device-frame,
html[data-mode="paper"] .role-grid,
html[data-mode="paper"] .comm-channel,
html[data-mode="paper"] .health-flow,
html[data-mode="paper"] .med-card,
html[data-mode="paper"] .lives-card,
html[data-mode="paper"] .mode-compare,
html[data-mode="paper"] .tips-grid,
html[data-mode="paper"] .fac-panels,
html[data-mode="paper"] .three-d-card,
html[data-mode="paper"] .proword-grid,
html[data-mode="paper"] .checklist{
  background: var(--ink-2);
  color: var(--text);
}
html[data-mode="paper"] .role-card,
html[data-mode="paper"] .hs-step,
html[data-mode="paper"] .cl-tab,
html[data-mode="paper"] .fac-tab{
  background: var(--ink-2);
  color: var(--text-dim);
}
html[data-mode="paper"] .ctrl-btn,
html[data-mode="paper"] .rfltr{
  background: var(--ink-2);
  color: var(--text);
}
html[data-mode="paper"] .ctrl-btn[aria-pressed="true"],
html[data-mode="paper"] .rfltr.active{
  background: var(--text-hi);
  color: var(--ink);
  border-color: var(--text-hi);
}
html[data-mode="paper"] .hero{
  min-height: auto;
  padding: 48px 56px 48px;
  background: var(--ink);
  border-bottom: 2px solid var(--rule-hi);
}
html[data-mode="paper"] .hero-bg,
html[data-mode="paper"] .hero-grid{ display: none; }
html[data-mode="paper"] .hero-title{
  color: var(--text-hi);
  text-shadow: none;
}
html[data-mode="paper"] .hero-sub{ color: var(--text); }
html[data-mode="paper"] .hero-eyebrow{
  background: transparent;
  color: var(--text-hi);
  border-color: var(--text-hi);
}
html[data-mode="paper"] .hero-link{
  background: var(--text-hi);
  color: var(--ink);
  border-color: var(--text-hi);
}
html[data-mode="paper"] .hero-link:hover{
  background: transparent;
  color: var(--text-hi);
}
html[data-mode="paper"] .hero-meta-bar{
  background: var(--ink-2);
}
html[data-mode="paper"] .hero-meta-bar strong{ color: var(--text-hi); }
html[data-mode="paper"] .chapter::before{
  background: var(--text-hi);
  border-color: var(--text-hi);
  color: var(--ink);
}
html[data-mode="paper"] .classification{
  background: var(--ink-3);
  color: var(--text-hi);
  border-color: var(--text-hi);
}
html[data-mode="paper"] .cls-bar{
  background: repeating-linear-gradient(90deg, var(--text-hi) 0 6px, transparent 6px 10px);
  opacity: .8;
}
html[data-mode="paper"] kbd{
  background: var(--ink-2);
  color: var(--text-hi);
  border-color: var(--rule);
}
html[data-mode="paper"] .end-mark img{ filter: invert(1) drop-shadow(0 1px 0 var(--ink)); }
html[data-mode="paper"] .comm-wave{ opacity: .5; }
html[data-mode="paper"] .device-frame::after{ opacity: .4; }

/* ---------- 19b  @media print ------------------------------------------- */
@media print{
  :root{
    --ink:      #ffffff;
    --ink-2:    #fafaf6;
    --ink-3:    #f2f0e6;
    --ink-4:    #e5e2d4;
    --text:     #111;
    --text-dim: #333;
    --text-mute:#555;
    --text-hi:  #000;
    --rule:     #555;
    --rule-hi:  #111;
    --rule-lo:  #999;
    --signal:   #333;
    --signal-dim:#111;
    --khaki:    #444;
    --khaki-2:  #222;
    --ok:       #222;
    --rust:     #222;
  }
  html, body{
    background: #fff !important;
    color: #000 !important;
    font-size: 11pt;
  }
  .grain,
  .scanlines,
  .classification,
  .masthead-controls,
  .reading-progress,
  .help-panel,
  .hero-bg,
  .hero-grid,
  .hero-corner,
  .kb-search-wrap,
  .role-controls,
  .checklist-tabs,
  .fac-tabs,
  .rfltr{
    display: none !important;
  }
  .layout{
    display: block !important;
    max-width: none;
    background: none !important;
  }
  .toc{
    position: static !important;
    max-height: none !important;
    border: none;
    page-break-after: always;
    padding: 0 0 20px !important;
    background: none !important;
  }
  .content{ padding: 0 !important; }
  .masthead{
    background: none !important;
    box-shadow: none !important;
    border-bottom: 2px solid #000 !important;
    padding: 0 0 10pt !important;
  }
  .masthead-title,
  .chapter-title,
  .chapter-num-big,
  .hero-title,
  h1,h2,h3,h4{
    color: #000 !important;
    text-shadow: none !important;
  }
  .chapter{
    padding: 24pt 0 !important;
    border: none !important;
    page-break-before: always;
    background: none !important;
  }
  .chapter::before{
    display: none;
  }
  .chapter-body,
  .two-col,
  .role-grid,
  .tips-grid,
  .med-grid,
  .mode-compare,
  .three-d-grid,
  .hs-steps,
  .screenshot-grid,
  .proword-grid,
  .comm-stack{
    display: block !important;
  }
  .fac-panel{ display: block !important; page-break-inside: avoid; }
  .fac-art{ display: none; }
  .role-card,
  .tip,
  .med-card,
  .comm-channel,
  .briefing-card,
  .callout,
  .shot,
  .device-frame,
  .lives-row,
  .para,
  .hs-panel{
    page-break-inside: avoid;
    break-inside: avoid;
    border-color: #000 !important;
  }
  .hero{
    min-height: auto !important;
    border-bottom: 2px solid #000 !important;
    padding: 0 0 24pt !important;
  }
  .hero-inner{ padding: 0 !important; max-width: none; }
  .hero-title{ font-size: 42pt !important; }
  a{
    color: #000 !important;
    border-bottom: none !important;
  }
  .comm-wave,
  .grace-timer,
  .device-frame::after{ display: none !important; }
  .para-body,
  .disclaimer p{
    color: #000 !important;
  }
  .kb-table{ page-break-inside: auto; }
  .kb-row, .kb-group-row{ page-break-inside: avoid; }
  .end{
    background: none !important;
    padding: 16pt 0 !important;
    border-top: 2px solid #000 !important;
  }
}

/* ---------- 20  RESPONSIVE ----------------------------------------------- */

/* laptop — keep TOC but narrow it */
@media (max-width: 1200px){
  :root{
    --toc-w: 220px;
  }
  .hero-inner{ padding: 56px 40px 48px; }
  .chapter{ padding: 52px 40px 48px; }
  .disclaimer{ padding: 48px 40px 36px; }
  .end{ padding: 56px 40px; }
}

/* tablet — TOC collapses to top bar */
@media (max-width: 960px){
  .layout{
    display: block;
    background: none;
  }
  .toc{
    position: static;
    max-height: none;
    width: 100%;
    border-right: none;
    border-bottom: 1px solid var(--rule);
    padding: 18px 24px 14px;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 14px;
    align-items: center;
  }
  .toc-head{
    flex: 1 0 100%;
    margin-bottom: 6px;
    padding-bottom: 6px;
  }
  .toc-list{
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
    flex: 1 1 auto;
  }
  .toc-list li{
    margin: 0;
    padding: 0;
    border-left: none;
    border-bottom: 2px solid transparent;
  }
  .toc-list li.active{
    background: none;
    border-bottom-color: var(--signal);
  }
  .toc-list a{
    padding: 6px 10px;
    border-bottom: none;
    font-size: 11px;
  }
  .nav-name{ display: none; }
  .nav-num{ min-width: auto; }
  .toc-foot{ display: none; }
  .content{ grid-column: 1 / -1; }

  .masthead-inner{ flex-wrap: wrap; gap: 14px; }
  .masthead-controls{ width: 100%; justify-content: flex-start; }

  .two-col,
  .two-col .two-col{
    grid-template-columns: 1fr;
    gap: 28px;
  }
  .comm-stack{ grid-template-columns: 1fr; }
  .fac-panel{ grid-template-columns: 1fr; }
  .fac-art{ grid-row: auto; min-height: 220px; border-right: none; border-bottom: 1px solid var(--rule); }
  .fac-meta,
  .fac-summary,
  .fac-playstyle{ grid-column: auto; }
  .mode-compare{ grid-template-columns: 1fr; }
  .mode-col{ border-right: none; border-bottom: 1px solid var(--rule); }
  .mode-col:last-child{ border-bottom: none; }

  .hero-inner{ padding: 48px 28px 40px; }
  .chapter{ padding: 48px 28px 40px; }
  .disclaimer{ padding: 40px 28px 30px; }
  .end{ padding: 48px 28px; }
  .chapter::before{ display: none; }
  .hero-meta-bar > div{ min-width: 50%; border-right: none; border-bottom: 1px solid var(--rule); }
  .hero-meta-bar > div:nth-last-child(-n+2){ border-bottom: none; }

  .hs-steps{ grid-template-columns: repeat(5, 1fr); }
  .hs-label{ font-size: 10px; }
  .hs-num{ font-size: 10px; }
}

/* phone — compress hero + single column layouts */
@media (max-width: 640px){
  html{ font-size: 15px; }
  .hero-title{ font-size: 52px; }
  .hero-inner{ padding: 40px 20px 32px; }
  .hero-sub{ font-size: 12px; padding-left: 10px; }
  .chapter{ padding: 42px 20px 36px; }
  .chapter-head{
    grid-template-columns: auto 1fr;
    gap: 14px 18px;
  }
  .chapter-stamp{
    grid-column: 1 / -1;
    justify-self: start;
    min-width: 0;
    padding: 6px 12px 5px;
  }
  .chapter-stamp span{ display: inline; font-size: 14px; margin-left: 6px; }
  .chapter-num-big{ font-size: 68px; }
  .chapter-title{ font-size: 28px; }
  .disclaimer{ padding: 32px 20px 24px; }
  .end{ padding: 40px 20px; }

  .para{ grid-template-columns: 44px 1fr; gap: 0 10px; }
  .para-num{ padding-right: 6px; font-size: 10px; }
  .para-body{ font-size: 15px; }

  .masthead-inner{ padding: 14px 20px 16px; }
  .masthead-title{ font-size: 20px; }
  .masthead-icon{ width: 44px; height: 44px; }
  .masthead-controls{ gap: 6px; }
  .ctrl-btn{ padding: 6px 10px 5px; font-size: 10px; }
  .reading-progress{ width: 110px; font-size: 9px; }

  .role-grid{ grid-template-columns: 1fr; }
  .med-grid{ grid-template-columns: 1fr; }
  .tips-grid{ grid-template-columns: 1fr; }
  .screenshot-grid{ grid-template-columns: 1fr; }

  .three-d-grid{ grid-template-columns: 1fr; }
  .three-d-grid > div{ border-right: none; border-bottom: 1px solid var(--rule); }
  .three-d-grid > div:last-child{ border-bottom: none; }

  .hs-steps{ grid-template-columns: repeat(2, 1fr); }
  .hs-step{
    border-right: 1px solid var(--rule);
    border-bottom: 1px solid var(--rule);
  }
  .hs-step:nth-child(2n){ border-right: none; }
  .hs-step:nth-last-child(-n+1){ border-bottom: none; }

  .lives-row{
    grid-template-columns: 1fr;
    gap: 6px;
    text-align: left;
  }
  .lives-count{ text-align: left; }

  .fac-tabs{ flex-wrap: wrap; }
  .fac-tab{ flex: 1 1 auto; text-align: center; padding: 10px 12px 9px; font-size: 11px; }

  .keybind-head{ flex-direction: column; align-items: stretch; gap: 10px; }
  .kb-search{ width: 100%; }
  .kb-search-wrap{ width: 100%; }
  .kb-row td{ padding: 7px 14px; }
  .kb-group-row td{ padding: 10px 14px 6px; }

  .hero-corner{ width: 28px; height: 28px; }
  .hero-corner.tl, .hero-corner.tr{ top: 14px; }
  .hero-corner.bl, .hero-corner.br{ bottom: 14px; }
  .hero-corner.tl, .hero-corner.bl{ left: 14px; }
  .hero-corner.tr, .hero-corner.br{ right: 14px; }

  .classification{ letter-spacing: .16em; font-size: 9px; }

  .device-frame.watch img{ max-width: 100%; }
}

/* very narrow — keep classification compact */
@media (max-width: 420px){
  .masthead-mark{ gap: 12px; }
  .cls-bar{ display: none; }
  .hero-title{ font-size: 44px; }
  .masthead-title{ font-size: 18px; }
  .masthead-title span{ display: block; font-size: .8em; margin-top: 2px; }
}

/* reduce motion */
@media (prefers-reduced-motion: reduce){
  *,
  *::before,
  *::after{
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* =============================================================================
   END — BELLUM FIELD MANUAL FM-01 STYLESHEET
   ============================================================================= */
