/* Shieldport — midnight & champagne. Cormorant for display, Inter for reading. */
:root {
  --night: #0e1420;
  --night-2: #121a29;
  --night-3: #18223a;
  --bone: #ebe5d6;
  --bone-2: #c9c3b4;
  --muted: #8d93a1;
  --champ: #d8c9a3;
  --champ-dim: rgba(216, 201, 163, .55);
  --line: rgba(216, 201, 163, .15);
  --line-2: rgba(216, 201, 163, .28);
  --serif: 'Cormorant', 'Cormorant Garamond', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: ui-monospace, 'SF Mono', Menlo, Consolas, monospace;
  --wrap: 1180px;
  --gut: clamp(20px, 5vw, 64px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; background: var(--night); }
body { margin: 0; background: var(--night); color: var(--bone); font-family: var(--sans); font-size: 16px; line-height: 1.6; -webkit-font-smoothing: antialiased; overflow-x: hidden; font-variant-numeric: lining-nums; }
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
code, pre { font-family: var(--mono); }
:focus-visible { outline: 1.5px solid var(--champ); outline-offset: 3px; border-radius: 2px; }
::selection { background: rgba(216, 201, 163, .3); color: #fff; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--champ); color: var(--night); padding: 8px 14px; z-index: 100; }
.skip:focus { left: 8px; }
[hidden] { display: none !important; }

.label { font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin: 0 0 12px; font-weight: 500; }
.tag { display: inline-block; margin-left: 6px; font-size: 10px; letter-spacing: .12em; color: var(--champ); border-bottom: 1px solid var(--line-2); text-transform: uppercase; }
.fine { font-size: 13px; color: var(--muted); line-height: 1.55; margin: 0; }
.link-b { background: none; border: 0; padding: 2px 0; color: var(--champ); border-bottom: 1px solid var(--line-2); cursor: pointer; font-size: 13px; transition: border-color .3s; }
.link-b:hover { border-color: var(--champ); }
.btn-quiet { background: transparent; border: 1px solid var(--line-2); color: var(--bone); padding: 10px 18px; border-radius: 2px; cursor: pointer; font-size: 14px; transition: background-color .3s, border-color .3s; }
.btn-quiet:hover:not(:disabled) { border-color: var(--champ); background: rgba(216, 201, 163, .06); }
.btn-quiet:disabled { opacity: .4; cursor: not-allowed; }
.up { color: var(--champ); }
.down { color: var(--muted); }

/* ---------- top bar ---------- */
.bar { position: fixed; inset: 0 0 auto 0; z-index: 40; display: flex; align-items: center; justify-content: space-between; padding: 18px var(--gut); transition: background-color .4s, border-color .4s; border-bottom: 1px solid transparent; }
.bar.solid { background: rgba(14, 20, 32, .86); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-color: var(--line); }
.mark { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--champ); }
.mark svg { width: 30px; height: 30px; }
.mark span { font-family: var(--serif); font-size: 24px; font-weight: 500; letter-spacing: .04em; color: var(--bone); }
.bar-right { display: flex; align-items: center; gap: 18px; }
.x-link { display: grid; place-items: center; width: 34px; height: 34px; color: var(--bone-2); border: 1px solid var(--line); border-radius: 50%; transition: color .3s, border-color .3s; }
.x-link:hover { color: var(--champ); border-color: var(--line-2); }
.x-link svg { width: 14px; height: 14px; }
.contents-btn { display: flex; align-items: center; gap: 12px; background: none; border: 0; cursor: pointer; padding: 6px 0; color: var(--bone); font-size: 13px; letter-spacing: .14em; text-transform: uppercase; }
.cb-lines { display: grid; gap: 6px; width: 22px; }
.cb-lines i { display: block; height: 1px; background: currentColor; transition: transform .45s var(--ease); }
.contents-btn[aria-expanded="true"] .cb-lines i:first-child { transform: translateY(3.5px) rotate(45deg); }
.contents-btn[aria-expanded="true"] .cb-lines i:last-child { transform: translateY(-3.5px) rotate(-45deg); }

.contents { position: fixed; inset: 0; z-index: 35; background: var(--night); display: flex; align-items: center; overflow-y: auto; opacity: 0; transition: opacity .5s var(--ease); }
.contents.open { opacity: 1; }
.contents-inner { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 110px var(--gut) 60px; }
.contents-kicker { font-family: var(--serif); font-style: italic; color: var(--champ); font-size: 22px; margin: 0 0 24px; }
.contents-list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.contents-list li { border-bottom: 1px solid var(--line); opacity: 0; transform: translateY(14px); transition: opacity .5s var(--ease), transform .5s var(--ease); }
.contents.open .contents-list li { opacity: 1; transform: none; }
.contents.open .contents-list li:nth-child(2) { transition-delay: .04s; }
.contents.open .contents-list li:nth-child(3) { transition-delay: .08s; }
.contents.open .contents-list li:nth-child(4) { transition-delay: .12s; }
.contents.open .contents-list li:nth-child(5) { transition-delay: .16s; }
.contents.open .contents-list li:nth-child(6) { transition-delay: .2s; }
.contents.open .contents-list li:nth-child(7) { transition-delay: .24s; }
.contents.open .contents-list li:nth-child(8) { transition-delay: .28s; }
.contents-list a { display: grid; grid-template-columns: 64px 1fr auto; align-items: baseline; gap: 16px; padding: 14px 0; text-decoration: none; }
.contents-list .cn { font-family: var(--serif); color: var(--champ); font-size: 20px; font-style: italic; }
.contents-list .ct { font-family: var(--serif); font-size: clamp(26px, 4vw, 42px); font-weight: 400; line-height: 1.1; transition: transform .4s var(--ease); }
.contents-list .cd { color: var(--muted); font-size: 13px; }
.contents-list a:hover .ct { transform: translateX(10px); }

.rail { position: fixed; left: 22px; top: 50%; transform: translateY(-50%); z-index: 30; display: none; }
.rail ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.rail li { font-family: var(--serif); font-size: 14px; color: var(--muted); position: relative; padding-left: 0; transition: color .3s, transform .4s var(--ease); width: 40px; }
.rail li::before { content: ''; position: absolute; left: -14px; top: 50%; width: 8px; height: 1px; background: var(--champ); transform: scaleX(0); transform-origin: left; transition: transform .4s var(--ease); }
.rail li.on { color: var(--champ); transform: translateX(6px); }
.rail li.on::before { transform: scaleX(1); }
.rail.shown { display: block; }
@media (max-width: 1279px) { .rail.shown { display: none; } }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; justify-content: flex-end; padding: 120px var(--gut) 48px; overflow: hidden; isolation: isolate; }
.planes { position: absolute; inset: 0; width: 100%; height: 100%; z-index: -2; }
.hero-veil { position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(14, 20, 32, 0) 35%, rgba(14, 20, 32, .72) 72%, var(--night) 100%); pointer-events: none; }
.hero-copy { max-width: 900px; width: 100%; margin: 0 auto 0 0; }
.hero-place { font-family: var(--serif); font-style: italic; color: var(--champ); font-size: 19px; margin: 0 0 18px; }
.hero-title { font-family: var(--serif); font-weight: 300; font-size: clamp(42px, 7.4vw, 104px); line-height: .98; letter-spacing: -.01em; margin: 0 0 28px; max-width: 14ch; }
.hero-title .w { display: inline-block; }
.hero-title .em { font-style: italic; color: var(--champ); }
.js .hero-title .w { opacity: 0; transform: translateY(.35em); transition: opacity 1.1s var(--ease), transform 1.1s var(--ease); }
.js .ready .hero-title .w { opacity: 1; transform: none; }
.ready .hero-title .w:nth-child(2) { transition-delay: .07s; }
.ready .hero-title .w:nth-child(3) { transition-delay: .14s; }
.ready .hero-title .w:nth-child(4) { transition-delay: .21s; }
.ready .hero-title .w:nth-child(5) { transition-delay: .28s; }
.ready .hero-title .w:nth-child(6) { transition-delay: .42s; }
.ready .hero-title .w:nth-child(7) { transition-delay: .5s; }
.ready .hero-title .w:nth-child(8) { transition-delay: .58s; }
.ready .hero-title .w:nth-child(9) { transition-delay: .66s; }
.hero-lede { max-width: 56ch; color: var(--bone-2); font-size: clamp(15px, 1.4vw, 17px); margin: 0 0 24px; }
.js .hero-lede, .js .hero-manifest, .js .hero-place { opacity: 0; transition: opacity 1.4s var(--ease) .7s; }
.js .ready .hero-lede, .js .ready .hero-manifest, .js .ready .hero-place { opacity: 1; }
.ca-chip { display: inline-flex; align-items: center; gap: 12px; border: 1px solid var(--line-2); padding: 8px 8px 8px 14px; border-radius: 2px; max-width: 100%; margin-bottom: 8px; }
.ca-label { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.ca-val { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; color: var(--bone); }
.ca-copy { background: var(--champ); color: var(--night); border: 0; padding: 6px 12px; cursor: pointer; font-size: 12px; border-radius: 2px; flex: none; }
.hero-manifest { margin: 40px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line); max-width: 900px; }
.hero-manifest div { padding: 16px 20px 0 0; min-width: 0; }
.hero-manifest dt { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.hero-manifest dd { margin: 4px 0 0; font-family: var(--serif); font-size: 21px; color: var(--bone); line-height: 1.25; }
.scroll-cue { position: absolute; right: var(--gut); bottom: 48px; display: grid; justify-items: center; gap: 10px; text-decoration: none; color: var(--muted); font-size: 11px; letter-spacing: .2em; text-transform: uppercase; }
.scroll-cue i { display: block; width: 1px; height: 64px; background: var(--line-2); position: relative; overflow: hidden; }
.scroll-cue i::after { content: ''; position: absolute; left: 0; top: 0; width: 1px; height: 22px; background: var(--champ); animation: drip 2.6s var(--ease) infinite; }
@keyframes drip { from { transform: translateY(-24px); } to { transform: translateY(70px); } }

/* ---------- chapters ---------- */
.chapter { position: relative; padding: clamp(90px, 12vw, 170px) var(--gut); max-width: calc(var(--wrap) + 2 * var(--gut)); margin: 0 auto; }
.chapter.alt { isolation: isolate; }
.chapter.alt::before { content: ''; position: absolute; inset: 0 calc(50% - 50vw); background: var(--night-2); z-index: -1; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.ch-head { display: grid; grid-template-columns: minmax(80px, 180px) minmax(0, 1fr); gap: clamp(16px, 4vw, 56px); align-items: start; margin-bottom: clamp(40px, 6vw, 80px); }
.ch-num { font-family: var(--serif); font-style: italic; font-weight: 300; font-size: clamp(64px, 11vw, 150px); line-height: .8; color: var(--champ); opacity: .55; }
.ch-head h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(40px, 6vw, 78px); line-height: 1; margin: 0 0 18px; letter-spacing: -.01em; }
.ch-dek { max-width: 62ch; color: var(--bone-2); margin: 0; font-size: 16.5px; }

.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 1s var(--ease), transform 1s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }

