/* ============================================
   PR Deployment Portal — design tokens & layout
   ============================================ */
:root {
  /* Palette — warm off-white + deep ink + petrol accent */
  --bg: #F6F4EE;
  --bg-elev: #FCFAF4;
  --bg-sunken: #EFEBE2;
  --surface: #FFFFFF;
  --ink-900: #14181F;
  --ink-700: #2E3540;
  --ink-500: #5C6573;
  --ink-400: #828A98;
  --ink-300: #B5BAC4;
  --ink-200: #D8DAE0;
  --ink-100: #E8E6DE;
  --line: #DDD9CE;
  --line-soft: #E7E3D7;

  --accent: #1F4D5C;        /* deep petrol */
  --accent-hover: #16404F;
  --accent-soft: #DDE7EA;
  --accent-ink: #0E2D38;

  --gold: #B68645;
  --silver: #6B7785;
  --bronze: #8A5A3B;

  --ok: #2F7D4E;
  --ok-soft: #DDEEDF;
  --warn: #B17A12;
  --warn-soft: #F4E7C7;
  --risk: #B33B27;
  --risk-soft: #F4DAD3;
  --info: #2A5587;
  --info-soft: #D9E2EE;
  --neutral: #8B8A82;
  --neutral-soft: #E5E2D7;

  /* Typography */
  --font-sans: "Geist", "Helvetica Neue", Helvetica, system-ui, sans-serif;
  --font-mono: "Geist Mono", "JetBrains Mono", ui-monospace, monospace;
  --font-display: "Geist", "Helvetica Neue", Helvetica, system-ui, sans-serif;

  /* Spacing */
  --r-sm: 6px;
  --r-md: 10px;
  --r-lg: 14px;
  --r-xl: 20px;

  /* Shadows */
  --shadow-1: 0 1px 0 rgba(20, 24, 31, 0.04), 0 1px 2px rgba(20, 24, 31, 0.06);
  --shadow-2: 0 4px 14px rgba(20, 24, 31, 0.08);
  --shadow-3: 0 18px 48px rgba(20, 24, 31, 0.14);

  --nav-w: clamp(184px, 12.2vw, 232px);
  --top-h: 60px;
  --page-pad: clamp(16px, 1.55vw, 34px);
}

* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background: var(--bg);
  color: var(--ink-900);
  font-family: var(--font-sans);
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
body { min-height: 100vh; }

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
::selection { background: var(--accent-soft); }

/* ---------- App shell ---------- */
.app-shell {
  display: grid;
  grid-template-columns: var(--nav-w) 1fr;
  min-height: 100vh;
}
.sidebar {
  background: var(--bg-elev);
  border-right: 1px solid var(--line);
  padding: 18px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.sidebar .brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 5px 8px 16px;
  border-bottom: 1px solid var(--line-soft);
  margin-bottom: 10px;
}
.sidebar .brand-pr-logo {
  display: block;
  width: min(142px, 100%);
  height: auto;
  object-fit: contain;
  object-position: left center;
  background: transparent;
}
.sidebar .brand-project {
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.sidebar .brand .mark {
  width: 30px; height: 30px;
  border-radius: 8px;
  background: var(--accent);
  color: white;
  display: grid; place-items: center;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.5px;
}
.sidebar .brand .name {
  font-weight: 600;
  font-size: 14px;
  letter-spacing: -0.01em;
}
.sidebar .brand .sub {
  font-size: 11px;
  color: var(--ink-500);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-top: 1px;
}
.nav-section-title {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-400);
  padding: 12px 10px 6px;
}
.nav-item {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  color: var(--ink-700);
  font-size: 13.5px;
  font-weight: 500;
  letter-spacing: -0.005em;
  transition: background .12s, color .12s;
  user-select: none;
}
.nav-item:hover { background: var(--bg-sunken); }
.nav-item.active {
  background: var(--accent);
  color: white;
}
.nav-item.active .ni-glyph { opacity: 1; }
.ni-glyph {
  width: 16px; height: 16px;
  display: inline-grid; place-items: center;
  opacity: .75;
}
.ni-count {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-400);
  background: var(--bg-sunken);
  padding: 1px 6px;
  border-radius: 999px;
}
.nav-item.active .ni-count { background: rgba(255,255,255,.18); color: rgba(255,255,255,.92); }

.sidebar-footer {
  margin-top: auto;
  padding-top: 12px;
  border-top: 1px solid var(--line-soft);
  font-size: 11px;
  color: var(--ink-400);
  display: flex; flex-direction: column; gap: 4px;
}
.sidebar-footer .src {
  font-family: var(--font-mono);
  font-size: 10.5px;
  color: var(--ink-500);
  word-break: break-all;
}

/* ---------- Main column ---------- */
.main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}
.topbar {
  min-height: var(--top-h);
  border-bottom: 1px solid var(--line);
  background: var(--bg);
  padding: 8px var(--page-pad);
  display: flex;
  align-items: center;
  gap: 16px;
  position: sticky;
  top: 0;
  z-index: 30;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.crumbs {
  font-size: 13px;
  color: var(--ink-500);
  letter-spacing: -0.005em;
}
.crumbs .crumb-current {
  color: var(--ink-900);
  font-weight: 500;
}
.topbar .spacer { flex: 1; }
.topbar .meta {
  display: flex; align-items: center; justify-content: flex-end; gap: 10px 16px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--ink-500);
  min-width: 0;
}
.topbar .meta .pulse {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ok); display: inline-block; margin-right: 6px;
  box-shadow: 0 0 0 0 rgba(47, 125, 78, 0.4);
  animation: pulse 2.4s infinite;
}
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(47, 125, 78, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(47, 125, 78, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 125, 78, 0); }
}

.btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 6px 12px;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  font-size: 12.5px;
  color: var(--ink-700);
  font-weight: 500;
  transition: background .12s, border-color .12s, color .12s;
}
.btn:hover { background: var(--bg-elev); border-color: var(--ink-300); }
.btn.primary {
  background: var(--accent); color: white; border-color: var(--accent);
}
.btn.primary:hover { background: var(--accent-hover); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-500); }
.btn.ghost:hover { color: var(--ink-900); background: var(--bg-sunken); }
.btn.danger { color: var(--risk); border-color: var(--risk-soft); }

.page {
  width: 100%;
  max-width: none;
  padding: 22px var(--page-pad) 64px;
  min-height: calc(100vh - var(--top-h));
}
.page-header {
  display: flex; align-items: flex-end; justify-content: space-between;
  margin-bottom: 18px;
  gap: 24px;
  min-width: 0;
}
.page-header > div:first-child { min-width: 0; }
.page-title {
  font-family: var(--font-display);
  font-size: 26px;
  letter-spacing: -0.02em;
  font-weight: 600;
  line-height: 1.1;
  margin: 0;
}
.page-subtitle {
  margin: 4px 0 0;
  color: var(--ink-500);
  font-size: 13px;
  letter-spacing: -0.005em;
}

/* T015 shell responsive: page-header wraps + tighter padding on tablet/laptop widths.
   Narrower phone widths (sidebar drawer, table-toolbar wrap, kv-grid stack) are
   handled by T102/T103/T104 child tasks. */
@media (max-width: 960px) {
  .page { padding: 14px var(--page-pad) 48px; }
  .page-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }
  .page-header > div:last-child { width: 100%; }
  .g-12, .g-21 { grid-template-columns: 1fr; }
}

/* ---------- Cards & grids ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 18px;
  box-shadow: var(--shadow-1);
}
.card.flush { padding: 0; overflow: hidden; }
.card-h {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 14px;
}
.card-h .title {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  color: var(--ink-500);
}
.card-h .hint {
  font-size: 11.5px;
  color: var(--ink-400);
}

.grid { display: grid; gap: 14px; }
.g-4 { grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); }
.g-3 { grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr)); }
.g-2 { grid-template-columns: repeat(auto-fit, minmax(min(360px, 100%), 1fr)); }
.g-12 { grid-template-columns: 1.5fr 1fr; }
.g-21 { grid-template-columns: 1fr 1.5fr; }

@media (max-width: 1200px) {
  .g-4 { grid-template-columns: repeat(2, 1fr); }
  .g-3 { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- KPI ---------- */
