/* Kill Chain Simulator (was FiST Trainer) — styles. The Fires Lab, Catherine Lake Creations LLC. */
/* Fonts: the course's bundled files (site), or fonts/ beside the page (artifact preview). */
@font-face {
  font-family: 'Barlow Condensed'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('../../css/fonts/barlow-condensed-latin-500-normal.woff2') format('woff2'), url('../fonts/barlow-condensed-latin-500-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Barlow Condensed'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('../../css/fonts/barlow-condensed-latin-ext-500-normal.woff2') format('woff2'), url('../fonts/barlow-condensed-latin-ext-500-normal.woff2') format('woff2');
  unicode-range: U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Barlow Condensed'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../../css/fonts/barlow-condensed-latin-600-normal.woff2') format('woff2'), url('../fonts/barlow-condensed-latin-600-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Barlow Condensed'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../../css/fonts/barlow-condensed-latin-ext-600-normal.woff2') format('woff2'), url('../fonts/barlow-condensed-latin-ext-600-normal.woff2') format('woff2');
  unicode-range: U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Source Sans 3'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../../css/fonts/source-sans-3-latin-400-normal.woff2') format('woff2'), url('../fonts/source-sans-3-latin-400-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Source Sans 3'; font-style: normal; font-weight: 400; font-display: swap;
  src: url('../../css/fonts/source-sans-3-latin-ext-400-normal.woff2') format('woff2'), url('../fonts/source-sans-3-latin-ext-400-normal.woff2') format('woff2');
  unicode-range: U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'Source Sans 3'; font-style: italic; font-weight: 400; font-display: swap;
  src: url('../../css/fonts/source-sans-3-latin-400-italic.woff2') format('woff2'), url('../fonts/source-sans-3-latin-400-italic.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Source Sans 3'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../../css/fonts/source-sans-3-latin-600-normal.woff2') format('woff2'), url('../fonts/source-sans-3-latin-600-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'Source Sans 3'; font-style: normal; font-weight: 600; font-display: swap;
  src: url('../../css/fonts/source-sans-3-latin-ext-600-normal.woff2') format('woff2'), url('../fonts/source-sans-3-latin-ext-600-normal.woff2') format('woff2');
  unicode-range: U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('../../css/fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2'), url('../fonts/ibm-plex-mono-latin-500-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: 'IBM Plex Mono'; font-style: normal; font-weight: 500; font-display: swap;
  src: url('../../css/fonts/ibm-plex-mono-latin-ext-500-normal.woff2') format('woff2'), url('../fonts/ibm-plex-mono-latin-ext-500-normal.woff2') format('woff2');
  unicode-range: U+0100-024F,U+0259,U+1E00-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
/* Layout: full-bleed 3D terrain; exercise banner across the top (clock, timeline, view, panel toolbar); draggable control panels; readout strip bottom. Single dark look on purpose (a viewport, not a document). */
:root {
  --ground: #11140f;
  --panel: rgba(18, 22, 16, 0.88);
  --line: #3a4232;
  --ink: #e6e9df;
  --dim: #a3ab96;
  --brass: #d6b25a;      /* grid lines, active control */
  --friend: #6fb4ff;     /* friendly positions */
  --enemy: #ff6a55;      /* enemy routes */
  --font-head: "Barlow Condensed", "Arial Narrow", sans-serif;
  --font-body: "Source Sans 3", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  color-scheme: dark;
}
html, body { height: 100%; }
body { background: var(--ground); color: var(--ink); font-family: var(--font-body); overflow: hidden; }
#view { position: fixed; inset: 0; display: block; width: 100%; height: 100%; touch-action: none; }
#labels { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
/* map labels, one style for everything (Lee, 2026-11-02): uppercase condensed, coloured by side, no box — a dark
   halo keeps them readable over the photo. Canvas-drawn labels (launch points, UAS, firing units) match it. */
.tag { position: absolute; transform: translate(-50%, -130%); white-space: nowrap;
  font: 700 13px var(--font-head); letter-spacing: .06em; text-transform: uppercase; padding: 0;
  text-shadow: 0 0 2px rgba(5, 8, 6, .95), 0 0 4px rgba(5, 8, 6, .9), 0 1px 2px #000; }
.tag.op { color: var(--friend); }
#symlabels { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.tag.symtag { color: var(--friend); transform: translate(-50%, 0); }   /* under a unit or UAS symbol (top = symbol's foot) */
/* Map view grid margins (2026-11-11): line numbers along the screen edges, like a printed map's neatline */
#mapgrid { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
#mapgrid .gl { position: absolute; font: 700 14px var(--font-head); letter-spacing: .04em; color: var(--brass);
  font-variant-numeric: tabular-nums; white-space: nowrap;
  text-shadow: 0 0 2px rgba(5, 8, 6, .95), 0 0 4px rgba(5, 8, 6, .9), 0 1px 2px #000; }
#mapgrid .gl.top { transform: translate(-50%, 0); }
#mapgrid .gl.bot { transform: translate(-50%, -100%); }
#mapgrid .gl.left { transform: translate(0, -50%); }
#mapgrid .gl.right { transform: translate(-100%, -50%); }
#mapgrid .gzd { position: absolute; left: 34px; font: 600 12px var(--font-mono); letter-spacing: .04em; color: var(--brass);
  background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 3px 8px; white-space: pre; }
#mapgrid .gzd:empty { display: none; }
.tag.rt { color: var(--enemy); transform: translate(-50%, -50%); width: auto; margin: 0; }   /* width, margin: not the .rt table's */
h1 { margin: 0; font-family: var(--font-head); font-weight: 600; font-size: 22px; letter-spacing: .04em; text-transform: uppercase; text-wrap: balance; }
.meta { margin: 0; font-size: 13px; line-height: 1.45; color: var(--dim); }
.row { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.lbl { font-family: var(--font-head); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); min-width: 92px; }
button {
  font: 500 12px var(--font-mono); color: var(--ink); background: transparent;
  border: 1px solid var(--line); border-radius: 4px; padding: 4px 9px; cursor: pointer;
}
button[aria-pressed="true"] { border-color: var(--brass); color: var(--brass); }
button:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.ops { display: grid; gap: 4px; }
.ops button { display: flex; justify-content: space-between; gap: 10px; text-align: left; font-variant-numeric: tabular-nums; }
.ops button span:first-child { color: var(--friend); }
.ops button span:last-child { color: var(--dim); }
.key { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--dim); }
.sw { display: inline-block; width: 18px; height: 3px; vertical-align: middle; margin-right: 6px; }
.readout {
  position: fixed;
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  left: max(16px, env(safe-area-inset-left, 0px));
  right: max(16px, env(safe-area-inset-right, 0px));
  display: flex; flex-wrap: wrap; gap: 6px 18px;
  font: 500 13px var(--font-mono); font-variant-numeric: tabular-nums; pointer-events: none;
}
.readout > span { background: var(--panel); border: 1px solid var(--line); border-radius: 4px; padding: 4px 8px; }
.readout b { font-weight: 500; color: var(--brass); margin-right: 6px; font-family: var(--font-head); letter-spacing: .08em; }
.hint { font-size: 12px; color: var(--dim); margin: 0; }
.ops .oprow { display: grid; grid-template-columns: 1fr auto; gap: 4px; }
.ops .stand { color: var(--brass); }
#obsbar[hidden], #binos[hidden], #reticle[hidden], .win[hidden] { display: none; }
#obsbar { position: fixed; top: calc(var(--tb-h, 56px) + 10px); right: max(16px, env(safe-area-inset-right, 0px));
  display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: flex-end; max-width: min(500px, calc(100% - 32px));
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px; padding: 8px 10px; }
#obsbar .where { font: 600 14px var(--font-head); letter-spacing: .06em; text-transform: uppercase; color: var(--friend); margin-right: 6px; }
#obsbar [hidden] { display: none !important; }
#quadzoom { display: inline-flex; gap: 6px; }
#quadzoom[hidden] { display: none; }
#camctl { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
#obsbar .camseg { display: inline-flex; border: 1px solid var(--line); border-radius: 14px; padding: 2px; }
#obsbar .camseg button { border: 0; border-radius: 11px; padding: 3px 12px; font-weight: 700; letter-spacing: .06em; background: transparent; }
#obsbar .camseg button[aria-pressed=true] { background: var(--ink); color: var(--panel); }
#obsbar .camfov { font: 500 12px var(--font-mono); color: var(--muted, var(--ink)); }
#obsbar .hint { flex-basis: 100%; text-align: right; font: 500 11px var(--font-mono); opacity: .75; }
#binos { position: fixed; inset: 0; pointer-events: none; }
#reticle { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
/* sUAS feed (Lee, 2026-11-16): symbology on the glass like the sim's POV — thin white lines, dark halo, no plates */
#quadhud[hidden], #quadhud [hidden] { display: none !important; }
#quadhud { position: fixed; inset: 0; pointer-events: none; color: #fff; font: 500 15px var(--font-mono); font-variant-numeric: tabular-nums;
  text-shadow: 0 0 2px #000, 0 0 4px #000; }
#quadhud .qh-br { position: absolute; left: 50%; top: 50%; width: min(300px, 60vw); transform: translate(-50%, -50%); overflow: visible; }
#quadhud .qh-br path { fill: none; stroke: #fff; stroke-width: 1.5; opacity: .85; filter: drop-shadow(0 0 1.5px #000); vector-effect: non-scaling-stroke; }
#quadhud .qh-read { position: absolute; top: calc(var(--tb-h, 56px) + 14px); left: max(18px, env(safe-area-inset-left, 0px)); display: grid; gap: 4px; opacity: .92; }
#quadhud .qh-read b { display: inline-block; width: 4.2em; font-weight: 600; letter-spacing: .08em; }
#quadhud .qh-read .low { color: #ffb347; }
#quadhud.nolink .qh-read { background: rgba(0,0,0,.6); padding: 6px 10px; margin: -6px -10px; }   /* over the snow: still readable, to fly it home */
#quadhud .qh-msg { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); font: 600 26px var(--font-mono); letter-spacing: .1em; text-align: center;
  background: rgba(0,0,0,.55); padding: 14px 26px; }
.vs { display: grid; gap: 6px; border-top: 1px solid var(--line); padding-top: 10px; }
.vs select { font: 500 12px var(--font-mono); color: var(--ink); background: var(--ground); border: 1px solid var(--line); border-radius: 4px; padding: 4px 6px; }
.vs select:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.cov { display: grid; gap: 3px; font: 500 12px var(--font-mono); font-variant-numeric: tabular-nums; }
.cov div { display: grid; grid-template-columns: 1fr 70px 40px; gap: 8px; align-items: center; }
.cov .nm { color: var(--enemy); font-family: var(--font-head); font-size: 13px; letter-spacing: .05em; text-transform: uppercase; }
.cov .bar { height: 6px; background: rgba(255,255,255,.08); border-radius: 3px; overflow: hidden; }
.cov .bar i { display: block; height: 100%; background: var(--brass); }
.cov .pc { text-align: right; }
.vkey { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; color: var(--dim); }
.fsec { display: grid; gap: 6px; border-top: 1px solid var(--line); padding-top: 9px; }
.fsec h3 { margin: 0; font-family: var(--font-head); font-weight: 600; font-size: 14px; letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.win input, .win select { font: 500 12px var(--font-mono); color: var(--ink); background: var(--ground); border: 1px solid var(--line); border-radius: 4px; padding: 4px 6px; min-width: 0; }
.win input:focus-visible, .win select:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.win .grid-in { flex: 1 1 150px; }
.win .row.split > select { flex: 1 1 0; }
.win .msg { font-size: 12px; color: var(--dim); min-height: 1.2em; margin: 0; }
.win .msg.bad { color: #ff9c8a; }
.win .msg.arm { color: var(--brass); }
.ulist { display: grid; gap: 4px; }
.urow { display: grid; grid-template-columns: 1fr auto auto; gap: 4px; align-items: center; font: 500 12px var(--font-mono); font-variant-numeric: tabular-nums; }
.urow .un { color: var(--friend); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.urow .ug { display: block; color: var(--dim); font-size: 11px; }
.urow button { padding: 2px 6px; }
/* Logbook (2026-11-15): same live format as the old Fires-window log, newest on top, in a floating panel.
   Sits bottom right above the dock, left of where the chat opens; drag the header to move it (JS sets left/top). */
#logbook { position: fixed; z-index: 29; right: max(366px, env(safe-area-inset-right, 0px)); bottom: calc(52px + env(safe-area-inset-bottom, 0px));
  width: min(560px, calc(100vw - 32px)); height: min(340px, calc(100vh - 140px)); min-width: 280px; min-height: 140px;
  display: flex; flex-direction: column; resize: both; overflow: hidden;
  background: rgba(18, 22, 16, 0.92); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.5); backdrop-filter: blur(3px); }
.log-h { padding: 6px 10px; cursor: move; user-select: none; touch-action: none; }
.log-h h2 { font-size: 14px; letter-spacing: .08em; }
#logbook-x { font: 700 14px var(--font-head); line-height: 1; padding: 2px 8px; color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 4px; cursor: pointer; }
#logbook-x:hover { border-color: var(--brass); color: var(--brass); }
@media (max-width: 960px) { #logbook { right: max(16px, env(safe-area-inset-right, 0px)); } }
@media (max-width: 640px) { #logbook { bottom: calc(92px + env(safe-area-inset-bottom, 0px)); } }
.flog { display: grid; align-content: start; gap: 3px; font: 500 12.5px var(--font-mono); font-variant-numeric: tabular-nums; overflow-y: auto; padding: 8px 12px 12px; flex: 1 1 auto; }
.flog div { display: grid; grid-template-columns: 64px 1fr; gap: 8px; }
.flog .t { color: var(--brass); }
.win .fire-btn { border-color: #c8402c; color: #ffb3a5; font-weight: 600; }
/* Quick fire armed (Fire on click): red reticle cursor, red screen frame, banner. Hard to miss on purpose. */
body.qf-armed #view { cursor: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32'%3E%3Cg fill='none' stroke-linecap='round'%3E%3Cg stroke='%23000' stroke-width='4' opacity='.6'%3E%3Ccircle cx='16' cy='16' r='10'/%3E%3Cpath d='M16 1v8M16 23v8M1 16h8M23 16h8'/%3E%3C/g%3E%3Cg stroke='%23ff4a32' stroke-width='2'%3E%3Ccircle cx='16' cy='16' r='10'/%3E%3Cpath d='M16 1v8M16 23v8M1 16h8M23 16h8'/%3E%3C/g%3E%3C/g%3E%3Ccircle cx='16' cy='16' r='1.6' fill='%23ff4a32'/%3E%3C/svg%3E") 16 16, crosshair; }
body.qf-armed::after { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 5; box-shadow: inset 0 0 0 3px rgba(255, 74, 50, .85), inset 0 0 40px rgba(255, 74, 50, .25); }
#qf-armed { position: fixed; left: 50%; transform: translateX(-50%); top: calc(var(--tb-h, 56px) + 10px); z-index: 30; display: flex; align-items: center; gap: 10px;
  background: rgba(120, 20, 10, .92); border: 1px solid #ff4a32; border-radius: 6px; padding: 6px 8px 6px 12px; color: #ffe1db;
  font: 600 13px var(--font-head, inherit); letter-spacing: .05em; text-transform: uppercase; box-shadow: 0 4px 16px rgba(0, 0, 0, .45); max-width: calc(100vw - 32px); }
#qf-armed[hidden] { display: none; }
#qf-armed .dot { width: 9px; height: 9px; border-radius: 50%; background: #ff4a32; animation: qfpulse 1s ease-in-out infinite; flex: none; }
#qf-armed button { background: #ffe1db; color: #5a0d05; border: 0; border-radius: 4px; padding: 4px 10px; font: 700 12px var(--font-head, inherit); letter-spacing: .05em; cursor: pointer; text-transform: uppercase; }
@keyframes qfpulse { 50% { opacity: .25; } }
@media (prefers-reduced-motion: reduce) { #qf-armed .dot { animation: none; } }
.win #qf-paint[aria-pressed="true"] { background: #c8402c; border-color: #ff4a32; color: #fff; }
#loading[hidden] { display: none; }
/* boot screen (2026-11-15): covers the page until buildings, streets and shaders are in; lines type out, OK when done */
#loading { position: fixed; inset: 0; z-index: 55; display: grid; place-items: center; padding: 16px;
  background: radial-gradient(ellipse at 50% 45%, #161c13 0%, #080a07 70%); transition: opacity .5s ease; }
#loading.out { opacity: 0; pointer-events: none; }
.bt-card { width: min(440px, 100%); display: grid; gap: 14px; }
.bt-title { font: 700 22px var(--font-head); letter-spacing: .14em; text-transform: uppercase; color: var(--brass);
  padding-bottom: 8px; border-bottom: 1px solid var(--line); }
#bt-log { min-height: 13em; font: 500 13px/1.75 var(--font-mono); color: var(--dim); white-space: pre; overflow: hidden; }
#bt-log .ok { color: #8fd08a; font-weight: 600; }
#bt-log .bt-ready { color: var(--brass); font-weight: 600; }
.bt-cur { display: inline-block; width: .6em; height: 1.05em; margin-left: 2px; vertical-align: -.15em; background: var(--brass); animation: btblink 1s steps(1) infinite; }
@keyframes btblink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .bt-cur { animation: none; } #loading { transition: none; } }
@media (max-width: 380px) { #bt-log { font-size: 11.5px; } }
/* ---- exercise banner ---- */
#topbar { position: fixed; top: 0; left: 0; right: 0; z-index: 20;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px;
  padding: calc(8px + env(safe-area-inset-top, 0px)) max(16px, env(safe-area-inset-right, 0px)) 8px max(16px, env(safe-area-inset-left, 0px));
  background: rgba(14, 18, 13, .94); border-bottom: 1px solid var(--line); backdrop-filter: blur(4px); }
.tb-name { font: 600 15px var(--font-head); letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; }
.tb-clock, .tb-right { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tb-right { margin-left: auto; }
.tb-right[hidden] { display: none; }
.seg { display: inline-flex; }
.seg button { border-radius: 0; margin-left: -1px; }
.seg button:first-child { border-radius: 4px 0 0 4px; margin-left: 0; }
.seg button:last-child { border-radius: 0 4px 4px 0; }
.seg button[aria-pressed="true"] { position: relative; z-index: 1; background: rgba(214, 178, 90, .12); }
.tb-play { min-width: 64px; }
.tb-play[aria-pressed="false"] { border-color: #c8402c; color: #ffb3a5; }
#clock { font: 500 16px var(--font-mono); color: var(--brass); font-variant-numeric: tabular-nums; min-width: 84px; }
.tb-timeline { position: relative; flex: 1 1 160px; min-width: 120px; height: 26px; border: 1px solid var(--line); border-radius: 4px; background: rgba(255,255,255,.03); overflow: hidden; }
.tl-ticks { position: absolute; inset: 0; }
.tl-ticks i { position: absolute; bottom: 0; width: 1px; height: 6px; background: var(--line); }
.tl-ticks i.maj { height: 11px; background: #59634c; }
.tl-ticks b { position: absolute; top: 2px; transform: translateX(3px); font: 500 10px var(--font-mono); color: var(--dim); font-weight: 500; }
.tl-done { position: absolute; left: 0; top: 0; bottom: 0; width: 0; background: rgba(214, 178, 90, .10); }
.tl-now { position: absolute; top: 0; bottom: 0; width: 2px; left: 0; background: var(--brass); }
/* Timeline key events (2026-11-15), drawn from the Logbook. Top lane = what we did (mark, call for fire, launch),
   bottom lane = what it caused (splash, strike). A shot is a full-height line; its rounds in the air a thin bar to the last impact.
   Each mark is a few px wide on screen, with a wider invisible hit area for hover and click. */
.tl-ev { position: absolute; inset: 0; pointer-events: none; }
.tl-ev .ev { position: absolute; width: 9px; margin-left: -4px; pointer-events: auto; cursor: pointer; background: none; border: 0; padding: 0; }
.tl-ev .ev::after { content: ""; position: absolute; left: 4px; width: 1px; }
.tl-ev .ev.top { top: 0; height: 12px; } .tl-ev .ev.top::after { top: 0; height: 8px; }
.tl-ev .ev.bot { bottom: 0; height: 12px; } .tl-ev .ev.bot::after { bottom: 0; height: 8px; }
.tl-ev .ev.full { top: 0; bottom: 0; } .tl-ev .ev.full::after { top: 0; bottom: 0; width: 2px; left: 3.5px; }
.tl-ev .mark::after { background: #e6e9df; }
.tl-ev .cff::after { background: var(--brass); }
.tl-ev .launch::after { background: var(--friend, #6fa8ff); }
.tl-ev .shot::after { background: #f0c860; box-shadow: 0 0 4px rgba(240, 200, 96, .6); }
.tl-ev .splash::after { background: #ff9a3c; }
.tl-ev .dot { width: 9px; height: 9px; margin-left: -4px; bottom: 1px; }
.tl-ev .dot::after { left: 1.5px; bottom: 1.5px; width: 6px; height: 6px; border-radius: 50%; }
.tl-ev .struck::after { background: #e0412b; }
.tl-ev .civ::after { background: #ff8c1a; outline: 1px solid #fff; }
.tl-ev .ev:hover::after, .tl-ev .ev:focus-visible::after { filter: brightness(1.4); outline: 1px solid #fff; }
.tl-ev .tof { position: absolute; top: 12px; height: 2px; background: rgba(240, 200, 96, .45); pointer-events: none; }
.tb-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.tb-tools button[aria-pressed="true"] { background: rgba(214, 178, 90, .12); }
/* ---- control panels: open from the toolbar, drag by the title bar ---- */
.win { position: fixed; z-index: 10; width: min(336px, calc(100% - 32px));
  max-height: calc(100% - var(--tb-h, 56px) - 70px); display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: 6px; backdrop-filter: blur(4px);
  box-shadow: 0 6px 24px rgba(0,0,0,.35); }
.win-h { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 10px 8px 14px;
  border-bottom: 1px solid var(--line); cursor: move; touch-action: none; user-select: none; }
.win-h h2 { margin: 0; font: 600 16px var(--font-head); letter-spacing: .06em; text-transform: uppercase; }
.win-x { font: 500 16px/1 var(--font-mono); padding: 2px 8px; }
.win-b { display: grid; gap: 10px; padding: 12px 14px; overflow-y: auto; }
.fsec.first { border-top: none; padding-top: 0; }
.win .vs { border-top: 1px solid var(--line); }
/* ---- OPFOR panel ---- */
.glist { display: grid; gap: 4px; }
.grow { display: grid; grid-template-columns: 1fr auto; grid-template-areas: "n t" "s s"; gap: 1px 8px; text-align: left; padding: 5px 8px; }
.grow.on { border-color: var(--enemy); background: rgba(255, 106, 85, .08); }
.grow .gn { grid-area: n; color: var(--enemy); font: 600 13px var(--font-head); letter-spacing: .05em; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grow .gt { grid-area: t; color: var(--dim); font-size: 11px; }
.grow .gs { grid-area: s; color: var(--ink); font-size: 11.5px; }
.oped { display: grid; gap: 7px; border-top: 1px solid var(--line); padding-top: 10px; }
.oped[hidden] { display: none; }
.units { display: grid; gap: 4px; }
.mini { font-size: 12px; color: var(--dim); display: inline-flex; gap: 4px; align-items: center; }
.gwrap { display: grid; grid-template-columns: 1fr auto; gap: 4px; align-items: stretch; }
.gbtns { display: grid; grid-template-rows: 1fr 1fr; gap: 4px; }
.ghalt { min-width: 64px; padding-top: 2px; padding-bottom: 2px; }
.ghalt[aria-pressed="true"] { border-color: #c8402c; color: #ffb3a5; background: rgba(200, 64, 44, .12); }
.ghalt:disabled { opacity: .4; cursor: default; }
.ptrow { display: grid; gap: 6px; background: rgba(214, 178, 90, .08); border-radius: 4px; padding: 6px; }
.tag.holdtag { color: var(--brass); transform: translate(0, -50%); font-size: 11px; }
#oplabels { position: fixed; inset: 0; pointer-events: none; overflow: hidden; }
.tag.oplab { transform: translate(-50%, -100%); }

/* site chrome: the title links home */
a.tb-name { color: inherit; text-decoration: none; }
a.tb-name:hover { color: var(--brass); }

/* UAS panel: drone rows stack a status line over a row of controls */
.drow { display: grid; gap: 3px; padding: 4px 0; border-bottom: 1px solid rgba(255,255,255,.06); font: 500 12px var(--font-mono); font-variant-numeric: tabular-nums; }
.drow .dn { color: var(--friend); }
.drow .dn .ug { display: block; color: var(--dim); font-size: 11px; }
.drow .row { gap: 4px; flex-wrap: wrap; }
.drow button, .drow select { padding: 2px 6px; font-size: 12px; }
.drow.dead .dn { color: var(--dim); }
.drow.dead { grid-template-columns: 1fr auto; align-items: start; padding: 2px 0; }
.drow .feed-off { padding: 1px 6px; font-size: 11px; color: var(--dim); background: transparent; border-color: rgba(255,255,255,.12); opacity: .7; }
.drow .feed-off:hover { opacity: 1; }
.urow.mrow .un { white-space: normal; }

/* UAS: prominent feed button, custom launch point fold, pop-up reminder */
.win .feed-btn { margin-left: auto; border-color: var(--brass, #d6b25a); color: #10140f; background: var(--brass, #d6b25a); font-weight: 700; padding: 3px 10px; }
.win .feed-btn:hover { filter: brightness(1.1); }
/* Display panel, layout A: big common toggles, minor settings folded under More */
.dmain button { font-size: 13px; padding: 7px 12px; }
.dmore details { border-top: 1px solid rgba(255,255,255,.08); }
.dmore summary { cursor: pointer; padding: 7px 0; color: var(--ink); font: 500 13px var(--font-head, inherit); letter-spacing: .04em; }
.dmore details[open] summary { color: var(--brass); }
.dfold { display: grid; gap: 8px; padding: 0 0 10px 12px; }
.dfold .lbl { min-width: 64px; font-size: 12px; }
.dfold button { font-size: 11px; padding: 3px 8px; }
.custom-lp { margin-top: 8px; border-top: 1px solid rgba(255,255,255,.08); padding-top: 6px; }
.custom-lp summary { cursor: pointer; color: var(--dim); font: 600 12px var(--font-head, inherit); letter-spacing: .06em; text-transform: uppercase; }
.custom-lp[open] summary { color: inherit; margin-bottom: 6px; }
.umodal { position: fixed; inset: 0; z-index: 1000; background: rgba(5, 8, 6, .6); display: flex; align-items: center; justify-content: center; }
.umodal[hidden] { display: none; }
.umodal-b { width: min(440px, 92vw); background: #121812; border: 1px solid rgba(214, 178, 90, .5); border-radius: 8px; padding: 16px 18px; color: #e6e9df; box-shadow: 0 10px 40px rgba(0,0,0,.5); }
.umodal-b h3 { margin: 0 0 8px; font: 600 18px var(--font-head, inherit); letter-spacing: .03em; }
.umodal-b p { margin: 0 0 10px; font-size: 14px; line-height: 1.4; }
.umodal-c { display: block; margin: 4px 0 12px; font-size: 13px; color: var(--dim); }
.umodal-b .row { gap: 8px; }
.umodal-b .feed-btn { margin-left: 0; border: 1px solid #d6b25a; color: #10140f; background: #d6b25a; font-weight: 700; padding: 6px 14px; border-radius: 4px; cursor: pointer; }
.umodal-b .umodal-x { padding: 6px 14px; }
.tag.op { margin-top: -16px; }
.umodal-b .umodal-x { background: transparent; border: 1px solid #3a4a3d; color: #e6e9df; border-radius: 4px; cursor: pointer; font: inherit; }

/* Rules and Assumptions (2026-11-02): see-through tab bottom right; opens a page of every rule and number, built from the live tables */
#br-dock { position: fixed; z-index: 12; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  display: flex; align-items: stretch; gap: 8px; }
#rules-btn, #log-btn { font: 700 13px var(--font-head); letter-spacing: .08em; text-transform: uppercase; color: var(--ink);
  background: rgba(18, 22, 16, 0.45); border: 1px solid rgba(214, 178, 90, 0.45); border-radius: 4px; padding: 5px 11px;
  backdrop-filter: blur(3px); opacity: .8; transition: opacity .15s, background .15s; }
#rules-btn:hover, #rules-btn[aria-expanded="true"], #log-btn:hover, #log-btn[aria-expanded="true"] { opacity: 1; background: rgba(18, 22, 16, 0.8); color: var(--brass); }
#rules { position: fixed; inset: 0; z-index: 40; background: rgba(6, 8, 5, 0.55); display: grid; place-items: center; padding: 24px; }
#rules[hidden], #logbook[hidden], #log-btn[hidden] { display: none; }
.rules-card { width: min(1080px, 100%); max-height: calc(100vh - 48px); display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 12px 40px rgba(0,0,0,.5); }
.rules-h { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.rules-h h2 { margin: 0; font: 700 20px var(--font-head); letter-spacing: .06em; text-transform: uppercase; }
#rules-x { font-size: 18px; line-height: 1; padding: 2px 9px; }
.rules-b { overflow-y: auto; padding: 4px 16px 18px; scroll-padding-top: 46px; }
.rnav { position: sticky; top: 0; z-index: 1; display: flex; flex-wrap: wrap; gap: 6px; padding: 10px 0; background: rgb(18, 22, 16); border-bottom: 1px solid var(--line); }
.rnav a { font: 600 12px var(--font-head); letter-spacing: .08em; text-transform: uppercase; color: var(--brass); text-decoration: none; border: 1px solid var(--line); border-radius: 4px; padding: 3px 9px; }
.rnav a:hover { border-color: var(--brass); }
.rules-b section { padding-top: 6px; }
.rules-b h3 { margin: 16px 0 8px; font: 700 17px var(--font-head); letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.rules-b h4 { margin: 14px 0 6px; font: 600 13px var(--font-head); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.rules-b .fm { margin: 4px 0 10px; font: 600 15px var(--font-mono); color: var(--brass); }
.rt { width: 100%; border-collapse: collapse; font: 500 12px var(--font-mono); font-variant-numeric: tabular-nums; margin: 4px 0 8px; }
.rt th { text-align: left; font: 600 12px var(--font-head); letter-spacing: .06em; text-transform: uppercase; color: var(--dim); padding: 5px 8px; border-bottom: 1px solid var(--line); vertical-align: bottom; }
.rt td { padding: 4px 8px; border-bottom: 1px solid rgba(58, 66, 50, .5); vertical-align: top; }
.rt tbody tr:hover td { background: rgba(214, 178, 90, .06); }
.rt.num td:not(:first-child):not(:last-child) { white-space: nowrap; }
.rl { margin: 6px 0 4px; padding-left: 18px; font-size: 13px; line-height: 1.5; color: var(--ink); }
.rl li { margin: 2px 0; }
.ph { color: #e3a35c; font-size: 11px; letter-spacing: .04em; }

/* Session chat (2026-11-15): one group chat for everyone in a live session; icon button beside Rules and Assumptions */
#chat-btn { position: relative; display: grid; place-items: center; padding: 0 10px; color: var(--ink);
  background: rgba(18, 22, 16, 0.45); border: 1px solid rgba(214, 178, 90, 0.45); border-radius: 4px;
  backdrop-filter: blur(3px); opacity: .85; transition: opacity .15s, background .15s; }
#chat-btn:hover, #chat-btn[aria-expanded="true"] { opacity: 1; background: rgba(18, 22, 16, 0.8); color: var(--brass); }
/* unread (Lee, 2026-11-15: no count, just make it stand out): solid brass with a slow glow until the chat is opened */
#chat-btn.unread { opacity: 1; background: var(--brass); border-color: var(--brass); color: #10140f; animation: chatglow 1.6s ease-in-out infinite; }
#chat-btn.unread svg path { fill: currentColor; }
@keyframes chatglow { 50% { box-shadow: 0 0 10px 2px rgba(214, 178, 90, .65); } }
@media (prefers-reduced-motion: reduce) { #chat-btn.unread { animation: none; } }
#chat-n { position: absolute; top: -7px; right: -7px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px;
  background: #c8402c; color: #fff; font: 700 11px/18px var(--font-mono); text-align: center; }
#chat-n[hidden], #chat-btn[hidden], #chat-toast[hidden] { display: none; }
#chat-toast { position: absolute; right: 0; bottom: calc(100% + 8px); width: min(300px, calc(100vw - 32px)); cursor: pointer;
  background: rgba(18, 22, 16, 0.94); border: 1px solid var(--brass); border-radius: 6px; padding: 7px 10px;
  font: 13px/1.4 var(--font-body); color: var(--ink); box-shadow: 0 6px 18px rgba(0,0,0,.45); }
#chat-toast b { color: var(--brass); font: 700 12px var(--font-head); letter-spacing: .05em; margin-right: 6px; }
#chat { position: fixed; z-index: 30; right: max(16px, env(safe-area-inset-right, 0px)); bottom: calc(52px + env(safe-area-inset-bottom, 0px));
  width: min(340px, calc(100vw - 32px)); height: min(380px, calc(100vh - 140px)); display: flex; flex-direction: column;
  background: rgb(18, 22, 16); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 10px 30px rgba(0,0,0,.5); }
#chat[hidden] { display: none; }
.chat-h { display: flex; align-items: center; justify-content: space-between; padding: 6px 10px; border-bottom: 1px solid var(--line); }
.chat-h h2 { margin: 0; font: 700 14px var(--font-head); letter-spacing: .08em; text-transform: uppercase; }
#chat-x { font-size: 16px; line-height: 1; padding: 1px 8px; }
#chat-log { flex: 1 1 auto; overflow-y: auto; padding: 6px 10px; font: 13px/1.45 var(--font-body); }
#chat-log .cl { margin: 3px 0; word-wrap: break-word; }
#chat-log .ct { font: 500 11px var(--font-mono); color: var(--dim); margin-right: 6px; }
#chat-log .cs { font: 700 12px var(--font-head); letter-spacing: .05em; color: var(--friend); margin-right: 6px; }
#chat-log .cl.host .cs { color: var(--brass); }
#chat-log .cl.sys { color: var(--dim); font-style: italic; }
#chat-log .empty { color: var(--dim); font-size: 12px; }
#chat-f { display: flex; gap: 6px; padding: 8px; border-top: 1px solid var(--line); }
#chat-in { flex: 1 1 auto; min-width: 0; font: 13px var(--font-body); color: var(--ink); background: rgba(0,0,0,.3); border: 1px solid var(--line); border-radius: 4px; padding: 5px 8px; }
#chat-in:focus { outline: none; border-color: var(--brass); }
#chat-f button, #chat-x { font: 700 12px var(--font-head); letter-spacing: .06em; text-transform: uppercase; color: var(--ink); background: transparent; border: 1px solid var(--line); border-radius: 4px; padding: 4px 10px; cursor: pointer; }
#chat-f button:hover, #chat-x:hover { border-color: var(--brass); color: var(--brass); }
@media (max-width: 640px) { #chat { bottom: calc(92px + env(safe-area-inset-bottom, 0px)); } }

/* performance readout (Display → Diagnostics → Performance) */
#perf { position: fixed; z-index: 12; left: max(16px, env(safe-area-inset-left, 0px)); bottom: calc(46px + env(safe-area-inset-bottom, 0px)); margin: 0;
  font: 500 11.5px/1.5 var(--font-mono); font-variant-numeric: tabular-nums; color: var(--ink); white-space: pre;
  background: rgba(18, 22, 16, 0.78); border: 1px solid var(--line); border-radius: 4px; padding: 6px 9px; pointer-events: none; }

/* lite (demo) mode notice on phones and tablets */
#lite-note { position: fixed; z-index: 50; left: 50%; top: calc(var(--tb-h, 56px) + 12px); transform: translateX(-50%); width: min(420px, calc(100% - 24px));
  background: rgba(18, 22, 16, 0.92); border: 1px solid var(--brass); border-radius: 6px; padding: 10px 14px; color: var(--ink);
  font: 14px/1.45 var(--font-body); box-shadow: 0 8px 24px rgba(0, 0, 0, .45); cursor: pointer; }
#lite-note b { color: var(--brass); font-family: var(--font-head); letter-spacing: .04em; font-size: 15px; }
#lite-note .x { display: block; margin-top: 6px; font-size: 12px; color: var(--dim); }
@media (max-width: 640px) { #br-dock { bottom: calc(52px + env(safe-area-inset-bottom, 0px)); } #rules-btn { font-size: 11px; padding: 4px 9px; } #perf { bottom: calc(88px + env(safe-area-inset-bottom, 0px)); font-size: 10px; } }

/* ---- Student screen (?role=student; multiplayer plan, Trainer/notes/trainer-multiplayer.md).
   Exercise controls and anything that gives the enemy away are marked class="instr-only" in index.html. */
.role-student .instr-only { display: none !important; }
.role-student .tb-name::after { content: ' · Student'; color: var(--brass); }
/* Room badge in the banner (multiplayer step 2): host = brass, student ok = green, paused or lost contact = amber */
#room-badge { font: 600 11px/1 var(--font-mono, ui-monospace, monospace); letter-spacing: .04em; padding: 4px 8px; border-radius: 4px;
  border: 1px solid var(--brass); color: var(--brass); white-space: nowrap; }
#room-badge.ok { border-color: #6fbf73; color: #8fd493; }
#room-badge.paused, #room-badge.lost { border-color: #e0a040; color: #f0b860; }
.ug.ctl { flex-basis: 100%; }

/* ---- Welcome screen and live sessions (2026-11-13). Start Simulation is the big default; Host / Join beside it. */
#welcome { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; padding: 16px;
  background: rgba(6, 8, 5, 0.72); backdrop-filter: blur(4px); overflow-y: auto; }
#welcome[hidden] { display: none; }
.wl-card { width: min(640px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  box-shadow: 0 12px 40px rgba(0,0,0,.5); padding: 20px; display: grid; gap: 16px; }
.wl-card h1 { font-size: 26px; color: var(--brass); }
#wl-main { display: grid; gap: 12px; }
#wl-main[hidden], #wl-form[hidden], #wl-code-l[hidden] { display: none; }
.wl-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.wl-opt { display: grid; gap: 6px; align-content: start; text-align: left; padding: 14px 16px; border-radius: 6px;
  background: rgba(10, 13, 9, 0.6); border: 1px solid var(--line); transition: border-color .12s, background .12s; }
.wl-opt:hover { border-color: var(--brass); background: rgba(214, 178, 90, 0.08); }
.wl-t { font: 700 18px var(--font-head); letter-spacing: .06em; text-transform: uppercase; color: var(--ink); }
.wl-d { font: 400 14px/1.4 var(--font-body); color: var(--dim); }
.wl-big { border-color: var(--brass); padding: 18px 18px; }
.wl-big .wl-t { font-size: 22px; color: var(--brass); }
#wl-form { display: grid; gap: 12px; }
#wl-form h2 { margin: 0; font: 700 18px var(--font-head); letter-spacing: .06em; text-transform: uppercase; }
#wl-form label { display: grid; gap: 4px; font: 600 13px var(--font-head); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
#wl-form input { font: 600 16px var(--font-mono); text-transform: uppercase; color: var(--ink); background: var(--ground);
  border: 1px solid var(--line); border-radius: 4px; padding: 8px 10px; }
#wl-form input:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.wl-msg { margin: 0; min-height: 1.2em; font-size: 13px; color: #ff9c8a; }
.wl-btns { display: flex; justify-content: flex-end; gap: 8px; }
.wl-btns button { font-size: 13px; padding: 7px 14px; }
#wl-go { background: var(--brass); border-color: var(--brass); color: #10140f; font-weight: 700; }
@media (max-width: 560px) { .wl-row { grid-template-columns: 1fr; } .wl-card { padding: 16px; } }
#host-btn { border-color: var(--brass); color: var(--brass); white-space: nowrap; }
.ss-l { margin: 0; font: 600 12px var(--font-head); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.ss-code { margin: -6px 0 0; font: 700 30px var(--font-mono); letter-spacing: .08em; color: var(--brass); }
.ss-qr { background: #fff; padding: 8px; border-radius: 4px; width: 168px; }
.ss-qr[hidden] { display: none; }
.ss-qr svg { display: block; width: 100%; height: auto; }
.ss-link { display: flex; gap: 6px; }
.ss-link input { flex: 1 1 auto; }
.ss-who { margin: 0; font-size: 13px; color: var(--ink); }
#ss-pin summary { cursor: pointer; font-size: 12px; color: var(--dim); }
#ss-pin p { margin: 6px 0; font-size: 12px; color: var(--dim); }
#ss-pin code { display: block; font: 500 11px var(--font-mono); word-break: break-all; color: var(--ink); user-select: all; }
#ss-end { justify-self: start; border-color: #c8402c; color: #ffb3a5; }
/* UAS launch guard (2026-11-15): a Launch button just pressed reads "Launched" in green for 1.5 s and takes no clicks */
#w-uas button.sent, #w-uas button.sent:hover { background: rgba(80, 150, 80, .25); border-color: #6fbf6a; color: #bfe8b8; cursor: default; }
/* a Logbook row reached from a timeline marker flashes once */
.flog .hl { animation: flog-hl 1.6s ease-out; border-radius: 3px; }
@keyframes flog-hl { from { background: rgba(214, 178, 90, .35); } to { background: transparent; } }
