/* pritop — site styles. Plain CSS, no build step. */

/* Headline font: drop your font files into /public/fonts/display/ and keep these names,
   or change the url() paths below. Unbounded loads from Google Fonts as the fallback. */
@font-face {
  font-family: 'PritopDisplay';
  src: url('/fonts/display/display.woff2') format('woff2'), url('/fonts/display/display.woff') format('woff'), url('/fonts/display/display.ttf') format('truetype');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

:root {
  --bg: #E7E9EE;
  --bg-2: #DCDFE6;
  --ink: #10131C;
  --ink-2: #4A5163;
  --ink-3: #7A8194;
  --line: rgba(16, 19, 28, 0.12);
  --line-2: rgba(16, 19, 28, 0.22);
  --glass: rgba(246, 247, 250, 0.56);
  --glass-2: rgba(250, 251, 253, 0.8);
  --accent: #4B3BFF;
  --accent-2: #3A2BE0;
  --accent-soft: rgba(75, 59, 255, 0.12);
  --stat: #121522;
  --stat-ink: #F1F2F6;
  --up: #0B9A68;
  --down: #DE3E48;
  --display: 'PritopDisplay', 'Unbounded', 'Hanken Grotesk', system-ui, sans-serif;
  --body: 'Hanken Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --r: 6px;
  --r-sm: 4px;
  --max: 1480px;
  --gut: clamp(20px, 4vw, 48px);
  --ease: cubic-bezier(.2, .7, .1, 1);
  --ease-io: cubic-bezier(.7, 0, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  font: 400 18px/1.6 var(--body);
  color: var(--ink);
  background-color: var(--bg);
  background-image:
    radial-gradient(1200px 700px at 78% -10%, rgba(152, 196, 255, 0.35), transparent 60%),
    radial-gradient(900px 700px at -10% 100%, rgba(227, 176, 255, 0.28), transparent 60%),
    radial-gradient(circle at 1px 1px, rgba(16, 19, 28, 0.09) 1px, transparent 0);
  background-size: auto, auto, 28px 28px;
  background-attachment: fixed;
  padding-bottom: 150px;
  overflow-x: hidden;
}
img, svg, canvas { display: block; max-width: 100%; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--accent); color: #fff; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
sub { font-size: 0.7em; vertical-align: -0.2em; }
kbd {
  font: 600 13px/1 var(--body); padding: 4px 7px; border-radius: 4px;
  border: 1px solid var(--line-2); background: rgba(255,255,255,.6); color: var(--ink-2);
}

h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; letter-spacing: -0.02em; margin: 0; font-style: normal; }
h2 { font-size: clamp(40px, 5vw, 76px); line-height: 1.02; }
h3 { font-size: clamp(24px, 2.2vw, 32px); line-height: 1.15; }
p { margin: 0; }
.dot { color: var(--accent); }
.lede { font-size: 20px; color: var(--ink-2); max-width: 60ch; }
.muted { color: var(--ink-3); }
.up { color: var(--up); }
.down { color: var(--down); }
.flat { color: var(--ink-3); }
.num { font-variant-numeric: tabular-nums; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }
main { position: relative; z-index: 2; transition: opacity .45s var(--ease), transform .55s var(--ease); transform-origin: 50% 40%; }
html.entering main { opacity: 0; transform: perspective(1400px) translateX(2%) rotateY(5deg); }
html.leaving main { opacity: 0; transform: perspective(1400px) translateX(-2%) rotateY(-5deg); transition-duration: .3s; }

/* ---------- background + cursor ---------- */
.bg-canvas { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 0; pointer-events: none; }
html.has-cursor, html.has-cursor * { cursor: none !important; }
.cursor { position: fixed; left: 0; top: 0; width: 96px; height: 96px; z-index: 2147483000; pointer-events: none; opacity: 0; transition: opacity .2s; will-change: transform; }
.cursor canvas { width: 96px; height: 96px; }
.cursor-dot { position: fixed; left: -3px; top: -3px; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); z-index: 2147483001; pointer-events: none; opacity: 0; }