.kpi {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 16px 18px 18px;
  display: flex; flex-direction: column; gap: 4px;
  position: relative;
  overflow: hidden;
}
.kpi .label {
  font-size: 11.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-500);
  font-weight: 500;
}
.kpi .value {
  font-family: var(--font-display);
  font-size: 32px;
  letter-spacing: -0.025em;
  font-weight: 600;
  line-height: 1.05;
  margin-top: 2px;
  font-variant-numeric: tabular-nums;
}
.kpi .value .unit {
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-500);
  margin-left: 3px;
  letter-spacing: 0;
}
.kpi .delta {
  font-size: 12px;
  color: var(--ink-500);
  margin-top: 6px;
  display: flex; align-items: center; gap: 6px;
}
.kpi .delta .pct {
  font-family: var(--font-mono);
  color: var(--ink-700);
}
.kpi.accent::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--accent);
}
.kpi.kpi-e2e-highlight {
  background: linear-gradient(180deg, #F3FBF4 0%, var(--surface) 100%);
  border-color: #CFE8D4;
}
.kpi.kpi-e2e-highlight::before {
  background: var(--ok);
}

/* ---------- KPI hover popover ----------
   Cards are siblings in a CSS grid; without explicit z-index, the popover
   inside the hovered card paints behind the next sibling cards because
   later DOM siblings paint later. Promote the hovered card's stacking
   context so its popover lifts above ALL other cards. */
.kpi.kpi-hover {
  overflow: visible;
  cursor: default;
  position: relative;
  z-index: 1;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.kpi.kpi-hover:hover {
  border-color: var(--accent-soft);
  box-shadow: var(--shadow-2);
  transform: translateY(-1px);
  z-index: 200;
}
.kpi-hint-row {
  margin-top: 8px;
  font-size: 10.5px;
  color: var(--ink-400);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  display: flex; align-items: center; gap: 6px;
}
.kpi-hint-row .kpi-hint-dot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.kpi-pop {
  position: absolute;
  z-index: 1000;
  min-width: min(280px, calc(100vw - 24px));
  max-width: min(340px, calc(100vw - 24px));
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  box-shadow: var(--shadow-3);
  padding: 14px 16px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity .14s ease, visibility .14s ease, transform .14s ease;
  pointer-events: none;
}
.kpi-pop-bottom {
  top: calc(100% + 8px);
  left: 50%;
  transform: translate(calc(-50% + var(--kpi-pop-shift, 0px)), 4px);
}
.kpi-pop-top {
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translate(calc(-50% + var(--kpi-pop-shift, 0px)), -4px);
}
.kpi.kpi-hover:hover .kpi-pop,
.kpi.kpi-hover:focus-within .kpi-pop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.kpi.kpi-hover:hover .kpi-pop-bottom,
.kpi.kpi-hover:focus-within .kpi-pop-bottom { transform: translate(calc(-50% + var(--kpi-pop-shift, 0px)), 0); }
.kpi.kpi-hover:hover .kpi-pop-top,
.kpi.kpi-hover:focus-within .kpi-pop-top    { transform: translate(calc(-50% + var(--kpi-pop-shift, 0px)), 0); }
.kpi-pop-h {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 10px; margin-bottom: 10px;
  border-bottom: 1px solid var(--line-soft);
  padding-bottom: 8px;
}
.kpi-pop-title {
  font-size: 12.5px; font-weight: 600; color: var(--ink-900);
  letter-spacing: -0.005em;
}
.kpi-pop-hint {
  font-size: 11px; color: var(--ink-500);
}
.kpi-pop-body {
  display: flex; gap: 14px; align-items: center;
}
.kpi-pop-body svg { flex-shrink: 0; }
.pie-viz {
  position: relative;
  flex-shrink: 0;
}
.pie-viz svg {
  display: block;
  overflow: visible;
}
.pie-slice {
  cursor: pointer;
  transition: opacity .14s ease, filter .14s ease;
}
.pie-slice:hover,
.pie-slice.active {
  filter: drop-shadow(0 3px 5px rgba(20, 24, 31, 0.18));
}
.pie-center {
  position: absolute;
  inset: 22px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .94);
  border: 1px solid var(--line-soft);
  display: grid;
  place-items: center;
  align-content: center;
  text-align: center;
  pointer-events: none;
  box-shadow: inset 0 1px 4px rgba(20, 24, 31, .05);
}
.pie-center-value {
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 700;
  color: var(--ink-900);
  line-height: 1;
}
.pie-center-label {
  max-width: 64px;
  margin-top: 3px;
  color: var(--ink-500);
  font-size: 9.5px;
  line-height: 1.1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.pie-center-pct {
  margin-top: 2px;
  color: var(--ink-400);
  font-family: var(--font-mono);
  font-size: 9px;
}
.kpi-pop-legend {
  list-style: none; padding: 0; margin: 0;
  flex: 1;
  display: flex; flex-direction: column; gap: 6px;
  font-size: 12px;
}
.kpi-pop-legend li {
  display: grid; grid-template-columns: 10px 1fr auto; gap: 8px;
  align-items: center;
  margin: 0 -4px;
  padding: 3px 4px;
  border-radius: 6px;
  cursor: pointer;
  transition: background .12s ease;
}
.kpi-pop-legend li.active,
.kpi-pop-legend li:hover {
  background: var(--bg-elev);
}
.kpi-pop-legend .dot {
  width: 9px; height: 9px; border-radius: 2px;
}
.kpi-pop-legend .lbl { color: var(--ink-700); }
.kpi-pop-legend .num { display: flex; gap: 6px; align-items: baseline; }
.kpi-pop-legend .num .mono {
  font-family: var(--font-mono);
  font-weight: 600;
  color: var(--ink-900);
  font-variant-numeric: tabular-nums;
}
.kpi-pop-legend .num .pct {
  font-size: 10.5px; color: var(--ink-500);
  font-family: var(--font-mono);
}

/* ---------- Executive overview ---------- */
.exec-overview {
  width: 100%;
  max-width: none;
}
.exec-scope-panel {
  display: grid;
  grid-template-columns: minmax(280px, .9fr) minmax(420px, 1.35fr);
  gap: 14px;
  align-items: stretch;
  background: linear-gradient(135deg, rgba(31,77,92,.08), rgba(47,125,78,.07));
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 16px;
  box-shadow: var(--shadow-1);
}
.exec-scope-main {
  padding: 8px 10px;
}
.exec-eyebrow {
  font-size: 10.5px;
  letter-spacing: .12em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
}
.exec-scope-numbers {
  display: flex;
  gap: 22px;
  margin: 12px 0 8px;
}
.exec-scope-numbers div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.exec-scope-numbers span {
  font-family: var(--font-display);
  font-size: 42px;
  line-height: 1;
  font-weight: 700;
  letter-spacing: -0.025em;
  color: var(--ink-900);
  font-variant-numeric: tabular-nums;
}
.exec-scope-numbers em,
.exec-scope-main p,
.exec-audit-note {
  font-style: normal;
  color: var(--ink-500);
}
.exec-scope-main p {
  margin: 10px 0 0;
  font-size: 12.5px;
  line-height: 1.45;
  max-width: 640px;
}
.exec-audit-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}
.exec-audit-item {
  background: rgba(255,255,255,.74);
  border: 1px solid rgba(221,217,206,.72);
  border-radius: var(--r-md);
  padding: 12px;
  min-width: 0;
}
.exec-audit-value {
  font-family: var(--font-mono);
  font-size: 22px;
  font-weight: 700;
  color: var(--ink-900);
  font-variant-numeric: tabular-nums;
}
.exec-audit-label {
  margin-top: 4px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-500);
  font-weight: 700;
}
.exec-audit-note {
  margin-top: 4px;
  font-size: 11.5px;
  line-height: 1.25;
}
.exec-section {
  margin-top: 22px;
  padding-top: 8px;
}
.exec-section-h {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
  margin: 0 0 14px;
}
.exec-section-h h2 {
  margin: 5px 0 0;
  font-family: var(--font-display);
  font-size: 24px;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.exec-section-h p {
  margin: 5px 0 0;
  color: var(--ink-500);
  font-size: 13px;
  max-width: 840px;
}
.exec-kpi-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 14px;
}
.exec-kpi-grid .kpi {
  min-height: 150px;
}
.exec-section-underlay .kpi.accent::before,
.exec-section-underlay .kpi-hint-row .kpi-hint-dot {
  background: var(--ok);
}
.exec-section-underlay .kpi-hint-row .kpi-hint-dot {
  box-shadow: 0 0 0 3px var(--ok-soft);
}
.exec-section-overlay .kpi.accent::before,
.exec-section-overlay .kpi-hint-row .kpi-hint-dot {
  background: var(--info);
}
.exec-section-overlay .kpi-hint-row .kpi-hint-dot {
  box-shadow: 0 0 0 3px var(--info-soft);
}
.exec-chart-card {
  overflow: hidden;
}
.exec-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin: -4px 0 12px;
  font-size: 11.5px;
  color: var(--ink-600, var(--ink-500));
}
.exec-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.exec-legend i {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 2px;
}
.exec-me-table {
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
}
.exec-me-head,
.exec-me-row {
  display: grid;
  gap: 10px;
  align-items: center;
  min-width: 620px;
}
.exec-me-head {
  color: var(--ink-400);
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 700;
  padding: 0 2px 4px;
  border-bottom: 1px solid var(--line-soft);
}
.exec-me-row {
  min-height: 32px;
}
.exec-me-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-700);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.exec-me-cell {
  display: grid;
  grid-template-columns: 1fr 28px;
  gap: 7px;
  align-items: center;
}
.exec-me-track {
  height: 8px;
  border-radius: 999px;
  background: var(--bg-sunken);
  overflow: hidden;
}
.exec-me-track span {
  display: block;
  height: 100%;
  border-radius: 999px;
  min-width: 0;
}
.exec-me-num {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--ink-700);
  text-align: right;
  font-variant-numeric: tabular-nums;
}
.exec-side-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.exec-risk-table {
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  overflow: hidden;
}
.exec-risk-head,
.exec-risk-row {
  display: grid;
  grid-template-columns: minmax(82px, .55fr) minmax(160px, 1.55fr) minmax(92px, .7fr);
  align-items: stretch;
}
.exec-risk-head {
  background: var(--risk);
  color: white;
  font-size: 11px;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-weight: 700;
}
.exec-risk-head span,
.exec-risk-row span {
  padding: 10px 12px;
  border-right: 1px solid rgba(255,255,255,.26);
}
.exec-risk-head span:last-child,
.exec-risk-row span:last-child {
  border-right: 0;
}
.exec-risk-row {
  font-size: 12.5px;
  color: var(--ink-700);
  border-bottom: 1px solid var(--line-soft);
  background: var(--surface);
}
.exec-risk-row:nth-child(odd) {
  background: var(--bg-elev);
}
.exec-risk-row:last-child {
  border-bottom: 0;
}
.exec-risk-me {
  font-weight: 700;
  color: var(--info);
}
.exec-risk-status {
  font-weight: 700;
  text-align: center;
}
.exec-risk-status.risk { color: var(--risk); }
.exec-risk-status.warn { color: var(--warn); }
.exec-risk-status.muted { color: var(--ink-400); }
.exec-batch-card {
  background: linear-gradient(135deg, var(--info-soft), rgba(255,255,255,.96));
  border-left: 4px solid var(--info);
}
.exec-batch-title,
.exec-batch-value {
  font-size: 13px;
  color: var(--ink-700);
  line-height: 1.45;
}
.exec-batch-title strong {
  color: var(--info);
}
.exec-batch-value {
  margin-top: 4px;
  font-family: var(--font-mono);
  font-weight: 700;
}
.exec-forecast-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}
.exec-forecast-card {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 16px 18px;
  background: linear-gradient(180deg, var(--surface) 0%, var(--bg-elev) 100%);
  border-top: 6px solid var(--info);
}
.exec-forecast-region {
  font-weight: 700;
  color: var(--info);
  font-size: 14px;
}
.exec-forecast-value {
  margin: 22px 0 8px;
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 34px;
  font-weight: 700;
  letter-spacing: -0.025em;
  font-variant-numeric: tabular-nums;
}
.exec-forecast-value span { color: var(--ok); }
.exec-forecast-value b {
  color: var(--ink-500);
  font-weight: 700;
}
.exec-forecast-value em {
  color: var(--info);
  font-style: normal;
}
.exec-forecast-caption {
  color: var(--ink-500);
  font-size: 12px;
}
.exec-forecast-foot {
  margin-top: 18px;
  color: var(--ink-500);
  font-size: 11.5px;
  font-style: italic;
}
.exec-status-card {
  background: linear-gradient(135deg, var(--info-soft), rgba(255,255,255,.96));
  border-left: 4px solid var(--info);
}
.exec-status-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.exec-status-body p {
  margin: 0;
  font-size: 13px;
  line-height: 1.48;
  color: var(--ink-700);
}
.exec-status-body strong {
  color: var(--ink-900);
}
.exec-risk-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.exec-risk-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px 12px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: var(--r-md);
  background: var(--bg-elev);
}
.exec-risk-item strong {
  display: block;
  font-size: 13px;
}
.exec-risk-item span {
  display: block;
  margin-top: 3px;
  color: var(--ink-500);
  font-family: var(--font-mono);
  font-size: 11px;
}
.exec-risk-item p {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--ink-500);
  font-size: 12px;
  line-height: 1.35;
}

