﻿@import url('https://fonts.googleapis.com/css2?family=DM+Sans:ital,opsz,wght@0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700&family=DM+Serif+Display&display=swap');
:root {
  /* --- Core brand palette --- */
  --eve-blue:        #009FDA;
  --eve-blue-light:  #33b8f0;
  --eve-navy:        #0e2433;
  --eve-navy-2:      #102a43;
  --eve-text:        #173247;
  --eve-text-muted:  #526b7c;
  --eve-bg:          #f6f9fc;
  --eve-bg-card:     #ffffff;
  --eve-border:      rgba(15, 42, 61, 0.13);
  --eve-shadow:      0 4px 16px rgba(15, 42, 61, 0.08);
  --eve-shadow-md:   0 8px 28px rgba(15, 42, 61, 0.11);
  --eve-radius:      7px;
  --eve-radius-lg:   14px;
  --eve-blue-subtle: #e6f6fc;
  --eve-blue-dark:   #007ab8;
  --eve-cropland:    #f0a500;
  --eve-population:  #3ba55c;
  --eve-exceptional: #d9480f;
  --eve-bg-soft:     #fefeff;
  --eve-amber-soft:  #fff4e0;
  --eve-amber-text:  #8a5a00;
  --eve-blue-hover:  #ccedfa;
  --app-header-height: 58px;
  --app-filter-panel-width: 340px;
  --eve-radius-sm: 6px;
  --eve-gap-sm: 12px;
  --eve-gap: 16px;
  --eve-shadow-subtle: 0 8px 22px rgba(15, 42, 61, 0.08);
  --eve-shadow-panel: 0 14px 34px rgba(15, 42, 61, 0.12);
  --eve-accent: var(--eve-blue);

  /* --- Semantic text scale --- */
  --eve-text-00: #0c1e2e;
  --eve-text-10: #173247;
  --eve-text-20: #244156;
  --eve-text-30: #334e68;
  --eve-text-40: #4f697a;
  --eve-text-50: #607584;
  --eve-text-60: #8a949e;
  --eve-text-70: #aaaaaa;

  /* --- Semantic surface scale --- */
  --eve-bg-00: #f6f9fc;
  --eve-bg-10: #eef2f6;
  --eve-bg-20: #dfe8ef;

  /* --- Semantic border scale --- */
  --eve-border-10: #e0e4e8;
  --eve-border-20: #c4d3df;
  --eve-border-30: #9db4c8;

  /* --- Data / chart palette --- */
  --eve-data-blue:         #009FDA;
  --eve-data-blue-mid:     #2ca7de;
  --eve-data-blue-light:   #57c1f5;
  --eve-data-blue-deep:    #075f85;
  --eve-data-teal:         #37536b;
  --eve-data-amber:        #c8921a;
  --eve-data-amber-light:  #f2c35c;
  --eve-data-amber-bright: #ffd166;
  --eve-data-red:          #d63f3f;
  --eve-data-red-light:    #ff8a8a;
  --eve-data-green:        #74b857;

  /* --- Legacy ad-hoc variables mapped to semantic tokens --- */
  --eve-color-0588c9: var(--eve-data-blue);
  --eve-color-075f85: var(--eve-data-blue-deep);
  --eve-color-0a56df: var(--eve-blue);
  --eve-color-0b1f33: var(--eve-text-00);
  --eve-color-0b79a7: var(--eve-data-blue);
  --eve-color-0d2a3b: var(--eve-text-00);
  --eve-color-0f3043: var(--eve-text-00);
  --eve-color-0f3f76: var(--eve-data-blue-deep);
  --eve-color-12344d: var(--eve-text-10);
  --eve-color-133247: var(--eve-text-10);
  --eve-color-143247: var(--eve-text-10);
  --eve-color-153244: var(--eve-text-10);
  --eve-color-153447: var(--eve-text-10);
  --eve-color-163246: var(--eve-text-10);
  --eve-color-163547: var(--eve-text-10);
  --eve-color-17354a: var(--eve-text-10);
  --eve-color-186aff: var(--eve-blue);
  --eve-color-193548: var(--eve-text-20);
  --eve-color-1b3a4b: var(--eve-text-20);
  --eve-color-1f3442: var(--eve-text-20);
  --eve-color-1f4258: var(--eve-text-20);
  --eve-color-234258: var(--eve-text-20);
  --eve-color-244156: var(--eve-text-20);
  --eve-color-2563eb: var(--eve-blue);
  --eve-color-263238: var(--eve-text-30);
  --eve-color-26445a: var(--eve-text-20);
  --eve-color-274257: var(--eve-text-20);
  --eve-color-274459: var(--eve-text-20);
  --eve-color-27465c: var(--eve-text-20);
  --eve-color-28465b: var(--eve-text-20);
  --eve-color-28485a: var(--eve-text-20);
  --eve-color-284b63: var(--eve-text-30);
  --eve-color-2a4759: var(--eve-text-30);
  --eve-color-2b4658: var(--eve-text-20);
  --eve-color-2c8fbc: var(--eve-data-blue-mid);
  --eve-color-2ca7de: var(--eve-data-blue-mid);
  --eve-color-2f3a45: var(--eve-text-30);
  --eve-color-31495d: var(--eve-text-30);
  --eve-color-314b5f: var(--eve-text-30);
  --eve-color-334155: var(--eve-text-30);
  --eve-color-334e68: var(--eve-text-30);
  --eve-color-37536b: var(--eve-data-teal);
  --eve-color-3e4c59: var(--eve-text-30);
  --eve-color-3f5b6e: var(--eve-text-40);
  --eve-color-405a6b: var(--eve-text-40);
  --eve-color-43586a: var(--eve-text-40);
  --eve-color-466173: var(--eve-text-40);
  --eve-color-476173: var(--eve-text-40);
  --eve-color-4f697a: var(--eve-text-40);
  --eve-color-4fc3f7: var(--eve-data-blue-light);
  --eve-color-546e7a: var(--eve-text-40);
  --eve-color-555: #555;
  --eve-color-557082: var(--eve-text-40);
  --eve-color-57c1f5: var(--eve-data-blue-light);
  --eve-color-587082: var(--eve-text-40);
  --eve-color-5a7385: var(--eve-text-50);
  --eve-color-5b7080: var(--eve-text-40);
  --eve-color-5b7285: var(--eve-text-50);
  --eve-color-5d7486: var(--eve-text-50);
  --eve-color-5f7483: var(--eve-text-50);
  --eve-color-607584: var(--eve-text-50);
  --eve-color-647b8c: var(--eve-text-50);
  --eve-color-6a7f8e: var(--eve-text-50);
  --eve-color-6b7e8c: var(--eve-text-50);
  --eve-color-73839c: var(--eve-text-60);
  --eve-color-74b857: var(--eve-data-green);
  --eve-color-7d8a96: var(--eve-text-60);
  --eve-color-7eb8dc: var(--eve-data-blue-light);
  --eve-color-888888: var(--eve-text-70);
  --eve-color-8a949e: var(--eve-text-60);
  --eve-color-9db4c8: var(--eve-border-30);
  --eve-color-aaaaaa: var(--eve-text-70);
  --eve-color-b5841f: var(--eve-data-amber);
  --eve-color-b9c0c6: var(--eve-border-20);
  --eve-color-bfd0dd: var(--eve-border-20);
  --eve-color-c23636: var(--eve-data-red);
  --eve-color-c4ccd8: var(--eve-border-20);
  --eve-color-c4d3df: var(--eve-border-20);
  --eve-color-c58a00: var(--eve-data-amber);
  --eve-color-c5d5e3: var(--eve-border-20);
  --eve-color-c8921a: var(--eve-data-amber);
  --eve-color-c96b3c: var(--eve-data-amber);
  --eve-color-cccccc: var(--eve-border-20);
  --eve-color-d63f3f: var(--eve-data-red);
  --eve-color-d6dce2: var(--eve-border-10);
  --eve-color-d8e0e7: var(--eve-border-10);
  --eve-color-d8e4ec: var(--eve-border-10);
  --eve-color-d94841: var(--eve-data-red);
  --eve-color-d9a441: var(--eve-data-amber-light);
  --eve-color-dfe8ef: var(--eve-bg-20);
  --eve-color-e0e4e8: var(--eve-border-10);
  --eve-color-e1e6eb: var(--eve-border-10);
  --eve-color-e7eef6: var(--eve-bg-10);
  --eve-color-e8eef3: var(--eve-bg-10);
  --eve-color-eaf2fa: var(--eve-bg-10);
  --eve-color-eeeeee: var(--eve-border-10);
  --eve-color-eef2f6: var(--eve-bg-10);
  --eve-color-eef4f9: var(--eve-bg-10);
  --eve-color-eef4ff: var(--eve-bg-10);
  --eve-color-eef7fc: var(--eve-bg-10);
  --eve-color-f2c35c: var(--eve-data-amber-light);
  --eve-color-f4f8fb: var(--eve-bg-00);
  --eve-color-f59e0b: var(--eve-data-amber-light);
  --eve-color-f5f9fc: var(--eve-bg-00);
  --eve-color-f5f9fd: var(--eve-bg-00);
  --eve-color-f7f8fa: var(--eve-bg-00);
  --eve-color-f7fafc: var(--eve-bg-00);
  --eve-color-f8fafc: var(--eve-bg-00);
  --eve-color-f9fafb: var(--eve-bg-00);
  --eve-color-f9fbfd: var(--eve-bg-00);
  --eve-color-fbfdff: var(--eve-bg-00);
  --eve-color-ff8a8a: var(--eve-data-red-light);
  --eve-color-ffd166: var(--eve-data-amber-bright);
}

/* ============================================================
   EVE ANIMATION SYSTEM — global keyframes
   ============================================================ */

@keyframes eve-fade-up {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes eve-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes eve-bar-fill {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

@keyframes eve-shimmer {
  from { background-position: -400px 0; }
  to   { background-position: 400px 0; }
}

@keyframes eve-scale-in {
  from { opacity: 0; transform: scale(0.94); }
  to   { opacity: 1; transform: scale(1); }
}

html, body {
  height: 100%;
  width: 100%;
  margin: 0;
  padding: 0;
}

body,
#appShell {
  margin: 0;
  padding: 0;
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 13.5px;
  color: var(--eve-text);
  background: var(--eve-bg);
  -webkit-font-smoothing: antialiased;
}

* {
  box-sizing: border-box;
}

*:focus {
  outline: none;
}

*:focus-visible {
  box-shadow: 0 0 0 3px rgba(0, 159, 218, 0.2);
}

#viewDiv {
  height: 100%;
  width: 100%;
}

#seasonalityEmptyState {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  box-sizing: border-box;
  background:
    radial-gradient(circle at top, rgba(230, 238, 243, 0.95), rgba(247, 250, 252, 0.98) 58%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 244, 247, 0.96));
  text-align: center;
}

#seasonalityEmptyState[hidden] {
  display: none !important;
}

#seasonalityEmptyState p {
  margin: 0;
  max-width: 560px;
  color: var(--eve-color-284b63);
  font-size: 24px;
  line-height: 1.35;
  font-weight: 700;
}

#localisationEmptyState {
  position: absolute;
  inset: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px;
  box-sizing: border-box;
  background:
    radial-gradient(circle at top, rgba(230, 238, 243, 0.95), rgba(247, 250, 252, 0.98) 58%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(239, 244, 247, 0.96));
  text-align: center;
}

#localisationEmptyState[hidden] {
  display: none !important;
}

#localisationEmptyState p {
  margin: 0;
  max-width: 760px;
  color: var(--eve-color-284b63);
  font-size: 22px;
  line-height: 1.45;
  font-weight: 700;
  white-space: pre-line;
}

#mainWindow {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#modeContent {
  position: absolute;
  inset: 0 0 54px 0;
  overflow: hidden;
  --mode-title-bar-height: 0px;
  --mode-panel-gutter: 8px;
  --mode-left-panel-width: 380px;
  --impact-panel-width: var(--app-filter-panel-width);
  --impact-panel-expanded-width: calc(var(--impact-panel-width) + 312px);
  --time-panel-height: 340px;
  --seasonality-calendar-height: 390px;
  --localisation-panel-width: 50%;
  --overview-summary-height: 132px;
  --overview-left-width: var(--app-filter-panel-width);
}

#modeTitleBar {
  display: none !important;
}

#modeTitleBar[hidden] {
  display: none !important;
}

#localisationSplash {
  position: absolute;
  inset: 0;
  z-index: 11;
}

#localisationSplash[hidden] {
  display: none !important;
}

.localisation-splash-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 21, 30, 0.44);
}

.localisation-splash-card {
  position: absolute;
  top: calc(var(--mode-title-bar-height) + 18px);
  left: 50%;
  transform: translateX(-50%);
  width: min(760px, calc(100% - 28px));
  max-height: calc(100% - var(--mode-title-bar-height) - 34px);
  overflow: auto;
  background:
    radial-gradient(circle at top right, rgba(233, 244, 250, 0.95), rgba(255, 255, 255, 0.98) 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(246, 250, 252, 0.98));
  border: 1px solid rgba(15, 42, 61, 0.14);
  border-radius: 18px;
  box-shadow: 0 22px 54px rgba(15, 23, 42, 0.28);
  padding: 18px 18px 16px;
  box-sizing: border-box;
}

.localisation-splash-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.localisation-splash-head h2 {
  margin: 0;
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.15;
  color: var(--eve-color-0f3043);
}

.localisation-splash-close {
  border: 1px solid rgba(15, 42, 61, 0.16);
  background: var(--eve-bg-card);
  color: var(--eve-color-244156);
  border-radius: 999px;
  padding: 8px 14px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}

.localisation-splash-close:hover {
  border-color: rgba(0, 159, 218, 0.42);
  color: var(--eve-blue);
}

.localisation-splash-body {
  color: var(--eve-color-28485a);
  font-size: 14px;
  line-height: 1.58;
}

.localisation-splash-body p {
  margin: 0 0 12px;
}

.localisation-splash-body a {
  color: var(--eve-blue);
  font-weight: 700;
}

.localisation-splash-section {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(15, 42, 61, 0.09);
}

.localisation-splash-section h3 {
  margin: 0 0 8px;
  font-size: 16px;
  color: var(--eve-color-12344d);
}

.localisation-splash-option {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  margin-top: 14px;
  color: var(--eve-color-3f5b6e);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.localisation-splash-option input {
  width: 16px;
  height: 16px;
}

#widget-filters #impactMappingSection {
  margin-top: var(--eve-gap-sm);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--eve-border);
  border-radius: var(--eve-radius);
  padding: 12px;
  box-shadow: var(--eve-shadow-subtle);
}

#widget-filters #impactMappingSection calcite-label {
  margin: 0 0 var(--eve-gap-sm) 0;
}

#widget-filters #impactMappingSection .impact-unit-control {
  display: block;
  width: 100%;
  max-width: 100%;
}

#widget-filters #mappingModeCtrl {
  display: block;
  width: 100%;
}

#widget-filters #mappingModeCtrl calcite-segmented-control-item {
  min-height: 38px;
  font-weight: 700;
}

#widget-filters #advancedMappingSection {
  margin: 4px 0 var(--eve-gap-sm);
  padding: 10px 10px 2px;
  background: rgba(244, 248, 252, 0.9);
  border: 1px solid rgba(159, 181, 198, 0.45);
  border-radius: var(--eve-radius);
}

#widget-filters #advancedMappingSection[hidden] {
  display: none !important;
}

#widget-filters #timeAnimationSection {
  margin-top: var(--eve-gap-sm);
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid var(--eve-border);
  border-radius: var(--eve-radius);
  padding: 12px;
  box-shadow: var(--eve-shadow-subtle);
}

#widget-filters #timeAnimationSection calcite-label {
  margin: 0 0 var(--eve-gap-sm) 0;
}

#widget-filters #timeAnimationSection.time-animation-internal {
  display: none !important;
}

#widget-filters #periodPicker {
  margin-top: 10px;
  max-height: 134px;
  overflow: auto;
  display: grid;
  gap: 8px;
  padding: 8px;
  border: 1px solid rgba(159, 181, 198, 0.46);
  border-radius: var(--eve-radius);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(244, 248, 252, 0.98));
}

#widget-filters #periodPicker.is-disabled {
  opacity: 0.72;
}

#widget-filters .period-picker-empty {
  padding: 10px 8px;
  color: var(--eve-color-5b7080);
  font-size: 12px;
}

#widget-filters .period-month-card {
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-width: 0;
  border: 1px solid rgba(194, 210, 223, 0.82);
  border-radius: var(--eve-radius);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 251, 253, 0.98));
  padding: 8px 10px;
  box-shadow: 0 3px 10px rgba(15, 42, 61, 0.06);
}

#widget-filters .period-month-label {
  color: var(--eve-text);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  line-height: 1.15;
  text-transform: uppercase;
}

#widget-filters .period-chip-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  min-width: 0;
}

#widget-filters .period-chip {
  min-width: 0;
  border: 1px solid var(--eve-color-c5d5e3);
  border-radius: var(--eve-radius);
  background: linear-gradient(180deg, var(--eve-bg-card), var(--eve-color-f5f9fc));
  color: var(--eve-color-26445a);
  padding: 7px 0;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease, transform 120ms ease, box-shadow 120ms ease;
}

#widget-filters .period-chip:hover {
  border-color: var(--eve-color-7eb8dc);
  background: var(--eve-color-eef7fc);
  color: var(--eve-color-12344d);
  transform: translateY(-1px);
  box-shadow: 0 4px 10px rgba(44, 167, 222, 0.12);
}

#widget-filters .period-chip.is-active {
  border-color: var(--eve-blue);
  background: linear-gradient(180deg, var(--eve-blue-light), var(--eve-blue));
  color: var(--eve-bg-card);
  box-shadow: 0 7px 16px rgba(0, 159, 218, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.time-animation-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-top: 4px;
}

.time-animation-btn {
  border: 1px solid var(--eve-color-9db4c8);
  border-radius: 8px;
  padding: 7px 8px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
}

.time-animation-btn.start {
  border-color: var(--eve-blue);
  background: var(--eve-blue);
  color: var(--eve-bg-card);
}

.time-animation-btn.stop {
  background: var(--eve-bg-card);
  color: var(--eve-color-234258);
}

.time-animation-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.localisation-mask-btn {
  width: 100%;
  border: 1px solid var(--eve-blue);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--eve-bg-card);
  color: var(--eve-color-0f3f76);
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.localisation-mask-btn.active {
  background: var(--eve-blue);
  color: var(--eve-bg-card);
  box-shadow: 0 6px 14px rgba(0, 159, 218, 0.20);
}

.localisation-mask-btn:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

#timeAnalysisMode {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--time-panel-height);
  z-index: 4;
  background: var(--eve-color-f9fafb);
  border-top: 1px solid var(--eve-color-e0e4e8);
  box-shadow: 0 -6px 18px rgba(15, 42, 61, 0.10);
  padding: 12px 16px 16px;
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#timeAnalysisMode[hidden] {
  display: none !important;
}

#livestockMode {
  position: absolute;
  left: 0;
  top: var(--mode-title-bar-height);
  bottom: 0;
  width: var(--impact-panel-width);
  z-index: 3;
  background: rgba(251, 253, 255, 0.98);
  border: 1px solid rgba(15, 42, 61, 0.14);
  border-left: 0;
  border-bottom: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 14px;
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  backdrop-filter: blur(4px);
}

#modeContent[data-active-mode="impact-analysis"] #livestockMode {
  width: var(--impact-panel-width);
  overflow: hidden;
}

#modeContent[data-active-mode="impact-analysis"][data-breakdown-open="1"] #livestockMode {
  width: var(--impact-panel-expanded-width);
}

#livestockMode[hidden] {
  display: none !important;
}

#exposureModelMode {
  position: absolute;
  inset: 0 auto 0 0;
  z-index: 4;
  width: min(430px, 42vw);
  background: rgba(248, 251, 253, 0.98);
  border-right: 1px solid var(--eve-border-10);
  box-shadow: 8px 0 24px rgba(15, 42, 61, 0.1);
  overflow: hidden;
}

#exposureModelMode[hidden] {
  display: none !important;
}

#modeContent[data-active-mode="exposure-model"] #viewDiv {
  position: absolute;
  inset: 0 0 0 min(430px, 42vw);
  width: auto;
  height: auto;
}

#exposureModelMode .em-shell {
  height: 100%;
  display: flex;
  flex-direction: column;
  color: var(--eve-text-20);
}

/* The panel opens like every other docked panel (reference: .ls-head /
   .ls-subhead in Mapping), not with a brand masthead. The gradient, the white
   text and the DM Serif Display heading were the mode's strongest "different
   app" signal: no sibling panel uses a serif heading, and the only gradient
   masthead in EVE belongs to the sidebar header. */
#exposureModelMode .em-header {
  flex: 0 0 auto;
  padding: 14px 14px 12px;
  border-bottom: 1px solid var(--eve-border-10);
  color: var(--eve-text);
}

#exposureModelMode .em-eyebrow {
  margin: 0 0 4px;
  color: var(--eve-text-50);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#exposureModelMode .em-header h2 {
  margin: 0;
  font-size: 20px;
  font-weight: 700;
  line-height: 1.2;
}

#exposureModelMode .em-header p:last-child {
  margin: 6px 0 0;
  max-width: 380px;
  color: var(--eve-text-40);
  font-size: 12px;
  line-height: 1.4;
}

#exposureModelMode .em-scroll {
  min-height: 0;
  overflow-y: auto;
  padding: 12px;
}

#exposureModelMode .em-method,
#exposureModelMode .em-static-note,
#exposureModelMode .em-controls,
#exposureModelMode .em-layers,
#exposureModelMode .em-comparison,
#exposureModelMode .em-ranking,
#exposureModelMode .em-footer {
  margin-bottom: 10px;
  border: 1px solid var(--eve-border-10);
  border-radius: var(--eve-radius);
  background: var(--eve-bg-card);
  box-shadow: var(--eve-shadow-subtle);
}

#exposureModelMode .em-method {
  padding: 10px 12px;
  border-left: 4px solid var(--eve-data-amber);
}

#exposureModelMode .em-method strong,
#exposureModelMode .em-method span {
  display: block;
}

#exposureModelMode .em-static-note {
  padding: 11px 12px;
  border-left: 4px solid var(--eve-data-red);
  background: color-mix(in srgb, var(--eve-data-red) 5%, white);
}

#exposureModelMode .em-static-note strong,
#exposureModelMode .em-static-note p,
#exposureModelMode .em-static-note small {
  display: block;
}

#exposureModelMode .em-static-note strong {
  color: var(--eve-text-10);
  font-size: 13px;
  font-weight: 700;
}

#exposureModelMode .em-static-note p {
  margin: 5px 0;
  color: var(--eve-text-30);
  font-size: 12px;
  line-height: 1.5;
}

#exposureModelMode .em-static-note small {
  color: var(--eve-text-50);
  font-size: 11px;
  line-height: 1.5;
}

#exposureModelMode .em-method strong {
  color: var(--eve-text-10);
  font-size: 13px;
  font-weight: 700;
}

#exposureModelMode .em-method span {
  margin-top: 4px;
  color: var(--eve-text-40);
  font-size: 12px;
  line-height: 1.5;
}

#exposureModelMode .em-source-links,
#exposureModelMode .em-chart-source-links {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 10px;
  margin-top: 7px;
}

#exposureModelMode .em-source-links a,
#exposureModelMode .em-chart-source-links a {
  color: var(--eve-blue);
  font-size: 12px;
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

#exposureModelMode .em-summary {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}

/* Reference: .ls-card (+ -title / -value / -sub) in Mapping. The coloured top
   rule is kept, and is house vocabulary for a KPI card (.ov-card carries one
   too); it is the only distinction between the population and cropland cards. */
#exposureModelMode .em-summary article {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid var(--eve-border);
  border-top: 3px solid var(--eve-data-blue);
  border-radius: 10px;
  background: var(--eve-bg-card);
}

#exposureModelMode .em-summary article:nth-child(2) {
  border-top-color: var(--eve-data-amber);
}

#exposureModelMode .em-summary span,
#exposureModelMode .em-summary small {
  display: block;
  color: var(--eve-text-40);
  font-size: 12px;
}

#exposureModelMode .em-summary small {
  margin-top: 4px;
  color: var(--eve-text-50);
}

#exposureModelMode .em-summary strong {
  display: block;
  margin: 6px 0 0;
  color: var(--eve-text-10);
  font-size: 18px;
  font-weight: 800;
  line-height: 1.15;
}

#exposureModelMode .em-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  padding: 10px;
}

#exposureModelMode .em-controls label,
#exposureModelMode .em-slider {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--eve-text-40);
  font-size: 12px;
  font-weight: 700;
}

/* Kept as a native <select> deliberately: swapping it for calcite-select
   changes the element model (event propagation, .value after re-render, option
   markup, upgrade timing) and belongs to its own change. These metrics
   approximate the sidebar's calcite-select; measure it in a browser and adjust
   here if it is off. */
#exposureModelMode select {
  width: 100%;
  min-width: 0;
  height: 32px;
  padding: 0 8px;
  border: 1px solid var(--eve-border-20);
  border-radius: var(--eve-radius);
  background: var(--eve-bg-card);
  color: var(--eve-text-20);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: border-color 120ms ease;
}

#exposureModelMode select:hover {
  border-color: var(--eve-blue-light);
}

#exposureModelMode .em-layers {
  padding: 0 11px 10px;
}

#exposureModelMode .em-layers summary {
  padding: 11px 0;
  color: var(--eve-text);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
}

#exposureModelMode .em-layer-hint {
  margin: -2px 0 9px;
  color: var(--eve-text-40);
  font-size: 12px;
  line-height: 1.5;
}

#exposureModelMode .em-opacity-list {
  display: grid;
  gap: 8px;
}

#exposureModelMode .em-slider {
  grid-template-columns: minmax(0, 1fr) 105px 34px;
  align-items: center;
  margin: 0;
}

/* Matched to the app's only other slider, #widget-filters input[type="range"]:
   4 px track, 14 px thumb, --eve-border track, --eve-bg-card thumb ring. The
   two declarations are deliberately not merged into one shared class here —
   hoisting one would change the sidebar's controls, which is a separate change. */
#exposureModelMode .em-slider input {
  appearance: none;
  width: 100%;
  height: 16px;
  margin: 0;
  background: transparent;
  accent-color: var(--eve-blue);
  cursor: pointer;
}

#exposureModelMode .em-slider input::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: var(--eve-border);
}

#exposureModelMode .em-slider input::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  margin-top: -5px;
  appearance: none;
  border: 2px solid var(--eve-bg-card);
  border-radius: 50%;
  background: var(--eve-blue);
  box-shadow: 0 1px 4px rgba(15, 42, 61, 0.18);
  cursor: pointer;
}

#exposureModelMode .em-slider input::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: var(--eve-border);
}

#exposureModelMode .em-slider input::-moz-range-progress {
  height: 4px;
  border-radius: 2px;
  background: var(--eve-blue);
}

#exposureModelMode .em-slider input::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border: 2px solid var(--eve-bg-card);
  border-radius: 50%;
  background: var(--eve-blue);
  box-shadow: 0 1px 4px rgba(15, 42, 61, 0.18);
  cursor: pointer;
}

#exposureModelMode .em-slider input:disabled {
  opacity: 0.42;
}

#exposureModelMode .em-observed-slider {
  margin-bottom: 3px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--eve-border-10);
  color: var(--eve-blue-dark);
}

#exposureModelMode .em-slider output {
  text-align: right;
  color: var(--eve-text-30);
  font-size: 12px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

#exposureModelMode .em-comparison,
#exposureModelMode .em-ranking {
  padding: 10px;
}

#exposureModelMode .em-section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

#exposureModelMode .em-section-head h3 {
  margin: 0;
  color: var(--eve-text);
  font-size: 14px;
  font-weight: 700;
}

#exposureModelMode .em-section-head span {
  color: var(--eve-text-50);
  font-size: 12px;
}

/* Reference: .eve-action-btn. These three had no hover, focus-visible,
   disabled or transition state at all, which is most of what made them read as
   foreign controls. */
#exposureModelMode .em-section-head button,
#exposureModelMode .em-compare-btn,
#exposureModelMode .em-chart-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 10px;
  border: 1px solid var(--eve-border);
  border-radius: var(--eve-radius);
  background: var(--eve-bg-card);
  color: var(--eve-blue);
  font-family: inherit;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease;
}

#exposureModelMode .em-section-head button {
  min-height: 30px;
}

#exposureModelMode .em-section-head button:hover,
#exposureModelMode .em-compare-btn:hover,
#exposureModelMode .em-chart-btn:hover {
  background: var(--eve-blue-subtle);
  border-color: var(--eve-blue-light);
}

#exposureModelMode .em-section-head button:disabled,
#exposureModelMode .em-compare-btn:disabled,
#exposureModelMode .em-chart-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#exposureModelMode .em-section-head > div:last-child {
  display: flex;
  gap: 4px;
}

#exposureModelMode .em-detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

#exposureModelMode .em-detail-card {
  min-width: 0;
  padding: 8px;
  border: 1px solid var(--eve-border-10);
  border-radius: var(--eve-radius-sm);
  background: var(--eve-bg-00);
}

#exposureModelMode .em-detail-card.compare {
  border-color: rgba(200, 146, 26, 0.45);
}

#exposureModelMode .em-detail-card-head span,
#exposureModelMode .em-detail-card-head strong {
  display: block;
}

#exposureModelMode .em-detail-card-head span {
  color: var(--eve-text-50);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#exposureModelMode .em-detail-card-head strong {
  overflow: hidden;
  margin-top: 3px;
  color: var(--eve-text-10);
  font-size: 13px;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#exposureModelMode .em-detail-card dl {
  margin: 8px 0 0;
}

#exposureModelMode .em-detail-card dl div {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  margin-top: 5px;
  font-size: 12px;
}

#exposureModelMode .em-detail-card dt {
  color: var(--eve-text-50);
}

#exposureModelMode .em-detail-card dd {
  margin: 0;
  color: var(--eve-text-20);
  font-weight: 800;
}

#exposureModelMode .em-compare-hint,
#exposureModelMode .em-difference {
  margin: 8px 0 0;
  color: var(--eve-text-50);
  font-size: 12px;
  line-height: 1.5;
}

#exposureModelMode .em-difference strong {
  color: var(--eve-text);
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}

#exposureModelMode .em-difference {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 5px 10px;
}

#exposureModelMode .em-rank-list {
  display: grid;
  gap: 0;
  max-height: 420px;
  overflow-y: auto;
}

#exposureModelMode .em-ranking-sort {
  display: grid;
  grid-template-columns: auto minmax(150px, 1fr);
  align-items: center;
  gap: 8px;
  margin: 0 0 8px;
  color: var(--eve-text-40);
  font-size: 12px;
  font-weight: 700;
}

/* Reference: .ls-breakdown-row. Rows are separated by a rule rather than by
   zebra striping, which nothing else in the app uses. */
#exposureModelMode .em-rank-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 62px 32px;
  align-items: center;
  gap: 4px;
  border-bottom: 1px solid rgba(15, 42, 61, 0.08);
}

#exposureModelMode .em-rank-row:last-child {
  border-bottom: 0;
}

#exposureModelMode .em-rank-main {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  align-items: center;
  gap: 6px;
  min-width: 0;
  border: 1px solid transparent;
  border-radius: var(--eve-radius-sm);
  background: transparent;
  min-height: 36px;
  padding: 6px 7px;
  color: var(--eve-text-20);
  cursor: pointer;
}

