/* ============================================================================
   IRON SHIELD SYSTEMS — DEFENCE PROGRAM TRACKER
   app.css — design tokens + components for the tracker pages.

   DESIGN TOKENS
   -------------
   All colours, fonts and radii live in :root below. To align 1:1 with the
   main ironshieldsystems.com stylesheet, adjust ONLY the :root block —
   every component inherits from it.
   ========================================================================== */

:root {
  /* Light "emerald on white" theme, matching the Procurement / Defence News
     platform styling. All components inherit from these tokens.            */

  /* --- Surfaces --- */
  --bg-0: #ffffff;            /* page background            */
  --bg-1: #f4f9f6;            /* section alternation (soft emerald tint) */
  --bg-2: #ffffff;            /* card / panel               */
  --bg-3: #edf4f0;            /* raised panel / hover / tracks */
  --bg-glass: rgba(255, 255, 255, .9);

  /* --- Lines --- */
  --line-1: #e2ebe6;          /* default border             */
  --line-2: #c8d9d0;          /* emphasized border          */

  /* --- Ink --- */
  --ink-1: #123227;           /* primary text (deep emerald-charcoal) */
  --ink-2: #3a4d44;           /* body text                  */
  --ink-3: #55685e;           /* muted / labels             */
  --ink-4: #66796e;           /* faint                      */
  --heading: #0d5f3e;         /* headings — emerald         */

  /* --- Brand accent (emerald) --- */
  --accent: #0d7a4f;
  --accent-strong: #095c3b;
  --accent-dim: rgba(13, 122, 79, .08);
  --accent-line: rgba(13, 122, 79, .35);

  /* --- Status hues (always paired with a text label, never colour-alone) --- */
  --st-neutral: #5a6e64;      /* early / strategy / n-a     */
  --st-active:  #175e9e;      /* engagement / competition   */
  --st-open:    #0f6d8c;      /* open windows (tender/RFI)  */
  --st-good:    #177441;      /* award / delivery / done    */
  --st-warn:    #8a5e0a;      /* deadline soon / delayed    */
  --st-bad:     #b03a2e;      /* cancelled / blocker        */
  --st-sustain: #6247ad;      /* sustainment / expansion    */

  /* --- Type ---
     The Tracker's own display face (Barlow Semi Condensed) is a deliberate
     departure from the feed platforms' typography.                          */
  --font-body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --font-display: "Barlow Semi Condensed", "Inter", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  /* --- App chrome (workbench console) --- */
  --rail-bg: #0a3d2a;          /* dark-emerald view rail                    */
  --rail-ink: #cfe8dc;

  /* --- Shape / rhythm ---
     Deliberately sharper than the feed platforms: the Tracker reads as a
     structured dossier/ledger, not a card feed.                            */
  --radius-s: 3px;
  --radius-m: 5px;
  --radius-l: 7px;
  --wrap: 1240px;
  --gap: 20px;
  --header-h: 64px;
}

/* ============================= RESET / BASE ============================== */
* { box-sizing: border-box; }
[hidden] { display: none !important; }   /* [hidden] must beat component display rules */
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
body {
  margin: 0;
  background: var(--bg-0);
  color: var(--ink-2);
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-strong); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { color: var(--ink-1); line-height: 1.2; margin: 0 0 .5em; font-family: var(--font-display); font-weight: 600; letter-spacing: .002em; }
h1, h2 { color: var(--heading); font-weight: 700; }   /* emerald headings, per site style */

/* App pages sit on a tinted "workbench"; white panels carry the content. */
body.app-page { background: var(--bg-1); }
body.app-page .section.alt { background: var(--bg-0); }
h1 { font-size: clamp(1.9rem, 4.4vw, 3.1rem); }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.9rem); }
h3 { font-size: 1.12rem; }
h4 { font-size: .98rem; }
p  { margin: 0 0 1em; }
button { font-family: inherit; }
:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 2px; border-radius: 4px; }
::selection { background: rgba(13,122,79,.18); }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 22px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--accent); color: #fff; padding: 8px 14px; z-index: 200; border-radius: 0 0 8px 0; font-weight: 600; }
.skip-link:focus { left: 0; }

/* Small caps-spaced label used across the Iron Shield pages */
.kicker {
  font-family: var(--font-mono);
  font-size: .72rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 14px;
  display: inline-flex; align-items: center; gap: 10px;
}
.kicker::before { content: ""; width: 26px; height: 1px; background: var(--accent-line); }

/* ================================ HEADER ================================= */
.site-header {
  position: sticky; top: 0; z-index: 90;
  background: var(--bg-glass);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-1);
}
.site-header .wrap { display: flex; align-items: center; gap: 26px; height: var(--header-h); }
.brand { display: flex; align-items: center; gap: 11px; color: var(--ink-1); font-weight: 700; letter-spacing: .06em; font-size: .95rem; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand svg { flex: 0 0 auto; }
.brand small { display: block; font-family: var(--font-mono); font-weight: 500; font-size: .6rem; letter-spacing: .3em; color: var(--ink-3); }
.main-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.main-nav > .nav-item { position: relative; }
.main-nav a.nav-link, .main-nav button.nav-link {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 12px; border: 0; background: none; cursor: pointer;
  color: var(--ink-2); font-size: .88rem; border-radius: var(--radius-s);
}
.main-nav a.nav-link:hover, .main-nav button.nav-link:hover { color: var(--ink-1); background: var(--bg-3); text-decoration: none; }
.main-nav .nav-link[aria-current="true"], .main-nav .nav-link.active { color: var(--accent-strong); }
.nav-caret { font-size: .62rem; opacity: .7; }
.dropdown {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 230px;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius-m);
  padding: 8px; display: none; box-shadow: 0 14px 34px rgba(18,50,39,.14);
}
.nav-item.open .dropdown, .nav-item:focus-within .dropdown { display: block; }
@media (hover: hover) { .nav-item:hover .dropdown { display: block; } }
.dropdown a { display: block; padding: 9px 12px; border-radius: var(--radius-s); color: var(--ink-2); font-size: .88rem; }
.dropdown a:hover { background: var(--bg-3); color: var(--ink-1); text-decoration: none; }
.dropdown a.current { color: var(--accent-strong); }
.dropdown .dd-note { font-size: .7rem; color: var(--ink-4); padding: 4px 12px 6px; font-family: var(--font-mono); letter-spacing: .08em; text-transform: uppercase; }
.btn-cta {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: #fff !important; font-weight: 650; font-size: .86rem;
  padding: 10px 16px; border-radius: var(--radius-s); border: 0; cursor: pointer; white-space: nowrap;
}
.btn-cta:hover { background: var(--accent-strong); text-decoration: none; }
.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line-2); color: var(--ink-1); border-radius: var(--radius-s); padding: 8px 11px; cursor: pointer; font-size: 1rem; }

