/* hintfl.com - Florida Hurricane Intelligence
 *
 * Design language: NWS text-product heritage. Monospace is the DATA voice
 * (storm IDs, values, region codes); a heavy grotesque carries headings.
 * ENSO colors follow CPC convention: warm red El Nino, steel blue La Nina,
 * gray Neutral. Category chips borrow the Saffir-Simpson tracker ramp.
 * No JavaScript on public pages; every chart is HTML/CSS.
 */

:root {
  --paper: #f4f6f5;
  --panel: #fcfdfc;
  --ink: #17211e;
  --ink-soft: #55605c;
  --rule: #d6ddd9;
  --nino: #b23a2a;
  --nina: #2e5d9e;
  --neutral: #6d7673;
  --nino-wash: #f6e8e5;
  --nina-wash: #e6edf6;
  --neutral-wash: #eceeed;
  --cat1: #7aa5c9;
  --cat2: #8fb98a;
  --cat3: #d9b34a;
  --cat4: #cf7f3a;
  --cat5: #b23a5e;
  --mono: "SF Mono", "Cascadia Mono", Consolas, "Liberation Mono", Menlo, monospace;
  --sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--paper);
  background-image:
    linear-gradient(var(--rule) 1px, transparent 1px),
    linear-gradient(90deg, var(--rule) 1px, transparent 1px);
  background-size: 56px 56px;
  background-attachment: fixed;
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.55;
}

a { color: inherit; }
a:focus-visible { outline: 2px solid var(--nina); outline-offset: 2px; }

/* ---- chrome ------------------------------------------------------------ */

.site-header {
  background: var(--ink);
  color: var(--paper);
  padding: 14px 24px;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 28px;
}
.site-brand {
  font-family: var(--sans);
  font-weight: 800;
  font-size: 19px;
  letter-spacing: .04em;
  text-transform: uppercase;
  text-decoration: none;
}
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 22px; }
.site-nav a {
  font-family: var(--mono);
  font-size: 13px;
  text-decoration: none;
  opacity: .75;
  padding: 2px 0;
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { opacity: 1; }
.site-nav a.active { opacity: 1; border-bottom-color: var(--paper); }

.site-main { max-width: 1060px; margin: 0 auto; padding: 34px 24px 60px; }

.site-footer {
  border-top: 1px solid var(--rule);
  background: var(--panel);
  padding: 22px 24px 30px;
  font-size: 13px;
  color: var(--ink-soft);
  text-align: center;
}
.site-footer p { max-width: 1060px; margin: 4px auto; }
.footer-tieback a { font-family: var(--mono); font-size: 12px; }

/* ---- masthead (home) ---------------------------------------------------- */

.masthead { margin: 0 0 26px; }
.masthead img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 4px;
  border: 1px solid var(--rule);
}

/* ---- headings & copy --------------------------------------------------- */

h1 {
  font-weight: 800;
  font-size: clamp(26px, 4.4vw, 40px);
  line-height: 1.08;
  letter-spacing: .015em;
  text-transform: uppercase;
  margin: 0 0 10px;
}
h2 {
  font-weight: 800;
  font-size: 19px;
  letter-spacing: .05em;
  text-transform: uppercase;
  margin: 44px 0 14px;
}
.lede { max-width: 78ch; color: var(--ink-soft); margin: 0 0 8px; }
.kicker {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 6px;
}
.mono { font-family: var(--mono); }
.small { font-size: 13px; color: var(--ink-soft); }

/* ---- phase tokens ------------------------------------------------------ */

