
  #stakeholderReport {
    --report-bg: var(--wa-surface-2);
    --report-ink: var(--wa-text);
    --report-ink-soft: var(--wa-text);
    --report-border: var(--wa-hairline-soft);
    --report-surface: var(--wa-surface);
    --report-surface-dark: var(--wa-canvas-deep);
    --report-accent: var(--wa-surface-2);
    --report-primary: var(--wa-canvas-deep);
    --report-highlight: var(--wa-info);
    --report-success: var(--wa-good);
    --report-warning: var(--wa-warn);
    --report-danger: var(--wa-bad);
    --report-shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --report-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --report-shadow-lg: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    background: var(--report-bg);
    background-image:
      radial-gradient(at 0% 0%, var(--wa-accent-wash) 0px, transparent 50%),
      radial-gradient(at 100% 0%, var(--wa-info-wash) 0px, transparent 50%);
    min-height: 100vh;
    font-family: var(--wa-font-ui);
    color: var(--report-ink);
    line-height: 1.6;
  }

  .report-branding {
    padding: 2.5rem 0 1rem 0;
    text-align: center;
    background: transparent;
    border-bottom: 1px solid var(--wa-hairline);
  }

  .report-branding h1 {
    font-size: 2.25rem;
    font-weight: 800;
    letter-spacing: -0.025em;
    color: var(--report-primary);
    margin-bottom: 0.5rem;
  }

  .report-branding p {
    color: var(--report-ink-soft);
    font-weight: 500;
    font-size: 1.125rem;
  }

  .report-controls {
    background: var(--wa-surface);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--wa-hairline);
    padding: 1rem 2rem;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: var(--report-shadow-sm);
  }

  .control-group {
    display: flex;
    align-items: center;
    gap: 1.25rem;
  }

  .control-item {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
  }

  .control-label {
    font-size: 0.55rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--wa-text-dim);
  }

  .control-select {
    font-size: 0.75rem;
    font-weight: 700;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    padding: 0.35rem 1.75rem 0.35rem 0.75rem;
    background-color: var(--wa-surface-2);
    color: var(--report-ink);
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0.5rem center;
    background-size: 1em 1em;
    min-width: 130px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .control-select:hover {
    background-color: var(--wa-surface-3);
  }

  .report-container {
    max-width: 1600px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
  }

  .workspace-layout {
    display: grid;
    grid-template-columns: 240px 1fr;
    gap: 3rem;
  }

  .report-nav {
    position: sticky;
    top: 6.5rem;
    height: fit-content;
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
  }

  .report-nav-item {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--report-ink-soft);
    text-decoration: none !important;
    padding: 0.6rem 0.875rem;
    border-radius: 0.375rem;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-left: 2px solid transparent;
  }

  .report-nav-item i {
    font-size: 1rem;
    color: var(--wa-text-faint);
    transition: transform 0.2s, color 0.2s;
  }

  .report-nav-item:hover {
    background: var(--wa-surface);
    color: var(--report-ink);
  }

  .report-nav-item.active {
    background: var(--wa-surface);
    color: var(--report-primary);
    border-left-color: var(--report-highlight);
    box-shadow: var(--report-shadow-sm);
  }

  .report-nav-item.active i { 
    color: var(--report-highlight); 
  }

  .report-section {
    margin-bottom: 4rem;
    scroll-margin-top: 7rem;
    animation: fadeIn 0.5s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
  }

  @keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); filter: blur(2px); }
    to { opacity: 1; transform: translateY(0); filter: blur(0); }
  }

  .section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--report-border);
  }

  .section-eyebrow {
    font-size: 0.6875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.15em;
    color: var(--wa-text-dim);
    margin-bottom: 0.25rem;
    display: block;
  }

  .section-title {
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--report-ink);
    margin-bottom: 0;
    letter-spacing: -0.03em;
  }

  .report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.25rem;
  }

  .report-card {
    background: var(--report-surface);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--wa-hairline);
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: var(--report-shadow);
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.2s ease, border-color 0.2s ease;
    display: flex;
    flex-direction: column;
  }

  .report-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--report-shadow-lg);
    border-color: var(--wa-hairline);
  }

  .report-card.dark-mode {
    background: var(--report-surface-dark);
    border: 1px solid var(--wa-hairline);
    color: var(--wa-text-inverse);
  }

  .report-card.dark-mode .card-label { color: var(--wa-text-faint); }
  .report-card.dark-mode .card-value { color: var(--wa-text-inverse); }
  .report-card.dark-mode .text-muted { color: var(--wa-text-faint) !important; }

  .card-label {
    font-size: 0.6875rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--wa-text-dim);
    margin-bottom: 0.75rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .card-value {
    font-size: 2.25rem;
    font-weight: 900;
    color: var(--report-ink);
    line-height: 1;
    margin-bottom: 0.5rem;
    letter-spacing: -0.04em;
    font-variant-numeric: tabular-nums;
  }

  .card-trend {
    font-size: 0.8125rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.25rem 0.5rem;
    border-radius: 0.25rem;
    background: var(--wa-surface-2);
  }

  .trend-up { color: var(--report-success); background: var(--wa-good-wash); }
  .trend-down { color: var(--report-danger); background: var(--wa-surface); }

  .chart-container {
    position: relative;
    width: 100%;
    height: 100%;
    min-height: 280px;
  }

  .exec-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-variant-numeric: tabular-nums;
  }

  .exec-table th {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--wa-text-dim);
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--wa-hairline);
    background: transparent;
    text-align: left;
    white-space: nowrap;
  }

  .exec-table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--wa-hairline-soft);
    font-weight: 600;
    font-size: 0.8125rem;
    color: var(--wa-text);
  }
  
  .exec-table tbody tr:hover td {
    background: var(--wa-surface);
  }

  .exec-table tbody tr:last-child td {
    border-bottom: none;
  }

  .section-visibility-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 1rem;
  }

  .section-toggle {
    font-size: 0.6875rem;
    font-weight: 700;
    padding: 0.35rem 0.875rem;
    border-radius: 2rem;
    border: 1px solid var(--wa-hairline);
    background: var(--wa-surface);
    color: var(--wa-text);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .section-toggle:hover {
    background: var(--wa-surface);
    color: var(--report-ink);
  }

  .section-toggle.active {
    background: var(--report-primary);
    color: white;
    border-color: var(--report-primary);
  }

  .ai-insight-block {
    background: linear-gradient(145deg, rgba(15, 23, 42, 0.95) 0%, rgba(30, 41, 59, 0.95) 100%);
    border: 1px solid var(--wa-hairline);
    color: white;
    border-radius: 1rem;
    padding: 2rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 10px 15px -3px rgba(0,0,0,0.3);
  }

  .ai-insight-block::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; height: 1px;
    background: linear-gradient(90deg, transparent, var(--wa-info), transparent);
  }

  .status-badge {
    font-size: 0.625rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    padding: 0.25rem 0.6rem;
    border-radius: 0.25rem;
  }
  .status-success { background: var(--wa-good-wash); color: var(--wa-good); }
  .status-warning { background: var(--wa-warn-wash); color: var(--wa-warn); }
  .status-danger { background: var(--wa-bad-wash); color: var(--wa-bad); }
  .status-info { background: var(--wa-info-wash); color: var(--wa-info); }

  .report-shimmer {
    background: linear-gradient(90deg, var(--wa-surface-2) 0%, var(--wa-surface) 50%, var(--wa-surface-2) 100%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
  }

  @keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
  }

  @media (max-width: 1024px) {
    .workspace-layout { grid-template-columns: 1fr; }
    .report-nav { display: none; }
  }

  @media print {
    .report-controls, .report-nav, .navbar, .btn-print { display: none !important; }
    .report-container { max-width: 100%; padding: 0; }
    .report-section { page-break-inside: avoid; margin-bottom: 3rem; opacity: 1 !important; }
    .workspace-layout { display: block; }
    #stakeholderReport { background: white; }
    .report-card, .ai-insight-block { box-shadow: none; border: 1px solid var(--wa-hairline-soft); color: black; background: white; }
    .ai-insight-block .text-white { color: black !important; }
  }

