/* ============================================================
   Aileron Registration Dashboard
   Designed per brand.aileron.org guidelines
   Palette: Soil / Cloud / Water / Goldenrod / Grass / Sunset
   Typography: Public Sans (Aileron Public Sans stand-in)
   ============================================================ */
:root, [data-theme="light"] {
  /* --- Aileron brand palette ------------------------------------ */
  /* Anchor */
  --color-sky:        #C9E0E4;
  --color-goldenrod:  #F2CE89;
  --color-grass:      #C0CE90;
  --color-pebble:     #EBE9E1;
  /* Secondary */
  --color-rain:       #78AFBF;
  --color-sunset:     #EC9A31;
  --color-clover:     #8C9E54;
  --color-stone:      #CDCEC1;
  --color-water:      #00557F;
  --color-clay:       #B1591E;
  --color-pine:       #556C11;
  --color-boulder:    #635B4F;
  /* Neutrals */
  --color-cloud:      #FCFCF9;
  --color-soil:       #523D33;

  /* --- Functional roles ----------------------------------------- */
  --color-primary:        var(--color-water);
  --color-primary-hover:  #003f5e;
  --color-primary-soft:   #dbe9f0;
  --color-accent:         var(--color-clover);
  --color-accent-soft:    #e6ecd4;
  --color-highlight:      var(--color-goldenrod);

  /* Surfaces */
  --color-bg:             var(--color-cloud);
  --color-surface:        #ffffff;
  --color-surface-2:      var(--color-pebble);
  --color-surface-alt:    var(--color-pebble);
  --color-surface-offset: #f3f1e9;
  --color-border:         #e3ddd3;
  --color-divider:        #ece7dc;

  /* Text */
  --color-text:           var(--color-soil);
  --color-text-muted:     #7a6a60;
  --color-text-faint:     #9d8f85;
  --color-text-inverse:   var(--color-cloud);
  --color-text-on-primary: var(--color-cloud);

  /* Semantic */
  --color-success:      #466d1a;   /* Pine-ish */
  --color-success-soft: #e4ecd1;
  --color-warning:      #b4700e;   /* sunset-deep */
  --color-warning-soft: #fbe8c8;
  --color-danger:       #a6412b;   /* clay-deep */
  --color-danger-soft:  #f2dcd2;

  /* Chart palette — derived from brand */
  --chart-1: var(--color-water);      /* primary */
  --chart-2: var(--color-rain);       /* secondary blue */
  --chart-3: var(--color-clover);     /* green */
  --chart-4: var(--color-sunset);     /* amber */
  --chart-5: var(--color-goldenrod);  /* pale gold */
  --chart-6: var(--color-clay);       /* clay */

  /* Spacing */
  --space-1: .25rem; --space-2: .5rem; --space-3: .75rem;
  --space-4: 1rem;   --space-5: 1.25rem; --space-6: 1.5rem;
  --space-8: 2rem;   --space-10: 2.5rem; --space-12: 3rem;
  --space-16: 4rem;

  /* Type scale — base 15px per brand, sizes as multiples */
  --text-xs: .75rem;      /* 12px — XS/labels */
  --text-sm: .875rem;     /* 14px */
  --text-base: .9375rem;  /* 15px — S, body */
  --text-lg: 1.0625rem;   /* 17px */
  --text-xl: 1.34375rem;  /* 21.5px — M */
  --text-2xl: 1.875rem;   /* 30px — L Bold */
  --text-3xl: 2.625rem;   /* 42px — display, used sparingly */

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(82,61,51,.06);
  --shadow-md: 0 4px 14px rgba(82,61,51,.08);
  --shadow-lg: 0 18px 40px rgba(82,61,51,.14);

  --transition: 180ms cubic-bezier(.2,.7,.2,1);
}

[data-theme="dark"] {
  /* Dark mode stays on brand but inverts: deep Soil-leaning surfaces,
     Cloud/Goldenrod text. */
  --color-primary:        var(--color-rain);
  --color-primary-hover:  #92c2d0;
  --color-primary-soft:   #123844;
  --color-accent:         var(--color-grass);
  --color-accent-soft:    #2d3918;
  --color-highlight:      var(--color-goldenrod);

  --color-bg:             #211812;
  --color-surface:        #2a201a;
  --color-surface-2:      #33281f;
  --color-surface-alt:    #33281f;
  --color-surface-offset: #3b2e24;
  --color-border:         #4a3b31;
  --color-divider:        #3a2d24;

  --color-text:           #f4ede0;
  --color-text-muted:     #c5b6a6;
  --color-text-faint:     #8a7a6c;
  --color-text-inverse:   #211812;

  --color-success:      #9cc56a;
  --color-success-soft: #2d3918;
  --color-warning:      #f2bd6b;
  --color-warning-soft: #3a2a10;
  --color-danger:       #e08b73;
  --color-danger-soft:  #3a1a16;

  --chart-1: #78AFBF;   /* Rain */
  --chart-2: #C9E0E4;   /* Sky */
  --chart-3: #C0CE90;   /* Grass */
  --chart-4: #F2CE89;   /* Goldenrod */
  --chart-5: #EC9A31;   /* Sunset */
  --chart-6: #d6856a;   /* Clay-light */

  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow-md: 0 4px 16px rgba(0,0,0,.5);
  --shadow-lg: 0 18px 40px rgba(0,0,0,.6);
}

/* ============================================================
   Base
   ============================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  min-height: 100dvh;
  font-family: 'Public Sans', 'Inter', system-ui, -apple-system, sans-serif;
  font-size: var(--text-base);
  line-height: 1.55;
  color: var(--color-text);
  background: var(--color-bg);
  font-variant-numeric: tabular-nums lining-nums;
  transition: background var(--transition), color var(--transition);
  /* brand: "calm, clear, simple" — generous line-height, soft background */
}

.num, .tabular { font-variant-numeric: tabular-nums lining-nums; }

button {
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  border: none;
  background: none;
  transition: background var(--transition), color var(--transition), box-shadow var(--transition), border-color var(--transition);
}

a {
  color: var(--color-primary);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}
a:hover {
  color: var(--color-primary-hover);
  border-bottom-color: currentColor;
}

:focus-visible {
  outline: 2px solid var(--color-primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

h1, h2, h3, h4 {
  font-weight: 700;   /* brand: "a little bold goes a long way" */
  letter-spacing: -.01em;
  line-height: 1.2;
  text-align: left;   /* brand rule: always left-aligned */
}

/* ============================================================
   Header
   ============================================================ */
.site-header {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: saturate(180%) blur(6px);
}

.header-inner {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-5) var(--space-8);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
}

.brand { display: flex; align-items: center; gap: var(--space-4); }
.brand-logo { flex-shrink: 0; display: block; }
.brand-divider {
  width: 1px;
  height: 36px;
  background: var(--color-border);
  flex-shrink: 0;
}
.brand-text { display: flex; flex-direction: column; gap: 2px; }
.brand-title {
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -.01em;
  line-height: 1.15;
}
.brand-sub {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .12em;   /* brand: "tighter is better" but labels want space */
  font-weight: 700;
}

.header-meta {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}

.updated {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.2;
  padding-right: var(--space-4);
  border-right: 1px solid var(--color-border);
}
.updated-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 700;
  margin-bottom: 3px;
}
.updated-value {
  font-size: var(--text-sm);
  font-weight: 700;
  color: var(--color-text);
}
.updated-time {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
  margin-top: 1px;
}