.ph-nino { --ph: var(--nino); --ph-wash: var(--nino-wash); }
.ph-nina { --ph: var(--nina); --ph-wash: var(--nina-wash); }
.ph-neutral { --ph: var(--neutral); --ph-wash: var(--neutral-wash); }
.ph-none { --ph: #b9c1bd; --ph-wash: #f1f3f2; }

.phase-chip {
  display: inline-block;
  font-family: var(--mono);
  font-size: 12px;
  padding: 1px 8px 2px;
  border: 1px solid var(--ph);
  color: var(--ph);
  background: var(--ph-wash);
  border-radius: 3px;
  white-space: nowrap;
}

/* ---- the signature: 175-year strip ------------------------------------- */

.era-strip { margin: 26px 0 8px; }
.era-strip .cells {
  display: flex;
  flex-wrap: wrap;
  gap: 3px;
  padding: 14px;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 4px;
}
.era-cell {
  width: 14px;
  height: 30px;
  border-radius: 2px;
  background: var(--ph-wash);
  border: 1px solid var(--ph);
  position: relative;
  text-decoration: none;
}
.era-cell.hit { background: var(--ph); }
.era-cell.hit.major::after {
  content: "";
  position: absolute;
  left: 3px; right: 3px; bottom: 3px;
  height: 4px;
  background: var(--paper);
  border-radius: 1px;
}
.era-cell:hover, .era-cell:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; z-index: 1; }
.era-cell .tip {
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper);
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.4;
  padding: 5px 9px;
  border-radius: 3px;
  white-space: nowrap;
  display: none;
  z-index: 2;
}
.era-cell:hover .tip, .era-cell:focus-visible .tip { display: block; }
.era-decade {
  width: 100%;
  font-family: var(--mono);
  font-size: 11px;
  color: var(--ink-soft);
  letter-spacing: .1em;
  margin: 8px 0 1px;
}
.era-decade:first-child { margin-top: 0; }
.strip-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 10px;
}
.strip-legend .swatch {
  display: inline-block;
  width: 11px; height: 11px;
  border-radius: 2px;
  vertical-align: -1px;
  margin-right: 6px;
  background: var(--ph, #ccc);
  border: 1px solid var(--ph, #aaa);
}
.strip-legend .swatch.washed { background: var(--ph-wash); }

/* ---- timeline season rows ---------------------------------------------- */

.decade-block { margin: 30px 0; }
.decade-head {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: .14em;
  color: var(--ink-soft);
  border-bottom: 2px solid var(--ink);
  padding-bottom: 4px;
  margin-bottom: 2px;
}
.season-row {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 14px;
  padding: 9px 10px;
  border-bottom: 1px solid var(--rule);
  border-left: 4px solid var(--ph);
  background: linear-gradient(90deg, var(--ph-wash), transparent 240px);
}
.season-year { font-family: var(--mono); font-weight: 700; font-size: 15px; min-width: 52px; }
.season-phase { font-family: var(--mono); font-size: 12px; color: var(--ph); min-width: 118px; }
.season-map-link { color: var(--ink-soft); text-decoration: none; }
.season-map-link:hover { color: var(--ink); text-decoration: underline; }
.storm-chip {
  font-family: var(--mono);
  font-size: 13px;
  text-decoration: none;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 3px;
  padding: 2px 8px 3px;
  white-space: nowrap;
}
.storm-chip:hover { border-color: var(--ink); }
.storm-chip .regs { color: var(--ink-soft); }
.storm-chip .flag { color: var(--nino); }
.catmark {
  display: inline-block;
  min-width: 17px;
  text-align: center;
  border-radius: 2px;
  color: #fff;
  font-weight: 700;
  padding: 0 2px;
  margin-right: 6px;
}
.cat-1 { background: var(--cat1); }
.cat-2 { background: var(--cat2); }
.cat-3 { background: var(--cat3); color: var(--ink); }
.cat-4 { background: var(--cat4); }
.cat-5 { background: var(--cat5); }

/* ---- laboratory -------------------------------------------------------- */

.lab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
  margin: 20px 0 8px;
}
.lab-col {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-top: 4px solid var(--ph);
  border-radius: 4px;
  padding: 16px 18px 18px;
}
.lab-col h3 {
  margin: 0 0 2px;
  font-size: 17px;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ph);
}
.lab-col .sub { font-family: var(--mono); font-size: 12px; color: var(--ink-soft); margin: 0 0 14px; }
.stat { margin: 12px 0; }
.stat .label {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 12.5px;
  margin-bottom: 4px;
}
.stat .value { font-weight: 700; }
.bar {
  height: 12px;
  background: var(--ph-wash);
  border: 1px solid var(--rule);
  border-radius: 2px;
  overflow: hidden;
}
.bar > span { display: block; height: 100%; background: var(--ph); }
.splitbar { display: flex; height: 14px; border-radius: 2px; overflow: hidden; border: 1px solid var(--rule); font-size: 0; }
.splitbar .gulf { background: var(--ph); }
.splitbar .atl { background: var(--ph-wash); }
.split-caption { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11.5px; color: var(--ink-soft); margin-top: 3px; }

