:root {
  --ink:#10202f;
  --muted:#637384;
  --surface:rgba(255,255,255,.96);
  --accent:#176b87;
  --accent2:#2f91ad;
  --map-feature-color:#176b87;
  --map-discharge-color:#176b87;
  --map-selected-color:#ef5a34;

  --inset-ocean:#eef3f5;
  --inset-land:#9caab2;
  --inset-border:#d7e0e4;
  --inset-country-border:#ffffff;
  --inset-viewport:#d7191c;
  --shadow:0 18px 55px rgba(15,31,45,.18);

  --top-bar-height:72px;
  --bottom-bar-height:112px;
  --layout-edge-gap:10px;
  --overlay-gap:12px;

  /* Change to flex-start or flex-end for left/right footer alignment. */
  --bottom-bar-content-justify:center;
  --bottom-bar-padding-block:18px;
  --bottom-bar-padding-inline:18px;
  --bottom-bar-item-gap:28px;
}
* { box-sizing:border-box; }
html,body,#app { width:100%; height:100%; margin:0; }
#app { position:relative; overflow:hidden; }
body { font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; color:var(--ink); overflow:hidden; }
#map {
  position:absolute;
  top:var(--top-bar-height);
  right:0;
  bottom:var(--bottom-bar-height);
  left:0;
  width:auto;
  height:auto;
  background:#dbe8ec;
}
.top-bar {
  position:absolute;
  z-index:1000;
  top:0;
  left:0;
  right:0;
  height:var(--top-bar-height);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  padding:8px 14px;
  background:rgba(255,255,255,.97);
  border-bottom:1px solid rgba(16,32,47,.12);
  box-shadow:0 5px 18px rgba(15,31,45,.13);
  backdrop-filter:blur(12px);
}
.top-bar-brand {
  min-width:0;
  display:flex;
  align-items:center;
  gap:12px;
}
.top-bar-github {
  width:42px;
  height:42px;
  flex:0 0 42px;
  display:grid;
  place-items:center;
  border-radius:11px;
  color:var(--ink);
  text-decoration:none;
  transition:background .16s ease, transform .16s ease;
}
.top-bar-github:hover {
  background:#eef3f5;
  transform:translateY(-1px);
}
.top-bar-github img {
  display:block;
  width:25px;
  height:25px;
}
.brand-logo-link {
  display:block;
  flex:0 0 auto;
  border-radius:11px;
  line-height:0;
}
.brand-logo {
  display:block;
  width:52px;
  height:52px;
  border-radius:11px;
  object-fit:contain;
  background:transparent;
}
.top-bar-brand strong {
  overflow: hidden;
  color: var(--ink);
  font-family: "Montserrat", sans-serif;
  font-size: 28px;
  font-weight: 700;
  line-height: 1.1;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.map-controls {
  position:absolute;
  z-index:1000;
  top:calc(var(--top-bar-height) + var(--layout-edge-gap));
  right:var(--layout-edge-gap);
  display:grid;
  justify-items:end;
  gap:8px;
  pointer-events:none;
}
.map-controls > * {
  pointer-events:auto;
}
.feature-switcher {
  display:flex;
  gap:4px;
  padding:5px;
  border-radius:14px;
  background:var(--surface);
  box-shadow:var(--shadow);
  backdrop-filter:blur(12px);
}
.feature-switcher button {
  border:0;
  background:transparent;
  padding:9px 15px;
  border-radius:10px;
  font-weight:650;
  color:var(--muted);
  cursor:pointer;
}
.feature-switcher button.active {
  background:var(--ink);
  color:white;
}
.frequency-toggle {
  display:flex;
  align-items:center;
  gap:8px;
  padding:8px 12px;
  border-radius:12px;
  background:var(--surface);
  box-shadow:var(--shadow);
  backdrop-filter:blur(12px);
  color:var(--ink);
  font-size:12px;
  font-weight:650;
  cursor:pointer;
}
.bottom-bar {
  position:absolute;
  z-index:1000;
  left:0;
  right:0;
  bottom:0;
  height:var(--bottom-bar-height);
  display:flex;
  align-items:center;
  justify-content:var(--bottom-bar-content-justify);
  gap:var(--bottom-bar-item-gap);
  padding:var(--bottom-bar-padding-block) var(--bottom-bar-padding-inline);
  overflow:hidden;
  background:rgba(255,255,255,.97);
  border-top:1px solid rgba(16,32,47,.12);
  box-shadow:0 -4px 15px rgba(15,31,45,.10);
  backdrop-filter:blur(12px);
}
.bottom-bar-text {
  flex:0 1 520px;
  max-width:520px;
  color:#536474;
  font-size:13px;
  line-height:1.45;
}
.bottom-bar-text a {
  color:var(--accent);
  text-decoration:none;
  font-weight:650;
}
.bottom-bar-text a:hover { text-decoration:underline; }
.bottom-bar-logo {
  display:block;
  flex:0 1 auto;
  width:auto;
  height:calc(var(--bottom-bar-height) - 2 * var(--bottom-bar-padding-block));
  max-width:min(27vw, 360px);
  object-fit:contain;
}
.bottom-bar-logo-eu { max-width:min(25vw, 330px); }
.bottom-bar-logo-seri { max-width:min(27vw, 360px); }
.map-status {
  position:absolute;
  z-index:900;
  left:50%;
  bottom:calc(var(--bottom-bar-height) + var(--overlay-gap));
  transform:translateX(-50%);
  background:rgba(16,32,47,.86);
  color:white;
  padding:8px 13px;
  border-radius:999px;
  font-size:12px;
  box-shadow:var(--shadow);
}

.welcome-dialog { width:min(680px,calc(100vw - 32px)); max-width:680px; max-height:calc(100vh - 32px); margin:auto; padding:0; overflow:visible; border:0; border-radius:22px; background:transparent; color:var(--ink); }
.welcome-dialog::backdrop { background:rgba(16,32,47,.54); backdrop-filter:blur(4px); }
.welcome-dialog-content { position:relative; display:grid; gap:20px; max-height:calc(100vh - 32px); padding:30px 32px 28px; overflow:auto; border:1px solid rgba(16,32,47,.10); border-radius:22px; background:rgba(255,255,255,.98); box-shadow:0 24px 70px rgba(15,31,45,.30); }
.welcome-copy { display:grid; gap:12px; padding-right:28px; }
.welcome-copy h2 { margin:0; font-size:25px; line-height:1.2; }
.welcome-copy p,.welcome-project p { margin:0; color:#536474; font-size:15px; line-height:1.55; }
.welcome-copy a,.welcome-project a { color:var(--accent); font-weight:650; text-decoration:none; }
.welcome-copy a:hover,.welcome-project a:hover { text-decoration:underline; }
.welcome-divider { width:100%; height:1px; margin:0; border:0; background:#dfe7ea; }
.welcome-project { display:grid; grid-template-columns:96px minmax(0,1fr); align-items:center; gap:18px; text-align:left; }
.welcome-project img { display:block; width:96px; height:72px; object-fit:contain; }
.welcome-actions { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:10px; }
.welcome-destination,.welcome-start { min-height:46px; border:0; border-radius:11px; padding:11px 16px; font:inherit; font-weight:700; cursor:pointer; }
.welcome-destination { display:flex; align-items:center; justify-content:center; gap:9px; background:#eef3f5; color:var(--ink); }
.welcome-destination:hover { background:#dde9ed; }
.welcome-destination img { width:21px; height:21px; }
.welcome-destination:disabled { opacity:.45; cursor:not-allowed; }
.welcome-start { grid-column:1/-1; background:var(--ink); color:#fff; }
.welcome-start:hover { background:var(--accent); }
.welcome-close { position:absolute; z-index:1; top:10px; right:10px; width:38px; height:38px; display:grid; place-items:center; border:0; border-radius:11px; background:#eef3f5; color:var(--ink); font:inherit; font-size:24px; line-height:1; cursor:pointer; }
.welcome-close:hover { background:#e2eaee; }
.welcome-close:focus-visible,.welcome-destination:focus-visible,.welcome-start:focus-visible { outline:3px solid rgba(23,107,135,.28); outline-offset:2px; }
@media (max-width:760px) {
  .welcome-dialog { width:min(520px,calc(100vw - 20px)); max-height:calc(100vh - 20px); }
  .welcome-dialog-content { gap:15px; max-height:calc(100vh - 20px); padding:24px 18px 20px; }
  .welcome-copy { padding-right:24px; }
  .welcome-copy h2 { font-size:20px; }
  .welcome-copy p,.welcome-project p { font-size:13px; line-height:1.45; }
  .welcome-project { grid-template-columns:72px minmax(0,1fr); gap:12px; }
  .welcome-project img { width:72px; height:58px; }
  .welcome-actions { grid-template-columns:1fr; }
  .welcome-start { grid-column:auto; }
}

.details-panel {
  position:fixed;
  z-index:1200;
  top:var(--top-bar-height);
  right:0;
  bottom:var(--bottom-bar-height);
  height:auto;
  width:40vw;
  min-width:560px;
  max-width:820px;
  transform:translateX(105%);
  transition:transform .28s cubic-bezier(.2,.8,.2,1);
  padding:12px;
  pointer-events:none;
}
.details-panel.open { transform:translateX(0); pointer-events:auto; }
.panel-shell { height:100%; min-width:0; background:#f7f8f8; border-radius:22px; box-shadow:var(--shadow); overflow:hidden; display:flex; flex-direction:column; backdrop-filter:blur(16px); }
.panel-topbar { min-height:82px; display:grid; grid-template-columns:1fr auto; align-items:center; gap:10px; padding:10px 14px; border-bottom:1px solid #e7edf0; }
.panel-heading { display:grid; grid-template-columns:32px minmax(0,1fr); align-items:center; gap:10px; }
.panel-heading-copy { min-width:0; }
.panel-heading strong { display:block; font-size:18px; line-height:1.15; }
.panel-heading small { display:block; color:var(--muted); margin-top:4px; font-size:14px; font-weight:700; }
.icon-button { width:38px; height:38px; border:0; border-radius:11px; background:#eef3f5; color:var(--ink); display:grid; place-items:center; cursor:pointer; }
.icon-button img { width:23px; height:23px; display:block; pointer-events:none; }
#panel-back { display:none; }
.panel-content { min-width:0; overflow:auto; padding:16px; }
.metadata { display:grid; gap:3px; margin-bottom:14px; font-size:13px; }
.metadata-row { display:grid; grid-template-columns:minmax(135px,38%) 1fr; gap:8px; padding:3px 0; }
.metadata-row span:first-child { color:var(--muted); }
.plot-card { min-width:0; max-width:100%; border:1px solid #e3eaee; border-radius:16px; overflow:hidden; background:#fff; box-shadow:0 8px 24px rgba(16,32,47,.06); }
.plot-toolbar { padding:12px 14px 5px; }
.plot-toolbar label { display:grid; gap:5px; }
.settings-heading { margin-bottom:7px; color:var(--muted); font-size:12px; font-weight:700; }
select { width:100%; border:1px solid #cfdade; background:white; border-radius:9px; padding:9px 10px; font:inherit; color:var(--ink); }
#plot { width:100%; min-width:0; max-width:100%; min-height:420px; overflow:hidden; }
.plot-loading { min-height:120px; padding:35px 16px; display:flex; align-items:center; justify-content:center; gap:10px; text-align:center; color:var(--muted); }
.loading-spinner { width:20px; height:20px; flex:0 0 20px; border:2.5px solid #d7e1e5; border-top-color:var(--accent); border-radius:50%; animation:spin .75s linear infinite; }
@keyframes spin { to { transform:rotate(360deg); } }
.settings-disclosure {
  border-top:1px solid #e7edf0;
  margin:0;
  color:var(--muted);
  font-size:12px;
}
.settings-disclosure[hidden] { display:none; }

.settings-summary {
  min-height:42px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:10px;
  padding:0 14px;
  cursor:pointer;
  user-select:none;
  list-style:none;
}
.settings-summary::-webkit-details-marker { display:none; }
.settings-summary::marker { display:none; }
.settings-summary .settings-heading {
  margin:0;
  display:inline-flex;
  align-items:center;
  gap:8px;
  color:var(--ink);
  font-size:12px;
  font-weight:700;
}
.settings-heading-icon {
  width:18px;
  height:18px;
  flex:0 0 18px;
  object-fit:contain;
}
.settings-chevron {
  width:7px;
  height:7px;
  flex:0 0 7px;
  border-right:1.5px solid var(--muted);
  border-bottom:1.5px solid var(--muted);
  transform:rotate(45deg) translateY(-2px);
  transition:transform .16s ease;
}
.settings-disclosure[open] .settings-chevron {
  transform:rotate(225deg) translate(-1px,-1px);
}

.settings-body {
  padding:0 14px 14px;
}
.quality-controls > .settings-body {
  container-type:inline-size;
  container-name:quality-settings;
}

/* Quality settings use the horizontal space of the details panel instead of
   stacking three short controls vertically. */
.quality-settings-grid {
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:7px 20px;
  align-items:stretch;
}
.quality-setting-item {
  min-width:0;
  min-height:40px;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
}
.quality-setting-item .toggle-switch,
.quality-setting-item .compact-setting-select {
  justify-self:end;
}
.quality-setting-item .compact-setting-select {
  width:min(180px, 48%);
  min-width:132px;
}
.setting-label-with-help {
  min-width:0;
  color:var(--muted);
  font-size:10.8px;
  font-weight:600;
  line-height:1.28;
}
.setting-label-text {
  color:inherit;
  font:inherit;
}
.setting-label-with-help .setting-label-text,
.setting-label-with-help .setting-help-button {
  vertical-align:middle;
}
.setting-label-with-help .setting-help-button {
  display:inline-grid;
  margin-left:4px;
  transform:translateY(-1px);
}

.setting-help-button {
  width:16px;
  height:16px;
  flex:0 0 16px;
  display:inline-grid;
  place-items:center;
  padding:0;
  border:1px solid #c8d3d8;
  border-radius:50%;
  background:#fff;
  color:#718087;
  font:700 9px/1 Inter,system-ui,sans-serif;
  cursor:pointer;
  box-sizing:border-box;
}
.setting-help-button:hover,
.setting-help-button[aria-expanded="true"] {
  border-color:#7f98a3;
  background:#edf3f5;
  color:var(--ink);
}
.setting-help-button:focus-visible {
  outline:2px solid var(--accent);
  outline-offset:2px;
}

.settings-help-stack {
  margin-top:9px;
}
.setting-help-text {
  padding:9px 10px;
  border-radius:8px;
  background:#f2f5f6;
  color:#53646c;
  font-size:10.5px;
  font-weight:400;
  line-height:1.45;
}
.setting-help-text[hidden] { display:none; }
.setting-help-text strong {
  color:#405159;
  font-weight:650;
}
.setting-help-text code {
  color:#405159;
  font-size:.96em;
}

.toggle-switch {
  position:relative;
  display:block;
  width:36px !important;
  height:20px !important;
  min-width:36px;
  min-height:20px;
  flex:0 0 36px;
  padding:0 !important;
  margin:0;
  border:0;
  border-radius:999px;
  cursor:pointer;
  box-sizing:border-box;
}
.toggle-switch input {
  position:absolute;
  width:1px;
  height:1px;
  opacity:0;
  pointer-events:none;
}
.toggle-switch span {
  position:absolute;
  inset:0;
  display:block;
  width:36px;
  height:20px;
  border-radius:999px !important;
  background:#cbd5d9;
  transition:background .15s ease;
  box-sizing:border-box;
}
.toggle-switch span::after {
  content:"";
  position:absolute;
  width:16px;
  height:16px;
  left:2px;
  top:2px;
  border-radius:50%;
  background:#fff;
  box-shadow:0 1px 3px rgba(16,32,47,.25);
  transition:transform .15s ease;
}
.toggle-switch input:checked + span {
  background:var(--accent);
}
.toggle-switch input:checked + span::after {
  transform:translateX(14px);
}
.toggle-switch input:focus-visible + span {
  outline:2px solid var(--accent);
  outline-offset:2px;
}
.toggle-switch input:disabled + span {
  opacity:.45;
  cursor:not-allowed;
}

.compact-setting-select {
  min-width:0;
  max-width:100%;
  height:34px;
  padding:6px 28px 6px 9px;
  border-radius:8px;
  font-size:10.5px;
  box-sizing:border-box;
}

/* Smoothing controls keep the established layout, with the same low-key
   control labels and optional help buttons. */
.smoothing-settings-body {
  display:grid;
  gap:10px;
}
.smoothing-settings-body .check-row {
  display:flex;
  align-items:center;
  gap:5px;
  color:var(--muted);
  font-size:11.5px;
  font-weight:500;
}
.smoothing-settings-body .check-row input { margin:0; }

.smoothing-parameter-row {
  display:grid;
  grid-template-columns:145px minmax(90px,1fr) 46px;
  align-items:center;
  gap:8px;
  color:var(--muted);
  font-size:11.5px;
  font-weight:500;
}
.smoothing-parameter-row .setting-label-with-help {
  align-items:center;
  font-size:11.5px;
  font-weight:500;
}
.smoothing-parameter-row output {
  text-align:right;
  white-space:nowrap;
}
input[type=range] { width:100%; }



@container quality-settings (max-width: 660px) {
  .quality-settings-grid {
    grid-template-columns:1fr;
    gap:3px;
  }

  .quality-setting-item {
    min-height:38px;
  }

  .quality-setting-item .compact-setting-select {
    width:min(220px, 46%);
    min-width:140px;
  }
}

@container quality-settings (max-width: 390px) {
  .quality-setting-item {
    grid-template-columns:minmax(0,1fr) auto;
    gap:8px;
  }

  .quality-setting-item .compact-setting-select {
    width:min(170px, 48%);
    min-width:125px;
  }

  .setting-label-with-help {
    font-size:10.2px;
  }
}

@media (max-width: 520px) {
  .settings-summary {
    min-height:40px;
    padding:0 12px;
  }
  .settings-body {
    padding:0 12px 12px;
  }
  .setting-label-with-help {
    font-size:10.3px;
  }
  .smoothing-parameter-row {
    grid-template-columns:118px minmax(70px,1fr) 44px;
  }
  .smoothing-parameter-row .setting-label-with-help {
    font-size:10.8px;
  }
}

@media (max-width: 980px) and (orientation: landscape) {
  .details-panel { width:48vw; min-width:480px; }
}
@media (max-width: 760px), (orientation: portrait) and (max-width: 900px) {
  :root {
    --top-bar-height:58px;
    --bottom-bar-height:120px;
    --layout-edge-gap:8px;
    --overlay-gap:10px;
    --bottom-bar-padding-block:7px;
    --bottom-bar-padding-inline:8px;
    --bottom-bar-item-gap:10px;
  }
  .top-bar {
    gap:8px;
    padding:5px 7px;
  }
  .top-bar-brand { gap:7px; }
  .brand-logo {
    width:40px;
    height:40px;
    border-radius:9px;
  }
  .top-bar-brand strong {
    max-width: 58vw;
    overflow: hidden;
    display: -webkit-box;
    font-size: 15px;
    line-height: 1.15;
    white-space: normal;
    overflow-wrap: anywhere;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
  }
  .top-bar-github {
    width:38px;
    height:38px;
    flex-basis:38px;
  }
  .top-bar-github img {
    width:22px;
    height:22px;
  }
  .map-controls { gap:6px; }
  .feature-switcher {
    gap:2px;
    padding:3px;
  }
  .feature-switcher button {
    gap:4px;
    padding:7px 8px;
    font-size:11px;
  }
  .frequency-toggle {
    padding:7px 8px;
    font-size:11px;
  }
    .bottom-bar-text {
    flex: 1 1 auto;
    max-width: 100%;
    text-align: left;
  }
  .bottom-bar-logo {
    display: none;
  }
  .details-panel {
    inset:0;
    width:100%;
    min-width:0;
    max-width:none;
    height:100%;
    padding:0;
    transform:translateY(105%);
  }
  .details-panel.open { transform:translateY(0); }
  .panel-shell {
    border-radius:0;
    padding-top:env(safe-area-inset-top);
  }
  .panel-topbar { grid-template-columns:1fr auto; }
  #panel-back { display:block; }
  #panel-close { display:none; }
  #plot { min-height:390px; }
}
.frequency-legend { position:absolute; z-index:900; right:18px; bottom:calc(var(--bottom-bar-height) + var(--overlay-gap) + 52px); width:210px; padding:10px 12px; border-radius:12px; background:rgba(255,255,255,.94); box-shadow:var(--shadow); backdrop-filter:blur(12px); font-size:11px; color:var(--muted); }
.frequency-legend strong { display:block; margin-bottom:7px; color:var(--ink); font-size:12px; line-height:1.25; }
.frequency-legend strong span { color:var(--muted); font-size:10px; font-weight:600; }
.frequency-categories { display:grid; grid-template-columns:repeat(4,minmax(34px,1fr)); gap:7px; }
.frequency-categories span { display:flex; align-items:center; gap:5px; color:var(--ink); font-weight:700; white-space:nowrap; }
.frequency-chip { display:inline-block; flex:0 0 20px; width:20px; height:12px; border:1.5px solid #333; border-radius:2px; }
.frequency-1 { background:#fee08b; }
.frequency-2 { background:#fdae61; }
.frequency-3 { background:#f46d43; }
.frequency-4 { background:#7b3294; }
@media (max-width:760px), (orientation:portrait) and (max-width:900px) {
  .frequency-legend {
    right:10px;
    width:190px;
  }
}

.nadir-key { display:flex; align-items:center; gap:7px; margin-top:8px; }
.nadir-key span { width:28px; border-top:2.4px dashed #151515; }


/* Permanent nadir START_TIME labels. */
.leaflet-tooltip.nadir-time-label {
  background: transparent;
  border: 0;
  box-shadow: none;
  color: #050505;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  padding: 0;
  pointer-events: none;
  text-shadow:
    -1px -1px 0 #fff,
     1px -1px 0 #fff,
    -1px  1px 0 #fff,
     1px  1px 0 #fff,
     0   -2px 0 #fff,
     0    2px 0 #fff,
    -2px  0   0 #fff,
     2px  0   0 #fff;
  white-space: nowrap;
}

.leaflet-tooltip.nadir-time-label::before {
  display: none;
}

/* Rotated permanent labels placed along visible nadir segments. */
.nadir-line-label {
  background: transparent;
  border: 0;
  pointer-events: none;
  width: 0 !important;
  height: 0 !important;
}

.nadir-line-label span {
  position: absolute;
  left: 0;
  top: 0;
  display: inline-block;
  transform-origin: center center;
  translate: -50% -50%;
  color: #050505;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  white-space: nowrap;
  text-shadow:
    -1px -1px 0 #fff,
     1px -1px 0 #fff,
    -1px  1px 0 #fff,
     1px  1px 0 #fff,
     0   -2px 0 #fff,
     0    2px 0 #fff,
    -2px  0   0 #fff,
     2px  0   0 #fff;
}



/* Compact desktop basemap selector. */
.basemap-selector {
  border: 0 !important;
  border-radius: 12px !important;
  box-shadow: var(--shadow) !important;
  overflow: hidden;
}

.basemap-selector .leaflet-control-layers-toggle {
  width: 42px !important;
  height: 42px !important;
}

.basemap-selector.leaflet-control-layers-expanded {
  padding: 9px 11px;
  border-radius: 12px !important;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
}

.basemap-selector .leaflet-control-layers-base label {
  margin: 4px 0;
  color: var(--ink);
  font-size: 13px;
}

/* Hide basemap switching on mobile / portrait layouts. */
@media (max-width: 760px),
       (orientation: portrait) and (max-width: 900px) {
  .basemap-selector {
    display: none !important;
  }
}

.leaflet-control-geocoder {
  margin-right:12px !important;
  margin-bottom:var(--overlay-gap) !important;
  border:0 !important;
  border-radius:12px !important;
  background:var(--surface) !important;
  box-shadow:var(--shadow) !important;
}

/* Make the collapsed search affordance more obvious without changing the
   geocoder plugin's native expanded geometry. */
.leaflet-control-geocoder-icon {
  position:relative;
  width:168px !important;
  height:42px !important;
  padding-left:44px !important;
  border-radius:12px !important;
  background-position:12px 50% !important;
  background-size:24px 24px !important;
  box-sizing:border-box;
}

.leaflet-control-geocoder-icon::after {
  content:"Search place";
  position:absolute;
  inset:0 10px 0 44px;
  display:flex;
  align-items:center;
  color:var(--ink);
  font-family:Inter,ui-sans-serif,system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  font-size:13px;
  font-weight:400;
  white-space:nowrap;
}

.leaflet-control-geocoder-expanded .leaflet-control-geocoder-icon {
  width:36px !important;
  height:36px !important;
  padding-left:0 !important;
  background-position:center !important;
  background-size:22px 22px !important;
}

.leaflet-control-geocoder-expanded .leaflet-control-geocoder-icon::after {
  display:none;
}

.leaflet-control-geocoder-form input {
  min-width:250px;
  font:inherit;
}

/* On mobile keep the original compact icon-only treatment. */
@media (max-width:760px),
       (orientation:portrait) and (max-width:900px) {
  .leaflet-control-geocoder-icon {
    width:42px !important;
    height:42px !important;
    padding-left:0 !important;
    background-position:center !important;
  }

  .leaflet-control-geocoder-icon::after {
    display:none;
  }

  .leaflet-control-geocoder-form input {
    min-width:190px;
  }
}


/* Responsive projected global inset. */
.global-inset {
  width:var(--global-inset-width,262px);
  height:var(--global-inset-height,154px);
  margin-left:12px !important;
  margin-bottom:var(--overlay-gap) !important;
  overflow:hidden;
  border:1px solid rgba(16,32,47,.18);
  border-radius:12px;
  background:var(--inset-ocean);
  box-shadow:0 10px 28px rgba(15,31,45,.20);
}

.global-inset-svg {
  display:block;
  width:100%;
  height:100%;
}

.global-inset-graticule {
  stroke-width:.65;
  opacity:.75;
  vector-effect:non-scaling-stroke;
}

.global-inset-land {
  stroke:none;
}

.global-inset-country-borders {
  stroke-width:.7;
  opacity:.9;
  vector-effect:non-scaling-stroke;
}

.global-inset-viewport {
  vector-effect:non-scaling-stroke;
}


.global-inset--error {
  opacity:.55;
}

@media (max-width:760px),
       (orientation:portrait) and (max-width:900px) {
  .global-inset {
    display:none;
  }
}

.panel-actions { display:flex; align-items:center; gap:8px; }
#panel-download:disabled { opacity:.38; cursor:not-allowed; }
#include-suspect-row[hidden] { display:none; }

/* Version 27: feature icons and compact product documentation. */
.feature-switcher button {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.feature-switcher button img {
  width: 18px;
  height: 18px;
  display: block;
  filter: none;
}
.feature-switcher button.active img {
  filter: brightness(0) invert(1);
}
.feature-title-icon {
  width: 32px;
  height: 32px;
  align-self: center;
}
.frequency-legend {
  width: 250px;
}
.frequency-categories {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.data-description {
  border-top: 1px solid #e7edf0;
  padding: 14px;
  background: #fff;
  color: #536474;
  font-size: 12px;
  line-height: 1.5;
}
.data-description p {
  margin: 0 0 10px;
}
.data-description a {
  color: #176b87;
  overflow-wrap: anywhere;
}
.dataset-citation {
  padding: 10px 11px;
  border: 1px solid #e3eaee;
  border-radius: 10px;
  background: #f7f8f8;
}
.dataset-citation > strong {
  color: #10202f;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .03em;
}
.dataset-citation p {
  margin: 5px 0 0;
}
.dataset-citation span {
  color: #6b7b88;
}
.node-feature-marker {
  border: 0;
  background: transparent;
  cursor: pointer;
  pointer-events: auto;
}

.node-feature-marker span {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 11px;
  height: 11px;
  box-sizing: border-box;
  transform: translate(-50%, -50%);
  border: 2px solid #fff;
  border-radius: 50%;
  background: var(--map-feature-color);
  box-shadow: 0 0 0 1px rgba(16, 32, 47, .18);
}

.node-feature-marker:hover span,
.node-feature-marker:focus span {
  width: 14px;
  height: 14px;
  background: var(--map-selected-color);
}

.node-feature-marker.selected {
  cursor: default;
  pointer-events: none;
}

.node-feature-marker.selected span {
  width: 16px;
  height: 16px;
  background: var(--map-selected-color);
}
@media (max-width: 760px) {
  .feature-switcher button {
    gap: 5px;
  }
  .feature-switcher button img {
    width: 16px;
    height: 16px;
  }
}

/* Keep DOM-based node markers above Leaflet's canvas renderer.
   Leaflet assigns marker z-index from screen latitude; forcing a fixed value
   prevents southern nodes from falling behind the interactive canvas. */
.leaflet-marker-icon.node-feature-marker {
  z-index: 1000 !important;
}

.leaflet-marker-icon.node-feature-marker.selected {
  z-index: 1100 !important;
}