@media (max-width: 1020px) {
  .main-nav {
    display: none; position: fixed; inset: var(--header-h) 0 0 0;
    background: var(--bg-1); flex-direction: column; align-items: stretch;
    padding: 18px 22px 40px; gap: 2px; overflow-y: auto; z-index: 89;
  }
  .main-nav.open { display: flex; }
  .main-nav a.nav-link, .main-nav button.nav-link { width: 100%; justify-content: space-between; padding: 13px 12px; font-size: 1rem; }
  .dropdown { position: static; display: none; box-shadow: none; border: 0; border-left: 1px solid var(--line-2); border-radius: 0; margin: 0 0 6px 12px; padding: 0 0 0 6px; }
  .nav-item.open .dropdown { display: block; }
  .nav-toggle { display: inline-flex; }
  .site-header .btn-cta { display: none; }
  .main-nav .btn-cta { display: inline-flex; margin-top: 14px; justify-content: center; }
}

/* ================================ FOOTER ================================= */
.site-footer { border-top: 1px solid var(--line-1); background: var(--bg-1); margin-top: 70px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1fr; gap: 34px; padding: 46px 0 30px; }
.site-footer h4 { font-family: var(--font-mono); font-size: .7rem; letter-spacing: .2em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { margin: 0 0 9px; }
.site-footer li a { color: var(--ink-2); font-size: .88rem; }
.footer-blurb { font-size: .88rem; color: var(--ink-3); max-width: 340px; }
.footer-base { border-top: 1px solid var(--line-1); padding: 18px 0 26px; display: flex; flex-wrap: wrap; gap: 12px 26px; align-items: center; justify-content: space-between; font-size: .8rem; color: var(--ink-4); }
.footer-tag { font-family: var(--font-mono); letter-spacing: .28em; font-size: .68rem; color: var(--ink-3); }
.footer-legal { font-size: .74rem; color: var(--ink-4); padding-bottom: 8px; max-width: 900px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ====================== PLATFORM BAND (Tracker signature) ================ */
.platform-band { background: var(--accent); color: #fff; }
.platform-band .wrap {
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
  font-family: var(--font-mono); font-size: .64rem; letter-spacing: .26em;
  text-transform: uppercase; padding-top: 7px; padding-bottom: 7px; white-space: nowrap; overflow: hidden;
}
.platform-band .pb-spine { opacity: .82; letter-spacing: .12em; }
@media (max-width: 940px) { .platform-band .pb-spine { display: none; } }

/* Lifecycle spine motif — the platform's visual signature */
.lifecycle-spine {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px;
  font-family: var(--font-mono); font-size: .66rem; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink-3); margin-top: 22px;
}
.lifecycle-spine b { color: var(--accent); font-weight: 500; }
.lifecycle-spine .sp-dot { width: 8px; height: 8px; border: 1.5px solid var(--accent); border-radius: 50%; display: inline-block; }
.lifecycle-spine .sp-dot.fill { background: var(--accent); }

/* ================================= HERO ================================== */
.hero { padding: 64px 0 46px; position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(rgba(13,122,79,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13,122,79,.05) 1px, transparent 1px),
    radial-gradient(60% 60% at 50% 0%, rgba(13,122,79,.05), transparent 70%);
  background-size: 30px 30px, 30px 30px, auto;
  -webkit-mask-image: linear-gradient(180deg, #000 55%, transparent);
  mask-image: linear-gradient(180deg, #000 55%, transparent);
}
.hero .wrap { position: relative; }
.hero h1 em { font-style: italic; color: var(--accent-strong); }
.hero-sub { max-width: 760px; font-size: 1.06rem; color: var(--ink-2); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.btn-primary, .btn-secondary, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border-radius: var(--radius-s); padding: 12px 20px; font-size: .9rem; font-weight: 600;
  cursor: pointer; border: 1px solid transparent; min-height: 44px; white-space: nowrap;
}
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-strong); text-decoration: none; }
.btn-secondary { background: transparent; color: var(--ink-1); border-color: var(--line-2); }
.btn-secondary:hover { border-color: var(--accent-line); background: var(--accent-dim); text-decoration: none; }
.btn-ghost { background: transparent; color: var(--ink-3); border: 0; padding: 8px 10px; min-height: 36px; }
.btn-ghost:hover { color: var(--ink-1); background: var(--bg-3); text-decoration: none; }
.hero-links { display: flex; flex-wrap: wrap; gap: 6px 22px; margin-top: 18px; font-size: .86rem; }
.hero-links a { color: var(--ink-3); }
.hero-links a:hover { color: var(--accent-strong); }
.hero-disclaimer { margin-top: 30px; font-size: .78rem; color: var(--ink-4); max-width: 860px; border-left: 2px solid var(--line-2); padding-left: 14px; }

/* ============================== SECTIONS ================================= */
.section { padding: 52px 0; }
.section.alt { background: var(--bg-1); border-top: 1px solid var(--line-1); border-bottom: 1px solid var(--line-1); }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 26px; flex-wrap: wrap; }
.section-head p { color: var(--ink-3); margin: 4px 0 0; max-width: 640px; font-size: .92rem; }
.section-link { font-size: .86rem; white-space: nowrap; }

/* ============================ STAT TILES =================================
   Ledger style: rule-topped columns rather than boxed cards — a deliberate
   departure from the feed platforms' card look.                            */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px 22px; }
@media (max-width: 980px) { .stat-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 430px) { .stat-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } }
.stat {
  background: transparent; border: 0; border-top: 2px solid var(--accent);
  border-radius: 0; padding: 12px 2px 4px; position: relative;
}
.stat::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; border-bottom: 1px solid var(--line-1); }
.stat .num { font-family: var(--font-mono); font-size: 1.8rem; font-weight: 600; color: var(--heading); line-height: 1.1; }
.stat .num small { font-size: .95rem; color: var(--ink-3); }
.stat .lbl { font-size: .76rem; color: var(--ink-3); margin-top: 6px; font-family: var(--font-mono); letter-spacing: .02em; }
.stat.link-tile { cursor: pointer; transition: background .15s; }
.stat.link-tile:hover { background: var(--accent-dim); }