@media (max-width: 1280px) {
  .exec-kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .exec-scope-panel { grid-template-columns: 1fr; }
}
@media (max-width: 980px) {
  .exec-overview .g-12,
  .exec-overview .g-2,
  .exec-overview .g-3 {
    grid-template-columns: 1fr;
  }
  .exec-kpi-grid,
  .exec-audit-grid,
  .exec-forecast-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 680px) {
  .exec-kpi-grid,
  .exec-audit-grid,
  .exec-forecast-grid {
    grid-template-columns: 1fr;
  }
  .exec-scope-numbers {
    flex-direction: column;
    gap: 10px;
  }
  .exec-risk-head,
  .exec-risk-row {
    grid-template-columns: 1fr;
  }
  .exec-risk-head span,
  .exec-risk-row span {
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }
  .exec-risk-head span:last-child,
  .exec-risk-row span:last-child {
    border-bottom: 0;
  }
}

/* ---------- Roadmap Overview visuals ---------- */
.ov-overview {
  width: 100%;
  max-width: none;
  min-width: 0;
}
.mc-page-h {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 22px;
}
.mc-page-h-left { min-width: 0; }
.mc-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
}
.mc-eyebrow::before {
  content: "";
  width: 18px;
  height: 1px;
  background: var(--accent);
  display: inline-block;
}
.mc-page-title {
  font-size: 32px;
  letter-spacing: -0.025em;
  font-weight: 600;
  line-height: 1.04;
  margin: 6px 0 4px;
  color: var(--ink-900);
}
.mc-page-sub {
  font-size: 13.5px;
  color: var(--ink-500);
  letter-spacing: -0.005em;
  max-width: 720px;
  margin: 0;
}
.mc-page-h-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
}
.mc-snapshot {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  font-size: 11.5px;
  color: var(--ink-500);
  font-family: var(--font-mono);
}
.mc-snapshot::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--ok);
  animation: mcPulseTop 2.4s infinite;
}
@keyframes mcPulseTop {
  0% { box-shadow: 0 0 0 0 rgba(47, 125, 78, 0.4); }
  70% { box-shadow: 0 0 0 6px rgba(47, 125, 78, 0); }
  100% { box-shadow: 0 0 0 0 rgba(47, 125, 78, 0); }
}
.mc-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 500;
  letter-spacing: -0.005em;
  white-space: nowrap;
}
.mc-pill.mono {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.mc-pill.tone-ok { background: var(--ok); color: white; }
.mc-pill.tone-risk { background: var(--risk); color: white; }
.mc-pill.tone-warn { background: var(--warn); color: white; }
.mc-pill.tone-info { background: var(--info); color: white; }
.mc-pill.tone-accent { background: var(--accent); color: white; }
.mc-pill.tone-neutral { background: var(--ink-700); color: white; }
.mc-pill.soft.tone-ok { background: var(--ok-soft); color: var(--ok); }
.mc-pill.soft.tone-risk { background: var(--risk-soft); color: var(--risk); }
.mc-pill.soft.tone-warn { background: var(--warn-soft); color: #8C5F0E; }
.mc-pill.soft.tone-info { background: var(--info-soft); color: var(--info); }
.mc-pill.soft.tone-accent { background: var(--accent-soft); color: var(--accent-ink); }
.mc-pill.soft.tone-neutral { background: var(--neutral-soft); color: var(--ink-700); }
.mc-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  display: inline-block;
  flex: 0 0 auto;
}
.mc-dot.tone-ok { background: var(--ok); }
.mc-dot.tone-risk { background: var(--risk); }
.mc-dot.tone-warn { background: var(--warn); }
.mc-dot.tone-info { background: var(--info); }
.mc-dot.tone-neutral { background: var(--ink-400); }
.mc-dot.tone-accent { background: var(--accent); }
.mc-flex { flex: 1; }
.mc-cell-meta {
  color: var(--ink-500);
  font-size: 11.5px;
}

.ov-scope {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 20px 22px 22px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-1);
}
.ov-scope-h {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 14px;
  margin-bottom: 18px;
}
.ov-scope-snapshot {
  font-size: 11px;
  color: var(--ink-500);
  padding: 4px 10px;
  background: var(--bg-elev);
  border-radius: 999px;
  border: 1px solid var(--line-soft);
  white-space: nowrap;
}
.ov-scope-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(440px, 100%), 1fr));
  gap: clamp(18px, 1.8vw, 34px);
  align-items: start;
}
.ov-scope-rings {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: clamp(16px, 1.6vw, 32px);
}
.ov-ring-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  min-width: 0;
}
.ov-ring-svg { display: block; max-width: 100%; height: auto; }
.ov-ring-num {
  font-size: 36px;
  font-weight: 600;
  fill: var(--ink-900);
  letter-spacing: -0.03em;
  font-family: var(--font-mono);
  font-feature-settings: "tnum";
}
.ov-ring-lbl {
  font-size: 9.5px;
  fill: var(--ink-500);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: var(--font-mono);
  font-weight: 500;
}
.ov-ring-legend {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ov-ring-row {
  display: grid;
  grid-template-columns: 10px 1fr auto auto;
  gap: 8px;
  align-items: center;
  font-size: 11.5px;
  padding: 4px 6px;
  border-radius: 4px;
  min-width: 0;
}
.ov-ring-row:hover { background: var(--bg-elev); }
.ov-ring-sw {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}
.ov-ring-row-l {
  color: var(--ink-700);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ov-ring-row-n {
  color: var(--ink-900);
  font-weight: 600;
}
.ov-ring-row-p {
  color: var(--ink-400);
  font-size: 10.5px;
  min-width: 28px;
  text-align: right;
}
.ov-scope-audit {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ov-scope-audit-h {
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-500);
  font-weight: 600;
}
.ov-source-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: -4px;
}
.ov-source-chip {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line-soft);
  background: var(--bg-elev);
  color: var(--ink-550);
  border-radius: 999px;
  padding: 3px 7px;
  font-size: 9.5px;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.ov-source-chip.type-baseline {
  border-color: rgba(180, 108, 39, .26);
  background: rgba(180, 108, 39, .08);
  color: #8f610d;
}
.ov-source-chip.type-effective,
.ov-source-chip.type-workbook {
  border-color: rgba(38, 124, 179, .22);
  background: rgba(38, 124, 179, .08);
  color: var(--accent);
}
.ov-source-chip.type-calculated {
  border-color: rgba(73, 138, 86, .24);
  background: rgba(73, 138, 86, .08);
  color: var(--ok);
}
.ov-scope-audit-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr));
  gap: 8px;
}
.ov-audit-tile {
  background: var(--bg-elev);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 12px 14px;
  transition: border-color .15s;
  min-width: 0;
}
.ov-audit-tile:hover { border-color: var(--ink-200); }
.ov-audit-value {
  font-size: 22px;
  font-weight: 600;
  color: var(--ink-900);
  letter-spacing: -0.02em;
  line-height: 1;
}
.ov-audit-label {
  font-size: 11.5px;
  color: var(--ink-700);
  font-weight: 500;
  margin-top: 4px;
}
.ov-audit-note {
  font-size: 10.5px;
  color: var(--ink-400);
  margin-top: 1px;
  line-height: 1.25;
}
.ov-scope-note {
  font-size: 11.5px;
  color: var(--ink-500);
  line-height: 1.5;
  padding: 8px 0 0;
  border-top: 1px dashed var(--line-soft);
}