.theme-toggle {
  width: 40px;
  height: 40px;
  border-radius: var(--radius-pill);
  display: grid;
  place-items: center;
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}
.theme-toggle:hover {
  background: var(--color-surface-offset);
  color: var(--color-text);
  border-color: var(--color-primary);
}

/* ============================================================
   Section Tabs (pill nav under header)
   ============================================================ */
.section-tabs-wrap {
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  position: sticky;
  top: 81px;          /* sits flush under .site-header */
  z-index: 9;
  backdrop-filter: saturate(180%) blur(6px);
}
.section-tabs {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-3) var(--space-8);
  display: flex;
  gap: var(--space-2);
  flex-wrap: wrap;
  align-items: center;
}

.section-tab {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: 8px var(--space-4);
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: -.005em;
  line-height: 1;
  transition:
    background var(--transition),
    color var(--transition),
    border-color var(--transition),
    box-shadow var(--transition);
}
.section-tab:hover:not(.is-active):not(.is-disabled) {
  color: var(--color-text);
  border-color: var(--color-primary);
  background: var(--color-surface-offset);
}
.section-tab.is-active {
  background: var(--color-primary);
  color: var(--color-text-inverse);
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px var(--color-primary-soft);
}
.section-tab.is-active .section-tab-meta {
  background: var(--color-goldenrod);
  color: var(--color-soil);
  border-color: transparent;
}
[data-theme="dark"] .section-tab.is-active .section-tab-meta {
  color: #1a1209;
}
.section-tab.is-disabled {
  cursor: not-allowed;
  opacity: .55;
  background: transparent;
  color: var(--color-text-faint);
  border-style: dashed;
}
.section-tab.is-disabled:hover { box-shadow: none; }

.section-tab-label { white-space: nowrap; }

.section-tab-meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  padding: 2px 8px;
  font-size: var(--text-xs);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0;
  border-radius: var(--radius-pill);
  background: var(--color-surface-offset);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
  transition:
    background var(--transition),
    color var(--transition),
    border-color var(--transition);
}
.section-tab-meta--soft {
  text-transform: uppercase;
  letter-spacing: .08em;
  font-size: 10.5px;
  background: transparent;
  color: var(--color-text-faint);
  border-color: var(--color-border);
}
.section-tab-meta[hidden] { display: none !important; }

/* ============================================================
   Container & Layout
   ============================================================ */
.container {
  max-width: 1400px;
  margin: 0 auto;
  padding: var(--space-8) var(--space-8) var(--space-12);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}

/* ============================================================
   KPI Cards
   ============================================================ */
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--space-4);
}
/* Fixed 4-col KPI grid for sections that always show exactly 4 KPIs (Discover, Events) */
.kpi-grid--four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
@media (max-width: 1100px) {
  .kpi-grid--four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .kpi-grid--four { grid-template-columns: 1fr; }
}

/* Fixed 2-col KPI grid for sections that show exactly 2 KPIs (Discover) */
.kpi-grid--two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
@media (max-width: 560px) {
  .kpi-grid--two { grid-template-columns: 1fr; }
}

/* Fixed 5-col KPI grid for sections that show exactly 5 KPIs */
.kpi-grid--five {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}
@media (max-width: 1280px) {
  .kpi-grid--five { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .kpi-grid--five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .kpi-grid--five { grid-template-columns: 1fr; }
}

.kpi {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  box-shadow: var(--shadow-sm);
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
  position: relative;
  overflow: hidden;
}
.kpi::before {
  /* Thin brand-colored accent at the top — brand uses horizon/connecting lines */
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: var(--color-goldenrod);
  opacity: 0;
  transition: opacity var(--transition);
}
.kpi:hover::before { opacity: 1; }
.kpi:hover { border-color: var(--color-primary); }

/* Primary hero KPI — Water blue with Goldenrod accent bar */
.kpi-primary {
  background:
    linear-gradient(135deg, var(--color-water) 0%, #0a6e96 100%);
  color: var(--color-text-inverse);
  border-color: transparent;
}
.kpi-primary::before {
  opacity: 1;
  background: var(--color-goldenrod);
}
[data-theme="dark"] .kpi-primary {
  background: linear-gradient(135deg, #1a5d78 0%, #2d7d9c 100%);
  color: #fff;
}
.kpi-primary .kpi-label,
.kpi-primary .kpi-sub { color: rgba(252,252,249,.82); }
.kpi-primary .kpi-value { color: var(--color-cloud); }

.kpi-label {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 700;
}
.kpi-value {
  font-size: var(--text-2xl);
  font-weight: 700;        /* brand: L Bold */
  color: var(--color-text);
  line-height: 1.1;
  letter-spacing: -.025em;
}
.kpi-sub {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.4;
}

/* ============================================================
   Cards & Charts
   ============================================================ */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-8);
  box-shadow: var(--shadow-sm);
}

.card-header { margin-bottom: var(--space-5); }
.card-header-flex {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.card-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -.015em;
  line-height: 1.15;
}
.card-sub {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: var(--space-2);
  line-height: 1.5;
}

.charts-grid {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-4);
}
@media (max-width: 900px) { .charts-grid { grid-template-columns: 1fr; } }

.chart-wrap {
  position: relative;
  height: 320px;
}
.chart-wrap--tall   { height: 540px; }
.chart-wrap--medium { height: 380px; }
.chart-wrap--short  { height: 240px; }

/* Single-column charts grid (Events) */
.charts-grid--single { grid-template-columns: 1fr; }

.legend-list {
  margin-top: var(--space-5);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}
.legend-item {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.legend-dot {
  width: 11px; height: 11px;
  border-radius: 3px;
  flex-shrink: 0;
}
.legend-count {
  margin-left: auto;
  font-weight: 700;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}

/* ============================================================
   Filter Controls
   ============================================================ */
.filter-controls {
  display: flex;
  align-items: center;
  gap: var(--space-5);
}
.filter-label {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 700;
}
.filter-label select {
  padding: 8px var(--space-3);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
  background: var(--color-surface);
  color: var(--color-text);
  font-size: var(--text-sm);
  font-family: inherit;
  text-transform: none;
  letter-spacing: normal;
  font-weight: 400;
  min-width: 180px;
  transition: border-color var(--transition);
}
.filter-label select:hover,
.filter-label select:focus { border-color: var(--color-primary); }
.filter-label input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--color-primary);
}

/* ============================================================
   Workshop Table
   ============================================================ */
