/* Long Thành Night Operations — Mission Control UI */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 20px);
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
body.mc-body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(900px 480px at 10% -10%, rgba(56, 167, 255, 0.08), transparent 55%),
    radial-gradient(700px 400px at 90% 0%, rgba(246, 183, 60, 0.05), transparent 50%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-2) 45%, var(--bg) 100%);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--amber);
  color: #050a12;
  padding: 8px 12px;
  z-index: 100;
  font-weight: 700;
}
.skip:focus {
  left: 8px;
  top: 8px;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}
.shell {
  width: 100%;
  max-width: var(--max, 1800px);
  margin: 0 auto;
  padding: 10px 16px calc(var(--bottom-nav-h) + 28px);
  box-sizing: border-box;
}
@media (min-width: 960px) {
  .shell {
    padding: 14px 28px 48px;
  }
}
@media (min-width: 1440px) {
  .shell {
    padding-left: 36px;
    padding-right: 36px;
  }
}
@media (min-width: 1800px) {
  .shell {
    padding-left: 40px;
    padding-right: 40px;
  }
}

/* ---- Topbar ---- */
.mc-topbar {
  position: sticky;
  top: 8px;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: var(--header-h);
  padding: 8px 12px;
  margin-bottom: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--glass-bg-strong);
  box-shadow: var(--shadow-sm);
  backdrop-filter: var(--glass-blur);
  -webkit-backdrop-filter: var(--glass-blur);
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: inherit;
  min-height: 44px;
}
.logo {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  background: linear-gradient(145deg, var(--amber), var(--orange));
  color: #050a12;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.02em;
  box-shadow: var(--glow-amber);
}
.brand b {
  display: block;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--ink);
  line-height: 1.1;
}
.brand-tag {
  display: none;
  color: var(--ink-faint);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
@media (min-width: 720px) {
  .brand-tag {
    display: block;
  }
}
.nav-desktop {
  display: none;
  gap: 2px;
  flex-wrap: wrap;
}
@media (min-width: 1100px) {
  .nav-desktop {
    display: flex;
  }
  .menu-btn {
    display: none;
  }
}
.nav a {
  color: var(--ink-muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
  min-height: 40px;
  padding: 8px 12px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
}
.nav a:hover,
.nav a:focus-visible {
  color: var(--gold);
  background: rgba(246, 183, 60, 0.1);
  outline: none;
  box-shadow: var(--glow-amber);
}
.header-status {
  display: flex;
  align-items: center;
  gap: 6px;
}
.live {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  max-width: min(48vw, 240px);
  padding: 4px 10px 4px 8px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--success) 40%, var(--line));
  background: var(--success-soft);
  color: var(--success);
  font-size: 11px;
  white-space: nowrap;
}
.live.live {
  box-shadow: var(--glow-live);
}
.live b {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
}
.live-detail {
  font-size: 11px;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  color: inherit;
  opacity: 0.95;
}
@media (max-width: 520px) {
  .live-detail {
    display: none;
  }
}
.live.stale {
  color: var(--warning);
  border-color: color-mix(in srgb, var(--warning) 40%, var(--line));
  background: var(--warning-soft);
  box-shadow: none;
}
.live.offline,
.live.fallback {
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 40%, var(--line));
  background: var(--danger-soft);
  box-shadow: none;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--success);
  flex: 0 0 auto;
}
.live.live .dot {
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 50%, transparent);
  animation: livePing 2.4s ease-out infinite;
}
@media (prefers-reduced-motion: reduce) {
  .live.live .dot {
    animation: none;
  }
}
@keyframes livePing {
  0% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--success) 45%, transparent);
  }
  70% {
    box-shadow: 0 0 0 8px transparent;
  }
  100% {
    box-shadow: 0 0 0 0 transparent;
  }
}
.live.stale .dot {
  background: var(--warning);
}
.live.offline .dot,
.live.fallback .dot {
  background: var(--danger);
}
.icon-btn {
  min-width: 44px;
  min-height: 44px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  cursor: pointer;
  font-size: 16px;
  font-family: inherit;
  display: inline-grid;
  place-items: center;
}
.icon-btn:hover,
.icon-btn:focus-visible {
  border-color: color-mix(in srgb, var(--amber) 40%, var(--line));
  color: var(--gold);
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* ---- Sections ---- */
.section,
.mc-section {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 16px;
  margin-top: 14px;
  box-shadow: var(--shadow-sm);
  scroll-margin-top: calc(var(--header-h) + 16px);
  color: var(--ink);
  height: auto;
}
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.section-title {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.4vw, 1.75rem);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--ink);
  line-height: 1.15;
}
.section-desc,
.fresh,
.section-note,
.conn-note,
.muted {
  margin: 0;
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 400;
  line-height: 1.45;
}
.text-link {
  color: var(--gold);
  font-weight: 600;
  text-decoration: none;
}
.text-link:hover {
  text-decoration: underline;
}

