@charset "utf-8";
/* ==========================================================================
   fod-detection.com — asphalt, marking paint, instrument amber.
   See DESIGN.md for the reasoning behind the palette and type choices.
   No framework, no CDN, no runtime dependency.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Fonts (self-hosted, latin subset)
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'Archivo';
  src: url('../fonts/archivo-variable.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: 'Plex Sans';
  src: url('../fonts/plex-sans-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: 'Plex Sans';
  src: url('../fonts/plex-sans-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: 'Plex Sans';
  src: url('../fonts/plex-sans-400-italic.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
  font-style: italic;
}
@font-face {
  font-family: 'Plex Mono';
  src: url('../fonts/plex-mono-400.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
  font-style: normal;
}
@font-face {
  font-family: 'Plex Mono';
  src: url('../fonts/plex-mono-600.woff2') format('woff2');
  font-weight: 600;
  font-display: swap;
  font-style: normal;
}

/* --------------------------------------------------------------------------
   2. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* Raw palette — named for the airfield, not for abstract roles. */
  --asphalt-900: #0e141b;
  --asphalt-850: #131a23;
  --asphalt-800: #18212c;
  --asphalt-700: #1f2a37;
  --asphalt-600: #2c3a4a;
  --asphalt-500: #415466;
  --paint-400: #7e8fa1;
  --paint-300: #9aa9b8;
  --paint-200: #b9c5d1;
  --paint-100: #e6ecf2;
  --paint-000: #ffffff;

  --marking: #f2a20c;
  --marking-bright: #ffb524;
  --marking-deep: #8a5c00;
  --signal: #e5484d;
  --signal-deep: #b3272c;

  /* Type */
  --font-display: 'Archivo', 'Helvetica Neue', Arial, sans-serif;
  --font-body: 'Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'Plex Mono', ui-monospace, 'SFMono-Regular', Consolas, monospace;

  /* Fluid type scale */
  --step--2: clamp(0.69rem, 0.67rem + 0.09vw, 0.75rem);
  --step--1: clamp(0.83rem, 0.8rem + 0.14vw, 0.9rem);
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.09rem);
  --step-1: clamp(1.2rem, 1.14rem + 0.31vw, 1.37rem);
  --step-2: clamp(1.44rem, 1.34rem + 0.48vw, 1.73rem);
  --step-3: clamp(1.73rem, 1.58rem + 0.73vw, 2.18rem);
  --step-4: clamp(2.07rem, 1.85rem + 1.09vw, 2.75rem);
  --step-5: clamp(2.49rem, 2.15rem + 1.6vw, 3.46rem);
  --step-6: clamp(2.99rem, 2.5rem + 2.31vw, 4.36rem);

  /* Space */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
  --sp-9: 6rem;

  --measure: 68ch;
  --page-max: 76rem;
  --radius: 3px;

  --ease: cubic-bezier(0.2, 0.6, 0.3, 1);
}

/* Light is the default, whatever the operating system asks for. Dark is one
   click away and is remembered per browser. Deliberately not keyed to
   prefers-color-scheme: a visitor arriving on a dark-mode machine should still
   land on the light expression, which is the one the site is designed around. */
:root,
:root[data-theme='light'] {
  color-scheme: light;
  --bg: #f6f8fa;
  --bg-raised: #ffffff;
  --bg-sunken: #eaeef3;
  --bg-inset: #ffffff;
  --rule: #ccd6e0;
  --rule-soft: #dee5ec;
  --ink: #0e141b;
  --ink-strong: #000000;
  --ink-muted: #4a5c6d;
  --ink-faint: #66788a;
  --accent: var(--marking);
  --accent-ink: #8a5c00;
  --accent-on: #241700;
  --danger: var(--signal);
  --danger-ink: var(--signal-deep);
  --shadow: 0 1px 2px rgb(14 20 27 / 0.06), 0 8px 24px -14px rgb(14 20 27 / 0.24);
}

