/* =====================================================================
   SWaRD - Sustainability Dashboard template  (www/sward_dashboard.css)
   Load AFTER styles.css (styles.css still serves Home / Methodology /
   User Guide). Presentation only - no logic.

   Layout: [ module rail ] [ context bar + workspace ] [ settings drawer ]
   Colour system matches sw_pal in app.R:
     demand #264653 | rain #4EA8DE | irrigation #7B61FF | SW #0096C7
     GW #8E5EA2 | surplus #2A9D8F | deficit #D62828
   ===================================================================== */

:root {
  --swd-primary:    #1F6B45;
  --swd-primary-d:  #16523A;
  --swd-primary-50: #E8F3EC;
  --swd-green:      #4CAF72;
  --swd-amber:      #F2B33D;
  --swd-red:        #D62828;
  --swd-navy:       #10291B;
  --swd-navy-2:     #17402B;
  --swd-navy-3:     #1F5238;
  --swd-accent:     #7BC67E;   /* light green: buttons / highlights on the dark sidebar */
  --swd-accent-hi:  #95D498;
  --swd-accent-txt: #A8DDA9;
  --swd-sb-text:    #DDEBDF;
  --swd-sb-muted:   #9DB9A6;
  --swd-bg:         #F2F7F3;
  --swd-line:       #E1EAE3;
  --swd-ink:        #15271C;
  --swd-muted:      #5A6E61;
  --swd-radius:     14px;
  --swd-shadow:     0 1px 2px rgba(16, 38, 26, .04), 0 4px 14px rgba(16, 38, 26, .05);
  --swd-shadow-lg:  0 10px 30px rgba(16, 38, 26, .12);
  --swd-font:       "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
}

body { font-family: var(--swd-font); color: var(--swd-ink); -webkit-font-smoothing: antialiased; }
.swd-shell h1, .swd-shell h2, .swd-shell h3, .swd-shell h4 { font-family: var(--swd-font); letter-spacing: -.01em; }

/* =====================================================================
   1. TOP BAR
   ===================================================================== */