/* ---- Mission Control Hero ---- */
.mc-hero {
  position: relative;
  overflow: hidden;
  padding: 0 !important;
  border-color: color-mix(in srgb, var(--amber) 22%, var(--line));
}
.mc-hero-bg {
  position: absolute;
  inset: 0;
  background:
    var(--hero-overlay),
    url("/assets/long-thanh.webp") center / cover no-repeat;
  z-index: 0;
}
.mc-hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 16px;
  padding: 20px 18px 12px;
}
@media (min-width: 900px) {
  .mc-hero-grid {
    grid-template-columns: 1.15fr 1fr;
    padding: 28px 28px 14px;
    gap: 24px;
    align-items: stretch;
  }
}
.mc-kicker {
  margin: 0 0 6px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--amber);
}
.mc-title {
  margin: 0 0 6px;
  font-family: var(--font-display);
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 0.98;
  color: var(--ink);
  text-transform: uppercase;
}
.mc-sub {
  margin: 0 0 18px;
  color: var(--ink-muted);
  font-size: 14px;
  font-weight: 500;
}
.mc-primary-kpi {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  border-radius: var(--radius);
  border: 1px solid color-mix(in srgb, var(--amber) 35%, var(--line));
  background: var(--kpi-panel-bg, rgba(16, 30, 48, 0.72));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
  color: var(--ink);
}
.mc-kpi-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.mc-kpi-num,
.score-value {
  font-family: var(--font-mono);
  font-size: clamp(1.85rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.mc-hero-stats .score-value {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  color: var(--gold);
}
.mc-kpi-meta {
  font-size: 13px;
  color: var(--ink-muted);
}
.mc-bar.bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 99px;
  overflow: hidden;
  margin: 6px 0;
}
.bar i {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--amber), var(--gold), var(--success));
}
.mc-hero-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}
.mc-stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 108px;
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--stat-panel-bg, rgba(13, 24, 40, 0.78));
  text-decoration: none;
  color: var(--ink);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.mc-stat:hover,
.mc-stat:focus-visible {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--amber) 40%, var(--line));
  box-shadow: var(--glow-amber);
  outline: none;
}
.mc-stat-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.mc-stat-meta {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: auto;
}
.score-trial {
  border-top: 2px solid var(--brand);
}
.score-launch {
  border-top: 2px solid var(--success);
}
.score-warn {
  border-top: 2px solid var(--warning);
}
.mc-sync-strip {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 10px 18px 14px;
  font-size: 12px;
  font-weight: 500;
  color: var(--ink-muted);
  border-top: 1px solid var(--line);
  background: var(--sync-strip-bg, rgba(5, 10, 18, 0.45));
}
.dot-sep {
  margin: 0 6px;
  opacity: 0.5;
}
.btn-ghost {
  align-self: flex-start;
  margin-top: 6px;
  min-height: 36px;
  padding: 6px 10px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.btn-ghost:hover {
  border-color: var(--amber);
}

/* Stale badge */
.stale-badge {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  align-self: flex-start;
  padding: 3px 8px;
  border-radius: 999px;
  background: var(--warning-soft);
  color: var(--warning);
  border: 1px solid color-mix(in srgb, var(--warning) 40%, var(--line));
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  cursor: help;
}
.stale-badge.is-critical {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 40%, var(--line));
}
.stale-badge[hidden],
.stale-tooltip[hidden] {
  display: none !important;
}
.stale-tooltip {
  display: block;
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--ink);
  color: var(--bg);
  font-size: 12px;
  line-height: 1.4;
  max-width: 36ch;
}
html[data-color-mode="dark"] .stale-tooltip {
  background: #eef3fb;
  color: #050a12;
}