.ov-health {
  margin: -8px 0 28px;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--bg-card);
  box-shadow: 0 10px 26px rgba(15, 23, 42, 0.04);
  overflow: hidden;
}
.ov-health-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  cursor: pointer;
  list-style: none;
}
.ov-health-summary::-webkit-details-marker { display: none; }
.ov-health[open] .ov-health-summary {
  border-bottom: 1px solid var(--line-soft);
}
.ov-health-title {
  font-size: 15px;
  color: var(--ink-900);
  font-weight: 600;
  margin-top: 3px;
}
.ov-health-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  padding: 7px 10px;
  color: var(--ink-700);
  background: var(--bg-elev);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.ov-health-status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--ink-300);
}
.ov-health-status.tone-ok { color: var(--ok); border-color: var(--ok-soft); }
.ov-health-status.tone-ok .ov-health-status-dot { background: var(--ok); }
.ov-health-status.tone-warn { color: #8f610d; border-color: var(--warn-soft); }
.ov-health-status.tone-warn .ov-health-status-dot { background: var(--warn); }
.ov-health-status.tone-risk { color: var(--risk); border-color: var(--risk-soft); }
.ov-health-status.tone-risk .ov-health-status-dot { background: var(--risk); }
.ov-health-body {
  display: grid;
  gap: 12px;
  padding: 14px 16px 16px;
}
.ov-health-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(168px, 100%), 1fr));
  gap: 8px;
}
.ov-health-metric {
  min-width: 0;
  background: var(--bg-elev);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 10px 11px;
}
.ov-health-metric.tone-ok { border-color: var(--ok-soft); }
.ov-health-metric.tone-warn { border-color: var(--warn-soft); }
.ov-health-metric.tone-risk { border-color: var(--risk-soft); }
.ov-health-metric-v {
  font-size: 18px;
  line-height: 1;
  font-weight: 650;
  color: var(--ink-900);
}
.ov-health-metric-l {
  margin-top: 5px;
  font-size: 11px;
  color: var(--ink-700);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ov-health-metric-n {
  margin-top: 1px;
  font-size: 10px;
  color: var(--ink-400);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ov-health-band,
.ov-health-inventory {
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 12px;
  background: var(--bg-elev);
}
.ov-health-band-title {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-500);
  font-weight: 700;
  margin-bottom: 9px;
}
.ov-health-sheet-statuses,
.ov-health-sheet-list {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}
.ov-health-sheet-status,
.ov-health-sheet-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  border: 1px solid var(--line-soft);
  border-radius: 999px;
  background: var(--bg-card);
  padding: 6px 9px;
  font-size: 11px;
  color: var(--ink-700);
}
.ov-health-sheet-status strong,
.ov-health-sheet-chip strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-weight: 650;
}
.ov-health-sheet-status em,
.ov-health-sheet-chip em {
  color: var(--ink-400);
  font-style: normal;
  white-space: nowrap;
}
.ov-health-sheet-status.found { border-color: var(--ok-soft); }
.ov-health-sheet-status.missing { border-color: var(--risk-soft); color: var(--risk); }
.ov-health-sheet-chip.state-hidden,
.ov-health-sheet-chip.state-veryHidden {
  border-style: dashed;
}
.ov-health-sheet-chip.more {
  color: var(--ink-500);
  background: transparent;
}
.ov-health-note {
  margin-top: 8px;
  font-size: 11px;
  line-height: 1.45;
  color: var(--ink-500);
}
.ov-health-groups {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 8px;
}
.ov-health-group {
  min-width: 0;
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  background: var(--bg-elev);
  padding: 11px;
}
.ov-health-group.tone-warn { border-color: var(--warn-soft); }
.ov-health-group.tone-risk { border-color: var(--risk-soft); }
.ov-health-group-h {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink-800);
  font-size: 11.5px;
  font-weight: 650;
}
.ov-health-issues {
  display: grid;
  gap: 7px;
  margin-top: 9px;
}
.ov-health-issue {
  display: grid;
  grid-template-columns: 7px minmax(0, 1fr);
  gap: 7px;
  align-items: start;
  color: var(--ink-600);
  font-size: 11px;
  line-height: 1.35;
}
.ov-health-issue-dot {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--warn);
  margin-top: 4px;
}
.ov-health-group.tone-risk .ov-health-issue-dot { background: var(--risk); }
.ov-health-empty {
  margin-top: 9px;
  color: var(--ink-400);
  font-size: 11px;
  line-height: 1.35;
}
.ov-health-more {
  color: var(--ink-400);
  font-size: 10.5px;
  padding-left: 14px;
}

