/* ================================================================
   SHF AGRICULTURE DASHBOARD — Design System
   Brand: Deep Blue #0D4F6C · Leaf Green #6FA641 · Harvest Gold #D9A441
   Background: Soft Green #F4F8F0 · Cards: White
   ================================================================ */

/* ── Variables ────────────────────────────────────────────────── */
:root {
  --cream:         #F4F8F0;
  --cream-dark:    #E3EEDB;
  --purple:        #0D4F6C;
  --purple-mid:    #1E7896;
  --purple-light:  #6FA641;
  --purple-faint:  #EAF4E3;
  --orange:        #D8752C;
  --orange-light:  #F6E4D5;
  --gold:          #D9A441;
  --gold-light:    #F7EBC8;
  --accent-dark:   #0D4F6C;
  --text:          #243238;
  --text-mid:      #5D6D64;
  --text-light:    #91A095;
  --white:         #FFFFFF;
  --border:        rgba(13,79,108,0.12);
  --shadow-sm:     0 1px 4px rgba(0,0,0,0.06);
  --shadow:        0 2px 12px rgba(0,0,0,0.08);
  --shadow-md:     0 4px 24px rgba(0,0,0,0.10);
  --radius-sm:     8px;
  --radius:        14px;
  --radius-lg:     20px;
  --sidebar-w:     228px;
  --header-h:      56px;
}

/* ── Reset ────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 15px; }
body {
  font-family: 'Lato', sans-serif;
  background: var(--cream);
  color: var(--text);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
a { text-decoration: none; color: inherit; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }

/* ================================================================
   APP SHELL — Sidebar + Main
   ================================================================ */
.app-shell {
  display: flex;
  min-height: 100vh;
}

/* ================================================================
   SIDEBAR
   ================================================================ */
.sidebar {
  width: var(--sidebar-w);
  min-height: 100vh;
  background: var(--purple);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  scrollbar-width: none;
  z-index: 100;
}
.sidebar::-webkit-scrollbar { display: none; }

/* Logo */
.sidebar-logo {
  background: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--header-h);
  padding: 0 20px;
  border-bottom: 3px solid var(--purple);
  flex-shrink: 0;
}
.sidebar-logo-img {
  max-height: 56px;
  max-width: 100%;
  width: auto;
  display: block;
}

/* Nav */
.sidebar-nav {
  flex: 1;
  padding: 20px 0 16px;
}
.sidebar-section-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  color: rgba(255,255,255,0.40);
  padding: 0 18px 8px;
  text-transform: uppercase;
}
.sidebar-section-gap {
  margin-top: 20px;
}
.sidebar-nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 18px;
  font-size: 0.88rem;
  font-weight: 500;
  color: rgba(255,255,255,0.75);
  border-left: 3px solid transparent;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
  cursor: pointer;
}
.sidebar-nav-item:hover {
  background: rgba(255,255,255,0.08);
  color: white;
}
.sidebar-nav-item--active {
  background: rgba(255,255,255,0.12);
  color: white;
  border-left-color: var(--gold);
  font-weight: 700;
}
.sidebar-nav-item--disabled {
  opacity: 0.45;
  cursor: default;
  pointer-events: none;
}
.sidebar-nav-item--soon {
  opacity: 0.70;
}
.sidebar-nav-icon {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.85;
}

/* Quote card */
.sidebar-quote {
  margin: 12px 14px 20px;
  background: rgba(255,255,255,0.07);
  border-radius: var(--radius-sm);
  padding: 16px 14px;
  position: relative;
  overflow: hidden;
}
.sidebar-quote-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,0.15) 1px, transparent 1px);
  background-size: 12px 12px;
  pointer-events: none;
}
.sidebar-quote-text {
  font-family: 'Merriweather', serif;
  font-size: 0.75rem;
  font-weight: 400;
  color: rgba(255,255,255,0.80);
  line-height: 1.6;
  position: relative;
}