/* ---- Flow Rail ---- */
.flow-rail {
  display: flex;
  gap: 0;
  overflow-x: auto;
  padding: 8px 4px 16px;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
}
@media (max-width: 799px) {
  .flow-rail {
    flex-direction: column;
    overflow: visible;
    scroll-snap-type: none;
    gap: 0;
  }
}
.flow-node {
  position: relative;
  flex: 0 0 min(200px, 72vw);
  scroll-snap-align: start;
  padding: 14px 14px 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  min-height: 148px;
  cursor: pointer;
  text-align: left;
  color: inherit;
  font: inherit;
  transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s;
}
@media (max-width: 799px) {
  .flow-node {
    flex: 1 1 auto;
    width: 100%;
    min-height: 0;
  }
}
.flow-node:hover,
.flow-node:focus-visible {
  border-color: color-mix(in srgb, var(--amber) 45%, var(--line));
  transform: translateY(-2px);
  box-shadow: var(--glow-amber);
  outline: none;
}
.flow-node + .flow-node {
  margin-left: 12px;
}
@media (max-width: 799px) {
  .flow-node + .flow-node {
    margin-left: 0;
    margin-top: 10px;
  }
}
.flow-node::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -13px;
  width: 12px;
  height: 2px;
  background: linear-gradient(90deg, var(--line-strong), transparent);
  z-index: 1;
}
@media (max-width: 799px) {
  .flow-node::after {
    display: none;
  }
}
.flow-node:last-child::after {
  display: none;
}
.flow-step {
  font-family: var(--font-display);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  color: var(--amber);
  margin-bottom: 6px;
}
.flow-icon {
  font-size: 18px;
  margin-bottom: 4px;
}
.flow-title {
  margin: 0 0 6px;
  font-size: 15px;
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
}
.flow-status {
  display: inline-flex;
  min-height: 22px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  margin-bottom: 6px;
}
.flow-status.in-progress {
  background: var(--brand-soft);
  color: var(--brand-strong);
}
.flow-status.planned {
  background: rgba(155, 123, 255, 0.15);
  color: var(--purple);
}
.flow-status.at-risk {
  background: var(--warning-soft);
  color: var(--warning);
}
.flow-status.not-verified {
  background: rgba(170, 183, 199, 0.16);
  color: #c5d0dc;
}
.flow-status.ready {
  background: var(--success-soft);
  color: var(--success);
}
.flow-meta {
  font-size: 12px;
  color: var(--ink-muted);
  line-height: 1.4;
}
.flow-hint {
  margin-top: 4px;
}

/* ---- Intel strip / What Changed ---- */
.intel-strip {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}
@media (min-width: 720px) {
  .intel-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1100px) {
  .intel-strip {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.intel-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 12px 14px;
  min-height: 96px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-2);
  text-decoration: none;
  color: inherit;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.intel-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--brand) 40%, var(--line));
  box-shadow: var(--shadow-sm);
}
.intel-card-title {
  margin: 0;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
}
.intel-card-meta {
  margin-top: auto;
  font-size: 11px;
  font-weight: 700;
  color: var(--gold);
}

/* ---- Progress matrix (card grid, not full-bleed rows) ---- */
.progress-matrix,
.conn-matrix {
  display: grid;
  gap: 10px;
  margin-top: 10px;
  grid-template-columns: 1fr;
  width: 100%;
  align-items: stretch;
}
@media (min-width: 720px) {
  .progress-matrix {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .conn-matrix {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1200px) {
  .progress-matrix {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .conn-matrix {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 1600px) {
  .progress-matrix {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.prog-row {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px 14px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-2);
  transition: border-color 0.2s, transform 0.2s;
  min-height: 132px;
  height: 100%;
  box-sizing: border-box;
}
.prog-row:hover {
  border-color: color-mix(in srgb, var(--amber) 30%, var(--line));
  transform: translateY(-1px);
}
.prog-row h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.3;
}
.prog-row .prow-pct,
.prog-row > .prow-pct {
  font-family: var(--font-mono);
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
  margin-top: auto;
}
.prog-row .prow-actions {
  margin-top: 4px;
}
.prog-pct {
  font-family: var(--font-mono);
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
/* Connectivity rows reuse progress-item in matrix */
.conn-matrix .progress-item,
.conn-matrix .conn-row {
  height: 100%;
  min-height: 140px;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-2);
  box-sizing: border-box;
}
.row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.cite {
  min-width: 36px;
  min-height: 36px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink-muted);
  cursor: pointer;
}
.cite:hover {
  color: var(--gold);
  border-color: var(--amber);
}

/* ---- Timeline (horizontal cards on wide) ---- */
.mc-timeline,
.timeline {
  display: grid;
  gap: 10px;
  position: relative;
  padding-left: 0;
  width: 100%;
  grid-template-columns: 1fr;
}
@media (min-width: 800px) {
  .mc-timeline,
  .timeline {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1200px) {
  .mc-timeline,
  .timeline {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.tl-item {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 12px;
  padding: 14px 14px 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-2);
  min-height: 128px;
  height: 100%;
  box-sizing: border-box;
  align-content: start;
}
.tl-dot {
  width: 12px;
  height: 12px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--amber);
  box-shadow: var(--glow-amber);
}
.tl-body h3 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
}
.tl-body p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-muted);
}
.tl-head {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 4px;
}

/* ---- Readiness ---- */
.ready-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  width: 100%;
}
@media (min-width: 720px) {
  .ready-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 1100px) {
  .ready-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
@media (min-width: 1500px) {
  .ready-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    max-width: none;
  }
}
.ready-card {
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-2);
  min-height: 100px;
  height: 100%;
  box-sizing: border-box;
}
.ready-card b {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 8px;
  color: var(--ink);
}
.ready-state {
  display: inline-flex;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
}
.ready-state.ready {
  background: var(--success-soft);
  color: var(--success);
}
.ready-state.in-progress {
  background: var(--brand-soft);
  color: var(--brand-strong);
}
.ready-state.at-risk {
  background: var(--warning-soft);
  color: var(--warning);
}
.ready-state.not-verified {
  background: rgba(170, 183, 199, 0.16);
  color: #c5d0dc;
}

