/* ==========================================================================
   SUNNYFISH · SET 02 — PAGE LAYOUTS
   Only page-specific structure lives here; every colour/size comes from
   tokens.css and every component from core.css.
   ========================================================================== */

/* --------------------------------------------------------------------------
   TIER 2 INK HEAD — every list, detail and legal page.
   One dark panel, content-driven height: breadcrumb, stacked title, optional
   standfirst/tags, then one hairline stat strip. No photo, no right-hand meta
   column, no fixed min-height.
   -------------------------------------------------------------------------- */
.page-head {
  background: var(--ink);
  color: #fff;
  padding-block: 40px;
}
.page-head__top { display: block; }
.page-head h1 {
  font-family: var(--f-disp); font-weight: 900; font-stretch: 100%;
  font-size: var(--d2); line-height: 1.04;
  letter-spacing: -.025em; text-transform: uppercase; color: #fff;
  margin: 0; max-width: 900px;
}
.page-head__copy {
  max-width: 62ch; color: rgba(255,255,255,.72);
  font-size: 16px; line-height: 1.6; margin: 14px 0 0;
}
.page-head__meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px 24px; max-width: 880px; margin-top: 24px; padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.22);
  font-family: var(--f-mono); font-size: 9px; letter-spacing: .12em;
  text-transform: uppercase; color: rgba(255,255,255,.5);
}
.page-head__meta b {
  display: block; color: #fff; font-size: 16px;
  letter-spacing: .02em; margin-top: 4px; text-transform: none;
}
.breadcrumb {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .12em;
  text-transform: uppercase; color: rgba(255,255,255,.5);
}
.breadcrumb a { color: rgba(255,255,255,.75); }
.breadcrumb a:hover { color: #fff; }
.breadcrumb .sep { color: rgba(255,255,255,.3); }

/* ==========================================================================
   INDEX / SPEC SHEET
   ========================================================================== */
.spec-hero {
  background: var(--ink); color: #fff; position: relative; overflow: hidden;
  padding-block: clamp(48px, 7vw, 96px) clamp(40px, 6vw, 80px);
}
.spec-hero__grid {
  display: grid; grid-template-columns: 1.25fr .75fr; gap: 40px; align-items: end;
}
.spec-hero h1 {
  font-family: var(--f-disp); font-weight: 900; font-stretch: 100%;
  font-size: clamp(48px, 7.6vw, 104px); line-height: var(--lh-disp);
  letter-spacing: -.03em; text-transform: uppercase; color: #fff;
  margin: 0 0 20px;
}
.spec-hero h1 em { font-style: normal; color: var(--green); }
.spec-hero p { color: rgba(255,255,255,.65); max-width: 52ch; }
.spec-hero__stamp {
  border: 1px solid rgba(255,255,255,.22); padding: 20px;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .12em;
  text-transform: uppercase; color: rgba(255,255,255,.55);
  display: grid; gap: 8px;
}
.spec-hero__stamp b { color: #fff; font-weight: 500; }

.spec-nav { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; }
.spec-nav a {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .1em;
  text-transform: uppercase; color: rgba(255,255,255,.6);
  border: 1px solid rgba(255,255,255,.22); padding: 8px 12px;
}
.spec-nav a:hover { border-color: var(--green); color: var(--green); }

.pages-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: var(--gap); }
.page-card {
  border: var(--hair); background: #fff; padding: 20px;
  display: flex; flex-direction: column; min-height: 172px;
  transition: border-color .15s ease, background .15s ease;
}
.page-card:hover { border-color: var(--green); background: var(--paper); }
.page-card__name {
  font-family: var(--f-disp); font-weight: 900; font-stretch: 100%;
  font-size: 24px; line-height: 1.04; text-transform: uppercase;
  letter-spacing: -.015em; color: var(--ink); margin-bottom: 8px;
}
.page-card__note { font-size: 12px; color: var(--muted); line-height: 1.45; margin-top: auto; }
.page-card__arrow {
  display: flex; align-items: center; justify-content: space-between;
  margin-top: 16px;
  font-family: var(--f-mono); font-size: 9px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink);
}
.page-card__arrow .icon { width: 14px; height: 14px; }

.spec-block { display: grid; grid-template-columns: 320px minmax(0,1fr); gap: 48px; padding-block: 48px; }
.spec-block + .spec-block {
  background: var(--paper);
  padding-inline: var(--gutter);
  margin-inline: calc(var(--gutter) * -1);
}
.spec-block__title {
  font-family: var(--f-disp); font-weight: 900; font-stretch: 100%;
  font-size: 30px; line-height: 1.04; text-transform: uppercase;
  letter-spacing: -.02em; color: var(--ink); margin: 0 0 8px;
}
.spec-block__note { font-size: 13px; color: var(--muted); line-height: 1.55; }
.spec-block__note code {
  font-family: var(--f-mono); font-size: 11px; color: var(--orange-2);
  background: rgba(249,122,0,.08); padding: 1px 4px;
}

.swatches { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 8px; }
.swatch { border: var(--hair); }
.swatch__chip { height: 64px; }
.swatch__body { padding: 8px 10px; background: #fff; }
.swatch__name { font-size: 11px; font-weight: 700; color: var(--ink); }
.swatch__hex { font-family: var(--f-mono); font-size: 10px; color: var(--muted); letter-spacing: .04em; }
.swatch__src { font-family: var(--f-mono); font-size: 8px; color: var(--faint); text-transform: uppercase; letter-spacing: .08em; margin-top: 2px; }

.type-spec { }
.type-row {
  display: grid; grid-template-columns: 140px 1fr 120px;
  gap: 20px; align-items: baseline; padding: 14px 12px;
}
.type-row:nth-child(even) { background: var(--paper); }
.type-row__token { font-family: var(--f-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.type-row__sample { color: var(--ink); }
.type-row__val { font-family: var(--f-mono); font-size: 10px; color: var(--faint); text-align: right; }

.space-spec { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; }
.space-cell { border: var(--hair); padding: 10px; background: #fff; }
.space-cell__bar { height: 8px; background: var(--ink); margin-bottom: 8px; }
.space-cell__val { font-family: var(--f-mono); font-size: 10px; color: var(--ink); }
.space-cell__use { font-size: 9px; color: var(--muted); line-height: 1.35; margin-top: 3px; }

.claims { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--gap); }
.claim { background: var(--paper); padding: 22px; }
.claim__meta {
  font-size: 13px; letter-spacing: 0;
  color: var(--muted); margin: 0 0 10px;
}
.claim h3 {
  font-family: var(--f-disp); font-weight: 900; font-stretch: 100%;
  font-size: 24px; line-height: 1.04; text-transform: uppercase;
  letter-spacing: -.02em; color: var(--ink); margin: 0 0 10px;
}
.claim p { font-size: 13px; color: var(--body); line-height: 1.55; margin: 0; }

.risks { counter-reset: risk; }
.risk {
  display: grid; grid-template-columns: 44px minmax(0,1fr) minmax(0,.9fr);
  gap: 24px; padding: 18px 12px;
}
.risk:nth-child(even) { background: var(--paper); }
.risk::before {
  counter-increment: risk; content: "0" counter(risk);
  font-family: var(--f-mono); font-size: 11px; color: var(--orange);
}
.risk b { font-size: 14px; color: var(--ink); }
.risk span { font-size: 12px; color: var(--muted); line-height: 1.55; }

/* ==========================================================================
   HOME
   ========================================================================== */
.home-split { padding-block: var(--sec); }

/* knowledge cards under the hero: two rows of two, one gap on both axes */
.kb-rows { display: grid; gap: var(--gap); }

.promo--kb {
  background: var(--ink); color: #fff;
  isolation: isolate;
}
.promo--kb::after { display: none; }
.promo--kb::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background-image:
    linear-gradient(180deg, rgba(8,10,6,.66) 0%, rgba(8,10,6,0) 26%),
    linear-gradient(180deg, rgba(8,10,6,.18) 0%, rgba(8,10,6,.52) 42%, rgba(8,10,6,.93) 100%);
}
.promo--kb .promo__bg {
  position: absolute; inset: 0; z-index: 0;
  width: 100%; height: 100%; object-fit: cover;
  filter: saturate(.92) contrast(1.06) brightness(.88);
}
.promo__kicker {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .12em;
  text-transform: uppercase; color: rgba(255,255,255,.92);
  text-shadow: 0 1px 3px rgba(0,0,0,.85), 0 1px 16px rgba(0,0,0,.7);
}
.promo--kb h3 {
  max-width: 18ch; margin-top: auto; margin-bottom: 12px;
  text-shadow: 0 2px 18px rgba(0,0,0,.45);
}
.promo--kb p {
  margin: 0; max-width: 40ch; color: rgba(255,255,255,.9);
  text-shadow: 0 1px 14px rgba(0,0,0,.65);
}
.promo__link {
  margin-top: 20px; align-self: flex-start;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .12em;
  text-transform: uppercase; color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.42); padding-bottom: 4px;
}

/* habitat grid: four real habitat values from the species table. Same card
   language as the rest of the set — square corners, 1px rim, no shadow. */
.hab-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: var(--gap); }
.hab-card {
  display: flex; flex-direction: column;
  border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.02);
  color: #fff;
  transition: border-color .15s ease, background .15s ease;
}
.hab-card:hover { border-color: var(--green); background: rgba(255,255,255,.055); }
.hab-card__media {
  margin: 0; aspect-ratio: 4 / 3; overflow: hidden;
  border-bottom: 1px solid rgba(255,255,255,.18);
}
.hab-card__media img {
  display: block; width: 100%; height: 100%; object-fit: cover;
  filter: saturate(.55) contrast(1.08) brightness(.78);
  transition: transform .35s ease;
}
.hab-card:hover .hab-card__media img { transform: scale(1.03); }
.hab-card__body { display: flex; flex-direction: column; gap: 8px; flex: 1; padding: 18px 18px 16px; }
.hab-card__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hab-card__row h3 {
  font-family: var(--f-disp); font-weight: 900; font-stretch: 100%;
  font-size: 24px; line-height: 1.04; letter-spacing: -.015em;
  text-transform: uppercase; margin: 0; color: #fff;
}
.hab-card__row .icon { width: 16px; height: 16px; flex: none; color: var(--green); }
.hab-card__meta {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .1em;
  text-transform: uppercase; color: rgba(255,255,255,.46);
}
.hab-card__meta b { font-size: 15px; font-weight: 500; color: var(--green); letter-spacing: .02em; }
.hab-card__plates::before { content: " · "; }
.hab-card__sp { margin: auto 0 0; font-size: 12px; line-height: 1.45; color: rgba(255,255,255,.62); }