.table-wrap {
  overflow-x: auto;
  margin: 0 calc(var(--space-8) * -1);
  padding: 0 var(--space-8);
}
.workshop-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  min-width: 900px;
}
.workshop-table th {
  text-align: left;
  font-weight: 700;
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--color-text-muted);
  padding: var(--space-3) var(--space-3);
  border-bottom: 2px solid var(--color-border);
  position: sticky;
  top: 0;
  background: var(--color-surface);
  white-space: nowrap;
}
.workshop-table th.num,
.workshop-table td.num { text-align: right; }
.workshop-table th.th-fill { min-width: 110px; }

.workshop-table tbody tr {
  cursor: pointer;
  transition: background var(--transition);
}
.workshop-table tbody tr:hover { background: var(--color-surface-offset); }

.workshop-table td {
  padding: var(--space-3) var(--space-3);
  border-bottom: 1px solid var(--color-divider);
  vertical-align: middle;
}
.workshop-table tbody tr:last-child td { border-bottom: none; }

.wk-date {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
  font-weight: 600;
  letter-spacing: .02em;
}
.wk-name {
  font-weight: 500;
  color: var(--color-text);
  max-width: 360px;
  line-height: 1.35;
}

.fill-bar {
  position: relative;
  width: 90px;
  height: 6px;
  background: var(--color-surface-offset);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-left: auto;
  margin-top: 3px;
}
.fill-bar-fg {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--color-primary);
  border-radius: var(--radius-pill);
  transition: width var(--transition);
}
.fill-bar-fg.over-100 { background: var(--color-pine); }
.fill-bar-fg.low      { background: var(--color-sunset); }
.fill-bar-fg.empty    { background: var(--color-border); }
.fill-value {
  font-weight: 700;
  font-size: var(--text-sm);
  color: var(--color-text);
}
.fill-cell {
  text-align: right;
}
.fill-cell .fill-value { display: block; }

.wk-empty-row { opacity: .55; }
.wk-empty-row .wk-name { color: var(--color-text-muted); font-weight: 400; }

tfoot td {
  padding: var(--space-4) var(--space-3);
  font-weight: 700;
  color: var(--color-text);
  background: var(--color-surface-2);
  border-top: 2px solid var(--color-border);
  border-bottom: none !important;
}
.totals-label {
  text-transform: uppercase;
  font-size: var(--text-xs);
  letter-spacing: .1em;
  color: var(--color-text-muted);
}

/* ============================================================
   Drawer
   ============================================================ */
.drawer {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: flex;
  justify-content: flex-end;
}
.drawer[hidden] { display: none; }
.drawer-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(82,61,51,.45);
  backdrop-filter: blur(4px);
  animation: fadeIn 200ms ease;
}
.drawer-panel {
  position: relative;
  width: min(580px, 100%);
  background: var(--color-surface);
  border-left: 1px solid var(--color-border);
  box-shadow: var(--shadow-lg);
  display: flex;
  flex-direction: column;
  animation: slideIn 320ms cubic-bezier(.16,1,.3,1);
}
@keyframes slideIn { from { transform: translateX(100%); } }
@keyframes fadeIn { from { opacity: 0; } }

.drawer-header {
  padding: var(--space-6) var(--space-8);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-4);
  background: var(--color-surface-2);
}
.drawer-kicker {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--color-primary);
  font-weight: 700;
  margin-bottom: var(--space-2);
}
.drawer-title {
  font-size: var(--text-xl);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.015em;
  color: var(--color-text);
}
.drawer-close {
  width: 36px; height: 36px;
  display: grid; place-items: center;
  color: var(--color-text-muted);
  border-radius: var(--radius-pill);
  flex-shrink: 0;
  border: 1px solid var(--color-border);
}
.drawer-close:hover {
  background: var(--color-surface-offset);
  color: var(--color-text);
  border-color: var(--color-primary);
}

.drawer-body {
  flex: 1;
  overflow-y: auto;
  padding: var(--space-8);
}

.drawer-stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
  margin-bottom: var(--space-8);
}
.drawer-stat {
  padding: var(--space-4);
  background: var(--color-surface-2);
  border-radius: var(--radius-sm);
  border: 1px solid var(--color-border);
}
.drawer-stat-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--color-text-muted);
  font-weight: 700;
}
.drawer-stat-value {
  font-size: var(--text-xl);
  font-weight: 700;
  margin-top: 3px;
  letter-spacing: -.015em;
}

.drawer-section-title {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--color-text-muted);
  font-weight: 700;
  margin-bottom: var(--space-4);
}

.drawer-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}
.drawer-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: var(--color-surface-2);
  border: 1px solid var(--color-divider);
  border-radius: var(--radius-sm);
  font-size: var(--text-sm);
}
.drawer-list .reg-name { font-weight: 600; color: var(--color-text); }
.drawer-list .reg-company {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  margin-top: 2px;
}

.bucket-chip {
  font-size: 10.5px;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  flex-shrink: 0;
  border: 1px solid transparent;
}
.bucket-purchased   { background: var(--color-success-soft); color: var(--color-success); border-color: var(--color-success-soft); }
.bucket-growth      { background: var(--color-primary-soft); color: var(--color-primary); border-color: var(--color-primary-soft); }
.bucket-scholarship { background: var(--color-accent-soft); color: var(--color-pine); border-color: var(--color-accent-soft); }
[data-theme="dark"] .bucket-scholarship { color: var(--color-accent); }
.bucket-comped      { background: var(--color-warning-soft); color: var(--color-warning); border-color: var(--color-warning-soft); }
.bucket-discount    { background: var(--color-danger-soft); color: var(--color-danger); border-color: var(--color-danger-soft); }

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}
.chip-list .chip {
  font-size: var(--text-xs);
  padding: 4px var(--space-3);
  background: var(--color-surface-offset);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  color: var(--color-text-muted);
  font-weight: 600;
}

.empty-hint {
  padding: var(--space-8);
  text-align: center;
  color: var(--color-text-muted);
  font-size: var(--text-sm);
  background: var(--color-surface-offset);
  border-radius: var(--radius-sm);
  border: 1px dashed var(--color-border);
}

/* ============================================================
   Footer
   ============================================================ */
.site-footer {
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--color-divider);
  display: flex;
  justify-content: space-between;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  gap: var(--space-4);
  flex-wrap: wrap;
  line-height: 1.5;
}
.site-footer a { color: var(--color-primary); }

/* ============================================================
   Dashboard Sections (tab panels) & section intros
   ============================================================ */
.dashboard-section {
  display: none;
  flex-direction: column;
  gap: var(--space-6);
  animation: sectionFade 220ms cubic-bezier(.2,.7,.2,1);
}
.dashboard-section.is-active { display: flex; }
.dashboard-section[hidden]   { display: none; }
.dashboard-section.is-active[hidden] { display: flex; } /* is-active wins */

@keyframes sectionFade {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: none; }
}

.section-intro {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-bottom: var(--space-2);
  border-bottom: 1px solid var(--color-divider);
  margin-bottom: var(--space-2);
}
.section-intro-title {
  font-size: var(--text-xl);
  font-weight: 700;
  color: var(--color-text);
  letter-spacing: -.015em;
  line-height: 1.15;
}
.section-intro-sub {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.55;
  max-width: 72ch;
}