/* Sidebar bottom decoration */
.sidebar-deco-bottom {
  margin-top: auto;
  width: 100%;
  line-height: 0;
  overflow: hidden;
  flex-shrink: 0;
  pointer-events: none;
}
.sidebar-deco-bottom svg {
  width: 100%;
  height: 100px;
  display: block;
}

/* ================================================================
   MAIN APP AREA
   ================================================================ */
.app {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--cream);
}

/* ================================================================
   TOP HEADER
   ================================================================ */
.header {
  height: var(--header-h);
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 0;
  position: sticky;
  top: 0;
  z-index: 90;
  box-shadow: var(--shadow-sm);
}

/* Top nav links */
.top-nav {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}
.top-nav-divider {
  width: 1px;
  height: 18px;
  background: var(--border);
  margin: 0 8px;
}
.top-nav-item {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  font-size: 0.87rem;
  font-weight: 500;
  color: var(--text-mid);
  border-radius: 6px;
  border: none;
  background: none;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  white-space: nowrap;
}
.top-nav-item:hover { background: var(--purple-faint); color: var(--purple); }
.top-nav-item--active {
  color: var(--purple);
  font-weight: 700;
  position: relative;
}
.top-nav-item--active::after {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 12px;
  right: 12px;
  height: 2px;
  background: var(--orange);
  border-radius: 2px;
}
.top-nav-item--muted { color: var(--text-light); }
.top-nav-item--muted:hover { background: var(--purple-faint); color: var(--purple); }

/* Header right */
.header-right {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-left: auto;
}
.profile-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--purple);
  color: white;
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Analysis type select (View switcher) */
.analysis-type-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
.analysis-type-label {
  font-size: 0.80rem;
  color: var(--text-light);
  font-weight: 500;
  white-space: nowrap;
}
.analysis-type-select {
  appearance: none;
  background: var(--purple-faint);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 6px 28px 6px 10px;
  font-family: 'Lato', sans-serif;
  font-size: 0.83rem;
  font-weight: 600;
  color: var(--purple);
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234B2E83' stroke-width='2' stroke-linecap='round' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 8px center;
  transition: border-color 0.15s;
}
.analysis-type-select:hover,
.analysis-type-select:focus { border-color: var(--purple); outline: none; }
.analysis-type-select option { background: white; color: var(--text); }

/* ================================================================
   HERO SECTION
   ================================================================ */
.hero-section {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  padding: 10px 24px;
  gap: 16px;
  position: relative;
}
.content-header {
  display: flex;
  align-items: stretch;
  background: var(--cream);
  overflow: hidden;
  position: relative;
  height: 200px;
  border-bottom: 1px solid var(--border);
}
.content-header-text {
  flex: 1;
  padding: 28px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 1;
  background-image: radial-gradient(circle, rgba(13,79,108,0.06) 1px, transparent 1px);
  background-size: 14px 14px;
}
.content-header-img-wrap {
  width: 44%;
  min-height: 200px;
  flex-shrink: 0;
  clip-path: url(#hero-img-clip);
  overflow: hidden;
  position: relative;
}
.content-header-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}
.content-header .hero-title {
  font-family: 'Merriweather', serif;
  font-size: 1.55rem;
  font-weight: 900;
  color: var(--purple);
  line-height: 1.25;
  margin-bottom: 10px;
}
.content-header .hero-desc {
  font-size: 0.88rem;
  color: var(--text-mid);
  line-height: 1.6;
  max-width: 480px;
}
/* Subtle dot pattern across hero */
.hero-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(75,46,131,0.06) 1px, transparent 1px);
  background-size: 20px 20px;
  pointer-events: none;
}

.hero-text {
  flex: 1;
  position: relative;
  z-index: 1;
  min-width: 0;
}