/* T021 Executive headline - one-glance management synthesis */
.ov-headline {
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--surface) 88%);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 16px 18px 18px;
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  box-shadow: 0 1px 0 rgba(15, 35, 50, 0.02);
}
.ov-headline-narrative {
  display: flex;
  align-items: baseline;
  gap: 12px;
  flex-wrap: wrap;
}
.ov-headline-eyebrow {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  flex: 0 0 auto;
}
.ov-headline-text {
  font-size: 14px;
  color: var(--ink-800);
  letter-spacing: -0.01em;
  line-height: 1.5;
  flex: 1;
  min-width: 0;
}
.ov-headline-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(220px, 100%), 1fr));
  gap: 10px;
}
.ov-headline-tile {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-left: 3px solid var(--ink-300);
  border-radius: var(--r-md);
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.ov-headline-tile.tone-ok      { border-left-color: var(--ok); }
.ov-headline-tile.tone-accent  { border-left-color: var(--accent); }
.ov-headline-tile.tone-info    { border-left-color: var(--info); }
.ov-headline-tile.tone-warn    { border-left-color: var(--warn); }
.ov-headline-tile.tone-risk    { border-left-color: var(--risk); }
.ov-headline-tile.tone-neutral { border-left-color: var(--ink-300); }
.ov-headline-label {
  font-size: 11.5px;
  letter-spacing: 0.02em;
  color: var(--ink-500);
  text-transform: uppercase;
  font-weight: 600;
}
.ov-headline-value {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink-900);
  line-height: 1.05;
  margin-top: 2px;
}
.ov-headline-note {
  font-size: 12.5px;
  color: var(--ink-700);
  line-height: 1.35;
}
.ov-headline-sub {
  font-size: 11px;
  color: var(--ink-500);
  letter-spacing: 0.01em;
}

.ov-section { margin-bottom: 28px; }
.ov-section-h {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--line-soft);
}
.ov-section-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.022em;
  margin: 4px 0 2px;
  color: var(--ink-900);
}
.ov-section-sub {
  font-size: 13px;
  color: var(--ink-500);
  margin: 0;
  max-width: 720px;
}
.ov-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr));
  gap: 12px;
  margin-bottom: 18px;
  overflow: visible;
}
.ov-kpi-grid.five { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); }
.ov-kpi.kpi {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: var(--shadow-1);
  overflow: visible;
}
.ov-kpi.kpi:hover {
  border-color: var(--ink-200);
  transform: translateY(-1px);
}
.ov-kpi.kpi.primary {
  background: linear-gradient(180deg, var(--accent-soft) 0%, var(--surface) 60%);
  border-color: var(--accent-soft);
}
.ov-kpi.kpi.primary::before {
  background: var(--accent);
}
.ov-kpi[data-source="baseline"]::before {
  background: repeating-linear-gradient(135deg, rgba(180, 108, 39, .55) 0 3px, transparent 3px 6px);
}
.ov-kpi.primary[data-source="baseline"] {
  background: linear-gradient(180deg, rgba(180, 108, 39, .07) 0%, var(--surface) 60%);
  border-color: rgba(180, 108, 39, .22);
}
.ov-kpi.primary[data-source="baseline"] .ov-kpi-value { color: #8f610d; }
.ov-kpi-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
}
.ov-kpi-label {
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--ink-500);
  font-weight: 600;
  font-family: var(--font-mono);
  min-width: 0;
}
.ov-kpi-value {
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.025em;
  color: var(--ink-900);
  line-height: 1;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}