#exposureModelMode .em-rank-main:hover,
#exposureModelMode .em-rank-row.selected .em-rank-main {
  border-color: rgba(0, 159, 218, 0.48);
  background: var(--eve-blue-subtle);
}

#exposureModelMode .em-rank-row.compared .em-rank-main {
  border-color: rgba(200, 146, 26, 0.55);
}

#exposureModelMode .em-rank-number {
  color: var(--eve-text-40);
  font-size: 12px;
  font-weight: 800;
  text-align: center;
}

#exposureModelMode .em-rank-name {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border-radius: 8px;
  padding: 6px 8px;
  color: var(--eve-text-20);
  font-size: 13px;
  font-weight: 700;
  text-align: left;
  white-space: nowrap;
}

#exposureModelMode .em-rank-name > span:last-child {
  position: relative;
  z-index: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.66);
}

#exposureModelMode .em-rank-bar {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: 8px;
  background: rgba(44, 167, 222, 0.24);
}

#exposureModelMode .em-rank-main strong {
  color: var(--eve-text);
  font-size: 13px;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  text-align: right;
  white-space: nowrap;
}

#exposureModelMode .em-compare-btn,
#exposureModelMode .em-chart-btn {
  min-height: 30px;
}

#exposureModelMode .em-chart-btn {
  padding: 0 6px;
}

#exposureModelMode .em-compare-btn {
  padding: 0;
}

#exposureModelMode .em-chart-dialog {
  position: fixed;
  inset: 0;
  z-index: 8800;
  display: grid;
  place-items: center;
  padding: 24px;
}

#exposureModelMode .em-chart-backdrop {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  background: rgba(10, 30, 50, 0.52);
  cursor: default;
}

#exposureModelMode .em-chart-sheet {
  position: relative;
  width: min(1120px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  border-radius: 10px;
  background: var(--eve-bg-card);
  box-shadow: 0 22px 60px rgba(10, 30, 50, 0.28);
}

/* Reference: .localisation-splash-head — the app's modal header is the title and
   a close control on the sheet surface. The serif title is house-consistent
   here (.localisation-splash-head h2 is DM Serif Display); it was the FAO-logo
   report masthead, not the typeface, that made this read as a generated report. */
#exposureModelMode .em-chart-sheet > header {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px 12px;
  border-bottom: 1px solid var(--eve-border-10);
  background: var(--eve-bg-card);
}

#exposureModelMode .em-chart-sheet header h3 {
  margin: 0;
  color: var(--eve-color-0f3043);
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.15;
}

#exposureModelMode .em-chart-sheet header button {
  flex: 0 0 auto;
  min-width: 32px;
  height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(15, 42, 61, 0.16);
  border-radius: 999px;
  background: var(--eve-bg-card);
  color: var(--eve-text-20);
  font-family: inherit;
  font-size: 18px;
  line-height: 1;
  cursor: pointer;
  transition: border-color 120ms ease, color 120ms ease;
}

#exposureModelMode .em-chart-sheet header button:hover {
  border-color: rgba(0, 159, 218, 0.42);
  color: var(--eve-blue);
}

#exposureModelMode .em-chart-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  padding: 0 18px 20px;
}

#exposureModelMode .em-chart-intro {
  padding: 14px 18px 6px;
}

#exposureModelMode .em-chart-intro > p {
  margin: 0 0 5px;
  color: var(--eve-text-50);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

#exposureModelMode .em-chart-intro > span {
  display: block;
  color: var(--eve-text-40);
  font-size: 12px;
  line-height: 1.5;
}

#exposureModelMode .em-chart-card {
  position: relative;
  min-width: 0;
  padding: 18px 20px 14px;
  border: 1px solid var(--eve-border-10);
  border-radius: var(--eve-radius);
  background: var(--eve-bg-00);
}

#exposureModelMode .em-chart-card h4 {
  margin: 0;
  color: var(--eve-text);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.35;
  text-align: center;
}

#exposureModelMode .em-chart-summary {
  margin: 6px 0 9px;
  color: var(--eve-text-30);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  text-align: center;
}

#exposureModelMode .em-chart-legend {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 6px 16px;
  margin-bottom: 5px;
  color: var(--eve-text-50);
  font-size: 11px;
}

#exposureModelMode .em-chart-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

#exposureModelMode .em-chart-legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--eve-text-50);
}

#exposureModelMode .em-chart-legend i.selected {
  width: 10px;
  height: 10px;
  border: 2px solid var(--eve-text-10);
  background: var(--eve-data-red);
}

#exposureModelMode .em-chart-legend small {
  flex-basis: 100%;
  color: var(--eve-text-50);
  font-size: 11px;
  text-align: center;
}

#exposureModelMode .em-chart-plot {
  position: relative;
}

#exposureModelMode .em-chart-card svg {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}

#exposureModelMode .em-chart-card svg text {
  fill: var(--eve-text-50);
  font-family: "DM Sans", sans-serif;
  font-size: 11px;
}

#exposureModelMode .em-chart-card svg text.em-chart-axis-title {
  fill: var(--eve-text-30);
  font-size: 11px;
  font-weight: 700;
}

#exposureModelMode .em-chart-guide {
  stroke: var(--eve-border-10);
  stroke-width: 1;
}

#exposureModelMode .em-chart-axis {
  stroke: var(--eve-text-60);
  stroke-width: 1;
}

#exposureModelMode .em-chart-rank-line {
  fill: none;
  stroke: var(--eve-text-50);
  stroke-width: 2;
  opacity: 0.52;
}

#exposureModelMode .em-chart-card circle {
  fill: var(--eve-text-50);
  opacity: 0.72;
  cursor: pointer;
  transition: r 100ms ease, fill 100ms ease, opacity 100ms ease;
}

#exposureModelMode .em-chart-card circle:hover {
  fill: var(--eve-blue-dark);
  opacity: 1;
  r: 6px;
}

#exposureModelMode .em-chart-card circle.selected {
  fill: var(--eve-data-red);
  stroke: white;
  stroke-width: 2;
  opacity: 1;
}

#exposureModelMode .em-chart-tooltip {
  position: absolute;
  z-index: 3;
  max-width: 260px;
  padding: 7px 9px;
  border-radius: var(--eve-radius-sm);
  background: rgba(20, 31, 39, 0.94);
  color: white;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  box-shadow: 0 3px 12px rgba(10, 30, 50, 0.24);
  pointer-events: none;
}

#exposureModelMode .em-chart-tooltip[hidden] {
  display: none;
}

#exposureModelMode .em-footer {
  display: grid;
  gap: 5px;
  padding: 10px 12px;
  color: var(--eve-text-50);
  font-size: 11px;
  line-height: 1.5;
}

#exposureModelMode .em-footer a {
  color: var(--eve-blue);
  font-size: 12px;
  font-weight: 700;
}

#exposureModelMode .em-message {
  margin: 12px;
  padding: 14px;
  border: 1px solid var(--eve-border-10);
  border-radius: var(--eve-radius);
  background: var(--eve-bg-card);
  color: var(--eve-text-40);
  font-size: 12px;
}

#exposureModelMode .em-message.error {
  border-left: 4px solid var(--eve-data-red);
}

#exposureModelMode .em-message strong,
#exposureModelMode .em-message span {
  display: block;
}

#exposureModelMode .em-message span {
  margin-top: 5px;
  font-size: 11px;
}

#localisationStats {
  position: absolute;
  top: var(--mode-title-bar-height);
  right: 0;
  bottom: 0;
  width: var(--localisation-panel-width);
  z-index: 3;
  background: rgba(251, 253, 255, 0.98);
  border-left: 1px solid rgba(15, 42, 61, 0.12);
  padding: 14px 16px 16px;
  box-sizing: border-box;
  overflow: auto;
  display: block;
}

#localisationStats[hidden] {
  display: none !important;
}

#modeContent[data-active-mode="time-analysis"] #viewDiv {
  position: absolute;
  inset: var(--mode-title-bar-height) 0 var(--time-panel-height) 0;
  height: auto;
  width: auto;
}

#modeContent[data-active-mode="localisation"] #viewDiv {
  position: absolute;
  inset: var(--mode-title-bar-height) var(--localisation-panel-width) 0 0;
  height: auto;
  width: auto;
}

#modeContent[data-active-mode="impact-analysis"] #viewDiv {
  position: absolute;
  inset: var(--mode-title-bar-height) 0 0 var(--impact-panel-width);
  height: auto;
  width: auto;
}

#modeContent[data-active-mode="impact-analysis"][data-breakdown-open="1"] #viewDiv {
  inset: var(--mode-title-bar-height) 0 0 var(--impact-panel-expanded-width);
}

.ta-tabs {
  display: inline-flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  gap: 4px;
  padding: 3px;
  border: 1px solid var(--eve-color-d6dce2);
  border-radius: 6px;
  background: var(--eve-color-eef2f6);
  margin: 0;
}

.ta-tab {
  border: 1px solid var(--eve-color-cccccc);
  background: var(--eve-bg-card);
  color: var(--eve-color-26445a);
  border-radius: 4px;
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.ta-tab:hover {
  border-color: var(--eve-blue);
  color: var(--eve-blue);
}

.ta-tab.active {
  background: var(--eve-blue);
  border-color: var(--eve-blue);
  color: var(--eve-bg-card);
  box-shadow: 0 2px 7px rgba(0, 159, 218, 0.20);
}

.ta-tab.active:hover {
  color: var(--eve-bg-card);
}

.ta-topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 8px;
  min-width: 0;
}

#timeAnalysisMode .ta-header-line {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin-bottom: 0;
  min-width: 0;
}

#timeAnalysisMode .ta-title {
  color: var(--eve-color-2f3a45);
  font-size: 0.85rem;
  font-weight: 800;
  line-height: 1.2;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.ta-sub {
  color: var(--eve-color-888888);
  font-size: 0.72rem;
  line-height: 1.25;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.ta-chart-wrap {
  width: 100%;
  flex: 1;
  min-height: 0;
  border: 1px solid var(--eve-color-e1e6eb);
  border-radius: 8px;
  overflow: visible;
  background: var(--eve-bg-card);
  color: var(--eve-color-3e4c59);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 8px 4px;
  box-sizing: border-box;
}

.ta-chart-wrap svg {
  display: block;
  overflow: visible;
}

/* --- Time analysis line draw animation (dasharray/offset set by JS) --- */
@keyframes ta-fade-fill-area { from { opacity: 0; } to { opacity: 0.07; } }
@keyframes ta-fade-fill-crop { from { opacity: 0; } to { opacity: 0.08; } }

.ta-fill-area { animation: ta-fade-fill-area 300ms ease-out 280ms both; }
.ta-fill-crop { animation: ta-fade-fill-crop 300ms ease-out 360ms both; }

.ta-grid-line {
  stroke: var(--eve-color-eeeeee);
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

.ta-axis-line {
  stroke: rgba(140, 150, 160, 0.42);
  stroke-width: 1;
}

.ta-axis-tick {
  fill: var(--eve-color-7d8a96);
  font-size: 1.1rem;
  font-weight: 700;
}

.ta-axis-title {
  fill: var(--eve-color-8a949e);
  font-size: 1.05rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.ta-current-playhead {
  pointer-events: none;
}

.ta-current-playhead-halo {
  stroke: rgba(255, 255, 255, 0.96);
  stroke-width: 7;
  stroke-linecap: round;
}

.ta-current-playhead-line {
  stroke: var(--eve-text-00);
  stroke-width: 2.6;
  stroke-linecap: round;
}

.ta-current-playhead-stem {
  stroke: var(--eve-text-00);
  stroke-width: 1.5;
  opacity: 0.72;
}

.ta-current-playhead-label-bg {
  fill: var(--eve-text-00);
  stroke: rgba(255, 255, 255, 0.96);
  stroke-width: 2;
}

.ta-current-playhead-label {
  fill: #ffffff;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.06em;
}

.ta-current-playhead-handle {
  fill: var(--eve-text-00);
  stroke: #ffffff;
  stroke-width: 3;
}

.ta-range-band {
  fill: rgba(0, 159, 218, 0.16);
  stroke: rgba(0, 159, 218, 0.42);
  stroke-width: 1;
}

.ta-range-handle {
  stroke: var(--eve-blue);
  stroke-width: 3;
}

.ta-range-surface {
  fill: transparent;
  pointer-events: none;
}

#timeAnalysisMode.is-selecting-animation-range .ta-range-surface {
  cursor: crosshair;
  pointer-events: all;
}

.ta-point {
  transition: r 0.15s ease, stroke 0.15s ease, stroke-width 0.15s ease;
  animation: ta-point-appear 200ms ease-out both;
}

@keyframes ta-point-appear {
  from { opacity: 0; }
  to   { opacity: 1; }
}

.ta-point:hover,
.ta-point-hit:hover {
  stroke: var(--eve-bg-card);
  stroke-width: 2.4;
}

.ta-tooltip {
  display: none;
  font-size: 18px;
  fill: var(--eve-color-334155);
}

.ta-tooltip rect {
  fill: var(--eve-bg-card);
  stroke: var(--eve-color-d8e0e7);
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.12));
}

.ta-tooltip-date {
  fill: var(--eve-navy-2);
  font-weight: 800;
}

.ta-tooltip-dot.area {
  fill: var(--eve-color-2ca7de);
}

.ta-tooltip-dot.crop {
  fill: var(--eve-color-d9a441);
}

.ta-tooltip-dot.cloud {
  fill: var(--eve-color-b9c0c6);
}

.ta-hover-group:hover .ta-tooltip {
  display: block;
}

.eve-legend-expand:not(.esri-expand--expanded) .esri-expand__toggle {
  width: auto;
  min-width: 78px;
  padding: 0 10px;
  color: var(--eve-text);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.04em;
}

.eve-legend-expand:not(.esri-expand--expanded) .esri-expand__icon {
  display: none;
}

.eve-legend-expand:not(.esri-expand--expanded) .esri-expand__toggle::after {
  content: "LEGEND";
}

/* Keep the ArcGIS legend clear of the public Team access control. */
.esri-ui-top-right .eve-legend-expand {
  margin-top: 38px;
}

.ls-head {
  font-size: 20px;
  font-weight: 700;
  color: var(--eve-text);
  margin-bottom: 6px;
}

.ls-subhead {
  font-size: 12px;
  color: var(--eve-color-5b7080);
  margin-bottom: 12px;
  line-height: 1.4;
}

.ls-controls {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 12px;
}

.ls-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.ls-card {
  border: 1px solid rgba(15, 42, 61, 0.12);
  border-radius: 10px;
  background: var(--eve-bg-card);
  padding: 10px 11px;
}

.ls-card-title {
  font-size: 12px;
  color: var(--eve-color-5b7080);
  margin-bottom: 6px;
}

.ls-card-value {
  font-size: 18px;
  font-weight: 800;
  color: var(--eve-color-163246);
}

.ls-card-sub {
  font-size: 12px;
  color: var(--eve-color-6b7e8c);
  margin-top: 4px;
}

.ls-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  min-height: 0;
  flex: 0 0 auto;
  align-content: start;
}

#impactAnalysis2Extra {
  display: grid;
  gap: 10px;
}

.ls-impact-unit-toggle {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  margin: 10px 0;
  padding: 3px;
  border: 1px solid rgba(159, 181, 198, 0.46);
  border-radius: 999px;
  background: rgba(244, 248, 252, 0.96);
}

.ls-impact-unit-label {
  padding: 0 7px 0 8px;
  font-size: 11px;
  font-weight: 800;
  color: var(--eve-color-5b7080);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.ls-impact-unit-btn {
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: var(--eve-color-26445a);
  padding: 5px 10px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.ls-impact-unit-btn:hover {
  background: var(--eve-bg-card);
  border-color: rgba(0, 159, 218, 0.22);
}

.ls-impact-unit-btn.active {
  border-color: var(--eve-blue);
  background: var(--eve-blue);
  color: var(--eve-bg-card);
  box-shadow: 0 4px 10px rgba(0, 159, 218, 0.22);
}

.ls-impact-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  height: 100%;
  min-height: 0;
}

.ls-impact-shell[data-breakdown-open="1"] {
  grid-template-columns: calc(var(--app-filter-panel-width) - 28px) 300px;
}

.ls-impact-main {
  min-width: 0;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}

.ls-breakdown {
  min-width: 0;
  min-height: 0;
  border: 1px solid var(--ls-breakdown-accent, rgba(15, 42, 61, 0.12));
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: inset 4px 0 0 var(--ls-breakdown-accent, var(--eve-color-2ca7de)), 0 1px 4px rgba(0, 0, 0, 0.08);
}

.ls-breakdown[hidden] {
  display: none !important;
}

.ls-breakdown-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 12px 12px 10px;
  border-bottom: 1px solid rgba(15, 42, 61, 0.08);
  background: linear-gradient(90deg, var(--ls-breakdown-accent-soft, rgba(44, 167, 222, 0.12)), rgba(255, 255, 255, 0.98) 58%);
}

.ls-breakdown-kicker {
  margin-bottom: 5px;
  color: var(--ls-breakdown-accent, var(--eve-color-2ca7de));
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
  line-height: 1;
  text-transform: uppercase;
}

.ls-breakdown-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--eve-text);
}

.ls-breakdown-sub {
  display: inline-flex;
  align-items: center;
  margin-top: 7px;
  padding: 4px 8px;
  border: 1px solid var(--ls-breakdown-accent, var(--eve-blue));
  border-radius: 999px;
  background: var(--ls-breakdown-accent-soft, rgba(238, 244, 255, 0.92));
  color: var(--eve-text);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.2;
}

.ls-breakdown-close {
  border: 1px solid rgba(15, 42, 61, 0.12);
  border-radius: 999px;
  background: var(--eve-bg-card);
  color: var(--eve-text);
  font-size: 12px;
  font-weight: 700;
  padding: 6px 10px;
  cursor: pointer;
}

.ls-breakdown-body {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px 10px 10px;
}

.ls-breakdown-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 9px 6px;
  border-bottom: 1px solid rgba(15, 42, 61, 0.08);
}

.ls-breakdown-row:last-child {
  border-bottom: 0;
}

.ls-breakdown-rank {
  font-size: 12px;
  font-weight: 800;
  color: var(--eve-color-5b7080);
}

.ls-breakdown-name {
  position: relative;
  min-width: 0;
  font-size: 13px;
  font-weight: 700;
  color: var(--eve-color-26445a);
  padding: 6px 8px;
  border-radius: 8px;
  overflow: hidden;
}

.ls-breakdown-name::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--ls-breakdown-fill, 0%);
  background: var(--ls-breakdown-color, rgba(44, 167, 222, 0.24));
  border-radius: 8px;
}

.ls-breakdown-name-text {
  position: relative;
  z-index: 1;
}

.ls-breakdown-value {
  font-size: 13px;
  font-weight: 800;
  color: var(--eve-text);
  text-align: right;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.ls-breakdown-flash {
  border: 1px solid rgba(159, 181, 198, 0.72);
  border-radius: 999px;
  background: var(--eve-bg-card);
  color: var(--eve-color-26445a);
  padding: 5px 8px;
  font-size: 11px;
  line-height: 1;
  font-weight: 800;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

.ls-breakdown-flash:hover,
.ls-breakdown-flash:focus-visible {
  border-color: var(--eve-blue);
  background: var(--eve-color-eef4ff);
  color: var(--eve-blue);
  box-shadow: 0 2px 8px rgba(0, 159, 218, 0.16);
  outline: none;
}

.ls-breakdown-empty {
  padding: 12px 6px;
  font-size: 13px;
  color: var(--eve-color-6b7e8c);
}

.ls-panel {
  border: 1px solid rgba(15, 42, 61, 0.12);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.98);
  padding: 10px;
  min-height: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.ls-panel-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--eve-text);
  margin-bottom: 8px;
}

.ls-chart {
  flex: 0 0 auto;
  min-height: 0;
  overflow-y: visible;
  overflow-x: hidden;
}

.ls-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 10px;
  align-items: start;
  margin-bottom: 14px;
}

.ls-row.no-item-label {
  grid-template-columns: 96px 1fr;
}

.ls-row.no-item-label .ls-row-bars {
  grid-column: 2;
}

.ls-row-label {
  font-size: 13px;
  font-weight: 700;
  color: var(--eve-color-26445a);
  padding-top: 3px;
}

.ls-row-bars {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.ls-bar-line {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  box-sizing: border-box;
  border: 1px solid transparent;
  border-radius: 8px;
  padding: 2px 4px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, box-shadow 120ms ease;
}

.ls-bar-meta {
  font-size: 12px;
  color: var(--eve-color-607584);
  min-width: 0;
  padding-top: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ls-bar-stack {
  display: grid;
  grid-template-columns: minmax(44px, 1fr) minmax(82px, max-content);
  gap: 8px;
  align-items: center;
  min-width: 0;
}

.ls-bar-track {
  height: 12px;
  border-radius: 999px;
  background: var(--eve-color-e8eef3);
  overflow: hidden;
}

.ls-bar-fill {
  height: 100%;
  border-radius: 999px;
}

.ls-bar-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--eve-color-244156);
  text-align: right;
  min-width: 82px;
  white-space: nowrap;
}

.ls-bar-line.active .ls-bar-meta,
.ls-bar-line:hover .ls-bar-meta {
  color: var(--ls-selected-bar-color, var(--eve-blue));
  font-weight: 800;
}

.ls-bar-line.active {
  border-color: var(--ls-selected-bar-color, var(--eve-blue));
  background: var(--ls-selected-bar-soft, rgba(0, 159, 218, 0.08));
  box-shadow: 0 2px 10px rgba(15, 42, 61, 0.08);
}

.ls-bar-line.active .ls-bar-track {
  box-shadow: 0 0 0 2px var(--ls-selected-bar-soft, rgba(0, 159, 218, 0.18));
}

.ls-bar-line.active .ls-bar-value {
  color: var(--eve-navy-2);
  font-weight: 900;
}

#modeContent[data-active-mode="impact-analysis"] #livestockMode .ls-grid {
  grid-template-columns: 1fr;
}

#overviewFindings {
  position: absolute;
  top: calc(var(--mode-title-bar-height) + 10px);
  left: 10px;
  right: 10px;
  z-index: 5;
  display: flex;
  flex-direction: column;
  gap: 10px;
  pointer-events: none;
}

#overviewFindings .ov-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--eve-gap-sm);
}

#overviewFindings .ov-card {
  position: relative;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(247, 250, 253, 0.99));
  border: 1px solid var(--eve-border);
  border-radius: var(--eve-radius);
  padding: 16px 16px 14px;
  box-shadow: var(--eve-shadow-subtle);
  overflow: hidden;
  animation: eve-fade-up 480ms ease-out both;
}

#overviewFindings .ov-card:nth-child(2) { animation-delay: 80ms; }
#overviewFindings .ov-card:nth-child(3) { animation-delay: 160ms; }
#overviewFindings .ov-card:nth-child(4) { animation-delay: 240ms; }

#overviewFindings .ov-card-body {
  position: relative;
  z-index: 1;
}

#overviewFindings .ov-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

#overviewFindings .ov-card-icon {
  flex: 0 0 auto;
  width: 52px;
  height: 52px;
  border-radius: var(--eve-radius);
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 248, 251, 0.94));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.78),
    0 8px 18px rgba(16, 42, 67, 0.08);
}

#overviewFindings .ov-card-icon svg {
  width: 30px;
  height: 30px;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  fill: none;
}

#overviewFindings .ov-card-icon-area {
  color: var(--eve-color-2ca7de);
  background: linear-gradient(180deg, rgba(231, 246, 253, 0.98), rgba(214, 238, 251, 0.96));
}

#overviewFindings .ov-card-icon-cropland {
  color: var(--eve-color-c8921a);
  background: linear-gradient(180deg, rgba(251, 243, 222, 0.98), rgba(245, 232, 195, 0.96));
}

#overviewFindings .ov-card-icon-population {
  color: var(--eve-color-c96b3c);
  background: linear-gradient(180deg, rgba(251, 234, 226, 0.98), rgba(246, 218, 205, 0.96));
}

#overviewFindings .ov-card-icon-cloud {
  color: var(--eve-color-73839c);
  background: linear-gradient(180deg, rgba(239, 243, 248, 0.98), rgba(225, 232, 240, 0.96));
}

#overviewFindings .ov-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  height: 6px;
  background: linear-gradient(90deg, var(--eve-color-0588c9), var(--eve-color-4fc3f7));
}

#overviewFindings .ov-card:nth-child(2)::before {
  background: linear-gradient(90deg, var(--eve-color-c58a00), var(--eve-color-f2c35c));
}

#overviewFindings .ov-card:nth-child(3)::before {
  background: linear-gradient(90deg, var(--eve-color-c23636), var(--eve-color-ff8a8a));
}

#overviewFindings .ov-card:nth-child(4)::before {
  background: linear-gradient(90deg, var(--eve-color-73839c), var(--eve-color-c4ccd8));
}

#overviewFindings .ov-card-title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
  color: var(--eve-navy-2);
  letter-spacing: 0;
  line-height: 1.25;
}

#overviewFindings .ov-row {
  display: grid;
  grid-template-columns: 88px 1fr;
  gap: 10px;
  align-items: center;
  font-size: 13px;
  line-height: 1.3;
  margin-bottom: 10px;
}

#overviewFindings .ov-row:last-child {
  margin-bottom: 0;
}

#overviewFindings .ov-season {
  color: var(--eve-text-muted);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11px;
}

#overviewFindings .ov-value {
  color: var(--eve-color-0b1f33);
  font-weight: 800;
}

#overviewFindings .ov-sub {
  font-weight: 600;
  color: var(--eve-color-5b7285);
  margin-left: 6px;
  font-size: 11px;
}

#overviewFindings[hidden] {
  display: none !important;
}

#overviewLeftChart {
  position: absolute;
  left: 10px;
  top: 230px;
  width: var(--mode-left-panel-width);
  height: calc(100% - 250px);
  min-height: 260px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.985);
  border: 1px solid var(--eve-border);
  border-radius: var(--eve-radius);
  box-shadow: var(--eve-shadow-panel);
  padding: 14px 14px 12px;
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#seasonalityLeftChart {
  position: absolute;
  left: 10px;
  top: 10px;
  width: var(--mode-left-panel-width);
  height: calc(100% - 340px);
  min-height: 260px;
  z-index: 3;
  background: rgba(255, 255, 255, 0.97);
  border: 1px solid var(--eve-border);
  border-radius: var(--eve-radius);
  box-shadow: var(--eve-shadow-panel);
  padding: 14px 14px 12px;
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#seasonalityCalendar {
  position: absolute;
  right: 0;
  left: 0;
  bottom: 0;
  height: var(--seasonality-calendar-height);
  min-height: 220px;
  z-index: 3;
  background: rgba(255, 255, 255, 0.97);
  border-top: 1px solid rgba(0, 0, 0, 0.12);
  padding: 10px 14px 12px;
  box-sizing: border-box;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

#overviewLeftChart[hidden] {
  display: none !important;
}

#seasonalityLeftChart[hidden] {
  display: none !important;
}

#seasonalityCalendar[hidden] {
  display: none !important;
}

#overviewLeftChart .ovl-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--eve-navy-2);
  margin-bottom: 6px;
}

#seasonalityLeftChart .ovl-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--eve-color-193548);
  margin-bottom: 4px;
}

#overviewLeftChart .ovl-sub {
  font-size: 12px;
  line-height: 1.42;
  color: var(--eve-color-5f7483);
  margin-bottom: var(--eve-gap-sm);
}

#seasonalityLeftChart .ovl-sub {
  font-size: 13px;
  color: var(--eve-color-546e7a);
  margin-bottom: 8px;
}

#seasonalityLeftChart .ovl-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

#overviewLeftChart .ovl-controls {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  margin-bottom: var(--eve-gap-sm);
}

#overviewLeftChart .ovl-control-block {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

#overviewLeftChart .ovl-control-label {
  font-size: 11px;
  font-weight: 700;
  color: var(--eve-color-5b7080);
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

#overviewLeftChart .ovl-control-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  align-self: flex-start;
  gap: 4px;
  padding: 3px;
  border: 1px solid rgba(159, 181, 198, 0.46);
  border-radius: 8px;
  background: rgba(244, 248, 252, 0.96);
  max-width: 100%;
}

#overviewLeftChart .ovl-chip {
  flex: 0 1 auto;
  min-width: 0;
  border: 1px solid transparent;
  background: transparent;
  color: var(--eve-color-26445a);
  border-radius: 6px;
  padding: 6px 9px;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.15;
  white-space: nowrap;
  cursor: pointer;
  transition: background 120ms ease, border-color 120ms ease, color 120ms ease, box-shadow 120ms ease;
}

#overviewLeftChart .ovl-chip[data-group="indicator"] {
  display: inline-flex;
  align-items: center;
  flex: 1 1 calc(50% - 4px);
  gap: 6px;
  justify-content: center;
}

#overviewLeftChart .ovl-chip[data-group="indicator"]::before {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 999px;
  flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px rgba(15, 42, 61, 0.12);
}

#overviewLeftChart .ovl-chip[data-value="flooded_area"]::before {
  background: linear-gradient(90deg, rgba(128, 211, 242, 0.95), var(--eve-blue));
}

#overviewLeftChart .ovl-chip[data-value="flooded_cropland"]::before {
  background: linear-gradient(90deg, rgba(128, 211, 242, 0.95), var(--eve-blue));
}

#overviewLeftChart .ovl-chip[data-value="flooded_pop"]::before {
  background: linear-gradient(90deg, rgba(128, 211, 242, 0.95), var(--eve-blue));
}

#overviewLeftChart .ovl-chip:hover {
  background: var(--eve-bg-card);
  border-color: rgba(0, 159, 218, 0.22);
}

#overviewLeftChart .ovl-chip.active {
  border-color: var(--eve-accent);
  background: var(--eve-accent);
  color: var(--eve-bg-card);
  box-shadow: 0 4px 10px rgba(0, 159, 218, 0.22);
}

#overviewLeftChart .ovl-chip[data-group="indicator"].active {
  background: var(--eve-bg-card);
  color: var(--eve-color-0f3f76);
}

#overviewLeftChart .ovl-select {
  width: 100%;
  min-height: 30px;
  border: 1px solid rgba(159, 181, 198, 0.58);
  border-radius: 7px;
  background: var(--eve-bg-card);
  color: var(--eve-color-26445a);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  padding: 5px 8px;
}

#overviewLeftChart .ovl-chart {
  width: 100%;
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

#seasonalityLeftChart .ovl-chart {
  width: 100%;
  flex: 1;
  min-height: 0;
  overflow-x: hidden;
  overflow-y: auto;
}

#overviewLeftChart .ovl-bars {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#seasonalityLeftChart .ovl-bars {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

#overviewLeftChart .ovl-row {
  display: grid;
  grid-template-columns: 128px 1fr;
  align-items: center;
  gap: 10px;
}

#overviewLeftChart .ovl-row-btn {
  width: 100%;
  border: 0;
  padding: 7px 8px;
  background: transparent;
  text-align: left;
  cursor: pointer;
}

#overviewLeftChart .ovl-row-btn:nth-child(even) {
  background: rgba(244, 248, 252, 0.68);
}

#overviewLeftChart .ovl-row-btn:hover {
  background: rgba(236, 244, 255, 0.86);
}

#overviewLeftChart .ovl-row-btn:hover .ovl-label {
  color: var(--eve-blue);
}

#overviewLeftChart .ovl-row-btn.selected {
  padding: 7px 8px;
  margin: 0;
  border-radius: var(--eve-radius);
  background: rgba(0, 159, 218, 0.08);
}