/* ── Hero filter panel (right column) ────────────────────── */
.hero-filters {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 10px;
  flex: 1;
  flex-wrap: nowrap;
}
.hero-filters > .filter-bar-item {
  flex: 1;
  min-width: 0;
}
.hero-breadcrumb {
  font-size: 0.76rem;
  color: var(--text-light);
  font-weight: 500;
  letter-spacing: 0.03em;
  margin-bottom: 6px;
}
.hero-title {
  font-family: 'Merriweather', serif;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--purple);
  line-height: 1.3;
  margin-bottom: 8px;
}
.hero-desc {
  font-size: 0.87rem;
  color: var(--text-mid);
  line-height: 1.6;
  max-width: 520px;
}

.hero-visual {
  position: relative;
  width: 200px;
  height: 100px;
  flex-shrink: 0;
  z-index: 1;
}
/* Decorative arc shape */
.hero-arc {
  position: absolute;
  right: -20px;
  top: -30px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: linear-gradient(135deg, rgba(227,168,87,0.20) 0%, rgba(201,76,44,0.15) 100%);
  pointer-events: none;
}
.hero-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(201,76,44,0.20) 1.5px, transparent 1.5px);
  background-size: 14px 14px;
  pointer-events: none;
}
.hero-logo-watermark {
  position: absolute;
  right: 10px;
  top: 50%;
  transform: translateY(-50%);
  height: 60px;
  width: auto;
  opacity: 0.12;
  filter: grayscale(1);
}

/* ================================================================
   FILTER BAR
   ================================================================ */
.filter-bar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: flex-end;
  gap: 12px;
  padding: 14px 24px;
  flex-wrap: wrap;
  box-shadow: var(--shadow-sm);
}
.filter-bar-item {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.filter-bar-label {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-light);
  white-space: nowrap;
  flex-shrink: 0;
}
.filter-bar-apply {
  margin-left: auto;
  display: flex;
  align-items: flex-end;
}
.apply-filters-btn {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 9px 18px;
  background: var(--orange);
  color: white;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  cursor: pointer;
  border: none;
  transition: background 0.15s, transform 0.1s;
  white-space: nowrap;
}
.apply-filters-btn:hover { background: #B85D20; }
.apply-filters-btn:active { transform: scale(0.97); }

/* ── Dropdowns ── */
.indicator-dropdown {
  appearance: none;
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 8px 32px 8px 12px;
  font-family: 'Lato', sans-serif;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='11' height='7' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' stroke='%234B2E83' stroke-width='2' stroke-linecap='round' fill='none'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
  min-width: 0;
  flex: 1;
  transition: border-color 0.15s;
}
.indicator-dropdown:focus { outline: none; border-color: var(--purple); }
.indicator-dropdown:disabled { opacity: 0.45; cursor: not-allowed; }

/* ── Country multi-select ── */
.country-multi-wrap { position: relative; flex: 1; }
.country-multi-trigger {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  background: var(--cream);
  border: 1.5px solid var(--border);
  border-radius: 8px;
  padding: 8px 10px 8px 12px;
  font-family: 'Lato', sans-serif;
  font-size: 0.86rem;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  min-width: 0;
  width: 100%;
  white-space: nowrap;
  transition: border-color 0.15s;
}
.country-multi-trigger:hover,
.country-multi-trigger.open { border-color: var(--purple); }
.country-multi-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 200px;
  background: var(--white);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-md);
  z-index: 200;
  padding: 0 0 6px;
  max-height: 320px;
  overflow-y: auto;
}
.multi-drop-controls {
  position: sticky;
  top: 0;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  padding: 8px 10px 6px;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.multi-drop-search {
  width: 100%;
  box-sizing: border-box;
  padding: 5px 8px;
  font-size: 0.82rem;
  border: 1.5px solid var(--border);
  border-radius: 5px;
  outline: none;
  color: var(--text);
  font-family: inherit;
}
.multi-drop-search:focus { border-color: var(--purple); }
.multi-drop-actions {
  display: flex;
  align-items: center;
  gap: 6px;
}
.multi-drop-act {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.76rem;
  font-weight: 600;
  color: var(--purple);
  cursor: pointer;
  text-decoration: underline;
  font-family: inherit;
}
.multi-drop-act:hover { color: var(--orange); }
.multi-drop-sep {
  font-size: 0.76rem;
  color: var(--text-light);
}
.country-multi-opt {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 14px;
  font-size: 0.86rem;
  cursor: pointer;
  transition: background 0.12s;
}
.country-multi-opt:hover { background: var(--purple-faint); }
.country-multi-opt input[type="checkbox"],
.country-multi-opt input[type="radio"] {
  accent-color: var(--purple);
  width: 15px;
  height: 15px;
  cursor: pointer;
}

/* ── Date range ── */
.date-range-compact {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 8px;
  flex: 1;
}
.date-display {
  min-width: 72px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--purple);
  text-align: center;
  letter-spacing: 0.03em;
}
.date-sliders-wrapper {
  display: flex;
  align-items: center;
  gap: 6px;
  flex: 0 0 auto;
}
.date-year-input {
  width: 64px;
  min-height: 32px;
  padding: 5px 7px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--white);
  color: var(--purple);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 700;
  text-align: center;
}
.date-year-input:focus {
  outline: none;
  border-color: var(--purple-light);
  box-shadow: 0 0 0 3px rgba(111,166,65,0.16);
}
.date-year-separator {
  color: var(--text-light);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}