/* ============================== BADGES =================================== */
.badge {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--font-mono); font-size: .68rem; letter-spacing: .08em; text-transform: uppercase;
  padding: 4px 9px; border-radius: 99px; border: 1px solid var(--line-2);
  color: var(--ink-2); background: var(--bg-3); white-space: nowrap;
}
.badge .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--st-neutral); flex: 0 0 auto; }
.badge.b-neutral  { border-color: rgba(90,110,100,.4); }   .badge.b-neutral .dot  { background: var(--st-neutral); }
.badge.b-active   { border-color: rgba(23,94,158,.4); }    .badge.b-active .dot   { background: var(--st-active); }
.badge.b-open     { border-color: rgba(15,109,140,.4); }   .badge.b-open .dot     { background: var(--st-open); }
.badge.b-good     { border-color: rgba(23,116,65,.4); }    .badge.b-good .dot     { background: var(--st-good); }
.badge.b-warn     { border-color: rgba(138,94,10,.45); }   .badge.b-warn .dot     { background: var(--st-warn); }
.badge.b-bad      { border-color: rgba(176,58,46,.45); }   .badge.b-bad .dot      { background: var(--st-bad); }
.badge.b-sustain  { border-color: rgba(98,71,173,.4); }    .badge.b-sustain .dot  { background: var(--st-sustain); }
.badge.b-illustrative { border-color: rgba(138,94,10,.5); background: rgba(138,94,10,.07); color: var(--st-warn); }
.tagchip {
  display: inline-block; font-size: .72rem; color: var(--ink-3);
  border: 1px solid var(--line-1); border-radius: 99px; padding: 3px 10px; background: var(--bg-2);
}
.conf-note { font-size: .72rem; color: var(--ink-4); font-family: var(--font-mono); letter-spacing: .04em; }

/* Illustrative banner (record-level) */
.ill-banner {
  display: flex; gap: 10px; align-items: flex-start;
  background: rgba(138,94,10,.06); border: 1px solid rgba(138,94,10,.4);
  color: var(--st-warn); border-radius: var(--radius-m); padding: 12px 16px; font-size: .85rem; margin: 0 0 20px;
}

/* ============================ PROGRAM CARDS ==============================
   Dossier records: sharp corners, a vertical lifecycle rail on the left
   edge, and a monospace record reference — the Tracker's signature card.  */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 16px; }
.pcard {
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius-m);
  padding: 16px 18px 16px 30px; display: flex; flex-direction: column; gap: 12px; position: relative;
  transition: border-color .16s, box-shadow .16s;
}
.pcard:hover { border-color: var(--accent-line); box-shadow: 0 6px 18px rgba(18,50,39,.08); }
.pc-rail {
  position: absolute; left: 11px; top: 16px; bottom: 16px; width: 5px;
  display: flex; flex-direction: column; gap: 3px;
}
.pc-rail span { flex: 1; background: var(--bg-3); border-radius: 2px; }
.pc-rail span.on { background: var(--accent); }
.pc-rail.rail-bad span.on { background: var(--st-bad); }
.pc-ref { font-family: var(--font-mono); font-size: .64rem; letter-spacing: .08em; color: var(--ink-4); text-transform: uppercase; }
.pcard .pc-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.pcard .pc-flags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pcard .pc-country { font-size: .78rem; color: var(--ink-3); }
.pcard h3 { margin: 0; font-size: 1.02rem; }
.pcard h3 a { color: var(--heading); }
.pcard h3 a:hover { color: var(--accent-strong); text-decoration: none; }
.pcard .pc-auth { font-size: .76rem; color: var(--ink-4); }
.pcard .pc-sum { font-size: .85rem; color: var(--ink-2); margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.pcard .pc-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; font-size: .8rem; border-top: 1px solid var(--line-1); padding-top: 12px; }
.pcard .pc-meta dt { color: var(--ink-4); font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; font-family: var(--font-mono); }
.pcard .pc-meta dd { margin: 2px 0 0; color: var(--ink-2); }
.pcard .pc-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 4px; }
.pcard .pc-counts { font-size: .72rem; color: var(--ink-4); }
.follow-btn {
  background: none; border: 1px solid var(--line-2); color: var(--ink-3); border-radius: var(--radius-s);
  padding: 7px 11px; cursor: pointer; font-size: .78rem; display: inline-flex; gap: 6px; align-items: center; min-height: 36px;
}
.follow-btn:hover { color: var(--ink-1); border-color: var(--accent-line); }
.follow-btn.on { color: var(--accent-strong); border-color: var(--accent-line); background: var(--accent-dim); }

/* ======================== SEARCH + FILTER LAYOUT ========================= */
.searchbar {
  display: flex; gap: 10px; align-items: center;
  background: var(--bg-2); border: 1px solid var(--line-2); border-radius: var(--radius-m);
  padding: 6px 6px 6px 16px; max-width: 860px;
}
.searchbar:focus-within { border-color: var(--accent-line); }
.searchbar svg { flex: 0 0 auto; color: var(--ink-4); }
.searchbar input {
  flex: 1; background: none; border: 0; outline: none; color: var(--ink-1);
  font-size: .98rem; font-family: inherit; min-width: 0; padding: 9px 0;
}
.searchbar input::placeholder { color: var(--ink-4); }
.searchbar .btn-primary { padding: 10px 18px; min-height: 40px; }
.search-hints { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; font-size: .78rem; color: var(--ink-4); align-items: center; }
.search-hints button {
  background: var(--bg-2); border: 1px solid var(--line-1); color: var(--ink-3);
  border-radius: 99px; padding: 5px 12px; cursor: pointer; font-size: .76rem;
}
.search-hints button:hover { color: var(--ink-1); border-color: var(--accent-line); }