/* skeletons */
.sk { display: inline-block; height: .9em; width: 6em; max-width: 100%; background: linear-gradient(90deg, rgba(216, 201, 163, .06), rgba(216, 201, 163, .14), rgba(216, 201, 163, .06)); background-size: 200% 100%; animation: shimmer 1.6s linear infinite; border-radius: 2px; vertical-align: middle; }
.sk.short { width: 3.5em; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- I tide ---------- */
.tide { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); }
.tide-table { width: 100%; border-collapse: collapse; }
.tide-table th, .tide-table td { text-align: left; padding: 18px 12px 18px 0; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tide-table thead th { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); font-weight: 500; padding-top: 0; }
.tide-table tbody th { font-weight: 400; }
.tk { display: block; font-size: 15px; letter-spacing: .1em; font-weight: 600; }
.tk sub { font-size: 10px; letter-spacing: .04em; color: var(--champ); font-weight: 500; }
.tn { display: block; font-size: 12px; color: var(--muted); }
.px { font-family: var(--serif); font-size: clamp(26px, 3vw, 38px); font-weight: 400; white-space: nowrap; font-variant-numeric: lining-nums tabular-nums; }
.ctx { font-size: 13px; color: var(--bone-2); }
.src { font-size: 12px; color: var(--muted); }
.err-cell { font-size: 13px; color: var(--muted); font-family: var(--sans); }
.tide-side { display: flex; flex-direction: column; justify-content: space-between; gap: 24px; min-width: 0; }
.cross-list { margin: 0 0 18px; }
.cross-list div { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.cross-list dt { color: var(--bone-2); font-size: 14px; }
.cross-list dd { margin: 0; font-family: var(--serif); font-size: 22px; text-align: right; font-variant-numeric: lining-nums tabular-nums; }
.stamp { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 16px; margin: 0; }

.chart { margin: clamp(48px, 6vw, 80px) 0 0; }
.chart figcaption { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: baseline; margin-bottom: 14px; }
.chart figcaption .label { margin: 0; }
.chart-read { font-family: var(--serif); font-size: 18px; color: var(--bone-2); }
.chart-box { position: relative; height: clamp(180px, 26vw, 280px); border-bottom: 1px solid var(--line); }
.chart-box svg { width: 100%; height: 100%; overflow: visible; cursor: crosshair; }
.grid line { stroke: var(--line); stroke-width: 1; vector-effect: non-scaling-stroke; }
.c-line { fill: none; stroke: var(--champ); stroke-width: 1.6; vector-effect: non-scaling-stroke; stroke-dasharray: 1; stroke-dashoffset: 1; }
.c-line.drawn { stroke-dashoffset: 0; transition: stroke-dashoffset 2.2s var(--ease); }
.c-area { fill: rgba(216, 201, 163, .07); opacity: 0; transition: opacity 1.6s var(--ease) .6s; }
.c-area.drawn { opacity: 1; }
.c-x { stroke: var(--line-2); vector-effect: non-scaling-stroke; opacity: 0; transition: opacity .2s; }
.c-dot { fill: var(--night); stroke: var(--champ); stroke-width: 1.5; vector-effect: non-scaling-stroke; opacity: 0; transition: opacity .2s; }
.chart-box.hover .c-x, .chart-box.hover .c-dot { opacity: 1; }
.chart-state { position: absolute; inset: 0; display: grid; place-items: center; color: var(--muted); font-size: 14px; pointer-events: none; }
.chart-axis { display: flex; justify-content: space-between; color: var(--muted); font-size: 11px; padding-top: 8px; letter-spacing: .06em; }

/* ---------- II ledgers ---------- */
.seg { display: inline-grid; grid-auto-flow: column; border: 1px solid var(--line-2); border-radius: 2px; margin-bottom: 32px; max-width: 100%; }
.seg-b { background: none; border: 0; border-right: 1px solid var(--line); padding: 11px 18px; cursor: pointer; color: var(--bone-2); font-size: 14px; transition: background-color .35s, color .35s; }
.seg-b:last-child { border-right: 0; }
.seg-b[aria-selected="true"] { background: var(--champ); color: var(--night); }
.ledger-stage { border: 1px solid var(--line); padding: clamp(10px, 2vw, 24px); }
.ledger-svg { width: 100%; height: auto; }
.node rect { fill: var(--night); stroke: var(--line-2); }
.n-t { fill: var(--bone); font-family: var(--serif); font-size: 26px; text-anchor: middle; }
.n-s { fill: var(--muted); font-family: var(--mono); font-size: 13px; text-anchor: middle; transition: opacity .5s; }
.l-path { fill: none; stroke: var(--line-2); stroke-width: 1.2; stroke-dasharray: 4 5; }
.pool rect { fill: var(--night-3); stroke: var(--line-2); }
.pool .pool-hatch { opacity: 0; transition: opacity .8s var(--ease); stroke: none; }
.pool.sealed .pool-hatch { opacity: 1; }
.p-t { fill: var(--champ); font-family: var(--serif); font-style: italic; font-size: 20px; text-anchor: middle; }
.f-k { fill: var(--muted); font-family: var(--sans); font-size: 12px; letter-spacing: .1em; text-transform: uppercase; }
.f-v { font-family: var(--mono); font-size: 14px; text-anchor: end; transition: opacity .6s var(--ease), transform .6s var(--ease); }
.f-v.plain { fill: var(--bone); }
.f-v.seal { fill: var(--champ); }
.f-v.off { opacity: 0; transform: translateY(6px); }
.f-rule { stroke: var(--line); }
.packet { fill: var(--champ); }
.ledger-read { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px; margin-top: 32px; }
.learn { list-style: none; margin: 0; padding: 0; }
.learn li { padding: 10px 0; border-bottom: 1px solid var(--line); display: flex; gap: 14px; font-size: 15px; }
.learn li b { font-weight: 500; min-width: 84px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; padding-top: 3px; }
.learn li b.y { color: var(--bone); }
.learn li b.n { color: var(--champ); }
.ledger-warn { margin: 0; color: var(--bone-2); font-family: var(--serif); font-size: 21px; line-height: 1.4; }
.roundtrip { margin-top: 56px; border-top: 1px solid var(--line-2); padding-top: 32px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr) minmax(0, 1fr); gap: 32px; align-items: end; }
.rt-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
label { display: grid; gap: 6px; font-size: 12px; color: var(--muted); letter-spacing: .04em; min-width: 0; }
input[type="text"], input[type="number"], select, textarea { width: 100%; min-width: 0; background: transparent; border: 0; border-bottom: 1px solid var(--line-2); padding: 8px 0; color: var(--bone); font-size: 16px; border-radius: 0; transition: border-color .3s; }
textarea { border: 1px solid var(--line-2); padding: 12px 14px; resize: vertical; font-family: var(--mono); font-size: 14px; line-height: 1.5; word-break: break-all; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--champ); }
select { appearance: none; -webkit-appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--champ) 50%), linear-gradient(135deg, var(--champ) 50%, transparent 50%); background-position: calc(100% - 10px) 55%, calc(100% - 5px) 55%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 22px; cursor: pointer; }
select option { background: var(--night); color: var(--bone); }
.rt-meter { height: 2px; background: var(--line); margin-bottom: 12px; overflow: hidden; }
.rt-meter span { display: block; height: 100%; background: var(--champ); transform-origin: left; transform: scaleX(0); transition: transform .8s var(--ease); }
#rtVerdict { margin: 0; font-family: var(--serif); font-size: 20px; line-height: 1.35; }