/* ---- Risk matrix ---- */
.risk-matrix {
  display: grid;
  gap: 10px;
  width: 100%;
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .risk-matrix {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1200px) {
  .risk-matrix {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.risk-cell {
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-2);
  border-left: 3px solid var(--ink-faint);
  min-height: 132px;
  height: 100%;
  box-sizing: border-box;
}
.risk-cell.high {
  border-left-color: var(--danger);
}
.risk-cell.medium {
  border-left-color: var(--warning);
}
.risk-cell.low {
  border-left-color: var(--success);
}
.risk-cell.unknown {
  border-left-color: var(--ink-faint);
}
.risk-axes {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0;
}
.risk-axis {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--ink-muted);
}
.risk-cell b {
  display: block;
  font-size: 0.95rem;
  margin-bottom: 4px;
}
.risk-cell p {
  margin: 0;
  font-size: 13px;
  color: var(--ink-muted);
  line-height: 1.45;
}

/* ---- News / filters ---- */
.seg-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.seg-tab {
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.seg-tab.active,
.seg-tab[aria-selected="true"] {
  background: rgba(246, 183, 60, 0.14);
  border-color: color-mix(in srgb, var(--amber) 45%, var(--line));
  color: var(--gold);
  box-shadow: var(--glow-amber);
}
.news-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
  margin-bottom: 10px;
}
.searchbox {
  position: relative;
  flex: 1 1 160px;
  max-width: 280px;
}
.searchbox input,
.search-sheet input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 12px 8px 36px;
  background: var(--bg);
  color: var(--ink);
  font: inherit;
}
.searchbox svg {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  color: var(--ink-faint);
}
.pills-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.pill-tab {
  min-height: 36px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink-muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: 0.18s ease;
}
.pill-tab:hover {
  border-color: color-mix(in srgb, var(--amber) 40%, var(--line));
  color: var(--gold);
  transform: translateY(-1px);
}
.pill-tab.active,
.pill-tab[aria-pressed="true"] {
  background: var(--amber);
  border-color: var(--gold);
  color: #050a12;
  font-weight: 700;
}
.filter-more-wrap {
  position: relative;
}
.filter-popover {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  z-index: 30;
  width: min(320px, calc(100vw - 40px));
  padding: 12px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--elevated);
  box-shadow: var(--shadow);
  display: grid;
  gap: 10px;
}
.filter-popover[hidden] {
  display: none !important;
}
.filter-popover-hint {
  margin: 0;
  font-size: 12px;
  color: var(--ink-muted);
}
.filter-popover-group {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.active-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  margin-bottom: 10px;
}
.active-filters[hidden] {
  display: none !important;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 28px;
  padding: 2px 6px 2px 10px;
  border-radius: 999px;
  background: rgba(246, 183, 60, 0.12);
  border: 1px solid color-mix(in srgb, var(--amber) 35%, var(--line));
  color: var(--gold);
  font-size: 12px;
  font-weight: 600;
}
.filter-chip button {
  border: 0;
  background: transparent;
  color: inherit;
  min-width: 28px;
  min-height: 28px;
  cursor: pointer;
  font-size: 14px;
}
.filter-clear {
  min-height: 32px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.view-toggle {
  display: inline-flex;
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.view-btn {
  min-height: 32px;
  padding: 4px 12px;
  border: 0;
  background: transparent;
  color: var(--ink-muted);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}
.view-btn.active {
  background: rgba(246, 183, 60, 0.14);
  color: var(--gold);
}
.feed {
  display: grid;
  gap: 10px;
  width: 100%;
}
/* List: readable columns on wide screens (not one ultra-wide strip) */
.feed[data-view="list"] {
  grid-template-columns: 1fr;
}
@media (min-width: 1000px) {
  .feed[data-view="list"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1500px) {
  .feed[data-view="list"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-width: none;
  }
}
.feed[data-view="grid"] {
  grid-template-columns: 1fr;
}
@media (min-width: 720px) {
  .feed[data-view="grid"] {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1100px) {
  .feed[data-view="grid"] {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 1500px) {
  .feed[data-view="grid"] {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.news {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-2);
  text-decoration: none;
  color: inherit;
  min-height: 0;
  height: 100%;
  box-sizing: border-box;
  transition: transform 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.feed[data-view="grid"] .news,
.feed[data-view="list"] .news {
  min-height: 148px;
}
.news:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--amber) 35%, var(--line));
  box-shadow: var(--shadow-sm);
}
.news-top {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.news .item-title {
  margin: 0;
  font-size: 1rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.4;
}
.news p {
  margin: 0;
  font-size: 0.875rem;
  color: var(--ink-muted);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.source {
  margin-top: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  text-decoration: none;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  min-height: 22px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  background: rgba(56, 167, 255, 0.12);
  color: var(--brand-strong);
  border: 1px solid color-mix(in srgb, var(--brand) 30%, var(--line));
}
.badge.badge-official {
  background: var(--success-soft);
  color: var(--success);
  border-color: color-mix(in srgb, var(--success) 35%, var(--line));
}
.badge.badge-legal,
.badge.badge-inspect {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: color-mix(in srgb, var(--danger) 30%, var(--line));
}
.badge.badge-tender {
  background: rgba(155, 123, 255, 0.14);
  color: var(--purple);
  border-color: color-mix(in srgb, var(--purple) 30%, var(--line));
}
.badge.badge-progress {
  background: rgba(56, 167, 255, 0.14);
  color: var(--brand-strong);
}
.badge.new {
  background: rgba(255, 176, 32, 0.16);
  color: var(--warning);
  border-color: color-mix(in srgb, var(--warning) 40%, var(--line));
}
.badge-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--orange);
}
.badge.done,
.badge.ok {
  background: var(--success-soft);
  color: var(--success);
}
.badge.warn {
  background: var(--warning-soft);
  color: var(--warning);
}
.badge.danger {
  background: var(--danger-soft);
  color: var(--danger);
}
.sec-badge {
  display: inline-flex;
  align-items: center;
  min-height: 20px;
  padding: 1px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-muted);
}
.sec-badge-warn {
  background: var(--warning-soft);
  color: var(--warning);
}
.sec-badge-ok {
  background: var(--success-soft);
  color: var(--success);
}
.sec-badge-brand {
  background: var(--brand-soft);
  color: var(--brand-strong);
}
.sec-badge-info {
  background: rgba(56, 167, 255, 0.12);
  color: var(--brand-strong);
}
.sec-badge-danger,
.sec-badge-legal {
  background: var(--danger-soft);
  color: var(--danger);
}
.news-pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}
.btn-more {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 8px 16px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  font-family: inherit;
}
.btn-more.primary {
  background: linear-gradient(135deg, var(--amber), var(--orange));
  border-color: var(--gold);
  color: #050a12;
}

/* ---- Legal ---- */
.section-legal {
  border-color: color-mix(in srgb, var(--danger) 22%, var(--line));
}
.legal-disclaimer {
  margin: 0 0 12px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--ink-muted);
  font-size: 13px;
}
.legal-cards {
  display: grid;
  gap: 10px;
  width: 100%;
  grid-template-columns: 1fr;
}
@media (min-width: 640px) {
  .legal-cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (min-width: 1100px) {
  .legal-cards {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
@media (min-width: 1500px) {
  .legal-cards {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}
.legal-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 14px;
  background: var(--surface-2);
  min-height: 140px;
  height: 100%;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.legal-value {
  font-family: var(--font-mono);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--gold);
  margin: 6px 0;
  font-variant-numeric: tabular-nums;
}
/* Prefer cards at all breakpoints; table optional on very wide */
.desktop-table {
  display: none;
  margin-top: 12px;
  width: 100%;
  overflow: auto;
}
@media (min-width: 1400px) {
  .desktop-table {
    display: block;
  }
  /* Keep cards visible above table as scannable modules */
  .legal-cards {
    display: grid;
    margin-bottom: 8px;
  }
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  color: var(--ink);
}
th {
  text-align: left;
  padding: 10px;
  color: var(--ink-muted);
  border-bottom: 1px solid var(--line);
  font-size: 12px;
  background: var(--surface-2);
}
td {
  padding: 10px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.num {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--gold);
}
.empty-soft {
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--line);
  background: var(--surface-2);
  color: var(--ink-muted);
  font-size: 13px;
}
.empty-soft.compact a {
  color: var(--gold);
  font-weight: 600;
}
.change-item {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  margin-bottom: 6px;
  font-size: 13px;
  color: var(--ink);
}
.c-badge {
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 6px;
  background: var(--brand-soft);
  color: var(--brand-strong);
}
.c-badge.corrected {
  background: var(--warning-soft);
  color: var(--warning);
}
.zone {
  display: grid;
  gap: 12px;
  margin-top: 12px;
  align-items: start;
}
@media (min-width: 960px) {
  .zone-audit {
    grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  }
}
.about-blurb {
  margin: 0;
  padding: 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--ink-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ---- Bottom nav / FAB ---- */
.bottom-nav {
  display: none;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 40;
  height: var(--bottom-nav-h);
  background: var(--bottom-nav-bg, rgba(8, 17, 31, 0.94));
  border-top: 1px solid var(--line);
  padding: 0 4px env(safe-area-inset-bottom);
  justify-content: space-around;
  align-items: center;
  backdrop-filter: blur(12px);
}
.bn-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  font-size: 10px;
  font-weight: 700;
  color: var(--ink-muted);
  text-decoration: none;
  border-radius: 10px;
  gap: 2px;
}
.bn-item span {
  font-size: 15px;
}
.bn-item[aria-current="page"],
.bn-item:hover {
  color: var(--gold);
  background: rgba(246, 183, 60, 0.1);
}
@media (max-width: 1099px) {
  .bottom-nav {
    display: flex;
  }
}
.fab-stack {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: calc(var(--bottom-nav-h) + 18px);
  z-index: 35;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}
@media (min-width: 1100px) {
  .fab-stack {
    bottom: 28px;
  }
  .bottom-nav {
    display: none !important;
  }
  .shell {
    padding-bottom: 40px;
  }
}
.fab {
  min-width: 44px;
  min-height: 44px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: var(--shadow);
  cursor: pointer;
  text-decoration: none;
  font-family: inherit;
}
.fab-stack.is-compact .fab-label {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}
.fab-stack.is-compact .fab {
  width: 44px;
  padding: 0;
  justify-content: center;
}
#backTop[hidden] {
  display: none !important;
}

/* ---- Drawer ---- */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 60;
}
.drawer[hidden] {
  display: none !important;
}
.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
}
.drawer-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(420px, 100%);
  height: 100%;
  background: var(--elevated);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  animation: drawerIn 0.2s ease;
}
@media (max-width: 640px) {
  .drawer-panel {
    width: 100%;
  }
}
@keyframes drawerIn {
  from {
    transform: translateX(12px);
    opacity: 0.6;
  }
  to {
    transform: none;
    opacity: 1;
  }
}
.drawer-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
}
.drawer-head h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.drawer-body {
  padding: 16px;
  overflow: auto;
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.5;
}
.drawer-body h3 {
  color: var(--ink);
  font-size: 14px;
  margin: 14px 0 6px;
}
.drawer-body a {
  color: var(--gold);
}