.date-slider {
  display: none;
}
}

/* ================================================================
   BODY LAYOUT
   ================================================================ */
.body-layout {
  flex: 1;
  padding: 24px 24px 0;
}
.main-content {
  max-width: 1400px;
  width: 100%;
}

/* ================================================================
   LANDING / ONBOARDING
   ================================================================ */
/* Home landing card (no padding — inner sections handle spacing) */
.landing-section {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  margin: 20px 0 32px;
  position: relative;
}
.howto-close {
  position: absolute;
  top: 16px;
  right: 16px;
  display: grid;
  width: 36px;
  height: 36px;
  place-items: center;
  color: var(--accent-dark);
  background: #EAF4E3;
  border: 1px solid #D4E6C7;
  border-radius: 999px;
  cursor: pointer;
}
.howto-close:hover { transform: translateY(-1px); }
.howto-close svg { width: 14px; height: 14px; }
#landing-section {
  overflow: hidden;
}

/* How-to landing sections (DD, Slicer) — restore original padded layout */
#dd-choose-geo.landing-section,
#slicer-view .landing-section {
  padding: 40px 48px;
  overflow: visible;
  max-width: 700px;
  margin: 20px auto 32px;
}

/* Landing hero */
.landing-hero {
  display: flex;
  align-items: stretch;
  height: 200px;
  background: var(--cream);
  overflow: hidden;
  position: relative;
  background-image: radial-gradient(circle, rgba(58,26,95,0.06) 1px, transparent 1px);
  background-size: 14px 14px;
}
.landing-hero-text {
  flex: 1;
  padding: 28px 36px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  z-index: 1;
}
.landing-hero-tag {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 8px;
}
.landing-hero-title {
  font-family: 'Merriweather', serif;
  font-size: 1.45rem;
  font-weight: 900;
  color: var(--purple);
  line-height: 1.25;
  margin-bottom: 10px;
}
.landing-hero-desc {
  font-size: 0.85rem;
  color: var(--text-mid);
  line-height: 1.6;
  max-width: 420px;
}
.landing-hero-img-wrap {
  width: 44%;
  min-height: 230px;
  flex-shrink: 0;
  clip-path: url(#hero-img-clip);
  overflow: hidden;
}
.landing-hero-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  display: block;
}