.ov-kpi.primary .ov-kpi-value { color: var(--accent); }
.ov-kpi-hint {
  font-size: 11px;
  color: var(--ink-500);
  margin-top: -2px;
  min-height: 14px;
}
.ov-kpi-bar {
  display: flex;
  height: 8px;
  border-radius: 4px;
  overflow: hidden;
  background: var(--bg-sunken);
  margin-top: 4px;
}
.ov-kpi-seg { transition: flex .3s; }
.ov-kpi-legend {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 2px;
}
.ov-kpi-leg {
  display: grid;
  grid-template-columns: 8px 1fr auto;
  gap: 6px;
  align-items: center;
  font-size: 10.5px;
  min-width: 0;
}
.ov-kpi-leg-sw {
  width: 8px;
  height: 8px;
  border-radius: 2px;
}
.ov-kpi-leg-l {
  color: var(--ink-700);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ov-kpi-leg-n {
  color: var(--ink-900);
  font-weight: 600;
  font-size: 10.5px;
}
.ov-kpi .kpi-hint-row {
  margin-top: 2px;
}
.ov-row {
  display: grid;
  gap: 14px;
  margin-bottom: 18px;
}
.ov-row.split { grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr); }
.ov-row.tri { grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); }
.ov-rail {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.ov-panel {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  padding: 16px 18px 18px;
  box-shadow: var(--shadow-1);
  min-width: 0;
}
.ov-panel-h {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.ov-panel-h > *:first-child {
  min-width: 0;
  flex: 1;
}
.ov-panel-h > .ov-panel-title:first-child { flex: 1; }
.ov-panel-title {
  font-size: 14.5px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink-900);
  line-height: 1.25;
}
.ov-panel-sub {
  font-size: 11.5px;
  color: var(--ink-500);
  margin-top: 3px;
}
.ov-constellation-svg {
  width: 100%;
  height: auto;
  background: var(--bg-elev);
  border-radius: 10px;
}
.ov-const-quad {
  font-size: 9px;
  fill: var(--ink-400);
  letter-spacing: 0.16em;
  font-family: var(--font-mono);
  font-weight: 600;
}
.ov-const-axis {
  font-size: 9px;
  fill: var(--ink-500);
  letter-spacing: 0.08em;
  font-family: var(--font-mono);
}
.ov-const-label {
  font-size: 10px;
  fill: var(--ink-900);
  font-weight: 500;
  font-family: var(--font-sans);
}
.ov-const-num {
  font-size: 11px;
  fill: white;
  font-weight: 600;
  font-family: var(--font-mono);
}
.ov-me-performance {
  background: var(--bg-elev);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 12px;
  overflow: hidden;
}
.ov-me-performance-head,
.ov-me-performance-row {
  display: grid;
  grid-template-columns: minmax(150px, 1.1fr) 86px minmax(128px, 1fr) minmax(128px, 1fr);
  gap: 12px;
  align-items: center;
}
.ov-me-performance-head {
  padding: 0 10px 8px;
  color: var(--ink-400);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.ov-me-performance-rows {
  display: grid;
  gap: 7px;
}
.ov-me-performance-row {
  min-width: 0;
  min-height: 54px;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  padding: 9px 10px;
  box-shadow: 0 1px 0 rgba(20, 24, 31, 0.03);
}
.ov-me-performance-row:hover {
  border-color: var(--ink-200);
}
.ov-me-name {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ov-me-name-main {
  font-size: 12.5px;
  color: var(--ink-900);
  font-weight: 650;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ov-me-tier {
  display: inline-flex;
  width: fit-content;
  border-radius: 999px;
  padding: 2px 6px;
  font-size: 9.5px;
  font-weight: 650;
  line-height: 1.1;
  background: var(--neutral-soft);
  color: var(--ink-500);
}
.ov-me-tier.tone-ok { background: var(--ok-soft); color: var(--ok); }
.ov-me-tier.tone-info { background: var(--info-soft); color: var(--info); }
.ov-me-tier.tone-warn { background: var(--warn-soft); color: #8f610d; }
.ov-me-scope {
  display: inline-grid;
  grid-template-columns: 40px auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.ov-me-scope-bubble {
  display: inline-block;
  justify-self: center;
  align-self: center;
  border-radius: 999px;
  opacity: 0.22;
  box-shadow: inset 0 0 0 2px currentColor;
  color: var(--ink-900);
}
.ov-me-scope-num {
  font-size: 13px;
  color: var(--ink-900);
  font-weight: 700;
}
.ov-me-meter {
  min-width: 0;
}
.ov-me-meter-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--ink-500);
  font-size: 10.5px;
  margin-bottom: 5px;
}
.ov-me-meter-top strong {
  color: var(--ink-800);
  font-size: 11px;
}
.ov-me-track {
  height: 8px;
  border-radius: 999px;
  background: var(--bg-sunken);
  overflow: hidden;
}
.ov-me-fill {
  display: block;
  height: 100%;
  min-width: 3px;
  border-radius: inherit;
}
.ov-me-fill.order {
  background: var(--accent);
  opacity: 0.82;
}
.ov-const-legend {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 10px 4px 0;
  font-size: 11px;
  color: var(--ink-500);
  flex-wrap: wrap;
}
.ov-const-leg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ov-mebars {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ov-mebars-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 11px;
  color: var(--ink-500);
  padding-bottom: 8px;
  border-bottom: 1px dashed var(--line-soft);
}
.ov-mebars-leg {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.ov-mebars-leg-sw {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}
.ov-mebars-rows {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ov-mebars-row {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 12px;
  align-items: center;
  padding: 4px 0;
}
.ov-mebars-label {
  font-size: 12px;
  color: var(--ink-700);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ov-mebars-track {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  align-items: center;
}
.ov-mebars-bar-wrap {
  position: relative;
  height: 16px;
  background: var(--bg-sunken);
  border-radius: 3px;
  overflow: hidden;
}
.ov-mebars-bar {
  height: 100%;
  transition: width .4s ease-out;
}
.ov-mebars-bar-n {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: var(--ink-700);
  font-weight: 600;
}
.ov-risks {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ov-risks.dense .ov-risk-row { padding: 6px 0; }
.ov-risk-row {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--line-soft);
  font-size: 12px;
  min-width: 0;
}
.ov-risk-row:last-child { border-bottom: 0; }
.ov-risk-me {
  font-size: 11px;
  color: var(--ink-500);
  font-weight: 600;
}
.ov-risk-issue {
  color: var(--ink-700);
  font-size: 12px;
  line-height: 1.35;
  min-width: 0;
}
.ov-batch {
  background: var(--accent);
  color: white;
  border-radius: var(--r-lg);
  padding: 18px;
  position: relative;
  overflow: hidden;
}
.ov-batch::before,
.ov-batch::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 50%;
}
.ov-batch::before {
  right: -40px;
  top: -40px;
  width: 140px;
  height: 140px;
}
.ov-batch::after {
  right: -20px;
  bottom: -60px;
  width: 100px;
  height: 100px;
  border-color: rgba(255,255,255,0.08);
}
.ov-batch-tag {
  font-size: 9.5px;
  letter-spacing: 0.16em;
  color: rgba(255,255,255,0.65);
  font-weight: 600;
  text-transform: uppercase;
}
.ov-batch-val {
  font-size: 40px;
  font-weight: 600;
  letter-spacing: -0.03em;
  margin-top: 6px;
  line-height: 1;
}
.ov-batch-sub {
  font-size: 12.5px;
  color: rgba(255,255,255,0.75);
  margin-top: 2px;
}
.ov-batch-target {
  font-size: 11.5px;
  color: rgba(255,255,255,0.65);
  margin-top: 14px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.15);
}
.ov-forecast {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
}
.ov-forecast-card {
  background: var(--bg-elev);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  padding: 14px;
}
.ov-forecast-region {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-500);
  font-weight: 600;
  font-family: var(--font-mono);
  margin-bottom: 10px;
}
.ov-forecast-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.ov-forecast-metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.ov-forecast-num {
  font-size: 24px;
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink-900);
  line-height: 1;
}
.ov-forecast-l {
  font-size: 10.5px;
  color: var(--ink-500);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.ov-forecast-bar {
  height: 4px;
  background: var(--bg-sunken);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 4px;
}
.ov-forecast-bar > div {
  height: 100%;
  transition: width .4s;
}
.ov-funnel {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.ov-funnel-step {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.ov-funnel-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}
.ov-funnel-label {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-size: 12.5px;
  color: var(--ink-700);
  line-height: 1.2;
  white-space: nowrap;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.ov-funnel-idx {
  font-size: 10px;
  color: var(--ink-400);
  font-weight: 600;
}
.ov-funnel-val {
  font-size: 16px;
  font-weight: 600;
  color: var(--ink-900);
  letter-spacing: -0.01em;
  font-family: var(--font-mono);
  white-space: nowrap;
}
.ov-funnel-bar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.ov-funnel-bar-track {
  flex: 1;
  height: 12px;
  background: var(--bg-sunken);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.ov-funnel-bar {
  height: 12px;
  border-radius: 4px;
  transition: width .5s ease-out;
  flex-shrink: 0;
}
.ov-funnel-conv {
  font-size: 10.5px;
  color: var(--ink-500);
  white-space: nowrap;
  min-width: 50px;
}
.ov-funnel-conv strong {
  color: var(--ink-900);
  font-weight: 600;
}
.ov-donut-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}
.ov-donut-svg { display: block; }
.ov-donut-num {
  font-size: 28px;
  font-weight: 600;
  fill: var(--ink-900);
  font-family: var(--font-mono);
  letter-spacing: -0.02em;
}
.ov-donut-lbl {
  font-size: 9px;
  fill: var(--ink-500);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-family: var(--font-mono);
}
.ov-donut-legend {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.ov-donut-row {
  display: grid;
  grid-template-columns: 10px 1fr auto;
  gap: 8px;
  align-items: center;
  font-size: 11.5px;
  padding: 4px 6px;
  border-radius: 4px;
}
.ov-donut-row:hover { background: var(--bg-elev); }
.ov-donut-sw {
  width: 10px;
  height: 10px;
  border-radius: 2px;
}
.ov-donut-l { color: var(--ink-700); }
.ov-donut-n {
  color: var(--ink-900);
  font-weight: 600;
}
.ov-status {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ov-status-label {
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  font-weight: 600;
  font-family: var(--font-mono);
  margin-bottom: 4px;
}
.ov-status-text {
  font-size: 12.5px;
  color: var(--ink-700);
  line-height: 1.5;
}
.ov-countries {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ov-country-row {
  display: grid;
  grid-template-columns: 100px 1fr;
  gap: 12px;
  align-items: center;
}
.ov-country-name {
  font-size: 12.5px;
  color: var(--ink-900);
  font-weight: 500;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ov-country-bar-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}
.ov-country-bar-track {
  flex: 1;
  height: 14px;
  background: var(--bg-sunken);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.ov-country-bar-fill {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: var(--accent);
}
.ov-country-bar-risk {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: var(--risk);
}
.ov-country-n {
  font-size: 11.5px;
  color: var(--ink-900);
  font-weight: 600;
  min-width: 26px;
  text-align: right;
}
.ov-country-risk-n {
  font-size: 11px;
  color: var(--risk);
  white-space: nowrap;
}
.ov-latest-risks {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ov-latest-risk-row {
  padding: 10px 12px;
  background: var(--bg-elev);
  border: 1px solid var(--line-soft);
  border-radius: 8px;
  border-left: 3px solid var(--risk);
}
.ov-latest-risk-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
}
.ov-latest-risk-name {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--ink-900);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}
.ov-latest-risk-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--ink-500);
  margin-top: 2px;
}
.ov-latest-risk-text {
  font-size: 11.5px;
  color: var(--ink-700);
  margin-top: 4px;
  line-height: 1.4;
}
.ov-view-all {
  align-self: flex-start;
  margin-top: 2px;
}

@media (max-width: 1280px) {
  .ov-row.split { grid-template-columns: 1fr; }
  .ov-row.tri { grid-template-columns: 1fr 1fr; }
  .ov-kpi-grid.five { grid-template-columns: repeat(3, 1fr); }
  .ov-health-metrics { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .ov-health-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .mc-page-h {
    align-items: flex-start;
    flex-direction: column;
  }
  .mc-page-h-right {
    justify-content: flex-start;
  }
  .ov-scope-grid {
    grid-template-columns: 1fr;
  }
  .ov-kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 760px) {
  .mc-page-title {
    font-size: 24px;
    overflow-wrap: anywhere;
  }
  .mc-page-sub {
    font-size: 12.5px;
  }
  .ov-scope-rings,
  .ov-scope-audit-grid,
  .ov-kpi-grid,
  .ov-kpi-grid.five,
  .ov-row.tri,
  .ov-forecast {
    grid-template-columns: 1fr;
  }
  .ov-scope-h {
    flex-direction: column;
    align-items: flex-start;
  }
  .ov-mebars-row,
  .ov-risk-row,
  .ov-country-row {
    grid-template-columns: 1fr;
  }
  .ov-mebars-track {
    grid-template-columns: 1fr 1fr;
  }
  .ov-health-summary {
    flex-direction: column;
    align-items: flex-start;
  }
  .ov-health-metrics,
  .ov-health-groups {
    grid-template-columns: 1fr;
  }
  .ov-health-status {
    white-space: normal;
  }
  .ov-me-performance-head {
    display: none;
  }
  .ov-me-performance-row {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .ov-me-scope {
    grid-template-columns: 34px auto;
  }
  .ov-panel-h {
    flex-direction: column;
  }
}

/* ---------- Pills / chips ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: -0.002em;
  white-space: nowrap;
  background: var(--neutral-soft);
  color: var(--ink-700);
}
.pill .dot {
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--ink-400);
}
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.ok .dot { background: var(--ok); }
.pill.warn { background: var(--warn-soft); color: var(--warn); }
.pill.warn .dot { background: var(--warn); }
.pill.risk { background: var(--risk-soft); color: var(--risk); }
.pill.risk .dot { background: var(--risk); }
.pill.info { background: var(--info-soft); color: var(--info); }
.pill.info .dot { background: var(--info); }
.pill.muted { background: var(--bg-sunken); color: var(--ink-500); }
.pill.muted .dot { background: var(--ink-300); }
.pill.gold { background: #F2E5C7; color: #7A5A1F; }
.pill.gold .dot { background: var(--gold); }
.pill.silver { background: #E2E5EA; color: #3E4A57; }
.pill.silver .dot { background: var(--silver); }
.pill.bronze { background: #EBDCCC; color: #5E3A22; }
.pill.bronze .dot { background: var(--bronze); }

/* ---------- Progress ---------- */
.progress {
  height: 6px;
  width: 100%;
  background: var(--bg-sunken);
  border-radius: 999px;
  overflow: hidden;
  position: relative;
}
.progress > span {
  display: block;
  height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width .6s cubic-bezier(.2,.7,.2,1);
}
.progress.thin { height: 4px; }
.progress.thick { height: 10px; }
.progress.ok > span { background: var(--ok); }
.progress.warn > span { background: var(--warn); }
.progress.risk > span { background: var(--risk); }

.stack-bar {
  display: flex;
  height: 10px;
  width: 100%;
  border-radius: 999px;
  overflow: hidden;
  background: var(--bg-sunken);
}
.stack-bar > span {
  display: block; height: 100%;
  transition: width .6s cubic-bezier(.2,.7,.2,1);
}

/* ---------- Tables ---------- */
.table-wrap {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-1);
}
.table-scroll {
  overflow: auto;
  max-height: 70vh;
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}
table.data thead th {
  position: sticky; top: 0;
  background: var(--bg-elev);
  text-align: left;
  font-size: 10.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-500);
  padding: 10px 14px;
  font-weight: 600;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
  z-index: 1;
}
table.data tbody td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--line-soft);
  vertical-align: middle;
  color: var(--ink-700);
  letter-spacing: -0.002em;
}
table.data tbody tr:hover td { background: var(--bg-elev); cursor: pointer; }
table.data tbody tr:last-child td { border-bottom: 0; }
table.data .num { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
table.data .strong { color: var(--ink-900); font-weight: 500; }

.table-toolbar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg-elev);
}
.search-input {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 5px 10px;
  flex: 1;
  max-width: 360px;
}
.search-input input {
  border: 0; background: transparent; outline: none;
  width: 100%;
  font-size: 13px;
  color: var(--ink-900);
}
.search-input input::placeholder { color: var(--ink-400); }
.filter-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 10px;
  border-radius: 8px;
  background: var(--surface);
  border: 1px solid var(--line);
  font-size: 12px;
  color: var(--ink-700);
}
.filter-chip select {
  background: transparent; border: 0; outline: none;
  font-size: 12px;
  color: var(--ink-700);
}
.filter-chip label {
  color: var(--ink-500); font-size: 11px;
}

/* ---------- Map ---------- */
.map-wrap {
  background: linear-gradient(135deg, #F8FBFC, #F5F1E8);
  border: 1px solid var(--line-soft);
  border-radius: var(--r-lg);
  overflow: hidden;
  position: relative;
  box-shadow: var(--shadow-1);
}
.map-svg { display: block; width: 100%; height: 100%; }
.map-graticule {
  fill: none;
  stroke: rgba(31, 77, 92, .11);
  stroke-width: .55;
  pointer-events: none;
}
.map-country {
  fill: var(--bg-sunken);
  stroke: rgba(255,255,255,.92);
  stroke-width: 0.7;
  transition: fill .16s, stroke .16s, stroke-width .16s, filter .16s;
  cursor: default;
}
.map-country.has-data { cursor: pointer; }
.map-country.has-data:hover {
  stroke: var(--ink-900);
  stroke-width: 1.25;
  filter: drop-shadow(0 2px 4px rgba(20,24,31,.18));
}
.map-country.selected {
  stroke: #111827;
  stroke-width: 2.2;
  filter: drop-shadow(0 3px 7px rgba(20,24,31,.28));
}
.map-marker {
  pointer-events: none;
  mix-blend-mode: multiply;
  stroke: rgba(255,255,255,.92);
  stroke-width: 1.1;
  transition: opacity .16s, r .16s;
}
.map-marker.selected {
  mix-blend-mode: normal;
  stroke: white;
  stroke-width: 2;
}
.map-legend {
  position: absolute; bottom: 14px; left: 14px;
  background: rgba(255,255,255,.9);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  padding: 11px 13px;
  font-size: 11.5px;
  color: var(--ink-500);
  box-shadow: var(--shadow-1);
}
.map-legend .swatches { display: flex; gap: 4px; margin-top: 6px; }
.map-legend .sw {
  width: 26px; height: 9px; border-radius: 999px;
}
.map-source-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: -6px 0 14px;
}
.map-source-strip span {
  border: 1px solid var(--line-soft);
  background: var(--bg-elev);
  color: var(--ink-550);
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 11px;
  line-height: 1.2;
}
.map-source-strip strong {
  color: var(--ink-800);
  font-weight: 800;
}

.map-tooltip {
  position: absolute;
  pointer-events: none;
  background: rgba(20, 24, 31, .96);
  color: white;
  padding: 9px 12px;
  border-radius: 10px;
  font-size: 12px;
  letter-spacing: -0.005em;
  box-shadow: var(--shadow-3);
  transform: translate(-50%, -120%);
  white-space: nowrap;
  opacity: 0;
  transition: opacity .14s;
  z-index: 50;
}
.map-tooltip.show { opacity: 1; }
.map-tooltip .ttl { font-weight: 700; font-size: 13px; }
.map-tooltip .row { color: rgba(255,255,255,.74); font-size: 11px; margin-top: 3px; font-family: var(--font-mono); }

/* T024 — Drilldown grids: responsive layout below the map */
.map-drilldown-body {
  display: grid;
  grid-template-columns: 1fr 1.4fr 1fr;
  gap: 22px;
  padding: 22px;
}
.map-drilldown-empty-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 30px;
  align-items: center;
}

/* T024 — Narrow viewport responsiveness for the map module */
@media (max-width: 980px) {
  .map-drilldown-body { grid-template-columns: 1fr; gap: 18px; padding: 18px; }
  .map-drilldown-empty-grid { grid-template-columns: 1fr; gap: 20px; }
}
@media (max-width: 720px) {
  .map-wrap {
    height: auto !important;
    aspect-ratio: 16 / 9;
    min-height: 240px;
  }
  .map-tooltip {
    white-space: normal;
    max-width: min(260px, calc(100vw - 32px));
    word-wrap: break-word;
  }
  .map-tooltip .row {
    font-size: 10.5px;
    line-height: 1.35;
  }
  .map-legend {
    bottom: 8px;
    left: 8px;
    padding: 7px 10px;
    font-size: 10.5px;
  }
  .map-legend .sw {
    width: 18px; height: 7px;
  }
  .map-source-strip {
    gap: 5px;
    margin: -4px 0 10px;
  }
  .map-source-strip span {
    padding: 4px 8px;
    font-size: 10.5px;
  }
}

/* ---------- Side panel ---------- */
.side-panel-overlay {
  position: fixed; inset: 0;
  background: rgba(20, 24, 31, 0.35);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
  z-index: 60;
  opacity: 0;
  pointer-events: none;
  transition: opacity .18s;
}
.side-panel-overlay.show { opacity: 1; pointer-events: auto; }
.side-panel {
  position: fixed; right: 0; top: 0; bottom: 0;
  width: 580px; max-width: 95vw;
  background: var(--bg);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow-3);
  z-index: 61;
  display: flex; flex-direction: column;
  transform: translateX(100%);
  transition: transform .22s cubic-bezier(.2,.8,.2,1);
}
.side-panel.show { transform: translateX(0); }
.side-panel-h {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-elev);
}
.side-panel-body {
  flex: 1; overflow: auto;
  padding: 20px;
}
.side-panel-section { margin-bottom: 22px; }
.side-panel-section h4 {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-500);
  margin: 0 0 10px;
  font-weight: 600;
}

