/*
Theme Name: Surf Theme
Description: Shared web frontend for Swellfy
Version: 4.0.0
*/

/* ─────────────────────────────────────────────────────────────
   DESIGN SYSTEM — Swellfy 5.0  (Ocean Minimal)
   ─── Minimalismo com identidade: teal é a marca, não cinza ──── */
:root {
  /* Background — near-white neutral gray (Surfline B&W chrome) */
  --bg:            #f4f5f6;
  --bg-top:        #fafbfb;
  --bg-bottom:     #edeef0;

  /* Surfaces — clean white */
  --surface:       #ffffff;
  --surface-alt:   #f6f7f8;
  --surface-raised: #ffffff;

  /* Borders — neutral charcoal-tinted subtle */
  --border:        rgba(20, 23, 28, 0.08);
  --border-mid:    rgba(20, 23, 28, 0.14);
  --border-strong: rgba(20, 23, 28, 0.22);

  /* Text — neutral near-black for max contrast */
  --text:          #15181c;
  --text-2:        #353a40;
  --muted:         #5e656c;
  --soft:          #8a9097;
  --placeholder:   #b4b9bf;

  /* Accent — graphite (mono chrome; color lives in the chart) */
  --accent:        #1c2024;
  --accent-mid:    #3a4046;
  --accent-deep:   #0e1115;
  --accent-soft:   #ebedef;
  --accent-xsoft:  #f4f5f6;

  /* Ocean blue — kept ONLY for the chart's sea elements (decoupled from chrome) */
  --ocean:         #0a8ed8;
  --ocean-deep:    #0c2f50;

  /* Warm — terra cotta contrast for energy/scores */
  --clay:          #9e5c54;
  --clay-soft:     #c07870;
  --clay-xsoft:    #f5eeec;

  /* Score palette — Vibrant Heatmap */
  --score-flat:          #85929e;
  --score-weak:          #e53935;
  --score-poor-to-fair:  #fb8c00;
  --score-fair:          #ffb300;
  --score-fair-to-good:  #7cb342;
  --score-good:          #43a047;
  --score-excellent:     #00acc1;
  --score-epic:          #00acc1;

  /* Elevation — teal-tinted shadows */
  --shadow-sm:     0 1px 3px rgba(20, 23, 28, 0.06), 0 4px 12px rgba(20, 23, 28, 0.04);
  --shadow-md:     0 4px 16px rgba(20, 23, 28, 0.08), 0 2px 6px rgba(20, 23, 28, 0.04);
  --shadow-lg:     0 8px 28px rgba(20, 23, 28, 0.10), 0 4px 10px rgba(20, 23, 28, 0.05);

  /* Shape */
  --radius-xs:     6px;
  --radius-sm:     10px;
  --radius-md:     16px;
  --radius-lg:     22px;
  --radius-xl:     28px;
  --radius-pill:   999px;

  /* Legacy aliases (keep JS/existing selectors working) */
  --shadow:        var(--shadow-lg);
  --shadow-soft:   var(--shadow-md);
  --radius-card:   var(--radius-xl);
  --radius-panel:  var(--radius-lg);
  --surface-deep:  var(--accent-soft);
  --border-strong-legacy: rgba(20, 23, 28, 0.22);
  --wave:          #4f9fd8;
  --mist:          #bcd6ee;
  --foam:          #eff7fd;
  --charcoal:      #15181c;
  --amber:         var(--clay);
  --gold:          var(--mist);
  --danger:        #975d57;
  --favorite:      #bf726a;

  /* Typography */
  --font-body:     "Inter", system-ui, sans-serif;
  --font-display:  "Outfit", "Inter", sans-serif;
  --font-mono:     "IBM Plex Mono", "Fira Code", monospace;

  /* Spacing scale */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
}



/* ─── Global custom scrollbars ─────────────────────────────── */
* {
  scrollbar-width: thin;
  scrollbar-color: rgba(20, 23, 28, 0.14) transparent;
}
::-webkit-scrollbar {
  width: 4px;
  height: 4px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: rgba(20, 23, 28, 0.14);
  border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
  background: rgba(20, 23, 28, 0.22);
}

/* ─── Detail content fade-in ────────────────────────────────── */
@keyframes fadeSlideIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}
.detail-content-fade:not(.hidden) {
  animation: fadeSlideIn 0.28s ease both;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  min-height: 100%;
}

body {
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.5;
  color: var(--text);
  overflow-x: clip;
  background: linear-gradient(180deg, var(--bg-top), var(--bg-bottom));
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  font-synthesis: none; /* never fake-bold a missing weight (avoids jaggies) */
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

.hidden {
  display: none !important;
}

.ambient-blur {
  display: none;
}

.ambient-blur-a {
  width: 240px;
  height: 240px;
  top: 4%;
  left: -80px;
  background: rgba(20, 23, 28, 0.12);
}

.ambient-blur-b {
  width: 280px;
  height: 280px;
  right: -120px;
  bottom: 8%;
  background: rgba(179, 106, 98, 0.08);
}

/* Subtle topographic/bathymetric contour texture behind everything — ties the
   site to the oceanographic ("inteligência geofísica") identity, mono & faint. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url("assets/topo.svg") center center / cover no-repeat;
  opacity: 0.05;
}

.surf-shell {
  position: relative;
  z-index: 1;
  width: min(1680px, calc(100% - 40px));
  margin: 0 auto;
  padding: 18px 0 56px;
}

.surface-card {
  background: var(--surface);
  border: 1px solid rgba(17, 17, 17, 0.06);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-sm);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 4px 2px;
}

.brand {
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.brand-mark {
  height: 26px;
  width: auto;
  display: block;
  flex-shrink: 0;
}

@media (max-width: 480px) {
  .brand-mark {
    height: 24px;
  }
}

.brand-wordmark {
  font-family: var(--font-display);
  font-size: 1.14rem;
  font-weight: 860;
  letter-spacing: 0.08em;
  color: var(--accent-deep);
}

.brand-beta {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  color: var(--soft);
  letter-spacing: 0.08em;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
}

.lang-pill {
  min-width: 32px;
  padding: 5px 8px;
  text-align: center;
  text-decoration: none;
  border-radius: var(--radius-pill);
  color: var(--soft);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  transition: background 0.14s ease, color 0.14s ease;
}

.lang-pill.is-active,
.lang-pill:hover {
  background: var(--accent-deep);
  color: #ffffff;
}

.refresh-btn,
.pill-button,
.ghost-btn,
.primary-btn,
.range-btn {
  border: 0;
  border-radius: var(--radius-pill);
}

.refresh-btn {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  color: var(--muted);
  background: #ffffff;
  border: 1px solid rgba(17, 17, 17, 0.06);
  border-radius: var(--radius-pill);
  box-shadow: none;
  transition: color 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.refresh-btn:hover {
  color: var(--accent-mid);
  border-color: var(--border-mid);
  background: var(--surface);
}

.refresh-btn svg {
  width: 15px;
  height: 15px;
}

/* ── Dark mode — inverts the whole page (toggle in the topbar). hue-rotate
   keeps colours roughly true; mono logos & the chart flip with the page. The
   <dialog> top layer escapes the root filter, so invert it back to match. */
html.is-dark {
  filter: invert(1) hue-rotate(180deg);
  background: #0f1216;
}

html.is-dark dialog.about-modal,
html.is-dark dialog.guide-modal {
  filter: invert(1) hue-rotate(180deg);
}

/* About — minimalist topbar link + native <dialog> ("desenvolvedor solo") */
.about-link {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-pill);
  padding: 6px 12px;
  color: var(--soft);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

@media (max-width: 430px) {
  .about-link {
    padding: 6px 9px;
    letter-spacing: 0.04em;
  }
  .topbar-actions {
    gap: 5px;
  }
}

.about-link:hover {
  background: var(--accent-deep);
  color: #ffffff;
  border-color: var(--accent-deep);
}

.about-modal {
  width: min(420px, calc(100vw - 36px));
  margin: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px 26px 24px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 24px 60px rgba(20, 23, 28, 0.18);
  position: relative;
}

.about-modal::backdrop {
  /* No backdrop-filter: blurring the whole (heavy) page on open was the lag.
     The dark overlay alone gives the focus, essentially for free. */
  background: rgba(20, 23, 28, 0.52);
}

.about-close {
  position: absolute;
  top: 10px;
  right: 14px;
  border: 0;
  background: none;
  color: var(--soft);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  padding: 4px;
}

.about-close:hover {
  color: var(--text);
}

.about-eyebrow {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--soft);
}

.about-title {
  margin: 8px 0 0;
  font-family: var(--font-display);
  font-size: 1.15rem;
  font-weight: 760;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: var(--text);
  max-width: 26ch;
}

.about-body {
  margin: 12px 0 0;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--muted);
}

.about-contact {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}

.about-contact-label {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--soft);
}

.about-contact a {
  color: var(--accent-deep);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid var(--border-mid);
}

.about-contact a:hover {
  border-bottom-color: var(--accent-deep);
}

/* "?" help icon (opens the "Como usar" guide) */
.icon-link {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 50%;
  color: var(--soft);
  font-family: var(--font-mono);
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.14s ease, color 0.14s ease, border-color 0.14s ease;
}

.icon-link:hover {
  background: var(--accent-deep);
  color: #ffffff;
  border-color: var(--accent-deep);
}

/* "Como usar" guide modal — same minimalist card, with numbered steps */
.guide-modal {
  width: min(480px, calc(100vw - 36px));
  max-height: calc(100vh - 48px);
  overflow-y: auto;
  margin: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 28px 26px 24px;
  background: var(--surface);
  color: var(--text);
  box-shadow: 0 24px 60px rgba(20, 23, 28, 0.18);
  position: relative;
}

.guide-modal::backdrop {
  /* No backdrop-filter (see .about-modal::backdrop) — avoids the open lag. */
  background: rgba(20, 23, 28, 0.52);
}

.guide-steps {
  list-style: none;
  margin: 18px 0 0;
  padding: 0;
  display: grid;
  gap: 15px;
}

.guide-steps li {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.guide-step-n {
  flex-shrink: 0;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--accent-deep);
  color: #ffffff;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 800;
  margin-top: 1px;
}

.guide-steps strong {
  display: block;
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 720;
  letter-spacing: -0.01em;
  color: var(--text);
}

.guide-steps p {
  margin: 3px 0 0;
  font-size: 0.84rem;
  line-height: 1.5;
  color: var(--muted);
}

/* Mobile: About/guide become full-screen sheets (a "page" feel); topbar tightens */
@media (max-width: 560px) {
  .about-modal,
  .guide-modal {
    width: 100vw;
    max-width: 100vw;
    height: 100dvh;
    max-height: 100dvh;
    border: 0;
    border-radius: 0;
    padding: 54px 22px 28px;
  }
}

@media (max-width: 430px) {
  .topbar-actions {
    gap: 6px;
  }
  .brand-beta {
    display: none;
  }
}

/* Mobile: dense chart scale legends become a single scrollable row, not a tall
   wrap. Two-class selector so it beats the later base rule (equal specificity
   would lose on source order). */
@media (max-width: 640px) {
  .swell-timeline-legend .swell-timeline-scale-track {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: 2px;
  }
  .swell-timeline-legend .swell-timeline-scale-track::-webkit-scrollbar {
    display: none;
  }
  .swell-timeline-legend .swell-timeline-scale-stop {
    flex: 0 0 auto;
  }
}

/* Dark footer with the site's topographic contour lines (inverted to light on
   the dark band — same bg "logic", reversed for contrast) */
.site-footer {
  position: relative;
  z-index: 1;
  margin-top: 44px;
  overflow: hidden;
  background: linear-gradient(108deg, #0c0f13 0%, #14181f 52%, #0c0f13 100%);
}

.site-footer::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: url("assets/topo.svg") center center / cover no-repeat;
  filter: invert(1);
  opacity: 0.13;
}

.site-footer-inner {
  position: relative;
  z-index: 1;
  width: min(1680px, calc(100% - 40px));
  margin: 0 auto;
  padding: 34px 0 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px 28px;
}

.site-footer-brand {
  display: grid;
  gap: 6px;
}

.site-footer-word {
  font-family: var(--font-display);
  font-size: 1.2rem;
  font-weight: 820;
  letter-spacing: 0.04em;
  color: #f3f6f9;
}

.site-footer-logo {
  height: 34px;
  width: auto;
  display: block;
}

.site-footer-tag {
  margin: 0;
  max-width: 32ch;
  font-size: 0.82rem;
  line-height: 1.5;
  color: rgba(233, 238, 244, 0.58);
}

.site-footer-links {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.site-footer-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 0;
  background: none;
  padding: 0;
  cursor: pointer;
  color: rgba(233, 238, 244, 0.82);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-decoration: none;
  transition: color 0.14s ease;
}

.footer-mail-ico {
  width: 13px;
  height: 13px;
  flex-shrink: 0;
}

.site-footer-link:hover {
  color: #ffffff;
}

/* Data sources credit (Open-Meteo / TábuaDeMares / METAR) */
.site-footer-sources {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px 12px;
  width: 100%;
  margin-top: 4px;
  padding-top: 16px;
  border-top: 1px solid rgba(233, 238, 244, 0.1);
}

.site-footer-sources-label {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(233, 238, 244, 0.42);
  margin-right: 2px;
}

.footer-source {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 11px;
  border: 1px solid rgba(233, 238, 244, 0.16);
  border-radius: 999px;
  color: rgba(233, 238, 244, 0.8);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none;
  transition: color 0.14s ease, border-color 0.14s ease, background 0.14s ease;
}

.footer-source:hover {
  color: #ffffff;
  border-color: rgba(233, 238, 244, 0.34);
  background: rgba(233, 238, 244, 0.06);
}

.footer-source svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  opacity: 0.85;
}

.site-footer-copy {
  margin: 0;
  width: 100%;
  padding-top: 12px;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
  color: rgba(233, 238, 244, 0.42);
}

@media (max-width: 560px) {
  .site-footer-inner {
    padding: 26px 0 24px;
    align-items: flex-start;
  }
}

.hero-card,
.controls-card,
.summary-card,
.list-card,
.detail-card,
.forecast-card,
.spot-map-card,
.history-card,
.tide-card {
  padding: 18px;
}

.hero-card {
  display: grid;
  gap: 6px;
  margin-bottom: 12px;
  padding: 8px 2px 14px;
  background: transparent;
  border: 0;
  box-shadow: none;
  border-bottom: 1px solid var(--border);
}