/* ---------- III reader ---------- */
.reader { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); gap: clamp(28px, 4vw, 64px); align-items: start; }
.reader-in textarea { min-height: 128px; }
.samples { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 14px; align-items: baseline; }
.reader-out { min-width: 0; }
.reader-out .empty { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--muted); margin: 0; }
.ua-sum { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 24px; margin: 0 0 24px; }
.ua-sum div { padding: 10px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.ua-sum dt { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.ua-sum dd { margin: 2px 0 0; font-family: var(--serif); font-size: 21px; overflow-wrap: anywhere; }
.ua-title { font-family: var(--serif); font-size: 32px; margin: 0 0 6px; font-weight: 400; }
.ua-grade { margin: 0 0 20px; color: var(--champ); font-size: 14px; }
.planes-stack { display: grid; gap: 14px; margin-bottom: 20px; }
.recv { border: 1px solid var(--line-2); background: var(--night-2); padding: 18px 18px 16px; position: relative; min-width: 0; opacity: 0; transform: translateY(14px) scale(.985); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.recv.in { opacity: 1; transform: none; }
.recv.orchard { border-color: var(--champ-dim); }
.recv-head { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; margin-bottom: 10px; }
.recv-head h4 { margin: 0; font-family: var(--serif); font-size: 24px; font-weight: 500; }
.recv-meta { font-size: 12px; color: var(--muted); letter-spacing: .06em; }
.kv { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 4px 12px; font-size: 13px; margin: 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-family: var(--mono); font-size: 12.5px; overflow-wrap: anywhere; color: var(--bone-2); }
.recv .copy-enc { margin-top: 10px; }
.notes { list-style: none; margin: 0; padding: 0; }
.notes li { padding: 10px 0 10px 22px; position: relative; border-top: 1px solid var(--line); font-size: 14px; color: var(--bone-2); }
.notes li::before { content: ''; position: absolute; left: 0; top: 17px; width: 9px; height: 9px; border: 1px solid var(--champ); border-radius: 50%; }
.notes li.ok::before { background: var(--champ); }
.notes li.error::before { border-radius: 0; transform: rotate(45deg); border-color: var(--bone); }
.ua-err { border-left: 2px solid var(--champ); padding: 6px 0 6px 18px; }
.ua-err p { margin: 0; }
.ua-err .ua-title { font-size: 26px; }
.jumble { margin: 18px 0 0; font-size: 12px; color: var(--muted); }
.jumble code { color: var(--bone-2); overflow-wrap: anywhere; }

/* ---------- IV crossing ---------- */
.route-form { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, .8fr) minmax(0, 1.2fr) minmax(0, .9fr); gap: 20px; margin-bottom: 36px; }
.with-unit { display: flex; align-items: center; gap: 6px; }
.with-unit span { color: var(--muted); }
.route-stage { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 10px 0; }
.route-svg { width: 100%; height: auto; overflow: visible; }
.r-node circle { fill: var(--night-2); stroke: var(--line-2); stroke-width: 1.2; }
.r-node.pub circle { stroke: var(--bone-2); }
.r-node.hid circle { stroke: var(--champ); fill: var(--night-3); }
.r-node text { fill: var(--bone); font-family: var(--serif); font-size: 18px; text-anchor: middle; }
.r-node text.sub { fill: var(--muted); font-family: var(--sans); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; }
.r-node text.l { text-anchor: start; }
.r-edge { fill: none; stroke: var(--champ); stroke-width: 1.3; stroke-dasharray: 1; stroke-dashoffset: 1; }
.r-edge.pub { stroke: var(--bone-2); stroke-opacity: .6; }
.r-edge.drawn { stroke-dashoffset: 0; transition: stroke-dashoffset 1.2s var(--ease); }
.r-dot { fill: var(--champ); }
.legs { list-style: none; margin: 28px 0 0; padding: 0; counter-reset: leg; }
.leg { display: grid; grid-template-columns: 34px minmax(0, 1.6fr) minmax(0, 1fr) minmax(0, .9fr) minmax(0, .8fr); gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); align-items: center; counter-increment: leg; }
.leg::before { content: counter(leg, upper-roman); font-family: var(--serif); font-style: italic; color: var(--champ); font-size: 20px; }
.leg h4 { margin: 0; font-size: 16px; font-weight: 500; }
.leg p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }
.leg .cost { font-family: var(--serif); font-size: 20px; font-variant-numeric: lining-nums tabular-nums; }
.leg .cost small { display: block; font-family: var(--sans); font-size: 12px; color: var(--muted); }
.expo { display: flex; gap: 3px; align-items: center; }
.expo i { width: 16px; height: 6px; border: 1px solid var(--line-2); }
.expo i.f { background: var(--bone-2); border-color: var(--bone-2); }
.expo span { font-size: 12px; color: var(--muted); margin-left: 8px; }
.leg .time { font-size: 13px; color: var(--bone-2); }
.route-sum { margin-top: 32px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.route-sum div { min-width: 0; }
.route-sum dt { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.route-sum dd { margin: 4px 0 0; font-family: var(--serif); font-size: clamp(24px, 2.6vw, 34px); line-height: 1.1; overflow-wrap: anywhere; }
.route-sum .note { grid-column: 1 / -1; }

/* ---------- V fees ---------- */
.fee-presets { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-bottom: 28px; align-items: baseline; }
.fee-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(28px, 5vw, 80px); }
.steppers { display: grid; gap: 0; border-top: 1px solid var(--line); }
.stepper { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--line); }
.stepper .s-name { font-size: 15px; }
.stepper .s-name small { display: block; color: var(--muted); font-size: 12px; }
.s-ctrl { display: flex; align-items: center; border: 1px solid var(--line-2); }
.s-ctrl button { width: 36px; height: 36px; background: none; border: 0; cursor: pointer; color: var(--champ); font-size: 18px; line-height: 1; }
.s-ctrl button:hover { background: rgba(216, 201, 163, .07); }
.s-ctrl output { width: 44px; text-align: center; font-family: var(--serif); font-size: 20px; font-variant-numeric: lining-nums tabular-nums; }
.fee-big { font-family: var(--serif); font-size: clamp(48px, 7vw, 92px); line-height: 1; margin: 0; font-weight: 300; font-variant-numeric: lining-nums tabular-nums; }
.fee-big small { font-size: 18px; color: var(--muted); font-family: var(--sans); }
.fee-sub { margin: 8px 0 24px; color: var(--champ); font-size: 15px; }
.fee-bars { display: grid; gap: 8px; margin-bottom: 18px; }
.fbar { display: grid; grid-template-columns: 120px minmax(0, 1fr) 30px; gap: 10px; align-items: center; font-size: 12px; color: var(--muted); }
.fbar .track { height: 6px; background: var(--line); overflow: hidden; }
.fbar .track span { display: block; height: 100%; background: var(--champ); transform-origin: left; transform: scaleX(0); transition: transform .7s var(--ease); }
.fbar .track span.grace { background: transparent; border: 1px dashed var(--champ-dim); }
.fbar b { font-weight: 500; color: var(--bone); text-align: right; }
.fee-compare { margin: 22px 0 0; }
.fee-compare div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 14px; }
.fee-compare dt { color: var(--bone-2); }
.fee-compare dd { margin: 0; font-family: var(--serif); font-size: 19px; text-align: right; }