/* Landing section cards */
.landing-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  border-top: 1px solid var(--border);
}
.landing-card {
  padding: 24px 28px;
  cursor: pointer;
  border-right: 1px solid var(--border);
  transition: background 0.15s;
}
.landing-card:last-child { border-right: none; }
.landing-card:hover { background: var(--purple-faint); }
.landing-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--purple);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
  box-shadow: 0 2px 8px rgba(58,26,95,0.25);
}
.landing-card-icon svg {
  width: 22px;
  height: 22px;
  stroke: white;
  fill: none;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.landing-card-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 4px;
}
.landing-card-title {
  font-family: 'Merriweather', serif;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--purple);
  margin-bottom: 8px;
  line-height: 1.3;
}
.landing-card-desc {
  font-size: 0.82rem;
  color: var(--text-mid);
  line-height: 1.55;
}
.landing-title {
  font-family: 'Merriweather', serif;
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--purple);
  margin-bottom: 10px;
}
.landing-intro {
  font-size: 0.92rem;
  color: var(--text-mid);
  line-height: 1.6;
  margin-bottom: 28px;
}
.landing-steps {
  display: flex;
  flex-direction: column;
  gap: 18px;
  margin-bottom: 28px;
}
.landing-step {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.landing-step-num {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--purple);
  color: white;
  font-size: 0.82rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.landing-step-text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-top: 4px;
}
.landing-step-text strong {
  font-size: 0.92rem;
  color: var(--text);
}
.landing-step-text span {
  font-size: 0.85rem;
  color: var(--text-mid);
  line-height: 1.5;
}
.landing-tip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: var(--gold-light);
  border-radius: var(--radius-sm);
  padding: 12px 16px;
  font-size: 0.87rem;
  color: var(--text-mid);
  line-height: 1.5;
}
.landing-tip-arrow {
  font-size: 1.1rem;
  color: var(--gold);
  font-weight: 700;
  flex-shrink: 0;
  margin-top: 1px;
}
.landing-tip-badge {
  background: var(--purple);
  color: white;
  font-size: 0.75rem;
  font-weight: 700;
  padding: 2px 8px;
  border-radius: 20px;
  letter-spacing: 0.03em;
}


/* ================================================================
   TAB PANELS
   ================================================================ */
.tab-panel {
  display: none;
}
.tab-panel.active {
  display: block;
  padding-top: 40px;
}
#sublevel-stats-section {
  padding-top: 40px;
}

/* ================================================================
   HEADLINE BANNER
   ================================================================ */
.headline-banner {
  background: linear-gradient(135deg, var(--purple) 0%, var(--purple-mid) 100%);
  border-radius: var(--radius);
  padding: 18px 24px;
  margin-bottom: 20px;
}
.headline-banner h2 {
  font-family: 'Merriweather', serif;
  font-size: 1.05rem;
  font-weight: 700;
  color: white;
  line-height: 1.4;
}

/* ================================================================
   STAT STRIP
   ================================================================ */
.stat-strip {
  display: grid;
  gap: 14px;
  margin-bottom: 20px;
}
.stat-strip-3 { grid-template-columns: repeat(3, 1fr); }
.stat-strip-6 { grid-template-columns: repeat(6, 1fr); }

.stat-cell {
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  border-top: 3px solid var(--gold);
  transition: box-shadow 0.2s;
}
.stat-cell:hover { box-shadow: var(--shadow-md); }
.stat-cell-label {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light);
  margin-bottom: 8px;
  line-height: 1.3;
}
.stat-cell-value {
  font-family: 'Merriweather', serif;
  font-size: 1.65rem;
  font-weight: 900;
  color: var(--text);
  line-height: 1;
  margin-bottom: 6px;
}
.stat-cell-value.gold { color: var(--orange); }
.stat-cell-sub {
  font-size: 0.73rem;
  color: var(--text-light);
  font-weight: 500;
}

/* ================================================================
   CARD GRIDS
   ================================================================ */
.card-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}
.card-grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}

/* ================================================================
   DATA CARD
   ================================================================ */
.data-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.data-card:hover { box-shadow: var(--shadow-md); }

.data-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text);
  border-bottom: 1px solid var(--cream-dark);
}
.data-card-body {
  padding: 16px 18px;
}

.chart-type-toggle {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}
.chart-toggle-btn {
  padding: 4px 12px;
  border-radius: 20px;
  border: 1.5px solid var(--purple);
  background: none;
  color: var(--purple);
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Lato', sans-serif;
  transition: background 0.15s, color 0.15s;
}
.chart-toggle-btn.active {
  background: var(--purple);
  color: #fff;
}