:root[data-theme='dark'] {
  color-scheme: dark;
  --bg: var(--asphalt-900);
  --bg-raised: var(--asphalt-800);
  --bg-sunken: #0a0f15;
  --bg-inset: var(--asphalt-850);
  --rule: var(--asphalt-600);
  --rule-soft: var(--asphalt-700);
  --ink: var(--paint-100);
  --ink-strong: var(--paint-000);
  --ink-muted: var(--paint-300);
  --ink-faint: var(--paint-400);
  --accent: var(--marking);
  --accent-ink: var(--marking-bright);
  --accent-on: #241700;
  --danger: var(--signal);
  --danger-ink: #ff8a8d;
  --shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 8px 24px -12px rgb(0 0 0 / 0.6);
}

/* --------------------------------------------------------------------------
   3. Reset
   -------------------------------------------------------------------------- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
* {
  margin: 0;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  /* Always reserve the scrollbar. Without this, moving from a page that
     scrolls (news) to one that does not (contact) widens the viewport by the
     scrollbar's width and the whole masthead jumps sideways. */
  scrollbar-gutter: stable;
}
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
img,
picture,
svg,
video {
  display: block;
  max-width: 100%;
  height: auto;
}
input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
h1,
h2,
h3,
h4 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
p,
li {
  text-wrap: pretty;
}
a {
  color: inherit;
}

:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* Cross-fade between pages. The masthead is named so it stays put while only
   the page beneath it changes. Browsers without cross-document view
   transitions simply navigate as before. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition {
    navigation: auto;
  }
}
.masthead {
  view-transition-name: masthead;
}

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

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -4rem;
  z-index: 100;
  background: var(--accent);
  color: var(--accent-on);
  padding: var(--sp-3) var(--sp-5);
  font-weight: 600;
  border-radius: var(--radius);
  transition: top 0.15s var(--ease);
}
.skip-link:focus {
  top: var(--sp-4);
}

/* --------------------------------------------------------------------------
   4. Signature — runway markings
   The one motif this site is remembered by. Used as rules, as the masthead
   threshold, and (in calculator.css) as the FOD-minutes measure.
   -------------------------------------------------------------------------- */

/* Runway centreline: long dash, long gap. */
.rule-centreline {
  height: 2px;
  border: 0;
  background: repeating-linear-gradient(
    to right,
    var(--rule) 0 30px,
    transparent 30px 48px
  );
}

/* Runway threshold "piano keys" — sits under the masthead. */
.threshold-bars {
  height: 6px;
  background: repeating-linear-gradient(
    to right,
    var(--accent) 0 16px,
    transparent 16px 26px
  );
  opacity: 0.85;
}

/* --------------------------------------------------------------------------
   5. Layout primitives
   -------------------------------------------------------------------------- */
.wrap {
  width: min(100% - 2.5rem, var(--page-max));
  margin-inline: auto;
}
.wrap-narrow {
  width: min(100% - 2.5rem, 46rem);
  margin-inline: auto;
}
.section {
  padding-block: var(--sp-8);
}
.section-tight {
  padding-block: var(--sp-7);
}
main {
  flex: 1 0 auto;
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--ink-faint);
  font-weight: 600;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  margin-bottom: var(--sp-5);
}
.section-head h2 {
  font-size: var(--step-2);
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.link-more {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--accent-ink);
  text-decoration: none;
  font-weight: 600;
  white-space: nowrap;
}
.link-more:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* --------------------------------------------------------------------------
   6. Masthead
   -------------------------------------------------------------------------- */
.masthead {
  background: var(--bg-sunken);
  border-bottom: 1px solid var(--rule-soft);
  position: sticky;
  top: 0;
  z-index: 50;
  /* No backdrop-filter: the background is opaque, so it bought nothing and the
     compositing layer it forced made the header flicker on load. */
}
.masthead-inner {
  display: flex;
  align-items: center;
  gap: var(--sp-5);
  padding-block: var(--sp-4);
  /* Unitless line-heights below make every child's box height depend only on
     its font-size, so the bar keeps its height while the webfonts arrive. */
}

.brand {
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--step-1);
  line-height: 1.4;
  letter-spacing: -0.03em;
  color: var(--ink-strong);
  white-space: nowrap;
}
.brand .brand-dot {
  color: var(--accent);
}