.navbar {
  background: rgba(255, 255, 255, .92) !important;
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--swd-line);
  box-shadow: 0 1px 8px rgba(16, 38, 26, .05);
  padding: 6px 0;
}
.swd-brand { display: flex; align-items: center; gap: 12px; margin-left: 12px; }
.swd-brand-logo { height: 40px; width: auto; }
.swd-brand-divider { width: 1px; height: 32px; background: var(--swd-line); }
.swd-brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.swd-brand-name {
  font-size: 20px; font-weight: 800; letter-spacing: .5px;
  background: linear-gradient(90deg, var(--swd-primary), var(--swd-green));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.swd-brand-sub { font-size: 11px; font-weight: 500; color: var(--swd-muted); }

.navbar-nav .nav-link {
  display: flex; align-items: center; gap: 7px;
  padding: .5rem 1rem !important; margin-right: 4px;
  border-radius: 999px;
  font-size: 13.5px; font-weight: 500;
  color: var(--swd-muted) !important;
  transition: background .15s, color .15s;
}
.navbar-nav .nav-link:hover { color: var(--swd-primary) !important; background: var(--swd-primary-50); }
.navbar-nav .nav-link.active {
  color: #fff !important; font-weight: 600;
  background: linear-gradient(135deg, var(--swd-primary), #2F8F5B);
  box-shadow: 0 4px 12px rgba(31, 107, 69, .25);
}
.navbar-nav .nav-link.active::after { display: none; }

/* =====================================================================
   2. WORKSPACE SHELL
   ===================================================================== */
.swd-shell {
  --_sidebar-width: 340px;
  min-height: calc(100vh - 66px);
  background:
    radial-gradient(1200px 500px at 100% -10%, rgba(42, 157, 143, .07), transparent 60%),
    radial-gradient(900px 400px at -10% 0%, rgba(31, 107, 69, .06), transparent 60%),
    var(--swd-bg);
}
.swd-shell > .main { padding: 0 !important; background: transparent; overflow: visible; }
.swd-shell > .main > .row { margin: 0; flex-wrap: nowrap; min-height: calc(100vh - 66px); }

/* ---------- Left module rail ---------- */
.swd-shell > .main > .row > .col-sm-2 {
  flex: 0 0 250px; max-width: 250px; width: 250px;
  padding: 18px 12px;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(8px);
  border-right: 1px solid var(--swd-line);
  position: sticky; top: 0; align-self: flex-start;
  height: calc(100vh - 66px); overflow-y: auto;
}
.swd-shell > .main > .row > .col-sm-2::before {
  content: "MODULES";
  display: block; padding: 0 10px 10px;
  font-size: 10.5px; font-weight: 700; letter-spacing: 1.2px; color: #8A99A6;
}
.swd-shell .col-sm-2 > .nav { display: flex; flex-direction: column; gap: 6px; }
.swd-shell .col-sm-2 .nav-link {
  display: grid !important;
  grid-template-columns: 38px 1fr auto;
  align-items: center; gap: 10px;
  padding: 10px !important;
  border-radius: 12px !important;
  background: transparent !important;
  color: var(--swd-ink) !important;
  border: 1px solid transparent;
  transition: background .15s, border-color .15s, transform .15s;
}
.swd-shell .col-sm-2 .nav-link:hover { background: #F4F7FA !important; transform: translateX(2px); }
.swd-shell .col-sm-2 .nav-link.active {
  background: #fff !important;
  border-color: #CFE2EA;
  box-shadow: 0 4px 14px rgba(31, 107, 69, .10), inset 3px 0 0 var(--swd-primary);
}
.rail-ico {
  width: 38px; height: 38px; display: grid; place-items: center;
  border-radius: 11px; background: #EEF2F5; color: var(--swd-muted); font-size: 15px;
}
.nav-link.active .rail-ico { background: linear-gradient(135deg, var(--swd-primary), var(--swd-green)); color: #fff; }
.rail-txt { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.rail-name { font-size: 13px !important; font-weight: 600; white-space: normal; }
.rail-sub  { font-size: 10.5px; color: #8A99A6; }
.rail-num  { font-size: 11px; font-weight: 800; color: #C2CDD6; }
.nav-link.active .rail-num { color: var(--swd-primary); }

/* ---------- Workspace column ---------- */
.swd-shell > .main > .row > .col-sm-10 {
  flex: 1 1 auto; max-width: none; width: auto; min-width: 0;
  padding: 0 24px 30px;
}

/* ---------- Context bar ---------- */
#ctx_bar { position: sticky; top: 0; z-index: 40; margin: 0 -24px 18px; }
.swd-ctx {
  display: flex; align-items: center; gap: 14px;
  padding: 10px 24px;
  background: rgba(255, 255, 255, .88);
  backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--swd-line);
}
.swd-ctx-crumb { display: flex; align-items: center; gap: 8px; white-space: nowrap; font-size: 12px; color: var(--swd-muted); }
.swd-ctx-crumb i { font-size: 9px; }
.swd-ctx-crumb strong { color: var(--swd-ink); font-size: 13px; }
.swd-ctx-chips { display: flex; gap: 6px; flex: 1; min-width: 0; overflow-x: auto; padding: 2px 0; }
.swd-ctx-chips .swd-chip { flex: 0 0 auto; padding: 5px 10px; }
.swd-ctx-chips .swd-chip-icon { width: 24px; height: 24px; flex-basis: 24px; font-size: 11px; }
.swd-ctx-chips .swd-chip-label { font-size: 9.5px; }
.swd-ctx-chips .swd-chip-value { font-size: 12px; white-space: nowrap; }
.swd-ctx-btn { white-space: nowrap; padding: 8px 14px; border-radius: 999px !important; }

.swd-shell > .sidebar { border-left: 0; box-shadow: -8px 0 24px rgba(16, 38, 26, .14); }
.swd-shell > .collapse-toggle {
  background: var(--swd-primary) !important; color: #fff !important;
  border-radius: 8px 0 0 8px; top: 14px;
}

/* =====================================================================
   3. PAGE HEADER, SECTIONS, GRIDS
   ===================================================================== */
.swd-page { display: flex; flex-direction: column; gap: 16px; animation: swd-in .35s ease both; }
@keyframes swd-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.swd-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; }
.swd-head h2 { font-size: 22px !important; font-weight: 800; margin: 0; color: var(--swd-ink); }
.swd-head p  { font-size: 12.5px; margin: 3px 0 0; color: var(--swd-muted); }
.swd-head-q {
  display: flex; align-items: center; gap: 8px; max-width: 380px;
  padding: 8px 14px; border-radius: 999px;
  background: #fff; border: 1px solid #D5E6DA; color: var(--swd-primary);
  font-size: 12px; font-style: italic; box-shadow: var(--swd-shadow);
}
@media (max-width: 1100px) { .swd-head { flex-direction: column; align-items: flex-start; } }

.swd-section { display: flex; align-items: center; gap: 10px; margin-top: 6px; }
.swd-section-num {
  padding: 3px 9px; border-radius: 999px;
  background: var(--swd-primary); color: #fff;
  font-size: 11px; font-weight: 800;
}
.swd-section h4 { font-size: 15px !important; font-weight: 700; margin: 0; color: var(--swd-ink); }
.swd-section p  { font-size: 11.5px; margin: 0; color: var(--swd-muted); }

.swd-grid { display: grid; gap: 16px; }
.swd-grid > * { min-width: 0; grid-area: auto !important; }
.swd-cols-2  { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.swd-cols-3  { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.swd-cols-4  { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.swd-cols-12 { grid-template-columns: repeat(12, minmax(0, 1fr)); }
.swd-span-4 { grid-column: span 4 !important; }
.swd-span-5 { grid-column: span 5 !important; }
.swd-span-7 { grid-column: span 7 !important; }
.swd-span-8 { grid-column: span 8 !important; }
.swd-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1300px) {
  .swd-cols-3 { grid-template-columns: 1fr; }
  .swd-cols-4, .swd-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .swd-cols-12 > [class*="swd-span-"] { grid-column: 1 / -1 !important; }
}
@media (max-width: 760px) { .swd-cols-2, .swd-cols-4, .swd-strip { grid-template-columns: 1fr; } }

/* =====================================================================
   4. CARDS
   ===================================================================== */
.swd-card {
  display: flex; flex-direction: column; min-width: 0;
  background: #fff;
  border: 1px solid var(--swd-line);
  border-radius: var(--swd-radius);
  box-shadow: var(--swd-shadow);
  transition: box-shadow .2s;
}
.swd-card:hover { box-shadow: var(--swd-shadow-lg); }
.swd-card-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--swd-line);
}
.swd-card-head-l { display: flex; align-items: center; gap: 10px; min-width: 0; }
.swd-card-icon {
  width: 30px; height: 30px; flex: 0 0 30px;
  display: grid; place-items: center;
  border-radius: 9px; background: var(--swd-primary-50); color: var(--swd-primary);
  font-size: 13px;
}
.swd-card-title, .swd-card .card-title {
  font-size: 13.5px !important; font-weight: 650 !important;
  color: var(--swd-ink) !important; margin: 0 !important;
}
.swd-card-body { padding: 14px 16px; flex: 1; min-width: 0; }
.swd-card .chart-container { width: 100%; }
.graph-title { display: inline-flex; align-items: center; gap: 6px; }
.graph-title .info-icon { color: var(--swd-primary); font-size: 11px; cursor: help; }

.swd-subhead {
  font-size: 10.5px; font-weight: 700; letter-spacing: .7px;
  text-transform: uppercase; color: var(--swd-muted);
  margin: 14px 0 6px;
}
.swd-summary p { font-size: 12.5px !important; line-height: 1.75; color: #33424E; margin-bottom: 8px !important; }
.swd-hint {
  display: flex; align-items: center; gap: 6px;
  padding: 8px 12px; margin-bottom: 10px;
  border-radius: 10px; background: var(--swd-primary-50); color: var(--swd-primary);
  font-size: 12px;
}
.swd-abbrev { font-size: 10px; color: var(--swd-muted); margin: 8px 0 0; line-height: 1.5; }

.swd-page > .card, .swd-page > .bslib-card {
  border: 1px solid var(--swd-line); border-radius: var(--swd-radius);
  box-shadow: var(--swd-shadow); overflow: hidden; margin: 0;
}
.swd-page > .card > .card-header { background: #fff; }
.swd-tab-note { font-size: 13px; font-weight: 600; margin-bottom: 6px; }

/* =====================================================================
   5. KPI + CHIPS
   ===================================================================== */
.tone-slate  { --tone: #3E5568; --tone-bg: #EAEFF3; }
.tone-teal   { --tone: #0F766E; --tone-bg: #E3F3F1; }
.tone-green  { --tone: #3E9B64; --tone-bg: #E3F4E8; }
.tone-amber  { --tone: #C98A12; --tone-bg: #FDF2DC; }
.tone-blue   { --tone: #2B7BB9; --tone-bg: #E5F0FA; }
.tone-indigo { --tone: #7B61FF; --tone-bg: #EFECFF; }
.tone-violet { --tone: #8E5EA2; --tone-bg: #F3ECF6; }
.tone-red    { --tone: #D62828; --tone-bg: #FCE9E9; }

.swd-kpi {
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 14px;
  padding: 16px 18px;
  background: #fff;
  border: 1px solid var(--swd-line);
  border-radius: var(--swd-radius);
  box-shadow: var(--swd-shadow);
  transition: transform .15s, box-shadow .15s;
}
.swd-kpi::after {
  content: ""; position: absolute; right: -30px; top: -30px;
  width: 100px; height: 100px; border-radius: 50%;
  background: var(--tone-bg); opacity: .7;
}
.swd-kpi:hover { transform: translateY(-2px); box-shadow: var(--swd-shadow-lg); }
.swd-kpi-icon {
  position: relative; z-index: 1;
  width: 46px; height: 46px; flex: 0 0 46px;
  display: grid; place-items: center;
  border-radius: 13px;
  background: var(--tone); color: #fff; font-size: 18px;
  box-shadow: 0 6px 14px -4px var(--tone);
}
.swd-kpi-body { position: relative; z-index: 1; min-width: 0; }
.swd-kpi-label { font-size: 11.5px; font-weight: 500; color: var(--swd-muted); }
.swd-kpi-value { font-size: 20px !important; font-weight: 750 !important; color: var(--swd-ink); line-height: 1.25; word-break: break-word; }
.swd-kpi-note  { font-size: 10.5px; color: #8A99A6; margin-top: 2px; }

.swd-chip {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 10px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--swd-line);
}
.swd-chip-icon {
  width: 30px; height: 30px; flex: 0 0 30px;
  display: grid; place-items: center;
  border-radius: 50%; background: var(--tone-bg); color: var(--tone); font-size: 13px;
}
.swd-chip-label { font-size: 10.5px; color: var(--swd-muted); }
.swd-chip-value { font-size: 13px; font-weight: 700; color: var(--swd-ink); line-height: 1.25; padding-right: 4px; }

/* =====================================================================
   6. OVERVIEW
   ===================================================================== */
.swd-hero-value {
  padding: 12px 14px; border-radius: 12px;
  background: linear-gradient(135deg, #E8F3EC, #EEF7E9);
}
.swd-hero-label { display: block; font-size: 10.5px; color: var(--swd-muted); }
.swd-hero-value .shiny-html-output { font-size: 22px; font-weight: 800; color: var(--swd-primary); }

.swd-stat-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 0; border-bottom: 1px dashed var(--swd-line);
  font-size: 12.5px;
}
.swd-stat-row:last-child { border-bottom: 0; }
.swd-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 10px; }
.swd-stat-label { flex: 1; color: #33424E; }
.swd-stat-value { font-weight: 700; font-variant-numeric: tabular-nums; }

.swd-crops .fund-item { padding: 8px 0; border-bottom: 1px solid #EEF1F4; }
.swd-crops .fund-item:last-child { border-bottom: 0; }
.swd-crops .fund-title { font-size: 12.5px; font-weight: 600; color: var(--swd-ink); margin-bottom: 5px; }
.swd-crops .progress-track { height: 9px; background: #EEF1F4; border-radius: 999px; }
.swd-crops .progress-fill { background: linear-gradient(90deg, #8CC152, var(--swd-green)); border-radius: 999px; }
.swd-crops .fund-meta { font-size: 11px; color: var(--swd-muted); }
.swd-crops .amount-detail, .swd-crops .percentage { font-size: 11.5px; }

.swd-about {
  background: #fff; border: 1px solid var(--swd-line);
  border-radius: var(--swd-radius); box-shadow: var(--swd-shadow);
}
.swd-about > summary {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 16px; cursor: pointer; list-style: none;
  font-size: 13px; font-weight: 650; color: var(--swd-primary);
}
.swd-about > summary::-webkit-details-marker { display: none; }
.swd-about-hint { margin-left: auto; font-size: 11px; font-weight: 500; color: var(--swd-muted); }
.swd-about[open] .swd-about-hint { visibility: hidden; }
.swd-flow { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; padding: 4px 16px 16px; }
@media (max-width: 1200px) { .swd-flow { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.swd-flow-step { position: relative; padding: 12px; border-radius: 12px; background: #F7F9FB; border: 1px solid var(--swd-line); }
.swd-flow-icon {
  width: 34px; height: 34px; display: grid; place-items: center;
  border-radius: 10px; background: linear-gradient(135deg, var(--swd-primary), var(--swd-green)); color: #fff; font-size: 13px;
}
.swd-flow-num { position: absolute; top: 10px; right: 12px; font-size: 18px; font-weight: 800; color: #D5DDE4; }
.swd-flow-title { font-size: 12.5px; font-weight: 700; margin-top: 8px; }
.swd-flow-desc  { font-size: 11px; color: var(--swd-muted); line-height: 1.45; }

.swd-footnote {
  display: flex; gap: 8px; align-items: flex-start;
  margin-top: 6px; padding: 10px 14px;
  border-radius: 12px;
  background: #FFF8EC; border: 1px solid #F3DFB8;
  font-size: 11.5px; color: #6B5523; line-height: 1.5;
}
.swd-footnote i { margin-top: 2px; color: var(--swd-amber); }

/* =====================================================================
   7. SUSTAINABILITY CALCULATOR
   ===================================================================== */
.swd-calc-top { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(420px, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1350px) { .swd-calc-top { grid-template-columns: 1fr; } }
.swd-mapcard { padding: 0; overflow: hidden; }
.swd-mapcard-title {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px; border-bottom: 1px solid var(--swd-line);
  font-size: 13.5px; font-weight: 650;
}
.swd-mapcard-title i { color: var(--swd-primary); }
.swd-mapcard .leaflet-container { border-radius: 0; }
.swd-float-layers {
  position: absolute; top: 12px; right: 12px; z-index: 1000;
  width: 210px; padding: 6px 12px 8px;
  background: rgba(255, 255, 255, .94);
  backdrop-filter: blur(6px);
  border: 1px solid var(--swd-line);
  border-radius: 12px; box-shadow: 0 8px 24px rgba(16, 38, 26, .16);
}
.swd-layer .shiny-input-container { margin-bottom: 2px !important; }
.swd-layer label { font-size: 12px !important; font-weight: 600; color: var(--swd-ink); }
.swd-legend { margin: 0 0 8px 22px; }
.swd-legend-row { display: flex; align-items: center; gap: 7px; padding: 2px 0; font-size: 11px; color: #475663; }
.swd-swatch { width: 14px; height: 14px; border-radius: 4px; flex: 0 0 14px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08); }
.swd-results { display: flex; flex-direction: column; gap: 16px; }
.swd-results .swd-kpi-value { font-size: 22px !important; }
.layer-panel { position: static; width: auto; box-shadow: none; }

/* Table / Graph toggle */
#sa_view { margin: 0 !important; width: auto !important; }
#sa_view .shiny-options-group { display: flex; padding: 3px; background: #EEF2F5; border-radius: 999px; }
#sa_view label.radio-inline, #sa_view .form-check-inline { margin: 0 !important; padding: 0 !important; }
#sa_view input { display: none; }
#sa_view span {
  display: inline-block; padding: 4px 14px; border-radius: 999px;
  font-size: 11px; font-weight: 600; cursor: pointer; color: var(--swd-muted);
}
#sa_view input:checked + span { background: #fff; color: var(--swd-primary); box-shadow: 0 1px 4px rgba(16, 38, 26, .15); }

/* Seasonal water balance tiles (colours = sw_pal) */
.swd-vb-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 1500px) { .swd-vb-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.swd-vb-grid > .bslib-value-box {
  grid-column: auto !important;
  margin: 0 !important;
  min-height: 140px;
  border: 1px solid var(--swd-line) !important;
  border-top: 4px solid var(--vb, var(--swd-primary)) !important;
  border-radius: var(--swd-radius) !important;
  box-shadow: var(--swd-shadow) !important;
}
.value-box-cwr { --vb: #264653; }
.value-box-rf  { --vb: #4EA8DE; }
.value-box-rfd { --vb: #F4A261; }
.value-box-iwr { --vb: #7B61FF; }
.value-box-usw { --vb: #0096C7; }
.value-box-ugw { --vb: #8E5EA2; }
.value-box-def { --vb: #D62828; }
.value-box-sur { --vb: #2A9D8F; }
.swd-vb-grid .value-box-title { font-size: 16px !important; font-weight: 750 !important; color: var(--vb) !important; }
.swd-vb-grid .value-box-value { font-size: 12px !important; font-weight: 500 !important; color: var(--swd-muted) !important; }
.swd-vb-grid .value-box-showcase > .fa-solid { font-size: 42px; color: var(--vb); opacity: .35; }

/* =====================================================================
   8. DATA EXPLORE
   ===================================================================== */
.swd-pixel-col { display: flex; flex-direction: column; }
#visual_pixel_ui:not(:empty) ~ .swd-empty { display: none; }
.swd-empty {
  flex: 1; min-height: 440px;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 2rem; text-align: center;
  background: rgba(255, 255, 255, .7); border: 2px dashed #D3DCE3; border-radius: var(--swd-radius);
  color: var(--swd-muted);
}
.swd-empty-sm { min-height: 220px; }
.swd-empty-icon {
  width: 66px; height: 66px; display: grid; place-items: center;
  border-radius: 50%; background: var(--swd-primary-50); color: var(--swd-primary);
  font-size: 26px; margin-bottom: 12px;
}
.swd-empty h4 { font-size: 15px !important; font-weight: 700; color: var(--swd-ink); margin-bottom: 4px; }
.swd-empty p { font-size: 12.5px; }
.swd-empty-list { display: flex; flex-direction: column; gap: 8px; text-align: left; font-size: 12px; }
.swd-empty-list div { display: flex; gap: 10px; align-items: center; }
.swd-empty-list i { width: 18px; color: var(--swd-primary); }

/* map legend (Data Explore) */
.swd-map-legend {
  padding: 8px 12px; background: rgba(255, 255, 255, .95);
  border-radius: 10px; font-size: 11px;
}
.swd-map-legend b { display: block; margin-bottom: 4px; font-size: 11.5px; }
.swd-map-legend .swd-legend { margin: 0; }

/* ---------- Pixel details card ---------- */
.swd-pixel-card { overflow: hidden; }
.swd-pixel-head {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px 10px;
}
.swd-pixel-coords { margin: 0; font-size: 11px; color: var(--swd-muted); font-variant-numeric: tabular-nums; }
.swd-pixel-card > .tabbable, .swd-pixel-card > div > .nav-pills { padding: 0 16px; }
.swd-pixel-card .nav-pills {
  display: inline-flex; gap: 4px; flex-wrap: nowrap;
  margin: 0 16px; padding: 4px;
  background: #EEF2F5; border-radius: 12px;
}
.swd-pixel-card .nav-pills .nav-link {
  display: flex; align-items: center; gap: 6px;
  padding: 7px 14px; border-radius: 9px;
  font-size: 12.5px; font-weight: 600; color: var(--swd-muted);
  background: transparent; white-space: nowrap;
}
.swd-pixel-card .nav-pills .nav-link .panel-heading { font-size: 12.5px; }
.swd-pixel-card .nav-pills .nav-link.active {
  background: #fff; color: var(--swd-primary);
  box-shadow: 0 1px 6px rgba(16, 38, 26, .12);
}
.swd-pixel-card .tab-content { padding: 14px 16px 18px; }

/* status banner */
.swd-pixel-status {
  padding: 12px 14px; border-radius: 12px;
  background: color-mix(in srgb, var(--st) 9%, #fff);
  border: 1px solid color-mix(in srgb, var(--st) 30%, #fff);
  border-left: 5px solid var(--st);
}
.swd-status-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.swd-status-badge {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 12px; border-radius: 999px;
  background: var(--st); color: #fff; font-size: 12px; font-weight: 700;
}
.swd-status-meta { display: flex; gap: 14px; font-size: 11.5px; color: #475663; }
.swd-status-meta i { margin-right: 4px; color: var(--st); }
.swd-status-text { margin: 8px 0 0; font-size: 12px !important; line-height: 1.6; color: #33424E; }

/* seasonal KPI strip */
.swd-mini-kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
@media (max-width: 1400px) { .swd-mini-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.swd-mini-kpi {
  display: flex; align-items: center; gap: 8px;
  padding: 9px 10px; border-radius: 12px;
  background: #fff; border: 1px solid var(--swd-line);
  border-bottom: 3px solid var(--k);
}
.swd-mini-ico {
  width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center;
  border-radius: 9px; font-size: 12px;
  background: color-mix(in srgb, var(--k) 14%, #fff); color: var(--k);
}
.swd-mini-lab { font-size: 10px; color: var(--swd-muted); line-height: 1.2; }
.swd-mini-val { font-size: 15px; font-weight: 750; color: var(--swd-ink); font-variant-numeric: tabular-nums; }
.swd-mini-val span { font-size: 10px; font-weight: 500; color: var(--swd-muted); }

/* pixel table */
#pixel_table .rt-table { border-radius: 10px; overflow: hidden; border: 1px solid var(--swd-line); }
#pixel_table .rt-th { background: #F5F8FA; color: var(--swd-ink); }
#pixel_table .rt-td, #pixel_table .rt-th { border-color: #EEF2F5 !important; }

/* crop recommendation */
.swd-rec-note h4 { font-size: 13px !important; font-weight: 700; color: var(--swd-ink); margin-bottom: 4px; }
.swd-rec-note p { font-size: 12px !important; line-height: 1.6; color: #475663; }
.swd-rec-note {
  padding: 12px 14px; margin-bottom: 12px;
  border-radius: 12px; background: #F5F9F7; border: 1px solid #DCEDE6;
}
.swd-rec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-bottom: 10px; }
.swd-rec-count { font-size: 13px; font-weight: 700; }
.swd-rec-hint { font-size: 11px; color: var(--swd-muted); }
.swd-rec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.swd-rec-card {
  display: flex; gap: 10px; padding: 12px;
  background: #fff; border: 1px solid var(--swd-line); border-radius: 12px;
  transition: transform .15s, box-shadow .15s, border-color .15s;
}
.swd-rec-card:hover { transform: translateY(-2px); box-shadow: var(--swd-shadow-lg); border-color: #BFE0D6; }
.swd-rec-card:first-child { border-color: #9ED3C4; background: linear-gradient(180deg, #F2FBF8, #fff); }
.swd-rec-rank {
  width: 28px; height: 28px; flex: 0 0 28px; display: grid; place-items: center;
  border-radius: 50%; background: #EEF2F5; color: var(--swd-muted);
  font-size: 12px; font-weight: 800;
}
.swd-rec-card:first-child .swd-rec-rank { background: var(--swd-green); color: #fff; }
.swd-rec-body { flex: 1; min-width: 0; }
.swd-rec-top { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.swd-rec-name { font-size: 13px; font-weight: 700; color: var(--swd-ink); }
.swd-badge { padding: 2px 8px; border-radius: 999px; font-size: 10px; font-weight: 700; white-space: nowrap; }
.swd-badge.good { background: #E3F4F1; color: #1B7F5B; }
.swd-badge.ok   { background: #FDF2DC; color: #9A6A0B; }
.swd-rec-group { display: flex; align-items: center; gap: 5px; margin-top: 3px; font-size: 11px; color: var(--swd-muted); }
.swd-rec-group i { color: var(--swd-green); }
.swd-dot-sep { opacity: .5; }
.swd-rec-bar { height: 6px; margin: 9px 0 6px; border-radius: 999px; background: #EEF2F5; overflow: hidden; }
.swd-rec-bar > div { height: 100%; border-radius: 999px; background: linear-gradient(90deg, #7BC67E, #1F6B45); }
.swd-rec-meta { display: flex; justify-content: space-between; font-size: 11px; color: var(--swd-muted); }
.swd-rec-meta strong { color: var(--swd-ink); }

/* time recommendation */
.swd-rec-toolbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-bottom: 10px; }
.swd-rec-intro { margin: 0; font-size: 12px !important; color: #475663; max-width: 420px; }
.swd-rec-toolbar .shiny-input-container { width: 300px !important; margin: 0; }
.swd-rec-toolbar label { font-size: 11px !important; font-weight: 600; color: var(--swd-muted); }

.swd-best {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 16px; margin-bottom: 12px;
  border-radius: 14px; color: #fff;
  background: linear-gradient(120deg, #1F6B45, #3E9B64 60%, #7BC67E);
  box-shadow: 0 8px 20px -8px rgba(27, 127, 91, .55);
}
.swd-best-ico { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; background: rgba(255, 255, 255, .18); font-size: 17px; }
.swd-best-main { flex: 1; }
.swd-best-lab { font-size: 10.5px; opacity: .85; }
.swd-best-val { font-size: 17px; font-weight: 800; line-height: 1.2; }
.swd-best-side { text-align: right; padding-left: 14px; border-left: 1px solid rgba(255, 255, 255, .3); }

.swd-cal { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 6px; }
@media (max-width: 1100px) { .swd-cal { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.swd-cal-m {
  position: relative;
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 4px 6px; border-radius: 10px;
  background: #F7F9FB; border: 1px solid var(--swd-line);
  transition: transform .15s;
}
.swd-cal-m:hover { transform: translateY(-2px); }
.swd-cal-name { font-size: 11px; font-weight: 700; color: var(--swd-muted); }
.swd-cal-bar { width: 14px; height: 54px; border-radius: 6px; background: #E6EBF0; display: flex; align-items: flex-end; overflow: hidden; }
.swd-cal-bar > div { width: 100%; border-radius: 6px; background: #9FB3C3; }
.swd-cal-val { font-size: 10px; font-weight: 600; color: #475663; font-variant-numeric: tabular-nums; }
.swd-cal-m.best { background: #E9F7F2; border-color: #2A9D8F; box-shadow: 0 0 0 2px rgba(42, 157, 143, .18); }
.swd-cal-m.best .swd-cal-name { color: #1B7F5B; }
.swd-cal-m.best .swd-cal-bar > div { background: linear-gradient(180deg, #52B788, #1B7F5B); }
.swd-cal-m.current { border-style: dashed; border-color: #64748B; }
.swd-cal-tag {
  position: absolute; top: -7px; right: -7px;
  width: 18px; height: 18px; display: grid; place-items: center;
  border-radius: 50%; background: #1B7F5B; color: #fff; font-size: 9px;
  box-shadow: 0 2px 6px rgba(27, 127, 91, .4);
}
.swd-cal-legend { display: flex; gap: 16px; flex-wrap: wrap; margin-top: 10px; font-size: 11px; color: var(--swd-muted); }
.swd-cal-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.swd-lg { width: 14px; height: 14px; border-radius: 4px; background: #F7F9FB; border: 1px solid var(--swd-line); }
.swd-lg.best { background: #E9F7F2; border-color: #2A9D8F; }
.swd-lg.current { border: 1px dashed #64748B; }

/* =====================================================================
   9. DATA VISUALIZER
   ===================================================================== */
.swd-viz { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 1000px) { .swd-viz { grid-template-columns: 1fr; } }
.swd-viz-menu {
  width: auto !important; height: auto !important; overflow: visible !important;
  display: flex; flex-direction: column; gap: 4px !important;
  padding: 10px !important;
  background: #fff; border: 1px solid var(--swd-line);
  border-radius: var(--swd-radius); box-shadow: var(--swd-shadow);
  position: sticky; top: 80px;
}
.swd-menu-label {
  padding: 2px 8px 6px;
  font-size: 10.5px; font-weight: 700; letter-spacing: .7px;
  text-transform: uppercase; color: var(--swd-muted);
}
.swd-menu-foot { margin-top: 8px; padding-top: 10px; border-top: 1px solid var(--swd-line); }
.option-card {
  display: flex; align-items: center; gap: 10px !important;
  padding: 9px 10px !important; margin: 0;
  border-radius: 10px !important; background: transparent !important;
  border: 1px solid transparent; box-shadow: none !important;
  transform: none !important; cursor: pointer;
}
.option-card:hover { background: #F5F8FA !important; }
.option-card.active { background: var(--swd-primary-50) !important; border-color: #C8E0CF; }
.opt-num {
  width: 26px; height: 26px; flex: 0 0 26px;
  display: grid; place-items: center;
  border-radius: 8px; background: #EEF1F4; color: var(--swd-muted);
  font-size: 11px; font-weight: 800;
}
.option-card.active .opt-num { background: var(--opt-color, var(--swd-primary)); color: #fff; }
.opt-title { font-size: 12.5px !important; font-weight: 500 !important; color: var(--swd-ink) !important; margin: 0 !important; }
.option-card.active .opt-title { font-weight: 700 !important; }

.swd-viz-main {
  padding: 16px !important; border-radius: var(--swd-radius) !important;
  background: #fff; border: 1px solid var(--swd-line); box-shadow: var(--swd-shadow) !important;
  min-width: 0;
}
.swd-viz-main h3 {
  font-size: 16px !important; font-weight: 700; color: var(--swd-ink) !important;
  padding-left: 10px; margin: 0 0 12px;
  border-left: 4px solid var(--opt-color, var(--swd-primary));
}
.swd-viz-content { display: flex; flex-direction: column; gap: 16px; }
.swd-viz-content .swd-card h3 { border-left: 0; padding-left: 0; margin: 0; font-size: 13.5px !important; }
.info-panel { padding: 0; font-family: var(--swd-font); }

/* =====================================================================
   10. MAPS + LOADING
   ===================================================================== */
.map-wrap { position: relative; }
.leaflet-container { border-radius: 12px; font-family: var(--swd-font); background: #EDF3EE; }
.leaflet-bar, .leaflet-control-layers, .info.legend {
  border: 0 !important; border-radius: 10px !important;
  box-shadow: 0 4px 14px rgba(16, 38, 26, .16) !important;
}
.leaflet-bar a { color: var(--swd-ink); }
.map-loading-overlay {
  display: none; position: absolute; inset: 0; z-index: 2000;
  flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  background: rgba(255, 255, 255, .8); backdrop-filter: blur(3px);
  border-radius: 12px;
  font-size: 12.5px; font-weight: 600; color: var(--swd-primary);
}
.map-loading-overlay.active { display: flex; }
.map-spinner {
  width: 34px; height: 34px; border-radius: 50%;
  border: 3px solid var(--swd-primary-50); border-top-color: var(--swd-primary);
  animation: swd-spin .8s linear infinite;
}
@keyframes swd-spin { to { transform: rotate(360deg); } }

/* =====================================================================
   11. BUTTONS, CHARTS, NOTIFICATIONS, MODALS, TOOLTIPS
   ===================================================================== */
.btn { border-radius: 10px; font-weight: 600; font-size: 12.5px; }
.btn-primary { background: var(--swd-primary) !important; border-color: var(--swd-primary) !important; }
.btn-primary:hover { background: var(--swd-primary-d) !important; }
.js-plotly-plot .plotly text { font-family: var(--swd-font) !important; }
.js-plotly-plot .hoverlayer .hovertext path { stroke-width: 0 !important; }
.reactable { font-family: var(--swd-font); }

.shiny-notification {
  background: #fff !important; color: var(--swd-ink) !important;
  border: 1px solid var(--swd-line) !important;
  border-left: 4px solid var(--swd-primary) !important;
  border-radius: 12px !important;
  box-shadow: var(--swd-shadow-lg) !important;
  font-size: 12.5px !important; opacity: 1 !important;
}
.shiny-notification-warning { border-left-color: var(--swd-amber) !important; }
.shiny-notification-error   { border-left-color: var(--swd-red) !important; }

#shiny-modal .modal-content {
  border: 0 !important; border-top: 4px solid var(--swd-amber) !important;
  border-radius: 14px !important; background: #fff !important;
  box-shadow: 0 20px 50px rgba(16, 38, 26, .25) !important;
}
#shiny-modal .modal-body { color: var(--swd-ink) !important; font-size: 13px !important; padding: 20px 22px 6px !important; }
#shiny-modal .modal-footer { border-top: 0 !important; padding: 8px 22px 18px !important; }
#shiny-modal .btn {
  background: var(--swd-primary) !important; border-color: var(--swd-primary) !important;
  color: #fff !important; font-size: 12.5px !important; padding: 6px 18px !important;
}

.tooltip { --bs-tooltip-bg: var(--swd-navy); }
.tooltip-inner { background-color: var(--swd-navy) !important; font-size: 11.5px !important; padding: 6px 9px !important; text-align: left; border-radius: 8px !important; }

/* =====================================================================
   12. SETTINGS DRAWER (dark "Analysis setup")
   ===================================================================== */
.swd-shell > .sidebar { background: var(--swd-navy) !important; }
.swd-shell > .sidebar > .sidebar-content { gap: 10px; padding: 14px 14px 0; }
.sward-sidebar { font-size: 12px; color: var(--swd-sb-text); }

.sb-head {
  display: flex; align-items: center; gap: 10px;
  padding: 4px 2px 12px; margin-bottom: 10px;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
}
.sb-head-icon {
  width: 36px; height: 36px; display: grid; place-items: center;
  border-radius: 10px; background: linear-gradient(135deg, var(--swd-primary), var(--swd-green)); color: #fff;
}
.sb-head-title { font-size: 14.5px; font-weight: 700; color: #fff; }
.sb-head-sub   { font-size: 10.5px; color: var(--swd-sb-muted); }

.sb-acc { --bs-accordion-bg: transparent; --bs-accordion-border-width: 0; margin-bottom: 10px; }
.sb-acc .accordion-item {
  background: var(--swd-navy-2) !important;
  border: 1px solid rgba(255, 255, 255, .06) !important;
  border-radius: 12px !important; overflow: hidden;
  margin-bottom: 10px;
}
.sb-acc .accordion-button {
  padding: 10px 12px; background: var(--swd-navy-2) !important;
  color: #fff !important; box-shadow: none !important;
}
.sb-acc .accordion-button::after { filter: invert(1) brightness(1.6); }
.sb-acc .accordion-button:not(.collapsed) { background: var(--swd-navy-3) !important; }
.sb-acc .accordion-body { padding: 12px; }
.sb-acc .accordion-icon { display: none; }

.sb-step { display: flex; align-items: center; gap: 10px; }
.sb-step-num {
  width: 26px; height: 26px; flex: 0 0 26px;
  display: grid; place-items: center;
  border-radius: 50%; border: 2px solid var(--swd-accent); color: var(--swd-accent);
  font-size: 12px; font-weight: 800;
}
.accordion-button:not(.collapsed) .sb-step-num { background: var(--swd-accent); color: var(--swd-navy); }
.sb-step-txt { display: flex; flex-direction: column; line-height: 1.15; }
.sb-step-name { font-size: 13px; font-weight: 600; color: #fff; }
.sb-step-sub  { font-size: 10.5px; color: var(--swd-sb-muted); }

.sward-sidebar .control-label, .sward-sidebar label, .sb-label {
  font-size: 11px !important; font-weight: 600; color: #B9CBD8 !important;
  margin-bottom: 4px;
}
.sb-info { margin-left: 5px; color: var(--swd-accent); cursor: help; }
.sward-sidebar .shiny-input-container { width: 100% !important; margin-bottom: 9px; }
.sward-sidebar .form-control, .sward-sidebar .selectize-input {
  min-height: 32px; font-size: 11.5px !important;
  border-radius: 8px !important; border: 1px solid transparent !important;
  background: #fff;
}
.sward-sidebar .form-control:focus, .sward-sidebar .selectize-input.focus {
  box-shadow: 0 0 0 3px rgba(123, 198, 126, .35) !important;
}
.sward-sidebar .selectize-dropdown { color: var(--swd-ink); font-size: 11.5px !important; }
.sward-sidebar .radio label, .sward-sidebar .checkbox label { color: var(--swd-sb-text) !important; font-weight: 500; }

.sb-two { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.sb-map { margin: 4px 0 10px; border-radius: 10px; overflow: hidden; border: 1px solid rgba(255, 255, 255, .12); }
.sb-map .leaflet-container { border-radius: 0; }
.sb-actions { display: grid; grid-template-columns: 1fr 1.6fr; gap: 8px; }
.sb-actions .btn { width: 100%; padding: 8px; }
#reset { background: transparent !important; color: var(--swd-sb-text) !important; border: 1px solid rgba(255, 255, 255, .25) !important; }
#reset:hover { background: rgba(255, 255, 255, .08) !important; }
#go { background: var(--swd-accent) !important; border-color: var(--swd-accent) !important; color: var(--swd-navy) !important; }
#go:hover { background: var(--swd-accent-hi) !important; }

.sb-pill {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 5px 10px; margin-bottom: 10px;
  border-radius: 999px; background: rgba(123, 198, 126, .15); color: var(--swd-accent-txt);
  font-size: 11px; font-weight: 600;
}
.sb-kc { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; margin-bottom: 8px; }
.sb-kc-chip {
  padding: 6px 2px; text-align: center;
  border-radius: 8px; background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .08);
  font-size: 10.5px; font-weight: 600; color: #fff;
}
.sb-plot { background: #fff; border-radius: 10px; padding: 4px; margin-bottom: 10px; }
.sb-plot .shiny-plot-output { margin: 0 !important; }

.sb-filter .btn { font-size: 11.5px; color: var(--swd-sb-text); border-color: rgba(255, 255, 255, .25); }
.sb-filter .btn:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.sb-filter .btn:disabled { opacity: 1; color: var(--swd-accent-txt); border-color: rgba(123, 198, 126, .4); }
.sb-slider { margin-top: 8px; padding: 6px 8px 0; border-left: 3px solid var(--swd-accent); }
.sward-sidebar .irs--shiny .irs-bar, .sward-sidebar .irs--shiny .irs-single { background: var(--swd-accent); border-color: var(--swd-accent); }
.sward-sidebar .irs--shiny .irs-min, .sward-sidebar .irs--shiny .irs-max,
.sward-sidebar .irs--shiny .irs-grid-text { color: var(--swd-sb-muted); background: transparent; }

.sb-param {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  padding: 6px 0; border-bottom: 1px dashed rgba(255, 255, 255, .1);
}
.sb-param:last-child { border-bottom: 0; }
.sb-param-l { font-size: 11.5px; font-weight: 600; color: var(--swd-sb-text); }
.sb-param .shiny-input-container { width: 86px !important; margin: 0 !important; }
.sb-param input { text-align: right; }

.sb-run {
  position: sticky; bottom: 0; z-index: 5;
  padding: 10px 0 14px;
  background: linear-gradient(to top, var(--swd-navy) 75%, rgba(16, 41, 27, 0));
}
#run {
  width: 100%; padding: 11px;
  border-radius: 12px; border: 0;
  background: linear-gradient(135deg, #1B7F5B, var(--swd-green)) !important;
  font-size: 13px; font-weight: 700; color: #fff;
  box-shadow: 0 8px 18px -6px rgba(42, 157, 143, .6);
}
#run:hover { filter: brightness(1.06); }

/* scrollbars */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #C3CDD5; border-radius: 8px; }
.sidebar ::-webkit-scrollbar-thumb { background: #2C4C66; }
::-webkit-scrollbar-track { background: transparent; }

/* #####################################################################
   V6 ADDITIONS
   ##################################################################### */

/* ---------- Sustainable area: yield story + table ---------- */
.swd-ystory {
  display: grid; grid-template-columns: 1fr auto 1fr 1.1fr; align-items: center; gap: 10px;
  padding: 10px 12px; margin-bottom: 10px;
  border-radius: 12px; background: linear-gradient(120deg, #F7FAFC, #F1F8F6);
  border: 1px solid var(--swd-line);
}
.swd-ystory-lab { font-size: 10px; color: var(--swd-muted); }
.swd-ystory-val { font-size: 22px; font-weight: 800; line-height: 1.1; }
.swd-ystory-sub { font-size: 9.5px; color: #8A99A6; }
.swd-ystory-arrow { color: #94A3B8; font-size: 16px; }
.swd-ystory-gain {
  display: flex; align-items: center; gap: 9px;
  padding: 8px 10px; border-radius: 10px;
  background: #E3F4F1; color: #1B7F5B;
}
.swd-ystory-gain > i { font-size: 18px; }
.swd-ystory-gain-val { font-size: 17px; font-weight: 800; line-height: 1.1; }
@media (max-width: 1500px) { .swd-ystory { grid-template-columns: 1fr auto 1fr; } .swd-ystory-gain { grid-column: 1 / -1; } }

#table .rt-table { border: 1px solid var(--swd-line); border-radius: 12px; overflow: hidden; }
#table .rt-th { border-right: 0 !important; }
.swd-yr-legend {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center;
  margin-top: 8px; font-size: 10.5px; color: var(--swd-muted);
}
.swd-yr-legend > span { display: inline-flex; align-items: center; gap: 5px; }
.swd-sev { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ---------- Seasonal water balance ---------- */
.swd-wb { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: 16px; align-items: stretch; }
@media (max-width: 1400px) { .swd-wb { grid-template-columns: 1fr; } }
.swd-wb-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1700px) { .swd-wb-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.swd-wbt {
  position: relative; display: flex; flex-direction: column; gap: 4px;
  padding: 10px 12px 8px; min-width: 0;
  background: #fff; border: 1px solid var(--swd-line); border-radius: 12px;
  box-shadow: var(--swd-shadow);
  border-top: 3px solid var(--c);
  transition: transform .15s, box-shadow .15s;
}
.swd-wbt:hover { transform: translateY(-2px); box-shadow: var(--swd-shadow-lg); }
.swd-wbt-top { display: flex; align-items: center; gap: 7px; min-width: 0; }
.swd-wbt-ico {
  width: 24px; height: 24px; flex: 0 0 24px; display: grid; place-items: center;
  border-radius: 7px; font-size: 11px; color: var(--c);
  background: color-mix(in srgb, var(--c) 14%, #fff);
}
.swd-wbt-lab { flex: 1; min-width: 0; font-size: 11px; font-weight: 650; color: var(--swd-ink); line-height: 1.2; }
.swd-wbt-grp {
  font-size: 8.5px; font-weight: 800; letter-spacing: .5px; text-transform: uppercase;
  padding: 2px 6px; border-radius: 999px; background: #F1F5F8; color: var(--swd-muted);
}
.grp-need .swd-wbt-grp   { background: #EEF1F3; color: #264653; }
.grp-supply .swd-wbt-grp { background: #E8F3FB; color: #1F6FB2; }
.grp-result .swd-wbt-grp { background: #FBEDEC; color: #B42318; }
.swd-wbt-val, .swd-wbt-val div { font-size: 13.5px !important; font-weight: 750; color: var(--c); line-height: 1.25; }
.swd-wbt-spark { height: 46px; margin: 0 -4px; }
.swd-wbt-note { font-size: 9.5px; color: #8A99A6; }

/* ---------- Data Visualizer ---------- */
.opt-desc { font-size: 10.5px; color: #8A99A6; line-height: 1.3; margin-top: 1px; display: none; }
.option-card.active .opt-desc { display: block; }
.swd-viz-hero {
  display: flex; align-items: center; gap: 14px;
  padding: 14px 16px; border-radius: 14px;
  background: linear-gradient(120deg, color-mix(in srgb, var(--opt-color) 12%, #fff), #fff 70%);
  border: 1px solid color-mix(in srgb, var(--opt-color) 25%, #fff);
}
.swd-viz-hero-num {
  width: 44px; height: 44px; flex: 0 0 44px; display: grid; place-items: center;
  border-radius: 12px; background: var(--opt-color); color: #fff;
  font-size: 15px; font-weight: 800;
}
.swd-viz-hero > div:nth-child(2) { flex: 1; min-width: 0; }
.swd-viz-main .swd-viz-hero h3.swd-viz-title { border-left: 0 !important; padding-left: 0 !important; margin: 0 !important; font-size: 17px !important; }
.swd-viz-desc { margin: 2px 0 0; font-size: 12px; color: var(--swd-muted); }
.swd-viz-unit {
  display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  padding: 5px 11px; border-radius: 999px; background: #fff;
  border: 1px solid var(--swd-line); font-size: 11px; color: #475569;
}
.swd-vstat {
  padding: 12px 14px; border-radius: 12px; background: #fff;
  border: 1px solid var(--swd-line); border-left: 4px solid var(--opt-color);
}
.swd-vstat-lab { font-size: 10.5px; color: var(--swd-muted); }
.swd-vstat-val { font-size: 19px; font-weight: 800; color: var(--swd-ink); }
.swd-vstat-val span { font-size: 11.5px; font-weight: 500; color: var(--swd-muted); }
.swd-viz-scale { font-size: 10.5px; color: var(--swd-muted); }
.swd-viz-content .swd-card { box-shadow: none; }
.swd-viz-content .swd-card:hover { box-shadow: var(--swd-shadow); }

/* #####################################################################
   V7 - CALM COLOUR SYSTEM + MODERN OVERVIEW + BASEMAP SWITCH
   Rule: neutrals for structure, one blue family for water,
         muted teal = good, muted brick = problem. Nothing else.
   ##################################################################### */
:root {
  --swd-green: #4E9F6E;
  --swd-amber: #C9A15B;
  --swd-red:   #B5523F;
  --swd-bg:    #F3F7F4;
}

/* --- quieter shell --- */
.swd-shell { background: var(--swd-bg) !important; }
.swd-brand-name { background: none; -webkit-text-fill-color: var(--swd-primary); color: var(--swd-primary); }
.navbar-nav .nav-link.active { background: var(--swd-primary) !important; box-shadow: none; }
.nav-link.active .rail-ico { background: var(--swd-primary); }
.swd-section-num { background: #E7EFE9; color: var(--swd-primary); }
.swd-head-q { box-shadow: none; background: #F7FAFC; }
.swd-page { animation: none; }

/* --- one neutral tone for all decorative icons; brick only for "problem" --- */
.tone-slate, .tone-teal, .tone-green, .tone-amber, .tone-blue, .tone-indigo, .tone-violet {
  --tone: #3F5E4B; --tone-bg: #EDF3EE;
}
.tone-red { --tone: #B5523F; --tone-bg: #F7ECE9; }
.swd-kpi::after { display: none; }
.swd-kpi-icon { background: var(--tone-bg); color: var(--tone); box-shadow: none; border-radius: 12px; }
.swd-chip { border-left: 1px solid var(--swd-line); }
.swd-card-icon { background: #EDF3EE; color: #3F5E4B; }
.swd-flow-icon { background: #EDF3EE; color: #3F5E4B; }
.swd-ctx-btn { background: var(--swd-primary) !important; }

/* --- value boxes / water balance tiles follow sw_pal (calm) --- */
.value-box-cwr { --vb: #3D4F5C; } .value-box-rf  { --vb: #8DB8D8; }
.value-box-rfd { --vb: #C9B79C; } .value-box-iwr { --vb: #5B7A93; }
.value-box-usw { --vb: #4E8FC0; } .value-box-ugw { --vb: #1F4E79; }
.value-box-def { --vb: #B5523F; } .value-box-sur { --vb: #5A9E8F; }
.swd-wbt { border-top-width: 2px; }
.swd-wbt-val, .swd-wbt-val div { color: var(--swd-ink) !important; }
.grp-need .swd-wbt-grp, .grp-supply .swd-wbt-grp { background: #EDF3EE; color: #3F5E4B; }
.grp-result .swd-wbt-grp { background: #F7ECE9; color: #8A3A2C; }

/* --- recommendations / time --- */
.swd-best { background: #2E4D3A; box-shadow: none; }
.swd-cal-m.best { background: #EAF3F1; border-color: #5A9E8F; box-shadow: none; }
.swd-cal-m.best .swd-cal-name { color: #3F7F70; }
.swd-cal-m.best .swd-cal-bar > div { background: #5A9E8F; }
.swd-cal-tag { background: #3F7F70; box-shadow: none; }
.swd-lg.best { background: #EAF3F1; border-color: #5A9E8F; }
.swd-rec-card:first-child { border-color: #A9CEC5; background: #F6FAF9; }
.swd-rec-card:first-child .swd-rec-rank { background: #3F7F70; }
.swd-rec-group i { color: #5B7A93; }
.swd-rec-bar > div { background: #7FA8C9; }
.swd-badge.good { background: #EAF3F1; color: #3F7F70; }
.swd-badge.ok   { background: #F5EFE4; color: #7D6430; }
.swd-rec-note { background: #F7F9FA; border-color: var(--swd-line); }
.swd-ystory { background: #F7F9FA; }
.swd-ystory-gain { background: #EAF3F1; color: #3F7F70; }

/* --- crops progress --- */
.swd-crops .progress-fill { background: #8FA9B9 !important; }
.swd-crops .fund-item:first-child .progress-fill { background: var(--swd-primary) !important; }

/* --- sidebar accents --- */
.sb-head-icon { background: var(--swd-navy-3); }
#run { background: var(--swd-accent) !important; border-color: var(--swd-accent) !important; color: var(--swd-navy) !important; box-shadow: none; }
#run:hover { background: var(--swd-accent-hi) !important; filter: none; }

/* =====================================================================
   OVERVIEW (modern)
   ===================================================================== */
.swd-ov-hero {
  display: grid; grid-template-columns: minmax(260px, 1fr) 2fr; gap: 20px; align-items: center;
  padding: 20px 22px;
  background: #fff; border: 1px solid var(--swd-line); border-radius: 16px;
  box-shadow: var(--swd-shadow);
  position: relative; overflow: hidden;
}
.swd-ov-hero::before {
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--swd-primary);
}
@media (max-width: 1200px) { .swd-ov-hero { grid-template-columns: 1fr; } }
.swd-ov-eyebrow { font-size: 10.5px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: #8A99A6; }
.swd-ov-name { font-size: 26px !important; font-weight: 800; margin: 2px 0 8px; color: var(--swd-ink); letter-spacing: -.02em; }
.swd-ov-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.swd-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px; border-radius: 999px;
  background: #F1F4F7; color: #475569; font-size: 11px; font-weight: 500;
}
.swd-tag i { color: #7B8B98; font-size: 10px; }
.swd-ov-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; }
@media (max-width: 900px) { .swd-ov-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; } }
.swd-ov-stat { display: flex; align-items: flex-start; gap: 10px; padding: 4px 16px; border-left: 1px solid var(--swd-line); min-width: 0; }
.swd-ov-stat-ico { width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center; border-radius: 9px; background: #EDF3EE; color: #3F5E4B; font-size: 12px; }
.swd-ov-stat-lab { font-size: 10.5px; color: var(--swd-muted); }
.swd-ov-stat-val, .swd-ov-stat-val div { font-size: 15px; font-weight: 750; color: var(--swd-ink); line-height: 1.3; word-break: break-word; }

.swd-hero-value { background: #F4F8FB; }
.swd-hero-value .shiny-html-output { color: var(--swd-ink); }

.swd-mix { margin: 12px 0 2px; }
.swd-mix-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; background: #EEF2F5; gap: 2px; }
.swd-mix-bar > div { height: 100%; }
.swd-mix-legend { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; font-size: 11px; color: #475569; }
.swd-mix-legend > span { display: inline-flex; align-items: center; gap: 5px; }

.swd-summary-cols { column-count: 2; column-gap: 28px; }
@media (max-width: 1200px) { .swd-summary-cols { column-count: 1; } }
.swd-summary-cols > div { text-align: left !important; }
.swd-summary-cols p { break-inside: avoid; font-size: 12.5px !important; }

/* =====================================================================
   SEGMENTED SWITCH (Map | Satellite, Table | Graph)
   ===================================================================== */
.swd-seg .shiny-input-container { margin: 0 !important; width: auto !important; }
.swd-seg .shiny-options-group { display: inline-flex; padding: 3px; background: #EEF2F5; border-radius: 999px; }
.swd-seg label.radio-inline, .swd-seg .form-check-inline { margin: 0 !important; padding: 0 !important; }
.swd-seg input { display: none; }
.swd-seg span {
  display: inline-block; padding: 4px 12px; border-radius: 999px;
  font-size: 11px; font-weight: 600; cursor: pointer; color: var(--swd-muted);
}
.swd-seg input:checked + span { background: #fff; color: var(--swd-primary); box-shadow: 0 1px 4px rgba(16, 38, 26, .15); }
.swd-float-layers .swd-seg { margin-bottom: 4px; }

/* #####################################################################
   V8 - SCENARIO COMPARISON
   A = slate outline, B = deep blue fill
   ##################################################################### */
.swd-ab {
  display: inline-grid; place-items: center;
  width: 20px; height: 20px; border-radius: 6px;
  font-size: 10.5px; font-weight: 800; flex: 0 0 20px;
}
.swd-ab.a { background: #fff; color: #3D4F5C; border: 1.5px solid #3D4F5C; }
.swd-ab.b { background: #1F6B45; color: #fff; border: 1.5px solid #1F6B45; }

.swd-pin-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap;
  padding: 8px 12px; border-radius: 12px;
  background: #fff; border: 1px dashed #C6D3DE;
  font-size: 12px; font-weight: 600; color: var(--swd-primary);
}
.swd-pin-bar .btn { margin-left: 4px; }

.swd-cmp-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
@media (max-width: 1000px) { .swd-cmp-steps { grid-template-columns: 1fr; } }
.swd-cmp-step {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 12px 14px; border-radius: 12px; background: #fff; border: 1px solid var(--swd-line);
}
.swd-cmp-step > span {
  width: 26px; height: 26px; flex: 0 0 26px; display: grid; place-items: center;
  border-radius: 50%; background: #EDF3EE; color: #3F5E4B; font-weight: 800; font-size: 12px;
}
.swd-cmp-step.done > span { background: #5A9E8F; color: #fff; }
.swd-cmp-step strong { display: block; font-size: 12.5px; }
.swd-cmp-step small { font-size: 11px; color: var(--swd-muted); }

.swd-cmp-tools { display: flex; gap: 6px; }
.swd-srow {
  display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 10px; align-items: center;
  padding: 7px 4px; border-bottom: 1px solid #F0F3F6; font-size: 12px;
}
.swd-srow:last-of-type { border-bottom: 0; }
.swd-srow-h { font-weight: 700; color: var(--swd-muted); font-size: 11px; border-bottom: 1px solid var(--swd-line); }
.swd-srow-h span { display: inline-flex; align-items: center; gap: 6px; }
.swd-srow-k { color: var(--swd-muted); }
.swd-srow-a, .swd-srow-b { font-weight: 600; color: var(--swd-ink); }
.swd-srow.changed { background: #F5F8FB; border-radius: 8px; }
.swd-srow.changed .swd-srow-b { color: #1F6B45; }
.swd-chg {
  margin-left: 6px; padding: 1px 7px; border-radius: 999px;
  background: #E3F4E8; color: #1F6B45; font-size: 9.5px; font-weight: 700;
}
.swd-warn {
  display: flex; align-items: center; gap: 6px; margin-top: 10px;
  padding: 8px 12px; border-radius: 10px; background: #F7ECE9; color: #8A3A2C; font-size: 12px;
}

.swd-cmpk-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1400px) { .swd-cmpk-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.swd-cmpk {
  display: flex; flex-direction: column; gap: 8px;
  padding: 12px 14px; border-radius: 14px; background: #fff;
  border: 1px solid var(--swd-line); box-shadow: var(--swd-shadow);
}
.swd-cmpk-top { display: flex; align-items: center; gap: 8px; font-size: 11.5px; font-weight: 650; color: var(--swd-ink); }
.swd-cmpk-ico {
  width: 26px; height: 26px; display: grid; place-items: center; border-radius: 8px;
  background: #EDF3EE; color: #3F5E4B; font-size: 11px;
}
.swd-cmpk-vals { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.swd-cmpk-vals > div { display: flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 750; color: var(--swd-ink); }
.swd-cmpk-delta {
  display: inline-flex; align-items: center; gap: 6px; align-self: flex-start;
  padding: 3px 10px; border-radius: 999px; font-size: 11px; font-weight: 700;
  background: #F1F4F7; color: #5F6F7C;
}
.swd-cmpk.good .swd-cmpk-delta { background: #EAF3F1; color: #3F7F70; }
.swd-cmpk.bad  .swd-cmpk-delta { background: #F7ECE9; color: #8A3A2C; }
.swd-cmpk.good { border-bottom: 3px solid #5A9E8F; }
.swd-cmpk.bad  { border-bottom: 3px solid #B5523F; }

/* #####################################################################
   V9 - OVERVIEW (comprehensive, comparable water resources)
   ##################################################################### */
.swd-ov-hero { grid-template-columns: minmax(240px, 0.8fr) 2.2fr; }
.swd-ov-stats-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 14px; }
.swd-ov-stats-6 .swd-ov-stat:nth-child(3n+1) { border-left: 1px solid var(--swd-line); }
@media (max-width: 900px) { .swd-ov-stats-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* indicators */
.swd-ai { padding: 10px 12px; border-radius: 12px; background: #F7F9FA; border: 1px solid var(--swd-line); }
.swd-ai-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.swd-ai-val { font-size: 20px; font-weight: 800; color: var(--swd-ink); }
.swd-ai-scale { position: relative; display: flex; height: 10px; margin: 10px 0 4px; border-radius: 999px; overflow: visible; }
.swd-ai-seg { height: 100%; }
.swd-ai-seg:nth-child(1) { background: #E9D9C6; border-radius: 999px 0 0 999px; }
.swd-ai-seg:nth-child(2) { background: #E3E0CF; }
.swd-ai-seg:nth-child(3) { background: #D8E2DA; }
.swd-ai-seg:nth-child(4) { background: #C6DAE6; }
.swd-ai-seg:nth-child(5) { background: #9FC0D9; border-radius: 0 999px 999px 0; }
.swd-ai-mark {
  position: absolute; top: -4px; width: 4px; height: 18px; margin-left: -2px;
  border-radius: 2px; background: var(--swd-ink); box-shadow: 0 0 0 2px #fff;
}
.swd-ai-lbl { display: flex; justify-content: space-between; font-size: 9.5px; color: var(--swd-muted); }

.swd-ind-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin-top: 10px; }
.swd-ind {
  display: flex; gap: 10px; align-items: flex-start;
  padding: 10px; border-radius: 12px; background: #fff; border: 1px solid var(--swd-line);
}
.swd-ind-ico {
  width: 30px; height: 30px; flex: 0 0 30px; display: grid; place-items: center;
  border-radius: 9px; background: #EDF3EE; color: #3F5E4B; font-size: 12px;
}
.swd-ind-lab { font-size: 10.5px; color: var(--swd-muted); line-height: 1.3; }
.swd-ind-val { font-size: 16px; font-weight: 800; color: var(--swd-ink); line-height: 1.25; }
.swd-ind-note { font-size: 10px; color: #7B8B98; line-height: 1.3; }
.swd-ind.good .swd-ind-note { color: #3F7F70; font-weight: 700; }
.swd-ind.warn .swd-ind-note { color: #8A6A1F; font-weight: 700; }
.swd-ind.bad  .swd-ind-note { color: #8A3A2C; font-weight: 700; }
.swd-ind.good { border-left: 3px solid #5A9E8F; }
.swd-ind.warn { border-left: 3px solid #C9A15B; }
.swd-ind.bad  { border-left: 3px solid #B5523F; }

/* climate strip */
.swd-clim { margin-top: 8px; }
.swd-clim-row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 4px; }
.swd-clim-m {
  text-align: center; padding: 6px 0; border-radius: 8px;
  font-size: 10.5px; font-weight: 700; color: #475569; background: #F1F4F7;
}
.swd-clim-m.wet { background: #C6DAEA; color: #1B3A57; }
.swd-clim-m.mid { background: #E7EFE9; color: #3F5E4B; }
.swd-clim-m.dry { background: #F1E6DC; color: #7A5A3C; }
.swd-clim-legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; font-size: 10.5px; color: var(--swd-muted); }
.swd-clim-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.swd-clim-sw { width: 12px; height: 12px; border-radius: 3px; }
.swd-clim-sw.wet { background: #C6DAEA; } .swd-clim-sw.mid { background: #E7EFE9; } .swd-clim-sw.dry { background: #F1E6DC; }

/* cropland strip */
.swd-cl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 10px; }
.swd-cl-item { padding: 8px 10px; border-radius: 10px; background: #F7F9FA; border: 1px solid var(--swd-line); }
.swd-cl-val { font-size: 16px; font-weight: 800; color: var(--swd-ink); }
.swd-cl-bar { height: 5px; margin-top: 4px; border-radius: 999px; background: #E3E8EE; overflow: hidden; }
.swd-cl-bar > div { height: 100%; background: #A3B18A; }

/* key findings */
.swd-kf { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 20px; }
@media (max-width: 1200px) { .swd-kf { grid-template-columns: 1fr; } }
.swd-kf li { display: flex; gap: 10px; align-items: flex-start; font-size: 12.5px; line-height: 1.6; color: #33424E; }
.swd-kf-ico {
  width: 26px; height: 26px; flex: 0 0 26px; display: grid; place-items: center;
  border-radius: 8px; background: #EDF3EE; color: #3F5E4B; font-size: 11px; margin-top: 1px;
}

/* #####################################################################
   V10 - SUSTAINABLE AREA SUMMARY + TABLE SCROLL
   ##################################################################### */
.swd-table-scroll { overflow-x: auto; max-width: 100%; }
.swd-table-scroll .reactable { min-width: 520px; }
.swd-card.table-box .swd-card-body { min-width: 0; overflow: hidden; }
.swd-card-head { flex-wrap: wrap; }
#sa_view .shiny-options-group { flex-wrap: nowrap; }

.swd-sa-head { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.swd-sa-head > div { padding: 8px 10px; border-radius: 10px; background: #F7F9FA; border: 1px solid var(--swd-line); min-width: 0; }
.swd-sa-big { font-size: 18px; font-weight: 800; color: var(--swd-ink); line-height: 1.2; }
.swd-sa-big.good { color: #3F7F70; }
.swd-sa-big.bad  { color: #8A3A2C; }
.swd-sa-stack { display: flex; height: 26px; border-radius: 8px; overflow: hidden; gap: 2px; background: #EEF2F5; margin-bottom: 12px; }
.swd-sa-seg { display: flex; align-items: center; justify-content: center; min-width: 2px; }
.swd-sa-seg span { font-size: 10.5px; font-weight: 700; color: #fff; text-shadow: 0 1px 2px rgba(0,0,0,.25); }
.swd-sa-cols, .swd-sa-row {
  display: grid; grid-template-columns: 14px minmax(90px, 1.1fr) minmax(60px, 1.2fr) 82px 120px;
  gap: 8px; align-items: center;
}
.swd-sa-cols { font-size: 9.5px; font-weight: 700; letter-spacing: .3px; color: #8A99A6; padding: 0 4px 4px; text-transform: uppercase; }
.swd-sa-cols small { text-transform: none; font-weight: 500; letter-spacing: 0; }
.swd-sa-grp { margin: 8px 0 4px; padding: 4px 8px; border-radius: 6px; font-size: 11px; font-weight: 700; color: #3F7F70; background: #EAF3F1; }
.swd-sa-grp.bad { color: #8A3A2C; background: #F7ECE9; }
.swd-sa-row { padding: 6px 4px; border-bottom: 1px solid #F0F3F6; }
.swd-sa-row:last-child { border-bottom: 0; }
.swd-sa-name { font-size: 11.5px; font-weight: 600; color: var(--swd-ink); }
.swd-sa-bar { height: 7px; border-radius: 999px; background: #EEF2F5; overflow: hidden; }
.swd-sa-bar > div { height: 100%; border-radius: 999px; }
.swd-sa-ha { font-size: 11.5px; font-weight: 700; color: var(--swd-ink); text-align: right; line-height: 1.15; }
.swd-sa-ha span { display: block; font-size: 9.5px; font-weight: 500; color: var(--swd-muted); }
.swd-sa-yr { display: flex; align-items: center; justify-content: flex-end; gap: 6px; font-size: 11px; }
.swd-sa-yr i { font-size: 9px; color: #94A3B8; }
.swd-sa-yr .rf { color: #8A99A6; }
.swd-sa-yr .ir { font-weight: 800; color: var(--swd-ink); }
@media (max-width: 1600px) {
  .swd-sa-head { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .swd-sa-cols, .swd-sa-row { grid-template-columns: 14px minmax(80px, 1fr) minmax(40px, .8fr) 74px 104px; }
}

/* #####################################################################
   V13 - COMPACT "ONE SCREEN" LAYOUT
   Smaller type, tighter spacing, icon-only module rail, fixed-height
   panels that scroll inside, so each page fits a 1366x768 screen.
   ##################################################################### */
:root {
  --swd-nav-h: 48px;
  --swd-radius: 10px;
  --swd-shadow: 0 1px 2px rgba(16, 38, 26, .05);
  --swd-shadow-lg: 0 6px 18px rgba(16, 38, 26, .10);
}
body { font-size: 12.5px; }

/* ---------- top bar ---------- */
.navbar { padding: 2px 0 !important; min-height: var(--swd-nav-h); }
.swd-brand { gap: 9px; margin-left: 8px; }
.swd-brand-logo { height: 30px; }
.swd-brand-divider { height: 24px; }
.swd-brand-name { font-size: 16px; }
.swd-brand-sub { font-size: 10px; }
.navbar-nav .nav-link { padding: .3rem .75rem !important; font-size: 12.5px; gap: 6px; }

/* ---------- shell ---------- */
.swd-shell { min-height: calc(100vh - var(--swd-nav-h)); }
.swd-shell > .main > .row { min-height: calc(100vh - var(--swd-nav-h)); }
.swd-shell > .main > .row > .col-sm-10 { padding: 0 14px 10px; }

/* ---------- icon-only module rail, expands on hover (overlays the page) ---------- */
.swd-shell > .main > .row > .col-sm-2 {
  flex: 0 0 58px; max-width: 58px; width: 58px;
  padding: 10px 8px; overflow: visible !important;
  height: calc(100vh - var(--swd-nav-h)); z-index: 60;
}
.swd-shell > .main > .row > .col-sm-2::before { display: none; }
.swd-shell .col-sm-2 > .nav {
  width: 42px; gap: 4px; padding: 0;
  background: transparent; border-radius: 12px;
  transition: width .18s ease, box-shadow .18s ease, padding .18s ease;
  position: relative; z-index: 70;
}
.swd-shell .col-sm-2:hover > .nav {
  width: 236px; padding: 6px; background: #fff;
  box-shadow: 0 12px 32px rgba(16, 38, 26, .18); border: 1px solid var(--swd-line);
}
.swd-shell .col-sm-2 .nav-link {
  grid-template-columns: 34px 1fr auto !important; gap: 8px;
  padding: 4px !important; border-radius: 10px !important;
  overflow: hidden; white-space: nowrap;
}
.swd-shell .col-sm-2 .nav-link:hover { transform: none; }
.swd-shell .col-sm-2 .nav-link.active { box-shadow: inset 3px 0 0 var(--swd-primary); }
.rail-ico { width: 34px; height: 34px; border-radius: 9px; font-size: 14px; }
.rail-txt, .rail-num { opacity: 0; transition: opacity .12s ease; }
.swd-shell .col-sm-2:hover .rail-txt, .swd-shell .col-sm-2:hover .rail-num { opacity: 1; }
.rail-name { font-size: 12px !important; }
.rail-sub { font-size: 9.5px; }

/* ---------- context bar ---------- */
#ctx_bar { margin: 0 -14px 8px; }
.swd-ctx { padding: 5px 14px; gap: 10px; }
.swd-ctx-crumb { font-size: 11px; }
.swd-ctx-crumb strong { font-size: 12px; }
.swd-ctx-chips .swd-chip { padding: 2px 8px 2px 3px; gap: 6px; }
.swd-ctx-chips .swd-chip-icon { width: 20px; height: 20px; flex-basis: 20px; font-size: 9.5px; }
.swd-ctx-chips .swd-chip-label { font-size: 8.5px; line-height: 1.1; }
.swd-ctx-chips .swd-chip-value { font-size: 11px; line-height: 1.15; }
.swd-ctx-btn { padding: 4px 11px !important; font-size: 11.5px !important; }

/* ---------- page / headers / sections ---------- */
.swd-page { gap: 10px; }
.swd-head { gap: 10px; align-items: center; }
.swd-head h2 { font-size: 16px !important; }
.swd-head p { font-size: 11px; margin: 1px 0 0; }
.swd-head-q { padding: 4px 10px; font-size: 10.5px; max-width: 320px; }
.swd-section { margin-top: 0; gap: 8px; }
.swd-section h4 { font-size: 12.5px !important; }
.swd-section p { font-size: 10.5px; }
.swd-section-num { font-size: 10px; padding: 1px 7px; }
.swd-grid, .swd-strip { gap: 10px; }

/* ---------- cards ---------- */
.swd-card { border-radius: var(--swd-radius); }
.swd-card:hover { box-shadow: var(--swd-shadow); }
.swd-card-head { padding: 6px 10px; gap: 8px; min-height: 36px; }
.swd-card-icon { width: 22px; height: 22px; flex-basis: 22px; font-size: 10.5px; border-radius: 6px; }
.swd-card-title, .swd-card .card-title { font-size: 12px !important; }
.swd-card-body { padding: 8px 10px; }
.graph-title .info-icon { font-size: 9.5px; }
.graph-title .info-icon .fa-lg { font-size: 1em; }
.swd-subhead { font-size: 9.5px; margin: 6px 0 3px; letter-spacing: .5px; }
.swd-hint { padding: 4px 8px; margin-bottom: 6px; font-size: 11px; border-radius: 8px; }
.swd-footnote { margin-top: 0; padding: 5px 10px; font-size: 10px; line-height: 1.35; border-radius: 8px; }
.swd-seg span { padding: 2px 9px; font-size: 10.5px; }
.swd-seg .shiny-options-group { padding: 2px; }
.swd-tag { padding: 2px 8px; font-size: 10.5px; }

/* ---------- KPI ---------- */
.swd-kpi { padding: 7px 10px; gap: 9px; border-radius: var(--swd-radius); }
.swd-kpi:hover { transform: none; }
.swd-kpi-icon { width: 30px; height: 30px; flex-basis: 30px; font-size: 12.5px; border-radius: 8px; }
.swd-kpi-label { font-size: 10px; }
.swd-kpi-value { font-size: 15px !important; line-height: 1.15; }

/* ---------- about / fold ---------- */
.swd-about > summary { padding: 6px 10px; font-size: 11.5px; }
.swd-about-hint { font-size: 10px; }
.swd-fold-body { padding: 4px 12px 10px; }
.swd-kf li { font-size: 11.5px; line-height: 1.5; }
.swd-kf-ico { width: 22px; height: 22px; flex-basis: 22px; font-size: 10px; }
.swd-flow { padding: 2px 10px 10px; gap: 6px; }
.swd-flow-step { padding: 8px; }
.swd-flow-icon { width: 26px; height: 26px; font-size: 11px; }
.swd-flow-title { font-size: 11.5px; margin-top: 4px; }
.swd-flow-desc { font-size: 10px; }

/* =====================================================================
   OVERVIEW - three compact rows
   ===================================================================== */
.swd-ov-hero { grid-template-columns: minmax(200px, .7fr) 3fr; gap: 12px; padding: 8px 14px; border-radius: 12px; }
.swd-ov-eyebrow { font-size: 9.5px; }
.swd-ov-name { font-size: 18px !important; margin: 0 0 4px; }
.swd-ov-tags { gap: 4px; }
.swd-ov-stats-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); row-gap: 0; }
.swd-ov-stat { padding: 2px 10px; gap: 7px; }
.swd-ov-stat-ico { width: 24px; height: 24px; flex-basis: 24px; font-size: 10.5px; border-radius: 7px; }
.swd-ov-stat-lab { font-size: 9.5px; }
.swd-ov-stat-val, .swd-ov-stat-val div { font-size: 12.5px; }
@media (max-width: 1300px) { .swd-ov-stats-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 6px; } }

.swd-ov-row2 { display: grid; grid-template-columns: 1.3fr 1fr; gap: 10px; }
.swd-ov-row3 { display: grid; grid-template-columns: 1.9fr 1fr; gap: 10px; }
/* panels without a chart never make their row taller: they scroll inside */
.ov-crops { contain: size; min-height: 0; }
.ov-crops .swd-card-body { overflow: auto; min-height: 0; }
@media (max-width: 1100px) {
  .swd-ov-row2, .swd-ov-row3 { grid-template-columns: 1fr; }
  .ov-ind, .ov-crops { contain: none; }
}
.swd-ai { padding: 6px 8px; border-radius: 8px; }
.swd-ai-val { font-size: 15px; }
.swd-ai-scale { height: 7px; margin: 6px 0 2px; }
.swd-ai-mark { height: 13px; top: -3px; }
.swd-ai-lbl { font-size: 8.5px; }
.swd-ind-grid { gap: 6px; margin-top: 6px; }
.swd-ind { padding: 6px 7px; gap: 7px; border-radius: 8px; }
.swd-ind-ico { width: 24px; height: 24px; flex-basis: 24px; font-size: 10px; border-radius: 7px; }
.swd-ind-lab { font-size: 9.5px; }
.swd-ind-val { font-size: 13px; }
.swd-ind-note { font-size: 9px; }
.swd-mix { margin: 4px 0 0; }
.swd-mix-bar { height: 8px; }
.swd-mix-legend { font-size: 10px; gap: 8px; margin-top: 4px; }
.swd-clim { margin-top: 4px; }
.swd-clim-row { gap: 3px; }
.swd-clim-m { padding: 3px 0; font-size: 9.5px; border-radius: 6px; }
.swd-clim-legend { font-size: 9.5px; gap: 10px; margin-top: 3px; }
.swd-cl { gap: 6px; margin-bottom: 6px; }
.swd-cl-item { padding: 5px 8px; border-radius: 8px; }
.swd-cl-val { font-size: 13px; }
.swd-crops .fund-item { padding: 4px 0; }
.swd-crops .fund-title { font-size: 11px; margin-bottom: 3px; }
.swd-crops .progress-track { height: 6px; }
.swd-crops .fund-meta, .swd-crops .amount-detail, .swd-crops .percentage { font-size: 10px; }

/* =====================================================================
   SUSTAINABILITY CALCULATOR - 2 rows, 3 columns
   [ map ............ | results ]
   [ budget | tiles   | monthly ]
   ===================================================================== */
.swd-calc-grid {
  display: grid; gap: 10px;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr) minmax(0, 1.1fr);
  grid-template-areas: "map map side" "budget tiles monthly";
}
.cg-map { grid-area: map; }
.cg-side { grid-area: side; contain: size; min-height: 0; display: flex; flex-direction: column; gap: 8px; }
.cg-budget { grid-area: budget; }
.cg-tiles { grid-area: tiles; contain: size; min-height: 0; overflow: auto;
            grid-template-columns: repeat(2, minmax(0, 1fr)) !important; grid-auto-rows: 1fr; gap: 6px !important; }
.cg-monthly { grid-area: monthly; min-width: 0; display: flex; }
.cg-monthly > .card, .cg-monthly > .bslib-card { flex: 1; margin: 0; border: 1px solid var(--swd-line);
  border-radius: var(--swd-radius); box-shadow: var(--swd-shadow); overflow: hidden; }
.cg-monthly .card-header { padding: 0 8px; background: #fff; }
.cg-monthly .nav-link { font-size: 11px; padding: 7px 8px; }
.cg-monthly .card-body { padding: 4px 10px 6px; }
.swd-tab-note { font-size: 11px; margin-bottom: 0; }
@media (max-width: 1150px) {
  .swd-calc-grid { grid-template-columns: 1fr; grid-template-areas: "map" "side" "budget" "tiles" "monthly"; }
  .cg-side, .cg-tiles { contain: none; }
}
#plot4 { min-height: 300px; }

/* map card */
.swd-mapcard-title { padding: 6px 10px; font-size: 12px; min-height: 34px; }
.swd-float-layers { width: 176px; padding: 5px 8px 6px; top: 8px; right: 8px; border-radius: 10px; }
.swd-float-layers .swd-subhead { margin: 4px 0 1px; }
.swd-layer .checkbox, .swd-layer .form-check { margin: 0 !important; min-height: 0; }
.swd-layer label { font-size: 11px !important; }
.swd-legend { margin: 0 0 3px 20px; }
.swd-legend-row { font-size: 10px; padding: 0; }
.swd-swatch { width: 11px; height: 11px; flex-basis: 11px; border-radius: 3px; }

/* results column */
.swd-kpi-row { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; flex: 0 0 auto; }
.swd-pin-mini { display: flex; flex-direction: column; gap: 4px; justify-content: center; }
.swd-pin-mini .btn { padding: 3px 8px; font-size: 10.5px; white-space: nowrap; }
.cg-sa { flex: 1 1 auto; min-height: 0; }
.cg-sa .swd-card-body { overflow: auto; min-height: 0; }
#sa_view span { padding: 2px 8px; font-size: 10px; }

/* sustainable area summary - compact */
.swd-sa-head { gap: 5px; margin-bottom: 7px; }
.swd-sa-head > div { padding: 4px 7px; border-radius: 7px; }
.swd-sa-big { font-size: 14px; }
.swd-sa-stack { height: 16px; margin-bottom: 6px; border-radius: 5px; }
.swd-sa-seg span { font-size: 9px; }
.swd-sa-cols, .swd-sa-row { grid-template-columns: 10px minmax(64px, 1fr) minmax(28px, .7fr) 62px 90px; gap: 6px; }
.swd-sa-cols { font-size: 8.5px; padding: 0 2px 2px; }
.swd-sa-grp { margin: 4px 0 2px; padding: 2px 7px; font-size: 10px; }
.swd-sa-row { padding: 3px 2px; }
.swd-sa-name { font-size: 10.5px; }
.swd-sa-bar { height: 5px; }
.swd-sa-ha { font-size: 10.5px; }
.swd-sa-ha span { font-size: 8.5px; }
.swd-sa-yr { font-size: 10px; gap: 4px; }
@media (max-width: 1600px) { .swd-sa-head { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

/* water balance tiles - compact */
.swd-wbt { padding: 5px 8px 4px; gap: 1px; border-radius: 8px; box-shadow: none; min-height: 0; }
.swd-wbt:hover { transform: none; }
.swd-wbt-top { gap: 5px; }
.swd-wbt-ico { width: 18px; height: 18px; flex-basis: 18px; font-size: 8.5px; border-radius: 5px; }
.swd-wbt-lab { font-size: 10px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.swd-wbt-grp { font-size: 7.5px; padding: 1px 5px; }
.swd-wbt-val, .swd-wbt-val div { font-size: 11px !important; line-height: 1.2; }
.swd-wbt-spark { height: 24px; margin: 0 -2px; }
.swd-wbt-note { font-size: 8.5px; line-height: 1.2; }

/* =====================================================================
   DATA EXPLORE / VISUALIZER / COMPARE - compact
   ===================================================================== */
.swd-pixel-col { max-height: calc(100vh - 150px); overflow: auto; }
.swd-empty { min-height: 260px; padding: 1rem; }
.swd-empty-icon { width: 48px; height: 48px; font-size: 19px; margin-bottom: 8px; }
.swd-pixel-head { padding: 8px 10px 6px; }
.swd-pixel-card .nav-pills { margin: 0 10px; padding: 3px; }
.swd-pixel-card .nav-pills .nav-link, .swd-pixel-card .nav-pills .nav-link .panel-heading { font-size: 11px; padding: 4px 9px; }
.swd-pixel-card .tab-content { padding: 8px 10px 10px; }
.swd-pixel-status { padding: 7px 10px; }
.swd-status-badge { font-size: 11px; padding: 3px 9px; }
.swd-status-meta { font-size: 10.5px; }
.swd-status-text { font-size: 11px !important; margin-top: 5px; line-height: 1.45; }
.swd-mini-kpis { gap: 6px; margin-top: 8px; }
.swd-mini-kpi { padding: 5px 7px; gap: 6px; }
.swd-mini-ico { width: 22px; height: 22px; flex-basis: 22px; font-size: 10px; }
.swd-mini-val { font-size: 12.5px; }
.swd-rec-card { padding: 8px; }
.swd-rec-name { font-size: 12px; }
.swd-best { padding: 7px 12px; margin-bottom: 8px; }
.swd-best-ico { width: 30px; height: 30px; font-size: 13px; }
.swd-best-val { font-size: 14px; }
.swd-cal-bar { height: 36px; }
.swd-cal-m { padding: 5px 2px 4px; }

.swd-viz { grid-template-columns: 210px minmax(0, 1fr); gap: 10px; }
.swd-viz-menu { padding: 6px !important; top: 60px; }
.option-card { padding: 5px 7px !important; gap: 7px !important; }
.opt-num { width: 22px; height: 22px; flex-basis: 22px; font-size: 10px; }
.opt-title { font-size: 11.5px !important; }
.opt-desc { font-size: 9.5px; }
.swd-viz-main { padding: 10px !important; }
.swd-viz-content { gap: 8px; }
.swd-viz-hero { padding: 7px 10px; gap: 10px; border-radius: 10px; }
.swd-viz-hero-num { width: 32px; height: 32px; flex-basis: 32px; font-size: 12px; border-radius: 9px; }
.swd-viz-main .swd-viz-hero h3.swd-viz-title { font-size: 14px !important; }
.swd-viz-desc { font-size: 10.5px; }
.swd-viz-unit { font-size: 10px; padding: 3px 9px; }
.swd-vstat { padding: 5px 9px; border-radius: 8px; }
.swd-vstat-lab { font-size: 9.5px; }
.swd-vstat-val { font-size: 14px; }

.swd-cmp-step { padding: 7px 10px; }
.swd-srow { padding: 4px 4px; font-size: 11px; }
.swd-cmpk { padding: 8px 10px; gap: 5px; border-radius: 10px; }
.swd-cmpk-vals > div { font-size: 12.5px; }
.swd-cmpk-delta { font-size: 10px; padding: 2px 8px; }

/* =====================================================================
   SETTINGS DRAWER - compact
   ===================================================================== */
.swd-shell > .sidebar > .sidebar-content { padding: 10px 10px 0; gap: 6px; }
.sb-head { padding: 0 2px 8px; margin-bottom: 6px; }
.sb-head-icon { width: 28px; height: 28px; border-radius: 8px; font-size: 12px; }
.sb-head-title { font-size: 13px; }
.sb-head-sub { font-size: 9.5px; }
.sb-acc .accordion-item { margin-bottom: 6px; border-radius: 10px !important; }
.sb-acc .accordion-button { padding: 7px 10px; }
.sb-acc .accordion-body { padding: 8px 10px; }
.sb-step-num { width: 22px; height: 22px; flex-basis: 22px; font-size: 10.5px; }
.sb-step-name { font-size: 12px; }
.sb-step-sub { font-size: 9.5px; }
.sward-sidebar .control-label, .sward-sidebar label, .sb-label { font-size: 10.5px !important; margin-bottom: 2px; }
.sward-sidebar .shiny-input-container { margin-bottom: 6px; }
.sward-sidebar .form-control, .sward-sidebar .selectize-input { min-height: 28px; font-size: 11px !important; padding-top: 4px; padding-bottom: 4px; }
.sb-map { margin: 2px 0 6px; }
.sb-actions .btn { padding: 5px; font-size: 11.5px; }
.sb-pill { padding: 3px 9px; margin-bottom: 6px; font-size: 10.5px; }
.sb-kc-chip { padding: 4px 2px; font-size: 10px; }
.sb-param { padding: 4px 0; }
.sb-param-l { font-size: 11px; }
.sb-run { padding: 8px 0 10px; }
#run { padding: 8px; font-size: 12px; border-radius: 10px; }

/* #####################################################################
   V14 - DENSER TYPE + LESS EMPTY SPACE
   ##################################################################### */
body { font-size: 11.5px; }
.swd-shell .swd-card-title, .swd-shell .swd-card .card-title { font-size: 11px !important; }
.swd-card-head { padding: 4px 8px; min-height: 28px; }
.swd-card-icon { width: 18px; height: 18px; flex-basis: 18px; font-size: 9px; }
.swd-card-body { padding: 6px 8px; }
.swd-grid, .swd-strip, .swd-ov-row2, .swd-ov-row3, .swd-calc-grid { gap: 7px; }
.swd-page { gap: 7px; }
.swd-shell > .main > .row > .col-sm-10 { padding: 0 10px 6px; }
#ctx_bar { margin: 0 -10px 6px; }
.swd-ctx { padding: 3px 10px; }
.swd-subhead { font-size: 8.5px; margin: 4px 0 2px; }
.swd-footnote { font-size: 9px; padding: 3px 8px; }
.swd-about > summary { padding: 4px 8px; font-size: 10.5px; }
.swd-seg span, #sa_view span { padding: 1px 7px; font-size: 9.5px; }
.navbar-nav .nav-link { font-size: 11.5px; padding: .25rem .6rem !important; }

/* KPI */
.swd-kpi { padding: 5px 8px; gap: 7px; }
.swd-kpi-icon { width: 24px; height: 24px; flex-basis: 24px; font-size: 10.5px; }
.swd-kpi-label { font-size: 9px; }
.swd-kpi-value { font-size: 13px !important; }

/* map title bar with key numbers */
.swd-mapcard-title { flex-wrap: wrap; gap: 6px; padding: 4px 8px; font-size: 11px; min-height: 28px; }
.swd-map-stats { display: inline-flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }
.swd-ms { display: inline-flex; align-items: baseline; gap: 4px; padding: 1px 7px; border-radius: 999px;
          background: #F1F4F7; font-weight: 400; }
.swd-ms-l { font-size: 9px; color: var(--swd-muted); }
.swd-ms-v { font-size: 10.5px; font-weight: 700; color: var(--swd-ink); }
.swd-ms.good { background: #EAF3F1; } .swd-ms.good .swd-ms-v { color: #3F7F70; }
.swd-ms.bad  { background: #F7ECE9; } .swd-ms.bad  .swd-ms-v { color: #8A3A2C; }
.swd-float-layers { width: 160px; padding: 4px 7px; }
.swd-layer label { font-size: 10px !important; }
.swd-legend-row { font-size: 9px; }

/* sustainable area summary */
.swd-sa-big { font-size: 12.5px; }
.swd-sa-name, .swd-sa-ha { font-size: 9.5px; }
.swd-sa-yr { font-size: 9px; }
.swd-sa-grp { font-size: 9px; padding: 1px 6px; }
.swd-sa-row { padding: 2px; }
.swd-sa-cols { font-size: 7.5px; }

/* water balance tiles */
.swd-wbt { padding: 3px 6px; }
.swd-wbt-lab { font-size: 9px; }
.swd-wbt-val, .swd-wbt-val div { font-size: 10px !important; }
.swd-wbt-note { font-size: 7.5px; }
.swd-wbt-grp { display: none; }

/* overview */
.swd-ov-hero { padding: 6px 10px; gap: 10px; grid-template-columns: minmax(170px, .55fr) 3.4fr; }
.swd-ov-name { font-size: 15px !important; }
.swd-ov-stats-6 { grid-template-columns: repeat(8, minmax(0, 1fr)); }
.swd-ov-stat { padding: 1px 7px; gap: 5px; }
.swd-ov-stat-ico { width: 20px; height: 20px; flex-basis: 20px; font-size: 9px; }
.swd-ov-stat-lab { font-size: 8.5px; }
.swd-ov-stat-val, .swd-ov-stat-val div { font-size: 11px; }
@media (max-width: 1400px) { .swd-ov-stats-6 { grid-template-columns: repeat(4, minmax(0, 1fr)); row-gap: 4px; } }
.swd-ind-val { font-size: 11.5px; } .swd-ind-lab { font-size: 8.5px; } .swd-ind-note { font-size: 8px; }
.swd-ind { padding: 4px 6px; } .swd-ind-ico { width: 20px; height: 20px; flex-basis: 20px; }
.swd-ai-val { font-size: 12.5px; }
.swd-clim-m { font-size: 8.5px; padding: 2px 0; }
.swd-clim-legend, .swd-mix-legend { font-size: 8.5px; }
.swd-cl-val { font-size: 11.5px; }
.swd-crops .fund-title { font-size: 10px; }
.swd-crops .fund-meta, .swd-crops .amount-detail, .swd-crops .percentage { font-size: 9px; }
.swd-kf li { font-size: 10.5px; }

/* data explore placeholder now shows the area summary */
.swd-empty.swd-empty-info { min-height: 0; flex: 0 0 auto; align-items: stretch; justify-content: flex-start;
  text-align: left; padding: 8px 10px; border: 1px dashed #D3DCE3; background: #fff; }
.swd-empty-top { display: flex; gap: 10px; align-items: center; margin-bottom: 4px; }
.swd-empty-info .swd-empty-icon { width: 34px; height: 34px; font-size: 14px; margin: 0; flex: 0 0 34px; }
.swd-empty-info h4 { font-size: 12px !important; margin: 0; }
.swd-empty-info p { font-size: 10px; margin: 0; }

/* sidebar */
.sward-sidebar .control-label, .sward-sidebar label, .sb-label { font-size: 9.5px !important; }
.sward-sidebar .form-control, .sward-sidebar .selectize-input { font-size: 10.5px !important; min-height: 26px; }
.sb-step-name { font-size: 11px; } .sb-step-sub { font-size: 8.5px; }
