/* =========================================================
   TRENOS — Admiralty chart system
   Paper: sea-glass chart. Ink: survey navy. Needle: north red.
   Brass for instruments. Bodoni for engraved display type.
   ========================================================= */

@font-face { font-family: 'Quaaykop'; src: url('/quaaykop-font/Quaaykop-DYE1R.ttf') format('truetype'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Quaaykop'; src: url('/quaaykop-font/QuaaykopItalic-3ljK8.ttf') format('truetype'); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: 'Quaaykop'; src: url('/quaaykop-font/QuaaykopMedium-pgx0O.ttf') format('truetype'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Quaaykop'; src: url('/quaaykop-font/QuaaykopMediumItalic-xRPYq.ttf') format('truetype'); font-weight: 500; font-style: italic; font-display: swap; }
@font-face { font-family: 'Quaaykop'; src: url('/quaaykop-font/QuaaykopBold-ZpZlz.ttf') format('truetype'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Quaaykop'; src: url('/quaaykop-font/QuaaykopBoldItalic-OGL7p.ttf') format('truetype'); font-weight: 700; font-style: italic; font-display: swap; }

:root {
  --paper: #E3EAE7;
  --paper-2: #D4DEDA;
  --paper-3: #F2F6F4;
  --ink: #13233A;
  --ink-2: #43566C;
  --ink-3: #8394A0;
  --rule: #A6BBBC;
  --rule-soft: rgba(19, 35, 58, .12);
  --needle: #CC3A2B;
  --brass: #A4782A;
  --brass-2: #D7B46A;
  --up: #24705F;
  --down: #CC3A2B;

  --f-display: 'Quaaykop', Georgia, serif;
  --f-body: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-code: 'JetBrains Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  --gutter: clamp(18px, 3.4vw, 72px);
  --maxw: 1480px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  --spring: cubic-bezier(.34, 1.56, .64, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; overflow-x: clip; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 18.5px/1.6 var(--f-body);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--needle); color: #fff; }
:focus-visible { outline: 2px solid var(--needle); outline-offset: 3px; border-radius: 6px; }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
sub { font-size: .7em; vertical-align: -.2em; }

@media (hover: hover) and (pointer: fine) {
  body.has-cur, body.has-cur a, body.has-cur button, body.has-cur label, body.has-cur select, body.has-cur [data-cursor] { cursor: none; }
  body.has-cur input, body.has-cur textarea { cursor: text; }
}

/* ---------- rose (shared compass SVG) ---------- */
.rose { width: 100%; height: 100%; overflow: visible; }
.rose .r-ring { fill: none; stroke: var(--ink); stroke-width: 1.2; }
.rose .r-ring-a { stroke-width: 2.4; }
.rose .r-dash { stroke-dasharray: 2 7; stroke: var(--ink-2); }
.rose .r-tick { fill: none; stroke: var(--ink); stroke-width: 1; }
.rose .r-tick-b { stroke-width: 2; }
.rose .r-num { font: italic 500 22px var(--f-display); fill: var(--ink-2); letter-spacing: .04em; }
.rose .r-let { font: 600 68px var(--f-display); fill: var(--ink); }
.rose .r-n { fill: var(--needle); }
.rose .r-ink { fill: var(--ink); }
.rose .r-paper { fill: var(--paper-3); stroke: var(--ink); stroke-width: 1.2; stroke-linejoin: round; }
.rose .r-paperfill { fill: var(--paper-3); }
.rose .r-rhumb { fill: none; stroke: var(--rule); stroke-width: 1; }
.n-north { fill: var(--needle); }
.n-south { fill: var(--ink); }
.n-pivot { fill: var(--brass); }
.rose-needle { filter: drop-shadow(0 10px 8px rgba(19, 35, 58, .22)); }

.mini { width: 100%; height: 100%; overflow: visible; }
.mini .m-ring { fill: var(--paper-3); stroke: var(--ink); stroke-width: 1.6; }
.mini .m-ticks { stroke: var(--ink); stroke-width: 1.4; }
[data-mini] { display: inline-block; }
[data-mini] .m-needle { transform: rotate(var(--a, 0deg)); transition: transform .9s var(--spring); }
.dial .m-ring { fill: color-mix(in srgb, var(--paper-3) 80%, transparent); }

/* ---------- field: the big compass behind everything ---------- */
.field { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.field-gimbal {
  position: absolute; left: 70%; top: 50%; width: 900px; height: 900px;
  transform-style: preserve-3d; will-change: transform;
  opacity: var(--op, 1);
  transition: opacity .3s linear;
}
.field-gimbal::after { /* glass sheen */
  content: ''; position: absolute; inset: 6%; border-radius: 50%;
  background: radial-gradient(circle at 35% 28%, rgba(255,255,255,.55), rgba(255,255,255,0) 46%);
  mix-blend-mode: soft-light;
}
.field-line { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; transition: opacity .4s; }
.field-line line { stroke: var(--needle); stroke-width: 1; stroke-dasharray: 3 6; opacity: .55; }
.field-line circle { fill: var(--needle); }
body.pointer-in .field-line { opacity: calc(var(--op, 1) * .9); }
.soundings { position: absolute; inset: 0; opacity: .5; }
.soundings i { position: absolute; font: italic 400 12px var(--f-display); color: var(--ink-3); }
body.is-intro .field { opacity: 0; }
.field { transition: opacity 1s var(--ease); }

/* ---------- cursor ---------- */
.cur { position: fixed; inset: 0; z-index: 400; pointer-events: none; }
.cur > * { position: absolute; left: 0; top: 0; will-change: transform; }
.cur-dot { width: 26px; height: 26px; margin: -13px 0 0 -13px; transition: width .25s var(--ease), height .25s var(--ease), margin .25s var(--ease); }
.cur-ring {
  width: 54px; height: 54px; margin: -27px 0 0 -27px; border-radius: 50%;
  border: 1.5px solid var(--brass); opacity: .9;
  transition: width .35s var(--spring), height .35s var(--spring), margin .35s var(--spring), border-color .3s, background .3s;
}
.cur-read {
  font: 600 12.5px/1 var(--f-code); color: var(--ink); white-space: nowrap;
  padding: 5px 7px; border-radius: 6px; background: color-mix(in srgb, var(--paper-3) 88%, transparent);
  border: 1px solid var(--rule-soft); letter-spacing: .02em;
}
.cr-wind { color: var(--needle); }
.cur.is-hot .cur-ring { width: 76px; height: 76px; margin: -38px 0 0 -38px; border-color: var(--needle); background: rgba(204, 58, 43, .06); }
.cur.is-label .cur-read { background: var(--ink); color: var(--paper-3); border-color: var(--ink); }
.cur.is-text .cur-dot { width: 14px; height: 14px; margin: -7px 0 0 -7px; }
.cur.is-down .cur-ring { width: 40px; height: 40px; margin: -20px 0 0 -20px; }
body:not(.pointer-in) .cur { opacity: 0; }
.cur { transition: opacity .3s; }

/* ---------- header ---------- */
.top {
  position: fixed; inset: 0 0 auto; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 18px var(--gutter);
  transition: background .35s, box-shadow .35s, transform .9s var(--ease-out), opacity .9s;
}
.top.is-scrolled {
  background: color-mix(in srgb, var(--paper) 80%, transparent);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  box-shadow: 0 1px 0 var(--rule-soft);
}
body.is-intro .top { opacity: 0; transform: translateY(-20px); }
.logo { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.logo-mark { width: 54px; height: 54px; display: block; }
.logo-word { font: 600 36px/1 var(--f-display); letter-spacing: .17em; margin-right: -.17em; }
.top-r { display: flex; align-items: center; gap: 10px; }

.icon-btn {
  width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center;
  border: 1.5px solid var(--ink); background: color-mix(in srgb, var(--paper-3) 60%, transparent);
  transition: background .25s, color .25s, transform .4s var(--spring);
}
.icon-btn svg { width: 18px; height: 18px; fill: currentColor; }
.icon-btn:hover { background: var(--ink); color: var(--paper-3); transform: rotate(-12deg); }

/* ---------- buttons ---------- */
.btn {
  position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 60px; padding: 0 30px; border-radius: 999px; border: 1.5px solid var(--ink);
  background: transparent; color: var(--ink); text-decoration: none; white-space: nowrap;
  font: 600 17px/1 var(--f-body); letter-spacing: .005em; overflow: hidden; isolation: isolate;
  transition: color .35s var(--ease), transform .35s var(--ease);
}
.btn::before { /* fill sweeps in like a needle turning */
  content: ''; position: absolute; inset: -2px; z-index: -1; background: var(--ink);
  clip-path: circle(0% at var(--fx, 50%) var(--fy, 50%)); transition: clip-path .5s var(--ease-out);
}
.btn:hover::before { clip-path: circle(140% at var(--fx, 50%) var(--fy, 50%)); }
.btn:hover { color: var(--paper-3); }
.btn--ink { background: var(--ink); color: var(--paper-3); }
.btn--ink::before { background: var(--needle); }
.btn--ink:hover { color: var(--paper-3); }
.btn--sm { min-height: 50px; padding: 0 20px; font-size: 16px; }
.btn .b-rose { width: 20px; height: 20px; transition: transform .6s var(--spring); }
.btn:hover .b-rose { transform: rotate(135deg); }
.btn .b-rose .m-ring { fill: transparent; stroke: currentColor; }
.btn .b-rose .m-ticks { stroke: currentColor; }
.btn--ink .b-rose .n-south { fill: var(--paper-3); }
.btn[disabled] { opacity: .45; pointer-events: none; }

.wallet-btn .wallet-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--paper-2); box-shadow: 0 0 0 0 rgba(36,112,95,.5); }
.wallet-btn.is-on .wallet-dot { background: #5BC2A6; animation: ping 2.4s infinite; }
.wallet-btn.is-on .wallet-label { font-family: var(--f-code); font-size: 13px; font-weight: 500; }
@keyframes ping { 0% { box-shadow: 0 0 0 0 rgba(91,194,166,.55); } 70%, 100% { box-shadow: 0 0 0 8px rgba(91,194,166,0); } }

/* CA pill */
.ca {
  display: inline-flex; align-items: center; gap: 10px; max-width: 100%;
  padding: 6px 6px 6px 16px; border-radius: 999px; border: 1px solid var(--rule);
  background: color-mix(in srgb, var(--paper-3) 72%, transparent);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.ca-k { font: 700 15px var(--f-body); color: var(--needle); }
.ca-v { font: 500 15px var(--f-code); color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.ca-copy {
  flex: none; width: 34px; height: 34px; border-radius: 50%; border: 0; display: grid; place-items: center;
  background: var(--ink); color: var(--paper-3); transition: transform .4s var(--spring), background .25s;
}
.ca-copy svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.ca-copy:hover { transform: scale(1.1) rotate(-8deg); background: var(--needle); }

/* ---------- heading tape nav ---------- */
.tape {
  position: fixed; left: 50%; bottom: max(16px, env(safe-area-inset-bottom)); z-index: 60;
  width: min(800px, calc(100vw - 32px)); height: 78px; border-top: 3px solid var(--needle); transform: translateX(-50%);
  border-radius: 16px; border: 1.5px solid var(--ink);
  background: color-mix(in srgb, var(--paper-3) 86%, transparent);
  backdrop-filter: blur(14px) saturate(1.3); -webkit-backdrop-filter: blur(14px) saturate(1.3);
  box-shadow: 0 22px 44px -26px rgba(19, 35, 58, .55), inset 0 1px 0 rgba(255,255,255,.7);
  transition: transform .9s var(--ease-out), opacity .9s;
}
body.is-intro .tape { opacity: 0; transform: translate(-50%, 30px); }
.tape-window {
  position: absolute; inset: 0; overflow: hidden; border-radius: 14px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 16%, #000 84%, transparent);
}
.tape-strip { position: absolute; left: 0; top: 0; height: 100%; will-change: transform; }
.tape-ticks { position: absolute; left: 0; top: 0; overflow: visible; }
.tape-ticks path { stroke: var(--ink); stroke-width: 1.2; fill: none; }
.tape-ticks text { font: 600 10px var(--f-body); fill: var(--ink-2); letter-spacing: .04em; }
.tape-ticks .t-n { fill: var(--needle); }
.tape-label {
  position: absolute; top: 34px; transform: translateX(-50%) scale(var(--mag, 1)); transform-origin: 50% 20%;
  display: flex; align-items: baseline; gap: 6px; padding: 5px 10px; border-radius: 8px;
  text-decoration: none; white-space: nowrap; font: 600 17px/1.1 var(--f-body); color: var(--ink);
  transition: transform .18s var(--ease), background .2s, color .2s;
}
.tape-label .tl-deg { font: 500 12.5px var(--f-code); color: var(--ink-2); }
.tape-label:hover { background: var(--ink); color: var(--paper-3); }
.tape-label:hover .tl-deg { color: var(--brass-2); }
.tape-label.is-current { color: var(--needle); }
.tape-label.is-current .tl-deg { color: var(--needle); }
.tape-lubber { position: absolute; left: 50%; top: -1px; bottom: 6px; width: 2px; margin-left: -1px; background: var(--needle); pointer-events: none; }
.tape-lubber::before {
  content: ''; position: absolute; left: 50%; top: 0; transform: translateX(-50%);
  border: 7px solid transparent; border-top: 9px solid var(--needle); border-bottom: 0;
}

/* ---------- page shell ---------- */
main { position: relative; z-index: 2; }
.wrap { width: 100%; max-width: calc(var(--maxw) + 2 * var(--gutter)); margin: 0 auto; padding: 0 var(--gutter); }
.sec { position: relative; padding: clamp(96px, 13vw, 176px) 0; }
.h-display { font: 500 clamp(48px, 6.6vw, 112px)/.98 var(--f-display); letter-spacing: -.02em; margin: 0; font-optical-sizing: auto; text-wrap: pretty; max-width: 20ch; }
.h-2 { font: 500 clamp(38px, 4.8vw, 70px)/1.02 var(--f-display); letter-spacing: -.015em; margin: 0; text-wrap: balance; }
.h-3 { font: 600 clamp(24px, 2.3vw, 32px)/1.15 var(--f-display); margin: 0; }
.lede { font-size: clamp(19px, 1.6vw, 24px); line-height: 1.55; color: var(--ink-2); max-width: 62ch; margin: 24px 0 0; }
.muted { color: var(--ink-2); }
.bearing { font: 500 16px var(--f-code); color: var(--needle); }
body.is-leaving main, body.is-leaving .foot { opacity: 0; transform: translateY(-14px); filter: blur(4px); }
main, .foot { transition: opacity .5s var(--ease), transform .5s var(--ease), filter .5s; }

/* code */
.code {
  position: relative; margin: 0; padding: 22px 24px; border-radius: 14px; overflow: auto;
  background: var(--ink); color: #DCE6EA; font: 400 15px/1.7 var(--f-code); tab-size: 2;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06);
}
.code .k { color: #E9C77F; }
.code .s { color: #9FD7C7; }
.code .nm { color: #F29C8F; }
.code .b { color: #B5C6F0; }
.code .p { color: #7C8FA6; }
.code-copy {
  position: absolute; top: 12px; right: 12px; padding: 7px 12px; border-radius: 8px; border: 1px solid rgba(255,255,255,.18);
  background: rgba(255,255,255,.06); color: #DCE6EA; font: 600 12px var(--f-body); transition: background .2s;
}
.code-copy:hover { background: var(--needle); border-color: var(--needle); }

/* reveal */
[data-reveal] { transition: opacity .9s var(--ease-out), transform .9s var(--ease-out), clip-path 1.1s var(--ease-out); }
[data-reveal="rise"] { opacity: 0; transform: translateY(34px); }
[data-reveal="turn"] { opacity: 0; transform: perspective(900px) rotateX(24deg) translateY(30px); transform-origin: 50% 100%; }
[data-reveal="wipe"] { clip-path: inset(0 100% 0 0); }
[data-reveal].in { opacity: 1; transform: none; clip-path: inset(0 0 0 0); }

/* ---------- intro ---------- */
.intro {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center;
  background: var(--paper); clip-path: circle(150% at 50% 50%); --r: min(22vmin, 200px);
  transition: clip-path 1s cubic-bezier(.7, 0, .2, 1);
}
.intro.is-out { clip-path: circle(0% at 70% 50%); }
.intro-stage { display: grid; justify-items: center; gap: 28px; perspective: 1200px; transform: translateY(-10vh); }
.intro-rose {
  width: calc(var(--r) * 2); aspect-ratio: 1;
  transform: rotateX(78deg) scale(.55); opacity: 0;
  transition: transform 1.4s var(--ease-out), opacity .8s;
}
.intro.is-on .intro-rose { transform: none; opacity: 1; }
.intro.is-word .intro-rose { transform: scale(.86); }
.intro-line { margin: 0; font: italic 500 clamp(18px, 2vw, 24px) var(--f-display); color: var(--ink-2); display: flex; height: 1.4em; }
.intro-line span { opacity: 0; transform: translateY(8px); transition: opacity .5s, transform .5s var(--ease-out); transition-delay: calc(var(--i) * 40ms); }
.intro.is-line .intro-line span { opacity: 1; transform: none; }
.intro.is-word .intro-line span { opacity: 0; transform: translateY(-8px); transition-delay: calc(var(--i) * 15ms); }
.intro-word {
  position: absolute; margin: 0; top: calc(50% - 10vh + var(--r) + 14px);
  font: 600 clamp(40px, 6vw, 76px)/1 var(--f-display); letter-spacing: .22em; margin-right: -.22em;
  display: flex; perspective: 600px;
}
.intro-word span { display: inline-block; opacity: 0; transform: rotateX(-90deg); transform-origin: 50% 100%; transition: transform .8s var(--spring), opacity .4s; transition-delay: calc(var(--i) * 60ms); }
.intro.is-word .intro-word span { opacity: 1; transform: none; }
.intro-enter {
  position: absolute; left: 50%; top: calc(50% - 10vh + var(--r) + 14px + clamp(50px, 6vw, 80px) + 66px); min-width: 168px;
  opacity: 0; transform: translate(-50%, 14px); pointer-events: none;
  transition: opacity .6s var(--ease-out), transform .6s var(--ease-out), color .35s;
}
.intro.is-enter .intro-enter { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }

/* ---------- footer ---------- */
.foot {
  position: relative; z-index: 2; display: grid; gap: 28px 48px; grid-template-columns: 1.2fr 1fr auto;
  max-width: calc(var(--maxw) + 2 * var(--gutter)); margin: 0 auto; padding: 72px var(--gutter) 130px;
  border-top: 2px solid var(--needle);
}
.foot-a p { margin: 14px 0 0; color: var(--ink-2); max-width: 30ch; }
.logo--foot .logo-mark { width: 36px; height: 36px; }
.logo--foot .logo-word { font-size: 24px; }
.foot-b { display: grid; gap: 14px; align-content: start; justify-items: start; }
.foot-lat { margin: 0; font-size: 16px; color: var(--ink-2); }
.foot-lat strong { font: 600 14px var(--f-code); color: var(--ink); }
.foot-c { display: grid; gap: 8px; align-content: start; }
.foot-c a { text-decoration: none; font-weight: 600; width: fit-content; background: linear-gradient(var(--needle), var(--needle)) 0 100% / 0 1.5px no-repeat; transition: background-size .35s var(--ease); }
.foot-c a:hover { background-size: 100% 1.5px; }
.foot-d { grid-column: 1 / -1; margin: 0; font-size: 15px; color: var(--ink-2); }
@media (max-width: 760px) { .foot { grid-template-columns: 1fr; } }

/* ---------- toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 104px; z-index: 120; transform: translate(-50%, 16px); opacity: 0;
  padding: 11px 18px; border-radius: 999px; background: var(--ink); color: var(--paper-3); font: 600 14px var(--f-body);
  transition: opacity .3s, transform .4s var(--spring); pointer-events: none;
}
.toast.is-on { opacity: 1; transform: translate(-50%, 0); }

/* =========================================================
   HOME
   ========================================================= */
.hero {
  position: relative; min-height: 100svh; display: grid; align-content: center;
  padding: 130px var(--gutter) 150px; max-width: none; margin: 0;
}
.hero-title {
  margin: 0; font: 500 clamp(44px, 6.6vw, 124px)/.96 var(--f-display); letter-spacing: -.025em;
  font-optical-sizing: auto; max-width: none; margin-left: 0; position: relative; z-index: 3;
}
.hero-title .ln { display: block; overflow: hidden; padding: .02em 0 .1em; margin-bottom: -.1em; perspective: 900px; }
.hero-title .ln > span {
  display: inline-block; transform-origin: 50% 100%;
  transform: translateY(102%) rotateX(-62deg); transition: transform 1.3s var(--ease-out);
  transition-delay: calc(var(--i) * 110ms + 120ms);
}
body.is-ready .hero-title .ln > span { transform: none; }
.hero-act { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 48px; }
.hero > .hero-act, .hero > .hero-ca { margin-left: 0; }
.hero-title .ln > span { white-space: nowrap; }
@media (max-width: 760px) { .hero-title .ln > span { white-space: normal; } }
.hero-ca { margin-top: 20px; }
.hero-act, .hero-ca, .hero-corner { opacity: 0; transform: translateY(16px); transition: opacity .9s var(--ease-out) .75s, transform .9s var(--ease-out) .75s; }
body.is-ready .hero-act, body.is-ready .hero-ca, body.is-ready .hero-corner { opacity: 1; transform: none; }
.hero-corner { position: absolute; bottom: 120px; display: flex; align-items: center; gap: 12px; font-size: 16px; color: var(--ink-2); }
.hero-scroll { left: var(--gutter); }
.hero-scroll .sc-needle { width: 18px; height: 34px; border: 1.5px solid var(--ink); border-radius: 10px; position: relative; }
.hero-scroll .sc-needle::after { content: ''; position: absolute; left: 50%; top: 6px; width: 2px; height: 8px; margin-left: -1px; border-radius: 2px; background: var(--needle); animation: sc 1.8s var(--ease) infinite; }
@keyframes sc { 0% { transform: translateY(0); opacity: 0; } 30% { opacity: 1; } 100% { transform: translateY(12px); opacity: 0; } }
.hero-bearing { right: var(--gutter); text-align: right; display: grid; justify-items: end; gap: 2px; }
.hb-deg { font: 500 56px/1 var(--f-display); color: var(--ink); font-variant-numeric: tabular-nums; }
.hb-wind { font: 600 15px var(--f-body); color: var(--needle); letter-spacing: .04em; }
@media (max-width: 760px) {
  .hero { align-content: start; padding-top: 128px; }
  .hero-bearing { display: none; }
  .hero-corner { bottom: 104px; }
}

/* --- routes: npx + hosted --- */
.routes { display: grid; grid-template-columns: 1fr 1.05fr; gap: clamp(40px, 6vw, 96px); align-items: center; }
.route-list { display: grid; gap: 18px; }
.route {
  position: relative; display: grid; grid-template-columns: 54px 1fr; gap: 18px; align-items: start;
  padding: 30px; border-radius: 20px; background: color-mix(in srgb, var(--paper-3) 80%, transparent);
  border: 1px solid var(--rule); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
}
.route-mark { width: 54px; height: 54px; }
.route h3 { margin: 2px 0 6px; font: 600 26px/1.2 var(--f-display); }
.route p { margin: 0 0 16px; color: var(--ink-2); font-size: 18px; }
.cmd {
  display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; border-radius: 12px;
  background: var(--ink); color: #DCE6EA; font: 500 16px var(--f-code); min-width: 0;
}
.cmd code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cmd .p { color: var(--brass-2); }
.cmd button { flex: none; border: 0; border-radius: 8px; padding: 8px 12px; background: rgba(255,255,255,.1); color: #fff; font: 600 12px var(--f-body); transition: background .2s; }
.cmd button:hover { background: var(--needle); }
@media (max-width: 900px) { .routes { grid-template-columns: 1fr; } }

/* --- characters --- */
.cast { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 80px); align-items: center; margin-top: 64px; }
.stage {
  position: relative; display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; align-items: end;
  padding: 40px 10px 0; min-height: 260px;
}
.sym {
  position: relative; width: 100%; max-width: 170px; aspect-ratio: 1; border-radius: 50%;
  display: grid; place-items: center; border: 1.5px solid var(--ink); background: var(--paper-3);
  transition: background .4s var(--ease), color .4s, transform .6s var(--spring);
}
.sym::before {
  content: ''; position: absolute; inset: -9px; border-radius: 50%;
  border: 1.5px dashed var(--brass); opacity: 0; transition: opacity .4s;
  animation: symspin 14s linear infinite;
}
.sym svg { width: 44%; height: 44%; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.chr[aria-selected="true"] .sym { background: var(--ink); color: var(--paper-3); }
.chr[aria-selected="true"] .sym::before, .chr:hover .sym::before { opacity: 1; }
@keyframes symspin { to { transform: rotate(360deg); } }

.chr {
  position: relative; z-index: 1; display: grid; justify-items: center; gap: 12px; padding: 0; border: 0; background: none;
  transition: transform .6s var(--spring), opacity .4s, filter .4s;
}
.chr svg { width: 100%; max-width: 150px; overflow: visible; }
.chr-name { font: 600 17px var(--f-body); white-space: nowrap; padding: 4px 10px; border-radius: 999px; transition: background .3s, color .3s; }
.chr[aria-selected="true"] { transform: translateY(-16px) scale(1.06); }
.chr[aria-selected="true"] .chr-name { background: var(--ink); color: var(--paper-3); }
.stage.has-sel .chr[aria-selected="false"] { opacity: .55; filter: saturate(.6); }
.chr:hover { transform: translateY(-8px); }
.chr[aria-selected="true"]:hover { transform: translateY(-18px) scale(1.07); }
.chr .body { fill: var(--paper-3); stroke: var(--ink); stroke-width: 3; stroke-linejoin: round; }
.chr .ink { fill: var(--ink); }
.chr .brass { fill: var(--brass); }
.chr .red { fill: var(--needle); }
.chr .line { fill: none; stroke: var(--ink); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.chr .eye-w { fill: #fff; stroke: var(--ink); stroke-width: 2.4; }
.chr .pupil { fill: var(--ink); transition: transform .08s linear; }
.chr .lid { fill: var(--paper-3); transform-box: fill-box; transform-origin: 50% 0; transform: scaleY(0); }
.chr.blink .lid { animation: blink .22s ease; }
@keyframes blink { 50% { transform: scaleY(1); } }
.chr .shadow { fill: rgba(19, 35, 58, .14); }
/* personalities */
.chr .lens { transform-box: fill-box; transform-origin: 50% 50%; transition: transform .5s var(--spring); }
.chr:hover .lens, .chr[aria-selected="true"] .lens { transform: scale(1.18); }
.chr .meter-n { transform-box: view-box; transform-origin: 60px 98px; animation: jitter 2.6s ease-in-out infinite; }
.chr:hover .meter-n, .chr[aria-selected="true"] .meter-n { animation: panic .32s ease-in-out infinite alternate; }
@keyframes jitter { 0%, 100% { transform: rotate(-40deg); } 40% { transform: rotate(-20deg); } 60% { transform: rotate(-48deg); } }
@keyframes panic { from { transform: rotate(-10deg); } to { transform: rotate(62deg); } }
.chr .nose { transform-box: fill-box; transform-origin: 0% 50%; animation: sniff 3s ease-in-out infinite; }
.chr:hover .nose, .chr[aria-selected="true"] .nose { animation-duration: .5s; }
@keyframes sniff { 0%, 70%, 100% { transform: scaleX(1); } 76% { transform: scaleX(1.18); } 82% { transform: scaleX(.96); } 88% { transform: scaleX(1.14); } }
.chr .wave { stroke-dasharray: 10 8; animation: flow 1.6s linear infinite; }
.chr:hover .wave, .chr[aria-selected="true"] .wave { animation-duration: .6s; }
@keyframes flow { to { stroke-dashoffset: -36; } }
.chr .bob { animation: bob 4s ease-in-out infinite; animation-delay: var(--d, 0s); }
@keyframes bob { 50% { transform: translateY(-4px); } }

.cast-panel { min-height: 380px; }
.cast-panel .h-3 { font-size: clamp(32px, 3.4vw, 50px); }
.cast-tool { font: 500 16px var(--f-code); color: var(--needle); margin: 10px 0 0; }
.cast-line { margin: 14px 0 0; color: var(--ink-2); font-size: 21px; max-width: 46ch; }
.cast-ask { margin: 20px 0 0; padding: 14px 18px; border-left: 3px solid var(--brass); background: color-mix(in srgb, var(--paper-3) 70%, transparent); border-radius: 0 12px 12px 0; font: italic 500 22px/1.45 var(--f-display); }
.cast-panel .code { margin-top: 20px; min-height: 196px; }
.cast-swap { animation: swapIn .55s var(--ease-out); }
@keyframes swapIn { from { opacity: 0; transform: translateY(10px); } }
@media (max-width: 980px) { .cast { grid-template-columns: 1fr; } }
@media (max-width: 560px) { .stage { grid-template-columns: repeat(2, 1fr); row-gap: 50px; } .stage::after { display: none; } }

/* --- feature compass --- */
.feat { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(32px, 5vw, 88px); align-items: center; margin-top: 64px; }
.fc-wrap { position: relative; width: min(100%, 680px); aspect-ratio: 1; margin: 0 auto; perspective: 1400px; }
.fc { position: absolute; inset: 0; transform-style: preserve-3d; transition: transform .25s linear; }
.fc .rose .r-let { font-size: 58px; }
.fc-mark {
  position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px;
  border-radius: 50%; border: 1.5px solid var(--ink); background: var(--paper-3);
  display: grid; place-items: center; font: 600 13px var(--f-code); color: var(--ink);
  transition: background .3s, color .3s, transform .45s var(--spring), border-color .3s;
  transform: translate(var(--x), var(--y));
}
.fc-mark:hover { transform: translate(var(--x), var(--y)) scale(1.12); }
.fc-mark.is-on { background: var(--needle); border-color: var(--needle); color: #fff; transform: translate(var(--x), var(--y)) scale(1.18); }
.feat-panel { min-height: 320px; }
.feat-name { font: 500 clamp(32px, 3.6vw, 52px)/1.02 var(--f-display); letter-spacing: -.015em; margin: 12px 0 0; }
.feat-line { font-size: 19px; color: var(--ink-2); margin: 18px 0 0; max-width: 40ch; }
.feat-extra { margin-top: 22px; }
.feat-live { display: inline-flex; align-items: center; gap: 18px; padding: 18px 24px; border-radius: 16px; background: var(--ink); color: var(--paper-3); border-left: 5px solid var(--needle); }
.feat-live strong { font: 500 46px/1 var(--f-display); font-variant-numeric: tabular-nums; }
.feat-live span { font-size: 16px; color: #B8C7CF; max-width: 30ch; line-height: 1.35; }
.feat-link { font-weight: 600; text-underline-offset: 5px; text-decoration-thickness: 1.5px; text-decoration-color: var(--needle); }
.feat-list { list-style: none; padding: 0; margin: 34px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.feat-list button {
  border: 1px solid var(--rule); background: color-mix(in srgb, var(--paper-3) 70%, transparent); border-radius: 999px;
  padding: 8px 14px; font: 600 13.5px var(--f-body); transition: background .25s, color .25s, border-color .25s;
}
.feat-list button[aria-pressed="true"] { background: var(--ink); color: var(--paper-3); border-color: var(--ink); }
.feat-swap { animation: swapIn .5s var(--ease-out); }
@media (max-width: 900px) { .feat { grid-template-columns: 1fr; } .fc-wrap { width: min(100%, 420px); } }

/* --- console --- */
.console { margin-top: 56px; display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 24px; }
.con-in { display: flex; gap: 10px; flex-wrap: wrap; }
.field-in {
  flex: 1 1 320px; min-width: 0; height: 64px; padding: 0 20px; border-radius: 14px; border: 1.5px solid var(--ink);
  background: var(--paper-3); font: 500 17px var(--f-code); outline: none; transition: box-shadow .25s;
}
.field-in:focus { box-shadow: 0 0 0 4px rgba(204, 58, 43, .18); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; align-items: center; font-size: 16px; color: var(--ink-2); }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--rule); background: var(--paper-3); border-radius: 999px; padding: 6px 14px 6px 6px; font: 600 15px var(--f-body); transition: border-color .2s, transform .3s var(--spring); }
.chip img { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; }
.chip:hover { border-color: var(--ink); transform: translateY(-2px); }
.con-out { margin-top: 18px; }
.con-out .code { height: 520px; }
.con-side { display: grid; gap: 16px; align-content: start; }
.dial { position: relative; aspect-ratio: 1; max-width: 380px; width: 100%; margin: 0 auto; }
.dial .mini .m-ring { stroke-width: .8; }
.dial-cap { text-align: center; margin: 4px 0 0; font: 600 19px var(--f-body); }
.dial-cap span { display: block; font: 400 16px var(--f-body); color: var(--ink-2); }
.stat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.stat { padding: 18px 20px; border-radius: 16px; border: 1px solid var(--rule); border-top: 3px solid var(--needle); background: color-mix(in srgb, var(--paper-3) 70%, transparent); }
.stat b { display: block; font: 500 36px/1.1 var(--f-display); font-variant-numeric: tabular-nums; }
.stat span { font-size: 15px; color: var(--ink-2); }
@media (max-width: 900px) { .console { grid-template-columns: 1fr; } .con-out .code { height: 360px; } }

/* --- never touches --- */
.never { list-style: none; padding: 0; margin: 56px 0 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 56px; }
.never li { position: relative; padding: 20px 0; border-bottom: 1px solid var(--rule); font: 500 clamp(32px, 3.8vw, 60px)/1.1 var(--f-display); }
.never li span { position: relative; }
.never li span::after {
  content: ''; position: absolute; left: -4px; right: -4px; top: 54%; height: 3px; background: var(--needle);
  transform: scaleX(0); transform-origin: 0 50%; transition: transform .8s var(--ease-out); transition-delay: var(--d, 0s);
}
.never.in li span::after { transform: scaleX(1); }
.never li small { display: block; margin-top: 8px; font: 400 18px var(--f-body); color: var(--ink-2); }
@media (max-width: 1100px) { .never { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 700px) { .never { grid-template-columns: 1fr; } }

/* --- explore: a bearing table --- */
.bearings { margin-top: 56px; border-top: 1.5px solid var(--ink); }
.brg {
  position: relative; display: grid; grid-template-columns: 110px 72px 1fr auto; align-items: center; gap: 28px;
  padding: 32px 22px; border-bottom: 1px solid var(--rule); text-decoration: none; isolation: isolate; overflow: hidden;
  transition: color .4s var(--ease);
}
.brg::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--ink); transform: scaleY(0); transform-origin: 50% 100%; transition: transform .5s var(--ease-out); }
.brg:hover, .brg:focus-visible { color: var(--paper-3); }
.brg:hover::before, .brg:focus-visible::before { transform: scaleY(1); }
.brg:hover, .brg:focus-visible { box-shadow: inset 6px 0 0 var(--needle); }
.brg-deg { font: 500 18px var(--f-code); color: var(--needle); }
.brg-rose { width: 64px; height: 64px; }
.brg-rose .m-needle { transition: transform .9s var(--spring); }
.brg-name { font: 500 clamp(36px, 4.8vw, 76px)/1 var(--f-display); }
.brg-desc { font-size: 19px; color: var(--ink-2); max-width: 34ch; text-align: right; transition: color .4s; }
.brg:hover .brg-desc { color: #B8C7CF; }
.brg:hover .m-ring { fill: transparent; stroke: var(--paper-3); }
@media (max-width: 760px) {
  .brg { grid-template-columns: 54px 1fr; gap: 6px 16px; padding: 22px 6px; }
  .brg-deg { grid-column: 2; grid-row: 1; }
  .brg-rose { grid-row: 1 / span 3; }
  .brg-name { grid-column: 2; }
  .brg-desc { grid-column: 2; text-align: left; }
}

/* --- closing --- */
.close { text-align: center; padding-bottom: clamp(120px, 14vw, 200px); }
.close-title { font: 500 clamp(80px, 17vw, 300px)/.86 var(--f-display); letter-spacing: -.04em; margin: 0; }
.close-title em { font-weight: 400; }
.close .hero-act { justify-content: center; opacity: 1; transform: none; }

/* =========================================================
   BOARD
   ========================================================= */
.page-head { padding: 150px 0 36px; }
.page-head .lede { margin-top: 18px; }
.toolbar { position: sticky; top: 82px; z-index: 10; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; padding: 12px 0; margin-bottom: 24px; }
.seg { display: inline-flex; padding: 4px; border-radius: 999px; border: 1.5px solid var(--ink); background: color-mix(in srgb, var(--paper-3) 86%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.seg button { border: 0; background: none; border-radius: 999px; padding: 11px 18px; font: 600 16px var(--f-body); transition: background .25s, color .25s; }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--paper-3); }
.tb-search { flex: 1 1 200px; min-width: 0; height: 48px; padding: 0 18px; border-radius: 999px; border: 1.5px solid var(--ink); background: color-mix(in srgb, var(--paper-3) 86%, transparent); outline: none; }
.tb-search:focus { box-shadow: 0 0 0 4px rgba(204, 58, 43, .18); }
.tb-sel { height: 48px; padding: 0 16px; border-radius: 999px; border: 1.5px solid var(--ink); background: var(--paper-3); font-weight: 600; }
.tb-meta { display: flex; align-items: center; gap: 10px; font-size: 15px; color: var(--ink-2); margin-left: auto; }
.tick-ring { width: 22px; height: 22px; transform: rotate(-90deg); }
.tick-ring circle { fill: none; stroke-width: 3; }
.tick-ring .bg { stroke: var(--rule); }
.tick-ring .fg { stroke: var(--needle); stroke-dasharray: 62.8; stroke-dashoffset: var(--off, 62.8); transition: stroke-dashoffset 1s linear; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; padding-bottom: 60px; }
.plate {
  position: relative; display: grid; gap: 14px; padding: 18px; border-radius: 18px;
  background: color-mix(in srgb, var(--paper-3) 88%, transparent); border: 1px solid var(--rule);
  text-decoration: none; transform-style: preserve-3d;
  transition: transform .45s var(--ease-out), border-color .3s, box-shadow .45s;
  animation: plateIn .7s var(--ease-out) both; animation-delay: calc(var(--i, 0) * 30ms);
}
@keyframes plateIn { from { opacity: 0; transform: translateY(18px) rotateX(10deg); } }
.plate:hover { border-color: var(--ink); box-shadow: 0 26px 40px -30px rgba(19, 35, 58, .6); }
.plate-top { display: grid; grid-template-columns: 48px 1fr 46px; gap: 12px; align-items: center; }
.plate-icon { width: 48px; height: 48px; border-radius: 12px; object-fit: cover; background: var(--paper-2); border: 1px solid var(--rule-soft); }
.plate-name { display: block; font: 600 19px/1.2 var(--f-body); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-decoration: none; }
.plate-link::after { content: ''; position: absolute; inset: 0; border-radius: 18px; z-index: 1; }
.plate-act { position: relative; z-index: 2; }
.plate-sym { font: 500 14.5px var(--f-code); color: var(--ink-2); }
.plate-needle { width: 46px; height: 46px; }
.plate-needle .m-needle { transition: transform 1.2s var(--spring); }
.plate .spark { width: 100%; height: 54px; }
.spark.is-up { color: var(--up); }
.spark.is-down { color: var(--down); }
.plate-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.plate-stats div { font-size: 13.5px; color: var(--ink-2); }
.plate-stats b { display: block; font: 600 17px var(--f-body); color: var(--ink); font-variant-numeric: tabular-nums; }
.plate-chg { font: 600 14px var(--f-code); }
.is-pos { color: var(--up); }
.is-neg { color: var(--down); }
.flowbar { height: 6px; border-radius: 6px; background: var(--down); overflow: hidden; }
.flowbar i { display: block; height: 100%; background: var(--up); border-right: 2px solid var(--paper-3); transition: width .8s var(--ease-out); }
.flow-cap { display: flex; justify-content: space-between; font-size: 13.5px; color: var(--ink-2); margin-top: 6px; }
.plate-act { display: flex; gap: 8px; }
.plate-act button { flex: 1; height: 40px; border-radius: 10px; border: 1.5px solid var(--ink); background: transparent; font: 600 14px var(--f-body); transition: background .25s, color .25s, transform .3s var(--spring); }
.plate-act button:hover { transform: translateY(-2px); }
.plate-act .is-match { background: var(--ink); color: var(--paper-3); }
.plate-act [data-act="pass"]:hover { background: var(--needle); border-color: var(--needle); color: #fff; }
.plate.is-out { animation: plateOut .45s var(--ease) forwards; }
@keyframes plateOut { to { opacity: 0; transform: translateX(40px) rotate(4deg); } }
.empty { grid-column: 1 / -1; padding: 60px 20px; text-align: center; color: var(--ink-2); }
.empty .h-3 { color: var(--ink); margin-bottom: 8px; }
.skel { height: 280px; border-radius: 18px; background: linear-gradient(100deg, var(--paper-2) 30%, var(--paper-3) 50%, var(--paper-2) 70%) 0 0 / 300% 100%; animation: shimmer 1.4s linear infinite; border: 1px solid var(--rule-soft); }
@keyframes shimmer { to { background-position: -300% 0; } }

/* =========================================================
   COIN
   ========================================================= */
.coin-head { padding: 16px 0 24px; display: grid; grid-template-columns: auto 1fr auto; gap: 20px; align-items: center; }
.coin-icon { width: 84px; height: 84px; border-radius: 22px; object-fit: cover; border: 1px solid var(--rule); background: var(--paper-2); }
.coin-name { font: 500 clamp(36px, 5vw, 68px)/1 var(--f-display); margin: 0; letter-spacing: -.02em; }
.coin-sym { font: 500 15px var(--f-code); color: var(--ink-2); margin-top: 8px; display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.coin-links { display: flex; gap: 8px; flex-wrap: wrap; }
.back { display: inline-flex; gap: 8px; align-items: center; font-weight: 600; text-decoration: none; margin-top: 120px; }
.back + .coin-head { padding-top: 16px; }
.coin-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 20px; padding-bottom: 60px; }
.panel { border-radius: 20px; border: 1px solid var(--rule); background: color-mix(in srgb, var(--paper-3) 88%, transparent); padding: 22px; }
.price-row { display: flex; flex-wrap: wrap; align-items: baseline; gap: 14px; }
.price { font: 500 clamp(36px, 4vw, 54px)/1 var(--f-display); font-variant-numeric: tabular-nums; }
.tf { margin-left: auto; }
.tf button { padding: 7px 12px; font-size: 13px; }
.chart { position: relative; height: 340px; margin-top: 18px; }
.chart svg { width: 100%; height: 100%; overflow: visible; }
.chart .grid-l { stroke: var(--rule); stroke-width: 1; stroke-dasharray: 2 5; }
.chart .ax { font: 500 11px var(--f-code); fill: var(--ink-2); }
.chart .cross { stroke: var(--ink); stroke-width: 1; stroke-dasharray: 3 3; }
.chart .dot { stroke: var(--paper-3); stroke-width: 2.5; }
.chart-tip { position: absolute; top: 0; pointer-events: none; padding: 8px 12px; border-radius: 10px; background: var(--ink); color: var(--paper-3); font: 500 12.5px/1.45 var(--f-code); white-space: nowrap; opacity: 0; transition: opacity .15s; transform: translateX(-50%); }
.chart:hover .chart-tip { opacity: 1; }
.chart-note { font-size: 13px; color: var(--ink-2); margin-top: 10px; }
.chart-draw path.ln { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 1.4s var(--ease-out) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 16px; }
.flows { display: grid; gap: 14px; margin-top: 14px; }
.flows .row { display: grid; grid-template-columns: 44px 1fr; gap: 12px; align-items: center; font: 600 13px var(--f-code); }
.side-stack { display: grid; gap: 20px; align-content: start; }
.reading .code { max-height: 520px; margin-top: 14px; }
.coin-compass { display: grid; grid-template-columns: 110px 1fr; gap: 18px; align-items: center; }
@media (max-width: 960px) { .coin-grid { grid-template-columns: 1fr; } .coin-head { grid-template-columns: auto 1fr; } .coin-head .coin-act { grid-column: 1 / -1; } }

/* =========================================================
   LAUNCH
   ========================================================= */
.launch { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: clamp(28px, 4vw, 64px); padding-bottom: 80px; align-items: start; }
.form { display: grid; gap: 22px; }
.fld { display: grid; gap: 8px; }
.fld label { font: 600 17px var(--f-body); display: flex; justify-content: space-between; gap: 12px; }
.fld label small { font-weight: 400; color: var(--ink-2); }
.fld input, .fld textarea {
  width: 100%; border-radius: 14px; border: 1.5px solid var(--ink); background: var(--paper-3); padding: 14px 16px; outline: none;
  transition: box-shadow .25s, border-color .25s;
}
.fld textarea { min-height: 120px; resize: vertical; }
.fld input:focus, .fld textarea:focus { box-shadow: 0 0 0 4px rgba(204, 58, 43, .18); }
.fld.is-bad input, .fld.is-bad textarea { border-color: var(--needle); }
.fld .err { min-height: 1.2em; margin: 0; font-size: 15px; color: var(--needle); font-weight: 600; }
.fld .hint { margin: 0; font-size: 15px; color: var(--ink-2); }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.drop {
  display: grid; grid-template-columns: 80px 1fr; gap: 16px; align-items: center; padding: 14px; border-radius: 14px;
  border: 1.5px dashed var(--ink); background: color-mix(in srgb, var(--paper-3) 60%, transparent); transition: background .25s;
}
.drop.is-over { background: var(--paper-3); border-color: var(--needle); }
.drop-img { width: 80px; height: 80px; border-radius: 16px; background: var(--paper-2); object-fit: cover; border: 1px solid var(--rule); }
.preview { position: sticky; top: 110px; }
.preview .plate { animation: none; }
.preview-cap { font-size: 14px; color: var(--ink-2); margin: 0 0 12px; }
.confirm { display: none; text-align: left; }
.launch.is-done .form { display: none; }
.launch.is-done .confirm { display: block; animation: swapIn .7s var(--ease-out); }
.confirm-rose { width: 120px; height: 120px; margin-bottom: 18px; }
.confirm-rose .m-needle { animation: settle 2.2s var(--ease-out) both; }
@keyframes settle {
  0% { transform: rotate(calc(var(--a, 0deg) + 540deg)); }
  60% { transform: rotate(calc(var(--a, 0deg) - 14deg)); }
  78% { transform: rotate(calc(var(--a, 0deg) + 6deg)); }
  100% { transform: rotate(var(--a, 0deg)); }
}
.confirm dl { display: grid; grid-template-columns: 120px 1fr; gap: 10px 18px; margin: 22px 0; }
.confirm dt { color: var(--ink-2); font-size: 14px; }
.confirm dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
@media (max-width: 960px) { .launch { grid-template-columns: 1fr; } .preview { position: static; } }
@media (max-width: 560px) { .two { grid-template-columns: 1fr; } }

/* =========================================================
   AGENTS
   ========================================================= */
.steps { list-style: none; padding: 0; margin: 48px 0 0; display: grid; gap: 0; counter-reset: s; }
.step { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 24px; padding: 36px 0; border-top: 1px solid var(--rule); }
.step-n { font: 500 80px/1 var(--f-display); color: var(--needle); font-variant-numeric: tabular-nums; }
.step h3 { margin: 0 0 8px; font: 600 32px/1.15 var(--f-display); }
.step p { margin: 0 0 16px; color: var(--ink-2); max-width: 60ch; }
.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.tabs button { border: 1px solid var(--rule); background: var(--paper-3); border-radius: 999px; padding: 10px 16px; font: 600 16px var(--f-body); }
.tabs button[aria-selected="true"] { background: var(--ink); color: var(--paper-3); border-color: var(--ink); }
.asks { display: grid; gap: 10px; }
.asks button { text-align: left; border: 1px solid var(--rule); background: color-mix(in srgb, var(--paper-3) 80%, transparent); border-radius: 14px; padding: 16px 20px; font: italic 500 22px/1.4 var(--f-display); transition: border-color .25s, transform .3s var(--spring); }
.asks button:hover { border-color: var(--ink); transform: translateX(6px); }
.tool-table { width: 100%; border-collapse: collapse; margin-top: 36px; }
.tool-table th, .tool-table td { text-align: left; padding: 18px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
.tool-table th { font: 600 16px var(--f-body); color: var(--ink-2); }
.tool-table td code { font: 500 16px var(--f-code); color: var(--needle); }
.feat-rows { margin-top: 36px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 48px; }
.feat-row { padding: 24px 0; border-top: 1px solid var(--rule); }
.feat-row h3 { margin: 0; font: 600 30px/1.2 var(--f-display); }
.feat-row p { margin: 8px 0 0; color: var(--ink-2); }
.feat-row a { font-weight: 600; text-decoration-color: var(--needle); text-underline-offset: 4px; }
.lat-board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 30px; }
.faq { margin-top: 36px; border-top: 1.5px solid var(--ink); }
.faq details { border-bottom: 1px solid var(--rule); }
.faq summary { list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 22px 4px; font: 500 clamp(20px, 2vw, 26px)/1.2 var(--f-display); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary .mini { width: 30px; height: 30px; flex: none; }
.faq summary .m-needle { transition: transform .6s var(--spring); }
.faq details[open] summary .m-needle { transform: rotate(180deg); }
.faq details p { margin: 0 4px 24px; color: var(--ink-2); max-width: 64ch; }
@media (max-width: 760px) { .step { grid-template-columns: 1fr; gap: 6px; } .feat-rows { grid-template-columns: 1fr; } .lat-board { grid-template-columns: 1fr; } .tool-table .hide-s { display: none; } }

/* =========================================================
   NORTH (breathe)
   ========================================================= */
body[data-page="north"] { overflow: hidden; }
body[data-page="north"] .field-line { display: none; }
.north { position: relative; z-index: 2; height: 100svh; display: grid; grid-template-rows: 1fr auto; padding: 110px var(--gutter) 110px; text-align: center; }
.north-top { align-self: start; }
.north-top p { margin: 10px auto 0; color: var(--ink-2); max-width: 42ch; }
.north-phase { position: absolute; left: 50%; top: 50%; transform: translate(-50%, calc(min(38vmin, 330px) + 28px)); font: italic 500 clamp(28px, 3.4vw, 44px)/1 var(--f-display); white-space: nowrap; transition: opacity .5s; }
.north-ctrl { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; align-items: center; }
.north-stats { display: flex; gap: 22px; justify-content: center; margin-bottom: 14px; font-size: 16px; color: var(--ink-2); }
.north-stats b { font: 500 22px var(--f-display); color: var(--ink); font-variant-numeric: tabular-nums; margin-right: 6px; }
.breath-ring { position: fixed; left: 50%; top: 52%; width: min(76vmin, 660px); aspect-ratio: 1; border-radius: 50%; transform: translate(-50%, -50%) scale(var(--s, .86)); border: 2px solid var(--brass); opacity: .6; pointer-events: none; z-index: 1; transition: transform var(--dur, 4s) cubic-bezier(.45, 0, .55, 1), border-color .6s; }
.breath-ring.is-steady { border-color: var(--up); }
@media (max-width: 600px) { .north-phase { transform: translate(-50%, calc(40vmin + 18px)); } }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .hero-title .ln > span, .hero-act, .hero-ca, .hero-corner { transform: none; opacity: 1; }
}

/* ---------- red accents ---------- */
.dot { color: var(--needle); }
.progress { position: fixed; left: 0; top: 0; z-index: 70; width: 100%; height: 3px; background: var(--needle); transform-origin: 0 50%; transform: scaleX(0); pointer-events: none; }

/* ---------- feature list (accordion beside the compass) ---------- */
.flist { list-style: none; margin: 0; padding: 0; border-top: 2px solid var(--ink); align-self: center; }
.fi { position: relative; border-bottom: 1px solid var(--rule); }
.fi::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 5px; background: var(--needle); transform: scaleY(0); transform-origin: 50% 0; transition: transform .5s var(--ease-out); }
.fi.is-on::before { transform: scaleY(1); }
.fi-head { display: grid; grid-template-columns: 116px 1fr; align-items: baseline; gap: 18px; width: 100%; text-align: left; border: 0; background: none; padding: 22px 12px 22px 26px; }
.fi-deg { font: 500 16px var(--f-code); color: var(--ink-2); transition: color .3s; }
.fi-name { font: 500 clamp(26px, 2.6vw, 42px)/1.08 var(--f-display); letter-spacing: -.01em; color: var(--ink-2); transition: color .3s; }
.fi-head:hover .fi-name, .fi.is-on .fi-name { color: var(--ink); }
.fi.is-on .fi-deg, .fi-head:hover .fi-deg { color: var(--needle); }
.fi-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .6s var(--ease-out); }
.fi.is-on .fi-body { grid-template-rows: 1fr; }
.fi-inner { overflow: hidden; padding: 0 12px 0 160px; }
.fi-line { margin: 0 0 20px; font-size: clamp(19px, 1.5vw, 24px); color: var(--ink-2); max-width: 56ch; }
.fi .feat-live { margin-bottom: 18px; }
.fi .feat-link { display: inline-block; margin: 0 0 24px; font-size: 18px; }
.fi.is-on .fi-inner > :last-child { margin-bottom: 28px; }
@media (max-width: 760px) { .fi-head { grid-template-columns: 1fr; gap: 4px; padding-left: 20px; } .fi-inner { padding-left: 20px; } }

/* ---------- header menu button ---------- */
.menu-btn { gap: 8px; }
@media (max-width: 640px) { .menu-label, .wallet-btn .wallet-label { display: none; } .menu-btn, .wallet-btn { padding: 0 14px; } .logo-word { font-size: 28px; } }

/* ---------- compass menu ---------- */
body.menu-open { overflow: hidden; }
.cmenu {
  position: fixed; inset: 0; z-index: 150; display: grid; place-items: center;
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  opacity: 0; transition: opacity .4s var(--ease);
}
.cmenu.is-open { opacity: 1; }
.cmenu[hidden] { display: none; }
[hidden] { display: none !important; }
.cmenu-stage { position: relative; width: min(54vmin, 520px); aspect-ratio: 1; perspective: 1200px; }
.cmenu-rose { position: absolute; inset: 0; transform: rotateX(60deg) scale(.7); opacity: 0; transition: transform .9s var(--ease-out), opacity .5s; }
.cmenu.is-open .cmenu-rose { transform: none; opacity: 1; }
.cmenu-item {
  position: absolute; left: 50%; top: 50%; width: 220px; display: grid; gap: 4px; text-align: center;
  padding: 12px 14px; border-radius: 14px; text-decoration: none;
  transform: translate(calc(-50% + var(--x, 0px)), calc(-50% + var(--y, 0px))) scale(.85); opacity: 0;
  transition: transform .7s var(--spring), opacity .4s, background .25s, color .25s;
  transition-delay: calc(var(--i) * 45ms + 120ms), calc(var(--i) * 45ms + 120ms), 0s, 0s;
}
.cmenu.is-open .cmenu-item { transform: translate(calc(-50% + var(--x, 0px)), calc(-50% + var(--y, 0px))); opacity: 1; }
.ci-deg { font: 500 14px var(--f-code); color: var(--needle); }
.ci-name { font: 500 clamp(28px, 2.6vw, 40px)/1 var(--f-display); }
.ci-desc { font-size: 14.5px; color: var(--ink-2); line-height: 1.35; }
.cmenu-item:hover, .cmenu-item:focus-visible { background: var(--ink); color: var(--paper-3); }
.cmenu-item:hover .ci-desc, .cmenu-item:focus-visible .ci-desc { color: #B8C7CF; }
.cmenu-item.is-current .ci-name { color: var(--needle); }
.cmenu-item.is-current:hover .ci-name { color: var(--paper-3); }
.cmenu-close { position: absolute; top: 22px; right: var(--gutter); }
.cmenu-hint { position: absolute; bottom: 24px; left: 0; right: 0; text-align: center; margin: 0; font-size: 15px; color: var(--ink-2); }
@media (max-width: 760px), (max-height: 640px) {
  .cmenu { place-items: start center; overflow-y: auto; padding: 90px 16px 60px; }
  .cmenu-stage { width: 100%; aspect-ratio: auto; display: grid; gap: 6px; }
  .cmenu-rose { display: none; }
  .cmenu-item { position: static; width: auto; text-align: left; transform: translateY(10px); }
  .cmenu.is-open .cmenu-item { transform: none; }
  .cmenu-hint { display: none; }
}

/* ---------- agent passport (shared) ---------- */
.passport {
  position: relative; padding: 30px; border-radius: 24px; background: var(--ink); color: var(--paper-3);
  border-top: 5px solid var(--needle); box-shadow: 0 40px 60px -40px rgba(19,35,58,.7);
}
.pp-top { display: grid; grid-template-columns: 96px 1fr; gap: 20px; align-items: center; }
.pp-rose { width: 96px; height: 96px; }
.pp-rose .m-ring { fill: rgba(255,255,255,.04); stroke: var(--paper-3); }
.pp-rose .m-ticks { stroke: var(--paper-3); }
.pp-rose .n-south { fill: var(--paper-3); }
.pp-name { margin: 0; font: 500 clamp(32px, 3vw, 46px)/1.05 var(--f-display); overflow-wrap: anywhere; }
.pp-role { margin: 6px 0 0; font: 600 16px var(--f-body); color: var(--brass-2); }
.pp-mission { margin: 22px 0 0; font-size: 18px; line-height: 1.55; color: #C9D6DC; }
.pp-tools { list-style: none; padding: 0; margin: 22px 0 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pp-tools li { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px 8px 8px; border-radius: 999px; background: rgba(255,255,255,.08); font: 600 15px var(--f-body); }
.pp-sym { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--needle); flex: none; }
.pp-sym svg { width: 17px; height: 17px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pp-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 26px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.14); font-size: 15px; color: #B8C7CF; }
.pp-foot .bearing { color: #F29C8F; }
.pp-lock { display: inline-flex; align-items: center; gap: 8px; }
.pp-lock svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; }

/* ---------- home: make your own agent ---------- */
.make { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: clamp(32px, 5vw, 88px); align-items: center; }
.mk-name { width: 100%; margin-top: 34px; }
.mk-missions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 28px; }
.mk-missions button, .rule-row .seg button { white-space: nowrap; }
.mk-missions button { border: 1.5px solid var(--ink); background: color-mix(in srgb, var(--paper-3) 80%, transparent); border-radius: 999px; padding: 11px 18px; font: 600 16px var(--f-body); transition: background .25s, color .25s; }
.mk-missions button[aria-checked="true"] { background: var(--ink); color: var(--paper-3); box-shadow: inset 0 -3px 0 var(--needle); }
@media (max-width: 960px) { .make { grid-template-columns: 1fr; } }

/* ---------- /build ---------- */
.build { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, .85fr); gap: clamp(28px, 4vw, 72px); align-items: start; padding-bottom: 80px; }
.bside { position: sticky; top: 100px; }
.bcode { max-height: 380px; margin-top: 4px; white-space: pre-wrap; }
.bactions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.b-text { width: 100%; height: auto; min-height: 120px; padding: 16px 20px; margin-top: 14px; font-family: var(--f-body); resize: vertical; line-height: 1.5; }
.mcards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.mcard { text-align: left; display: grid; gap: 6px; padding: 18px; border-radius: 16px; border: 1.5px solid var(--rule); background: color-mix(in srgb, var(--paper-3) 80%, transparent); transition: border-color .25s, background .25s, color .25s; }
.mcard b { font: 500 22px/1.15 var(--f-display); }
.mcard span { font-size: 15px; color: var(--ink-2); line-height: 1.45; }
.mcard:hover { border-color: var(--ink); }
.mcard[aria-checked="true"] { background: var(--ink); color: var(--paper-3); border-color: var(--ink); box-shadow: inset 4px 0 0 var(--needle); }
.mcard[aria-checked="true"] span { color: #B8C7CF; }
.tcards { display: grid; gap: 10px; }
.tcard { display: grid; grid-template-columns: 64px 1fr; gap: 16px; align-items: center; padding: 14px 18px 14px 14px; border-radius: 16px; border: 1.5px solid var(--rule); background: color-mix(in srgb, var(--paper-3) 80%, transparent); transition: border-color .25s, background .25s; }
.tcard input { position: absolute; opacity: 0; pointer-events: none; }
.tcard .sym { max-width: 64px; }
.tcard b { display: block; font: 500 22px/1.2 var(--f-display); }
.tcard small { display: block; font-size: 15px; color: var(--ink-2); margin-top: 2px; }
.tcard code { font: 500 13.5px var(--f-code); color: var(--needle); }
.tcard:hover { border-color: var(--ink); }
.tcard:has(input:checked) { border-color: var(--ink); box-shadow: inset 4px 0 0 var(--needle); background: var(--paper-3); }
.tcard:has(input:checked) .sym { background: var(--ink); color: var(--paper-3); }
.tcard:has(input:focus-visible) { outline: 2px solid var(--needle); outline-offset: 3px; }
.rule-row { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 18px; padding: 14px 0; border-bottom: 1px solid var(--rule-soft); }
.rule-row > span:first-child { min-width: 140px; font-weight: 600; }
.rule-lock { color: var(--ink-2); }
.rule-lock .pp-sym { min-width: 0; }
.seg--wrap { flex-wrap: wrap; border-radius: 22px; }
@media (max-width: 1000px) { .build { grid-template-columns: 1fr; } .bside { position: static; } }
@media (max-width: 600px) { .mcards { grid-template-columns: 1fr; } }

/* ---------- /radar ---------- */
.radar-wrap { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: clamp(28px, 4vw, 72px); align-items: start; padding-bottom: 90px; }
.radar { position: relative; width: min(100%, 760px); aspect-ratio: 1; margin: 0 auto; border-radius: 50%; background: radial-gradient(circle, color-mix(in srgb, var(--paper-3) 70%, transparent), transparent 72%); }
.radar-grid { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.radar-grid circle, .radar-grid path { fill: none; stroke: var(--ink); stroke-width: .35; }
.radar-grid circle:first-child { stroke-width: .8; }
.radar-grid text { font: 600 6px var(--f-display); fill: var(--ink); }
.radar-grid .rg-n { fill: var(--needle); }
.radar-sweep { position: absolute; inset: 1%; border-radius: 50%; background: conic-gradient(from -70deg, transparent 0deg, rgba(204, 58, 43, .26) 70deg, transparent 70.2deg); will-change: transform; }
.radar-sweep::after { content: ''; position: absolute; left: 50%; top: 0; width: 2px; height: 50%; margin-left: -1px; background: var(--needle); border-radius: 2px; }
.radar-blips { position: absolute; inset: 0; }
.blip { position: absolute; transform: translate(-50%, -50%); text-decoration: none; display: grid; place-items: center; }
.blip i { display: block; width: var(--s); height: var(--s); border-radius: 50%; background: var(--up); border: 2px solid var(--paper-3); box-shadow: 0 4px 10px -4px rgba(19,35,58,.5); transition: transform .3s var(--spring); }
.blip.is-down i { background: var(--down); }
.blip span { position: absolute; top: calc(100% + 2px); font: 600 12.5px var(--f-code); white-space: nowrap; color: var(--ink); opacity: 0; transition: opacity .3s; }
.blip:hover, .blip:focus-visible { opacity: 1 !important; z-index: 2; }
.blip:hover i, .blip:focus-visible i { transform: scale(1.5); }
.blip:hover span, .blip:focus-visible span, .blip.ping span { opacity: 1; }
.blip.ping::before { content: ''; position: absolute; left: 50%; top: 50%; width: var(--s); height: var(--s); margin: calc(var(--s) / -2) 0 0 calc(var(--s) / -2); border-radius: 50%; border: 2px solid var(--needle); animation: ping2 1.4s var(--ease-out) forwards; }
@keyframes ping2 { from { transform: scale(1); opacity: 1; } to { transform: scale(3.4); opacity: 0; } }
.radar-side { display: grid; gap: 0; align-content: start; }
.contact { margin-top: 18px; min-height: 230px; }
.ct-top { display: grid; grid-template-columns: 56px 1fr; gap: 14px; align-items: center; }
.ct-top img, .ct-top > span { width: 56px; height: 56px; border-radius: 14px; object-fit: cover; background: var(--paper-2); }
.legend { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 10px; font-size: 15.5px; color: var(--ink-2); }
.legend li { display: flex; align-items: center; gap: 10px; }
.legend i { flex: none; display: inline-block; border-radius: 50%; }
.lg-ring { width: 18px; height: 18px; border: 1.5px solid var(--ink); }
.lg-size { width: 18px; height: 18px; background: var(--ink); }
.lg-up { width: 12px; height: 12px; background: var(--up); }
.lg-down { width: 12px; height: 12px; background: var(--down); margin-left: -6px; }
@media (max-width: 1000px) { .radar-wrap { grid-template-columns: 1fr; } }

/* ---------- small background compasses ---------- */
.minis { position: absolute; inset: 0; }
.mini-c { position: absolute; left: 0; top: 0; will-change: transform; opacity: var(--mo, .6); }
.mini-c .rose .r-let { font-size: 80px; }
.mini-c .rose .r-tick { stroke-width: 2; }
.mini-c .rose .r-ring { stroke-width: 2.4; }
.mini-c .rose-needle { filter: none; }

/* ---------- frosted glass panels ---------- */
.glass {
  position: relative;
  background: color-mix(in srgb, var(--paper-3) 50%, transparent);
  -webkit-backdrop-filter: blur(22px) saturate(1.35); backdrop-filter: blur(22px) saturate(1.35);
  border: 1px solid rgba(255, 255, 255, .7);
  border-radius: 32px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85), 0 40px 70px -50px rgba(19, 35, 58, .55);
}
.glass::after { /* north-red tick, top left of every panel */
  content: ''; position: absolute; left: clamp(24px, 3.4vw, 56px); top: -1px; width: 44px; height: 3px; border-radius: 0 0 3px 3px; background: var(--needle);
}
.sec > .wrap.glass {
  width: auto; max-width: var(--maxw);
  margin-inline: max(12px, calc((100% - var(--maxw)) / 2));
  padding: clamp(32px, 4.4vw, 76px);
}
.sec:has(> .wrap.glass) { padding-block: clamp(14px, 2vw, 28px); }
main.wrap > .sec.glass, .steps.glass, .build.glass, .radar-wrap.glass, .launch.glass { padding: clamp(28px, 4vw, 64px); margin-block: clamp(16px, 2vw, 28px); }
.page-head.glass { margin-top: 124px; padding: clamp(28px, 4vw, 64px); }
.steps.glass { margin-top: 24px; }
.steps.glass .step:first-child { border-top: 0; padding-top: 0; }
.foot.glass { margin: 28px max(12px, calc((100% - var(--maxw)) / 2)) 120px; max-width: var(--maxw); padding: clamp(32px, 4vw, 64px); border-top: 1px solid rgba(255,255,255,.7); }
.plate, .panel, .stat, .route { background: color-mix(in srgb, var(--paper-3) 72%, transparent); }
.close .close-title { text-shadow: 0 2px 30px var(--paper); }
@media (max-width: 760px) { .glass { border-radius: 22px; } .page-head.glass { margin-top: 104px; } }

/* ---------- intro tagline ---------- */
.intro-tag {
  position: absolute; left: 0; right: 0; margin: 0; text-align: center;
  top: calc(50% - 10vh + var(--r) + 14px + clamp(50px, 6vw, 80px));
  font: 500 clamp(20px, 2.2vw, 30px)/1.2 var(--f-display); color: var(--ink);
  opacity: 0; transform: translateY(10px);
  transition: opacity .8s var(--ease-out) .45s, transform .8s var(--ease-out) .45s;
}
.intro-tag span { color: var(--needle); }
.intro.is-word .intro-tag { opacity: 1; transform: none; }

/* ---------- music button (bottom left) ---------- */
.sound {
  position: fixed; left: max(16px, var(--gutter)); bottom: max(22px, env(safe-area-inset-bottom)); z-index: 210;
  display: inline-flex; align-items: center; gap: 12px; height: 58px; padding: 0 24px 0 20px;
  border-radius: 999px; border: 1.5px solid var(--ink); background: var(--ink); color: var(--paper-3);
  font: 600 16px var(--f-body); box-shadow: 0 18px 36px -20px rgba(19, 35, 58, .7);
  transition: background .25s, color .25s, border-color .25s, transform .35s var(--spring);
}
.sound:hover { background: var(--needle); border-color: var(--needle); color: #fff; transform: translateY(-2px); }
.snd-bars { position: relative; display: flex; align-items: flex-end; gap: 3px; height: 20px; }
.snd-bars i { width: 3.5px; height: 30%; border-radius: 2px; background: var(--needle); }
.sound:hover .snd-bars i { background: #fff; }
.sound.is-playing .snd-bars i { animation: eq 1s ease-in-out infinite; }
.sound.is-playing .snd-bars i:nth-child(2) { animation-delay: -.3s; }
.sound.is-playing .snd-bars i:nth-child(3) { animation-delay: -.6s; }
.sound.is-playing .snd-bars i:nth-child(4) { animation-delay: -.15s; }
@keyframes eq { 0%, 100% { height: 25%; } 50% { height: 100%; } }
.sound.is-muted { background: var(--paper-3); color: var(--ink); }
.sound.is-muted .snd-bars i { background: var(--ink-2); }
.sound.is-muted .snd-bars::after { content: ''; position: absolute; left: -3px; right: -3px; top: 50%; height: 2.5px; background: var(--needle); transform: rotate(-35deg); border-radius: 2px; }
@media (max-width: 1320px) { .sound { bottom: 112px; } }
@media (max-width: 640px) { .sound { height: 48px; padding: 0 16px; font-size: 15px; } }

.cast-panel { min-width: 0; }
.cast-panel .code { white-space: pre-wrap; overflow-wrap: anywhere; }

/* tool symbols: keep the row inside its column so it never covers the code */
.cast { gap: clamp(40px, 6vw, 110px); }
.stage { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; padding: 40px 0 0; }
.stage .sym { max-width: 128px; }
.stage .chr-name { white-space: normal; text-align: center; line-height: 1.25; font-size: 15px; }
.chr[aria-selected="true"] { transform: translateY(-12px) scale(1.03); }
.chr[aria-selected="true"]:hover { transform: translateY(-14px) scale(1.04); }