/* Date-style KPI values are typically longer strings — drop a notch */
.kpi-value--date {
  font-size: var(--text-xl);
  letter-spacing: -.015em;
}

/* ============================================================
   Campus — insight strip, top accounts, family chips
   ============================================================ */
.section-intro-year {
  display: inline-block;
  margin-left: var(--space-2);
  font-size: var(--text-base);
  font-weight: 500;
  color: var(--color-text-muted);
  letter-spacing: 0;
}

.charts-grid--two-even { grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) {
  .charts-grid--two-even { grid-template-columns: 1fr; }
}

/* Let the "wide" chart card take priority in a two-column grid */
.charts-grid .chart-card--wide { grid-column: span 1; }
@media (min-width: 1100px) {
  .charts-grid:not(.charts-grid--single):not(.charts-grid--two-even) .chart-card--wide {
    grid-column: span 2;
  }
}

/* --- Insight strip (row of compact highlight chips) --- */
.insight-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--space-3);
  margin-bottom: var(--space-6);
}
@media (max-width: 1100px) {
  .insight-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 640px) {
  .insight-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

.insight-chip {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: var(--space-4) var(--space-4);
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  min-height: 72px;
  justify-content: center;
}
.insight-chip-label {
  font-size: var(--text-xs);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--color-text-muted);
}
.insight-chip-value {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.005em;
  line-height: 1.25;
}

/* --- Top accounts ranked list --- */
.top-accounts {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.top-account {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  gap: var(--space-4);
  align-items: center;
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-divider);
}
.top-account:last-child { border-bottom: none; }
.top-account-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text-muted);
}
.top-account-body { min-width: 0; }
.top-account-name {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.top-account-email {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.top-account-metric { text-align: left; padding-left: var(--space-3); }
.top-account-count {
  font-size: var(--text-base);
  font-weight: 600;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
}
.top-account-hours {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-variant-numeric: tabular-nums;
}

/* --- Family chip (room type badge inside campus table) --- */
.family-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 8px;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-muted);
  background: var(--color-surface-alt);
  border: 1px solid var(--color-divider);
  border-radius: 999px;
  white-space: nowrap;
}
.family-chip::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--fam-color, var(--color-text-faint));
  flex-shrink: 0;
}

/* --- Heatmap axis toggle --- */
.toggle-group {
  display: inline-flex;
  gap: 2px;
  padding: 2px;
  background: var(--color-surface-alt);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-sm);
}
.toggle-btn {
  padding: 6px 12px;
  font-size: var(--text-xs);
  font-weight: 500;
  color: var(--color-text-muted);
  background: transparent;
  border: none;
  border-radius: calc(var(--radius-sm) - 2px);
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
  font-family: inherit;
}
.toggle-btn:hover { color: var(--color-text); }
.toggle-btn.is-active {
  background: var(--color-surface);
  color: var(--color-text);
  box-shadow: 0 1px 2px rgba(0,0,0,0.05);
}

/* --- Utilization heatmap --- */
.heatmap { display: flex; flex-direction: column; gap: var(--space-4); }
.heatmap-scroll {
  overflow-x: auto;
  margin: 0 calc(var(--space-6) * -1);
  padding: 0 var(--space-6);
  -webkit-overflow-scrolling: touch;
}
.heatmap-table {
  width: 100%;
  min-width: 620px;
  border-collapse: separate;
  border-spacing: 3px;
  font-variant-numeric: tabular-nums;
}
.heatmap-table thead th {
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  padding: 0 0 var(--space-2);
  text-align: center;
  background: transparent;
  border: none;
}
.heatmap-corner {
  text-align: left !important;
  min-width: 150px;
  padding-left: var(--space-1) !important;
}
.heatmap-col-total { color: var(--color-text); }
.heatmap-row-label {
  text-align: left;
  padding: 4px var(--space-3) 4px var(--space-1);
  font-weight: 500;
  white-space: nowrap;
  min-width: 150px;
  background: transparent;
  border: none;
}
.heatmap-row-name {
  display: block;
  font-size: var(--text-sm);
  color: var(--color-text);
  font-weight: 500;
  line-height: 1.2;
}
.heatmap-row-family {
  display: block;
  font-size: var(--text-xs);
  color: var(--color-text-faint);
  font-weight: 400;
  margin-top: 1px;
}

.heatmap-cell {
  text-align: center;
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--color-text);
  border-radius: 4px;
  padding: 0;
  height: 34px;
  min-width: 44px;
  background: var(--color-surface-alt);
  cursor: default;
  transition: outline-color 120ms ease;
  outline: 1px solid transparent;
  outline-offset: -1px;
}
.heatmap-cell:hover { outline-color: var(--color-primary); }
.heatmap-cell--empty {
  background: transparent;
  border: 1px dashed var(--color-divider);
  box-sizing: border-box;
  height: 32px;
}
.heatmap-cell--dark { color: #fff; }

/* 5-step color ramp for heatmap intensity, built on Aileron's water blue */
.heatmap-cell[data-step="1"] { background: color-mix(in srgb, var(--color-water) 14%, var(--color-surface-alt)); }
.heatmap-cell[data-step="2"] { background: color-mix(in srgb, var(--color-water) 32%, var(--color-surface-alt)); }
.heatmap-cell[data-step="3"] { background: color-mix(in srgb, var(--color-water) 55%, var(--color-surface-alt)); }
.heatmap-cell[data-step="4"] { background: color-mix(in srgb, var(--color-water) 78%, var(--color-surface-alt)); color: #fff; }
.heatmap-cell[data-step="5"] { background: var(--color-water); color: #fff; }

.heatmap-cell-total {
  background: transparent !important;
  color: var(--color-text-muted) !important;
  font-weight: 600;
  outline: none !important;
}
.heatmap-cell-total:hover { outline: none; }

.heatmap-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--space-4);
  flex-wrap: wrap;
  padding-top: var(--space-2);
}
.heatmap-legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.heatmap-legend-label { font-weight: 500; }
.heatmap-legend-swatch {
  display: inline-block;
  width: 22px;
  height: 14px;
  border-radius: 3px;
  background: var(--color-surface-alt);
}
.heatmap-legend-swatch[data-step="0"] { background: color-mix(in srgb, var(--color-water) 14%, var(--color-surface-alt)); }
.heatmap-legend-swatch[data-step="1"] { background: color-mix(in srgb, var(--color-water) 32%, var(--color-surface-alt)); }
.heatmap-legend-swatch[data-step="2"] { background: color-mix(in srgb, var(--color-water) 55%, var(--color-surface-alt)); }
.heatmap-legend-swatch[data-step="3"] { background: color-mix(in srgb, var(--color-water) 78%, var(--color-surface-alt)); }
.heatmap-legend-swatch[data-step="4"] { background: var(--color-water); }
.heatmap-meta {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  font-weight: 500;
}

/* --- Campus table tweaks --- */
.campus-table tbody tr { cursor: pointer; }
.campus-table tbody tr:hover { background: var(--color-surface-alt); }
.campus-table .num.over-100 { color: var(--color-danger); font-weight: 600; }
.campus-table .num.low      { color: var(--color-warning); }

/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 900px) {
  .header-inner { padding: var(--space-4) var(--space-5); }
  .container { padding: var(--space-6) var(--space-5) var(--space-8); }
  .card { padding: var(--space-6); }
  .table-wrap { margin: 0 calc(var(--space-6) * -1); padding: 0 var(--space-6); }
  .section-tabs { padding: var(--space-3) var(--space-5); }
  .section-tabs-wrap { top: 73px; }
}

