/* ============================================================
   Proteus — navigable sea chart + instrument card
   Palette strictly Ulysses: blue / navy / tan / white. No gold.
   Type: TWK Lausanne (licensed). Design ported from theoceancompany.com.
   ============================================================ */

@font-face { font-family: "TWK Lausanne"; src: url("./fonts/TWKLausanne-300.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "TWK Lausanne"; src: url("./fonts/TWKLausanne-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "TWK Lausanne"; src: url("./fonts/TWKLausanne-400Italic.woff2") format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "TWK Lausanne"; src: url("./fonts/TWKLausanne-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "TWK Lausanne"; src: url("./fonts/TWKLausanne-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "TWK Lausanne"; src: url("./fonts/TWKLausanne-700Italic.woff2") format("woff2"); font-weight: 700; font-style: italic; font-display: swap; }

:root {
  --card:  #00527b;   /* deep ocean teal: the card ground (theoceancompany.com palette) */
  --blue:  #1497c4;   /* bright teal-cyan accent: beacons, live data, fleet-mode bathymetry */
  --navy:  #001e38;
  --tan:   #e0e1d2;
  --land:  #d4d5c4;   /* land fill, a touch warmer/deeper than the sea-paper */
  --paper-on-navy: #e6e7da;
  --mute-on-navy:  rgba(230, 231, 218, 0.52);
  --ink-mute: rgba(0, 30, 56, 0.55);
  --font: "TWK Lausanne", "Helvetica Neue", Arial, sans-serif;

  /* chart theme tokens — surf register (the paper sea chart) is the default;
     body.mode-fleet swaps these so the whole chart re-skins from tokens */
  --sea: var(--tan);                    /* ocean / paper ground */
  --landfill: var(--land);
  --landstroke: rgba(0, 30, 56, 0.5);
  --chartink: var(--navy);              /* graticule + marker ink */
  --bathyink: var(--navy);
  --grain: 0.42;                        /* aged-paper grain opacity */
}

/* fleet register — the industrial home/footer system (deep navy + electric blue) */
body.mode-fleet {
  --sea: var(--navy);
  --landfill: #2b3442;                  /* grey land on the navy ground */
  --landstroke: rgba(230, 231, 218, 0.16);
  --chartink: rgba(230, 231, 218, 0.5);
  --bathyink: var(--blue);
  --grain: 0.05;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility; }
body { font-family: var(--font); background: var(--sea); color: var(--navy); overflow: hidden; position: fixed; inset: 0; transition: background 0.55s ease; }

/* ---- the chart ------------------------------------------- */
/* animated swell flow, behind the chart (opaque land masks it to the ocean) */
.flow { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.chart { position: fixed; inset: 0; width: 100%; height: 100%; display: block; cursor: grab; touch-action: none; z-index: 1; }
#viewport { will-change: transform; }   /* GPU-composite the chart so pan/zoom transforms don't re-rasterize the whole map each frame */
.chart.grabbing { cursor: grabbing; }
.chart .land { fill: var(--landfill); stroke: var(--landstroke); stroke-width: 0.8; vector-effect: non-scaling-stroke; transition: fill 0.55s ease, stroke 0.55s ease; }
.chart .grat { stroke: var(--chartink); stroke-opacity: 0.10; stroke-width: 1; vector-effect: non-scaling-stroke; fill: none; }
/* bathymetry: surf = a faint navy depth field; fleet = electric-blue dashed depth contours */
.chart .bathy { fill: var(--bathyink); stroke: var(--bathyink); vector-effect: non-scaling-stroke; transition: fill 0.55s ease, stroke 0.55s ease; }
.chart .bathy--shelf { fill-opacity: 0.04; stroke-opacity: 0.15; stroke-width: 0.5; }
.chart .bathy--deep  { fill-opacity: 0.04; stroke-opacity: 0.05; stroke-width: 0.5; }
.chart .bathy--abyss { fill-opacity: 0.04; stroke-opacity: 0; }
.chart .rhumb { stroke: var(--chartink); stroke-opacity: 0.07; stroke-width: 1; vector-effect: non-scaling-stroke; fill: none; }
/* fleet register: navy water keeps a faint blue depth tint, but the depth contours
   read white (legible on the navy, like the card lines) — the instrument reading the floor */
body.mode-fleet .chart .bathy { stroke: #fff; }
body.mode-fleet .chart .bathy--shelf { fill-opacity: 0.05; stroke-opacity: 0.5; stroke-width: 0.8; stroke-dasharray: 3 3; }
body.mode-fleet .chart .bathy--deep  { fill-opacity: 0.07; stroke-opacity: 0.3; stroke-dasharray: 2 4; }
body.mode-fleet .chart .bathy--abyss { fill-opacity: 0.10; }

/* aged paper grain over everything */
.paper {
  position: fixed; inset: 0; z-index: 2; pointer-events: none;
  background-image: url("./assets/ulysses-paper-texture.webp");
  background-size: 620px; mix-blend-mode: multiply; opacity: var(--grain); transition: opacity 0.55s ease;
}
/* fleet-register shader glow: electric blue lifting off the navy ground (screen so it adds light) */
.fleetglow { position: fixed; inset: 0; z-index: 3; pointer-events: none; opacity: 0; transition: opacity 0.55s ease; mix-blend-mode: screen;
  background: radial-gradient(110% 70% at 50% 0%, rgba(20,151,196,0.16), rgba(20,151,196,0) 58%),
              radial-gradient(90% 62% at 50% 116%, rgba(20,151,196,0.12), rgba(20,151,196,0) 54%); }
body.mode-fleet .fleetglow { opacity: 1; }

/* ---- station markers ------------------------------------- */
.station { pointer-events: none; }
.station__hit { fill: transparent; }
.station__ring { fill: none; stroke: var(--navy); stroke-width: 1.2; vector-effect: non-scaling-stroke; opacity: 0.7; }
.station__dot  { fill: var(--navy); }
.station__beam { fill: url(#beaconGlow); opacity: 0; transform-box: fill-box; transform-origin: center; }
.station__label {
  font-family: var(--font); font-weight: 500; font-size: 12px; letter-spacing: 0.04em;
  fill: var(--navy); opacity: 0; pointer-events: none;
  paint-order: stroke; stroke: var(--tan); stroke-width: 3.5px; stroke-linejoin: round;   /* parchment halo lifts the label off the marker glow + coastline */
}
.station.is-hover .station__ring, .station.is-active .station__ring { stroke: var(--blue); }
.station.is-hover .station__dot,  .station.is-active .station__dot  { fill: var(--blue); }
.station.is-hover .station__beam, .station.is-active .station__beam { opacity: 1; animation: pulse 2.6s ease-in-out infinite; }
.station.is-hover .station__label, .station.is-active .station__label { opacity: 1; }
/* first-load invitation: the hero pulses, then auto-dives if untouched */
.station.is-hint .station__ring { stroke: var(--blue); }
.station.is-hint .station__dot  { fill: var(--blue); }
.station.is-hint .station__beam { opacity: 1; animation: pulse 2.6s ease-in-out infinite; }
@keyframes pulse { 0%,100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.4); opacity: 0.5; } }

/* ---- cluster marker (collapsed nearby spots) ------------- */
.cluster { cursor: pointer; }
.cluster__ring { fill: rgba(255,255,255,0.88); stroke: var(--navy); stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.cluster__count { font-family: var(--font); font-weight: 600; font-size: 11px; letter-spacing: 0.01em; fill: var(--navy); text-anchor: middle; }
.cluster.is-hover .cluster__ring { stroke: var(--blue); }
.cluster.is-hover .cluster__count { fill: var(--blue); }

/* ---- chrome (brand + tag) -------------------------------- */
.chrome { position: fixed; top: 0; left: 0; right: 0; z-index: 5; display: flex; justify-content: space-between; align-items: flex-start; padding: 26px 32px; pointer-events: none; }
.brand { display: flex; flex-direction: column; gap: 3px; }
/* the wordmark links back to the submission front door; chrome is pointer-events:none, so re-enable it here */
.brand__wordmark { display: block; width: 188px; height: 22px; background: var(--navy); pointer-events: auto; cursor: pointer; text-decoration: none;
  -webkit-mask: url("./assets/ulysses-wordmark.svg") no-repeat left center; mask: url("./assets/ulysses-wordmark.svg") no-repeat left center;
  -webkit-mask-size: contain; mask-size: contain; transition: opacity 0.2s ease; }
.brand__wordmark:hover { opacity: 0.62; }
.brand__sub { font-weight: 500; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-mute); }
body.mode-fleet .brand__wordmark { background: var(--paper-on-navy); }

/* ---- global register toggle (surf / fleet), pill ground flips by mode ---- */
.modeswitch { position: fixed; top: 22px; left: 50%; transform: translateX(-50%); z-index: 6; display: flex; gap: 2px; padding: 3px;
  background: rgba(0,30,56,0.06); border: 1px solid rgba(0,30,56,0.14); border-radius: 999px;
  box-shadow: 0 2px 12px rgba(0,30,56,0.10);
  -webkit-backdrop-filter: blur(7px); backdrop-filter: blur(7px); transition: background 0.45s ease, border-color 0.45s ease, box-shadow 0.45s ease, left 0.5s cubic-bezier(0.4, 0, 0.1, 1); }
.modeswitch__opt { font-family: var(--font); font-weight: 500; font-size: 12px; letter-spacing: 0.07em; text-transform: uppercase;
  color: var(--ink-mute); background: none; border: 0; cursor: pointer; padding: 10px 18px; border-radius: 999px; transition: color 0.25s ease, background 0.25s ease, scale 0.12s ease; }
.modeswitch__opt.is-on { background: var(--navy); color: #fff; }
.modeswitch__opt:active { scale: 0.96; }
/* keep the toggle clear of the side card when one is open (desktop) */
.card-open .modeswitch { left: calc((100% - min(440px, 92vw)) / 2); }
body.mode-fleet .modeswitch { background: rgba(0,12,28,0.4); border-color: rgba(230,231,218,0.2); box-shadow: 0 2px 16px rgba(0,0,0,0.32); }
body.mode-fleet .modeswitch__opt { color: var(--mute-on-navy); }
body.mode-fleet .modeswitch__opt.is-on { background: var(--blue); color: #fff; }

/* ---- legend (title block, bottom-left) ------------------- */
.legend { position: fixed; left: 32px; bottom: 30px; z-index: 5; max-width: 440px; pointer-events: none; transition: opacity 0.35s ease; }
.legend__title { font-weight: 400; font-size: clamp(24px, 3vw, 38px); line-height: 1.04; letter-spacing: -0.015em; margin-bottom: 14px; text-wrap: balance; }
.legend__epi { font-style: italic; font-size: 15px; line-height: 1.4; color: var(--navy); margin-bottom: 14px; }
.legend__epi span { display: block; margin-top: 6px; font-style: normal; font-weight: 500; font-size: 10.5px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ink-mute); }
.legend__epi em { font-style: italic; text-transform: none; letter-spacing: 0; }
.legend__hint { font-weight: 500; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-mute); }

/* ---- location selector (guided tour, bottom-right) ------- */
.selector { position: fixed; right: 32px; bottom: 30px; z-index: 6; display: flex; flex-direction: column; align-items: flex-end; gap: 7px; transition: right 0.5s cubic-bezier(0.4, 0, 0.1, 1); }
.selector__nav { display: flex; align-items: baseline; gap: 13px; }
.selector__name { font-weight: 400; font-size: 21px; letter-spacing: -0.012em; color: var(--navy); text-align: right; }
.selector__arrow { background: none; border: 0; cursor: pointer; font-family: var(--font); font-size: 25px; line-height: 0.8; color: var(--ink-mute); padding: 6px 10px; transition: color 0.2s ease, scale 0.12s ease; }
.selector__arrow:hover { color: var(--blue); }
.selector__arrow:active { scale: 0.96; }
.card-open .selector { right: calc(min(440px, 92vw) + 32px); }
/* fleet map is dark navy, so the selector flips to the on-navy chrome inks (was unreadable navy-on-navy) */
body.mode-fleet .selector__name { color: var(--paper-on-navy); }
body.mode-fleet .selector__arrow { color: var(--mute-on-navy); }

/* ---- the instrument card --------------------------------- */
.card {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 10; width: min(440px, 92vw);
  background: var(--card);
  background-image:
    radial-gradient(135% 90% at 14% -6%, rgba(115,180,210,0.40), rgba(0,82,123,0) 56%),
    radial-gradient(120% 100% at 98% 108%, rgba(0,20,60,0.42), rgba(0,82,123,0) 52%);
  box-shadow: -26px 0 64px rgba(0, 30, 56, 0.34);
  padding: 42px 36px 30px; color: #fff;
  transform: translateX(100%); transition: transform 0.42s cubic-bezier(0.4, 0, 0.1, 1);
  overflow-y: auto; display: flex; flex-direction: column; gap: 22px;
}
.card.is-open { transform: translateX(0); }
/* compose the entrance: card content rises + fades in, lightly staggered (skipped on reduced-motion) */
@keyframes cardrise { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.card.is-open .card__head    { animation: cardrise 0.34s cubic-bezier(0.2,0,0,1) 0s both; }
.card.is-open .card__read    { animation: cardrise 0.34s cubic-bezier(0.2,0,0,1) 0.03s both; }
.card.is-open .stats         { animation: cardrise 0.34s cubic-bezier(0.2,0,0,1) 0.06s both; }
.card.is-open #swellblock    { animation: cardrise 0.34s cubic-bezier(0.2,0,0,1) 0.09s both; }
.card.is-open #readout       { animation: cardrise 0.34s cubic-bezier(0.2,0,0,1) 0.12s both; }
.card.is-open .card__outlook { animation: cardrise 0.34s cubic-bezier(0.2,0,0,1) 0.15s both; }
.card.is-open .card__ledger  { animation: cardrise 0.34s cubic-bezier(0.2,0,0,1) 0.17s both; }
.card.is-open.is-fleet .fleetcard__top { animation: cardrise 0.34s cubic-bezier(0.2,0,0,1) 0.03s both; }
.card.is-open.is-fleet .fleetcard__img { animation: cardrise 0.42s cubic-bezier(0.2,0,0,1) 0.1s both; }
@media (prefers-reduced-motion: reduce) {
  .card.is-open .card__head, .card.is-open .card__read, .card.is-open .stats, .card.is-open #swellblock,
  .card.is-open #readout, .card.is-open .card__outlook, .card.is-open .card__ledger,
  .card.is-open.is-fleet .fleetcard__top, .card.is-open.is-fleet .fleetcard__img { animation: none; }
}
.card__close { position: absolute; top: 14px; right: 16px; z-index: 4; width: 40px; height: 40px; display: flex; align-items: center; justify-content: center; background: none; border: 0; color: rgba(255,255,255,0.6); font-size: 23px; line-height: 1; cursor: pointer; font-family: var(--font); border-radius: 50%; transition: color 0.18s ease, background 0.18s ease, scale 0.12s ease; }
.card__close:hover { background: rgba(255,255,255,0.12); color: #fff; }
.card__close:active { scale: 0.96; }
/* header: one card language with the fleet card (white wordmark | LIVE · spot) */
.card__head { display: flex; flex-direction: column; }
.card__brandhead { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 22px; padding-right: 26px; }
.card__wordmark { display: block; width: 116px; height: 15px; background: #fff; flex: none;
  -webkit-mask: url("./assets/ulysses-wordmark.svg") no-repeat left center; mask: url("./assets/ulysses-wordmark.svg") no-repeat left center;
  -webkit-mask-size: contain; mask-size: contain; }
.card__live { font-weight: 500; font-size: 13px; letter-spacing: 0.1em; text-transform: uppercase; color: rgba(255,255,255,0.9); text-align: right; }
.card__rule { height: 1px; background: rgba(255,255,255,0.35); border: 0; margin: 18px 0 0; }
.card__loc { font-weight: 400; font-size: 14px; color: rgba(255,255,255,0.6); margin-top: 15px; letter-spacing: -0.005em; }
.card__sub { font-weight: 400; font-size: 13.5px; line-height: 1.5; color: rgba(255,255,255,0.8); margin-top: 9px; max-width: 42ch; text-wrap: pretty; }
.card__sub:empty { display: none; }
/* sibling strip: the co-located spots in a cluster, flipped between in place. Scrolls horizontally
   (never wraps or bleeds off a narrow phone), with a right-edge fade cueing more; the active pill is
   scrolled into view in map.js. */
.card__siblings { display: flex; flex-wrap: nowrap; gap: 6px; margin-top: 13px; overflow-x: auto; min-width: 0;
  scrollbar-width: none; padding-bottom: 1px;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 22px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 22px), transparent); }
.card__siblings[hidden] { display: none; }
.card__siblings::-webkit-scrollbar { display: none; }
.card__sibling { flex: 0 0 auto; font: inherit; font-size: 11.5px; font-weight: 500; letter-spacing: 0.01em;
  padding: 4px 10px; border-radius: 999px; border: 1px solid rgba(255,255,255,0.28);
  background: transparent; color: rgba(255,255,255,0.72); cursor: pointer; white-space: nowrap;
  transition: background 0.16s, color 0.16s, border-color 0.16s; }
.card__sibling:hover { border-color: rgba(255,255,255,0.6); color: #fff; }
.card__sibling.is-active { background: #fff; color: var(--card); border-color: #fff; }

/* the read: rating + surf height, then the in-situ marker (SF) */
.card__read { display: flex; flex-direction: column; gap: 13px; }
.card__insitu { display: flex; align-items: center; gap: 9px; font-size: 13px; font-weight: 500; letter-spacing: 0.03em; color: rgba(255,255,255,0.95); }
.card__insitu[hidden] { display: none; }
.card__insitu b { font-weight: 600; letter-spacing: 0.07em; }
.card__insitu-dot { width: 9px; height: 9px; border-radius: 50%; background: #fff; flex: none; box-shadow: 0 0 10px rgba(255,255,255,0.65); }
.card__insitu-note { font-weight: 400; color: rgba(255,255,255,0.55); letter-spacing: 0.01em; }

/* tide sparkline, embedded on the card */
.tideblock__head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 2px; }
.tideblock__k { font-weight: 500; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: rgba(255,255,255,0.55); }
.tideblock__v { font-weight: 300; font-size: 30px; line-height: 1; font-variant-numeric: tabular-nums; }
.tideblock__v .u { font-size: 0.4em; font-weight: 500; color: rgba(255,255,255,0.6); margin-left: 5px; letter-spacing: 0.01em; }
.spark { display: block; width: 100%; height: 78px; overflow: visible; }
.spark--swell { height: 96px; }
.tideblock__note { font-weight: 400; font-size: 11px; letter-spacing: 0.03em; color: rgba(255,255,255,0.5); }
/* the in-situ correction line draws on over the open-model base, left-to-right */
@keyframes insitudraw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.swell-insitu--draw { animation: insitudraw 0.95s cubic-bezier(0.4, 0, 0.1, 1) both; }
.swell-legend { display: flex; gap: 22px; margin-top: 9px; }
.swell-legend[hidden] { display: none; }
.swell-legend__item { display: flex; align-items: center; gap: 7px; font-size: 11px; color: rgba(255,255,255,0.62); }
.swell-legend__line { width: 20px; border-top: 2px dashed #fff; }            /* in-situ correction (dashed, the headline overlay) */
.swell-legend__line--o { border-top: 1.6px solid rgba(255,255,255,0.55); }   /* open model (solid base) */
.card__surf { display: flex; align-items: baseline; gap: 14px; margin-bottom: 2px; }
.card__rating { font-weight: 700; font-size: 30px; line-height: 1; letter-spacing: -0.01em; }
.card__rating.r0, .card__rating.r1 { color: rgba(255,255,255,0.5); }
.card__rating.r2 { color: rgba(255,255,255,0.85); }
.card__rating.r3 { color: #fff; }
.card__rating.r4 { color: #fff; text-shadow: 0 0 18px rgba(255,255,255,0.55); }
.card__surfh { font-weight: 300; font-size: 27px; line-height: 1; font-variant-numeric: tabular-nums; }
.card__surfh .u { font-size: 0.48em; font-weight: 500; color: rgba(255,255,255,0.62); margin-left: 5px; }
.card__outlook { font-weight: 500; font-size: 14px; line-height: 1.45; color: #fff; letter-spacing: -0.005em; text-wrap: pretty; }
.card__outlook:empty { display: none; }
/* the AI conditions read is a few sentences, so lighter + roomier than the bold one-line outlook */
.card__outlook--ai { font-weight: 400; font-size: 13.5px; line-height: 1.55; color: rgba(255,255,255,0.92); letter-spacing: 0; }
.tag { display: inline-block; font-size: 0.42em; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding: 2px 6px; border-radius: 3px; vertical-align: middle; margin-left: 5px; }
.tag--good { background: rgba(255,255,255,0.92); color: var(--blue); }
.tag--bad { background: rgba(0,30,56,0.45); color: rgba(255,255,255,0.82); }
.tag--mid { background: rgba(255,255,255,0.18); color: #fff; }

/* conditions — swell / wind / water. swell carries the longest string (height @ period dir, plus
   "out of window"), so it gets the widest column and the row aligns to the top so a swell that
   wraps doesn't drag wind/water out of line. */
.stats { display: grid; grid-template-columns: 1.34fr 1fr 0.8fr; gap: 14px; align-items: start; }
.stat { display: flex; flex-direction: column; gap: 8px; }
.stat dt { font-weight: 500; font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(255,255,255,0.56); }
.stat dd { font-weight: 400; font-size: 18px; line-height: 1.1; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.stat dd .u { font-size: 0.6em; font-weight: 500; color: rgba(255,255,255,0.6); margin-left: 4px; }

.card__ledger { font-weight: 400; font-size: 12.5px; line-height: 1.55; color: rgba(255,255,255,0.72); margin-top: auto; }

/* ---- fleet (Mako clusters on the map) -------------------- */
.mako { pointer-events: none; }
.mako__img { opacity: 0; transition: opacity 0.3s ease; }   /* surf hides the fleet entirely; fleet shows the vehicle */
.mako__beam { fill: url(#beaconGlow); opacity: 0; transform-box: fill-box; transform-origin: center; }
.mako__label { font-family: var(--font); font-weight: 500; font-size: 12px; letter-spacing: 0.04em; fill: var(--paper-on-navy); opacity: 0; pointer-events: none; }
/* fleet register: the mako vehicles are the markers (the real product render, untreated). A soft
   teal beacon glow at rest keeps them legible on the dark chart without going toy-bright; hover
   brightens it to full and pulses. */
body.mode-fleet .mako__img { opacity: 1; }
body.mode-fleet .mako__beam { opacity: 0.55; }
body.mode-fleet .mako.is-hover .mako__img, body.mode-fleet .mako.is-active .mako__img { opacity: 1; }
body.mode-fleet .mako.is-hover .mako__beam, body.mode-fleet .mako.is-active .mako__beam { opacity: 1; animation: pulse 2.6s ease-in-out infinite; }
body.mode-fleet .mako.is-hover .mako__label, body.mode-fleet .mako.is-active .mako__label { opacity: 1; }

/* ---- fleet card (brief + treated image) ------------------ */
/* one card language with the surf card: royal-blue ground, white marks, the
   treated image bleeding to the bottom edge and dissolving up into the blue. */
.card.is-fleet { padding: 0; gap: 0; }
.fleetcard { position: relative; height: 100%; }
.fleetcard__top { padding: 40px 34px 0; display: flex; flex-direction: column; gap: 20px; }
/* padding-right clears the partner logo from the close button (top:20/right:22) so
   the two never crowd in the corner; the wordmark + blurb keep the full inset */
.fleetcard__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 30px; padding-right: 26px; }
.fleetcard__wordmark { display: block; width: 116px; height: 15px; background: #fff; flex: none;
  -webkit-mask: url("./assets/ulysses-wordmark.svg") no-repeat left center; mask: url("./assets/ulysses-wordmark.svg") no-repeat left center;
  -webkit-mask-size: contain; mask-size: contain; }
/* box-fit so heterogeneous partner marks read as equal-weight stamps: wide lockups
   cap on width, compact seals cap on height (taller, since they read smaller) */
.fleetcard__logo { display: flex; align-items: center; justify-content: flex-end; min-height: 30px; }
.fleetcard__logo img { max-height: 30px; max-width: 98px; width: auto; height: auto; object-fit: contain; display: block; }
.fleetcard__logo--text { font-weight: 500; font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: #fff; }
.fleetcard__rule { height: 1px; background: rgba(255,255,255,0.35); border: 0; margin: 0; }
.fleetcard__blurb { font-weight: 400; font-size: 15px; line-height: 1.52; color: rgba(255,255,255,0.92); text-wrap: pretty; }
/* image fills from just under the blurb to the bottom edge, bottom-anchored so the
   subject grounds the card, dissolving up into the blue. A hold-then-fade keeps the
   top of the image zone fully blue so a tall panel reads as the blue resolving into
   the photo (like the 408x628 mock, just taller), not a slab of pasted-on image. */
/* image anchored to the bottom edge with a clamped height, so it holds the 408x628 mock
   proportion on any panel height (flex:1 grew with the window and over-stretched it) */
.fleetcard__img { position: absolute; left: 0; right: 0; bottom: 0; height: clamp(300px, 54%, 480px);
  background-size: cover; background-position: center bottom; }
.fleetcard__img::before { content: ""; position: absolute; inset: 0;
  background: linear-gradient(to bottom, var(--card) 0%, var(--card) 12%, rgba(0,82,123,0.66) 30%, rgba(0,82,123,0) 70%); }

/* ---- baseline footer ------------------------------------- */
.baseline { position: fixed; right: 32px; bottom: 30px; z-index: 4; max-width: 360px; text-align: right;
  font-weight: 400; font-size: 12px; line-height: 1.5; color: var(--ink-mute); pointer-events: none; }

@media (max-width: 760px) {
  .baseline { display: none; }
  .chrome { padding: 16px 18px; }
  .brand__wordmark { width: 132px; height: 16px; }

  /* the register toggle drops to its own centered row below the wordmark, so the
     two never collide on a narrow screen (the pill is center-anchored, the wordmark left) */
  .modeswitch { top: 56px; }

  /* the card becomes a bottom sheet so the map stays visible above it */
  .card {
    top: auto; left: 0; right: 0; bottom: 0; width: 100%; max-width: none;
    height: 68vh; border-radius: 20px 20px 0 0; padding: 24px 22px 28px; gap: 22px;
    transform: translateY(100%); box-shadow: 0 -22px 54px rgba(0, 30, 56, 0.34);
  }
  .card.is-open { transform: translateY(0); }
  .card__name { font-size: 32px; }
  .card__close { top: 16px; right: 18px; }

  /* swell carries the longest string; give it the full width on a phone so it never wraps,
     wind + water share the row below */
  .stats { grid-template-columns: 1fr 1fr; gap: 16px 14px; }
  .stat:first-child { grid-column: 1 / -1; }
  /* scroll cue: a fixed teal fade at the sheet's bottom edge signals the card scrolls */
  body.card-open::after { content: ""; position: fixed; left: 0; right: 0; bottom: 0; height: 26px; z-index: 11;
    background: linear-gradient(to top, var(--card), rgba(0,82,123,0)); pointer-events: none; }

  /* legend (world-view title) shrinks + clears the sheet */
  .legend { left: 18px; bottom: 20px; max-width: 72vw; }
  .legend__title { font-size: 21px; margin-bottom: 8px; }
  .legend__hint { display: none; }   /* "drag to pan · scroll to zoom" is desktop language; hide on touch */

  /* the card is a bottom sheet on mobile, so the toggle stays centered */
  .card-open .modeswitch { left: 50%; }

  /* selector sits on its own row above the hero title (world view), then rides above the sheet when a card opens */
  .selector { right: 18px; bottom: 88px; }
  .selector__name { font-size: 18px; }
  .card-open .selector { right: 18px; bottom: calc(68vh + 14px); }
}