/* ==========================================================================
   Demand & Supply Planner
   --------------------------------------------------------------------------
   Everything here reads the theme tokens, so the page follows the light/dark
   toggle like the rest of the app. The only colour that is allowed to be loud
   is the at-risk quadrant, because it is the one thing on the page that means
   the problem grows while you look at it.
   ========================================================================== */

.plan-lede {
  color: var(--wa-text-dim);
  max-width: 74ch;
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

/* Figures sit above the list that repeats them: the picture answers "which
   department is the problem", the list answers "by exactly how much". The
   min-height is reserved so the section does not jump when Plotly - which is
   loaded on idle - finally draws. */
.plan-chart {
  margin: 0 0 1.5rem;
  min-height: 220px;
}

/* ---- headline figures ---------------------------------------------------- */
.plan-kpis {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--wa-hairline);
  border: 1px solid var(--wa-hairline);
  border-radius: var(--wa-radius);
  overflow: hidden;
}

.plan-kpi {
  background: var(--wa-surface);
  padding: 1.1rem 1.15rem;
  border-top: 2px solid transparent;
}

.plan-kpi--warn { border-top-color: var(--wa-warn); }
.plan-kpi--danger { border-top-color: var(--wa-bad); }

.plan-kpi__label {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--wa-text-faint);
}