@media (max-width: 640px) {
  .brand-title { font-size: var(--text-base); }
  .drawer-panel { width: 100%; }
  .updated { display: none; }
  .kpi-value { font-size: var(--text-xl); }
  .section-tabs { gap: 6px; padding: var(--space-2) var(--space-4); overflow-x: auto; flex-wrap: nowrap; -webkit-overflow-scrolling: touch; }
  .section-tab { flex-shrink: 0; }
  .section-tabs-wrap { top: 65px; }
  .section-intro-title { font-size: var(--text-lg); }
}

/* ============================================================ */
/* Core Flexible (Coaching Packages) section                    */
/* ============================================================ */

.flex-callout {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  margin-bottom: var(--space-6);
  background: var(--color-surface-offset);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-primary);
  border-radius: var(--radius-md);
  font-size: var(--text-sm);
  color: var(--color-text);
}

.flex-callout-pill {
  flex-shrink: 0;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  background: var(--color-primary-soft);
  color: var(--color-primary);
}

.flex-callout-text {
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* Family cards grid */
.flex-family-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-4);
  margin-bottom: var(--space-6);
}

.flex-family-card {
  padding: var(--space-5);
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.flex-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: var(--space-3);
}

.flex-card-label {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: var(--space-2);
}

.flex-card-total {
  display: flex;
  align-items: baseline;
  gap: var(--space-2);
}

.flex-card-live-num {
  font-size: var(--text-2xl);
  font-weight: 700;
  color: var(--color-text);
  line-height: 1;
  letter-spacing: -.02em;
}

.flex-card-live-unit {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.flex-card-revenue {
  margin-top: var(--space-2);
  font-size: var(--text-sm);
  color: var(--color-text-muted);
}

.flex-diff-pill {
  flex-shrink: 0;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  border: 1px solid transparent;
  white-space: nowrap;
}

.flex-diff-pill.is-zero {
  background: var(--color-success-soft);
  color: var(--color-success);
}

.flex-diff-pill.is-pos {
  background: var(--color-warning-soft);
  color: var(--color-warning);
}

.flex-diff-pill.is-neg {
  background: var(--color-danger-soft);
  color: var(--color-danger);
}

/* Bucket rows inside family cards */
.flex-bucket-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}

.flex-bucket-row {
  display: grid;
  grid-template-columns: 10px 1fr auto auto;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
}

.flex-bucket-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  display: inline-block;
}

.flex-bucket-label {
  color: var(--color-text);
  font-weight: 500;
}

.flex-bucket-live {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--color-text);
  min-width: 24px;
  text-align: right;
}

.flex-bucket-live.is-match {
  color: var(--color-success);
}

.flex-bucket-ref {
  color: var(--color-text-faint);
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
  min-width: 56px;
  text-align: right;
}

.flex-card-prior {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  padding-top: var(--space-2);
  border-top: 1px dashed var(--color-border);
}

.flex-card-codes {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
}

.chip--soft {
  font-size: 11px;
  padding: 3px 9px;
  background: var(--color-surface-offset);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-pill);
  color: var(--color-text-muted);
  font-weight: 500;
}

.flex-table th,
.flex-table td {
  font-size: var(--text-sm);
}

/* ---- Placeholder panel (Technology section, future sections) ---- */
.placeholder-panel {
  background: var(--color-surface);
  border: 1px dashed var(--color-border);
  border-radius: 12px;
  padding: 56px 32px;
  text-align: center;
  margin-top: var(--space-6);
}
.placeholder-panel-title {
  font-size: var(--text-lg);
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: .01em;
  margin-bottom: 8px;
}
.placeholder-panel-body {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  max-width: 460px;
  margin: 0 auto;
  line-height: 1.55;
}

/* ---- Services sub-nav (appears under primary nav when Services is active) ---- */
.subnav-wrap {
  position: sticky;
  top: 130px;
  z-index: 9;
  background: var(--color-surface);
  border-bottom: 1px solid var(--color-border);
  padding: 0;
}
.subnav {
  display: flex;
  gap: 4px;
  padding: 10px var(--space-8);
  max-width: 1400px;
  margin: 0 auto;
  align-items: center;
  flex-wrap: wrap;
}
.subnav-tab {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--color-text-muted);
  font-family: inherit;
  font-size: var(--text-sm);
  font-weight: 500;
  letter-spacing: .005em;
  cursor: pointer;
  transition: background .12s ease, color .12s ease, border-color .12s ease;
  white-space: nowrap;
}
.subnav-tab:hover:not(.is-active) {
  background: var(--color-bg-soft);
  color: var(--color-text);
}
.subnav-tab.is-active {
  background: var(--color-water);
  color: #fff;
  border-color: var(--color-water);
}
.subnav-meta {
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--color-bg-soft);
  color: var(--color-text-faint);
  letter-spacing: .02em;
}
.subnav-tab.is-active .subnav-meta {
  background: rgba(255,255,255,.18);
  color: #fff;
}

/* ---- Home rollup grid (drill-in cards) ---- */
.home-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-4);
  margin-top: var(--space-6);
}
.home-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  padding: 22px 22px 20px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  text-align: left;
  cursor: pointer;
  font-family: inherit;
  color: inherit;
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease;
}
.home-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 20px rgba(0,0,0,.06);
  border-color: var(--color-water);
}
.home-card-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--color-text-faint);
  margin-bottom: 8px;
}
.home-card-stat {
  font-size: 36px;
  font-weight: 700;
  letter-spacing: -.015em;
  color: var(--color-water);
  line-height: 1.1;
}
.home-card-stat--soft {
  color: var(--color-text-faint);
  font-size: 22px;
  font-weight: 500;
  letter-spacing: 0;
}
.home-card-label {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin-top: 2px;
}
.home-card-meta {
  font-size: 12px;
  color: var(--color-text-faint);
  margin-top: 10px;
}
.home-card--soft {
  background: var(--color-bg-soft);
  border-style: dashed;
}
.home-card--soft:hover {
  border-color: var(--color-text-faint);
}