/* tide stations by country: flag + station count + country name only.
   Same card grammar as .hab-card, inverted for the paper background. */
.country-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: var(--gap); }
.country-card {
  display: grid; grid-template-columns: 196px minmax(0,1fr);
  border: var(--hair); background: #fff; color: var(--ink);
  transition: border-color .15s ease;
}
.country-card:hover { border-color: var(--green); }
.country-card__flag {
  margin: 0; padding: 26px; border-right: var(--hair);
  display: grid; place-items: center; background: var(--paper-2);
}
.country-card__flag img { width: 100%; height: auto; display: block; }
.country-card__body {
  padding: 24px 26px; display: flex; flex-direction: column;
  justify-content: center; gap: 6px;
}
.country-card__count {
  font-family: var(--f-disp); font-weight: 900; font-stretch: 100%;
  font-size: 64px; line-height: .9; letter-spacing: -.035em;
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.country-card__body h3 {
  font-family: var(--f-disp); font-weight: 900; font-stretch: 100%;
  font-size: 26px; line-height: 1.04; letter-spacing: -.015em;
  text-transform: uppercase; margin: 0;
}
/* Flag assets exist for only a few countries. The plate falls back to the
   ISO code, so the card (and its ranking) never depends on artwork. */
.country-card__code {
  font-family: var(--f-mono); font-size: 34px; font-weight: 700;
  letter-spacing: .12em; color: var(--ink-2);
}
/* Last tile: every country, same box geometry as a country card. The ink
   plate marks it as the way out of the top-five list. */
.country-card--all .country-card__flag { background: var(--ink); }
.country-card--all .country-card__code { color: var(--paper-2); }
.country-card__meta {
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted);
}
.country-card--all:hover .country-card__meta { color: var(--ink); }


/* app promo: type-only copy left, three CSS-built iPhone mockups on a 3D
   stage right. Each device has its own frame, screen, island and side
   buttons, so a screenshot sits inside a phone instead of floating as a flat
   image. The back shell is offset in Z, which gives the body real thickness
   once the phone turns. */
.app-sec {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 600px);
  gap: clamp(32px, 5vw, 80px);
  align-items: center;
}
.app-copy h2 {
  font-family: var(--f-disp); font-weight: 900; font-stretch: 100%;
  font-size: var(--d2); line-height: var(--lh-disp); letter-spacing: var(--tr-disp);
  text-transform: uppercase; color: #fff; margin: 0 0 22px;
}
.app-copy p {
  max-width: 44ch; margin: 0 0 14px;
  font-size: var(--body-s); line-height: 1.55; color: rgba(255,255,255,.64);
}
.app-dl { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.app-dl .btn { height: 56px; padding: 0 28px; font-size: 17px; }

/* six app capabilities, each in its own box below the phone stage */
.app-features {
  margin-top: clamp(40px, 5vw, 72px);
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: var(--gap);
}
.app-feature {
  background: #10130c;
  border: 1px solid rgba(255,255,255,.16);
  padding: 24px 24px 26px;
}
.app-feature__ico {
  width: 26px; height: 26px; margin-bottom: 24px;
  color: var(--green); stroke-width: 1.4;
}
.app-feature h3 {
  font-family: var(--f-disp); font-weight: 900; font-stretch: 100%;
  font-size: clamp(18px, 1.5vw, 22px); line-height: 1.05;
  letter-spacing: -.01em; text-transform: uppercase;
  color: #fff; margin: 0 0 8px;
}
.app-feature p {
  margin: 0; max-width: 36ch;
  font-size: 13px; line-height: 1.55; color: rgba(255,255,255,.64);
}

.app-stage {
  position: relative; height: 520px;
  perspective: 1300px; perspective-origin: 50% 42%;
}
/* soft contact shadow so the three devices sit on the stage, not in the air */
.app-stage::after {
  content: ""; position: absolute; left: 4%; right: 4%; bottom: -6px; height: 48px;
  background: radial-gradient(50% 100% at 50% 50%, rgba(0,0,0,.78), transparent 72%);
  filter: blur(8px);
  pointer-events: none;
}
.app-phone {
  --bezel: 7px;
  --radius: 37px;
  --island-gap: 9px;
  position: absolute; width: 218px; margin: 0;
  transform-style: preserve-3d;
}
.app-phone__body {
  position: relative;
  padding: var(--bezel);
  border-radius: var(--radius);
  background: linear-gradient(150deg, #ffffff 0%, #e9ecee 12%, #c9cfd3 38%, #f0f3f4 64%, #aeb5ba 100%);
  transform-style: preserve-3d;
  box-shadow:
    inset 0 0 0 1px rgba(255,255,255,.95),
    inset 0 0 0 calc(var(--bezel) - 1px) rgba(28,32,34,.75),
    0 0 0 1px rgba(0,0,0,.5),
    0 46px 70px -30px rgba(0,0,0,.95),
    0 18px 36px -22px rgba(0,0,0,.85);
}
.app-phone__body::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit;
  transform: translateZ(-12px);
  background: linear-gradient(90deg, #868d92, #eef1f3 22%, #bcc3c7 55%, #f7f9fa 82%, #868d92);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.6);
}
.app-phone__screen {
  position: relative; overflow: hidden;
  border-radius: calc(var(--radius) - var(--bezel));
  background: #05070a;
}
.app-phone__screen img { display: block; width: 100%; height: auto; }
/* a single light pass on the glass; no gradients over the app's own colour */
.app-phone__screen::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(114deg, rgba(255,255,255,.18) 0 15%, rgba(255,255,255,.04) 34%, transparent 46%),
    radial-gradient(120% 40% at 50% -10%, rgba(255,255,255,.06), transparent 70%);
  pointer-events: none;
}
.app-phone__island {
  position: absolute; z-index: 2;
  top: calc(var(--island-gap) + 4px); left: 50%; transform: translateX(-50%);
  width: 27%; aspect-ratio: 3.4 / 1; border-radius: 999px;
  background: #04060a;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.09);
}
.app-phone__btn {
  position: absolute; width: 2px; border-radius: 2px;
  background: linear-gradient(180deg, #f7f9fa, #b9c0c4 55%, #e2e6e8);
  box-shadow: 0 0 0 .5px rgba(0,0,0,.35);
}
.app-phone__btn--power { right: -1px; top: 27%; height: 13%; }
.app-phone__btn--vol { left: -1px; top: 21%; height: 9%; }
.app-phone__btn--mute { left: -1px; top: 16%; height: 3.5%; }

.app-phone--a {
  left: -4px; top: 52px;
  transform: translateZ(-50px) rotateY(31deg) rotateZ(-3deg) scale(.94);
}
.app-phone--b {
  left: 50%; top: 0; z-index: 2;
  transform: translateX(-50%) translateZ(90px) rotateX(2deg) scale(1.03);
}
.app-phone--c {
  right: -4px; top: 52px;
  transform: translateZ(-50px) rotateY(-31deg) rotateZ(3deg) scale(.94);
}

/* rating + review slots under the app promo. One real score card, three
   placeholder review cards. Same card grammar: square, 1px rim, no shadow. */
.rev-grid {
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr));
  gap: var(--gap); margin-top: clamp(48px, 6vw, 80px);
}
.rev-card {
  margin: 0; padding: 22px;
  display: flex; flex-direction: column; gap: 14px;
  border: 1px solid rgba(255,255,255,.16);
  background: rgba(255,255,255,.02);
  color: #fff;
}
.rev-stars { display: flex; gap: 3px; color: var(--yellow); font-size: 14px; line-height: 1; }
.rev-stars .is-dim { color: rgba(255,255,255,.24); }
.rev-score {
  font-family: var(--f-disp); font-weight: 900; font-stretch: 100%;
  font-size: 56px; line-height: .9; letter-spacing: -.03em;
}
.rev-meta {
  margin: 0; font-family: var(--f-mono); font-size: 10px;
  letter-spacing: .1em; text-transform: uppercase; color: rgba(255,255,255,.46);
}
.rev-text { margin: 0; font-size: 14px; line-height: 1.55; color: rgba(255,255,255,.72); }
.rev-card--score .rev-link {
  margin-top: auto; align-self: flex-start;
  font-size: 10px; letter-spacing: .1em; color: #fff;
  border-bottom: 1px solid rgba(255,255,255,.42); padding-bottom: 4px;
}
.rev-card footer { margin-top: auto; }