#overviewLeftChart .ovl-row-btn.selected .ovl-label {
  color: var(--eve-blue);
  font-weight: 700;
}

#overviewLeftChart .ovl-row-btn.selected .ovl-bar-track {
  background: rgba(0, 159, 218, 0.12);
}

#seasonalityLeftChart .ovl-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  align-items: start;
  gap: 8px;
}

#seasonalityLeftChart .ovl-row-btn {
  width: 100%;
  border: 0;
  padding: 0;
  background: transparent;
  text-align: left;
  cursor: pointer;
  border-radius: var(--eve-radius);
  transition: background 120ms ease, box-shadow 120ms ease, color 120ms ease;
}

#seasonalityLeftChart .ovl-row-btn:hover,
#seasonalityLeftChart .ovl-row-btn:focus-visible {
  background: var(--eve-color-f4f8fb);
  box-shadow: inset 0 0 0 1px rgba(47, 136, 255, 0.16);
}

#seasonalityLeftChart .ovl-row-btn:hover .ovl-label {
  color: var(--eve-blue);
}

#seasonalityLeftChart .ovl-row-btn:hover .ovl-val,
#seasonalityLeftChart .ovl-row-btn:focus-visible .ovl-val {
  color: var(--eve-blue);
}

#seasonalityLeftChart .ovl-row-btn:hover .ovl-bar-track,
#seasonalityLeftChart .ovl-row-btn:focus-visible .ovl-bar-track {
  background: var(--eve-color-eef2f6);
}

#seasonalityLeftChart .ovl-row-btn:hover .ovl-bar-fill.crop,
#seasonalityLeftChart .ovl-row-btn:focus-visible .ovl-bar-fill.crop {
  background: linear-gradient(90deg, var(--eve-color-ffd166), var(--eve-color-f59e0b));
}

#seasonalityLeftChart .ovl-row-btn.selected {
  padding: 6px 8px;
  margin: -6px -8px;
  border-radius: 10px;
  background: rgba(0, 159, 218, 0.08);
}

#seasonalityLeftChart .ovl-row-btn.selected .ovl-label {
  color: var(--eve-blue);
  font-weight: 700;
}

#seasonalityLeftChart .ovl-row-btn.selected .ovl-bar-track {
  background: rgba(0, 159, 218, 0.12);
}

#seasonalityLeftChart .ovl-row-btn.selected .ovl-bar-fill.crop {
  background: linear-gradient(90deg, var(--eve-color-ffd166), var(--eve-color-f59e0b));
}

#seasonalityLeftChart .ovl-back-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 10px;
  border: 1px solid var(--eve-color-bfd0dd);
  background: var(--eve-bg-card);
  color: var(--eve-color-26445a);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

#seasonalityLeftChart .ovl-back-btn:hover {
  border-color: var(--eve-blue);
  color: var(--eve-blue);
}

#overviewLeftChart .ovl-label {
  font-size: 12px;
  color: var(--eve-color-334e68);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.25;
}

#seasonalityLeftChart .ovl-label {
  font-size: 12px;
  color: var(--eve-color-334e68);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#overviewLeftChart .ovl-bar-stack {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

#seasonalityLeftChart .ovl-bar-stack {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#overviewLeftChart .ovl-bar-line {
  display: grid;
  grid-template-columns: 1fr 54px;
  align-items: center;
  gap: 10px;
}

#seasonalityLeftChart .ovl-bar-line {
  display: grid;
  grid-template-columns: 1fr 48px;
  align-items: center;
  gap: 8px;
}

#overviewLeftChart .ovl-bar-track {
  height: 10px;
  border-radius: 999px;
  background: var(--eve-color-e7eef6);
  overflow: hidden;
}

#seasonalityLeftChart .ovl-bar-track {
  height: 10px;
  border-radius: 999px;
  background: var(--eve-color-e7eef6);
  overflow: hidden;
}

#overviewLeftChart .ovl-bar-fill {
  height: 100%;
  border-radius: 999px;
}

#seasonalityLeftChart .ovl-bar-fill {
  height: 100%;
  border-radius: 999px;
}

#overviewLeftChart .ovl-bar-fill.area {
  background: linear-gradient(90deg, rgba(128, 211, 242, 0.95), var(--eve-blue));
}

#overviewLeftChart .ovl-bar-fill.crop {
  background: linear-gradient(90deg, rgba(128, 211, 242, 0.95), var(--eve-blue));
}

#overviewLeftChart .ovl-bar-fill.people {
  background: linear-gradient(90deg, rgba(128, 211, 242, 0.95), var(--eve-blue));
}

#seasonalityLeftChart .ovl-bar-fill.crop {
  background: linear-gradient(90deg, var(--eve-color-f2c35c), var(--eve-color-d9a441));
}

#overviewLeftChart .ovl-val {
  font-size: 12px;
  font-weight: 700;
  color: var(--eve-color-1b3a4b);
  text-align: right;
}

#seasonalityLeftChart .ovl-val {
  font-size: 12px;
  font-weight: 700;
  color: var(--eve-color-1b3a4b);
  text-align: right;
}

#overviewLeftChart .ovl-val.area {
  color: var(--eve-color-2c8fbc);
}

#overviewLeftChart .ovl-val.crop {
  color: var(--eve-color-b5841f);
}

#overviewLeftChart .ovl-val.people {
  color: var(--eve-color-c23636);
}

#seasonalityLeftChart .ovl-val.crop {
  color: var(--eve-color-b5841f);
}

#seasonalityLeftChart .ovl-title-small {
  font-size: 14px;
  margin-bottom: 4px;
}

#seasonalityLeftChart .ovl-chart-single {
  min-height: 0;
}

#seasonalityCalendar .ac-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 10px;
}

#seasonalityCalendar .ac-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--eve-color-193548);
  margin-bottom: 4px;
}

#seasonalityCalendar .ac-sub {
  font-size: 13px;
  color: var(--eve-color-546e7a);
}

#seasonalityCalendar .ac-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: flex-end;
  color: var(--eve-color-546e7a);
  font-size: 12px;
}

#seasonalityCalendar .ac-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

#seasonalityCalendar .ac-toggle-btn {
  border: 1px solid var(--eve-color-bfd0dd);
  background: var(--eve-bg-card);
  color: var(--eve-color-26445a);
  border-radius: 999px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

#seasonalityCalendar .ac-toggle-btn:hover {
  border-color: var(--eve-blue);
  color: var(--eve-blue);
}

#seasonalityCalendar .ac-key {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#seasonalityCalendar .ac-key-swatch {
  width: 16px;
  height: 12px;
  border-radius: 2px;
  display: inline-block;
}

#seasonalityCalendar .ac-key-swatch.sowing {
  background: var(--eve-color-74b857);
}

#seasonalityCalendar .ac-key-swatch.harvest {
  background: var(--eve-color-37536b);
}

#seasonalityCalendar .ac-key-swatch.dekad-start,
#seasonalityCalendar .ac-key-swatch.dekad-end {
  width: 3px;
  height: 14px;
  border-radius: 999px;
}

#seasonalityCalendar .ac-key-swatch.dekad-start {
  background: var(--eve-color-d94841);
}

#seasonalityCalendar .ac-key-swatch.dekad-end {
  background: var(--eve-color-2563eb);
}

#seasonalityCalendar .ac-grid-head {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  border-top: 1px solid rgba(148, 163, 184, 0.45);
  border-bottom: 1px solid rgba(148, 163, 184, 0.45);
  background: var(--eve-color-f9fbfd);
}

#seasonalityCalendar .ac-grid-spacer {
  min-height: 40px;
}

#seasonalityCalendar .ac-months {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
}

#seasonalityCalendar .ac-months-wrap {
  position: relative;
  overflow: visible;
}

#seasonalityCalendar .ac-month {
  padding: 10px 6px;
  font-size: 11px;
  color: var(--eve-color-334e68);
  border-left: 1px solid rgba(148, 163, 184, 0.3);
}

#seasonalityCalendar .ac-grid-body {
  position: relative;
  flex: 1;
  min-height: 0;
  overflow: auto;
}

#seasonalityCalendar .ac-grid-body-content {
  position: relative;
  min-height: 100%;
}

#seasonalityCalendar .ac-row {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  border-bottom: 1px solid rgba(148, 163, 184, 0.28);
}

#seasonalityCalendar .ac-aez-heading {
  position: sticky;
  top: 0;
  z-index: 4;
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  min-height: 30px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.4);
  background: rgba(245, 248, 251, 0.98);
}

#seasonalityCalendar .ac-aez-title {
  grid-column: 1 / -1;
  padding: 7px 10px 6px 0;
  color: var(--eve-text);
  font-size: 12px;
  font-weight: 800;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#seasonalityCalendar .ac-crop {
  display: flex;
  align-items: center;
  min-height: 34px;
  padding: 4px 10px 4px 0;
}

#seasonalityCalendar .ac-crop-name-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

#seasonalityCalendar .ac-crop-name {
  font-size: 14px;
  font-weight: 700;
  color: var(--eve-color-334e68);
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#seasonalityCalendar .ac-info-btn {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 999px;
  background: var(--eve-color-0b79a7);
  color: var(--eve-bg-card);
  font-size: 12px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  cursor: pointer;
  padding: 0;
}

#seasonalityCalendar .ac-info-btn:hover {
  background: var(--eve-color-075f85);
}

#seasonalityCalendar .ac-track-wrap {
  position: relative;
  min-width: 0;
  padding: 0;
  border-left: 1px solid rgba(148, 163, 184, 0.3);
}

#seasonalityCalendar .ac-track-wrap::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background-image: linear-gradient(to right, rgba(148, 163, 184, 0.42) 1px, transparent 1px);
  background-size: calc(100% / 12) 100%;
}

#seasonalityCalendar .ac-track {
  position: relative;
  height: 100%;
  min-height: 42px;
  z-index: 1;
}

#seasonalityCalendar .ac-track-lane {
  position: absolute;
  left: 0;
  right: 0;
  height: 50%;
}

#seasonalityCalendar .ac-track-lane-sowing {
  top: 0;
}

#seasonalityCalendar .ac-track-lane-harvest {
  bottom: 0;
}

#seasonalityCalendar .ac-marker {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 0;
  border-left: 2px dashed;
  pointer-events: none;
  z-index: 3;
}

#seasonalityCalendar .ac-marker-band {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 3;
}

#seasonalityCalendar .ac-marker-band-head {
  overflow: visible;
  right: var(--ac-scrollbar-width, 0px);
}

#seasonalityCalendar .ac-marker-band-head .ac-marker {
  top: 0;
  bottom: 0;
}

#seasonalityCalendar .ac-marker-band-body {
  left: 220px;
  right: 0;
  overflow: hidden;
  z-index: 8;
}

#seasonalityCalendar .ac-marker-band-body .ac-marker {
  top: 0;
  bottom: 0;
}

#seasonalityCalendar .ac-marker.start {
  border-left-color: var(--eve-color-d94841);
}

#seasonalityCalendar .ac-marker.end {
  border-left-color: var(--eve-color-2563eb);
}

#seasonalityCalendar .ac-marker-label {
  position: absolute;
  top: 0;
  left: 6px;
  transform: translateY(-100%);
  padding: 2px 6px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(148, 163, 184, 0.7);
  color: var(--eve-color-1f3442);
  font-size: 10px;
  font-weight: 700;
  line-height: 1.4;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

#seasonalityCalendar .ac-marker.start .ac-marker-label {
  left: auto;
  right: 6px;
}

#seasonalityCalendar .ac-marker.end .ac-marker-label {
  left: 6px;
  right: auto;
}

#seasonalityCalendar .ac-marker-band-body .ac-marker-label {
  display: none;
}

#seasonalityCalendar .ac-segment {
  position: absolute;
  top: 0;
  height: 100%;
  border-radius: 0;
  z-index: 1;
}

#seasonalityCalendar .ac-segment.sowing {
  background: var(--eve-color-74b857);
}

#seasonalityCalendar .ac-segment.harvest {
  background: var(--eve-color-37536b);
}

#seasonalityCalendar .ac-segment.all-year {
  opacity: 0.95;
}

.ac-info-dialog {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(15, 42, 61, 0.28);
}

.ac-info-dialog[hidden] {
  display: none !important;
}

.ac-info-card {
  width: min(420px, 100%);
  max-height: min(520px, calc(100vh - 48px));
  border-radius: 8px;
  background: var(--eve-bg-card);
  border: 1px solid rgba(15, 42, 61, 0.18);
  box-shadow: 0 18px 44px rgba(15, 42, 61, 0.26);
  overflow: hidden;
}

.ac-info-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.34);
}

.ac-info-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--eve-text);
}

.ac-info-close {
  border: 1px solid rgba(148, 163, 184, 0.7);
  background: var(--eve-bg-card);
  color: var(--eve-color-28465b);
  border-radius: 6px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
  cursor: pointer;
}

.ac-info-body {
  padding: 14px 16px 16px;
  overflow: auto;
  color: var(--eve-color-43586a);
}

.ac-info-main {
  font-size: 16px;
  font-weight: 800;
  color: var(--eve-text);
  margin-bottom: 10px;
}

.ac-info-line {
  font-size: 13px;
  line-height: 1.45;
  margin-top: 6px;
}

.ac-info-footer {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--eve-border);
  font-size: 12px;
  line-height: 1.5;
  color: var(--eve-text-muted);
}

.ac-info-footer a {
  color: var(--eve-blue);
  font-weight: 700;
  text-decoration: none;
}

.ac-info-footer a:hover {
  text-decoration: underline;
}

#modeContent[data-active-mode="overview"] #overviewFindings {
  position: absolute;
  top: var(--mode-title-bar-height);
  left: calc(var(--mode-panel-gutter) + var(--overview-left-width));
  right: 0;
  height: var(--overview-summary-height);
  z-index: 3;
  padding: 8px 12px;
  box-sizing: border-box;
  overflow: hidden;
  pointer-events: auto;
  background: rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid rgba(15, 42, 61, 0.10);
  backdrop-filter: blur(2px);
}

#modeContent[data-active-mode="overview"] #overviewFindings .ov-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  height: 100%;
  align-items: stretch;
}

#modeContent[data-active-mode="overview"] #overviewFindings .ov-title {
  background: var(--eve-bg-card);
  border: 1px solid rgba(0, 0, 0, 0.10);
  border-radius: 8px;
  box-shadow: none;
}

#modeContent[data-active-mode="overview"] #overviewFindings .ov-card {
  background: linear-gradient(180deg, var(--eve-bg-card), var(--eve-color-fbfdff));
  border: 1px solid var(--eve-border);
  border-radius: var(--eve-radius);
  box-shadow: var(--eve-shadow-subtle);
  display: flex;
  min-height: 0;
  padding: 10px 12px 8px;
}

#modeContent[data-active-mode="overview"] #overviewFindings .ov-card::before {
  height: 5px;
}

#modeContent[data-active-mode="overview"] #overviewFindings .ov-card-body {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-height: 0;
}

#modeContent[data-active-mode="overview"] #overviewFindings .ov-card-head {
  gap: 0;
  margin-bottom: 6px;
}

#modeContent[data-active-mode="overview"] #overviewFindings .ov-card-icon {
  display: none;
}

#modeContent[data-active-mode="overview"] #overviewFindings .ov-card-title {
  font-size: 13px;
  line-height: 1.2;
}

#modeContent[data-active-mode="overview"] #overviewFindings .ov-row {
  display: grid;
  grid-template-columns: 72px minmax(0, max-content);
  gap: 8px;
  align-items: baseline;
  margin-bottom: 4px;
  font-size: 12px;
  line-height: 1.18;
}

#modeContent[data-active-mode="overview"] #overviewFindings .ov-season {
  font-size: 10px;
}

#modeContent[data-active-mode="overview"] #overviewFindings .ov-value {
  min-width: 0;
  overflow-wrap: break-word;
}

#modeContent[data-active-mode="overview"] #overviewFindings .ov-sub {
  margin-left: 4px;
  font-size: 10px;
}

#modeContent[data-active-mode="overview"] #overviewLeftChart {
  position: absolute;
  top: var(--mode-title-bar-height);
  left: var(--mode-panel-gutter);
  bottom: 0;
  width: var(--overview-left-width);
  height: auto;
  min-height: 0;
  z-index: 3;
  margin: 0;
  border-radius: 0 var(--eve-radius) 0 0;
  border-left: 0;
  border-right: 0;
  border-bottom: 0;
  box-shadow: none;
}

#modeContent[data-active-mode="overview"] #viewDiv {
  position: absolute;
  inset: calc(var(--mode-title-bar-height) + var(--overview-summary-height)) 0 0 calc(var(--mode-panel-gutter) + var(--overview-left-width));
  height: auto;
  width: auto;
}

#modeContent[data-active-mode="seasonality"] #seasonalityLeftChart {
  position: absolute;
  top: var(--mode-title-bar-height);
  left: var(--mode-panel-gutter);
  bottom: var(--seasonality-calendar-height);
  width: var(--mode-left-panel-width);
  height: auto;
  min-height: 0;
  z-index: 3;
  margin: 0;
  border-radius: 0;
  border-left: 0;
  border-bottom: 0;
  box-shadow: none;
}

#modeContent[data-active-mode="seasonality"] #seasonalityCalendar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--seasonality-calendar-height);
}

#modeContent[data-active-mode="seasonality"][data-seasonality-calendar-fullscreen="1"] #seasonalityCalendar {
  left: 0;
  right: 0;
  top: var(--mode-title-bar-height);
  bottom: 0;
  height: auto;
  z-index: 5;
}

#modeContent[data-active-mode="seasonality"][data-seasonality-calendar-fullscreen="1"] #seasonalityLeftChart {
  display: none !important;
}

#modeContent[data-active-mode="seasonality"][data-seasonality-calendar-fullscreen="1"] #viewDiv {
  display: none !important;
}

#modeContent[data-active-mode="seasonality"] #viewDiv {
  position: absolute;
  inset: var(--mode-title-bar-height) 0 var(--seasonality-calendar-height) calc(var(--mode-panel-gutter) + var(--mode-left-panel-width));
  height: auto;
  width: auto;
  overflow: hidden;
}

#modeContent[data-active-mode="seasonality"] #seasonalityEmptyState {
  inset: var(--mode-title-bar-height) 0 0 calc(var(--mode-panel-gutter) + var(--mode-left-panel-width));
}

#modeContent[data-active-mode="localisation"] #localisationEmptyState {
  inset: var(--mode-title-bar-height) 0 0 0;
}

.locstats-head {
  margin-bottom: 12px;
}

.locstats-head-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.locstats-head-copy {
  min-width: 0;
}

.locstats-title {
  font-size: 20px;
  font-weight: 800;
  color: var(--eve-color-12344d);
  margin-bottom: 4px;
}

.locstats-sub {
  font-size: 13px;
  color: var(--eve-color-587082);
  line-height: 1.45;
}

.locstats-dekad {
  margin-top: 8px;
  font-size: 15px;
  font-weight: 800;
  color: var(--eve-color-1f4258);
  line-height: 1.35;
}

.locstats-report-btn {
  flex: 0 0 auto;
  border: 1px solid rgba(0, 159, 218, 0.24);
  background: linear-gradient(180deg, var(--eve-blue), var(--eve-color-0a56df));
  color: var(--eve-bg-card);
  border-radius: 999px;
  padding: 9px 14px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
  box-shadow: 0 10px 18px rgba(0, 159, 218, 0.18);
}

.locstats-report-btn:hover,
.locstats-report-btn:focus-visible {
  background: linear-gradient(180deg, var(--eve-color-186aff), var(--eve-blue));
  outline: none;
}

.locstats-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.locstats-card {
  border: 1px solid rgba(15, 42, 61, 0.12);
  border-radius: 12px;
  background: var(--eve-bg-card);
  padding: 11px 12px;
}

.locstats-card.total {
  grid-column: span 1;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(243, 248, 252, 0.99));
}

.locstats-card-label {
  font-size: 12px;
  color: var(--eve-color-647b8c);
  margin-bottom: 6px;
}

.locstats-card-value {
  font-size: 20px;
  font-weight: 800;
  color: var(--eve-color-153447);
}

.locstats-table-wrap {
  overflow: visible;
  border: 1px solid rgba(15, 42, 61, 0.12);
  border-radius: 12px;
  background: var(--eve-bg-card);
}

.locstats-sort-hint {
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--eve-color-5d7486);
  font-weight: 700;
}

.locstats-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.locstats-table thead th {
  background: var(--eve-color-f4f8fb);
  color: var(--eve-color-12344d);
  text-align: left;
  font-weight: 800;
  padding: 10px 12px;
  border-bottom: 1px solid rgba(15, 42, 61, 0.12);
}

.locstats-sort-btn {
  width: 100%;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 0;
  padding: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  font-weight: inherit;
  text-align: left;
  cursor: pointer;
}

.locstats-sort-btn:hover,
.locstats-sort-btn:focus-visible {
  color: var(--eve-blue);
  outline: none;
}

.locstats-sort-btn.is-active {
  color: var(--eve-blue);
}

.locstats-sort-icon {
  flex: 0 0 auto;
  font-size: 12px;
  line-height: 1;
}

.locstats-table tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(15, 42, 61, 0.08);
  color: var(--eve-color-314b5f);
}

.locstats-table tbody tr:last-child td {
  border-bottom: 0;
}

.locstats-pies {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.locstats-pie-card {
  border: 1px solid rgba(15, 42, 61, 0.12);
  border-radius: 12px;
  background: var(--eve-bg-card);
  padding: 12px;
}

.locstats-pie-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.locstats-pie-title {
  font-size: 14px;
  font-weight: 800;
  color: var(--eve-color-12344d);
}

.locstats-pie-total {
  font-size: 12px;
  font-weight: 800;
  color: var(--eve-color-466173);
  white-space: nowrap;
}

.locstats-pie-visual {
  display: flex;
  justify-content: center;
  margin-bottom: 12px;
}

.locstats-pie-chart {
  position: relative;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  flex: 0 0 auto;
  box-shadow: inset 0 0 0 1px rgba(15, 42, 61, 0.08);
  cursor: crosshair;
}

.locstats-pie-hole {
  position: absolute;
  inset: 26%;
  border-radius: 50%;
  background: var(--eve-bg-card);
  box-shadow: inset 0 0 0 1px rgba(15, 42, 61, 0.06);
  pointer-events: none;
}

.locstats-pie-tooltip {
  position: absolute;
  z-index: 4;
  min-width: 132px;
  max-width: 190px;
  padding: 7px 9px;
  border-radius: var(--eve-radius);
  border: 1px solid var(--eve-border);
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--eve-shadow);
  color: var(--eve-text);
  font-size: 11.5px;
  line-height: 1.25;
  pointer-events: none;
  opacity: 0;
  transform: translate(-50%, calc(-100% - 10px));
  transition: opacity 100ms ease;
}

.locstats-pie-tooltip.is-visible {
  opacity: 1;
}

.locstats-pie-tooltip-label,
.locstats-pie-tooltip-value {
  display: block;
}

.locstats-pie-tooltip-label {
  font-weight: 700;
  color: var(--eve-navy-2);
  margin-bottom: 3px;
}

.locstats-pie-tooltip-value {
  font-weight: 600;
  color: var(--eve-text-muted);
}

.locstats-pie-legend {
  display: grid;
  gap: 7px;
}

.locstats-pie-legend-item {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
  font-size: 12px;
}

.locstats-pie-swatch {
  width: 12px;
  height: 12px;
  border-radius: 3px;
  border: 1px solid rgba(15, 42, 61, 0.14);
  box-sizing: border-box;
}

.locstats-pie-label {
  min-width: 0;
  color: var(--eve-color-234258);
}

.locstats-pie-value {
  color: var(--eve-color-557082);
  text-align: right;
  white-space: nowrap;
}

.locstats-pie-empty {
  padding: 18px 8px 6px;
  text-align: center;
  color: var(--eve-color-6a7f8e);
  font-size: 12px;
  line-height: 1.45;
}

.locstats-timeline {
  margin-top: 14px;
  border: 1px solid rgba(15, 42, 61, 0.12);
  border-radius: 12px;
  background: var(--eve-bg-card);
  padding: 12px;
}

.locstats-timeline-head {
  margin-bottom: 10px;
}

.locstats-timeline-controls {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 8px;
}

.locstats-timeline-toggle {
  border: 1px solid var(--eve-color-c4d3df);
  background: var(--eve-bg-card);
  color: var(--eve-color-274257);
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  cursor: pointer;
}

.locstats-timeline-toggle:hover,
.locstats-timeline-toggle:focus-visible {
  border-color: var(--eve-blue);
  color: var(--eve-blue);
  outline: none;
}

.locstats-timeline-toggle.is-active {
  border-color: var(--eve-blue);
  background: var(--eve-blue);
  color: var(--eve-bg-card);
}

.locstats-timeline-title {
  font-size: 15px;
  font-weight: 800;
  color: var(--eve-color-143247);
  margin-bottom: 4px;
}

.locstats-timeline-sub {
  font-size: 12px;
  color: var(--eve-color-5a7385);
  line-height: 1.45;
}

.locstats-timeline-chart-wrap {
  overflow-x: auto;
  overflow-y: hidden;
  border: 1px solid rgba(15, 42, 61, 0.08);
  border-radius: 10px;
  background: var(--eve-color-fbfdff);
}

.locstats-timeline-chart-wrap svg {
  display: block;
  min-width: 100%;
}

.locstats-timeline-series {
  isolation: isolate;
}

.locstats-timeline-line-hit,
.locstats-timeline-point-hit {
  cursor: pointer;
}

.locstats-timeline-point-dot {
  pointer-events: none;
}

.locstats-timeline-tooltip {
  display: none;
  pointer-events: none;
}

.locstats-timeline-tooltip rect {
  fill: rgba(255, 255, 255, 0.96);
  stroke: rgba(15, 42, 61, 0.13);
  stroke-width: 1;
  filter: drop-shadow(0 4px 16px rgba(15, 42, 61, 0.08));
}

.locstats-timeline-tooltip text {
  fill: var(--eve-text);
  font-family: 'DM Sans', system-ui, -apple-system, sans-serif;
  font-size: 11.5px;
  line-height: 1.25;
}

.locstats-timeline-tooltip-label {
  fill: var(--eve-navy-2);
  font-weight: 700;
}

.locstats-timeline-tooltip-value {
  fill: var(--eve-text-muted);
  font-weight: 600;
}

.locstats-timeline-point-group:hover .locstats-timeline-tooltip,
.locstats-timeline-point-group:focus-within .locstats-timeline-tooltip {
  display: block;
}

.locstats-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: var(--eve-color-587082);
  padding: 24px;
}

.locstats-empty-title {
  font-size: 18px;
  font-weight: 800;
  color: var(--eve-color-163547);
  margin-bottom: 8px;
}

.locstats-empty-text {
  max-width: 420px;
  line-height: 1.5;
}

#placeholderDiv {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 24px;
  box-sizing: border-box;
  background: var(--eve-color-f7f8fa);
  color: var(--eve-color-263238);
  text-align: center;
}

#placeholderDiv[hidden] {
  display: none !important;
}

#viewDiv[hidden] {
  display: none !important;
}

#placeholderTitle {
  margin: 0 0 8px;
  font-size: 24px;
  line-height: 1.2;
}

#placeholderText {
  margin: 0;
  font-size: 14px;
  color: var(--eve-color-546e7a);
}

#modeTabs {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 54px;
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 8px;
  padding: 7px 10px 8px;
  box-sizing: border-box;
  border-top: 1px solid rgba(0, 159, 218, 0.16);
  background: linear-gradient(180deg, #f5f9fc 0%, #e8f0f7 100%);
  box-shadow: 0 -6px 20px rgba(14, 36, 51, 0.06);
  z-index: 2;
}

.mode-tab {
  border: 1px solid rgba(14, 36, 51, 0.10);
  border-top: 3px solid transparent;
  background: rgba(255, 255, 255, 0.62);
  color: var(--eve-text-40);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0 10px;
  border-radius: var(--eve-radius);
  transition:
    background 180ms ease,
    border-color 180ms ease,
    color 180ms ease,
    box-shadow 180ms ease,
    transform 100ms ease;
}

.mode-tab:last-child {
  border-right: 1px solid rgba(14, 36, 51, 0.10);
}

.mode-tab:hover {
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(14, 36, 51, 0.14);
  border-top-color: rgba(0, 159, 218, 0.45);
  color: var(--eve-text-20);
  box-shadow: none;
}

.mode-tab:active {
  transform: scale(0.96);
}

.mode-tab.active {
  background: #ffffff;
  border-color: rgba(0, 159, 218, 0.22);
  border-top-color: var(--eve-blue);
  color: var(--eve-navy);
  font-weight: 700;
  box-shadow:
    0 -3px 12px rgba(0, 159, 218, 0.14),
    0 2px 8px rgba(0, 159, 218, 0.06);
}

@media (max-width: 980px) {
  #modeContent {
    --mode-panel-gutter: 6px;
    --mode-left-panel-width: 360px;
    --impact-panel-width: var(--app-filter-panel-width);
    --impact-panel-expanded-width: calc(var(--impact-panel-width) + 312px);
    --time-panel-height: 320px;
    --seasonality-calendar-height: 350px;
    --localisation-panel-width: 52%;
  }

  #modeContent[data-active-mode="overview"] #overviewFindings {
    left: calc(var(--mode-panel-gutter) + var(--overview-left-width));
    right: 10px;
    width: auto;
  }

  #modeContent[data-active-mode="overview"] #overviewFindings .ov-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #modeContent[data-active-mode="overview"] #overviewLeftChart {
    width: var(--overview-left-width);
  }

  #modeContent[data-active-mode="overview"] #viewDiv {
    inset: calc(var(--mode-title-bar-height) + var(--overview-summary-height)) 0 0 calc(var(--mode-panel-gutter) + var(--overview-left-width));
  }

  #timeAnalysisMode {
    padding: 10px 12px 12px;
  }

  #livestockMode {
    width: var(--impact-panel-width);
  }

  #modeContent[data-active-mode="impact-analysis"] #livestockMode {
    width: var(--impact-panel-width);
  }

  #modeContent[data-active-mode="impact-analysis"][data-breakdown-open="1"] #livestockMode {
    width: var(--impact-panel-expanded-width);
  }

  #modeContent[data-active-mode="impact-analysis"] #viewDiv {
    inset: var(--mode-title-bar-height) 0 0 var(--impact-panel-width);
  }

  #modeContent[data-active-mode="impact-analysis"][data-breakdown-open="1"] #viewDiv {
    inset: var(--mode-title-bar-height) 0 0 var(--impact-panel-expanded-width);
  }

  #modeContent[data-active-mode="seasonality"] #seasonalityLeftChart {
    width: var(--mode-left-panel-width);
    bottom: var(--seasonality-calendar-height);
  }

  #modeContent[data-active-mode="seasonality"] #seasonalityCalendar {
    left: 0;
    height: var(--seasonality-calendar-height);
  }

  #modeContent[data-active-mode="seasonality"] #viewDiv {
    inset: var(--mode-title-bar-height) 0 var(--seasonality-calendar-height) calc(var(--mode-panel-gutter) + var(--mode-left-panel-width));
  }

  #modeContent[data-active-mode="seasonality"] #seasonalityEmptyState {
    inset: var(--mode-title-bar-height) 0 0 calc(var(--mode-panel-gutter) + var(--mode-left-panel-width));
  }

  #localisationStats {
    padding: 12px;
  }

  #modeContent[data-active-mode="localisation"] #viewDiv {
    inset: var(--mode-title-bar-height) var(--localisation-panel-width) 0 0;
  }
}