.nav {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
.nav a {
  text-decoration: none;
  font-size: var(--step--1);
  font-weight: 600;
  line-height: 1.6;
  color: var(--ink-muted);
  padding: var(--sp-2) var(--sp-3);
  /* Square: the current-page underline is drawn edge to edge, and a radius
     here leaves it curling up into the corners. */
  border-radius: 0;
  transition: color 0.15s var(--ease), background 0.15s var(--ease);
  white-space: nowrap;
}
.nav a:hover {
  color: var(--ink-strong);
  background: color-mix(in srgb, var(--ink) 8%, transparent);
}
.nav a[aria-current='page'] {
  color: var(--ink-strong);
  box-shadow: inset 0 -2px 0 var(--accent);
}

.theme-toggle {
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--ink-muted);
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius);
  display: grid;
  place-items: center;
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease);
  flex-shrink: 0;
}
.theme-toggle:hover {
  border-color: var(--accent);
  color: var(--accent-ink);
}
.theme-toggle svg {
  width: 1.05rem;
  height: 1.05rem;
}
/* Show the icon for the theme the button switches *to*.
   Light is the default, so the moon shows unless dark is in force. */
.icon-moon {
  display: block;
}
.icon-sun {
  display: none;
}
:root[data-theme='dark'] .icon-sun {
  display: block;
}
:root[data-theme='dark'] .icon-moon {
  display: none;
}

.nav-toggle {
  display: none;
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  color: var(--ink);
  width: 2.25rem;
  height: 2.25rem;
  place-items: center;
}

@media (max-width: 60rem) {
  .nav-toggle {
    display: grid;
    margin-left: auto;
  }
  .nav {
    display: none;
    position: absolute;
    inset-inline: 0;
    top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bg-raised);
    border-block: 1px solid var(--rule-soft);
    padding: var(--sp-2);
    margin-left: 0;
  }
  .nav.is-open {
    display: flex;
  }
  .nav a {
    padding: var(--sp-3) var(--sp-4);
  }
  .masthead-inner {
    position: relative;
  }
}

/* --------------------------------------------------------------------------
   7. Hero — the thesis, drawn
   -------------------------------------------------------------------------- */
.hero {
  padding-block: clamp(var(--sp-7), 8vw, var(--sp-9));
  border-bottom: 1px solid var(--rule-soft);
  background:
    radial-gradient(
      ellipse 90% 60% at 15% 0%,
      color-mix(in srgb, var(--accent) 7%, transparent),
      transparent 70%
    ),
    var(--bg);
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--sp-7);
  align-items: center;
}
@media (min-width: 62rem) {
  .hero-grid {
    grid-template-columns: 1.05fr 0.95fr;
    gap: var(--sp-8);
  }
}

.hero h1 {
  font-size: var(--step-6);
  font-weight: 800;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  margin-block: var(--sp-4) var(--sp-5);
}
.hero h1 .hero-line2 {
  display: block;
  color: var(--ink-muted);
}
.hero-lede {
  font-size: var(--step-1);
  color: var(--ink-muted);
  max-width: 34ch;
  margin-bottom: var(--sp-6);
}
/* Vendor status on /systems/. A dot rather than a coloured pill: the point is
   to be readable at a glance without turning a company's insolvency into a
   decorative badge. Colour alone never carries it — the label says it too. */
.system-status {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  display: flex;
  align-items: baseline;
  gap: 0.55rem;
  margin-bottom: var(--sp-3);
}
.system-status::before {
  content: '';
  flex: none;
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: currentColor;
}
.system-status.is-active {
  color: var(--accent-ink);
}
.system-status.is-ended {
  color: var(--danger-ink);
}
.system-status a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

/* Longevity line. Sits between the stats and the buttons; the number is the
   only loud thing in it, so it reads as a claim rather than a slogan. */
.hero-since {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--ink-muted);
  margin-bottom: var(--sp-6);
  max-width: 44ch;
}
.hero-since b {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: var(--step-1);
  color: var(--accent-ink);
  letter-spacing: -0.02em;
}