.filter-row { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 6px; }
.filter-row a {
  font-family: var(--mono);
  font-size: 13px;
  text-decoration: none;
  border: 1px solid var(--rule);
  background: var(--panel);
  border-radius: 3px;
  padding: 4px 12px;
}
.filter-row a.on { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.filter-row a:hover { border-color: var(--ink); }

/* ---- data table -------------------------------------------------------- */

.data-table-wrap { overflow-x: auto; background: var(--panel); border: 1px solid var(--rule); border-radius: 4px; }
table.data {
  border-collapse: collapse;
  width: 100%;
  font-family: var(--mono);
  font-size: 13px;
}
table.data th {
  text-align: left;
  font-size: 11px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--ink-soft);
  border-bottom: 2px solid var(--ink);
  padding: 9px 12px;
  white-space: nowrap;
}
table.data td { border-bottom: 1px solid var(--rule); padding: 7px 12px; white-space: nowrap; }
table.data tr:hover td { background: var(--neutral-wash); }
.review-mark { color: var(--nino); }

.export-line { margin: 14px 0 0; }
.export-line a {
  font-family: var(--mono);
  font-size: 13px;
  border: 1px solid var(--ink);
  border-radius: 3px;
  padding: 5px 14px;
  text-decoration: none;
  background: var(--panel);
}
.export-line a:hover { background: var(--ink); color: var(--paper); }

/* ---- methodology prose ------------------------------------------------- */

.prose { max-width: 72ch; }
.prose p { margin: 0 0 14px; }
.prose code { font-family: var(--mono); font-size: .92em; background: var(--neutral-wash); padding: 1px 5px; border-radius: 3px; }
.callout {
  border-left: 4px solid var(--ink);
  background: var(--panel);
  border-top: 1px solid var(--rule);
  border-right: 1px solid var(--rule);
  border-bottom: 1px solid var(--rule);
  padding: 12px 16px;
  margin: 18px 0;
  font-size: 14.5px;
}
dl.sources dt { font-family: var(--mono); font-weight: 700; margin-top: 14px; }
dl.sources dd { margin: 2px 0 0 0; color: var(--ink-soft); font-size: 14.5px; }

.dataset-pending {
  font-family: var(--mono);
  background: var(--panel);
  border: 1px dashed var(--rule);
  padding: 18px;
  border-radius: 4px;
}

@media (max-width: 640px) {
  .site-main { padding: 24px 14px 44px; }
  .era-cell { width: 11px; height: 24px; }
  .season-phase { min-width: 0; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* ---- storm explorer (Round 9) ------------------------------------------ */

.explorer-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 16px 0 6px;
}
.explorer-filters input[type="search"],
.explorer-filters select {
  font-size: 13.5px;
  padding: 7px 10px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  background: var(--panel);
  color: var(--ink);
}
.explorer-filters input[type="search"] { min-width: 190px; }
.explorer-filters input:focus-visible,
.explorer-filters select:focus-visible { outline: 2px solid var(--nina); }
.explorer-filters button {
  font-family: var(--mono);
  font-size: 13.5px;
  padding: 7px 16px;
  border: 1px solid var(--ink);
  border-radius: 3px;
  background: var(--panel);
  cursor: pointer;
}
.explorer-filters button:hover { background: var(--ink); color: var(--paper); }
.clear-link { align-self: center; font-size: 13px; }

.storm-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
  margin: 14px 0;
}