@media (max-width: 720px) {
  #modeContent {
    --mode-title-bar-height: 0px;
    --mode-panel-gutter: 0px;
    --impact-panel-width: auto;
    --impact-panel-expanded-width: auto;
    --time-panel-height: 290px;
    --localisation-panel-width: 42%;
    --seasonality-calendar-height: 320px;
  }

  .localisation-splash-card {
    top: calc(var(--mode-title-bar-height) + 12px);
    width: calc(100% - 24px);
    max-height: calc(100% - var(--mode-title-bar-height) - 24px);
    padding: 14px 14px 12px;
  }

  .localisation-splash-head {
    align-items: stretch;
    flex-direction: column;
  }

  .localisation-splash-head h2 {
    font-size: 20px;
  }

  #timeAnalysisMode {
    padding: 10px;
  }

  .ta-topbar {
    flex-direction: column;
    gap: 8px;
  }

  #timeAnalysisMode .ta-title {
    font-size: 13px;
    white-space: normal;
  }

  .ta-sub {
    font-size: 11px;
    white-space: normal;
  }

  .ta-tab {
    font-size: 11px;
    padding: 5px 8px;
  }

  #livestockMode {
    left: 0;
    right: 0;
    top: var(--mode-title-bar-height);
    bottom: 0;
    width: auto;
    padding: 10px;
    border-right: 0;
    border-top: 0;
  }

  #modeContent[data-active-mode="impact-analysis"] #livestockMode {
    width: auto;
  }

  #modeContent[data-active-mode="impact-analysis"] #viewDiv {
    inset: var(--mode-title-bar-height) 0 0 0;
  }

  .ls-impact-shell {
    grid-template-columns: 1fr;
    height: auto;
  }

  .ls-impact-main {
    overflow: visible;
    padding-right: 0;
  }

  .ls-breakdown {
    max-height: 320px;
  }

  #localisationStats {
    left: 0;
    right: 0;
    top: calc(100% - var(--localisation-panel-width));
    bottom: 0;
    width: auto;
    padding: 10px;
    border-left: 0;
    border-top: 1px solid rgba(15, 42, 61, 0.12);
  }

  #modeContent[data-active-mode="localisation"] #viewDiv {
    inset: var(--mode-title-bar-height) 0 var(--localisation-panel-width) 0;
  }

  .locstats-summary {
    grid-template-columns: 1fr;
  }

  .locstats-head-row {
    flex-direction: column;
    align-items: stretch;
  }

  .locstats-card.total {
    grid-column: span 1;
  }

  .locstats-pies {
    grid-template-columns: 1fr;
  }

  .locstats-pie-chart {
    width: 150px;
    height: 150px;
  }

  .locstats-pie-legend-item {
    grid-template-columns: 12px minmax(0, 1fr);
  }

  .locstats-pie-value {
    grid-column: 2;
    text-align: left;
    white-space: normal;
  }

  .locstats-timeline {
    padding: 10px;
  }

  #seasonalityCalendar {
    left: 0;
    right: 0;
    height: var(--seasonality-calendar-height);
    padding: 10px;
  }

  #seasonalityCalendar .ac-head,
  #seasonalityCalendar .ac-aez-heading,
  #seasonalityCalendar .ac-row,
  #seasonalityCalendar .ac-grid-head {
    grid-template-columns: 1fr;
  }

  #seasonalityCalendar .ac-head {
    display: block;
  }

  #seasonalityCalendar .ac-legend {
    justify-content: flex-start;
    margin-top: 8px;
  }

  #seasonalityCalendar .ac-actions {
    justify-content: flex-start;
    margin-top: 8px;
  }

  #seasonalityCalendar .ac-grid-head {
    display: block;
  }

  #seasonalityCalendar .ac-grid-spacer {
    display: none;
  }

  #seasonalityCalendar .ac-crop {
    padding-right: 0;
  }

  #seasonalityCalendar .ac-track-wrap {
    border-left: 0;
  }

  #seasonalityCalendar .ac-marker-band-body {
    left: 0;
  }

  #modeContent[data-active-mode="seasonality"] #seasonalityLeftChart {
    width: auto;
    right: 0;
    bottom: var(--seasonality-calendar-height);
  }

  #modeContent[data-active-mode="seasonality"] #seasonalityCalendar {
    left: 0;
    right: 0;
    bottom: 0;
    height: var(--seasonality-calendar-height);
  }

  #modeContent[data-active-mode="seasonality"] #viewDiv {
    inset: var(--mode-title-bar-height) 0 var(--seasonality-calendar-height) 0;
    overflow: hidden;
  }

  .ls-controls,
  .ls-summary,
  .ls-grid {
    grid-template-columns: 1fr;
  }
}

.panel-block {
  padding: 12px 0 16px;
  overflow-x: hidden;
  color: var(--eve-text);
}

.app-sidehead {
  height: var(--app-header-height);
  padding: 0 20px;
  background: var(--eve-navy);
  display: flex;
  align-items: center;
  flex-shrink: 0;
  position: relative;
}

.app-sidehead-title {
  color: var(--eve-bg-card);
  font-weight: 700;
  font-size: 14px;
  line-height: 1.3;
  margin: 0;
  letter-spacing: 0.01em;
  display: flex;
  align-items: center;
  min-width: 0;
}

.eve-brand-logo {
  display: block;
  width: 116px;
  height: 32px;
  object-fit: contain;
  object-position: left center;
  margin-right: 12px;
  flex-shrink: 0;
}

.app-sidehead-name {
  min-width: 0;
}

/* Title stacked over the Data in Emergencies (DIEM) link; fits the 58 px header. */
.app-sidehead-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.app-sidehead-diem {
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: underline;
  text-decoration-color: rgba(255, 255, 255, 0.4);
  text-underline-offset: 2px;
  /* One line only: a second line would overflow the fixed header height. */
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-sidehead-diem::after {
  content: " \2197";
}

.app-sidehead-diem:hover {
  color: #fff;
  text-decoration-color: #fff;
}

.team-access-trigger {
  position: absolute;
  top: 7px;
  right: 16px;
  z-index: 10;
  padding: 5px 10px;
  border: 1px solid rgba(15, 42, 61, 0.22);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.88);
  color: var(--eve-text);
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 1px 4px rgba(15, 42, 61, 0.10);
}

.team-access-trigger:hover,
.team-access-trigger:focus-visible {
  border-color: var(--eve-blue);
  background: var(--eve-bg-card);
  color: var(--eve-blue);
}

.team-access-trigger:disabled {
  cursor: wait;
  opacity: 0.72;
}

.team-access-trigger[hidden] {
  display: none !important;
}

.team-access-status {
  position: absolute;
  z-index: 19;
  top: 52px;
  right: 12px;
  width: min(360px, calc(100% - 24px));
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--eve-data-red, #d94b54) 35%, white);
  border-radius: 8px;
  background: #fff7f7;
  box-shadow: 0 8px 24px rgb(15 42 61 / 16%);
  color: var(--eve-text-primary, #20384b);
  font-size: 0.78rem;
  line-height: 1.4;
}

.small {
  font-size: 12px;
  color: var(--eve-text-muted);
  line-height: 1.35;
}

calcite-shell-panel[slot="panel-start"] {
  --calcite-shell-panel-width: var(--app-filter-panel-width);
  --calcite-shell-panel-min-width: var(--app-filter-panel-width);
  --calcite-shell-panel-max-width: var(--app-filter-panel-width);
  inline-size: var(--app-filter-panel-width) !important;
  width: var(--app-filter-panel-width) !important;
  min-inline-size: var(--app-filter-panel-width) !important;
  max-inline-size: var(--app-filter-panel-width) !important;
  min-width: var(--app-filter-panel-width) !important;
  max-width: var(--app-filter-panel-width) !important;
  flex: 0 0 var(--app-filter-panel-width);
  height: 100vh;
  background: var(--eve-bg);
  border-right: 1px solid var(--eve-border);
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 42, 61, 0.18) transparent;
}

calcite-shell-panel[slot="panel-start"]::-webkit-scrollbar {
  width: 5px;
}

calcite-shell-panel[slot="panel-start"]::-webkit-scrollbar-track {
  background: transparent;
}

calcite-shell-panel[slot="panel-start"]::-webkit-scrollbar-thumb {
  background: rgba(15, 42, 61, 0.18);
  border-radius: 3px;
}

calcite-shell-panel[slot="panel-start"] calcite-panel {
  --calcite-panel-background-color: var(--eve-bg);
  inline-size: 100%;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

.app-sidehead,
.panel-block,
#widget-filters {
  inline-size: 100%;
  width: 100%;
  max-width: 100%;
  box-sizing: border-box;
}

#widget-filters {
  display: flex;
  flex-direction: column;
  gap: 0;
  overflow-x: hidden;
}

#widget-filters > .small:first-child,
#widget-filters #timeAnimationSection > .small:first-child,
#widget-filters #impactMappingSection > .small:first-child {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--eve-text-muted);
  margin: 18px 20px 5px;
  display: block;
}

#widget-filters calcite-label {
  display: block;
  margin: 0 0 10px;
  min-width: 0;
  color: var(--eve-text);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0;
}

#widget-filters > calcite-label,
#widget-filters > #overviewFloodOpacitySection,
#widget-filters > #localisationOpacitySection,
#widget-filters > #timeAnimationSection,
#widget-filters > #impactMappingSection,
.eve-card {
  background: var(--eve-bg-card);
  border-radius: var(--eve-radius);
  border: 1px solid var(--eve-border);
  box-shadow: var(--eve-shadow);
  margin: 0 12px 10px;
  padding: 12px 14px;
}

#widget-filters > calcite-label {
  margin: 0 12px 10px;
}

#widget-filters .admin-filter-head {
  align-items: center;
  display: flex;
  gap: 8px;
  justify-content: space-between;
  min-width: 0;
}

#widget-filters .admin-filter-head > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

#widget-filters .admin-remove-selection-btn {
  border: 1px solid rgba(0, 159, 218, 0.32);
  border-radius: 999px;
  background: rgba(0, 159, 218, 0.08);
  color: var(--eve-blue);
  cursor: pointer;
  flex: 0 0 auto;
  font: inherit;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.2;
  padding: 3px 8px;
}

#widget-filters .admin-remove-selection-btn:hover,
#widget-filters .admin-remove-selection-btn:focus-visible {
  background: var(--eve-blue);
  color: var(--eve-bg-card);
  outline: none;
}

#widget-filters calcite-select {
  margin-top: 5px;
  width: 100%;
  max-width: 100%;
  font-family: inherit;
  font-size: 13px;
  color: var(--eve-text);
  --calcite-select-border-color: var(--eve-border);
  --calcite-select-background-color: var(--eve-bg-card);
  --calcite-select-text-color: var(--eve-text);
}

#widget-filters select {
  width: 100%;
  border-radius: var(--eve-radius);
  border: 1px solid var(--eve-border);
  padding: 6px 10px;
  font-size: 13px;
  font-family: inherit;
  color: var(--eve-text);
  background: var(--eve-bg-card);
  appearance: none;
  cursor: pointer;
}

#widget-filters select:focus,
#widget-filters select:focus-visible {
  border-color: var(--eve-blue);
  outline: none;
  box-shadow: 0 0 0 3px rgba(0, 159, 218, 0.12);
}

#widget-filters calcite-segmented-control,
#widget-filters calcite-slider,
#widget-filters #periodPicker,
#widget-filters #impactMappingSection,
#widget-filters #timeAnimationSection,
#widget-filters #advancedMappingSection {
  max-width: 100%;
  box-sizing: border-box;
}

#widget-filters calcite-select::part(container),
#widget-filters calcite-select::part(control),
#widget-filters calcite-select::part(wrapper) {
  border-radius: var(--eve-radius);
  border-color: var(--eve-border);
  background: var(--eve-bg-card);
  color: var(--eve-text);
  font-family: inherit;
  font-size: 13px;
}

#widget-filters input[type="range"] {
  margin-top: 8px;
  width: 100%;
  accent-color: var(--eve-blue);
  background: transparent;
  cursor: pointer;
}

#widget-filters input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 2px;
  background: var(--eve-border);
}

#widget-filters input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--eve-blue);
  border: 2px solid var(--eve-bg-card);
  box-shadow: 0 1px 4px rgba(15, 42, 61, 0.18);
  margin-top: -5px;
  cursor: pointer;
}

#widget-filters input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 2px;
  background: var(--eve-border);
}

#widget-filters input[type="range"]::-moz-range-thumb {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--eve-blue);
  border: 2px solid var(--eve-bg-card);
  box-shadow: 0 1px 4px rgba(15, 42, 61, 0.18);
  cursor: pointer;
}

#widget-filters #overviewFloodOpacityValue,
#widget-filters #localisationFloodOpacityValue,
#widget-filters #localisationLandcoverOpacityValue,
#widget-filters #opacityValue,
#widget-filters #floodOpacityValue {
  font-size: 11px;
  color: var(--eve-text-muted);
  display: block;
  margin-top: 3px;
}

#widget-filters #periodPicker {
  margin-top: 8px;
  display: grid;
  gap: 0;
  padding: 8px;
  border: 1px solid var(--eve-border);
  border-radius: var(--eve-radius);
  background: var(--eve-bg-card);
}

#widget-filters .period-month-card {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  margin-bottom: 6px;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: 0;
  box-shadow: none;
}

#widget-filters .period-month-card:last-child {
  margin-bottom: 0;
}

#widget-filters .period-month-label {
  color: var(--eve-text-muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.2;
  text-transform: none;
  min-width: 62px;
}

#widget-filters .period-chip-row {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
}

#widget-filters .period-chip {
  height: 28px;
  min-width: 28px;
  border-radius: 5px;
  border: 1px solid var(--eve-border);
  background: var(--eve-bg-card);
  color: var(--eve-text);
  padding: 0;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 120ms ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: none;
  box-shadow: none;
}

#widget-filters .period-chip:hover {
  border-color: var(--eve-blue-light);
  color: var(--eve-blue);
  background: var(--eve-blue-subtle);
  transform: none;
  box-shadow: none;
}

#widget-filters .period-chip.is-active {
  background: var(--eve-blue);
  color: var(--eve-bg-card);
  border-color: var(--eve-blue);
  font-weight: 600;
  box-shadow: none;
}

.mono {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.kpi-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.kpi-card {
  border: 1px solid rgba(0,0,0,0.12);
  border-radius: 10px;
  padding: 10px;
  background: var(--eve-bg-card);
}

.kpi-label {
  font-size: 12px;
  color: var(--eve-color-555);
  line-height: 1.2;
}

.kpi-value {
  font-size: 18px;
  font-weight: 700;
  margin-top: 6px;
}

.export-map-btn {
  display: block;
  width: 100%;
  border: 1px solid var(--eve-color-9db4c8);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--eve-color-f5f9fd);
  color: var(--eve-color-17354a);
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.export-map-btn:hover {
  background: var(--eve-color-eaf2fa);
}

.export-map-btn:disabled {
  opacity: 0.65;
  cursor: not-allowed;
}

.map-export-frame-layer {
  position: absolute;
  inset: 0;
  z-index: 7;
  pointer-events: none;
}

.map-export-frame-box {
  position: absolute;
  border: 2px dashed var(--eve-blue);
  background: rgba(0, 159, 218, 0.06);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7), 0 0 0 1px rgba(0, 159, 218, 0.25);
  cursor: move;
  pointer-events: auto;
  touch-action: none;
}

.map-export-frame-tag {
  position: absolute;
  top: -26px;
  left: 0;
  background: var(--eve-blue);
  color: var(--eve-bg-card);
  font-size: 11px;
  font-weight: 700;
  border-radius: 6px;
  padding: 4px 8px;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.map-export-modal {
  position: absolute;
  inset: 0;
  z-index: 8;
  pointer-events: none;
}

.map-export-modal-backdrop {
  display: none;
}

.map-export-modal-card {
  position: absolute;
  top: 12px;
  right: 12px;
  width: min(420px, calc(100% - 24px));
  max-height: calc(100% - 24px);
  overflow: auto;
  background: var(--eve-bg-card);
  border: 1px solid rgba(0, 0, 0, 0.16);
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
  padding: 14px 14px 12px;
  box-sizing: border-box;
  pointer-events: auto;
}

.map-export-title {
  font-size: 18px;
  font-weight: 700;
  color: var(--eve-color-0d2a3b);
  margin-bottom: 4px;
}

.map-export-help {
  font-size: 12px;
  color: var(--eve-color-476173);
  line-height: 1.4;
  margin-bottom: 10px;
}

.map-export-field {
  display: block;
  margin-bottom: 10px;
  font-size: 12px;
  color: var(--eve-color-2a4759);
  font-weight: 600;
}

.map-export-field select {
  margin-top: 5px;
  width: 100%;
  border: 1px solid var(--eve-color-bfd0dd);
  border-radius: 8px;
  height: 34px;
  padding: 0 9px;
  color: var(--eve-color-153244);
}

.map-export-meta {
  font-size: 12px;
  color: var(--eve-color-0f3043);
  background: var(--eve-color-f4f8fb);
  border: 1px solid var(--eve-color-d8e4ec);
  border-radius: 8px;
  padding: 8px 9px;
  line-height: 1.45;
  margin-bottom: 8px;
}

.map-export-notes {
  max-height: 140px;
  overflow: auto;
  white-space: pre-wrap;
  font-size: 11px;
  line-height: 1.4;
  color: var(--eve-color-405a6b);
  background: var(--eve-color-f8fafc);
  border: 1px solid var(--eve-color-dfe8ef);
  border-radius: 8px;
  padding: 8px 9px;
}

.map-export-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}

.map-export-btn {
  border: 1px solid var(--eve-color-9db4c8);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.map-export-btn.secondary {
  background: var(--eve-bg-card);
  color: var(--eve-color-274459);
}

.map-export-btn.primary {
  border-color: var(--eve-blue);
  background: var(--eve-blue);
  color: var(--eve-bg-card);
}

.eve-label-xs {
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--eve-text-muted);
}

.eve-separator {
  height: 1px;
  background: var(--eve-border);
  margin: 10px 0;
}

.eve-action-btn {
  height: 30px;
  padding: 0 14px;
  border-radius: var(--eve-radius);
  border: 1px solid var(--eve-border);
  background: var(--eve-bg-card);
  color: var(--eve-blue);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 120ms ease;
  display: inline-flex;
  align-items: center;
}

.eve-action-btn:hover {
  background: var(--eve-blue-subtle);
  border-color: var(--eve-blue-light);
}

.eve-primary-btn {
  height: 32px;
  padding: 0 16px;
  border-radius: var(--eve-radius);
  background: var(--eve-blue);
  color: var(--eve-bg-card);
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: background 120ms ease;
  display: inline-flex;
  align-items: center;
}

.eve-primary-btn:hover {
  background: var(--eve-blue-dark);
}

#modeTitleBar {
  display: none !important;
}

#modeTabs {
  height: 54px;
  background: linear-gradient(180deg, #f5f9fc 0%, #e8f0f7 100%);
  border-top: 1px solid rgba(0, 159, 218, 0.16);
  box-shadow: 0 -6px 20px rgba(14, 36, 51, 0.06);
  display: flex;
  flex-shrink: 0;
  z-index: 10;
  gap: 0;
  padding: 0;
}

.mode-tab {
  flex: 1;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 600;
  font-family: inherit;
  letter-spacing: 0.01em;
  cursor: pointer;
  border: none;
  border-top: 3px solid transparent;
  border-right: 1px solid rgba(14, 36, 51, 0.09);
  transition:
    background 180ms ease,
    color 180ms ease,
    border-top-color 180ms ease,
    box-shadow 180ms ease,
    transform 100ms ease;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: var(--eve-text-40);
  box-shadow: none;
}

.mode-tab[hidden],
.mode-tab[aria-hidden="true"],
#widget-filters [hidden] {
  display: none !important;
}

.mode-tab:last-child {
  border-right: none;
}

.mode-tab:hover {
  background: rgba(255, 255, 255, 0.72);
  border-top-color: rgba(0, 159, 218, 0.45);
  color: var(--eve-text-20);
  box-shadow: none;
}

.mode-tab:active {
  transform: scale(0.96);
}

.mode-tab.active {
  background: rgba(255, 255, 255, 0.95);
  border-top-color: var(--eve-blue);
  color: var(--eve-navy);
  font-weight: 700;
  border-right-color: rgba(14, 36, 51, 0.09);
  box-shadow: 0 -3px 12px rgba(0, 159, 218, 0.12);
}

#modeContent[data-active-mode="overview"] #overviewFindings {
  background: var(--eve-bg);
  border-bottom: 1px solid var(--eve-border);
  box-shadow: none;
  padding: 12px 14px;
  gap: 0;
  pointer-events: none;
}

#modeContent[data-active-mode="overview"] #overviewFindings .ov-grid,
#overviewFindings .ov-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
  padding: 0;
  background: transparent;
  border-bottom: 0;
  flex-shrink: 0;
}

#modeContent[data-active-mode="overview"] #overviewFindings .ov-card,
#overviewFindings .ov-card {
  background: var(--eve-bg-card);
  border-radius: var(--eve-radius);
  border: 1px solid var(--eve-border);
  box-shadow: var(--eve-shadow);
  padding: 12px 14px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}

#modeContent[data-active-mode="overview"] #overviewFindings .ov-card::before,
#overviewFindings .ov-card::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  right: 0;
  display: block;
  height: 6px;
  background: linear-gradient(90deg, var(--eve-color-0588c9), var(--eve-color-4fc3f7));
}

#modeContent[data-active-mode="overview"] #overviewFindings .ov-card:nth-child(2)::before,
#overviewFindings .ov-card:nth-child(2)::before {
  background: linear-gradient(90deg, var(--eve-color-c58a00), var(--eve-color-f2c35c));
}

#modeContent[data-active-mode="overview"] #overviewFindings .ov-card:nth-child(3)::before,
#overviewFindings .ov-card:nth-child(3)::before {
  background: linear-gradient(90deg, var(--eve-color-c23636), var(--eve-color-ff8a8a));
}

#modeContent[data-active-mode="overview"] #overviewFindings .ov-card:nth-child(4)::before,
#overviewFindings .ov-card:nth-child(4)::before {
  background: linear-gradient(90deg, var(--eve-color-73839c), var(--eve-color-c4ccd8));
}

#overviewFindings .ov-card-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

#overviewFindings .ov-card-head {
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 4px;
}

#overviewFindings .ov-card-icon {
  width: 30px;
  height: 30px;
  box-shadow: none;
}

#overviewFindings .ov-card-icon svg {
  width: 18px;
  height: 18px;
}

#modeContent[data-active-mode="overview"] #overviewFindings .ov-card-title,
#overviewFindings .ov-card-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--eve-text-muted);
  margin: 0 0 4px;
  line-height: 1.25;
}

#modeContent[data-active-mode="overview"] #overviewFindings .ov-row,
#overviewFindings .ov-row {
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-bottom: 0;
  font-size: inherit;
  line-height: 1.35;
}

#modeContent[data-active-mode="overview"] #overviewFindings .ov-season,
#overviewFindings .ov-season {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--eve-text-muted);
  min-width: 72px;
}

#modeContent[data-active-mode="overview"] #overviewFindings .ov-value,
#overviewFindings .ov-value {
  font-size: 14px;
  font-weight: 700;
  color: var(--eve-navy-2);
}

#modeContent[data-active-mode="overview"] #overviewFindings .ov-sub,
#overviewFindings .ov-sub {
  font-size: 11px;
  font-weight: 400;
  color: var(--eve-text-muted);
  margin-left: 6px;
}

#modeContent[data-active-mode="overview"] #overviewLeftChart,
#overviewLeftChart {
  background: var(--eve-bg-card);
  border: 0;
  border-right: 1px solid var(--eve-border);
  border-radius: 0;
  box-shadow: 2px 0 12px rgba(15, 42, 61, 0.07);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex-shrink: 0;
  padding: 0;
}

#overviewLeftChart .ovl-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--eve-text);
  margin: 0;
  padding: 14px 16px 10px;
}

#overviewLeftChart .ovl-controls {
  padding: 0 16px 10px;
  border-bottom: 1px solid var(--eve-border);
  flex-shrink: 0;
  gap: 8px;
  margin-bottom: 0;
}

#overviewLeftChart .ovl-control-block {
  gap: 5px;
}

#overviewLeftChart .ovl-control-label {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--eve-text-muted);
  margin: 8px 0 5px;
  display: block;
}

#overviewLeftChart .ovl-control-group {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  align-self: flex-start;
  gap: 5px;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  max-width: 100%;
}

#overviewLeftChart .ovl-chip {
  height: 26px;
  padding: 0 12px;
  border-radius: 5px;
  border: 1px solid var(--eve-border);
  background: var(--eve-bg-card);
  color: var(--eve-text-muted);
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: all 120ms ease;
  box-shadow: none;
}

#overviewLeftChart .ovl-chip:hover {
  background: var(--eve-blue-subtle);
  color: var(--eve-blue);
  border-color: var(--eve-blue-light);
  box-shadow: none;
}

#overviewLeftChart .ovl-chip.active {
  background: var(--eve-blue);
  color: var(--eve-bg-card);
  border-color: var(--eve-blue);
  font-weight: 600;
  box-shadow: none;
}

#overviewLeftChart .ovl-chip[data-group="indicator"] {
  height: 26px;
  padding: 0 10px;
  border-radius: 5px;
  border: 1px solid var(--eve-border);
  background: var(--eve-bg-card);
  color: var(--eve-text-muted);
  font-size: 11.5px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  justify-content: center;
  transition: all 120ms ease;
  flex: 0 1 auto;
}

#overviewLeftChart .ovl-chip[data-group="indicator"]::before {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: none;
}

#overviewLeftChart .ovl-chip[data-value="flooded_area"]::before {
  background: linear-gradient(90deg, rgba(128, 211, 242, 0.95), var(--eve-blue));
}

#overviewLeftChart .ovl-chip[data-value="flooded_cropland"]::before {
  background: linear-gradient(90deg, rgba(128, 211, 242, 0.95), var(--eve-blue));
}

#overviewLeftChart .ovl-chip[data-value="flooded_pop"]::before {
  background: linear-gradient(90deg, rgba(128, 211, 242, 0.95), var(--eve-blue));
}

#overviewLeftChart .ovl-chip[data-group="indicator"].active {
  background: var(--eve-blue-subtle);
  border-color: var(--eve-blue-light);
  color: var(--eve-text);
  font-weight: 600;
}

#overviewLeftChart .ovl-select {
  width: 100%;
  min-height: 30px;
  border: 1px solid var(--eve-border);
  border-radius: 5px;
  background: var(--eve-bg-card);
  color: var(--eve-text);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  padding: 5px 8px;
}

#overviewLeftChart .ovl-sub {
  font-size: 11px;
  color: var(--eve-text-muted);
  padding: 8px 16px 6px;
  border-bottom: 1px solid var(--eve-border);
  line-height: 1.5;
  margin: 0;
}

#overviewLeftChart .ovl-ranking-head {
  padding: 12px 16px 10px;
  border-bottom: 1px solid var(--eve-border);
  background: var(--eve-bg-card);
  flex-shrink: 0;
}

#overviewLeftChart .ovl-ranking-pill {
  display: inline-flex;
  max-width: 100%;
  min-height: 22px;
  align-items: center;
  border: 1px solid var(--ovl-breakdown-color, var(--eve-blue));
  border-radius: 999px;
  background: var(--ovl-breakdown-tint, rgba(0, 159, 218, 0.08));
  color: var(--eve-text);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  padding: 3px 9px;
}

#overviewLeftChart .ovl-ranking-filter {
  align-items: center;
  margin-top: 6px;
  color: var(--eve-text-muted);
  display: flex;
  font-size: 11px;
  gap: 8px;
  justify-content: space-between;
  line-height: 1.3;
}

#overviewLeftChart .ovl-remove-filter {
  border: 1px solid rgba(0, 159, 218, 0.32);
  border-radius: 999px;
  background: rgba(0, 159, 218, 0.08);
  color: var(--eve-blue);
  cursor: pointer;
  flex: 0 0 auto;
  font: inherit;
  font-size: 10.5px;
  font-weight: 700;
  padding: 3px 8px;
}

#overviewLeftChart .ovl-remove-filter:hover,
#overviewLeftChart .ovl-remove-filter:focus-visible {
  background: var(--eve-blue);
  color: var(--eve-bg-card);
  outline: none;
}

#overviewLeftChart .ovl-chart {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 42, 61, 0.18) transparent;
}

#overviewLeftChart .ovl-chart::-webkit-scrollbar {
  width: 5px;
}

#overviewLeftChart .ovl-chart::-webkit-scrollbar-track {
  background: transparent;
}

#overviewLeftChart .ovl-chart::-webkit-scrollbar-thumb {
  background: rgba(15, 42, 61, 0.18);
  border-radius: 3px;
}

#overviewLeftChart .ovl-bars {
  display: flex;
  flex-direction: column;
  gap: 0;
}

#overviewLeftChart .ovl-breakdown-row,
#overviewLeftChart .ovl-row-btn {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) minmax(82px, max-content);
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 14px;
  border: 0;
  border-bottom: 1px solid var(--eve-color-eef2f6);
  background: var(--eve-bg-card);
  cursor: pointer;
  transition: background 120ms ease;
  text-align: left;
  border-radius: 0;
}

#overviewLeftChart .ovl-breakdown-row:nth-child(even) {
  background: var(--eve-bg-card);
}

#overviewLeftChart .ovl-breakdown-row:hover {
  background: var(--eve-color-f4f8fb);
}

#overviewLeftChart .ovl-row-btn.selected {
  padding: 7px 14px;
  margin: 0;
  background: var(--eve-blue-subtle);
  border-radius: 0;
}

#overviewLeftChart .ovl-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--eve-text);
  min-width: 100px;
  flex: 0 0 100px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#overviewLeftChart .ovl-breakdown-rank {
  color: var(--eve-text-muted);
  font-size: 11px;
  font-weight: 700;
  text-align: right;
}

#overviewLeftChart .ovl-breakdown-name {
  position: relative;
  min-width: 0;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--eve-color-f4f8fb);
  color: var(--eve-text);
  font-size: 12px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#overviewLeftChart .ovl-breakdown-name::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--ovl-breakdown-fill, 0%);
  border-radius: 4px;
  background: var(--ovl-breakdown-tint, rgba(0, 159, 218, 0.24));
  pointer-events: none;
  transform-origin: left;
  animation: eve-bar-fill 500ms ease-out both;
}

#overviewLeftChart .ovl-breakdown-row:nth-child(2)  .ovl-breakdown-name::before { animation-delay: 40ms; }
#overviewLeftChart .ovl-breakdown-row:nth-child(3)  .ovl-breakdown-name::before { animation-delay: 80ms; }
#overviewLeftChart .ovl-breakdown-row:nth-child(4)  .ovl-breakdown-name::before { animation-delay: 120ms; }
#overviewLeftChart .ovl-breakdown-row:nth-child(5)  .ovl-breakdown-name::before { animation-delay: 160ms; }
#overviewLeftChart .ovl-breakdown-row:nth-child(6)  .ovl-breakdown-name::before { animation-delay: 200ms; }
#overviewLeftChart .ovl-breakdown-row:nth-child(7)  .ovl-breakdown-name::before { animation-delay: 240ms; }
#overviewLeftChart .ovl-breakdown-row:nth-child(8)  .ovl-breakdown-name::before { animation-delay: 280ms; }
#overviewLeftChart .ovl-breakdown-row:nth-child(9)  .ovl-breakdown-name::before { animation-delay: 320ms; }
#overviewLeftChart .ovl-breakdown-row:nth-child(10) .ovl-breakdown-name::before { animation-delay: 360ms; }

