:root {
  color-scheme: dark;
  --ink: #070C24;
  --deep: #0D1533;
  --deep-2: #111B40;
  --line: #1D2858;
  --pipe: #16214D;
  --track: #1E2A5C;
  --brand: #2B50FF;
  --brand-hi: #4466FF;
  --brand-ink: #FFFFFF;
  --brand-deep: #13205A;
  --brand-edge: #2A3A86;
  --accent: #8FA9FF;
  --mist: #A9B3E0;
  --off: #55608F;
  --white: #FFFFFF;
  --danger: #FF9A92;
  --ok: #5FE3A1;

  --c-kol: #d28e05;
  --c-newbies: #00a888;
  --c-holders: #338ced;
  --c-burn: #eb6263;
  --c-top5: #9887ef;
  --c-dev: #e24d8b;

  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Geist", "Segoe UI", system-ui, sans-serif;
  --radius: 14px;
  --gutter: 24px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; background: var(--ink); }
body {
  margin: 0;
  background: var(--ink);
  color: var(--white);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.intro-on { overflow: hidden; }
img, svg { display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--display); margin: 0; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.wrap { width: min(1180px, 100%); margin: 0 auto; padding: 0 var(--gutter); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; padding: 10px 18px; border-radius: 12px;
  font: 600 15px/1.2 var(--body); text-decoration: none; cursor: pointer;
  border: 1.5px solid transparent; transition: background .15s, border-color .15s, color .15s;
  white-space: nowrap;
}
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:hover { background: var(--brand-hi); }
.btn-ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,.28); }
.btn-ghost:hover { border-color: rgba(255,255,255,.6); }
.btn-lg { padding: 14px 24px; font-size: 16px; border-radius: 14px; }
.btn-sm { padding: 7px 12px; font-size: 14px; border-radius: 10px; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
/* a primary button is only disabled while it works (wallet / request): keep it blue, not mud */
.btn-primary[disabled], .btn-primary[aria-disabled="true"] { opacity: .68; cursor: progress; }

/* ---------- header ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  background: rgba(7, 12, 36, .78);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(29, 40, 88, .7);
}
.top-inner { display: flex; align-items: center; gap: 28px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { border-radius: 9px; }
.brand span { font: 800 26px/1 var(--display); letter-spacing: -0.04em; }
.top-nav { display: flex; gap: 26px; margin-left: auto; }
.top-nav a { position: relative; color: var(--mist); text-decoration: none; font-weight: 500; font-size: 15px; padding: 6px 0; }
.top-nav a:hover, .top-nav a[aria-current] { color: var(--white); }
.top-nav a[aria-current]::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: -2px; height: 2px; border-radius: 2px; background: var(--brand);
}
.top-actions { display: flex; align-items: center; gap: 10px; }
.menu-btn {
  display: none; width: 40px; height: 40px; border-radius: 12px; place-items: center; cursor: pointer;
  background: transparent; color: var(--white); border: 1.5px solid rgba(255,255,255,.22);
}
.menu-btn[aria-expanded="true"] { background: var(--deep-2); border-color: rgba(255,255,255,.45); }
.mobile-nav { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); box-shadow: 0 24px 40px rgba(3, 6, 20, .6); background: rgba(7, 12, 36, .96); }
.menu-btn .ico-close { display: none; }
.menu-btn[aria-expanded="true"] .ico-close { display: block; }
.menu-btn[aria-expanded="true"] .ico-menu { display: none; }
.mobile-nav .wrap { display: flex; flex-direction: column; padding-top: 8px; padding-bottom: 14px; }
.mobile-nav a { padding: 12px 0; color: var(--mist); text-decoration: none; font-weight: 600; font-size: 17px; border-bottom: 1px solid var(--line); }
.mobile-nav a:last-child { border-bottom: 0; color: var(--accent); }
.mobile-nav a[aria-current] { color: var(--white); }

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 64px 0 40px;
  background:
    radial-gradient(30% 26% at 50% 0, rgba(143, 169, 255, .16), rgba(143, 169, 255, 0) 70%),
    radial-gradient(60% 48% at 50% 0, rgba(43, 80, 255, .42), rgba(43, 80, 255, .10) 48%, rgba(43, 80, 255, 0) 72%),
    var(--ink);
}
.hero-inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.status {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(13, 21, 51, .8); border: 1px solid var(--line);
  color: var(--mist); font-size: 13px; font-weight: 500;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 4px rgba(143, 169, 255, .2); }
/* launch countdown pill: brighter, with a pulsing dot */
.status.is-soon { color: #fff; font-weight: 600; border-color: rgba(143, 169, 255, .45); background: rgba(43, 80, 255, .22); }
.status.is-soon .status-dot { background: #8FA9FF; animation: soon-pulse 1.8s ease-out infinite; }
@keyframes soon-pulse {
  0% { box-shadow: 0 0 0 0 rgba(143, 169, 255, .7); }
  100% { box-shadow: 0 0 0 9px rgba(143, 169, 255, 0); }
}
@media (prefers-reduced-motion: reduce) { .status.is-soon .status-dot { animation: none; } }
.token .status { margin-bottom: 14px; }

.wordmark {
  margin-top: 0.2em;
  font: 800 clamp(96px, 19vw, 216px)/0.86 var(--display);
  letter-spacing: -0.055em;
  font-variation-settings: "opsz" 96;
}
.wm-i { position: relative; display: inline-block; }
/* Measured from Bricolage Grotesque 800: the stem of "ı" runs 0.035em to 0.195em
   from the glyph origin and tops out at 0.53em above the baseline. Letter-spacing
   makes the span narrower than the ink, so the drop is placed on the ink, not on
   the span's middle. It sits one dot-gap above the stem like a real i-dot. */
.wm-drop {
  position: absolute; left: 0.115em; top: -0.105em;
  width: 0.18em; height: auto; transform: translateX(-50%);
  fill: url(#wmDropFill) var(--brand);
  filter: drop-shadow(0 0 0.05em rgba(43, 80, 255, .55));
}
.tagline {
  margin-top: 22px;
  font: 700 clamp(24px, 3.2vw, 36px)/1.15 var(--display);
  letter-spacing: -0.03em;
  text-wrap: balance;
}
.lede { margin-top: 14px; max-width: 34em; color: var(--mist); }
.chips { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 24px 0 0; padding: 0; max-width: 940px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: 999px;
  background: rgba(13, 21, 51, .7); border: 1px solid var(--line);
  color: var(--mist); font-size: 14px;
}
.swatch { width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }
.cta { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 28px; }

.hero-viz { margin: 56px auto 0; }
.viz-caption { margin-top: 10px; text-align: center; color: var(--mist); font-size: 14px; }

.facts {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  margin-top: 48px; padding-top: 32px; border-top: 1px solid var(--line);
}
.fact { display: flex; flex-direction: column; gap: 4px; }
.fact strong { font: 700 40px/1 var(--display); letter-spacing: -0.04em; }
.fact span { color: var(--mist); font-size: 15px; }

/* ---------- pipes diagram ---------- */
.pipes-host { width: 100%; }
.pipes-host svg { width: 100%; height: auto; overflow: visible; }
.pipes-host .casing { stroke: var(--pipe); fill: none; stroke-linecap: round; }
.pipes-host .liquid { fill: none; stroke-linecap: round; transition: stroke-width .35s ease; }
.pipes-host .flow { fill: none; stroke: rgba(255,255,255,.7); stroke-width: 2.4; stroke-linecap: round; stroke-dasharray: 0.1 16; animation: flow 1.1s linear infinite; }
.pipes-host .tank-body { fill: var(--deep); stroke: var(--line); stroke-width: 2; }
.pipes-host .tank-liquid { fill: var(--brand); }
.pipes-host .tank-shine { fill: rgba(255,255,255,.10); }
.pipes-host .tank-label { fill: var(--white); font: 700 15px var(--body); }
.pipes-host .tank-sub { fill: var(--mist); font: 500 12px var(--body); }
.pipes-host .pct { fill: var(--white); font: 700 20px var(--display); letter-spacing: -0.02em; }
.pipes-host .pct.off { fill: var(--off); }
.pipes-host .name { fill: var(--mist); font: 500 13px var(--body); }
.pipes-host .name.mini { font-size: 11px; }
.pipes-host .drop { transform-box: fill-box; transform-origin: center top; animation: drip 2.2s cubic-bezier(.55,.05,.75,.4) infinite; }
.pipes-host .outlet-cap { fill: var(--pipe); }
.pipes-host .hit { fill: transparent; }

@keyframes flow { to { stroke-dashoffset: -16.1; } }
@keyframes drip {
  0% { transform: translateY(0) scale(.4); opacity: 0; }
  15% { transform: translateY(0) scale(1); opacity: 1; }
  70% { transform: translateY(14px) scale(1); opacity: 1; }
  100% { transform: translateY(20px) scale(.9); opacity: 0; }
}

/* ---------- sections ---------- */
.section { padding: 112px 0; border-top: 1px solid var(--line); }
.section-head { max-width: 640px; margin-bottom: 40px; }
.section-head h2 { font-weight: 800; font-size: clamp(36px, 4.6vw, 56px); line-height: 1; letter-spacing: -0.045em; }
.section-head p { margin-top: 16px; color: var(--mist); }
.fine { margin-top: 18px; color: var(--mist); font-size: 14px; }

/* outlets */
.outlet-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.outlet-list li { padding: 26px 26px 30px 0; border-bottom: 1px solid var(--line); }
.outlet-list li:nth-child(3n+2), .outlet-list li:nth-child(3n+3) { padding-left: 26px; border-left: 1px solid var(--line); }
.outlet-list h3 { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.outlet-list h3 .swatch { width: 12px; height: 12px; }
.outlet-list p { margin-top: 8px; color: var(--mist); font-size: 16px; }

/* builder */
.phase-tabs { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 24px; }
.phase-tab {
  display: flex; flex-direction: column; align-items: flex-start; gap: 2px;
  padding: 12px 18px; border-radius: 14px; cursor: pointer;
  background: var(--deep); border: 1.5px solid var(--line); color: var(--white);
  font: 700 17px/1.2 var(--display); letter-spacing: -0.01em; text-align: left;
}
.phase-tab small { font: 500 13px var(--body); color: var(--mist); letter-spacing: 0; }
.phase-tab .when-short { display: none; }
@media (max-width: 400px) {
  .phase-tab .when-full { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .phase-tab .when-short { display: inline; white-space: nowrap; }
}
.phase-tab[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-deep); box-shadow: inset 0 0 0 1px var(--brand); }

.builder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); gap: 40px; align-items: start; }
.builder-controls { background: var(--deep); border: 1px solid var(--line); border-radius: 20px; padding: 8px 24px; }
.slider-row { display: grid; grid-template-columns: minmax(0, 1fr) 56px; gap: 4px 14px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.slider-row label { display: flex; align-items: center; gap: 10px; font-weight: 600; }
.slider-row .rule { grid-column: 1 / -1; color: var(--mist); font-size: 14px; line-height: 1.45; }
.slider-row output.is-zero { color: var(--off); }
.slider-row output { justify-self: end; font: 700 20px/1 var(--display); font-variant-numeric: tabular-nums; align-self: center; }
.slider-row input[type="range"] { grid-column: 1 / -1; margin-top: 8px; }

input[type="range"] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 24px; background: transparent; cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 8px; border-radius: 99px;
  background: linear-gradient(to right, var(--c) 0 var(--v), var(--track) var(--v) 100%);
}
input[type="range"]::-moz-range-track { height: 8px; border-radius: 99px; background: var(--track); }
input[type="range"]::-moz-range-progress { height: 8px; border-radius: 99px; background: var(--c); }
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 22px; height: 22px; margin-top: -7px; border-radius: 50%;
  background: var(--white); border: 4px solid var(--c); box-shadow: 0 2px 8px rgba(0,0,0,.4);
}
input[type="range"]::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: var(--white); border: 4px solid var(--c); }
input[type="range"]:focus-visible { outline: none; }
input[type="range"]:focus-visible::-webkit-slider-thumb { box-shadow: 0 0 0 4px rgba(143, 169, 255, .6); }
input[type="range"]:focus-visible::-moz-range-thumb { box-shadow: 0 0 0 4px rgba(143, 169, 255, .6); }

.connect-card input {
  background: var(--ink); color: var(--white); border: 1.5px solid var(--line); border-radius: 10px;
  font: 600 16px var(--body); padding: 10px 12px;
}
.connect-card input:focus { outline: none; border-color: var(--accent); }
.connect-card input::placeholder { font-family: var(--body); }
.connect-card input[aria-invalid="true"],
.connect-card input[aria-invalid="true"]:focus { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(255, 154, 146, .18); }
.slider-row:last-child { border-bottom: 0; }

.builder-viz { position: sticky; top: 92px; }
.builder-viz .fine { max-width: 52ch; }

.builder-foot { display: flex; align-items: center; gap: 18px; margin-top: 32px; flex-wrap: wrap; }
.builder-foot p { color: var(--mist); font-size: 14px; max-width: 46ch; }

/* phases */
.phase-track { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; }
.phase-step { position: relative; display: flex; flex-direction: column; align-items: flex-start; padding: 24px 24px 26px; border-top: 3px solid var(--line); transition: border-color .2s; }
.phase-step .stack-slot { align-self: stretch; }
.phase-step + .phase-step { border-left: 1px solid var(--line); }
.phase-step.is-active { border-top-color: var(--brand); }
.phase-step .when { color: var(--mist); font-size: 14px; }
.phase-step h3 { margin-top: 6px; font-size: 26px; letter-spacing: -0.03em; display: flex; align-items: baseline; gap: 10px; }
.phase-step h3 .n { font: 600 15px var(--body); color: var(--accent); letter-spacing: 0; }
.phase-step .line-mark {
  position: absolute; top: -15px; left: -1px; transform: translateX(-50%);
  background: var(--ink); color: var(--white); border: 1px solid var(--line);
  padding: 2px 8px; border-radius: 99px; font-size: 12px; font-weight: 600;
}
.phase-step .lead { margin-top: 14px; color: var(--mist); font-size: 15px; }
.phase-step .lead { margin-bottom: 16px; }
.phase-step .edit { margin-top: auto; }
@media (min-width: 641px) { .phase-step:first-child { padding-left: 0; } }

.stack { display: flex; gap: 2px; height: 12px; margin-top: 16px; }
.stack span { background: var(--c); min-width: 0; transition: flex-grow .3s ease; }
.stack span:first-child { border-radius: 4px 0 0 4px; }
.stack span:last-child { border-radius: 0 4px 4px 0; }
.stack span:only-child { border-radius: 4px; }

/* recipes */
.recipes-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start; }
.table-scroll { position: relative; overflow-x: auto; }
.recipes-table { width: 100%; border-collapse: collapse; min-width: 560px; }
.recipes-table th { text-align: left; color: var(--mist); font-weight: 500; font-size: 13px; padding: 0 12px 10px 0; border-bottom: 1px solid var(--line); }
.recipes-table td { padding: 16px 12px 16px 0; border-bottom: 1px solid var(--line); vertical-align: middle; font-variant-numeric: tabular-nums; }
.recipes-table .coin { display: flex; align-items: center; gap: 10px; font-weight: 700; white-space: nowrap; overflow-wrap: anywhere; }
.recipes-table .coin-sub { display: none; }
.recipes-table .avatar { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 800 13px var(--display); color: var(--ink); }
.recipes-table .stack { margin: 0; width: 160px; }
.recipes-table .up { color: #5FE3A1; font-weight: 600; }
.recipes-table .down { color: #FF9A92; font-weight: 600; }
.recipes-table td:last-child { text-align: right; padding-right: 0; }
.table-scroll[hidden], .drips ul:empty, [hidden] { display: none; }

.empty-panel { background: var(--deep); border: 1px solid var(--line); border-radius: 20px; padding: 28px 24px; color: var(--mist); }
.empty-panel h3 { font-size: 20px; letter-spacing: -0.02em; color: var(--white); }
.empty-panel p { margin: 8px 0 18px; max-width: 46ch; }
.drips-empty { margin: 12px 0 4px; color: var(--mist); }

.drips { background: var(--deep); border: 1px solid var(--line); border-radius: 20px; padding: 28px 24px; }
.drips h3 { font-size: 20px; letter-spacing: -0.02em; }
.drips ul { list-style: none; margin: 14px 0 0; padding: 0; }
.drips li { padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 15px; overflow-wrap: anywhere; }
.drips li:last-child { border-bottom: 0; }
.drips .amt { font-weight: 700; }
.drips .ago { display: block; color: var(--mist); font-size: 13px; margin-top: 2px; }

/* connect */
.connect-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 440px); gap: 56px; align-items: center; }
.steps { margin: 0; padding: 0; list-style: none; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 18px 0 18px 56px; border-top: 1px solid var(--line); color: var(--mist); }
.steps li strong { color: var(--white); display: block; font-size: 18px; }
.steps li::before {
  content: counter(step); position: absolute; left: 0; top: 18px;
  width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center;
  background: var(--brand); color: var(--brand-ink); font: 800 16px var(--display);
}
.connect-card {
  display: flex; flex-direction: column; gap: 12px;
  background: linear-gradient(180deg, var(--brand-deep), var(--deep)); border: 1px solid var(--brand-edge); border-radius: 22px; padding: 28px;
}
.connect-card label { font-weight: 600; }
.connect-card input { width: 100%; font-family: ui-monospace, Consolas, monospace; font-size: 15px; padding: 14px; }
.form-msg { min-height: 1.5em; font-size: 14px; color: var(--mist); }
.form-msg.is-error { color: var(--danger); }
.form-msg.is-ok { color: #8FE9BC; }

/* token */
.token {
  background:
    radial-gradient(28% 40% at 50% 100%, rgba(143, 169, 255, .12), rgba(143, 169, 255, 0) 70%),
    radial-gradient(50% 80% at 50% 100%, rgba(43, 80, 255, .30), rgba(43, 80, 255, .08) 45%, rgba(43, 80, 255, 0) 70%),
    var(--ink);
}
.token-inner { text-align: center; display: flex; flex-direction: column; align-items: center; }
.token h2 { font-weight: 800; font-size: clamp(56px, 10vw, 120px); letter-spacing: -0.035em; line-height: .9; }
.token p { margin-top: 18px; color: var(--mist); max-width: 30em; text-wrap: balance; }
.ca { display: inline-flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; border-radius: 14px; background: var(--deep); border: 1px solid var(--line); }
.ca span { color: var(--mist); font-size: 14px; }
.ca code { font: 600 15px ui-monospace, Consolas, monospace; color: var(--white); }

/* footer */
.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; }
.foot-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.foot p, .x-soon { color: var(--mist); font-size: 14px; }