.browser { display: grid; grid-template-columns: 268px 1fr; gap: 26px; align-items: start; }
.browser > * { min-width: 0; }         /* guard against grid blowout from wide children */
@media (max-width: 900px) { .browser { grid-template-columns: 1fr; } }
.filters {
  background: var(--bg-2); border: 1px solid var(--line-1); border-radius: var(--radius-l);
  padding: 16px; position: sticky; top: calc(var(--header-h) + 14px);
  max-height: calc(100vh - var(--header-h) - 28px); overflow-y: auto;
}
.filters h3 { font-size: .8rem; font-family: var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); display: flex; justify-content: space-between; align-items: center; }
.filters .clear-btn { font-size: .74rem; color: var(--accent-strong); background: none; border: 0; cursor: pointer; padding: 4px; }
.fgroup { border-top: 1px solid var(--line-1); padding: 10px 0; }
.fgroup summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center;
  font-size: .84rem; color: var(--ink-1); font-weight: 600; padding: 4px 0; user-select: none;
}
.fgroup summary::-webkit-details-marker { display: none; }
.fgroup summary::after { content: "+"; color: var(--ink-4); font-family: var(--font-mono); }
.fgroup[open] summary::after { content: "–"; }
.fgroup .fopts { padding: 6px 0 4px; display: flex; flex-direction: column; gap: 2px; }
.fopt { display: flex; align-items: center; gap: 9px; font-size: .84rem; color: var(--ink-2); padding: 5px 4px; border-radius: 6px; cursor: pointer; }
.fopt:hover { background: var(--bg-3); }
.fopt input { accent-color: var(--accent); width: 15px; height: 15px; flex: 0 0 auto; }
.fopt .cnt { margin-left: auto; font-size: .7rem; color: var(--ink-4); font-family: var(--font-mono); }
.filters-open-btn { display: none; }
@media (max-width: 900px) {
  .filters {
    position: fixed; inset: 0; z-index: 120; border-radius: 0; max-height: none;
    transform: translateX(-102%); transition: transform .22s ease; padding-top: 18px;
  }
  .filters.open { transform: translateX(0); }
  .filters-open-btn { display: inline-flex; }
  aside.filters .drawer-close { display: inline-flex; }   /* element+class outranks the base rule below */
}
.filters .drawer-close { display: none; background: none; border: 1px solid var(--line-2); border-radius: var(--radius-s); color: var(--ink-1); padding: 6px 12px; cursor: pointer; }

.results-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.results-head .count { font-size: .88rem; color: var(--ink-3); }
.results-head .count strong { color: var(--ink-1); font-family: var(--font-mono); }
.sort-select {
  background: var(--bg-2); color: var(--ink-1); border: 1px solid var(--line-2); border-radius: var(--radius-s);
  padding: 9px 12px; font-size: .84rem; font-family: inherit; cursor: pointer; min-height: 40px;
}
.active-filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 14px; }
.afilter {
  display: inline-flex; align-items: center; gap: 8px; font-size: .76rem;
  background: var(--accent-dim); border: 1px solid var(--accent-line); color: var(--accent-strong);
  padding: 4px 6px 4px 11px; border-radius: 99px;
}
.afilter button { background: none; border: 0; color: inherit; cursor: pointer; font-size: .85rem; padding: 2px 5px; }
.load-more { display: flex; justify-content: center; margin-top: 26px; }
.empty-state {
  border: 1px dashed var(--line-2); border-radius: var(--radius-l); padding: 44px 24px; text-align: center; color: var(--ink-3);
}
.empty-state strong { color: var(--ink-1); display: block; margin-bottom: 6px; font-size: 1.05rem; }

/* ====================== APP SHELL + VIEW RAIL ============================
   Console layout: a dark-emerald view rail beside the workspace — the
   Tracker's chrome, shared with no other Iron Shield platform.            */
.app-shell {
  display: grid; grid-template-columns: 208px minmax(0, 1fr); gap: 30px;
  max-width: 1400px; margin: 0 auto; padding: 0 22px 30px; align-items: start;
}
.app-shell .app-main { min-width: 0; }
.app-main .wrap { max-width: none; padding: 0; }
.app-rail {
  position: sticky; top: calc(var(--header-h) + 16px);
  background: var(--rail-bg); border-radius: 10px; padding: 10px;
  display: flex; flex-direction: column; gap: 2px;
}
.app-rail .rail-title {
  font-family: var(--font-mono); font-size: .6rem; letter-spacing: .24em; text-transform: uppercase;
  color: var(--rail-ink); opacity: .7; padding: 6px 12px 10px;
}
.app-rail button {
  display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%;
  color: var(--rail-ink); background: none; border: 0; text-align: left; cursor: pointer;
  padding: 10px 12px; border-radius: 7px; min-height: 40px;
  font-family: var(--font-display); font-weight: 600; font-size: .9rem; letter-spacing: .015em;
}
.app-rail button:hover { background: rgba(255,255,255,.09); color: #fff; }
.app-rail button[aria-selected="true"] { background: #fff; color: var(--accent-strong); }
.app-rail .rail-count { font-family: var(--font-mono); font-size: .64rem; opacity: .75; font-weight: 500; }
.app-rail button[aria-selected="true"] .rail-count { opacity: 1; color: var(--accent); }
@media (max-width: 1020px) {
  .app-shell { grid-template-columns: 1fr; gap: 16px; }
  .app-rail { position: static; flex-direction: row; overflow-x: auto; scrollbar-width: thin; padding: 8px; }
  .app-rail .rail-title { display: none; }
  .app-rail button { white-space: nowrap; width: auto; min-height: 42px; padding: 9px 13px; }
}

/* Filter presets row (analyst quick scopes) */
.preset-row { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; align-items: center; }
.preset-row .pr-label { font-family: var(--font-mono); font-size: .66rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-4); }
.preset-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--bg-2); border: 1px solid var(--line-2); color: var(--ink-2);
  border-radius: 99px; padding: 6px 14px; font-size: .8rem; cursor: pointer; min-height: 36px;
}
.preset-chip:hover { border-color: var(--accent-line); color: var(--accent-strong); }
.preset-chip .px { border: 0; background: none; color: var(--ink-4); cursor: pointer; padding: 0 2px; font-size: .82rem; }
.preset-chip .px:hover { color: var(--st-bad); }

/* Results display toggle (cards / table) */
.display-toggle { display: inline-flex; border: 1px solid var(--line-2); border-radius: var(--radius-s); overflow: hidden; }
.display-toggle button { background: var(--bg-2); border: 0; color: var(--ink-3); font-size: .78rem; padding: 8px 13px; cursor: pointer; min-height: 40px; font-family: var(--font-mono); }
.display-toggle button[aria-pressed="true"] { background: var(--accent); color: #fff; }

/* Program table (analyst view) */
table.ptable { border-collapse: collapse; width: 100%; min-width: 900px; font-size: .84rem; background: var(--bg-2); }
.ptable th {
  text-align: left; font-family: var(--font-mono); font-size: .64rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-3); background: var(--bg-3); padding: 10px 12px; white-space: nowrap;
}
.ptable td { padding: 11px 12px; border-top: 1px solid var(--line-1); vertical-align: top; color: var(--ink-2); }
.ptable tr:hover td { background: var(--accent-dim); }
.ptable td a { color: var(--heading); font-weight: 600; font-family: var(--font-display); font-size: .95rem; }
.ptable .t-upd { color: var(--st-active); font-family: var(--font-mono); font-size: .7rem; white-space: nowrap; }
.ptable .t-days { font-family: var(--font-mono); font-size: .74rem; white-space: nowrap; }
.ptable .t-days.soon { color: var(--st-warn); font-weight: 600; }

