/* Insitu Pacific brand overrides.
   Sourced from the live site (insitupacific.com.au) which uses the
   Enfold WordPress theme. Brand token values are taken verbatim from
   the site's compiled theme CSS. */

:root {
  /* Brand palette */
  --insitu-bg-dark:       #232329;   /* main header bar           */
  --insitu-navy:          #003f72;   /* primary accent / CTA      */
  --insitu-steel:         #80a3bf;   /* secondary / hover         */
  --insitu-steel-light:   #91b4cf;
  --insitu-text-light:    #ffffff;
  --insitu-text-on-light: #2a2a32;
}

/* Body / sans defaults — match the live site's Helvetica stack.
   The engine's IBM Plex stays available via .font-display for
   numerics-and-headings where we want crisp tabular figures. */
body, body .avia-tooltip {
  font-family: "Helvetica Neue", "HelveticaNeue", Helvetica, Arial, sans-serif;
}

/* Primary brand button — overrides daisy's btn-primary on this pack. */
.btn.btn-primary,
.btn-primary {
  background-color: var(--insitu-navy);
  border-color:     var(--insitu-navy);
  color:            var(--insitu-text-light);
}
.btn.btn-primary:hover,
.btn-primary:hover {
  background-color: var(--insitu-steel);
  border-color:     var(--insitu-steel);
}

/* Section labels + datum strip use the steel accent. */
.precede-brand-bar {
  background-color: var(--insitu-bg-dark) !important;
  color:            var(--insitu-text-light) !important;
  border-bottom:    3px solid var(--insitu-navy);
}

/* Datum strip — navy band under the brand. */
.insitu-datum-strip {
  background-color: var(--insitu-navy);
  color:            var(--insitu-text-light);
}

/* Sticky ROM strip uses navy underline rather than the default. */
.insitu-rom-strip {
  border-bottom: 2px solid var(--insitu-navy);
}

/* ── Mission coverage band ───────────────────────────────────────────
   Box-and-whisker for the ROM cost distribution + a P(success) gauge.
   Same box-plot family VHT uses, AUD axis. The whisker line = [low,high];
   the box = [q1,q3] (middle 50%); the median tick = projected point. */
.rom-whisker {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-rows: auto auto;
  column-gap: 0.6rem;
  row-gap: 0.35rem;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
}
.rom-whisker-empty { padding: 0.75rem 0; }
.rom-whisker-empty-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6875rem; letter-spacing: 0.04em;
  color: oklch(var(--bc) / 0.6);
}
.rom-whisker-axis-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.6875rem; letter-spacing: 0.03em;
  color: oklch(var(--bc) / 0.72); white-space: nowrap;
}
.rom-whisker-low  { grid-column: 1; grid-row: 1; text-align: right; }
.rom-whisker-high { grid-column: 3; grid-row: 1; text-align: left; }
.rom-whisker-track { grid-column: 2; grid-row: 1; position: relative; height: 26px; }
.rom-whisker-line {
  position: absolute; top: 50%; transform: translateY(-50%);
  height: 2px; background: oklch(var(--bc) / 0.42);
}
.rom-whisker-cap {
  position: absolute; top: 50%; transform: translate(-50%, -50%);
  width: 2px; height: 14px; background: oklch(var(--bc) / 0.55);
}
.rom-whisker-box {
  position: absolute; top: 50%; transform: translateY(-50%);
  height: 16px; background: oklch(var(--p) / 0.16);
  border: 1px solid oklch(var(--p) / 0.55); border-radius: 2px;
}
.rom-whisker-median {
  position: absolute; top: 50%; transform: translate(-50%, -50%);
  width: 3px; height: 22px; background: oklch(var(--p)); border-radius: 1px;
}
.rom-whisker-legend {
  grid-column: 2; grid-row: 2;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 0.9rem;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.625rem; letter-spacing: 0.02em; color: oklch(var(--bc) / 0.78);
}
.rom-legend-item { display: inline-flex; align-items: center; gap: 0.4rem; }
.rom-legend-swatch { display: inline-block; width: 0.7rem; height: 0.7rem; border-radius: 2px; }
.rom-legend-median { background: oklch(var(--p)); }
.rom-legend-box { background: oklch(var(--p) / 0.16); border: 1px solid oklch(var(--p) / 0.55); }

/* P(success) radial-ish gauge — a thick conic ring round the % number. */
.mission-gauge {
  position: relative; width: 92px; height: 92px; border-radius: 9999px;
  display: grid; place-items: center; flex: none;
}
.mission-gauge::before {
  content: ""; position: absolute; inset: 0; border-radius: 9999px;
  background: conic-gradient(var(--insitu-navy) calc(var(--pct) * 1%), oklch(var(--bc) / 0.12) 0);
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 10px), #000 calc(100% - 9px));
          mask: radial-gradient(farthest-side, transparent calc(100% - 10px), #000 calc(100% - 9px));
}
.mission-gauge-value { font-family: var(--font-display, inherit); font-weight: 700; font-size: 1.5rem; line-height: 1; }

/* Feasibility factor bar fill animates as P50 moves. */
.feas-bar-fill { transition: width 0.4s ease; }

/* ── AO map — real Leaflet map (vendored, OSM tiles) drawn by ao-map.js
   into this box. Container needs an explicit height for Leaflet. ────── */
.ao-map-box {
  height: 440px; width: 100%;
  border: 1px solid oklch(var(--bc) / 0.15); border-radius: 2px; overflow: hidden;
}
.leaflet-container { font-family: inherit; background: #0b1b2b; }
.ao-fob-label {
  background: var(--insitu-navy, #003f72); color: #fff; border: none; box-shadow: none;
  font-family: 'IBM Plex Mono', monospace; font-size: 10px; letter-spacing: 0.04em; padding: 1px 6px;
}
.ao-fob-label::before { display: none; }

/* ── Sortie Gantt (§4 centre) — one track per airframe, a positioned bar
   spanning its sortie window across the D-25→D+14 axis. The D-day reference
   line sits at (0+25)/39 ≈ 64% of the track. ──────────────────────────── */
.sortie-track {
  position: relative; height: 20px; border-radius: 2px;
  background: oklch(var(--bc) / 0.06);
  background-image: linear-gradient(to right, oklch(var(--bc) / 0.18) 0 1px, transparent 1px);
  background-position: 64% 0; background-repeat: no-repeat; background-size: 2px 100%;
}
.sortie-bar {
  position: absolute; top: 2px; height: 16px; border-radius: 2px;
  background: var(--insitu-navy, #003f72);
  display: flex; align-items: center; padding: 0 6px; overflow: hidden;
  transition: left 0.3s ease, width 0.3s ease;
}
.sortie-bar-label {
  font-family: 'IBM Plex Mono', monospace; font-size: 9px; letter-spacing: 0.04em;
  color: #fff; white-space: nowrap;
}