/* ---- Side menu / search ---- */
.side-menu {
  position: fixed;
  inset: 0;
  z-index: 50;
}
.side-menu[hidden],
.search-sheet[hidden] {
  display: none !important;
}
.side-menu-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
}
.side-menu-panel {
  position: absolute;
  top: 0;
  right: 0;
  width: min(320px, 90vw);
  height: 100%;
  background: var(--elevated);
  border-left: 1px solid var(--line);
  padding: 12px;
  overflow: auto;
}
.side-menu-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  color: var(--ink);
}
.side-menu-nav a {
  display: block;
  padding: 12px 10px;
  min-height: 44px;
  color: var(--ink);
  text-decoration: none;
  font-weight: 600;
  border-radius: 8px;
}
.side-menu-nav a:hover {
  background: var(--surface-2);
  color: var(--gold);
}
.search-sheet {
  position: fixed;
  inset: 0;
  z-index: 55;
  background: var(--bg);
  padding: 16px;
}
.search-sheet-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
  color: var(--ink);
}
.search-results {
  margin-top: 12px;
  display: grid;
  gap: 8px;
}
.search-hit {
  display: block;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  text-decoration: none;
}
.search-hit:hover {
  border-color: var(--amber);
}
.search-hit small {
  display: block;
  color: var(--ink-muted);
  margin-top: 4px;
}

