@font-face {
  font-family: "Fraunces Local";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/fraunces-normal-600.woff2") format("woff2");
}
@font-face {
  font-family: "Fraunces Local";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/fraunces-normal-700.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader Local";
  font-style: normal;
  font-weight: 430;
  font-display: swap;
  src: url("../fonts/newsreader-normal-430.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader Local";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/newsreader-normal-600.woff2") format("woff2");
}
@font-face {
  font-family: "Newsreader Local";
  font-style: italic;
  font-weight: 430;
  font-display: swap;
  src: url("../fonts/newsreader-italic-430.woff2") format("woff2");
}
@font-face {
  font-family: "Sora Local";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/sora-normal-500.woff2") format("woff2");
}
@font-face {
  font-family: "Sora Local";
  font-style: normal;
  font-weight: 650;
  font-display: swap;
  src: url("../fonts/sora-normal-650.woff2") format("woff2");
}

:root {
  --peat: #13241c;
  --kelp: #1e3a2e;
  --copper: #c45c32;
  --copper-deep: #9a3f1e;
  --sand: #f1e6d0;
  --foam: #fbf6ec;
  --ink: #141c18;
  --mist: #8d9b93;
  --chart: #dcc9a3;
  --line: #d7cbb3;
  --ok: #2f6b52;
  --rail: 4.6rem;
  --gutter: clamp(1.1rem, 3.2vw, 2.4rem);
  --measure: 41.5rem;
  --display: "Fraunces Local", "Iowan Old Style", "Palatino Linotype", serif;
  --body: "Newsreader Local", "Iowan Old Style", Georgia, serif;
  --ui: "Sora Local", "Avenir Next", "Segoe UI", sans-serif;
}

html:lang(zh-Hans), html:lang(zh) {
  --display: "Songti SC", "STSong", "Noto Serif SC", "Source Han Serif SC", "PingFang SC", serif;
  --body: "Songti SC", "STSong", "Noto Serif SC", "PingFang SC", "Hiragino Sans GB", serif;
  --ui: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Heiti SC", sans-serif;
}
html:lang(ja) {
  --display: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Hiragino Mincho Pro", "Noto Serif JP", serif;
  --body: "Hiragino Mincho ProN", "Yu Mincho", "YuMincho", "Noto Serif JP", serif;
  --ui: "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "YuGothic", "Noto Sans JP", sans-serif;
}
html:lang(zh-Hans) body, html:lang(zh) body, html:lang(ja) body {
  line-height: 1.72;
  font-weight: 400;
}
html:lang(zh-Hans) .spit-copy h1, html:lang(zh) .spit-copy h1, html:lang(ja) .spit-copy h1 {
  line-height: 1.28;
  letter-spacing: 0;
}

*,
*::before,
*::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { margin: 0; }
body {
  color: var(--ink);
  background:
    radial-gradient(1200px 420px at 8% -10%, #e7d7b6 0%, transparent 58%),
    var(--foam);
  font-family: var(--body);
  font-size: 1.125rem;
  line-height: 1.62;
  font-weight: 430;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--copper-deep); text-underline-offset: 0.18em; }
a:hover { color: var(--copper); }
:focus-visible { outline: 2px solid var(--copper); outline-offset: 3px; }
.quay-lock { overflow: hidden; }

.skip-jump {
  position: absolute;
  left: .8rem; top: -3.4rem;
  background: var(--peat); color: var(--sand);
  padding: .5rem .8rem; z-index: 80;
}
.skip-jump:focus { top: .8rem; }

.quay {
  position: sticky; top: 0; z-index: 40;
  background: color-mix(in srgb, var(--peat) 92%, transparent);
  color: var(--sand);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid color-mix(in srgb, var(--chart) 28%, transparent);
}
.quay-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 1rem;
  align-items: center;
  padding: .7rem var(--gutter);
}
.brand {
  display: flex; gap: .65rem; align-items: center;
  color: inherit; text-decoration: none;
}
.brand img { width: 2.35rem; height: 2.35rem; }
.brand b {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.02rem;
  letter-spacing: .01em;
  line-height: 1.05;
}
.brand small {
  display: block;
  font-family: var(--ui);
  font-size: .62rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--chart);
  font-weight: 500;
}
.waypoint {
  display: flex; flex-wrap: wrap; justify-content: center; gap: .15rem .05rem;
  list-style: none; margin: 0; padding: 0;
}
.waypoint a {
  color: var(--sand);
  text-decoration: none;
  font-family: var(--ui);
  font-size: .72rem;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: .45rem .55rem;
  border-radius: 2px;
}
.waypoint a:hover { background: color-mix(in srgb, white 10%, transparent); color: #fff; }
.quay-tools { display: flex; align-items: center; gap: .55rem; }
.lang-box { position: relative; }
.lang-box > summary {
  list-style: none;
  cursor: pointer;
  font-family: var(--ui);
  font-size: .68rem;
  font-weight: 650;
  letter-spacing: .06em;
  color: var(--chart);
  border: 1px solid color-mix(in srgb, var(--chart) 40%, transparent);
  border-radius: 2px;
  padding: .32rem .55rem;
  user-select: none;
}
.lang-box > summary::-webkit-details-marker,
.lang-box > summary::marker { display: none; content: ""; }
.lang-box[open] > summary { background: var(--copper); color: #fff; }
.lang-panel {
  position: absolute;
  right: 0;
  top: calc(100% + .35rem);
  background: var(--peat);
  border: 1px solid color-mix(in srgb, var(--chart) 35%, transparent);
  min-width: 11.2rem;
  z-index: 30;
  padding: .25rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  box-shadow: 4px 6px 0 #0a1410;
}
.lang-panel a {
  color: var(--sand);
  text-decoration: none;
  font-family: var(--ui);
  font-size: .68rem;
  font-weight: 650;
  padding: .4rem .5rem;
  display: flex;
  flex-direction: column;
  gap: .08rem;
}
.lang-panel a span {
  font-weight: 500;
  font-size: .58rem;
  color: var(--chart);
  letter-spacing: 0;
  text-transform: none;
}
.lang-panel a.is-here { background: var(--copper); color: #fff; }
.lang-panel a.is-here span { color: #ffe8d8; }
.drawer-langs {
  margin: 1.2rem 0 .25rem;
  font-family: var(--ui);
  font-size: .62rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--chart);
}
.reef-btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: .4rem;
  background: var(--copper); color: #fff;
  text-decoration: none;
  font-family: var(--ui); font-weight: 650; font-size: .78rem;
  letter-spacing: .04em; text-transform: uppercase;
  padding: .62rem .95rem;
  border: 0; border-radius: 2px;
  box-shadow: 3px 3px 0 var(--peat);
}
.reef-btn:hover { background: var(--copper-deep); color: #fff; }
.reef-btn.ghost {
  background: transparent; color: var(--peat);
  border: 1px solid var(--peat); box-shadow: none;
}
.quay .reef-btn { box-shadow: 3px 3px 0 #0a1410; }
.menu-nub {
  display: none;
  width: 2.4rem; height: 2.4rem;
  background: transparent; border: 1px solid var(--chart); color: var(--sand);
  cursor: pointer;
}

.salt-chip {
  position: relative;
  display: inline-flex; align-items: center; gap: .35rem;
  font-family: var(--ui); font-size: .68rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--mist);
  cursor: help; border-bottom: 1px dotted var(--copper);
}
.salt-chip::before {
  content: "";
  width: .45rem; height: .45rem; border-radius: 50%;
  background: var(--copper);
}
.salt-chip [data-salt-panel] {
  position: absolute; left: 0; top: calc(100% + .45rem);
  width: min(22rem, 78vw);
  background: var(--peat); color: var(--sand);
  padding: .75rem .85rem;
  font-family: var(--body); font-size: .92rem; letter-spacing: 0; text-transform: none;
  line-height: 1.45; z-index: 12;
  box-shadow: 6px 8px 0 color-mix(in srgb, var(--copper) 45%, transparent);
}

.spit-hero {
  display: grid;
  grid-template-columns: 1.15fr .95fr;
  min-height: min(88vh, 46rem);
  background: var(--peat);
  color: var(--sand);
}
.spit-visual {
  position: relative;
  overflow: hidden;
  clip-path: polygon(0 0, 100% 0, 92% 100%, 0 100%);
}
.spit-visual img {
  width: 100%; height: 100%; object-fit: cover; min-height: 22rem;
}
.spit-visual figcaption {
  position: absolute; left: 1rem; bottom: 1rem;
  font-family: var(--ui); font-size: .62rem; letter-spacing: .08em;
  text-transform: uppercase; color: #fff; background: #13241ccc; padding: .25rem .45rem;
}
.spit-copy {
  padding: clamp(1.4rem, 4vw, 3.2rem) var(--gutter) 2rem 1.2rem;
  display: flex; flex-direction: column; justify-content: center;
  gap: .85rem;
}
.kicker {
  font-family: var(--ui); font-size: .72rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--chart); margin: 0;
}
h1, h2, h3, h4 {
  font-family: var(--display); font-weight: 700; line-height: 1.12;
  letter-spacing: -.015em; color: var(--peat); margin: 0 0 .6rem;
}
.spit-copy h1 { color: var(--foam); font-size: clamp(2.1rem, 4.4vw, 3.55rem); }
.lede { font-size: 1.18rem; color: #e8dfcf; margin: 0 0 .4rem; max-width: 36rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: .3rem 0 .4rem; }
.widget-dock {
  background: var(--sand); color: var(--ink);
  padding: .85rem; margin-top: .4rem;
  border-left: 4px solid var(--copper);
}
.widget-dock p {
  font-family: var(--ui); font-size: .68rem; letter-spacing: .1em;
  text-transform: uppercase; margin: 0 0 .55rem; color: var(--kelp);
}

.flood-band {
  background: var(--sand);
  padding: 1.15rem var(--gutter);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .8rem 1.2rem;
  border-bottom: 1px solid var(--line);
}
.flood-band b {
  display: block; font-family: var(--ui); font-size: .64rem;
  letter-spacing: .12em; text-transform: uppercase; color: var(--mist); font-weight: 500;
}
.flood-band span { font-family: var(--display); font-size: 1.15rem; color: var(--peat); }

.tray {
  padding: 1.4rem var(--gutter) .4rem;
}
.tray h2 { font-size: 1.55rem; }

.sheet {
  display: grid;
  grid-template-columns: var(--rail) minmax(0, 1fr);
  gap: 0 1.4rem;
  padding: 1.6rem var(--gutter) 3.2rem;
}
.tide-rail {
  font-family: var(--ui); font-size: .62rem; letter-spacing: .16em;
  text-transform: uppercase; color: var(--mist);
  writing-mode: vertical-rl; transform: rotate(180deg);
  justify-self: center; padding-top: .4rem;
  border-right: 1px dashed var(--line);
  padding-right: .7rem;
}
.prose { max-width: var(--measure); }
.prose p { margin: 0 0 1rem; }
.prose h2 { font-size: clamp(1.55rem, 2.5vw, 2.05rem); margin: 1.8rem 0 .7rem; }
.prose h3 { font-size: 1.22rem; margin: 1.25rem 0 .45rem; color: var(--kelp); }
.prose ul, .prose ol { margin: 0 0 1.1rem; padding-left: 1.15rem; }
.prose li { margin: 0 0 .35rem; }
.prose table { width: 100%; border-collapse: collapse; font-size: 1rem; margin: 0 0 1.2rem; }
.prose th, .prose td {
  text-align: left; padding: .55rem .5rem;
  border-bottom: 1px solid var(--line); vertical-align: top;
}
.prose th {
  font-family: var(--ui); font-size: .68rem; letter-spacing: .08em;
  text-transform: uppercase; color: var(--kelp); font-weight: 650;
}
.cite-src {
  font-size: .92rem; color: #3d4a43; font-style: italic;
}

.ledger {
  width: 100%; background: #fffdf8;
  border: 1px solid var(--line);
  box-shadow: 8px 8px 0 var(--chart);
  margin: .4rem 0 1.4rem;
}
.ledger caption {
  text-align: left; font-family: var(--ui); font-size: .7rem;
  letter-spacing: .14em; text-transform: uppercase; color: var(--copper);
  padding: .7rem .8rem 0;
}

.bay-mosaic {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .85rem;
  margin: 1.2rem 0 1.8rem;
}
.shoal {
  background: #fffdf8;
  border: 1px solid var(--line);
  display: flex; flex-direction: column;
  min-height: 100%;
  text-decoration: none; color: inherit;
}
.shoal img { aspect-ratio: 3/2; object-fit: cover; width: 100%; }
.shoal-body { padding: .85rem .9rem 1rem; }
.shoal h3 { font-size: 1.12rem; margin: 0 0 .35rem; }
.shoal p { margin: 0; font-size: 1rem; color: #3a4740; }
.shoal .meta {
  font-family: var(--ui); font-size: .66rem; letter-spacing: .1em;
  text-transform: uppercase; color: var(--copper); margin-bottom: .35rem;
}

.plate {
  margin: 1.3rem 0;
}
.plate img { width: 100%; }
.plate figcaption {
  font-family: var(--ui); font-size: .72rem; color: var(--mist);
  margin-top: .4rem;
}

.compare {
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: .8rem;
  margin: 1rem 0 1.5rem;
}
.compare article {
  background: #fffdf8; border-top: 3px solid var(--kelp); padding: 1rem .95rem;
}
.compare article.preferred { border-top-color: var(--copper); background: #fff8ef; }
.compare h3 { font-size: 1.08rem; }
.compare .sum { font-family: var(--display); font-size: 1.35rem; color: var(--copper); }

.fold-list { border-top: 1px solid var(--line); }
.fold-list button {
  width: 100%; text-align: left;
  background: transparent; border: 0; border-bottom: 1px solid var(--line);
  font-family: var(--display); font-size: 1.12rem; font-weight: 700;
  padding: .85rem 1.8rem .85rem 0; cursor: pointer; color: var(--peat);
  position: relative;
}
.fold-list button::after {
  content: "+"; position: absolute; right: 0; top: .75rem; color: var(--copper);
  font-family: var(--ui);
}
.fold-list button[aria-expanded="true"]::after { content: "–"; }
.fold-list .answer { padding: .15rem 0 1rem; }

.cta-slab {
  background: var(--kelp); color: var(--sand);
  padding: 1.3rem 1.2rem; margin: 1.6rem 0;
  display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; justify-content: space-between;
}
.cta-slab h2, .cta-slab p { color: var(--foam); margin: 0; }
.cta-slab p { max-width: 32rem; }

.hub-index {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: .7rem 1.1rem;
  margin: 1rem 0 1.6rem;
}
.hub-index a {
  display: grid; grid-template-columns: 4.2rem 1fr; gap: .7rem;
  text-decoration: none; color: inherit;
  background: #fffdf8; border: 1px solid var(--line); padding: .55rem;
}
.hub-index img { width: 4.2rem; height: 3.1rem; object-fit: cover; }
.hub-index strong { font-family: var(--display); display: block; }

.neap {
  background: var(--peat); color: var(--chart);
  padding: 2.2rem var(--gutter) 1.4rem;
  margin-top: 2rem;
}
.neap-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 1.4rem;
}
.neap a { color: var(--sand); text-decoration: none; }
.neap a:hover { color: #fff; text-decoration: underline; }
.neap h2 {
  color: var(--chart); font-family: var(--ui); font-size: .68rem;
  letter-spacing: .14em; text-transform: uppercase; font-weight: 650;
}
.neap ul { list-style: none; margin: 0; padding: 0; }
.neap li { margin: 0 0 .35rem; font-size: .95rem; }
.neap-end {
  margin-top: 1.6rem; padding-top: 1rem;
  border-top: 1px solid color-mix(in srgb, var(--chart) 28%, transparent);
  font-size: .88rem;
  display: flex; flex-wrap: wrap; gap: .6rem 1.2rem; justify-content: space-between;
}

.drawer, .veil { display: none; }
.reef-bar {
  position: fixed; left: 0; right: 0; bottom: -6rem;
  background: var(--peat); color: #fff;
  display: flex; justify-content: space-between; align-items: center;
  gap: .8rem; padding: .7rem var(--gutter);
  z-index: 30; transition: bottom .25s ease;
}
.reef-bar.is-up { bottom: 0; }
.reef-bar span { font-family: var(--ui); font-size: .78rem; }

.crumbs {
  font-family: var(--ui); font-size: .75rem; color: var(--mist);
  margin: 0 0 .4rem;
}
.crumbs a { color: inherit; }

@media (max-width: 980px) {
  .waypoint { display: none; }
  .menu-nub { display: inline-flex; align-items: center; justify-content: center; }
  .spit-hero { grid-template-columns: 1fr; min-height: 0; }
  .spit-visual { clip-path: none; max-height: 42vh; }
  .sheet { grid-template-columns: 1fr; }
  .tide-rail { writing-mode: horizontal-tb; transform: none; border: 0; padding: 0 0 .6rem; }
  .flood-band, .compare, .bay-mosaic, .neap-grid, .hub-index {
    grid-template-columns: 1fr 1fr;
  }
  .drawer {
    display: block; position: fixed; inset: 0 0 0 auto; width: min(20rem, 88vw);
    background: var(--peat); color: var(--sand); z-index: 50;
    padding: 4.2rem 1.1rem 1.4rem; overflow: auto;
  }
  .drawer a {
    display: block; color: var(--sand); text-decoration: none;
    font-family: var(--ui); padding: .55rem 0; border-bottom: 1px solid #2a4036;
  }
  .veil {
    display: block; position: fixed; inset: 0; background: #13241ccc; z-index: 45;
  }
}
@media (max-width: 640px) {
  body { font-size: 1.05rem; }
  .flood-band, .compare, .bay-mosaic, .neap-grid, .hub-index { grid-template-columns: 1fr; }
  .hero-actions .ghost { width: 100%; }
  .widget-dock { padding: .7rem; }
  .cta-slab { flex-direction: column; align-items: flex-start; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reef-bar { transition: none; }
}