.eyebrow,
.mini-label,
.filter-field span,
.metric-card span,
.stat-label,
.summary-copy p,
.history-year-card-label {
  margin: 0;
  color: var(--soft);
  font-family: var(--font-mono);
  font-size: 0.57rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.hero-copy h1,
.section-head h2,
.detail-top h2 {
  margin: 4px 0 0;
  font-family: var(--font-display);
  line-height: 1.06;
  letter-spacing: -0.025em;
  color: var(--text);
}

.hero-copy h1 {
  font-size: clamp(1rem, 2.4vw, 1.28rem);
  max-width: 26ch;
  font-weight: 720;
  color: var(--text);
}

.hero-support {
  display: none; /* removed — headline already says it all */
}

.hero-step-row {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 5px;
  color: rgba(20, 23, 28, 0.46);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.hero-step-separator {
  color: rgba(20, 23, 28, 0.28);
}

.hero-description,
.section-copy,
.detail-summary,
.empty-detail p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.48;
}

.ghost-btn,
.primary-btn,
.pill-button,
.range-btn {
  min-height: 32px;
  padding: 0 12px;
  font-size: 0.64rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition:
    background 0.14s ease,
    border-color 0.14s ease,
    color 0.14s ease;
}

.ghost-btn,
.pill-button,
.range-btn {
  background: var(--surface);
  color: var(--text-2);
  border: 1px solid var(--border);
}

.primary-btn {
  background: var(--clay);
  color: #fff;
  border: 1px solid transparent;
}

.ghost-btn:hover,
.pill-button:hover,
.range-btn:hover {
  background: var(--surface);
  border-color: var(--border-mid);
}

.primary-btn:hover {
  background: var(--clay-soft);
}

.workspace-grid {
  display: grid;
  gap: 16px;
  min-height: 0;
}

.workspace-grid.is-search-mode {
  grid-template-columns: minmax(0, 720px);
  justify-content: center;
}

.workspace-grid.is-search-mode .analysis-rail {
  display: none;
}

.control-rail,
.analysis-rail {
  display: grid;
  gap: 14px;
  min-width: 0;
  min-height: 0;
}

.control-rail.browser-panel {
  gap: 0;
}

.browser-panel,
.analysis-panel {
  position: relative;
  gap: 0;
  overflow: hidden;
  background: var(--surface);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.browser-panel::before,
.analysis-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 1px;
  background: var(--border);
  pointer-events: none;
}

.browser-panel {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 16px 18px;
}

.browser-panel > .controls-card,
.browser-panel > .list-card {
  padding: 0;
  min-width: 0; /* let grid items shrink so inner h-scrollers don't overflow */
}

.browser-panel > .list-card {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.analysis-panel {
  padding: 16px 18px;
}

.analysis-panel > .detail-card,
.analysis-panel > .forecast-card {
  padding: 0;
}

.analysis-panel > .detail-card {
  padding-bottom: 2px;
}

.analysis-panel > .forecast-card {
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.analysis-stage,
.analysis-secondary-grid {
  display: grid;
  gap: 14px;
  min-width: 0;
}

.analysis-stage.analysis-panel {
  gap: 0;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.section-head > div {
  min-width: 0;
}

.section-head-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

.pill-button.is-active {
  border-color: var(--accent);
  background: var(--accent-xsoft, rgba(61, 139, 132, 0.1));
  color: var(--accent-deep);
}

/* Resumo minimalista de contagens (oculto por padrão) */
.browse-summary {
  margin-top: 4px;
}

.browse-summary.hidden {
  display: none;
}

/* ── Chips de região (atalho de filtro por macro-região) ─────────────────── */
.region-chips-row {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 4px 0 8px;
}
.region-chips-row:empty {
  display: none;
}
.region-chip {
  padding: 4px 12px;
  border-radius: 20px;
  border: 1px solid var(--border);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  cursor: pointer;
  background: transparent;
  color: var(--text);
  transition: background .15s, color .15s, border-color .15s;
  white-space: nowrap;
}
.region-chip:hover:not(.is-active) {
  background: var(--surface-2, rgba(0, 0, 0, .05));
}
.region-chip.is-active {
  background: var(--text);
  color: var(--bg, #fff);
  border-color: var(--text);
}

/* "Melhores agora" — top spots by current score on the landing */
.hot-now {
  margin: 14px 0 6px;
  min-width: 0;
  max-width: 100%;
}
.hot-now.hidden { display: none; }
.hot-now-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 10px;
}
.hot-now-title {
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  color: var(--text);
}
.hot-now-sub {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--soft);
}
.hot-now-row {
  display: flex;
  gap: 10px;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  padding-bottom: 6px;
  scroll-snap-type: x proximity;
  scroll-padding-left: 2px;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  overscroll-behavior-x: contain;
}
.hot-now-row::-webkit-scrollbar { height: 0; }
.hot-card {
  flex: 0 0 auto;
  width: 152px;
  scroll-snap-align: start;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 5px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.hot-card:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}
.hot-card-score {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}
.hot-card-score em {
  font-family: var(--font-mono);
  font-style: normal;
  font-weight: 700;
  font-size: 0.72rem;
  color: var(--muted);
}
.hot-card-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hot-card-loc {
  font-size: 0.66rem;
  color: var(--muted);
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.hot-card-stat {
  font-family: var(--font-mono);
  font-size: 0.64rem;
  color: var(--soft);
}

/* Monochrome inline stat icons (wave/period/wind) — scale with their text */
.stat-ico {
  width: 1.08em;
  height: 1.08em;
  vertical-align: -0.17em;
  flex-shrink: 0;
}
.hot-card-stat,
.scs-item,
.forecast-archive-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.browse-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.browse-summary-item {
  display: grid;
  gap: 1px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
}

.browse-summary-item strong {
  font-family: var(--font-display);
  font-size: 1.18rem;
  font-weight: 800;
  line-height: 1;
  color: var(--accent-deep);
}

.browse-summary-item span {
  font-family: var(--font-mono);
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--soft);
}

@media (max-width: 560px) {
  .browse-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.section-head h2 {
  font-size: clamp(1.08rem, 2.6vw, 1.28rem);
}

.control-lead {
  margin: 6px 0 0;
  max-width: 30ch;
  color: rgba(17, 17, 17, 0.46);
  font-size: 0.76rem;
  line-height: 1.42;
}

.controls-card .section-copy,
.analysis-rail .section-copy,
.chart-copy,
.forecast-digest-hint {
  display: none;
}

.compact-head h2 {
  font-size: 0.96rem;
}

.search-wrap {
  position: relative;
  display: flex;
  align-items: center;
  margin-top: 14px;
}

.search-icon {
  position: absolute;
  left: 14px;
  width: 16px;
  height: 16px;
  color: var(--soft);
}

.search-input,
.filter-field select {
  width: 100%;
  border-radius: 18px;
  border: 1px solid rgba(17, 17, 17, 0.07);
  background: rgba(255, 255, 255, 0.96);
  color: var(--text);
}

.search-input {
  min-height: 46px;
  padding: 0 16px 0 42px;
  font-size: 0.88rem;
  box-shadow: 0 10px 20px rgba(17, 17, 17, 0.025);
}

.search-input::placeholder {
  color: var(--soft);
}

.filters-grid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

.filter-field {
  display: grid;
  gap: 6px;
}

.filter-field select {
  min-height: 42px;
  padding: 0 14px;
  appearance: none;
}

.nav-meta {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid rgba(17, 17, 17, 0.06);
}

.browser-flow {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.browser-flow::before {
  content: "";
  position: absolute;
  left: 14%;
  right: 14%;
  top: 15px;
  height: 1px;
  background: var(--border);
  pointer-events: none;
}

.browser-flow-step {
  appearance: none;
  position: relative;
  z-index: 1;
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 9px 11px 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  text-align: left;
  transition:
    background 0.12s ease,
    border-color 0.12s ease;
}

.browser-flow-step:disabled {
  opacity: 0.56;
  cursor: default;
}

.browser-flow-step.is-current {
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.browser-flow-step.is-done {
  border-color: var(--accent);
  background: var(--accent-xsoft);
}

.browser-flow-step:not(:disabled):hover,
.browser-flow-step:not(:disabled):focus-visible {
  outline: none;
  border-color: var(--border-mid);
  background: var(--surface-alt);
}

.browser-flow-label {
  color: var(--soft);
  font-family: var(--font-mono);
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.browser-flow-value {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.1;
}

.browser-nav-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

.browser-nav-btn {
  min-height: 24px;
  padding: 0 8px;
  font-size: 0.56rem;
  border-color: transparent;
  background: transparent;
  color: rgba(20, 23, 28, 0.5);
}

.browser-nav-btn:hover,
.browser-nav-btn:focus-visible {
  background: rgba(20, 23, 28, 0.04);
  border-color: transparent;
  color: rgba(20, 23, 28, 0.7);
}

.browser-nav-btn:disabled {
  opacity: 0.42;
  cursor: default;
}

.nav-meta > .chip-row {
  display: none;
}

.breadcrumb-row,
.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.breadcrumb-row {
  gap: 4px;
}

.breadcrumb-chip,
.filter-chip,
.pill,
.summary-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 28px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  font-size: 0.68rem;
  font-weight: 700;
}

.breadcrumb-chip,
.summary-badge {
  background: rgba(20, 23, 28, 0.05);
  color: var(--accent-deep);
  border: 1px solid rgba(20, 23, 28, 0.1);
  cursor: pointer;
}

.breadcrumb-chip {
  appearance: none;
}

.filter-chip {
  background: rgba(179, 106, 98, 0.12);
  color: var(--clay);
  border: 1px solid rgba(179, 106, 98, 0.16);
}

.filter-chip button {
  border: 0;
  background: none;
  color: inherit;
  padding: 0;
  font-size: 1rem;
  line-height: 1;
}

.summary-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.summary-copy strong {
  display: block;
  margin-top: 8px;
  font-family: var(--font-display);
  font-size: 1.4rem;
  font-weight: 800;
}

.summary-badges {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.list-card {
  min-height: 0;
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
}

.spot-list {
  display: grid;
  gap: 10px;
  margin-top: 16px;
  min-height: 0;
  max-height: min(48vh, 560px);
  overflow-y: auto;
  padding-right: 4px;
  overscroll-behavior: contain;
}

.list-context {
  margin: 4px 0 0;
  max-width: 24ch;
  color: rgba(20, 23, 28, 0.42);
  font-size: 0.72rem;
  line-height: 1.34;
}

.browse-stage {
  display: grid;
  gap: 12px;
  align-content: start;
}

.browse-stage-copy {
  display: grid;
  gap: 4px;
}

.browse-stage-lead {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.browse-chip-grid,
.browse-city-grid {
  display: grid;
  gap: 8px;
}

.browse-chip-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.browse-chip,
.browse-city-card {
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 12px 14px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(20, 23, 28, 0.06);
  background: rgba(255, 255, 255, 0.64);
  text-align: left;
  transition:
    background 0.12s ease,
    border-color 0.12s ease;
}

.browse-chip strong,
.browse-city-card strong {
  color: var(--text);
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

.browse-chip span,
.browse-city-card span {
  color: var(--soft);
  font-size: 0.7rem;
  font-weight: 500;
}

.browse-chip:hover,
.browse-city-card:hover,
.browse-chip:focus-visible,
.browse-city-card:focus-visible {
  outline: none;
  background: var(--surface-alt);
  border-color: var(--border-mid);
}

.spot-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--surface);
  transition:
    background 0.12s ease,
    border-color 0.12s ease;
}

.spot-card.is-picker {
  grid-template-columns: 1fr;
  gap: 0;
  padding: 14px 16px;
}

.spot-card.is-active {
  border-color: var(--accent);
  background: var(--accent-xsoft);
  box-shadow: inset 2px 0 0 var(--accent);
}

.spot-card.is-active .spot-card-status {
  background: rgba(20, 23, 28, 0.12);
  color: var(--accent);
}

.spot-card:hover,
.spot-card:focus-visible {
  outline: none;
  border-color: var(--border-mid);
  background: var(--surface-alt);
}

/* Compact score circle on spot list — not the big 64px one */
.spot-score {
  min-width: 40px;
  height: 40px;
  border-radius: var(--radius-sm);
  display: grid;
  place-items: center;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  border: 1.5px solid currentColor;
  flex-shrink: 0;
}

.spot-card-body {
  flex: 1 1 auto;
  min-width: 0;
  display: grid;
  gap: 2px;
}

.spot-card-heading {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.spot-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.spot-card-name {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.01em;
  color: var(--text);
}

.spot-card-location,
.spot-card-summary {
  margin: 0;
  color: var(--muted);
}

.spot-card-location {
  font-size: 0.74rem;
  font-weight: 500;
  color: var(--soft);
}

.spot-card-meta-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* Mini surf summary on home cards */
.spot-card-surf {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 5px 10px;
  margin: 8px 0 2px;
}
.spot-card-surf .scs-item {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 500;
  color: var(--soft);
  white-space: nowrap;
}
.spot-card-surf .scs-item b {
  font-weight: 800;
  color: var(--accent-deep);
}
.spot-card-surf .scs-type {
  font-family: var(--font-mono);
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(20, 23, 28, 0.08);
  color: var(--accent-deep);
}
.spot-card-surf .scs-type[data-type="swell"] {
  background: rgba(38, 122, 212, 0.14);
  color: #1c5fa8;
}
.spot-card-surf .scs-type[data-type="vaga"] {
  background: rgba(212, 116, 38, 0.14);
  color: #b4541a;
}

.spot-card-status {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  min-height: 16px;
  padding: 0 5px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-family: var(--font-mono);
  font-size: 0.48rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* Ranking bar (Surfline-style 4 squares) — the PRIMARY score surface; the
   0-10 number sits tiny beneath it (kept for ranking/validation). Color of the
   lit segments = the score band; the chrome stays mono. */
.spot-card-rating {
  flex-shrink: 0;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
}

.rank-bar-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: rgba(20, 23, 28, 0.04);
  border: 1px solid rgba(20, 23, 28, 0.08);
  padding: 2px 6px 2px 2px;
  border-radius: 10px;
  font-size: 10px;
  font-weight: 800;
  color: var(--text-2);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

[data-theme="dark"] .rank-bar-pill {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.rb-pill-fill {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  display: inline-block;
}

.rank-bar-pill.rank-sm {
  padding: 1px 4px 1px 1px;
  font-size: 9px;
  gap: 3px;
}
.rank-bar-pill.rank-sm .rb-pill-fill {
  width: 10px;
  height: 10px;
}

.rank-bar-pill.rank-lg {
  padding: 3px 8px 3px 3px;
  font-size: 11px;
  gap: 5px;
}
.rank-bar-pill.rank-lg .rb-pill-fill {
  width: 14px;
  height: 14px;
}

.scr-score {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--soft);
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Pulsating LIVE dot — small green circle with a breathing animation */
.scr-live-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #22c55e;
  display: inline-block;
  flex-shrink: 0;
  animation: livePulse 2s ease-in-out infinite;
}

@keyframes livePulse {
  0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
  50%      { opacity: 0.6; box-shadow: 0 0 0 4px rgba(34, 197, 94, 0); }
}

/* Spot local time — tiny mono label under the score */
.scr-local-time {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  color: var(--muted);
  line-height: 1;
}

.score-chip .scr-local-time {
  font-size: 0.68rem;
  margin-top: 2px;
  color: var(--soft);
}

.spot-card-summary {
  margin-top: 8px;
  font-size: 0.84rem;
  line-height: 1.42;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.spot-card-meta,
.detail-metrics,
.summary-grid,
.history-summary-grid,
.history-year-stats,
.forecast-table-row,
.forecast-rail,
.tide-strip {
  display: grid;
  gap: 10px;
}

.spot-card-meta {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  grid-template-columns: none;
}

.spot-card-bottom {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.spot-card-signal {
  display: inline-flex;
  align-items: center;
  min-height: 18px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  background: var(--surface-alt);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  border: 1px solid var(--border);
}

.spot-card-signal.is-muted {
  color: var(--soft);
  border-color: transparent;
  background: transparent;
}

.spot-card.is-picker .spot-card-location {
  margin-top: 4px;
}

.spot-weather-card {
  margin-top: 8px;
  display: grid;
  gap: 6px;
  min-height: 62px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(61, 139, 132, 0.08), rgba(61, 139, 132, 0.04));
}

.spot-weather-main {
  display: flex;
  align-items: center;
  gap: 8px;
}

.spot-weather-icon {
  width: 24px;
  height: 24px;
  border-radius: var(--radius-pill);
  display: grid;
  place-items: center;
  background: rgba(61, 139, 132, 0.16);
  color: var(--accent-deep);
  flex: 0 0 auto;
}

.spot-weather-icon svg {
  width: 14px;
  height: 14px;
  display: block;
}

.spot-weather-copy {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.spot-weather-label {
  font-size: 0.58rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.spot-weather-temp {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--accent-deep);
}

.spot-weather-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.spot-weather-chip {
  display: inline-flex;
  align-items: center;
  min-height: 17px;
  padding: 0 6px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--surface);
  font-family: var(--font-mono);
  font-size: 0.46rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent-deep);
  text-transform: uppercase;
}

.spot-weather-card[data-weather-kind="clear"] .spot-weather-icon {
  background: rgba(223, 172, 68, 0.22);
  color: #8a5a00;
}

.spot-weather-card[data-weather-kind="rain"] .spot-weather-icon,
.spot-weather-card[data-weather-kind="storm"] .spot-weather-icon {
  background: rgba(61, 139, 132, 0.22);
  color: var(--accent-deep);
}

.spot-weather-card[data-weather-kind="fog"] .spot-weather-icon,
.spot-weather-card[data-weather-kind="cloudy"] .spot-weather-icon {
  background: rgba(20, 23, 28, 0.13);
  color: var(--muted);
}

.mini-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  padding: 0 7px;
  border-radius: var(--radius-pill);
  background: var(--accent-soft);
  color: var(--accent-deep);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.detail-card {
  min-height: 0;
}

.digest-section {
  display: grid;
  gap: 12px;
}

.empty-detail {
  display: grid;
  gap: 4px;
}

.empty-detail h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1rem;
}

.detail-content {
  display: grid;
  gap: 10px;
}

.detail-back-btn {
  display: inline-flex;
  align-self: flex-start;
  justify-self: start;
  width: fit-content;
  align-items: center;
  gap: 6px;
  margin-bottom: 12px;
  padding: 6px 12px 6px 8px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text-2, #3a4a49);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  cursor: pointer;
  transition: background 0.14s ease, border-color 0.14s ease, color 0.14s ease;
}

.detail-back-btn svg {
  width: 15px;
  height: 15px;
}

.detail-back-btn:hover {
  background: var(--accent-xsoft, rgba(61, 139, 132, 0.1));
  border-color: var(--accent);
  color: var(--accent-deep);
}

.detail-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

/* "Melhor janela" — best upcoming window banner in the spot detail */
.best-window {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  margin: 14px 0 4px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--surface-alt);
  cursor: pointer;
  text-align: left;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
}
.best-window:hover {
  border-color: var(--border-strong);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.best-window.hidden { display: none; }
.best-window .bw-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.best-window .bw-label {
  font-family: var(--font-mono);
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--soft);
}
.best-window .bw-when {
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
}
.best-window .bw-cond {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  white-space: nowrap;
}
.best-window .bw-score {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.95rem;
  padding: 3px 11px;
  border-radius: var(--radius-pill);
}
.best-window .bw-arrow {
  width: 16px;
  height: 16px;
  color: var(--soft);
  flex-shrink: 0;
}

.detail-location {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
}

/* In-spot path: clickable Estado › Cidade segments. */
.detail-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}
.detail-breadcrumb-seg {
  appearance: none;
  border: 0;
  background: none;
  padding: 1px 5px;
  margin: 0;
  font: inherit;
  font-weight: 700;
  color: var(--accent, #0a4f54);
  cursor: pointer;
  border-radius: 6px;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: background 0.12s ease;
}
.detail-breadcrumb-seg:hover {
  background: rgba(17, 17, 17, 0.07);
  text-decoration: none;
}
.detail-breadcrumb-sep {
  opacity: 0.45;
  font-weight: 700;
}

.score-badge {
  min-width: 58px;
  padding: 6px 10px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-mid);
  background: var(--surface);
  display: grid;
  gap: 1px;
  text-align: center;
}

.score-badge strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1;
}

.score-badge span {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  opacity: 0.78;
}

.detail-summary {
  color: var(--accent-deep);
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 780;
  line-height: 1.28;
  letter-spacing: -0.01em;
  max-width: 36ch;
}

.detail-metrics,
.summary-grid,
.history-summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.history-summary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.detail-context {
  margin: 0;
  color: rgba(17, 17, 17, 0.44);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  line-height: 1.36;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-card,
.summary-metric,
.history-summary-card,
.digest-stat-card {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--surface-alt);
  border: 1px solid var(--border);
}

.metric-card strong,
.summary-metric strong,
.history-summary-card strong,
.digest-stat-card strong {
  display: block;
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 0.94rem;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
}

.detail-card .detail-content {
  gap: 8px;
}

.detail-card .detail-metrics {
  gap: 0;
  padding-top: 10px;
  border-top: 1px solid rgba(20, 23, 28, 0.06);
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.detail-card .metric-card {
  padding: 0 12px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.detail-card .metric-card + .metric-card {
  padding-left: 12px;
  border-left: 1px solid rgba(20, 23, 28, 0.06);
}

.detail-card .metric-card:last-child {
  padding-right: 0;
}

.detail-card .metric-card span {
  color: rgba(20, 23, 28, 0.42);
  font-size: 0.54rem;
}

.detail-card .metric-card strong {
  margin-top: 4px;
  font-size: 0.88rem;
}

.spot-map-copy {
  margin: 0;
  color: rgba(20, 23, 28, 0.66);
  font-size: 0.78rem;
  line-height: 1.45;
  max-width: 48ch;
}

.spot-map-card {
  grid-column: 1 / -1;
}

.spot-map-card .secondary-section-body {
  grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.85fr);
  align-items: start;
}

.spot-map-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  grid-column: 1 / -1;
}

.spot-map-card .spot-map-copy {
  grid-column: 1 / -1;
}

.spot-map-view-tabs {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  border: 1px solid rgba(20, 23, 28, 0.08);
  background: rgba(244, 248, 248, 0.9);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.84);
}

.spot-map-view-btn {
  min-height: 30px;
  padding: 0 12px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(20, 23, 28, 0.64);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  cursor: pointer;
}

.spot-map-view-btn.is-active {
  background: linear-gradient(180deg, rgba(61, 139, 132, 0.16), rgba(61, 139, 132, 0.1));
  color: var(--accent-deep);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.78),
    0 8px 18px rgba(20, 23, 28, 0.08);
}

.spot-map-stage {
  position: relative;
  min-height: 0;
  aspect-ratio: 1 / 1;
  border-radius: 24px;
  border: 1px solid rgba(20, 23, 28, 0.08);
  background:
    radial-gradient(circle at 50% 50%, rgba(27, 90, 98, 0.24), transparent 48%),
    linear-gradient(180deg, #07181b 0%, #0a2328 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.05),
    0 18px 34px rgba(20, 23, 28, 0.12);
  overflow: hidden;
}

.spot-map-card[data-mode="map"] .spot-map-stage {
  aspect-ratio: 1.28 / 1;
  background:
    radial-gradient(circle at 50% 50%, rgba(44, 125, 144, 0.18), transparent 48%),
    linear-gradient(180deg, #07171a 0%, #0c2730 100%);
}

.spot-map-stage::after {
  content: "";
  position: absolute;
  inset: 12px;
  border-radius: 18px;
  border: 1px solid rgba(255, 255, 255, 0.05);
  pointer-events: none;
}

.spot-map-canvas {
  display: block;
  width: 100%;
  height: 100%;
  position: relative;
  z-index: 2;
}

.spot-map-card[data-mode="map"] .spot-map-canvas {
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
}

.spot-map-leaflet {
  position: absolute;
  inset: 0;
  opacity: 0;
  pointer-events: none;
  transition: opacity 220ms ease;
  z-index: 1;
}

.spot-map-card[data-mode="map"] .spot-map-leaflet {
  opacity: 1;
  pointer-events: auto;
}

.spot-map-card[data-mode="spectrum"] .spot-map-leaflet {
  opacity: 1;
  pointer-events: none;
  z-index: 1;
}

.spot-map-leaflet .leaflet-container {
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: #d9e8eb;
  filter: saturate(0.94) contrast(1.04) brightness(1.01);
  font-family: var(--font-mono);
}

.spot-map-leaflet .leaflet-tile-pane {
  opacity: 0.96;
}

.spot-map-leaflet .leaflet-control-attribution {
  margin: 0 10px 10px 0;
  padding: 3px 6px;
  border-radius: 999px;
  border: 1px solid rgba(20, 23, 28, 0.08);
  background: rgba(246, 250, 250, 0.88);
  color: rgba(20, 23, 28, 0.56);
  font-family: var(--font-mono);
  font-size: 0.48rem;
  backdrop-filter: blur(8px);
}

.spot-map-leaflet .leaflet-control-attribution a {
  color: var(--accent-deep);
}

.spot-map-leaflet .leaflet-control-layers {
  z-index: 9999 !important;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
  border-radius: 8px;
  border: none;
  background: #fff;
}
.spot-map-leaflet .leaflet-top.leaflet-right {
  top: 10px;
  right: 10px;
}

.spot-map-stage.is-map-fallback {
  background:
    radial-gradient(circle at 50% 50%, rgba(59, 136, 149, 0.22), transparent 52%),
    linear-gradient(180deg, #08161a 0%, #10313c 100%);
}

.spot-map-legend {
  grid-column: 1;
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding-top: 2px;
}

.spot-map-legend:empty {
  display: none;
}

.spot-map-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--soft);
}

.spot-map-legend-glyph {
  width: 15px;
  height: 9px;
  border-radius: 3px;
  flex-shrink: 0;
}

.spot-map-legend-glyph.is-coast {
  height: 3px;
  border-radius: 2px;
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(20, 23, 28, 0.32);
}

.spot-map-legend-glyph.is-ideal {
  background: rgba(53, 210, 227, 0.22);
  border: 1px solid rgba(53, 210, 227, 0.85);
}

.spot-map-legend-glyph.is-active {
  background: #167eff;
}

.spot-map-legend-glyph.is-wind {
  width: 0;
  height: 0;
  border-radius: 0;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 10px solid var(--wind-color, var(--accent));
}

.spot-map-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  align-self: stretch;
}

.spot-map-stat {
  padding: 12px 12px 11px;
  border-radius: 16px;
  border: 1px solid rgba(20, 23, 28, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 248, 248, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.spot-map-stat span {
  display: block;
  color: rgba(20, 23, 28, 0.44);
  font-family: var(--font-mono);
  font-size: 0.52rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.spot-map-stat strong {
  display: block;
  margin-top: 4px;
  color: var(--accent-deep);
  font-family: var(--font-display);
  font-size: 0.94rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.spot-map-stat p {
  margin: 4px 0 0;
  color: rgba(20, 23, 28, 0.62);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  line-height: 1.35;
}

@media (max-width: 980px) {
  .spot-map-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .spot-map-card .secondary-section-body {
    grid-template-columns: 1fr;
  }

  .spot-map-card[data-mode="map"] .spot-map-stage {
    aspect-ratio: 1.08 / 1;
  }
}

@media (max-width: 720px) {
  .spot-map-view-tabs {
    width: 100%;
    justify-content: space-between;
  }

  .spot-map-view-btn {
    flex: 1 1 0;
  }

  .spot-map-meta {
    grid-template-columns: 1fr;
  }

  .spot-map-stage,
  .spot-map-card[data-mode="map"] .spot-map-stage {
    aspect-ratio: 1 / 1;
  }
}

.tide-strip {
  overflow-x: auto;
  padding-bottom: 4px;
  grid-auto-flow: column;
  grid-auto-columns: minmax(118px, 1fr);
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.forecast-day-strip {
  display: block;
  min-width: 0;
  overflow: hidden;
  margin-top: 6px;
}

.forecast-day-pills {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(102px, 1fr);
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 3px;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.forecast-day-pill {
  display: grid;
  position: relative;
  gap: 1px;
  min-height: 0;
  padding: 6px 11px;
  border-radius: 12px;
  border: 1px solid rgba(17, 17, 17, 0.06);
  background: rgba(255, 255, 255, 0.68);
  text-align: left;
  scroll-snap-align: start;
  transition:
    background-color 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    opacity 0.16s ease;
}

.forecast-day-pill::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 2px;
  border-radius: 16px 16px 0 0;
  background: var(--day-accent, rgba(17, 17, 17, 0.3));
  opacity: 0;
  transition: opacity 0.16s ease;
}

.forecast-day-pill:hover {
  background: rgba(255, 255, 255, 0.84);
  border-color: rgba(17, 17, 17, 0.08);
}

.forecast-day-pill:focus-visible {
  outline: none;
  border-color: rgba(17, 17, 17, 0.12);
  background: rgba(255, 255, 255, 0.9);
  box-shadow:
    inset 0 0 0 1px rgba(17, 17, 17, 0.03),
    0 0 0 3px rgba(17, 17, 17, 0.05);
}

.forecast-day-pill:focus-visible::before {
  opacity: 0.5;
}

.forecast-day-pill.is-active {
  border-color: rgba(17, 17, 17, 0.08);
  background: rgba(255, 255, 255, 0.92);
  box-shadow:
    inset 0 0 0 1px rgba(17, 17, 17, 0.025),
    0 10px 22px rgba(17, 17, 17, 0.035);
}

.forecast-day-pill.is-active::before {
  opacity: 0.72;
}

/* Archived week replay — placeholder days with no stored forecast. */
.forecast-day-pill.is-no-data {
  opacity: 0.55;
  border-style: dashed;
}

.forecast-day-pill.is-no-data .forecast-day-pill-score {
  color: var(--soft);
}

.forecast-control-signal.is-no-data {
  color: var(--soft);
  font-style: italic;
}

.forecast-day-pill-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.forecast-day-pill-title {
  color: var(--accent-deep);
  font-family: var(--font-display);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1;
}

.forecast-day-pill-date {
  display: block;
  margin-top: 3px;
}

.forecast-day-pill-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 18px;
  padding: 0 5px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--day-accent) 44%, rgba(20, 23, 28, 0.08));
  background: color-mix(in srgb, var(--day-accent) 10%, white);
  color: color-mix(in srgb, var(--day-accent) 72%, #0c2f50);
  font-family: var(--font-mono);
  font-size: 0.5rem;
  font-weight: 800;
}

.forecast-day-pill-date {
  color: var(--soft);
  font-family: var(--font-mono);
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.forecast-control-shell {
  display: grid;
  gap: 10px;
  margin-top: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
}

.forecast-control-meta {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.forecast-control-copy {
  margin: 0;
  color: rgba(17, 17, 17, 0.42);
  font-size: 0.58rem;
  line-height: 1.3;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  max-width: 20ch;
}

.forecast-control-active {
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
  min-height: 20px;
}

.forecast-control-label {
  color: rgba(17, 17, 17, 0.42);
  font-family: var(--font-mono);
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* Admin-only archived-forecast replay control */
.forecast-archive-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 7px 10px;
  margin-bottom: 8px;
  border: 1px dashed rgba(17, 17, 17, 0.18);
  border-radius: 10px;
  background: rgba(17, 17, 17, 0.025);
}
.forecast-archive-bar.hidden { display: none; }
.forecast-archive-label {
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(17, 17, 17, 0.5);
}
.forecast-archive-select {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  padding: 4px 8px;
  border: 1px solid rgba(17, 17, 17, 0.16);
  border-radius: 8px;
  background: #fff;
  color: var(--accent-deep);
  cursor: pointer;
}
.forecast-archive-reset {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 4px 9px;
  border: 1px solid rgba(17, 17, 17, 0.16);
  border-radius: 8px;
  background: #fff;
  color: var(--accent-deep);
  cursor: pointer;
}
.forecast-archive-reset:hover { background: rgba(17, 17, 17, 0.05); }
.forecast-archive-badge {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  color: #b4541a;
  background: rgba(212, 116, 38, 0.12);
  padding: 3px 9px;
  border-radius: 999px;
}
.forecast-archive-reset.hidden,
.forecast-archive-badge.hidden { display: none; }

.forecast-control-active strong {
  color: var(--accent-deep);
  font-family: var(--font-display);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.08;
}

.forecast-control-badge,
.forecast-control-signal {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  border: 1px solid rgba(20, 23, 28, 0.05);
  background: rgba(255, 255, 255, 0.72);
  color: var(--accent-deep);
  font-size: 0.62rem;
  font-weight: 700;
  white-space: nowrap;
}

.forecast-control-badge {
  background: rgba(20, 23, 28, 0.1);
  color: var(--accent);
}

.forecast-control-shell .forecast-day-strip,
.forecast-control-shell .forecast-view-tabs {
  margin-top: 0;
}

.forecast-rail,
.forecast-digest-board {
  display: block;
  min-width: 0;
  overflow: hidden;
}

.forecast-rail {
  gap: 12px;
  margin-top: 18px;
}

.forecast-view-tabs {
  display: flex;
  gap: 4px;
  flex-wrap: nowrap;
  overflow-x: auto;
  margin-top: 6px;
  padding-bottom: 0;
  scrollbar-width: none;
}

.forecast-view-tabs::-webkit-scrollbar {
  display: none;
}

.forecast-view-btn {
  border: 1px solid rgba(17, 17, 17, 0.05);
  background: rgba(255, 255, 255, 0.58);
  color: rgba(17, 17, 17, 0.54);
  border-radius: var(--radius-pill);
  min-height: 26px;
  padding: 0 8px;
  white-space: nowrap;
  font-size: 0.58rem;
  font-weight: 700;
  transition:
    background-color 0.16s ease,
    color 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease;
}

.forecast-view-btn:hover {
  background: rgba(255, 255, 255, 0.82);
  color: rgba(17, 17, 17, 0.72);
  border-color: rgba(17, 17, 17, 0.08);
}

.forecast-view-btn.is-active {
  background: rgba(255, 255, 255, 0.98);
  color: var(--accent-deep);
  border-color: rgba(17, 17, 17, 0.08);
  box-shadow: 0 8px 16px rgba(17, 17, 17, 0.04);
}

.forecast-view-btn:focus-visible {
  outline: none;
  border-color: rgba(20, 23, 28, 0.08);
  box-shadow: 0 0 0 3px rgba(20, 23, 28, 0.06);
}

.forecast-view-pane {
  display: none;
  min-width: 0;
  overflow-x: clip;
}

.forecast-view-pane.is-active {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.forecast-card.is-single-page {
  grid-template-columns: 1fr;
  gap: 14px;
}

.forecast-card.is-single-page .forecast-view-pane + .forecast-view-pane {
  padding-top: 20px;
  border-top: 1px solid rgba(20, 23, 28, 0.08);
}

.forecast-card.is-single-page .forecast-view-pane {
  display: grid;
  gap: 14px;
  margin-top: 0;
  scroll-margin-top: 88px;
}

.forecast-card.is-single-page .forecast-view-tabs {
  position: relative;
  top: auto;
  z-index: 1;
  padding: 3px;
  border-radius: 13px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(17, 17, 17, 0.05);
  box-shadow: 0 12px 22px rgba(17, 17, 17, 0.035);
}

.forecast-story-head {
  display: grid;
  gap: 4px;
}

.forecast-story-head.is-minimal {
  gap: 2px;
  max-width: 24ch;
}

.forecast-story-head .eyebrow {
  color: rgba(20, 23, 28, 0.46);
  font-size: 0.58rem;
  letter-spacing: 0.14em;
}

.forecast-story-head h3 {
  margin: 0;
  color: var(--accent-deep);
  font-family: var(--font-display);
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.06;
}

.forecast-story-head .chart-copy {
  margin: 0;
  color: rgba(20, 23, 28, 0.58);
  font-size: 0.72rem;
  line-height: 1.38;
  max-width: 34ch;
}

.forecast-story-head.is-minimal h3 {
  font-size: 0.88rem;
  line-height: 1.02;
}

.forecast-story-head.is-minimal .chart-copy {
  color: rgba(20, 23, 28, 0.5);
  font-size: 0.66rem;
  line-height: 1.3;
  max-width: 24ch;
}

.forecast-tech-pane {
  gap: 16px;
}

.forecast-tech-summary {
  display: grid;
  gap: 8px;
}

.forecast-tech-summary-label {
  color: var(--soft);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.forecast-tech-summary-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.forecast-tech-summary-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid rgba(20, 23, 28, 0.08);
  background: rgba(255, 255, 255, 0.82);
  color: var(--accent-deep);
  font-size: 0.72rem;
  font-weight: 700;
}

.forecast-tech-summary-pill {
  background: rgba(20, 23, 28, 0.1);
}

.forecast-tech-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
}

.forecast-tech-card {
  min-width: 0;
}

.forecast-tech-card .chart-stage {
  height: 100%;
}

.forecast-day-card {
  padding: 12px 12px 11px;
  border-radius: 22px;
  background: rgba(255, 255, 255, 0.84);
  border: 1px solid rgba(20, 23, 28, 0.08);
  transition: 0.2s ease;
  display: grid;
  gap: 7px;
  align-content: start;
  text-align: left;
  scroll-snap-align: start;
}

.forecast-day-card.is-active {
  border-color: rgba(20, 23, 28, 0.18);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(228, 230, 233, 0.74));
}

.forecast-day-date,
.forecast-day-best,
.forecast-hour,
.tide-time,
.history-year-range,
.chart-caption {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
}

.forecast-day-score {
  margin: 0;
  font-family: var(--font-display);
  font-size: 1.46rem;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.forecast-day-main {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.forecast-day-meta {
  margin: 0;
  color: var(--soft);
  font-size: 0.82rem;
  line-height: 1.4;
}

.forecast-day-subdate {
  margin: -4px 0 0;
  color: var(--soft);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.forecast-focus-grid {
  display: grid;
  gap: 14px;
  min-width: 0;
  grid-template-columns: 1fr;
}

.forecast-focus-card,
.chart-card,
.history-chart-stage {
  padding: 18px;
  border-radius: 26px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 248, 249, 0.96));
  border: 1px solid rgba(17, 17, 17, 0.06);
  box-shadow: 0 14px 30px rgba(17, 17, 17, 0.035), 0 1px 2px rgba(17, 17, 17, 0.02);
}

.forecast-focus-grid > *,
.chart-card,
.history-chart-stage,
.tide-card {
  min-width: 0;
}

.forecast-ocean-pane .forecast-focus-grid {
  align-items: stretch;
}


/* ============================================================
   Swell timeline — plot principal contínuo (altura=onda, cor=período)
   ============================================================ */
.swell-timeline {
  display: grid;
  gap: 12px;
}

.swell-timeline-head-wrap {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: end;
  gap: 10px;
}

.swell-timeline-axis-head {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 42px;
  padding-right: 7px;
}

.swell-timeline-axis-head-kicker {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(88, 108, 119, 0.84);
}

.swell-timeline-head {
  display: grid;
  grid-template-columns: repeat(var(--day-count, 7), minmax(0, 1fr));
  border-radius: 14px;
  border: 1px solid rgba(17, 17, 17, 0.06);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(247, 249, 250, 0.88));
  padding: 4px;
}

.swell-timeline-day {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 3px;
  padding: 8px 4px 9px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
  transition: background 0.15s ease, box-shadow 0.15s ease;
}

.swell-timeline-day + .swell-timeline-day::before {
  content: "";
  position: absolute;
  left: -1px;
  top: 7px;
  bottom: 7px;
  width: 1px;
  background: linear-gradient(180deg, rgba(99, 124, 138, 0), rgba(99, 124, 138, 0.24), rgba(99, 124, 138, 0));
}

.swell-timeline-day:hover {
  background: rgba(20, 23, 28, 0.04);
}

.swell-timeline-day.is-active {
  background: linear-gradient(180deg, rgba(61, 139, 132, 0.18), rgba(61, 139, 132, 0.1));
  box-shadow: inset 0 0 0 1px rgba(61, 139, 132, 0.26), 0 4px 10px rgba(19, 74, 78, 0.08);
}

.swell-timeline-day.is-active::after {
  content: "";
  position: absolute;
  left: 10px;
  right: 10px;
  bottom: 4px;
  height: 2px;
  border-radius: 999px;
  background: rgba(18, 88, 91, 0.5);
}

.swell-timeline-day-name {
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(44, 63, 73, 0.9);
}

.swell-timeline-day.is-active .swell-timeline-day-name {
  color: var(--accent-deep);
}

.swell-timeline-day-date {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: rgba(98, 118, 129, 0.86);
}

.swell-timeline-day-score {
  margin-top: 2px;
  min-width: 26px;
  padding: 2px 7px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 800;
  background: var(--day-score, var(--accent));
  color: var(--day-score-text, #ffffff);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.38);
}

.swell-timeline-frame {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: stretch;
  gap: 10px;
}

.swell-timeline-axis {
  position: sticky;
  left: 0;
  height: 244px;
  border-radius: 14px;
  border: 1px solid rgba(17, 17, 17, 0.06);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(243, 247, 248, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.82);
}

.swell-timeline-axis::before {
  content: "";
  position: absolute;
  top: 9px;
  bottom: 9px;
  right: 7px;
  width: 1px;
  background: linear-gradient(180deg, rgba(99, 124, 138, 0.08), rgba(56, 82, 94, 0.18), rgba(99, 124, 138, 0.08));
}

.swell-timeline-axis-tick {
  position: absolute;
  left: 0;
  right: 0;
  transform: translateY(50%);
  padding-right: 11px;
  display: flex;
  justify-content: flex-end;
}

.swell-timeline-axis-tick::before {
  content: "";
  position: absolute;
  right: 7px;
  top: 50%;
  width: 5px;
  height: 1px;
  transform: translateY(-50%);
  background: rgba(70, 96, 108, 0.22);
}

.swell-timeline-axis-tick.is-major::before {
  width: 8px;
  background: rgba(50, 74, 86, 0.5);
}

/* meios-metros = rótulo "menor" (claro, menor) */
.swell-timeline-axis-value {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: rgba(74, 94, 104, 0.82);
}

/* metros inteiros = rótulo "maior" (negrito, escuro) */
.swell-timeline-axis-tick.is-major .swell-timeline-axis-value {
  font-size: 0.74rem;
  font-weight: 800;
  color: rgba(40, 62, 73, 0.98);
}

.swell-timeline-plot {
  position: relative;
  height: 244px;
}

.swell-timeline-canvas {
  position: absolute;
  inset: 0;
  border-radius: 18px;
  border: 1px solid rgba(17, 17, 17, 0.06);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 248, 248, 0.9));
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.85);
  overflow: hidden;
}

.swell-timeline-grid {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.swell-timeline-grid-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 0;
  border-top: 1px dashed rgba(17, 17, 17, 0.05);
}

/* metros inteiros = linha mais presente (hierarquia maior/menor) */
.swell-timeline-grid-line.is-major {
  border-top: 1px solid rgba(17, 17, 17, 0.1);
}

.swell-timeline-layers {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.swell-timeline-day-sep {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  background: rgba(17, 17, 17, 0.06);
}

.swell-timeline-day-stripe {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(17, 17, 17, 0.022);
}

.swell-timeline-day-band {
  position: absolute;
  top: 0;
  bottom: 0;
  background: linear-gradient(180deg, rgba(61, 139, 132, 0.12), rgba(61, 139, 132, 0.025));
}


.swell-timeline-day-veil {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(255, 255, 255, 0.4);
}

/* Linha de qualidade (dots de score por janela) — faixa "SURFE" */
.swell-timeline-quality-wrap {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  margin-top: 6px;
}

.swell-timeline-quality-label {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--soft);
  text-align: right;
}

.swell-timeline-quality {
  position: relative;
  height: 12px;
}

.swell-timeline-q-dot {
  position: absolute;
  top: 50%;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--q, var(--accent));
  transform: translate(-50%, -50%);
  opacity: 0.5;
}

.swell-timeline-q-dot.is-active {
  width: 9px;
  height: 9px;
  opacity: 1;
  box-shadow: 0 0 0 2px #ffffff, 0 1px 3px rgba(17, 17, 17, 0.18);
}

/* Ticks de horário (00h/06h/12h/18h) na base de cada dia */
.swell-timeline-hours-wrap {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 10px;
  margin-top: 4px;
}

.swell-timeline-hours {
  position: relative;
  height: 14px;
}

.swell-timeline-hour {
  position: absolute;
  top: 0;
  bottom: 0;
}

.swell-timeline-hour::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 1px;
  height: 4px;
  background: rgba(17, 17, 17, 0.13);
}

.swell-timeline-hour-label {
  position: absolute;
  top: 5px;
  left: 0;
  transform: translateX(-50%);
  font-family: var(--font-mono);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: rgba(58, 78, 88, 0.96);
  white-space: nowrap;
}

.swell-timeline-hour.is-edge .swell-timeline-hour-label {
  transform: translateX(0);
}

@media (max-width: 640px) {
  .swell-timeline-quality-wrap,
  .swell-timeline-hours-wrap {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 8px;
  }

  .swell-timeline-hour.h6 .swell-timeline-hour-label,
  .swell-timeline-hour.h18 .swell-timeline-hour-label {
    display: none;
  }
}

.swell-timeline-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.swell-timeline-tide {
  fill: rgba(111, 170, 164, 0.16);
}

.swell-timeline-area {
  opacity: 0.52;
}

.swell-timeline-line-halo {
  stroke: #ffffff;
  stroke-opacity: 0.8;
  stroke-width: 5.5;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.swell-timeline-line {
  stroke-width: 2.8;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.swell-timeline-overlay {
  position: absolute;
  inset: 0;
}

.swell-timeline-guide {
  position: absolute;
  top: 0;
  bottom: 0;
  width: 1px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, rgba(10, 79, 84, 0), rgba(10, 79, 84, 0.44) 36%, rgba(10, 79, 84, 0));
  opacity: 0;
  transition: opacity 0.14s ease;
  pointer-events: none;
}

.swell-timeline-guide.is-inspecting {
  opacity: 1;
}

.swell-timeline-hit {
  position: absolute;
  top: 0;
  bottom: 0;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  transition: background 0.12s ease;
}

.swell-timeline-hit:hover {
  background: rgba(20, 23, 28, 0.04);
}

/* Active hour cursor (driven by chart hover AND the radar slider). */
.swell-timeline-hit.is-inspecting {
  background: rgba(20, 23, 28, 0.06);
}

.swell-timeline-hit.is-inspecting::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 0;
  border-left: 1px dashed rgba(20, 23, 28, 0.38);
  transform: translateX(-50%);
  pointer-events: none;
}

.swell-timeline-dot {
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--node-color, var(--accent));
  border: 2px solid #ffffff;
  box-shadow: 0 1px 4px rgba(17, 17, 17, 0.2);
  transform: translate(-50%, 50%);
  pointer-events: none;
  transition:
    transform 0.14s ease,
    box-shadow 0.14s ease;
}

.swell-timeline-dot.is-inspecting {
  transform: translate(-50%, 50%) scale(1.22);
  box-shadow: 0 0 0 5px rgba(10, 79, 84, 0.12), 0 8px 18px rgba(15, 24, 30, 0.25);
}

.swell-timeline-dot.is-best {
  width: 13px;
  height: 13px;
}

.swell-timeline-tip {
  position: absolute;
  display: grid;
  justify-items: center;
  gap: 2px;
  transform: translate(-50%, -12px);
  white-space: nowrap;
  pointer-events: none;
}

.swell-timeline-tip-value {
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  color: var(--text);
}

.swell-timeline-tip-value small {
  font-size: 0.78em;
  color: var(--soft);
}

.swell-timeline-tip-tag {
  padding: 1px 6px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #ffffff;
  background: var(--node-color, var(--accent));
}

.swell-timeline-legends {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px 18px;
}

.swell-timeline-legend {
  display: grid;
  gap: 4px;
  min-width: 0;
}

/* Linear gradient scale bar (replaces the many discrete colour chips) */
.swell-timeline-scale-bar {
  height: 8px;
  width: 100%;
  border-radius: 5px;
}

.swell-timeline-scale-ends {
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: rgba(96, 116, 126, 0.72);
}

.swell-timeline-legend-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--soft);
}

.swell-timeline-legend-glyph {
  width: 16px;
  height: 8px;
  border-radius: 3px;
  flex-shrink: 0;
  background: linear-gradient(90deg, #79a7ff, #32e49c, #ffe14d, #ff9c41, #f2528e);
}

.swell-timeline-legend-glyph.is-line {
  height: 3px;
  border-radius: 2px;
}

.swell-timeline-legend-glyph.is-area {
  opacity: 0.6;
}

@media (max-width: 560px) {
  .swell-timeline-head-wrap {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 8px;
  }

  .swell-timeline-axis-head {
    min-height: 36px;
    padding-right: 6px;
  }

  .swell-timeline-axis-head-kicker {
    font-size: 0.46rem;
    letter-spacing: 0.1em;
  }

  .swell-timeline-frame {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 8px;
  }

  .swell-timeline-axis {
    border-radius: 12px;
  }

  .swell-timeline-axis-tick {
    padding-right: 9px;
  }

  .swell-timeline-axis-tick::before {
    right: 6px;
    width: 5px;
  }

  .swell-timeline-axis-value {
    font-size: 0.5rem;
  }

  .swell-timeline-day {
    gap: 2px;
    padding: 7px 3px 8px;
  }

  .swell-timeline-day-name {
    font-size: 0.52rem;
  }

  .swell-timeline-day-date {
    font-size: 0.46rem;
  }

  .swell-timeline-day-score {
    min-width: 24px;
    font-size: 0.52rem;
    padding: 2px 6px;
  }

  .swell-timeline-legends {
    grid-template-columns: 1fr;
  }
}

.swell-timeline-scale-track {
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.swell-timeline-scale-stop {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 2px 8px 2px 5px;
  border-radius: 999px;
  border: 1px solid rgba(20, 23, 28, 0.1);
  background: rgba(255, 255, 255, 0.82);
  color: var(--accent-deep);
  font-family: var(--font-mono);
  font-size: 0.54rem;
  font-weight: 700;
}

.swell-timeline-scale-stop::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--stop);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.92), 0 0 0 1.5px rgba(20, 23, 28, 0.12);
  flex: 0 0 8px;
}

/* ============================================================
   Tech tracks — faixas finas alinhadas ao eixo do hero
   ============================================================ */
.tech-tracks-card {
  width: 100%;
  padding: 14px 16px;
  display: grid;
  gap: 4px;
}

.tech-tracks-stage {
  width: 100%;
}

.tech-tracks {
  display: grid;
  gap: 6px;
}

.tech-track {
  display: grid;
  grid-template-columns: clamp(92px, 11vw, 128px) minmax(0, 1fr);
  align-items: stretch;
  gap: 14px;
  padding: 8px 0;
}

.tech-track + .tech-track {
  border-top: 1px solid rgba(17, 17, 17, 0.05);
}

.tech-track-label {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 2px;
  min-width: 0;
}

.tech-track-name {
  display: flex;
  align-items: baseline;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--soft);
}

.tech-track-name small {
  font-size: 0.82em;
  font-weight: 600;
  opacity: 0.7;
}

.tech-track-focus {
  font-family: var(--font-mono);
  font-size: 0.92rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
}

.tech-track-days {
  display: grid;
  grid-template-columns: repeat(var(--day-count, 7), minmax(0, 1fr));
  gap: 7px;
  height: clamp(56px, 6.4vw, 68px);
}

.tech-day {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  align-items: end;
  gap: 3px;
  border-radius: 8px;
  padding: 0 2px;
}

.tech-day.is-active {
  background: rgba(61, 139, 132, 0.09);
}

.tech-cell {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  height: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  cursor: pointer;
  min-width: 0;
}

.tech-cell-bar {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: var(--cell-ratio, 30%);
  min-height: 4px;
  border-radius: 5px 5px 2px 2px;
  background: var(--cell-color, var(--accent));
  opacity: 0.55;
  transition: opacity 0.12s ease;
}

.tech-day.is-active .tech-cell-bar {
  opacity: 1;
}

.tech-cell:hover .tech-cell-bar {
  opacity: 0.9;
}

.tech-day.is-active .tech-cell:hover .tech-cell-bar {
  filter: saturate(1.08);
}

.tech-cell-arrow {
  font-size: 0.7rem;
  line-height: 1;
  color: #ffffff;
  text-shadow: 0 1px 2px rgba(17, 17, 17, 0.3);
}

.tech-tracks-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(17, 17, 17, 0.05);
}

.tech-tracks-legend-label {
  font-family: var(--font-mono);
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--soft);
}

.tech-tracks-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 700;
  color: var(--text-2, #3a4a49);
}

.tech-tracks-legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 3px;
  background: var(--legend-dot, var(--accent));
}

@media (max-width: 900px) {
  .tech-track {
    grid-template-columns: 1fr;
    gap: 8px;
    padding: 10px 0;
  }

  .tech-track-days {
    height: 52px;
  }
}

/* ============================================================
   Maré — curva contínua através dos eventos de preamar/baixamar
   ============================================================ */
.chart-stage.tide-stage {
  min-height: 0;
}

.tide-curve {
  display: grid;
  gap: 12px;
}

.tide-curve-plot {
  position: relative;
  height: 168px;
}

.tide-curve-svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.tide-curve-area {
  fill: rgba(61, 139, 132, 0.14);
}