/* ---- Footer / offline / toast ---- */
.mc-footer,
footer {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: 13px;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.mc-footer a,
footer a {
  color: var(--gold);
  font-weight: 600;
}
.footer-links,
.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 8px;
}
.offline {
  display: none !important;
  margin-bottom: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  background: var(--warning-soft);
  border: 1px solid color-mix(in srgb, var(--warning) 35%, var(--line));
  color: var(--warning);
  font-size: 14px;
  font-weight: 600;
}
.offline.show {
  display: block !important;
}
.offline[hidden] {
  display: none !important;
}
.toast-host {
  position: fixed;
  bottom: calc(var(--bottom-nav-h) + 16px);
  left: 50%;
  transform: translateX(-50%);
  z-index: 80;
  max-width: min(400px, calc(100vw - 24px));
}
.toast {
  background: var(--ink);
  color: var(--bg);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 14px;
  font-weight: 600;
  opacity: 0;
  transform: translateY(6px);
  transition: 0.2s;
  box-shadow: var(--shadow);
}
.toast.show {
  opacity: 1;
  transform: none;
}
.led {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  display: inline-block;
  background: var(--ink-faint);
}
.led.led-ok {
  background: var(--success);
}
.led.led-warn {
  background: var(--warning);
}
.led.led-bad {
  background: var(--danger);
}
.led.led-neutral {
  background: var(--ink-faint);
}