#overviewLeftChart .ovl-breakdown-name-text {
  position: relative;
  z-index: 1;
}

#overviewLeftChart .ovl-breakdown-value {
  color: var(--eve-text);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  text-align: right;
  min-width: 82px;
}

#overviewLeftChart .ovl-bar-stack {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

#overviewLeftChart .ovl-bar-line {
  display: flex;
  align-items: center;
  gap: 6px;
}

#overviewLeftChart .ovl-bar-track {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--eve-color-eef2f6);
  overflow: hidden;
}

#overviewLeftChart .ovl-bar-fill {
  height: 100%;
  border-radius: 3px;
}

#overviewLeftChart .ovl-bar-fill.area {
  background: linear-gradient(90deg, rgba(128, 211, 242, 0.95), var(--eve-blue));
}

#overviewLeftChart .ovl-bar-fill.crop {
  background: linear-gradient(90deg, rgba(128, 211, 242, 0.95), var(--eve-blue));
}

#overviewLeftChart .ovl-bar-fill.people {
  background: linear-gradient(90deg, rgba(128, 211, 242, 0.95), var(--eve-blue));
}

#overviewLeftChart .ovl-bar-fill.selected-metric {
  background: var(--eve-blue);
}

#overviewLeftChart .ovl-val,
#overviewLeftChart .ovl-val.area,
#overviewLeftChart .ovl-val.crop,
#overviewLeftChart .ovl-val.people {
  font-size: 11px;
  font-weight: 600;
  color: var(--eve-text-muted);
  min-width: 48px;
  text-align: right;
  flex-shrink: 0;
}

#seasonalityLeftChart .ovl-bars {
  display: flex;
  flex-direction: column;
  gap: 0;
}

#seasonalityLeftChart .ovl-ranking-head {
  padding: 12px 16px 10px;
  border-bottom: 1px solid var(--eve-border);
  background: var(--eve-bg-card);
  flex-shrink: 0;
}

#seasonalityLeftChart .ovl-ranking-pill {
  display: inline-flex;
  max-width: 100%;
  min-height: 22px;
  align-items: center;
  border: 1px solid var(--ovl-breakdown-color, var(--eve-blue));
  border-radius: 999px;
  background: var(--ovl-breakdown-tint, rgba(0, 159, 218, 0.08));
  color: var(--eve-text);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.2;
  padding: 3px 9px;
}

#seasonalityLeftChart .ovl-breakdown-row,
#seasonalityLeftChart .ovl-row-btn {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr) minmax(82px, max-content);
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 7px 14px;
  border: 0;
  border-bottom: 1px solid var(--eve-color-eef2f6);
  background: var(--eve-bg-card);
  cursor: pointer;
  transition: background 120ms ease;
  text-align: left;
  border-radius: 0;
}

#seasonalityLeftChart .ovl-breakdown-row:hover,
#seasonalityLeftChart .ovl-breakdown-row:focus-visible {
  background: var(--eve-color-f4f8fb);
  box-shadow: none;
}

#seasonalityLeftChart .ovl-row-btn.selected {
  padding: 7px 14px;
  margin: 0;
  background: var(--eve-blue-subtle);
  border-radius: 0;
}

#seasonalityLeftChart .ovl-breakdown-rank {
  color: var(--eve-text-muted);
  font-size: 11px;
  font-weight: 700;
  text-align: right;
}

#seasonalityLeftChart .ovl-breakdown-name {
  position: relative;
  min-width: 0;
  padding: 3px 8px;
  border-radius: 4px;
  background: var(--eve-color-f4f8fb);
  color: var(--eve-text);
  font-size: 12px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#seasonalityLeftChart .ovl-breakdown-name::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--ovl-breakdown-fill, 0%);
  border-radius: 4px;
  background: var(--ovl-breakdown-tint, rgba(0, 159, 218, 0.24));
  pointer-events: none;
}

#seasonalityLeftChart .ovl-breakdown-name-text {
  position: relative;
  z-index: 1;
}

#seasonalityLeftChart .ovl-breakdown-value {
  color: var(--eve-text);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  text-align: right;
  min-width: 82px;
}

#overviewExposureFloodMaskBtn {
  width: calc(100% - 24px);
  justify-content: center;
  margin: -2px 12px 10px;
  height: 30px;
  padding: 0 14px;
  border-radius: var(--eve-radius);
  border: 1px solid var(--eve-border);
  background: var(--eve-bg-card);
  color: var(--eve-blue);
  font-size: 12px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 120ms ease;
  display: inline-flex;
  align-items: center;
  box-shadow: none;
}

#overviewExposureFloodMaskBtn:hover {
  background: var(--eve-blue-subtle);
  border-color: var(--eve-blue-light);
}

#overviewExposureFloodMaskBtn.active {
  background: var(--eve-blue);
  color: var(--eve-bg-card);
  border-color: var(--eve-blue);
}

.eve-panel-enter {
  opacity: 0;
  transform: translateY(5px);
}

.eve-panel-enter-active {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 140ms ease-out, transform 140ms ease-out;
}

#modeContent[data-active-mode="overview"] #overviewFindings .ov-grid,
#overviewFindings .ov-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

#modeContent[data-active-mode="overview"] #overviewFindings .ov-card,
#overviewFindings .ov-card {
  min-width: 0;
  min-height: 90px;
  height: auto;
}

#modeContent[data-active-mode="overview"] #overviewFindings .ov-card-title,
#overviewFindings .ov-card-title {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 100%;
  display: block;
}

#modeContent[data-active-mode="overview"] #overviewFindings .ov-row,
#overviewFindings .ov-row {
  flex-wrap: wrap;
  min-width: 0;
}

#modeContent[data-active-mode="overview"] #overviewFindings .ov-value,
#overviewFindings .ov-value {
  font-size: clamp(11px, 1.4vw, 14px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
  flex-shrink: 1;
}

#modeContent[data-active-mode="overview"] #overviewFindings .ov-sub,
#overviewFindings .ov-sub {
  white-space: nowrap;
  flex-shrink: 0;
}

@media (max-width: 1200px) {
  #modeContent[data-active-mode="overview"] #overviewFindings .ov-grid,
  #overviewFindings .ov-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  #modeContent[data-active-mode="overview"] #overviewFindings .ov-grid,
  #overviewFindings .ov-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}

#modeContent[data-active-mode="overview"] #overviewFindings .ov-grid,
#overviewFindings .ov-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

#modeContent[data-active-mode="overview"] #overviewFindings .ov-card,
#overviewFindings .ov-card {
  height: auto;
  min-height: 0;
}

#modeContent[data-active-mode="overview"] #overviewFindings .ov-card-title,
#overviewFindings .ov-card-title {
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  word-break: break-word;
  line-height: 1.3;
  margin-bottom: 6px;
  font-size: clamp(9px, 0.85vw, 11px);
}

#modeContent[data-active-mode="overview"] #overviewFindings .ov-season,
#overviewFindings .ov-season {
  font-size: clamp(8.5px, 0.75vw, 9.5px);
}

#modeContent[data-active-mode="overview"] #overviewFindings .ov-value,
#overviewFindings .ov-value {
  font-size: clamp(12px, 1.2vw, 14px);
  white-space: nowrap;
}

#modeContent[data-active-mode="overview"] #overviewFindings .ov-sub,
#overviewFindings .ov-sub {
  font-size: clamp(10px, 0.9vw, 11px);
  white-space: nowrap;
}

@media (max-width: 1300px) {
  #modeContent[data-active-mode="overview"] #overviewFindings {
    padding: 9px 10px;
  }

  #modeContent[data-active-mode="overview"] #overviewFindings .ov-grid,
  #overviewFindings .ov-grid {
    gap: 7px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  #modeContent[data-active-mode="overview"] #overviewFindings .ov-card,
  #overviewFindings .ov-card {
    padding: 9px 10px;
    gap: 3px;
  }
}

@media (max-width: 1000px) {
  #modeContent[data-active-mode="overview"] #overviewFindings {
    padding: 7px 8px;
  }

  #modeContent[data-active-mode="overview"] #overviewFindings .ov-grid,
  #overviewFindings .ov-grid {
    gap: 5px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  #modeContent[data-active-mode="overview"] #overviewFindings .ov-card,
  #overviewFindings .ov-card {
    padding: 7px 8px;
    gap: 2px;
  }
}

@media (max-width: 680px) {
  #modeContent[data-active-mode="overview"] #overviewFindings .ov-grid,
  #overviewFindings .ov-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #modeContent[data-active-mode="overview"] #overviewFindings .ov-card:nth-child(n+3),
  #overviewFindings .ov-card:nth-child(n+3) {
    display: none;
  }
}

@media (max-width: 420px) {
  #modeContent[data-active-mode="overview"] #overviewFindings .ov-grid,
  #overviewFindings .ov-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}

#livestockMode {
  background: var(--eve-bg-card);
  border: 0;
  border-right: 1px solid var(--eve-border);
  box-shadow: 2px 0 12px rgba(15, 42, 61, 0.07);
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 42, 61, 0.18) transparent;
}

#livestockMode::-webkit-scrollbar,
#livestockMode .ls-impact-main::-webkit-scrollbar,
#livestockMode .ls-breakdown::-webkit-scrollbar {
  width: 5px;
}

#livestockMode::-webkit-scrollbar-track,
#livestockMode .ls-impact-main::-webkit-scrollbar-track,
#livestockMode .ls-breakdown::-webkit-scrollbar-track {
  background: transparent;
}

#livestockMode::-webkit-scrollbar-thumb,
#livestockMode .ls-impact-main::-webkit-scrollbar-thumb,
#livestockMode .ls-breakdown::-webkit-scrollbar-thumb {
  background: rgba(15, 42, 61, 0.18);
  border-radius: 3px;
}

#livestockMode .ls-impact-shell {
  display: grid;
  grid-template-columns: minmax(0, var(--impact-panel-width)) minmax(0, 312px);
  height: 100%;
  min-height: 0;
}

#livestockMode .ls-impact-shell[data-breakdown-open="0"] {
  grid-template-columns: minmax(0, 1fr);
}

#livestockMode .ls-impact-main {
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 42, 61, 0.18) transparent;
}

#livestockMode .ls-subhead {
  font-size: 11.5px;
  color: var(--eve-text-muted);
  line-height: 1.6;
  padding: 12px 14px;
  border-bottom: 1px solid var(--eve-border);
  background: var(--eve-color-f9fafb);
  margin: 0;
}

#livestockMode .ls-impact-unit-toggle {
  display: flex;
  align-items: center;
  visibility: visible;
  opacity: 1;
  position: sticky;
  top: 0;
  z-index: 3;
  border: 0;
  border-bottom: 1px solid var(--eve-border);
  border-radius: 0;
  overflow: visible;
  margin: 0;
  padding: 10px 14px;
  background: var(--eve-bg-card);
  align-self: stretch;
  flex-shrink: 0;
}

#livestockMode .ls-impact-unit-label {
  display: inline-flex;
  align-items: center;
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--eve-text-muted);
  margin-right: 8px;
  padding: 0;
  flex-shrink: 0;
}

#livestockMode .ls-impact-unit-btn {
  height: 28px;
  padding: 0 14px;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border: 1px solid var(--eve-border);
  border-right: 0;
  border-radius: 0;
  background: var(--eve-bg-card);
  color: var(--eve-text-muted);
  transition: all 120ms ease;
  box-shadow: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

#livestockMode .ls-impact-unit-btn:first-of-type {
  border-radius: 6px 0 0 6px;
}

#livestockMode .ls-impact-unit-btn:last-of-type {
  border-right: 1px solid var(--eve-border);
  border-radius: 0 6px 6px 0;
}

#livestockMode .ls-impact-unit-btn.active {
  background: var(--eve-blue);
  color: var(--eve-bg-card);
  border-color: var(--eve-blue);
  font-weight: 600;
}

#livestockMode .ls-impact-unit-btn:hover:not(.active) {
  background: var(--eve-blue-subtle);
  color: var(--eve-blue);
}

#livestockMode .ls-grid,
#modeContent[data-active-mode="impact-analysis"] #livestockMode .ls-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 0;
}

#livestockMode .ls-panel {
  border: 0;
  border-radius: 0;
  background: var(--eve-bg-card);
  box-shadow: none;
  padding: 0;
  margin: 0;
}

#livestockMode .ls-panel-title {
  font-size: 12.5px;
  font-weight: 700;
  color: var(--eve-text);
  padding: 12px 14px 6px;
  border-bottom: 1px solid var(--eve-border);
  border-top: 1px solid var(--eve-border);
  background: var(--eve-color-f9fafb);
  margin-top: 2px;
  display: block;
}

#livestockMode .ls-chart {
  padding: 0;
  margin: 0;
}

#livestockMode .ls-row {
  display: block;
  padding: 0;
  margin: 0;
}

#livestockMode .ls-row-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--eve-text);
  padding: 8px 14px 2px;
  display: block;
}

#livestockMode .ls-row.no-item-label .ls-row-label {
  display: none;
}

#livestockMode .ls-row-bars {
  display: flex;
  flex-direction: column;
  gap: 0;
}

#livestockMode .ls-bar-line {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 14px;
  cursor: pointer;
  transition: background 120ms ease;
  border: 0;
  border-radius: 0;
  background: transparent;
  width: 100%;
  text-align: left;
}

#livestockMode .ls-bar-line:hover {
  background: var(--eve-color-f4f8fb);
}

#livestockMode .ls-bar-line.active {
  background: var(--eve-blue-subtle);
  border-left: 3px solid var(--ls-selected-bar-color, var(--eve-blue));
  padding-left: 11px;
}

#livestockMode .ls-bar-meta {
  font-size: 12px;
  color: var(--eve-text-muted);
  min-width: 72px;
  flex-shrink: 0;
  font-weight: 500;
}

#livestockMode .ls-bar-stack {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

#livestockMode .ls-bar-track {
  flex: 1;
  height: 8px;
  border-radius: 4px;
  background: var(--eve-color-eef2f6);
  overflow: hidden;
  position: relative;
}

#livestockMode .ls-bar-fill {
  height: 100%;
  border-radius: 4px;
  transition: width 200ms ease;
}

#livestockMode .ls-bar-line:nth-child(1) .ls-bar-fill {
  background: var(--eve-blue);
}

#livestockMode .ls-bar-line:nth-child(2) .ls-bar-fill {
  background: var(--eve-cropland);
}

#livestockMode .ls-bar-line:nth-child(3) .ls-bar-fill {
  background: var(--eve-exceptional);
}

#livestockMode .ls-bar-value {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--eve-text-muted);
  min-width: 48px;
  text-align: right;
  white-space: nowrap;
}

#livestockMode .ls-breakdown {
  background: var(--eve-bg-soft);
  border-right: 1px solid var(--eve-border);
  border-left: 3px solid var(--ls-breakdown-accent, var(--eve-cropland));
  box-shadow: 2px 0 12px rgba(15, 42, 61, 0.07);
  overflow-y: auto;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  padding: 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 42, 61, 0.18) transparent;
}

#livestockMode .ls-breakdown-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
  padding: 0;
  border-bottom: 1px solid var(--eve-border);
  background: var(--eve-bg-soft);
}

#livestockMode .ls-breakdown-kicker {
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--eve-blue);
  padding: 12px 14px 2px;
  display: block;
  margin: 0;
}

#livestockMode .ls-breakdown-close {
  justify-self: end;
  align-self: start;
  height: 24px;
  padding: 0 10px;
  border-radius: var(--eve-radius);
  border: 1px solid var(--eve-border);
  background: var(--eve-bg-card);
  color: var(--eve-blue);
  font-size: 11px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 120ms ease;
  display: inline-flex;
  align-items: center;
  margin: 10px 10px 0 0;
}

#livestockMode .ls-breakdown-close:hover {
  background: var(--eve-blue-subtle);
  border-color: var(--eve-blue-light);
}

#livestockMode .ls-breakdown-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--eve-text);
  padding: 2px 14px 6px;
  line-height: 1.3;
  margin: 0;
}

#livestockMode .ls-breakdown-sub {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 10px;
  border-radius: 11px;
  background: var(--ls-breakdown-accent-soft, var(--eve-amber-soft));
  border: 1px solid var(--ls-breakdown-accent, var(--eve-cropland));
  color: var(--eve-amber-text);
  font-size: 11px;
  font-weight: 600;
  margin: 0 14px 10px;
  max-width: calc(100% - 28px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#livestockMode .ls-breakdown-body {
  min-height: 0;
  overflow: visible;
}

#livestockMode .ls-breakdown-row {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  border-bottom: 1px solid var(--eve-color-eef2f6);
  transition: background 120ms ease;
}

#livestockMode .ls-breakdown-row:hover {
  background: var(--eve-color-f9fafb);
}

#livestockMode .ls-breakdown-rank {
  font-size: 11px;
  font-weight: 700;
  color: var(--eve-text-muted);
  min-width: 18px;
  flex-shrink: 0;
}

#livestockMode .ls-breakdown-name {
  background: var(--eve-color-f4f8fb);
  border-radius: 4px;
  padding: 3px 8px;
  font-size: 12px;
  font-weight: 600;
  color: var(--eve-text);
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
  position: relative;
}

#livestockMode .ls-breakdown-name::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  display: block;
  width: var(--ls-breakdown-fill, 0%);
  background: var(--ls-breakdown-color, rgba(44, 167, 222, 0.24));
  border-radius: 4px;
  pointer-events: none;
}

#livestockMode .ls-breakdown-name-text {
  position: relative;
  z-index: 1;
}

#livestockMode .ls-breakdown-flash {
  height: 22px;
  padding: 0 9px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
  background: var(--eve-color-eef2f6);
  color: var(--eve-blue);
  border: none;
  cursor: pointer;
  flex-shrink: 0;
  transition: background 120ms ease;
}

#livestockMode .ls-breakdown-flash:hover {
  background: var(--eve-blue-hover);
}

#livestockMode .ls-breakdown-value {
  font-size: 12px;
  font-weight: 600;
  color: var(--eve-text);
  white-space: nowrap;
  flex-shrink: 0;
  margin-left: auto;
  min-width: 54px;
  text-align: right;
}

#timeAnalysisMode {
  background: var(--eve-bg-card);
  border-top: 1px solid var(--eve-border);
  box-shadow: 0 -4px 16px rgba(15, 42, 61, 0.07);
  padding: 12px 14px 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

#timeAnalysisMode .ta-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  align-items: start;
  gap: 12px;
  margin-bottom: 8px;
  min-width: 0;
}

#timeAnalysisMode .ta-header-line {
  grid-column: 1;
  grid-row: 1;
  gap: 2px;
  min-width: 0;
}

#timeAnalysisMode .ta-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--eve-text);
  margin-bottom: 2px;
  line-height: 1.3;
}

#timeAnalysisMode .ta-sub {
  font-size: 11px;
  color: var(--eve-text-muted);
  line-height: 1.5;
  margin-bottom: 0;
}

#timeAnalysisMode .ta-tabs {
  display: inline-flex;
  flex: 0 0 auto;
  gap: 4px;
  flex-wrap: nowrap;
  margin: 0;
  align-items: center;
  padding: 3px;
  border: 1px solid var(--eve-border);
  border-radius: 6px;
  background: var(--eve-color-eef2f6);
  justify-self: end;
  white-space: nowrap;
}

#timeAnalysisMode #taTabs {
  grid-column: 2;
  grid-row: 1;
}

#timeAnalysisMode #taFloodTabs {
  grid-column: 3;
  grid-row: 1;
  margin-top: 0;
}

#timeAnalysisMode .ta-animation-panel {
  grid-column: 4;
  grid-row: 1;
  justify-self: end;
  display: grid;
  gap: 5px;
  min-width: 172px;
  max-width: 320px;
}

#timeAnalysisMode .ta-animation-primary,
#timeAnalysisMode .ta-animation-stop,
#timeAnalysisMode .ta-animation-run,
#timeAnalysisMode .ta-animation-export,
#timeAnalysisMode .ta-animation-cancel {
  height: 31px;
  border-radius: 6px;
  border: 1px solid var(--eve-blue);
  font-family: inherit;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  white-space: nowrap;
}

#timeAnalysisMode .ta-animation-primary,
#timeAnalysisMode .ta-animation-run {
  background: var(--eve-blue);
  color: var(--eve-bg-card);
  box-shadow: 0 8px 18px rgba(0, 159, 218, 0.2);
}

#timeAnalysisMode .ta-animation-export {
  border-color: rgba(0, 159, 218, 0.42);
  background: var(--eve-bg-card);
  color: var(--eve-blue);
}

#timeAnalysisMode .ta-animation-stop {
  border-color: var(--eve-data-red);
  background: var(--eve-data-red);
  color: var(--eve-bg-card);
}

#timeAnalysisMode .ta-animation-cancel {
  border-color: var(--eve-border);
  background: var(--eve-bg-card);
  color: var(--eve-text-muted);
}

#timeAnalysisMode .ta-animation-primary:disabled,
#timeAnalysisMode .ta-animation-run:disabled,
#timeAnalysisMode .ta-animation-export:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  box-shadow: none;
}

#timeAnalysisMode .ta-animation-range {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto auto;
  gap: 6px;
  align-items: center;
  padding: 5px;
  border: 1px solid rgba(0, 159, 218, 0.28);
  border-radius: 7px;
  background: rgba(238, 247, 252, 0.96);
}

#timeAnalysisMode .ta-animation-range[hidden] {
  display: none;
}

#timeAnalysisMode .ta-export-progress {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 6px 8px;
  border: 1px solid rgba(0, 159, 218, 0.28);
  border-radius: 7px;
  background: rgba(255, 255, 255, 0.96);
}

#timeAnalysisMode .ta-export-progress[hidden] {
  display: none;
}

#timeAnalysisMode .ta-export-progress-ring {
  --ta-export-progress: 0%;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at center, var(--eve-bg-card) 57%, transparent 58%),
    conic-gradient(var(--eve-blue) var(--ta-export-progress), rgba(0, 159, 218, 0.14) 0);
  color: var(--eve-color-0f3f76);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
}

#timeAnalysisMode .ta-export-progress-text {
  min-width: 0;
  color: var(--eve-text);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}

#timeAnalysisMode #taAnimationRangeText {
  min-width: 0;
  color: var(--eve-text);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.25;
}

#timeAnalysisMode .ta-animation-hint {
  color: var(--eve-text-muted);
  font-size: 10.5px;
  line-height: 1.35;
}

#timeAnalysisMode .ta-animation-hint:empty {
  display: none;
}

#timeAnalysisMode #taFloodTabs .ta-tab:first-child {
  border-left: 1px solid var(--eve-border);
  padding-left: 12px;
  margin-left: 0;
}

#timeAnalysisMode .ta-tab {
  height: 27px;
  padding: 0 12px;
  border-radius: 5px;
  font-size: 12px;
  font-weight: 500;
  font-family: inherit;
  border: 1px solid var(--eve-border);
  background: var(--eve-bg-card);
  color: var(--eve-text-muted);
  cursor: pointer;
  transition: all 120ms ease;
  white-space: nowrap;
  box-shadow: none;
}

#timeAnalysisMode .ta-tab.active {
  background: var(--eve-blue);
  color: var(--eve-bg-card);
  border-color: var(--eve-blue);
  font-weight: 600;
  box-shadow: none;
}

#timeAnalysisMode .ta-tab:hover:not(.active) {
  background: var(--eve-blue-subtle);
  color: var(--eve-blue);
  border-color: var(--eve-blue-light);
}

#timeAnalysisMode .ta-chart-wrap {
  flex: 1;
  min-height: 0;
  width: 100%;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

#timeAnalysisMode .ta-empty-guidance {
  width: 100%;
  color: var(--eve-text);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.45;
  text-align: center;
}

@media (max-width: 1180px) {
  #timeAnalysisMode .ta-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 8px 12px;
  }

  #timeAnalysisMode #taTabs {
    grid-column: 2;
  }

  #timeAnalysisMode #taFloodTabs {
    grid-column: 2;
    grid-row: 2;
  }

  #timeAnalysisMode .ta-animation-panel {
    grid-column: 1 / -1;
    grid-row: 3;
    justify-self: stretch;
    max-width: none;
  }
}

#widget-filters #impactMappingSection {
  background: var(--eve-bg-card);
  border: 1px solid var(--eve-border);
  border-radius: var(--eve-radius);
  box-shadow: var(--eve-shadow);
  margin: 0 12px 10px;
  padding: 12px 14px;
}

#livestockMode .mapping-panel-shell {
  height: 100%;
}

#livestockMode .mapping-panel-main {
  height: 100%;
  overflow: auto;
}

#livestockMode .mapping-panel-mount {
  min-height: 0;
}

#livestockMode #impactMappingSection {
  background: var(--eve-bg-card);
  border: 0;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
  padding: 14px 16px 16px;
}

#livestockMode .mapping-accordion {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

#livestockMode .mapping-layer-section {
  border: 1px solid var(--eve-border);
  border-radius: var(--eve-radius);
  background: var(--eve-bg-card);
  overflow: hidden;
}

#livestockMode .mapping-layer-section summary {
  align-items: center;
  cursor: pointer;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  list-style: none;
  min-height: 38px;
  padding: 9px 11px;
}

#livestockMode .mapping-layer-section summary::-webkit-details-marker {
  display: none;
}

#livestockMode .mapping-layer-section summary::before {
  color: var(--eve-blue);
  content: ">";
  flex: 0 0 auto;
  font-size: 12px;
  transform: rotate(0deg);
  transition: transform 120ms ease;
}

#livestockMode .mapping-layer-section[open] summary::before {
  transform: rotate(90deg);
}

#livestockMode .mapping-layer-title {
  color: var(--eve-text-00);
  flex: 1 1 auto;
  font-size: 12px;
  font-weight: 800;
  min-width: 0;
}

#livestockMode .mapping-layer-status {
  border-radius: 999px;
  flex: 0 0 auto;
  font-size: 10px;
  font-weight: 800;
  line-height: 1;
  padding: 5px 8px;
  text-transform: uppercase;
}

#livestockMode .mapping-layer-status.visible {
  background: rgba(0, 159, 218, 0.1);
  color: var(--eve-blue);
}

#livestockMode .mapping-layer-status.off {
  background: var(--eve-bg-10);
  color: var(--eve-text-muted);
}

#livestockMode .mapping-layer-status.masked {
  background: rgba(217, 164, 65, 0.16);
  color: var(--eve-color-b5841f);
}

#livestockMode .mapping-layer-body {
  border-top: 1px solid var(--eve-border);
  padding: 11px;
}

#livestockMode .mapping-layer-off-btn {
  align-items: center;
  background: var(--eve-bg-card);
  border: 1px solid rgba(0, 159, 218, 0.28);
  border-radius: var(--eve-radius);
  color: var(--eve-blue);
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-size: 11.5px;
  font-weight: 700;
  height: 28px;
  justify-content: center;
  margin: 0 0 10px;
  padding: 0 10px;
  width: 100%;
}

#livestockMode .mapping-layer-off-btn:hover:not(:disabled),
#livestockMode .mapping-layer-off-btn:focus-visible:not(:disabled) {
  background: var(--eve-blue);
  color: var(--eve-bg-card);
  outline: none;
}

#livestockMode .mapping-layer-off-btn:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

#livestockMode #impactMappingSection calcite-label {
  display: block;
  margin: 0 0 10px;
  min-width: 0;
}

#livestockMode #impactMappingSection calcite-label[hidden],
#livestockMode #impactMappingSection button[hidden] {
  display: none !important;
}

#widget-filters #advancedMappingSection,
#livestockMode #advancedMappingSection {
  background: var(--eve-color-f9fafb);
  border: 1px solid var(--eve-border);
  border-radius: var(--eve-radius);
  margin: 8px 0 10px;
  padding: 10px;
}

#widget-filters #seasonCtrl,
#widget-filters #unitCtrl,
#widget-filters #mappingModeCtrl,
#livestockMode #seasonCtrl,
#livestockMode #unitCtrl,
#livestockMode #mappingModeCtrl {
  display: flex;
  border: 1px solid var(--eve-border);
  border-radius: var(--eve-radius);
  overflow: hidden;
  width: 100%;
}

#widget-filters #seasonCtrl calcite-segmented-control-item,
#widget-filters #unitCtrl calcite-segmented-control-item,
#widget-filters #mappingModeCtrl calcite-segmented-control-item,
#livestockMode #seasonCtrl calcite-segmented-control-item,
#livestockMode #unitCtrl calcite-segmented-control-item,
#livestockMode #mappingModeCtrl calcite-segmented-control-item {
  flex: 1;
  min-height: 30px;
  height: 30px;
  font-size: 11.5px;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  border: none;
  border-right: 1px solid var(--eve-border);
  background: var(--eve-bg-card);
  color: var(--eve-text-muted);
  transition: all 120ms ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

#widget-filters #seasonCtrl calcite-segmented-control-item:last-child,
#widget-filters #unitCtrl calcite-segmented-control-item:last-child,
#widget-filters #mappingModeCtrl calcite-segmented-control-item:last-child,
#livestockMode #seasonCtrl calcite-segmented-control-item:last-child,
#livestockMode #unitCtrl calcite-segmented-control-item:last-child,
#livestockMode #mappingModeCtrl calcite-segmented-control-item:last-child {
  border-right: none;
}

#widget-filters #seasonCtrl calcite-segmented-control-item:hover,
#widget-filters #unitCtrl calcite-segmented-control-item:hover,
#widget-filters #mappingModeCtrl calcite-segmented-control-item:hover,
#livestockMode #seasonCtrl calcite-segmented-control-item:hover,
#livestockMode #unitCtrl calcite-segmented-control-item:hover,
#livestockMode #mappingModeCtrl calcite-segmented-control-item:hover {
  background: var(--eve-blue-subtle);
  color: var(--eve-blue);
}

#widget-filters #seasonCtrl calcite-segmented-control-item[checked],
#widget-filters #unitCtrl calcite-segmented-control-item[checked],
#widget-filters #mappingModeCtrl calcite-segmented-control-item[checked],
#livestockMode #seasonCtrl calcite-segmented-control-item[checked],
#livestockMode #unitCtrl calcite-segmented-control-item[checked],
#livestockMode #mappingModeCtrl calcite-segmented-control-item[checked] {
  background: var(--eve-blue);
  color: var(--eve-bg-card);
  font-weight: 600;
}

#widget-filters #seasonCtrl calcite-segmented-control-item::part(container),
#widget-filters #unitCtrl calcite-segmented-control-item::part(container),
#widget-filters #mappingModeCtrl calcite-segmented-control-item::part(container),
#widget-filters #seasonCtrl calcite-segmented-control-item::part(control),
#widget-filters #unitCtrl calcite-segmented-control-item::part(control),
#widget-filters #mappingModeCtrl calcite-segmented-control-item::part(control),
#livestockMode #seasonCtrl calcite-segmented-control-item::part(container),
#livestockMode #unitCtrl calcite-segmented-control-item::part(container),
#livestockMode #mappingModeCtrl calcite-segmented-control-item::part(container),
#livestockMode #seasonCtrl calcite-segmented-control-item::part(control),
#livestockMode #unitCtrl calcite-segmented-control-item::part(control),
#livestockMode #mappingModeCtrl calcite-segmented-control-item::part(control) {
  border: none;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  box-shadow: none;
}