.tide-curve-line {
  stroke: var(--accent);
  stroke-width: 2.4;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.tide-curve-overlay {
  position: absolute;
  inset: 0;
}

.tide-node {
  position: absolute;
  width: 0;
  height: 0;
}

.tide-node-dot {
  position: absolute;
  left: 0;
  top: 0;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 2px solid #ffffff;
  box-shadow: 0 1px 4px rgba(17, 17, 17, 0.2);
  transform: translate(-50%, -50%);
}

.tide-node.is-high .tide-node-dot {
  background: var(--clay);
}

.tide-node.is-low .tide-node-dot {
  background: var(--accent);
}

.tide-node-label {
  position: absolute;
  left: 0;
  display: grid;
  justify-items: center;
  white-space: nowrap;
  transform: translateX(-50%);
}

.tide-node.is-high .tide-node-label {
  bottom: 11px;
}

.tide-node.is-low .tide-node-label {
  top: 11px;
}

.tide-node-label strong {
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  color: var(--text);
}

.tide-node-label span {
  font-family: var(--font-mono);
  font-size: 0.53rem;
  color: var(--soft);
}

.tide-curve-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.tide-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--soft);
}

.tide-legend-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
}

.tide-legend-item.is-high .tide-legend-dot {
  background: var(--clay);
}

.tide-legend-item.is-low .tide-legend-dot {
  background: var(--accent);
}

.tide-legend-coef {
  margin-left: auto;
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--accent-deep);
}

.forecast-card.is-single-page .forecast-ocean-pane {
  gap: 14px;
}

.forecast-card.is-single-page .forecast-view-pane + .forecast-view-pane {
  padding-top: 16px;
  border-top-color: rgba(20, 23, 28, 0.05);
}

.forecast-digest-card,
.digest-stage,
.digest-story-card,
.digest-stat-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(244, 250, 250, 0.96)),
    radial-gradient(circle at top, rgba(228, 230, 233, 0.34), transparent 62%);
  border-color: rgba(20, 23, 28, 0.08);
  box-shadow: none;
}

.forecast-digest-card {
  gap: 16px;
}

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

.forecast-panel-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
  max-width: 34ch;
}

.forecast-panel-copy h3 {
  margin: 0;
  color: var(--accent-deep);
  font-family: var(--font-display);
  font-size: 1.04rem;
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.forecast-panel-head .pill {
  flex: 0 0 auto;
  margin-top: 2px;
}

.forecast-panel-support {
  margin: 0;
  color: rgba(20, 23, 28, 0.46);
  font-size: 0.74rem;
  line-height: 1.42;
}

@media (max-width: 699px) {
  .forecast-matrix-toolbar {
    display: grid;
  }

  .forecast-matrix-focus {
    justify-self: start;
  }

  .forecast-matrix-glance {
    grid-template-columns: 1fr;
  }

  .forecast-matrix-keys {
    gap: 6px;
  }

  .forecast-matrix-frame {
    grid-template-columns: 36px minmax(0, 1fr) 36px;
    gap: 8px;
  }

  .forecast-matrix-slot-grid {
    gap: 6px;
    padding-inline: 8px;
  }

  .forecast-period-scale {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .forecast-period-scale-label {
    white-space: normal;
  }
}

.secondary-section {
  padding: 0;
  overflow: hidden;
  background: var(--surface);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}

.secondary-section-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 18px;
  cursor: pointer;
  list-style: none;
  user-select: none;
}

.secondary-section-summary::-webkit-details-marker {
  display: none;
}

.secondary-section-summary::after {
  content: "";
  flex: 0 0 auto;
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238fa5a3' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  transition: transform 0.18s ease;
}

.secondary-section[open] .secondary-section-summary::after {
  transform: rotate(180deg);
}

.secondary-section-body {
  display: grid;
  gap: 14px;
  padding: 0 18px 18px;
  border-top: 1px solid var(--border);
}

.secondary-section .history-toolbar {
  margin-top: 2px;
}

.digest-stage {
  padding: 16px 14px 12px;
  border-radius: 22px;
}

.ocean-stage-card {
  position: relative;
  overflow: hidden;
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  box-shadow: none;
}

/* Chart color legend (energy rainbow + score quality) */
.chart-legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 24px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
  position: relative;
  z-index: 1;
}
.chart-legend .cl-label {
  font-family: var(--font-mono);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--soft);
  white-space: nowrap;
}
.chart-legend-energy {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1 1 220px;
  min-width: 190px;
}
.cl-bar { flex: 1; min-width: 100px; }
.cl-gradient {
  display: block;
  height: 7px;
  border-radius: 999px;
  background: linear-gradient(90deg, #79a7ff, #32bfd3, #32e49c, #bbf414, #ffe14d, #ff9c41, #f2528e, #cc47e8);
}
.cl-ends {
  display: flex;
  justify-content: space-between;
  margin-top: 3px;
}
.cl-ends em {
  font-family: var(--font-mono);
  font-style: normal;
  font-size: 0.5rem;
  letter-spacing: 0.03em;
  color: var(--soft);
}
.chart-legend-score {
  display: flex;
  align-items: center;
  gap: 8px 12px;
  flex-wrap: wrap;
}
.chart-legend-score .cl-score {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.64rem;
  color: var(--muted);
}
.chart-legend-score .cl-score i {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}


.ocean-stage-card::after {
  display: none;
}

.ocean-stage-card .chart-stage {
  position: relative;
  z-index: 1;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
}

.ocean-float-card {
  padding: 16px;
  border-radius: var(--radius-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.ocean-float-card.forecast-focus-card {
  background: var(--surface);
  border-color: var(--border);
}

.forecast-focus-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.forecast-focus-heading {
  display: grid;
  gap: 3px;
}

.forecast-focus-kicker {
  margin: 0;
  color: rgba(20, 23, 28, 0.42);
  font-family: var(--font-mono);
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.forecast-focus-dayline {
  margin: 0;
  color: rgba(20, 23, 28, 0.56);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  line-height: 1.25;
}

.forecast-focus-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  min-height: 26px;
  padding: 0 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(20, 23, 28, 0.06);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
}

.forecast-focus-card {
  --focus-accent: var(--accent-deep);
  gap: 10px;
}

.forecast-focus-card.forecast-digest-card {
  position: relative;
  overflow: hidden;
}

.forecast-focus-card.forecast-digest-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 2px;
  border-radius: 999px;
  background: var(--focus-accent);
  opacity: 0.18;
}

.forecast-focus-card.forecast-digest-card > * {
  position: relative;
  z-index: 1;
}

.forecast-focus-lead {
  margin: 0;
  color: rgba(20, 23, 28, 0.84);
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.28;
}

.forecast-focus-facts {
  display: grid;
  gap: 0;
  border-top: 1px solid rgba(20, 23, 28, 0.06);
}

.forecast-focus-fact {
  display: grid;
  gap: 3px;
  padding: 10px 0 0;
  background: transparent;
  border: 0;
}

.forecast-focus-fact-label {
  color: rgba(20, 23, 28, 0.42);
  font-family: var(--font-mono);
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.forecast-focus-fact-value {
  color: var(--accent-deep);
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1.08;
}

.forecast-focus-fact-meta {
  color: var(--muted);
  font-size: 0.64rem;
  line-height: 1.32;
}

.forecast-analysis-strip {
  display: grid;
  gap: 10px;
}

.forecast-analysis-card {
  display: grid;
  gap: 5px;
  padding: 13px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(20, 23, 28, 0.08);
}

.forecast-analysis-label {
  color: var(--soft);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.forecast-analysis-value {
  color: var(--accent-deep);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.1;
}

.forecast-analysis-meta {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.forecast-focus-foot {
  margin: 0;
  color: var(--soft);
  font-size: 0.82rem;
  line-height: 1.45;
}

.chart-card-analytic {
  display: grid;
  gap: 14px;
}

.forecast-view-pane[data-forecast-view-pane="digest"] .chart-card-analytic {
  padding: 15px 16px;
  border-radius: 22px;
  border-color: rgba(20, 23, 28, 0.05);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(246, 250, 250, 0.96)),
    radial-gradient(circle at top left, rgba(228, 230, 233, 0.12), transparent 70%);
}

.chart-card-head {
  display: grid;
  gap: 8px;
}

.chart-card-head h3 {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-size: 0.98rem;
  font-weight: 800;
}

.forecast-view-pane[data-forecast-view-pane="digest"] .chart-card-analytic {
  gap: 10px;
}

.forecast-view-pane[data-forecast-view-pane="digest"] .chart-card-head {
  gap: 5px;
}

.forecast-view-pane[data-forecast-view-pane="digest"] .chart-card-head .eyebrow {
  color: rgba(20, 23, 28, 0.44);
  font-size: 0.56rem;
  letter-spacing: 0.13em;
}

.forecast-view-pane[data-forecast-view-pane="digest"] .chart-card-head h3 {
  margin-top: 2px;
  font-size: 0.92rem;
  line-height: 1.08;
}

.forecast-view-pane[data-forecast-view-pane="digest"] .chart-copy {
  color: rgba(20, 23, 28, 0.56);
  font-size: 0.74rem;
  line-height: 1.38;
  max-width: 30ch;
}

.chart-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  max-width: 62ch;
}

.summary-grid {
  margin-top: 14px;
}

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

.chart-stage,
.history-chart-stage,
.tide-stage {
  min-height: 282px;
  min-width: 0;
  overflow: hidden;
}

.compact-stage {
  min-height: 246px;
}

.chart-card-analytic .chart-stage,
.tide-stage {
  padding: 16px 14px 10px;
  border-radius: 24px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(249, 249, 250, 0.96));
  border: 1px solid rgba(17, 17, 17, 0.06);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.chart-stage svg,
.history-chart-stage svg,
.tide-stage svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.chart-stage text,
.history-chart-stage text,
.tide-stage text {
  font-family: var(--font-mono);
}

.chart-legend-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.chart-legend-inline-ocean .legend-pill {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(255, 255, 255, 0.18);
}

.legend-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(20, 23, 28, 0.08);
  color: var(--accent-deep);
  font-size: 0.76rem;
  font-weight: 700;
}

.legend-swatch {
  width: 18px;
  height: 4px;
  border-radius: 999px;
  background: currentColor;
}

.legend-swatch.is-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.legend-swatch.is-line {
  width: 16px;
  height: 2px;
}

.legend-swatch.is-bar {
  width: 10px;
  height: 16px;
  border-radius: 5px;
}

.legend-swatch.is-dashed {
  background: linear-gradient(90deg, currentColor 0 60%, transparent 60% 100%);
  background-size: 10px 100%;
}

.chart-note {
  display: flex;
  width: auto;
  max-width: 100%;
  flex-wrap: wrap;
  margin: 0 0 10px;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.94);
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
  overflow-wrap: anywhere;
  border: 1px solid rgba(17, 17, 17, 0.05);
}

.ocean-stage-card .chart-note {
  background: rgba(247, 255, 254, 0.12);
  color: rgba(236, 247, 245, 0.94);
}

.chart-note-ocean {
  margin-bottom: 0;
}

.forecast-matrix-shell {
  --matrix-stage-height: 206px;
  --matrix-accent: var(--accent-deep);
  --matrix-accent-soft: rgba(17, 17, 17, 0.1);
  --matrix-accent-bg: rgba(17, 17, 17, 0.04);
  --matrix-glance-bg: rgba(255, 255, 255, 0.94);
  --matrix-glance-border: rgba(17, 17, 17, 0.06);
  --matrix-active-day: rgba(17, 17, 17, 0.03);
  --matrix-active-head: rgba(255, 255, 255, 0.96);
  --matrix-stage-border: rgba(17, 17, 17, 0.08);
  --matrix-stage-grid: rgba(17, 17, 17, 0.07);
  --matrix-stage-tint-top: rgba(17, 17, 17, 0.04);
  --matrix-stage-tint-bottom: rgba(17, 17, 17, 0.01);
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 4px 0 2px;
}

.forecast-matrix-shell.is-overview {
  --matrix-stage-height: 222px;
  --matrix-accent: var(--accent-deep);
  --matrix-accent-soft: rgba(17, 17, 17, 0.12);
  --matrix-accent-bg: rgba(17, 17, 17, 0.04);
}

.forecast-matrix-shell.is-wind {
  --matrix-accent: var(--accent);
  --matrix-accent-soft: rgba(20, 23, 28, 0.18);
  --matrix-accent-bg: rgba(121, 167, 161, 0.12);
}

.forecast-matrix-shell.is-energy {
  --matrix-accent: var(--clay);
  --matrix-accent-soft: rgba(179, 106, 98, 0.18);
  --matrix-accent-bg: rgba(179, 106, 98, 0.1);
}

.forecast-matrix-shell.is-swell {
  --matrix-accent: var(--accent-mid);
  --matrix-accent-soft: rgba(28, 123, 124, 0.16);
  --matrix-accent-bg: rgba(121, 167, 161, 0.1);
}

.forecast-matrix-shell.is-compact {
  --matrix-stage-height: 188px;
}

.forecast-matrix-toolbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.forecast-matrix-toolbar.is-no-focus {
  justify-content: flex-start;
}

.forecast-matrix-shell.is-compact {
  gap: 10px;
}

.forecast-matrix-shell.is-compact .forecast-matrix-toolbar {
  align-items: flex-end;
}

.forecast-matrix-heading {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.forecast-matrix-kicker {
  margin: 0;
  color: rgba(20, 23, 28, 0.52);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.forecast-matrix-copy {
  margin: 0;
  color: rgba(17, 17, 17, 0.5);
  font-size: 0.72rem;
  line-height: 1.38;
  max-width: 34ch;
}

.forecast-matrix-focus {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  background: var(--matrix-accent-bg);
  border: 1px solid var(--matrix-accent-soft);
  color: var(--matrix-accent);
  font-size: 0.72rem;
  font-weight: 800;
  text-align: center;
}

.forecast-matrix-keys {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
  align-items: center;
}

.forecast-matrix-key,
.forecast-matrix-glance-card {
  --matrix-tone: var(--matrix-accent);
}

.forecast-matrix-key.is-score,
.forecast-matrix-glance-card.is-score {
  --matrix-tone: var(--accent-deep);
}

.forecast-matrix-key.is-wave,
.forecast-matrix-glance-card.is-wave,
.forecast-matrix-key.is-wind,
.forecast-matrix-glance-card.is-wind {
  --matrix-tone: var(--accent);
}

.forecast-matrix-key.is-state,
.forecast-matrix-glance-card.is-state {
  --matrix-tone: var(--wave);
}

.forecast-matrix-key.is-period,
.forecast-matrix-glance-card.is-period {
  --matrix-tone: #ff9c41;
}

.forecast-matrix-key.is-energy,
.forecast-matrix-glance-card.is-energy,
.forecast-matrix-key.is-peak,
.forecast-matrix-glance-card.is-peak {
  --matrix-tone: var(--clay);
}

.forecast-matrix-key.is-direction,
.forecast-matrix-glance-card.is-direction {
  --matrix-tone: var(--accent-deep);
}

.forecast-matrix-key {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(20, 23, 28, 0.42);
  font-family: var(--font-mono);
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.forecast-matrix-key::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: var(--matrix-tone);
  opacity: 0.78;
}

.forecast-matrix-glance {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.forecast-matrix-glance-card {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 4px;
  padding: 15px 13px 12px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(17, 17, 17, 0.06);
  box-shadow: 0 10px 20px rgba(17, 17, 17, 0.025);
}

.forecast-matrix-glance-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 12px;
  right: 12px;
  height: 3px;
  border-radius: 999px;
  background: var(--matrix-tone);
  opacity: 0.92;
}

.forecast-matrix-glance-kicker {
  color: var(--soft);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.forecast-matrix-glance-value {
  color: var(--matrix-accent);
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: 800;
  line-height: 1.08;
}

.forecast-matrix-glance-meta {
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.35;
}

.forecast-matrix-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  padding: 2px 0 4px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
  scroll-snap-type: x proximity;
}

.forecast-matrix-frame {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) 38px;
  gap: 8px;
  align-items: start;
}

.forecast-matrix-frame.is-single-axis {
  grid-template-columns: 34px minmax(0, 1fr);
}

.forecast-matrix-axis {
  display: grid;
  grid-template-rows: 56px var(--matrix-stage-height, 188px) auto;
  gap: 10px;
  min-width: 0;
}

.forecast-matrix-axis-spacer {
  min-height: 56px;
}

.forecast-matrix-axis-scale {
  position: relative;
  height: var(--matrix-stage-height, 188px);
}

.forecast-matrix-axis-label {
  position: absolute;
  left: 0;
  right: 0;
  color: rgba(17, 17, 17, 0.34);
  font-family: var(--font-mono);
  font-size: 0.54rem;
  font-weight: 500;
  line-height: 1;
  transform: translateY(50%);
}

.forecast-matrix-axis.is-right .forecast-matrix-axis-label {
  text-align: right;
}

.forecast-matrix-axis-unit {
  color: rgba(17, 17, 17, 0.32);
  font-family: var(--font-mono);
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.forecast-matrix-axis.is-right .forecast-matrix-axis-unit {
  text-align: right;
}

.forecast-matrix-days {
  display: grid;
  align-items: start;
}

.forecast-matrix-day {
  position: relative;
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  scroll-snap-align: start;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.34), transparent 26%);
}

.forecast-matrix-day::after {
  content: "";
  position: absolute;
  top: 10px;
  bottom: 8px;
  left: 0;
  width: 1px;
  background: linear-gradient(
    180deg,
    transparent 0,
    rgba(17, 17, 17, 0.1) 18%,
    rgba(17, 17, 17, 0.07) 82%,
    transparent 100%
  );
}

.forecast-matrix-day:first-child::after {
  display: none;
}

.forecast-matrix-day::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 1px;
  border-radius: 999px;
  background: transparent;
}

.forecast-matrix-day.is-active {
  background:
    linear-gradient(180deg, rgba(17, 17, 17, 0.045), rgba(17, 17, 17, 0.012) 24%, transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.28), transparent 24%);
  box-shadow: inset 0 0 0 1px rgba(17, 17, 17, 0.03);
}

.forecast-matrix-day.is-active::before {
  background: var(--matrix-accent);
  opacity: 0.28;
}

.forecast-matrix-day-head {
  position: relative;
  display: grid;
  gap: 3px;
  min-height: 60px;
  padding: 10px 12px 8px;
  border: 0;
  background: rgba(255, 255, 255, 0.72);
  text-align: left;
  box-shadow: inset 0 1px 0 transparent;
  cursor: pointer;
  transition:
    background-color 0.16s ease,
    box-shadow 0.16s ease,
    opacity 0.16s ease;
}

.forecast-matrix-day-head::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 0;
  height: 1px;
  background: rgba(17, 17, 17, 0.07);
}

.forecast-matrix-day-head:hover {
  background: rgba(255, 255, 255, 0.88);
}

.forecast-matrix-day.is-active .forecast-matrix-day-head {
  background: rgba(255, 255, 255, 0.94);
  box-shadow: inset 0 1px 0 rgba(17, 17, 17, 0.03);
}

.forecast-matrix-day.is-active .forecast-matrix-day-head::after {
  background: rgba(17, 17, 17, 0.1);
}

.forecast-matrix-day-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.forecast-matrix-day-kicker {
  color: var(--matrix-accent);
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 800;
  line-height: 1;
}

.forecast-matrix-day-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 0 8px;
  border-radius: var(--radius-pill);
  background: var(--matrix-chip, var(--matrix-accent));
  color: var(--matrix-chip-text, #fff);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.forecast-matrix-day-date {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.forecast-matrix-day-meta {
  color: var(--soft);
  font-size: 0.72rem;
  font-weight: 700;
}

.forecast-matrix-slot-grid {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 10px;
  padding: 14px 10px 10px;
}

.forecast-matrix-slot {
  display: grid;
  grid-template-rows: auto var(--matrix-stage-height, 188px) auto auto;
  gap: 8px;
  border: 0;
  background: transparent;
  padding: 0;
  min-width: 0;
  text-align: center;
  cursor: pointer;
  transition:
    transform 0.14s ease,
    opacity 0.14s ease,
    filter 0.14s ease;
}

.forecast-matrix-slot:hover {
  transform: translateY(-0.5px);
  filter: saturate(1.02);
}

.forecast-matrix-slot-topline {
  display: grid;
  justify-items: start;
  align-content: start;
  gap: 3px;
  min-height: 28px;
  min-width: 0;
}

.forecast-matrix-slot-range {
  color: var(--soft);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.forecast-matrix-slot-stage {
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: flex-end;
  height: var(--matrix-stage-height, 188px);
  border-radius: 18px 18px 12px 12px;
  border: 1px solid rgba(17, 17, 17, 0.06);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 246, 248, 0.9)),
    repeating-linear-gradient(
      to top,
      transparent 0 calc(var(--matrix-grid-step, 25%) - 1px),
      rgba(17, 17, 17, 0.034) calc(var(--matrix-grid-step, 25%) - 1px) var(--matrix-grid-step, 25%)
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 10px 22px rgba(17, 17, 17, 0.03);
  overflow: hidden;
}

.forecast-matrix-day-head:focus-visible {
  outline: none;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.32),
    0 0 0 3px rgba(20, 23, 28, 0.06);
}

.forecast-matrix-slot:focus-visible {
  outline: none;
}

.forecast-matrix-slot:focus-visible .forecast-matrix-slot-stage {
  box-shadow:
    inset 0 0 0 1px var(--matrix-accent),
    0 0 0 3px rgba(20, 23, 28, 0.06);
}

.forecast-matrix-slot.is-best .forecast-matrix-slot-stage {
  border-color: var(--slot-score);
  box-shadow:
    inset 0 0 0 1px var(--slot-score),
    0 10px 20px rgba(20, 23, 28, 0.06);
}

.forecast-matrix-slot.is-inspecting .forecast-matrix-slot-stage {
  border-color: var(--matrix-accent);
  box-shadow:
    inset 0 0 0 1px var(--matrix-accent),
    0 12px 24px rgba(20, 23, 28, 0.08);
}

.forecast-matrix-slot.is-inspecting .forecast-matrix-slot-range,
.forecast-matrix-slot.is-inspecting .forecast-matrix-slot-wave {
  color: var(--matrix-accent);
}

.forecast-matrix-slot-bar {
  position: relative;
  width: 100%;
  border-radius: 14px 14px 0 0;
  background-color: var(--slot-period);
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.26), transparent 42%),
    linear-gradient(0deg, rgba(255, 255, 255, 0.1), transparent 22%);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 0 3px 5px;
}

.forecast-matrix-slot-period {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(21, 24, 28, 0.72);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  line-height: 1;
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.18);
}

.forecast-matrix-slot.is-best .forecast-matrix-slot-range {
  color: var(--matrix-accent);
}

.forecast-matrix-slot-wave {
  color: var(--accent-deep);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1;
}

.forecast-matrix-slot.is-best .forecast-matrix-slot-wave {
  color: var(--slot-score);
}

.forecast-matrix-slot-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 16px;
  padding: 0 5px;
  border-radius: 999px;
  background: rgba(17, 17, 17, 0.05);
  color: rgba(17, 17, 17, 0.52);
  font-family: var(--font-mono);
  font-size: 0.46rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  width: fit-content;
}

.forecast-matrix-slot-wave small {
  font-size: 0.64rem;
  font-weight: 700;
  margin-left: 2px;
}

.forecast-matrix-slot-support {
  display: grid;
  gap: 5px;
}

.forecast-matrix-slot-state,
.forecast-matrix-slot-energy {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  min-height: 28px;
  padding: 0 8px;
  border-radius: 11px;
  border: 1px solid rgba(17, 17, 17, 0.06);
  background: rgba(255, 255, 255, 0.9);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  width: 100%;
  min-width: 0;
}

.forecast-matrix-slot-state {
  white-space: nowrap;
  padding-inline: 7px;
}

.forecast-matrix-slot.is-best .forecast-matrix-slot-state {
  border-color: rgba(20, 23, 28, 0.16);
}

.forecast-matrix-slot-dir {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
}

.forecast-matrix-slot-dir-label {
  letter-spacing: 0.04em;
}

.forecast-matrix-slot-wind {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 26px;
  min-height: 19px;
  padding: 0 6px;
  border-radius: 999px;
  border: 1px solid currentColor;
  background: rgba(255, 255, 255, 0.96);
  font-size: 0.56rem;
  font-weight: 800;
  line-height: 1;
  flex: 0 0 auto;
}

.forecast-matrix-slot-energy::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: var(--slot-energy-ratio, 0%);
  border-radius: inherit;
  background: var(--slot-energy);
  opacity: 0.24;
}

.forecast-matrix-slot-energy {
  justify-content: center;
  padding-inline: 9px;
  font-size: 0.6rem;
  letter-spacing: 0.03em;
}

.forecast-matrix-slot-energy span {
  position: relative;
  z-index: 1;
  white-space: nowrap;
}

.forecast-matrix-slot-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--slot-wind);
  font-size: 0.92rem;
  line-height: 1;
  transform-origin: center;
}

.forecast-slot-tooltip {
  position: fixed;
  top: 0;
  left: 0;
  width: min(318px, calc(100vw - 24px));
  padding: 12px;
  border-radius: 16px;
  border: 1px solid rgba(226, 234, 238, 0.72);
  background:
    linear-gradient(180deg, rgba(244, 248, 250, 0.76), rgba(234, 240, 243, 0.72));
  box-shadow: 0 20px 44px rgba(16, 24, 32, 0.2);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  pointer-events: auto;
  opacity: 0;
  transform: translate3d(0, 6px, 0) scale(0.99);
  transition:
    opacity 0.16s ease,
    transform 0.16s ease,
    box-shadow 0.16s ease;
  z-index: 60;
}

.forecast-slot-tooltip.is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
}

.forecast-slot-tooltip.is-pinned {
  box-shadow: 0 24px 52px rgba(16, 24, 32, 0.26);
}

.forecast-slot-tooltip-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.forecast-slot-tooltip-head-copy {
  min-width: 0;
}

.forecast-slot-tooltip-kicker {
  margin: 0;
  color: rgba(88, 108, 119, 0.84);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.forecast-slot-tooltip-range {
  display: block;
  margin-top: 4px;
  color: #21343d;
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.05;
}

.forecast-slot-tooltip-reading {
  margin: 5px 0 0;
  color: rgba(86, 108, 120, 0.78);
  font-family: var(--font-mono);
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.forecast-slot-tooltip-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  background: var(--tooltip-score, var(--accent-deep));
  color: var(--tooltip-score-text, #fff);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 900;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.42);
  flex: 0 0 auto;
}

.forecast-slot-tooltip-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
  margin-bottom: 8px;
}

.forecast-slot-tooltip-stat {
  display: grid;
  gap: 2px;
  padding: 8px 8px 7px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.48);
  border: 1px solid rgba(205, 219, 226, 0.62);
}

.forecast-slot-tooltip-stat-label,
.forecast-slot-tooltip-row-label {
  color: rgba(95, 115, 126, 0.84);
  font-family: var(--font-mono);
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.forecast-slot-tooltip-stat-value {
  color: #21343d;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.08;
}

.forecast-slot-tooltip-rows {
  display: grid;
  gap: 0;
  padding-top: 2px;
  border-top: 1px solid rgba(194, 210, 218, 0.64);
}

.forecast-slot-tooltip-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 2px 10px;
  align-items: baseline;
  padding: 6px 1px;
}

.forecast-slot-tooltip-row + .forecast-slot-tooltip-row {
  border-top: 1px solid rgba(194, 210, 218, 0.56);
}

.forecast-slot-tooltip-row-value {
  color: #21343d;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.05;
}

.forecast-slot-tooltip-row-meta {
  grid-column: 2;
  color: rgba(84, 106, 118, 0.86);
  font-size: 0.63rem;
  line-height: 1.2;
}

@media (max-width: 700px) {
  .forecast-slot-tooltip {
    width: min(272px, calc(100vw - 20px));
    padding: 10px;
  }

  .forecast-slot-tooltip-stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 5px;
  }

  .forecast-slot-tooltip-stat {
    padding: 7px 7px 6px;
  }

  .forecast-slot-tooltip-range {
    font-size: 0.88rem;
  }

  .forecast-slot-tooltip-row {
    gap: 2px 8px;
  }
}

.forecast-matrix-shell.is-overview .forecast-matrix-slot {
  gap: 5px;
}

.forecast-matrix-shell.is-overview .forecast-matrix-slot:hover {
  transform: none;
  filter: none;
}

.forecast-matrix-shell.is-overview .forecast-matrix-slot-stage {
  border-radius: 20px 20px 12px 12px;
  border-color: rgba(17, 17, 17, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(247, 247, 249, 0.92)),
    repeating-linear-gradient(
      to top,
      transparent 0 calc(var(--matrix-grid-step, 25%) - 1px),
      rgba(17, 17, 17, 0.04) calc(var(--matrix-grid-step, 25%) - 1px) var(--matrix-grid-step, 25%)
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.88),
    0 8px 18px rgba(17, 17, 17, 0.025);
}

.forecast-matrix-shell.is-overview .forecast-matrix-slot-stage-wash {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.18), transparent 42%),
    linear-gradient(180deg, var(--slot-score), transparent 86%);
  opacity: 0.08;
  z-index: 0;
  pointer-events: none;
}

.forecast-matrix-shell.is-overview .forecast-matrix-slot-stage-rail {
  position: absolute;
  top: 10px;
  bottom: 10px;
  left: 50%;
  width: 1px;
  transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, var(--slot-score) 18%, var(--slot-score) 82%, transparent);
  opacity: 0.38;
  z-index: 2;
  pointer-events: none;
}

.forecast-matrix-shell.is-overview .forecast-matrix-slot-bar {
  z-index: 1;
  border-radius: 16px 16px 0 0;
  padding: 0 6px 7px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
}

.forecast-matrix-shell.is-overview .forecast-matrix-slot-period {
  color: rgba(21, 24, 28, 0.62);
  font-size: 0.54rem;
  letter-spacing: 0.05em;
}

.forecast-matrix-shell.is-overview .forecast-matrix-slot-period {
  min-width: 0;
}

.forecast-matrix-shell.is-overview .forecast-matrix-slot-state,
.forecast-matrix-shell.is-overview .forecast-matrix-slot-energy {
  min-height: 26px;
  border-color: rgba(17, 17, 17, 0.06);
  background: rgba(255, 255, 255, 0.92);
}

.forecast-matrix-shell.is-overview .forecast-matrix-slot-state {
  padding-inline: 6px;
}

.forecast-matrix-shell.is-overview .forecast-matrix-slot-energy::before {
  opacity: 0.16;
}

.forecast-matrix-shell.is-overview .forecast-matrix-slot.is-best .forecast-matrix-slot-stage {
  border-color: rgba(20, 23, 28, 0.08);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.5),
    inset 0 0 0 1px rgba(20, 23, 28, 0.03);
}

.forecast-matrix-shell.is-overview .forecast-matrix-slot.is-primary-best .forecast-matrix-slot-stage {
  border-color: rgba(20, 23, 28, 0.12);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.52),
    inset 0 0 0 1px rgba(20, 23, 28, 0.04);
}

.forecast-matrix-shell.is-overview .forecast-matrix-slot.is-best .forecast-matrix-slot-range,
.forecast-matrix-shell.is-overview .forecast-matrix-slot.is-best .forecast-matrix-slot-wave {
  color: var(--accent-deep);
}

.forecast-matrix-shell.is-overview .forecast-matrix-slot.is-primary-best .forecast-matrix-slot-range,
.forecast-matrix-shell.is-overview .forecast-matrix-slot.is-primary-best .forecast-matrix-slot-wave {
  color: var(--matrix-accent);
}