.btn-row {
  display: flex;
  gap: var(--sp-3);
  flex-wrap: wrap;
}
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 0.7rem 1.15rem;
  border-radius: var(--radius);
  text-decoration: none;
  font-weight: 600;
  font-size: var(--step--1);
  border: 1px solid transparent;
  transition: transform 0.12s var(--ease), background 0.15s var(--ease),
    border-color 0.15s var(--ease);
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--accent);
  color: var(--accent-on);
}
.btn-primary:hover {
  background: var(--marking-bright);
}
.btn-ghost {
  border-color: var(--rule);
  color: var(--ink);
}
.btn-ghost:hover {
  border-color: var(--accent);
  color: var(--accent-ink);
}

/* The hero measure — same visual language as the calculator chart. */
.thesis {
  background: var(--bg-raised);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius);
  padding: var(--sp-6);
  box-shadow: var(--shadow);
}
.thesis-title {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  margin-bottom: var(--sp-5);
}
.measure-row + .measure-row {
  margin-top: var(--sp-5);
}
.measure-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--sp-3);
  margin-bottom: var(--sp-2);
  font-size: var(--step--1);
}
.measure-label .val {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--ink-strong);
}
.measure-track {
  height: 14px;
  background: var(--bg-sunken);
  border-radius: 1px;
  overflow: hidden;
}
.measure-fill {
  height: 100%;
  /* Marking-paint hatching: the bar is literally runway paint. */
  background-image: repeating-linear-gradient(
    135deg,
    var(--accent) 0 7px,
    color-mix(in srgb, var(--accent) 72%, #000) 7px 14px
  );
  transform-origin: left;
  animation: measure-grow 0.9s var(--ease) both;
}
.measure-fill.is-low {
  background-image: repeating-linear-gradient(
    135deg,
    var(--paint-400) 0 7px,
    color-mix(in srgb, var(--paint-400) 72%, #000) 7px 14px
  );
}
@keyframes measure-grow {
  from {
    transform: scaleX(0);
  }
}
.thesis-note {
  margin-top: var(--sp-5);
  padding-top: var(--sp-4);
  border-top: 1px solid var(--rule-soft);
  font-size: var(--step--1);
  color: var(--ink-muted);
}

/* --------------------------------------------------------------------------
   8. Cards & article lists
   -------------------------------------------------------------------------- */
.card-grid {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
}
.system-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
  background: var(--bg-raised);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius);
  padding: var(--sp-5);
  transition: border-color 0.15s var(--ease), transform 0.15s var(--ease);
}
.system-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.system-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-2);
  margin-bottom: var(--sp-3);
}
.system-card .system-status {
  margin-bottom: 0;
}
.system-flag {
  flex: none;
  display: inline-flex;
  width: 2.25rem;
  height: 1.5rem;
  border-radius: 2px;
  overflow: hidden;
  border: 1px solid var(--rule-soft);
}
.system-flag svg {
  display: block;
  width: 100%;
  height: 100%;
}
.system-card .name {
  font-family: var(--font-display);
  font-size: var(--step-2);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--ink-strong);
}
.system-card .desc {
  font-size: var(--step--1);
  color: var(--ink-muted);
  margin-top: var(--sp-1);
}
.system-card .spec {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  color: var(--ink-faint);
  margin-top: auto;
  padding-top: var(--sp-4);
}

/* Article rows — dense and scannable, the index is a reference tool. */
.article-list {
  list-style: none;
  padding: 0;
}
.article-row {
  border-top: 1px solid var(--rule-soft);
  position: relative;
  transition: background 0.15s var(--ease);
}
.article-row:last-child {
  border-bottom: 1px solid var(--rule-soft);
}
.article-row:hover {
  background: color-mix(in srgb, var(--ink) 5%, transparent);
}
.article-row-inner {
  display: grid;
  grid-template-columns: 7.5rem 1fr;
  gap: var(--sp-5);
  align-items: baseline;
  padding: var(--sp-4) var(--sp-2);
}
.article-date {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  color: var(--ink-faint);
  letter-spacing: 0.04em;
  white-space: nowrap;
}
.article-main {
  display: block;
  min-width: 0;
}
.article-title {
  display: block;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
  text-decoration: none;
  transition: color 0.15s var(--ease);
}
/* Stretch the title link over the whole row for a large click target. */
.article-title::after {
  content: '';
  position: absolute;
  inset: 0;
}
.article-row:hover .article-title {
  color: var(--accent-ink);
}
/* Chips sit above the stretched link so they stay independently clickable. */
.article-cats {
  margin-top: var(--sp-2);
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
  position: relative;
  z-index: 1;
}
@media (max-width: 40rem) {
  .article-row-inner {
    grid-template-columns: 1fr;
    gap: var(--sp-2);
  }
}