/* ---- Round 7: Organization Snapshot widgets (2x2 grid) ---- */
.home-widgets-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-5);
  margin-top: var(--space-6);
}
.home-widget {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: 28px 28px 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 14px;
  min-height: 220px;
  transition: border-color .12s ease, box-shadow .12s ease;
}
.home-widget:hover {
  border-color: var(--color-water);
  box-shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 20px rgba(0,0,0,.06);
}
.home-widget--soft {
  background: var(--color-bg-soft);
  border-style: dashed;
}
.home-widget--soft:hover {
  border-color: var(--color-text-faint);
  box-shadow: none;
}
.home-widget-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.home-widget-title {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--color-text);
  line-height: 1.25;
}
.home-widget-sub {
  font-size: 13px;
  color: var(--color-text-muted);
  line-height: 1.4;
}
.home-widget--soft .home-widget-sub {
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: .08em;
  font-size: 11px;
  color: var(--color-text-faint);
}
.home-widget-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
}
.home-widget-body--placeholder {
  flex-direction: column;
  gap: 6px;
  text-align: center;
  padding: var(--space-3);
  border-radius: 10px;
  background: var(--color-bg-soft);
  border: 1px dashed var(--color-border);
  color: var(--color-text-faint);
}
.home-widget--soft .home-widget-body--placeholder {
  background: transparent;
  border: none;
}
.home-widget-placeholder-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--color-text-muted);
  letter-spacing: -.005em;
}
.home-widget-placeholder-detail {
  font-size: 12px;
  color: var(--color-text-faint);
}

/* ---- AI Insights panel (full-width, below widgets) ---- */
.ai-insights-panel {
  margin-top: var(--space-5);
  padding: 24px 28px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-left: 4px solid var(--color-water);
  border-radius: 14px;
}
.ai-insights-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: var(--space-3);
}
.ai-insights-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-water);
}
.ai-insights-sub {
  font-size: 13px;
  color: var(--color-text-muted);
}
.ai-insights-body {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  text-align: left;
  padding: var(--space-3) var(--space-4);
  min-height: 60px;
}
.ai-insights-body.home-widget-body--placeholder {
  align-items: flex-start;
  justify-content: flex-start;
}