/* "Updated since last visit" marker */
.upd-chip { display: inline-flex; align-items: center; gap: 5px; font-family: var(--font-mono); font-size: .62rem; letter-spacing: .08em; color: var(--st-active); border: 1px solid rgba(23,94,158,.4); border-radius: 99px; padding: 3px 9px; text-transform: uppercase; }
.upd-chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--st-active); }

/* Desk action queue */
.queue-item { display: grid; grid-template-columns: 92px 1fr auto; gap: 6px 14px; align-items: baseline; background: var(--bg-2); border: 1px solid var(--line-1); border-radius: var(--radius-s); padding: 11px 14px; font-size: .86rem; }
.queue-item.blocked { border-left: 3px solid var(--st-bad); }
.queue-item .q-due { font-family: var(--font-mono); font-size: .74rem; color: var(--ink-1); }
.queue-item .q-due.overdue { color: var(--st-bad); font-weight: 600; }
.queue-item .q-prog { color: var(--ink-4); font-size: .76rem; display: block; }
.queue-item .q-meta { font-family: var(--font-mono); font-size: .68rem; color: var(--ink-3); white-space: nowrap; }
@media (max-width: 640px) { .queue-item { grid-template-columns: 1fr; } }

/* Legacy horizontal tab styles retired in v06 (replaced by .app-rail). */
.viewbar { display: none; }

