/* Light theme (preview v2, Sam 2026-11-19: "it should be a light theme, not black with a little white").
   Everything is light: white pages, white menu bar, light-grey footer and closing bands. The photos are shown
   as framed pictures under each page's headline instead of dark backgrounds behind white text. Only the
   image lightbox and labels laid directly over a photo stay dark. Removing the <link> to this file (and the
   white theme-color meta) restores the dark site. */

/* ── Light tokens for the page body ── */
:root {
  --ink:      #ffffff;
  --ink-2:    #f5f6f8;
  --slab:     #eef0f3;
  --line:     #e2e5ea;
  --line-2:   #d3d7de;
  --graph:    #687080;
  --fog:      #4b5260;
  --bone:     #14171c;
  --paper:    #f2f4f7;
  --white:    #0b0d11;
  --muted-2:  #3b414c;
  --text:     var(--bone);
  /* The brand blue and ember were tuned for black; a deeper shade reads on white (5.3:1 and 5.1:1). */
  --signal:   #17739f;
  --ember:    #c2330f;
}
html, body { background: #ffffff; color: var(--bone); }

/* ── Only the image viewer and labels laid over a photo stay dark ── */
.lightbox, .family-frame .label-strip {
  --ink:      #0a0a0a;
  --ink-2:    #111112;
  --slab:     #16161a;
  --line:     #242426;
  --line-2:   #2c2c30;
  --graph:    #8a8a90;
  --fog:      #a8a8ad;
  --bone:     #eceae4;
  --paper:    #f4f2ec;
  --white:    #ffffff;
  --muted-2:  #c9c7c1;
  --signal:   #2ea8dc;
  --ember:    #d93a12;
  color: var(--bone);
}
.lightbox { background-color: #0a0a0a; }

/* ── Page openers: headline on white, then the photo as a framed picture underneath ── */
.hero, .hero.short { min-height: 0; background: #ffffff; }
.hero-inner { order: 1; flex: none; padding-top: 150px; padding-bottom: 56px; }
.hero-bg {
  order: 2; position: relative; inset: auto; z-index: 2;
  height: clamp(240px, 46vh, 560px);
  margin: 0 max(48px, calc((100% - 1680px) / 2)) 80px;
  border-radius: 6px; overflow: hidden;
  transform: none; animation: none;
}
.hero-bg::after { display: none; }
.hero h1 { color: #0b0d11; }
.hero h1 .light { color: #7b8494; }
.hero-bottom { border-top-color: var(--line); }
@media (max-width: 1100px) {
  .hero-bg { margin: 0 24px 56px; height: clamp(200px, 38vh, 420px); }
  .hero-inner { padding-top: 120px; padding-bottom: 40px; }
}

/* ── Closing "Talk to the team" bands: light grey, no background photo ── */
.closing { background: #eaf2f7; border-top: 1px solid #d6e4ee; }
.closing-inner { max-width: none; }
.closing .btn.primary { background: var(--signal); border-color: var(--signal); color: #ffffff; }
.closing .btn.primary:hover { background: #0e5f87; border-color: #0e5f87; }
.closing-bg { display: none; }

/* ── Grey "paper" bands keep dark text ── */
.kc { --ink: #0b0d11; }
.kc .chain { border-top-color: var(--line-2); border-bottom-color: var(--line-2); }
.knode:hover { background: #e8ebf0; }
@media (max-width: 680px) {
  .knode { border-right: 0; border-bottom: 1px solid rgba(10,20,40,0.10); }
  .knode:last-child { border-bottom: 0; }
}

/* ── Top bar: solid white with the dark logo ── */
.topbar, .topbar.scrolled {
  background: #ffffff;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
  border-bottom: 1px solid var(--line);
}
.topbar { padding: 16px 0; }
.brand .sep { background: rgba(10,20,40,0.2); }
.nav a { color: #1b1f26; }
.nav a:hover, .nav a.active { color: #000; }
.nav .drop-inner a.active, .nav .drop-inner a.active:hover { color: var(--signal); }
.nav .cta, .nav a.cta, .nav .cta:hover { color: #ffffff; }
.nav .cta { box-shadow: 0 0 0 1px var(--signal), 0 4px 16px rgba(23,115,159,0.22); }
.nav .cta:hover { background: #0e5f87; box-shadow: 0 0 0 1px #0e5f87, 0 6px 20px rgba(23,115,159,0.3); }
.nav-toggle { border-color: rgba(10,20,40,0.25); color: #1b1f26; }
.drop-inner { background: #ffffff; box-shadow: 0 18px 40px rgba(10,20,40,0.12); }
.drop-inner a:hover { background: #f2f4f7; }
@media (max-width: 900px) {
  /* Phone menu: one solid white panel, sub-items as a flat indented list */
  .nav.open { background: #ffffff; backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: 0 16px 32px rgba(10,20,40,0.10); }
  .drop-inner { background: transparent; box-shadow: none; border: 0; }
  .drop-inner a:hover { background: transparent; }
  /* Larger tap targets: each link is about 40 px tall; the gaps shrink so the panel stays compact */
  .nav.open { gap: 0; }
  .nav.open a:not(.cta) { display: inline-block; padding: 10px 0; }
  .nav.open .drop-menu { padding-top: 0; }
  .nav.open .drop-inner { gap: 0; }
  .nav.open a.active::after { bottom: 4px; }
  .nav.open .cta { margin-top: 12px; }
}

/* ── Buttons ── */
.btn { border-color: rgba(10,20,40,0.22); }
.btn.primary { background: #14171c; color: #ffffff; border-color: #14171c; }
.btn:hover { background: #eef0f3; color: #0b0d11; border-color: #14171c; }
.btn.primary:hover { background: #2c323b; color: #ffffff; border-color: #2c323b; }
.btn.signal, .btn.signal:hover { color: #ffffff; }
.btn.signal:hover { background: #0e5f87; border-color: #0e5f87; }

/* ── Cards and grids: light grey cards so they read as cards on white ── */
.p-card, .list-cell { background: #f7f8fa; }
.p-card:hover, .list-cell:hover { background: #eef0f3; }
.p-card .p-foot { border-top-color: rgba(10,20,40,0.1); }
/* Price and link rows wrap as whole items: a long price pushes the link onto its own line
   instead of breaking "Get details ->" or "Available now" in two */
.p-card .p-foot { flex-wrap: wrap; gap: 8px 20px; align-items: baseline; }
.p-card .p-foot > a, .p-card .p-foot .ph { white-space: nowrap; }
/* The gap spaces two links on one line; the inline left margin on the home cards would indent a wrapped one */
.p-card .p-foot > a + a { margin-left: 0 !important; }
.list-grid { background: transparent; border: 0; gap: 10px; }
.list-cell { border-radius: 4px; }

/* ── Hard-coded dark-theme lines and fills in main.css, redone for white ── */
.sec-cap .bar { background: rgba(10,20,40,0.14); }
.datatable tbody tr:hover { background: rgba(10,20,40,0.025); }
.bo-node::before { background: rgba(10,20,40,0.12); }
.bo-node::after { background: #e6e9ee; border-color: rgba(10,20,40,0.2); }
.bo-title { color: #14171c; }
.bo-status.done { color: #1a7f45; }
.bo-status.done i { background: #1a7f45; }
/* The "Elevated" band colour on the services page is set inline in amber for black */
.market-cell .v[style*="#e8a500"] { color: #9a6b00 !important; }

/* ── Forms: visible fields on white ── */
.form-field input, .form-field select, .form-field textarea { background: #ffffff; border-color: #8a93a3; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus { border-color: var(--signal); box-shadow: 0 0 0 3px rgba(23,115,159,0.18); }
/* Status lines under the forms: the page scripts colour them for black (#7fd48a / #e07a6a) */
[role="status"][style*="rgb(127, 212, 138)"] { color: #1e7a3a !important; }
[role="status"][style*="rgb(224, 122, 106)"] { color: #b3261e !important; }

/* ── Dark accents for contrast (Sam, 2026-11-19: "keep some dark as needed to give some contrast") ──
   The footer anchors every page, and the statement bands (company mission, press boilerplate) are set
   white on near-black. Same dark palette as the original site. */
footer, .manifest {
  --ink:      #0d1015;
  --ink-2:    #13171d;
  --slab:     #181c23;
  --line:     #262b33;
  --line-2:   #30363f;
  --graph:    #8f96a3;
  --fog:      #aab0bb;
  --bone:     #eceae4;
  --white:    #ffffff;
  --muted-2:  #c9c7c1;
  --signal:   #4cb6e6;
  --ember:    #e0623a;
  color: var(--bone);
}
footer { background: #0d1015; border-top: 0; }
footer a:hover { color: #ffffff; }
.manifest { --ink: #eceae4; background: #0d1015; }
.manifest .sec-cap.dark .bar { background: rgba(255,255,255,0.15); }

/* ── v2 review fixes ── */

/* Framed opener photos: never move (the old parallax script writes an inline transform) */
.hero-bg { transform: none !important; }
.scroll-cue { display: none; }
/* Crops that cut off heads and product tops in the wide frame */
.hero-slides .hero-slide[style*="detect-operator"] { background-position: center 18% !important; }
.hero-bg[style*="detect-apron-dusk"] { background-position: center 28% !important; }
.hero-bg[style*="nds-lineup-dark"] { background-position: center 28% !important; }
.hero-bg[style*="about-team"] { background-position: center 27% !important; }

/* Opener size: let the framed photo show on the first screen */
@media (min-width: 1101px) {
  .hero-inner { padding-top: 128px; padding-bottom: 40px; }
  .hero h1 { font-size: clamp(56px, 7.4vw, 132px); margin-bottom: 36px; }
  .hero-meta { margin-bottom: 36px; }
  .hero-bg { height: clamp(220px, 40vh, 500px); }
  .hero-bottom > .hero-cta:last-child:nth-child(3) { grid-column: 4; }
}
/* Red underline sits behind the letters; on phones it follows each wrapped line */
.hero h1 .ul { isolation: isolate; }
.hero h1 .ul::after { z-index: -1; }
@media (max-width: 680px) {
  .hero h1 .ul { display: inline; text-decoration: underline var(--ember) 0.08em; text-underline-offset: 0.04em; text-decoration-skip-ink: none; }
  .hero h1 .ul::after { display: none; }
}

/* Radar animation: over the framed photo on home; to the right of the text on services; off on phones */
.hero-slides ~ .hero-canvas {
  inset: auto max(48px, calc((100% - 1680px) / 2)) 80px;
  /* A canvas does not stretch between left and right insets, so it gets the photo's width explicitly */
  width: calc(100% - 2 * max(48px, calc((100% - 1680px) / 2))); height: clamp(220px, 40vh, 500px); z-index: 3; border-radius: 6px;
}
.hero-canvas:not(.hero-slides ~ .hero-canvas) {
  opacity: .7;
  /* Fades in from the left and out at the bottom (the two masks intersect), so the sweep has no hard edge */
  -webkit-mask-image: linear-gradient(90deg, transparent 52%, #000 78%), linear-gradient(180deg, #000 70%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(90deg, transparent 52%, #000 78%), linear-gradient(180deg, #000 70%, transparent 100%);
  mask-composite: intersect;
}
@media (max-width: 1100px) { .hero-slides ~ .hero-canvas { inset: auto 24px 56px; width: calc(100% - 48px); height: clamp(200px, 38vh, 420px); } }
@media (max-width: 680px) { .hero-canvas { display: none; } }

/* Space after the opener and between sections */
.hero + section { border-top: 0; padding-top: 96px !important; }
section.protect[style*="padding-top:0"] { border-top: 0; }
@media (max-width: 680px) {
  .hero-bg { height: auto; aspect-ratio: 16 / 10; margin-bottom: 32px; }
  .hero + section { padding-top: 56px !important; }
  .protect, .kc, .market { padding-top: 88px; padding-bottom: 88px; }
  .closing { padding: 96px 0; }
  .chapter { padding-top: 56px; padding-bottom: 56px; }
  .list-cell { min-height: 0; }
  .hero-meta { flex-direction: column; align-items: flex-start; gap: 10px; margin-bottom: 32px; }
  .hero-meta .left { gap: 6px 16px; }
  .sec-cap { flex-wrap: wrap; gap: 6px 14px; margin-bottom: 40px; }
  .sec-cap > span { white-space: nowrap; }
  .sec-cap .bar { display: none; }
  .f-bottom { flex-direction: column; align-items: flex-start; gap: 14px; }
  .p-card { padding: 28px 20px 24px; }
  .p-card .datatable td { padding: 12px 8px; font-size: 14px; }
}
.f-bottom .st { white-space: nowrap; }
/* Very small phones (320 px): a long section title may wrap rather than run off the screen */
@media (max-width: 360px) { .sec-cap > span:not(.n):not(.bar) { white-space: normal; } }

/* Products: family cards three across on tablets; framed Station photo when stacked */
@media (min-width: 760px) and (max-width: 1100px) {
  #family .p-grid { grid-template-columns: repeat(3, 1fr); }
  #family .p-card { padding: 28px 20px; min-height: 0; }
}
@media (max-width: 1100px) { .split .s-img { margin: 0 24px; border-radius: 6px; overflow: hidden; } }

/* Press: the logo-on-dark sample reads as a framed tile, not a black band */
.p-card > div[style*="background:#000"] { background: #14171c !important; margin: 12px 12px 0; border-radius: 6px; }

/* Platform decision loop: one progress line only */
.chain.js::before, .chain.js::after { display: none; }

/* Small things: score boxes match the cards, menu hover, phone menu edge, text selection */
.market-strip .market-cell { background: #f7f8fa; }
.nav > a:not(.cta):hover, .nav-drop > a:hover { color: var(--signal); }
@media (max-width: 900px) { .nav.open { top: 100%; box-shadow: 0 18px 24px -12px rgba(10,20,40,0.16); } }
::selection { background: #cde4f1; color: #0b0d11; }

/* ── Nightglass umbrella (2026-11-19) ── */

/* Footer: brand block plus four link columns (Nightglass, Products, Services, Company). Wide screens keep one row;
   tablets put the brand on its own row above the four columns; phones show the columns two by two. */
footer .f-head:has(> :nth-child(5)) { grid-template-columns: minmax(0, 1.7fr) repeat(4, minmax(0, 1fr)); gap: 48px; }
@media (max-width: 1260px) { footer .f-head:has(> :nth-child(5)) { gap: 32px; } }
@media (max-width: 1100px) {
  footer .f-head:has(> :nth-child(5)) { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 24px; }
  footer .f-head:has(> :nth-child(5)) > :first-child { grid-column: 1 / -1; }
}
@media (max-width: 680px) { footer .f-head:has(> :nth-child(5)) { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 36px 20px; } }

/* Labels on AI-generated pictures: a solid dark tab in the corner, readable on a bright sky */
.img-note.ai {
  right: auto; max-width: calc(100% - 24px);
  padding: 8px 14px; border-top-right-radius: 4px;
  background: rgba(8, 10, 14, 0.8); color: #f2f3f5;
  font-size: 10.5px; letter-spacing: .12em; line-height: 1.45;
}

/* Concept-render labels on product pictures: full-strength text on a firmer dark band, readable on bright parts */
.img-note:not(.ai) { color: #f2f3f5; background: linear-gradient(rgba(5, 6, 8, 0.55), rgba(5, 6, 8, 0.86)); }

/* Home opener: the station concept keeps (nearly) its own 16:9 shape at every width and window height, so the whole
   station and the drone stay in view (a short, wide frame used to show only a slice of the enclosure) */
.hero-bg.ng-wide { height: auto !important; aspect-ratio: 16 / 8.6; background-size: cover; background-position: center 30%; }
/* How it works opener: keep the operators' heads and the air picture in the wide frame */
.hero-bg[style*="detect-swarm-picture"] { background-position: center 32%; }
/* Counter-swarm opener: a taller frame on wider screens so the drones in the sky and the ring around the site both show */
.hero-bg[style*="swarm-hero"] { background-position: center 38%; }
@media (min-width: 681px) { .hero-bg[style*="swarm-hero"] { height: auto !important; aspect-ratio: 16 / 6.4; } }

/* Nightglass Dome opener: the tall station concept stands beside the headline in a portrait frame */
@media (min-width: 1101px) {
  .hero.ng-portrait {
    display: grid; grid-template-columns: minmax(0, 1fr) clamp(300px, 30vw, 500px);
    column-gap: clamp(40px, 4vw, 72px); align-items: end;
    padding: 0 max(48px, calc((100% - 1680px) / 2));
  }
  .hero.ng-portrait .hero-inner { grid-column: 1; grid-row: 1; width: auto; margin: 0; padding-bottom: 80px; }
  .hero.ng-portrait .hero-bg { grid-column: 2; grid-row: 1; height: auto; aspect-ratio: 693 / 842; margin: 128px 0 80px; }
  .hero.ng-portrait .hero-bottom { grid-template-columns: 1fr 1fr; gap: 28px 40px; }
  .hero.ng-portrait .hero-bottom .lede { grid-column: 1 / -1; max-width: 56ch; }
  .hero.ng-portrait .hero-bottom .hero-cta { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; }
}
@media (max-width: 1100px) {
  .hero.ng-portrait .hero-bg { height: auto; aspect-ratio: 693 / 842; width: min(520px, calc(100% - 48px)); }
}

/* Four-item grids show two by two on tablets instead of one long column */
@media (min-width: 681px) and (max-width: 1100px) {
  .p-grid.tab-2, .list-grid.tab-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
/* Two pictures side by side (Dome settings), stacked on phones */
.shot-grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; width: 100%; }
.shot-grid.cols-2 img { height: auto; aspect-ratio: 16 / 9; }
@media (max-width: 900px) { .shot-grid.cols-2 { grid-template-columns: 1fr; } }
/* The legal line under the footer is longer now: keep a clear gap before the status tag */
.f-bottom { gap: 14px 40px; }

/* Nightglass Dome opener: the data-center setting with a drawn coverage dome (Sam, 2026-11-19: "it doesn't really look
   like a dome"). Thin lines, so it reads as awareness, not a shield. Quiet (teal) by default; every 12 s it turns Lit
   (amber) with the approaching drone marked, then quiet again. Static and quiet when motion is reduced. */
.hero-bg.ng-dome { height: auto !important; aspect-ratio: 16 / 9; background: #cfe3f3; }
.hero-bg.ng-dome > img, .hero-bg.ng-dome > svg { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero-bg.ng-dome > img { object-fit: cover; }
.dome-svg .dome-fill { fill: rgba(120, 240, 230, 0.10); stroke: none; animation: ngDomeFill 12s ease-in-out infinite; }
.dome-svg .dl { fill: none; stroke: #9ff7ee; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; animation: ngDome 12s ease-in-out infinite; }
.dome-svg .dl-o { stroke-width: 3.6; }
.dome-svg .dl-f { stroke-width: 2.8; }
.dome-svg .dl-r { opacity: .8; }
.dome-svg .dl-b { stroke-width: 1.6; stroke-dasharray: 6 9; opacity: .5; }
.dome-svg .st-dot { fill: #ffffff; stroke: #0b6f64; stroke-width: 3; }
.dome-svg .st-pulse { fill: none; stroke: #9ff7ee; stroke-width: 2; transform-box: fill-box; transform-origin: center; animation: ngPulse 2.8s ease-out infinite; }
.dome-svg .track { opacity: 0; animation: ngTrack 12s ease-in-out infinite; }
.dome-svg .track path { fill: none; stroke: #ffbe55; stroke-width: 3.5; }
.dome-svg .track text { font: 600 20px 'JetBrains Mono', ui-monospace, monospace; letter-spacing: .12em; fill: #ffffff; paint-order: stroke; stroke: #2a1a00; stroke-width: 5px; }
.dome-state { position: absolute; top: 14px; left: 14px; display: grid; font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; background: rgba(5, 6, 8, 0.74); color: #ffffff; padding: 6px 10px; border-radius: 3px; }
.dome-state > span { grid-area: 1 / 1; }
.dome-state .q { color: #9ff7ee; animation: ngQuiet 12s ease-in-out infinite; }
.dome-state .l { color: #ffbe55; opacity: 0; animation: ngTrack 12s ease-in-out infinite; }
@keyframes ngDome { 0%, 52%, 100% { stroke: #9ff7ee; } 60%, 90% { stroke: #ffbe55; } }
@keyframes ngDomeFill { 0%, 52%, 100% { fill: rgba(120, 240, 230, 0.10); } 60%, 90% { fill: rgba(255, 170, 60, 0.12); } }
@keyframes ngTrack { 0%, 54%, 100% { opacity: 0; } 60%, 90% { opacity: 1; } }
@keyframes ngQuiet { 0%, 54%, 100% { opacity: 1; } 60%, 90% { opacity: 0; } }
@keyframes ngPulse { 0% { transform: scale(1); opacity: .9; } 100% { transform: scale(3.2); opacity: 0; } }
@media (prefers-reduced-motion: reduce) {
  .dome-svg .dl, .dome-svg .dome-fill, .dome-svg .track, .dome-state .q, .dome-state .l { animation: none; }
  .dome-svg .st-pulse { display: none; }
}
@media (max-width: 680px) { .dome-svg .track text { display: none; } .dome-state { top: 8px; left: 8px; font-size: 10px; } }
/* Section 01: the uncut station picture beside the Quiet and Lit cards */
.ng-station-row { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.ng-station-row .ng-states { grid-template-columns: 1fr; margin-top: 0; }
.ng-station { margin: 0; }
.ng-station img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; display: block; border-radius: 6px; border: 1px solid var(--line-2); }
.ng-station figcaption { font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--fog); margin-top: 10px; }
.ng-station figcaption b { color: var(--signal); font-weight: 500; }
@media (max-width: 1000px) { .ng-station-row { grid-template-columns: 1fr; } }
/* Phones: the dome illustration is small, so its caption sits under the frame instead of over the picture */
@media (max-width: 680px) {
  .hero-bg.ng-dome { overflow: visible; margin-bottom: 84px; }
  .hero-bg.ng-dome > img, .hero-bg.ng-dome > svg { border-radius: 6px; }
  .hero-bg.ng-dome .img-note { top: calc(100% + 8px); bottom: auto; left: 0; right: 0; background: none; color: var(--fog); padding: 0; white-space: normal; line-height: 1.5; }
}
/* Dome lines keep a fixed on-screen thickness, so they stay visible on phones too */
.dome-svg .dl { vector-effect: non-scaling-stroke; stroke-width: 2px; }
.dome-svg .dl-o { stroke-width: 2.8px; }
.dome-svg .dl-f { stroke-width: 2.4px; }
.dome-svg .dl-b { stroke-width: 1.3px; }

/* ── Tighter vertical rhythm (Sam's communications director, 2026-11-20: "a lot of white space between sections").
   Section padding is cut by about half, opener and heading gaps by about 40%. Scoped to body:not(.ng): only the closed
   nightglass.html keeps its own look (the Site Assessment page joined the site's layout on 2026-11-29). ── */
body:not(.ng) .protect, body:not(.ng) .market, body:not(.ng) .kc { padding-top: 72px; padding-bottom: 72px; }
body:not(.ng) .math { padding: 80px 0 72px; }
body:not(.ng) .band { padding: 64px 0; }
body:not(.ng) .manifest { padding: 96px 0; }
body:not(.ng) .closing { padding: 96px 0; }
body:not(.ng) .chapter { padding: 56px 0; }
body:not(.ng) .family { padding-top: 72px; }
body:not(.ng) footer { padding-top: 72px; }
body:not(.ng) .hero + section { padding-top: 56px !important; }
body:not(.ng) .hero-inner { padding-bottom: 40px; }
body:not(.ng) .hero-bg { margin-bottom: 56px; }
body:not(.ng) .sec-cap { margin-bottom: 40px; }
body:not(.ng) .sec-head { margin-bottom: 48px; }
body:not(.ng) section.protect[style*="padding:110px"] { padding: 64px 0 !important; }
@media (max-width: 1100px) {
  body:not(.ng) .hero-bg { margin-bottom: 40px; }
  body:not(.ng) .sec-head { gap: 28px; }
}
@media (max-width: 680px) {
  body:not(.ng) .protect, body:not(.ng) .market, body:not(.ng) .kc { padding-top: 48px; padding-bottom: 48px; }
  body:not(.ng) .math { padding: 64px 0 60px; }
  body:not(.ng) .band { padding: 56px 0; }
  body:not(.ng) .manifest { padding: 72px 0; }
  body:not(.ng) .closing { padding: 64px 0; }
  body:not(.ng) .chapter { padding: 40px 0; }
  body:not(.ng) .family { padding-top: 60px; }
  body:not(.ng) footer { padding-top: 56px; }
  body:not(.ng) .hero + section { padding-top: 40px !important; }
  body:not(.ng) .sec-cap { margin-bottom: 28px; }
  body:not(.ng) .sec-head { margin-bottom: 32px; }
  body:not(.ng) section.protect[style*="padding:110px"] { padding: 44px 0 !important; }
}
@media (max-width: 680px) { body:not(.ng) .hero-bg.ng-dome { margin-bottom: 84px; } }
/* Cards: no fixed minimum height where they stack (side-by-side cards still match each other's height) */
body:not(.ng) .p-card { min-height: 300px; }
@media (max-width: 1100px) { body:not(.ng) .p-card { min-height: 0; } }
@media (max-width: 680px) { body:not(.ng) .p-card .p-foot { margin-top: 24px; } }

/* ── Moving openers (comms director, 2026-11-20: liked the moving background at the top of the landing page and the
   other pages). Inside each framed opener picture: a slow zoom-and-drift; on the home page the pictures cross-fade
   every 6 s with the tracking radar over them. Nothing moves when the visitor asks for reduced motion; body.ng (only the
   closed nightglass.html) is left out. ── */
@media (prefers-reduced-motion: no-preference) {
  body:not(.ng) .hero-bg:not(.hero-slides):not(.ng-dome)::before {
    content: ""; display: block; position: absolute; inset: 0; z-index: 0;
    background: inherit; border-radius: inherit;
    transform-origin: 50% 45%; will-change: transform;
    animation: ngDrift 28s ease-in-out infinite alternate;
  }
  body:not(.ng) .hero-bg.ng-dome > img, body:not(.ng) .hero-bg.ng-dome > svg {
    transform-origin: 50% 60%; will-change: transform;
    animation: ngDrift 32s ease-in-out infinite alternate;
  }
  body:not(.ng) .hero-slides .hero-slide.on { animation: ngSlide 7.5s ease-out forwards; }
}
@keyframes ngDrift { from { transform: scale(1.02) translate(0, 0); } to { transform: scale(1.1) translate(-1.6%, -1.2%); } }
@keyframes ngSlide { from { transform: scale(1.09); } to { transform: scale(1.01); } }
body:not(.ng) .hero-bg > .img-note, body:not(.ng) .hero-bg > .dome-state { z-index: 3; }
/* Home: the station picture first (whole station and drone in view), then the two settings */
.hero-slides.ng-wide .hero-slide:first-child { background-position: center 30%; }
/* Home: the radar sits inside the picture frame, over the slides */
.hero-bg.hero-slides > .hero-canvas.in-frame {
  position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none;
  opacity: .9; -webkit-mask-image: none; mask-image: none; border-radius: inherit;
}

/* ── Counter-swarm illustration (swarm.html section 04; Sam 2026-11-21: "We need better images. Use Higgsfield."): an
   AI-generated picture of a site ringed by linked stations and three groups of drones from different directions (one
   faint, with no radio link), framed, with HTML/SVG labels and rank badges placed over the things they name (the SVG
   shares the picture's 1920x1086 grid). Static. Labels are 29 grid units (about 15.7px at the 1038px desktop figure);
   below 960px (tablets and phones) they would shrink under 13px, so they are hidden there and the legend under the
   picture says the same, with the rank badges enlarged. ── */
.swarm-fig { margin: 0 auto; max-width: 1040px; }
.swarm-fig .sf-frame { position: relative; border: 1px solid var(--line-2); border-radius: 8px; overflow: hidden; background: #f3f6f9; }
.swarm-fig .sf-frame img { display: block; width: 100%; height: auto; aspect-ratio: 1920 / 1086; }
.swarm-fig .sf-over { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.swarm-fig .sf-rank rect { fill: #0b0d11; }
.swarm-fig .sf-rank text { font: 600 26px 'JetBrains Mono', ui-monospace, monospace; fill: #ffffff; }
.swarm-fig .sf-lab { font: 500 29px 'JetBrains Mono', ui-monospace, monospace; letter-spacing: .1em; fill: #3a414d; paint-order: stroke; stroke: #f3f6f9; stroke-width: 10px; stroke-linejoin: round; }
.swarm-fig .sf-site-t { letter-spacing: .2em; }
.swarm-fig .sf-teal { fill: #0b6f64; }
.swarm-fig figcaption { margin-top: 16px; }
.sf-legend { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 32px; font-size: 14px; line-height: 1.5; color: var(--fog); }
.sf-legend li { display: flex; align-items: center; gap: 12px; }
.sf-legend .k { flex: none; width: 18px; height: 18px; border-radius: 50%; display: inline-grid; place-items: center; }
.sf-legend .k.st { background: #ffffff; border: 3px solid #0b6f64; }
.sf-legend .k.trk { background: #c2330f; width: 12px; height: 12px; margin: 3px; }
.sf-legend .k.silent { background: #ffffff; border: 2px dashed #c2330f; }
.sf-legend .k.rank { border-radius: 4px; background: #0b0d11; color: #ffffff; font: 600 11px var(--mono); }
.swarm-fig .sf-note { display: block; margin-top: 12px; font-family: var(--mono); font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--graph); }
@media (max-width: 960px) {
  .swarm-fig .sf-labels { display: none; }
  /* The picture renders at about 0.35-0.5 scale on a tablet: enlarge the rank badges (each scales about its own
     centre, the origin of its group) so the numbers stay readable. */
  .swarm-fig .sf-rank rect, .swarm-fig .sf-rank text { transform-origin: 0 0; scale: 1.5; }
}
@media (max-width: 680px) {
  /* About 0.19 scale on a phone: enlarge the badges further. */
  .swarm-fig .sf-rank rect, .swarm-fig .sf-rank text { scale: 2.2; }
  .sf-legend { grid-template-columns: 1fr; }
}
/* Nightglass Dome, section 02 "Built for swarms": the AI-generated swarm picture, framed, full width of the text. */
.ng-swarm-fig { margin: 8px 0 40px; }
/* In-page anchors (#swarm, #answer, #dome...) land below the fixed menu bar, not under it. */
body:not(.ng) section[id] { scroll-margin-top: 80px; }