/* Badges */
.data-card-badge {
  display: inline-flex;
  align-items: center;
  padding: 3px 10px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  background: var(--orange-light);
  color: var(--orange);
  white-space: nowrap;
  flex-shrink: 0;
}
.data-card-badge.purple {
  background: var(--purple-faint);
  color: var(--purple);
}

/* Current Data button */
.current-data-btn {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border-radius: 6px;
  font-size: 0.75rem;
  font-weight: 700;
  background: var(--gold);
  color: white;
  cursor: pointer;
  border: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.15s;
}
.current-data-btn:hover { background: #B9862F; }

/* ================================================================
   CHART CONTAINERS
   ================================================================ */
.chart-container {
  position: relative;
  width: 100%;
}
.chart-container.h200 { height: 200px; }
.chart-container.h220 { height: 220px; }
.chart-container.h180 { height: 180px; }
.chart-container.h140 { height: 140px; }

/* ================================================================
   PROGRESS LIST (prog-list)
   ================================================================ */
.prog-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 4px 0;
}
.prog-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.prog-label {
  display: flex;
  justify-content: space-between;
  font-size: 0.80rem;
  font-weight: 600;
  color: var(--text-mid);
}
.prog-bar-wrap {
  height: 7px;
  background: var(--cream-dark);
  border-radius: 4px;
  overflow: hidden;
}
.prog-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 0.4s ease;
}

/* ================================================================
   SUBLEVEL STATS SECTION
   ================================================================ */
.sublevel-stats-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 4px 0;
}
.sublevel-stats-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 0.88rem;
  color: var(--text-mid);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--cream-dark);
}
.sublevel-stats-list li:last-child { border-bottom: none; padding-bottom: 0; }
.sublevel-stats-list li strong {
  color: var(--text);
  font-weight: 700;
}
.sublevel-stat-val {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--orange);
  white-space: nowrap;
}

/* ================================================================
   SLICER CONTROLS BAR
   ================================================================ */
.sl-controls-bar {
  background: var(--cream-dark);
  border-radius: var(--radius-sm);
  margin-bottom: 16px;
}
.sl-go-item { justify-content: flex-end; }
.sl-go-btn {
  padding: 8px 24px;
  background: var(--purple);
  color: white;
  border-radius: 8px;
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  border: none;
  transition: background 0.15s;
}
.sl-go-btn:hover { background: var(--purple-mid); }
.sl-kpi-count {
  font-size: 0.70rem;
  background: var(--orange);
  color: white;
  border-radius: 10px;
  padding: 1px 6px;
  font-weight: 700;
}

/* ================================================================
   EDUCATION OUTCOMES — Exam table (eo-exam-tbody)
   ================================================================ */
.eo-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}
.eo-table th {
  text-align: left;
  padding: 8px 12px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  border-bottom: 2px solid var(--cream-dark);
}
.eo-table td {
  padding: 10px 12px;
  color: var(--text-mid);
  border-bottom: 1px solid var(--cream-dark);
}
.eo-table tr:last-child td { border-bottom: none; }
.eo-table td strong { color: var(--text); }

/* ================================================================
   DYNAMIC DATA MODULE
   ================================================================ */
#dd-load-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: var(--orange);
  z-index: 9999;
  transition: width 0.4s ease;
}

/* ================================================================
   L2LR grants / L3 ES2 children bars
   ================================================================ */
#l2lr-grants-total,
#l3es2-kids-total,
#l3es2-kids-bars,
#lg-mbw-val {
  font-family: 'Merriweather', serif;
  font-weight: 700;
  color: var(--orange);
}

/* ================================================================
   FOOTER
   ================================================================ */
.dashboard-footer {
  text-align: center;
  padding: 20px 24px 28px;
  font-size: 0.85rem;
  color: var(--text-light);
  border-top: 1px solid var(--border);
  margin-top: 32px;
}
.footer-quote {
  font-style: italic;
}
.footer-quote em {
  color: var(--purple);
  font-weight: 600;
}