/* =============================== CHARTS ================================== */
.chart-panel { background: var(--bg-2); border: 1px solid var(--line-1); border-radius: var(--radius-l); padding: 20px; }
.chart-panel h3 { font-size: .92rem; margin-bottom: 4px; }
.chart-panel .sub { font-size: .76rem; color: var(--ink-4); margin-bottom: 16px; }
.hbar-row { display: grid; grid-template-columns: 150px 1fr 44px; gap: 12px; align-items: center; padding: 5px 0; font-size: .82rem; }
.hbar-row .hb-label { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: right; }
.hbar-row .hb-track { background: var(--bg-3); border-radius: 4px; height: 14px; position: relative; overflow: hidden; }
.hbar-row .hb-fill { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 4px 4px 4px 4px; min-width: 2px; }
.hbar-row .hb-val { font-family: var(--font-mono); color: var(--ink-3); font-size: .76rem; }
.hbar-row.clickable { cursor: pointer; border-radius: 6px; }
.hbar-row.clickable:hover { background: var(--bg-3); }
@media (max-width: 560px) { .hbar-row { grid-template-columns: 108px 1fr 40px; } }
@media (max-width: 900px) { #chartsRow { grid-template-columns: 1fr !important; } }

/* ============================ CHANGE FEED ================================ */
.feed { display: flex; flex-direction: column; gap: 10px; }
.feed-item {
  display: grid; grid-template-columns: 96px auto 1fr; gap: 14px; align-items: baseline;
  background: var(--bg-2); border: 1px solid var(--line-1); border-radius: var(--radius-m); padding: 13px 16px;
  font-size: .86rem;
}
.feed-item .fdate { font-family: var(--font-mono); font-size: .74rem; color: var(--ink-4); white-space: nowrap; }
.feed-item .ftext a { color: var(--ink-1); font-weight: 600; }
.feed-item .ftext .fsub { color: var(--ink-3); font-size: .8rem; display: block; }
@media (max-width: 640px) { .feed-item { grid-template-columns: 1fr; gap: 6px; } }

/* ============================== AGENDA =================================== */
.agenda { display: flex; flex-direction: column; gap: 0; }
.agenda-month { font-family: var(--font-mono); font-size: .74rem; letter-spacing: .18em; text-transform: uppercase; color: var(--ink-3); padding: 22px 0 10px; border-bottom: 1px solid var(--line-1); margin-bottom: 6px; }
.agenda-item { display: grid; grid-template-columns: 74px auto 1fr auto; gap: 14px; align-items: center; padding: 12px 8px; border-bottom: 1px solid var(--line-1); font-size: .88rem; }
.agenda-item:hover { background: var(--bg-2); }
.agenda-item .ad-date { font-family: var(--font-mono); color: var(--ink-1); font-size: .82rem; }
.agenda-item .ad-what a { color: var(--ink-1); font-weight: 600; }
.agenda-item .ad-prog { color: var(--ink-3); font-size: .8rem; }
.agenda-item .ad-days { font-family: var(--font-mono); font-size: .74rem; color: var(--ink-3); white-space: nowrap; }
@media (max-width: 700px) { .agenda-item { grid-template-columns: 64px 1fr; row-gap: 4px; } .agenda-item .ad-days { grid-column: 2; } }

/* ============================ DETAIL PAGE ================================ */
.detail-head {
  padding: 40px 0 26px; border-bottom: 1px solid var(--line-1); position: relative;
  background:
    linear-gradient(rgba(13,122,79,.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(13,122,79,.04) 1px, transparent 1px),
    linear-gradient(180deg, var(--bg-1), var(--bg-0));
  background-size: 30px 30px, 30px 30px, auto;
}
.crumbs { font-size: .78rem; color: var(--ink-4); margin-bottom: 18px; }
.crumbs a { color: var(--ink-3); }
.detail-title-row { display: flex; align-items: flex-start; gap: 18px; justify-content: space-between; flex-wrap: wrap; }
.detail-title-row h1 { font-size: clamp(1.45rem, 3vw, 2.15rem); max-width: 820px; }
.detail-sub { color: var(--ink-3); font-size: .88rem; display: flex; flex-wrap: wrap; gap: 5px 16px; }
.detail-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.detail-badges { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0 0; }
.detail-layout { display: grid; grid-template-columns: 1fr 320px; gap: 34px; align-items: start; padding-top: 34px; }
.detail-layout > * { min-width: 0; }   /* let nested scroll containers (matrix table) scroll instead of blowing out the grid */
@media (max-width: 1000px) { .detail-layout { grid-template-columns: 1fr; } }
.detail-aside { position: sticky; top: calc(var(--header-h) + 16px); display: flex; flex-direction: column; gap: 16px; }
@media (max-width: 1000px) { .detail-aside { position: static; } }
.panel { background: var(--bg-2); border: 1px solid var(--line-1); border-radius: var(--radius-l); padding: 20px; }
.panel h3 { font-size: .8rem; font-family: var(--font-mono); letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 14px; }
.snapshot dl { margin: 0; display: grid; grid-template-columns: 1fr; gap: 10px; }
.snapshot dt { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-4); font-family: var(--font-mono); }
.snapshot dd { margin: 1px 0 0; font-size: .88rem; color: var(--ink-1); }
.snapshot dd .qual { color: var(--ink-3); font-size: .76rem; }
.dsection { margin-bottom: 44px; scroll-margin-top: calc(var(--header-h) + 20px); }
.detail-layout > div:first-child { counter-reset: dsec; }   /* numbered dossier sections */
.dsection > h2 { font-size: 1.25rem; padding-bottom: 10px; border-bottom: 1px solid var(--line-1); margin-bottom: 18px; display: flex; align-items: baseline; justify-content: flex-start; gap: 12px; flex-wrap: wrap; }
.dsection > h2 .h-note { margin-left: auto; }
.dsection > h2::before {
  counter-increment: dsec; content: counter(dsec, decimal-leading-zero);
  font-family: var(--font-mono); font-size: .78rem; font-weight: 500; letter-spacing: .12em;
  color: var(--accent); margin-right: 4px;
}
.dsection > h2 .h-note { font-size: .74rem; color: var(--ink-4); font-weight: 400; font-family: var(--font-mono); }
.toc { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 8px; }
.toc a { font-size: .78rem; color: var(--ink-3); border: 1px solid var(--line-1); padding: 5px 12px; border-radius: 99px; background: var(--bg-2); }
.toc a:hover { color: var(--accent-strong); border-color: var(--accent-line); text-decoration: none; }

/* Executive summary fact list */
.fact-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.fact-list li { display: flex; gap: 12px; align-items: baseline; font-size: .92rem; }
.stmt {
  flex: 0 0 auto; font-family: var(--font-mono); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 4px; border: 1px solid var(--line-2); color: var(--ink-3); white-space: nowrap;
}
.stmt.s-confirmed, .stmt.s-published { color: var(--st-good); border-color: rgba(23,116,65,.4); }
.stmt.s-announced { color: var(--st-active); border-color: rgba(23,94,158,.4); }
.stmt.s-reported { color: var(--st-warn); border-color: rgba(138,94,10,.4); }
.stmt.s-expected, .stmt.s-estimated, .stmt.s-assessed { color: var(--st-sustain); border-color: rgba(98,71,173,.4); }
.stmt.s-unknown { color: var(--ink-4); }

/* Lifecycle strip */
.lifecycle { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin: 8px 0 6px; }
.lc-step { text-align: center; position: relative; }
.lc-step .lc-bar { height: 6px; border-radius: 3px; background: var(--bg-3); border: 1px solid var(--line-1); margin-bottom: 8px; }
.lc-step.done .lc-bar { background: rgba(23,116,65,.4); border-color: rgba(23,116,65,.4); }
.lc-step.current .lc-bar { background: var(--accent); border-color: var(--accent); box-shadow: 0 0 8px rgba(13,122,79,.35); }
.lc-step.next .lc-bar { background: repeating-linear-gradient(90deg, rgba(13,122,79,.2) 0 6px, transparent 6px 11px); border-color: var(--accent-line); }
.lc-step.state-bad .lc-bar { background: rgba(176,58,46,.45); border-color: rgba(176,58,46,.45); }
.lc-step .lc-lbl { font-size: .68rem; color: var(--ink-3); font-family: var(--font-mono); letter-spacing: .04em; text-transform: uppercase; }
.lc-step.current .lc-lbl { color: var(--accent-strong); font-weight: 600; }
.lc-legend { font-size: .74rem; color: var(--ink-4); display: flex; gap: 18px; flex-wrap: wrap; margin-top: 10px; }
@media (max-width: 640px) {
  .lifecycle { grid-template-columns: repeat(7, minmax(64px, 1fr)); overflow-x: auto; padding-bottom: 6px; }
}
.stage-detail-line { font-size: .88rem; color: var(--ink-2); margin-top: 12px; }

/* Timeline */
.tl-filters { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 18px; }
.tl-filters button {
  background: var(--bg-2); border: 1px solid var(--line-1); color: var(--ink-3); font-size: .76rem;
  padding: 5px 12px; border-radius: 99px; cursor: pointer;
}
.tl-filters button[aria-pressed="true"] { color: var(--accent-strong); border-color: var(--accent-line); background: var(--accent-dim); }
.timeline { list-style: none; margin: 0; padding: 0 0 0 18px; border-left: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 20px; }
.tl-item { position: relative; padding-left: 16px; }
.tl-item::before {
  content: ""; position: absolute; left: -22.5px; top: 6px; width: 9px; height: 9px; border-radius: 50%;
  background: var(--st-neutral); border: 2px solid var(--bg-0);
}
.tl-item.t-award::before { background: var(--st-good); }
.tl-item.t-delivery::before { background: var(--st-good); }
.tl-item.t-procurement::before { background: var(--st-open); }
.tl-item.t-engagement::before { background: var(--st-active); }
.tl-item.t-funding::before { background: var(--st-warn); }
.tl-item.t-policy::before { background: var(--st-neutral); }
.tl-item.t-change::before { background: var(--st-bad); }
.tl-item.future { opacity: .78; }
.tl-item .tl-date { font-family: var(--font-mono); font-size: .74rem; color: var(--ink-4); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.tl-item h4 { margin: 3px 0 4px; font-size: .95rem; }
.tl-item p { font-size: .85rem; color: var(--ink-2); margin: 0 0 4px; }
.tl-item .tl-src { font-size: .76rem; }

/* Requirements */
.req-cat { margin-bottom: 20px; }
.req-cat h4 { font-size: .84rem; color: var(--ink-1); margin-bottom: 10px; display: flex; align-items: center; gap: 8px; }
.req-cat h4 .cnt { font-family: var(--font-mono); font-size: .68rem; color: var(--ink-4); font-weight: 400; }
.req-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.req-list li { display: flex; gap: 12px; align-items: baseline; font-size: .88rem; background: var(--bg-2); border: 1px solid var(--line-1); border-radius: var(--radius-s); padding: 10px 13px; }

/* Checklist */
.check-summary { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; margin-bottom: 18px; }
.progress-wrap { flex: 1 1 260px; }
.progress-track { background: var(--bg-3); border-radius: 99px; height: 10px; overflow: hidden; border: 1px solid var(--line-1); }
.progress-fill { height: 100%; background: linear-gradient(90deg, var(--accent), var(--st-good)); border-radius: 99px; transition: width .3s; min-width: 0; }
.progress-lbl { font-size: .78rem; color: var(--ink-3); margin-top: 6px; font-family: var(--font-mono); }
.check-cat { border: 1px solid var(--line-1); border-radius: var(--radius-m); margin-bottom: 12px; background: var(--bg-2); overflow: hidden; }
.check-cat > summary {
  cursor: pointer; list-style: none; padding: 14px 18px; display: flex; justify-content: space-between; gap: 12px; align-items: center;
  font-weight: 600; color: var(--ink-1); font-size: .92rem; user-select: none;
}
.check-cat > summary::-webkit-details-marker { display: none; }
.check-cat > summary .cat-prog { font-family: var(--font-mono); font-size: .74rem; color: var(--ink-3); font-weight: 400; }
.check-item { border-top: 1px solid var(--line-1); padding: 12px 18px; display: grid; grid-template-columns: auto 1fr auto; gap: 8px 14px; align-items: center; }
.check-item .ci-text { font-size: .88rem; color: var(--ink-2); }
.check-item.status-complete .ci-text { color: var(--ink-4); text-decoration: line-through; text-decoration-color: var(--ink-4); }
.check-item .ci-status {
  background: var(--bg-3); color: var(--ink-2); border: 1px solid var(--line-2); border-radius: var(--radius-s);
  font-size: .76rem; padding: 6px 8px; font-family: inherit; cursor: pointer; min-height: 34px;
}
.check-item .ci-more-btn { background: none; border: 0; color: var(--ink-4); cursor: pointer; font-size: .74rem; padding: 4px 6px; }
.check-item .ci-more-btn:hover { color: var(--accent-strong); }
.check-item .ci-extra { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-top: 8px; }
.check-item .ci-extra label { font-size: .68rem; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-4); font-family: var(--font-mono); display: block; margin-bottom: 4px; }
.check-item .ci-extra input, .check-item .ci-extra textarea, .check-item .ci-extra select {
  width: 100%; background: var(--bg-3); border: 1px solid var(--line-2); border-radius: var(--radius-s);
  color: var(--ink-1); font-family: inherit; font-size: .82rem; padding: 8px 10px;
}
.check-item .ci-extra textarea { resize: vertical; min-height: 54px; grid-column: 1 / -1; }
.check-item .ci-flag { accent-color: var(--st-bad); }
.check-item.blocked { border-left: 3px solid var(--st-bad); }
@media (max-width: 620px) { .check-item { grid-template-columns: 1fr; } .check-item .ci-extra { grid-template-columns: 1fr; } }
.check-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.check-note { font-size: .76rem; color: var(--ink-4); border-left: 2px solid var(--line-2); padding-left: 12px; margin-top: 16px; }

/* Compliance matrix */
.table-scroll { overflow-x: auto; border: 1px solid var(--line-1); border-radius: var(--radius-m); }
table.matrix { border-collapse: collapse; width: 100%; min-width: 780px; font-size: .82rem; }
.matrix th {
  text-align: left; font-family: var(--font-mono); font-size: .66rem; letter-spacing: .1em; text-transform: uppercase;
  color: var(--ink-3); background: var(--bg-3); padding: 10px 12px; position: sticky; top: 0;
}
.matrix td { padding: 10px 12px; border-top: 1px solid var(--line-1); vertical-align: top; color: var(--ink-2); }
.matrix tr:hover td { background: var(--bg-3); }
.matrix .mand { font-family: var(--font-mono); font-size: .7rem; }
.matrix select, .matrix input {
  background: var(--bg-3); border: 1px solid var(--line-2); color: var(--ink-1); border-radius: var(--radius-s);
  font-size: .78rem; padding: 6px 8px; font-family: inherit; max-width: 170px;
}
.matrix-stats { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0; }
.mstat { font-size: .78rem; color: var(--ink-3); background: var(--bg-2); border: 1px solid var(--line-1); border-radius: 99px; padding: 6px 14px; }
.mstat strong { color: var(--ink-1); font-family: var(--font-mono); }

/* Assessment */
.assess-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.assess-cell { background: var(--bg-2); border: 1px solid var(--line-1); border-radius: var(--radius-m); padding: 14px; }
.assess-cell .a-dim { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-4); font-family: var(--font-mono); margin-bottom: 8px; }
.assess-cell .a-band { font-weight: 650; color: var(--ink-1); font-size: .9rem; margin-bottom: 6px; }
.assess-cell .a-note { font-size: .76rem; color: var(--ink-3); }
.assess-factors { font-size: .85rem; color: var(--ink-2); }