/* ---------- VI memo ---------- */
.memo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); }
.memo-form { display: grid; gap: 14px; align-content: start; min-width: 0; }
.memo-form > .label { margin: 10px 0 0; }
.memo-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; }
.field-note { margin: -6px 0 0; font-size: 12.5px; color: var(--muted); }
.field-note.ok { color: var(--champ); }
.field-note.bad { color: var(--bone); }
.route-note { border-top: 1px solid var(--line); padding-top: 12px; }
.route-note summary { cursor: pointer; color: var(--champ); font-size: 14px; list-style: none; }
.route-note summary::-webkit-details-marker { display: none; }
.route-note summary::before { content: '+'; display: inline-block; width: 18px; transition: transform .3s var(--ease); }
.route-note[open] summary::before { transform: rotate(45deg); }
.route-note > .memo-row, .route-note > .field-note, .route-note > button { margin-top: 14px; }
.memo-out { min-width: 0; }
.ring-wrap { position: relative; width: 140px; height: 140px; margin-bottom: 12px; }
.ring { width: 140px; height: 140px; transform: rotate(-90deg); }
.ring-bg { fill: none; stroke: var(--line); stroke-width: 3; }
.ring-fg { fill: none; stroke: var(--champ); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 326.73; stroke-dashoffset: 326.73; transition: stroke-dashoffset .6s var(--ease); }
.ring-text { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.ring-text b { font-family: var(--serif); font-size: 36px; font-weight: 400; line-height: 1; }
.ring-text span { font-size: 11px; color: var(--muted); letter-spacing: .06em; }
#mFirst { margin-bottom: 20px; }
.hexdump { margin: 0 0 22px; padding: 14px; border: 1px solid var(--line); background: var(--night); font-size: 12px; line-height: 1.7; color: var(--bone-2); white-space: pre-wrap; word-break: break-all; }
.uri-box { border: 1px solid var(--line-2); padding: 14px; margin-bottom: 12px; min-height: 52px; }
.uri-box code { font-size: 12.5px; overflow-wrap: anywhere; color: var(--bone); }

/* ---------- VII rules ---------- */
.rules { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); }
.rule { padding: 36px 36px 40px 0; border-bottom: 1px solid var(--line); min-width: 0; }
.rule:nth-child(odd) { border-right: 1px solid var(--line); }
.rule:nth-child(even) { padding-left: 36px; padding-right: 0; }
.rule-n { font-family: var(--serif); font-style: italic; color: var(--champ); font-size: 22px; margin: 0 0 12px; }
.rule h3 { font-family: var(--serif); font-weight: 500; font-size: clamp(26px, 2.6vw, 34px); line-height: 1.1; margin: 0 0 12px; }
.rule p { margin: 0; color: var(--bone-2); max-width: 46ch; }
.status { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; margin-top: 64px; }
.status-list { list-style: none; margin: 0 0 14px; padding: 0; }
.status-list li { padding: 9px 0 9px 26px; position: relative; border-bottom: 1px solid var(--line); font-size: 15px; }
.status-list li::before { content: ''; position: absolute; left: 0; top: 50%; width: 12px; height: 1px; background: var(--champ); }
.status-list.dim li { color: var(--muted); }
.status-list.dim li::before { background: var(--muted); }