.kv-grid {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 8px 14px;
  font-size: 12.5px;
}
.kv-grid .k { color: var(--ink-500); }
.kv-grid .v { color: var(--ink-900); font-weight: 500; }

/* ---------- Charts ---------- */
.bar-chart { display: flex; flex-direction: column; gap: 7px; }
.bar-row {
  display: grid;
  grid-template-columns: 120px 1fr 50px;
  align-items: center;
  gap: 10px;
  font-size: 12.5px;
}
.bar-row .lbl { color: var(--ink-700); }
.bar-row .num { font-family: var(--font-mono); color: var(--ink-500); text-align: right; }
.bar-row .bar { height: 8px; background: var(--bg-sunken); border-radius: 999px; overflow: hidden; }
.bar-row .bar > span {
  display: block; height: 100%;
  background: var(--accent);
  border-radius: 999px;
  transition: width .5s cubic-bezier(.2,.7,.2,1);
}

.funnel { display: flex; flex-direction: column; gap: 6px; }
.funnel-step {
  display: grid;
  grid-template-columns: 1fr 80px;
  align-items: center;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--bg-sunken);
  font-size: 13px;
  position: relative;
  overflow: hidden;
}
.funnel-step .fbar {
  position: absolute;
  inset: 0 auto 0 0;
  background: linear-gradient(to right, var(--accent-soft), rgba(0,0,0,0));
  transition: width .5s cubic-bezier(.2,.7,.2,1);
}
.funnel-step .ftext { position: relative; z-index: 1; color: var(--ink-700); font-weight: 500; }
.funnel-step .fnum { position: relative; z-index: 1; font-family: var(--font-mono); color: var(--ink-900); font-weight: 600; text-align: right; }