.plan-kpi__value {
  font-family: var(--wa-font-display);
  font-variant-numeric: tabular-nums;
  font-size: 1.9rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.15;
  margin: 0.3rem 0 0.25rem;
  color: var(--wa-text);
}

.plan-kpi__note {
  font-size: 0.78rem;
  color: var(--wa-text-dim);
  line-height: 1.35;
}

/* ---- tables -------------------------------------------------------------- */
.plan-table {
  width: 100%;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums;
}

.plan-caption {
  caption-side: top;
  text-align: left;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--wa-text-faint);
  padding-bottom: 0.6rem;
}

.plan-table th {
  text-align: left;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--wa-text-faint);
  border-bottom: 1px solid var(--wa-hairline-strong);
  padding: 0.5rem 0.75rem;
}

.plan-table td {
  padding: 0.6rem 0.75rem;
  border-bottom: 1px solid var(--wa-hairline-soft);
  color: var(--wa-text);
  position: relative;
}

.plan-table .num { text-align: right; }
.plan-table tbody tr:hover td { background: var(--wa-accent-wash); }
.plan-table tr.is-critical td:first-child { box-shadow: inset 2px 0 0 var(--wa-bad); }

.plan-label { font-weight: 600; position: relative; }

/* A bar behind the label rather than a column of its own - the magnitude is
   context for the name, not a number to read off. */
.plan-bar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: var(--w, 0%);
  background: var(--wa-accent-wash);
  pointer-events: none;
}

.plan-bar--service { background: var(--wa-info-wash); }

/* The service target, drawn where it actually falls. */
.plan-bar--service::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  right: 0;
  width: 1px;
  background: var(--wa-hairline-strong);
}

.plan-spacer { height: 2rem; }

/* ---- deltas and chips ---------------------------------------------------- */
.plan-delta { font-variant-numeric: tabular-nums; font-weight: 600; }
.plan-delta--up { color: var(--wa-good); }
.plan-delta--down { color: var(--wa-bad); }
.plan-delta--flat { color: var(--wa-text-dim); }
.plan-delta--new { color: var(--wa-text-faint); font-weight: 500; font-size: 0.82rem; }

.plan-chip {
  display: inline-block;
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 600;
  white-space: nowrap;
}

.plan-chip--ok { background: var(--wa-good-wash); color: var(--wa-good); }
.plan-chip--watch { background: var(--wa-warn-wash); color: var(--wa-warn); }
.plan-chip--critical { background: var(--wa-bad-wash); color: var(--wa-bad); }
.plan-chip--muted { background: var(--wa-surface-3); color: var(--wa-text-faint); }

.plan-dir {
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: capitalize;
  color: var(--wa-text-dim);
}
.plan-dir--growing { color: var(--wa-good); }
.plan-dir--declining { color: var(--wa-bad); }

/* ---- quadrants ----------------------------------------------------------- */
.plan-quadrants {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
}