.tag {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: 0.1rem 0.4rem;
  text-decoration: none;
  white-space: nowrap;
}
a.tag:hover {
  border-color: var(--accent);
  color: var(--accent-ink);
}
.tag.is-incident {
  color: var(--danger-ink);
  border-color: color-mix(in srgb, var(--danger) 50%, transparent);
}

/* --------------------------------------------------------------------------
   9. Article page
   -------------------------------------------------------------------------- */
.article-header {
  padding-block: var(--sp-7) var(--sp-5);
}
.article-header h1 {
  font-size: var(--step-5);
  margin-block: var(--sp-3) var(--sp-4);
}
.article-meta {
  display: flex;
  gap: var(--sp-3);
  align-items: center;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--ink-faint);
}

.prose {
  max-width: var(--measure);
  font-size: var(--step-0);
}
.prose > * + * {
  margin-top: var(--sp-5);
}
.prose h2 {
  font-size: var(--step-2);
  margin-top: var(--sp-7);
}
.prose h3 {
  font-size: var(--step-1);
  margin-top: var(--sp-6);
}
.prose a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.prose a:hover {
  text-decoration-thickness: 2px;
}
.prose ul,
.prose ol {
  padding-left: var(--sp-5);
}
.prose li + li {
  margin-top: var(--sp-2);
}
.prose img {
  border-radius: var(--radius);
  border: 1px solid var(--rule-soft);
  margin-inline: auto;
}
.prose blockquote {
  border-left: 3px solid var(--accent);
  padding: var(--sp-2) 0 var(--sp-2) var(--sp-5);
  color: var(--ink-muted);
  font-style: italic;
}
.prose blockquote p + p {
  margin-top: var(--sp-4);
}
.prose hr {
  border: 0;
  height: 1px;
  background: var(--rule-soft);
}
.prose code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  background: var(--bg-sunken);
  padding: 0.1em 0.35em;
  border-radius: 2px;
}
.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step--1);
}
.prose th,
.prose td {
  border: 1px solid var(--rule-soft);
  padding: var(--sp-2) var(--sp-3);
  text-align: left;
}
.table-scroll {
  overflow-x: auto;
}

.article-nav {
  display: grid;
  gap: var(--sp-3);
  grid-template-columns: 1fr 1fr;
  margin-top: var(--sp-8);
  padding-top: var(--sp-6);
  border-top: 1px solid var(--rule-soft);
}
.article-nav a {
  text-decoration: none;
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius);
  padding: var(--sp-4);
  transition: border-color 0.15s var(--ease);
}
.article-nav a:hover {
  border-color: var(--accent);
}
.article-nav .dir {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  display: block;
  margin-bottom: var(--sp-2);
}
.article-nav .t {
  font-weight: 600;
  font-size: var(--step--1);
  line-height: 1.4;
}
.article-nav .next {
  text-align: right;
}
@media (max-width: 40rem) {
  .article-nav {
    grid-template-columns: 1fr;
  }
  .article-nav .next {
    text-align: left;
  }
}

/* --------------------------------------------------------------------------
   10. News index / filter controls
   -------------------------------------------------------------------------- */