/* ---- Compare mode ---- */
.compare-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.compare-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  margin-top: 10px;
}
@media (min-width: 720px) {
  .compare-grid {
    grid-template-columns: 1fr 1fr;
  }
}
@media (min-width: 1100px) {
  .compare-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
.compare-card {
  padding: 12px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  background: var(--surface-2);
}
.compare-card h3 {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-faint);
}
.compare-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 13px;
  margin-bottom: 4px;
  color: var(--ink-muted);
}
.compare-row b {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}
.compare-delta {
  display: inline-flex;
  margin-top: 6px;
  min-height: 24px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.compare-delta.up {
  background: var(--success-soft);
  color: var(--success);
}
.compare-delta.down {
  background: var(--danger-soft);
  color: var(--danger);
}
.compare-delta.flat {
  background: rgba(113, 128, 150, 0.16);
  color: var(--ink-faint);
}
.ssr-noscript {
  margin-top: 16px;
  padding: 14px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  color: var(--ink-muted);
  font-size: 14px;
}

/* legacy helpers used by app.js templates */
.progress-list {
  display: grid;
  gap: 8px;
}
.progress-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface-2);
}
.item-title {
  margin: 0;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
}
.prow-main {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: baseline;
}
.prow-pct {
  font-family: var(--font-mono);
  font-weight: 700;
  color: var(--gold);
}
.mobile-only {
  display: none;
}
.desktop-only {
  display: block;
}
@media (max-width: 899px) {
  .mobile-only {
    display: flex;
  }
  .desktop-only {
    display: none;
  }
}
.dashboard-split {
  display: grid;
  gap: 12px;
}
@media (min-width: 900px) {
  .dashboard-split {
    grid-template-columns: 1.15fr 0.85fr;
  }
}

/* ============================================================
   Light mode hard-guard + content widths (v19.2)
   ============================================================ */
