/* Toktail site. One long night scene in Pip's palette: Pip sits on a neon
   stage in the hero, then leaps down the page onto each section's top edge. */

@font-face { font-family: "Outfit"; src: url("../fonts/outfit.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono-700.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --sky0: #07051d; --sky1: #1a1160; --ground: #0f0d36; --card: rgba(26, 22, 82, .72); --card-solid: #19164f; --line: rgba(124, 108, 230, .28); --line-hi: rgba(202, 156, 246, .55);
  --cream: #fcebd3; --text: #f1e9e1; --muted: #b5aedb; --dim: #8f88c4; --lav: #ca9cf6; --violet: #8e5cf2;
  --mint: #cce5e6; --green: #43e08a; --orange: #fc8939; --magenta: #ff4fd8; --blue: #3d7bff;
  --display: "Outfit", "Avenir Next", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --radius: 26px;
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ground); color: var(--text); font-family: var(--display); font-size: 17px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
html.pip-hover body { cursor: pointer; }
a { color: var(--lav); text-underline-offset: 3px; }
a:hover { color: #e4d4ff; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.025em; color: var(--cream); text-wrap: balance; }
p { margin: 0; }
code { font-family: var(--mono); font-size: .88em; padding: .12em .4em; border-radius: 6px; background: rgba(8, 6, 31, .6); border: 1px solid var(--line); color: var(--cream); }
:focus-visible { outline: 2px solid var(--lav); outline-offset: 3px; border-radius: 8px; }
.tk { position: relative; overflow-x: hidden; overflow-x: clip; padding-bottom: 48px; }
.wrap { max-width: 1200px; margin: 0 auto; padding-left: max(18px, env(safe-area-inset-left, 0px)); padding-right: max(18px, env(safe-area-inset-right, 0px)); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* the WebGL layer Pip lives on */
.pip-layer { position: fixed; inset: 0; width: 100vw; height: 100vh; z-index: 40; pointer-events: none; }
.pip-fallback { display: none; }
html.no-3d .pip-fallback { display: block; position: absolute; left: 50%; bottom: 6%; width: min(360px, 80%); height: auto; transform: translateX(-50%); filter: drop-shadow(0 0 18px rgba(202, 156, 246, .45)); }
.ring { display: none; }
html.no-3d .ring { display: block; }

/* ---------- buttons and pills */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 50px; padding: 0 24px; border-radius: 999px; font: 600 16px/1 var(--display); text-decoration: none; transition: transform .18s ease, box-shadow .25s, background .25s, border-color .25s; }
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: linear-gradient(180deg, #fff3e3, var(--cream)); color: #12103a; box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 10px 30px -10px rgba(202, 156, 246, .55); }
.btn-primary:hover { color: #12103a; box-shadow: 0 1px 0 rgba(255, 255, 255, .6) inset, 0 14px 40px -8px rgba(202, 156, 246, .75); }
.btn-ghost { border: 1px solid var(--line); color: var(--cream); background: rgba(23, 20, 75, .5); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.btn-ghost:hover { color: var(--cream); border-color: var(--line-hi); }
.btn-sm { min-height: 42px; padding: 0 18px; font-size: 15px; }
.btn svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.pills { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; border-radius: 16px; background: rgba(15, 12, 54, .7); border: 1px solid var(--line); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.pill { min-height: 40px; padding: 0 16px; border: 0; border-radius: 12px; background: transparent; color: var(--text); font: 500 15px/1 var(--display); cursor: pointer; transition: background .2s, color .2s; }
.pill:hover { background: rgba(202, 156, 246, .12); }
.pill.on { background: var(--cream); color: #12103a; font-weight: 600; }
.chip { display: inline-flex; align-items: center; gap: 8px; align-self: flex-start; padding: 7px 13px; border-radius: 999px; border: 1px solid var(--line); background: rgba(15, 12, 54, .6); font: 500 13px/1 var(--display); color: var(--muted); white-space: nowrap; backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.chip-sm { padding: 4px 10px; font-size: 12px; }
.chip-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); }
.chip-dot.ok, .chip.live .chip-dot { background: var(--green); box-shadow: 0 0 10px var(--green); }
.chip.live { color: var(--cream); }
.chip.live .chip-dot { animation: pulse 1.6s ease-in-out infinite; }
.eyebrow { font: 500 14px/1.4 var(--mono); color: var(--lav); letter-spacing: .02em; }
.panel { position: relative; border-radius: var(--radius); background: linear-gradient(180deg, rgba(34, 29, 102, .78), rgba(22, 19, 74, .78)); border: 1px solid var(--line); box-shadow: 0 1px 0 rgba(255, 255, 255, .06) inset, 0 30px 60px -30px rgba(0, 0, 0, .6); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.panel::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: linear-gradient(140deg, rgba(202, 156, 246, .5), rgba(202, 156, 246, 0) 35%, rgba(255, 79, 216, 0) 70%, rgba(255, 79, 216, .25)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.fine { font-size: 13.5px; line-height: 1.6; color: var(--dim); max-width: 72em; }
.fine a { color: var(--muted); }

/* ---------- hero */
.hero { position: relative; overflow: hidden; background: radial-gradient(120% 80% at 72% 100%, #2c1784 0%, rgba(44, 23, 132, 0) 60%), linear-gradient(180deg, var(--sky0) 0%, #110b45 55%, var(--sky1) 100%); }
.sky { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.nebula { position: absolute; border-radius: 50%; pointer-events: none; filter: blur(8px); opacity: .85; }
.n1 { width: 640px; height: 440px; left: -230px; bottom: 90px; background: radial-gradient(closest-side, rgba(146, 72, 255, .55), rgba(98, 40, 200, .25) 55%, rgba(60, 20, 140, 0)); animation: drift 26s ease-in-out infinite alternate; }
.n2 { width: 720px; height: 480px; right: -260px; bottom: 130px; background: radial-gradient(closest-side, rgba(170, 90, 255, .5), rgba(110, 50, 220, .22) 55%, rgba(60, 20, 140, 0)); animation: drift 32s ease-in-out infinite alternate-reverse; }
.n3 { width: 540px; height: 320px; left: 30%; top: -150px; background: radial-gradient(closest-side, rgba(70, 60, 220, .35), rgba(40, 30, 160, 0)); }
.topbar { position: relative; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-block: 20px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand-mark { width: 48px; height: 48px; border-radius: 14px; box-shadow: 0 0 0 1px var(--line), 0 8px 24px -8px rgba(142, 92, 242, .7); }
.brand-name { display: block; font: 700 26px/1 var(--display); color: var(--cream); letter-spacing: -0.02em; }
.brand-cmd { display: block; font: 400 13px/1.4 var(--mono); color: var(--muted); margin-top: 4px; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.navlink { display: inline-flex; align-items: center; gap: 8px; padding: 10px 14px; border-radius: 12px; color: var(--text); text-decoration: none; font-weight: 500; font-size: 15px; }
.navlink:hover { background: rgba(202, 156, 246, .12); color: var(--cream); }
.navlink svg { width: 18px; height: 18px; fill: currentColor; }
.hero-grid { position: relative; z-index: 3; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 24px; align-items: end; padding-top: 34px; }
.hero-copy { position: relative; z-index: 2; display: flex; flex-direction: column; gap: 26px; padding-bottom: 72px; min-width: 0; }
.hero h1 { font-size: clamp(48px, 7.4vw, 104px); line-height: .95; letter-spacing: -0.045em; }
.trail-word { position: relative; display: inline-block; color: var(--lav); }
.trail-line { position: absolute; left: 0; bottom: -0.16em; width: 100%; height: .3em; overflow: visible; }
.trail-line path { fill: none; stroke: var(--lav); stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 340; animation: draw 1.6s .5s cubic-bezier(.6, 0, .2, 1) both; filter: drop-shadow(0 0 6px rgba(202, 156, 246, .8)); }
.lead { font-size: clamp(18px, 1.6vw, 21px); line-height: 1.55; max-width: 34em; }
.lead b { color: var(--cream); font-weight: 600; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; }
.mood { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.mood-label, .mood-hint { font: 500 13.5px/1 var(--mono); color: var(--muted); }
.mood-hint { color: var(--dim); }
.stage { position: relative; height: 560px; min-width: 0; }
.floor { position: absolute; top: 86%; left: -150vw; right: -150vw; height: 900px; pointer-events: none;
  background: linear-gradient(180deg, rgba(120, 70, 255, .2) 0%, #1c1268 1.5%, #120c4a 22%, #0f0d36 46%); }
.floor::before { content: ""; position: absolute; left: 0; right: 0; top: 0; height: 2px; background: linear-gradient(90deg, rgba(255, 79, 216, 0), rgba(255, 79, 216, .85) 35%, rgba(202, 156, 246, 1) 50%, rgba(255, 79, 216, .85) 65%, rgba(255, 79, 216, 0)); box-shadow: 0 0 22px 3px rgba(202, 120, 255, .7); }
.floor::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(90deg, rgba(202, 156, 246, .05) 0 1px, transparent 1px 90px); -webkit-mask: linear-gradient(180deg, #000, transparent 40%); mask: linear-gradient(180deg, #000, transparent 40%); }
.ring { position: absolute; top: 92%; width: 46%; height: 12%; border-radius: 50%; border: 2px solid currentColor; transform: translate(-50%, -50%); background: radial-gradient(closest-side, color-mix(in srgb, currentColor 30%, transparent), transparent); box-shadow: 0 0 16px currentColor; opacity: .8; }
.ring.g { left: 50%; color: #00ff66; } .ring.m { left: 4%; color: var(--magenta); } .ring.b { left: 96%; color: var(--blue); }

/* ---------- sections */
.sec { position: relative; padding-top: clamp(90px, 11vw, 150px); }
.sec-first { padding-top: 0; margin-top: -40px; z-index: 4; }
.sec-head { display: flex; flex-direction: column; gap: 16px; max-width: 760px; margin-bottom: 44px; }
.sec h2 { font-size: clamp(36px, 5vw, 64px); line-height: 1.02; }
.sec-lead { font-size: 19px; max-width: 40em; }

/* download */
.dl { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); overflow: hidden;
  background: radial-gradient(80% 120% at 0% 0%, rgba(142, 92, 242, .32), rgba(142, 92, 242, 0) 60%), linear-gradient(180deg, rgba(34, 29, 102, .85), rgba(22, 19, 74, .85)); }
.dl-main { padding: clamp(26px, 4vw, 52px); display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.dl h2 { font-size: clamp(38px, 5vw, 66px); line-height: 1; }
.btn-xl { align-self: flex-start; min-height: 72px; padding: 0 30px 0 24px; border-radius: 22px; gap: 16px; text-align: left; }
.btn-xl span { display: flex; flex-direction: column; gap: 4px; font-size: 20px; }
.btn-xl small { font-size: 14px; font-weight: 500; color: #4a4472; }
.btn-xl svg { width: 28px; height: 28px; }
.dl-others { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.dl-btn { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border-radius: 16px; text-decoration: none; background: rgba(8, 6, 31, .45); border: 1px solid var(--line); transition: transform .15s, border-color .2s, background .2s; min-width: 0; }
.dl-btn:hover { transform: translateY(-2px); border-color: var(--line-hi); background: rgba(142, 92, 242, .14); }
.dl-btn.current { border-color: var(--line-hi); }
.dl-os { font: 700 17px/1.2 var(--display); color: var(--cream); }
.dl-note { font-size: 13.5px; color: var(--muted); }
.dl-side { padding: clamp(26px, 4vw, 52px); background: rgba(8, 6, 31, .4); border-left: 1px solid var(--line); display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.dl-count { display: flex; flex-direction: column; gap: 4px; }
.dl-count-k { font: 500 14px/1.4 var(--mono); color: var(--lav); }
.dl-count-v { font: 800 clamp(48px, 6vw, 80px)/1 var(--display); color: var(--cream); letter-spacing: -0.04em; font-variant-numeric: tabular-nums; text-shadow: 0 0 40px rgba(202, 156, 246, .45); }
.dl-count-n { font-size: 14.5px; color: var(--muted); }
.dl-split { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 8px; font-size: 14px; color: var(--muted); }
.dl-split b { color: var(--cream); font-variant-numeric: tabular-nums; }
.code { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 14px 12px 14px 18px; border-radius: 16px; background: #07061c; border: 1px solid var(--line); font: 500 13.5px/1.7 var(--mono); color: var(--cream); }
.code-lines { display: flex; flex-direction: column; min-width: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.code .p { color: var(--green); margin-right: 10px; }
.copy { flex: none; min-height: 38px; padding: 0 14px; border-radius: 10px; border: 1px solid var(--line); background: rgba(34, 29, 102, .8); color: var(--cream); font: 500 14px/1 var(--display); cursor: pointer; }
.copy:hover { border-color: var(--line-hi); }

/* token counter */
.counter { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); overflow: hidden; }
.counter-main { container-type: inline-size; padding: 34px clamp(20px, 3vw, 40px) 30px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.counter-lead { font-size: clamp(18px, 1.7vw, 22px); }
.odo { display: flex; align-items: flex-start; font: 700 clamp(34px, 13cqi, 110px)/1 var(--display); letter-spacing: -0.03em; color: var(--cream); font-variant-numeric: tabular-nums; }
.odo-col { display: inline-block; height: 1em; overflow: hidden; width: .6em; text-align: center; }
.odo-strip { display: flex; flex-direction: column; transition: transform .5s cubic-bezier(.3, .8, .3, 1); }
.odo-strip span { display: block; height: 1em; line-height: 1em; }
.odo-sep { display: inline-block; width: .24em; line-height: 1; }
.odo .dim { color: rgba(252, 235, 211, .16); }
.counter-sub { color: var(--muted); }
.counter-sub b { color: var(--cream); font-weight: 600; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 10px; border-top: 1px solid var(--line); }
.stat { padding: 16px 16px 0 0; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.stat + .stat { padding-left: 16px; border-left: 1px solid var(--line); }
.stat-k, .stat-n { font-size: 14px; color: var(--muted); }
.stat-v { font: 700 clamp(20px, 5.2cqi, 32px)/1.15 var(--display); color: var(--cream); letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.stat-v.o { color: var(--orange); } .stat-v.m { color: var(--mint); }
.tailf { background: rgba(8, 6, 31, .5); border-left: 1px solid var(--line); padding: 26px 0 22px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.tailf-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; padding-inline: 24px; font: 500 14px/1.4 var(--mono); color: var(--cream); }
.tailf-head .prompt { color: var(--green); }
.tailf-body { overflow-x: auto; padding-inline: 24px; font: 400 12.5px/1.95 var(--mono); white-space: nowrap; }
.csv-head { color: var(--dim); }
.row { border-radius: 6px; padding: 0 6px; margin-inline: -6px; }
.row.fresh { animation: fresh 1s ease-out; }
.c-ts { color: var(--dim); } .c-m { color: var(--lav); } .c-st { color: var(--green); } .c-tps { color: var(--orange); }
.tailf-note { padding-inline: 24px; font-size: 14px; color: var(--muted); }

/* costs */
.costs { padding: clamp(22px, 3vw, 40px); display: flex; flex-direction: column; gap: 26px; }
.costs-top { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 14px; }
.costs-title { font: 600 18px/1.3 var(--display); color: var(--cream); }
.bars { display: flex; flex-direction: column; }
.bar-row { display: grid; grid-template-columns: 230px 86px minmax(0, 1fr); align-items: center; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.bar-row:last-child { border-bottom: 0; }
.bar-name { font-weight: 600; color: var(--cream); font-size: 17px; line-height: 1.3; }
.bar-sub { font-size: 14px; color: var(--muted); }
.grade { justify-self: start; align-self: flex-start; padding: 5px 10px; border-radius: 10px; font: 700 14px/1 var(--mono); white-space: nowrap; }
.grade.hi { color: #0f2b20; background: #9be8c4; }
.grade.lo { color: #3a1606; background: #ffb27d; }
.bar-track { display: flex; align-items: center; min-width: 0; height: 38px; }
.bar-fill { height: 26px; flex: none; transform-origin: left center; transition: width .8s cubic-bezier(.3, .8, .3, 1); }
.bar-fill.cloud { border-radius: 8px; background: linear-gradient(90deg, #6a3fe0, var(--lav)); box-shadow: 0 0 22px rgba(142, 92, 242, .35); }
.bar-fill.elec { border-radius: 8px 0 0 8px; background: var(--green); box-shadow: 0 0 14px rgba(67, 224, 138, .6); min-width: 4px; }
.bar-fill.hw { border-radius: 0 8px 8px 0; background: repeating-linear-gradient(135deg, #2f8f63 0 6px, #267a54 6px 12px); }
.bars.grow .bar-fill { animation: grow 1.2s cubic-bezier(.3, .8, .3, 1) both; }
.bar-val { flex: none; margin-left: 12px; font: 600 16px/1.2 var(--display); color: var(--cream); font-variant-numeric: tabular-nums; white-space: nowrap; }
.bar-val small { font-weight: 400; color: var(--muted); font-size: 14px; }
.callouts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.callout { padding: 20px 22px; border-radius: 18px; background: rgba(8, 6, 31, .4); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.callout-v { font: 700 clamp(30px, 3.4vw, 44px)/1.05 var(--display); letter-spacing: -0.03em; color: var(--cream); font-variant-numeric: tabular-nums; }
.callout-v.g { color: var(--green); } .callout-v.o { color: var(--orange); }
.callout-t { font-size: 15.5px; color: var(--muted); line-height: 1.5; }
.callout-t b { color: var(--cream); font-weight: 600; }

/* price your own trail */
.trail { padding: clamp(22px, 3vw, 40px); display: flex; flex-direction: column; gap: 26px; }
.drop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: clamp(26px, 4vw, 44px) 20px; border-radius: 20px; border: 2px dashed var(--line-hi); background: rgba(8, 6, 31, .35); text-align: center; cursor: pointer; transition: border-color .2s, background .2s, transform .2s; }
.drop:hover, .drop:focus-visible { border-color: var(--lav); background: rgba(142, 92, 242, .1); }
.drop.over { border-color: var(--green); background: rgba(67, 224, 138, .1); transform: scale(1.01); }
.drop svg { width: 48px; height: 48px; fill: none; stroke: var(--lav); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.drop-main { font-size: 19px; color: var(--cream); }
.drop-main code { font-size: .85em; }
.drop-sub { font-size: 15px; color: var(--muted); max-width: 40em; }
.drop .btn { margin-top: 8px; }
.linkish { color: var(--lav); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.trail-status { min-height: 1.4em; font: 500 14px/1.4 var(--mono); color: var(--muted); }
.trail-status.ok { color: var(--green); } .trail-status.err { color: #ff9b9b; }
.trail-out { display: flex; flex-direction: column; gap: 22px; }
.trail-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.trail-tiles .stat + .stat { padding-left: 16px; border-left: 1px solid var(--line); }
.trail-tiles .stat-v { font-size: clamp(22px, 2.6vw, 34px); }
.trail-spark { width: 100%; height: 96px; display: block; }
.trail-inputs { display: flex; flex-wrap: wrap; gap: 10px 22px; font-size: 15px; color: var(--muted); }
.trail-inputs label { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.trail-inputs input { width: 5.5em; min-height: 36px; padding: 0 8px; border-radius: 10px; border: 1px solid var(--line); background: #07061c; color: var(--cream); font: 600 15px/1 var(--display); font-variant-numeric: tabular-nums; }
.trail-inputs .hint { color: var(--dim); font-size: 13px; }
.trail-row { display: grid; grid-template-columns: 300px minmax(0, 1fr); align-items: center; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.trail-row:last-child { border-bottom: 0; }
.trail-row.mine { border-top: 2px solid rgba(67, 224, 138, .35); margin-top: 6px; padding-top: 14px; }
.trail-row .bar-sub { font-size: 13px; }
.linkbtn { align-self: flex-start; border: 0; background: none; padding: 0; color: var(--lav); font: 500 15px/1.4 var(--display); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.trail-models { overflow-x: auto; }
.trail-models table { width: 100%; border-collapse: collapse; font-size: 15px; }
.trail-models th, .trail-models td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.trail-models th { color: var(--muted); font-weight: 500; font-size: 13.5px; }
.trail-models td:first-child { font-family: var(--mono); font-size: 13.5px; color: var(--lav); }
.trail-models .num { text-align: right; font-variant-numeric: tabular-nums; }

/* the portal */
.portal { padding: clamp(18px, 2.5vw, 30px); display: flex; flex-direction: column; gap: 18px; }
.portal-tabs { align-self: flex-start; }
.portal-fig { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.portal-frame { border-radius: 16px; overflow: hidden; border: 1px solid var(--line); background: #0b0a2a; box-shadow: 0 30px 60px -30px rgba(0, 0, 0, .7); }
.portal-frame img { display: block; width: 100%; height: auto; }
.portal-fig figcaption { font-size: 15px; color: var(--muted); max-width: 60em; }

/* faster but harder */
.duo { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.duo-card { padding: 30px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.duo-card h3 { font-size: 26px; }
.arrow { margin-top: 56px; display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 26px; align-items: start; }
.arrow svg { width: 72px; height: 72px; }
.arrow svg path { fill: none; stroke: var(--orange); stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.arrow blockquote { margin: 0; font: 500 clamp(24px, 3vw, 38px)/1.25 var(--display); color: var(--cream); letter-spacing: -0.02em; text-wrap: balance; max-width: 26em; }
.arrow blockquote em { font-style: normal; color: var(--orange); }

/* letter */
.letter { max-width: 860px; padding: clamp(28px, 4vw, 56px); display: flex; flex-direction: column; gap: 20px; }
.letter-meta { font: 400 13.5px/1.6 var(--mono); color: var(--muted); display: flex; flex-direction: column; }
.letter-meta b { color: var(--lav); font-weight: 500; }
.letter h2 { font-size: clamp(32px, 4vw, 48px); }
.letter p { font-size: 18.5px; line-height: 1.7; max-width: 36em; }
.letter .pull { font-size: 21px; color: var(--cream); border-left: 3px solid var(--orange); padding-left: 18px; }
.sign { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.sign-mark { width: 52px; height: 52px; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); }
.sign-name { font: 600 20px/1.3 var(--display); color: var(--cream); }
.sign-role { font-size: 15px; color: var(--muted); }

/* features */
.feat-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.feat { padding: 26px; display: flex; flex-direction: column; gap: 12px; min-width: 0; transition: transform .3s cubic-bezier(.3, .8, .3, 1), border-color .25s; }
.feat:hover { transform: translateY(-4px); border-color: var(--line-hi); }
.feat-ic { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; background: rgba(142, 92, 242, .16); border: 1px solid rgba(202, 156, 246, .28); }
.feat-ic svg { width: 24px; height: 24px; }
.feat-ic svg * { fill: none; stroke: var(--lav); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.feat h3 { font-size: 21px; letter-spacing: -0.015em; }
.feat p { color: var(--muted); font-size: 16px; }
.feat p b { color: var(--text); font-weight: 500; }

/* how it works */
.how { padding: clamp(24px, 3.5vw, 44px); display: flex; flex-direction: column; gap: 34px; }
.flow { display: grid; grid-template-columns: minmax(0, 1fr) 110px minmax(0, 1.1fr) 110px minmax(0, 1fr); align-items: center; }
.node { padding: 20px; border-radius: 18px; background: rgba(8, 6, 31, .5); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; min-width: 0; text-align: center; align-items: center; }
.node-t { font: 600 18px/1.25 var(--display); color: var(--cream); }
.node-s { font: 400 13px/1.5 var(--mono); color: var(--muted); }
.node.hub { border-color: var(--line-hi); box-shadow: 0 0 40px rgba(142, 92, 242, .3); }
.node .csv { margin-top: 8px; padding: 6px 10px; border-radius: 10px; background: rgba(67, 224, 138, .1); border: 1px solid rgba(67, 224, 138, .35); color: var(--green); font: 500 12.5px/1.2 var(--mono); }
.wire { height: 8px; background: linear-gradient(90deg, var(--lav) 0 7px, transparent 7px 20px) 0 50% / 20px 7px repeat-x; animation: flow .9s linear infinite; filter: drop-shadow(0 0 4px rgba(202, 156, 246, .9)); }
.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; counter-reset: s; }
.steps li { counter-increment: s; display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.steps li::before { content: counter(s); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--cream); color: #12103a; font: 700 16px/1 var(--display); }
.steps h3 { font-size: 19px; }
.steps p { color: var(--muted); font-size: 16px; }

/* faq */
.faq { display: flex; flex-direction: column; gap: 10px; max-width: 860px; }
.faq details { border: 1px solid var(--line); border-radius: 18px; background: rgba(26, 22, 82, .6); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 22px; font: 600 18px/1.35 var(--display); color: var(--cream); display: flex; justify-content: space-between; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--lav); font-weight: 400; font-size: 24px; line-height: 1; }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 22px 20px; color: var(--muted); max-width: 44em; }
.end-cta { margin-top: 70px; display: flex; flex-wrap: wrap; align-items: center; gap: 18px; font: 600 22px/1.3 var(--display); color: var(--cream); }

/* footer */
.foot { margin-top: 110px; border-top: 1px solid var(--line); background: rgba(8, 6, 31, .5); }
.foot-in { padding-block: 40px 30px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 18px 30px; color: var(--muted); font-size: 14.5px; }
.foot-brand { display: flex; flex-direction: column; gap: 6px; }
.foot .tag { font: 500 15px/1.4 var(--mono); color: var(--lav); }
.foot-links { display: flex; flex-wrap: wrap; gap: 6px 22px; align-items: flex-start; }
.foot-links a { color: var(--text); text-decoration: none; }
.foot-links a:hover { color: var(--cream); text-decoration: underline; }
.foot-note { grid-column: 1 / -1; font-size: 13px; color: var(--dim); }

/* Pip's speech bubble and the status strip */
.pip-bubble { position: fixed; left: 0; top: 0; z-index: 45; padding: 10px 15px; border-radius: 16px; background: var(--cream); color: #12103a; font: 600 15px/1.3 var(--display); white-space: nowrap; box-shadow: 0 10px 30px rgba(0, 0, 0, .35); pointer-events: none; opacity: 0; transition: opacity .25s; will-change: transform; }
.pip-bubble::after { content: ""; position: absolute; left: 50%; top: 100%; margin-left: -7px; border: 7px solid transparent; border-top-color: var(--cream); }
.pip-bubble.on { opacity: 1; }
.strip { position: fixed; z-index: 60; left: 0; right: 0; bottom: 0; padding: 0 max(18px, env(safe-area-inset-right, 0px)) env(safe-area-inset-bottom, 0px) max(18px, env(safe-area-inset-left, 0px)); background: rgba(7, 5, 29, .82); border-top: 1px solid var(--line); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.strip-in { max-width: 1200px; margin: 0 auto; height: 44px; display: flex; align-items: center; justify-content: space-between; gap: 16px; font: 400 13.5px/1 var(--mono); }
.strip-line { color: var(--cream); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.strip-line .p { color: var(--lav); margin-right: 8px; }
.strip-tag { color: var(--muted); white-space: nowrap; }

/* ---------- legal pages */
.legal-head { background: linear-gradient(180deg, var(--sky0), #140d4e); border-bottom: 1px solid var(--line); }
.legal { max-width: 780px; padding-block: 56px 40px; }
.legal h1 { font-size: clamp(38px, 5vw, 56px); line-height: 1.05; margin-bottom: 10px; }
.legal .updated { font: 500 14px/1.4 var(--mono); color: var(--lav); margin-bottom: 30px; }
.legal h2 { font-size: 24px; margin: 38px 0 10px; }
.legal p, .legal li { color: var(--text); font-size: 17px; line-height: 1.7; }
.legal p + p { margin-top: 14px; }
.legal ul { padding-left: 22px; margin: 12px 0; }
.legal li + li { margin-top: 6px; }
.legal table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 15.5px; }
.legal th, .legal td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal th { color: var(--cream); font-weight: 600; }
.table-box { overflow-x: auto; }
.legal .summary { padding: 20px 22px; border-radius: 18px; background: rgba(26, 22, 82, .7); border: 1px solid var(--line); }

/* 404 */
.lost { text-align: center; padding-top: 80px; }
.lost img { filter: drop-shadow(0 0 18px rgba(202, 156, 246, .45)); }
.lost-cta { margin-top: 24px; }

/* ---------- motion */
@keyframes pulse { 50% { opacity: .45; } }
@keyframes drift { to { transform: translate(40px, -20px) scale(1.06); } }
@keyframes draw { from { stroke-dashoffset: 340; } to { stroke-dashoffset: 0; } }
@keyframes fresh { from { background: rgba(202, 156, 246, .28); color: #fff; } to { background: rgba(202, 156, 246, 0); } }
@keyframes grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes flow { from { background-position: 0 50%; } to { background-position: 20px 50%; } }
@keyframes flow-v { from { background-position: 50% 0; } to { background-position: 50% 20px; } }

/* ---------- narrow screens */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr); padding-top: 12px; }
  .stage { height: 330px; order: -1; margin-top: -10px; }
  .hero-copy { padding-bottom: 64px; }
  .dl, .counter { grid-template-columns: minmax(0, 1fr); }
  .dl-side { border-left: 0; border-top: 1px solid var(--line); }
  .tailf { border-left: 0; border-top: 1px solid var(--line); }
  .callouts, .duo, .feat-grid, .steps { grid-template-columns: minmax(0, 1fr); }
  .trail-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 0; }
  .trail-tiles .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .trail-row { grid-template-columns: minmax(0, 1fr); gap: 6px; }
  .dl-others { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .flow { grid-template-columns: minmax(0, 1fr); }
  .wire { height: 44px; width: 8px; justify-self: center; background: linear-gradient(180deg, var(--lav) 0 7px, transparent 7px 20px) 50% 0 / 7px 20px repeat-y; animation-name: flow-v; }
  .bar-row { grid-template-columns: minmax(0, 1fr) auto; }
  .bar-track { grid-column: 1 / -1; }
  .navlink:not(.gh) { display: none; }
  .foot-in { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 560px) {
  .stats { grid-template-columns: minmax(0, 1fr); }
  .stat + .stat { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .dl-others { grid-template-columns: minmax(0, 1fr); }
  .btn-xl { align-self: stretch; }
  .pip-bubble { font-size: 13.5px; }
  .strip-tag { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
