:root {
  --paper: #faf9f6;
  --surface: #fff;
  --ink: #272a28;
  --muted: #6b706b;
  --line: #e6e3dc;
  --accent: #b74d17;
  --accent-dark: #923a10;
  --accent-soft: #fcf0e5;
  --blue: #327c94;
  --nav: 88px;
  --tabs: 56px;
  --radius: 12px;
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  height: 100%;
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-size: 14px;
}
body {
  overflow: hidden;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select {
  -webkit-tap-highlight-color: transparent;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  color: inherit;
}
a {
  color: inherit;
  text-decoration: none;
}
button {
  border: 0;
  background: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid #b74d1770;
  outline-offset: 3px;
}
button:disabled {
  cursor: default;
}
img {
  display: block;
}
.icon {
  display: inline-block;
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  background: currentColor;
  mask: var(--icon) center/contain no-repeat;
  -webkit-mask: var(--icon) center/contain no-repeat;
}
.sr-only,
.skip-link:not(:focus) {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus {
  position: fixed;
  top: 8px;
  left: 8px;
  background: #fff;
  padding: 12px;
  z-index: 2000;
}
.header {
  height: var(--nav);
  display: flex;
  align-items: center;
  gap: 32px;
  padding: 0 28px;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 260px;
}
.brand-logo {
  width: 52px;
  height: 52px;
  object-fit: cover;
  border-radius: 9px;
}
.brand strong {
  display: block;
  font-size: 27px;
  font-weight: 750;
  line-height: 1.1;
  letter-spacing: -1px;
}
.brand small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  margin-top: 5px;
  letter-spacing: 0.1px;
}
.repository-search {
  height: 44px;
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: var(--paper);
  padding: 0 6px 0 14px;
  width: min(430px, 38vw);
  margin-left: auto;
}
.repository-search > .icon {
  color: var(--muted);
  width: 18px;
  height: 18px;
}
.repository-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: none;
  outline: none;
  font-size: 13px;
}
.repository-search button {
  height: 32px;
  width: 34px;
  display: grid;
  place-items: center;
  border-radius: 4px;
  color: var(--accent);
}
.repository-search:focus-within {
  border-color: var(--accent);
}
.header-actions {
  display: flex;
  align-items: center;
  gap: 24px;
}
.language-switch {
  display: flex;
  border: 1px solid #d7d3cb;
  border-radius: 6px;
  padding: 3px;
}
.language-switch button {
  height: 30px;
  min-width: 33px;
  font-size: 11px;
  font-weight: 700;
  border-radius: 3px;
}
.language-switch button[aria-pressed="true"] {
  background: var(--accent);
  color: white;
}
.repository-link {
  display: flex;
  gap: 10px;
  align-items: center;
  font-size: 12px;
  font-weight: 650;
  white-space: nowrap;
}
.repository-link .icon {
  width: 16px;
  height: 16px;
  color: var(--accent);
}
.navigation {
  height: var(--tabs);
  padding: 0 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.tabs {
  display: flex;
  align-items: stretch;
  height: 100%;
  gap: 24px;
}
.nav-tab {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  padding: 0 3px;
  color: var(--muted);
}
.nav-tab .icon {
  width: 18px;
  height: 18px;
}
.nav-tab.active {
  color: var(--accent);
}
.nav-tab.active:after {
  position: absolute;
  bottom: -1px;
  left: 0;
  right: 0;
  content: "";
  height: 3px;
  background: var(--accent);
}
.nav-tab-dropdown { position: relative; list-style: none; }
.nav-tab-dropdown > summary { list-style: none; cursor: pointer; }
.nav-tab-dropdown > summary::-webkit-details-marker { display: none; }
.nav-tab-dropdown > summary::after { content: ""; display: inline-block; width: 14px; height: 14px; margin-left: 5px; background: var(--accent); mask: url('/static/preview/icons/caret-down.svg') center/contain no-repeat; -webkit-mask: url('/static/preview/icons/caret-down.svg') center/contain no-repeat; }
.nav-tab-dropdown nav { position: absolute; left: 0; top: 100%; display: grid; min-width: 150px; padding: 8px 12px; background: var(--surface); border: 1px solid var(--line); border-radius: 7px; box-shadow: 0 4px 12px #0000000d; }
.nav-tab-dropdown nav a { display: flex; align-items: center; min-height: 40px; font-size: 13px; white-space: nowrap; }
.nav-tab-dropdown nav a:hover { color: var(--accent); text-decoration: underline; }
.nav-note {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: var(--muted);
}
.status-dot {
  width: 6px;
  height: 6px;
  background: var(--accent);
  border-radius: 50%;
}
.workspace {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 16px;
  padding: 20px;
  height: calc(100svh - var(--nav) - var(--tabs));
}
.map-region {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: #c7e4ed;
  min-width: 0;
  isolation: isolate;
}
#map {
  position: absolute;
  inset: 0;
  z-index: 0;
  background: #c7e4ed;
}
.map-intro {
  position: absolute;
  z-index: 500;
  top: 20px;
  left: 20px;
  max-width: calc(100% - 100px);
  background: rgba(255, 255, 255, 0.97);
  padding: 20px 24px;
  border-radius: 8px;
  box-shadow: 0 2px 10px #2036400b;
  pointer-events: none;
}
.eyebrow {
  display: block;
  font-size: 10px;
  letter-spacing: 1.35px;
  text-transform: uppercase;
  font-weight: 750;
  color: var(--accent);
}
h1 {
  font-size: 25px;
  line-height: 1.2;
  letter-spacing: -0.65px;
  margin: 8px 0;
}
h2 {
  font-size: 16px;
  line-height: 1.3;
  letter-spacing: -0.3px;
  margin: 0;
}
.map-intro p {
  color: var(--muted);
  font-size: 12px;
  margin: 0;
  line-height: 1.6;
}
.current-field {
  position: absolute;
}
.prediction-color {
  width: 72px;
  height: 8px;
  border-radius: 3px;
  background: linear-gradient(90deg, #2166ac, #1f9ebc, #f4d35e, #d94848);
}
.measured-current-arrow {
  display: grid;
  place-items: center;
  width: 60px !important;
  height: 60px !important;
  background: transparent !important;
  border: 0 !important;
  border-radius: 0 !important;
  pointer-events: auto;
}
.measured-current-arrow svg {
  display: block;
  width: 60px;
  height: 60px;
}
.show-current-layer #research-filters,
.show-current-layer #selection {
  display: none;
}
.current-settings {
  display: grid;
  gap: 8px;
  padding-block: 10px;
}
.current-settings label,
.current-settings p {
  font-size: 12px;
}
.current-settings p {
  margin: 0;
}
.current-settings input[type="datetime-local"],
.current-settings input[type="number"],
.current-settings select,
.prediction-time-buttons button {
  min-height: 36px;
  min-width: 0;
  padding: 4px 6px;
  border: 1px solid var(--line);
  border-radius: 5px;
}
.prediction-time-buttons {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 4px;
}
.prediction-time-buttons button {
  padding-inline: 0;
  font-size: 11px;
  white-space: nowrap;
}
#prediction-station {
  display: grid;
  gap: 6px;
  min-width: 0;
}
#prediction-station a {
  color: var(--accent-dark);
  text-decoration: underline;
}
#prediction-chart {
  min-width: 0;
}
.map-controls {
  position: absolute;
  top: 20px;
  right: 20px;
  display: flex;
  flex-direction: column;
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  z-index: 500;
  overflow: hidden;
  box-shadow: 0 2px 10px #2036400b;
}
.map-controls button {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
}
.map-controls button + button {
  border-top: 1px solid var(--line);
}
.map-controls .icon {
  width: 18px;
  height: 18px;
}
.map-legend {
  position: absolute;
  bottom: 48px;
  left: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 500;
  background: #fffffff5;
  border: 1px solid #e6e3dc90;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 10px;
}
.legend-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.legend-item { display: inline-flex; align-items: center; gap: 5px; }
.legend-dot.waves { background: var(--blue); }
.legend-dot.pressure { background: #73774e; }
.legend-dot.others { background: #65706f; }
.map-hint {
  position: absolute;
  bottom: 18px;
  left: 20px;
  z-index: 500;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 10px;
  color: #3b5159;
  background: #ffffffe6;
  padding: 5px 8px;
  border-radius: 4px;
}
.map-hint .icon {
  width: 14px;
  height: 14px;
}
.sidebar {
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 20px 12px;
  overflow-y: auto;
  scrollbar-width: thin;
  display: flex;
  flex-direction: column;
  min-height: 0;
}
.sidebar-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.sidebar-heading .eyebrow {
  margin-bottom: 8px;
}
.field-label {
  display: block;
  font-size: 11px;
  font-weight: 650;
  margin: 0 0 8px;
}
.select-wrap {
  position: relative;
  margin-bottom: 20px;
}
.select-wrap select {
  appearance: none;
  width: 100%;
  height: 42px;
  border: 1px solid #d9d6ce;
  background: white;
  border-radius: 5px;
  padding: 0 30px 0 12px;
  font-size: 12px;
  color: var(--ink);
}
.select-wrap > .icon {
  pointer-events: none;
  position: absolute;
  right: 12px;
  top: 14px;
  width: 14px;
  height: 14px;
  color: var(--muted);
}
.filter-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 18px;
}
.filter-chip {
  font-size: 10px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 8px 9px;
  min-height: 34px;
  white-space: nowrap;
}
.filter-chip.active {
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-color: #e6b695;
}
.mapped-summary {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 10px;
  color: var(--muted);
  padding: 0 0 22px;
  border-bottom: 1px solid var(--line);
}
.mapped-summary > .icon {
  width: 15px;
  height: 15px;
  color: var(--accent);
}
.mapped-summary button {
  font-size: 10px;
  margin-left: auto;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.recent-section {
  margin-top: 24px;
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}
.section-heading h2 {
  font-size: 14px;
}
.count-badge {
  font-size: 10px;
  background: var(--accent-soft);
  color: var(--accent-dark);
  border-radius: 5px;
  padding: 5px 7px;
  font-weight: 650;
}
.recent-row {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 0;
  border-bottom: 1px solid #eeece6;
}
.recent-symbol {
  display: grid;
  place-items: center;
  width: 32px;
  height: 34px;
  flex-shrink: 0;
  border-radius: 5px;
  background: #f4f3ee;
  color: var(--accent);
}
.recent-symbol .icon {
  width: 18px;
  height: 18px;
}
.recent-row strong {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  font-size: 11px;
  line-height: 1.55;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.recent-row small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 5px;
}
.recent-row > .icon {
  margin-left: auto;
  width: 13px;
  height: 13px;
  color: #9a9c96;
  margin-top: 5px;
}
.all-datasets {
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: var(--accent-dark);
  font-size: 11px;
  font-weight: 600;
  padding: 16px 0;
}
.all-datasets .icon {
  width: 16px;
  height: 16px;
}
.icon-button {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
}
.mobile-panel-toggle {
  display: none;
}
.bio-layer {
  display: flex;
  align-items: center;
  gap: 12px;
  border-radius: 6px;
  background: #f0f6f4;
  padding: 14px;
  color: #245e53;
}
.bio-layer strong {
  display: block;
  font-size: 13px;
}
.bio-layer small {
  display: block;
  margin-top: 5px;
  font-size: 11px;
}
.quiet-copy {
  font-size: 12px;
  line-height: 1.7;
  color: var(--muted);
}
.text-link {
  display: flex;
  gap: 6px;
  align-items: center;
  font-size: 11px;
  color: var(--accent-dark);
  margin: 16px 0;
}
.text-link .icon {
  width: 14px;
  height: 14px;
}
.selection-panel {
  position: relative;
  margin-top: 20px;
  border: 1px solid #e9b992;
  border-radius: 8px;
  background: #fffaf5;
  padding: 16px;
}
.selection-panel .selection-close {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
}
.selection-close .icon {
  width: 15px;
  height: 15px;
}
.selection-panel h2 {
  font-size: 14px;
  margin: 12px 18px 6px 0;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.selection-panel p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.7;
}
.selection-panel dl {
  font-size: 11px;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px;
  margin: 16px 0;
}
.selection-panel dt {
  color: var(--muted);
}
.selection-panel dd {
  margin: 0;
  text-align: right;
}
.primary-link {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 8px;
  color: white;
  background: var(--accent);
  font-size: 12px;
  font-weight: 600;
  min-height: 42px;
  border-radius: 5px;
  padding: 10px 16px;
}
.primary-link .icon {
  width: 16px;
  height: 16px;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 36px;
  max-width: 480px;
  color: var(--ink);
  box-shadow: 0 20px 80px #12222022;
}
dialog::backdrop {
  background: #20303645;
}
dialog h2 {
  font-size: 25px;
  margin: 16px 20px 18px 0;
  line-height: 1.3;
}
dialog p {
  font-size: 14px;
  line-height: 1.8;
}
dialog .primary-link {
  margin-top: 24px;
}
.dialog-close {
  position: absolute;
  top: 12px;
  right: 12px;
}
.leaflet-container {
  font-family:
    system-ui,
    -apple-system,
    "Segoe UI",
    sans-serif;
}
.leaflet-container a {
  color: var(--accent-dark);
}
.leaflet-control-attribution {
  font-size: 8px !important;
  background: #ffffffe8 !important;
}
.leaflet-control-scale {
  margin-left: 20px !important;
  margin-bottom: 95px !important;
}
.leaflet-control-scale-line {
  font-size: 9px;
  border-color: #617b83;
  background: #ffffffc0;
}
.map-cluster {
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: #fff;
  border: 2px solid white;
  box-shadow: 0 1px 6px #283e4525;
  color: white;
}
.map-cluster span {
  display: grid;
  place-items: center;
  background: var(--accent);
  border-radius: 50%;
  width: 100%;
  height: 100%;
  font-size: 12px;
  font-weight: 650;
}
.map-cluster.mixed span {
  background: #303b3d;
}
.dataset-tooltip {
  border: 1px solid var(--line) !important;
  border-radius: 7px !important;
  padding: 12px 14px !important;
  white-space: normal !important;
  width: 230px;
  box-shadow: 0 4px 18px #152a341a !important;
  color: var(--ink) !important;
}
.dataset-tooltip strong {
  font-size: 12px;
  display: block;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.dataset-tooltip small {
  font-size: 10px;
  display: block;
  margin-top: 5px;
  color: var(--muted);
}
.dataset-tooltip .tooltip-type {
  font-size: 9px;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 5px;
  display: block;
}
.leaflet-interactive:focus {
  outline: 3px solid #b74d1760;
}
.leaflet-popup-content {
  margin: 16px;
}
.leaflet-popup-content a {
  font-weight: 600;
}
.nav-tab,
.filter-chip,
.repository-link,
.all-datasets,
.recent-row,
.map-controls button,
.icon-button,
.primary-link,
.repository-search button {
  transition:
    color 0.15s,
    background-color 0.15s,
    border-color 0.15s,
    transform 0.15s;
}
@media (hover: hover) {
  .nav-tab:hover,
  .repository-link:hover,
  .all-datasets:hover {
    color: var(--accent);
  }
  .filter-chip:hover {
    border-color: #d4ad90;
  }
  .recent-row:hover strong {
    color: var(--accent-dark);
  }
  .map-controls button:hover,
  .icon-button:hover,
  .repository-search button:hover {
    background: var(--accent-soft);
  }
  .primary-link:hover {
    background: var(--accent-dark);
    transform: translateY(-1px);
  }
  button:active,
  .primary-link:active {
    transform: translateY(1px);
  }
}
@media (min-width: 1600px) {
  .workspace {
    grid-template-columns: minmax(0, 1fr) 350px;
  }
  .sidebar {
    padding: 28px 24px;
  }
  .recent-row strong {
    font-size: 12px;
  }
}
@media (max-width: 1100px) {
  .header {
    gap: 20px;
    padding: 0 20px;
  }
  .brand {
    min-width: 210px;
  }
  .brand strong {
    font-size: 25px;
  }
  .brand small {
    font-size: 10px;
  }
  .header-actions {
    gap: 16px;
  }
  .repository-link {
    font-size: 11px;
  }
  .workspace {
    grid-template-columns: minmax(0, 1fr) 292px;
    padding: 16px;
    gap: 12px;
  }
  .sidebar {
    padding: 20px 16px;
  }
  .map-intro {
    padding: 16px;
    top: 16px;
    left: 16px;
  }
  h1 {
    font-size: 22px;
  }
  .map-intro p {
    max-width: 240px;
  }
  .navigation {
    padding: 0 20px;
  }
  .repository-search {
    width: 34vw;
  }
  .map-controls {
    right: 16px;
    top: 16px;
  }
}
@media (max-width: 820px) {
  .header {
    gap: 16px;
    flex-wrap: wrap;
    height: 128px;
    padding: 12px 20px;
    align-content: center;
  }
  .brand {
    min-width: 0;
    flex: 1;
  }
  .brand-logo {
    width: 44px;
    height: 44px;
  }
  .brand strong {
    font-size: 24px;
  }
  .header-actions {
    margin-left: auto;
  }
  .repository-link {
    font-size: 12px;
  }
  .repository-search {
    order: 3;
    width: 100%;
    height: 38px;
    margin: 0;
  }
  .navigation {
    height: 50px;
  }
  .nav-note {
    display: none;
  }
  .workspace {
    height: calc(100svh - 178px);
    grid-template-columns: minmax(0, 1fr) 270px;
    padding: 12px;
    gap: 10px;
  }
  .sidebar {
    padding: 20px 14px;
  }
  .sidebar-heading h2 {
    font-size: 14px;
  }
  .map-intro {
    top: 12px;
    left: 12px;
    max-width: calc(100% - 76px);
    padding: 12px;
  }
  h1 {
    font-size: 18px;
  }
  .map-intro p {
    font-size: 10px;
  }
  .eyebrow {
    font-size: 9px;
  }
  .map-controls {
    right: 12px;
    top: 12px;
  }
  .map-controls button {
    width: 34px;
    height: 36px;
  }
  .map-hint {
    max-width: calc(100% - 24px);
    font-size: 9px;
    left: 12px;
  }
  .map-legend {
    left: 12px;
    font-size: 9px;
    flex-wrap: wrap;
    max-width: calc(100% - 24px);
  }
  .filter-chip {
    font-size: 9px;
  }
  .mapped-summary {
    flex-wrap: wrap;
  }
}
@media (max-width: 640px) {
  .header {
    padding: 12px 16px;
  }
  .brand {
    gap: 8px;
  }
  .brand small {
    font-size: 9px;
    max-width: 145px;
  }
  .brand-logo {
    width: 40px;
    height: 40px;
  }
  .header-actions {
    gap: 10px;
  }
  .repository-link {
    width: 32px;
    height: 32px;
    justify-content: center;
  }
  .repository-link > span:first-child {
    display: none;
  }
  .language-switch button {
    height: 28px;
    min-width: 28px;
  }
  .navigation {
    padding: 0 16px;
  }
  .tabs {
    gap: 20px;
  }
  .nav-tab {
    font-size: 12px;
    gap: 6px;
  }
  .nav-tab .icon {
    width: 16px;
    height: 16px;
  }
  .workspace {
    display: block;
    padding: 8px;
    height: calc(100svh - 178px);
  }
  .map-region {
    height: 100%;
    border-radius: 9px;
  }
  .map-intro {
    max-width: calc(100% - 72px);
    padding: 12px;
  }
  h1 {
    font-size: 19px;
  }
  .map-intro p {
    display: none;
  }
  .map-intro .eyebrow {
    font-size: 8px;
  }
  .map-controls button {
    width: 34px;
    height: 36px;
  }
  .map-hint {
    display: none;
  }
  .map-legend {
    bottom: 76px;
    padding: 8px 10px;
    font-size: 9px;
  }
  .mobile-panel-toggle {
    display: block;
    position: absolute;
    bottom: 28px;
    left: 12px;
    right: 12px;
    z-index: 500;
  }
  .mobile-panel-toggle button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 42px;
    background: var(--accent);
    color: white;
    border-radius: 6px;
    box-shadow: 0 2px 10px #12222020;
    font-size: 12px;
    font-weight: 600;
  }
  .mobile-panel-toggle .icon {
    width: 17px;
    height: 17px;
  }
  .mobile-count {
    background: #ffffff2b;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 10px;
  }
  .sidebar {
    display: none;
    position: fixed;
    inset: auto 8px 8px;
    max-height: calc(100svh - 150px);
    z-index: 1000;
    box-shadow: 0 -8px 50px #12222020;
    padding: 20px;
    overflow: auto;
  }
  .sidebar.open {
    display: flex;
  }
  .sidebar-heading {
    margin-bottom: 20px;
  }
  .recent-row {
    padding: 12px 0;
  }
  .recent-section {
    margin-top: 20px;
  }
  .leaflet-control-scale {
    margin-bottom: 116px !important;
  }
  .leaflet-control-attribution {
    font-size: 7px !important;
  }
  dialog {
    width: calc(100% - 32px);
    padding: 28px;
  }
  .selection-panel h2 {
    font-size: 13px;
  }
}
@media (prefers-reduced-motion: reduce) {
  *,
  *:before,
  *:after {
    transition: none !important;
    animation: none !important;
    scroll-behavior: auto !important;
  }
}
[hidden] {
  display: none !important;
}

@media (hover: hover) {
  .map-cluster:hover {
    box-shadow: 0 2px 10px #283e4540;
  }
}

/* Shared page navigation and scientific document pages. */
.header-about {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}
.header-about .icon {
  width: 17px;
  height: 17px;
}
.header-about:hover {
  color: var(--accent);
}
.page-map,
.page-currents,
.page-statistics,
.page-about,
.page-terms {
  overflow: auto;
  height: auto;
  min-height: 100svh;
}
.page-statistics .navigation,
.page-about .navigation,
.page-terms .navigation {
  flex-shrink: 0;
}
.page-statistics .header,
.page-about .header,
.page-terms .header {
  min-height: var(--nav);
}
.map-overlay-options {
  border: 0;
  border-bottom: 1px solid var(--line);
  margin: 20px 0 0;
  padding: 0 0 18px;
}
.map-overlay-options legend {
  font-size: 11px;
  font-weight: 650;
  margin-bottom: 12px;
}
.map-overlay-options label {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  min-height: 36px;
}
.map-overlay-options input[type="checkbox"] {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}
.map-overlay-options p {
  font-size: 10px;
  line-height: 1.6;
  color: var(--muted);
  margin: 8px 0 0;
}
.document-page {
  width: min(820px, calc(100% - 48px));
  margin: 48px auto 64px;
  line-height: 1.8;
}
.document-page h1 {
  font-size: 36px;
  line-height: 1.2;
  margin: 12px 0 24px;
}
.document-page h2 {
  font-size: 22px;
  margin: 36px 0 18px;
}
.document-page h3 {
  font-size: 18px;
}
.document-page p,
.document-page li {
  font-size: 15px;
  line-height: 1.9;
}
.document-page li {
  padding-left: 8px;
  margin-bottom: 16px;
}
.document-page a:not(.primary-link) {
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.document-lead {
  font-size: 19px !important;
  color: #5d655e;
  max-width: 680px;
}
.about-links {
  display: flex;
  align-items: center;
  gap: 24px;
  padding: 12px 0 24px;
  border-bottom: 1px solid var(--line);
}
.about-links .primary-link {
  width: max-content;
}
.about-background {
  margin-top: 32px;
}
.about-background > div {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  margin-top: 32px;
}
.document-footer {
  display: flex;
  align-items: center;
  gap: 24px;
  border-top: 1px solid var(--line);
  padding: 24px max(24px, calc((100% - 1300px) / 2));
  font-size: 12px;
  color: var(--muted);
}
.document-footer > span {
  font-weight: 700;
  margin-right: auto;
}
.document-footer a:hover {
  color: var(--accent);
}
.statistics-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 28px 48px;
}
.statistics-heading {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 28px;
}
.statistics-heading h1 {
  font-size: 30px;
  margin: 8px 0 10px;
}
.statistics-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}
.statistics-heading > .text-link {
  white-space: nowrap;
}
.statistics-layout {
  display: grid;
  grid-template-columns: 248px minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}
.statistics-controls {
  border: 1px solid var(--line);
  border-radius: 10px;
  background: white;
  padding: 20px;
}
.statistics-controls > h2 {
  font-size: 14px;
  margin-bottom: 16px;
}
.statistics-datasets {
  display: grid;
  gap: 8px;
  margin-bottom: 24px;
}
.statistics-datasets > button {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 12px;
  min-height: 66px;
}
.statistics-datasets > button[aria-pressed="true"] {
  background: var(--accent-soft);
  border-color: #e6b695;
  color: var(--accent-dark);
}
.statistics-datasets strong {
  display: block;
  font-size: 12px;
}
.statistics-datasets small {
  display: block;
  font-size: 10px;
  color: var(--muted);
  margin-top: 4px;
}
.statistics-field {
  display: block;
  margin: 18px 0 0;
}
.statistics-field > span {
  display: block;
  font-size: 11px;
  font-weight: 650;
  margin-bottom: 8px;
}
.statistics-field select,
.statistics-field input {
  border: 1px solid #d9d6ce;
  width: 100%;
  min-height: 42px;
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  padding: 8px;
  font-size: 12px;
}
.statistics-map-note {
  font-size: 11px;
  line-height: 1.7;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 20px;
  margin: 24px 0 0;
}
.statistics-controls > .text-link {
  line-height: 1.6;
}
.statistics-content {
  min-width: 0;
}
.statistics-status {
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 12px;
}
.statistics-status:empty {
  display: none;
}
.statistics-chart-panel,
.statistics-table-panel,
.statistics-provenance {
  background: white;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 24px;
  margin-bottom: 20px;
  min-width: 0;
}
.statistics-chart-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
}
.statistics-chart-heading h2 {
  font-size: 22px;
  margin: 10px 0 8px;
}
.statistics-chart-heading p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.statistics-download {
  display: flex;
  align-items: center;
  gap: 6px;
  min-height: 38px;
  font-size: 11px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 8px 12px;
  white-space: nowrap;
}
.statistics-download:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.statistics-download .icon {
  width: 16px;
  height: 16px;
}
.statistics-download:disabled {
  opacity: 0.5;
}
.statistics-chart {
  width: 100%;
  min-width: 0;
  min-height: 310px;
  margin-top: 16px;
}
.statistics-table-panel > h2 {
  font-size: 15px;
  margin: 0 0 18px;
}
.statistics-table-scroll {
  max-height: 380px;
  overflow: auto;
  scrollbar-width: thin;
}
.statistics-table-scroll table {
  border-collapse: collapse;
  width: 100%;
  font-size: 12px;
  text-align: left;
}
.statistics-table-scroll th {
  font-weight: 650;
  font-size: 11px;
  background: #f7f6f2;
  color: var(--muted);
}
.statistics-table-scroll td,
.statistics-table-scroll th {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.statistics-table-scroll td {
  line-height: 1.6;
}
.statistics-table-scroll a {
  color: var(--accent-dark);
  text-decoration: underline;
}
.table-selection {
  text-align: left;
  padding: 0;
  color: var(--accent-dark);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-size: 12px;
}
.statistics-provenance {
  font-size: 12px;
  line-height: 1.8;
  color: var(--muted);
}
.statistics-provenance summary {
  font-weight: 650;
  color: var(--ink);
  cursor: pointer;
}
.statistics-provenance p {
  margin: 14px 0 0;
}
.statistics-provenance li {
  margin: 6px 0;
}
.statistics-content[aria-busy="true"] {
  opacity: 0.7;
}
@media (max-width: 1100px) {
  .header-actions {
    gap: 14px;
  }
  .header-about {
    font-size: 11px;
  }
  .statistics-page {
    padding: 24px 20px;
  }
  .statistics-layout {
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 16px;
  }
  .statistics-chart-panel,
  .statistics-table-panel,
  .statistics-provenance {
    padding: 20px;
  }
  .statistics-controls {
    padding: 16px;
  }
}
@media (max-width: 820px) {
  .page-statistics .header,
  .page-about .header,
  .page-terms .header {
    min-height: 128px;
  }
  .statistics-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: 4px;
  }
  .statistics-heading h1 {
    font-size: 26px;
  }
  .statistics-layout {
    grid-template-columns: 200px minmax(0, 1fr);
  }
  .statistics-chart-heading {
    flex-direction: column;
    gap: 10px;
  }
  .statistics-chart-heading h2 {
    font-size: 20px;
  }
  .statistics-download {
    align-self: flex-start;
  }
  .statistics-chart-panel,
  .statistics-table-panel,
  .statistics-provenance {
    padding: 16px;
  }
  .statistics-controls {
    padding: 14px;
  }
  .statistics-page {
    padding: 24px 16px;
  }
  .statistics-table-scroll td,
  .statistics-table-scroll th {
    padding: 10px;
  }
  .document-page {
    margin-top: 32px;
  }
}
@media (max-width: 640px) {
  .header-actions {
    gap: 8px;
  }
  .header-about {
    width: 30px;
    height: 32px;
    justify-content: center;
  }
  .header-about > span:last-child {
    display: none;
  }
  .header-about .icon {
    width: 18px;
    height: 18px;
  }
  .brand small {
    font-size: 8px;
  }
  .statistics-page {
    padding: 24px 12px;
  }
  .statistics-layout {
    display: block;
  }
  .statistics-controls {
    margin-bottom: 16px;
    padding: 16px;
  }
  .statistics-datasets {
    grid-template-columns: 1fr 1fr;
    margin-bottom: 16px;
  }
  .statistics-datasets > button {
    gap: 8px;
    padding: 10px;
    min-height: 62px;
  }
  .statistics-datasets > button > .icon {
    width: 18px;
    height: 18px;
  }
  .statistics-field {
    margin-top: 14px;
  }
  .statistics-map-note {
    padding-top: 14px;
    margin-top: 18px;
  }
  .statistics-heading > .text-link {
    font-size: 12px;
    white-space: normal;
  }
  .statistics-chart-heading h2 {
    font-size: 20px;
  }
  .statistics-chart {
    min-height: 310px;
  }
  .statistics-table-scroll {
    max-height: 320px;
  }
  .document-page {
    width: calc(100% - 32px);
    margin: 28px auto 40px;
  }
  .document-page h1 {
    font-size: 28px;
  }
  .document-page p,
  .document-page li {
    font-size: 14px;
  }
  .document-lead {
    font-size: 17px !important;
  }
  .document-footer {
    gap: 16px;
    padding: 20px 16px;
    font-size: 10px;
  }
  .about-links {
    gap: 18px;
    align-items: flex-start;
    flex-direction: column;
  }
  .about-links > .text-link {
    margin: 0;
  }
}
.measurement-label {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.measurement-label > .field-label {
  margin: 0;
}
.measurement-label > button {
  font-size: 10px;
  color: var(--muted);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 5px 7px;
  min-height: 28px;
}
.measurement-label > button[aria-pressed="true"] {
  color: var(--accent-dark);
  background: var(--accent-soft);
  border-color: #e6b695;
}
.map-legend {
  bottom: 20px;
}
.leaflet-control-scale {
  margin-bottom: 60px !important;
}
@media (max-width: 640px) {
  .map-legend {
    bottom: 76px;
  }
  .leaflet-control-scale {
    margin-bottom: 116px !important;
  }
}

/* About uses the same quiet document layout in both languages. */
html[lang="fo"] .localized-copy[lang="en"],
html[lang="en"] .localized-copy[lang="fo"] { display: none; }
.about-page section { margin-top: 40px; }
.fair-list { padding-left: 24px; }
.header-terms { color: inherit; font-size: 14px; text-decoration: none; }
.feedback-form { display: grid; gap: 12px; max-width: 640px; }
.feedback-form input, .feedback-form textarea { width: 100%; box-sizing: border-box; border: 1px solid #cfcac1; border-radius: 6px; padding: 12px; font: inherit; background: white; color: #252b2d; }
.feedback-form textarea { resize: vertical; }
.feedback-form button { justify-self: start; border: 0; cursor: pointer; font: inherit; }
.feedback-form .feedback-privacy { font-size: 14px; }
.feedback-notice { padding: 16px; border-left: 3px solid #b74d17; background: #fff2e7; }
@media (max-width: 640px) { .header-terms { font-size: 11px; max-width: 70px; } }

.header-actions :is(.header-about, .header-terms, .repository-link, .language-switch button) {
  font-family: inherit;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.2;
}
.page-currents .workspace {
  height: auto;
  align-items: start;
}
.page-currents .map-region {
  position: relative;
  top: auto;
  height: clamp(360px, 58svh, 640px);
}
.page-currents .sidebar {
  overflow: visible;
}
.page-currents .map-region { grid-column: 1; grid-row: 1; }
.page-currents .prediction-station-panel { grid-column: 1; grid-row: 2; }
.page-currents .currents-sidebar { grid-column: 2; grid-row: 1 / span 3; }
.currents-sidebar {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 0;
  gap: 12px;
}

.show-current-layer #selection:not([hidden]) { display: block; }
.prediction-station-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  overflow-wrap: anywhere;
}
.prediction-station-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.prediction-station-heading .icon-button { flex: 0 0 36px; }
.prediction-station-panel h3 { margin: 0; font-size: 15px; }
#prediction-chart-source { margin: 0; color: var(--muted); font-size: 12px; }
.prediction-correction-note { margin: 4px 0 0; color: var(--muted); font-size: 12px; }
.prediction-correction-note a { color: var(--accent); }
.prediction-station-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 13px; }
.prediction-station-panel select { width: auto; min-height: 36px; }
#statistics-map { height: clamp(300px, 46vh, 480px); border-radius: 7px; z-index: 0; }
.statistics-map-heading { margin: 0 0 8px; }
.statistics-map-caption { color: var(--muted); margin: 8px 0 0; }
@media (max-width: 640px) {
  .tabs { gap: 12px; }
  .nav-tab { font-size: 11px; gap: 4px; white-space: nowrap; }
  .header-actions :is(.header-about, .header-terms, .repository-link, .language-switch button) { font-size: 11px; }
}

#prediction-chart { height: clamp(300px, 38svh, 380px); }
.map-touch-hint { display: none; }

.prediction-scale-field {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0 8px;
}
.prediction-scale-field input {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 28px;
  accent-color: var(--accent);
}
.prediction-scale-field output { font-variant-numeric: tabular-nums; }


/* Small screens use one document scroll for maps, charts and controls. */
@media (max-width: 960px) {
  .page-map .workspace,
  .page-currents .workspace,
  .page-currents .workspace:has(.prediction-station-panel:not([hidden])) {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: auto;
    height: auto;
    gap: 12px;
    padding: 12px max(12px, env(safe-area-inset-right)) 20px max(12px, env(safe-area-inset-left));
  }
  .page-map .map-region,
  .page-currents .map-region {
    position: relative;
    top: auto;
    height: clamp(280px, 50svh, 540px);
  }
  .page-currents .workspace:has(.prediction-station-panel:not([hidden])) .map-region {
    height: clamp(220px, 32svh, 340px);
  }
  .currents-sidebar { display: flex; }
  .page-map .sidebar,
  .page-currents .sidebar {
    display: flex;
    position: static;
    max-height: none;
    overflow: visible;
    box-shadow: none;
    padding: 20px;
  }
  .mobile-panel-toggle { display: block; }
  .mobile-panel-toggle button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    min-height: 44px;
    border-radius: 6px;
    background: var(--accent);
    color: white;
    font-size: 13px;
    font-weight: 600;
  }
  .mobile-panel-toggle {
    position: absolute;
    bottom: 20px;
    left: 12px;
    right: 12px;
    z-index: 500;
  }
  .map-legend { bottom: 76px; left: 12px; max-width: calc(100% - 24px); flex-wrap: wrap; }
  .leaflet-control-scale { margin-bottom: 116px !important; }
  .map-controls { top: 12px; right: 12px; }
  .map-controls button,
  .icon-button { width: 44px; height: 44px; }
  .prediction-station-heading .icon-button { flex-basis: 44px; }
  .current-settings label,
  .current-settings p,
  .map-overlay-options label,
  .field-label,
  .mapped-summary { font-size: 13px; }
  .filter-chip { font-size: 13px; min-height: 44px; }
  .prediction-time-buttons button { min-height: 44px; font-size: 12px; }
  .sidebar :is(input, select),
  .statistics-controls :is(input, select),
  .repository-search input,
  .feedback-form :is(input, textarea) { min-width: 0; font-size: 16px; }
  .sidebar select,
  .current-settings input,
  .statistics-field :is(input, select) { min-height: 44px; }
  .current-settings input[type="datetime-local"] { width: 100%; }
  .page-currents #prediction-chart { height: 360px; }
  .document-footer { padding-bottom: max(20px, env(safe-area-inset-bottom)); }
}
@media (max-width: 960px) {
  :root { --nav: 128px; --tabs: 50px; }
  .header {
    height: auto;
    min-height: var(--nav);
    flex-wrap: wrap;
    gap: 12px;
    align-content: center;
    padding: 12px max(16px, env(safe-area-inset-right)) 12px max(16px, env(safe-area-inset-left));
  }
  .brand { min-width: 0; flex: 1; }
  .header-actions { margin-left: auto; }
  .repository-search { order: 3; width: 100%; height: 44px; margin: 0; }
  .navigation {
    height: var(--tabs);
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
  .nav-note { display: none; }
  .statistics-page {
    padding-left: max(16px, env(safe-area-inset-left));
    padding-right: max(16px, env(safe-area-inset-right));
  }
}
@media (max-width: 960px) and (pointer: coarse) {
  .map-touch-hint { display: block; margin: 0 4px; font-size: 12px; color: var(--muted); }
}

@media (pointer: coarse) {
  #prediction-chart .svg-container,
  #prediction-chart .main-svg,
  #prediction-chart .nsewdrag { touch-action: pan-y; }
}

@media (max-width: 960px) {
  .page-currents :is(.map-region, .prediction-station-panel, .currents-sidebar) { grid-column: 1; grid-row: auto; }
}

/* Optional ADCP record overlay, separate from tidal predictions. */
.map-overlay-options .adcp-records-toggle { min-height: 44px; }
#adcp-unmapped { padding-left: 18px; margin: 8px 0 0; font-size: 12px; line-height: 1.6; }
#adcp-unmapped a { display: inline-block; padding: 6px 0; }