.forecast-matrix-shell.is-overview .forecast-matrix-slot.is-primary-best .forecast-matrix-slot-mark {
  background: color-mix(in srgb, var(--slot-score) 10%, white);
  color: color-mix(in srgb, var(--slot-score) 72%, #0c2f50);
}

.forecast-matrix-shell.is-wind .forecast-matrix-slot-period {
  font-size: 0.54rem;
}

.forecast-matrix-shell.is-wind .forecast-matrix-slot-wave {
  font-size: 0.88rem;
}

.forecast-matrix-shell.is-energy .forecast-matrix-slot-wave {
  font-size: 0.84rem;
}

.forecast-period-scale {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 8px;
}

.forecast-period-scale-label {
  color: rgba(20, 23, 28, 0.48);
  font-family: var(--font-mono);
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.forecast-period-scale-track {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 3px;
}

.forecast-period-scale-stop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 18px;
  border-radius: 8px;
  background: var(--period-stop);
  color: var(--period-stop-text, rgba(9, 23, 24, 0.92));
  font-family: var(--font-mono);
  font-size: 0.54rem;
  font-weight: 800;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.forecast-state-scale {
  display: grid;
  gap: 8px;
}

.forecast-state-scale-track {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.forecast-state-scale-stop {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 0.68rem;
  font-weight: 800;
}

.forecast-state-scale-stop.is-clean {
  background: rgba(20, 23, 28, 0.16);
  color: var(--accent-deep);
}

.forecast-state-scale-stop.is-cross {
  background: rgba(121, 167, 161, 0.16);
  color: var(--accent-deep);
}

.forecast-state-scale-stop.is-alert {
  background: rgba(179, 106, 98, 0.16);
  color: var(--clay);
}

.forecast-plot-shell {
  display: grid;
  gap: 10px;
  min-width: 0;
  width: 100%;
}

.forecast-plot-metrics {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}

.forecast-plot-metric {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border-radius: 18px;
  background: rgba(247, 255, 254, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.1);
}

.forecast-plot-metric-kicker {
  color: rgba(216, 235, 232, 0.68);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.forecast-plot-metric-value {
  color: rgba(248, 255, 254, 0.98);
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.05;
}

.forecast-plot-metric-meta {
  color: rgba(216, 235, 232, 0.78);
  font-size: 0.74rem;
  line-height: 1.4;
}

.forecast-plot-shell.is-light .forecast-plot-metric {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(244, 250, 250, 0.98)),
    radial-gradient(circle at top, rgba(228, 230, 233, 0.28), transparent 62%);
  border-color: rgba(20, 23, 28, 0.08);
}

.forecast-plot-shell.is-light .forecast-plot-metric-kicker {
  color: var(--soft);
}

.forecast-plot-shell.is-light .forecast-plot-metric-value {
  color: var(--accent-deep);
}

.forecast-plot-shell.is-light .forecast-plot-metric-meta {
  color: var(--muted);
}

.forecast-plot-shell .chart-legend-inline {
  gap: 12px;
  margin-bottom: 0;
}

.forecast-plot-shell .legend-pill {
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
  border-radius: 0;
  font-size: 0.68rem;
  color: rgba(236, 247, 245, 0.88);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.forecast-plot-shell.is-light .legend-pill {
  color: var(--muted);
}

.forecast-plot-shell .legend-swatch {
  opacity: 0.9;
}

.forecast-plot-frame {
  min-width: 0;
  padding: 8px 0 0;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.02);
  overflow-x: auto;
  overflow-y: hidden;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.forecast-plot-frame.is-light {
  border-color: rgba(20, 23, 28, 0.08);
  background: rgba(255, 255, 255, 0.92);
}

.forecast-plot-svg {
  width: 100%;
  min-width: 780px;
  height: auto;
  display: block;
  overflow: visible;
}

.forecast-plot-grid-line,
.forecast-plot-day-separator,
.forecast-plot-energy-stem {
  vector-effect: non-scaling-stroke;
}

.forecast-plot-grid-line {
  stroke: rgba(255, 255, 255, 0.08);
  stroke-width: 1;
}

.forecast-plot-day-band {
  fill: rgba(255, 255, 255, 0.02);
}

.forecast-plot-day-band.is-active {
  fill: rgba(247, 255, 254, 0.08);
}

.forecast-plot-day-separator {
  stroke: rgba(255, 255, 255, 0.09);
  stroke-width: 1;
}

.forecast-plot-frame.is-light .forecast-plot-grid-line {
  stroke: rgba(20, 23, 28, 0.08);
}

.forecast-plot-frame.is-light .forecast-plot-day-band {
  fill: rgba(20, 23, 28, 0.018);
}

.forecast-plot-frame.is-light .forecast-plot-day-band.is-active {
  fill: rgba(20, 23, 28, 0.05);
}

.forecast-plot-frame.is-light .forecast-plot-day-separator {
  stroke: rgba(20, 23, 28, 0.08);
}

.forecast-plot-area {
  fill: url(#forecastPlotWaveFill);
}

.forecast-plot-line {
  fill: none;
  stroke: rgba(248, 255, 254, 0.98);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.forecast-plot-line.is-secondary {
  stroke: rgba(214, 233, 230, 0.76);
  stroke-width: 2;
  stroke-dasharray: 4 6;
}

.forecast-plot-line.is-light {
  stroke: var(--accent-deep);
  stroke-width: 2.3;
}

.forecast-plot-line.is-light.is-swell {
  stroke: var(--accent-mid);
}

.forecast-plot-line.is-secondary.is-light {
  stroke: rgba(20, 23, 28, 0.58);
  stroke-width: 1.8;
  stroke-dasharray: 3 6;
}

.forecast-plot-score-segment {
  stroke: rgba(255, 255, 255, 0.06);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.forecast-plot-score-segment.is-best {
  stroke: rgba(248, 255, 254, 0.36);
}

.forecast-plot-frame.is-light .forecast-plot-score-segment {
  stroke: rgba(20, 23, 28, 0.06);
}

.forecast-plot-frame.is-light .forecast-plot-score-segment.is-best {
  stroke: rgba(20, 23, 28, 0.18);
}

.forecast-plot-direction-segment {
  stroke: rgba(255, 255, 255, 0.12);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.forecast-plot-direction-segment.is-best {
  stroke: rgba(20, 23, 28, 0.22);
}

.forecast-plot-energy-stem {
  stroke: rgba(214, 233, 230, 0.18);
  stroke-width: 1.4;
}

.forecast-plot-score-stem {
  stroke: rgba(20, 23, 28, 0.1);
  stroke-width: 1.2;
  vector-effect: non-scaling-stroke;
}

.forecast-plot-energy-dot {
  fill: var(--clay-soft);
  stroke: rgba(248, 255, 254, 0.92);
  stroke-width: 1.8;
  vector-effect: non-scaling-stroke;
}

.forecast-plot-energy-dot.is-best {
  fill: #f0b4ad;
}

.forecast-plot-energy-dot.is-light {
  stroke: rgba(255, 255, 255, 0.94);
}

.forecast-plot-score-dot {
  stroke: rgba(255, 255, 255, 0.94);
  stroke-width: 1.8;
  vector-effect: non-scaling-stroke;
}

.forecast-plot-score-dot.is-best {
  stroke: rgba(20, 23, 28, 0.18);
}

.forecast-plot-focus-ring,
.forecast-plot-focus-core {
  vector-effect: non-scaling-stroke;
}

.forecast-plot-focus-ring {
  fill: none;
  stroke: rgba(248, 255, 254, 0.94);
  stroke-width: 2.2;
}

.forecast-plot-focus-core {
  fill: rgba(248, 255, 254, 0.98);
}

.forecast-plot-focus-ring.is-light {
  stroke: rgba(20, 23, 28, 0.34);
}

.forecast-plot-focus-core.is-light {
  fill: var(--surface);
  stroke: rgba(20, 23, 28, 0.18);
  stroke-width: 1;
}

.forecast-plot-axis-label,
.forecast-plot-lane-label,
.forecast-plot-day-label,
.forecast-plot-annotation text {
  font-family: var(--font-mono);
}

.forecast-plot-axis-label {
  fill: rgba(214, 233, 230, 0.64);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.forecast-plot-lane-label {
  fill: rgba(236, 247, 245, 0.92);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.forecast-plot-lane-label.is-score {
  fill: rgba(216, 235, 232, 0.78);
}

.forecast-plot-day-label {
  fill: rgba(214, 233, 230, 0.66);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.forecast-plot-day-label.is-active {
  fill: rgba(248, 255, 254, 0.98);
}

.forecast-plot-frame.is-light .forecast-plot-axis-label {
  fill: rgba(95, 108, 107, 0.72);
}

.forecast-plot-frame.is-light .forecast-plot-lane-label {
  fill: rgba(20, 23, 28, 0.9);
}

.forecast-plot-frame.is-light .forecast-plot-lane-label.is-score,
.forecast-plot-frame.is-light .forecast-plot-lane-label.is-direction {
  fill: rgba(95, 108, 107, 0.82);
}

.forecast-plot-frame.is-light .forecast-plot-day-label {
  fill: rgba(95, 108, 107, 0.62);
}

.forecast-plot-frame.is-light .forecast-plot-day-label.is-active {
  fill: rgba(20, 23, 28, 0.96);
}

.forecast-plot-annotation rect {
  fill: rgba(255, 255, 255, 0.94);
  stroke: rgba(20, 23, 28, 0.08);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.forecast-plot-annotation text {
  fill: rgba(20, 23, 28, 0.92);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.forecast-plot-annotation.is-light rect {
  fill: rgba(255, 255, 255, 0.96);
  stroke: rgba(20, 23, 28, 0.1);
}

.forecast-plot-annotation.is-light text {
  fill: rgba(20, 23, 28, 0.94);
}

.timeline-board-shell {
  display: grid;
  gap: 14px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.timeline-board {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  min-width: 0;
}

.timeline-day {
  display: grid;
  gap: 14px;
  min-width: 0;
  padding: 14px;
  border-radius: 24px;
  border: 1px solid rgba(20, 23, 28, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(244, 250, 250, 0.98)),
    radial-gradient(circle at top, rgba(228, 230, 233, 0.36), transparent 64%);
  box-shadow: var(--shadow-soft);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.timeline-day:hover {
  transform: translateY(-1px);
}

.timeline-day.is-active {
  border-color: rgba(20, 23, 28, 0.16);
  box-shadow:
    0 18px 36px rgba(20, 23, 28, 0.08),
    inset 0 0 0 1px var(--timeline-accent, var(--accent));
}

.timeline-day.is-ocean {
  background:
    linear-gradient(180deg, rgba(247, 255, 254, 0.16), rgba(217, 244, 241, 0.08)),
    radial-gradient(circle at top, rgba(255, 255, 255, 0.18), transparent 62%);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

.timeline-day.is-ocean.is-active {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow:
    0 16px 32px rgba(8, 44, 47, 0.18),
    inset 0 0 0 1px var(--timeline-accent, rgba(255, 255, 255, 0.72));
}

.timeline-day-head,
.timeline-slot {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  color: inherit;
  font: inherit;
}

.timeline-day-head {
  display: grid;
  gap: 4px;
  min-width: 0;
  text-align: left;
  cursor: pointer;
}

.timeline-day-kicker,
.timeline-day-date {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.timeline-day-kicker {
  color: var(--accent-deep);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 700;
  line-height: 1.2;
}

.timeline-day-date {
  color: var(--soft);
  font-size: 0.64rem;
  font-weight: 700;
  line-height: 1.2;
}

.timeline-day.is-ocean .timeline-day-kicker {
  color: rgba(238, 248, 246, 0.96);
}

.timeline-day.is-ocean .timeline-day-date {
  color: rgba(214, 233, 230, 0.76);
}

.timeline-day-summary {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 30px;
  padding: 0 12px;
  border-radius: var(--radius-pill);
  background: rgba(228, 230, 233, 0.56);
  color: var(--accent-deep);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  overflow-wrap: anywhere;
}

.timeline-day.is-ocean .timeline-day-summary {
  background: rgba(247, 255, 254, 0.16);
  color: rgba(246, 255, 254, 0.98);
}

.timeline-day-bars {
  display: grid;
  grid-template-columns: repeat(var(--timeline-slot-count, 4), minmax(0, 1fr));
  gap: 8px;
  align-items: end;
  min-height: 226px;
  min-width: 0;
}

.timeline-slot {
  display: grid;
  grid-template-rows: auto auto 1fr auto;
  gap: 7px;
  min-width: 0;
  text-align: center;
  cursor: pointer;
  transition: transform 0.18s ease;
}

.timeline-slot:hover {
  transform: translateY(-1px);
}

.timeline-slot-value,
.timeline-slot-meta,
.timeline-slot-foot {
  min-width: 0;
  overflow-wrap: anywhere;
}

.timeline-slot-value {
  color: var(--accent-deep);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.timeline-slot-meta {
  color: var(--soft);
  font-size: 0.58rem;
  font-weight: 700;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.timeline-day.is-ocean .timeline-slot-value {
  color: #f8fffe;
}

.timeline-day.is-ocean .timeline-slot-meta {
  color: rgba(216, 235, 232, 0.78);
}

.timeline-slot-track {
  position: relative;
  display: block;
  width: 100%;
  min-height: 138px;
  border-radius: 16px;
  border: 1px solid rgba(20, 23, 28, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(220, 235, 234, 0.34)),
    repeating-linear-gradient(
      to top,
      transparent 0,
      transparent calc(25% - 1px),
      rgba(20, 23, 28, 0.06) calc(25% - 1px),
      rgba(20, 23, 28, 0.06) 25%
    );
  overflow: hidden;
}

.timeline-day.is-ocean .timeline-slot-track {
  border-color: rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.1), rgba(214, 239, 235, 0.08)),
    repeating-linear-gradient(
      to top,
      transparent 0,
      transparent calc(25% - 1px),
      rgba(255, 255, 255, 0.08) calc(25% - 1px),
      rgba(255, 255, 255, 0.08) 25%
    );
}

.timeline-slot.is-best .timeline-slot-track {
  border-color: var(--timeline-accent, rgba(20, 23, 28, 0.18));
  box-shadow:
    inset 0 0 0 1px rgba(20, 23, 28, 0.24),
    0 12px 24px rgba(20, 23, 28, 0.12);
}

.timeline-day.is-ocean .timeline-slot.is-best .timeline-slot-track {
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow:
    inset 0 0 0 1px rgba(248, 255, 254, 0.22),
    0 14px 28px rgba(9, 43, 46, 0.18);
}

.timeline-slot-fill {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 58%;
  min-height: 8%;
  transform: translateX(-50%);
  border-radius: 14px 14px 10px 10px;
  box-shadow: 0 10px 22px rgba(20, 23, 28, 0.12);
}

.timeline-slot-fill.is-wave {
  background: linear-gradient(180deg, #5fb4ea 0%, #0c2f50 100%);
}

.timeline-slot-fill.is-wind {
  background: linear-gradient(180deg, #c6e1de 0%, #4b8e88 100%);
}

.timeline-slot-fill.is-swell {
  background: linear-gradient(180deg, #a6cfcb 0%, #4b8e88 100%);
}

.timeline-slot-fill.is-energy {
  background: linear-gradient(180deg, #d9a39b 0%, #b36a62 100%);
}

.timeline-slot-marker {
  position: absolute;
  left: 50%;
  transform: translate(-50%, 50%);
  pointer-events: none;
}

.timeline-slot-marker.is-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 6px 12px rgba(20, 23, 28, 0.12);
}

.timeline-slot-marker.is-line {
  width: 64%;
  height: 2px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(20, 23, 28, 0.08);
}

.timeline-slot-marker.is-energy {
  background: var(--clay);
}

.timeline-slot-marker.is-period {
  background: #d6e4e5;
}

.timeline-slot-marker.is-score {
  background: #b36a62;
}

.timeline-slot-foot {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  line-height: 1.3;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.timeline-slot.is-best .timeline-slot-foot {
  color: var(--timeline-accent, var(--accent-deep));
}

.timeline-day.is-ocean .timeline-slot-foot {
  color: rgba(216, 235, 232, 0.78);
}

.timeline-day.is-ocean .timeline-slot.is-best .timeline-slot-foot {
  color: rgba(248, 255, 254, 0.98);
}

.forecast-rail {
  display: grid;
  gap: 10px;
}

.forecast-sync-shell {
  display: grid;
  gap: 12px;
}

.forecast-sync-intro {
  display: grid;
  gap: 8px;
  padding: 2px 2px 0;
}

.forecast-sync-intro h3 {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 800;
}

.forecast-sync-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.42;
  max-width: 54ch;
}

.forecast-sync-board {
  min-width: 0;
  padding: 16px;
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(244, 250, 250, 0.98)),
    radial-gradient(circle at top, rgba(228, 230, 233, 0.28), transparent 62%);
  border: 1px solid rgba(20, 23, 28, 0.08);
}

.forecast-sync-scroll {
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.forecast-sync-matrix {
  display: grid;
  grid-template-columns: 116px repeat(var(--sync-columns, 1), minmax(84px, 1fr));
  gap: 8px;
  align-items: stretch;
}

.forecast-sync-corner,
.forecast-sync-head-cell,
.forecast-sync-lane-label,
.forecast-sync-cell {
  min-width: 0;
}

.forecast-sync-corner {
  display: grid;
  align-content: end;
  gap: 4px;
  padding: 8px 10px;
}

.forecast-sync-corner-kicker,
.forecast-sync-lane-kicker {
  color: var(--soft);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.forecast-sync-corner-meta {
  color: var(--accent-deep);
  font-family: var(--font-display);
  font-size: 0.94rem;
  font-weight: 800;
  line-height: 1.1;
}

.forecast-sync-head-cell {
  display: grid;
  gap: 6px;
  align-content: end;
  padding: 10px 8px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(20, 23, 28, 0.06);
}

.forecast-sync-head-cell.is-best {
  border-color: rgba(20, 23, 28, 0.14);
  box-shadow: inset 0 0 0 1px rgba(20, 23, 28, 0.12);
}

.forecast-sync-head-range {
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.forecast-sync-head-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid var(--sync-score, rgba(20, 23, 28, 0.12));
  color: var(--sync-score, var(--accent-deep));
  font-size: 0.72rem;
  font-weight: 800;
}

.forecast-sync-lane-label {
  display: grid;
  align-content: center;
  gap: 4px;
  padding: 10px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(20, 23, 28, 0.06);
}

.forecast-sync-lane-summary {
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.35;
}

.forecast-sync-cell {
  position: relative;
  overflow: hidden;
  display: grid;
  gap: 5px;
  padding: 10px 8px 9px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(20, 23, 28, 0.08);
}

.forecast-sync-cell::before {
  content: "";
  position: absolute;
  top: 0;
  left: 10px;
  right: 10px;
  height: 2px;
  border-radius: 999px;
  background: var(--sync-score, rgba(20, 23, 28, 0.12));
}

.forecast-sync-cell.is-best {
  border-color: rgba(20, 23, 28, 0.14);
  box-shadow: inset 0 0 0 1px rgba(20, 23, 28, 0.12);
}

.forecast-sync-cell-value {
  color: var(--accent-deep);
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 800;
  line-height: 1.08;
}

.forecast-sync-cell-track {
  position: relative;
  min-height: 80px;
  border-radius: 12px;
  border: 1px solid rgba(20, 23, 28, 0.06);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.5), rgba(223, 237, 236, 0.28)),
    repeating-linear-gradient(
      to top,
      transparent 0,
      transparent calc(25% - 1px),
      rgba(20, 23, 28, 0.04) calc(25% - 1px),
      rgba(20, 23, 28, 0.04) 25%
    );
  overflow: hidden;
}

.forecast-sync-cell-fill {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 54%;
  min-height: 8%;
  height: var(--sync-fill, 8%);
  transform: translateX(-50%);
  border-radius: 12px 12px 9px 9px;
  background: var(--sync-tone, var(--accent));
  box-shadow: 0 6px 14px rgba(20, 23, 28, 0.08);
}

.forecast-sync-cell-meta {
  color: var(--soft);
  font-family: var(--font-mono);
  font-size: 0.54rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.25;
}

.forecast-rail-card,
.tide-card-item {
  padding: 11px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid rgba(20, 23, 28, 0.06);
  scroll-snap-align: start;
}

.forecast-rail-card.is-active {
  border-color: rgba(20, 23, 28, 0.16);
}

.forecast-rail-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: 1fr;
  margin-top: 10px;
}

.forecast-rail-grid.is-support {
  grid-template-columns: 1fr;
}

.forecast-rail-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 36px;
  border-radius: 14px;
  border: 1px solid currentColor;
  font-weight: 800;
}

.forecast-digest-card {
  gap: 12px;
}

.forecast-digest-legend {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.forecast-digest-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 8px;
  border-radius: var(--radius-pill);
  border: 1px solid rgba(20, 23, 28, 0.06);
  background: rgba(240, 247, 246, 0.92);
  color: var(--accent-deep);
  font-size: 0.58rem;
  font-weight: 700;
}

.forecast-digest-pill.is-energy {
  background: rgba(179, 106, 98, 0.14);
  color: var(--clay);
}

.forecast-digest-pill.is-swell {
  background: rgba(20, 23, 28, 0.12);
  color: var(--accent-deep);
}

.forecast-digest-pill.is-period {
  background: rgba(191, 210, 212, 0.16);
  color: var(--accent-deep);
}

.forecast-view-pane[data-forecast-view-pane="digest"] .forecast-digest-card {
  gap: 10px;
}

.forecast-view-pane[data-forecast-view-pane="digest"] .forecast-digest-legend {
  gap: 4px;
  opacity: 0.72;
}

.forecast-view-pane[data-forecast-view-pane="digest"] .forecast-digest-pill {
  min-height: 18px;
  padding: 0 6px;
  font-size: 0.52rem;
}

.forecast-view-pane[data-forecast-view-pane="digest"] .forecast-digest-hint {
  display: block;
  margin: -3px 0 1px;
  color: rgba(20, 23, 28, 0.42);
  font-family: var(--font-mono);
  font-size: 0.5rem;
  line-height: 1.28;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.forecast-digest-hint {
  margin: -4px 0 0;
  color: var(--soft);
  font-size: 0.82rem;
  line-height: 1.45;
}

.strip-plot-shell {
  display: grid;
  gap: 12px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.strip-plot {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(72px, 1fr);
  gap: 0;
  overflow-x: auto;
  max-width: 100%;
  border-radius: 24px;
  border: 1px solid rgba(20, 23, 28, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(244, 250, 250, 0.98)),
    radial-gradient(circle at top, rgba(228, 230, 233, 0.26), transparent 72%);
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.strip-plot.is-forecast {
  grid-auto-columns: minmax(76px, 1fr);
}

.strip-plot.is-compact {
  grid-auto-columns: minmax(70px, 1fr);
}

.strip-plot.is-ocean {
  border-color: rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(6, 56, 60, 0.94), rgba(10, 74, 79, 0.9)),
    radial-gradient(circle at top, rgba(255, 255, 255, 0.08), transparent 68%);
}

.strip-plot-column {
  display: grid;
  grid-template-rows: auto 1fr auto auto;
  gap: 8px;
  min-height: 230px;
  min-width: 0;
  padding: 10px 8px 9px;
  border-right: 1px solid rgba(20, 23, 28, 0.08);
  scroll-snap-align: start;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.strip-plot-column:last-child {
  border-right: 0;
}

.strip-plot-column.is-active {
  background: rgba(20, 23, 28, 0.05);
  box-shadow:
    inset 0 0 0 1px var(--digest-accent),
    inset 0 -28px 40px rgba(20, 23, 28, 0.04);
}

.strip-plot-column.is-ocean {
  border-right-color: rgba(255, 255, 255, 0.12);
}

.strip-plot-column.is-ocean.is-active {
  background: rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 0 0 1px var(--digest-accent),
    inset 0 -36px 44px rgba(255, 255, 255, 0.08);
}

.strip-plot-top {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.strip-plot-label,
.strip-plot-subtitle {
  display: block;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.strip-plot-label {
  color: var(--accent-deep);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.2;
}

.strip-plot-subtitle {
  color: var(--soft);
  font-size: 0.56rem;
  font-weight: 700;
  line-height: 1.2;
}

.strip-plot-column.is-ocean .strip-plot-label {
  color: rgba(236, 247, 245, 0.96);
}

.strip-plot-column.is-ocean .strip-plot-subtitle {
  color: rgba(214, 233, 230, 0.72);
}

.strip-plot-track {
  position: relative;
  height: 138px;
  border-radius: 14px;
  overflow: hidden;
  background:
    repeating-linear-gradient(
      to top,
      transparent 0,
      transparent calc(20% - 1px),
      rgba(20, 23, 28, 0.08) calc(20% - 1px),
      rgba(20, 23, 28, 0.08) 20%
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.58), rgba(220, 235, 234, 0.34));
}

.strip-plot.is-ocean .strip-plot-track {
  background:
    repeating-linear-gradient(
      to top,
      transparent 0,
      transparent calc(20% - 1px),
      rgba(255, 255, 255, 0.1) calc(20% - 1px),
      rgba(255, 255, 255, 0.1) 20%
    ),
    linear-gradient(180deg, rgba(255, 255, 255, 0.06), rgba(194, 234, 229, 0.08));
}

.strip-plot-fill {
  position: absolute;
  inset-inline: 8%;
  bottom: 0;
  min-height: 8%;
  border-radius: 12px 12px 0 0;
  box-shadow: 0 8px 18px rgba(20, 23, 28, 0.12);
}

.strip-plot-fill.is-wave-mist {
  background: linear-gradient(180deg, #dff0ef 0%, #9fc4bf 100%);
}

.strip-plot-fill.is-wave-soft {
  background: linear-gradient(180deg, #9fd5cf 0%, #5faaa2 100%);
}

.strip-plot-fill.is-wave-mid {
  background: linear-gradient(180deg, #79c9c1 0%, #1a7f80 100%);
}

.strip-plot-fill.is-wave-strong {
  background: linear-gradient(180deg, #3a9fe0 0%, #0c2f50 100%);
}

.strip-plot-fill.is-wind-mist {
  background: linear-gradient(180deg, #dfeeed 0%, #a7cfc9 100%);
}

.strip-plot-fill.is-wind-soft {
  background: linear-gradient(180deg, #c4e4df 0%, #7cb6af 100%);
}

.strip-plot-fill.is-wind-mid {
  background: linear-gradient(180deg, #8fd0c8 0%, #3c8d89 100%);
}

.strip-plot-fill.is-wind-strong,
.strip-plot-fill.is-wind-clean {
  background: linear-gradient(180deg, #4fb0e8 0%, #0c2f50 100%);
}

.strip-plot-fill.is-wind-alert {
  background: linear-gradient(180deg, #ddb0a8 0%, #b36a62 100%);
}

.strip-plot-fill.is-swell-mist {
  background: linear-gradient(180deg, #d8e9e8 0%, #adcfc9 100%);
}

.strip-plot-fill.is-swell-soft {
  background: linear-gradient(180deg, #b8ddd8 0%, #6ea9a4 100%);
}

.strip-plot-fill.is-swell-mid {
  background: linear-gradient(180deg, #91c9c3 0%, #357f7d 100%);
}

.strip-plot-fill.is-swell-strong {
  background: linear-gradient(180deg, #43a6e2 0%, #0c2f50 100%);
}

.strip-plot-marker {
  position: absolute;
  left: 50%;
  transform: translate(-50%, 50%);
  pointer-events: none;
}

.strip-plot-marker.is-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.94);
  box-shadow: 0 4px 10px rgba(20, 23, 28, 0.14);
}

.strip-plot-marker.is-line {
  width: 72%;
  height: 2px;
  border-radius: 999px;
}

.strip-plot-marker.is-energy,
.strip-plot-marker.is-score {
  background: var(--clay);
}

.strip-plot-marker.is-period {
  background: #d6e4e5;
}

.strip-plot-meta {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.strip-plot-meta > strong {
  color: var(--accent-deep);
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.strip-plot-meta > span {
  color: var(--soft);
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.strip-plot-column.is-ocean .strip-plot-meta > strong {
  color: rgba(248, 255, 254, 0.98);
}

.strip-plot-column.is-ocean .strip-plot-meta > span {
  color: rgba(216, 235, 232, 0.76);
}

.strip-plot-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 700;
}

.strip-plot-foot > strong,
.strip-plot-foot > span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.strip-plot-score {
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 800;
}

.strip-plot-column.is-ocean .strip-plot-foot {
  color: rgba(216, 235, 232, 0.78);
}

.signal-board-shell {
  display: grid;
  gap: 14px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.signal-board {
  display: grid;
  gap: 10px;
  grid-auto-flow: column;
  grid-auto-columns: minmax(88px, 96px);
  overflow-x: auto;
  max-width: 100%;
  padding: 2px 2px 8px;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.signal-board.is-compact {
  grid-auto-columns: minmax(84px, 90px);
}

.signal-board.is-intraday {
  gap: 8px;
  grid-auto-columns: minmax(78px, 86px);
}

.signal-board.is-ocean {
  grid-auto-columns: minmax(82px, 90px);
}

.signal-board-item {
  display: grid;
  gap: 10px;
  min-height: 226px;
  padding: 10px 8px 9px;
  border-radius: 22px;
  border: 1px solid rgba(20, 23, 28, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(245, 251, 251, 0.98)),
    radial-gradient(circle at top, rgba(212, 232, 231, 0.36), transparent 64%);
  box-shadow: var(--shadow-soft);
  text-align: left;
  scroll-snap-align: start;
  transition:
    background-color 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    opacity 0.16s ease;
}

.signal-board-item:hover {
  border-color: rgba(20, 23, 28, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(246, 251, 251, 0.98)),
    radial-gradient(circle at top, rgba(212, 232, 231, 0.28), transparent 64%);
}

.signal-board-item:focus-visible {
  outline: none;
  border-color: rgba(20, 23, 28, 0.12);
  box-shadow:
    inset 0 0 0 1px rgba(20, 23, 28, 0.04),
    0 0 0 3px rgba(20, 23, 28, 0.06);
}

.signal-board-item.is-active {
  border-color: rgba(20, 23, 28, 0.16);
  box-shadow:
    0 18px 34px rgba(20, 23, 28, 0.08),
    inset 0 0 0 1px var(--digest-accent);
}

.signal-board-item.is-ocean {
  background:
    linear-gradient(180deg, rgba(247, 255, 254, 0.18), rgba(217, 244, 241, 0.08)),
    radial-gradient(circle at top, rgba(255, 255, 255, 0.18), transparent 64%);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

.signal-board-item.is-ocean.is-active {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow:
    0 14px 30px rgba(12, 47, 48, 0.16),
    inset 0 0 0 1px var(--digest-accent);
}

.signal-board.is-intraday .signal-board-item {
  gap: 8px;
  min-height: 204px;
  padding: 10px 7px 8px;
  border-radius: 20px;
}

.signal-board-head {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.signal-board-kicker,
.signal-board-date {
  display: block;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.signal-board-kicker {
  color: var(--accent-deep);
  font-family: var(--font-mono);
  font-size: 0.66rem;
  line-height: 1.2;
}

.signal-board-date {
  color: var(--soft);
  font-size: 0.6rem;
  line-height: 1.2;
}

.signal-board-item.is-ocean .signal-board-kicker {
  color: rgba(235, 247, 244, 0.94);
}

.signal-board-item.is-ocean .signal-board-date {
  color: rgba(213, 234, 231, 0.74);
}

.signal-board-stage {
  display: grid;
  align-items: end;
  min-height: 110px;
}

.signal-board-track {
  position: relative;
  display: block;
  width: 100%;
  height: 108px;
  border-radius: 16px;
  border: 1px solid rgba(20, 23, 28, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.64), rgba(224, 239, 238, 0.34)),
    repeating-linear-gradient(
      to top,
      transparent 0,
      transparent calc(25% - 1px),
      rgba(20, 23, 28, 0.06) calc(25% - 1px),
      rgba(20, 23, 28, 0.06) 25%
    );
  overflow: hidden;
}

.signal-board-item.is-ocean .signal-board-track {
  border-color: rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(214, 239, 235, 0.08)),
    repeating-linear-gradient(
      to top,
      transparent 0,
      transparent calc(25% - 1px),
      rgba(255, 255, 255, 0.08) calc(25% - 1px),
      rgba(255, 255, 255, 0.08) 25%
    );
}

.signal-board.is-intraday .signal-board-track {
  height: 92px;
  border-radius: 13px;
}

.signal-board-fill {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: 54%;
  min-height: 8%;
  transform: translateX(-50%);
  border-radius: 14px 14px 10px 10px;
  box-shadow: 0 10px 22px rgba(20, 23, 28, 0.12);
}

.signal-board-fill.is-wave {
  background: linear-gradient(180deg, #5fb4ea 0%, #0c2f50 100%);
}

.signal-board-fill.is-wind {
  background: linear-gradient(180deg, #c6e1de 0%, #4b8e88 100%);
}

.signal-board-fill.is-swell {
  background: linear-gradient(180deg, #a6cfcb 0%, #4b8e88 100%);
}

.signal-board-marker {
  position: absolute;
  left: 50%;
  transform: translate(-50%, 50%);
  pointer-events: none;
}

.signal-board-marker.is-dot {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  box-shadow: 0 6px 12px rgba(20, 23, 28, 0.12);
}

.signal-board-marker.is-line {
  width: 62%;
  height: 2px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(20, 23, 28, 0.08);
}

.signal-board-marker.is-energy {
  background: var(--clay);
}

.signal-board-marker.is-period {
  background: #d6e4e5;
}

.signal-board-marker.is-score {
  background: #b36a62;
}

.signal-board-meta {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.signal-board-meta > strong {
  color: var(--accent-deep);
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.signal-board-meta > span {
  color: var(--soft);
  font-size: 0.63rem;
  font-weight: 700;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.signal-board-item.is-ocean .signal-board-meta > strong {
  color: #f8fffe;
}

.signal-board-item.is-ocean .signal-board-meta > span {
  color: rgba(217, 236, 232, 0.76);
}

.signal-board-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px;
  min-width: 0;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.64rem;
  font-weight: 700;
}

.signal-board-foot > span,
.signal-board-foot > strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.signal-board-item.is-ocean .signal-board-foot {
  color: rgba(217, 236, 232, 0.8);
}

.signal-board-score {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 800;
}

.metric-board-shell {
  display: grid;
  gap: 14px;
  min-width: 0;
  width: 100%;
  max-width: 100%;
}

.metric-board {
  display: grid;
  gap: 10px;
  grid-auto-flow: column;
  grid-auto-columns: minmax(106px, 1fr);
  overflow-x: auto;
  max-width: 100%;
  padding: 2px 2px 8px;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.metric-board.is-compact {
  grid-auto-columns: minmax(94px, 1fr);
}

.metric-board.is-history {
  grid-auto-columns: minmax(116px, 1fr);
}

.metric-board.is-tide {
  grid-auto-columns: minmax(96px, 1fr);
}

.metric-board.is-ocean {
  grid-auto-columns: minmax(104px, 1fr);
}

.metric-board.is-calendar {
  grid-auto-columns: minmax(96px, 104px);
}

.metric-board.is-calendar-compact {
  grid-auto-columns: minmax(90px, 98px);
}

.metric-board.is-session {
  gap: 0;
  grid-auto-columns: minmax(82px, 90px);
  border-radius: 24px;
  border: 1px solid rgba(20, 23, 28, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(244, 250, 250, 0.98)),
    radial-gradient(circle at top, rgba(228, 230, 233, 0.22), transparent 70%);
}

.metric-board.is-session.is-ocean {
  border-color: rgba(255, 255, 255, 0.12);
  background:
    linear-gradient(180deg, rgba(6, 56, 60, 0.94), rgba(10, 74, 79, 0.9)),
    radial-gradient(circle at top, rgba(255, 255, 255, 0.08), transparent 68%);
}

.metric-board.is-slotline {
  grid-auto-columns: minmax(92px, 100px);
}

.metric-board.is-slotline-compact {
  grid-auto-columns: minmax(86px, 94px);
}

.metric-board.is-digest {
  gap: 8px;
}

.metric-board.is-digest .metric-board-item {
  border-radius: 22px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(244, 250, 250, 0.96)),
    radial-gradient(circle at top, rgba(228, 230, 233, 0.34), transparent 62%);
  box-shadow: none;
}

.metric-board.is-digest .metric-board-item.is-ocean {
  background:
    linear-gradient(180deg, rgba(247, 255, 254, 0.16), rgba(217, 244, 241, 0.08)),
    radial-gradient(circle at top, rgba(255, 255, 255, 0.18), transparent 62%);
}

.metric-board.is-digest .metric-board-item.is-active {
  box-shadow:
    0 14px 28px rgba(20, 23, 28, 0.08),
    inset 0 0 0 1px var(--digest-accent);
}

.metric-board.is-horizon {
  gap: 0;
  grid-auto-columns: minmax(90px, 96px);
  padding: 0 0 6px;
  border-radius: 24px;
  border: 1px solid rgba(17, 17, 17, 0.06);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(247, 247, 249, 0.96)),
    radial-gradient(circle at top, rgba(232, 232, 235, 0.14), transparent 74%);
  overflow: hidden;
  box-shadow: 0 14px 30px rgba(17, 17, 17, 0.03), 0 1px 2px rgba(17, 17, 17, 0.02);
}

.metric-board.is-horizon .metric-board-item {
  position: relative;
  gap: 6px;
  min-height: 164px;
  padding: 9px 7px 8px;
  border: 0;
  border-right: 1px solid rgba(17, 17, 17, 0.06);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.metric-board.is-horizon .metric-board-item::before {
  content: "";
  position: absolute;
  top: 0;
  left: 8px;
  right: 8px;
  height: 1px;
  border-radius: 999px;
  background: var(--digest-accent, rgba(20, 23, 28, 0.3));
  opacity: 0.18;
}

.metric-board.is-horizon .metric-board-item:hover {
  transform: none;
}

.metric-board.is-horizon .metric-board-item:last-child {
  border-right: 0;
}

.metric-board.is-horizon .metric-board-item.is-active {
  background: rgba(17, 17, 17, 0.025);
  box-shadow:
    inset 0 0 0 1px rgba(17, 17, 17, 0.04),
    inset 0 -16px 22px rgba(17, 17, 17, 0.018);
}

.metric-board.is-horizon .metric-board-item.is-active::before {
  opacity: 0.52;
}

.metric-board.is-horizon .metric-board-item.is-ocean {
  background: transparent;
}

.metric-board.is-horizon .metric-board-head {
  gap: 1px;
}

.metric-board.is-horizon .metric-board-kicker {
  color: var(--accent-deep);
  font-family: var(--font-display);
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.metric-board.is-horizon .metric-board-date {
  color: var(--soft);
  font-family: var(--font-mono);
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-board.is-horizon .metric-board-bars {
  gap: 4px;
  min-height: 96px;
}

.metric-board.is-horizon .metric-board-bar {
  gap: 4px;
}

.metric-board.is-horizon .metric-board-value {
  font-size: 0.54rem;
}

.metric-board.is-horizon .metric-board-track {
  height: 64px;
  border-radius: 10px;
  border-color: rgba(17, 17, 17, 0.06);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.92), rgba(239, 239, 242, 0.34)),
    repeating-linear-gradient(
      to top,
      transparent 0 calc(25% - 1px),
      rgba(17, 17, 17, 0.025) calc(25% - 1px) 25%
    );
}

.metric-board.is-horizon .metric-board-fill {
  border-radius: 7px 7px 6px 6px;
}

.metric-board.is-horizon .metric-board-foot {
  align-items: center;
  gap: 3px;
  font-size: 0.5rem;
  line-height: 1.2;
}

.metric-board.is-horizon .metric-board-score {
  font-size: 0.62rem;
}

.metric-board.is-horizon .metric-board-foot > span {
  color: rgba(17, 17, 17, 0.42);
  letter-spacing: 0.04em;
}

.metric-board.is-horizon .metric-board-item.is-ocean {
  border-right-color: rgba(17, 17, 17, 0.06);
  background: transparent;
  box-shadow: none;
}

.metric-board.is-horizon .metric-board-item.is-ocean.is-active {
  background: rgba(17, 17, 17, 0.025);
  box-shadow:
    inset 0 0 0 1px rgba(17, 17, 17, 0.035),
    inset 0 -16px 22px rgba(17, 17, 17, 0.018);
}

.metric-board.is-horizon .metric-board-item.is-ocean .metric-board-kicker {
  color: var(--accent-deep);
}

.metric-board.is-horizon .metric-board-item.is-ocean .metric-board-date {
  color: var(--soft);
}

.metric-board.is-horizon .metric-board-item.is-ocean .metric-board-value {
  color: var(--accent-deep);
}

.metric-board.is-horizon .metric-board-item.is-ocean .metric-board-track {
  border-color: rgba(17, 17, 17, 0.05);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.88), rgba(239, 239, 242, 0.34)),
    repeating-linear-gradient(
      to top,
      transparent 0 calc(25% - 1px),
      rgba(17, 17, 17, 0.03) calc(25% - 1px) 25%
    );
}

.metric-board.is-horizon .metric-board-item.is-ocean .metric-board-foot {
  color: rgba(17, 17, 17, 0.48);
}

.metric-board.is-intraday {
  gap: 8px;
  grid-auto-columns: minmax(82px, 90px);
}

.metric-board.is-calendar .metric-board-item,
.metric-board.is-slotline .metric-board-item {
  gap: 8px;
  min-height: 218px;
  padding: 10px 8px 9px;
}

.metric-board.is-calendar .metric-board-kicker {
  font-size: 0.68rem;
}

.metric-board.is-calendar .metric-board-date {
  font-size: 0.62rem;
}

.metric-board.is-calendar .metric-board-track,
.metric-board.is-slotline .metric-board-track {
  height: 78px;
  border-radius: 12px;
}

.metric-board.is-calendar .metric-board-bars,
.metric-board.is-slotline .metric-board-bars {
  min-height: 120px;
}

.metric-board.is-calendar .metric-board-value,
.metric-board.is-slotline .metric-board-value {
  font-size: 0.68rem;
}

.metric-board.is-calendar .metric-board-foot,
.metric-board.is-slotline .metric-board-foot {
  gap: 6px;
  font-size: 0.64rem;
}

.metric-board.is-calendar .metric-board-score,
.metric-board.is-slotline .metric-board-score {
  font-size: 0.9rem;
}

.metric-board-item {
  display: grid;
  gap: 10px;
  min-height: 248px;
  padding: 11px 9px 10px;
  border-radius: 24px;
  border: 1px solid rgba(20, 23, 28, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.9), rgba(244, 250, 250, 0.96)),
    radial-gradient(circle at top, rgba(228, 230, 233, 0.42), transparent 62%);
  box-shadow: var(--shadow-soft);
  text-align: left;
  scroll-snap-align: start;
  transition:
    background-color 0.16s ease,
    border-color 0.16s ease,
    box-shadow 0.16s ease,
    opacity 0.16s ease;
}

.metric-board-item:hover {
  border-color: rgba(20, 23, 28, 0.1);
}

.metric-board-item:focus-visible {
  outline: none;
  border-color: rgba(20, 23, 28, 0.12);
  box-shadow:
    inset 0 0 0 1px rgba(20, 23, 28, 0.04),
    0 0 0 3px rgba(20, 23, 28, 0.06);
}

.metric-board-item.is-active {
  border-color: rgba(20, 23, 28, 0.16);
  box-shadow:
    0 18px 36px rgba(20, 23, 28, 0.08),
    inset 0 0 0 1px var(--digest-accent);
}

.metric-board-item.is-ocean {
  background:
    linear-gradient(180deg, rgba(247, 255, 254, 0.16), rgba(217, 244, 241, 0.08)),
    radial-gradient(circle at top, rgba(255, 255, 255, 0.18), transparent 62%);
  border-color: rgba(255, 255, 255, 0.14);
  box-shadow: none;
}

.metric-board-item.is-ocean.is-active {
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow:
    0 14px 30px rgba(12, 47, 48, 0.18),
    inset 0 0 0 1px var(--digest-accent);
}

.metric-board.is-intraday .metric-board-item {
  gap: 8px;
  min-height: 214px;
  padding: 10px 8px 9px;
  border-radius: 20px;
}

.metric-board.is-session .metric-board-item {
  min-height: 228px;
  padding: 10px 8px 9px;
  border: 0;
  border-right: 1px solid rgba(20, 23, 28, 0.08);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.metric-board.is-session .metric-board-item:last-child {
  border-right: 0;
}

.metric-board.is-session .metric-board-item.is-active {
  background: rgba(20, 23, 28, 0.05);
  box-shadow:
    inset 0 0 0 1px var(--digest-accent),
    inset 0 -26px 38px rgba(20, 23, 28, 0.04);
}

.metric-board.is-session .metric-board-item.is-ocean {
  border-right-color: rgba(255, 255, 255, 0.12);
}

.metric-board.is-session .metric-board-item.is-ocean.is-active {
  background: rgba(255, 255, 255, 0.08);
  box-shadow:
    inset 0 0 0 1px var(--digest-accent),
    inset 0 -34px 42px rgba(255, 255, 255, 0.08);
}

.metric-board-head {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.metric-board-kicker,
.metric-board-date {
  display: block;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.metric-board-kicker {
  color: var(--accent-deep);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  line-height: 1.2;
}

.metric-board-date {
  color: var(--soft);
  font-size: 0.66rem;
  line-height: 1.2;
}

.metric-board-item.is-ocean .metric-board-kicker {
  color: rgba(235, 247, 244, 0.94);
}

.metric-board-item.is-ocean .metric-board-date {
  color: rgba(213, 234, 231, 0.74);
}

.metric-board.is-intraday .metric-board-kicker {
  font-size: 0.64rem;
}

.metric-board.is-intraday .metric-board-date {
  font-size: 0.61rem;
}

.metric-board-bars {
  display: grid;
  grid-template-columns: repeat(var(--metric-columns, 3), minmax(0, 1fr));
  gap: 6px;
  align-items: end;
  min-height: 150px;
}

.metric-board.is-intraday .metric-board-bars {
  gap: 5px;
  min-height: 128px;
}

.metric-board-bar {
  display: grid;
  align-content: end;
  justify-items: center;
  gap: 6px;
  min-width: 0;
}

.metric-board-value {
  color: var(--accent-deep);
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.1;
  text-align: center;
}

.metric-board-item.is-ocean .metric-board-value {
  color: #f8fffe;
}

.metric-board.is-intraday .metric-board-value {
  font-size: 0.69rem;
}

.metric-board-track {
  position: relative;
  width: 100%;
  height: 104px;
  border-radius: 15px;
  border: 1px solid rgba(20, 23, 28, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.52), rgba(228, 230, 233, 0.38));
  overflow: hidden;
  display: flex;
  align-items: flex-end;
}

.metric-board-item.is-ocean .metric-board-track {
  border-color: rgba(255, 255, 255, 0.12);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.12), rgba(214, 239, 235, 0.08));
}

.metric-board.is-intraday .metric-board-track {
  height: 82px;
  border-radius: 12px;
}

.metric-board-fill {
  width: 100%;
  min-height: 8%;
  border-radius: 11px 11px 10px 10px;
}

.metric-board-bar.is-energy .metric-board-fill {
  background: linear-gradient(180deg, #d9a39b 0%, #b36a62 100%);
}

.metric-board-bar.is-swell .metric-board-fill {
  background: linear-gradient(180deg, #a6cfcb 0%, #4b8e88 100%);
}

.metric-board-bar.is-period .metric-board-fill {
  background: linear-gradient(180deg, #d6e4e5 0%, #79a7a1 100%);
}

.metric-board-bar.is-wave .metric-board-fill {
  background: linear-gradient(180deg, #5fb4ea 0%, #0c2f50 100%);
}

.metric-board-bar.is-wave-soft .metric-board-fill {
  background: linear-gradient(180deg, #dff0ef 0%, #79a7a1 100%);
}

.metric-board-bar.is-wind .metric-board-fill {
  background: linear-gradient(180deg, #c6e1de 0%, #4b8e88 100%);
}

.metric-board-bar.is-score .metric-board-fill {
  background: linear-gradient(180deg, #d89a91 0%, #b36a62 100%);
}

.metric-board-bar.is-tide-high .metric-board-fill {
  background: linear-gradient(180deg, #d8a099 0%, #b36a62 100%);
}

.metric-board-bar.is-tide-low .metric-board-fill {
  background: linear-gradient(180deg, #d7ecea 0%, #4b8e88 100%);
}

.metric-board-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  min-width: 0;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
}

.metric-board-item.is-ocean .metric-board-foot {
  color: rgba(217, 236, 232, 0.78);
}

.metric-board.is-intraday .metric-board-foot {
  gap: 6px;
  font-size: 0.64rem;
}

.metric-board-score {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 800;
}

.metric-board.is-intraday .metric-board-score {
  font-size: 0.9rem;
}

.metric-board-foot > span,
.metric-board-foot > strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.metric-board.is-intraday .metric-board-foot > span {
  color: var(--soft);
}

.history-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.history-range-controls {
  display: inline-flex;
  gap: 8px;
  flex-wrap: wrap;
}

.range-btn.is-active {
  background: var(--accent-deep);
  color: #fff;
}

.history-summary-grid,
.history-year-grid {
  margin-top: 12px;
}

.history-year-grid {
  display: grid;
  gap: 12px;
  grid-auto-flow: column;
  grid-auto-columns: minmax(232px, 1fr);
  max-height: none;
  overflow-x: auto;
  overflow-y: hidden;
  padding-bottom: 4px;
  scroll-snap-type: x proximity;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
}

.history-year-card {
  min-width: 200px;
  padding: 13px 14px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(20, 23, 28, 0.06);
  scroll-snap-align: start;
}

.history-year-top {
  display: grid;
  gap: 12px;
}

.history-year {
  margin: 6px 0 0;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 800;
}

.history-year-stats {
  margin-top: 0;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.history-year-stat {
  padding: 9px 0 0;
  border-radius: 0;
  background: transparent;
  border-top: 1px solid rgba(20, 23, 28, 0.06);
}

.history-year-stat strong {
  display: block;
  margin-top: 6px;
  font-family: var(--font-display);
}

.history-summary-card {
  padding: 9px 0 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  border-top: 1px solid rgba(20, 23, 28, 0.06);
}

.history-summary-card strong {
  margin-top: 4px;
}

.history-sparkline {
  width: 100%;
  height: 48px;
}

.history-zero-label {
  display: inline-block;
  margin-top: 4px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  background: rgba(20, 23, 28, 0.04);
  color: var(--soft);
  font-family: var(--font-mono);
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.tide-strip {
  display: grid;
  gap: 10px;
  margin-top: 16px;
}

.digest-story-strip {
  scrollbar-width: thin;
}

.tide-main {
  display: block;
  margin-top: 4px;
  font-family: var(--font-display);
  font-size: 1.16rem;
  font-weight: 800;
}

.tide-card-item.is-high {
  border-top-color: rgba(179, 106, 98, 0.34);
}

.tide-card-item.is-low {
  border-top-color: rgba(20, 23, 28, 0.28);
}

.tide-card-label {
  margin: 4px 0 0;
  color: rgba(20, 23, 28, 0.5);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pill {
  width: fit-content;
  background: rgba(228, 230, 233, 0.78);
  color: var(--accent-deep);
  border: 1px solid rgba(20, 23, 28, 0.14);
}

.loading-state,
.empty-state {
  padding: 18px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.78);
  color: var(--muted);
  text-align: center;
}

.spot-list-score {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 34px;
  height: 26px;
  padding: 0 7px;
  border-radius: var(--radius-pill);
  border: 1px solid currentColor;
  font-family: var(--font-mono);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  background: transparent;
}

@media (min-width: 700px) {
  .hero-card {
    padding: 18px 20px;
  }

  .forecast-focus-grid {
    gap: 14px;
  }

  .forecast-focus-facts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 16px;
  }

  .detail-metrics,
  .summary-grid,
  .history-summary-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .history-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .summary-grid.compact-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .forecast-analysis-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .forecast-matrix-glance {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .forecast-rail-grid,
  .forecast-rail-grid.is-support {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-board {
    grid-auto-columns: minmax(114px, 1fr);
  }

  .history-year-grid.digest-story-strip {
    grid-auto-columns: minmax(248px, 1fr);
  }

  .browse-city-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .surf-shell {
    width: min(1460px, calc(100% - 32px));
    padding-top: 24px;
    padding-bottom: 36px;
  }

  .topbar {
    margin-bottom: 22px;
  }

  .workspace-grid {
    grid-template-columns: minmax(292px, 332px) minmax(0, 1fr);
    align-items: start;
  }

  .workspace-grid.is-search-mode {
    grid-template-columns: minmax(360px, 720px);
  }

  .analysis-stage {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .analysis-secondary-grid {
    grid-template-columns: minmax(0, 1.24fr) minmax(300px, 0.76fr);
    align-items: start;
  }

  .analysis-stage .detail-card {
    position: static;
    padding: 0;
  }

  .analysis-stage .detail-content {
    grid-template-columns: minmax(0, 1.08fr) minmax(360px, 0.92fr);
    grid-template-areas:
      "top metrics"
      "summary metrics"
      "context context";
    align-items: start;
    column-gap: 26px;
  }

  .analysis-stage .detail-top {
    grid-area: top;
    align-items: center;
  }

  .analysis-stage .detail-summary {
    grid-area: summary;
    max-width: 34ch;
    font-size: 0.96rem;
    line-height: 1.4;
  }

  .analysis-stage .detail-metrics {
    grid-area: metrics;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    padding-top: 0;
    border-top: 0;
  }

  .analysis-stage .detail-context {
    grid-area: context;
    display: block;
    margin-top: 2px;
    padding-top: 10px;
    border-top: 1px solid rgba(20, 23, 28, 0.08);
  }

  .analysis-stage .score-badge {
    min-width: 76px;
    padding: 10px 10px;
    font-size: 0.94rem;
    border-radius: 16px;
  }

  .analysis-stage .metric-card {
    padding: 0;
  }

  .analysis-stage .metric-card strong {
    margin-top: 4px;
    font-size: 0.9rem;
  }

  .analysis-stage .forecast-card {
    padding: 18px 0 0;
  }

  .forecast-card.is-single-page {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: start;
  }

  .forecast-card.is-single-page > .forecast-panel-head,
  .forecast-card.is-single-page > .forecast-control-shell,
  .forecast-card.is-single-page > .forecast-day-strip,
  .forecast-card.is-single-page > .forecast-view-tabs,
  .forecast-card.is-single-page > .forecast-view-pane[data-forecast-view-pane="overview"],
  .forecast-card.is-single-page > .forecast-view-pane[data-forecast-view-pane="digest"] {
    grid-column: 1 / -1;
  }

  .forecast-control-meta {
    justify-content: space-between;
    align-items: flex-start;
  }

  .forecast-control-copy {
    max-width: 24ch;
  }

  .forecast-tech-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .forecast-tech-card-featured {
    grid-column: 1 / -1;
  }

  .forecast-focus-grid {
    grid-template-columns: minmax(0, 1.72fr) minmax(308px, 0.68fr);
    align-items: stretch;
  }

  .forecast-focus-card {
    position: static;
    top: auto;
    align-self: start;
  }

  .forecast-view-pane[data-forecast-view-pane="overview"] .chart-stage {
    min-height: 332px;
  }

  .forecast-matrix-shell.is-overview {
    --matrix-stage-height: 242px;
  }

  .forecast-matrix-shell.is-compact {
    --matrix-stage-height: 194px;
  }

  .metric-board.is-horizon {
    grid-auto-columns: minmax(96px, 102px);
  }

  .metric-board.is-horizon .metric-board-item {
    min-height: 172px;
  }

  .metric-board.is-horizon .metric-board-track {
    height: 68px;
  }

  .control-rail {
    position: sticky;
    top: 18px;
    grid-template-rows: auto minmax(0, 1fr);
  }

  .analysis-rail {
    padding-right: 0;
  }

  .detail-metrics {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .spot-list {
    max-height: min(60vh, 720px);
  }

  .browse-chip-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .browse-city-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .history-year-grid.digest-story-strip {
    grid-auto-columns: minmax(260px, 1fr);
    max-height: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .forecast-day-pill,
  .forecast-day-pill::before,
  .forecast-view-btn,
  .forecast-matrix-day-head,
  .forecast-matrix-slot,
  .forecast-slot-tooltip,
  .signal-board-item,
  .metric-board-item {
    transition: none !important;
  }

  .forecast-matrix-slot:hover,
  .forecast-matrix-shell.is-overview .forecast-matrix-slot:hover {
    transform: none !important;
    filter: none !important;
  }
}

/* ─────────────────────────────────────────────────────────────
   Layout refinement — 8080 web shell
   ───────────────────────────────────────────────────────────── */

.workspace-grid:not(.is-search-mode) {
  grid-template-columns: minmax(320px, 430px) minmax(0, 1fr);
  align-items: start;
}

.workspace-grid:not(.is-search-mode) .analysis-rail {
  display: grid;
}

.control-rail {
  align-self: start;
}

.browser-panel {
  max-height: calc(100vh - 170px);
}

.spot-list {
  max-height: min(62vh, 760px);
}

.analysis-stage {
  min-height: 420px;
}

.analysis-secondary-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.secondary-section {
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(8px);
  background: color-mix(in srgb, var(--bg-top) 88%, transparent);
  border-bottom: 1px solid var(--border);
  padding-top: 8px;
  padding-bottom: 8px;
}

@media (max-width: 1080px) {
  .workspace-grid:not(.is-search-mode) {
    grid-template-columns: 1fr;
  }

  .browser-panel {
    max-height: none;
  }

  .analysis-secondary-grid {
    grid-template-columns: 1fr;
  }

  .spot-list {
    max-height: 46vh;
  }
}

@media (max-width: 720px) {
  .surf-shell {
    width: min(100%, calc(100% - 16px));
    padding-top: 10px;
  }

  .hero-card,
  .controls-card,
  .list-card,
  .detail-card,
  .forecast-card,
  .spot-map-card,
  .history-card,
  .tide-card {
    padding: 14px;
  }

  .section-head h2 {
    font-size: 1rem;
  }

  .search-input {
    min-height: 42px;
    font-size: 0.84rem;
  }

  .browser-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .browser-flow::before {
    display: none;
  }

  .topbar {
    position: static;
    backdrop-filter: none;
    background: transparent;
    border-bottom: 0;
  }
}

.forecast-panel-head {
  align-items: center;
  gap: 14px;
}

.forecast-panel-copy h3 {
  font-size: 1.08rem;
  letter-spacing: -0.024em;
}

.forecast-card.is-single-page .forecast-view-tabs {
  padding: 4px;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(20, 23, 28, 0.08);
  box-shadow: 0 14px 28px rgba(20, 23, 28, 0.08);
}

.forecast-view-btn.is-active {
  box-shadow: 0 10px 20px rgba(20, 23, 28, 0.1);
}

.chart-card-analytic .chart-stage,
.ocean-stage-card,
.metric-board-shell {
  border-radius: 26px;
  border: 1px solid rgba(20, 23, 28, 0.1);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(243, 250, 249, 0.96)),
    radial-gradient(circle at top, rgba(190, 220, 217, 0.24), transparent 64%);
  box-shadow:
    0 18px 34px rgba(20, 23, 28, 0.09),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.forecast-matrix-shell {
  padding: 10px 10px 12px;
  border-radius: 24px;
  border: 1px solid rgba(20, 23, 28, 0.08);
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(244, 250, 249, 0.94));
  box-shadow: 0 14px 30px rgba(20, 23, 28, 0.07);
}

.forecast-matrix-scroll {
  border-radius: 18px;
  border: 1px solid rgba(20, 23, 28, 0.08);
  background: rgba(255, 255, 255, 0.76);
  padding: 4px 0 6px;
}

.forecast-matrix-day-head {
  min-height: 64px;
  padding: 10px 12px;
  background: rgba(255, 255, 255, 0.86);
}

.forecast-matrix-day.is-active .forecast-matrix-day-head {
  background: rgba(255, 255, 255, 0.98);
  box-shadow: inset 0 -2px 0 rgba(20, 23, 28, 0.14);
}

.forecast-matrix-slot {
  border-radius: 14px;
  border: 1px solid rgba(20, 23, 28, 0.06);
  box-shadow: 0 8px 16px rgba(20, 23, 28, 0.05);
}

.forecast-matrix-slot.is-primary-best {
  box-shadow:
    0 12px 22px rgba(20, 23, 28, 0.1),
    0 0 0 1px rgba(20, 23, 28, 0.14);
}

.metric-board-item {
  border: 1px solid rgba(20, 23, 28, 0.09);
  box-shadow: 0 14px 26px rgba(20, 23, 28, 0.08);
}

.metric-board-item.is-active {
  box-shadow:
    0 18px 32px rgba(20, 23, 28, 0.12),
    inset 0 0 0 1px rgba(20, 23, 28, 0.16);
}

.legend-pill {
  min-height: 32px;
  padding: 0 12px;
  border-color: rgba(20, 23, 28, 0.11);
  background: rgba(255, 255, 255, 0.9);
}

@media (max-width: 720px) {
  .forecast-matrix-shell {
    padding: 8px 8px 10px;
    border-radius: 20px;
  }

  .forecast-matrix-day-head {
    min-height: 58px;
    padding: 9px 10px;
  }

  .chart-card-analytic .chart-stage,
  .ocean-stage-card,
  .metric-board-shell {
    border-radius: 20px;
  }
}

.detail-badges {
  display: grid;
  gap: 8px;
  justify-items: end;
}

.confidence-badge {
  min-width: 84px;
  padding: 6px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-alt);
  display: grid;
  gap: 2px;
  text-align: center;
}
.confidence-badge span { font-size: 0.5rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--soft); }
.confidence-badge strong { font-family: var(--font-display); font-size: 0.82rem; }
.confidence-badge[data-level="high"] { border-color: rgba(61,139,132,.34); background: rgba(61,139,132,.08); }
.confidence-badge[data-level="medium"] { border-color: rgba(158,92,84,.28); background: rgba(158,92,84,.08); }
.confidence-badge[data-level="low"] { border-color: rgba(125,152,151,.34); background: rgba(125,152,151,.10); }

.decision-card {
  display: grid;
  gap: 4px;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,.93), rgba(243,250,249,.88));
}
.decision-kicker { font-size: 0.5rem; font-family: var(--font-mono); letter-spacing: 0.09em; text-transform: uppercase; color: var(--soft); }
.decision-card strong { font-size: 0.92rem; font-family: var(--font-display); color: var(--accent-deep); }
.decision-card p { margin: 0; font-size: 0.74rem; color: var(--muted); }
.decision-card[data-tone="go"] { border-color: rgba(61,139,132,.34); }
.decision-card[data-tone="watch"] { border-color: rgba(158,92,84,.30); }
.decision-card[data-tone="hold"] { border-color: rgba(125,152,151,.34); }

.top-windows {
  display: grid;
  gap: 10px;
  padding-top: 8px;
  border-top: 1px solid rgba(11,82,88,.08);
}
.top-windows-list {
  display: grid;
  gap: 8px;
}
.top-window-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 8px;
  align-items: center;
  padding: 9px 10px;
  border-radius: 12px;
  border: 1px solid rgba(11,82,88,.08);
  background: rgba(255,255,255,.76);
}
.top-window-item strong { font-size: 0.78rem; color: var(--text); }
.top-window-item span { font-size: 0.64rem; color: var(--soft); }
.top-window-item em { font-style: normal; font-family: var(--font-display); font-size: 0.86rem; font-weight: 800; }

.hero-kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  margin-top: 8px;
}

.hero-kpi-card {
  border: 1px solid rgba(11,82,88,.07);
  border-radius: 10px;
  padding: 8px 9px;
  background: rgba(255,255,255,.66);
  display: grid;
  gap: 2px;
}

.hero-kpi-card span {
  font-size: 0.5rem;
  font-family: var(--font-mono);
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--soft);
}

.hero-kpi-card strong {
  font-family: var(--font-display);
  font-size: 0.9rem;
  color: var(--accent-deep);
}

.hero-kpi-card em {
  font-style: normal;
  font-size: 0.62rem;
  color: var(--muted);
}

.spot-compare {
  display: grid;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(11,82,88,.07);
}

.spot-compare-list {
  display: grid;
  gap: 6px;
}

.spot-compare-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 2px 8px;
  align-items: center;
  border: 1px solid rgba(11,82,88,.07);
  border-radius: 10px;
  background: rgba(255,255,255,.68);
  padding: 8px 9px;
  text-align: left;
}

.spot-compare-item strong { font-size: 0.72rem; color: var(--text); }
.spot-compare-item span { font-size: 0.6rem; color: var(--soft); }
.spot-compare-item em { font-style: normal; font-family: var(--font-display); font-size: 0.8rem; font-weight: 800; }
.spot-compare-item.is-active { border-color: rgba(61,139,132,.30); background: rgba(61,139,132,.08); }

.spot-ranking {
  display: grid;
  gap: 8px;
  padding-top: 8px;
  border-top: 1px solid rgba(11,82,88,.08);
}

.spot-ranking-list {
  display: grid;
  gap: 8px;
}

.spot-ranking-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    "pos title score"
    "pos meta score";
  align-items: center;
  gap: 2px 8px;
  border: 1px solid rgba(11,82,88,.08);
  border-radius: 12px;
  background: rgba(255,255,255,.76);
  padding: 9px 10px;
  text-align: left;
}

.spot-ranking-pos {
  grid-area: pos;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  color: var(--soft);
}

.spot-ranking-item strong { grid-area: title; font-size: 0.76rem; color: var(--text); }
.spot-ranking-item span { grid-area: meta; font-size: 0.63rem; color: var(--soft); }
.spot-ranking-item em { grid-area: score; font-style: normal; font-family: var(--font-display); font-size: 0.86rem; font-weight: 800; }
.spot-ranking-item.is-active { border-color: rgba(61,139,132,.30); background: rgba(61,139,132,.08); }

.session-onboarding {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin: 6px 0 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid rgba(11,82,88,.1);
  background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(243,250,249,.92));
}

.session-onboarding-copy h3 {
  margin: 3px 0 0;
  font-size: 0.96rem;
  font-family: var(--font-display);
  color: var(--accent-deep);
}

.session-onboarding-copy p {
  margin: 4px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.session-onboarding-actions {
  display: inline-flex;
  gap: 8px;
}


.alert-cta {
  margin-top: 2px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  border-radius: 12px;
  border: 1px solid rgba(11,82,88,.1);
  background: linear-gradient(180deg, rgba(255,255,255,.94), rgba(243,250,249,.92));
}

.alert-cta p {
  margin: 4px 0 0;
  font-size: 0.75rem;
  color: var(--muted);
}

@media (max-width: 840px) {
  .hero-kpi-grid {
    grid-template-columns: 1fr;
  }

  .alert-cta {
    flex-direction: column;
    align-items: flex-start;
  }

  .session-onboarding {
    flex-direction: column;
    align-items: flex-start;
  }
}

.surf-shell {
  width: min(1680px, calc(100% - 40px));
}

.topbar {
  margin-bottom: 14px;
  padding: 6px 2px;
}

.brand-wordmark {
  letter-spacing: 0.06em;
}

.surface-card {
  border: 1px solid rgba(20, 23, 28, 0.07);
  box-shadow: 0 8px 22px rgba(20, 23, 28, 0.05);
}

.hero-card,
.controls-card,
.list-card,
.detail-card,
.forecast-card,
.spot-map-card,
.history-card,
.tide-card {
  border-radius: 18px;
}

.hero-card {
  gap: 10px;
  padding: 6px 2px 12px;
}

.hero-copy h1 {
  font-size: clamp(1.02rem, 2.1vw, 1.22rem);
  letter-spacing: -0.02em;
  font-weight: 680;
}

.hero-step-row {
  margin-top: 2px;
  gap: 6px;
  font-size: 0.58rem;
  color: rgba(20, 23, 28, 0.42);
}

.eyebrow,
.mini-label,
.filter-field span,
.metric-card span,
.stat-label,
.summary-copy p,
.history-year-card-label {
  font-size: 0.53rem;
  letter-spacing: 0.11em;
}

.section-head h2,
.detail-top h2 {
  font-size: 1.02rem;
}

.pill-button,
.ghost-btn,
.range-btn,
.primary-btn {
  min-height: 30px;
  padding: 0 11px;
  font-size: 0.61rem;
}

.primary-btn {
  background: var(--accent-deep);
}

.primary-btn:hover {
  background: var(--accent-mid);
}

.search-input {
  border-radius: 12px;
}

.spot-card,
.spot-compare-item,
.spot-ranking-item,
.top-window-item {
  border-radius: 10px;
}

.hero-kpi-card,
.decision-card,
.top-window-item,
.spot-compare-item,
.spot-ranking-item,
.spot-card,
.pill-button,
.ghost-btn,
.primary-btn,
.range-btn,
.browse-chip,
.browse-city-card,
.browser-flow-step,
.forecast-day-pill,
.forecast-view-btn {
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    color 0.18s ease,
    box-shadow 0.18s ease,
    transform 0.18s ease;
}

.hero-kpi-card:hover,
.top-window-item:hover,
.spot-compare-item:hover,
.spot-ranking-item:hover,
.spot-card:hover,
.browse-chip:hover,
.browse-city-card:hover {
  border-color: var(--border-mid);
  background: var(--surface-alt);
}

.hero-kpi-card:focus-visible,
.decision-card:focus-visible,
.top-window-item:focus-visible,
.spot-compare-item:focus-visible,
.spot-ranking-item:focus-visible,
.spot-card:focus-visible,
.browse-chip:focus-visible,
.browse-city-card:focus-visible,
.browser-flow-step:focus-visible,
.forecast-day-pill:focus-visible,
.forecast-view-btn:focus-visible {
  outline: none;
  border-color: color-mix(in srgb, var(--accent) 34%, var(--border-mid));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent-soft) 72%, white);
}

.decision-card:hover {
  border-color: color-mix(in srgb, var(--accent) 28%, var(--border));
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(241,248,247,.9));
}

.decision-card[data-tone="go"] {
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(240,248,246,.92));
}

.decision-card[data-tone="watch"] {
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(246,241,240,.9));
}

.decision-card[data-tone="hold"] {
  background: linear-gradient(180deg, rgba(255,255,255,.96), rgba(244,247,247,.9));
}

.hero-kpi-card.is-active,
.top-window-item.is-active,
.spot-compare-item.is-active,
.spot-ranking-item.is-active {
  border-color: color-mix(in srgb, var(--accent) 42%, var(--border));
  background: color-mix(in srgb, var(--accent-xsoft) 82%, white);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 16%, transparent);
}

@media (prefers-reduced-motion: reduce) {
  .hero-kpi-card,
  .decision-card,
  .top-window-item,
  .spot-compare-item,
  .spot-ranking-item,
  .spot-card,
  .pill-button,
  .ghost-btn,
  .primary-btn,
  .range-btn,
  .browse-chip,
  .browse-city-card,
  .browser-flow-step,
  .forecast-day-pill,
  .forecast-view-btn {
    transition: none !important;
  }
}

.surf-shell {
  width: min(1680px, calc(100% - 40px));
}

.surface-card {
  border: 1px solid rgba(20, 23, 28, 0.09);
  box-shadow: 0 1px 2px rgba(20, 23, 28, 0.04);
}

.hero-card,
.controls-card,
.list-card,
.detail-card,
.forecast-card,
.spot-map-card,
.history-card,
.tide-card,
.browser-panel,
.analysis-panel,
.spot-card,
.spot-compare-item,
.spot-ranking-item,
.top-window-item,
.hero-kpi-card,
.decision-card,
.session-onboarding,
.alert-cta {
  border-radius: 8px;
}

.decision-card,
.session-onboarding,
.alert-cta,
.hero-kpi-card,
.top-window-item,
.spot-compare-item,
.spot-ranking-item {
  background: #ffffff;
}

.hero-copy h1 {
  font-size: clamp(1rem, 1.9vw, 1.14rem);
  font-weight: 650;
  letter-spacing: -0.01em;
}

.section-head h2,
.detail-top h2 {
  font-size: 0.98rem;
}

.eyebrow,
.mini-label,
.filter-field span,
.metric-card span,
.stat-label,
.summary-copy p,
.history-year-card-label {
  font-size: 0.52rem;
  letter-spacing: 0.1em;
}

.spot-card,
.spot-compare-item,
.spot-ranking-item,
.top-window-item,
.hero-kpi-card,
.browse-chip,
.browse-city-card,
.pill-button,
.ghost-btn,
.primary-btn,
.range-btn {
  transition: border-color 0.12s ease, background-color 0.12s ease;
}

.spot-card:hover,
.spot-compare-item:hover,
.spot-ranking-item:hover,
.top-window-item:hover,
.hero-kpi-card:hover,
.browse-chip:hover,
.browse-city-card:hover,
.pill-button:hover,
.ghost-btn:hover,
.range-btn:hover {
  border-color: rgba(20, 23, 28, 0.16);
  background: #fbfdfd;
}

.spot-card.is-active,
.spot-compare-item.is-active,
.spot-ranking-item.is-active,
.hero-kpi-card.is-active {
  border-color: rgba(20, 23, 28, 0.24);
  background: #f5f9f9;
  box-shadow: none;
}

.spot-score {
  min-width: 44px;
  height: 44px;
  font-size: 0.96rem;
  font-weight: 800;
  border-width: 2px;
}

.spot-card-summary {
  color: rgba(20, 23, 28, 0.78);
  font-weight: 600;
}

.forecast-day-score {
  font-size: 1.58rem;
  color: var(--accent-deep);
}

.forecast-day-meta {
  font-size: 0.88rem;
  color: rgba(20, 23, 28, 0.82);
  font-weight: 600;
}

.forecast-focus-fact-value {
  font-size: 0.86rem;
  color: rgba(20, 23, 28, 0.9);
}

.forecast-matrix-key.is-wave,
.forecast-matrix-glance-card.is-wave {
  --matrix-tone: var(--accent-deep);
}

.forecast-matrix-slot-wave {
  font-size: 1.08rem;
  font-weight: 820;
  color: var(--accent-deep);
}

.forecast-matrix-slot-wave small {
  font-size: 0.68rem;
  color: rgba(20, 23, 28, 0.76);
}

.forecast-period-scale-stop {
  opacity: 0.72;
}

.forecast-matrix-slot-period,
.forecast-matrix-slot-energy,
.forecast-matrix-slot-state {
  color: rgba(20, 23, 28, 0.62);
}

@media (max-width: 840px) {
  .forecast-day-score {
    font-size: 1.46rem;
  }

  .forecast-day-meta {
    font-size: 0.84rem;
  }
}

.forecast-plot-line {
  stroke-width: 1.8;
}

.forecast-plot-line.is-secondary {
  stroke-width: 1.2;
  stroke-dasharray: 2 5;
}

.forecast-plot-line.is-light {
  stroke-width: 1.6;
}

.forecast-plot-line.is-secondary.is-light {
  stroke-width: 1.1;
  stroke-dasharray: 2 5;
}

.forecast-plot-score-segment,
.forecast-plot-direction-segment,
.forecast-plot-score-stem,
.forecast-plot-energy-stem {
  stroke-width: 0.8;
  opacity: 0.52;
}

.forecast-plot-energy-dot,
.forecast-plot-score-dot {
  stroke-width: 1.1;
}

.forecast-plot-focus-ring {
  stroke-width: 1.4;
}

.strip-plot-track {
  height: 126px;
}

.strip-plot-fill {
  inset-inline: 14%;
  border-radius: 8px 8px 0 0;
  box-shadow: none;
}

.forecast-period-scale {
  gap: 10px;
}

.forecast-period-scale-label {
  color: rgba(20, 23, 28, 0.62);
  font-size: 0.54rem;
}

.forecast-period-scale-track {
  gap: 4px;
}

.forecast-period-scale-stop {
  min-height: 16px;
  border-radius: 6px;
  font-size: 0.52rem;
  font-weight: 900;
  opacity: 1;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.34);
}

.forecast-matrix-slot-period,
.forecast-matrix-slot-energy,
.forecast-matrix-slot-state {
  color: rgba(20, 23, 28, 0.52);
}

.workspace-grid:not(.is-search-mode) {
  grid-template-columns: minmax(320px, 410px) minmax(0, 1fr);
  gap: 14px;
}

.control-rail,
.analysis-rail {
  gap: 12px;
}

.browser-panel,
.analysis-panel {
  border-color: rgba(20, 23, 28, 0.1);
  box-shadow: 0 1px 2px rgba(20, 23, 28, 0.04);
}

.analysis-panel {
  padding: 18px 20px;
}

.chart-card,
.ocean-stage-card {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(20, 23, 28, 0.12);
  background: linear-gradient(180deg, #ffffff, #f8fcfc);
  box-shadow: 0 10px 24px rgba(20, 23, 28, 0.08);
}

.chart-card::before,
.ocean-stage-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 14px;
  right: 14px;
  height: 2px;
  border-radius: 999px;
  background: rgba(20, 23, 28, 0.24);
}

.chart-card-analytic {
  gap: 12px;
}

.chart-card-head {
  gap: 6px;
}

.chart-card-head h3 {
  margin-top: 4px;
  font-size: 1.04rem;
  color: var(--accent-deep);
}

.chart-stage,
.ocean-stage-card .chart-stage {
  padding-top: 6px;
}

.forecast-focus-card {
  border-color: rgba(20, 23, 28, 0.1);
  box-shadow: 0 8px 18px rgba(20, 23, 28, 0.06);
}

.ocean-stage-card .chart-note {
  color: rgba(20, 23, 28, 0.74);
  font-weight: 600;
}

@media (max-width: 980px) {
  .workspace-grid:not(.is-search-mode) {
    grid-template-columns: 1fr;
  }

  .analysis-panel {
    padding: 16px;
  }
}

/* Featured forecast refinement */
.forecast-card.is-single-page {
  gap: 18px;
}

.forecast-panel-head {
  align-items: end;
  gap: 16px;
  padding: 2px 0 0;
}

.forecast-panel-copy {
  gap: 6px;
  max-width: 42ch;
}

.forecast-panel-copy h3 {
  font-size: clamp(1.14rem, 1vw + 1rem, 1.42rem);
}

.forecast-panel-support {
  max-width: 42ch;
  color: rgba(20, 23, 28, 0.58);
  font-size: 0.78rem;
  line-height: 1.48;
}

.forecast-control-shell {
  gap: 12px;
  padding: 14px;
  border-radius: 22px;
  border: 1px solid rgba(20, 23, 28, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(243, 249, 248, 0.96)),
    radial-gradient(circle at top left, rgba(188, 219, 215, 0.2), transparent 68%);
}

.forecast-control-meta {
  align-items: center;
  gap: 12px;
}

.forecast-control-copy {
  max-width: 28ch;
  color: rgba(20, 23, 28, 0.54);
  font-size: 0.62rem;
  line-height: 1.42;
}

.forecast-control-active {
  gap: 8px;
}

.forecast-control-active strong {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(20, 23, 28, 0.06);
  border: 1px solid rgba(20, 23, 28, 0.08);
  color: var(--accent-deep);
  font-size: 0.76rem;
}

.forecast-control-badge {
  border-color: rgba(20, 23, 28, 0.12);
  background: linear-gradient(180deg, rgba(20, 23, 28, 0.08), rgba(20, 23, 28, 0.04));
  color: var(--accent-deep);
  box-shadow: 0 10px 20px rgba(20, 23, 28, 0.06);
}

.forecast-control-signal {
  border-color: rgba(20, 23, 28, 0.08);
  background: rgba(255, 255, 255, 0.84);
  color: rgba(20, 23, 28, 0.72);
}

.forecast-focus-grid {
  gap: 18px;
}

.ocean-stage-card {
  padding: 18px;
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(244, 251, 250, 0.96)),
    radial-gradient(circle at top left, rgba(184, 217, 212, 0.22), transparent 56%);
  box-shadow:
    0 24px 42px rgba(20, 23, 28, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.ocean-stage-card::after {
  content: "";
  position: absolute;
  top: -54px;
  right: -38px;
  width: 220px;
  height: 180px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(142, 193, 186, 0.18), transparent 72%);
  pointer-events: none;
}

.ocean-stage-card .chart-stage {
  padding-top: 0;
}

.forecast-matrix-shell.is-overview {
  --matrix-stage-height: 232px;
  gap: 12px;
  padding: 14px 14px 16px;
  border-radius: 28px;
  border-color: rgba(20, 23, 28, 0.09);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 250, 249, 0.97)),
    radial-gradient(circle at top left, rgba(190, 220, 217, 0.18), transparent 62%);
  box-shadow:
    0 18px 36px rgba(20, 23, 28, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.94);
}

.forecast-matrix-shell.is-overview .forecast-matrix-toolbar {
  align-items: end;
  gap: 12px;
}

.forecast-matrix-shell.is-overview .forecast-matrix-heading {
  gap: 5px;
  max-width: 42ch;
}

.forecast-matrix-shell.is-overview .forecast-matrix-kicker {
  color: rgba(20, 23, 28, 0.72);
}

.forecast-matrix-shell.is-overview .forecast-matrix-copy {
  color: rgba(20, 23, 28, 0.68);
  font-size: 0.78rem;
  line-height: 1.45;
  max-width: 46ch;
}

.forecast-matrix-shell.is-overview .forecast-matrix-focus {
  min-height: 36px;
  padding: 0 14px;
  background: rgba(20, 23, 28, 0.06);
  border-color: rgba(20, 23, 28, 0.1);
  box-shadow: 0 10px 20px rgba(20, 23, 28, 0.05);
}

.forecast-matrix-shell.is-overview .forecast-matrix-keys {
  gap: 7px 12px;
}

.forecast-matrix-shell.is-overview .forecast-matrix-key {
  color: rgba(20, 23, 28, 0.52);
  font-size: 0.52rem;
}

.forecast-matrix-shell.is-overview .forecast-matrix-glance {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 10px;
}

.forecast-matrix-shell.is-overview .forecast-matrix-glance-card {
  padding: 16px 14px 13px;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(20, 23, 28, 0.08);
  box-shadow: 0 12px 26px rgba(20, 23, 28, 0.06);
}

.forecast-matrix-shell.is-overview .forecast-matrix-scroll {
  padding: 10px 0 8px;
  border-radius: 22px;
  border-color: rgba(20, 23, 28, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(246, 250, 250, 0.9)),
    radial-gradient(circle at top, rgba(214, 232, 229, 0.18), transparent 70%);
}

.forecast-matrix-shell.is-overview .forecast-matrix-frame {
  gap: 10px;
}

.forecast-matrix-shell.is-overview .forecast-matrix-day-head {
  min-height: 68px;
  padding: 12px 13px 10px;
}

.forecast-matrix-shell.is-overview .forecast-matrix-day.is-active {
  background:
    linear-gradient(180deg, rgba(20, 23, 28, 0.06), rgba(20, 23, 28, 0.02) 22%, transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.34), transparent 24%);
  box-shadow: inset 0 0 0 1px rgba(20, 23, 28, 0.04);
}

.forecast-matrix-shell.is-overview .forecast-matrix-slot-grid {
  gap: 14px;
  padding: 18px 13px 12px;
}

.forecast-matrix-shell.is-overview .forecast-matrix-slot-stage {
  border-radius: 22px 22px 14px 14px;
}

.forecast-matrix-shell.is-overview .forecast-matrix-slot.is-primary-best {
  transform: translateY(-2px);
}

.forecast-matrix-shell.is-overview .forecast-matrix-slot.is-primary-best .forecast-matrix-slot-stage {
  border-color: rgba(20, 23, 28, 0.14);
  box-shadow:
    0 16px 30px rgba(20, 23, 28, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.56),
    inset 0 0 0 1px rgba(20, 23, 28, 0.04);
}

.forecast-focus-card {
  padding: 18px 18px 16px;
  border-radius: 26px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(244, 249, 249, 0.96)),
    radial-gradient(circle at top, rgba(203, 228, 224, 0.22), transparent 64%);
}

.forecast-focus-score {
  min-width: 54px;
  min-height: 34px;
  font-size: 1rem;
  background: rgba(255, 255, 255, 0.88);
}

.forecast-focus-lead {
  font-size: 1.02rem;
  line-height: 1.34;
}

.forecast-focus-facts {
  gap: 10px;
  padding-top: 2px;
  border-top: 0;
}

.forecast-focus-fact {
  gap: 4px;
  padding: 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(20, 23, 28, 0.08);
}

.forecast-focus-fact-value {
  font-size: 0.82rem;
}

.forecast-focus-fact-meta {
  color: rgba(20, 23, 28, 0.66);
}

.forecast-focus-foot {
  color: rgba(20, 23, 28, 0.64);
  font-size: 0.78rem;
}

@media (min-width: 1024px) {
  .forecast-focus-grid {
    grid-template-columns: minmax(0, 1.88fr) minmax(320px, 0.72fr);
  }

  .forecast-matrix-shell.is-overview {
    --matrix-stage-height: 258px;
  }
}

@media (max-width: 980px) {
  .forecast-control-shell {
    padding: 12px;
  }

  .forecast-matrix-shell.is-overview .forecast-matrix-toolbar {
    align-items: start;
  }

  .forecast-matrix-shell.is-overview .forecast-matrix-focus {
    width: fit-content;
  }

  .forecast-focus-facts {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .forecast-panel-head {
    align-items: start;
  }

  .forecast-panel-copy h3 {
    font-size: 1rem;
  }

  .forecast-control-active strong {
    width: 100%;
  }

  .ocean-stage-card {
    padding: 14px;
    border-radius: 24px;
  }

  .forecast-matrix-shell.is-overview {
    --matrix-stage-height: 206px;
    padding: 12px 12px 14px;
    border-radius: 22px;
  }

  .forecast-matrix-shell.is-overview .forecast-matrix-glance {
    grid-template-columns: 1fr;
  }

  .forecast-focus-card {
    padding: 14px;
    border-radius: 22px;
  }
}

/* Search home: cleaner chooser, larger type */
body.surf-view-search .hero-card {
  gap: 12px;
  margin-bottom: 20px;
  padding: 10px 0 6px;
  border-bottom: 0;
}

body.surf-view-search .hero-copy h1 {
  max-width: 14ch;
  font-size: clamp(2rem, 5vw, 3.6rem);
  font-weight: 820;
  line-height: 0.96;
  letter-spacing: -0.045em;
}

body.surf-view-search .hero-support {
  display: block;
  max-width: 34ch;
  margin: 0;
  color: rgba(20, 23, 28, 0.68);
  font-size: 1rem;
  line-height: 1.45;
}

body.surf-view-search .hero-step-row {
  margin-top: 2px;
  font-size: 0.68rem;
  color: rgba(20, 23, 28, 0.52);
}

body.surf-view-search .hero-kpi-grid,
body.surf-view-search .session-onboarding {
  display: none !important;
}

body.surf-view-search .workspace-grid.is-search-mode {
  grid-template-columns: minmax(0, 1360px);
}

/* Wide home: spot cards flow into multiple columns; stages/empty span full. */
body.surf-view-search .spot-list {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 12px;
  align-items: start;
}
body.surf-view-search .spot-list > .browse-stage,
body.surf-view-search .spot-list > .empty-state,
body.surf-view-search .spot-list > .loading-state {
  grid-column: 1 / -1;
}

/* Home com a mesma ideia: card mais leve e arejado, foco no chooser. */
body.surf-view-search .browser-panel {
  padding: 30px 34px 34px;
  border-radius: 30px;
  border-color: rgba(20, 23, 28, 0.07);
  box-shadow:
    0 14px 34px rgba(20, 23, 28, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

body.surf-view-search .controls-card .section-head {
  align-items: end;
}

body.surf-view-search .controls-card .section-head h2 {
  font-size: clamp(1.5rem, 3vw, 2.2rem);
  line-height: 0.98;
}

body.surf-view-search .control-lead {
  max-width: 36ch;
  font-size: 0.96rem;
  line-height: 1.5;
  color: rgba(20, 23, 28, 0.58);
}

body.surf-view-search .search-wrap {
  margin-top: 22px;
}

body.surf-view-search .search-icon {
  left: 18px;
  width: 20px;
  height: 20px;
}

body.surf-view-search .search-input {
  min-height: 62px;
  padding: 0 20px 0 52px;
  border-radius: 22px;
  font-size: 1.05rem;
  box-shadow: 0 14px 28px rgba(20, 23, 28, 0.05);
}

body.surf-view-search .nav-meta {
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
}

body.surf-view-search .browser-flow {
  gap: 10px;
}

body.surf-view-search .browser-flow-step {
  gap: 4px;
  padding: 13px 14px 12px;
  border-radius: 16px;
}

body.surf-view-search .browser-flow-label {
  font-size: 0.54rem;
}

body.surf-view-search .browser-flow-value {
  font-size: 0.92rem;
}

body.surf-view-search .browser-panel > .list-card {
  padding-top: 18px;
}

body.surf-view-search .compact-head h2 {
  font-size: 1.24rem;
}

body.surf-view-search .list-context {
  max-width: 34ch;
  font-size: 0.84rem;
  line-height: 1.44;
  color: rgba(20, 23, 28, 0.5);
}

body.surf-view-search .spot-list {
  gap: 12px;
  margin-top: 18px;
  max-height: min(54vh, 760px);
}

body.surf-view-search .browse-chip,
body.surf-view-search .browse-city-card,
body.surf-view-search .spot-card.is-picker {
  border-radius: 20px;
}

body.surf-view-search .browse-chip,
body.surf-view-search .browse-city-card {
  padding: 16px 18px;
}

body.surf-view-search .browse-chip strong,
body.surf-view-search .browse-city-card strong {
  font-size: 1.02rem;
}

body.surf-view-search .browse-chip span,
body.surf-view-search .browse-city-card span {
  font-size: 0.8rem;
}

body.surf-view-search .spot-card.is-picker {
  padding: 18px 20px;
}

body.surf-view-search .spot-card-name {
  font-size: 1.08rem;
  line-height: 1.04;
}

body.surf-view-search .spot-card-location {
  font-size: 0.84rem;
}

body.surf-view-search .spot-list-score {
  min-width: 46px;
  height: 32px;
  padding: 0 8px;
  font-size: 0.82rem;
}

body.surf-view-search .spot-card-status {
  min-height: 18px;
  font-size: 0.54rem;
}

/* Selected spot: chart first, browser second */
body.surf-view-selected .hero-card,
body.surf-view-selected .session-onboarding {
  display: none !important;
}

body.surf-view-selected .workspace-grid:not(.is-search-mode) {
  grid-template-columns: minmax(0, 1fr);
  gap: 18px;
}

body.surf-view-selected .analysis-rail {
  order: 1;
}

body.surf-view-selected .control-rail {
  order: 2;
}

body.surf-view-selected .analysis-panel {
  padding: 20px 22px;
}

body.surf-view-selected .analysis-panel > .detail-card {
  order: 1;
  padding: 0 0 14px;
  border-bottom: 1px solid var(--border);
}

body.surf-view-selected .analysis-panel > .forecast-card {
  order: 2;
  padding-top: 14px;
  padding-bottom: 18px;
  border-top: 0;
  border-bottom: 1px solid var(--border);
}

body.surf-view-selected .forecast-panel-copy h3 {
  font-size: clamp(1.32rem, 2vw, 1.82rem);
}

body.surf-view-selected .forecast-panel-support {
  font-size: 0.84rem;
  max-width: 44ch;
}

body.surf-view-selected .forecast-focus-grid {
  grid-template-columns: 1fr !important;
  gap: 16px;
}

body.surf-view-selected .forecast-view-pane[data-forecast-view-pane="overview"] .chart-stage {
  min-height: 388px;
}

body.surf-view-selected .forecast-matrix-shell.is-overview {
  --matrix-stage-height: 282px;
}

body.surf-view-selected .forecast-focus-card {
  max-width: 520px;
  gap: 8px;
  padding: 16px;
  border-radius: 24px;
}

body.surf-view-selected .forecast-focus-top {
  align-items: center;
}

body.surf-view-selected .forecast-focus-dayline {
  font-size: 0.64rem;
}

body.surf-view-selected .forecast-focus-score {
  min-width: 50px;
  min-height: 32px;
  font-size: 0.96rem;
}

body.surf-view-selected .forecast-focus-facts {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  padding-top: 0;
}

body.surf-view-selected .forecast-focus-fact {
  padding: 10px 11px;
}

body.surf-view-selected .forecast-focus-fact-value {
  font-size: 0.78rem;
}

body.surf-view-selected .forecast-focus-fact-meta {
  font-size: 0.6rem;
}

body.surf-view-selected .forecast-focus-foot {
  font-size: 0.7rem;
  line-height: 1.35;
}

body.surf-view-selected .detail-content {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

/* Lower band: map (hero, left) + metrics (right) — fills the old empty column. */
.detail-lower {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  width: 100%;
}
.detail-lower .spot-satellite-wrap {
  margin: 0;
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.swell-geo-title {
  margin: 0 0 10px;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  padding: 0 4px;
}
@media (min-width: 900px) {
  .detail-lower {
    grid-template-columns: minmax(0, 400px) minmax(0, 1fr);
    gap: 20px;
    align-items: start;
  }
  .detail-lower .swell-geo-sat {
    aspect-ratio: 1 / 1;
    height: auto;
    max-height: none;
    flex: none;
  }
  body.surf-view-selected .detail-card .detail-lower .detail-metrics {
    grid-area: auto;
    grid-column: auto;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 14px;
    align-self: stretch;
    align-content: space-between;
  }
}

body.surf-view-selected .detail-top {
  align-items: flex-end;
}

body.surf-view-selected .detail-top h2 {
  font-size: clamp(1.36rem, 2.2vw, 1.82rem);
}

body.surf-view-selected .detail-location {
  margin-top: 3px;
  font-size: 0.8rem;
}

body.surf-view-selected .detail-chips {
  align-self: flex-start;
}

body.surf-view-selected .score-chip {
  min-width: 48px;
  padding: 6px 11px;
  font-size: 0.92rem;
}

body.surf-view-selected .detail-card .detail-metrics {
  align-self: end;
  gap: 0;
  padding: 10px 14px;
  border-top: 0;
  border: 1px solid rgba(20, 23, 28, 0.08);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
}

body.surf-view-selected .detail-card .metric-card {
  min-height: 0;
}

body.surf-view-selected .detail-card .metric-card strong {
  font-size: 0.84rem;
}

body.surf-view-selected .detail-card .metric-card span {
  font-size: 0.5rem;
}

body.surf-view-selected .browser-panel {
  display: grid;
  grid-template-columns: minmax(280px, 360px) minmax(0, 1fr);
  grid-template-rows: none;
  gap: 16px;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
  max-height: none;
}

body.surf-view-selected .browser-panel::before {
  display: none;
}

body.surf-view-selected .browser-panel > .controls-card,
body.surf-view-selected .browser-panel > .list-card {
  padding: 18px 20px;
  border: 1px solid rgba(20, 23, 28, 0.08);
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 14px 32px rgba(20, 23, 28, 0.06);
}

body.surf-view-selected .browser-panel > .list-card {
  padding-top: 18px;
  border-top: 1px solid rgba(20, 23, 28, 0.08);
}

body.surf-view-selected .controls-card .section-head h2,
body.surf-view-selected .compact-head h2 {
  font-size: 1.18rem;
}

body.surf-view-selected .control-lead,
body.surf-view-selected .list-context {
  display: none;
}

body.surf-view-selected .spot-list {
  max-height: min(38vh, 440px);
}

body.surf-view-selected .spot-list-score {
  min-width: 34px;
  height: 24px;
  font-size: 0.62rem;
  /* cores de condição visíveis no sidebar — identidade visual mantida */
}

body.surf-view-selected .spot-card-status {
  color: rgba(20, 23, 28, 0.42);
}

@media (max-width: 980px) {
  body.surf-view-search .browser-panel {
    padding: 22px 22px 24px;
  }

  body.surf-view-selected .analysis-panel {
    padding: 18px;
  }

  body.surf-view-selected .browser-panel {
    grid-template-columns: 1fr;
  }

  body.surf-view-selected .forecast-view-pane[data-forecast-view-pane="overview"] .chart-stage {
    min-height: 320px;
  }

  body.surf-view-selected .forecast-matrix-shell.is-overview {
    --matrix-stage-height: 238px;
  }

  body.surf-view-selected .forecast-focus-card {
    max-width: none;
  }

  body.surf-view-selected .forecast-focus-facts {
    grid-template-columns: 1fr;
  }

  body.surf-view-selected .detail-content {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  body.surf-view-selected .detail-card .detail-metrics {
    padding: 10px 0 0;
    border: 0;
    border-top: 1px solid rgba(20, 23, 28, 0.06);
    border-radius: 0;
    background: transparent;
  }

  body.surf-view-selected .detail-top {
    align-items: flex-start;
  }

  body.surf-view-selected .detail-top h2 {
    font-size: 1.28rem;
  }

  body.surf-view-selected .detail-location {
    font-size: 0.76rem;
  }

  body.surf-view-selected .score-chip {
    min-width: 42px;
    font-size: 0.82rem;
  }
}

@media (max-width: 720px) {
  body.surf-view-search .hero-copy h1 {
    max-width: 12ch;
    font-size: clamp(1.7rem, 9vw, 2.4rem);
  }

  body.surf-view-search .hero-support {
    font-size: 0.92rem;
  }

  body.surf-view-search .browser-panel {
    padding: 18px 16px 20px;
    border-radius: 24px;
  }

  body.surf-view-search .controls-card .section-head h2 {
    font-size: 1.28rem;
  }

  body.surf-view-search .search-input {
    min-height: 56px;
    font-size: 0.96rem;
  }

  body.surf-view-search .spot-card.is-picker {
    padding: 16px 16px;
  }

  body.surf-view-selected .analysis-panel {
    padding: 16px;
  }

  body.surf-view-selected .analysis-panel > .forecast-card {
    padding-bottom: 14px;
  }

  body.surf-view-selected .analysis-panel > .detail-card {
    padding-bottom: 12px;
  }

  body.surf-view-selected .forecast-view-pane[data-forecast-view-pane="overview"] .chart-stage {
    min-height: 276px;
  }

  body.surf-view-selected .forecast-matrix-shell.is-overview {
    --matrix-stage-height: 210px;
  }

  body.surf-view-selected .browser-panel > .controls-card,
  body.surf-view-selected .browser-panel > .list-card {
    padding: 16px;
    border-radius: 20px;
  }

  body.surf-view-selected .forecast-focus-card {
    padding: 14px;
  }

  body.surf-view-selected .forecast-focus-fact {
    padding: 9px 10px;
  }
}

/* Plot readability refinement */
.forecast-matrix-axis-label {
  color: rgba(20, 23, 28, 0.5);
  font-size: 0.6rem;
  font-weight: 700;
}

.forecast-matrix-axis-unit {
  color: rgba(20, 23, 28, 0.44);
  font-size: 0.54rem;
}

.forecast-period-scale-label {
  color: rgba(20, 23, 28, 0.62);
}

.forecast-matrix-slot-topline {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 6px;
  min-height: 34px;
}

.forecast-matrix-slot-topmeta {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 5px;
  flex-wrap: wrap;
}

.forecast-matrix-slot-score {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  background: var(--slot-score);
  color: var(--slot-score-text, #ffffff);
  border: 1px solid rgba(255, 255, 255, 0.36);
  box-shadow: 0 8px 18px rgba(20, 23, 28, 0.08);
  font-family: var(--font-mono);
  font-size: 0.54rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  line-height: 1;
  white-space: nowrap;
}

.forecast-matrix-slot.is-context-day .forecast-matrix-slot-score {
  background: color-mix(in srgb, var(--slot-score) 14%, white);
  color: color-mix(in srgb, var(--slot-score) 68%, #0c2f50);
  border-color: color-mix(in srgb, var(--slot-score) 22%, white);
  box-shadow: none;
}

.forecast-matrix-slot-range {
  color: rgba(20, 23, 28, 0.56);
  font-size: 0.62rem;
  letter-spacing: 0.08em;
}

.forecast-matrix-slot-mark {
  border: 1px solid rgba(20, 23, 28, 0.08);
}

.forecast-matrix-slot-wave {
  font-size: 1.08rem;
  font-weight: 820;
}

.forecast-matrix-slot-wave small {
  font-size: 0.68rem;
}

.forecast-matrix-slot-support {
  gap: 6px;
}

.forecast-matrix-slot-state,
.forecast-matrix-slot-energy {
  min-height: 30px;
  font-size: 0.62rem;
  letter-spacing: 0.04em;
  color: rgba(20, 23, 28, 0.76);
}

.forecast-matrix-slot-state {
  padding-inline: 8px;
}

.forecast-matrix-slot-wind {
  min-width: 30px;
  min-height: 21px;
}

.forecast-matrix-shell.is-overview .forecast-matrix-day:not(.is-active) .forecast-matrix-slot {
  opacity: 0.82;
}

.forecast-matrix-shell.is-overview .forecast-matrix-day:not(.is-active) .forecast-matrix-slot-stage {
  border-color: rgba(20, 23, 28, 0.06);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 8px 16px rgba(20, 23, 28, 0.022);
}

.forecast-matrix-shell.is-overview .forecast-matrix-day.is-active .forecast-matrix-slot {
  opacity: 1;
}

.forecast-matrix-shell.is-overview .forecast-matrix-day.is-active .forecast-matrix-slot-stage {
  border-color: rgba(20, 23, 28, 0.1);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 14px 28px rgba(20, 23, 28, 0.06);
}

.forecast-matrix-shell.is-overview .forecast-matrix-day.is-active .forecast-matrix-slot-wave {
  font-size: 1.18rem;
}

.forecast-matrix-shell.is-overview .forecast-matrix-day.is-active .forecast-matrix-slot-stage-wash {
  opacity: 0.14;
}

.forecast-matrix-shell.is-overview .forecast-matrix-slot-stage-rail {
  width: 2px;
  opacity: 0.5;
}

.forecast-matrix-shell.is-overview .forecast-matrix-slot-energy::before {
  opacity: 0.22;
}

.forecast-matrix-shell.is-overview .forecast-matrix-day.is-active .forecast-matrix-slot-energy::before {
  opacity: 0.32;
}

body.surf-view-selected .forecast-view-pane[data-forecast-view-pane="overview"] .chart-stage {
  min-height: 420px;
}

body.surf-view-selected .forecast-matrix-shell.is-overview {
  --matrix-stage-height: 298px;
}

@media (max-width: 980px) {
  body.surf-view-selected .forecast-view-pane[data-forecast-view-pane="overview"] .chart-stage {
    min-height: 340px;
  }

  body.surf-view-selected .forecast-matrix-shell.is-overview {
    --matrix-stage-height: 246px;
  }
}

@media (max-width: 720px) {
  .forecast-matrix-slot-topline {
    min-height: 32px;
  }

  .forecast-matrix-slot-score {
    min-height: 17px;
    padding-inline: 5px;
    font-size: 0.5rem;
  }

  .forecast-matrix-slot-state,
  .forecast-matrix-slot-energy {
    font-size: 0.58rem;
  }

  body.surf-view-selected .forecast-view-pane[data-forecast-view-pane="overview"] .chart-stage {
    min-height: 288px;
  }

  body.surf-view-selected .forecast-matrix-shell.is-overview {
    --matrix-stage-height: 216px;
  }
}

.forecast-energy-card,
.forecast-period-card,
.forecast-wind-card {
  gap: 12px;
}

.forecast-energy-card .chart-stage,
.forecast-period-card .chart-stage,
.forecast-wind-card .chart-stage {
  min-height: 312px;
}

.forecast-energy-card .chart-copy,
.forecast-period-card .chart-copy,
.forecast-wind-card .chart-copy {
  max-width: 42ch;
}

.forecast-energy-stage .forecast-matrix-shell.is-energy {
  --matrix-stage-height: 208px;
}

.forecast-period-stage .forecast-matrix-shell.is-period {
  --matrix-stage-height: 208px;
}

.forecast-wind-stage .forecast-matrix-shell.is-wind {
  --matrix-stage-height: 208px;
}

.forecast-wind-stage .forecast-matrix-shell.is-wind .forecast-matrix-slot {
  padding: 6px 5px 7px;
  border-radius: 16px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--slot-wind-surface) 76%, white) 0%, rgba(255, 255, 255, 0.84) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    0 10px 22px rgba(20, 23, 28, 0.035);
}

.forecast-wind-stage .forecast-matrix-shell.is-wind .forecast-matrix-slot.is-best {
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--slot-wind-surface) 100%, white) 0%, rgba(255, 255, 255, 0.9) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    0 14px 28px rgba(20, 23, 28, 0.05);
}

/* Minimal compact plot pass */
.forecast-matrix-frame {
  grid-template-columns: 34px minmax(0, 1fr) 34px;
  gap: 6px;
}

.forecast-matrix-frame.is-single-axis {
  grid-template-columns: 28px minmax(0, 1fr);
}

.forecast-matrix-axis {
  grid-template-rows: 48px var(--matrix-stage-height, 188px) auto;
  gap: 8px;
}

.forecast-matrix-axis-spacer {
  min-height: 48px;
}

.forecast-matrix-axis-label {
  font-size: 0.52rem;
}

.forecast-matrix-axis-unit {
  font-size: 0.48rem;
  letter-spacing: 0.08em;
}

.forecast-matrix-day-head {
  min-height: 52px;
  padding: 8px 10px 7px;
  gap: 2px;
}

.forecast-matrix-day-head::after {
  left: 10px;
  right: 10px;
}

.forecast-matrix-day-kicker {
  font-size: 0.86rem;
}

.forecast-matrix-day-chip {
  min-height: 20px;
  padding: 0 6px;
  font-size: 0.52rem;
}

.forecast-matrix-day-date {
  font-size: 0.58rem;
  letter-spacing: 0.07em;
}

.forecast-matrix-slot-grid {
  gap: 6px;
  padding: 10px 8px 9px;
}

.forecast-matrix-slot {
  gap: 5px;
}

.forecast-matrix-slot-topline {
  gap: 4px;
  min-height: 24px;
  justify-items: center;
  text-align: center;
}

.forecast-matrix-slot-topmeta {
  gap: 4px;
  justify-content: center;
}

.forecast-matrix-slot-score {
  min-height: 16px;
  padding: 0 5px;
  font-size: 0.5rem;
}

.forecast-matrix-slot-range {
  max-width: 100%;
  overflow: hidden;
  font-size: 0.5rem;
  letter-spacing: 0.04em;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forecast-matrix-slot-wave {
  font-size: 1rem;
}

.forecast-matrix-slot-wave small {
  font-size: 0.62rem;
}

.forecast-matrix-slot-state,
.forecast-matrix-slot-energy {
  min-height: 27px;
  font-size: 0.58rem;
}

.forecast-matrix-slot-wind {
  min-width: 26px;
  min-height: 19px;
  font-size: 0.52rem;
}

.forecast-matrix-shell.is-overview {
  --matrix-stage-height: 214px;
  gap: 10px;
  padding: 10px 10px 12px;
  border-radius: 22px;
  box-shadow:
    0 14px 30px rgba(20, 23, 28, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.forecast-matrix-shell.is-overview .forecast-matrix-toolbar {
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
}

.forecast-matrix-shell.is-overview .forecast-matrix-heading {
  gap: 4px;
  max-width: 36ch;
}

.forecast-matrix-shell.is-overview .forecast-matrix-copy {
  font-size: 0.78rem;
  line-height: 1.35;
  max-width: 44ch;
}

.forecast-matrix-shell.is-overview .forecast-matrix-focus {
  min-height: 30px;
  padding: 0 10px;
  font-size: 0.72rem;
  box-shadow: none;
}

.forecast-matrix-shell.is-overview .forecast-matrix-key {
  font-size: 0.56rem;
  letter-spacing: 0.08em;
}

.forecast-matrix-shell.is-overview .forecast-matrix-glance {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.forecast-matrix-shell.is-overview .forecast-matrix-glance-card {
  padding: 12px 12px 10px;
  border-radius: 16px;
  box-shadow: none;
}

.forecast-matrix-shell.is-overview .forecast-matrix-scroll {
  padding: 6px 0 4px;
  border-radius: 18px;
}

.forecast-matrix-shell.is-overview .forecast-matrix-frame {
  gap: 6px;
}

.forecast-matrix-shell.is-overview .forecast-matrix-day-head {
  min-height: 56px;
  padding: 9px 10px 8px;
}

.forecast-matrix-shell.is-overview .forecast-matrix-slot-grid {
  gap: 4px;
  padding: 10px 8px 9px;
}

.forecast-matrix-shell.is-overview .forecast-matrix-slot:not(.is-best):not(.is-primary-best) .forecast-matrix-slot-score {
  display: none;
}

.forecast-matrix-shell.is-overview .forecast-matrix-slot-stage {
  width: min(100%, 28px);
  margin-inline: auto;
  border-radius: 18px 18px 10px 10px;
}

.forecast-matrix-shell.is-overview .forecast-matrix-slot-bar {
  border-radius: 11px 11px 0 0;
  padding: 0 2px 4px;
}

.forecast-matrix-shell.is-overview .forecast-matrix-slot-period {
  font-size: 0.46rem;
}

.forecast-matrix-shell.is-overview .forecast-matrix-slot-mark {
  display: none;
}

.forecast-matrix-shell.is-overview .forecast-matrix-slot-state {
  justify-content: center;
  gap: 3px;
  padding-inline: 3px;
}

.forecast-matrix-shell.is-overview .forecast-matrix-slot-dir-label {
  display: none;
}

.forecast-matrix-shell.is-overview .forecast-matrix-slot-wind {
  min-width: 18px;
  min-height: 18px;
  padding: 0 4px;
  font-size: 0.46rem;
}

.forecast-matrix-shell.is-overview .forecast-matrix-slot-energy {
  padding-inline: 3px;
}

.forecast-matrix-shell.is-overview .forecast-matrix-slot-energy span {
  font-size: 0.46rem;
}

.forecast-energy-stage .forecast-matrix-shell.is-energy .forecast-matrix-slot-grid,
.forecast-period-stage .forecast-matrix-shell.is-period .forecast-matrix-slot-grid,
.forecast-wind-stage .forecast-matrix-shell.is-wind .forecast-matrix-slot-grid {
  gap: 4px;
  padding: 10px 8px 9px;
}

.forecast-energy-stage .forecast-matrix-shell.is-energy .forecast-matrix-slot-topline,
.forecast-period-stage .forecast-matrix-shell.is-period .forecast-matrix-slot-topline,
.forecast-wind-stage .forecast-matrix-shell.is-wind .forecast-matrix-slot-topline {
  min-height: 18px;
}

.forecast-energy-stage .forecast-matrix-shell.is-energy .forecast-matrix-slot-range,
.forecast-period-stage .forecast-matrix-shell.is-period .forecast-matrix-slot-range,
.forecast-wind-stage .forecast-matrix-shell.is-wind .forecast-matrix-slot-range {
  font-size: 0.48rem;
}

.forecast-energy-stage .forecast-matrix-shell.is-energy .forecast-matrix-slot-stage,
.forecast-period-stage .forecast-matrix-shell.is-period .forecast-matrix-slot-stage,
.forecast-wind-stage .forecast-matrix-shell.is-wind .forecast-matrix-slot-stage {
  width: min(100%, 28px);
  margin-inline: auto;
  border-radius: 17px 17px 10px 10px;
}

.forecast-energy-stage .forecast-matrix-shell.is-energy .forecast-matrix-slot-bar,
.forecast-period-stage .forecast-matrix-shell.is-period .forecast-matrix-slot-bar,
.forecast-wind-stage .forecast-matrix-shell.is-wind .forecast-matrix-slot-bar {
  border-radius: 10px 10px 0 0;
  padding: 0 2px 4px;
}

.forecast-energy-stage .forecast-matrix-shell.is-energy .forecast-matrix-slot-period,
.forecast-period-stage .forecast-matrix-shell.is-period .forecast-matrix-slot-period,
.forecast-wind-stage .forecast-matrix-shell.is-wind .forecast-matrix-slot-period {
  font-size: 0.46rem;
}

.forecast-energy-stage .forecast-matrix-shell.is-energy .forecast-matrix-slot-wave,
.forecast-period-stage .forecast-matrix-shell.is-period .forecast-matrix-slot-wave,
.forecast-wind-stage .forecast-matrix-shell.is-wind .forecast-matrix-slot-wave {
  font-size: 0.9rem;
}

.forecast-wind-stage .forecast-matrix-shell.is-wind .forecast-matrix-slot-stage {
  border-color: color-mix(in srgb, var(--slot-wind) 18%, rgba(20, 23, 28, 0.08));
  background:
    linear-gradient(
      180deg,
      color-mix(in srgb, var(--slot-wind-surface) 70%, white) 0%,
      rgba(255, 255, 255, 0.96) 42%,
      rgba(244, 248, 248, 0.92) 100%
    ),
    repeating-linear-gradient(
      to top,
      transparent 0 calc(var(--matrix-grid-step, 25%) - 1px),
      color-mix(in srgb, var(--slot-wind) 11%, rgba(20, 23, 28, 0.03)) calc(var(--matrix-grid-step, 25%) - 1px) var(--matrix-grid-step, 25%)
    );
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 10px 20px color-mix(in srgb, var(--slot-wind) 10%, rgba(20, 23, 28, 0.04));
}

.forecast-wind-stage .forecast-matrix-shell.is-wind .forecast-matrix-slot-bar {
  background-image:
    linear-gradient(180deg, rgba(255, 255, 255, 0.22), transparent 38%),
    linear-gradient(0deg, color-mix(in srgb, var(--slot-wind-wash) 80%, transparent), transparent 34%);
}

.forecast-energy-stage .forecast-matrix-shell.is-energy .forecast-matrix-slot-dir,
.forecast-period-stage .forecast-matrix-shell.is-period .forecast-matrix-slot-dir {
  justify-content: center;
  gap: 0;
}

.forecast-energy-stage .forecast-matrix-shell.is-energy .forecast-matrix-slot-dir > span:last-child,
.forecast-period-stage .forecast-matrix-shell.is-period .forecast-matrix-slot-dir > span:last-child {
  display: none;
}

.forecast-wind-stage .forecast-matrix-shell.is-wind .forecast-matrix-slot-dir {
  justify-content: center;
  gap: 3px;
  color: rgba(20, 23, 28, 0.78);
}

.forecast-wind-stage .forecast-matrix-shell.is-wind .forecast-matrix-slot-dir-label {
  display: inline;
  font-size: 0.48rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.forecast-wind-stage .forecast-matrix-shell.is-wind .forecast-matrix-slot-arrow {
  font-size: 0.8rem;
}

.forecast-wind-stage .forecast-matrix-shell.is-wind .forecast-matrix-slot-period {
  color: var(--slot-wind-text);
  text-shadow: none;
}

.forecast-wind-stage .forecast-matrix-shell.is-wind .forecast-matrix-slot-wave {
  color: color-mix(in srgb, var(--slot-wind) 68%, #0c2f50);
}

.forecast-wind-slot-meta {
  display: grid;
  gap: 4px;
}

.forecast-wind-slot-direction,
.forecast-wind-slot-quality {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 22px;
  border-radius: 999px;
  font-family: var(--font-mono);
  font-size: 0.48rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.forecast-wind-slot-direction {
  gap: 3px;
  padding: 0 7px;
  border: 1px solid color-mix(in srgb, var(--slot-wind) 26%, rgba(20, 23, 28, 0.08));
  background: rgba(255, 255, 255, 0.92);
  color: rgba(20, 23, 28, 0.78);
}

.forecast-wind-slot-quality {
  position: relative;
  overflow: hidden;
  padding: 0 8px;
  border: 1px solid color-mix(in srgb, var(--slot-wind) 28%, rgba(20, 23, 28, 0.08));
  background: color-mix(in srgb, var(--slot-wind-surface) 92%, white);
  color: color-mix(in srgb, var(--slot-wind) 82%, #0b2527);
}

.forecast-wind-stage .forecast-matrix-shell.is-wind .forecast-matrix-slot.is-best .forecast-wind-slot-quality {
  border-color: transparent;
  background: var(--slot-wind);
  color: var(--slot-wind-text);
}

.forecast-matrix-shell.is-overview .forecast-matrix-slot.is-primary-best {
  transform: none;
}

.forecast-matrix-shell.is-overview .forecast-matrix-slot.is-primary-best .forecast-matrix-slot-stage {
  box-shadow:
    0 12px 24px rgba(20, 23, 28, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.56),
    inset 0 0 0 1px rgba(20, 23, 28, 0.04);
}

.forecast-matrix-shell.is-overview .forecast-matrix-day.is-active .forecast-matrix-slot-wave {
  font-size: 1.06rem;
}

body.surf-view-selected .forecast-view-pane[data-forecast-view-pane="overview"] .chart-stage {
  min-height: 396px;
}

body.surf-view-selected .forecast-matrix-shell.is-overview {
  --matrix-stage-height: 272px;
}

body.surf-view-selected .forecast-energy-card .chart-stage,
body.surf-view-selected .forecast-period-card .chart-stage,
body.surf-view-selected .forecast-wind-card .chart-stage {
  min-height: 332px;
}

body.surf-view-selected .forecast-energy-stage .forecast-matrix-shell.is-energy {
  --matrix-stage-height: 228px;
}

body.surf-view-selected .forecast-period-stage .forecast-matrix-shell.is-period {
  --matrix-stage-height: 228px;
}

body.surf-view-selected .forecast-wind-stage .forecast-matrix-shell.is-wind {
  --matrix-stage-height: 228px;
}

@media (max-width: 1040px) {
  .forecast-matrix-shell.is-overview {
    --matrix-stage-height: 204px;
  }

  .forecast-matrix-shell.is-overview .forecast-matrix-glance {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 980px) {
  body.surf-view-selected .forecast-view-pane[data-forecast-view-pane="overview"] .chart-stage {
    min-height: 330px;
  }

  body.surf-view-selected .forecast-matrix-shell.is-overview {
    --matrix-stage-height: 228px;
  }

  .forecast-energy-card .chart-stage,
  .forecast-period-card .chart-stage,
  .forecast-wind-card .chart-stage {
    min-height: 292px;
  }

  .forecast-energy-stage .forecast-matrix-shell.is-energy {
    --matrix-stage-height: 198px;
  }

  .forecast-period-stage .forecast-matrix-shell.is-period {
    --matrix-stage-height: 198px;
  }

  .forecast-wind-stage .forecast-matrix-shell.is-wind {
    --matrix-stage-height: 198px;
  }

  body.surf-view-selected .forecast-energy-card .chart-stage,
  body.surf-view-selected .forecast-period-card .chart-stage,
  body.surf-view-selected .forecast-wind-card .chart-stage {
    min-height: 304px;
  }

  body.surf-view-selected .forecast-energy-stage .forecast-matrix-shell.is-energy {
    --matrix-stage-height: 208px;
  }

  body.surf-view-selected .forecast-period-stage .forecast-matrix-shell.is-period {
    --matrix-stage-height: 208px;
  }

  body.surf-view-selected .forecast-wind-stage .forecast-matrix-shell.is-wind {
    --matrix-stage-height: 208px;
  }
}

@media (max-width: 720px) {
  .forecast-matrix-frame.is-single-axis {
    grid-template-columns: 24px minmax(0, 1fr);
  }

  .forecast-matrix-axis {
    grid-template-rows: 44px var(--matrix-stage-height, 188px) auto;
  }

  .forecast-matrix-axis-spacer {
    min-height: 44px;
  }

  .forecast-matrix-day-head {
    padding: 7px 8px 6px;
  }

  .forecast-matrix-slot-grid {
    gap: 4px;
    padding: 9px 6px 7px;
  }

  .forecast-matrix-slot-topline {
    min-height: 22px;
  }

  .forecast-matrix-slot-wave {
    font-size: 0.82rem;
  }

  .forecast-matrix-slot-state,
  .forecast-matrix-slot-energy {
    min-height: 25px;
    font-size: 0.54rem;
  }

  .forecast-matrix-shell.is-overview {
    --matrix-stage-height: 188px;
    padding: 8px 8px 10px;
  }

  .forecast-matrix-shell.is-overview .forecast-matrix-glance {
    grid-template-columns: 1fr;
  }

  .forecast-matrix-shell.is-overview .forecast-matrix-slot-stage,
  .forecast-energy-stage .forecast-matrix-shell.is-energy .forecast-matrix-slot-stage,
  .forecast-period-stage .forecast-matrix-shell.is-period .forecast-matrix-slot-stage,
  .forecast-wind-stage .forecast-matrix-shell.is-wind .forecast-matrix-slot-stage {
    width: min(100%, 24px);
  }

  .forecast-matrix-shell.is-overview .forecast-matrix-slot-range,
  .forecast-energy-stage .forecast-matrix-shell.is-energy .forecast-matrix-slot-range,
  .forecast-period-stage .forecast-matrix-shell.is-period .forecast-matrix-slot-range,
  .forecast-wind-stage .forecast-matrix-shell.is-wind .forecast-matrix-slot-range {
    font-size: 0.44rem;
  }

  body.surf-view-selected .forecast-view-pane[data-forecast-view-pane="overview"] .chart-stage {
    min-height: 286px;
  }

  body.surf-view-selected .forecast-matrix-shell.is-overview {
    --matrix-stage-height: 200px;
  }

  .forecast-energy-card .chart-stage,
  .forecast-period-card .chart-stage,
  .forecast-wind-card .chart-stage,
  body.surf-view-selected .forecast-energy-card .chart-stage,
  body.surf-view-selected .forecast-period-card .chart-stage,
  body.surf-view-selected .forecast-wind-card .chart-stage {
    min-height: 264px;
  }

  .forecast-energy-stage .forecast-matrix-shell.is-energy,
  .forecast-period-stage .forecast-matrix-shell.is-period,
  .forecast-wind-stage .forecast-matrix-shell.is-wind,
  body.surf-view-selected .forecast-energy-stage .forecast-matrix-shell.is-energy,
  body.surf-view-selected .forecast-period-stage .forecast-matrix-shell.is-period,
  body.surf-view-selected .forecast-wind-stage .forecast-matrix-shell.is-wind {
    --matrix-stage-height: 182px;
  }

  .forecast-wind-stage .forecast-matrix-shell.is-wind .forecast-matrix-slot-dir {
    gap: 2px;
  }

  .forecast-wind-stage .forecast-matrix-shell.is-wind .forecast-matrix-slot-dir-label {
    font-size: 0.44rem;
  }
}

/* ─────────────────────────────────────────────────────────────
   MAPA + PLOT DO PICO — cleanup profissional/minimal
   ───────────────────────────────────────────────────────────── */

.spot-map-card .secondary-section-body {
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.78fr);
  gap: 10px;
}

.spot-map-toolbar {
  align-items: center;
  gap: 8px;
}

.spot-map-copy {
  font-size: 0.72rem;
  line-height: 1.34;
  color: rgba(20, 23, 28, 0.58);
  max-width: 34ch;
}

.spot-map-view-tabs {
  padding: 2px;
  background: #fff;
  border: 1px solid rgba(20, 23, 28, 0.1);
  box-shadow: none;
}

.spot-map-view-btn {
  min-height: 28px;
  padding: 0 10px;
  font-size: 0.58rem;
}

.spot-map-view-btn.is-active {
  background: #eef5f5;
  color: var(--accent-deep);
  box-shadow: none;
}

.spot-map-stage {
  border-radius: 14px;
  border: 1px solid rgba(20, 23, 28, 0.1);
  background: linear-gradient(180deg, #f8fbfb, #edf4f4);
  box-shadow: none;
}

.spot-map-card[data-mode="spectrum"] .spot-map-stage {
  background: linear-gradient(180deg, rgba(238, 247, 247, 0.78), rgba(232, 243, 243, 0.74));
}

.spot-map-card[data-mode="spectrum"] .spot-map-leaflet .leaflet-tile-pane {
  opacity: 0.76;
}

.spot-map-card[data-mode="spectrum"] .spot-map-canvas {
  mix-blend-mode: multiply;
}

.spot-map-stage::after {
  inset: 8px;
  border-radius: 10px;
  border-color: rgba(20, 23, 28, 0.06);
}

.spot-map-meta {
  grid-template-columns: 1fr;
  gap: 6px;
}

.spot-map-stat {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid rgba(20, 23, 28, 0.08);
  background: #fff;
  box-shadow: none;
}

.spot-map-stat p {
  display: none;
}

.spot-map-stat span {
  font-size: 0.5rem;
}

.spot-map-stat strong {
  margin-top: 2px;
  font-size: 0.86rem;
}

.chart-card,
.ocean-stage-card {
  padding: 14px;
}

.chart-card-head {
  gap: 4px;
}

.chart-card-head h3 {
  margin-top: 3px;
  font-size: 0.98rem;
}

.chart-note {
  margin: 0 0 8px;
  padding: 4px 10px;
  font-size: 0.68rem;
  line-height: 1.25;
  border-radius: 999px;
  background: #fff;
  border: 1px solid rgba(20, 23, 28, 0.08);
}

.ocean-stage-card .chart-note {
  background: rgba(255, 255, 255, 0.9);
  color: rgba(20, 23, 28, 0.72);
}

.forecast-matrix-copy,
.forecast-matrix-keys {
  display: none;
}

@media (max-width: 980px) {
  .spot-map-card .secondary-section-body {
    grid-template-columns: 1fr;
  }

  .spot-map-copy {
    max-width: none;
  }
}

.spot-map-slicer {
  display: grid;
  gap: 8px;
  grid-column: 1 / -1;
}

.spot-map-slicer-days {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(94px, 1fr);
  gap: 6px;
  overflow-x: auto;
  padding-bottom: 2px;
  scrollbar-width: thin;
  scroll-snap-type: x proximity;
}

.spot-map-day-pill {
  min-height: 30px;
  padding: 0 10px;
  border-radius: 999px;
  border: 1px solid rgba(20, 23, 28, 0.12);
  background: rgba(255, 255, 255, 0.94);
  color: rgba(20, 23, 28, 0.7);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
  scroll-snap-align: start;
}

.spot-map-day-pill.is-active {
  border-color: rgba(20, 23, 28, 0.24);
  background: rgba(20, 23, 28, 0.1);
  color: var(--accent-deep);
}

.spot-map-slicer-hour {
  display: grid;
  gap: 5px;
}

.spot-map-hour-slider {
  width: 100%;
}

.spot-map-hour-label {
  margin: 0;
  color: rgba(20, 23, 28, 0.62);
  font-family: var(--font-mono);
  font-size: 0.56rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.spot-map-card[data-mode="spectrum"] .spot-map-stage {
  aspect-ratio: 1.18 / 1;
  min-height: 430px;
}

.spot-map-card[data-mode="spectrum"] .spot-map-canvas {
  filter: contrast(1.04) saturate(1.03);
}

@media (max-width: 980px) {
  .spot-map-card[data-mode="spectrum"] .spot-map-stage {
    aspect-ratio: 1.04 / 1;
    min-height: 380px;
  }
}

@media (max-width: 720px) {
  .spot-map-card[data-mode="spectrum"] .spot-map-stage {
    aspect-ratio: 1 / 1;
    min-height: 320px;
  }
}

/* ─────────────────────────────────────────────────────────────
   Tarefa 18 — Refino plot-first
   ───────────────────────────────────────────────────────────── */

/* Score como chip pequeno no header do pico */
.detail-chips {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  flex-shrink: 0;
}

/* Tooltips e labels sobre o Leaflet */
.dir-label-overlay {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  pointer-events: none;
}

.spot-detail-score-box {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.sdsb-body {
  display: flex;
  align-items: center;
  gap: 8px;
}

.sdsb-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 2px;
}

.sdsb-live {
  font-family: var(--font-body);
  font-size: 8px;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--muted);
  letter-spacing: 0.05em;
  display: flex;
  align-items: center;
  gap: 4px;
}

.sdsb-time {
  font-family: var(--font-body);
  font-size: 10px;
  color: var(--soft);
  white-space: nowrap;
}

.sdsb-score {
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 800;
  color: var(--text);
  line-height: 0.8;
  letter-spacing: -0.02em;
}

.score-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 42px;
  padding: 5px 12px;
  border-radius: 20px;
  border: 1px solid rgba(20, 23, 28, 0.18);
  background: rgba(61, 139, 132, 0.09);
  font-family: var(--font-display);
  font-size: 0.86rem;
  font-weight: 800;
  color: var(--accent-deep);
  letter-spacing: -0.01em;
}

/* Cabeçalho compacto dos plots técnicos — só eyebrow, sem h3/p */
.compact-chart-head {
  padding-bottom: 6px;
  margin-bottom: 4px;
}

.compact-chart-head .eyebrow {
  font-size: 0.52rem;
  letter-spacing: 0.12em;
  color: var(--soft);
}

/* Strip auxiliar horizontal — decision, janelas, compare, ranking, alerta */
.aux-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 12px;
  margin-top: 4px;
  border-top: 1px solid rgba(20, 23, 28, 0.07);
}

.aux-strip-item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 9px 11px;
  border-radius: 12px;
  border: 1px solid rgba(20, 23, 28, 0.08);
  background: rgba(255, 255, 255, 0.72);
  min-width: 120px;
  flex: 1 1 auto;
}

.aux-strip-item .mini-label {
  font-size: 0.48rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--soft);
}

.aux-strip-item strong {
  font-family: var(--font-display);
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--accent-deep);
}

.aux-strip-item[data-decision-card][data-tone="go"] {
  border-color: rgba(61, 139, 132, 0.28);
  background: rgba(61, 139, 132, 0.06);
}

.aux-strip-item[data-decision-card][data-tone="watch"] {
  border-color: rgba(158, 92, 84, 0.24);
  background: rgba(158, 92, 84, 0.05);
}

/* Botão fantasma pequeno para o strip */
.ghost-btn--sm {
  min-height: 26px;
  padding: 0 10px;
  font-size: 0.58rem;
  border-radius: 8px;
  align-self: flex-start;
  margin-top: 2px;
}

/* Ocultar elementos com copy vazia */
.spot-map-copy:empty,
.chart-copy:empty,
.forecast-panel-support:empty,
.forecast-control-copy:empty,
.forecast-control-meta:empty {
  display: none;
}

/* hero-kpi-grid mais compacto */
.hero-kpi-grid {
  gap: 6px;
  margin-top: 6px;
}

.hero-kpi-card {
  padding: 6px 8px;
}

@media (max-width: 640px) {
  .aux-strip {
    flex-direction: column;
  }

  .aux-strip-item {
    min-width: 0;
  }
}

/* ─────────────────────────────────────────────────────────────
   Refino extra — menos texto, menos box solto, plot mais claro
   ───────────────────────────────────────────────────────────── */

.forecast-matrix-shell.is-overview .forecast-matrix-copy,
.forecast-matrix-shell.is-overview .forecast-matrix-keys,
.forecast-matrix-shell.is-overview .forecast-matrix-focus {
  display: none;
}

.forecast-matrix-shell.is-overview .forecast-matrix-glance-card {
  gap: 4px;
}

.forecast-matrix-shell.is-overview .forecast-matrix-glance-meta {
  font-size: 0.62rem;
}

.forecast-matrix-shell.is-overview .forecast-matrix-day-chip {
  max-width: 74px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.forecast-matrix-shell.is-overview .forecast-matrix-slot-energy {
  justify-content: center;
  min-height: 18px;
  padding-inline: 0;
  border: 0;
  background: transparent;
  color: rgba(20, 23, 28, 0.48);
}

.forecast-matrix-shell.is-overview .forecast-matrix-slot-energy::before {
  display: none;
}

.forecast-matrix-shell.is-overview .forecast-matrix-slot-energy span {
  font-size: 0.45rem;
  letter-spacing: 0.08em;
}

body.surf-view-selected .forecast-focus-card {
  display: none !important;
}

body.surf-view-selected .forecast-focus-grid {
  gap: 0;
}

/* ─────────────────────────────────────────────────────────────
   Redesign minimalista — plot first
   ───────────────────────────────────────────────────────────── */

/* Hero desaparece quando pico está aberto */
body.surf-view-selected .hero-card {
  display: none;
}

/* Pico aberto = foco total nos gráficos: a análise ocupa a PÁGINA INTEIRA e o
   browser sai do fluxo (trocar pico pelo botão "Trocar pico" no cabeçalho). */
body.surf-view-selected .workspace-grid:not(.is-search-mode) .browser-panel {
  display: none;
}

@media (min-width: 1024px) {
  body.surf-view-selected .workspace-grid:not(.is-search-mode) {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* Cabeçalho direto nas seções secundárias (h2 sem div wrapper) */
.secondary-section-summary h2 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--text);
}

/* Toolbar do mapa sem copy — só tabs alinhadas à direita */
.spot-map-toolbar {
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

/* Hero simplificado no modo busca */
body.surf-view-search .hero-card {
  padding-bottom: 10px;
}

/* section-head h2 sem eyebrow acima — reset margem top */
.section-head > div > h2:first-child,
.section-head > h2:first-child {
  margin-top: 0;
}

/* Section head no browser — título direto, sem overhead */
.controls-card .section-head h2 {
  font-size: clamp(1rem, 2.2vw, 1.14rem);
}

/* Separação visual entre gráfico principal e linha técnica */
body.surf-view-selected .forecast-energy-card {
  border-top: 1px solid var(--border);
  padding-top: 14px;
  margin-top: 4px;
}

/* Linha técnica — 3 plots lado a lado em telas largas */
@media (min-width: 1200px) {
  body.surf-view-selected .forecast-ocean-pane {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  body.surf-view-selected .forecast-focus-grid {
    grid-column: 1 / -1;
  }

  body.surf-view-selected .forecast-energy-card {
    border-top: 0;
    padding-top: 0;
    margin-top: 0;
    grid-column: 1;
  }

  body.surf-view-selected .forecast-period-card {
    grid-column: 2;
  }

  body.surf-view-selected .forecast-wind-card {
    grid-column: 3;
  }

  body.surf-view-selected .aux-strip {
    grid-column: 1 / -1;
  }
}

/* ═══════════════════════════════════════════════════════════════
   SURFLINE-STYLE — Design & Usability v2
   Cores de condição como semáforo, topbar sticky, stripe de score,
   nome dominante, chevron nos accordions, busca mais focada.
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. Score palette: escala de 5 níveis (cinza → cor; a cor só
   aparece quando o mar vale a pena, mantendo o chrome mono) ──── */
:root {
  --score-flat:      #aeb6bf;  /* flat: cinza claro */
  --score-weak:      #6b7480;  /* fraco: grafite */
  --score-fair:      #c98a2b;  /* regular: âmbar */
  --score-good:      #3f9d5a;  /* bom: verde */
  --score-excellent: #0e7d86;  /* excelente: teal profundo */
}

/* ── 2. Topbar: sticky full-bleed com glass blur ─────────────── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 300;
  width: 100%;
  /* alinha conteúdo com a margem do surf-shell (max 1460px, 16px cada lado) */
  padding: 9px max(16px, calc((100vw - 1460px) / 2));
  background: rgba(242, 247, 246, 0.9);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}

/* surf-shell não precisa mais do gap do topbar */
.surf-shell {
  padding-top: 22px;
}

/* ── 3. Spot cards: linha fina no TOPO colorida pelo score (mono) ── */
.spot-card[data-band] {
  border-top-width: 2px;
}

.spot-card[data-band="excellent"] { border-top-color: var(--score-excellent); }
.spot-card[data-band="good"]      { border-top-color: var(--score-good); }
.spot-card[data-band="fair"]      { border-top-color: var(--score-fair); }
.spot-card[data-band="weak"]      { border-top-color: var(--score-weak); }
.spot-card[data-band="flat"]      { border-top-color: var(--score-flat); }
.spot-card[data-band="none"]      { border-top-color: var(--border-mid); }

/* card ativo: realce na linha do topo com a cor da marca */
.spot-card[data-band].is-active {
  border-top-color: var(--accent);
  box-shadow: none;
}

/* ── 4. Score pill na lista: mais legível ─────────────────────── */
.spot-list-score {
  font-size: 0.7rem;
  font-weight: 800;
  height: 28px;
  min-width: 36px;
  border-radius: 8px;
  border-width: 1.5px;
  letter-spacing: -0.01em;
}

body.surf-view-search .spot-list-score {
  font-size: 0.84rem;
  height: 34px;
  min-width: 46px;
  border-radius: 10px;
}

/* ── 5. Nome do pico: dominante quando spot está aberto ──────── */
body.surf-view-selected .detail-top h2 {
  font-size: clamp(1.56rem, 2.8vw, 2.1rem);
  font-weight: 860;
  letter-spacing: -0.04em;
  line-height: 0.95;
}

body.surf-view-selected .detail-top .eyebrow {
  font-size: 0.6rem;
  letter-spacing: 0.16em;
  color: var(--accent);
  opacity: 0.9;
}

body.surf-view-selected .detail-location {
  font-size: 0.78rem;
  margin-top: 4px;
}

/* ── 6. Score chip: mais destaque ────────────────────────────── */
body.surf-view-selected .score-chip {
  font-size: 1.08rem;
  font-weight: 880;
  min-width: 54px;
  padding: 7px 13px;
  border-radius: 22px;
  border-width: 1.5px;
  background: transparent;
  letter-spacing: -0.025em;
}

/* ── 7. Day pills: mais altura, score mais visível ───────────── */
.forecast-day-pill {
  min-height: 66px;
  padding: 10px 12px;
}

.forecast-day-pill-title {
  font-size: 0.8rem;
  font-weight: 860;
  letter-spacing: -0.01em;
}

.forecast-day-pill-score {
  font-size: 0.54rem;
  font-weight: 800;
}

/* ── 8. Accordion <details>: chevron limpo ───────────────────── */
details.secondary-section > summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-bottom: 10px;
  margin-bottom: 12px;
  border-bottom: 1px solid var(--border);
  user-select: none;
}

details.secondary-section > summary::-webkit-details-marker,
details.secondary-section > summary::marker {
  display: none;
}

details.secondary-section > summary::after {
  content: "";
  flex-shrink: 0;
  width: 16px;
  height: 16px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(81%2C101%2C100%2C0.5)' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  background-position: center;
  transition: transform 0.22s ease;
}

details.secondary-section[open] > summary::after {
  transform: rotate(180deg);
}

/* ── 9. Search mode: busca maior e mais focada ───────────────── */
body.surf-view-search .search-input {
  min-height: 52px;
  font-size: 0.94rem;
  padding-left: 46px;
  border-radius: 26px;
  box-shadow: 0 4px 20px rgba(20, 23, 28, 0.07);
}

body.surf-view-search .search-icon {
  width: 18px;
  height: 18px;
  left: 16px;
}

/* ── 10. Hero no modo busca: centralizado e simples ──────────── */
body.surf-view-search .hero-card {
  text-align: center;
}

body.surf-view-search .hero-copy {
  display: flex;
  flex-direction: column;
  align-items: center;
}

body.surf-view-search .hero-copy h1 {
  font-size: clamp(1.14rem, 2.8vw, 1.48rem);
  max-width: 30ch;
  color: var(--text-2);
}

body.surf-view-search .hero-step-row {
  justify-content: center;
}

/* ── 11. Sidebar compacta em modo análise ────────────────────── */
@media (min-width: 1024px) {
  body.surf-view-selected .spot-list {
    gap: 6px;
  }

  body.surf-view-selected .spot-card {
    padding: 9px 12px 9px 11px;
    border-radius: 10px;
  }

  body.surf-view-selected .spot-card-name {
    font-size: 0.82rem;
    letter-spacing: -0.01em;
  }

  body.surf-view-selected .spot-card-location {
    font-size: 0.66rem;
  }

  body.surf-view-selected .spot-list-score {
    height: 24px;
    min-width: 32px;
    font-size: 0.6rem;
    border-radius: 7px;
    border-width: 1.5px;
  }

  /* remove o override que força !important cinza no score */
  body.surf-view-selected .spot-list-score {
    color: unset;
    border-color: unset;
  }
}

/* ── 12. Métrica no header do pico: números mais fortes ─────── */
body.surf-view-selected .detail-card .metric-card strong {
  font-size: 0.9rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* ── 13. Marca na topbar: mais peso ──────────────────────────── */
.brand-wordmark {
  font-size: 1.12rem;
  font-weight: 900;
  letter-spacing: 0.1em;
}

/* ── 14. Rodapé da grade secundária: mais espaço ─────────────── */
.analysis-secondary-grid {
  gap: 14px;
}

/* ── 15. Mobile: ajustes empilhados ──────────────────────────── */
@media (max-width: 768px) {
  .topbar {
    padding: 10px 16px;
  }

  body.surf-view-selected .detail-top h2 {
    font-size: clamp(1.36rem, 6vw, 1.72rem);
  }

  body.surf-view-selected .score-chip {
    font-size: 0.94rem;
    min-width: 46px;
    padding: 6px 11px;
  }

  body.surf-view-search .search-input {
    min-height: 48px;
    font-size: 0.9rem;
    border-radius: 24px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   DETALHE DO PICO — Surfline-style header e forecast refinements
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. Score chip: rótulo de condição colorido (dominante) + nota
   minúscula por baixo (mantida para ranking, de-enfatizada) ───── */
body.surf-view-selected .score-chip {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 5px;
  font-size: inherit;
  line-height: 1;
  padding: 0;
  min-width: 0;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
}

body.surf-view-selected .score-chip::after {
  content: none;
}

body.surf-view-selected .score-chip .scr-chip {
  padding: 8px 18px;
  font-size: 1.18rem;
  font-weight: 800;
  border-radius: 999px;
  letter-spacing: 0.005em;
}

body.surf-view-selected .score-chip .scr-score {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--soft);
}

/* Mobile: chip um pouco menor */
@media (max-width: 980px) {
  body.surf-view-selected .score-chip .scr-chip {
    font-size: 1.02rem;
    padding: 7px 15px;
  }
}

/* ── 2. Eyebrow do header: só o estado, teal discreto ───────────── */
body.surf-view-selected .detail-top .eyebrow {
  font-size: 0.58rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  font-weight: 800;
  opacity: 0.88;
}

/* ── 3. Nome do pico: mais espaço e alinhamento ─────────────────── */
body.surf-view-selected .detail-top h2 {
  margin-top: 1px;
  font-size: clamp(1.6rem, 2.8vw, 2.1rem);
  font-weight: 860;
  letter-spacing: -0.04em;
  line-height: 0.94;
}

/* ── 4. Localização: um pouco mais visível ───────────────────────── */
body.surf-view-selected .detail-location {
  margin-top: 5px;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--muted);
  letter-spacing: 0.01em;
}

/* ── 5. Métricas (onda / vento / maré): valores maiores ─────────── */
body.surf-view-selected .detail-card .metric-card span {
  font-size: 0.52rem;
  letter-spacing: 0.14em;
  color: rgba(20, 23, 28, 0.52);
}

body.surf-view-selected .detail-card .metric-card strong {
  font-size: 1.02rem;
  font-weight: 820;
  color: var(--text);
  letter-spacing: -0.02em;
  margin-top: 5px;
}

/* Caixa de métricas: mais padded e clean */
body.surf-view-selected .detail-card .detail-metrics {
  padding: 13px 16px;
  border-radius: 16px;
  border-color: var(--border);
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248,252,252,0.94));
}

/* ── 6. "DIA SELECIONADO" label: remover — redundante ───────────── */
.forecast-control-active .forecast-control-label {
  display: none;
}

/* Active note: data do dia mais bold */
.forecast-control-active strong {
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.01em;
}

/* Badges da note: mais clean */
.forecast-control-active .forecast-control-badge {
  font-size: 0.64rem;
  font-weight: 700;
  padding: 0 9px;
}

.forecast-control-active .forecast-control-signal {
  font-size: 0.64rem;
  font-weight: 600;
}

/* ── 7. Day pills: active mais forte, score melhor integrado ─────── */
.forecast-day-pill::before {
  height: 3px;
}

.forecast-day-pill.is-active {
  background: rgba(255, 255, 255, 1);
  border-color: color-mix(in srgb, var(--day-accent) 28%, rgba(17, 17, 17, 0.06));
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--day-accent) 16%, transparent),
    0 6px 18px rgba(17, 17, 17, 0.07);
}

/* Score no pill: alinhado à direita com a cor do dia */
.forecast-day-pill-score {
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  color: color-mix(in srgb, var(--day-accent) 82%, #0b2527);
  background: color-mix(in srgb, var(--day-accent) 12%, white);
  border: 1px solid color-mix(in srgb, var(--day-accent) 28%, rgba(20, 23, 28, 0.08));
  min-height: 18px;
  padding: 0 6px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
}

/* ── 8. KPI strip (MELHOR JANELA / VENTO / PULSO): mais destaque ── */
body.surf-view-selected .forecast-matrix-glance-value {
  font-size: 1.06rem;
  font-weight: 840;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

body.surf-view-selected .forecast-matrix-glance-meta {
  font-size: 0.72rem;
  margin-top: 1px;
}

body.surf-view-selected .forecast-matrix-glance-kicker {
  font-size: 0.58rem;
  letter-spacing: 0.1em;
}

body.surf-view-selected .forecast-matrix-glance-card {
  padding: 13px 14px 12px;
  border-radius: 16px;
}

/* ── 9. Forecast control shell: ritmo mais clean ─────────────────── */
.forecast-control-shell {
  gap: 8px;
}

/* ── 10. "GRÁFICO PRINCIPAL" kicker: remove — o chart fala por si ── */
body.surf-view-selected .forecast-matrix-shell.is-overview .forecast-matrix-kicker {
  display: none;
}

/* Toolbar do matrix só tem o kicker em overview → oculta inteiro */
body.surf-view-selected .forecast-matrix-shell.is-overview .forecast-matrix-toolbar {
  display: none;
}

/* Mas mantém o glance (KPI strip) que é realmente útil */
body.surf-view-selected .forecast-matrix-glance {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}

/* ── 11. Forecast view tabs (Leitura / 15 Dias): menos overhead ─── */
body.surf-view-selected .forecast-card.is-single-page .forecast-view-tabs {
  margin-top: 4px;
}

/* ── 12. Separador entre detalhe e forecast: limpo ───────────────── */
body.surf-view-selected .analysis-panel > .forecast-card {
  padding-top: 14px;
  border-top-color: var(--border);
}

/* ═══════════════════════════════════════════════════════════════
   CHART PREMIUM REFINEMENTS — Surfline-style plots
   Elimina sobreposição, card-dentro-de-card e labels duplicados.
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. Charts compactos (Energia/Período/Vento): sem kicker interno
        O outer eyebrow do chart-card-head já identifica o chart ──── */
.forecast-matrix-shell.is-compact .forecast-matrix-toolbar {
  display: none;
}

/* ── 2. Day-head nos charts compactos: transparente, sem "card" ──── */
.forecast-matrix-shell.is-compact .forecast-matrix-day-head {
  background: transparent;
  box-shadow: none;
  min-height: 0;
  padding: 7px 10px 5px;
}

.forecast-matrix-shell.is-compact .forecast-matrix-day-head::after {
  opacity: 0.5;
}

/* Active day: realce sutil sem criar card separado */
.forecast-matrix-shell.is-compact .forecast-matrix-day.is-active .forecast-matrix-day-head {
  background: rgba(20, 23, 28, 0.04);
  box-shadow: none;
}

/* ── 3. Meta text (ex: "370J • 5s • E") nos charts compactos:
        redundante — a info está visível nas barras ──────────────── */
.forecast-matrix-shell.is-compact .forecast-matrix-day-meta {
  display: none;
}

/* ── 4. Day chip nos charts compactos: só no dia ativo ─────────── */
.forecast-matrix-shell.is-compact .forecast-matrix-day:not(.is-active) .forecast-matrix-day-chip {
  display: none;
}

.forecast-matrix-shell.is-compact .forecast-matrix-day-chip {
  font-size: 0.52rem;
  min-height: 20px;
  padding: 0 6px;
}

/* ── 5. Dia inativo: só nome do dia, data suave ─────────────────── */
.forecast-matrix-shell.is-compact .forecast-matrix-day:not(.is-active) .forecast-matrix-day-kicker {
  font-size: 0.7rem;
  color: var(--muted);
  font-weight: 700;
}

.forecast-matrix-shell.is-compact .forecast-matrix-day:not(.is-active) .forecast-matrix-day-date {
  font-size: 0.5rem;
}

/* ── 6. Altura das barras nos charts compactos: mais espaço visual ─ */
.forecast-matrix-shell.is-compact {
  --matrix-stage-height: 155px;
  gap: 8px;
}

/* ── 7. Slot grid: padding reduzido para chart respirar ─────────── */
.forecast-matrix-shell.is-compact .forecast-matrix-slot-grid {
  gap: 6px;
  padding: 8px 8px 6px;
}

/* ── 8. Slot: range label menor ──────────────────────────────────── */
.forecast-matrix-shell.is-compact .forecast-matrix-slot-range {
  font-size: 0.5rem;
  letter-spacing: 0.04em;
}

/* ── 9. Vento: esconde quality label (MARAL/TERRAL) em compact ───── */
/* A qualidade já aparece no chip do day-head; redundante nos slots */
.forecast-matrix-shell.is-compact.is-wind .forecast-wind-slot-quality {
  display: none;
}

/* Direção: menor e mais sutil */
.forecast-matrix-shell.is-compact.is-wind .forecast-wind-slot-direction {
  min-height: 18px;
  padding: 0 5px;
  font-size: 0.44rem;
  gap: 2px;
}

/* Slot meta do vento: menos gap */
.forecast-matrix-shell.is-compact.is-wind .forecast-wind-slot-meta {
  gap: 2px;
}

/* ── 10. Outer chart-card eyebrow: mais destaque como único label ─ */
.chart-card-analytic .compact-chart-head {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 2px;
}

.chart-card-analytic .compact-chart-head .eyebrow {
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  color: var(--accent);
  font-weight: 800;
}

/* ── 11. Chart-stage dos charts analíticos: menos padding interno ─ */
body.surf-view-selected .chart-card-analytic .chart-stage {
  padding: 2px 0 4px;
}

/* ── 12. Slot wave value: alinhamento limpo ─────────────────────── */
.forecast-matrix-shell.is-compact .forecast-matrix-slot-wave {
  font-size: 0.82rem;
  letter-spacing: -0.02em;
}

/* ── 13. Aux strip: esconde Ranking (duplica Comparação) ─────────── */
[data-spot-ranking] {
  display: none;
}

/* ── 14. Aux strip: items mais compactos ─────────────────────────── */
.aux-strip {
  gap: 6px;
  padding-top: 10px;
}

.aux-strip-item {
  min-width: 100px;
  padding: 8px 10px;
  border-radius: 10px;
}

.aux-strip-item .mini-label {
  font-size: 0.44rem;
  letter-spacing: 0.1em;
}

.aux-strip-item strong {
  font-size: 0.84rem;
  line-height: 1.1;
}

/* Decision card: "vale a pena" mais limpo */
[data-decision-card] strong {
  font-size: 0.96rem;
  font-weight: 820;
  font-family: var(--font-display);
  letter-spacing: -0.01em;
}

/* Confiança: valor grande */
[data-confidence-badge] strong {
  font-size: 1.08rem;
  font-weight: 860;
  font-family: var(--font-display);
  letter-spacing: -0.02em;
}

/* ── 15. Top 3 janelas: scores com cor da condição ───────────────── */
.top-window-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 4px 8px;
  padding: 7px 10px;
}

/* ── 16. Comparison: layout mais limpo ───────────────────────────── */
.spot-compare-item {
  padding: 7px 9px;
}

/* ── 17. Main chart overview: day-head mais sutil, não tanto card ── */
.forecast-matrix-shell.is-overview .forecast-matrix-day-head {
  background: rgba(255, 255, 255, 0.7);
}

.forecast-matrix-shell.is-overview .forecast-matrix-day.is-active .forecast-matrix-day-head {
  background: rgba(255, 255, 255, 0.96);
}

/* ── 18. Slot stage (barra): borda mais sutil nos charts compactos ─ */
.forecast-matrix-shell.is-compact .forecast-matrix-slot-stage {
  border-color: rgba(17, 17, 17, 0.04);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.7),
    0 4px 10px rgba(17, 17, 17, 0.02);
  border-radius: 12px 12px 8px 8px;
}

/* ═══════════════════════════════════════════════════════════════
   LINHA TÉCNICA — 2 colunas + Vento full-width
   Energia e Período lado a lado (~400px cada).
   Vento full-width (828px) — sem charts espremidos.
   Override definitivo do 3-col da sessão anterior.
   ═══════════════════════════════════════════════════════════════ */

@media (min-width: 1024px) {

  /* 2-col: desfaz o repeat(3) anterior */
  body.surf-view-selected .forecast-ocean-pane {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px 20px;
  }

  /* Gráfico principal: toda a largura */
  body.surf-view-selected .forecast-focus-grid  { grid-column: 1 / -1; }

  body.surf-view-selected .tech-tracks-card { grid-column: 1 / -1; }

  /* Energia col-1, Período col-2 */
  body.surf-view-selected .forecast-energy-card { grid-column: 1; }
  body.surf-view-selected .forecast-period-card { grid-column: 2; }

  /* Vento: toda a largura */
  body.surf-view-selected .forecast-wind-card   { grid-column: 1 / -1; }

  /* Aux strip: toda a largura */
  body.surf-view-selected .aux-strip            { grid-column: 1 / -1; }
}

/* ── Barras mais altas nos charts largos (2-col = ~400px) ──────── */
@media (min-width: 1024px) {
  body.surf-view-selected .forecast-energy-card .forecast-matrix-shell.is-compact,
  body.surf-view-selected .forecast-period-card .forecast-matrix-shell.is-compact {
    --matrix-stage-height: 180px;
  }

  /* Vento full-width: barras mais baixas + largas = leitura direcional */
  body.surf-view-selected .forecast-wind-card .forecast-matrix-shell.is-compact {
    --matrix-stage-height: 110px;
  }
}

/* ── Separadores visuais antes de cada bloco técnico ──────────── */
body.surf-view-selected .forecast-energy-card,
body.surf-view-selected .forecast-period-card {
  border-top: 1px solid var(--border);
  padding-top: 18px !important;
  margin-top: 6px;
}

body.surf-view-selected .forecast-wind-card {
  border-top: 1px solid var(--border);
  padding-top: 16px;
  margin-top: 0;
}

/* Reset regras conflitantes do 3-col anterior */
@media (min-width: 1200px) {
  body.surf-view-selected .forecast-energy-card {
    border-top: 1px solid var(--border) !important;
    padding-top: 18px !important;
    margin-top: 6px !important;
  }
}

/* ── chart-card (card branco): padding mais confortável ─────────── */
body.surf-view-selected .forecast-energy-card .chart-card,
body.surf-view-selected .forecast-period-card .chart-card,
body.surf-view-selected .forecast-wind-card .chart-card {
  padding: 16px 18px 14px;
  border-radius: 22px;
}

/* ── chart-card-head: eyebrow mais proeminente ───────────────────── */
body.surf-view-selected .chart-card-analytic .compact-chart-head {
  margin-bottom: 6px;
  padding-bottom: 10px;
}

/* ── Vento full-width: slot grid mais generoso ────────────────── */
body.surf-view-selected .forecast-wind-card .forecast-matrix-slot-grid {
  gap: 10px;
  padding: 10px 12px 8px;
}

/* ── Vento full-width: day-head mais clean ───────────────────── */
body.surf-view-selected .forecast-wind-card .forecast-matrix-day-head {
  padding: 8px 14px 6px;
}

/* ═══════════════════════════════════════════════════════════════
   AUX STRIP — Layout equilibrado
   ═══════════════════════════════════════════════════════════════ */

body.surf-view-selected .aux-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: stretch;
  gap: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
  margin-top: 6px;
}

/* Decision (Vale a pena) — destaque */
[data-decision-card] {
  flex: 1.2 1 120px;
  min-width: 120px;
}

[data-decision-card] .mini-label {
  font-size: 0.42rem;
}

[data-decision-card] strong {
  font-size: 1rem;
  font-weight: 820;
  font-family: var(--font-display);
  letter-spacing: -0.015em;
}

/* Mobile: faixa auxiliar empilha — itens com altura natural (sem esticar) */
@media (max-width: 640px) {
  .aux-strip {
    align-items: stretch;
  }

  .aux-strip-item,
  [data-decision-card],
  [data-confidence-badge] {
    flex: 0 0 auto;
    max-width: none;
  }
}

/* Confiança — compacto, menor */
[data-confidence-badge] {
  flex: 0 0 auto;
  min-width: 80px;
  max-width: 100px;
  align-items: center;
  text-align: center;
}

[data-confidence-badge] strong {
  font-size: 1.28rem;
  font-weight: 880;
  font-family: var(--font-display);
  letter-spacing: -0.03em;
}

/* Top 3 Janelas — mais espaço, lista vertical */
[data-top-windows] {
  flex: 2 1 180px;
  min-width: 160px;
}

/* Comparação — mais espaço */
[data-spot-compare] {
  flex: 2 1 180px;
  min-width: 160px;
}

/* Alertas — compacto à direita */
[data-alert-cta] {
  flex: 0 0 auto;
  min-width: 90px;
  max-width: 120px;
  justify-content: center;
  align-items: center;
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════════
   SEÇÕES SECUNDÁRIAS — Maré e Histórico
   Quando expandidas, mostram conteúdo sem colapso visual
   ═══════════════════════════════════════════════════════════════ */

/* Tide e history no grid secundário: altura mínima quando open */
.tide-card[open] .secondary-section-body,
.history-card[open] .secondary-section-body {
  min-height: 200px;
}

/* Espectro·Mapa summary: título maior */
.spot-map-card .secondary-section-summary h2 {
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* ═══════════════════════════════════════════════════════════════
   GRÁFICO PRINCIPAL (overview) — Refinamentos finais
   ═══════════════════════════════════════════════════════════════ */

/* KPI glance cards (MELHOR JANELA / VENTO / PULSO): mais compactos */
body.surf-view-selected .forecast-matrix-glance {
  margin-bottom: 6px;
}

body.surf-view-selected .forecast-matrix-glance-card {
  padding: 11px 13px 10px;
}

/* Day chip no gráfico principal: mais clean */
.forecast-matrix-shell.is-overview .forecast-matrix-day-chip {
  font-size: 0.52rem;
  min-height: 20px;
  padding: 0 6px;
}

/* Scale de período no rodapé: menos domínio visual */
.forecast-period-scale {
  margin-top: 4px;
  padding-top: 6px;
}

.forecast-period-scale-label {
  font-size: 0.46rem;
  letter-spacing: 0.1em;
  opacity: 0.72;
}

/* ═══════════════════════════════════════════════════════════════
   FORECAST CARD — Espaçamento geral
   ═══════════════════════════════════════════════════════════════ */

/* Espaço antes dos day pills */
body.surf-view-selected .forecast-control-shell {
  margin-bottom: 4px;
}

/* View tabs (Leitura / 15 Dias): mais discreta */
body.surf-view-selected .forecast-view-btn {
  font-size: 0.6rem;
  min-height: 24px;
  padding: 0 10px;
}

/* ═══════════════════════════════════════════════════════════════
   Pico aberto: browser sai do fluxo (gráficos ocupam a página inteira).
   Voltar ao seletor pelo botão "Trocar pico" no cabeçalho da análise.
   ═══════════════════════════════════════════════════════════════ */
body.surf-view-selected .workspace-grid:not(.is-search-mode) .browser-panel {
  display: none;
}

/* Em telas estreitas (≤980px) o hero some e a análise era puxada para baixo da
   topbar fixa (53px); garante o respiro para o conteúdo não ficar oculto. */
@media (max-width: 980px) {
  body.surf-view-selected .analysis-rail {
    padding-top: 58px;
  }
}

/* ═══════════════════════════════════════════════════════════════
   LAYOUT REDESIGN v3 — Menos massivo, hierarquia de leitura clara
   ═══════════════════════════════════════════════════════════════ */

/* ── 1. Digest pane: comportamento de tab real ───────────────────
   O is-single-page mostrava TODOS os panes — isso causava 260px+
   a mais de conteúdo sempre visível (15 Dias embaixo do overview).
   Agora só o pane .is-active é renderizado, como tabs de verdade. */

body.surf-view-selected .forecast-card.is-single-page .forecast-view-pane {
  display: none;
}

body.surf-view-selected .forecast-card.is-single-page .forecast-view-pane.is-active {
  display: grid;
  gap: 14px;
  margin-top: 12px;
}

/* Remove o divider que separava os panes no modo single (não existe mais) */
body.surf-view-selected .forecast-card.is-single-page .forecast-view-pane + .forecast-view-pane {
  padding-top: 0;
  border-top: none;
}

/* ── 2. View tabs: parecem tabs de verdade com ativo destacado ─── */
body.surf-view-selected .forecast-card.is-single-page .forecast-view-tabs {
  align-self: start;
  padding: 3px;
  border: 1px solid var(--border);
}

body.surf-view-selected .forecast-view-btn.is-active {
  background: var(--accent-deep);
  color: #fff;
  border-color: var(--accent-deep);
  box-shadow: none;
}

/* ── 3. Remove o strip "DIA SELECIONADO" — info está no chart ─── */
body.surf-view-selected .forecast-control-active {
  display: none;
}

/* ── 4. Forecast control shell: mais compacto ────────────────── */
body.surf-view-selected .forecast-control-shell {
  gap: 6px;
}

/* ── 5. Day pills: mais baixos (66→50px) ─────────────────────── */
.forecast-day-pill {
  min-height: 50px;
  padding: 8px 10px;
}

.forecast-day-pill-title {
  font-size: 0.78rem;
}

.forecast-day-pill-date {
  font-size: 0.62rem;
  letter-spacing: 0.04em;
}

/* ── 6. KPI glance (MELHOR JANELA / VENTO / PULSO):
        agora uma faixa horizontal compacta, não 3 cards altos ─── */
body.surf-view-selected .forecast-matrix-glance {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  margin-bottom: 4px;
}

body.surf-view-selected .forecast-matrix-glance-card {
  padding: 7px 12px 6px;
  border-radius: 10px;
  gap: 2px;
}

body.surf-view-selected .forecast-matrix-glance-card::before {
  height: 2px;
}

body.surf-view-selected .forecast-matrix-glance-value {
  font-size: 0.96rem;
  font-weight: 820;
  line-height: 1;
}

body.surf-view-selected .forecast-matrix-glance-meta {
  font-size: 0.66rem;
  margin-top: 0;
}

body.surf-view-selected .forecast-matrix-glance-kicker {
  font-size: 0.52rem;
  letter-spacing: 0.08em;
}

/* ── 7. Label de seção "ANÁLISE TÉCNICA" acima dos charts ────── */
body.surf-view-selected .forecast-energy-card {
  position: relative;
}

body.surf-view-selected .forecast-energy-card::before {
  content: 'ANÁLISE TÉCNICA';
  position: absolute;
  top: -9px;
  left: 0;
  padding: 0 10px 0 0;
  background: var(--bg);
  font-family: var(--font-mono);
  font-size: 0.46rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--soft);
  opacity: 0.8;
}

/* ── 8. Aux strip: mais compacto e leve ─────────────────────── */
body.surf-view-selected .aux-strip {
  padding-top: 10px;
  gap: 7px;
}

body.surf-view-selected .aux-strip-item {
  padding: 7px 10px;
  min-width: 90px;
}

/* ── 9. HOME: remove texto redundante do browser stage ───────── */
.browse-stage-lead {
  display: none;
}

/* ── 10. HOME: spot cards no browse mais visuais ─────────────── */
.browse-chip {
  transition: background 0.14s, border-color 0.14s, box-shadow 0.14s;
  border-radius: var(--radius-md);
}

.browse-chip:hover,
.browse-chip:focus-visible {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  outline: none;
}

.browse-chip strong {
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -0.01em;
}

/* ── 11. HOME: search input mais proeminente no modo busca ────── */
body.surf-view-search .search-wrap {
  position: sticky;
  top: 52px;
  z-index: 10;
  background: rgba(255,255,255,0.96);
  backdrop-filter: blur(8px);
  padding: 6px 0;
  margin: 8px 0;
  border-radius: var(--radius-sm);
}

/* ── 12. HOME: nav meta mais clean sem overhead visual ───────── */
.nav-meta {
  gap: 6px;
  margin-top: 12px;
  padding-top: 10px;
}

.mini-label[data-nav-level-label] {
  font-size: 0.5rem;
  letter-spacing: 0.14em;
  color: var(--accent);
}

/* ── 13. Spot header: state eyebrow mais visível ─────────────── */
body.surf-view-selected .detail-top [data-detail-state] {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  color: var(--accent);
  font-weight: 800;
}

/* ── 14. Main chart: reduz gap interno para respirar ─────────── */
body.surf-view-selected .forecast-focus-grid {
  gap: 8px;
}

/* ── 15. Spot list no sidebar: mais limpo ────────────────────── */
body.surf-view-selected .list-card .section-head.compact-head {
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 8px;
}

body.surf-view-selected [data-results-kicker] {
  font-size: 0.46rem;
  letter-spacing: 0.16em;
  color: var(--accent);
}

/* ── 16. Responsive: mobile — digest tab também funciona ─────── */
@media (max-width: 768px) {
  body.surf-view-selected .forecast-card.is-single-page .forecast-view-pane {
    display: none;
  }
  body.surf-view-selected .forecast-card.is-single-page .forecast-view-pane.is-active {
    display: grid;
    gap: 12px;
    margin-top: 10px;
  }
}

/* ── Ajuste de Scroll: Previne que painéis fiquem atrás do topbar ── */
#spot-analysis,
#spot-browser,
.workspace-grid {
  scroll-margin-top: 90px;
}

@media (max-width: 768px) {
  #spot-analysis,
  #spot-browser,
  .workspace-grid {
    scroll-margin-top: 20px;
  }
}

/* ── 20. Auth Modal (Login/Cadastro) ─────────────── */
.auth-toggle-btn {
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-muted);
  font-family: var(--font-base);
  font-weight: 500;
  font-size: 0.9rem;
  cursor: pointer;
  padding: 6px 12px;
  border-radius: 20px;
  transition: all 0.2s;
}
.auth-toggle-btn:hover {
  background: var(--surface-hover);
  color: var(--text);
}
.auth-container {
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.auth-title {
  font-size: 1.4rem;
  margin: 0;
  font-weight: 600;
}
.auth-subtitle {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin: 0;
  line-height: 1.4;
}
.auth-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 12px;
}
.auth-field label {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text);
}
.auth-field input {
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-family: inherit;
  transition: border-color 0.2s;
}
.auth-field input:focus {
  outline: none;
  border-color: var(--brand);
}
.auth-submit-btn {
  width: 100%;
  padding: 12px;
  margin-top: 8px;
  font-size: 1rem;
}
.auth-switch-text {
  text-align: center;
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-top: 16px;
}
.auth-switch-text .text-link {
  background: none;
  border: none;
  color: var(--brand);
  font-weight: 500;
  cursor: pointer;
  padding: 0;
  font-size: inherit;
}
.auth-switch-text .text-link:hover {
  text-decoration: underline;
}
.auth-error {
  background: rgba(220, 53, 69, 0.1);
  color: #d32f2f;
  padding: 10px;
  border-radius: 8px;
  font-size: 0.9rem;
  border: 1px solid rgba(220, 53, 69, 0.2);
}
.auth-user-info {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 16px;
  background: var(--surface-alt);
  border-radius: 12px;
  margin-bottom: 20px;
}
.auth-avatar {
  width: 48px;
  height: 48px;
  background: var(--surface-hover);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
}
.auth-user-details {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.auth-user-details strong {
  font-size: 1.1rem;
}
.auth-user-details span {
  font-size: 0.85rem;
  color: var(--text-muted);
}
.pro-badge {
  display: inline-block;
  background: var(--brand);
  color: white !important;
  font-size: 0.7rem !important;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
  margin-top: 4px;
  width: fit-content;
}
.upgrade-btn {
  width: 100%;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  border: none;
}
.upgrade-btn:hover {
  background: linear-gradient(135deg, #059669 0%, #047857 100%);
}

/* ── Swell Geográfico — radar overlaid on the spot satellite ─────────────── */
.swell-geo-sat {
  width: 100%;
  aspect-ratio: 1 / 1;
  max-height: 460px;
  border-radius: 12px;
  overflow: hidden;
  background: var(--surface-hover, #eef1f4);
  z-index: 1;
}
.swell-geo-sat .leaflet-container {
  width: 100%;
  height: 100%;
  background: var(--surface-hover, #eef1f4);
}
/* Radar labels are styled inline; kill Leaflet's default white divIcon box. */
.swell-geo-sat .leaflet-div-icon {
  background: transparent;
  border: none;
}
/* Dark mode inverts the whole page; re-invert the satellite photo so it stays
   a real image (not a negative). Same trick as the dialogs. */
html.is-dark .swell-geo-sat {
  filter: invert(1) hue-rotate(180deg);
}

/* Day/hour scrubber under the radar — a draggable slider with a date label. */
.swell-geo-slicer {
  margin-top: 10px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.radar-range {
  width: 100%;
  height: 22px;
  margin: 0;
  cursor: pointer;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
}
.radar-range::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 999px;
  background: var(--border-color, #d8dee6);
}
.radar-range::-moz-range-track {
  height: 5px;
  border-radius: 999px;
  background: var(--border-color, #d8dee6);
}
.radar-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 16px;
  height: 16px;
  margin-top: -6px;
  border-radius: 50%;
  background: var(--accent-deep, #0b5258);
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.radar-range::-moz-range-thumb {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: var(--accent-deep, #0b5258);
  border: 2px solid #fff;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
}
.radar-range:focus {
  outline: none;
}
.radar-range-label {
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text, #1c2024);
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* Swell Geográfico color legend (what each cone color means). */
.swell-geo-legend {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 14px;
  margin-top: 8px;
}
.swell-geo-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 0.68rem;
  font-weight: 700;
  color: var(--text-soft, #6a7682);
}
.swell-geo-legend i {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  flex: 0 0 auto;
}

/* Map as a card beside the forecast chart (its own column in the overview). */
.forecast-map-card {
  padding: 16px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 248, 249, 0.96));
  border: 1px solid rgba(17, 17, 17, 0.06);
  box-shadow: 0 14px 30px rgba(17, 17, 17, 0.035), 0 1px 2px rgba(17, 17, 17, 0.02);
  display: flex;
  flex-direction: column;
  min-width: 0;
}
/* `.forecast-map-card { display:flex }` outranks the [hidden] UA rule, so the
   review gate's hidden attribute needs this to actually collapse the card. */
.forecast-map-card[hidden] {
  display: none !important;
}

/* Admin-only banner shown when the spot's radar is not yet reviewed/public. */
.map-review-badge {
  background: #fff4e0;
  color: #8a5a00;
  border: 1px solid #f0c674;
  border-radius: 8px;
  padding: 6px 10px;
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 600;
  text-align: center;
}
.forecast-map-card .swell-geo-title {
  margin: 0 0 10px;
}
.forecast-right-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-width: 0;
}
@media (min-width: 1024px) {
  /* Override the selected-view `1fr !important` so the map sits beside the chart. */
  body.surf-view-selected .forecast-ocean-pane .forecast-focus-grid {
    grid-template-columns: minmax(0, 1.85fr) minmax(300px, 0.72fr) !important;
    align-items: start;
  }
  /* Radar hidden (spot not reviewed) → chart spans the full width; the day
     summary flows full-width below it instead of leaving an empty column. */
  body.surf-view-selected .forecast-ocean-pane .forecast-focus-grid.is-mapless {
    grid-template-columns: 1fr !important;
  }
}

/* Detail metrics are now a full-width strip (the map moved next to the chart). */
body.surf-view-selected .detail-card .detail-content .detail-metrics {
  align-self: stretch;
}

/* Picos com mapa calibrado (map_reviewed): ícone discreto de localização ao lado do nome. */
.spot-map-flag {
  display: inline-flex;
  align-items: center;
  vertical-align: middle;
  margin-left: 6px;
  opacity: 0.5;
}
.spot-map-flag svg {
  width: 13px;
  height: 13px;
}
.spot-card:hover .spot-map-flag,
.spot-card.is-active .spot-map-flag {
  opacity: 0.85;
}