/* ---------- header ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 120; pointer-events: none; }
.progress i { display: block; height: 100%; background: var(--accent); transform-origin: 0 50%; transform: scaleX(0); }
.site-head {
  position: fixed; top: 0; left: 0; right: 0; z-index: 60;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 22px var(--gut); pointer-events: none;
}
.site-head > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-cube { width: 56px; height: 56px; }
.brand-word { font: 600 34px/1 var(--display); letter-spacing: -0.03em; }
.head-actions { display: flex; align-items: center; gap: 12px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  height: 60px; padding: 0 28px; border-radius: var(--r-sm);
  font: 600 18px/1 var(--body); text-decoration: none; white-space: nowrap;
  border: 1.5px solid transparent; background: none; transition: background .25s, color .25s, border-color .25s, transform .25s var(--ease);
}
.btn .ic, .btn-icon .ic { width: 22px; height: 22px; flex: none; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--accent); }
.btn-accent { background: var(--accent); color: #fff; }
.btn-accent:hover { background: var(--accent-2); }
.btn-ghost { border-color: var(--ink); background: rgba(255,255,255,.35); backdrop-filter: blur(8px); }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.btn-lg { height: 72px; padding: 0 36px; font-size: 20px; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn-wallet { height: 56px; background: var(--glass-2); border-color: var(--line-2); backdrop-filter: blur(12px); }
.btn-wallet:hover { border-color: var(--ink); }
.btn-wallet.is-on { border-color: var(--accent); color: var(--accent); }
.btn-icon {
  display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: var(--r-sm);
  background: var(--glass-2); border: 1.5px solid var(--line-2); backdrop-filter: blur(12px); text-decoration: none;
  transition: border-color .2s, color .2s;
}
.btn-icon:hover { border-color: var(--ink); color: var(--accent); }
.ca-chip {
  display: inline-flex; align-items: center; gap: 10px; height: 56px; padding: 0 16px 0 8px;
  border-radius: var(--r-sm); border: 1.5px solid var(--line-2); background: var(--glass-2); backdrop-filter: blur(12px);
  font: 600 16px/1 var(--body); font-variant-numeric: tabular-nums;
}
.ca-chip .ic { width: 18px; height: 18px; color: var(--ink-3); }
.ca-chip:not([disabled]):hover { border-color: var(--ink); }
.ca-chip:not([disabled]):hover .ic { color: var(--accent); }
.ca-label { background: var(--accent); color: #fff; padding: 9px 10px; border-radius: 3px; font-size: 14px; }

/* ---------- dock (bottom nav) ---------- */
.dock {
  position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 70;
  display: flex; align-items: center; gap: 8px; padding: 10px;
  background: rgba(246, 247, 250, 0.72); backdrop-filter: blur(20px) saturate(150%);
  border: 1px solid rgba(255,255,255,.8); border-radius: 8px;
  box-shadow: 0 24px 60px -24px rgba(16,19,28,.4), inset 0 1px 0 rgba(255,255,255,.9);
}
.dock-cube { width: 64px; height: 64px; perspective: 360px; margin: 0 6px 0 4px; flex: none; }
.mc { position: relative; width: 64px; height: 64px; transform-style: preserve-3d; transition: transform .8s var(--ease); }
.mc-f {
  position: absolute; inset: 0; display: grid; place-items: center; align-content: center; gap: 3px;
  background: linear-gradient(135deg, rgba(160,210,255,.85), rgba(228,190,255,.85) 55%, rgba(170,255,230,.85));
  border: 1.5px solid var(--ink); font: 600 10px/1 var(--body); color: var(--ink);
  backface-visibility: hidden;
}
.mc-f .ic { width: 22px; height: 22px; }
.mc-0 { transform: translateZ(32px); }
.mc-1 { transform: rotateX(90deg) translateZ(32px); }
.mc-2 { transform: rotateY(90deg) translateZ(32px); }
.mc-3 { transform: rotateY(180deg) translateZ(32px); }
.mc-4 { transform: rotateY(-90deg) translateZ(32px); }
.mc-5 { transform: rotateX(-90deg) translateZ(32px); }
.mc[data-face="0"] { transform: rotateX(-16deg) rotateY(-24deg); }
.mc[data-face="1"] { transform: rotateX(-16deg) rotateY(-24deg) rotateX(-90deg); }
.mc[data-face="2"] { transform: rotateX(-16deg) rotateY(-24deg) rotateY(-90deg); }
.mc[data-face="3"] { transform: rotateX(-16deg) rotateY(-24deg) rotateY(-180deg); }
.mc[data-face="4"] { transform: rotateX(-16deg) rotateY(-24deg) rotateY(90deg); }
.mc[data-face="5"] { transform: rotateX(-16deg) rotateY(-24deg) rotateX(90deg); }
.dock-faces { display: flex; gap: 4px; margin: 0; padding: 0; list-style: none; }
.dock-face {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-width: 92px; height: 72px; padding: 0 12px; border-radius: var(--r-sm); text-decoration: none;
  font: 600 15px/1 var(--body); color: var(--ink-2); transition: color .2s, background .2s;
}
.dock-face .ic { width: 24px; height: 24px; }
.dock-face:hover { color: var(--ink); background: rgba(16,19,28,.05); }
.dock-face.is-active { color: var(--accent); background: var(--accent-soft); }
.dock-face.is-active::after { content: ''; position: absolute; left: 22%; right: 22%; bottom: 6px; height: 2px; background: var(--accent); }
.dock-menu {
  display: inline-flex; align-items: center; gap: 10px; height: 72px; padding: 0 22px; margin-left: 4px;
  border: 0; border-radius: var(--r-sm); background: var(--ink); color: #fff; font: 600 18px/1 var(--body);
  transition: background .2s;
}
.dock-menu:hover { background: var(--accent); }
.dock-menu kbd { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.25); color: #fff; }