/* Tender rows / doc rows / news rows / org rows */
.row-list { display: flex; flex-direction: column; gap: 12px; }
.row-item { background: var(--bg-2); border: 1px solid var(--line-1); border-radius: var(--radius-m); padding: 15px 18px; display: flex; flex-direction: column; gap: 8px; }
.row-item .ri-top { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; flex-wrap: wrap; }
.row-item h4 { margin: 0; font-size: .95rem; }
.ri-meta { font-size: .78rem; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 4px 16px; }
.ri-meta .m { white-space: nowrap; }
@media (max-width: 700px) { .ri-meta .m { white-space: normal; } }  /* long authority names must wrap on phones */
.ri-note { font-size: .82rem; color: var(--ink-2); }
.deadline-chip { font-family: var(--font-mono); font-size: .72rem; padding: 4px 10px; border-radius: 99px; border: 1px solid var(--line-2); color: var(--ink-2); white-space: nowrap; }
.deadline-chip.soon { color: var(--st-warn); border-color: rgba(217,164,65,.5); }
.deadline-chip.past { color: var(--ink-4); }
.org-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 720px) { .org-grid { grid-template-columns: 1fr; } }
.org-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.org-list li { display: flex; justify-content: space-between; gap: 12px; font-size: .86rem; background: var(--bg-2); border: 1px solid var(--line-1); border-radius: var(--radius-s); padding: 10px 14px; align-items: center; flex-wrap: wrap; }
.org-list .o-role { font-size: .72rem; color: var(--ink-3); font-family: var(--font-mono); letter-spacing: .04em; }