.filters {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
  padding-bottom: var(--sp-5);
  border-bottom: 1px solid var(--rule-soft);
}
.search-field {
  max-width: 26rem;
  width: 100%;
  position: relative;
}
.search-field input {
  width: 100%;
  background: var(--bg-raised);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  padding: 0.6rem 0.85rem;
  color: var(--ink);
}
.search-field input::placeholder {
  color: var(--ink-faint);
}
.search-field input:focus {
  border-color: var(--accent);
}
.filter-groups {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.filter-group {
  display: flex;
  align-items: baseline;
  gap: var(--sp-3);
  flex-wrap: wrap;
}
.filter-group-label {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  min-width: 5rem;
  flex-shrink: 0;
}
.filter-group .chip-row {
  flex: 1 1 16rem;
}
.chip-row {
  display: flex;
  gap: var(--sp-2);
  flex-wrap: wrap;
}
.chip {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: transparent;
  border: 1px solid var(--rule);
  color: var(--ink-muted);
  border-radius: 2px;
  padding: 0.3rem 0.6rem;
  transition: all 0.15s var(--ease);
}
.chip-count {
  color: var(--ink-faint);
  font-weight: 400;
  margin-left: 0.25em;
}
.chip:hover {
  border-color: var(--accent);
  color: var(--accent-ink);
}
.chip--system {
  background: var(--bg-raised);
  border-color: color-mix(in srgb, var(--accent) 45%, var(--rule));
  border-left: 3px solid var(--accent);
  color: var(--ink);
  font-weight: 600;
}
.chip--system:hover {
  border-color: var(--accent);
  color: var(--accent-ink);
  background: color-mix(in srgb, var(--accent) 8%, var(--bg-raised));
}
.chip[aria-pressed='true'] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--accent-on);
  font-weight: 600;
}
.chip[aria-pressed='true'] .chip-count {
  color: inherit;
  opacity: 0.8;
}
.result-count {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--ink-faint);
  margin-bottom: var(--sp-4);
}
.year-head {
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--ink-faint);
  margin-top: var(--sp-7);
  margin-bottom: var(--sp-2);
}
.year-head:first-child {
  margin-top: 0;
}
.empty-state {
  padding: var(--sp-8) 0;
  text-align: center;
  color: var(--ink-muted);
}
.chart-panel {
  background: var(--bg-raised);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius);
  padding: var(--sp-5) var(--sp-5) var(--sp-4);
  margin-bottom: var(--sp-5);
}
.chart-panel-title {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  margin-bottom: var(--sp-4);
}
.quarterly-chart {
  height: 220px;
  position: relative;
}
/* The plot area. The inset is the room left around it for the axis labels,
   which sit outside the SVG's box and rely on overflow: visible. */
.qc {
  position: absolute;
  inset: 12px 8px 22px 32px;
  width: calc(100% - 40px);
  height: calc(100% - 34px);
  overflow: visible;
  font-family: var(--font-mono);
  font-size: 10px;
}
.qc-narrow {
  display: none;
  inset: 8px 14px 24px 40px;
  width: calc(100% - 54px);
  height: calc(100% - 32px);
}
.qc text {
  fill: var(--ink-faint);
}
.qc-baseline {
  stroke: var(--rule-soft);
}
.qc-gridline {
  stroke: var(--rule-soft);
  stroke-dasharray: 4 3;
}
.qc-hit {
  fill: transparent;
}
/* Drawn full length and scaled by --k (count / axis top) from the baseline. */
.qc-bar {
  fill: var(--accent);
  transform-box: view-box;
  transform-origin: 0 100%;
  transform: scaleY(var(--k));
  transition: transform 0.3s var(--ease), fill 0.15s var(--ease);
}
.qc-narrow .qc-bar {
  transform-origin: 0 0;
  transform: scaleX(var(--k));
}
.qc-q:hover .qc-bar {
  fill: var(--marking-bright);
}
/* Below this the bars turn horizontal, so the height has to carry one band per
   quarter rather than one per value step. */
@media (max-width: 767px) {
  .chart-panel {
    padding: var(--sp-4) var(--sp-4) var(--sp-3);
  }
  .quarterly-chart {
    height: 540px;
  }
  .qc-wide {
    display: none;
  }
  .qc-narrow {
    display: block;
  }
}