/* ---------- full-screen menu ---------- */
.menu {
  position: fixed; inset: 0; z-index: 200; display: grid; place-items: center;
  background: rgba(231, 233, 238, 0.78); backdrop-filter: blur(22px) saturate(140%);
  opacity: 0; visibility: hidden; pointer-events: none; transition: opacity .4s var(--ease), visibility 0s .5s;
  overflow-y: auto; padding: 24px var(--gut) 40px;
}
.menu[hidden] { display: none; }
.menu.open { opacity: 1; visibility: visible; pointer-events: auto; transition: opacity .4s var(--ease), visibility 0s 0s; }
html.menu-open body { overflow: hidden; }
.menu-inner { width: 100%; max-width: 1280px; }
.menu-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 28px; }
.menu-title { font: 600 clamp(36px, 4vw, 60px)/1 var(--display); letter-spacing: -0.02em; }
.net { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); grid-template-rows: repeat(3, auto); perspective: 1600px; }
.net-cell {
  position: relative; display: flex; flex-direction: column; gap: 10px; min-height: clamp(150px, 21vh, 230px);
  padding: 22px 24px; margin: -0.75px; text-decoration: none;
  border: 1.5px solid var(--ink);
  background: linear-gradient(140deg, rgba(255,255,255,.75), rgba(214,228,255,.6) 50%, rgba(240,220,255,.6));
  opacity: 0; transition: transform .7s var(--ease), opacity .5s var(--ease), background .25s;
  transition-delay: var(--d);
}
.net-cell:hover, .net-cell:focus-visible { background: var(--ink); color: #fff; outline: none; }
.net-cell:hover .net-desc, .net-cell:focus-visible .net-desc { color: rgba(255,255,255,.75); }
.net-cell.is-active { box-shadow: inset 0 0 0 3px var(--accent); }
.net-ic .ic { width: 30px; height: 30px; color: var(--accent); }
.net-name { font: 600 clamp(24px, 2.2vw, 34px)/1.05 var(--display); letter-spacing: -0.02em; }
.net-desc { font-size: 16px; line-height: 1.45; color: var(--ink-2); max-width: 34ch; }
.net-front { grid-area: 2 / 2; transform-origin: 50% 50%; transform: scale(.9); }
.net-top { grid-area: 1 / 2; transform-origin: 50% 100%; transform: rotateX(-92deg); }
.net-bottom { grid-area: 3 / 2; transform-origin: 50% 0; transform: rotateX(92deg); }
.net-left { grid-area: 2 / 1; transform-origin: 100% 50%; transform: rotateY(92deg); }
.net-right { grid-area: 2 / 3; transform-origin: 0 50%; transform: rotateY(-92deg); }
.net-back { grid-area: 2 / 4; transform-origin: 0 50%; transform: rotateY(-92deg); }
.menu.open .net-cell { opacity: 1; transform: none; }
.menu-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 28px; }
.menu-hint { margin-left: auto; color: var(--ink-3); font-size: 16px; }

/* ---------- panels + stats ---------- */
.section { position: relative; padding: clamp(60px, 9vw, 130px) 0; }
.section-head { display: grid; gap: 18px; margin-bottom: clamp(28px, 4vw, 52px); max-width: 980px; }
.panel {
  position: relative; border-radius: var(--r);
  background: var(--glass); backdrop-filter: blur(22px) saturate(140%); -webkit-backdrop-filter: blur(22px) saturate(140%);
  border: 1px solid rgba(255,255,255,.72);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85), 0 40px 90px -50px rgba(16,19,28,.45);
  padding: clamp(24px, 3.6vw, 52px);
}
.panel::before, .panel::after {
  content: ''; position: absolute; width: 0; height: 0; pointer-events: none;
  border: 0 solid var(--accent); transition: width .7s var(--ease) .1s, height .7s var(--ease) .1s;
}
.panel::before { top: -1px; left: -1px; border-top-width: 3px; border-left-width: 3px; border-top-left-radius: var(--r); }
.panel::after { bottom: -1px; right: -1px; border-bottom-width: 3px; border-right-width: 3px; border-bottom-right-radius: var(--r); }
.panel.in::before, .panel.in::after { width: 44px; height: 44px; }