/* ---- season track map archive (Round 38) --------------------------------- */
.season-map-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  margin: 16px 0;
}
.season-map-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 10px;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 4px;
}
.season-map-thumb { display: block; cursor: zoom-in; }
.season-map-img { width: 100%; height: auto; border-radius: 2px; display: block; }
.season-map-lightbox-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.season-map-lightbox-overlay {
  display: none;
  position: fixed;
  inset: 0;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(23, 33, 30, 0.9);
  cursor: zoom-out;
  z-index: 1000;
}
.season-map-lightbox-toggle:checked ~ .season-map-lightbox-overlay { display: flex; }
.season-map-lightbox-toggle:focus-visible ~ .season-map-thumb {
  outline: 2px solid var(--nina);
  outline-offset: 2px;
}
.season-map-lightbox-img {
  max-width: 95vw;
  max-height: 92vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}
.season-map-lightbox-hint {
  position: fixed;
  top: 16px;
  right: 20px;
  font-family: var(--mono);
  font-size: 12px;
  color: #fff;
  z-index: 1001;
}
.season-map-missing {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  background: var(--ph-wash, var(--rule));
  border: 1px dashed var(--rule);
  border-radius: 2px;
  color: var(--ink-soft);
}
.season-map-label { margin: 0; }
.season-map-label a { text-decoration: none; }
.season-map-label a:hover { text-decoration: underline; }

.storm-card {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding: 12px 14px;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--ph);
  border-radius: 4px;
  text-decoration: none;
}
.storm-card:hover { border-color: var(--ink); border-left-color: var(--ph); }
.storm-card-head { font-size: 15px; }
.storm-card-meta { font-size: 12px; color: var(--ink-soft); }
.storm-card-tags { display: flex; flex-wrap: wrap; gap: 5px; }

.tag-chip {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11px;
  padding: 1px 7px 2px;
  border: 1px solid var(--ink-soft);
  color: var(--ink-soft);
  border-radius: 3px;
  white-space: nowrap;
}
.tag-chip.review { border-color: var(--nino); color: var(--nino); }

/* ---- per-storm page ----------------------------------------------------- */

.storm-badges {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 6px 0 18px;
}
.facts-grid {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 20px;
  font-size: 13.5px;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 16px 18px;
  margin: 0 0 8px;
}
.facts-grid dt { color: var(--ink-soft); }
.facts-grid dd { margin: 0; font-weight: 700; }

.track-map, .intensity-chart {
  display: block;
  width: 100%;
  height: auto;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 4px;
}
.track-map .grat, .intensity-chart .axis {
  font-family: var(--mono);
  font-size: 10px;
  fill: var(--ink-soft);
}
.storm-pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 10px;
  margin-top: 34px;
  padding-top: 16px;
  border-top: 2px solid var(--ink);
  font-size: 13.5px;
}

@media (max-width: 640px) {
  .facts-grid { grid-template-columns: 1fr; gap: 2px; }
  .facts-grid dt { margin-top: 8px; }
}

/* ---- analog finder + current (Round 10) --------------------------------- */

/* ---- base-rate headline + "not analogs" research divider (Round 36 follow-up) */

/* ---- invest notices (Round 37) -- deliberately plain, lighter weight
   than a storm card: no color-coding, no catmark, just NHC's own
   numbers and a link. */
.invest-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin: 0 0 18px;
}
.invest-notice {
  padding: 10px 14px;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-left: 3px solid var(--ink-soft);
  border-radius: 4px;
}
.invest-notice .invest-head { margin: 0 0 4px; font-size: 14.5px; }
.invest-notice .invest-stats { margin: 0 0 6px; }
.invest-notice .nhc-official { margin: 0; }

.base-rate-block {
  margin: 16px 0 4px;
  padding: 14px 16px 16px;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 4px;
}
.base-rate-lead {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 0 0 2px;
  max-width: 60ch;
}
.base-rate-number {
  font-size: 42px;
  font-weight: 800;
  line-height: 1.05;
  margin: 2px 0 0;
}
.base-rate-detail {
  font-size: 12px;
  color: var(--ink-soft);
  font-family: var(--mono);
  margin: 4px 0 0;
}
.base-rate-note {
  font-size: 13px;
  color: var(--ink-soft);
  margin: 10px 0 4px;
}
.research-divider {
  border: none;
  border-top: 2px solid var(--rule);
  margin: 18px 0 12px;
}
.research-heading {
  font-size: 12.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--ink-soft);
  margin: 0 0 6px;
}