#widget-filters #openExportMapBtn,
#livestockMode #openExportMapBtn {
  width: 100%;
  justify-content: center;
  margin-top: 6px;
  height: 32px;
  padding: 0 16px;
  border-radius: var(--eve-radius);
  background: var(--eve-blue);
  color: var(--eve-bg-card);
  font-size: 12.5px;
  font-weight: 600;
  font-family: inherit;
  border: none;
  cursor: pointer;
  transition: background 120ms ease;
  display: inline-flex;
  align-items: center;
}

#widget-filters #openExportMapBtn:hover,
#livestockMode #openExportMapBtn:hover {
  background: var(--eve-blue-dark);
}

.map-export-field select {
  font-size: 11.5px;
}
#localisationSplash {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

#localisationSplash[hidden] {
  display: none !important;
}

.localisation-splash-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(14, 36, 51, 0.45);
  backdrop-filter: blur(2px);
}

.localisation-splash-card {
  background: var(--eve-bg-card);
  border-radius: var(--eve-radius-lg);
  box-shadow: var(--eve-shadow-md);
  max-width: 560px;
  width: calc(100% - 48px);
  padding: 28px 32px;
  position: relative;
  top: auto;
  right: auto;
  left: auto;
  transform: none;
  max-height: 80vh;
  overflow-y: auto;
  border: 0;
  z-index: 1;
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 42, 61, 0.18) transparent;
}

.localisation-splash-card {
  max-width: 760px;
}

.localisation-splash-card::-webkit-scrollbar {
  width: 5px;
}

.localisation-splash-card::-webkit-scrollbar-track {
  background: transparent;
}

.localisation-splash-card::-webkit-scrollbar-thumb {
  background: rgba(15, 42, 61, 0.18);
  border-radius: 3px;
}

.localisation-splash-head {
  display: block;
  margin: 0;
  padding: 0;
  border: 0;
}

.localisation-splash-head h2 {
  font-size: 17px;
  font-weight: 700;
  color: var(--eve-navy-2);
  margin: 0 0 14px;
  line-height: 1.3;
  padding-right: 30px;
}

.localisation-splash-body {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--eve-text);
  padding: 0;
}

.localisation-splash-body h3,
.localisation-splash-section h3 {
  font-size: 13px;
  font-weight: 700;
  color: var(--eve-text);
  margin: 14px 0 5px;
}

.localisation-splash-body ul {
  padding-left: 18px;
  margin: 6px 0;
}

.localisation-splash-body li {
  font-size: 13px;
  color: var(--eve-text);
  line-height: 1.6;
  margin-bottom: 3px;
}

.localisation-splash-body code {
  background: var(--eve-color-eef2f6);
  border-radius: 4px;
  padding: 1px 6px;
  font-size: 12px;
  font-family: 'SFMono-Regular', 'Consolas', monospace;
  color: var(--eve-blue);
  border: 1px solid var(--eve-border);
  white-space: nowrap;
}

.localisation-splash-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--eve-color-f4f8fb);
  border: 1px solid var(--eve-border);
  color: var(--eve-text-muted);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 120ms ease;
  padding: 0;
  font-size: 0;
}

.localisation-splash-close::before {
  content: "x";
  font-size: 15px;
  line-height: 1;
}

.localisation-splash-close:hover {
  background: var(--eve-color-eef2f6);
  color: var(--eve-text);
}

.localisation-splash-option {
  margin-top: 18px;
}

@media (max-width: 480px) {
  .localisation-splash-card {
    padding: 20px 18px;
  }
}

#widget-filters #periodPicker {
  max-height: 134px;
  overflow-y: auto;
  overflow-x: hidden;
  display: grid;
  gap: 0;
  padding: 6px;
  border: 1px solid var(--eve-border);
  border-radius: var(--eve-radius);
  background: var(--eve-color-f9fafb);
  scrollbar-width: thin;
  scrollbar-color: rgba(15, 42, 61, 0.18) transparent;
}

#widget-filters #periodPicker::-webkit-scrollbar {
  width: 5px;
}

#widget-filters #periodPicker::-webkit-scrollbar-track {
  background: transparent;
}

#widget-filters #periodPicker::-webkit-scrollbar-thumb {
  background: rgba(15, 42, 61, 0.18);
  border-radius: 3px;
}

#widget-filters .period-month-card {
  display: grid;
  grid-template-columns: minmax(66px, 1fr) auto;
  align-items: center;
  gap: 8px;
  min-width: 0;
  min-height: 34px;
  margin: 0;
  padding: 3px 4px;
  border: 0;
  border-bottom: 1px solid var(--eve-color-eef2f6);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

#widget-filters .period-month-card:last-child {
  border-bottom: none;
}

#widget-filters .period-month-card:hover {
  background: var(--eve-bg-card);
}

#widget-filters .period-month-label {
  color: var(--eve-text);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.2;
  min-width: 0;
  white-space: nowrap;
}

#widget-filters .period-chip-row {
  display: grid;
  grid-template-columns: repeat(3, 28px);
  align-items: center;
  gap: 6px;
  min-width: 0;
}

#widget-filters .period-chip {
  width: 28px;
  min-width: 28px;
  height: 28px;
  border-radius: 5px;
}

/* Overview KPI cards: final responsive polish. */
#modeContent[data-active-mode="overview"] #overviewFindings,
#overviewFindings {
  container-name: eve-overview-kpis;
  container-type: inline-size;
  padding: 14px 16px;
}

#modeContent[data-active-mode="overview"] #overviewFindings .ov-grid,
#overviewFindings .ov-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  height: auto;
  align-items: stretch;
}

#modeContent[data-active-mode="overview"] #overviewFindings .ov-card,
#overviewFindings .ov-card {
  position: relative;
  min-width: 0;
  min-height: 112px;
  height: auto;
  padding: 16px 16px 14px;
  gap: 7px;
  overflow: hidden;
}

#modeContent[data-active-mode="overview"] #overviewFindings .ov-card-body,
#overviewFindings .ov-card-body {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
  min-height: 0;
}

#modeContent[data-active-mode="overview"] #overviewFindings .ov-card-head,
#overviewFindings .ov-card-head {
  display: block;
  margin-bottom: 4px;
  min-width: 0;
}

#modeContent[data-active-mode="overview"] #overviewFindings .ov-card-title,
#overviewFindings .ov-card-title {
  display: block;
  max-width: 100%;
  margin: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
  font-size: 11px;
  line-height: 1.35;
}

#modeContent[data-active-mode="overview"] #overviewFindings .ov-row,
#overviewFindings .ov-row {
  display: grid;
  grid-template-columns: minmax(74px, max-content) minmax(0, 1fr);
  align-items: baseline;
  column-gap: 10px;
  row-gap: 2px;
  min-width: 0;
  line-height: 1.28;
  flex-wrap: nowrap;
}

#modeContent[data-active-mode="overview"] #overviewFindings .ov-season,
#overviewFindings .ov-season {
  min-width: 0;
  font-size: 9.5px;
  line-height: 1.2;
}

#modeContent[data-active-mode="overview"] #overviewFindings .ov-value,
#overviewFindings .ov-value {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0 6px;
  min-width: 0;
  overflow: visible;
  text-overflow: clip;
  white-space: normal;
  font-size: 14px;
  line-height: 1.24;
}

#modeContent[data-active-mode="overview"] #overviewFindings .ov-sub,
#overviewFindings .ov-sub {
  margin-left: 0;
  flex-shrink: 0;
  white-space: nowrap;
  font-size: 10.5px;
}

@container eve-overview-kpis (max-width: 980px) {
  #modeContent[data-active-mode="overview"] #overviewFindings .ov-grid,
  #overviewFindings .ov-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@container eve-overview-kpis (max-width: 540px) {
  #modeContent[data-active-mode="overview"] #overviewFindings .ov-grid,
  #overviewFindings .ov-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  #modeContent[data-active-mode="overview"] #overviewFindings .ov-grid,
  #overviewFindings .ov-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  #modeContent[data-active-mode="overview"] #overviewFindings .ov-grid,
  #overviewFindings .ov-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  #modeContent[data-active-mode="overview"] #overviewFindings,
  #overviewFindings {
    padding: 10px;
  }

  #modeContent[data-active-mode="overview"] #overviewFindings .ov-grid,
  #overviewFindings .ov-grid {
    gap: 8px;
  }
}

/* Final navigation and compact overview KPI behavior. */
#modeTabs {
  height: 54px;
  background: linear-gradient(180deg, #f5f9fc 0%, #e8f0f7 100%);
  border-top: 1px solid rgba(0, 159, 218, 0.16);
  box-shadow: 0 -6px 20px rgba(14, 36, 51, 0.06);
  display: flex;
  gap: 0;
  padding: 0;
}

.mode-tab {
  flex: 1 1 0;
  height: 100%;
  border: none;
  border-top: 2px solid transparent;
  border-right: 1px solid rgba(14, 36, 51, 0.09);
  border-radius: 0;
  background: transparent;
  color: var(--eve-text-40);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  box-shadow: none;
  transform: none;
  transition: background 130ms ease, color 130ms ease, border-top-color 130ms ease;
}

.mode-tab:last-child {
  border-right: none;
}

.mode-tab:hover {
  background: rgba(255, 255, 255, 0.72);
  border-top-color: rgba(0, 159, 218, 0.45);
  color: var(--eve-text-20);
  border-right-color: rgba(14, 36, 51, 0.09);
  box-shadow: none;
  transform: none;
}

.mode-tab.active {
  background: rgba(255, 255, 255, 0.95);
  border-top-color: var(--eve-blue);
  color: var(--eve-navy);
  font-weight: 700;
  border-right-color: rgba(14, 36, 51, 0.09);
  box-shadow: none;
}

@container eve-overview-kpis (max-width: 980px) {
  #modeContent[data-active-mode="overview"] #overviewFindings .ov-grid,
  #overviewFindings .ov-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #modeContent[data-active-mode="overview"] #overviewFindings .ov-card:nth-child(4),
  #overviewFindings .ov-card:nth-child(4) {
    display: none;
  }
}

@container eve-overview-kpis (max-width: 620px) {
  #modeContent[data-active-mode="overview"] #overviewFindings .ov-grid,
  #overviewFindings .ov-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #modeContent[data-active-mode="overview"] #overviewFindings .ov-card:nth-child(n+3),
  #overviewFindings .ov-card:nth-child(n+3) {
    display: none;
  }
}

@media (max-width: 980px) {
  #modeContent[data-active-mode="overview"] #overviewFindings .ov-grid,
  #overviewFindings .ov-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #modeContent[data-active-mode="overview"] #overviewFindings .ov-card:nth-child(4),
  #overviewFindings .ov-card:nth-child(4) {
    display: none;
  }
}

@media (max-width: 520px) {
  #modeContent[data-active-mode="overview"] #overviewFindings .ov-grid,
  #overviewFindings .ov-grid {
    grid-template-columns: repeat(1, minmax(0, 1fr));
  }
}

/* ============================================================
   Report Generation mode
   ============================================================ */
#reportGeneration {
  position: absolute;
  inset: 0;
  z-index: 8;
  background: linear-gradient(180deg, #f8fbfd 0%, #eef3f8 100%);
  overflow: auto;
  display: block;
  padding: 32px 40px 48px;
  box-sizing: border-box;
}

#reportGeneration[hidden] {
  display: none !important;
}

#reportGeneration {
  position: absolute;
  inset: 0;
  z-index: 8;
  background: linear-gradient(180deg, #f8fbfd 0%, #eef3f8 100%);
  overflow: auto;
  display: block;
  padding: 32px 40px 48px;
  box-sizing: border-box;
}

#reportGeneration[hidden] {
  display: none !important;
}

#reportGeneration .rg-panel {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

#reportGeneration .rg-header {
  background: linear-gradient(135deg, #12344d 0%, #1b5477 100%);
  color: #fff;
  border-radius: 16px;
  padding: 28px 32px;
  box-shadow: 0 6px 20px rgba(18, 52, 77, 0.18);
}

#reportGeneration .rg-eyebrow,
#reportGeneration .rg-scope-label,
#reportGeneration .rg-config-title {
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

#reportGeneration .rg-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 10px;
}

#reportGeneration .rg-title {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
}

#reportGeneration .rg-subtitle {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.85);
  max-width: 680px;
}

#reportGeneration .rg-scope {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

#reportGeneration .rg-scope-card,
#reportGeneration .rg-config {
  background: #fff;
  border: 1px solid rgba(15, 42, 61, 0.08);
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(18, 52, 77, 0.04);
}

#reportGeneration .rg-scope-card {
  padding: 16px 18px;
}

#reportGeneration .rg-scope-label {
  font-size: 11px;
  font-weight: 600;
  color: #6a7f8e;
  margin-bottom: 6px;
}

#reportGeneration .rg-scope-value {
  font-size: 16px;
  font-weight: 600;
  color: #12344d;
}

#reportGeneration .rg-config {
  padding: 22px 24px;
}

#reportGeneration .rg-config-title {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 700;
  color: #12344d;
}

#reportGeneration .rg-check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-top: 1px solid rgba(15, 42, 61, 0.06);
  cursor: pointer;
}

#reportGeneration .rg-check:first-of-type {
  border-top: none;
}

#reportGeneration input[type="checkbox"] {
  accent-color: #15678a;
}

#reportGeneration .rg-check span {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13.5px;
  color: #334a5c;
  line-height: 1.45;
}

#reportGeneration .rg-check strong {
  font-weight: 600;
  color: #12344d;
}

#reportGeneration .rg-check small {
  font-size: 12px;
  color: #6a7f8e;
}

#reportGeneration .rgv2-livestock-panel {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 14px 28px;
  padding: 14px;
  border: 1px solid rgba(15, 42, 61, 0.08);
  border-radius: 10px;
  background: #f8fbfd;
}

#reportGeneration .rgv2-livestock-panel[hidden] {
  display: none !important;
}

#reportGeneration .rgv2-radio-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

#reportGeneration .rgv2-radio {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px;
  border: 1px solid rgba(15, 42, 61, 0.1);
  border-radius: 8px;
  background: #f8fbfd;
  cursor: pointer;
}

#reportGeneration .rgv2-radio:has(input:checked) {
  border-color: rgba(21, 103, 138, 0.42);
  background: #edf7fb;
}

#reportGeneration .rgv2-radio span {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13px;
  color: #334a5c;
}

#reportGeneration .rgv2-mini-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid rgba(15, 42, 61, 0.12);
  border-radius: 999px;
  background: #fff;
  color: #334a5c;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

#reportGeneration .rgv2-estimate {
  width: fit-content;
  padding: 9px 12px;
  border-radius: 8px;
  background: #edf7fb;
  color: #12344d;
  font-size: 13px;
  font-weight: 700;
}

#reportGeneration .rg-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

#reportGeneration .rg-export,
#reportGeneration .rg-abort {
  appearance: none;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
}

#reportGeneration .rg-export {
  border: none;
  background: linear-gradient(135deg, #15678a 0%, #1b7aa4 100%);
  color: #fff;
  font-size: 14px;
  padding: 14px 28px;
  box-shadow: 0 4px 12px rgba(21, 103, 138, 0.24);
}

#reportGeneration .rg-export:disabled {
  cursor: not-allowed;
  background: #8ca7b6;
  box-shadow: none;
}

#reportGeneration .rg-export.is-busy::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: rg-spin 0.7s linear infinite;
  margin-right: 10px;
  vertical-align: -2px;
}

#reportGeneration .rg-abort {
  border: 1px solid rgba(197, 54, 58, 0.35);
  background: #fff;
  color: #c5363a;
  font-size: 13px;
  padding: 12px 18px;
}

#reportGeneration .rg-abort[hidden],
#reportGeneration .rg-progress[hidden] {
  display: none !important;
}

#reportGeneration .rg-progress {
  display: grid;
  gap: 8px;
  max-width: 520px;
}

#reportGeneration .rg-progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce8ef;
  border: 1px solid rgba(15, 42, 61, 0.08);
}

#reportGeneration .rg-progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #15678a, #33a6d4);
  transition: width 180ms ease;
}

#reportGeneration .rg-progress-text,
#reportGeneration .rg-status {
  font-size: 12px;
  color: #5b7a8c;
}

#reportGeneration .rg-status.is-error {
  color: #c5363a;
}

#reportGeneration .rg-status.is-success {
  color: #1a7a3e;
  font-weight: 600;
}

#reportGeneration .rg-status.is-busy {
  color: #15678a;
}

#reportGeneration .rg-panel {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 24px;
}

#reportGeneration .rg-header {
  background: linear-gradient(135deg, #12344d 0%, #1b5477 100%);
  color: #fff;
  border-radius: 16px;
  padding: 28px 32px;
  box-shadow: 0 6px 20px rgba(18, 52, 77, 0.18);
  position: relative;
  overflow: hidden;
}

#reportGeneration .rg-header::after {
  content: "";
  position: absolute;
  right: -40px;
  top: -40px;
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
}

#reportGeneration .rg-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 10px;
}

#reportGeneration .rg-title {
  margin: 0;
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

#reportGeneration .rg-subtitle {
  margin: 12px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: rgba(255, 255, 255, 0.85);
  max-width: 640px;
}

#reportGeneration .rg-scope {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

#reportGeneration .rg-scope-card {
  background: #fff;
  border: 1px solid rgba(15, 42, 61, 0.08);
  border-radius: 12px;
  padding: 16px 18px;
  box-shadow: 0 2px 6px rgba(18, 52, 77, 0.04);
}

#reportGeneration .rg-scope-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #6a7f8e;
  margin-bottom: 6px;
}

#reportGeneration .rg-scope-value {
  font-size: 16px;
  font-weight: 600;
  color: #12344d;
}

#reportGeneration .rg-config {
  background: #fff;
  border: 1px solid rgba(15, 42, 61, 0.08);
  border-radius: 12px;
  padding: 22px 24px;
  box-shadow: 0 2px 6px rgba(18, 52, 77, 0.04);
}

#reportGeneration .rg-config-title {
  margin: 0 0 14px;
  font-size: 14px;
  font-weight: 700;
  color: #12344d;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

#reportGeneration .rg-check {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 12px 0;
  border-top: 1px solid rgba(15, 42, 61, 0.06);
  cursor: pointer;
}

#reportGeneration .rg-check:first-of-type {
  border-top: none;
}

#reportGeneration .rg-check input[type="checkbox"] {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: #15678a;
  cursor: pointer;
}

#reportGeneration .rg-check input[type="checkbox"]:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

#reportGeneration .rg-check input[type="checkbox"]:disabled + span {
  opacity: 0.7;
}

#reportGeneration .rg-check span {
  display: flex;
  flex-direction: column;
  gap: 3px;
  font-size: 13.5px;
  color: #334a5c;
  line-height: 1.45;
}

#reportGeneration .rg-check strong {
  font-weight: 600;
  color: #12344d;
}

#reportGeneration .rg-check small {
  font-size: 12px;
  color: #6a7f8e;
  font-weight: 400;
}

#reportGeneration .rg-map-options {
  margin: 8px 0 16px 28px;
  padding: 16px;
  border: 1px solid rgba(15, 42, 61, 0.08);
  border-radius: 10px;
  background: #f8fbfd;
}

#reportGeneration .rg-map-options[hidden] {
  display: none !important;
}

#reportGeneration .rg-map-options-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 12px;
}

#reportGeneration .rg-map-options-head h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 700;
  color: #12344d;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

#reportGeneration .rg-flood-types {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

#reportGeneration .rg-map-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

#reportGeneration .rg-map-row {
  display: grid;
  grid-template-columns: 1fr;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid rgba(15, 42, 61, 0.07);
  border-radius: 8px;
  background: #fff;
}

#reportGeneration .rg-map-row.is-disabled {
  background: #f4f7fa;
}

#reportGeneration .rg-map-main {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  min-width: 0;
  cursor: pointer;
}

#reportGeneration .rg-map-main input {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: #15678a;
}

#reportGeneration .rg-map-main span {
  display: flex;
  flex-direction: column;
  min-width: 0;
  gap: 2px;
}

#reportGeneration .rg-map-main strong {
  color: #12344d;
  font-size: 13px;
  font-weight: 700;
}

#reportGeneration .rg-map-main small {
  color: #6a7f8e;
  font-size: 11.5px;
  line-height: 1.35;
}

#reportGeneration .rg-mini-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid rgba(15, 42, 61, 0.12);
  border-radius: 999px;
  background: #fff;
  color: #334a5c;
  font-size: 12px;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  white-space: nowrap;
}

#reportGeneration .rg-mini-check input {
  width: 13px;
  height: 13px;
  margin: 0;
  accent-color: #15678a;
}

#reportGeneration .rg-mini-check:has(input:checked) {
  border-color: rgba(21, 103, 138, 0.42);
  background: #edf7fb;
  color: #12344d;
}

#reportGeneration .rg-mini-check:has(input:disabled) {
  opacity: 0.5;
  cursor: not-allowed;
}

#reportGeneration .rg-actions {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}

#reportGeneration .rg-export {
  appearance: none;
  border: none;
  background: linear-gradient(135deg, #15678a 0%, #1b7aa4 100%);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  padding: 14px 28px;
  border-radius: 10px;
  cursor: pointer;
  letter-spacing: 0.01em;
  box-shadow: 0 4px 12px rgba(21, 103, 138, 0.24);
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

#reportGeneration .rg-export:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(21, 103, 138, 0.32);
}

#reportGeneration .rg-export:disabled {
  cursor: not-allowed;
  background: #8ca7b6;
  box-shadow: none;
}

#reportGeneration .rg-export.is-busy {
  background: #5b7a8c;
}

#reportGeneration .rg-export.is-busy::before {
  content: "";
  display: inline-block;
  width: 12px;
  height: 12px;
  border: 2px solid rgba(255, 255, 255, 0.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: rg-spin 0.7s linear infinite;
  margin-right: 10px;
  vertical-align: -2px;
}

#reportGeneration .rg-abort {
  appearance: none;
  border: 1px solid rgba(197, 54, 58, 0.35);
  background: #fff;
  color: #c5363a;
  font-size: 13px;
  font-weight: 700;
  padding: 12px 18px;
  border-radius: 10px;
  cursor: pointer;
}

#reportGeneration .rg-abort:hover {
  background: #fff5f5;
  border-color: rgba(197, 54, 58, 0.6);
}

#reportGeneration .rg-abort[hidden] {
  display: none !important;
}

#reportGeneration .rg-progress {
  display: grid;
  gap: 8px;
  max-width: 520px;
}

#reportGeneration .rg-progress[hidden] {
  display: none !important;
}

#reportGeneration .rg-progress-track {
  height: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: #dce8ef;
  border: 1px solid rgba(15, 42, 61, 0.08);
}

#reportGeneration .rg-progress-bar {
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #15678a, #33a6d4);
  transition: width 180ms ease;
}

#reportGeneration .rg-progress-text {
  min-height: 16px;
  font-size: 12px;
  color: #5b7a8c;
}

@keyframes rg-spin {
  to { transform: rotate(360deg); }
}

#reportGeneration .rg-status {
  font-size: 13px;
  color: #5b7a8c;
  min-height: 18px;
}

#reportGeneration .rg-status.is-error {
  color: #c5363a;
}

#reportGeneration .rg-status.is-success {
  color: #1a7a3e;
  font-weight: 600;
}

#reportGeneration .rg-status.is-busy {
  color: #15678a;
}

#reportGeneration .rg-hints {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-top: 4px;
}

#reportGeneration .rg-hint {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 12.5px;
  color: #5b7a8c;
  line-height: 1.5;
}

#reportGeneration .rg-hint-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #15678a;
  margin-top: 7px;
  flex-shrink: 0;
}

#reportGeneration .rg-download-section {
  background: #fff;
  border: 1px solid rgba(15, 42, 61, 0.08);
  border-radius: 12px;
  box-shadow: 0 2px 6px rgba(18, 52, 77, 0.04);
  overflow: hidden;
}

#reportGeneration .rg-download-header {
  padding: 20px 24px 16px;
  border-bottom: 1px solid rgba(15, 42, 61, 0.07);
}

#reportGeneration .rg-download-title {
  margin: 0 0 6px;
  font-size: 17px;
  font-weight: 700;
  color: #12344d;
}

#reportGeneration .rg-download-subtitle {
  margin: 0;
  font-size: 13px;
  color: #5a7080;
  line-height: 1.5;
}

#reportGeneration .rg-download-links {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

#reportGeneration .rg-download-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 16px 20px;
  text-decoration: none;
  border-right: 1px solid rgba(15, 42, 61, 0.07);
  transition: background 0.15s;
}

#reportGeneration .rg-download-link:last-child {
  border-right: none;
}

#reportGeneration .rg-download-link:hover {
  background: rgba(0, 159, 218, 0.06);
}

#reportGeneration .rg-dl-level {
  font-size: 15px;
  font-weight: 700;
  color: #009FDA;
  letter-spacing: 0.04em;
}

#reportGeneration .rg-dl-desc {
  font-size: 12px;
  color: #6a7f8e;
}

@media (max-width: 720px) {
  #reportGeneration {
    padding: 20px 18px 32px;
  }
  #reportGeneration .rg-scope,
  #reportGeneration .rgv2-radio-row {
    grid-template-columns: 1fr;
  }
  #reportGeneration .rgv2-livestock-panel,
  #reportGeneration .rg-map-options {
    margin-left: 0;
  }
  #reportGeneration .rg-map-options-head,
  #reportGeneration .rg-map-row {
    grid-template-columns: 1fr;
  }
  #reportGeneration .rg-map-options-head {
    display: grid;
  }
  #reportGeneration .rg-header {
    padding: 22px 20px;
  }
  #reportGeneration .rg-title {
    font-size: 22px;
  }
  #reportGeneration .rg-download-links {
    grid-template-columns: 1fr;
  }
  #reportGeneration .rg-download-link {
    border-right: none;
    border-bottom: 1px solid rgba(15, 42, 61, 0.07);
  }
  #reportGeneration .rg-download-link:last-child {
    border-bottom: none;
  }
}

/* ============================================================
   Desktop UX refinement: context, sidebar hierarchy, report workbench
   ============================================================ */

/* Sidebar hierarchy. The sidebar is 340 px wide at every viewport, so these
   are unconditional; they were inside the min-width: 721px block below until
   the phone drawer (docs/mobile_readiness_plan.md, Phase 1) made the sidebar
   visible below that width. */
#widget-filters .filter-section-kicker {
  margin: 0 12px 8px;
  color: var(--eve-text-50);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1;
  text-transform: uppercase;
}

#widget-filters .filter-section-kicker-spaced {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--eve-border-10);
}

#widget-filters > calcite-label,
#widget-filters > #overviewFloodOpacitySection,
#widget-filters > #localisationOpacitySection,
#widget-filters > #timeAnimationSection {
  margin-bottom: 10px;
}

@media (min-width: 721px) {
  #modeContent {
    --mode-title-bar-height: 42px;
  }

  #modeTitleBar {
    position: absolute;
    inset: 0 0 auto 0;
    z-index: 9;
    min-height: var(--mode-title-bar-height);
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 0 16px;
    border-bottom: 1px solid var(--eve-border-10);
    background: rgba(255, 255, 255, 0.94);
    color: var(--eve-text-20);
    font-size: 13px;
    font-weight: 700;
    line-height: 1.3;
    box-shadow: 0 6px 18px rgba(15, 42, 61, 0.08);
    backdrop-filter: blur(8px);
  }

  #modeTitleBar::before {
    content: "";
    width: 8px;
    height: 8px;
    border-radius: 999px;
    background: var(--eve-blue);
    box-shadow: 0 0 0 4px rgba(0, 159, 218, 0.12);
    flex: 0 0 auto;
  }

  #modeTitleBar[hidden] {
    display: none !important;
  }

  #modeContent[data-active-mode="seasonality"] #viewDiv {
    position: absolute;
    inset: var(--mode-title-bar-height) 0 var(--seasonality-calendar-height) calc(var(--mode-panel-gutter) + var(--mode-left-panel-width));
    height: auto;
    width: auto;
    overflow: hidden;
  }

  #modeContent[data-active-mode="report-generation"] #reportGeneration {
    inset: var(--mode-title-bar-height) 0 0 0;
  }

  #reportGeneration {
    background: var(--eve-bg-00);
    padding: 22px 32px 36px;
  }

  #reportGeneration .rg-panel {
    max-width: 1040px;
    gap: 16px;
  }

  #reportGeneration .rg-header {
    border: 1px solid rgba(15, 42, 61, 0.12);
    border-left: 4px solid var(--eve-blue);
    border-radius: var(--eve-radius);
    background: var(--eve-bg-card);
    color: var(--eve-text-10);
    padding: 18px 22px;
    box-shadow: var(--eve-shadow-subtle);
  }

  #reportGeneration .rg-header::after {
    content: none;
  }

  #reportGeneration .rg-eyebrow {
    color: var(--eve-text-50);
    margin-bottom: 6px;
  }

  #reportGeneration .rg-title {
    color: var(--eve-text-10);
    font-size: 22px;
    letter-spacing: 0;
  }

  #reportGeneration .rg-subtitle {
    max-width: 760px;
    color: var(--eve-text-40);
    margin-top: 8px;
  }

  #reportGeneration .rg-scope {
    gap: 10px;
  }

  #reportGeneration .rg-scope-card,
  #reportGeneration .rg-config {
    border: 1px solid var(--eve-border-10);
    border-radius: var(--eve-radius);
    box-shadow: var(--eve-shadow-subtle);
  }

  #reportGeneration .rg-scope-card {
    padding: 14px 16px;
  }

  #reportGeneration .rg-scope-label,
  #reportGeneration .rg-config-title {
    color: var(--eve-text-50);
  }

  #reportGeneration .rg-scope-value,
  #reportGeneration .rg-check strong,
  #reportGeneration .rgv2-radio span strong {
    color: var(--eve-text-10);
  }

  #reportGeneration .rg-config {
    padding: 18px 20px;
  }

  #reportGeneration .rg-export {
    border-radius: var(--eve-radius);
    background: var(--eve-blue);
    box-shadow: 0 5px 14px rgba(0, 159, 218, 0.22);
  }

  #modeContent[data-active-mode="overview"] #overviewLeftChart {
    border-right: 0;
    box-shadow: none;
  }
}


/* ADM2 popup width + scroll */
.esri-popup .esri-popup__main-container {
  width: 380px !important;
  max-height: 45vh !important;
}
.esri-popup .esri-popup__content-container,
.esri-popup .esri-popup__content {
  max-height: 375px !important;
  overflow-y: auto !important;
}

/* ============================================================
   Help panel — documentation slide-over
   ============================================================ */

/* Floating "? Guides" pill button — bottom-right of #mainWindow, above mode tabs */
.help-docs-btn {
  position: absolute;
  bottom: 66px;
  right: 16px;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 7px 14px;
  border-radius: 999px;
  border: none;
  background: var(--eve-blue);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 2px 10px rgba(0, 103, 141, 0.35);
  transition: background 130ms ease, box-shadow 130ms ease, transform 100ms ease;
}

.help-docs-btn:hover {
  background: #007faf;
  box-shadow: 0 4px 14px rgba(0, 103, 141, 0.45);
  transform: translateY(-1px);
}

.help-docs-btn[aria-expanded="true"] {
  background: #005f85;
  box-shadow: 0 2px 6px rgba(0, 103, 141, 0.3);
  transform: none;
}