/* ================================================================
   RESPONSIVE
   ================================================================ */
@media (max-width: 1100px) {
  .stat-strip-6 { grid-template-columns: repeat(3, 1fr); }
  .card-grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 900px) {
  :root { --sidebar-w: 0px; }
  .sidebar { display: none; }
  .stat-strip-3 { grid-template-columns: repeat(2, 1fr); }
  .stat-strip-6 { grid-template-columns: repeat(2, 1fr); }
  .card-grid-2 { grid-template-columns: 1fr; }
  .hero-visual { display: none; }
  .hero-section { padding: 20px 20px; flex-direction: column; align-items: stretch; }
  .hero-filters { min-width: 0; max-width: 100%; }
  .filter-bar { padding: 12px 16px; }
  .body-layout { padding: 16px 16px 0; }
}

@media (max-width: 600px) {
  .stat-strip-3 { grid-template-columns: 1fr; }
  .stat-strip-6 { grid-template-columns: 1fr; }
  .card-grid-2,
  .card-grid-3 { grid-template-columns: 1fr; }
  .filter-bar { flex-direction: column; align-items: stretch; }
  .filter-bar-apply { margin-left: 0; }
  .top-nav-item--muted { display: none; }
  .header { flex-direction: column; align-items: stretch; padding: 0; }
  .top-nav { flex-wrap: wrap; gap: 0; }
  .top-nav-divider { display: none; }
  #home-btn { padding: 10px 16px; border-bottom: 1px solid var(--border); width: 100%; justify-content: flex-start; border-radius: 0; }
  .top-nav-mode { flex: 1 1 auto; justify-content: center; padding: 10px 8px; font-size: 0.82rem; border-radius: 0; border-bottom: 1px solid var(--border); }
}

/* ================================================================
   EDUCATION REACH / OUTCOMES CHARTS  (er-*)
   ================================================================ */
.er-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-bottom: 16px;
}
.er-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.er-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--cream-dark);
  flex-wrap: wrap;
}
.er-card-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.er-total-badge {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--purple);
  background: var(--purple-faint);
  padding: 3px 10px;
  border-radius: 20px;
  white-space: nowrap;
  flex-shrink: 0;
}
.er-chart-wrap {
  padding: 12px 16px;
  height: 220px;
  position: relative;
}
.er-chart-wrap canvas {
  width: 100% !important;
  height: 100% !important;
}
.er-table-wrap {
  padding: 8px 12px;
  overflow-x: auto;
}
.er-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.er-table th {
  text-align: left;
  padding: 6px 10px;
  font-size: 0.70rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  border-bottom: 2px solid var(--cream-dark);
}
.er-table td {
  padding: 8px 10px;
  color: var(--text-mid);
  border-bottom: 1px solid var(--cream-dark);
}
.er-table tr:last-child td { border-bottom: none; }
.er-radio-group {
  display: flex;
  gap: 12px;
  flex-shrink: 0;
}
.er-radio-opt {
  font-size: 0.78rem;
  color: var(--text-mid);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}
@media (max-width: 900px) {
  .er-grid { grid-template-columns: 1fr; }
}

/* ================================================================
   PROGRESS LIST — row/val/bg aliases used by JS
   ================================================================ */
.prog-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 4px;
}
.prog-val {
  font-size: 0.80rem;
  font-weight: 700;
  color: var(--text-mid);
  white-space: nowrap;
}
.prog-bg {
  height: 7px;
  background: var(--cream-dark);
  border-radius: 4px;
  overflow: hidden;
}

/* ================================================================
   SUBLEVEL STATS LIST — item / label / value / na
   ================================================================ */