.analog-results {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 10px;
  margin: 14px 0;
}
.analog-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 11px 13px;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-left: 4px solid var(--ph);
  border-radius: 4px;
  text-decoration: none;
}
.analog-card:hover { border-color: var(--ink); border-left-color: var(--ph); }
.analog-head { font-size: 14.5px; }
.analog-score { font-size: 11.5px; color: var(--ink-soft); }
.ri-check {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 13px;
  align-self: center;
}
.matrix .tick { text-align: center; font-weight: 700; }

/* ---- track map legend --------------------------------------------------- */

.track-legend {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 8px 0 2px;
  padding: 0;
  font-size: 11.5px;
  color: var(--ink-soft);
}
.track-legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend-line {
  display: inline-block;
  width: 22px;
  height: 4px;
  border-radius: 2px;
}
.legend-glyph { width: 15px; height: 15px; flex: none; }

/* ---- home explore grid --------------------------------------------------- */

.explore-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
  gap: 12px;
  margin: 14px 0;
}
.explore-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 14px 16px;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 4px;
  text-decoration: none;
}
.explore-card:hover { border-color: var(--ink); }
.explore-card strong { font-size: 15px; }

/* ---- mobile nav: zero-JS hamburger (checkbox pattern) ------------------- */

.nav-toggle {
  /* Visually hidden but still focusable and space-key operable, so
     keyboard users can drive the menu; display:none would break that. */
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.nav-burger { display: none; }

@media (max-width: 760px) {
  .site-header { position: relative; flex-wrap: wrap; }

  .nav-burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 34px;
    padding: 0 8px;
    margin-left: auto;
    border: 1px solid rgba(252, 253, 252, 0.5);
    border-radius: 3px;
    cursor: pointer;
  }
  .nav-burger span {
    display: block;
    height: 2px;
    background: var(--paper);
    border-radius: 1px;
    transition: transform .15s ease, opacity .15s ease;
  }
  .nav-toggle:focus-visible ~ .nav-burger {
    outline: 2px solid var(--nina);
    outline-offset: 2px;
  }
  .nav-toggle:checked ~ .nav-burger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .nav-toggle:checked ~ .nav-burger span:nth-child(2) { opacity: 0; }
  .nav-toggle:checked ~ .nav-burger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .site-nav {
    display: none;
    flex-basis: 100%;
    flex-direction: column;
    gap: 0;
    margin-top: 10px;
    border-top: 1px solid rgba(252, 253, 252, 0.25);
  }
  .nav-toggle:checked ~ .site-nav { display: flex; }
  .site-nav a {
    padding: 11px 4px;
    border-bottom: 1px solid rgba(252, 253, 252, 0.12);
    font-size: 14.5px;
  }
  .site-nav a.active { border-bottom-color: rgba(252, 253, 252, 0.12); }
}

/* ---- current-storm card context + official link -------------------------- */

.storm-context {
  border-left: 3px solid var(--rule);
  padding-left: 10px;
  color: var(--ink-soft);
  margin: 4px 0 10px;
}
.nhc-official {
  display: inline-block;
  font-size: 12.5px;
  padding: 5px 11px;
  border: 1px solid var(--ink);
  border-radius: 3px;
  text-decoration: none;
}
.nhc-official:hover { background: var(--ink); color: var(--paper); }

/* ---- dual-track comparison (Analog Finder, storm-vs-storm) --------------- */

.dual-compare-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  margin: 14px 0;
}
@media (min-width: 660px) {
  .dual-compare-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 980px) {
  .dual-compare-grid { grid-template-columns: repeat(3, 1fr); }
}
.dual-compare-card {
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 12px 14px 14px;
  margin: 0;
}
.dual-compare-card .track-map { margin-bottom: 8px; }
.dual-compare-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 6px 14px;
}

