@font-face { font-family: "Fraunces"; src: url("/fonts/fraunces.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "Hanken Grotesk"; src: url("/fonts/hanken-grotesk.woff2") format("woff2"); font-weight: 400 700; font-display: swap; }
@font-face { font-family: "DM Mono"; src: url("/fonts/dm-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "DM Mono"; src: url("/fonts/dm-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --night: #0a2a33;
  --deep: #0c3743;
  --sea: #0f4c5c;
  --sea-2: #15606f;
  --ember: #e36414;
  --sun: #fb8b24;
  --foam: #efe9dc;
  --paper: #f6f1e6;
  --sand: #e4dccb;
  --ink: #0b2730;
  --ink-2: #3d5a61;
  --mist: #6b8a8a;
  --mist-2: #9db5b3;
  --line: rgba(11, 39, 48, 0.14);
  --line-dark: rgba(239, 233, 220, 0.14);
  --flood: #0b7a62;
  --flood-l: #5fd3b3;
  --ebb: #b2410f;
  --ebb-l: #f5a06a;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "DM Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;
  --r: 14px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body { margin: 0; background: var(--night); color: var(--foam); font: 400 16px/1.55 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden; }
img, svg, canvas { display: block; }
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; letter-spacing: -0.015em; line-height: 1.08; margin: 0; text-wrap: balance; font-variation-settings: "opsz" 96; }
p { margin: 0; text-wrap: pretty; }
code { font-family: var(--mono); font-size: 0.88em; }
:focus-visible { outline: 2px solid var(--sun); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 20; background: var(--sun); color: var(--ink); padding: 10px 14px; border-radius: 8px; font-weight: 600; text-decoration: none; }
.skip:focus { top: 12px; }
.wrap { width: min(1120px, 100% - 40px); margin-inline: auto; }

/* Header */
.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px max(20px, calc((100% - 1120px) / 2)); background: rgba(10, 42, 51, 0.82); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-dark); }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 600 21px/1 var(--serif); letter-spacing: -0.01em; }
.brand img { border-radius: 9px; }
.brand.small { font-size: 18px; }
.nav { display: flex; align-items: center; gap: 2px; }
.nav a { text-decoration: none; padding: 9px 11px; border-radius: 9px; font-weight: 500; font-size: 15px; color: var(--mist-2); transition: color .2s, background-color .2s; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--foam); background: rgba(239, 233, 220, 0.07); }
.x-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; padding: 0 !important; }
.x-btn svg { width: 17px; height: 17px; fill: currentColor; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: 12px; font: 600 16px/1 var(--sans); text-decoration: none; border: 1.5px solid transparent; cursor: pointer; transition: transform .18s var(--ease), background-color .2s, border-color .2s, color .2s; -webkit-tap-highlight-color: transparent; }
.btn:active { transform: translateY(1px) scale(0.98); }
.btn-sun { background: var(--sun); color: var(--ink); }
.btn-sun:hover { background: #ff9b3d; }
.btn-line { border-color: rgba(239, 233, 220, 0.35); color: var(--foam); }
.btn-line:hover { border-color: var(--foam); }
.btn-ink { background: var(--ink); color: var(--foam); }
.btn-ink:hover { background: var(--sea); }
.link-btn { background: none; border: 0; padding: 10px 6px; color: var(--ink-2); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: 14px; }

/* Hero */
.hero { position: relative; min-height: min(760px, 92svh); display: flex; flex-direction: column; justify-content: center; padding: 56px max(20px, calc((100% - 1120px) / 2)) 210px; overflow: hidden; isolation: isolate; background: radial-gradient(120% 80% at 80% 0%, #124f5e 0%, var(--night) 60%); }
.tide-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -1; touch-action: pan-y; }
.hero-copy { max-width: 700px; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font: 500 13px/1.3 var(--mono); letter-spacing: 0.02em; color: var(--mist-2); margin-bottom: 22px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--sun); box-shadow: 0 0 0 0 rgba(251, 139, 36, 0.5); animation: pulse 2.4s var(--ease) infinite; flex: none; }
.pulse.off { background: var(--mist); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(251, 139, 36, 0.45); } 70%, 100% { box-shadow: 0 0 0 10px rgba(251, 139, 36, 0); } }
.hero h1 { font-size: clamp(40px, 7.4vw, 78px); font-weight: 560; }
.hero h1 em, .sub-hero h1 em { font-style: italic; font-weight: 500; color: var(--sun); padding-right: 0.06em; }
.lede { margin-top: 22px; font-size: clamp(17px, 2vw, 19px); color: #c9d6d2; max-width: 560px; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.gauge { position: absolute; right: max(20px, calc((100% - 1120px) / 2)); top: 50%; translate: 0 -62%; width: 330px; padding: 22px 22px 18px 34px; border-radius: var(--r); background: rgba(10, 42, 51, 0.55); border: 1px solid var(--line-dark); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.gauge-staff { position: absolute; left: 14px; top: 18px; bottom: 18px; width: 6px; border-radius: 3px; background: repeating-linear-gradient(to bottom, var(--foam) 0 2px, transparent 2px 14px); opacity: .45; }
.gauge-title { font: 500 12px/1.3 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--sun); margin-bottom: 12px; }
.gauge-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.gauge-list a { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 10px; padding: 8px 10px; margin: 0 -10px; border-radius: 10px; text-decoration: none; transition: background-color .2s; }
.gauge-list a:hover { background: rgba(239, 233, 220, 0.07); }
.g-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.g-num { font: 500 15px/1.4 var(--mono); color: var(--foam); }
.g-bar { grid-column: 1 / -1; height: 4px; border-radius: 2px; background: var(--mist); transform-origin: left; transform: scaleX(var(--w)); animation: grow 1s var(--ease) both; animation-delay: calc(var(--i) * 90ms + 200ms); }
.gauge-list li[class^="hue-"] .g-bar { background: var(--hue-l); }
@keyframes grow { from { transform: scaleX(0); } }
.gauge-empty { color: var(--mist-2); font: 400 14px/1.4 var(--mono); padding: 8px 0; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.hero-hint { position: absolute; right: max(20px, calc((100% - 1120px) / 2)); bottom: 22px; font: 400 12px/1 var(--mono); color: var(--mist); letter-spacing: 0.06em; text-transform: uppercase; }

.sub-hero { position: relative; overflow: hidden; isolation: isolate; padding: 40px 0 120px; background: radial-gradient(120% 90% at 85% 0%, #124f5e 0%, var(--night) 65%); }
.sub-hero h1 { font-size: clamp(34px, 6vw, 60px); max-width: 760px; }
.sub-hero .lede { max-width: 620px; }
.back { display: inline-flex; gap: 6px; align-items: center; min-height: 40px; margin-bottom: 18px; color: var(--mist-2); text-decoration: none; font-weight: 500; }
.back:hover { color: var(--foam); }

/* Paper sections */
.table-sec { background: var(--paper); color: var(--ink); padding: 72px 0 88px; position: relative; }
.table-sec::before { content: ""; position: absolute; left: 0; right: 0; top: 2px; height: 26px; transform: translateY(-100%); background: var(--paper); -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 26' preserveAspectRatio='none'%3E%3Cpath d='M0 26V14C20 2 40 2 60 14s40 12 60 0v12z'/%3E%3C/svg%3E") 0 100% / 120px 26px repeat-x; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 26' preserveAspectRatio='none'%3E%3Cpath d='M0 26V14C20 2 40 2 60 14s40 12 60 0v12z'/%3E%3C/svg%3E") 0 100% / 120px 26px repeat-x; }
.table-sec::before { z-index: 1; }
.table-sec.tight { padding-top: 48px; }
.kicker { font: 500 12.5px/1.3 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ember); margin-bottom: 10px; }
.kicker.light { color: var(--sun); }
.table-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 16px 24px; margin-bottom: 18px; }
.table-head h2 { font-size: clamp(28px, 4.4vw, 44px); }
.table-tools { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.seg { display: inline-flex; padding: 4px; border-radius: 12px; background: var(--sand); gap: 2px; }
.seg button { border: 0; background: transparent; padding: 0 14px; min-height: 40px; border-radius: 9px; font-weight: 600; font-size: 14.5px; color: var(--ink-2); cursor: pointer; transition: background-color .2s, color .2s; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--foam); }
.seg button:not([aria-pressed="true"]):hover { color: var(--ink); }

.legend { list-style: none; margin: 0 0 22px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: 14px; color: var(--ink-2); }
.legend li { display: inline-flex; align-items: center; gap: 8px; }
.tide-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 9px 4px 8px; border-radius: 999px; font: 500 12.5px/1.2 var(--mono); letter-spacing: 0.03em; white-space: nowrap; }
.tide-chip::before { content: ""; width: 10px; height: 6px; background: currentColor; -webkit-mask: var(--glyph) center / contain no-repeat; mask: var(--glyph) center / contain no-repeat; }
.tide-chip.flood { background: rgba(11, 122, 98, 0.12); color: var(--flood); --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M0 6 5 0l5 6z'/%3E%3C/svg%3E"); }
.tide-chip.ebb { background: rgba(178, 65, 15, 0.11); color: var(--ebb); --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Cpath d='M0 0h10L5 6z'/%3E%3C/svg%3E"); }
.tide-chip.slack { background: rgba(11, 39, 48, 0.07); color: var(--ink-2); --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Crect y='2' width='10' height='2' rx='1'/%3E%3C/svg%3E"); }
.tide-chip.new { background: transparent; color: var(--flood); box-shadow: inset 0 0 0 1.5px rgba(11, 122, 98, 0.5); --glyph: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 10 6'%3E%3Ccircle cx='5' cy='3' r='3'/%3E%3C/svg%3E"); }
.tide-chip.flood::before { animation: bob 2.6s var(--ease) infinite; }
.tide-chip.ebb::before { animation: sink 2.6s var(--ease) infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0.5px); } 50% { transform: translateY(-1.5px); } }
@keyframes sink { 0%, 100% { transform: translateY(-0.5px); } 50% { transform: translateY(1.5px); } }
.sub-hero .tide-chip.flood { background: rgba(95, 211, 179, 0.14); color: var(--flood-l); }
.sub-hero .tide-chip.ebb { background: rgba(245, 160, 106, 0.14); color: var(--ebb-l); }
.sub-hero .tide-chip.slack { background: rgba(239, 233, 220, 0.1); color: var(--foam); }
.sub-hero .tide-chip.new { color: var(--flood-l); box-shadow: inset 0 0 0 1.5px rgba(95, 211, 179, 0.55); }
.t-flood { color: var(--flood-l); font-weight: 600; }
.t-ebb { color: var(--ebb-l); font-weight: 600; }

/* Theme inks: one sea-chart colour per theme (dark ink on paper, light ink on the night sea) */
.hue-kelp { --hue: #3d7a4c; --hue-l: #8fcf9c; }
.hue-lagoon { --hue: #1d7f7a; --hue-l: #6fd3c8; }
.hue-harbor { --hue: #2c6391; --hue-l: #8ab8e0; }
.hue-indigo { --hue: #4b51a3; --hue-l: #a9adf0; }
.hue-violet { --hue: #7b4b8f; --hue-l: #d1a6e0; }
.hue-coral { --hue: #c2513b; --hue-l: #f3a08d; }
.hue-gold { --hue: #a4741a; --hue-l: #f0c56a; }
.hue-rust { --hue: #9a3b2c; --hue-l: #e89482; }
.theme-chip { margin-top: 14px; }
.tide-chip.big { font-size: 13px; padding: 8px 13px 8px 11px; }

/* Board */
.board { border-top: 2px solid var(--ink); }
.board-loading { padding: 28px 0; color: var(--ink-2); font-family: var(--mono); font-size: 14px; }
.sub-hero .board-loading { color: var(--mist-2); }
.row { display: grid; grid-template-columns: 34px minmax(0, 1.6fr) minmax(120px, 1fr) 140px 130px; align-items: center; gap: 16px; padding: 16px 6px 16px 14px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; transition: background-color .2s; position: relative; }
.row:hover { background: rgba(228, 220, 203, 0.55); }
a.row::before { content: ""; position: absolute; left: 0; top: 12px; bottom: 12px; width: 3px; border-radius: 2px; background: var(--hue, var(--sea)); transform: scaleY(0.55); opacity: 0.75; transition: transform .25s var(--ease), opacity .25s; }
a.row:hover::before, a.row:focus-visible::before { transform: none; opacity: 1; }
.row-head { padding-block: 10px; font: 500 11.5px/1.2 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-2); }
.row-head:hover { background: none; }
.rank { font: 500 14px/1 var(--mono); color: var(--ink-2); }
.name { display: flex; align-items: center; gap: 12px; min-width: 0; }
.emoji { width: 40px; height: 40px; flex: none; display: grid; place-items: center; border-radius: 11px; background: var(--sand); background: color-mix(in srgb, var(--hue, var(--sand)) 17%, var(--paper)); box-shadow: inset 0 -3px 0 color-mix(in srgb, var(--hue, var(--sand)) 45%, transparent); font-size: 21px; line-height: 1; }
.name-txt { min-width: 0; }
.name-txt strong { display: block; font: 600 18px/1.2 var(--serif); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.name-txt .tide-chip { margin-top: 5px; }
.num { font: 500 17px/1.2 var(--mono); text-align: right; font-variant-numeric: tabular-nums; }
.num small { display: block; font-size: 12px; color: var(--ink-2); font-weight: 400; margin-top: 3px; }
.num small.up { color: var(--flood); }
.num small.down { color: var(--ebb); }
.spark { height: 34px; display: flex; align-items: end; gap: 2px; }
.spark i { flex: 1; min-width: 2px; border-radius: 2px 2px 0 0; background: var(--hue, var(--sea)); opacity: 0.42; height: var(--h); transform-origin: bottom; }
.spark i.zero { background: var(--sand); height: 2px; opacity: 1; }
.spark i.hot { opacity: 1; }
.row-go { position: absolute; right: -22px; top: 50%; translate: 0 -50%; opacity: 0; transition: opacity .2s, translate .2s var(--ease); color: var(--ember); }
.row:hover .row-go { opacity: 1; translate: 4px -50%; }

.empty { padding: 44px 0 30px; display: grid; grid-template-columns: 120px 1fr; gap: 26px; align-items: center; }
.empty svg { width: 120px; height: 90px; }
.empty h3 { font-size: 24px; margin-bottom: 6px; }
.empty p { color: var(--ink-2); max-width: 520px; }
.more-btn { display: block; width: 100%; min-height: 52px; margin-top: -1px; border: 0; border-bottom: 1px solid var(--line); background: transparent; color: var(--sea); font-weight: 600; cursor: pointer; transition: background-color .2s; }
.more-btn:hover { background: rgba(228, 220, 203, 0.55); }
.board-foot { margin-top: 14px; font: 400 13px/1.4 var(--mono); color: var(--ink-2); }

/* How */
.how { background: var(--sea); padding: 88px 0 96px; position: relative; }
.how h2 { font-size: clamp(30px, 4.6vw, 48px); max-width: 640px; }
.how-chart { position: relative; margin-top: 44px; }
.how-wave, .how-wave-v { position: absolute; overflow: visible; pointer-events: none; }
.how-wave { left: 0; top: 0; width: 100%; height: 160px; }
.how-wave-v { display: none; left: 0; top: 0; bottom: 0; width: 40px; height: 100%; }
.how-wave path, .how-wave-v path { fill: none; vector-effect: non-scaling-stroke; stroke-linecap: round; }
.hw-datum { stroke: rgba(239, 233, 220, 0.22); stroke-width: 1; stroke-dasharray: 3 7; }
.hw-back { stroke: rgba(111, 211, 200, 0.3); stroke-width: 2; }
.hw-line { stroke: var(--flood-l); stroke-width: 3; }
.how-chart.reveal { opacity: 1; transform: none; }
.how-chart.reveal .hw-line, .how-chart.reveal .hw-back { stroke-dasharray: 1; stroke-dashoffset: 1; transition: stroke-dashoffset 1.8s var(--ease); }
.how-chart.reveal .hw-back { transition-delay: .25s; }
.how-chart.in .hw-line, .how-chart.in .hw-back { stroke-dashoffset: 0; }
.how-grid { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); align-items: start; gap: 18px; counter-reset: how; position: relative; }
.how-card { position: relative; background: var(--deep); border: 1px solid var(--line-dark); border-radius: var(--r); padding: 22px 22px 26px; counter-increment: how; }
.how-card:nth-child(1) { margin-top: 128px; }
.how-card:nth-child(2) { margin-top: 86px; }
.how-card:nth-child(3) { margin-top: 38px; }
.how-mark { position: absolute; left: 50%; top: -8px; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: var(--sea); box-shadow: inset 0 0 0 3px var(--flood-l), 0 0 0 4px var(--sea); }
.how-card:nth-child(3) .how-mark { background: var(--flood-l); }
.how-card h3 { font-size: 22px; margin: 18px 0 8px; }
.how-card h3::before { content: counter(how) ". "; color: var(--sun); font-style: italic; }
.how-card p { color: #c2d1cd; font-size: 15.5px; }
.how-art { width: 100%; height: auto; aspect-ratio: 160 / 96; background: var(--night); border-radius: 10px; }
.how-art * { fill: none; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.art-dots circle { fill: var(--foam); stroke: none; opacity: .9; }
.art-dots circle:nth-child(n+4) { fill: var(--sun); }
.art-line { stroke: var(--mist); }
.art-bracket { stroke: var(--mist-2); stroke-width: 2; }
.art-staff { stroke: var(--foam); }
.art-ticks { stroke: var(--mist-2); stroke-width: 2; }
.art-flood { stroke: var(--flood-l); stroke-width: 4; }
.art-ebb { stroke: var(--ebb-l); stroke-width: 4; }
.art-card { fill: var(--sea-2); stroke: none; }
.art-card.dim { opacity: .65; }
.art-card.dimmer { opacity: .35; }
.art-new { fill: var(--sun); stroke: none; }
.how-card.in .art-flood, .how-card.in .art-ebb, .how-card.in .art-line { stroke-dasharray: 200; stroke-dashoffset: 200; animation: draw 1.4s .2s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }

.how::before, .pro-band::before, .table-sec::after, .how::after { content: ""; position: absolute; left: 0; right: 0; top: 2px; height: 26px; transform: translateY(-100%); -webkit-mask: var(--wave) 0 100% / 120px 26px repeat-x; mask: var(--wave) 0 100% / 120px 26px repeat-x; pointer-events: none; }
:root { --wave: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 26' preserveAspectRatio='none'%3E%3Cpath d='M0 26V14C20 2 40 2 60 14s40 12 60 0v12z'/%3E%3C/svg%3E"); }
.how::before { background: var(--sea); z-index: 1; }
.pro-band { position: relative; }
.pro-band::before { background: var(--sun); z-index: 1; }
/* a second, offset swell behind each wave so the edge reads as moving water */
.table-sec::after, .how::after { height: 36px; -webkit-mask-position: 60px 100%; mask-position: 60px 100%; -webkit-mask-size: 120px 36px; mask-size: 120px 36px; z-index: 0; }
.table-sec::after { background: rgba(111, 211, 200, 0.32); }
.how::after { background: rgba(21, 96, 111, 0.6); }

/* Scroll tide: header waterline (all widths) and a tide staff on wide screens */
.top-tide { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: linear-gradient(90deg, var(--sea-2), var(--flood-l) 70%, var(--sun)); transform-origin: left; transform: scaleX(0); will-change: transform; }
.tide-staff { display: none; position: fixed; right: 16px; top: 50%; height: 260px; margin-top: -130px; width: 10px; z-index: 6; container-type: size; border-radius: 5px; background: rgba(10, 42, 51, 0.78); box-shadow: 0 0 0 1px rgba(239, 233, 220, 0.16); }
.ts-ticks { position: absolute; inset: 6px 2px; background: repeating-linear-gradient(to bottom, rgba(239, 233, 220, 0.45) 0 1px, transparent 1px 16px); }
.ts-water { position: absolute; inset: 0; border-radius: 5px; background: linear-gradient(to top, var(--sea-2), var(--flood-l)); opacity: .85; transform-origin: bottom; transform: scaleY(0); will-change: transform; }
.ts-tag { position: absolute; right: 18px; top: -10px; padding: 3px 7px; border-radius: 6px; background: var(--night); color: var(--foam); font: 500 11px/14px var(--mono); letter-spacing: .04em; white-space: nowrap; box-shadow: 0 0 0 1px rgba(239, 233, 220, 0.16); will-change: transform; transform: translateY(100cqh); }
@media (min-width: 1240px) { .tide-staff { display: block; } }

/* Pro band */
.pro-band { background: var(--sun); color: var(--ink); padding: 56px 0; }
.pro-band-in { display: flex; align-items: center; justify-content: space-between; gap: 24px 40px; flex-wrap: wrap; }
.pro-band h2 { font-size: clamp(26px, 3.8vw, 38px); margin-bottom: 10px; }
.pro-band p { max-width: 620px; }
.pro-band .kicker { color: var(--ink); opacity: .75; }

/* Theme page */
.theme-title { display: flex; align-items: center; gap: 16px; }
.theme-title .emoji { width: 58px; height: 58px; font-size: 32px; border-radius: 16px; background: rgba(239, 233, 220, 0.1); background: color-mix(in srgb, var(--hue-l, var(--foam)) 18%, transparent); box-shadow: inset 0 -4px 0 color-mix(in srgb, var(--hue-l, var(--foam)) 55%, transparent); }
.theme-desc { margin-top: 12px; color: #c9d6d2; max-width: 560px; }
.stats { margin: 28px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 720px; }
.stat { border-top: 1px solid var(--line-dark); padding-top: 12px; }
.stat dt { font: 500 11.5px/1.3 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--mist-2); }
.stat dd { margin: 6px 0 0; font: 500 clamp(22px, 3.4vw, 30px)/1.1 var(--mono); font-variant-numeric: tabular-nums; }
.stat dd small { display: block; font-size: 12.5px; color: var(--mist-2); margin-top: 4px; font-weight: 400; }
.theme-chart { margin-bottom: 44px; }
.bars { height: 120px; display: flex; align-items: end; gap: 3px; border-bottom: 2px solid var(--ink); }
.bars i { flex: 1; height: var(--h); min-height: 2px; background: var(--sea); border-radius: 3px 3px 0 0; transform-origin: bottom; }
.bars i.hot { background: var(--ember); }
.theme-chart[class*="hue-"] .bars i { background: var(--hue); opacity: .5; }
.theme-chart[class*="hue-"] .bars i.hot { opacity: 1; }
.theme-chart[class*="hue-"] .bars i.zero { background: var(--sand); opacity: 1; }
.bars i.zero { background: var(--sand); }
.theme-chart.in .bars i { animation: rise .7s var(--ease) both; animation-delay: calc(var(--i) * 18ms); }
@keyframes rise { from { transform: scaleY(0); } }
.bars-axis { display: flex; justify-content: space-between; margin-top: 8px; font: 400 12px/1 var(--mono); color: var(--ink-2); }
.coins { border-top: 2px solid var(--ink); }
.coin { display: grid; grid-template-columns: 44px minmax(0, 1fr) 96px 110px 110px 28px; align-items: center; gap: 14px; padding: 14px 6px; border-bottom: 1px solid var(--line); text-decoration: none; color: inherit; transition: background-color .2s; }
a.coin:hover { background: rgba(228, 220, 203, 0.55); }
.coin-img { width: 44px; height: 44px; border-radius: 12px; background: var(--sand); object-fit: cover; display: grid; place-items: center; font: 600 15px/1 var(--serif); color: var(--ink-2); overflow: hidden; }
.coin-name strong { display: block; font: 600 17px/1.25 var(--serif); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.coin-name span { font: 400 13px/1.3 var(--mono); color: var(--ink-2); }
.coin .age { font: 500 14px/1.2 var(--mono); color: var(--ink-2); text-align: right; white-space: nowrap; }
.coin .age.fresh { color: #a84406; }
.coin .ext { color: var(--ink-2); }
.coin.dim .coin-name strong, .coin.dim .num { opacity: 0.62; }

/* Pro page */
.pro-grid { list-style: none; padding: 0; margin: 0 0 32px; display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.pro-card { background: var(--foam); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; }
.pro-num { display: inline-block; font: 500 26px/1 var(--mono); color: var(--ember); margin-bottom: 18px; }
.pro-card h3 { font-size: 20px; margin-bottom: 6px; }
.pro-card p { color: var(--ink-2); font-size: 15px; }
.pay-card, .key-card { background: var(--foam); border: 1px solid var(--line); border-radius: var(--r); padding: 26px; margin-bottom: 18px; }
.pay-card { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; border-left: 4px solid var(--sun); }
.pay-card h2, .key-card h2 { font-size: 26px; margin-bottom: 8px; }
.pay-card p, .key-card p { color: var(--ink-2); max-width: 620px; }
.key-card summary { cursor: pointer; font: 600 19px/1.3 var(--serif); min-height: 40px; display: flex; align-items: center; list-style-position: inside; }
.key-card[open] summary { margin-bottom: 8px; }
.key-form { margin-top: 16px; }
.key-form label { display: block; font: 500 12.5px/1.3 var(--mono); letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-2); margin-bottom: 8px; }
.key-row { display: flex; gap: 10px; flex-wrap: wrap; }
.key-row input { flex: 1 1 220px; min-width: 0; min-height: 48px; padding: 0 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--paper); font: 400 16px/1 var(--mono); color: var(--ink); }
.key-row input:focus { outline: none; border-color: var(--sea); box-shadow: 0 0 0 3px rgba(15, 76, 92, 0.18); }
.form-msg { min-height: 1.4em; margin-top: 8px; font-size: 14px; }
.form-msg.err { color: #a23a00; }
.pro-board { margin: 40px 0; }
.api { margin-top: 56px; }
.api h2 { font-size: clamp(26px, 3.6vw, 36px); margin-bottom: 10px; }
.api > p { color: var(--ink-2); max-width: 680px; }
.endpoints { margin: 22px 0; border-top: 2px solid var(--ink); }
.endpoints div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 6px 22px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.endpoints dt { font: 500 14.5px/1.4 var(--mono); overflow-wrap: anywhere; }
.endpoints dd { margin: 0; color: var(--ink-2); }
.verb { display: inline-block; padding: 1px 6px; margin-right: 6px; border-radius: 6px; background: var(--ink); color: var(--foam); font-size: 12px; }
.code { margin: 0; background: var(--night); color: var(--foam); border-radius: 12px; padding: 18px; overflow-x: auto; font: 400 13.5px/1.6 var(--mono); }

/* Footer */
.foot { background: var(--night); padding: 34px 0 40px; color: var(--mist-2); font-size: 14px; border-top: 1px solid var(--line-dark); }
.foot-in { display: flex; align-items: center; justify-content: space-between; gap: 16px 28px; flex-wrap: wrap; }
.foot nav { display: flex; gap: 4px; }
.foot nav a { padding: 8px 10px; text-decoration: none; border-radius: 8px; }
.foot nav a:hover { color: var(--foam); }
.foot .brand { color: var(--foam); }

/* 404 + admin */
.lost { min-height: 100svh; display: grid; place-items: center; padding: 24px; }
.lost-in { display: grid; justify-items: start; gap: 14px; max-width: 440px; }
.lost-in img { border-radius: 14px; }
.lost h1 { font-size: 40px; }
.lost p { color: var(--mist-2); }
.admin { background: var(--paper); color: var(--ink); }
.admin-in { padding: 40px 0; max-width: 760px; }
.admin h1 { font-size: 34px; margin-bottom: 20px; }
.admin h2 { font-size: 22px; margin: 28px 0 10px; }
.key-list { list-style: none; padding: 0; margin: 16px 0; border-top: 1px solid var(--line); }
.key-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-family: var(--mono); font-size: 14px; }
.key-list .revoked { color: var(--mist); text-decoration: line-through; }
.key-list button { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 10px; cursor: pointer; }
.new-key { word-break: break-all; font-family: var(--mono); background: var(--sand); padding: 10px; border-radius: 8px; display: block; margin-top: 8px; }

/* Reveal */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }
.row.enter { animation: rowIn .55s var(--ease) both; animation-delay: calc(var(--i, 0) * 40ms); }
@keyframes rowIn { from { opacity: 0; transform: translateY(10px); } }

/* Layout breakpoints */
@media (max-width: 1100px) { .gauge { display: none; } }
@media (max-width: 960px) {
  .how-grid { grid-template-columns: 1fr; max-width: 600px; padding-left: 40px; }
  .how-chart { max-width: 600px; }
  .how-wave { display: none; }
  .how-wave-v { display: block; }
  .how-card:nth-child(n) { margin-top: 0; }
  .how-mark { left: -29px; top: 26px; margin-left: 0; }
  .pro-grid { grid-template-columns: repeat(2, 1fr); }
  .row { grid-template-columns: 28px minmax(0, 1fr) 96px 104px; }
  .row .spark-cell { display: none; }
  .coin { grid-template-columns: 44px minmax(0, 1fr) 84px 100px 24px; }
  .coin .liq { display: none; }
}
@media (max-width: 640px) {
  .nav a:not(.x-btn) { padding: 9px 8px; font-size: 14.5px; }
  .hero { padding-top: 36px; padding-bottom: 170px; min-height: 0; }
  .hero-hint { display: none; }
  .table-sec { padding: 56px 0 64px; }
  .row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name num" "spark vol"; gap: 10px 14px; padding: 14px 2px 14px 12px; }
  .row-head { display: none; }
  .row .rank { display: none; }
  .row .name { grid-area: name; }
  .row .num.launch { grid-area: num; }
  .row .spark-cell { display: block; grid-area: spark; }
  .row .num.vol { grid-area: vol; align-self: end; }
  .row .num { font-size: 16px; }
  .row-go { display: none; }
  .spark { height: 28px; }
  .spark i.zero { opacity: .5; }
  .sub-hero { padding-bottom: 112px; }
  .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .stat dd { font-size: 21px; }
  .stat dd small { font-size: 11.5px; }
  .coin { grid-template-columns: 40px minmax(0, 1fr) auto; grid-template-areas: "img name age" "img vol vol"; gap: 2px 12px; }
  .coin-img { grid-area: img; width: 40px; height: 40px; }
  .coin-name { grid-area: name; min-width: 0; }
  .coin .age { grid-area: age; }
  .coin .vol { grid-area: vol; text-align: left; font-size: 13px; color: var(--ink-2); }
  .coin .vol small { display: inline; margin-left: 4px; }
  .coin .ext { display: none; }
  .empty { grid-template-columns: 1fr; gap: 14px; padding-top: 30px; }
  .empty svg { width: 96px; height: 72px; }
  .pro-grid { grid-template-columns: 1fr; }
  .endpoints div { grid-template-columns: 1fr; }
  .pay-card, .key-card { padding: 20px; }
}
@media (max-width: 420px) {
  .cta .btn { flex: 1 1 100%; }
}
@media (max-width: 359px) {
  .brand-name { display: none; }
  .wrap { width: calc(100% - 32px); }
  .stats { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .reveal { opacity: 1; transform: none; }
}