.plan-quadrant {
  border: 1px solid var(--wa-hairline);
  border-radius: var(--wa-radius);
  padding: 1rem 1.1rem;
  background: var(--wa-surface);
}

.plan-quadrant header h4 {
  font-family: var(--wa-font-display);
  font-size: 0.98rem;
  font-weight: 600;
  margin: 0 0 0.3rem;
  color: var(--wa-text);
}

.plan-quadrant header p {
  font-size: 0.8rem;
  color: var(--wa-text-dim);
  line-height: 1.45;
  margin: 0 0 0.85rem;
}

.plan-quadrant ul { list-style: none; margin: 0; padding: 0; }

.plan-quadrant li {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0.5rem 0;
  border-top: 1px solid var(--wa-hairline-soft);
}

.plan-quadrant__metrics {
  font-size: 0.8rem;
  color: var(--wa-text-dim);
  font-variant-numeric: tabular-nums;
}

.plan-sep { opacity: 0.45; margin: 0 0.35rem; }

/* The one loud thing on the page. */
.plan-quadrant--at_risk {
  border-color: var(--wa-bad);
  box-shadow: inset 3px 0 0 var(--wa-bad);
}
.plan-quadrant--at_risk header h4 { color: var(--wa-bad); }
.plan-quadrant--fix_service { border-left: 3px solid var(--wa-warn); }
.plan-quadrant--scale { border-left: 3px solid var(--wa-good); }

/* ---- actions ------------------------------------------------------------- */
.plan-actions { list-style: none; margin: 0; padding: 0; }

.plan-action {
  border: 1px solid var(--wa-hairline);
  border-left-width: 3px;
  border-radius: var(--wa-radius-sm);
  padding: 0.9rem 1.05rem;
  margin-bottom: 0.75rem;
  background: var(--wa-surface);
}

.plan-action--critical { border-left-color: var(--wa-bad); }
.plan-action--warning { border-left-color: var(--wa-warn); }
.plan-action--info { border-left-color: var(--wa-info); }

.plan-action__head {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  margin-bottom: 0.35rem;
}

.plan-action__sev {
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--wa-text-faint);
}

.plan-action--critical .plan-action__sev { color: var(--wa-bad); }
.plan-action--warning .plan-action__sev { color: var(--wa-warn); }
.plan-action--info .plan-action__sev { color: var(--wa-info); }

.plan-action h5 {
  font-family: var(--wa-font-display);
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: var(--wa-text);
}

.plan-action p {
  margin: 0;
  font-size: 0.87rem;
  color: var(--wa-text-dim);
  line-height: 1.55;
}

/* ---- empty states -------------------------------------------------------- */
/* An empty screen is an invitation to act, so it says what to change. */
.plan-empty {
  border: 1px dashed var(--wa-hairline-strong);
  border-radius: var(--wa-radius);
  padding: 2rem 1.25rem;
  text-align: center;
  color: var(--wa-text-dim);
  background: var(--wa-surface);
}

@media (max-width: 720px) {
  .plan-table th:nth-child(4),
  .plan-table td:nth-child(4) { display: none; }
  .plan-kpi__value { font-size: 1.55rem; }
}

.plan-sub { color: var(--wa-text-faint); font-size: 0.78rem; font-weight: 500; }

.plan-footnote {
  margin: 0.9rem 0 0;
  font-size: 0.8rem;
  color: var(--wa-text-faint);
  line-height: 1.55;
  max-width: 76ch;
}

/* The inventory scorecard is wide; let it scroll rather than squeeze the page. */
.report-card > .plan-table { min-width: 640px; }
.report-card { overflow-x: auto; }


.static-demo-banner{font:500 13px/1.5 system-ui,-apple-system,Segoe UI,sans-serif;
  padding:10px 16px;background:rgba(125,211,252,.10);border-bottom:1px solid rgba(125,211,252,.28);
  color:inherit;text-align:center}
.static-demo-banner a{color:#38bdf8;text-decoration:underline;text-underline-offset:2px}
.static-demo-banner__warn{opacity:.8}


      :root {
        --wa-primary: #0d6efd;
        --bs-primary: #0d6efd;
      }
    