.stat {
  position: relative; background: var(--stat); color: var(--stat-ink); border-radius: var(--r-sm);
  padding: 22px 24px 20px; border-left: 3px solid var(--accent); overflow: hidden;
}
.stat-num { font: 600 clamp(34px, 3.2vw, 50px)/1 var(--display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-num sub { font-size: .5em; }
.stat-cap { margin-top: 10px; font-size: 16px; line-height: 1.4; color: rgba(241,242,246,.72); }
.stat-src { margin-top: 8px; font-size: 13px; color: rgba(241,242,246,.45); }
.stats { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.live-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--up); margin-right: 8px; box-shadow: 0 0 0 0 rgba(11,154,104,.6); animation: ping 2s infinite; vertical-align: 2px; }
@keyframes ping { 70% { box-shadow: 0 0 0 8px rgba(11,154,104,0); } 100% { box-shadow: 0 0 0 0 rgba(11,154,104,0); } }

/* ---------- hero ---------- */
.hero { position: relative; min-height: 100svh; display: flex; align-items: center; padding: 150px 0 140px; }
.hero-copy { padding-left: clamp(0px, 30%, 460px); }
.hero-title {
  font: 600 clamp(52px, 7.4vw, 132px)/0.96 var(--display); letter-spacing: -0.035em;
  max-width: 11ch; text-wrap: balance;
}
.hero-title .ln { display: block; overflow: hidden; padding-bottom: .04em; }
.hero-title .ln > span { display: inline-block; transform: translateY(105%); transition: transform 1s var(--ease); }
.hero.ready .hero-title .ln > span { transform: none; }
.hero.ready .hero-title .ln:nth-child(2) > span { transition-delay: .08s; }
.hero.ready .hero-title .ln:nth-child(3) > span { transition-delay: .16s; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 44px; opacity: 0; transform: translateY(16px); transition: opacity .8s var(--ease) .35s, transform .8s var(--ease) .35s; }
.hero.ready .hero-actions { opacity: 1; transform: none; }
.scroll-cue { position: absolute; left: var(--gut); bottom: 130px; display: flex; align-items: center; gap: 12px; color: var(--ink-3); font-size: 16px; }
.scroll-cue i { width: 1.5px; height: 44px; background: linear-gradient(var(--accent), transparent); animation: cue 2.2s var(--ease-io) infinite; transform-origin: top; }
@keyframes cue { 0% { transform: scaleY(0); } 50% { transform: scaleY(1); } 100% { transform: scaleY(1); opacity: 0; } }

/* ---------- intro ---------- */
html.intro-on body { overflow: hidden; }
.intro { display: none; }
html.intro-on .intro {
  position: fixed; inset: 0; z-index: 9000; background: var(--bg);
  display: grid; place-items: center; transition: opacity .8s var(--ease), visibility 0s .8s;
}
.intro canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.intro.leave { opacity: 0; visibility: hidden; pointer-events: none; }
.intro-ui { position: relative; display: grid; justify-items: center; gap: 22px; margin-top: min(52vh, 440px); text-align: center; }
.intro-word { font: 600 clamp(40px, 6vw, 84px)/1 var(--display); letter-spacing: -0.04em; }
.intro-status { font-size: 17px; color: var(--ink-2); min-height: 1.6em; font-variant-numeric: tabular-nums; }
.intro-enter { opacity: 0; transform: translateY(10px); transition: opacity .6s var(--ease), transform .6s var(--ease); pointer-events: none; }
.intro.ready .intro-enter { opacity: 1; transform: none; pointer-events: auto; }
.intro-skip { position: absolute; right: var(--gut); bottom: 28px; color: var(--ink-3); font-size: 15px; }

/* ---------- mechanism accordion ---------- */
.mech { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(24px, 3vw, 48px); align-items: start; }
.acc { border-top: 1px solid var(--line-2); }
.acc-row { border-bottom: 1px solid var(--line-2); position: relative; }
.acc-row::before { content: ''; position: absolute; left: 0; top: -1px; bottom: -1px; width: 3px; background: var(--accent); transform: scaleY(0); transform-origin: top; transition: transform .45s var(--ease); }
.acc-row.open::before { transform: scaleY(1); }
.acc-head {
  display: grid; grid-template-columns: 56px 1fr 32px; align-items: center; gap: 12px; width: 100%;
  padding: 26px 8px 26px 20px; border: 0; background: none; text-align: left;
}
.acc-n { font: 600 18px/1 var(--display); color: var(--ink-3); transition: color .3s; }
.acc-t { font: 600 clamp(22px, 2vw, 30px)/1.15 var(--display); letter-spacing: -0.015em; }
.acc-x { position: relative; width: 22px; height: 22px; }
.acc-x::before, .acc-x::after { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 2px; margin-top: -1px; background: currentColor; transition: transform .4s var(--ease); }
.acc-x::after { transform: rotate(90deg); }
.acc-row.open .acc-x::after { transform: rotate(0); }
.acc-row.open .acc-n { color: var(--accent); }
.acc-body { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .55s var(--ease); }
.acc-row.open .acc-body { grid-template-rows: 1fr; }
.acc-inner { overflow: hidden; padding: 0 8px 0 88px; }
.acc-inner > div { padding-bottom: 28px; display: grid; gap: 18px; }
.acc-inner p { color: var(--ink-2); max-width: 54ch; }
.mech-visual { position: sticky; top: 110px; padding: 0; overflow: hidden; }
.mech-visual canvas { width: 100%; aspect-ratio: 1 / 0.92; }
.mech-readout { position: absolute; left: 22px; bottom: 20px; right: 22px; display: flex; justify-content: space-between; gap: 12px; font-size: 16px; color: var(--ink-2); font-variant-numeric: tabular-nums; pointer-events: none; }
.mech-readout b { color: var(--ink); font-weight: 600; }

/* ---------- cube states ---------- */
.states { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(24px, 3vw, 48px); align-items: stretch; }
.state-stage { padding: 0; min-height: 520px; position: relative; overflow: hidden; }
.state-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.state-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 24px; }
.state-tab {
  display: grid; gap: 6px; text-align: left; padding: 18px 18px 16px; border-radius: var(--r-sm);
  border: 1.5px solid var(--line-2); background: rgba(255,255,255,.45); transition: border-color .25s, background .25s, color .25s;
}
.state-tab .ic { width: 26px; height: 26px; }
.state-tab b { font: 600 20px/1.1 var(--display); }
.state-tab span { font-size: 15px; color: var(--ink-3); }
.state-tab[aria-selected="true"] { border-color: var(--ink); background: var(--ink); color: #fff; }
.state-tab[aria-selected="true"] span { color: rgba(255,255,255,.7); }
.state-tab[aria-selected="true"] .ic { color: #9C93FF; }
.state-detail { display: grid; gap: 20px; }
.state-detail h3 { font-size: clamp(30px, 3vw, 44px); }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.chip {
  display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px 0 6px; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: rgba(255,255,255,.6); text-decoration: none; font-weight: 600; font-size: 16px;
}
.chip:hover { border-color: var(--accent); }
.chip small { font-weight: 500; color: var(--ink-3); font-variant-numeric: tabular-nums; }

/* ---------- tenure ---------- */
.tenure { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: clamp(24px, 3vw, 48px); align-items: center; }
.tenure-readout { display: flex; align-items: baseline; gap: 14px; }
.tenure-mult { font: 600 clamp(80px, 10vw, 150px)/0.9 var(--display); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.tenure-mult .dot { font-size: .5em; }
.tenure-days { font-size: 20px; color: var(--ink-2); }
.tenure-chart svg { width: 100%; height: auto; overflow: visible; }
.tenure-ctrl { display: grid; gap: 14px; margin-top: 26px; }
.tenure-buttons { display: flex; gap: 12px; flex-wrap: wrap; }
.shake { animation: shake .45s var(--ease); }
@keyframes shake { 20% { transform: translateX(-8px); } 40% { transform: translateX(7px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(2px); } }

/* ---------- range ---------- */
input[type="range"] { -webkit-appearance: none; appearance: none; width: 100%; height: 36px; background: none; }
input[type="range"]::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(90deg, var(--accent) var(--p, 50%), rgba(16,19,28,.14) var(--p, 50%)); }
input[type="range"]::-moz-range-track { height: 6px; border-radius: 3px; background: rgba(16,19,28,.14); }
input[type="range"]::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--accent); }
input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -11px; background: #fff; border: 3px solid var(--ink); border-radius: 4px; transform: rotate(45deg); }
input[type="range"]::-moz-range-thumb { width: 22px; height: 22px; background: #fff; border: 3px solid var(--ink); border-radius: 4px; transform: rotate(45deg); }

/* ---------- tape ---------- */
.tape { position: relative; overflow: hidden; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); background: rgba(246,247,250,.5); backdrop-filter: blur(10px); }
.tape-track { display: flex; width: max-content; animation: tape 80s linear infinite; }
.tape:hover .tape-track { animation-play-state: paused; }
@keyframes tape { to { transform: translateX(-50%); } }
.tape-item { display: flex; align-items: center; gap: 14px; padding: 22px 30px; border-right: 1px solid var(--line); text-decoration: none; white-space: nowrap; font-size: 18px; font-variant-numeric: tabular-nums; }
.tape-item b { font-family: var(--display); font-weight: 600; }
.tape-item:hover b { color: var(--accent); }

/* ---------- token visuals ---------- */
.tok-img { position: relative; display: inline-grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: var(--r-sm); background: linear-gradient(135deg, #C8DBFF, #EBD4FF); overflow: hidden; font: 600 18px/1 var(--display); }
.tok-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.chip .tok-img { width: 36px; height: 36px; font-size: 14px; }
.sig { display: grid; gap: 6px; }
.sig-bar { position: relative; height: 8px; border-radius: 2px; background: rgba(16,19,28,.1); overflow: hidden; }
.sig-bar i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(90deg, #8FC9FF, var(--accent)); border-radius: 2px; transition: width .8s var(--ease); }
.sig-row { display: flex; justify-content: space-between; font-size: 15px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.band-tag { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 600; padding: 5px 9px; border-radius: 3px; border: 1px solid currentColor; }
.band-dormant { color: #5A6A86; }
.band-warming { color: #B26A00; }
.band-critical { color: var(--accent); }

/* ---------- board ---------- */
.page-head { padding: 150px 0 36px; display: grid; gap: 22px; }
.page-head h1 { font-size: clamp(52px, 6.4vw, 104px); line-height: .98; letter-spacing: -0.035em; }
.toolbar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; margin: 28px 0 22px; }
.field { display: grid; gap: 8px; }
.field > span, .label { font-weight: 600; font-size: 16px; }
.input, .select, textarea.input {
  width: 100%; height: 64px; padding: 0 20px; border-radius: var(--r-sm); font-size: 18px;
  border: 1.5px solid var(--line-2); background: rgba(255,255,255,.7); transition: border-color .2s, box-shadow .2s;
}
textarea.input { height: auto; min-height: 140px; padding: 16px 20px; line-height: 1.5; resize: vertical; }
.input:focus, .select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.input.invalid { border-color: var(--down); box-shadow: 0 0 0 4px rgba(222,62,72,.1); }
.select { appearance: none; padding-right: 48px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='9' fill='none' stroke='%2310131C' stroke-width='2'%3E%3Cpath d='M1 1l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 18px center; }
.search { flex: 1 1 320px; position: relative; }
.seg { display: inline-flex; padding: 5px; gap: 4px; border-radius: var(--r-sm); background: rgba(255,255,255,.55); border: 1.5px solid var(--line-2); flex-wrap: wrap; }
.seg button { height: 52px; padding: 0 18px; border: 0; border-radius: 3px; background: none; font-weight: 600; font-size: 17px; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.seg button:hover:not([aria-pressed="true"]) { background: rgba(16,19,28,.06); color: var(--ink); }
.refresh { display: inline-flex; align-items: center; gap: 10px; color: var(--ink-2); font-size: 16px; font-variant-numeric: tabular-nums; margin-left: auto; }
.refresh svg { width: 26px; height: 26px; transform: rotate(-90deg); }
.refresh circle { fill: none; stroke-width: 3; }

.grid-tokens { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 18px; perspective: 1400px; }
.tok {
  position: relative; display: grid; gap: 16px; padding: 22px; text-decoration: none;
  transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg)); transition: transform .4s var(--ease), box-shadow .3s;
}
.tok:hover { box-shadow: inset 0 1px 0 rgba(255,255,255,.85), 0 50px 90px -40px rgba(75,59,255,.45); }
.tok.is-passed { opacity: .45; }
.tok-top { display: flex; align-items: center; gap: 14px; min-width: 0; }
.tok-id { min-width: 0; }
.tok-sym { font: 600 22px/1.1 var(--display); letter-spacing: -0.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tok-name { font-size: 15px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tok-top .band-tag { margin-left: auto; flex: none; }
.tok-price { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-variant-numeric: tabular-nums; }
.tok-price b { font: 600 24px/1 var(--display); }
.tok-spark svg { width: 100%; height: 56px; }
.tok-meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; font-size: 14px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tok-meta b { display: block; font-size: 17px; color: var(--ink); font-weight: 600; }
.tok-actions { display: flex; gap: 8px; }
.tok-btn {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 50px; border-radius: var(--r-sm);
  border: 1.5px solid var(--line-2); background: rgba(255,255,255,.55); font-weight: 600; font-size: 16px;
}
.tok-btn .ic { width: 18px; height: 18px; }
.tok-btn:hover { border-color: var(--ink); }
.tok-btn[aria-pressed="true"].is-track { background: var(--accent); border-color: var(--accent); color: #fff; }
.tok-btn[aria-pressed="true"].is-pass { background: var(--ink); border-color: var(--ink); color: #fff; }
.empty { padding: 60px 24px; text-align: center; display: grid; gap: 16px; justify-items: center; }
.skeleton { min-height: 330px; background: linear-gradient(100deg, rgba(255,255,255,.3) 30%, rgba(255,255,255,.7) 50%, rgba(255,255,255,.3) 70%); background-size: 300% 100%; animation: sk 1.4s linear infinite; }
@keyframes sk { to { background-position: -150% 0; } }

/* ---------- coin page ---------- */
.coin-head { display: flex; flex-wrap: wrap; align-items: center; gap: 22px; }
.coin-head .tok-img { width: 88px; height: 88px; font-size: 34px; }
.coin-links { display: flex; flex-wrap: wrap; gap: 10px; }
.coin-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.chart-panel { display: grid; gap: 16px; }
.chart-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; }
.chart-price { font: 600 clamp(36px, 4vw, 56px)/1 var(--display); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.chart-box { position: relative; }
.chart-box svg { width: 100%; height: 360px; overflow: visible; }
.chart-tip { position: absolute; top: 0; pointer-events: none; background: var(--stat); color: var(--stat-ink); padding: 10px 12px; border-radius: var(--r-sm); font-size: 14px; line-height: 1.45; font-variant-numeric: tabular-nums; transform: translateX(-50%); opacity: 0; transition: opacity .15s; white-space: nowrap; }
.chart-note { font-size: 15px; color: var(--ink-3); }
.kv { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--line); border-radius: var(--r-sm); overflow: hidden; }
.kv div { background: rgba(250,251,253,.85); padding: 16px 18px; }
.kv span { display: block; font-size: 14px; color: var(--ink-3); }
.kv b { font: 600 20px/1.3 var(--body); font-variant-numeric: tabular-nums; }
.comp { display: grid; gap: 14px; }
.side-stack { display: grid; gap: 18px; }

/* ---------- launch ---------- */
.launch { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.steps { display: flex; gap: 8px; margin-bottom: 28px; flex-wrap: wrap; }
.step-pill { display: inline-flex; align-items: center; gap: 10px; height: 48px; padding: 0 16px; border-radius: var(--r-sm); border: 1.5px solid var(--line-2); font-weight: 600; font-size: 16px; color: var(--ink-3); background: none; }
.step-pill i { font: 600 15px/1 var(--display); font-style: normal; }
.step-pill[aria-current="step"] { border-color: var(--ink); color: var(--ink); background: rgba(255,255,255,.7); }
.step-pill.done { color: var(--accent); border-color: var(--accent); }
.form-grid { display: grid; gap: 22px; }
.form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.hint { font-size: 15px; color: var(--ink-3); }
.err { font-size: 15px; color: var(--down); min-height: 0; }
.drop { display: grid; place-items: center; gap: 8px; min-height: 140px; border: 1.5px dashed var(--line-2); border-radius: var(--r-sm); background: rgba(255,255,255,.45); text-align: center; padding: 18px; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
.options { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.opt { position: relative; display: grid; gap: 6px; padding: 18px; border-radius: var(--r-sm); border: 1.5px solid var(--line-2); background: rgba(255,255,255,.5); }
.opt input { position: absolute; opacity: 0; }
.opt b { font: 600 19px/1.1 var(--display); }
.opt span { font-size: 15px; color: var(--ink-3); }
.opt:has(input:checked) { border-color: var(--accent); box-shadow: inset 0 0 0 1.5px var(--accent); background: rgba(255,255,255,.8); }
.opt:has(input:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }
.toggle { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 18px 20px; border-radius: var(--r-sm); border: 1.5px solid var(--line-2); background: rgba(255,255,255,.5); }
.toggle input { appearance: none; width: 58px; height: 32px; border-radius: 16px; background: rgba(16,19,28,.2); position: relative; flex: none; transition: background .25s; }
.toggle input::after { content: ''; position: absolute; top: 4px; left: 4px; width: 24px; height: 24px; border-radius: 50%; background: #fff; transition: transform .25s var(--ease); }
.toggle input:checked { background: var(--accent); }
.toggle input:checked::after { transform: translateX(26px); }
.form-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 30px; }
.preview { position: sticky; top: 110px; display: grid; gap: 20px; }
.pcube-stage { height: 320px; display: grid; place-items: center; perspective: 900px; }
.pcube { position: relative; width: 170px; height: 170px; transform-style: preserve-3d; animation: pspin 14s linear infinite; }
.pcube > div { position: absolute; inset: 0; border: 1.5px solid var(--ink); display: grid; place-items: center; overflow: hidden; background: linear-gradient(135deg, rgba(160,210,255,.7), rgba(228,190,255,.7) 55%, rgba(170,255,230,.7)); font: 600 30px/1 var(--display); }
.pcube > div img { width: 100%; height: 100%; object-fit: cover; opacity: .92; }
.pcube .f1 { transform: translateZ(85px); }
.pcube .f2 { transform: rotateY(90deg) translateZ(85px); }
.pcube .f3 { transform: rotateY(180deg) translateZ(85px); }
.pcube .f4 { transform: rotateY(-90deg) translateZ(85px); }
.pcube .f5 { transform: rotateX(90deg) translateZ(85px); }
.pcube .f6 { transform: rotateX(-90deg) translateZ(85px); }
@keyframes pspin { from { transform: rotateX(-18deg) rotateY(0); } to { transform: rotateX(-18deg) rotateY(360deg); } }
.review { display: grid; gap: 1px; background: var(--line); border-radius: var(--r-sm); overflow: hidden; }
.review div { display: grid; grid-template-columns: 180px 1fr; gap: 14px; padding: 16px 18px; background: rgba(250,251,253,.85); }
.review span { color: var(--ink-3); }
.review b { font-weight: 600; word-break: break-word; }
.confirm { text-align: left; display: grid; gap: 22px; }
.confirm-mark { width: 84px; height: 84px; display: grid; place-items: center; border-radius: var(--r-sm); background: var(--accent); color: #fff; }
.confirm-mark .ic { width: 44px; height: 44px; }
.code {
  background: var(--stat); color: #DCDFF0; border-radius: var(--r-sm); padding: 20px; overflow: auto; max-height: 360px;
  font: 400 14px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

/* ---------- lab ---------- */
.lab { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.6fr); gap: 18px; align-items: start; }
.ctrl { display: grid; gap: 26px; }
.ctrl-row { display: grid; gap: 6px; }
.ctrl-row header { display: flex; justify-content: space-between; align-items: baseline; }
.ctrl-row header b { font: 600 22px/1 var(--display); font-variant-numeric: tabular-nums; }
.formula { padding: 18px 20px; border-radius: var(--r-sm); background: rgba(255,255,255,.55); border: 1px solid var(--line-2); font-size: 18px; line-height: 1.7; }
.formula i { font-family: Georgia, serif; }
.lab-chart svg { width: 100%; height: 440px; overflow: visible; }
.legend { display: flex; flex-wrap: wrap; gap: 18px; font-size: 16px; color: var(--ink-2); }
.legend i { display: inline-block; width: 22px; height: 3px; margin-right: 8px; vertical-align: middle; }
.export { display: flex; flex-wrap: wrap; gap: 10px; }
.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table th, .table td { text-align: left; padding: 14px 12px; border-bottom: 1px solid var(--line); font-size: 17px; }
.table th { font-weight: 600; color: var(--ink-3); font-size: 15px; }

/* ---------- pulse ---------- */
.pulse-stage { position: relative; padding: 0; height: min(78vh, 820px); min-height: 520px; overflow: hidden; }
.pulse-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.pulse-hud { position: absolute; left: 20px; top: 20px; right: 20px; display: flex; flex-wrap: wrap; gap: 12px; justify-content: space-between; pointer-events: none; }
.pulse-hud > * { pointer-events: auto; }
.pulse-tip { position: absolute; pointer-events: none; background: var(--stat); color: var(--stat-ink); border-radius: var(--r-sm); padding: 14px 16px; font-size: 15px; line-height: 1.5; min-width: 220px; opacity: 0; transform: translate(14px, 14px); transition: opacity .15s; font-variant-numeric: tabular-nums; }
.pulse-tip b { font: 600 18px/1.2 var(--display); }
.pulse-legend { position: absolute; left: 20px; bottom: 20px; display: flex; flex-wrap: wrap; gap: 16px; font-size: 15px; color: var(--ink-2); pointer-events: none; }
.pulse-legend i { display: inline-block; width: 14px; height: 14px; border-radius: 2px; vertical-align: -2px; margin-right: 6px; }

/* ---------- forge ---------- */
.forge { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.forge-stage { padding: 0; aspect-ratio: 1; position: relative; overflow: hidden; }
.forge-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; touch-action: none; }
.forge-stage .hint { position: absolute; left: 18px; bottom: 16px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 48px; height: 48px; border-radius: var(--r-sm); border: 2px solid transparent; }
.swatch[aria-pressed="true"] { border-color: var(--ink); box-shadow: inset 0 0 0 3px #fff; }

/* ---------- footer + misc ---------- */
.site-foot { position: relative; z-index: 2; display: grid; grid-template-columns: 1.3fr 1fr 1.3fr; gap: 40px; padding-top: 70px; padding-bottom: 40px; margin-top: 60px; border-top: 1px solid var(--line-2); }
.foot-brand .brand-word { font-size: 44px; }
.foot-brand p { margin-top: 14px; color: var(--ink-2); max-width: 36ch; }
.foot-links { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.foot-links a { text-decoration: none; font-weight: 600; font-size: 19px; }
.foot-links a:hover { color: var(--accent); }
.foot-meta { display: grid; gap: 14px; justify-items: start; }
.foot-meta a { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; }
.foot-meta .ic { width: 20px; height: 20px; }
.foot-note { font-size: 15px; color: var(--ink-3); }
.toast {
  position: fixed; left: 50%; bottom: 124px; z-index: 300; transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  display: inline-flex; align-items: center; gap: 10px; padding: 16px 22px; border-radius: var(--r-sm);
  background: var(--stat); color: var(--stat-ink); font-size: 17px; transition: opacity .3s, transform .3s var(--ease);
}
.toast .ic { width: 20px; height: 20px; color: #9C93FF; }
.toast a { color: #B9B3FF; }
.toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.notfound { min-height: 80vh; display: grid; align-content: center; gap: 24px; padding-top: 120px; }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .dock-face { min-width: 0; padding: 0 12px; }
  .dock-face span { display: none; }
  .dock-face { width: 60px; }
}
@media (max-width: 1080px) {
  .mech, .states, .tenure, .coin-grid, .launch, .lab, .forge { grid-template-columns: 1fr; }
  .mech-visual, .preview { position: relative; top: 0; }
  .site-foot { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .hero-copy { padding-left: 0; }
  .hero { align-items: flex-end; padding-bottom: 170px; }
  .ca-chip .ca-val { display: none; }
  .ca-chip { padding-right: 8px; }
  .btn-wallet span { display: none; }
  .btn-wallet { width: 56px; padding: 0; }
  .brand-word { font-size: 28px; }
  .brand-cube { width: 46px; height: 46px; }
  .net { grid-template-columns: 1fr 1fr; perspective: none; gap: 10px; }
  .net-cell { grid-area: auto !important; margin: 0; min-height: 0; transform: translateY(14px); }
  .menu-hint { display: none; }
  .options, .form-2, .state-tabs { grid-template-columns: 1fr; }
  .review div { grid-template-columns: 1fr; gap: 2px; }
  .acc-inner { padding-left: 20px; }
  .acc-head { grid-template-columns: 40px 1fr 28px; padding-left: 14px; }
  .scroll-cue { display: none; }
  .dock-cube { display: none; }
  .dock-face { width: 48px; height: 60px; }
  .dock-menu { height: 60px; padding: 0 16px; }
  .dock-menu kbd { display: none; }
  .head-actions { gap: 8px; }
}
@media (max-width: 520px) {
  .net { grid-template-columns: 1fr; }
  .dock-face { width: 42px; }
  .dock { gap: 2px; padding: 8px; }
  .btn-lg { height: 64px; padding: 0 24px; }
  .head-actions .btn-icon:first-child { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; transition-delay: 0s !important; }
  html { scroll-behavior: auto; }
}

/* stretched card link (keeps Track / Pass buttons clickable) */
.tok-link { text-decoration: none; }
.tok-link::after { content: ''; position: absolute; inset: 0; z-index: 1; }
.tok-link:focus-visible { outline: none; }
.tok:has(.tok-link:focus-visible) { outline: 3px solid var(--accent); outline-offset: 3px; }
.tok-actions { position: relative; z-index: 2; }