/* ---------- intro ---------- */
.intro {
  position: fixed; inset: 0; z-index: 100;
  background: #060A1F;
  --hx: 50vw; --hy: 50vh; --r: 0px;
  -webkit-mask-image: radial-gradient(circle at var(--hx) var(--hy), transparent var(--r), #000 calc(var(--r) + 1px));
  mask-image: radial-gradient(circle at var(--hx) var(--hy), transparent var(--r), #000 calc(var(--r) + 1px));
  animation: intro-failsafe 0s linear 7s forwards;
}
@keyframes intro-failsafe { to { visibility: hidden; pointer-events: none; } }
.intro-floor { position: absolute; left: 0; right: 0; top: 64%; bottom: 0; background: linear-gradient(180deg, #0D1748, #0A1238); }
.intro-floor::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 1px; background: rgba(143, 169, 255, .18); }
.intro-wheel {
  position: absolute; left: 50%; top: 64%;
  width: 180px; height: 180px; margin: -180px 0 0 -90px;
  transform: translateX(-70vw) rotate(-540deg);
  filter: drop-shadow(0 18px 18px rgba(0,0,0,.45));
  will-change: transform, opacity;
}
.intro-ring {
  position: absolute; left: var(--hx); top: var(--hy);
  width: calc(var(--r) * 2); height: calc(var(--r) * 2);
  transform: translate(-50%, -50%); border-radius: 50%;
  border: 4px solid #8FA9FF;
  box-shadow: 0 0 24px 4px rgba(43, 80, 255, .9), 0 0 90px 20px rgba(68, 102, 255, .45), inset 0 0 30px rgba(143, 169, 255, .5);
  opacity: 0; pointer-events: none;
}
.intro-skip {
  position: absolute; right: 20px; bottom: 20px;
  background: transparent; border: 1px solid rgba(255,255,255,.2); color: var(--mist);
  border-radius: 10px; padding: 6px 12px; font: 500 13px var(--body); cursor: pointer;
}
.intro-skip:hover { color: var(--white); border-color: rgba(255,255,255,.5); }

/* ---------- responsive ---------- */
@media (max-width: 980px) {
  .builder { grid-template-columns: minmax(0, 1fr); }
  .builder-viz { position: static; order: -1; }
  .recipes-grid { grid-template-columns: minmax(0, 1fr); }
  .connect-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .outlet-list { grid-template-columns: repeat(2, 1fr); }
  .outlet-list li:nth-child(n) { padding: 24px 22px 26px 0; border-left: 0; }
  .outlet-list li:nth-child(2n) { padding-left: 22px; border-left: 1px solid var(--line); }
}
@media (width <= 860px) {
  .chips { max-width: 440px; }
  .top-nav { display: none; }
  .top-inner { justify-content: space-between; }
  .menu-btn { display: grid; }
  .facts { grid-template-columns: repeat(2, 1fr); }
}
@media (width > 860px) {
  .mobile-nav { display: none; }
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
  body { font-size: 16px; }
  .top-inner { height: 60px; gap: 12px; }
  .brand span { font-size: 23px; }
  .top .btn { padding: 8px 12px; font-size: 14px; }
  .hero { padding-top: 40px; }
  .section { padding: 72px 0; }
  .outlet-list { grid-template-columns: 1fr; }
  .outlet-list li:nth-child(n) { padding: 20px 0 22px; border-left: 0; }
  .phase-track { grid-template-columns: 1fr; }
  .phase-step { padding: 22px 0 24px; }
  .phase-step + .phase-step { border-left: 0; margin-top: 18px; }
  .phase-step .line-mark { left: auto; right: 0; transform: none; }
  .builder-controls { padding: 4px 16px; }
  .slider-row .rule { display: none; }
  .fact strong { font-size: 32px; }
  .connect-card { padding: 20px; }
  .cta .btn { flex: 1 1 100%; }
  .hide-sm { display: none; }
  .phase-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; }
  .phase-tab { padding: 10px 10px; font-size: 15px; }
  .phase-tab small { font-size: 12px; }
  .builder-foot .btn { flex: 1 1 auto; }

  .recipes-table { min-width: 0; }
  .recipes-table th:nth-child(3), .recipes-table td:nth-child(3),
  .recipes-table th:nth-child(4), .recipes-table td:nth-child(4) { display: none; }
  .recipes-table .stack { width: 100%; min-width: 64px; }
  .recipes-table .coin-sub { display: block; color: #5FE3A1; font: 500 12px var(--body); margin-top: 2px; }
  .recipes-table .coin-sub.down { color: #FF9A92; }
  .recipes-table .coin { align-items: flex-start; }
  .recipes-table .avatar { margin-top: 2px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .pipes-host .flow, .pipes-host .drop { animation: none; }
  .pipes-host .drop { opacity: 1; }
  .pipes-host .liquid, .stack span { transition: none; }
}

/* registration form (API mode) */
/* ticker block: same label-to-field rhythm as the CA field, a little air above it */
#tickerField:not([hidden]) { display: flex; flex-direction: column; gap: 12px; margin-top: 6px; }
.ticker-wrap { position: relative; display: flex; align-items: center; }
.ticker-wrap span {
  position: absolute; left: 15px; top: 50%; transform: translateY(-50%); pointer-events: none;
  color: var(--mist); font: 600 15px ui-monospace, Consolas, monospace;
}
.connect-card .ticker-wrap input { flex: 1; padding-left: 30px; }
.form-note { margin: 0; font-size: 14px; line-height: 1.45; color: var(--mist); }
/* connected wallet reads as a status pill, not a stray line of code */
.wallet-line { margin: 0; font-family: ui-monospace, Consolas, monospace; font-size: 14px; color: var(--mist); }
.wallet-line:not([hidden]) {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  padding: 5px 12px 5px 10px; border-radius: 999px; color: var(--white);
  background: rgba(95, 227, 161, .08); border: 1px solid rgba(95, 227, 161, .28);
}
.wallet-line:not([hidden])::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(95, 227, 161, .18); }
/* result panel (pipe made / reserved) */
.connect-card h3 { font-size: 24px; letter-spacing: -0.02em; line-height: 1.1; }
.pipe-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 10px; margin: 0; }
.pipe-addr {
  min-width: 0; font-family: ui-monospace, Consolas, monospace; font-size: 14px; line-height: 1.45; color: var(--white);
  word-break: break-all; padding: 10px 12px; background: var(--ink); border: 1.5px solid var(--line); border-radius: 10px;
}

/* ---------- launch page ---------- */
.status.is-devnet { border-color: rgba(255, 196, 92, .5); background: rgba(255, 176, 32, .14); }
.status.is-devnet .status-dot { background: #FFC45C; animation: none; box-shadow: 0 0 0 4px rgba(255, 196, 92, .2); }
.status-dot.ok { background: var(--ok); box-shadow: 0 0 0 4px rgba(95, 227, 161, .2); }
.launch-head {
  padding: 56px 0 36px;
  background:
    radial-gradient(40% 70% at 50% 0, rgba(43, 80, 255, .38), rgba(43, 80, 255, 0) 72%),
    var(--ink);
}
.launch-head .wrap { display: flex; flex-direction: column; align-items: flex-start; }
.launch-head h1 { margin-top: 18px; font-weight: 800; font-size: clamp(44px, 7vw, 84px); line-height: .95; letter-spacing: -0.045em; }
.launch-head .lede { margin-top: 14px; }
.launch-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 420px); gap: 40px; align-items: start; padding-bottom: 96px; }
.launch-form { gap: 18px; }
.launch-form .field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.launch-form .field-label, .launch-form label:not(.check):not(.drop) { font-weight: 600; }
.launch-form small { color: var(--mist); font-weight: 500; font-size: 13px; }
.launch-form input, .launch-form textarea {
  width: 100%; background: var(--ink); color: var(--white); border: 1.5px solid var(--line); border-radius: 10px;
  font: 500 16px var(--body); padding: 12px 14px;
}
.launch-form textarea { resize: vertical; min-height: 84px; line-height: 1.45; }
.launch-form input:focus, .launch-form textarea:focus { outline: none; border-color: var(--accent); }
.launch-form [aria-invalid="true"], .launch-form [aria-invalid="true"]:focus { border-color: var(--danger); box-shadow: 0 0 0 3px rgba(255, 154, 146, .18); }
.launch-form .ticker-wrap input { padding-left: 30px; font-family: ui-monospace, Consolas, monospace; text-transform: none; }
.field-row { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 14px; }
.drop {
  display: grid; place-items: center; min-height: 150px; padding: 14px; cursor: pointer; text-align: center;
  border: 1.5px dashed var(--brand-edge); border-radius: 14px; background: rgba(7, 12, 36, .6); transition: border-color .15s, background .15s;
}
.drop:hover, .drop.is-over, .drop:focus-visible { border-color: var(--accent); background: rgba(43, 80, 255, .10); }
.drop[aria-invalid="true"] { border-color: var(--danger); }
.drop img { width: 120px; height: 120px; object-fit: cover; border-radius: 14px; }
.drop-text { display: flex; flex-direction: column; gap: 4px; color: var(--mist); font-size: 14px; }
.drop-text strong { color: var(--white); font-size: 16px; }
.links-box { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; }
.links-box summary { cursor: pointer; font-weight: 600; }
.links-box[open] summary { margin-bottom: 12px; }
.links-box .field + .field { margin-top: 12px; }
.sol-wrap { position: relative; display: flex; align-items: center; }
.sol-wrap span { position: absolute; right: 14px; color: var(--mist); font-weight: 600; pointer-events: none; }
.launch-form .sol-wrap input { padding-right: 56px; font-variant-numeric: tabular-nums; }
.cost { margin: 0; padding: 14px 16px; border-radius: 12px; background: rgba(7, 12, 36, .55); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 8px; }
.cost div { display: flex; justify-content: space-between; gap: 12px; font-size: 15px; }
.cost dt { color: var(--mist); }
.cost dt small { display: block; font-size: 12px; }
.cost dd { margin: 0; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; color: var(--mist); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; flex: none; accent-color: var(--brand); }
.check input[aria-invalid="true"] { outline: 2px solid var(--danger); outline-offset: 2px; }
.launch-side { display: flex; flex-direction: column; gap: 20px; position: sticky; top: 92px; }
.preview-card { display: flex; gap: 16px; align-items: center; background: var(--deep); border: 1px solid var(--line); border-radius: 20px; padding: 18px; }
.preview-img { width: 84px; height: 84px; flex: none; border-radius: 16px; background: var(--deep-2) center / cover no-repeat; border: 1px solid var(--line); }
.preview-img:not(.has-img) { background-image: url("/assets/logo-3d-blue-128.png"); opacity: .5; }
.preview-text { min-width: 0; }
.preview-name { font: 700 20px/1.15 var(--display); letter-spacing: -0.02em; overflow-wrap: anywhere; }
.preview-sym { color: var(--accent); font: 600 14px ui-monospace, Consolas, monospace; margin-top: 2px; }
.preview-desc { color: var(--mist); font-size: 14px; margin-top: 6px; overflow-wrap: anywhere; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.recipe-card { background: var(--deep); border: 1px solid var(--line); border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.recipe-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.recipe-head h3 { font-size: 20px; letter-spacing: -0.02em; }
.recipe-phases { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 16px; }
.recipe-phases .stack { margin-top: 8px; }
.rp-head { font-size: 15px; }
.rp-head span { color: var(--mist); font-size: 13px; }
.rp-legend { display: flex; flex-wrap: wrap; gap: 4px 12px; margin-top: 8px; font-size: 13px; color: var(--mist); }
.rp-legend span { display: inline-flex; align-items: center; gap: 6px; }
.rp-legend span.is-zero { color: var(--off); }
.rp-legend i { width: 8px; height: 8px; border-radius: 2px; background: var(--c); }
.rp-legend span.is-zero i { opacity: .4; }
.launch-done { padding: 64px var(--gutter) 96px; }
.done-card { max-width: 640px; margin: 0 auto; gap: 16px; }
.done-card .status { align-self: flex-start; }
.done-card h2 { font-weight: 800; font-size: clamp(36px, 5vw, 56px); line-height: 1; letter-spacing: -0.04em; }
.done-rows { display: flex; flex-direction: column; gap: 12px; }
.done-rows > div > span { display: block; color: var(--mist); font-size: 13px; margin-bottom: 6px; }
.done-cta { justify-content: flex-start; margin-top: 8px; }
.top-nav a[aria-current="page"] { color: var(--white); }
@media (max-width: 980px) {
  .launch-grid { grid-template-columns: minmax(0, 1fr); }
  .launch-side { position: static; order: -1; }
}
@media (max-width: 640px) {
  .launch-head { padding-top: 36px; }
  .field-row { grid-template-columns: minmax(0, 1fr); }
  .launch-grid { padding-bottom: 64px; }
  .done-cta .btn { flex: 1 1 100%; }
}

/* Launch form refinements */
.launch-page .top-inner { gap: 18px; }
.launch-page .top-nav { margin-left: auto; }
.launch-page #connectWallet { flex: none; white-space: nowrap; }
.launch-page #connectWallet.is-connected { border-color: var(--ok); color: var(--ok); }
.launch-countdown { margin-top: 16px; color: var(--accent); font-variant-numeric: tabular-nums; }
.launch-recipe { padding: 18px; background: rgba(7, 12, 36, .45); }
.launch-recipe h2 { font-size: 22px; letter-spacing: -.02em; }
.recipe-total { color: var(--ok); font-size: 13px; white-space: nowrap; }
.launch-recipe .phase-tabs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 6px; margin: 4px 0 0; }
.launch-recipe .phase-tab { padding: 10px 8px; font-size: 15px; }
.launch-recipe .phase-tab small { font-size: 12px; }
.launch-recipe .slider-row { padding: 12px 0; }
.launch-form .slider-row input[type="range"] { padding: 0; border: 0; background: transparent; }
.launch-recipe .recipe-phases { padding-top: 14px; border-top: 1px solid var(--line); }
.launch-page button:focus-visible, .launch-page a:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.launch-page input:disabled { opacity: .65; cursor: not-allowed; }
@media (max-width: 640px) {
  .launch-recipe { padding: 14px; }
  .launch-recipe .recipe-head { flex-wrap: wrap; gap: 6px; }
  .launch-recipe .phase-tab small { font-size: 11px; }
  .launch-page #connectWallet { max-width: 190px; overflow: hidden; text-overflow: ellipsis; }
}

/* Keep the accessible file input from inheriting full-width field dimensions. */
.launch-form input.sr-only { width: 1px; height: 1px; padding: 0; border: 0; }
.launch-form, .launch-side, .launch-recipe, .launch-recipe .phase-tab { min-width: 0; }
.launch-head h1, .launch-countdown, .launch-form .form-note { overflow-wrap: anywhere; }
@media (min-width: 861px) and (max-width: 1080px) {
  .launch-page .top-nav { gap: 12px; }
  .launch-page .top-nav a { font-size: 13px; }
}
