/* The PAVE Cave — night-vision theme with the red scarf.
   Tokens follow docs/design.json. One stylesheet; accessibility overrides are LAST. */
@font-face { font-family: "Stardos Stencil"; src: url(/fonts/stardos-stencil-400.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Stardos Stencil"; src: url(/fonts/stardos-stencil-700.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url(/fonts/ibm-plex-sans-400.woff2) format("woff2"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "IBM Plex Sans"; src: url(/fonts/ibm-plex-sans-400i.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url(/fonts/ibm-plex-mono-500.woff2) format("woff2"); font-weight: 500; font-display: swap; }

:root {
  color-scheme: dark;
  --ink: #020403;
  --panel: #08110a;
  --panel2: #0d1a10;
  --line: #1f3a25;
  --field: #5f9468;
  --text: #e2efe3;
  --muted: #a6bfaa;
  --nvg: #7dff5c;
  --nvg-deep: #3ccf22;
  --glow: 0 0 18px rgba(125, 255, 92, .35);
  --scarf: #c8102e;
  --scarf-text: #ff6b78;
  --focus: #ffd84d;
  --display: "Stardos Stencil", "Stencil Std", Georgia, serif;
  --sans: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Consolas, monospace;
  --max: 1200px;
  --gutter: clamp(1rem, 4vw, 2rem);
  --radius: 4px;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; overflow-x: clip; scroll-padding-top: 140px; }
@media (max-width: 1100px) { html { scroll-padding-top: 120px; } }
body {
  margin: 0; background: var(--ink); color: var(--text); font: 400 1.0625rem/1.65 var(--sans);
  overflow-x: clip; min-height: 100vh; display: flex; flex-direction: column;
}
main { flex: 1 0 auto; display: flow-root; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--nvg); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; color: #b6ff9f; }
p, ul, ol, table, blockquote, figure { margin: 0 0 1.1em; }
h1, h2, h3, h4, h5 { font-family: var(--display); font-weight: 700; line-height: 1.12; margin: 1.6em 0 .55em; letter-spacing: .01em; color: #f2fbf2; text-wrap: balance; }
h1 { font-size: clamp(2.2rem, 5.4vw, 3.9rem); margin-top: 0; }
h2 { font-size: clamp(1.65rem, 3.4vw, 2.4rem); }
h3 { font-size: clamp(1.3rem, 2.4vw, 1.65rem); }
h4 { font-size: 1.2rem; }
h5 { font-size: 1.05rem; }
strong { font-weight: 600; color: #f2fbf2; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.5rem 0; }
.wrap { width: min(100% - 2 * var(--gutter), var(--max)); margin-inline: auto; }
.narrow { max-width: 72ch; }
.mono, .eyebrow { font-family: var(--mono); font-weight: 500; letter-spacing: .06em; }
.eyebrow { text-transform: uppercase; font-size: .8rem; color: var(--nvg); margin: 0 0 .9rem; display: flex; align-items: center; gap: .6rem; }
.eyebrow::before { content: ""; width: 1.6rem; height: 3px; background: var(--scarf); flex: none; }
.lead { font-size: clamp(1.1rem, 1.8vw, 1.28rem); color: var(--text); max-width: 60ch; }
.muted { color: var(--muted); }
.vh { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 1rem; top: -4rem; z-index: 100; background: var(--focus); color: #000; padding: .75rem 1rem; font-weight: 600; border-radius: var(--radius); }
.skip:focus { top: 1rem; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .55rem; min-height: 48px; padding: .7rem 1.35rem;
  font: 600 1rem/1.2 var(--sans); text-decoration: none; border-radius: var(--radius); border: 2px solid transparent; cursor: pointer;
  transition: background-color .3s var(--ease), color .3s var(--ease), box-shadow .3s var(--ease), border-color .3s var(--ease);
}
.btn-primary { background: var(--nvg); color: #020403; box-shadow: var(--glow); }
.btn-primary:hover { background: #a8ff8c; color: #020403; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--field); }
.btn-ghost:hover { border-color: var(--nvg); color: var(--nvg); }
.btn-scarf { background: var(--scarf); color: #fff; }
.btn-scarf:hover { background: #a50d26; color: #fff; }
.btn svg { width: 1.15em; height: 1.15em; flex: none; }
.btn-row { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.6rem; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 40; background: rgba(2, 4, 3, .97); border-top: 5px solid var(--scarf); }
.site-header .bar { position: relative; z-index: 2; display: flex; align-items: center; gap: 1.25rem; min-height: 78px; }
.scarf-band { z-index: 1; }
.brand { display: flex; align-items: center; gap: .85rem; text-decoration: none; color: var(--text); flex: none; }
.brand img { width: 92px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-family: var(--display); font-size: 1.35rem; color: var(--nvg); text-shadow: var(--glow); letter-spacing: .03em; }
.brand-text span { font-family: var(--mono); font-size: .7rem; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.nav { margin-left: auto; }
.nav > ul { list-style: none; display: flex; align-items: center; gap: .15rem; margin: 0; padding: 0; }
.nav li { position: relative; margin: 0; }
.nav a, .nav .dd-btn {
  display: flex; align-items: center; gap: .35rem; min-height: 44px; padding: .5rem .7rem; color: var(--text); text-decoration: none;
  font: 500 .97rem/1.2 var(--sans); background: none; border: 0; border-radius: var(--radius); cursor: pointer;
}
.nav a:hover, .nav .dd-btn:hover { color: var(--nvg); }
.nav [aria-current="page"], .nav .is-current > .dd-btn { color: var(--nvg); box-shadow: inset 0 -3px 0 var(--scarf); }
.dd-btn svg { width: .8em; height: .8em; transition: transform .3s var(--ease); }
.dd-btn[aria-expanded="true"] svg { transform: rotate(180deg); }
.dd { display: none; position: absolute; z-index: 5; top: calc(100% + 17px); left: 0; min-width: 270px; padding: .5rem; margin: 0; list-style: none; background: var(--panel2); border: 1px solid var(--line); border-top: 3px solid var(--scarf); border-radius: var(--radius); box-shadow: 0 18px 40px rgba(0, 0, 0, .6); }
.dd-btn[aria-expanded="true"] + .dd { display: block; }
.dd a { padding: .55rem .75rem; min-height: 40px; font-size: .95rem; }
.dd a:hover { background: rgba(125, 255, 92, .08); }
.dd .sub a { padding-left: 1.6rem; font-size: .9rem; color: var(--muted); }
.dd .ext::after { content: "↗"; font-size: .8em; margin-left: .2rem; color: var(--muted); }
.header-cta { flex: none; min-height: 44px; padding: .55rem 1.05rem; }
.menu-btn { display: none; margin-left: auto; align-items: center; gap: .5rem; min-height: 48px; padding: .5rem .9rem; background: none; color: var(--text); border: 2px solid var(--field); border-radius: var(--radius); font: 600 1rem var(--sans); cursor: pointer; }
.menu-btn svg { width: 1.3rem; height: 1.3rem; }
/* the red scarf band with the four unit emblems */
.scarf-band { position: relative; background: var(--scarf); height: 34px; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.scarf-band::before, .scarf-band::after { content: ""; position: absolute; top: 0; bottom: 0; width: 48px; background: linear-gradient(115deg, transparent 49%, rgba(0, 0, 0, .28) 50%); }
.scarf-band::before { left: 0; }
.scarf-band::after { right: 0; transform: scaleX(-1); }
.scarf-band img { height: 28px; width: auto; }
@media (max-width: 720px) { .scarf-band { height: 26px; } .scarf-band img { height: 21px; } .site-header .bar { min-height: 68px; } }

@media (max-width: 1100px) {
  .menu-btn { display: inline-flex; }
  .header-cta { display: none; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--panel); border-bottom: 3px solid var(--scarf); max-height: calc(100vh - 120px); overflow-y: auto; }
  .nav.open { display: block; }
  .nav > ul { flex-direction: column; align-items: stretch; padding: .75rem var(--gutter) 1.25rem; gap: 0; }
  .nav > ul > li { border-bottom: 1px solid var(--line); }
  .nav a, .nav .dd-btn { width: 100%; justify-content: space-between; min-height: 52px; font-size: 1.05rem; }
  .dd { position: static; box-shadow: none; border: 0; border-left: 3px solid var(--scarf); border-radius: 0; margin: 0 0 .6rem .5rem; min-width: 0; background: transparent; }
  .nav .mobile-donate { display: block; padding-top: 1rem; border: 0; }
  .nav .mobile-donate a { justify-content: center; }
}
@media (min-width: 1101px) { .nav .mobile-donate { display: none; } }
@media (max-width: 520px) { .brand-text span { display: none; } .brand img { width: 72px; } }

/* ---------- breadcrumb + page head ---------- */
.crumbs { font: 500 .82rem/1.4 var(--mono); letter-spacing: .04em; margin: 0 0 1.4rem; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .35rem; margin: 0; padding: 0; }
.crumbs li { margin: 0; display: flex; gap: .35rem; align-items: center; color: var(--muted); }
.crumbs li + li::before { content: "/"; color: var(--scarf-text); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--nvg); }
.page-head { position: relative; padding: clamp(2.2rem, 5vw, 4rem) 0 clamp(1.8rem, 4vw, 2.8rem); background:
  radial-gradient(ellipse 60% 120% at 85% 0%, rgba(125, 255, 92, .09), transparent 60%), var(--panel); border-bottom: 1px solid var(--line); display: flow-root; }
.page-head::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: repeating-linear-gradient(0deg, rgba(125, 255, 92, .025) 0 1px, transparent 1px 4px); }
.page-head h1 { color: var(--nvg); text-shadow: var(--glow); }
.page-head .lead { margin-bottom: 0; }
.updated { font: 500 .8rem var(--mono); color: var(--muted); letter-spacing: .04em; margin-top: 1.2rem; }

/* ---------- sections ---------- */
.section { padding: clamp(3rem, 7vw, 5.5rem) 0; display: flow-root; }
.section.alt { background: var(--panel); border-block: 1px solid var(--line); }
.section > .wrap > h2:first-child, .section-head h2 { margin-top: 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem 2rem; margin-bottom: 2rem; }
.section-head p { margin: 0; max-width: 60ch; color: var(--muted); }

/* ---------- home hero ---------- */
.hero { position: relative; padding: clamp(2.5rem, 6vw, 5rem) 0 clamp(3rem, 7vw, 5.5rem); background: radial-gradient(ellipse 55% 80% at 78% 40%, rgba(125, 255, 92, .1), transparent 70%), var(--ink); display: flow-root; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero h1 { font-size: clamp(2.4rem, 5vw, 3.9rem); color: #f2fbf2; }
.hero h1 em { font-style: normal; color: var(--nvg); text-shadow: var(--glow); display: block; }
.hero .lead { margin-top: 1.2rem; }
.hero-meta { display: flex; flex-wrap: wrap; gap: .6rem 1.4rem; margin: 1.8rem 0 0; padding: 0; list-style: none; font: 500 .82rem var(--mono); color: var(--muted); letter-spacing: .05em; text-transform: uppercase; }
.hero-meta li { margin: 0; display: flex; align-items: center; gap: .45rem; }
.hero-meta li::before { content: ""; width: 7px; height: 7px; background: var(--nvg); border-radius: 50%; box-shadow: var(--glow); }
/* NVG tube */
.tube { margin: 0; justify-self: center; width: min(100%, 540px); }
.tube-lens { position: relative; aspect-ratio: 1; border-radius: 50%; overflow: hidden; background: #000; isolation: isolate;
  box-shadow: 0 0 0 10px #0a0f0b, 0 0 0 12px #26392b, 0 0 60px rgba(125, 255, 92, .25), inset 0 0 50px #000; }
.tube-lens img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; transition: opacity .6s var(--ease); }
.tube-lens .day { opacity: 0; }
.tube.up .tube-lens .day { opacity: 1; }
.tube.up .tube-lens .nvg { opacity: 0; }
.tube-lens::before { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; border-radius: 50%;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .18) 0 1px, transparent 1px 3px), radial-gradient(circle, transparent 58%, rgba(0, 0, 0, .75) 100%); transition: opacity .6s var(--ease); }
.tube.up .tube-lens::before { opacity: .25; }
.reticle { position: absolute; inset: 0; z-index: 3; width: 100%; height: 100%; pointer-events: none; color: rgba(190, 255, 170, .55); transition: opacity .6s var(--ease); }
.tube.up .reticle { opacity: 0; }
.tube figcaption { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .75rem 1rem; margin-top: 1.6rem; font-size: .9rem; color: var(--muted); }
.goggles { white-space: nowrap; min-width: 11rem; justify-content: center; display: inline-flex; align-items: center; gap: .6rem; min-height: 44px; padding: .5rem 1rem; background: var(--panel2); color: var(--text); border: 2px solid var(--field); border-radius: 999px; font: 600 .92rem var(--sans); cursor: pointer; transition: border-color .3s var(--ease), color .3s var(--ease); }
.goggles:hover { border-color: var(--nvg); color: var(--nvg); }
.goggles .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--nvg); box-shadow: var(--glow); }
.goggles[aria-pressed="true"] .dot { background: #ffcf66; box-shadow: 0 0 12px rgba(255, 207, 102, .6); }
@media (prefers-reduced-motion: no-preference) {
  .tube:not(.up) .tube-lens::after { content: ""; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: rgba(125, 255, 92, .05); animation: flicker 5s steps(1) infinite; }
  @keyframes flicker { 0%, 100% { opacity: 0; } 47% { opacity: .9; } 48% { opacity: 0; } 82% { opacity: .5; } 83% { opacity: 0; } }
}
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .tube { width: min(100%, 420px); } }

/* ---------- data plates (flight-line placards) ---------- */
.plates { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.plate { position: relative; margin: 0; padding: 1.15rem 1.2rem 1.2rem; background: var(--panel2); border: 1px solid var(--line); border-radius: var(--radius); }
.plate::before { content: ""; position: absolute; left: -1px; top: -1px; width: 38px; height: 3px; background: var(--scarf); }
.plate .k, .plate .v { display: block; }
.plate .v.big + a { margin-top: .6rem; }
.plate dt, .plate .k { font: 500 .74rem/1.3 var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin: 0 0 .35rem; }
.plate dd, .plate .v { margin: 0; font: 600 1.08rem/1.35 var(--sans); color: var(--text); }
.plate .v.big { font: 700 2.3rem/1 var(--display); color: var(--nvg); text-shadow: var(--glow); }
.plate a { position: relative; display: inline-block; min-height: 24px; }
.plate .stack { display: block; font-family: var(--mono); font-size: .92rem; white-space: nowrap; }
.plate a.cover::after { content: ""; position: absolute; inset: 0; }
.plate:has(a.cover:hover) { border-color: var(--nvg); }
dl.plates { display: grid; }

/* ---------- memorial cards ---------- */
.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 1.1rem; margin: 0; padding: 0; list-style: none; }
.roster.big { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.mcard { position: relative; margin: 0; background: var(--panel2); border: 1px solid var(--line); border-top: 4px solid var(--scarf); border-radius: var(--radius); overflow: hidden; transition: border-color .3s var(--ease), transform .3s var(--ease); display: flex; flex-direction: column; }
.mcard:hover { border-color: var(--nvg); border-top-color: var(--scarf); }
.mcard .ph { aspect-ratio: 4 / 5; background: #050a06; overflow: hidden; }
.mcard .ph img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 20%; filter: saturate(.85); transition: filter .4s var(--ease), transform .6s var(--ease); }
.mcard:hover .ph img { filter: saturate(1); transform: scale(1.03); }
.mcard .ph.none { display: grid; place-items: center; }
.mcard .ph.none svg { width: 46%; color: #2f5a37; }
.mcard .body { padding: .8rem .85rem .95rem; display: flex; flex-direction: column; gap: .2rem; flex: 1; }
.mcard h3, .mcard h4 { font: 600 1.02rem/1.25 var(--sans); margin: 0; color: #f2fbf2; letter-spacing: 0; }
.mcard a { color: inherit; text-decoration: none; }
.mcard a::after { content: ""; position: absolute; inset: 0; }
.mcard a:hover { color: var(--nvg); }
.mcard .meta { font: 500 .76rem/1.4 var(--mono); color: var(--muted); letter-spacing: .03em; }
.mcard .pos { font-size: .88rem; color: var(--muted); }
.mcard .pn { color: var(--nvg); }
/* incidents (line of duty) */
.incidents { display: grid; gap: 1.5rem; }
.incident { display: grid; grid-template-columns: 250px 1fr; gap: 1.5rem; padding: 1.4rem; background: var(--panel); border: 1px solid var(--line); border-left: 6px solid var(--scarf); border-radius: var(--radius); scroll-margin-top: 1rem; }
.incident h3 { margin: 0 0 .7rem; font-size: 1.5rem; color: var(--nvg); text-shadow: var(--glow); }
.incident dl { margin: 0; display: grid; gap: .55rem; }
.incident dt { font: 500 .72rem var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.incident dd { margin: 0; font: 500 1rem var(--mono); color: var(--text); }
/* Crew rows stay even: build.js sets --c2/--c3/--c5 (balanced column counts for 2, 3 or 5 slots). Cards keep the
   width of a full row of --max, so a short crew doesn't stretch. */
.incident .roster { --max: 2; --cols: var(--c2, 2); grid-template-columns: repeat(var(--cols), calc((100% - (var(--max) - 1) * 1.1rem) / var(--max))); }
@media (min-width: 521px) and (max-width: 760px), (min-width: 901px) { .incident .roster { --max: 3; --cols: var(--c3, 3); } }
@media (min-width: 1101px) { .incident .roster { --max: 5; --cols: var(--c5, 5); } }
@media (max-width: 760px) { .incident { grid-template-columns: 1fr; } }
/* wall filter */
.filters { display: flex; flex-wrap: wrap; align-items: end; gap: 1rem 1.5rem; margin: 0 0 1.6rem; padding: 1.1rem 1.2rem; background: var(--panel2); border: 1px solid var(--line); border-radius: var(--radius); }
.filters fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.filters legend, .filters label.k { font: 500 .74rem var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-bottom: .45rem; padding: 0; display: block; }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip { position: relative; }
.chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; min-height: 40px; padding: .4rem .9rem; border: 2px solid var(--field); border-radius: 999px; font-size: .92rem; color: var(--text); transition: all .3s var(--ease); }
.chip input:checked + span { background: var(--nvg); border-color: var(--nvg); color: #020403; font-weight: 600; }
.chip input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 2px; }
.filters .search { flex: 1 1 240px; }
.filters input[type="search"], .filters select { width: 100%; }
.count { font: 500 .9rem var(--mono); color: var(--muted); margin: 0 0 1rem; }
.letter { grid-column: 1 / -1; font: 700 1.6rem var(--display); color: var(--nvg); border-bottom: 1px solid var(--line); padding-bottom: .3rem; margin: 1rem 0 0; }
.letter:first-child { margin-top: 0; }

/* ---------- memorial profile ---------- */
.tribute-head { display: grid; grid-template-columns: minmax(220px, 320px) 1fr; gap: clamp(1.5rem, 4vw, 3rem); align-items: start; }
.portrait { margin: 0; position: relative; }
.portrait img { width: 100%; border: 1px solid var(--line); border-radius: var(--radius); background: #050a06; }
.portrait::before { content: ""; position: absolute; left: -10px; top: 18px; width: calc(100% + 20px); height: 14px; background: var(--scarf); transform: rotate(-3deg); z-index: 1; box-shadow: 0 4px 10px rgba(0, 0, 0, .5); }
.portrait.none { aspect-ratio: 4 / 5; display: grid; place-items: center; background: var(--panel2); border: 1px solid var(--line); border-radius: var(--radius); }
.portrait.none svg { width: 45%; color: #2f5a37; }
.tribute-head h1 { margin-bottom: .2rem; }
.fullname { font: 500 1.05rem var(--mono); color: var(--muted); margin: 0 0 1.5rem; letter-spacing: .02em; }
.tribute-head .plates { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); }
.prose { max-width: 70ch; }
.prose img { margin: 1.5rem 0; border: 1px solid var(--line); border-radius: var(--radius); }
.prose h2 { margin-top: 2em; }
.prose ul, .prose ol { padding-left: 1.4rem; }
.prose li { margin-bottom: .35rem; }
.prose blockquote { margin: 1.6rem 0; padding: .4rem 0 .4rem 1.4rem; border-left: 4px solid var(--scarf); font-style: italic; }
.wide { max-width: none; }
.note { padding: 1rem 1.2rem; border: 1px dashed var(--field); border-radius: var(--radius); color: var(--muted); font-size: .95rem; }
.note strong { color: var(--text); }
.backlinks { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
@media (max-width: 720px) { .tribute-head { grid-template-columns: 1fr; } .portrait { max-width: 300px; } }

/* ---------- tables ---------- */
.table-wrap { position: relative; overflow: auto; max-width: 100%; margin: 0 0 1.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); }
.table-wrap.tall { max-height: 70vh; }
thead th { top: 0; }
table { border-collapse: collapse; width: 100%; font-size: .97rem; margin: 0; }
caption { text-align: left; padding: .8rem 1rem; font: 500 .8rem var(--mono); color: var(--muted); letter-spacing: .05em; caption-side: top; }
th, td { text-align: left; padding: .6rem .9rem; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { position: sticky; top: 0; z-index: 1; background: #10241a; font: 500 .78rem var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--nvg); border-bottom: 2px solid var(--scarf); white-space: nowrap; }
tbody tr:nth-child(even) { background: rgba(125, 255, 92, .025); }
tbody tr:hover { background: rgba(125, 255, 92, .06); }
td:first-child { font-family: var(--mono); color: var(--muted); }
tr.remembered td { background: rgba(200, 16, 46, .1); }
.scarf-tag { display: inline-flex; align-items: center; gap: .3rem; margin-left: .45rem; padding: .05rem .45rem; background: var(--scarf); color: #fff; font: 500 .7rem var(--mono); letter-spacing: .06em; text-transform: uppercase; border-radius: 2px; text-decoration: none; white-space: nowrap; }
a.scarf-tag:hover { background: #a50d26; color: #fff; }
.table-tools { display: flex; flex-wrap: wrap; gap: 1rem; align-items: end; margin-bottom: 1rem; }
.table-tools label { display: block; font: 500 .74rem var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-bottom: .4rem; }

/* ---------- link lists / cards ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1.2rem; margin: 0; padding: 0; list-style: none; }
.card { position: relative; margin: 0; padding: 1.4rem; background: var(--panel2); border: 1px solid var(--line); border-radius: var(--radius); transition: border-color .3s var(--ease); display: flex; flex-direction: column; }
.card:hover { border-color: var(--nvg); }
.card h3 { margin: 0 0 .5rem; font-size: 1.35rem; }
.card h3 a { color: #f2fbf2; text-decoration: none; }
.card h3 a::after { content: ""; position: absolute; inset: 0; }
.card h3 a:hover { color: var(--nvg); }
.card p { color: var(--muted); margin: 0; font-size: .97rem; }
.card .k { font: 500 .74rem var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--scarf-text); margin-bottom: .6rem; }
.card.photo { padding: 0; overflow: hidden; }
.card.photo img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.card.photo .in { padding: 1.1rem 1.3rem 1.3rem; }
.news-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; }
.news-list li { margin: 0; padding: 1.2rem 0; border-bottom: 1px solid var(--line); display: grid; grid-template-columns: 9rem 1fr; gap: .4rem 1.5rem; }
.news-list time { font: 500 .85rem var(--mono); color: var(--muted); padding-top: .25rem; }
.news-list h2, .news-list h3 { margin: 0 0 .3rem; font-size: 1.3rem; }
.news-list p { margin: 0; color: var(--muted); }
@media (max-width: 600px) { .news-list li { grid-template-columns: 1fr; } }

/* ---------- home specials ---------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
@media (max-width: 820px) { .split { grid-template-columns: 1fr; } }
/* Red Scarf feature: gunmetal gray field, a full-width scarf on an angle carrying the four unit emblems */
.scarf-feature { position: relative; padding: clamp(3.5rem, 8vw, 6rem) 0 0; overflow: hidden; display: flow-root; border-block: 1px solid #4a535b;
  background:
    repeating-linear-gradient(90deg, rgba(255, 255, 255, .018) 0 1px, transparent 1px 3px),
    linear-gradient(160deg, #3d444b 0%, #2c3237 45%, #23282c 100%); }
.scarf-feature .wrap { position: relative; }
.scarf-copy { max-width: 46rem; }
.scarf-feature h2 { color: #fff; white-space: nowrap; text-wrap: nowrap; font-size: clamp(1.1rem, 5.6vw, 2.4rem); }
.scarf-feature .eyebrow { color: #ffc2c9; }
.scarf-feature .eyebrow::before { background: var(--scarf); height: 4px; }
.scarf-feature p { color: #eef1f3; }
.scarf-feature a:not(.btn) { color: #ffd0d5; }
.scarf-feature .btn-scarf { background: #d4123a; box-shadow: 0 0 0 1px #ff6a7e inset, 0 8px 22px rgba(0, 0, 0, .35); }
.scarf-feature .btn-scarf:hover { background: #e71d46; }
.scarf-band-full { position: relative; height: clamp(150px, 16vw, 200px); margin: clamp(2.5rem, 5vw, 3.5rem) 0 clamp(2.5rem, 5vw, 4rem); isolation: isolate; }
.scarf-band-full::before { content: ""; position: absolute; z-index: -1; left: -6%; right: -6%; top: 50%; height: clamp(96px, 10vw, 128px); transform: translateY(-50%) rotate(-4deg);
  background:
    repeating-linear-gradient(97deg, rgba(255, 255, 255, .07) 0 2px, transparent 2px 26px),
    linear-gradient(180deg, rgba(255, 255, 255, .3) 0, rgba(255, 255, 255, 0) 16%, rgba(0, 0, 0, 0) 72%, rgba(0, 0, 0, .38) 100%),
    linear-gradient(90deg, #b00d28, #e3183b 22%, #cc1233 48%, #e81f42 74%, #b30e2a);
  box-shadow: 0 16px 34px rgba(0, 0, 0, .55); }
.scarf-emblems { list-style: none; margin: 0; padding: 0 4%; height: 100%; display: flex; align-items: center; justify-content: space-around; transform: rotate(-4deg); }
.scarf-emblems li { margin: 0; }
.scarf-emblems a { display: grid; place-items: center; min-width: 44px; min-height: 44px; padding: .25rem; border-radius: 6px; transition: transform .3s var(--ease), filter .3s var(--ease); }
.scarf-emblems img { height: clamp(56px, 6.6vw, 84px); width: auto; filter: drop-shadow(0 2px 3px rgba(0, 0, 0, .45)); }
.scarf-emblems a:hover { transform: scale(1.08); }
.scarf-emblems a:hover img { filter: drop-shadow(0 0 10px rgba(255, 255, 255, .55)); }
/* Tribute video with a splash screen */
.tribute { padding: clamp(3rem, 6vw, 4.5rem) 0; display: flow-root; background: var(--ink); border-top: 1px solid var(--line); }
.embed.splash { margin: 0; }
.tribute-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 600px); gap: clamp(1.5rem, 4vw, 3.5rem); align-items: center; }
.tribute-grid h2 { margin-top: 0; }
.tribute-grid p:not(.eyebrow) { color: var(--muted); max-width: 46ch; }
@media (max-width: 860px) { .tribute-grid { grid-template-columns: 1fr; } .tribute-grid .embed.splash { max-width: 600px; } }
.embed.splash .frame iframe { z-index: 3; }
.embed.splash .frame { border: 1px solid var(--line); box-shadow: 0 0 0 1px #000, 0 24px 60px rgba(0, 0, 0, .6); }
.embed.splash .poster { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; }
/* the splash image carries its own title; keep it unobscured, play button in the bottom-right corner */
.embed.splash .poster { object-position: 50% 50%; }
.embed.splash .play { z-index: 2; display: grid; align-content: end; justify-items: end; padding: clamp(.6rem, 2.5vw, 1.6rem); }
.embed.splash .play svg { width: clamp(48px, 5vw, 64px); height: auto; filter: drop-shadow(0 4px 14px rgba(0, 0, 0, .7)) drop-shadow(0 0 14px rgba(125, 255, 92, .45)); }
.embed.splash .play:hover svg, .embed.splash .play:focus-visible svg { transform: scale(1.1); }
/* The Creed beside the "I Flew" drawing */
.creed-split { grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); align-items: start; }
.i-flew { margin: 0; justify-self: center; max-width: 380px; padding: 1rem 1rem .8rem; background: #f3f1ec; border-radius: var(--radius); box-shadow: 0 0 0 6px #0d1a10, 0 0 0 7px var(--line), 0 24px 50px rgba(0, 0, 0, .55); }
.i-flew img { width: 100%; height: auto; border-radius: 2px; }
.i-flew figcaption { margin-top: .7rem; text-align: center; font: 700 1.2rem var(--display); color: #1d211f; letter-spacing: .04em; }
@media (min-width: 821px) { .i-flew { position: sticky; top: 150px; } }
.roster.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 1100px) { .roster.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.creed { position: relative; margin: 0; padding: clamp(1.5rem, 4vw, 2.5rem); background: var(--panel2); border: 1px solid var(--line); border-left: 6px solid var(--scarf); border-radius: var(--radius); }
.creed p { font-family: var(--display); font-size: clamp(1.08rem, 1.7vw, 1.28rem); line-height: 1.5; margin: 0 0 .7rem; color: #e8f6e8; }
.creed p:first-child { color: var(--nvg); text-shadow: var(--glow); font-size: clamp(1.3rem, 2.2vw, 1.6rem); }
.creed p:last-of-type { color: var(--nvg); }
.creed footer { margin-top: 1.2rem; font: 500 .8rem var(--mono); color: var(--muted); letter-spacing: .05em; }
.photo-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: .8rem; margin: 0; padding: 0; list-style: none; }
.photo-strip li { margin: 0; }
.photo-strip figure { margin: 0; }
.photo-strip img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--line); border-radius: var(--radius); }
.photo-strip a { text-decoration: none; display: block; }
.photo-strip a:hover img { border-color: var(--nvg); }
.photo-strip figcaption { font: 500 .78rem var(--mono); color: var(--muted); margin-top: .45rem; letter-spacing: .03em; }
.photo-strip a:hover figcaption { color: var(--nvg); }
@media (max-width: 820px) { .photo-strip { grid-template-columns: repeat(2, 1fr); } }
.latest { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 2rem; align-items: start; }
@media (max-width: 900px) { .latest { grid-template-columns: 1fr; } }
.announce { padding: 1.4rem; background: var(--panel2); border: 1px solid var(--line); border-top: 4px solid var(--scarf); border-radius: var(--radius); }
.announce h3 { margin: 0 0 .5rem; font-size: 1.35rem; }
.announce > a { display: inline-block; min-height: 24px; padding-top: .2rem; }
.announce time { font: 500 .8rem var(--mono); color: var(--muted); }
.links-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; }
.links-grid li { margin: 0; }
.links-grid a { display: flex; align-items: center; gap: .8rem; min-height: 64px; padding: .9rem 1.1rem; background: var(--panel2); border: 1px solid var(--line); border-radius: var(--radius); color: var(--text); text-decoration: none; font-weight: 600; transition: border-color .3s var(--ease); }
.links-grid a:hover { border-color: var(--nvg); color: var(--nvg); }
.links-grid svg { width: 1.5rem; height: 1.5rem; flex: none; color: var(--nvg); }
.links-grid small { display: block; font: 500 .74rem var(--mono); color: var(--muted); letter-spacing: .04em; margin-top: .1rem; }
/* video facade */
.embed { margin: 1.5rem 0; }
.embed .frame { position: relative; aspect-ratio: 16 / 9; background: radial-gradient(circle at 50% 45%, #10301a, #020403 70%); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.embed .frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.embed .play { position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: .8rem; width: 100%; background: none; border: 0; color: var(--text); font: 600 1rem var(--sans); cursor: pointer; }
.embed .play svg { width: 76px; height: 76px; color: var(--nvg); filter: drop-shadow(0 0 14px rgba(125, 255, 92, .5)); transition: transform .3s var(--ease); }
.embed .play:hover svg { transform: scale(1.08); }
.embed figcaption { font-size: .88rem; color: var(--muted); margin-top: .6rem; }

/* ---------- forms ---------- */
.form { display: grid; gap: 1.2rem; max-width: 720px; }
.form fieldset { margin: 0; padding: 1.2rem 1.2rem 1.3rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--panel); display: grid; gap: 1.1rem; min-width: 0; }
.form legend { font: 700 1.15rem var(--display); color: var(--nvg); padding: 0 .4rem; }
.field { display: grid; gap: .4rem; }
.field > label, .field > .label { font-weight: 600; color: #f2fbf2; }
.req { color: var(--scarf-text); font-weight: 500; font-size: .88rem; }
.hint { font-size: .9rem; color: var(--muted); margin: 0; }
input[type="text"], input[type="email"], input[type="search"], input[type="number"], input[type="url"], input[type="tel"], input[type="date"], select, textarea {
  width: 100%; min-height: 48px; padding: .65rem .8rem; background: #071009; color: var(--text); border: 2px solid var(--field); border-radius: var(--radius); font: 400 1rem/1.4 var(--sans);
}
textarea { min-height: 140px; resize: vertical; }
input:hover, select:hover, textarea:hover { border-color: #84bd8d; }
input::placeholder, textarea::placeholder { color: #8aa58f; }
.options { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; }
.options label { display: inline-flex; align-items: center; gap: .55rem; min-height: 44px; font-weight: 400; cursor: pointer; }
.options input { flex: none; width: 24px; height: 24px; accent-color: var(--nvg); margin: 0; }
.field-error { color: var(--scarf-text); font-weight: 600; font-size: .92rem; margin: 0; }
[aria-invalid="true"] { border-color: var(--scarf-text) !important; }
.form-status { padding: 1rem 1.2rem; border-radius: var(--radius); font-weight: 600; }
.form-status:empty { display: none; }
.form-status.ok { background: rgba(125, 255, 92, .12); border: 1px solid var(--nvg); color: #e9ffe2; }
.form-status.err { background: rgba(200, 16, 46, .15); border: 1px solid var(--scarf-text); color: #ffe3e6; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
[hidden] { display: none !important; }
.privacy-note { font-size: .92rem; color: var(--muted); margin: 0; }

/* ---------- donate ---------- */
.give { display: grid; grid-template-columns: 1.2fr 1fr; gap: 2rem; align-items: start; }
@media (max-width: 860px) { .give { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.site-footer { margin-top: auto; background: #010201; border-top: 5px solid var(--scarf); padding: 3rem 0 2rem; font-size: .95rem; display: flow-root; }
.foot-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 2rem; }
.site-footer h2 { font: 500 .78rem var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--nvg); margin: 0 0 .9rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 .35rem; }
.site-footer a { color: var(--text); text-decoration: none; display: inline-block; padding: .2rem 0; }
.site-footer a:hover { color: var(--nvg); text-decoration: underline; }
.site-footer .brandline { color: var(--muted); max-width: 40ch; }
.site-footer .brandline a { display: inline; padding: 0; text-decoration: underline; text-underline-offset: .18em; }
.foot-logo { width: 140px; margin-bottom: 1rem; }
.fine { margin-top: 2.5rem; padding-top: 1.4rem; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; justify-content: space-between; gap: .8rem 2rem; color: var(--muted); font-size: .86rem; }
.fine p { margin: 0; }
@media (max-width: 900px) { .foot-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .foot-grid { grid-template-columns: 1fr; } }

/* ---------- reveal (enhancement only; content visible without JS) ---------- */
@media (prefers-reduced-motion: no-preference) {
  .js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
  .js .reveal.in, .reveal-done .reveal { opacity: 1; transform: none; }
}

/* ---------- print ---------- */
@media print {
  body { background: #fff; color: #000; }
  .site-header, .site-footer, .scarf-band, .filters, .goggles, .btn-row { display: none !important; }
  a { color: #000; }
  .page-head, .section.alt { background: none; }
  h1, h2, h3 { color: #000; text-shadow: none; }
}

/* ---------- accessibility overrides (LAST) ---------- */
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }
.btn-primary:focus-visible, .chip input:checked:focus-visible + span { outline-color: var(--focus); box-shadow: 0 0 0 6px #020403; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
@media (forced-colors: active) {
  .btn, .chip span, .goggles { border: 2px solid ButtonText; }
  .scarf-band, .plate::before { forced-color-adjust: none; }
}

/* ---------- home: donate strip + organizations we highlight ---------- */
.donate-strip { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.2rem 2rem; margin-top: 2.5rem; padding: 1.4rem 1.6rem; background: var(--panel2); border: 1px solid var(--line); border-left: 4px solid var(--nvg); border-radius: var(--radius); }
.donate-strip h3 { margin: 0 0 .35rem; }
.donate-strip p { margin: 0; max-width: 62ch; color: var(--muted); }
.orgs { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 1rem; }
.orgs li { margin: 0; }
.orgs a { height: 100%; display: flex; flex-direction: column; align-items: center; gap: .75rem; padding: 1rem .8rem 1.1rem; background: var(--panel2); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--text); transition: border-color .3s var(--ease), transform .3s var(--ease); }
.orgs a:hover { border-color: var(--nvg); transform: translateY(-3px); }
.orgs .logo { width: 100%; height: 96px; display: grid; place-items: center; padding: .6rem; background: #f4f3ef; border-radius: 3px; }
.orgs .logo img { max-width: 100%; max-height: 72px; width: auto; height: auto; object-fit: contain; }
.orgs .name { font-weight: 600; font-size: .92rem; line-height: 1.3; text-align: center; }
.orgs a:hover .name { color: var(--nvg); }
@media (max-width: 1000px) { .orgs { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 520px) { .orgs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- tail number history ---------- */
.tail-tools { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; margin-bottom: 1rem; }
.tail-tools .count { margin: 0; }
.tail-tools .btn { min-height: 40px; padding: .45rem 1rem; }
.tails { list-style: none; margin: 0; padding: 0; display: grid; gap: .6rem; }
.prose .tails { padding-left: 0; }
.tail { margin: 0; scroll-margin-top: 140px; }
.tail details { background: var(--panel2); border: 1px solid var(--line); border-left: 4px solid #5d6a62; border-radius: var(--radius); }
.tail[data-fate="Lost"] details { border-left-color: var(--scarf); }
.tail[data-fate="On display"] details { border-left-color: var(--nvg); }
.tail details[open] { border-color: #2f5a37; }
.tail summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 9.5rem minmax(9rem, 1.2fr) 8.5rem minmax(10rem, 1.6fr) minmax(7rem, 1fr) 1.2rem; align-items: center; gap: .4rem 1rem; padding: .85rem 1rem; min-height: 56px; }
.tail summary::-webkit-details-marker { display: none; }
.tail summary::after { content: ""; width: .6rem; height: .6rem; border-right: 2px solid var(--nvg); border-bottom: 2px solid var(--nvg); transform: rotate(45deg); justify-self: end; transition: transform .3s var(--ease); }
.tail details[open] summary::after { transform: rotate(-135deg); }
.tail summary:hover .tn { color: #b6ff9f; }
.tail .tn { font-size: 1.12rem; color: var(--nvg); }
.tail .models { color: var(--text); font-size: .95rem; }
.tail .where, .tail .unit { color: var(--muted); font-size: .9rem; }
.chip.fate-lost, .chip.fate-on-display, .chip.fate-retired { display: inline-flex; justify-self: start; align-items: center; padding: .15rem .55rem; border-radius: 999px; font: 500 .74rem var(--mono); letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.chip.fate-lost { background: var(--scarf); color: #fff; }
.chip.fate-on-display { background: var(--nvg); color: #020403; }
.chip.fate-retired { background: #3b4540; color: #eef3ef; }
.tail-body { padding: .2rem 1.1rem 1.2rem; border-top: 1px solid var(--line); }
.tail-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem 1.2rem; margin: 1rem 0; }
.tail-facts div.wide { grid-column: 1 / -1; }
.tail-facts dt { font: 500 .72rem var(--mono); letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-bottom: .2rem; }
.tail-facts dd { margin: 0; }
.prose ul.ops { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.ops li { margin: 0; padding: .15rem .6rem; border: 1px solid var(--field); border-radius: 999px; font-size: .88rem; }
.tl { display: grid; gap: .2rem; }
.tl-row { display: grid; grid-template-columns: 7.5rem 1fr; gap: 1rem; padding: .7rem 0; border-top: 1px dashed var(--line); }
.tl-row h4 { margin: 0; font: 500 .9rem var(--mono); color: var(--nvg); letter-spacing: .04em; }
.tl-row p { margin: 0 0 .4rem; }
.tl-row ul { margin: 0 0 .4rem; }
.wall-link { margin: 1rem 0 0; display: flex; align-items: center; gap: .3rem; flex-wrap: wrap; }
@media (max-width: 900px) {
  .tail summary { grid-template-columns: 1fr auto 1.2rem; grid-template-areas: "tn chip arrow" "models models models" "where where where"; }
  .tail .tn { grid-area: tn; } .tail .chip { grid-area: chip; } .tail summary::after { grid-area: arrow; }
  .tail .models { grid-area: models; } .tail .where { grid-area: where; } .tail .unit { display: none; }
  .tl-row { grid-template-columns: 1fr; gap: .3rem; }
}

/* ---------- sortable lineage tables ---------- */
.sort-hint { font-size: .9rem; color: var(--muted); margin: -.3rem 0 1rem; }
th .sort-btn { display: inline-flex; align-items: center; gap: .35rem; min-height: 32px; padding: .15rem .25rem; margin: -.15rem -.25rem; background: none; border: 0; color: inherit; font: inherit; letter-spacing: inherit; text-transform: inherit; cursor: pointer; border-radius: 3px; }
th .sort-btn:hover { color: #b6ff9f; }
th .sort-btn svg { width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2.5; opacity: .45; }
th[aria-sort] .sort-btn svg { opacity: 1; }
th[aria-sort="ascending"] .sort-btn .down, th[aria-sort="descending"] .sort-btn .up { opacity: 0; }
th[aria-sort] { background: #163322; }

/* ---------- hub pages (Personnel Lineages): one column centered on the page, text left-aligned ---------- */
.page-head.centered .wrap > * { max-width: 820px; margin-inline: auto; }
.page-head.centered .lead { max-width: 820px; }
.prose.hub { max-width: 820px; margin-inline: auto; }
.prose.hub .lineage-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); padding: 0; margin: 0 0 2.5rem; }
.lineage-cards .plate { padding: 1.2rem 1rem; }
@media (max-width: 760px) { .prose.hub .lineage-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- flag officers ---------- */
.prose.hub .note { margin: 0 0 2rem; }
.fo-group { margin: 0 0 2.2rem; }
.fo-group h2 { display: flex; align-items: center; flex-wrap: wrap; gap: .6rem; margin: 0 0 .9rem; padding-bottom: .5rem; border-bottom: 1px solid var(--line); }
.fo-stars { display: inline-flex; gap: .2rem; }
.fo-stars svg { width: 1.05rem; height: 1.05rem; fill: #e9edf0; filter: drop-shadow(0 0 4px rgba(255, 255, 255, .25)); }
.fo-count { font: 500 1rem var(--mono); color: var(--muted); }
.prose ul.fo-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .6rem; }
.fo-list li { margin: 0; display: flex; align-items: center; justify-content: space-between; gap: .8rem; padding: .7rem .95rem; background: var(--panel2); border: 1px solid var(--line); border-left: 3px solid var(--scarf); border-radius: var(--radius); }
.fo-name { font-weight: 600; color: #f2fbf2; }
.fo-pilot { font-size: .85rem; white-space: nowrap; display: inline-flex; align-items: center; min-height: 24px; }
.fo-note { color: var(--muted); }