/* overlay container */
#helpPanel {
  position: fixed;
  inset: 0;
  z-index: 9100;
  display: flex;
  justify-content: flex-end;
}

#helpPanel[hidden] {
  display: none;
}

.help-panel-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(10, 30, 50, 0.38);
  cursor: pointer;
}

/* drawer */
.help-panel-drawer {
  position: relative;
  width: min(680px, 52vw);
  min-width: 380px;
  height: 100%;
  background: var(--eve-bg-card, #fff);
  display: flex;
  flex-direction: column;
  box-shadow: -4px 0 28px rgba(10, 30, 50, 0.18);
  animation: help-slide-in 0.2s cubic-bezier(0.22, 0.61, 0.36, 1);
}

@keyframes help-slide-in {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}

/* header */
.help-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  height: var(--app-header-height, 54px);
  background: var(--eve-navy, #0e2433);
  flex-shrink: 0;
}

.help-panel-head h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.01em;
}

.help-panel-close {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: none;
  cursor: pointer;
  color: rgba(255, 255, 255, 0.7);
  font-size: 16px;
  border-radius: var(--eve-radius, 4px);
  transition: background 120ms ease, color 120ms ease;
}

.help-panel-close:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}

/* tabs */
.help-panel-tabs {
  display: flex;
  border-bottom: 1px solid var(--eve-border, #dce6ec);
  background: #f5f9fc;
  flex-shrink: 0;
  overflow-x: auto;
  scrollbar-width: none;
}
.help-panel-tabs::-webkit-scrollbar { display: none; }

.help-tab {
  flex: 1;
  min-width: max-content;
  padding: 9px 12px;
  border: none;
  border-bottom: 3px solid transparent;
  background: none;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  color: var(--eve-text-muted, #6a7f8e);
  transition: color 130ms ease, border-color 130ms ease, background 130ms ease;
}

.help-tab.active {
  color: var(--eve-blue, #009fda);
  border-bottom-color: var(--eve-blue, #009fda);
  background: #fff;
}

.help-tab:hover:not(.active) {
  color: var(--eve-text, #1a2e3b);
  background: rgba(255, 255, 255, 0.6);
}

/* scrollable content */
.help-panel-content {
  flex: 1;
  overflow-y: auto;
  min-height: 0;
}

.help-doc-content {
  padding: 24px 28px 32px;
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--eve-text, #1a2e3b);
}

/* prose styles for rendered Markdown */
.help-doc-content h1 {
  font-family: 'DM Serif Display', Georgia, serif;
  font-size: 20px;
  font-weight: 700;
  margin: 0 0 18px;
  color: var(--eve-navy, #0e2433);
}

.help-doc-content h2 {
  font-size: 15px;
  font-weight: 700;
  margin: 28px 0 10px;
  color: var(--eve-navy, #0e2433);
  border-bottom: 1px solid var(--eve-border, #dce6ec);
  padding-bottom: 6px;
}

.help-doc-content h3 {
  font-size: 13.5px;
  font-weight: 700;
  margin: 20px 0 8px;
  color: var(--eve-text, #1a2e3b);
}

.help-doc-content p {
  margin: 0 0 12px;
}

.help-doc-content ul,
.help-doc-content ol {
  margin: 0 0 12px;
  padding-left: 22px;
}

.help-doc-content li {
  margin-bottom: 4px;
}

.help-doc-content table {
  border-collapse: collapse;
  width: 100%;
  margin: 12px 0;
  font-size: 12.5px;
}

.help-doc-content th {
  background: #f0f5f9;
  padding: 7px 10px;
  text-align: left;
  border: 1px solid var(--eve-border, #dce6ec);
  font-weight: 700;
  color: var(--eve-navy, #0e2433);
}

.help-doc-content td {
  padding: 6px 10px;
  border: 1px solid var(--eve-border, #dce6ec);
  vertical-align: top;
}

.help-doc-content tr:nth-child(even) td {
  background: #f8fbfd;
}

.help-doc-content code {
  font-family: ui-monospace, 'Cascadia Code', monospace;
  background: #eef3f8;
  padding: 2px 5px;
  border-radius: 3px;
  font-size: 12px;
  color: #0e4d6e;
}

.help-doc-content blockquote {
  border-left: 3px solid var(--eve-blue, #009fda);
  margin: 0 0 14px 0;
  padding: 8px 14px;
  background: #f0f8fd;
  color: var(--eve-text-muted, #6a7f8e);
  font-style: italic;
  border-radius: 0 var(--eve-radius, 4px) var(--eve-radius, 4px) 0;
}

.help-doc-content a {
  color: var(--eve-blue, #009fda);
  text-decoration: none;
}

.help-doc-content a:hover {
  text-decoration: underline;
}

.help-doc-content strong {
  font-weight: 700;
}

.help-mermaid {
  margin: 18px 0 22px;
  padding: 14px;
  overflow-x: auto;
  border: 1px solid var(--eve-border, #dce6ec);
  border-radius: 8px;
  background: #ffffff;
}

.help-mermaid svg {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 0 auto;
}

.help-load-error {
  color: var(--eve-text-muted, #6a7f8e);
  font-style: italic;
}

.help-back-to-top {
  position: absolute;
  right: 20px;
  bottom: 66px;
  z-index: 3;
  padding: 6px 10px;
  border: 1px solid color-mix(in srgb, var(--eve-blue) 36%, white);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--eve-blue-dark);
  font: inherit;
  font-size: 10px;
  font-weight: 800;
  box-shadow: 0 2px 10px rgba(10, 30, 50, 0.12);
  cursor: pointer;
}

.help-back-to-top:hover,
.help-back-to-top:focus-visible {
  border-color: var(--eve-blue);
  background: white;
}

.help-back-to-top[hidden] {
  display: none;
}

/* footer */
.help-panel-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--eve-border, #dce6ec);
  display: flex;
  justify-content: flex-end;
  flex-shrink: 0;
  background: #f5f9fc;
}

#fieldDataMode {
  position: absolute;
  inset: 0;
  z-index: 8;
  overflow: hidden;
  background: transparent;
  pointer-events: none;
}

#fieldDataMode[hidden] {
  display: none !important;
}

body[data-app="field-data-standalone"] {
  overflow: hidden;
}

#fieldDataStandalone {
  display: grid;
  grid-template-rows: 58px 34px minmax(0, 1fr);
  width: 100%;
  height: 100%;
}

.field-data-standalone-masthead {
  position: relative;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 7px 18px;
  color: white;
  background: var(--eve-navy);
  box-shadow: 0 3px 12px rgba(15, 42, 61, 0.2);
}

.field-data-standalone-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.field-data-standalone-brand img {
  width: 88px;
  height: 42px;
  object-fit: contain;
}

.field-data-standalone-brand span {
  display: grid;
  line-height: 1.15;
}

.field-data-standalone-brand strong {
  font-size: 16px;
}

.field-data-standalone-brand small {
  margin-top: 3px;
  color: rgba(255, 255, 255, 0.68);
  font-size: 11px;
}

.field-data-standalone-language,
.field-data-standalone-basemap {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 12px;
}

.field-data-standalone-language select,
.field-data-standalone-basemap select {
  min-width: 112px;
  padding: 7px 28px 7px 9px;
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 5px;
  color: white;
  background: var(--eve-navy-2);
  font: inherit;
}

body[data-app="field-data-standalone"] #mainWindow,
body[data-app="field-data-standalone"] #modeContent {
  position: relative;
  inset: auto;
  width: 100%;
  height: 100%;
}

.field-data-shell-standalone .field-data-event-control {
  display: none;
}

.field-data-shell-standalone .field-data-header {
  grid-template-columns: minmax(220px, 1fr) auto;
}

.field-data-standalone-event {
  margin: 3px 0 0;
  color: var(--eve-text-40);
  font-size: 12px;
}

.field-data-standalone-error {
  margin: 24px;
  padding: 18px;
  border: 1px solid var(--eve-data-red-light);
  border-radius: var(--eve-radius);
  color: var(--eve-data-red);
  background: white;
}

#modeContent[data-active-mode="field-data"] #viewDiv {
  position: absolute;
  inset:
    var(--field-data-map-top, 0)
    var(--field-data-map-right, 0)
    var(--field-data-map-bottom, 0)
    var(--field-data-map-left, 0);
  width: auto;
  height: auto;
  overflow: hidden;
}

.field-data-shell {
  position: relative;
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  height: 100%;
  min-height: 0;
  color: var(--eve-text);
  background: transparent;
  pointer-events: none;
}

.field-data-header {
  display: grid;
  grid-template-columns: minmax(220px, 0.8fr) minmax(340px, 1.4fr) auto;
  align-items: center;
  gap: 18px;
  padding: 13px 18px;
  border-bottom: 1px solid var(--eve-border-10);
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 4px 16px rgba(15, 42, 61, 0.06);
  pointer-events: auto;
}

.field-data-event-picker {
  display: none;
}

.field-data-shell[data-view="picker"] {
  grid-template-rows: auto minmax(0, 1fr);
  background:
    radial-gradient(circle at 18% 9%, rgba(0, 159, 218, 0.12), transparent 30%),
    linear-gradient(135deg, #f5fafc 0%, #edf5f8 46%, #f8fbfc 100%);
}

.field-data-shell[data-view="picker"] .field-data-header {
  grid-template-columns: minmax(0, 1fr) auto;
}

.field-data-shell[data-view="picker"] .field-data-event-control,
.field-data-shell[data-view="picker"] [data-action="refresh"],
.field-data-shell[data-view="picker"] [data-role="auto-refresh"],
.field-data-shell[data-view="picker"] .field-data-metrics,
.field-data-shell[data-view="picker"] .field-data-workspace,
.field-data-shell[data-view="picker"] .field-data-disclaimer {
  display: none;
}

.field-data-shell[data-view="picker"] .field-data-event-picker {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  align-content: center;
  gap: clamp(20px, 4vh, 42px);
  min-height: 0;
  padding: clamp(28px, 6vh, 72px) clamp(22px, 6vw, 92px);
  overflow: auto;
  pointer-events: auto;
}

.field-data-event-picker-intro {
  max-width: 650px;
  margin: 0 auto;
  text-align: center;
}

.field-data-event-picker-intro h3 {
  margin: 0;
  color: var(--eve-navy);
  font-family: "DM Serif Display", Georgia, serif;
  font-size: clamp(28px, 3.2vw, 42px);
  font-weight: 400;
  line-height: 1.08;
}

.field-data-event-picker-intro > p:last-child {
  max-width: 540px;
  margin: 12px auto 0;
  color: var(--eve-text-40);
  font-size: 14px;
  line-height: 1.55;
}

.field-data-event-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(280px, 430px));
  justify-content: center;
  gap: clamp(18px, 2.8vw, 32px);
}

.field-data-event-choice {
  position: relative;
  display: grid;
  grid-template-columns: 118px minmax(0, 1fr);
  gap: 20px;
  min-height: 250px;
  padding: 24px 24px 52px;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--field-data-event-accent) 30%, var(--eve-border-20));
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 13px 31px rgba(15, 42, 61, 0.11);
  color: var(--eve-text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.field-data-event-choice::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 6px;
  background: var(--field-data-event-accent);
  content: "";
}

.field-data-event-choice:hover {
  border-color: var(--field-data-event-accent);
  box-shadow: 0 18px 39px rgba(15, 42, 61, 0.16);
  transform: translateY(-3px);
}

.field-data-event-choice:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--field-data-event-accent) 35%, white);
  outline-offset: 3px;
}

.field-data-event-choice-art {
  display: grid;
  min-height: 144px;
  place-items: center;
  border-radius: 12px;
  background: var(--field-data-event-soft, var(--eve-blue-subtle));
}

.field-data-event-silhouette {
  display: grid;
  width: 88px;
  height: 132px;
  place-items: center;
}

.field-data-event-silhouette svg {
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 8px 8px color-mix(in srgb, var(--field-data-event-accent) 22%, transparent));
}

.field-data-event-silhouette path {
  fill: var(--field-data-event-accent);
  stroke: color-mix(in srgb, var(--field-data-event-accent) 76%, #0f2a3d);
  stroke-width: 2;
  stroke-linejoin: round;
}

.field-data-event-choice-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: flex-start;
  gap: 9px;
}

.field-data-event-choice-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 5px 9px;
  color: var(--eve-text-50);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.field-data-event-choice-meta span + span::before {
  margin-right: 9px;
  color: var(--field-data-event-accent);
  content: "•";
}

.field-data-event-choice-copy strong {
  color: var(--eve-navy);
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 24px;
  font-weight: 400;
  line-height: 1.12;
}

.field-data-event-choice-copy > span:not(.field-data-event-choice-meta):not(.field-data-event-choice-status) {
  color: var(--eve-text-40);
  font-size: 12px;
  line-height: 1.5;
}

.field-data-event-choice-status {
  display: inline-flex;
  margin-top: auto;
  padding: 4px 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--field-data-event-accent) 12%, white);
  color: var(--eve-text-20);
  font-size: 10px;
  font-weight: 800;
}

.field-data-event-choice-action {
  position: absolute;
  right: 24px;
  bottom: 19px;
  color: var(--field-data-event-accent);
  font-size: 11px;
  font-weight: 800;
}

.field-data-event-choice-action span {
  margin-left: 4px;
  font-size: 15px;
}

.field-data-period-notice {
  position: absolute;
  z-index: 7;
  top: 14px;
  left: 50%;
  width: min(620px, calc(100% - 32px));
  padding: 10px 14px;
  border: 1px solid color-mix(in srgb, var(--eve-blue) 32%, white);
  border-radius: 999px;
  background: rgba(240, 250, 255, 0.96);
  box-shadow: 0 8px 24px rgba(15, 42, 61, 0.18);
  color: var(--eve-text-20);
  font-size: 11px;
  font-weight: 700;
  line-height: 1.4;
  text-align: center;
  transform: translateX(-50%);
}

.field-data-period-notice[hidden] {
  display: none !important;
}

.field-data-eyebrow,
.field-data-heading h2 {
  margin: 0;
}

.field-data-eyebrow {
  margin-bottom: 2px;
  color: var(--eve-blue);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.field-data-heading h2 {
  color: var(--eve-navy);
  font-family: "DM Serif Display", Georgia, serif;
  font-size: 22px;
  font-weight: 400;
  line-height: 1.1;
}

.field-data-event-control,
.field-data-feed-head label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--eve-text-40);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.field-data-event-control select,
.field-data-feed-head select {
  width: 100%;
  min-width: 0;
  height: 36px;
  padding: 0 34px 0 10px;
  border: 1px solid var(--eve-border-20);
  border-radius: var(--eve-radius-sm);
  background: var(--eve-bg-card);
  color: var(--eve-text);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
}

.field-data-session {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  white-space: nowrap;
}

.field-data-session > span {
  color: var(--eve-text-50);
  font-size: 11px;
}

.field-data-environment-ribbon {
  position: relative;
  z-index: 19;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 0;
  padding: 0 18px;
  color: #fff;
  box-shadow: 0 2px 6px rgba(15, 42, 61, 0.16);
  font-size: 11px;
  letter-spacing: 0.055em;
  line-height: 1.2;
  text-align: center;
  text-transform: uppercase;
}

.field-data-environment-ribbon svg {
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  fill: currentColor;
}

.field-data-environment-ribbon-review {
  background: #a85b00;
}

.field-data-environment-ribbon-public {
  background: var(--eve-blue);
}

.field-data-auto-refresh {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 40px;
  padding: 7px 18px;
  overflow: hidden;
  border-bottom: 1px solid #cce5ef;
  color: #17465d;
  background: #edf8fc;
  pointer-events: auto;
}

.field-data-auto-refresh-progress {
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 3px;
  background: var(--eve-blue);
  transition: width 1s linear;
}

.field-data-auto-refresh > span {
  font-size: 12px;
  font-weight: 650;
}

.field-data-auto-refresh-actions {
  display: flex;
  gap: 8px;
}

.field-data-auto-refresh button {
  min-height: 28px;
  padding: 4px 9px;
  border: 1px solid #9fcfe1;
  border-radius: 5px;
  color: #17465d;
  background: #fff;
  font: inherit;
  font-size: 11px;
  font-weight: 650;
  cursor: pointer;
}

body[data-surface="field-data-review"] .field-data-shell {
  grid-template-rows: auto auto auto minmax(0, 1fr) auto;
}

body[data-surface="field-data-review"] .field-data-session > [data-action="refresh"] {
  display: none;
}

.field-data-icon-btn,
.field-data-signout {
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid var(--eve-border-20);
  border-radius: var(--eve-radius-sm);
  background: var(--eve-bg-card);
  color: var(--eve-text-20);
  font: inherit;
  font-size: 11px;
  font-weight: 700;
  cursor: pointer;
}

.field-data-icon-btn:hover,
.field-data-signout:hover {
  border-color: var(--eve-blue);
  color: var(--eve-blue);
}

.field-data-icon-btn:disabled {
  cursor: wait;
  opacity: 0.55;
}

.field-data-metrics {
  display: grid;
  grid-template-columns: repeat(5, minmax(116px, 1fr));
  gap: 8px;
  padding: 9px 12px;
  overflow-x: auto;
  border-bottom: 1px solid var(--eve-border-10);
  background: var(--eve-bg-00);
  pointer-events: auto;
}

.field-data-metric {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
  padding: 9px 11px 8px 14px;
  overflow: hidden;
  border: 1px solid var(--eve-border-10);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.92);
}

.field-data-metric::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 4px;
  background: var(--field-data-accent);
  content: "";
}

.field-data-metric span {
  min-width: 0;
  color: var(--eve-text-50);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.field-data-metric strong {
  color: var(--eve-navy);
  font-size: 18px;
  line-height: 1;
}

.field-data-workspace {
  display: grid;
  grid-template-columns: minmax(270px, 318px) minmax(360px, 1fr) minmax(310px, 370px);
  min-height: 0;
  overflow: hidden;
}

.field-data-feed,
.field-data-detail {
  display: flex;
  min-width: 0;
  min-height: 0;
  flex-direction: column;
  background: var(--eve-bg-card);
  pointer-events: auto;
}

.field-data-feed {
  border-right: 1px solid var(--eve-border-10);
}

.field-data-feed-head {
  display: grid;
  gap: 10px;
  padding: 13px 14px;
  border-bottom: 1px solid var(--eve-border-10);
  background: var(--eve-bg-00);
}

.field-data-feed-head > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.field-data-feed-head strong {
  color: var(--eve-navy);
  font-size: 13px;
}

.field-data-feed-head [data-role="visible-count"] {
  color: var(--eve-text-50);
  font-size: 10px;
}

.field-data-feed-head .field-data-checks {
  display: grid;
  gap: 7px;
}

.field-data-feed-head .field-data-check {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--eve-text-30);
  font-size: 10px;
  letter-spacing: normal;
  text-transform: none;
}

.field-data-check input {
  accent-color: var(--eve-blue);
}

.field-data-list {
  min-height: 0;
  padding: 8px;
  overflow-y: auto;
  scrollbar-width: thin;
}

.field-data-card {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr);
  gap: 10px;
  width: 100%;
  margin: 0 0 7px;
  padding: 7px;
  overflow: hidden;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, transform 120ms ease;
}

.field-data-card:hover {
  border-color: var(--eve-border-20);
  background: var(--eve-bg-10);
  transform: translateY(-1px);
}

.field-data-card.is-selected {
  border-color: rgba(0, 159, 218, 0.48);
  background: var(--eve-blue-subtle);
  box-shadow: inset 3px 0 0 var(--eve-blue);
}

.field-data-thumb {
  position: relative;
  display: grid;
  width: 92px;
  height: 68px;
  place-items: center;
  overflow: hidden;
  border-radius: 7px;
  background: linear-gradient(145deg, var(--eve-bg-20), var(--eve-border-10));
  color: var(--eve-text-50);
  font-size: 9px;
  text-align: center;
}

.field-data-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.field-data-thumb.is-portrait {
  background: linear-gradient(145deg, #dce6eb, #edf3f6);
}

.field-data-thumb.is-portrait img {
  padding: 4px;
  object-fit: contain;
}

.field-data-card-copy {
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
}

.field-data-card-copy strong {
  overflow: hidden;
  color: var(--eve-text-10);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-data-card-copy small {
  color: var(--eve-text-50);
  font-size: 9px;
}

.field-data-type {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow: hidden;
  color: var(--eve-text-30);
  font-size: 9px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.field-data-type i,
.field-data-detail-type i,
.field-data-map-legend i {
  width: 8px;
  height: 8px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: var(--field-data-type);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--field-data-type) 18%, transparent);
}

.field-data-map-pane {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  background: transparent;
  pointer-events: none;
}

.field-data-map-message {
  position: absolute;
  z-index: 4;
  top: 14px;
  left: 50%;
  max-width: calc(100% - 28px);
  padding: 8px 12px;
  border: 1px solid rgba(15, 42, 61, 0.14);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 5px 18px rgba(15, 42, 61, 0.16);
  color: var(--eve-text-20);
  font-size: 11px;
  font-weight: 700;
  text-align: center;
  transform: translateX(-50%);
}

.field-data-map-message[hidden] {
  display: none;
}

.field-data-map-legend {
  position: absolute;
  z-index: 3;
  right: 10px;
  bottom: 24px;
  display: grid;
  gap: 5px;
  max-width: 210px;
  padding: 9px 10px;
  border: 1px solid rgba(15, 42, 61, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.91);
  box-shadow: 0 4px 16px rgba(15, 42, 61, 0.12);
  backdrop-filter: blur(7px);
}

.field-data-map-legend span {
  display: flex;
  align-items: center;
  gap: 7px;
  color: var(--eve-text-30);
  font-size: 9px;
  font-weight: 700;
}

.field-data-detail {
  border-left: 1px solid var(--eve-border-10);
}

.field-data-detail-scroll {
  min-height: 0;
  padding-bottom: 18px;
  overflow-y: auto;
}

.field-data-media {
  position: relative;
  display: grid;
  aspect-ratio: 16 / 10;
  max-height: 280px;
  place-items: center;
  overflow: hidden;
  background: linear-gradient(145deg, #dce6eb, #edf3f6);
}

.field-data-photo-button {
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.field-data-photo-button img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.field-data-types,
.field-data-detail-types {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.field-data-types .field-data-type {
  width: fit-content;
}

.field-data-media.is-portrait {
  width: min(100%, 330px);
  aspect-ratio: 3 / 4;
  max-height: 440px;
  justify-self: center;
  background: linear-gradient(145deg, #dce6eb, #edf3f6);
}

.field-data-media.is-portrait .field-data-photo-button img {
  object-fit: contain;
}

.field-data-photo-button.is-expanded {
  position: fixed;
  z-index: 9300;
  inset: 0;
  padding: 32px;
  background: rgba(5, 18, 28, 0.94);
  cursor: zoom-out;
}

.field-data-photo-button.is-expanded img {
  object-fit: contain;
}

.field-data-no-media,
.field-data-photo-loading {
  display: grid;
  gap: 8px;
  place-items: center;
  color: var(--eve-text-50);
  font-size: 11px;
}

.field-data-no-media span {
  font-size: 30px;
  opacity: 0.55;
}

.field-data-media-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 6px;
  border-bottom: 1px solid var(--eve-border-10);
  color: var(--eve-text-40);
  font-size: 10px;
}

.field-data-media-nav button {
  width: 27px;
  height: 27px;
  border: 1px solid var(--eve-border-20);
  border-radius: 999px;
  background: var(--eve-bg-card);
  color: var(--eve-text-20);
  cursor: pointer;
}

.field-data-detail-head {
  padding: 15px 16px 12px;
  border-bottom: 1px solid var(--eve-border-10);
}

.field-data-detail-type {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 22px;
  padding: 3px 8px;
  border: 1px solid color-mix(in srgb, var(--field-data-type) 42%, white);
  border-radius: 999px;
  background: color-mix(in srgb, var(--field-data-type) 10%, white);
  color: var(--eve-text-20);
  font-size: 9px;
  font-weight: 800;
}

.field-data-detail-head h3 {
  margin: 9px 0 3px;
  color: var(--eve-navy);
  font-size: 14px;
}

.field-data-detail-head p {
  margin: 0;
  color: var(--eve-text-50);
  font-size: 10px;
}

.field-data-detail-group {
  padding: 13px 16px 3px;
}

.field-data-detail-group h3 {
  margin: 0 0 8px;
  color: var(--eve-blue-dark, #00698f);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.field-data-detail-group dl {
  display: grid;
  gap: 7px;
  margin: 0;
}

.field-data-attribute {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(90px, 0.75fr);
  gap: 10px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--eve-border-10);
}

.field-data-attribute dt,
.field-data-attribute dd {
  margin: 0;
  line-height: 1.35;
}

.field-data-attribute dt {
  color: var(--eve-text-50);
  font-size: 9px;
}

.field-data-attribute dd {
  color: var(--eve-text-10);
  font-size: 10px;
  font-weight: 700;
  overflow-wrap: anywhere;
  text-align: right;
}

.field-data-detail-empty,
.field-data-empty {
  display: grid;
  gap: 7px;
  min-height: 150px;
  padding: 24px;
  place-content: center;
  color: var(--eve-text-50);
  text-align: center;
}

.field-data-detail-empty span {
  color: var(--eve-blue);
  font-size: 28px;
}

.field-data-detail-empty strong {
  color: var(--eve-navy);
}

.field-data-detail-empty p {
  max-width: 220px;
  margin: 0;
  font-size: 11px;
  line-height: 1.45;
}

.field-data-disclaimer {
  padding: 7px 14px;
  border-top: 1px solid var(--eve-border-10);
  background: #fffaf0;
  color: #6d5526;
  font-size: 10px;
  pointer-events: auto;
}

.field-data-disclaimer summary {
  font-weight: 800;
  cursor: pointer;
}

.field-data-disclaimer p {
  max-width: 1080px;
  margin: 7px 0 2px;
  line-height: 1.5;
}

@media (max-width: 1240px) {
  .field-data-header {
    grid-template-columns: minmax(180px, 0.6fr) minmax(300px, 1.4fr) auto;
    gap: 10px;
  }

  .field-data-workspace {
    grid-template-columns: 280px minmax(340px, 1fr);
    grid-template-rows: minmax(0, 1fr) 290px;
  }

  .field-data-detail {
    grid-column: 1 / -1;
    display: block;
    overflow-y: auto;
    border-top: 1px solid var(--eve-border-10);
    border-left: 0;
  }

  .field-data-detail-scroll {
    display: grid;
    grid-template-columns: minmax(300px, 0.8fr) minmax(320px, 1.2fr);
    align-items: start;
    overflow: visible;
  }

  .field-data-media,
  .field-data-media-nav {
    grid-column: 1;
  }

  .field-data-detail-head,
  .field-data-detail-group {
    grid-column: 2;
  }
}

@media (max-width: 820px) {
  #fieldDataMode {
    overflow: auto;
  }

  .field-data-shell[data-view="picker"] .field-data-event-picker {
    align-content: start;
    padding: 30px 18px 42px;
  }

  .field-data-event-picker-intro {
    text-align: left;
  }

  .field-data-event-picker-intro > p:last-child {
    margin-left: 0;
  }

  .field-data-event-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .field-data-event-choice {
    grid-template-columns: 86px minmax(0, 1fr);
    gap: 15px;
    min-height: 210px;
    padding: 18px 18px 48px;
  }

  .field-data-event-choice-art {
    min-height: 112px;
  }

  .field-data-event-silhouette {
    width: 64px;
    height: 100px;
  }

  .field-data-event-choice-copy strong {
    font-size: 21px;
  }

  .field-data-event-choice-action {
    right: 18px;
    bottom: 16px;
  }

  .field-data-shell {
    display: block;
    height: auto;
  }

  .field-data-header {
    grid-template-columns: 1fr;
  }

  .field-data-session {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .field-data-metrics {
    grid-template-columns: repeat(5, 142px);
  }

  .field-data-workspace {
    display: block;
  }

  .field-data-feed {
    height: 340px;
  }

  .field-data-map-pane {
    height: 440px;
  }

  .field-data-detail {
    min-height: 420px;
  }

  .field-data-detail-scroll {
    display: block;
  }

  .field-data-photo-button.is-expanded {
    padding: 12px;
  }
}

@media (max-width: 820px) {
  /* Portrait: map on top, panel in the bottom 48%, matching Mapping
     (--mapping-phone-panel-height). The landscape block below replaces this
     with the side-by-side arrangement both modes already use.
     Width invariant (D3): one local variable sets both the panel height and the
     map's matching edge. */
  #modeContent[data-active-mode="exposure-model"] {
    --em-phone-panel-height: 48%;
  }

  #exposureModelMode {
    inset: auto 0 0 0;
    width: auto;
    height: var(--em-phone-panel-height);
    border-right: 0;
    border-top: 1px solid var(--eve-border);
    box-shadow: 0 -6px 18px rgba(15, 42, 61, 0.08);
  }

  #modeContent[data-active-mode="exposure-model"] #viewDiv {
    inset: var(--mode-title-bar-height) 0 var(--em-phone-panel-height) 0;
  }

  #exposureModelMode .em-header {
    padding: 12px 14px;
  }

  #exposureModelMode .em-header h2 {
    font-size: 18px;
  }

  #exposureModelMode .em-header p:last-child {
    display: none;
  }

  #exposureModelMode .em-chart-dialog {
    padding: 10px;
  }

  #exposureModelMode .em-chart-sheet {
    width: calc(100vw - 20px);
    max-height: calc(100vh - 20px);
  }

  #exposureModelMode .em-chart-grid {
    grid-template-columns: 1fr;
    padding: 9px;
  }

  #exposureModelMode .em-chart-card {
    padding: 14px 10px 10px;
  }

  #exposureModelMode .em-chart-plot {
    overflow-x: auto;
  }

  #exposureModelMode .em-chart-card svg {
    min-width: 680px;
  }
}

/* Field Data validation workspace (field-data-review.html) */

.field-data-standalone-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

@media (max-width: 1060px) {
  .field-data-review-tag,
  .field-data-public-tag {
    display: none;
  }
}

@media (max-width: 820px) {
  #fieldDataStandalone {
    grid-template-rows: auto auto minmax(0, 1fr);
  }

  .field-data-standalone-masthead,
  .field-data-standalone-tools {
    flex-wrap: wrap;
  }

  .field-data-standalone-masthead {
    align-items: flex-start;
  }

  .field-data-standalone-tools {
    gap: 7px 10px;
  }

  .field-data-environment-ribbon {
    min-height: 34px;
    padding: 5px 12px;
    font-size: 10px;
  }
}

.field-data-public-link {
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.48);
  border-radius: 5px;
  color: #fff;
  font-size: 12px;
  font-weight: 650;
  text-decoration: none;
}

.field-data-public-link:hover,
.field-data-public-link:focus-visible {
  background: rgba(255, 255, 255, 0.12);
}

.field-data-review-tag {
  padding: 4px 9px;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.82);
  font-size: 11px;
  letter-spacing: 0.02em;
}

.field-data-feed-head > .field-data-review-filters {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: end;
  gap: 10px;
}

.field-data-review-badges {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
}

.field-data-review-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 7px;
  border: 1px solid var(--eve-border-10);
  border-radius: 999px;
  background: var(--eve-bg-00);
  color: var(--eve-text-50);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.field-data-review-badge i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--field-data-review, var(--eve-text-40));
}

.field-data-review-panel {
  display: grid;
  gap: 10px;
  margin: 0 0 14px;
  padding: 13px 14px;
  border: 1px solid var(--eve-border-20);
  border-radius: var(--eve-radius);
  background: var(--eve-bg-00);
}