/* ==========================================================================
   TIDES
   ========================================================================== */
.day-strip {
  display: flex; gap: 6px;
  margin-top: 32px; overflow-x: auto;
}
.day {
  flex: 1 0 auto; min-width: 96px;
  padding: 14px 18px;
  background: var(--paper); text-align: left;
  display: grid; gap: 2px; cursor: pointer;
  transition: background .14s ease;
}
.day:hover { background: #EDEDED; }
.day.is-active { background: var(--ink); color: #fff; }
.day__dow { font-family: var(--f-mono); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.day__date { font-family: var(--f-mono); font-size: 16px; font-weight: 500; }
.day__tag { font-family: var(--f-mono); font-size: 8px; letter-spacing: .1em; color: var(--faint); text-transform: uppercase; }
.day.is-active .day__dow, .day.is-active .day__tag { color: rgba(255,255,255,.55); }

.tide-layout { display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 40px; align-items: start; }
.tide-aside { position: sticky; top: 92px; display: grid; gap: 16px; }

.tide-table .trow {
  grid-template-columns: 42px minmax(0,1.6fr) 80px 80px minmax(0,1.1fr) 64px;
}
.tide-table .trow--head { grid-template-columns: 42px minmax(0,1.6fr) 80px 80px minmax(0,1.1fr) 64px; }
.tindex { font-family: var(--f-mono); font-size: 10px; color: var(--faint); }
.tide-range { display: flex; align-items: center; gap: 8px; }
.tide-range__bar { height: 4px; background: #E7E7E4; flex: 1; position: relative; }
.tide-range__bar span { position: absolute; inset: 0 auto 0 0; background: var(--ink); }
.verdict-pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--f-mono); font-size: 9px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--ink);
}
.verdict-pill::before { content: ""; width: 6px; height: 6px; background: var(--green); }
.verdict-pill--fair::before { background: var(--orange); }
.verdict-pill--poor::before { background: var(--red); }

.mini-chart { border: var(--hair); background: #fff; padding: 18px; }
.mini-chart__head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; }
.mini-chart__name { font-size: 14px; font-weight: 700; color: var(--ink); }
.mini-chart svg text { font-family: var(--f-mono); font-size: 8px; fill: var(--muted); }
.mini-chart .line { fill: none; stroke: var(--ink); stroke-width: 1.6; }
.mini-chart .area { fill: rgba(134,238,2,.18); }
.mini-chart .mark { fill: var(--orange); }

.notice {
  background: rgba(249,122,0,.09);
  padding: 16px 18px; font-size: 12px; color: var(--body); line-height: 1.55;
}
.notice b { color: var(--ink); }

/* ==========================================================================
   WEATHER / MAP
   ========================================================================== */
.map-band { position: relative; background: #070C0B; color: #fff; overflow: hidden; }
.map-band__canvas { position: relative; height: clamp(520px, 68vh, 760px); }
.map-band__canvas > svg { width: 100%; height: 100%; }
.map-band__vignette {
  position: absolute; inset: 0; pointer-events: none;
  background:
    linear-gradient(90deg, rgba(7,12,11,.92) 0%, rgba(7,12,11,.35) 34%, rgba(7,12,11,0) 60%),
    linear-gradient(0deg, rgba(7,12,11,.85) 0%, rgba(7,12,11,0) 34%);
}
.map-panel {
  position: absolute; left: var(--gutter); top: 44px; z-index: 3;
  width: 340px; background: rgba(253,253,253,.97);
  color: var(--ink-2);
  padding: 20px;
}
.map-panel__title {
  font-family: var(--f-disp); font-weight: 900; font-stretch: 100%;
  font-size: 22px; line-height: 1.04; text-transform: uppercase;
  letter-spacing: -.01em; color: var(--ink); margin: 0 0 4px;
}
.map-panel__coords { font-family: var(--f-mono); font-size: 10px; letter-spacing: .1em; color: var(--muted); text-transform: uppercase; }
.map-panel__layers { display: flex; flex-wrap: wrap; gap: 6px; margin: 18px 0 14px; }
.map-panel__layers .chip { height: 30px; padding: 0 10px; font-size: 9px; }
.map-panel__scale { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.map-panel__scale div { height: 8px; }
.map-panel__scale-labels { display: flex; justify-content: space-between; font-family: var(--f-mono); font-size: 9px; color: var(--muted); margin-top: 5px; }
.map-panel__foot { margin-top: 16px; display: flex; justify-content: space-between; align-items: center; }
.map-panel__foot .mono { font-size: 9px; color: var(--muted); }

.map-tools {
  position: absolute; right: var(--gutter); top: 44px; z-index: 3;
  display: grid; gap: 1px; background: rgba(255,255,255,.24);
  border: 1px solid rgba(255,255,255,.24);
}
.map-tools button {
  width: 40px; height: 40px; background: rgba(8,10,6,.72); color: #fff;
  display: grid; place-items: center;
}
.map-tools button:hover { background: var(--green); color: var(--ink); }
.map-tools .icon { width: 16px; height: 16px; }

.map-legend {
  position: absolute; right: var(--gutter); bottom: 26px; z-index: 3;
  background: rgba(8,10,6,.78); border: 1px solid rgba(255,255,255,.22);
  padding: 14px 16px; display: grid; gap: 8px; min-width: 220px;
}
.map-legend .legend__item { color: rgba(255,255,255,.7); }
.map-stamp {
  position: absolute; left: var(--gutter); bottom: 26px; z-index: 3;
  font-family: var(--f-mono); font-size: 9px; letter-spacing: .14em;
  text-transform: uppercase; color: rgba(255,255,255,.5);
  display: flex; gap: 18px; align-items: center;
}
.map-stamp b { color: var(--green); }

.wx-metrics { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: var(--gap); }
.wx-metric { border: var(--hair); background: #fff; padding: 18px; position: relative; }
.wx-metric__label { font-family: var(--f-mono); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.wx-metric__value { font-family: var(--f-mono); font-size: 34px; font-weight: 500; line-height: 1.05; letter-spacing: -.02em; color: var(--ink); margin-top: 6px; }
.wx-metric__value small { font-size: 12px; color: var(--muted); margin-left: 4px; }
.wx-metric__sub { font-family: var(--f-mono); font-size: 10px; color: var(--faint); margin-top: 4px; text-transform: uppercase; letter-spacing: .06em; }
.wx-metric__icon { position: absolute; top: 16px; right: 16px; color: var(--faint); }
.wx-metric__icon .icon { width: 18px; height: 18px; }

.wx-layout { display: grid; grid-template-columns: minmax(0,1.4fr) minmax(0,1fr); gap: 40px; align-items: start; }
.wx-forecast .trow { grid-template-columns: 80px minmax(0,1fr) 60px 60px 70px 80px; }
.wx-forecast .trow--head { grid-template-columns: 80px minmax(0,1fr) 60px 60px 70px 80px; }
.wx-day { display: flex; align-items: baseline; gap: 8px; }
.wx-day b { font-family: var(--f-mono); font-size: 13px; color: var(--ink); }
.wx-day span { font-family: var(--f-mono); font-size: 9px; color: var(--faint); text-transform: uppercase; }
.wx-score { font-family: var(--f-mono); font-size: 15px; color: var(--ink); }

/* ==========================================================================
   SPECIES LIST
   ========================================================================== */
/* Tier 1 geometry comes from `.hero--index` in core.css; only the crop is
   page-specific. */
.hero--species .hero__media img { object-position: 50% 46%; }

/* habitat + sort share one bar under the hero, flush with the grid edges */
.species-controls { border-top: var(--hair); }
/* the two groups keep their label glued to their own chips when the bar wraps */
.species-controls__group { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.species-controls__group--sort { margin-left: auto; }
.species-search-bar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 0 0 20px;
}
.species-search { flex: 1 1 320px; min-width: 0; }
.species-search input {
  width: 100%; height: 44px; padding: 0 14px;
  border: var(--hair); background: #fff; color: var(--ink);
  font-family: var(--f-body); font-size: 14px;
}
.species-search__count {
  margin-left: auto; font-family: var(--f-mono); font-size: 10px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}

/* pager sits flush right under the grid and runs on the 12 loaded records */
.species-grid .card[hidden] { display: none; } /* .card's own display:flex beats the UA [hidden] rule */
.species-count-line { scroll-margin-top: 96px; }
.species-empty {
  margin: 28px 0 0; font-family: var(--f-mono); font-size: 11px;
  letter-spacing: .08em; text-transform: uppercase; color: var(--muted);
}
.species-empty[hidden] { display: none; }
.species-foot {
  display: flex; align-items: center; justify-content: flex-end;
  gap: 20px; flex-wrap: wrap;
  margin-top: 32px; padding-top: 20px; border-top: var(--hair);
}
.species-foot__meta {
  margin-right: auto; font-size: 10px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
}
.pager { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.pager[hidden] { display: none; }
.pager button,
.pager a.pager__step,
.pager span.pager__step,
.pager .pager__num.is-active {
  height: 38px; min-width: 38px; padding: 0 10px;
  display: inline-flex; align-items: center; justify-content: center;
  border: var(--hair); background: #fff; color: var(--muted);
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .1em;
  transition: border-color .15s ease, background .15s ease, color .15s ease;
}
.pager button:hover:not(:disabled),
.pager a.pager__step:hover { border-color: var(--green); color: var(--ink); }
.pager button.is-active,
.pager .pager__num.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.pager button:disabled,
.pager .is-disabled { background: var(--paper); color: var(--faint); cursor: not-allowed; }
.pager .pager__num--total {  display: inline-flex; align-items: center; padding: 0 8px;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .1em; color: var(--muted);
}
.pager__step:not(:disabled) { color: var(--ink); }
.pager__nums { display: flex; gap: 2px; align-items: center; }
.pager__step .icon { width: 14px; height: 14px; }
.pager__step--prev .icon { transform: rotate(180deg); }

@media (max-width: 760px) {
  .species-controls { row-gap: 10px; }
  .species-controls__group--sort { margin-left: 0; flex-basis: 100%; }
  .pager button,
  .pager a.pager__step,
  .pager span.pager__step,
  .pager .pager__num.is-active { height: 44px; min-width: 44px; }
}

.filter-bar {
  display: flex; align-items: center; gap: 8px; flex-wrap: wrap;
  padding: 20px 0; margin-top: 20px;
}
.filter-bar__label { font-family: var(--f-mono); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-right: 6px; }
.filter-bar__spacer { flex: 1; }
.alpha-rail {
  display: flex; gap: 2px; flex-wrap: wrap;
}
.alpha-rail button {
  width: 38px; height: 34px; font-family: var(--f-mono); font-size: 10px;
  color: var(--muted); background: var(--paper);
}
.alpha-rail button:hover, .alpha-rail button.is-active { background: var(--ink); color: #fff; }
.species-grid { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: var(--gap); }
/* Species tiles end on the copy — no footer bar, so the body needs its own bottom padding. */
.species-grid .card__body { flex: 1; padding-bottom: 18px; }
.species-count-line {
  display: flex; justify-content: flex-end; align-items: baseline;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted);
  padding: 18px 0; margin-bottom: var(--gap);
}

/* ==========================================================================
   KNOWLEDGE
   ========================================================================== */
.k-lead { display: grid; grid-template-columns: 56fr 44fr; border: var(--hair); background: #fff; }
.k-lead__media { position: relative; min-height: 400px; overflow: hidden; }
.k-lead__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; filter: saturate(.55) contrast(1.08) brightness(.9); }
.k-lead__body { padding: clamp(24px, 3.4vw, 44px); display: flex; flex-direction: column; }
.k-lead__body h2 {
  font-family: var(--f-disp); font-weight: 900; font-stretch: 100%;
  font-size: clamp(28px, 3vw, 44px); line-height: 1.06;
  letter-spacing: -.02em; text-transform: uppercase; color: var(--ink);
  margin: 0 0 14px;
}
.k-lead__meta { margin-top: auto; padding-top: 22px; display: flex; gap: 28px; font-family: var(--f-mono); font-size: 9px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.k-lead__meta b { display: block; color: var(--ink); font-size: 12px; margin-top: 3px; }

.k-cats { }
.k-cat {
  display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr) 80px 40px;
  gap: 24px; align-items: center; padding: 22px 10px;
  transition: background .15s ease, padding-left .15s ease;
}
.k-cat:nth-child(even) { background: var(--paper); }
.k-cat:hover { background: rgba(134,238,2,.09); padding-left: 18px; }
.k-cat__name { font-family: var(--f-disp); font-weight: 900; font-stretch: 100%; font-size: 26px; line-height: 1.04; text-transform: uppercase; letter-spacing: -.015em; color: var(--ink); }
.k-cat__copy { font-size: 12px; color: var(--muted); line-height: 1.5; }
.k-cat__count { font-family: var(--f-mono); font-size: 11px; color: var(--ink); text-align: right; }
.k-cat__arrow { justify-self: end; }
.k-cat__arrow .icon { width: 16px; height: 16px; }

.notes-table .trow { grid-template-columns: 40px minmax(0,1.6fr) 140px 80px 40px; }
.notes-table .trow--head { grid-template-columns: 40px minmax(0,1.6fr) 140px 80px 40px; }

/* ==========================================================================
   SPECIES DETAIL
   ========================================================================== */
.detail-head { background: var(--ink); color: #fff; padding-block: 40px; }
.detail-head__row { display: block; }
.detail-head h1 {
  font-family: var(--f-disp); font-weight: 900; font-stretch: 100%;
  font-size: var(--d2); line-height: 1.04;
  letter-spacing: -.025em; text-transform: uppercase; color: #fff;
  margin: 0; max-width: 900px;
}
.detail-head__latin {
  font-family: var(--f-mono); font-size: 13px; font-style: italic;
  color: rgba(255,255,255,.55); margin-top: 10px; letter-spacing: .02em;
}
.detail-head__tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 16px; }
.detail-head__actions { display: flex; gap: 8px; }
.detail-head .lede {
  max-width: 62ch; font-size: 16px; line-height: 1.6;
  color: rgba(255,255,255,.72); margin: 14px 0 0;
}

.detail-layout { display: grid; grid-template-columns: minmax(0,1fr) 380px; gap: 40px; align-items: start; }
.detail-main { min-width: 0; }
.detail-rail { position: sticky; top: 92px; display: grid; gap: 16px; }

.plate {
  position: relative; margin-bottom: 28px;
  border: var(--hair); background: var(--paper);
  aspect-ratio: 16 / 10; overflow: hidden;
  /* breaks the text column on purpose (MH §1.5 破框), capped at 4% */
  width: 104%; margin-left: -4%;
}
.plate img { width: 100%; height: 100%; object-fit: cover; filter: saturate(.62) contrast(1.06); }
.plate__cap {
  position: absolute; left: 0; bottom: 0;
  background: var(--ink); color: #fff;
  font-family: var(--f-mono); font-size: 9px; letter-spacing: .12em;
  text-transform: uppercase; padding: 8px 12px;
}

.prose p { font-size: 16px; line-height: 1.7; color: var(--body); margin: 0 0 1.1em; }
.prose h2 {
  font-family: var(--f-disp); font-weight: 900; font-stretch: 100%;
  font-size: 28px; line-height: 1.1; text-transform: uppercase;
  letter-spacing: -.02em; color: var(--ink);
  margin: 48px 0 16px;
}
.prose h3 { font-size: 17px; color: var(--ink); margin: 24px 0 8px; }

.facts { }
.fact {
  display: flex; justify-content: space-between; gap: 16px;
  padding: 11px 10px;
  font-size: 13px;
}
.fact:nth-child(odd) { background: var(--paper); }
.fact dt { color: var(--muted); font-family: var(--f-mono); font-size: 10px; letter-spacing: .08em; text-transform: uppercase; }
.fact dd { margin: 0; color: var(--ink); text-align: right; max-width: 60%; font-size: 12px; }

.technique {
  display: grid; grid-template-columns: minmax(0,1fr);
  padding: 18px 10px;
}
.technique:nth-child(even) { background: var(--paper); }
.technique h3, .technique h4 { font-size: 16px; color: var(--ink); margin: 0 0 4px; }
.technique p { margin: 0; font-size: 13px; color: var(--body); line-height: 1.55; }

.bait-list { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.bait {
  padding: 7px 12px;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--ink-2); background: #F0F0F0;
}

.alert {
  background: rgba(239,43,1,.07);
  padding: 18px 20px; margin-top: 18px;
}
.alert b {
  display: block; font-family: var(--f-mono); font-size: 9px;
  letter-spacing: .14em; text-transform: uppercase; color: var(--red);
  margin-bottom: 6px;
}
.alert p { margin: 0; font-size: 13px; line-height: 1.6; color: var(--body); }

/* Regulation facts on species pages */
.reg-intro { font-size: 13px; line-height: 1.6; color: var(--muted); margin: 8px 0 14px; }
.reg-group { border-top: var(--hair); padding-top: 14px; margin-top: 18px; }
.reg-group__title {
  display: flex; align-items: center; gap: 8px; margin: 0 0 10px;
  font-family: var(--f-mono); font-size: 11px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--ink);
}
.reg-item { padding: 12px 0; border-top: var(--hair); }
.reg-group__title + .reg-item { border-top: 0; padding-top: 0; }
.reg-item__head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.reg-item__value { font-weight: 600; color: var(--ink); font-size: 14px; }
.reg-item__jur { font-family: var(--f-mono); font-size: 11px; color: var(--muted); }
.reg-item__copy { font-size: 13px; line-height: 1.65; color: var(--body); margin: 8px 0 0; }
.reg-item__note { font-size: 12px; line-height: 1.6; color: var(--muted); margin: 6px 0 0; }
.reg-quote {
  margin: 10px 0 0; padding: 8px 0 8px 14px;
  border-left: 2px solid var(--green);
  font-size: 12px; line-height: 1.65; color: var(--body);
}
.reg-item__foot {
  display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px;
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .06em;
  text-transform: uppercase; color: var(--muted);
}
.reg-item__foot a { color: var(--ink); border-bottom: 1px solid var(--hair); }

/* ==========================================================================
   ARTICLE
   ========================================================================== */
.art-head { background: var(--ink); color: #fff; padding-block: 40px; }
.art-head h1 {
  font-family: var(--f-disp); font-weight: 900; font-stretch: 100%;
  font-size: var(--d2); line-height: 1.04;
  letter-spacing: -.025em; text-transform: uppercase; color: #fff;
  margin: 0; max-width: 900px;
}
.art-head__dek {
  max-width: 62ch; font-size: 16px; line-height: 1.6;
  color: rgba(255,255,255,.72); margin: 14px 0 0;
}
.art-cover { margin: 24px 0 0; max-width: 720px; }
.art-cover img {
  display: block; width: 100%; height: auto; aspect-ratio: 1200 / 630;
  object-fit: cover; border: var(--hair); background: var(--ink);
}
.art-facts { margin: 32px 0 8px; padding: 22px 24px; background: #fff; border: var(--hair); }
.art-facts h2 {
  font-family: var(--f-disp); font-weight: 900; font-stretch: 100%;
  font-size: clamp(20px, 2vw, 26px); line-height: 1.1;
  letter-spacing: -.01em; text-transform: uppercase; color: var(--ink);
  margin: 0 0 14px;
}
.art-facts__scroll { overflow-x: auto; }
.art-facts table { width: 100%; border-collapse: collapse; font-size: 14px; }
.art-facts th,
.art-facts td { text-align: left; vertical-align: top; padding: 9px 10px; border-bottom: 1px solid var(--line-soft); }
.art-facts th {
  font-family: var(--f-mono); font-size: 9px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); font-weight: 500;
}
.art-facts td { color: var(--body); line-height: 1.55; }
.art-note { margin-top: 36px; }
.art-head__meta {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 16px 24px; max-width: 880px; margin-top: 24px; padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.22);
  font-family: var(--f-mono); font-size: 9px; letter-spacing: .12em;
  text-transform: uppercase; color: rgba(255,255,255,.5);
}
.art-head__meta b {
  display: block; color: #fff; font-size: 16px;
  letter-spacing: .02em; margin-top: 4px; text-transform: none;
}

.art-layout { display: grid; grid-template-columns: minmax(0,1fr) 380px; gap: 40px; align-items: start; }
.art-rail { position: sticky; top: 92px; display: grid; gap: 22px; }
.art-rail__block { padding-top: 2px; }
.art-rail__label { font-family: var(--f-mono); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.art-rail__val { font-size: 13px; color: var(--ink); line-height: 1.4; }
.art-cat__copy { display: block; margin-top: 5px; font-size: 12px; line-height: 1.5; color: var(--muted); }

.art-body { min-width: 0; }
.art-body p { font-size: 17px; line-height: 1.75; color: var(--body); margin: 0 0 1.15em; }
.art-body > p:first-of-type { font-size: 19px; line-height: 1.6; color: var(--ink-2); }
.art-step { padding-top: 8px; margin-top: 48px; }
.art-step h2 {
  font-family: var(--f-disp); font-weight: 900; font-stretch: 100%;
  font-size: clamp(24px, 2.6vw, 34px); line-height: 1.06;
  letter-spacing: -.02em; text-transform: uppercase; color: var(--ink);
  margin: 0 0 14px;
}
.art-figure { margin: 30px 0 34px; }
.art-figure img {
  display: block; width: 100%; height: auto;
  border: var(--hair); background: var(--ink);
}
.art-figure figcaption {
  margin-top: 10px; font-size: 13px; line-height: 1.5; color: var(--muted);
}
.art-figure__credit {
  display: block; margin-top: 6px; font-family: var(--f-mono);
  font-size: 10px; letter-spacing: .06em; text-transform: uppercase;
}
.art-figure__credit a { color: inherit; }
.pullquote {
  margin: 36px 0; padding: 26px 28px;
  background: rgba(134,238,2,.16);
  font-size: clamp(20px, 2.2vw, 26px); line-height: 1.35;
  font-weight: 500; color: var(--ink); letter-spacing: -.01em;
}
.takeaways { background: var(--ink); color: #fff; padding: 28px; margin: 36px 0; }
.takeaways h2,
.takeaways h3 {
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .16em; line-height: 1.4;
  text-transform: uppercase; color: var(--green); margin: 0 0 16px;
}
.takeaways ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 10px; }
.takeaways li {
  display: flex; gap: 12px; align-items: baseline;
  font-size: 15px; color: rgba(255,255,255,.86);
  padding-bottom: 0;
}
.takeaways li::before { content: "—"; color: var(--green); font-family: var(--f-mono); }
.faq { margin-top: 36px; }
.faq__item { padding: 18px 12px; }
.faq__item:nth-child(odd) { background: var(--paper); }
.faq__q { font-size: 15px; font-weight: 700; color: var(--ink); margin: 0 0 6px; }
.faq__a { font-size: 14px; color: var(--body); margin-top: 6px; line-height: 1.6; }
.next-read { border: var(--hair); display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; padding: 22px; margin-top: 40px; background: #fff; }
.next-read__title { font-family: var(--f-disp); font-weight: 900; font-stretch: 100%; font-size: 22px; line-height: 1.04; text-transform: uppercase; color: var(--ink); letter-spacing: -.01em; }

/* ==========================================================================
   TIDE STATION
   ========================================================================== */
.st-head { background: var(--ink); color: #fff; padding-block: 40px; }
.st-head h1 {
  font-family: var(--f-disp); font-weight: 900; font-stretch: 100%;
  font-size: var(--d2); line-height: 1.04;
  letter-spacing: -.025em; text-transform: uppercase; margin: 0;
  max-width: 900px;
}
.st-layout { display: grid; grid-template-columns: minmax(0,1fr) 360px; gap: 40px; align-items: start; }
.st-aside { position: sticky; top: 92px; display: grid; gap: 16px; }
/* A pinned rail taller than the viewport hides its lower cards — including the
   app panel — until the section ends. On short screens let it scroll normally. */
@media (max-height: 960px) {
  .tide-aside,
  .st-aside { position: static; }
}
/* Tide curve in the first card: SVG drawn by tide-station.js at the container's
   pixel width, so the 9px axis labels stay 9px on mobile instead of scaling down. */
.st-curve { border: var(--hair); background: var(--white); padding: 12px 14px 10px; margin-bottom: 14px; }
.st-curve__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.st-curve__label {
  font-family: var(--f-mono); font-size: 9px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted);
}
.st-curve__legend {
  display: flex; gap: 12px; font-family: var(--f-mono); font-size: 9px;
  letter-spacing: .1em; text-transform: uppercase; color: var(--muted);
}
.st-curve__legend span { display: inline-flex; align-items: center; gap: 5px; }
.st-curve__legend i { width: 7px; height: 7px; border-radius: 50%; display: block; }
.st-curve__legend i.h { background: color-mix(in srgb, var(--green) 46%, var(--ink)); }
.st-curve__legend i.l { background: var(--yellow); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 28%, transparent); }
.st-curve__plot { margin-top: 6px; }
.st-curve__svg { display: block; width: 100%; height: auto; overflow: visible; }
.st-curve__grid line { stroke: var(--line-soft); stroke-dasharray: 3 4; }
.st-curve__axis text,
.st-curve__dots text {
  font-family: var(--f-mono); font-size: 9px; letter-spacing: .04em;
  fill: var(--muted);
}
.st-curve__area { fill: color-mix(in srgb, var(--green) 22%, transparent); }
.st-curve__line {
  fill: none; stroke: color-mix(in srgb, var(--green) 46%, var(--ink));
  stroke-width: 2; stroke-linejoin: round; stroke-linecap: round;
}
.st-curve__dot--h { fill: color-mix(in srgb, var(--green) 46%, var(--ink)); stroke: var(--white); stroke-width: 1.5; }
.st-curve__dot--l { fill: var(--yellow); stroke: var(--white); stroke-width: 1.5; }
.st-curve__note { margin: 4px 0 0; font-family: var(--f-mono); font-size: 10px; line-height: 1.5; color: var(--muted); }
.st-curve[data-curve="empty"] { display: none; }

/* Station tide data: today's table, a 15-day peak grid, then the map. */
.st-tides { display: grid; gap: 36px; }
.st-block__head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; padding-bottom: 10px; margin-bottom: 14px;
  border-bottom: var(--hair);
}
.st-block__head h2 {
  margin: 0; font-family: var(--f-disp); font-weight: 900; font-stretch: 100%;
  font-size: 23px; line-height: 1.05; letter-spacing: -.01em; text-transform: uppercase;
}
.st-block__meta {
  font-family: var(--f-mono); font-size: 9px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--muted); text-align: right;
}
.st-block__note {
  margin: 10px 0 0; font-family: var(--f-mono); font-size: 10px;
  line-height: 1.6; color: var(--muted);
}
.st-nearby { margin: 0; padding-left: 18px; display: grid; gap: 8px; }
.st-nearby li { font-size: 14px; line-height: 1.5; }
.st-nearby a { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.st-nearby__meta { color: var(--muted); font-family: var(--f-mono); font-size: 10px; }
.st-tide-table-wrap { overflow-x: auto; border: var(--hair); background: #fff; }
.st-tide-table { width: 100%; border-collapse: collapse; }
.st-tide-table th {
  padding: 10px 14px; text-align: left; background: var(--paper-2);
  border-bottom: var(--hair); color: var(--muted);
  font-family: var(--f-mono); font-size: 9px; letter-spacing: .12em;
  text-transform: uppercase; font-weight: 500;
}
.st-tide-table td {
  padding: 12px 14px; border-bottom: 1px solid var(--line-soft);
  font-family: var(--f-mono); font-size: 13px; color: var(--ink-2);
}
.st-tide-table tr:last-child td { border-bottom: 0; }
.st-tide-type {
  display: inline-block; padding: 2px 6px; font-size: 9px; letter-spacing: .1em;
  text-transform: uppercase; border: 1px solid currentColor;
}
.st-tide-type--h { background: var(--green); border-color: var(--green); color: var(--ink); }
.st-tide-type--l { color: var(--muted); }
/* Tide calendar: one table per day, in the tide-times layout — Tide |
   Time (+offset) & date | Height, then a sunrise/sunset/moon strip.
   Wide screens fit two day tables per row; narrow screens fall back to one. */
.st-cal {
  display: grid; gap: 16px; align-items: start;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}
.tcal { border: var(--hair); background: var(--white); }
.tcal__head {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  padding: 11px 16px; border-bottom: var(--hair);
}
.tcal__head h3 {
  margin: 0; font-family: var(--f-disp); font-weight: 900; font-stretch: 100%;
  font-size: var(--body-s); line-height: 1.1; letter-spacing: -.01em; text-transform: uppercase;
}
.tcal__head span {
  font-family: var(--f-mono); font-size: 9px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
.tcal__row {
  display: grid;
  grid-template-columns: minmax(0,1fr) minmax(0,1.25fr) minmax(0,1fr);
  align-items: center;
}
.tcal__row--head {
  background: var(--paper-2); color: var(--muted); border-bottom: var(--hair);
}
.tcal__row--head span {
  padding: 10px; font-family: var(--f-mono); font-size: 9px;
  letter-spacing: .12em; text-transform: uppercase; font-weight: 500;
}
.tcal__row--head span:nth-child(n+2) { text-align: center; }
.tcal__row:not(.tcal__row--head) { border-top: 1px solid var(--line-soft); }
.tcal__row--head + .tcal__row { border-top: 0; }
.tcal__row:nth-child(odd):not(.tcal__row--head) { background: var(--paper); }
.tcal__type { padding: 12px; }
.tcal__when, .tcal__height {
  display: grid; justify-items: center; gap: 2px; padding: 10px; text-align: center;
}
.tcal__when b, .tcal__height b {
  font-family: var(--f-mono); font-size: var(--meta); font-weight: 600; color: var(--ink);
}
.tcal__when small, .tcal__height small {
  font-family: var(--f-mono); font-size: 9px; color: var(--muted);
}
.tcal__sun {
  display: grid; grid-template-columns: repeat(4, minmax(0,1fr));
  border-top: var(--hair); background: var(--white);
}
.tcal__sunitem {
  display: grid; justify-items: center; gap: 3px; padding: 11px 8px 12px;
  border-left: 1px solid var(--line-soft); color: var(--ink-2);
}
.tcal__sunitem:first-child { border-left: 0; }
.tcal__sunitem svg {
  width: 22px; height: 22px; stroke: currentColor; fill: none;
  stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.tcal__sunitem small {
  font-family: var(--f-mono); font-size: 9px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted);
}
.tcal__sunitem b { font-family: var(--f-mono); font-size: var(--meta); font-weight: 500; }
.st-map { height: 420px; border: var(--hair); background: #070C0B; }
.st-map[data-map-state="unavailable"] { display: grid; place-items: center; color: var(--muted); font-family: var(--f-mono); font-size: 11px; }
@media (max-width: 760px) {
  .st-block__head { align-items: flex-start; flex-direction: column; gap: 4px; }
  .st-block__meta { text-align: left; }
  .st-map { height: 320px; }
  .tcal__head { padding: 10px 12px; }
  .tcal__head h3 { font-size: var(--sm); }
  .tcal__row { grid-template-columns: minmax(0,1fr) minmax(0,1.25fr) minmax(0,.8fr); }
  .tcal__row--head span { padding: 9px 10px; font-size: 9px; letter-spacing: .06em; }
  .tcal__type { padding: 11px 10px; }
  .tcal__when, .tcal__height { padding: 9px 8px; }
  .tcal__when b, .tcal__height b { font-size: var(--meta); }
  .tcal__sunitem { padding: 9px 4px 10px; }
  .tcal__sunitem svg { width: 18px; height: 18px; }
  .tcal__sunitem b { font-size: var(--meta); }
}

.window-card { background: var(--green); color: var(--ink); padding: 22px; position: relative; overflow: hidden; }
.window-card::after { content: ""; position: absolute; inset: 0; background-image: repeating-linear-gradient(112deg, rgba(0,0,0,.05) 0 2px, transparent 2px 10px); }
.window-card > * { position: relative; z-index: 1; }
.window-card__label { font-family: var(--f-mono); font-size: 9px; letter-spacing: .14em; text-transform: uppercase; opacity: .65; }
.window-card__time { font-family: var(--f-mono); font-size: 40px; font-weight: 500; letter-spacing: -.03em; line-height: 1.05; margin: 6px 0 4px; }
.window-card p { font-size: 12px; line-height: 1.5; margin: 8px 0 0; }

.hilo { }
.hilo__row { display: grid; grid-template-columns: 46px 1fr 1fr 70px; gap: 12px; align-items: center; padding: 12px 10px; }
.hilo__row:nth-child(even) { background: var(--paper); }
.hilo__type { font-family: var(--f-mono); font-size: 10px; letter-spacing: .1em; text-transform: uppercase; }
.hilo__type--h { color: var(--ink); }
.hilo__type--l { color: var(--muted); }
.hilo__time { font-family: var(--f-mono); font-size: 15px; color: var(--ink); }
.hilo__height { font-family: var(--f-mono); font-size: 12px; color: var(--muted); }
.hilo__bar { height: 4px; background: #E7E7E4; position: relative; }
.hilo__bar span { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink); }

.nearby { display: grid; }
.nearby a {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 12px 12px;
  font-size: 13px; color: var(--ink);
}
.nearby a:nth-child(even) { background: var(--paper); }
.nearby a:hover { color: var(--orange-2); }
.nearby span { font-family: var(--f-mono); font-size: 10px; color: var(--muted); }

/* ==========================================================================
   RESPONSIVE — page layers
   ========================================================================== */
@media (max-width: 1180px) {
  .species-grid, .pages-grid { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .art-layout { grid-template-columns: minmax(0,1fr) 330px; gap: 28px; }
  .detail-layout, .tide-layout, .st-layout { grid-template-columns: minmax(0,1fr) 330px; gap: 28px; }
}

@media (max-width: 980px) {
  .spec-hero__grid { grid-template-columns: 1fr; }
  .spec-block { grid-template-columns: 1fr; gap: 20px; padding-block: 28px; }
  .swatches { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .claims { grid-template-columns: 1fr; gap: 24px; }
  .risk { grid-template-columns: 34px 1fr; }
  .risk span { grid-column: 2; }

  .hab-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .rev-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .rev-score { font-size: 48px; }

  .app-sec { grid-template-columns: 1fr; gap: 36px; }
  .app-features { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .app-stage { height: 414px; width: 100%; max-width: 520px; margin-inline: auto; perspective: 1300px; }
  .app-phone { width: 170px; --bezel: 6px; --radius: 30px; --island-gap: 7px; }
  .app-phone--a, .app-phone--c { top: 42px; }

  .tide-layout, .detail-layout, .st-layout { grid-template-columns: 1fr; }
  .tide-aside, .detail-rail, .st-aside { position: static; }
  .detail-rail { order: 2; }

  .wx-layout { grid-template-columns: 1fr; gap: 24px; }
  .wx-metrics { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .map-panel { width: 300px; }
  .map-tools, .map-legend { display: none; }

  .k-lead { grid-template-columns: 1fr; }
  .k-lead__media { min-height: 260px; }
  .k-cat { grid-template-columns: minmax(0,1fr) 60px 30px; gap: 14px; }
  .k-cat__copy { display: none; }

  .art-layout { grid-template-columns: 1fr; gap: 24px; }
  .art-rail { position: static; display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 20px; }
}

@media (max-width: 760px) {
  .page-head,
  .detail-head,
  .art-head,
  .st-head { padding-block: 28px 32px; }
  .page-head h1,
  .detail-head h1,
  .art-head h1,
  .st-head h1 { font-size: clamp(28px, 7.2vw, 36px); }
  .page-head__meta,
  .art-head__meta { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px 20px; width: 100%; }
  .page-head__meta b,
  .art-head__meta b { font-size: 15px; }
  .table { overflow-x: auto; }
  .table .trow { min-width: 620px; }

  .pages-grid, .species-grid { grid-template-columns: 1fr; }
  .swatches { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .space-spec { grid-template-columns: repeat(3, 1fr); }
  .type-row { grid-template-columns: 84px minmax(0,1fr); }
  .type-row__val { display: none; }
  /* the 64px wordmark sample cannot shrink below its own word width; let the
     demo scroll inside its cell instead of pushing the page sideways */
  .type-row__sample { min-width: 0; overflow-x: auto; scrollbar-width: none; }
  .type-row__sample::-webkit-scrollbar { display: none; }

  /* reading rail: two 190px columns is not a mobile layout — stack it */
  .art-rail { display: grid; grid-template-columns: 1fr; gap: 18px; }
  .art-rail__block { width: 100%; }

  .app-stage { height: 300px; max-width: 100%; perspective: 1000px; }
  .app-features { grid-template-columns: 1fr; }
  .app-feature { padding: 20px; }
  .app-phone { width: 118px; --bezel: 4px; --radius: 21px; --island-gap: 5px; }
  .app-phone--a, .app-phone--c { top: 34px; }
  .app-copy h2 { font-size: 40px; }
  .app-dl { gap: 10px; }
  .app-dl .btn { flex: 1 1 100%; height: 52px; }

  .hab-grid { gap: 12px; }
  .hab-card__body { padding: 14px 14px 13px; gap: 6px; }
  .hab-card__row h3 { font-size: 19px; }
  .hab-card__meta { font-size: 9px; letter-spacing: .08em; }
  .hab-card__meta b { font-size: 13px; }
  .hab-card__plates { display: block; }
  .hab-card__plates::before { content: none; }
  .hab-card__sp { font-size: 11px; }

  .day-strip { margin-top: 20px; }
  .day { min-width: 82px; padding: 10px 12px; }

  .tide-table .trow, .notes-table .trow, .wx-forecast .trow {
    grid-template-columns: 1fr 1fr; gap: 8px 12px;
    padding: 14px 8px; position: relative;
  }
  .tide-table .trow--head, .notes-table .trow--head, .wx-forecast .trow--head { display: none; }
  .tide-table .trow__main, .notes-table .trow__main, .wx-forecast .trow__main { grid-column: span 2; }
  .tide-table .tindex { position: absolute; right: 8px; top: 14px; }
  .trow__label { display: block; }
  .tide-range__bar { max-width: 80px; }
  .verdict-pill { justify-self: end; }

  .map-band__canvas { height: 62vh; min-height: 460px; }
  .map-panel {
    left: 12px; right: 12px; top: auto; bottom: 12px; width: auto;
    padding: 14px;
  }
  .map-panel__title { font-size: 18px; }
  .map-panel__layers { margin: 12px 0 10px; }
  .map-stamp { display: none; }

  .wx-metrics { grid-template-columns: 1fr 1fr; gap: 12px; }
  .wx-metric { padding: 14px; }
  .wx-metric__value { font-size: 26px; }

  .plate { width: 100%; margin-left: 0; aspect-ratio: 4/3; }
  .prose h2 { font-size: 24px; margin-top: 32px; }
  .prose p { font-size: 15px; }

  .art-body p { font-size: 16px; }
  .art-body > p:first-of-type { font-size: 17px; }
  .takeaways { padding: 20px; }

  .st-curve { padding: 10px 12px 8px; }

  .k-lead__body { padding: 22px; }
  .k-cat { grid-template-columns: 1fr 50px; }
  .k-cat__arrow { display: none; }

  .next-read { grid-template-columns: 1fr; }

  .country-grid { grid-template-columns: 1fr; gap: 12px; }
  .country-card { grid-template-columns: 112px minmax(0,1fr); }
  .country-card__flag { padding: 14px; }
  .country-card__body { padding: 16px; gap: 4px; }
  .country-card__count { font-size: 40px; }
  .country-card__body h3 { font-size: 21px; }
  .rev-grid { gap: 12px; margin-top: clamp(36px, 8vw, 56px); }
  .rev-card { padding: 18px; }
}

@media (max-width: 560px) {
  .rev-grid { grid-template-columns: 1fr; }
}

/* ==========================================================================
   LIST CONTROLS · species index / guide list / rule register
   ========================================================================== */
.list-sort {
  height: 38px; padding: 0 30px 0 12px;
  border: var(--hair); background-color: #fff; color: var(--ink);
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .08em;
  text-transform: uppercase; appearance: none; -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' fill='none' stroke='%23555555' stroke-width='1.5'%3E%3Cpath d='m1 1 4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 10px center;
}
.list-sort:hover { border-color: var(--green); }
.list-hint {
  margin: 14px 0 0; font-family: var(--f-mono); font-size: 10px;
  letter-spacing: .08em; text-transform: uppercase; line-height: 1.6; color: var(--muted);
}
.list-hint[hidden] { display: none; }
[data-list-item][hidden],
[data-list-empty][hidden] { display: none !important; }

/* article sources */
.art-sources { margin: 14px 0 0; padding-left: 18px; }
.art-sources li { font-size: 13px; line-height: 1.65; color: var(--body); margin-bottom: 10px; }
.art-sources a { color: var(--ink); border-bottom: 1px solid var(--ink); }
.art-sources__quote { display: block; margin-top: 4px; color: var(--muted); font-size: 12px; }

/* Full-index filter results. The page only holds one paginated slice; when a
   filter is active these rows come from the complete JSON index instead. */
.index-full { border: 1px solid var(--line); background: var(--paper); margin-top: 22px; }
.idx-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 2fr) auto;
  gap: 14px;
  align-items: center;
  padding: 12px 16px;
  border-top: 1px solid var(--line);
  color: inherit;
  text-decoration: none;
}
.idx-row:first-child { border-top: 0; }
.idx-row:hover { background: var(--paper-2); }
.idx-row__name { font-weight: 700; line-height: 1.25; }
.idx-row__meta {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--muted);
}
.idx-row__more {
  font-family: var(--f-mono);
  font-size: 11px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--green);
  white-space: nowrap;
}
@media (max-width: 640px) {
  .idx-row { grid-template-columns: minmax(0, 1fr) auto; }
  .idx-row__meta { grid-column: 1 / -1; grid-row: 2; }
}

/* Jump links let a reader reach any index page in one click instead of walking
   the Newer/Older chain. */
.pager__jump { display: inline-flex; align-items: center; gap: 2px; margin-left: 6px; }
.pager__jumpnum {
  height: 38px; min-width: 38px; padding: 0 8px;
  display: inline-flex; align-items: center; justify-content: center;
  border: var(--hair); background: #fff; color: var(--muted);
  font-family: var(--f-mono); font-size: 10px; letter-spacing: .06em;
  text-decoration: none;
}
.pager__jumpnum:hover { border-color: var(--green); color: var(--ink); }
.pager__jumpnum.is-active { background: var(--ink); border-color: var(--ink); color: #fff; }
.pager__gap { padding: 0 4px; color: var(--faint); font-family: var(--f-mono); font-size: 10px; }
@media (max-width: 760px) {
  .pager__jump { display: none; }
}

/* Long habitat and season tags must wrap on a 390px phone instead of being
   clipped by the fixed-height tag box. */
@media (max-width: 640px) {
  .detail-head__tags { flex-wrap: wrap; overflow: visible; }
  .detail-head__tags .tag {
    height: auto;
    min-height: 22px;
    max-width: 100%;
    padding: 3px 8px;
    white-space: normal;
    line-height: 1.3;
  }
}

/* ==========================================================================
   DARK PAGE HEADS — the station-page ink banner, reused by every detail and
   second-level page that still opened on a paper head.
   ========================================================================== */
.page-head.page-head--dark,
.detail-head.detail-head--dark,
.art-head.art-head--dark {
  background: var(--ink);
  color: #fff;
}
.page-head--dark h1,
.detail-head--dark h1,
.art-head--dark h1 { color: #fff; }

.page-head--dark .page-head__copy,
.detail-head--dark .lede,
.detail-head--dark .detail-head__note,
.art-head--dark .art-head__dek { color: rgba(255,255,255,.72); }
.page-head--dark .page-head__copy a {
  color: rgba(255,255,255,.88);
  text-decoration-color: rgba(255,255,255,.45);
}

.page-head--dark .page-head__meta,
.detail-head--dark .page-head__meta,
.art-head--dark .art-head__meta { color: rgba(255,255,255,.5); }
.page-head--dark .page-head__meta b,
.detail-head--dark .page-head__meta b,
.art-head--dark .art-head__meta b { color: #fff; }

.detail-head--dark .detail-head__latin { color: rgba(255,255,255,.55); }

.page-head--dark .breadcrumb,
.detail-head--dark .breadcrumb,
.art-head--dark .breadcrumb { color: rgba(255,255,255,.5); }
.page-head--dark .breadcrumb a,
.detail-head--dark .breadcrumb a,
.art-head--dark .breadcrumb a { color: rgba(255,255,255,.75); }
.page-head--dark .breadcrumb a:hover,
.detail-head--dark .breadcrumb a:hover,
.art-head--dark .breadcrumb a:hover { color: #fff; }
.page-head--dark .breadcrumb .sep,
.detail-head--dark .breadcrumb .sep,
.art-head--dark .breadcrumb .sep { color: rgba(255,255,255,.3); }

/* Neutral tags go dark; accent tags keep their own fill. */
.page-head--dark .tag,
.detail-head--dark .tag,
.art-head--dark .tag {
  background: rgba(255,255,255,.08);
  border-color: rgba(255,255,255,.2);
  color: rgba(255,255,255,.86);
}
.page-head--dark .tag--line,
.detail-head--dark .tag--line,
.art-head--dark .tag--line {
  background: transparent;
  border-color: rgba(255,255,255,.25);
  color: rgba(255,255,255,.72);
}
.page-head--dark .tag--green,
.detail-head--dark .tag--green,
.art-head--dark .tag--green { background: var(--green); border-color: var(--green); color: var(--ink); }
.page-head--dark .tag--orange,
.detail-head--dark .tag--orange,
.art-head--dark .tag--orange { background: var(--orange); border-color: var(--orange); color: #fff; }
.page-head--dark .tag--yellow { background: var(--yellow); border-color: var(--yellow); color: var(--ink); }
.page-head--dark .tag--ink { background: #fff; border-color: #fff; color: var(--ink); }

/* Chapter chips on the knowledge/regulation list heads. */
.page-head--dark .chip {
  background: rgba(255,255,255,.1);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.22);
  color: rgba(255,255,255,.88);
}
.page-head--dark .chip:hover { background: rgba(255,255,255,.2); color: #fff; }
.page-head--dark .chip.is-active { background: #fff; color: var(--ink); box-shadow: none; }

/* The knowledge list sets its own chip fills in knowledge.css; these selectors
   carry one more class so the ink head wins the cascade. */
.art-head--dark .art-cover img { border-color: rgba(255,255,255,.18); }