/* ---------- VIII faq ---------- */
.faq { border-top: 1px solid var(--line); max-width: 900px; margin-left: auto; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; gap: 24px; padding: 22px 0; font-family: var(--serif); font-size: clamp(21px, 2.2vw, 27px); line-height: 1.25; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--champ); font-family: var(--sans); font-weight: 300; font-size: 24px; line-height: 1; transition: transform .35s var(--ease); flex: none; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 24px; color: var(--bone-2); max-width: 68ch; }
.faq code { color: var(--champ); }

/* ---------- footer ---------- */
.foot { border-top: 1px solid var(--line); padding: 80px var(--gut) 40px; max-width: calc(var(--wrap) + 2 * var(--gut)); margin: 0 auto; }
.foot-word { font-family: var(--serif); font-weight: 300; font-size: clamp(64px, 15vw, 200px); line-height: .85; margin: 0; color: var(--champ); opacity: .8; letter-spacing: -.02em; }
.foot-line { font-family: var(--serif); font-style: italic; font-size: 22px; color: var(--bone-2); margin: 12px 0 56px; }
.foot-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-bottom: 48px; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: 14px; color: var(--bone-2); }
.foot-grid a { text-decoration: none; border-bottom: 1px solid transparent; transition: border-color .3s; }
.foot-grid a:hover { border-color: var(--champ); }
.honest { max-width: 80ch; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 24px; margin: 0 0 12px; }
.copy { font-size: 12px; color: var(--muted); margin: 0; }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: var(--champ); color: var(--night); padding: 10px 18px; font-size: 14px; opacity: 0; pointer-events: none; transition: opacity .35s var(--ease), transform .35s var(--ease); z-index: 60; border-radius: 2px; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- responsive ---------- */
@media (max-width: 1020px) {
  .tide, .reader, .fee-grid, .memo { grid-template-columns: minmax(0, 1fr); }
  .roundtrip { grid-template-columns: minmax(0, 1fr); }
  .route-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .route-sum { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .leg { grid-template-columns: 30px minmax(0, 1fr) auto; }
  .leg .expo, .leg .time { grid-column: 2 / -1; }
}
@media (max-width: 720px) {
  .ch-head { grid-template-columns: minmax(0, 1fr); gap: 4px; }
  .ch-num { font-size: 64px; }
  .hero-manifest { grid-template-columns: minmax(0, 1fr); }
  .hero-manifest div { padding: 12px 0 0; }
  .hero-manifest dd { font-size: 18px; }
  .scroll-cue { display: none; }
  .hide-s { display: none; }
  .tide-table th, .tide-table td { padding: 14px 8px 14px 0; }
  .seg { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .seg-b { border-bottom: 1px solid var(--line); padding: 10px 8px; font-size: 13px; }
  .seg-b:nth-child(2) { border-right: 0; }
  .ledger-read { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .rt-form { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .rt-form label:last-child { grid-column: 1 / -1; }
  .ua-sum { grid-template-columns: minmax(0, 1fr); }
  .kv { grid-template-columns: minmax(0, 1fr); }
  .kv dt { margin-top: 6px; }
  .route-form { grid-template-columns: minmax(0, 1fr); }
  .memo-row { grid-template-columns: minmax(0, 1fr); }
  .rules { grid-template-columns: minmax(0, 1fr); }
  .rule, .rule:nth-child(even) { padding: 28px 0; border-right: 0; }
  .rule:nth-child(odd) { border-right: 0; }
  .status { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .foot-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .contents-list a { grid-template-columns: 40px minmax(0, 1fr); }
  .contents-list .cd { grid-column: 2; }
  .fbar { grid-template-columns: 96px minmax(0, 1fr) 26px; }
  .cb-label { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  .js .reveal, .js .hero-title .w, .recv { opacity: 1; transform: none; }
}
.locked { overflow: hidden; }
.pxv { font-weight: 400; }
.route-sum dd .fine { font-family: var(--sans); font-size: 13px; }

/* =====================================================================
   Polish pass — depth, drawn chapter art, choreography, micro-interactions
   ===================================================================== */
:root { --shadow: 0 1px 0 rgba(235, 229, 214, .05) inset, 0 40px 80px -48px rgba(0, 0, 0, .85), 0 12px 24px -18px rgba(0, 0, 0, .6); --radius: 6px; }
body::after { content: ''; position: fixed; inset: 0; pointer-events: none; z-index: 90; opacity: .05; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E"); }

/* hero: text left, figure right */
.hero { justify-content: center; padding-top: 110px; padding-bottom: 150px; }
.hero::before { content: ''; position: absolute; inset: 0; z-index: -3; background: radial-gradient(80% 70% at 72% 45%, #141d2f 0%, var(--night) 70%); }
.hero-veil { background: linear-gradient(90deg, rgba(14, 20, 32, .55) 0%, rgba(14, 20, 32, 0) 42%), linear-gradient(180deg, rgba(14, 20, 32, 0) 70%, var(--night) 100%); }
.hero-copy { max-width: min(640px, 47vw); }
.hero-lede { max-width: 46ch; }
.hero-title { font-size: clamp(44px, 5.2vw, 84px); line-height: .96; max-width: 12.5ch; }
.hero-title .w { overflow: hidden; vertical-align: top; padding: 0 .06em .14em 0; margin: 0 -.06em -.14em 0; }
.hero-title .w > span { display: inline-block; }
.js .hero-title .w { opacity: 1; transform: none; transition: none; }
.js .hero-title .w > span { transform: translateY(108%); transition: transform 1.15s cubic-bezier(.16, .84, .24, 1); }
.js .ready .hero-title .w > span { transform: none; }
.ready .hero-title .w:nth-child(2) > span { transition-delay: .06s; } .ready .hero-title .w:nth-child(3) > span { transition-delay: .12s; }
.ready .hero-title .w:nth-child(4) > span { transition-delay: .2s; } .ready .hero-title .w:nth-child(5) > span { transition-delay: .26s; }
.ready .hero-title .w:nth-child(6) > span { transition-delay: .38s; } .ready .hero-title .w:nth-child(7) > span { transition-delay: .44s; }
.ready .hero-title .w:nth-child(8) > span { transition-delay: .52s; } .ready .hero-title .w:nth-child(9) > span { transition-delay: .58s; }
.js .hero-place { transform: translateY(10px); transition: opacity 1s var(--ease) .1s, transform 1s var(--ease) .1s; }
.js .hero-lede { transform: translateY(14px); transition: opacity 1.1s var(--ease) .85s, transform 1.1s var(--ease) .85s; }
.js .hero-manifest { transform: translateY(14px); transition: opacity 1.1s var(--ease) 1.05s, transform 1.1s var(--ease) 1.05s; }
.js .ready .hero-place, .js .ready .hero-lede, .js .ready .hero-manifest { transform: none; }
.hero-manifest { position: absolute; left: var(--gut); right: var(--gut); bottom: 40px; max-width: none; grid-template-columns: repeat(3, minmax(0, 1fr)) 120px; }
.hero-manifest div { position: relative; }
.hero-manifest div::before { content: ''; position: absolute; left: 0; top: -1px; width: 28px; height: 1px; background: var(--champ); transform-origin: left; transform: scaleX(0); transition: transform 1.2s var(--ease) 1.4s; }
.ready .hero-manifest div::before { transform: scaleX(1); }
.scroll-cue { bottom: 40px; }
.planes { cursor: default; }

/* live ticker */
.ticker { position: relative; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--night-2); overflow: hidden; height: 46px; display: flex; align-items: center;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.ticker-track { display: flex; gap: 0; white-space: nowrap; will-change: transform; animation: tick 60s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes tick { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.tk-item { display: inline-flex; align-items: baseline; gap: 10px; padding: 0 34px; font-size: 13px; color: var(--muted); position: relative; }
.tk-item::after { content: ''; position: absolute; right: 0; top: 50%; width: 4px; height: 4px; margin-top: -2px; border: 1px solid var(--champ-dim); transform: rotate(45deg); }
.tk-item b { font-family: var(--serif); font-size: 19px; font-weight: 500; color: var(--bone); font-variant-numeric: lining-nums tabular-nums; }
.tk-item .up { color: var(--champ); } .tk-item .down { color: var(--muted); }

/* chapter heads with drawn art */
.ch-head { grid-template-columns: minmax(80px, 180px) minmax(0, 1fr) 200px; position: relative; }
.ch-head::before { content: ''; position: absolute; left: 0; right: 0; top: calc(-1 * clamp(36px, 5vw, 64px)); height: 1px; background: linear-gradient(90deg, var(--champ-dim), var(--line) 40%, transparent); transform-origin: left; transform: scaleX(0); transition: transform 1.6s var(--ease); }
.ch-head.in::before { transform: scaleX(1); }
.js .ch-head .ch-num { clip-path: inset(-20% 100% -20% 0); transition: clip-path 1.3s cubic-bezier(.65, 0, .25, 1) .1s; }
.js .ch-head.in .ch-num { clip-path: inset(-20% -60% -20% 0); }
.ch-head h2 .hw { display: inline-block; overflow: hidden; vertical-align: top; padding-bottom: .12em; margin-bottom: -.12em; }
.ch-head h2 .hw > span { display: inline-block; }
.js .ch-head h2 .hw > span { transform: translateY(105%); transition: transform 1s cubic-bezier(.16, .84, .24, 1); }
.js .ch-head.in h2 .hw > span { transform: none; }
.js .ch-head .ch-dek { opacity: 0; transform: translateY(12px); transition: opacity 1s var(--ease) .35s, transform 1s var(--ease) .35s; }
.js .ch-head.in .ch-dek { opacity: 1; transform: none; }
.js .ch-head.reveal { opacity: 1; transform: none; }
.ch-art { width: 200px; height: 140px; overflow: visible; align-self: center; }
.ch-art .d { fill: none; stroke: var(--champ); stroke-width: 1.2; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 1; vector-effect: non-scaling-stroke; }
.ch-art .d.dim { stroke: var(--champ-dim); stroke-width: 1; }
.ch-art .fill { fill: var(--champ); opacity: 0; transition: opacity .8s var(--ease) 1.2s; }
.ch-art .seal { fill: rgba(216, 201, 163, .14); stroke: var(--champ); stroke-width: 1; opacity: 0; transform-box: fill-box; transform-origin: center; transform: scale(.4); transition: opacity .8s var(--ease) 1.1s, transform .9s cubic-bezier(.3, 1.6, .5, 1) 1.1s; }
.ch-art .beamfill { fill: rgba(216, 201, 163, .07); }
.ch-art .boat { fill: var(--champ); opacity: 0; }
.in .ch-art .d { stroke-dashoffset: 0; transition: stroke-dashoffset 1.8s cubic-bezier(.6, 0, .2, 1); }
.in .ch-art .d.dim { transition-delay: .35s; }
.in .ch-art .fill, .in .ch-art .seal { opacity: 1; transform: none; }
.in .ch-art .wave { animation: waveX 6s linear infinite; }
@keyframes waveX { from { transform: translateX(0); } to { transform: translateX(-40px); } }
.in .ch-art .beam { transform-origin: 100px 40px; animation: rock 6s ease-in-out infinite; }
@keyframes rock { 0%, 100% { transform: rotate(-4deg); } 50% { transform: rotate(4deg); } }
.in .ch-art .lamp { transform-origin: 100px 46px; animation: sweepL 7s ease-in-out infinite; }
@keyframes sweepL { 0%, 100% { transform: rotate(-14deg) scaleX(1); } 50% { transform: rotate(10deg) scaleX(-1); } }
.in .ch-art .anchor { transform-origin: 100px 20px; animation: rock 7s ease-in-out infinite; }
.in .ch-art .needle { transform-origin: 100px 70px; animation: needle 9s ease-in-out infinite; }
@keyframes needle { 0%, 100% { transform: rotate(-18deg); } 40% { transform: rotate(22deg); } 70% { transform: rotate(4deg); } }
.in .ch-art .stack { animation: floaty 5s ease-in-out infinite; }
@keyframes floaty { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
.in .ch-art .boat { opacity: 1; offset-path: path('M56 104C86 30 116 30 144 82'); animation: sail 5s ease-in-out infinite; }
@keyframes sail { from { offset-distance: 0%; } to { offset-distance: 100%; } }

/* stagger children of revealed containers */
.js .stagger > * { opacity: 0; transform: translateY(14px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .in .stagger > *, .js .stagger.in > * { opacity: 1; transform: none; }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* depth: framed glass panes */
.tide { padding: clamp(18px, 2.4vw, 32px); border: 1px solid var(--line); border-radius: var(--radius); background: linear-gradient(180deg, rgba(216, 201, 163, .035), rgba(216, 201, 163, .008)); box-shadow: var(--shadow); }
.ledger-stage, .route-stage, .fee-result, .memo-out, .chart-box { border-radius: var(--radius); }
.ledger-stage { background: linear-gradient(180deg, rgba(216, 201, 163, .03), rgba(216, 201, 163, .005)); box-shadow: var(--shadow); }
.fee-result { padding: clamp(18px, 2.4vw, 32px); border: 1px solid var(--line); background: linear-gradient(180deg, rgba(216, 201, 163, .035), rgba(216, 201, 163, .008)); box-shadow: var(--shadow); }
.memo-out { padding: clamp(18px, 2.4vw, 32px); border: 1px solid var(--line); background: linear-gradient(180deg, rgba(216, 201, 163, .03), rgba(216, 201, 163, .006)); box-shadow: var(--shadow); }
.route-stage { border: 1px solid var(--line); padding: 10px 18px; background: rgba(14, 20, 32, .35); }
.recv { border-radius: var(--radius); box-shadow: var(--shadow); transition: opacity .6s var(--ease), transform .6s var(--ease), border-color .3s; }
.recv.in:hover { transform: translateY(-3px); border-color: var(--champ-dim); }
.hexdump, .uri-box, textarea { border-radius: 4px; }
.tide-table tbody tr { transition: background-color .3s; }
.tide-table tbody tr:hover { background: rgba(216, 201, 163, .03); }
.js .tide.reveal .tide-table tbody tr { opacity: 0; transform: translateY(10px); transition: opacity .7s var(--ease), transform .7s var(--ease), background-color .3s; }
.js .tide.reveal.in .tide-table tbody tr { opacity: 1; transform: none; }
.tide.in .tide-table tbody tr:nth-child(2) { transition-delay: .08s; } .tide.in .tide-table tbody tr:nth-child(3) { transition-delay: .16s; } .tide.in .tide-table tbody tr:nth-child(4) { transition-delay: .24s; }

/* live values flash softly when they change */
.px, .cross-list dd { position: relative; }
.flash::after { content: ''; position: absolute; inset: -2px -8px; border-radius: 3px; background: rgba(216, 201, 163, .16); animation: flash 1.4s var(--ease) forwards; pointer-events: none; }
@keyframes flash { from { opacity: 1; } to { opacity: 0; } }
.live-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--champ); margin-right: 8px; vertical-align: middle; animation: breathe 2.4s ease-in-out infinite; }
@keyframes breathe { 0%, 100% { opacity: .35; transform: scale(.8); } 50% { opacity: 1; transform: scale(1); } }

/* chart */
.c-area { fill: url(#chartFill); }
.c-end { fill: var(--champ); opacity: 0; transition: opacity .6s var(--ease) 2s; }
.c-end.on { opacity: 1; }
.c-pulse { fill: none; stroke: var(--champ); stroke-width: 1; vector-effect: non-scaling-stroke; opacity: 0; transform-box: fill-box; transform-origin: center; }
.c-pulse.on { animation: ping 2.4s var(--ease) 2.2s infinite; }
@keyframes ping { from { opacity: .8; transform: scale(1); } to { opacity: 0; transform: scale(4.5); } }

/* segmented control with a sliding indicator */
.seg { position: relative; isolation: isolate; border-radius: 4px; overflow: hidden; }
.seg-b { position: relative; z-index: 1; transition: color .45s var(--ease); background: none !important; }
.seg-b[aria-selected="true"] { color: var(--night); }
.seg-ind { position: absolute; left: 0; top: 0; width: 100px; height: 40px; background: var(--champ); z-index: 0; transform-origin: 0 0; transition: transform .55s cubic-bezier(.3, 1.25, .5, 1); pointer-events: none; }

/* buttons: shine + press; copy morph */
.btn-quiet, .ca-copy, .s-ctrl button, .link-b { position: relative; overflow: hidden; transition: background-color .3s, border-color .3s, transform .15s var(--ease), color .3s; }
.btn-quiet::after, .ca-copy::after { content: ''; position: absolute; top: 0; bottom: 0; left: 0; width: 60%; background: linear-gradient(100deg, transparent, rgba(235, 229, 214, .22), transparent); transform: translateX(-130%) skewX(-12deg); transition: transform .8s var(--ease); pointer-events: none; }
.btn-quiet:hover:not(:disabled)::after, .ca-copy:hover::after { transform: translateX(230%) skewX(-12deg); }
.btn-quiet:active:not(:disabled), .ca-copy:active, .s-ctrl button:active, .link-b:active { transform: scale(.96); }
.copied { border-color: var(--champ) !important; color: var(--champ) !important; }
.link-b { overflow: visible; }
.link-b::before { content: ''; position: absolute; left: 0; right: 0; bottom: -1px; height: 1px; background: var(--champ); transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease); }
.link-b:hover::before { transform: scaleX(1); transform-origin: left; }
.s-ctrl { border-radius: 4px; overflow: hidden; }
.s-ctrl output { display: inline-block; }
.bump { animation: bump .45s cubic-bezier(.3, 1.6, .5, 1); }
@keyframes bump { 0% { transform: translateY(-6px); opacity: .3; } 100% { transform: none; opacity: 1; } }

/* inputs: animated focus underline */
input[type="text"], input[type="number"], select { background-image: linear-gradient(var(--champ), var(--champ)); background-size: 0% 1px; background-repeat: no-repeat; background-position: 0 100%; transition: border-color .3s, background-size .5s var(--ease); }
input[type="text"]:focus, input[type="number"]:focus { background-size: 100% 1px; }
select { background-image: linear-gradient(45deg, transparent 50%, var(--champ) 50%), linear-gradient(135deg, var(--champ) 50%, transparent 50%), linear-gradient(var(--champ), var(--champ)); background-position: calc(100% - 10px) 55%, calc(100% - 5px) 55%, 0 100%; background-size: 5px 5px, 5px 5px, 0% 1px; }
select:focus { background-size: 5px 5px, 5px 5px, 100% 1px; }
textarea { transition: border-color .3s, box-shadow .4s var(--ease); }
textarea:focus { box-shadow: 0 0 0 3px rgba(216, 201, 163, .1); }

/* results enter smoothly */
.leg, .learn li, .notes li, .fbar, .ua-sum > div, .route-sum > div, .route-sum > .note { animation: rise .6s var(--ease) both; }
.leg:nth-child(2), .learn li:nth-child(2), .notes li:nth-child(2), .fbar:nth-child(2), .ua-sum > div:nth-child(2), .route-sum > div:nth-child(2) { animation-delay: .07s; }
.leg:nth-child(3), .learn li:nth-child(3), .notes li:nth-child(3), .fbar:nth-child(3), .ua-sum > div:nth-child(3), .route-sum > div:nth-child(3) { animation-delay: .14s; }
.leg:nth-child(4), .learn li:nth-child(4), .notes li:nth-child(4), .fbar:nth-child(4), .ua-sum > div:nth-child(4), .route-sum > div:nth-child(4) { animation-delay: .21s; }
.route-sum > .note { animation-delay: .3s; }
.ua-title, .ua-grade { animation: rise .5s var(--ease) both; }
.r-node.hid circle { animation: halo 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
@keyframes halo { 0%, 100% { stroke-opacity: 1; } 50% { stroke-opacity: .45; } }
.pool.sealed .pool-hatch { animation: hatchIn .8s var(--ease); }
@keyframes hatchIn { from { opacity: 0; } to { opacity: 1; } }

/* reader: pool key */
.pool-key { margin: 36px 0 0; max-width: 360px; }
.pool-key svg { width: 100%; height: auto; overflow: visible; }
.pk path { fill: rgba(216, 201, 163, .02); stroke: var(--line-2); stroke-width: 1; transition: fill .6s var(--ease), stroke .6s var(--ease), transform .6s var(--ease); }
.pk text { fill: var(--muted); font-family: var(--serif); font-size: 18px; font-style: italic; transition: fill .6s; }
.pk.on path { fill: rgba(216, 201, 163, .14); stroke: var(--champ); }
.pk.on text { fill: var(--bone); }
.pk.transparent.on path { fill: rgba(201, 195, 180, .08); stroke: var(--bone-2); }
.pk { transition: transform .6s var(--ease); }
.pool-key.lift .pk.orchard { transform: translateY(-6px); }
.pool-key.lift .pk.transparent { transform: translateY(6px); }
.pool-key figcaption { margin-top: 8px; }

/* interlude: pinned decode */
.unfold { position: relative; height: 360vh; background: linear-gradient(180deg, var(--night), #0b1019 30%, #0b1019 70%, var(--night)); }
.unfold-pin { position: sticky; top: 0; height: 100vh; height: 100svh; display: grid; grid-template-columns: minmax(280px, 400px) minmax(0, 1fr); gap: clamp(20px, 4vw, 64px); align-items: center; padding: 80px var(--gut) 40px; max-width: calc(var(--wrap) + 2 * var(--gut) + 120px); margin: 0 auto; overflow: hidden; }
.kicker-i { font-family: var(--serif); font-style: italic; color: var(--champ); font-size: 19px; margin: 0 0 10px; }
.unfold-copy h2 { font-family: var(--serif); font-weight: 400; font-size: clamp(36px, 4.4vw, 60px); line-height: 1; margin: 0 0 28px; letter-spacing: -.01em; }
.unfold-steps { list-style: none; margin: 0; padding: 0; counter-reset: st; }
.unfold-steps li { counter-increment: st; position: relative; padding: 14px 0 14px 44px; border-top: 1px solid var(--line); color: var(--muted); font-size: 15px; line-height: 1.55; opacity: .45; transition: opacity .5s var(--ease), color .5s var(--ease); }
.unfold-steps li::before { content: counter(st, upper-roman); position: absolute; left: 0; top: 12px; font-family: var(--serif); font-style: italic; font-size: 20px; color: var(--champ-dim); transition: color .5s; }
.unfold-steps li::after { content: ''; position: absolute; left: 0; top: -1px; height: 1px; width: 100%; background: var(--champ); transform: scaleX(0); transform-origin: left; transition: transform .7s var(--ease); }
.unfold-steps li b { color: var(--bone); font-weight: 500; }
.unfold-steps li.on { opacity: 1; color: var(--bone-2); }
.unfold-steps li.on::before { color: var(--champ); }
.unfold-steps li.on::after { transform: scaleX(1); }
.unfold-steps li.past { opacity: .7; }
.unfold-prog { height: 1px; background: var(--line); margin-top: 18px; }
.unfold-prog span { display: block; height: 100%; background: var(--champ); transform-origin: left; transform: scaleX(0); }
.unfold-canvas { width: 100%; height: min(78vh, 640px); }
.unfold.still { height: auto; }
.unfold.still .unfold-pin { position: relative; height: auto; min-height: 640px; }
.unfold.still .unfold-steps li { opacity: 1; }

/* rules: lift on hover */
.rule { transition: transform .5s var(--ease), background-color .5s var(--ease); position: relative; }
.rule:hover { background: rgba(216, 201, 163, .025); }
.rule::after { content: ''; position: absolute; left: 0; top: -1px; height: 1px; width: 64px; background: var(--champ); transform: scaleX(0); transform-origin: left; transition: transform .8s var(--ease) .2s; }
.rule:nth-child(even)::after { left: 36px; }
.rule.in::after { transform: scaleX(1); }
.rules .rule:nth-child(2) { transition-delay: .08s; } .rules .rule:nth-child(3) { transition-delay: .16s; } .rules .rule:nth-child(4) { transition-delay: .24s; }

/* faq with a drawn compass */
.faq-wrap { display: grid; grid-template-columns: minmax(0, 260px) minmax(0, 1fr); gap: clamp(28px, 5vw, 80px); align-items: start; }
.faq-wrap .faq { margin-left: 0; max-width: none; }
.faq-aside { position: sticky; top: 120px; }
.faq-quote { font-family: var(--serif); font-size: clamp(26px, 2.4vw, 34px); line-height: 1.1; margin: 0 0 28px; color: var(--bone); }
.faq-quote em { color: var(--champ); }
.chart-rose { width: 200px; height: 200px; }
.chart-rose circle, .chart-rose path { fill: none; stroke: var(--champ); stroke-width: 1; }
.chart-rose .dim { stroke: var(--line-2); }
.chart-rose .solid { fill: var(--champ); stroke: none; }
.chart-rose text { fill: var(--champ); font-family: var(--serif); font-style: italic; font-size: 16px; text-anchor: middle; }
.rose-needle { transform-origin: 100px 100px; transition: transform 1.4s cubic-bezier(.3, 1.4, .4, 1); }
.faq summary { transition: color .3s, padding-left .4s var(--ease); }
.faq summary:hover { color: var(--champ); padding-left: 6px; }
.faq details p { animation: rise .5s var(--ease) both; }

/* footer */
.foot-top { position: relative; }
.foot-stack { position: absolute; right: 0; top: 0; width: clamp(90px, 14vw, 180px); height: auto; color: var(--champ); opacity: .7; }
.foot-stack .fs1 { animation: fsA 6s ease-in-out infinite; } .foot-stack .fs2 { animation: fsA 6s ease-in-out .3s infinite; } .foot-stack .fs3 { animation: fsA 6s ease-in-out .6s infinite; opacity: .5; }
@keyframes fsA { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.foot-word .fl { display: inline-block; }
.js .foot-word .fl { opacity: 0; transform: translateY(40%); transition: opacity .9s var(--ease), transform .9s cubic-bezier(.16, .84, .24, 1); }
.js .foot-word.in .fl { opacity: 1; transform: none; }

@media (max-width: 1100px) {
  .ch-head { grid-template-columns: minmax(80px, 150px) minmax(0, 1fr) 150px; }
  .ch-art { width: 150px; height: 105px; }
}
@media (max-width: 900px) {
  .hero { justify-content: flex-end; padding-top: 52svh; padding-bottom: 40px; min-height: 0; }
  .hero-copy { max-width: 100%; }
  .hero-title { max-width: 12ch; }
  .hero-manifest { position: static; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 32px; }
  .hero-veil { background: linear-gradient(180deg, rgba(14, 20, 32, 0) 30%, rgba(14, 20, 32, .6) 52%, var(--night) 64%); }
  .unfold { height: 300vh; }
  .unfold-pin { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; align-items: start; padding-top: 76px; gap: 8px; }
  .unfold-copy h2 { font-size: 32px; margin-bottom: 12px; }
  .unfold-steps { display: grid; }
  .unfold-steps li { grid-area: 1 / 1; opacity: 0; transform: translateY(8px); transition: opacity .5s var(--ease), transform .5s var(--ease); border-top: 0; padding-top: 4px; }
  .unfold-steps li::after { display: none; }
  .unfold-steps li::before { top: 2px; }
  .unfold-steps li.past { opacity: 0; }
  .unfold-steps li.on { opacity: 1; transform: none; }
  .unfold-canvas { height: 100%; min-height: 300px; }
  .unfold.still .unfold-steps { display: block; }
  .unfold.still .unfold-steps li { opacity: 1; transform: none; }
  .faq-wrap { grid-template-columns: minmax(0, 1fr); }
  .faq-aside { position: static; display: flex; align-items: center; gap: 20px; }
  .faq-quote { margin: 0; }
  .chart-rose { width: 110px; height: 110px; flex: none; }
}
@media (max-width: 720px) {
  .ch-head { grid-template-columns: minmax(0, 1fr); }
  .ch-art { position: absolute; right: 0; top: -6px; width: 104px; height: 73px; opacity: .85; }
  .hero-manifest { grid-template-columns: minmax(0, 1fr); }
  .tide { padding: 14px; }
  .ticker { height: 42px; }
  .tk-item { padding: 0 24px; }
  .foot-stack { width: 70px; top: -10px; }
}
@media (prefers-reduced-motion: reduce) {
  .js .hero-title .w > span, .js .ch-head h2 .hw > span, .js .stagger > *, .js .foot-word .fl, .js .tide.reveal .tide-table tbody tr { transform: none; opacity: 1; }
  .js .ch-head .ch-num { clip-path: none; }
  .js .ch-head .ch-dek { opacity: 1; transform: none; }
  .ch-art .d { stroke-dashoffset: 0; }
  .ch-art .fill, .ch-art .seal { opacity: 1; transform: none; }
  .ticker-track { animation: none; }
  .ch-head::before { transform: scaleX(1); }
}

#mCopy + .field-note { margin-top: 12px; }
.pk.on path { fill: rgba(216, 201, 163, .2); }
.pk:not(.on) path { stroke-dasharray: 3 4; }
@media (max-width: 900px) { .hero-manifest div::before { display: none; } .hero-manifest { border-top: 1px solid var(--line); } }