.donut { position: relative; }
.donut svg { display: block; }
.donut .center {
  position: absolute; inset: 0;
  display: grid; place-items: center;
  text-align: center;
}
.donut .center .v {
  font-family: var(--font-display);
  font-weight: 600; font-size: 22px;
  letter-spacing: -0.02em;
}
.donut .center .l {
  font-size: 10.5px; text-transform: uppercase;
  letter-spacing: 0.08em; color: var(--ink-500);
}

/* ---------- Chat ---------- */
.chat-thread {
  display: flex; flex-direction: column;
  gap: 8px;
  padding: 14px;
}
.chat-msg {
  display: flex; gap: 10px;
  padding: 10px 12px;
  border-radius: 12px;
  background: var(--bg-elev);
  border: 1px solid var(--line-soft);
}
.chat-msg .avatar {
  width: 28px; height: 28px;
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 11px;
  font-weight: 600;
  display: grid; place-items: center;
  flex-shrink: 0;
}
.chat-msg .body { flex: 1; min-width: 0; }
.chat-msg .meta {
  font-size: 11px;
  color: var(--ink-500);
  margin-bottom: 3px;
}
.chat-msg .meta .author { color: var(--ink-900); font-weight: 600; }
.chat-msg .text {
  font-size: 13px;
  color: var(--ink-700);
  white-space: pre-wrap;
  word-wrap: break-word;
  line-height: 1.45;
}
.chat-input {
  padding: 12px;
  border-top: 1px solid var(--line-soft);
  background: var(--bg-elev);
  display: flex; gap: 8px;
}
.chat-input textarea {
  flex: 1;
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  outline: none;
  resize: none;
  min-height: 38px;
  max-height: 100px;
}
.chat-input textarea:focus { border-color: var(--ink-300); }
.chat-scope-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px;
  background: var(--bg-elev);
  border-bottom: 1px solid var(--line-soft);
  font-size: 12px;
}
.chat-scope-bar select {
  border: 1px solid var(--line);
  background: var(--surface);
  border-radius: 6px;
  padding: 3px 6px;
  font-size: 12px;
  color: var(--ink-700);
}
.chat-empty {
  text-align: center;
  padding: 40px 20px;
  color: var(--ink-400);
  font-size: 13px;
}

/* ---------- Loading / empty states ---------- */
.splash {
  display: grid; place-items: center;
  min-height: 100vh;
  background: var(--bg);
  padding: 24px;
}
.splash-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  padding: 40px 44px;
  max-width: 520px;
  width: 100%;
  box-shadow: var(--shadow-2);
  text-align: center;
}
.splash-card .mark {
  width: 52px; height: 52px;
  background: var(--accent); color: white;
  border-radius: 14px;
  display: grid; place-items: center;
  margin: 0 auto 18px;
  font-family: var(--font-mono);
  font-size: 20px;
  font-weight: 600;
}
.splash-card h1 {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 8px;
}
.splash-card p {
  color: var(--ink-500);
  font-size: 13.5px;
  line-height: 1.5;
  margin: 0 0 18px;
}
.splash-status {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--ink-500);
  margin-top: 14px;
}
.splash-error {
  color: var(--risk);
  background: var(--risk-soft);
  border: 1px solid #ECCBC3;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 12.5px;
  text-align: left;
  margin-top: 12px;
}
.splash-actions {
  display: flex; gap: 10px; justify-content: center;
  margin-top: 16px;
}

.skel {
  background: linear-gradient(90deg, var(--bg-sunken), var(--bg-elev), var(--bg-sunken));
  background-size: 200% 100%;
  animation: shimmer 1.6s linear infinite;
  border-radius: 6px;
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

.empty-state {
  text-align: center;
  padding: 40px 20px;
  color: var(--ink-400);
}
.empty-state .glyph {
  width: 38px; height: 38px;
  margin: 0 auto 10px;
  background: var(--bg-sunken);
  border-radius: 10px;
  display: grid; place-items: center;
}
.empty-state .ttl { color: var(--ink-700); font-weight: 500; font-size: 14px; }
.empty-state .sub { font-size: 12.5px; margin-top: 4px; }

/* ---------- Misc ---------- */
.divider { height: 1px; background: var(--line-soft); margin: 16px 0; }
.muted { color: var(--ink-500); }
.mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.right { text-align: right; }
.center { text-align: center; }
.sr { position: absolute; clip: rect(0 0 0 0); width: 1px; height: 1px; overflow: hidden; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.flex { display: flex; align-items: center; gap: 10px; }
.flex-col { display: flex; flex-direction: column; gap: 10px; }
.gap-sm { gap: 6px; }
.gap-lg { gap: 18px; }
.mt-sm { margin-top: 6px; }
.mt-md { margin-top: 12px; }
.mt-lg { margin-top: 18px; }
.mb-md { margin-bottom: 12px; }

.toast {
  position: fixed; bottom: 24px; left: 50%;
  transform: translate(-50%, 20px);
  background: var(--ink-900); color: white;
  padding: 10px 16px;
  border-radius: 10px;
  font-size: 12.5px;
  opacity: 0; transition: opacity .15s, transform .15s;
  pointer-events: none;
  z-index: 200;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Tabs ---------- */
.tabs {
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 16px;
}
.tabs button {
  border: 0;
  background: transparent;
  padding: 8px 14px;
  font-size: 13px;
  color: var(--ink-500);
  position: relative;
  letter-spacing: -0.005em;
  font-weight: 500;
}
.tabs button.active {
  color: var(--ink-900);
}
.tabs button.active::after {
  content: "";
  position: absolute;
  left: 8px; right: 8px;
  bottom: -1px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

/* ---------- Status dots ---------- */
.status-cell { display: inline-flex; align-items: center; gap: 6px; }
.status-cell .dot { width: 8px; height: 8px; border-radius: 50%; }
.status-cell.ok .dot { background: var(--ok); }
.status-cell.warn .dot { background: var(--warn); }
.status-cell.risk .dot { background: var(--risk); }
.status-cell.info .dot { background: var(--info); }
.status-cell.muted .dot { background: var(--ink-300); }

/* ---------- Task matrix ---------- */
.task-matrix {
  display: grid;
  grid-template-columns: 240px repeat(12, minmax(0, 1fr));
  gap: 2px;
  background: var(--line-soft);
  border: 1px solid var(--line-soft);
  border-radius: 10px;
  overflow: hidden;
  font-size: 11px;
}
.task-matrix .cell, .task-matrix .head {
  background: var(--surface);
  padding: 8px 6px;
  text-align: center;
  display: flex; align-items: center; justify-content: center;
}
.task-matrix .head {
  background: var(--bg-elev);
  font-size: 10px;
  color: var(--ink-500);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 600;
  min-height: 44px;
}
.task-matrix .rowlabel {
  background: var(--surface);
  text-align: left;
  padding: 8px 12px;
  font-size: 12px;
  color: var(--ink-700);
  font-weight: 500;
}
.task-cell {
  width: 14px; height: 14px;
  border-radius: 4px;
  background: var(--bg-sunken);
}
.task-cell.ready { background: var(--ok); }
.task-cell.blocked { background: var(--risk); }
.task-cell.partial { background: var(--warn); }
.task-cell.notstarted { background: var(--ink-200); }
.task-cell.na { background: transparent; border: 1px dashed var(--line); }