/* ---- storm page: link into compare mode ---------------------------------- */

.track-compare-cta { margin: 4px 0 18px; }

/* ---- era tabs (compare mode) ---------------------------------------------- */

.era-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 10px 0 4px;
}
.era-tabs a {
  padding: 5px 12px;
  border: 1px solid var(--rule);
  border-radius: 14px;
  font-size: 12.5px;
  text-decoration: none;
  color: var(--ink-soft);
}
.era-tabs a:hover { border-color: var(--ink); color: var(--ink); }
.era-tabs a.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}
.era-badge {
  display: inline-block;
  font-size: 10.5px;
  padding: 1px 7px 2px;
  border: 1px solid #b8935a;
  color: #8a6a3f;
  border-radius: 3px;
  white-space: nowrap;
}

/* second analog-score line on dual-compare cards sits directly under the first */
.dual-compare-meta .analog-score + .analog-score { margin-top: -4px; }

/* the second era-tabs row (result-count tabs) sits close under the first */
.era-tabs + .era-tabs { margin-top: -2px; }

/* ---- track map zoom: one map, CSS transform, zero JS -------------------- */
/* Same checkbox-toggle pattern as the mobile nav, but instead of swapping
   between two rendered images, this scales/pans the SINGLE map svg via a
   CSS transform anchored on Florida (--zoom-ox/--zoom-oy/--zoom-scale,
   set inline per-instance since they differ per storm). Feels like one
   map zooming, not two pictures toggling, and stays vector-crisp at any
   scale since it's SVG, not a raster image. */

.map-zoom-wrap { position: relative; }
.map-zoom-toggle {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.map-viewport {
  overflow: hidden;
  border: 1px solid var(--rule);
  border-radius: 4px;
}
.map-viewport svg {
  display: block;
  width: 100%;
  height: auto;
  border: 0;
  border-radius: 0;
  transform-origin: 0 0;
  transform: scale(var(--zoom-scale)) translate(var(--zoom-tx), var(--zoom-ty));
  transition: transform .35s ease;
}
.map-zoom-toggle:checked ~ .map-viewport svg { transform: scale(1) translate(0, 0); }
.map-zoom-label {
  display: inline-block;
  font-family: var(--mono);
  font-size: 11.5px;
  margin-top: 8px;
  padding: 5px 12px;
  border: 1px solid var(--rule);
  border-radius: 3px;
  cursor: pointer;
  color: var(--ink-soft);
}
.map-zoom-label:hover { border-color: var(--ink); color: var(--ink); }
.zoom-label-out { display: none; }
.map-zoom-toggle:checked ~ .zoom-label-in { display: none; }
.map-zoom-toggle:checked ~ .zoom-label-out { display: inline-block; }
.map-zoom-toggle:focus-visible ~ .zoom-label-in,
.map-zoom-toggle:focus-visible ~ .zoom-label-out {
  outline: 2px solid var(--nina);
  outline-offset: 2px;
}

/* ---- storm page: compare button up top next to the name ------------------ */

.storm-title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
}
.storm-title-row h1 { margin: 0; }
.storm-title-compare { white-space: nowrap; }

@media (max-width: 640px) {
  .storm-title-row { flex-direction: column; align-items: flex-start; }
}

/* ---- floating "back to top" pill, desktop only --------------------------- */

.back-to-top {
  display: none;
}

@media (min-width: 761px) {
  .back-to-top {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    position: fixed;
    right: 22px;
    bottom: 22px;
    z-index: 50;
    font-family: var(--mono);
    font-size: 12.5px;
    padding: 9px 16px;
    background: var(--ink);
    color: var(--paper);
    border: 1px solid var(--ink);
    border-radius: 999px;
    text-decoration: none;
    box-shadow: 0 2px 8px rgba(23, 33, 30, 0.25);
    opacity: 0.85;
    transition: opacity .15s ease, transform .15s ease;
  }
  .back-to-top:hover { opacity: 1; transform: translateY(-2px); }
  .back-to-top:focus-visible {
    opacity: 1;
    outline: 2px solid var(--nina);
    outline-offset: 2px;
  }
}