html[data-color-mode="light"] body.mc-body {
  background:
    radial-gradient(900px 420px at 12% -8%, rgba(11, 107, 203, 0.07), transparent 60%),
    radial-gradient(700px 360px at 90% 5%, rgba(166, 109, 0, 0.05), transparent 55%),
    linear-gradient(180deg, #f5f8fc 0%, var(--bg) 42%, #eef2f7 100%);
  color: var(--ink);
}
html[data-color-mode="light"] .mc-topbar,
html[data-color-mode="light"] .section,
html[data-color-mode="light"] .mc-section,
html[data-color-mode="light"] .mc-stat,
html[data-color-mode="light"] .mc-primary-kpi,
html[data-color-mode="light"] .flow-node,
html[data-color-mode="light"] .prog-row,
html[data-color-mode="light"] .news,
html[data-color-mode="light"] .ready-card,
html[data-color-mode="light"] .risk-cell,
html[data-color-mode="light"] .legal-card,
html[data-color-mode="light"] .compare-card,
html[data-color-mode="light"] .intel-card {
  color: var(--ink);
  background: var(--surface);
  border-color: var(--line);
  box-shadow: var(--shadow-sm);
}
html[data-color-mode="light"] .mc-primary-kpi {
  background: var(--kpi-panel-bg);
  border-color: color-mix(in srgb, var(--amber) 40%, var(--line));
}
html[data-color-mode="light"] .mc-stat {
  background: var(--stat-panel-bg);
}
html[data-color-mode="light"] .mc-hero-stats .score-value,
html[data-color-mode="light"] .mc-kpi-num,
html[data-color-mode="light"] .score-value {
  color: var(--ink);
}
html[data-color-mode="light"] .mc-hero-stats .score-value {
  color: var(--gold);
}
html[data-color-mode="light"] .mc-title,
html[data-color-mode="light"] .section-title,
html[data-color-mode="light"] .brand b,
html[data-color-mode="light"] .news .item-title,
html[data-color-mode="light"] .flow-title,
html[data-color-mode="light"] .item-title {
  color: var(--ink);
}
html[data-color-mode="light"] .mc-kicker,
html[data-color-mode="light"] .text-link,
html[data-color-mode="light"] .source,
html[data-color-mode="light"] .intel-card-meta,
html[data-color-mode="light"] .score-cta {
  color: var(--gold);
}
html[data-color-mode="light"] .mc-sync-strip {
  background: var(--sync-strip-bg);
  color: var(--ink-muted);
}
html[data-color-mode="light"] .bottom-nav {
  background: var(--bottom-nav-bg);
}
html[data-color-mode="light"] .stale-tooltip {
  background: #0c1a2b;
  color: #f5f7fa;
}
html[data-color-mode="light"] .mc-hero {
  border-color: color-mix(in srgb, var(--amber) 28%, var(--line));
}
html[data-color-mode="light"] .hero-overlay,
html[data-color-mode="light"] .mc-hero-bg {
  opacity: 1;
}
html[data-color-mode="light"] .flow-status.not-verified,
html[data-color-mode="light"] .ready-state.not-verified {
  background: #e8eef5;
  color: #3d4f63;
}
html[data-color-mode="light"] .pill-tab.active,
html[data-color-mode="light"] .pill-tab[aria-pressed="true"] {
  background: var(--amber);
  border-color: var(--gold);
  color: #fff;
}
html[data-color-mode="light"] .btn-more.primary {
  color: #fff;
}
html[data-color-mode="light"] .logo {
  color: #fff;
}
html[data-color-mode="light"] .fab {
  background: #fff;
  color: var(--ink);
}
html[data-color-mode="light"] .drawer-panel,
html[data-color-mode="light"] .side-menu-panel,
html[data-color-mode="light"] .search-sheet {
  background: #fff;
  color: var(--ink);
}
html[data-color-mode="light"] .searchbox input,
html[data-color-mode="light"] .search-sheet input {
  background: #fff;
  color: var(--ink);
  border-color: var(--line);
}

/* Section shell: full 1800; inner grids define density */
.mc-section,
.section {
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}
.mc-hero,
#progress,
#news,
#transparency,
#connectivity,
#risk,
#readiness,
#milestones-section,
#flow,
#today,
#mission,
#compare {
  width: 100%;
}
/* Editorial pair — not stretched equal height */
#data-about,
#corrections-section {
  max-width: 100%;
}
@media (min-width: 1200px) {
  .zone-audit {
    grid-template-columns: minmax(280px, 0.85fr) minmax(0, 1.15fr);
    align-items: start;
  }
}
/* Flow rail */
.flow-rail {
  width: 100%;
  max-width: 100%;
}
.flow-node {
  flex: 0 0 clamp(160px, 14vw, 200px);
}
@media (min-width: 1600px) {
  .flow-node {
    flex: 1 1 0;
    min-width: 0;
    max-width: none;
  }
}
/* Dashboard section heads: title + actions not full-bleed awkward */
#progress .section-head,
#milestones-section .section-head,
#readiness .section-head,
#connectivity .section-head,
#risk .section-head,
#news .section-head,
#transparency .section-head {
  max-width: 100%;
}
/* Kill list-mode desktop dual-column news layout that fought multi-col feed */
@media (min-width: 800px) {
  .feed[data-view="list"] .news {
    display: flex;
    flex-direction: column;
    grid-template-columns: none;
    grid-template-areas: none;
  }
  .feed[data-view="list"] .news-top,
  .feed[data-view="list"] .item-title,
  .feed[data-view="list"] .news p,
  .feed[data-view="list"] .source {
    grid-area: auto;
    max-width: none;
    text-align: left;
    justify-self: auto;
  }
}