/* --------------------------------------------------------------------------
   11. Callouts
   -------------------------------------------------------------------------- */
.callout {
  border: 1px solid var(--rule);
  border-left: 3px solid var(--accent);
  background: var(--bg-raised);
  border-radius: var(--radius);
  padding: var(--sp-5);
}
.callout h3 {
  font-size: var(--step-1);
  margin-bottom: var(--sp-2);
}
.callout p + p {
  margin-top: var(--sp-3);
}
/* A correction added to an article after publication. Sits above the original
   text, which is always left as it was written. */
.correction-note {
  margin-bottom: var(--sp-6);
  font-size: var(--step--1);
  border-left-color: var(--danger);
}

.cta-panel {
  background: var(--bg-raised);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius);
  padding: var(--sp-6);
  display: flex;
  gap: var(--sp-5);
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.cta-panel h2 {
  font-size: var(--step-2);
  margin-bottom: var(--sp-2);
}
.cta-panel p {
  color: var(--ink-muted);
  max-width: 46ch;
}

/* --------------------------------------------------------------------------
   12. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  margin-top: var(--sp-9);
  background: var(--bg-sunken);
  border-top: 1px solid var(--rule-soft);
  padding-block: var(--sp-7) var(--sp-6);
  font-size: var(--step--1);
  flex-shrink: 0;
}
.footer-grid {
  display: grid;
  gap: var(--sp-6);
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  margin-bottom: var(--sp-6);
}
/* h2, not h3: pages like /news/ have no other subheading, and skipping a
   level breaks the document outline for screen readers. */
.footer-grid h2 {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  font-weight: 600;
  margin-bottom: var(--sp-3);
}
.footer-grid ul {
  list-style: none;
  padding: 0;
}
.footer-grid li + li {
  margin-top: var(--sp-2);
}
.footer-grid a {
  color: var(--ink-muted);
  text-decoration: none;
}
.footer-grid a:hover {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.footer-base {
  padding-top: var(--sp-5);
  border-top: 1px solid var(--rule-soft);
  display: flex;
  justify-content: space-between;
  gap: var(--sp-4);
  flex-wrap: wrap;
  color: var(--ink-faint);
  font-family: var(--font-mono);
  font-size: var(--step--2);
}

/* Trade mark attribution. Body face rather than mono — it is a sentence, not a
   label — and kept quiet: referential use of someone else's mark only reads as
   referential while the notice is plainly a disclaimer. */
.footer-legal {
  margin-top: var(--sp-4);
  max-width: 68ch;
  color: var(--ink-faint);
  font-size: var(--step--2);
  line-height: 1.5;
}

/* --------------------------------------------------------------------------
   13. Embeds

   The originals were fixed-width Flash <object> blocks and http:// iframes —
   the first no longer runs anywhere, the second is blocked as mixed content
   once the site is served over https. Everything is now a single responsive
   wrapper, so an embed scales with the column instead of overflowing it.
   -------------------------------------------------------------------------- */
.video-embed {
  position: relative;
  aspect-ratio: 16 / 9;
  margin-block: var(--sp-5);
  background: var(--bg-sunken);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius);
  overflow: hidden;
}
.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Embeds kept in their original form (maps) must still not break the column. */
.prose iframe {
  max-width: 100%;
}

/* Where the host or the technology is gone and there is nothing to embed. */
.media-gone {
  margin-block: var(--sp-5);
  padding: var(--sp-3) var(--sp-4);
  border-left: 3px solid var(--rule);
  background: var(--bg-sunken);
  border-radius: var(--radius);
  color: var(--ink-faint);
  font-size: var(--step--1);
}

/* --------------------------------------------------------------------------
   14. Reference tables, jump nav, checklists & document library
   -------------------------------------------------------------------------- */
.jump-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-2);
  padding: var(--sp-3) var(--sp-4);
  background: var(--bg-raised);
  border: 1px solid var(--rule-soft);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  margin-bottom: var(--sp-7);
}
.jump-nav-label {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-faint);
  font-weight: 600;
  margin-right: var(--sp-2);
}
.jump-nav a {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
  text-decoration: none;
  padding: 0.25rem 0.55rem;
  border: 1px solid var(--rule);
  border-radius: 2px;
  transition: border-color 0.15s var(--ease), color 0.15s var(--ease), background 0.15s var(--ease);
}
.jump-nav a:hover {
  border-color: var(--accent);
  color: var(--accent-ink);
  background: color-mix(in srgb, var(--accent) 8%, transparent);
}