.field-data-review-panel header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.field-data-review-panel h3 {
  margin: 0;
  color: var(--eve-navy);
  font-size: 13px;
}

.field-data-review-hint {
  margin: 0;
  color: var(--eve-text-50);
  font-size: 11px;
  line-height: 1.45;
}

.field-data-review-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
  gap: 10px;
}

.field-data-review-status-help {
  padding: 8px 10px;
  border: 1px solid var(--eve-border-10);
  border-radius: var(--eve-radius-sm);
  background: var(--eve-bg-card);
  color: var(--eve-text-50);
  font-size: 10px;
}

.field-data-review-status-help summary {
  color: var(--eve-text-40);
  font-weight: 750;
  cursor: pointer;
}

.field-data-review-status-help dl {
  display: grid;
  gap: 7px;
  margin: 9px 0 1px;
}

.field-data-review-status-help dl > div {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  gap: 8px;
}

.field-data-review-status-help dt {
  color: var(--eve-text);
  font-weight: 750;
}

.field-data-review-status-help dd {
  margin: 0;
  line-height: 1.4;
}

.field-data-review-panel label {
  display: grid;
  gap: 5px;
  min-width: 0;
  color: var(--eve-text-40);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.field-data-review-panel select,
.field-data-review-panel textarea {
  width: 100%;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--eve-border-20);
  border-radius: var(--eve-radius-sm);
  background: var(--eve-bg-card);
  color: var(--eve-text);
  font: inherit;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
}

.field-data-review-panel textarea {
  font-weight: 400;
  line-height: 1.45;
  resize: vertical;
}

.field-data-review-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.field-data-review-save {
  padding: 8px 14px;
  border: 1px solid var(--eve-blue);
  border-radius: var(--eve-radius-sm);
  background: var(--eve-blue);
  color: white;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
}

.field-data-review-save[disabled] {
  opacity: 0.55;
  cursor: default;
}

.field-data-review-feedback {
  color: var(--eve-text-50);
  font-size: 11px;
}

.field-data-review-meta {
  margin: 0;
  color: var(--eve-text-50);
  font-size: 11px;
}

@media (max-width: 900px) {
  .field-data-review-grid,
  .field-data-feed-head > .field-data-review-filters {
    grid-template-columns: 1fr;
  }
}

.field-data-legend-area i {
  width: 12px;
  height: 9px;
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 2px;
}

.field-data-public-tag {
  padding: 6px 10px;
  border: 1px solid rgba(255, 255, 255, 0.42);
  border-radius: 999px;
  color: white;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.field-data-review-lock {
  color: var(--eve-data-red);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: normal;
  text-transform: none;
}

/* ============================================================
   Mobile shell (docs/mobile_readiness_plan.md, Phase 1)
   At 820 px and below the sidebar becomes a fixed overlay drawer, fully out
   of flow, so opening it never changes the #viewDiv box (D2). The breakpoint
   matches Field Data's `max-width: 820px` (D1) and MOBILE_SHELL_QUERY in
   js/ui/sidebar-drawer.js. Above it every rule here is inert.
   ============================================================ */

.sidebar-drawer-trigger,
.sidebar-drawer-close,
.sidebar-drawer-backdrop {
  display: none;
}

@media (max-width: 820px) {
  /* Overrides the six-property !important block on the base shell-panel rule;
     same selector, later in the file, so it wins only inside this query. */
  calcite-shell-panel.eve-sidebar-shell[slot="panel-start"] {
    --eve-drawer-width: min(var(--app-filter-panel-width), calc(100vw - 48px));
    --calcite-shell-panel-width: var(--eve-drawer-width);
    --calcite-shell-panel-min-width: var(--eve-drawer-width);
    --calcite-shell-panel-max-width: var(--eve-drawer-width);
    position: fixed;
    top: 0;
    left: 0;
    z-index: 9000;
    inline-size: var(--eve-drawer-width) !important;
    width: var(--eve-drawer-width) !important;
    min-inline-size: var(--eve-drawer-width) !important;
    max-inline-size: var(--eve-drawer-width) !important;
    min-width: var(--eve-drawer-width) !important;
    max-width: var(--eve-drawer-width) !important;
    height: 100vh;
    height: 100dvh;
    overscroll-behavior: contain;
    box-shadow: 4px 0 28px rgba(10, 30, 50, 0.18);
    transform: translateX(-100%);
    visibility: hidden;
    transition: transform 0.2s cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0s linear 0.2s;
  }

  calcite-shell-panel.eve-sidebar-shell[slot="panel-start"].is-open {
    transform: none;
    visibility: visible;
    transition: transform 0.2s cubic-bezier(0.22, 0.61, 0.36, 1), visibility 0s linear 0s;
  }

  .sidebar-drawer-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 8990;
    background: rgba(10, 30, 50, 0.38);
    cursor: pointer;
  }

  .sidebar-drawer-backdrop[hidden] {
    display: none;
  }

  html.eve-drawer-open,
  html.eve-drawer-open body {
    overflow: hidden;
  }

  .sidebar-drawer-trigger {
    position: absolute;
    top: 7px;
    left: 8px;
    z-index: 10;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    min-height: 32px;
    padding: 5px 10px;
    border: 1px solid rgba(15, 42, 61, 0.22);
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.92);
    color: var(--eve-text);
    font: inherit;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(15, 42, 61, 0.10);
  }

  .sidebar-drawer-trigger:hover,
  .sidebar-drawer-trigger:focus-visible {
    border-color: var(--eve-blue);
    background: var(--eve-bg-card);
    color: var(--eve-blue);
  }

  .sidebar-drawer-trigger-icon {
    font-size: 15px;
    line-height: 1;
  }

  .sidebar-drawer-close {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    margin-left: auto;
    border: none;
    border-radius: var(--eve-radius, 4px);
    background: none;
    color: rgba(255, 255, 255, 0.8);
    font-size: 16px;
    cursor: pointer;
  }

  .sidebar-drawer-close:hover,
  .sidebar-drawer-close:focus-visible {
    background: rgba(255, 255, 255, 0.12);
    color: #fff;
  }

  .eve-sidebar-header {
    padding-right: 8px;
  }

  /* In the drawer the close button narrows the title: the header grows instead
     of clipping the brand name or the DIEM link. */
  .app-sidehead.eve-sidebar-header {
    height: auto;
    min-height: var(--app-header-height);
    padding-top: 6px;
    padding-bottom: 6px;
  }

  .app-sidehead-diem {
    white-space: normal;
  }

  /* Mode tabs: a horizontally scrolling strip. Tab count varies by country
     and sign-in (six to eight), so tabs keep their natural width. */
  #modeTabs {
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;
    overscroll-behavior-x: contain;
  }

  #modeTabs::-webkit-scrollbar {
    display: none;
  }

  #modeTabs .mode-tab {
    flex: 0 0 auto;
    padding: 0 16px;
    white-space: nowrap;
  }
}

/* ------------------------------------------------------------
   Phone top band (Phase 2a). EVE only: the standalone Field Data pages mark
   <body data-app="field-data-standalone"> and keep their own masthead.
   Every mode starts below a 46 px band holding Filters and the help button
   (left), the mode title, and Team access (right). Modes already position
   against --mode-title-bar-height, so raising it here is enough for them.
   ------------------------------------------------------------ */
@media (max-width: 820px) {
  body:not([data-app]) #modeContent {
    --mode-title-bar-height: 46px;
  }

  body:not([data-app]) #modeTitleBar:not([hidden]) {
    position: absolute;
    inset: 0 0 auto 0;
    z-index: 9;
    display: -webkit-box !important;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    height: var(--mode-title-bar-height);
    min-height: 0;
    /* Transparent 8 px top and bottom borders instead of padding: overflow
       clips at the padding box, so exactly two 15 px lines show.
       The right gutter is measured from the Team access button by
       js/ui/mode-title.js, because its label width varies with the sign-in
       state and the locale; 122px is the English signed-out fallback. */
    padding: 0 var(--phone-band-right-gutter, 122px) 0 138px;
    border: 0;
    border-top: 8px solid transparent;
    border-bottom: 8px solid transparent;
    background: rgba(255, 255, 255, 0.96);
    color: var(--eve-text-20);
    font-size: 11.5px;
    font-weight: 700;
    line-height: 15px;
    box-shadow: 0 1px 0 var(--eve-border-10), 0 4px 12px rgba(15, 42, 61, 0.06);
  }

  body:not([data-app]) #modeTitleBar::before {
    display: none;
  }

  .sidebar-drawer-trigger {
    min-width: 80px;
    justify-content: center;
  }

  /* The floating "User Guide" pill covers panel content on phones; it becomes
     a round "?" beside Filters. Its aria-label still names it. */
  body:not([data-app]) .help-docs-btn {
    top: 7px;
    bottom: auto;
    left: 96px;
    right: auto;
    width: 32px;
    height: 32px;
    padding: 0;
    justify-content: center;
    font-size: 0;
  }

  body:not([data-app]) .help-docs-btn::before {
    content: "?";
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
  }

  /* Field Data in EVE: below the band, map first, then feed and detail. */
  body:not([data-app]) #modeContent[data-active-mode="field-data"] #fieldDataMode {
    top: var(--mode-title-bar-height);
  }

  body:not([data-app]) .field-data-workspace {
    display: flex;
    flex-direction: column;
  }

  body:not([data-app]) .field-data-map-pane {
    order: -1;
    height: clamp(260px, 50vh, 440px);
  }
}

/* ------------------------------------------------------------
   Overview at phone widths (Phase 2a, Tier 1)
   ------------------------------------------------------------ */
@media (max-width: 820px) {
  /* KPI cards: one swipeable row showing all four cards. The narrow-width
     rules above hide cards 3 and 4 (exposed population, cloud); here they
     come back, and the third card peeks in to show the row scrolls. */
  #modeContent[data-active-mode="overview"] #overviewFindings {
    padding: 8px 10px;
  }

  #modeContent[data-active-mode="overview"] #overviewFindings .ov-grid,
  #overviewFindings .ov-grid {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }

  #overviewFindings .ov-grid::-webkit-scrollbar {
    display: none;
  }

  #modeContent[data-active-mode="overview"] #overviewFindings .ov-card:nth-child(n),
  #overviewFindings .ov-card:nth-child(n) {
    display: flex;
    flex: 0 0 min(200px, 56%);
    min-height: 0;
    padding: 9px 10px 8px;
    scroll-snap-align: start;
  }

  /* Label and value on one line, so each card is three short lines tall. */
  #modeContent[data-active-mode="overview"] #overviewFindings .ov-row,
  #overviewFindings .ov-row {
    grid-template-columns: 70px minmax(0, 1fr);
    column-gap: 6px;
    margin-bottom: 2px;
  }

  #modeContent[data-active-mode="overview"] #overviewFindings .ov-value,
  #overviewFindings .ov-value {
    flex-wrap: nowrap;
    white-space: nowrap;
    font-size: 13px;
  }

  /* Ranking panel: a single scroll for controls and rows, controls wrapped. */
  #modeContent[data-active-mode="overview"] #overviewLeftChart {
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  #overviewLeftChart .ovl-chart {
    flex: none;
    overflow: visible;
  }

  #overviewLeftChart .ovl-controls {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 8px 12px;
    padding: 10px 12px;
  }

  #overviewLeftChart .ovl-control-block {
    flex: 1 1 140px;
    min-width: 0;
  }

  #overviewLeftChart .ovl-control-block:first-child {
    flex-basis: 100%;
  }
}

@media (max-width: 820px) and (min-height: 501px) {
  /* Portrait: KPI row, map, ranking below.
     Width invariant (D3): the ranking spans the full content width instead of
     --overview-left-width, so neither the KPI row nor the map is offset by it;
     the map's bottom edge equals the ranking's height. */
  #modeContent[data-active-mode="overview"] {
    --overview-phone-ranking-height: 42%;
  }

  #modeContent[data-active-mode="overview"] #overviewFindings {
    left: 0;
    right: 0;
    width: auto;
  }

  #modeContent[data-active-mode="overview"] #overviewLeftChart {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: auto;
    height: var(--overview-phone-ranking-height);
    border-top: 1px solid var(--eve-border);
    border-right: 0;
    border-radius: 0;
    box-shadow: 0 -6px 18px rgba(15, 42, 61, 0.08);
  }

  #modeContent[data-active-mode="overview"] #viewDiv {
    inset: calc(var(--mode-title-bar-height) + var(--overview-summary-height)) 0 var(--overview-phone-ranking-height) 0;
  }
}

@media (max-width: 820px) and (max-height: 500px) {
  /* Landscape phones: ranking stays beside the map, narrower.
     Width invariant (D3): --overview-left-width is narrowed locally on
     #modeContent, so the ranking width, the KPI row's left edge and the map's
     left edge still derive from one value. The shared
     --app-filter-panel-width is untouched. */
  #modeContent[data-active-mode="overview"] {
    --overview-left-width: min(300px, 40%);
  }
}

/* ------------------------------------------------------------
   Desktop-only gate for Tier 2 controls (D5, Phase 2b). Presentation only:
   no state or URL changes. The width test is the shared 820 px breakpoint.
   Mark a control `.desktop-only` and put a `.desktop-only-hint` beside it.
   ------------------------------------------------------------ */
.desktop-only-hint {
  display: none;
}

@media (max-width: 820px) {
  body:not([data-app]) .desktop-only {
    display: none !important;
  }

  body:not([data-app]) .desktop-only-hint {
    display: block;
    margin: 6px 0 0;
    padding: 7px 10px;
    border-left: 3px solid var(--eve-blue);
    border-radius: 4px;
    background: rgba(0, 159, 218, 0.07);
    color: var(--eve-text-muted);
    font-size: 11.5px;
    font-weight: 500;
    line-height: 1.35;
    text-transform: none;
    letter-spacing: 0;
  }
}

/* ------------------------------------------------------------
   Phone cross-cutting (Phase 3)
   ------------------------------------------------------------ */
@media (max-width: 820px) {
  /* Pinch zoom is enabled again (viewport meta). iOS Safari zooms the page when
     a form field with text under 16 px gets focus, so native fields use 16 px.
     All pages, including the standalone Field Data pages. */
  select,
  textarea,
  input[type="text"],
  input[type="search"],
  input[type="email"],
  input[type="number"] {
    font-size: 16px !important;
  }

  /* Range sliders were 14 to 16 px tall; give the thumb a 28 px hit area. */
  body:not([data-app]) input[type="range"] {
    min-height: 28px;
  }
}

/* ------------------------------------------------------------
   Tier 3 notice (D5, Phase 2c): js/ui/phone-mode-notice.js sets
   data-phone-notice and data-phone-notice-scope on #modeContent while the
   notice is shown. Presentation only.
   ------------------------------------------------------------ */
.phone-mode-notice[hidden] {
  display: none !important;
}

@media (max-width: 820px) {
  /* Report Generation positioned from 0 below 721 px; start it below the band. */
  body:not([data-app]) #modeContent[data-active-mode="report-generation"] #reportGeneration {
    top: var(--mode-title-bar-height);
  }

  body:not([data-app]) .phone-mode-notice {
    position: absolute;
    top: var(--mode-title-bar-height);
    right: 0;
    left: 0;
    z-index: 12;
    padding: 16px;
    background: linear-gradient(180deg, #f8fbfd 0%, #eef3f8 100%);
    border-bottom: 1px solid var(--eve-border);
  }

  /* Full scope: the notice replaces the mode. Hidden content keeps its layout
     (no map resize) but leaves the focus order and the accessibility tree. */
  body:not([data-app]) #modeContent[data-phone-notice-scope="full"] .phone-mode-notice {
    bottom: 0;
    display: flex;
    align-items: center;
    overflow-y: auto;
  }

  body:not([data-app]) #modeContent[data-phone-notice-scope="full"] > :not(.phone-mode-notice):not(#modeTitleBar) {
    visibility: hidden;
  }

  /* Partial scope (Report Generation): the builder is hidden and the panel,
     with its download links, starts below the notice. */
  body:not([data-app]) #modeContent[data-phone-notice="report-generation"] #reportGeneration {
    top: calc(var(--mode-title-bar-height) + var(--phone-notice-height, 0px));
  }

  body:not([data-app]) #modeContent[data-phone-notice="report-generation"] #reportGeneration .rg-panel > :not(.rg-download-section) {
    display: none !important;
  }

  .phone-mode-notice-card {
    width: 100%;
    max-width: 520px;
    margin: 0 auto;
    padding: 18px 18px 16px;
    border: 1px solid var(--eve-border);
    border-top: 4px solid var(--eve-blue);
    border-radius: var(--eve-radius);
    background: var(--eve-bg-card);
    box-shadow: var(--eve-shadow);
  }

  .phone-mode-notice-eyebrow {
    margin: 0 0 6px;
    color: var(--eve-blue);
    font-size: 10.5px;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  .phone-mode-notice-card h2 {
    margin: 0 0 8px;
    color: var(--eve-text);
    font-family: "DM Serif Display", Georgia, serif;
    font-size: 22px;
    font-weight: 400;
    line-height: 1.2;
  }

  .phone-mode-notice-body {
    margin: 0 0 14px;
    color: var(--eve-text-muted);
    font-size: 13px;
    line-height: 1.45;
  }

  .phone-mode-notice-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .phone-mode-notice-actions button {
    min-height: 40px;
    padding: 8px 14px;
    border-radius: 6px;
    font: inherit;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
  }

  .phone-mode-notice-continue {
    border: 1px solid var(--eve-blue);
    background: var(--eve-blue);
    color: #fff;
  }

  .phone-mode-notice-back {
    border: 1px solid var(--eve-border);
    background: var(--eve-bg-card);
    color: var(--eve-text);
  }
}

/* ------------------------------------------------------------
   Mapping, Time analysis and Exposure model at phone widths (Phase 2b, Tier 2)
   ------------------------------------------------------------ */
@media (max-width: 820px) {
  /* Time analysis header: the title keeps the full width; level tabs on their
     own row; flood-type tabs and the animation control share the third. */
  #timeAnalysisMode .ta-topbar {
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 6px 8px;
    margin-bottom: 6px;
  }

  #timeAnalysisMode .ta-header-line {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  #timeAnalysisMode .ta-sub {
    display: none;
  }

  #timeAnalysisMode #taTabs {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-self: start;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  #timeAnalysisMode #taFloodTabs {
    grid-column: 1;
    grid-row: 3;
    justify-self: start;
  }

  #timeAnalysisMode .ta-animation-panel {
    grid-column: 2;
    grid-row: 3;
    justify-self: end;
    min-width: 0;
    max-width: none;
  }

  /* While a range is being chosen or a GIF is running, the animation panel
     takes its own full-width row: instruction, then Start and Cancel, then the hint. */
  #timeAnalysisMode .ta-animation-panel:has(> .ta-animation-range:not([hidden])),
  #timeAnalysisMode .ta-animation-panel:has(> .ta-export-progress:not([hidden])) {
    grid-column: 1 / -1;
    grid-row: 4;
    justify-self: stretch;
  }

  #timeAnalysisMode .ta-animation-range {
    grid-template-columns: auto auto minmax(0, 1fr);
  }

  #timeAnalysisMode #taAnimationRangeText {
    grid-column: 1 / -1;
  }

  #timeAnalysisMode .ta-animation-range .desktop-only-hint {
    grid-column: 1 / -1;
    grid-row: 3;
    margin: 0;
  }

  /* The Exposure model header's clearance for the phone top band is set in the
     landscape block below: only there is the panel docked to the top-left and
     overlapped by the band's buttons. In portrait the panel sits at the bottom. */

  /* The Charts dialog is fixed but lives inside #exposureModelMode's stacking
     context (z-index 4), below the band buttons (z-index 10), which then covered
     its close button. Lift the panel only while a dialog is open. */
  #exposureModelMode:has(.em-chart-dialog:not([hidden])) {
    z-index: 20;
  }
}

@media (max-width: 820px) and (min-height: 501px) {
  /* Mapping portrait: map on top, controls in the bottom 48%.
     Width invariant (D3): the panel spans the full width, so the map is not
     offset by --impact-panel-width; the map's bottom edge equals the panel height. */
  #modeContent[data-active-mode="impact-analysis"] {
    --mapping-phone-panel-height: 48%;
  }

  #modeContent[data-active-mode="impact-analysis"] #livestockMode,
  #modeContent[data-active-mode="impact-analysis"][data-breakdown-open="1"] #livestockMode {
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    width: auto;
    height: var(--mapping-phone-panel-height);
    overflow-y: auto;
    overscroll-behavior: contain;
    border-top: 1px solid var(--eve-border);
    border-right: 0;
    box-shadow: 0 -6px 18px rgba(15, 42, 61, 0.08);
  }

  #modeContent[data-active-mode="impact-analysis"] #viewDiv,
  #modeContent[data-active-mode="impact-analysis"][data-breakdown-open="1"] #viewDiv {
    inset: var(--mode-title-bar-height) 0 var(--mapping-phone-panel-height) 0;
  }

  /* Time analysis portrait: the chart panel takes the bottom half. The map's
     bottom edge already follows --time-panel-height. */
  #modeContent[data-active-mode="time-analysis"] {
    --time-panel-height: 50%;
  }
}

@media (max-width: 820px) and (max-height: 500px) {
  /* Landscape phones: each Tier 2 panel sits beside the map.
     Width invariant (D3): for each mode one local variable sets both the
     panel width and the map's matching edge. */
  #modeContent[data-active-mode="impact-analysis"] {
    --mapping-phone-panel-width: min(300px, 42%);
  }

  #modeContent[data-active-mode="impact-analysis"] #livestockMode,
  #modeContent[data-active-mode="impact-analysis"][data-breakdown-open="1"] #livestockMode {
    top: var(--mode-title-bar-height);
    right: auto;
    bottom: 0;
    left: 0;
    width: var(--mapping-phone-panel-width);
    height: auto;
    overflow-y: auto;
    overscroll-behavior: contain;
  }

  #modeContent[data-active-mode="impact-analysis"] #viewDiv,
  #modeContent[data-active-mode="impact-analysis"][data-breakdown-open="1"] #viewDiv {
    inset: var(--mode-title-bar-height) 0 0 var(--mapping-phone-panel-width);
  }

  #modeContent[data-active-mode="time-analysis"] {
    --time-phone-panel-width: 58%;
  }

  #modeContent[data-active-mode="time-analysis"] #timeAnalysisMode {
    top: var(--mode-title-bar-height);
    right: 0;
    bottom: 0;
    left: auto;
    width: var(--time-phone-panel-width);
    height: auto;
    border-top: 0;
    border-left: 1px solid var(--eve-border);
  }

  #modeContent[data-active-mode="time-analysis"] #viewDiv {
    inset: var(--mode-title-bar-height) var(--time-phone-panel-width) 0 0;
  }

  #modeContent[data-active-mode="exposure-model"] {
    --em-phone-panel-width: min(340px, 48%);
  }

  #modeContent[data-active-mode="exposure-model"] #exposureModelMode {
    inset: 0 auto 0 0;
    width: var(--em-phone-panel-width);
    height: auto;
    border-top: 0;
    border-bottom: 0;
    border-right: 1px solid var(--eve-border-10);
    box-shadow: none;
  }

  /* Landscape only: the panel is docked to the top-left, under the band's
     Filters, help and Team access buttons, so its header reserves their height. */
  #exposureModelMode .em-header {
    padding-top: calc(var(--mode-title-bar-height) + 4px);
  }

  #modeContent[data-active-mode="exposure-model"] #viewDiv {
    inset: var(--mode-title-bar-height) 0 0 var(--em-phone-panel-width);
  }
}

/* ------------------------------------------------------------
   Phone device feedback (Phase 5), 820 px and below, EVE only
   ------------------------------------------------------------
   iPhone browsers (all WebKit, Chrome included) will not touch-scroll an
   overflow container whose hit-testing is off: pointer-events: none on the
   scroller, or inherited by everything inside it. Chromium on desktop still
   scrolls such a container, which is why headless checks passed. */
@media (max-width: 820px) {
  /* Overview KPI row: #overviewFindings is pointer-events: none so the map
     beneath stays usable; the swipeable row itself must take touches. */
  body:not([data-app]) #overviewFindings .ov-grid {
    pointer-events: auto;
  }

  /* Field Data: #fieldDataMode is the phone scroller. It takes touches, and in
     the workspace the map pane is pinned outside it (below), so the map is
     never under the scroller. In the picker the shell covers the map anyway. */
  body:not([data-app]) #modeContent[data-active-mode="field-data"] #fieldDataMode {
    pointer-events: auto;
  }

  /* Time analysis: playback is desktop only, so the animation panel holds just
     the one-line hint (and Stop, for a playback started above the breakpoint).
     It takes its own full-width row instead of sitting beside the flood tabs. */
  body:not([data-app]) #timeAnalysisMode .ta-animation-panel {
    grid-column: 1 / -1;
    grid-row: 4;
    justify-self: stretch;
  }

  body:not([data-app]) #timeAnalysisMode .ta-animation-phone-hint {
    margin: 0;
    padding: 4px 8px;
    font-size: 11px;
  }

  /* Field Data in EVE: the feed alone, growing with the page (no 340 px inner
     scroll). A report the user picks opens as a full-screen detail
     (#fieldDataMode[data-phone-detail], js/ui/field-data-view.js), raised above the
     band and mode tabs. Standalone pages (Nepal) are body[data-app] and keep the
     stacked detail. */
  body:not([data-app]) #fieldDataMode .field-data-feed {
    height: auto;
  }

  body:not([data-app]) #fieldDataMode .field-data-list {
    overflow: visible;
  }

  body:not([data-app]) #fieldDataMode:not([data-phone-detail]) .field-data-detail {
    display: none;
  }

  /* iOS Safari clips a position: fixed child to its overflow: auto ancestor, so
     the full-screen detail was cut to the scroller's box below the map strip:
     the map stayed visible and the List button was clipped away. While the
     detail is open the scroller itself covers the whole mode area and stops
     scrolling (the !important beats the :has() workspace offsets above), and
     the map is not painted at all. */
  body:not([data-app]) #modeContent #fieldDataMode[data-phone-detail] {
    inset: 0 !important;
    overflow: hidden;
    z-index: 1000;
  }

  html.eve-fd-detail-open body:not([data-app]) #viewDiv,
  body:not([data-app]) #fieldDataMode[data-phone-detail] .field-data-map-pane {
    visibility: hidden;
  }

  /* Ends at the 54 px mode tabs, the bottom of #fieldDataMode's box, so no
     browser clips the end of the detail. */
  body:not([data-app]) #fieldDataMode[data-phone-detail] .field-data-detail {
    position: fixed;
    inset: 0 0 54px;
    display: block;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    border: 0;
    background: var(--eve-bg-card);
  }

  body:not([data-app]) #fieldDataMode[data-phone-detail] .field-data-phone-nav {
    position: sticky;
    top: 0;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
    border-bottom: 1px solid var(--eve-border-10);
    background: var(--eve-bg-card);
  }

  body:not([data-app]) .field-data-phone-nav span {
    flex: 1;
    color: var(--eve-text-40);
    font-size: 13px;
    text-align: center;
  }

  body:not([data-app]) .field-data-phone-nav button {
    min-width: 44px;
    height: 40px;
    padding: 0 10px;
    border: 1px solid var(--eve-border-20);
    border-radius: 8px;
    background: #fff;
    color: var(--eve-navy);
    font-size: 20px;
    line-height: 1;
  }

  body:not([data-app]) .field-data-phone-nav .field-data-phone-back {
    font-size: 14px;
    font-weight: 600;
  }

  body:not([data-app]) .field-data-phone-nav button:disabled {
    opacity: 0.4;
  }

  /* The photo gets most of the screen and is shown whole, not cropped. */
  body:not([data-app]) #fieldDataMode[data-phone-detail] .field-data-media {
    aspect-ratio: auto;
    height: min(58vh, 480px);
    max-height: none;
  }

  body:not([data-app]) #fieldDataMode[data-phone-detail] .field-data-photo-button img {
    object-fit: contain;
  }

  /* Full-screen map toggle (js/ui/map-fullscreen.js). */
  body:not([data-app]) #viewDiv .eve-map-fullscreen-btn {
    display: flex;
  }

  html.eve-map-fullscreen body:not([data-app]) #viewDiv {
    position: fixed !important;
    inset: 0 !important;
    width: auto !important;
    height: auto !important;
    z-index: 1000 !important;
  }
}

/* Phone-only detail navigation (rendered in EVE at every width, shown only when open). */
.field-data-phone-nav {
  display: none;
}

/* Hidden above the phone breakpoint; the id beats .esri-widget--button's display. */
#viewDiv .eve-map-fullscreen-btn {
  display: none;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  padding: 0;
  border: 0;
  color: var(--eve-navy);
  cursor: pointer;
}

/* Field Data workspace, portrait. Width/height invariant: the pinned map strip
   spans the full width from the band down --fd-phone-map-height, and
   #fieldDataMode starts exactly where the strip ends, so the two never overlap.
   The pane stays the map's measured anchor (applyMapViewportGeometry). */
@media (max-width: 820px) and (min-height: 501px) {
  body:not([data-app]) #modeContent[data-active-mode="field-data"] {
    --fd-phone-map-height: clamp(200px, 40vh, 380px);
  }

  body:not([data-app]) #modeContent[data-active-mode="field-data"] #fieldDataMode:has(.field-data-shell[data-view="workspace"]) {
    top: calc(var(--mode-title-bar-height) + var(--fd-phone-map-height));
  }

  body:not([data-app]) .field-data-shell[data-view="workspace"] .field-data-map-pane {
    position: fixed;
    top: var(--mode-title-bar-height);
    left: 0;
    right: 0;
    height: var(--fd-phone-map-height);
  }
}

/* Field Data workspace, landscape. Invariant: map in the left half from the
   band to the top of the 54 px mode tabs; #fieldDataMode fills the right half. */
@media (max-width: 820px) and (max-height: 500px) {
  body:not([data-app]) #modeContent[data-active-mode="field-data"] #fieldDataMode:has(.field-data-shell[data-view="workspace"]) {
    left: 50%;
  }

  body:not([data-app]) .field-data-shell[data-view="workspace"] .field-data-map-pane {
    position: fixed;
    top: var(--mode-title-bar-height);
    bottom: 54px;
    left: 0;
    width: 50%;
    height: auto;
  }
}

/* ------------------------------------------------------------
   Focus indicator (Phase 3, extended to every width)
   ------------------------------------------------------------
   Introduced at 820 px and below, then applied at all widths: the gap it
   closes exists on desktop too, where the mode tabs and chips showed no
   indicator at all. Deliberately last in the file, so its outline-offset wins
   over the per-component :focus-visible rules above without needing
   !important on the offset. Scoped body:not([data-app]), so the standalone
   Field Data pages keep their own focus styling. */

/* The base 3 px ring at 20% alpha measured about 1.3:1 on white, and chips and
   mode tabs override it with box-shadow: none. A solid outline in the darker
   FAO blue (#00678d, about 6:1 on white) is not overridden by those rules. */
body:not([data-app]) :focus-visible {
  outline: 2px solid #00678d !important;
  outline-offset: 2px;
}

/* Inside horizontally scrolling strips an outer ring would be clipped. */
body:not([data-app]) #modeTabs .mode-tab:focus-visible,
body:not([data-app]) #overviewFindings .ov-grid:focus-visible {
  outline-offset: -3px;
}

/* On the navy sidebar header the ring is white. */
body:not([data-app]) .app-sidehead :focus-visible {
  outline-color: #fff !important;
}