/* Risks */
.risk-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.risk-list li { display: flex; gap: 12px; align-items: baseline; font-size: .88rem; background: var(--bg-2); border: 1px solid var(--line-1); border-left: 3px solid var(--st-warn); border-radius: var(--radius-s); padding: 11px 14px; }
.risk-list li.k-confirmed { border-left-color: var(--st-bad); }
.risk-list li.k-reported { border-left-color: var(--st-warn); }
.risk-list li.k-watch { border-left-color: var(--st-neutral); }
.risk-kind { flex: 0 0 auto; font-family: var(--font-mono); font-size: .62rem; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); padding-top: 2px; white-space: nowrap; }

/* Next actions */
.next-list { list-style: none; counter-reset: na; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.next-list li { counter-increment: na; display: flex; gap: 14px; align-items: baseline; font-size: .9rem; background: var(--bg-2); border: 1px solid var(--line-1); border-radius: var(--radius-s); padding: 11px 15px; }
.next-list li::before { content: counter(na, decimal-leading-zero); font-family: var(--font-mono); color: var(--accent); font-size: .78rem; }

/* Update log */
.ulog { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ulog li { font-size: .86rem; background: var(--bg-2); border: 1px solid var(--line-1); border-radius: var(--radius-s); padding: 12px 15px; }
.ulog .ul-date { font-family: var(--font-mono); font-size: .72rem; color: var(--ink-4); margin-right: 12px; }
.ulog .ul-vals { display: flex; gap: 10px; flex-wrap: wrap; font-size: .78rem; margin-top: 6px; }
.ulog .ul-prev { color: var(--ink-4); text-decoration: line-through; }
.ulog .ul-curr { color: var(--st-good); }

/* Related programs */
.related-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.rel-card { background: var(--bg-2); border: 1px solid var(--line-1); border-radius: var(--radius-m); padding: 15px; font-size: .85rem; }
.rel-card a { color: var(--ink-1); font-weight: 600; }
.rel-card .rel-why { color: var(--ink-3); font-size: .78rem; margin-top: 6px; }

/* Compare */
.compare-bar {
  position: fixed; left: 50%; transform: translateX(-50%); bottom: 18px; z-index: 80;
  background: var(--bg-3); border: 1px solid var(--accent-line); border-radius: 99px;
  padding: 10px 12px 10px 20px; display: none; align-items: center; gap: 14px; box-shadow: 0 14px 34px rgba(18,50,39,.18);
  font-size: .84rem; color: var(--ink-1); max-width: calc(100vw - 30px);
}
.compare-bar.show { display: flex; }
.compare-cols { display: grid; gap: 14px; }
.compare-card { background: var(--bg-2); border: 1px solid var(--line-1); border-radius: var(--radius-l); padding: 18px; }
.compare-card h3 { font-size: .98rem; }
.compare-card dl { margin: 0; }
.compare-card dt { font-size: .66rem; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-4); font-family: var(--font-mono); margin-top: 12px; }
.compare-card dd { margin: 2px 0 0; font-size: .85rem; color: var(--ink-2); }

/* Watchlist / saved */
.watch-pref-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.toast {
  position: fixed; bottom: 22px; right: 22px; z-index: 150;
  background: var(--bg-3); color: var(--ink-1); border: 1px solid var(--accent-line);
  border-radius: var(--radius-m); padding: 12px 18px; font-size: .86rem;
  box-shadow: 0 12px 30px rgba(18,50,39,.16); opacity: 0; transform: translateY(8px); transition: opacity .2s, transform .2s;
  pointer-events: none; max-width: min(90vw, 380px);
}
.toast.show { opacity: 1; transform: translateY(0); }

/* Landing-page extras */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 34px; align-items: center; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; } }
.numbered-steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; counter-reset: step; }
@media (max-width: 860px) { .numbered-steps { grid-template-columns: 1fr; } }
.numbered-steps li { counter-increment: step; background: var(--bg-2); border: 1px solid var(--line-1); border-radius: var(--radius-l); padding: 22px; }
.numbered-steps li::before { content: "0" counter(step); font-family: var(--font-mono); color: var(--accent); font-size: .8rem; letter-spacing: .16em; display: block; margin-bottom: 12px; }
.numbered-steps h3 { font-size: 1rem; }
.numbered-steps p { font-size: .86rem; color: var(--ink-3); margin: 0; }
.plat-links { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 980px) { .plat-links { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .plat-links { grid-template-columns: 1fr; } }
.plat-card { background: var(--bg-2); border: 1px solid var(--line-1); border-radius: var(--radius-l); padding: 20px; font-size: .84rem; color: var(--ink-3); }
.plat-card .pl-label { font-family: var(--font-mono); font-size: .64rem; letter-spacing: .18em; text-transform: uppercase; color: var(--accent); display: block; margin-bottom: 10px; }
.plat-card h3 { font-size: 1rem; margin-bottom: 8px; }
.plat-card.current { border-color: var(--accent-line); background: linear-gradient(180deg, var(--accent-dim), var(--bg-2) 60%); }

/* Operational-context callout (editorial note cross-linking Lurker) */
.op-context {
  background: var(--accent-dim); border: 1px solid var(--accent-line);
  border-left: 3px solid var(--accent); border-radius: var(--radius-m);
  padding: 16px 20px; font-size: .92rem; color: var(--ink-2);
}
.op-context .oc-kicker {
  font-family: var(--font-mono); font-size: .64rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent); display: block; margin-bottom: 8px;
}
.op-context p { margin: 0 0 10px; }
.op-context .conf-note { display: block; border-top: 1px solid var(--accent-line); padding-top: 10px; margin-top: 4px; }

/* Legal / info blocks */
.legal-block { font-size: .8rem; color: var(--ink-3); border: 1px solid var(--line-1); background: var(--bg-2); border-radius: var(--radius-m); padding: 18px 20px; }
.legal-block h3 { font-size: .78rem; font-family: var(--font-mono); letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); }
.legal-block p:last-child { margin-bottom: 0; }

/* ============================== PRINT ==================================== */
@media print {
  :root { --bg-0: #fff; --bg-1: #fff; --bg-2: #fff; --bg-3: #f2f2f2; --ink-1: #111; --ink-2: #222; --ink-3: #555; --ink-4: #777; --line-1: #ccc; --line-2: #aaa; }
  body { background: #fff; color: #222; font-size: 11pt; }
  .site-header, .site-footer, .detail-actions, .toc, .compare-bar, .toast, .filters, .viewbar, .check-tools, .nav-toggle, .hero-actions, .follow-btn { display: none !important; }
  .panel, .pcard, .row-item, .check-cat { border-color: #ccc; break-inside: avoid; }
  a { color: #111; text-decoration: none; }
  .detail-layout { grid-template-columns: 1fr; }
  .print-only { display: block !important; }
}
.print-only { display: none; }