.data-table-wrap {
  overflow-x: auto;
  background: var(--bg-raised);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--step--1);
  line-height: 1.45;
}
.data-table th,
.data-table td {
  padding: var(--sp-3) var(--sp-4);
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--rule-soft);
}
.data-table thead th {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  font-weight: 600;
  background: var(--bg-sunken);
  border-bottom: 1px solid var(--rule);
  white-space: nowrap;
}
.data-table tbody tr:last-child td {
  border-bottom: 0;
}
.data-table tbody tr:hover {
  background: color-mix(in srgb, var(--ink) 4%, transparent);
}
.data-table .col-mono {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  color: var(--ink-muted);
  white-space: nowrap;
}
.data-table a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.data-table a:hover {
  text-decoration-thickness: 2px;
}

.status-pill {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-faint);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  white-space: nowrap;
}
.status-pill::before {
  content: '';
  flex: none;
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: currentColor;
}
.status-pill.is-active {
  color: var(--accent-ink);
}
.status-pill.is-ended {
  color: var(--danger-ink);
}

.stat-grid {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  margin-block: var(--sp-5) var(--sp-6);
}
.stat-card {
  background: var(--bg-raised);
  border: 1px solid var(--rule-soft);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: var(--sp-5);
}
.stat-card .stat-val {
  font-family: var(--font-display);
  font-size: var(--step-3);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: var(--ink-strong);
  line-height: 1.05;
}
.stat-card .stat-label {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--ink-faint);
  margin-top: var(--sp-2);
  margin-bottom: var(--sp-3);
}
.stat-card p {
  font-size: var(--step--1);
  color: var(--ink-muted);
  line-height: 1.5;
}
.stat-card a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.checklist-grid {
  display: grid;
  gap: var(--sp-4);
  grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr));
  margin-top: var(--sp-5);
}
.checklist-card {
  background: var(--bg-raised);
  border: 1px solid var(--rule-soft);
  border-radius: var(--radius);
  padding: var(--sp-5);
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}
.checklist-card .check-num {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent-ink);
  font-weight: 600;
}
.checklist-card h3 {
  font-size: var(--step-1);
  line-height: 1.2;
}
.checklist-card p {
  font-size: var(--step--1);
  color: var(--ink-muted);
}
.checklist-card .check-ask {
  margin-top: auto;
  padding-top: var(--sp-3);
  border-top: 1px solid var(--rule-soft);
  font-size: var(--step--1);
  color: var(--ink);
}
.checklist-card .check-ask strong {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent-ink);
  display: block;
  margin-bottom: var(--sp-1);
}
.checklist-card a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.doc-list {
  list-style: none;
  padding: 0;
  border-top: 1px solid var(--rule-soft);
}
.doc-row {
  border-bottom: 1px solid var(--rule-soft);
  padding: var(--sp-4) var(--sp-2);
  display: grid;
  grid-template-columns: minmax(11rem, max-content) 1fr auto;
  gap: var(--sp-5);
  align-items: baseline;
}
.doc-meta {
  font-family: var(--font-mono);
  font-size: var(--step--2);
  color: var(--ink-faint);
  white-space: nowrap;
}
.doc-main h3 {
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 600;
  line-height: 1.35;
  margin-bottom: var(--sp-1);
}
.doc-main h3 a {
  color: var(--ink-strong);
  text-decoration: none;
}
.doc-main h3 a:hover {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.doc-main p {
  font-size: var(--step--1);
  color: var(--ink-muted);
  max-width: 64ch;
}
.doc-main p a {
  color: var(--accent-ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.doc-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}
@media (max-width: 48rem) {
  .doc-row {
    grid-template-columns: 1fr;
    gap: var(--sp-2);
  }
}