/* AI Insights — curated bullet list (Item G) */
.ai-insights-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.ai-insight-item {
  display: grid;
  grid-template-columns: 90px 1fr;
  gap: 14px;
  align-items: start;
  padding: 12px 14px;
  background: var(--color-surface-alt, #fafafa);
  border-radius: 8px;
  border: 1px solid var(--color-border);
}
.ai-insight-tag {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 4px;
  text-align: center;
  align-self: start;
  white-space: nowrap;
}
.ai-insight-tag--pace    { background: #e8f4ff; color: #0a4e8a; }
.ai-insight-tag--gap     { background: #fff3e0; color: #8a4a0a; }
.ai-insight-tag--revenue { background: #e8f7ec; color: #0a6a2a; }
.ai-insight-tag--campus  { background: #f0e8ff; color: #4a1a8a; }
.ai-insight-tag--events  { background: #ffe8ec; color: #8a0a2a; }
.ai-insight-text {
  font-size: 13.5px;
  line-height: 1.55;
  color: var(--color-text);
}
.ai-insight-text strong {
  font-weight: 600;
  color: var(--color-text);
}
.ai-insights-footer {
  margin-top: var(--space-3);
  padding-top: var(--space-2);
  border-top: 1px solid var(--color-border);
  font-size: 11px;
  color: var(--color-text-faint);
  letter-spacing: .04em;
}

/* Placeholder rows used by NPS and Target Market widgets (Items E, F) */
/* Override the centered flex layout when a widget body holds placeholder rows */
.home-widget-body:has(.placeholder-rows) {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 10px;
  text-align: left;
  width: 100%;
}
.placeholder-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 100%;
}
.placeholder-rows li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 6px 10px;
  background: var(--color-surface-alt, #fafafa);
  border-radius: 6px;
  font-size: 13px;
}
.placeholder-row-label {
  color: var(--color-text-muted);
}
.placeholder-row-value {
  color: var(--color-text-faint);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}
.placeholder-footer {
  font-size: 11.5px;
  color: var(--color-text-faint);
  line-height: 1.4;
}

@media (max-width: 700px) {
  .ai-insight-item { grid-template-columns: 1fr; gap: 8px; }
  .ai-insight-tag { justify-self: start; }
}

/* New Businesses Purchased YTD widget (Item D) */
.big-number {
  font-size: 56px;
  font-weight: 700;
  line-height: 1;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  margin-bottom: 4px;
}

/* Weekly Sales horizontal bars (Item C) */
.home-widget-body:has(.weekly-sales-bars) {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  gap: 12px;
  text-align: left;
  width: 100%;
  padding-top: 4px;
}
.weekly-sales-bars {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  width: 100%;
}
.ws-bar-row {
  display: grid;
  grid-template-columns: 110px 1fr 84px;
  align-items: center;
  gap: 12px;
  font-size: 13px;
}
/* Average Weekly Sales YTD headline (Item CC) */
.avg-sales-headline {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding-bottom: 6px;
  border-bottom: 1px solid var(--color-border, #e6e6e6);
  margin-bottom: 4px;
}
.avg-sales-headline-value {
  font-size: 30px;
  font-weight: 700;
  line-height: 1.05;
  color: var(--color-text);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}
.avg-sales-headline-meta {
  font-size: 12px;
  color: var(--color-text-muted, #6b6b6b);
}
.ws-bar-label {
  color: var(--color-text);
  font-weight: 500;
}
.ws-bar-track {
  position: relative;
  height: 18px;
  background: var(--color-surface-alt, #f3f3f3);
  border-radius: 4px;
  overflow: hidden;
}
.ws-bar-fill {
  display: block;
  height: 100%;
  border-radius: 4px;
  transition: width 0.6s cubic-bezier(0.2, 0.7, 0.2, 1);
  min-width: 2px;
}
.ws-bar-fill--coreFixed    { background: var(--color-water,   #00557F); }
.ws-bar-fill--coreFlexible { background: var(--color-sunset,  #EC9A31); }
.ws-bar-fill--events       { background: var(--color-clay,    #B1591E); }
.ws-bar-fill--campus       { background: var(--color-meadow,  #3A7D44); }
.ws-bar-value {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--color-text);
}
@media (max-width: 700px) {
  .ws-bar-row { grid-template-columns: 90px 1fr 70px; font-size: 12px; }
  .avg-sales-headline-value { font-size: 24px; }
}

@media (max-width: 900px) {
  .home-widgets-grid { grid-template-columns: 1fr; gap: var(--space-4); }
  .home-widget { min-height: 180px; padding: 22px; }
  .home-widget-title { font-size: 16px; }
}

@media (max-width: 768px) {
  .subnav-wrap { top: 122px; }
  .subnav { padding: 8px var(--space-4); gap: 4px; overflow-x: auto; flex-wrap: nowrap; }
  .subnav-tab { flex-shrink: 0; }
  .home-card-stat { font-size: 28px; }
}

/* ================================================================ */
/* Past Years (historical lookback)                                  */
/* ================================================================ */
.past-years-body {
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}
.year-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  overflow: hidden;
}
.year-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-5) var(--space-6);
  border-bottom: 1px solid var(--color-border);
}
.year-card-title {
  display: flex;
  align-items: baseline;
  gap: var(--space-4);
  flex-wrap: wrap;
}
.year-card-year {
  margin: 0;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-text);
}
.year-card-sub {
  font-size: 13px;
  color: var(--color-text-muted);
}
.year-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  background: transparent;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  font-size: 13px;
  color: var(--color-text);
  cursor: pointer;
  transition: border-color .15s, background .15s;
  font-family: inherit;
}
.year-toggle:hover {
  border-color: var(--color-primary);
  background: var(--color-surface-alt);
}
.year-toggle-chev {
  display: inline-block;
  transition: transform .2s;
  font-size: 18px;
  line-height: 1;
}
.year-card.is-open .year-toggle-chev {
  transform: rotate(90deg);
}
.year-rollup {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  background: var(--color-border);
}
.year-rollup-cell {
  padding: var(--space-5) var(--space-6);
  background: var(--color-surface);
}
.year-rollup-total {
  background: var(--color-surface-alt);
}
.year-rollup-label {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  margin-bottom: 6px;
}
.year-rollup-value {
  font-size: 24px;
  font-weight: 600;
  color: var(--color-text);
  letter-spacing: -0.01em;
}
.year-rollup-meta {
  font-size: 12px;
  color: var(--color-text-faint);
  margin-top: 4px;
}
.year-detail {
  padding: var(--space-5) var(--space-6) var(--space-6);
  border-top: 1px solid var(--color-border);
  background: var(--color-surface-alt);
  display: flex;
  flex-direction: column;
  gap: var(--space-6);
}
.year-detail[hidden] { display: none; }
.year-group-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
  margin-bottom: var(--space-3);
}
.year-group-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--color-text);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.year-group-meta {
  font-size: 12px;
  color: var(--color-text-muted);
}
.year-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-surface);
}
.year-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}
.year-table thead th {
  text-align: left;
  padding: 10px 12px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
  background: var(--color-surface-alt);
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}
.year-table thead th.col-num { text-align: right; }
.year-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
  vertical-align: middle;
}
.year-table tbody tr:last-child td {
  border-bottom: none;
}
.year-table tbody tr:hover td {
  background: var(--color-surface-alt);
}
.year-table .col-name {
  min-width: 220px;
  max-width: 400px;
}
.year-table .col-date {
  white-space: nowrap;
  color: var(--color-text-muted);
}
.year-table .col-num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.year-empty {
  padding: var(--space-6);
  text-align: center;
  color: var(--color-text-muted);
  font-size: 13px;
}
.past-years-footnote {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: 12px;
  color: var(--color-text-faint);
  flex-wrap: wrap;
}

@media (max-width: 768px) {
  .year-rollup { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .year-card-head { flex-direction: column; align-items: flex-start; }
  .year-rollup-value { font-size: 20px; }
}

/* ============================================================
   Financials section (V1)
   ============================================================ */

/* 6-col KPI grid — financial summary tiles */
.kpi-grid--six {
  grid-template-columns: repeat(6, minmax(0, 1fr));
}
.kpi-grid--six .kpi-value {
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.kpi-grid--six .kpi-sub {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
@media (max-width: 1500px) {
  .kpi-grid--six { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 900px) {
  .kpi-grid--six { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .kpi-grid--six { grid-template-columns: 1fr; }
}

/* V1 banner */
.fin-banner {
  background: var(--color-surface-offset, #f5f3ee);
  border: 1px solid var(--color-border);
  border-left: 3px solid var(--color-goldenrod);
  border-radius: var(--radius-md);
  padding: var(--space-4) var(--space-6);
  margin: var(--space-6) 0;
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  line-height: 1.55;
}
.fin-banner strong { color: var(--color-text); }

/* Block (panel) container */
.fin-block {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  margin-top: var(--space-6);
  box-shadow: var(--shadow-sm);
}
.fin-block-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: var(--space-5);
}
.fin-block-title {
  font-size: var(--text-lg);
  font-weight: 700;
  letter-spacing: -.015em;
  margin: 0;
  color: var(--color-text);
}
.fin-block-sub {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  line-height: 1.5;
}

/* Operational income table */
.fin-table-wrap { overflow-x: auto; }
.fin-table th, .fin-table td {
  font-variant-numeric: tabular-nums;
}
.fin-table tbody tr.is-total {
  background: var(--color-surface-offset, #f5f3ee);
  font-weight: 700;
}
.fin-table tbody tr.is-total td { border-top: 1px solid var(--color-border); }
.fin-table .fin-yoy-up   { color: #1f7a4a; font-weight: 600; }
.fin-table .fin-yoy-down { color: #c0392b; font-weight: 600; }
.fin-table .fin-yoy-flat { color: var(--color-text-muted); }
.fin-loading {
  text-align: center;
  padding: var(--space-6);
  color: var(--color-text-muted);
  font-style: italic;
}

/* Two-column row for Cash + AR */
.fin-row-two {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: var(--space-6);
  margin-top: var(--space-6);
}
.fin-row-two > .fin-block { margin-top: 0; }
@media (max-width: 1100px) {
  .fin-row-two { grid-template-columns: 1fr; }
}

/* Three-column row */
.fin-row-three {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
  margin-top: var(--space-6);
}
.fin-row-three > .fin-block { margin-top: 0; }
@media (max-width: 1100px) {
  .fin-row-three { grid-template-columns: 1fr; }
}

/* Charts */
.fin-chart-wrap {
  position: relative;
  width: 100%;
  height: 220px;
}
.fin-chart-wrap--tall { height: 280px; }
.fin-chart-wrap canvas { width: 100% !important; height: 100% !important; }

/* AR aging buckets */
.fin-aging {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.fin-aging-row {
  display: grid;
  grid-template-columns: 90px 1fr auto;
  align-items: center;
  gap: var(--space-3);
  font-size: var(--text-sm);
}
.fin-aging-bar {
  height: 8px;
  background: var(--color-border);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.fin-aging-bar-fill {
  height: 100%;
  background: var(--color-water);
  border-radius: 4px;
}
.fin-aging-bar-fill.is-current  { background: #1f7a4a; }
.fin-aging-bar-fill.is-1-30     { background: var(--color-water); }
.fin-aging-bar-fill.is-31-60    { background: var(--color-goldenrod); }
.fin-aging-bar-fill.is-61-90    { background: #d68228; }
.fin-aging-bar-fill.is-over-90  { background: #c0392b; }
.fin-aging-amount {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--color-text);
}
.fin-aging-loading { color: var(--color-text-muted); font-style: italic; }
.fin-aging-summary {
  margin-top: var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}
.fin-aging-target { font-weight: 700; }
.fin-aging-target.is-meeting { color: #1f7a4a; }
.fin-aging-target.is-missing { color: #c0392b; }

/* Balance sheet 3-col layout */
.fin-bs-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-6);
}
@media (max-width: 1100px) {
  .fin-bs-grid { grid-template-columns: 1fr; }
}
.fin-bs-col-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding-bottom: var(--space-3);
  border-bottom: 2px solid var(--color-text);
  margin-bottom: var(--space-3);
}
.fin-bs-col-header > span:first-child {
  font-size: var(--text-sm);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-weight: 700;
  color: var(--color-text);
}
.fin-bs-col-total {
  font-variant-numeric: tabular-nums;
  font-size: var(--text-lg);
  font-weight: 700;
  color: var(--color-text);
}
.fin-bs-rows {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.fin-bs-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-3);
  padding: 6px 0;
  font-size: var(--text-sm);
  border-bottom: 1px dotted var(--color-border);
}
.fin-bs-row-name { color: var(--color-text); }
.fin-bs-row-amt {
  font-variant-numeric: tabular-nums;
  font-weight: 500;
  color: var(--color-text);
}
.fin-bs-row.is-subgroup-header {
  font-weight: 700;
  text-transform: uppercase;
  font-size: var(--text-xs);
  letter-spacing: .08em;
  color: var(--color-text-muted);
  border-bottom: none;
  padding: var(--space-3) 0 4px;
}
.fin-bs-check {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  font-size: var(--text-xs);
  color: var(--color-text-muted);
}

/* Lists (top customers/vendors/upcoming) */
.fin-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.fin-list li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-3);
  padding: 8px 0;
  border-bottom: 1px dotted var(--color-border);
  font-size: var(--text-sm);
}
.fin-list li:last-child { border-bottom: none; }
.fin-list-name { color: var(--color-text); }
.fin-list-meta {
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  display: block;
  margin-top: 2px;
}
.fin-list-amt {
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--color-text);
  text-align: right;
}
.fin-list-empty {
  color: var(--color-text-muted);
  font-style: italic;
  padding: var(--space-4) 0;
  text-align: center;
}

/* Footnote */
.fin-footnote {
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: var(--text-xs);
  color: var(--color-text-muted);
  flex-wrap: wrap;
  gap: var(--space-3);
}

/* ============================================================
   Financials secondary gate
   ============================================================ */

/* When the panel is locked, hide everything except the intro and the gate card */
.dashboard-section[data-section="financials"].is-fin-locked > *:not(.section-intro):not(.fin-gate) {
  display: none !important;
}

.fin-gate {
  margin: var(--space-8) auto;
  max-width: 460px;
  width: 100%;
}

.fin-gate-card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: var(--space-7) var(--space-6);
  text-align: center;
  box-shadow: 0 1px 2px rgba(0,0,0,0.03), 0 4px 12px rgba(0,0,0,0.04);
}

.fin-gate-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: rgba(0, 85, 127, 0.08);
  color: var(--color-water);
  margin-bottom: var(--space-4);
}

.fin-gate-card h2 {
  font-size: var(--text-xl);
  font-weight: 600;
  color: var(--color-text);
  margin: 0 0 var(--space-2);
  letter-spacing: -0.01em;
}

.fin-gate-card p {
  font-size: var(--text-sm);
  color: var(--color-text-muted);
  margin: 0 0 var(--space-5);
  line-height: 1.5;
}

.fin-gate-form {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.fin-gate-form label {
  font-size: var(--text-xs);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-text-muted);
}

.fin-gate-form input[type="password"] {
  width: 100%;
  padding: 10px 14px;
  font-size: var(--text-base);
  font-family: inherit;
  background: var(--color-bg);
  border: 1px solid var(--color-border);
  border-radius: 8px;
  color: var(--color-text);
  transition: border-color .15s, box-shadow .15s;
}

.fin-gate-form input[type="password"]:focus {
  outline: none;
  border-color: var(--color-water);
  box-shadow: 0 0 0 3px rgba(0, 85, 127, 0.15);
}

.fin-gate-form button {
  margin-top: var(--space-3);
  padding: 10px 16px;
  font-size: var(--text-base);
  font-weight: 600;
  font-family: inherit;
  background: var(--color-water);
  color: #fff;
  border: none;
  border-radius: 8px;
  cursor: pointer;
  transition: background .15s;
}

.fin-gate-form button:hover { background: #003E5C; }

.fin-gate-error {
  color: var(--color-sunset);
  font-size: var(--text-xs);
  margin-top: var(--space-2);
  min-height: 18px;
  text-align: center;
}

/* ============================================================
   Round 6 Item 11 (Mallory): Core Flexible per-family package
   breakdown mini-tables at the top of the page.
   ============================================================ */
.flex-summary-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 0.85fr);
  gap: var(--space-4);
  margin-bottom: var(--space-6);
  align-items: stretch;
}
@media (max-width: 1100px) {
  .flex-summary-grid { grid-template-columns: 1fr 1fr; }
  .flex-summary-grid .flex-summary-kpi { grid-column: 1 / -1; }
}
@media (max-width: 700px) {
  .flex-summary-grid { grid-template-columns: 1fr; }
  .flex-summary-grid .flex-summary-kpi { grid-column: auto; }
}

.flex-summary-table {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md, 8px);
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.flex-summary-table[hidden] { display: none; }

.flex-summary-table__head {
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  color: var(--color-text-inverse);
}
.flex-summary-table--business .flex-summary-table__head {
  background: var(--color-water);
}
.flex-summary-table--leadership .flex-summary-table__head {
  background: var(--color-pine);
}

.flex-summary-table__grid {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
}
.flex-summary-table__grid th,
.flex-summary-table__grid td {
  padding: var(--space-2) var(--space-4);
  text-align: left;
  border-bottom: 1px solid var(--color-divider);
}
.flex-summary-table__grid thead th {
  font-weight: 600;
  color: var(--color-text-muted);
  background: var(--color-surface-offset);
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: var(--text-xs);
}
.flex-summary-table__grid tbody th {
  font-weight: 500;
  color: var(--color-text);
}
.flex-summary-table__grid .num {
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-weight: 600;
  color: var(--color-text);
}
.flex-summary-table__grid tfoot th,
.flex-summary-table__grid tfoot td {
  font-weight: 700;
  background: var(--color-surface-offset);
  border-bottom: none;
  font-size: var(--text-sm);
}
.flex-summary-table--business .flex-summary-table__grid tfoot td.num {
  color: var(--color-water);
}
.flex-summary-table--leadership .flex-summary-table__grid tfoot td.num {
  color: var(--color-pine);
}

.flex-summary-kpi {
  /* Inherits .kpi base styles; this just locks proportions in the grid. */
  display: flex;
  flex-direction: column;
  justify-content: center;
}

/* ============================================================ */
/* Round 7 Item L: Completed YTD (past workshops) table          */
/* Rendered as a second card below the upcoming workshops card.  */
/* ============================================================ */
.past-workshops-card { margin-top: var(--space-4, 16px); }
.past-workshops-card .card-title {
  display: flex;
  align-items: center;
  gap: 10px;
}
.past-count-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 28px;
  height: 22px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--color-surface-offset, rgba(0,0,0,0.06));
  color: var(--color-text-muted, #5a5a5a);
  font-size: 12px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}
/* Slightly muted treatment so the upcoming pipeline stays the primary read. */
.workshop-table--past tbody tr {
  opacity: 0.92;
}
.workshop-table--past tbody tr:hover {
  opacity: 1;
}