.sublevel-stat-item {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 12px;
  font-size: 0.88rem;
  color: var(--text-mid);
  padding-bottom: 12px;
  border-bottom: 1px solid var(--cream-dark);
}
.sublevel-stat-item:last-child { border-bottom: none; padding-bottom: 0; }
.sublevel-stat-label { flex: 1; line-height: 1.4; }
.sublevel-stat-value {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--orange);
  white-space: nowrap;
  flex-shrink: 0;
}
.sublevel-stat-na {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-light);
  white-space: nowrap;
  flex-shrink: 0;
}

/* ================================================================
   LEARNER GUIDE STAT STRIP  (lg-*)
   ================================================================ */
.lg-stat-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 16px;
}
.lg-stat-card {
  background: var(--white);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 16px 18px;
  border-top: 3px solid var(--gold);
}
.lg-stat-title {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  margin-bottom: 8px;
  line-height: 1.3;
}
.lg-stat-value {
  font-family: 'Merriweather', serif;
  font-size: 1.55rem;
  font-weight: 900;
  color: var(--orange);
  line-height: 1;
}
.lg-stat-na {
  font-size: 0.82rem;
  color: var(--text-light);
  font-style: italic;
  margin-top: 6px;
}
.lg-radio-group {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.lg-radio-opt {
  font-size: 0.78rem;
  color: var(--text-mid);
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
}
@media (max-width: 900px) {
  .lg-stat-strip { grid-template-columns: repeat(2, 1fr); }
}

/* ================================================================
   L3 HORIZONTAL BAR ROWS  (l3-*)
   ================================================================ */
.l3-section-title {
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-light);
  margin: 14px 0 8px;
}
.l3-bar-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}
.l3-bar-label {
  width: 80px;
  font-size: 0.80rem;
  color: var(--text-mid);
  font-weight: 600;
  flex-shrink: 0;
  text-align: right;
}
.l3-bar-track {
  flex: 1;
  height: 22px;
  background: var(--cream-dark);
  border-radius: 4px;
  overflow: hidden;
  position: relative;
}
.l3-bar-fill {
  height: 100%;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 6px;
  min-width: 2px;
  transition: width 0.4s ease;
}
.l3-bar-val {
  font-size: 0.72rem;
  font-weight: 700;
  color: white;
  white-space: nowrap;
}

/* ================================================================
   ER FILTER BADGE
   ================================================================ */
.er-filter-badge {
  display: inline-flex;
  align-items: center;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--gold-light);
  color: var(--gold);
  white-space: nowrap;
  flex-shrink: 0;
  margin: 0 16px 10px;
}

/* ================================================================
   DYNAMIC DATA MODULE  (dd-*)
   ================================================================ */
.dd-breadcrumb-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0 14px;
  flex-wrap: wrap;
}
.dd-breadcrumb {
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text);
}
.dd-geo-level-badge {
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--purple-faint);
  color: var(--purple);
  padding: 3px 10px;
  border-radius: 20px;
  letter-spacing: 0.03em;
}
.dd-year-badge {
  font-size: 0.72rem;
  font-weight: 700;
  background: var(--orange-light);
  color: var(--orange);
  padding: 3px 10px;
  border-radius: 20px;
}
.dd-year-badge.single {
  background: var(--gold-light);
  color: #73551B;
}
.dd-number-display {
  font-family: 'Merriweather', serif;
  font-size: 2rem;
  font-weight: 900;
  color: var(--orange);
  line-height: 1;
  margin-bottom: 6px;
}
.dd-number-label {
  font-size: 0.78rem;
  color: var(--text-light);
  font-weight: 500;
}

/* ================================================================
   MINI TABLE  (slicer)
   ================================================================ */
.mini-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.83rem;
}
.mini-table th {
  text-align: left;
  padding: 7px 12px;
  font-size: 0.70rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-light);
  border-bottom: 2px solid var(--cream-dark);
  white-space: nowrap;
}
.mini-table td {
  padding: 9px 12px;
  color: var(--text-mid);
  border-bottom: 1px solid var(--cream-dark);
}
.mini-table tr:last-child td { border-bottom: none; }
.mini-table td:first-child { font-weight: 600; color: var(--text); }
