/*
 * Neuropolypse design system (css/np.css). Every page loads this one file; pages may add their own sheet.
 * Measurements: reference/requests/MEASURE.md. Brief: reference/STYLE.md. How to build a page:
 * reference/requests/PAGE-TEMPLATE.md. CSP-safe: no inline styles anywhere, JS only touches the CSSOM.
 *
 * Sections: 1 fonts  2 tokens  3 reset  4 type  5 layout  6 buttons  7 header  8 menus  9 frames and panels
 * 10 surfaces (scanlines, stars, sparkle)  11 hero  12 sections (intro, product rows, foundations, updates,
 * cta)  13 footer  14 forms, tables, tabs, tags  15 toasts, modal, wallet  16 reveal and motion  17 utilities
 */

/* ------------------------------------------------------------------------------------------ 1 fonts */

@font-face { font-family: 'Polyp Serif'; src: url('/fonts/polyp-serif.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Pixelify Sans'; src: url('/fonts/pixelify-sans-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Pixelify Sans'; src: url('/fonts/pixelify-sans-500.woff2') format('woff2'); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: 'Pixelify Sans'; src: url('/fonts/pixelify-sans-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Geist Pixel'; src: url('/fonts/geist-pixel-square.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Geist Mono'; src: url('/fonts/geist-mono-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
/* metric-matched fallbacks (tools/brand/fallbacks.py): no layout shift when the web fonts swap in */
@font-face { font-family: 'Polyp Serif Fallback'; src: local('Georgia'), local('Times New Roman'); size-adjust: 89.95%; ascent-override: 111.18%; descent-override: 34.74%; line-gap-override: 0%; }
@font-face { font-family: 'Geist Pixel Fallback'; src: local('Arial'), local('Helvetica'); size-adjust: 109.13%; ascent-override: 92.09%; descent-override: 27.03%; line-gap-override: 0%; }
@font-face { font-family: 'Pixelify Fallback'; src: local('Arial'), local('Helvetica'); size-adjust: 106.24%; ascent-override: 86.6%; descent-override: 26.36%; line-gap-override: 0%; }
@font-face { font-family: 'Geist Mono Fallback'; src: local('Menlo'), local('Courier New'); size-adjust: 99.98%; ascent-override: 100.52%; descent-override: 29.5%; line-gap-override: 0%; }

/* ------------------------------------------------------------------------------------------ 2 tokens */

:root {
  color-scheme: dark;
  /* ink */
  --ink-0: #080807;      /* hero, deep panels */
  --ink-1: #110f0d;      /* raised */
  --ink-2: #1a1714;      /* surface */
  --ink-3: #24201c;      /* surface hover */
  --ink-4: #2e2924;      /* strong borders */
  --page: #15110e;       /* section background (warm black) */
  --line: rgba(255, 255, 255, .10);
  --line-2: rgba(255, 255, 255, .16);
  /* text */
  --fg: #fafaf7;
  --fg-2: #cecdc9;
  --fg-3: #9f9b92;
  --fg-4: #88837a;      /* small text: >= 4.7:1 on every ink surface (AA) */
  /* paper */
  --paper: #ffffff;
  --paper-2: #e6e5e0;
  --paper-3: #cfcdc5;
  --on-paper: #1c1916;
  --on-paper-2: #6b665e;
  /* accent */
  --acc: #2fd16b;
  --acc-hi: #6ff29a;
  --acc-lo: #178a43;
  --acc-deep: #0c3d1f;
  --on-acc: #04130a;
  --bio: #39f0c0;
  /* status */
  --up: #2fd16b;
  --down: #ff6b5a;
  --pending: #f2c14c;
  /* fonts */
  --f-display: 'Polyp Serif', 'Polyp Serif Fallback', Georgia, serif;
  --f-label: 'Pixelify Sans', 'Pixelify Fallback', system-ui, sans-serif;
  --f-body: 'Geist Pixel', 'Geist Pixel Fallback', system-ui, sans-serif;
  --f-mono: 'Geist Mono', 'Geist Mono Fallback', ui-monospace, Menlo, monospace;
  /* type scale (desktop values; mobile overrides below). Polyp Serif is drawn on a 32 px grid: its sizes stay on
     32, 48 (whole pixels on 2x screens), 64 and 96 so the stair steps stay crisp, never a size in between */
  --t-h1: 96px;
  --t-h2: 64px;
  --t-h2-sm: 48px;       /* foundations, cta, page sections */
  --t-h2-product: 48px;
  --t-h3: 32px;
  --t-h4: 32px;
  --t-lead: 24px;
  --t-body: 18px;
  --t-small: 16px;
  --t-xs: 13px;
  --t-eyebrow: 14px;
  --t-btn: 16px;
  --t-nav: 14px;
  /* layout */
  --max: 1440px;
  --gutter: 16px;
  --hdr-top: 12px;
  --hdr-h: 55px;
  --hdr-space: calc(var(--hdr-top) + var(--hdr-h));
  --sec-y: 48px;
  --radius: 0;
  /* motion */
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --t-fast: 150ms;
  --t-med: 300ms;
  --t-slow: 600ms;
  /* pixel shapes */
  --step-4: polygon(4px 0, calc(100% - 4px) 0, calc(100% - 4px) 2px, calc(100% - 2px) 2px, calc(100% - 2px) 4px, 100% 4px, 100% calc(100% - 4px), calc(100% - 2px) calc(100% - 4px), calc(100% - 2px) calc(100% - 2px), calc(100% - 4px) calc(100% - 2px), calc(100% - 4px) 100%, 4px 100%, 4px calc(100% - 2px), 2px calc(100% - 2px), 2px calc(100% - 4px), 0 calc(100% - 4px), 0 4px, 2px 4px, 2px 2px, 4px 2px);
  --step-2: polygon(2px 0, calc(100% - 2px) 0, calc(100% - 2px) 2px, 100% 2px, 100% calc(100% - 2px), calc(100% - 2px) calc(100% - 2px), calc(100% - 2px) 100%, 2px 100%, 2px calc(100% - 2px), 0 calc(100% - 2px), 0 2px, 2px 2px);
  --step-6: polygon(6px 0, calc(100% - 6px) 0, calc(100% - 6px) 2px, calc(100% - 4px) 2px, calc(100% - 4px) 4px, calc(100% - 2px) 4px, calc(100% - 2px) 6px, 100% 6px, 100% calc(100% - 6px), calc(100% - 2px) calc(100% - 6px), calc(100% - 2px) calc(100% - 4px), calc(100% - 4px) calc(100% - 4px), calc(100% - 4px) calc(100% - 2px), calc(100% - 6px) calc(100% - 2px), calc(100% - 6px) 100%, 6px 100%, 6px calc(100% - 2px), 4px calc(100% - 2px), 4px calc(100% - 4px), 2px calc(100% - 4px), 2px calc(100% - 6px), 0 calc(100% - 6px), 0 6px, 2px 6px, 2px 4px, 4px 4px, 4px 2px, 6px 2px);
}

@media (min-width: 640px) {
  :root { --gutter: 32px; --sec-y: 64px; }
}
@media (min-width: 1024px) {
  :root { --gutter: 64px; --sec-y: 80px; }
}
@media (min-width: 1024px) and (max-width: 1279px) {
  :root { --t-h2-product: 32px; } /* the 4 of 12 text column is too narrow for 48 here */
}
@media (max-width: 1023px) {
  :root { --t-h1: 64px; --t-h2: 48px; --t-h2-sm: 48px; --t-h2-product: 48px; --t-lead: 21px; --t-body: 16px; }
}
@media (max-width: 639px) {
  :root {
    --t-h1: 64px; --t-h2: 48px; --t-h2-sm: 32px; --t-h2-product: 32px;
    --t-lead: 19px; --t-body: 15px; --t-small: 14px; --t-xs: 12px; --t-eyebrow: 14px; --t-btn: 17px; --t-nav: 15px;
  }
}
@media (max-width: 359px) {
  :root { --t-h1: 48px; --t-h2: 32px; }
}

/* ------------------------------------------------------------------------------------------ 3 reset */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-padding-top: calc(var(--hdr-space) + 16px); }
body {
  margin: 0; min-height: 100vh; background: var(--page); color: var(--fg);
  font-family: var(--f-body); font-size: var(--t-body); line-height: 1.25; letter-spacing: -.25px;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3, h4, h5, ul, ol, figure, blockquote, dl, dd { margin: 0; }
ul[class], ol[class] { list-style: none; padding: 0; }
table { border-collapse: collapse; }
[hidden] { display: none !important; }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--acc-hi); outline-offset: 3px; }
::selection { background: var(--acc); color: var(--on-acc); }
main { display: block; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: fixed; left: 16px; top: -60px; z-index: 200; display: inline-flex; align-items: center; min-height: 44px; padding: 0 14px; background: var(--acc); color: var(--on-acc); font-family: var(--f-label); text-transform: uppercase; }
.skip:focus { top: 12px; }
body.is-locked { overflow: hidden; }

/* ------------------------------------------------------------------------------------------ 4 type */

.h1, .h2, .h2-sm, .h2-product, .h3, .h4, .display {
  font-family: var(--f-display); font-weight: 400; letter-spacing: -.75px; line-height: 1.02; color: var(--fg);
  text-wrap: balance;
}
.h1 { font-size: var(--t-h1); line-height: 1; }
.h2 { font-size: var(--t-h2); line-height: 1.05; }
.h2-sm { font-size: var(--t-h2-sm); line-height: 1.05; }
.h2-product { font-size: var(--t-h2-product); line-height: 1.05; }
.h3 { font-size: var(--t-h3); line-height: 1.05; }
.h4 { font-size: var(--t-h4); line-height: 1.1; }
.shadow-text { text-shadow: 3px 3px 0 var(--acc-deep); }
.h1.shadow-text { text-shadow: calc(1em / 32) calc(1em / 32) 0 #2a2622; }
.lead { font-family: var(--f-body); font-size: var(--t-lead); line-height: 1.2; letter-spacing: -.25px; color: var(--fg); }
.body, .prose p { font-size: var(--t-body); line-height: 1.25; color: var(--fg-2); }
.small { font-size: var(--t-small); line-height: 1.25; }
.xs { font-size: var(--t-xs); line-height: 1.3; }
.muted { color: var(--fg-3); }
.dim { color: var(--fg-4); }
.mono, code, kbd, samp { font-family: var(--f-mono); letter-spacing: 0; font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }
.label, .eyebrow, .btn, .nav-link, .tag, .pill, .soon-tag {
  font-family: var(--f-label); text-transform: uppercase; letter-spacing: .02em; font-weight: 400;
}
.eyebrow { display: inline-flex; align-items: baseline; gap: 6px; font-size: var(--t-eyebrow); line-height: 1; color: var(--acc); }
.eyebrow .n { color: var(--fg-2); }
.eyebrow--plain { color: var(--fg-3); }
.eyebrow--case { text-transform: none; letter-spacing: 0; }
.acc { color: var(--acc); }
.link { color: var(--acc); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.link:hover { color: var(--acc-hi); }
.prose { max-width: 680px; }
.prose > * + * { margin-top: 16px; }
.prose h2 { font-family: var(--f-display); font-weight: 400; font-size: var(--t-h2-sm); line-height: 1.05; letter-spacing: -.75px; margin-top: 40px; }
.prose h3 { font-family: var(--f-display); font-weight: 400; font-size: var(--t-h3); line-height: 1.1; letter-spacing: -.5px; margin-top: 28px; }
.prose ul, .prose ol { padding-left: 1.2em; color: var(--fg-2); }
.prose li + li { margin-top: 6px; }
.prose a { color: var(--acc); text-decoration: underline; text-underline-offset: 3px; }
.prose code { font-size: .88em; background: var(--ink-2); padding: 1px 5px; }
.prose pre { background: var(--ink-0); border: 1px solid var(--line); padding: 16px; overflow-x: auto; font-size: 14px; line-height: 1.5; }

/* ------------------------------------------------------------------------------------------ 5 layout */

.container { width: 100%; max-width: var(--max); margin-inline: auto; padding-inline: var(--gutter); }
.container--narrow { max-width: calc(880px + 2 * var(--gutter)); }
.section { padding-block: var(--sec-y); background: var(--page); position: relative; }
.section--tight { padding-block: calc(var(--sec-y) * .6); }
.section--top { padding-top: calc(var(--hdr-space) + 56px); }
.section--ink { background: var(--ink-0); }
.stack { display: flex; flex-direction: column; gap: 20px; }
.stack-sm { display: flex; flex-direction: column; gap: 12px; }
.stack-lg { display: flex; flex-direction: column; gap: 32px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.grid-2, .grid-3, .grid-4 { display: grid; gap: 24px; grid-template-columns: 1fr; }
.grid-2 > *, .grid-3 > *, .grid-4 > *, .split > *, .plans > *, .lib > * { min-width: 0; }
@media (min-width: 768px) { .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.rule { height: 1px; background: var(--line); border: 0; margin: 0; }
.page-head { padding-top: calc(var(--hdr-space) + 64px); padding-bottom: 40px; }
.page-head--center { text-align: center; }
.page-head--center .lead { margin-inline: auto; }
.page-head .lead { margin-top: 20px; max-width: 760px; color: var(--fg-2); }
@media (min-width: 1024px) { .page-head { padding-top: calc(var(--hdr-space) + 110px); } }

/* ------------------------------------------------------------------------------------------ 6 buttons */

.btn {
  --btn-bg: var(--ink-2); --btn-fg: var(--fg); --btn-hi: rgba(255, 255, 255, .14); --btn-lo: rgba(0, 0, 0, .35);
  --btn-frame: var(--fg-3); --btn-bi: 0px;
  position: relative; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 12px 24px; font-size: var(--t-btn); line-height: 1; color: var(--btn-fg);
  white-space: nowrap; user-select: none; -webkit-tap-highlight-color: transparent;
  transition: transform var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.btn::before {
  content: ''; position: absolute; inset: var(--btn-bi) 0; z-index: -1; background: var(--btn-bg);
  clip-path: var(--step-4); box-shadow: inset 2px 2px 0 var(--btn-hi), inset -2px -2px 0 var(--btn-lo);
  transition: background-color var(--t-fast) var(--ease), filter var(--t-fast) var(--ease);
}
/* pixel bracket frame that appears around a hovered button */
.btn::after {
  content: ''; position: absolute; inset: calc(var(--btn-bi) - 6px) -6px; pointer-events: none; opacity: 0;
  transition: opacity var(--t-fast) var(--ease);
  background:
    linear-gradient(var(--btn-frame) 0 0) left top / 8px 2px no-repeat,
    linear-gradient(var(--btn-frame) 0 0) left top / 2px 8px no-repeat,
    linear-gradient(var(--btn-frame) 0 0) right top / 8px 2px no-repeat,
    linear-gradient(var(--btn-frame) 0 0) right top / 2px 8px no-repeat,
    linear-gradient(var(--btn-frame) 0 0) left bottom / 8px 2px no-repeat,
    linear-gradient(var(--btn-frame) 0 0) left bottom / 2px 8px no-repeat,
    linear-gradient(var(--btn-frame) 0 0) right bottom / 8px 2px no-repeat,
    linear-gradient(var(--btn-frame) 0 0) right bottom / 2px 8px no-repeat;
}
@media (hover: hover) {
  .btn:hover { transform: translateY(-1px); }
  .btn:hover::before { filter: brightness(1.08); }
  .btn:hover::after { opacity: .6; }
}
.btn:active { transform: translateY(1px); }
.btn:active::before { box-shadow: inset -2px -2px 0 var(--btn-hi), inset 2px 2px 0 var(--btn-lo); }
.btn:focus-visible { outline: none; }
.btn:focus-visible::after { opacity: 1; --btn-frame: var(--acc-hi); }
.btn svg { flex: none; width: 18px; height: 18px; }
.btn--paper { --btn-bg: var(--paper); --btn-fg: var(--on-paper); --btn-hi: rgba(255, 255, 255, .9); --btn-lo: rgba(0, 0, 0, .18); }
.btn--paper2 { --btn-bg: var(--paper-2); --btn-fg: var(--on-paper); --btn-hi: rgba(255, 255, 255, .7); --btn-lo: rgba(0, 0, 0, .18); }
.btn--acc { --btn-bg: var(--acc); --btn-fg: var(--on-acc); --btn-hi: rgba(255, 255, 255, .35); --btn-lo: rgba(0, 40, 15, .35); --btn-frame: var(--acc); }
.btn--dark { --btn-bg: var(--ink-2); --btn-fg: var(--fg); }
.btn--ghost { --btn-bg: transparent; --btn-hi: transparent; --btn-lo: transparent; --btn-fg: var(--fg-2); padding-inline: 10px; }
.btn--ghost:hover { --btn-fg: var(--fg); --btn-bg: var(--ink-3); }
.btn--sm { min-height: 30px; padding: 8px 14px; font-size: var(--t-nav); }
.btn--lg { min-height: 48px; padding: 14px 28px; }
.btn--block { width: 100%; }
.btn[aria-disabled='true'], .btn:disabled, .btn.is-soon { cursor: not-allowed; }
.btn:disabled, .btn[aria-disabled='true']:not(.is-soon) { opacity: .5; transform: none; }
.btn.is-soon { --btn-fg: var(--fg-3); }
.btn.is-soon:hover { transform: none; }
.btn.is-busy { pointer-events: none; }
.btn.is-busy .btn-label { opacity: .5; }
.soon-tag {
  display: inline-flex; align-items: center; height: 16px; padding: 0 5px; font-size: 11px; line-height: 1;
  color: var(--on-acc); background: var(--acc); clip-path: var(--step-2); letter-spacing: .04em;
}
.btn--paper .soon-tag, .btn--paper2 .soon-tag { background: var(--on-paper); color: var(--paper); }
/* larger touch area without changing the look: the drawn button stays, the box grows */
.btn--hit { --btn-bi: 4px; min-height: 44px; padding-block: 4px; }

/* ------------------------------------------------------------------------------------------ 7 header */

.hdr {
  position: fixed; inset: 0 0 auto 0; z-index: 60; padding: var(--hdr-top) var(--gutter) 0; pointer-events: none;
  height: var(--hdr-space);
}
.hdr-bar {
  position: relative; pointer-events: auto; max-width: calc(var(--max) - 2 * 64px); margin-inline: auto; height: var(--hdr-h);
  display: flex; align-items: center; gap: 8px; padding: 0 12px;
}
.hdr-bar::before {
  content: ''; position: absolute; inset: 0; z-index: -1; background: rgba(28, 25, 22, .94);
  clip-path: var(--step-4); box-shadow: inset 0 0 0 2px #2c2723, inset 0 2px 0 2px #36302a;
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
}
.hdr-mark { display: inline-flex; align-items: center; justify-content: center; gap: 10px; height: 44px; min-width: 44px; padding-right: 4px; flex: none; }
.hdr-mark img { width: 32px; height: 32px; image-rendering: pixelated; }
.hdr-word { font-family: var(--f-label); font-size: 16px; letter-spacing: .04em; text-transform: uppercase; color: var(--fg); display: none; }
.hdr-nav { display: none; align-items: center; gap: 4px; }
.hdr-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; flex: none; }
.hdr .btn--sm { min-height: 30px; }
.hdr .hdr-desk { display: none; }
.hdr .hdr-mob { display: inline-flex; }
.hdr .btn--hit { min-height: 44px; }
.hdr .btn--hit::before { inset: 5px 0; }
.hdr .btn--hit::after { inset: -1px -6px; }
@media (min-width: 420px) { .hdr-word { display: inline; } }
@media (min-width: 1024px) {
  .hdr-word { display: none; }
  .hdr-nav { display: flex; }
  .hdr .hdr-desk { display: inline-flex; }
  .hdr .hdr-mob { display: none; }
  .hdr-mark { order: -1; }
}
@media (min-width: 1280px) {
  .hdr-mark { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); padding: 0; }
}
.nav-link {
  position: relative; isolation: isolate; display: inline-flex; align-items: center; gap: 4px; height: 30px; padding: 0 9px;
  font-size: var(--t-nav); line-height: 1; color: var(--fg-2); white-space: nowrap;
  transition: color var(--t-fast) var(--ease);
}
.nav-link::before { content: ''; position: absolute; inset: 0; z-index: -1; clip-path: var(--step-2); background: transparent; transition: background-color var(--t-fast) var(--ease); }
.nav-link:hover, .nav-link[aria-expanded='true'] { color: var(--fg); }
.nav-link:hover::before { background: var(--ink-3); }
.nav-link[aria-expanded='true']::before { background: var(--ink-2); box-shadow: inset 0 0 0 2px var(--fg-4); }
.nav-link.is-active { color: var(--acc); }
.nav-link svg { width: 10px; height: 10px; transition: transform var(--t-fast) var(--ease); }
.nav-link[aria-expanded='true'] svg { transform: rotate(180deg); }
.nav-item { position: relative; }
.hdr-coin { display: inline-flex; align-items: center; gap: 2px; }
.hdr-nav > * { flex: none; }
/* 1024 to 1279: the full nav, Copy CA and Buy (each with a "soon" tag) and Connect share one bar */
@media (min-width: 1024px) and (max-width: 1279px) {
  .hdr .nav-link { padding: 0 6px; }
  .hdr-coin .btn { padding-inline: 10px; }
  .hdr-coin .btn > span:first-child { display: none; }
}

/* connected chip */
.chip {
  --btn-bg: var(--ink-3); position: relative; isolation: isolate; display: inline-flex; align-items: center; gap: 8px;
  min-height: 30px; padding: 6px 12px; font-family: var(--f-mono); font-size: 13px; color: var(--fg); white-space: nowrap;
}
.chip::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--btn-bg); clip-path: var(--step-4); box-shadow: inset 0 0 0 2px var(--ink-4); }
.chip:hover::before { background: var(--ink-4); }
.chip-dot { width: 8px; height: 8px; background: var(--acc); box-shadow: 0 0 6px var(--acc); flex: none; }
.chip.is-wrong .chip-dot { background: var(--pending); box-shadow: 0 0 6px var(--pending); }
.chip.is-wrong { color: var(--pending); }

/* ------------------------------------------------------------------------------------------ 8 menus */

/* paper panel with a double pixel frame and corner studs: dropdowns, mobile menu, chip menu */
.paper-panel {
  position: relative; background: var(--paper); color: var(--on-paper); padding: 14px;
  box-shadow: 0 0 0 2px var(--on-paper), 0 0 0 4px var(--paper), 0 0 0 6px var(--on-paper), 0 18px 40px rgba(0, 0, 0, .55);
}
.paper-panel::after {
  --stud: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' shape-rendering='crispEdges'%3E%3Cpath fill='%231c1916' d='M0 0h12v12H0z'/%3E%3Cpath fill='%23ffffff' d='M2 2h8v8H2z'/%3E%3Cpath fill='%231c1916' d='M4 4h4v4H4z'/%3E%3C/svg%3E");
  content: ''; position: absolute; inset: -9px; pointer-events: none;
  background: var(--stud) left top / 12px 12px no-repeat, var(--stud) right top / 12px 12px no-repeat,
    var(--stud) left bottom / 12px 12px no-repeat, var(--stud) right bottom / 12px 12px no-repeat;
}
.dropdown {
  position: absolute; top: calc(100% + 18px); left: -4px; z-index: 70; min-width: 290px; opacity: 0; visibility: hidden;
  transform: translateY(-4px); transition: opacity 200ms var(--ease), transform 200ms var(--ease), visibility 0s linear 200ms;
}
.dropdown.is-open { opacity: 1; visibility: visible; transform: none; transition: opacity 200ms var(--ease), transform 200ms var(--ease), visibility 0s; }
.dropdown--right { left: auto; right: -4px; }
/* an invisible bridge over the gap under the trigger, so a hover menu stays open on the way down */
.dropdown::before { content: ''; position: absolute; left: 0; right: 0; top: -22px; height: 22px; }
.menu-list { display: flex; flex-direction: column; }
.menu-item {
  display: grid; grid-template-columns: 24px 1fr; align-items: center; column-gap: 12px; padding: 10px 10px; min-height: 44px;
  color: var(--on-paper); position: relative;
}
.menu-item + .menu-item { border-top: 3px solid var(--paper-3); }
.menu-item:hover, .menu-item:focus-visible { background: #eef8f1; outline: none; }
.menu-item:focus-visible { box-shadow: inset 0 0 0 2px var(--acc-lo); }
.menu-item svg { width: 24px; height: 24px; color: var(--on-paper); }
.menu-item .mi-label { font-family: var(--f-label); text-transform: uppercase; font-size: 14px; line-height: 1.1; letter-spacing: .02em; }
.menu-item .mi-hint { grid-column: 2; font-size: 13px; line-height: 1.2; color: var(--on-paper-2); margin-top: 3px; }
.menu-item.is-active .mi-label { color: var(--acc-lo); }
.menu-item--plain { grid-template-columns: 1fr; }
.menu-item--plain .mi-hint { grid-column: 1; }
button.menu-item { width: 100%; text-align: left; }

/* mobile menu: a full panel */
.mnav {
  position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; padding: 12px var(--gutter);
  background: rgba(8, 8, 7, .72); opacity: 0; visibility: hidden; transition: opacity 220ms var(--ease), visibility 0s linear 220ms;
}
.mnav.is-open { opacity: 1; visibility: visible; transition: opacity 220ms var(--ease), visibility 0s; }
.mnav:not(.is-open) { pointer-events: none; }
.mnav .paper-panel { flex: 1; display: flex; flex-direction: column; min-height: 0; margin: 9px; padding: 0; transform: translateY(-8px); transition: transform 260ms var(--ease-out); }
.mnav.is-open .paper-panel { transform: none; }
.mnav-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 12px 10px 14px; border-bottom: 3px solid var(--paper-3); }
.mnav-top .hdr-mark img { width: 32px; height: 32px; }
.mnav-word { font-family: var(--f-label); text-transform: uppercase; letter-spacing: .04em; font-size: 15px; color: var(--on-paper); }
.mnav-close { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 8px; font-family: var(--f-label); text-transform: uppercase; font-size: 15px; color: var(--on-paper); }
.mnav-close svg { width: 16px; height: 16px; }
.mnav-body { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 4px 14px 16px; -webkit-overflow-scrolling: touch; }
.mnav-group { padding: 12px 0; }
.mnav-group + .mnav-group { border-top: 3px solid var(--paper-3); }
.mnav-label { display: block; padding: 4px 8px 6px; font-family: var(--f-label); text-transform: uppercase; font-size: 13px; color: var(--on-paper-2); letter-spacing: .04em; }
.mnav-link { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 8px; font-family: var(--f-label); text-transform: uppercase; font-size: 16px; color: var(--on-paper); }
.mnav-link svg { width: 20px; height: 20px; flex: none; }
.mnav-link:hover, .mnav-link:focus-visible { background: #eef8f1; outline: none; }
.mnav-link.is-active { color: var(--acc-lo); }
.mnav-foot { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 14px; border-top: 3px solid var(--paper-3); }
.mnav-foot .btn { width: 100%; padding-inline: 12px; }
.mnav-foot .btn--full { grid-column: 1 / -1; }
/* Buy and Copy CA carry a "soon" tag; their icons step aside so the labels never crowd */
.mnav-foot [data-ca] > span:first-child, .mnav-foot [data-buy] > span:first-child { display: none; }
@media (max-width: 419px) { .mnav-foot { grid-template-columns: 1fr; gap: 8px; } }
@media (min-width: 640px) {
  .mnav .paper-panel { flex: 0 1 auto; }
  .mnav-body { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); column-gap: 24px; align-content: start; }
  .mnav-group, .mnav-group + .mnav-group { border-top: 0; }
  .mnav-foot { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .mnav-foot .btn--full { grid-column: auto; }
}
@media (max-height: 520px) {
  .mnav { padding-block: 8px; }
  .mnav-top { padding-block: 4px; }
  .mnav-group { padding: 6px 0; }
  .mnav-foot { padding: 8px 14px; }
}

/* ------------------------------------------------------------------------------------------ 9 frames and panels */

/* .frame: a 12 px padded figure with a dim double line and pixel corner studs (demo panels, cards) */
.frame { position: relative; padding: 12px; }
.frame::before { content: ''; position: absolute; inset: 5px; border: 2px solid #26221e; pointer-events: none; }
.frame::after {
  content: ''; position: absolute; inset: 0; pointer-events: none;
  background: url('/img/ui/stud.svg') left top / 12px 12px no-repeat, url('/img/ui/stud.svg') right top / 12px 12px no-repeat,
    url('/img/ui/stud.svg') left bottom / 12px 12px no-repeat, url('/img/ui/stud.svg') right bottom / 12px 12px no-repeat;
}
.frame--acc::before { border-color: var(--acc-lo); }
.frame--acc::after {
  background: url('/img/ui/stud-acc.svg') left top / 12px 12px no-repeat, url('/img/ui/stud-acc.svg') right top / 12px 12px no-repeat,
    url('/img/ui/stud-acc.svg') left bottom / 12px 12px no-repeat, url('/img/ui/stud-acc.svg') right bottom / 12px 12px no-repeat;
}
.frame-in { position: relative; background: var(--ink-0); overflow: hidden; min-width: 0; }
.panel { position: relative; background: var(--ink-1); border: 1px solid var(--line); padding: 20px; }
.card { position: relative; background: var(--ink-2); padding: 20px; clip-path: var(--step-4); }
.card--ink { background: var(--ink-0); }
.card-title { font-family: var(--f-label); text-transform: uppercase; font-size: 16px; line-height: 1.15; letter-spacing: .02em; color: var(--fg); }
.card-text { font-size: var(--t-small); line-height: 1.25; color: var(--fg-2); margin-top: 6px; }
.icon-tile {
  position: relative; display: inline-grid; place-items: center; width: 52px; height: 52px; flex: none; color: var(--fg);
  background: var(--ink-0); box-shadow: inset 0 0 0 2px #2f2a25, inset 3px 3px 0 1px #3c362f; clip-path: var(--step-2);
}
.icon-tile svg { width: 28px; height: 28px; }
.icon-tile--acc { color: var(--acc); }
/* a 16:9 stage inside a frame (product demos) */
.stage { position: relative; width: 100%; aspect-ratio: var(--stage-ar, 16 / 9); background: var(--ink-0); overflow: hidden; }
.stage-inner { position: absolute; left: 0; top: 0; transform-origin: 0 0; }

/* ------------------------------------------------------------------------------------------ 10 surfaces */

/* CRT scanlines over the whole page (never intercept input) */
.scanlines { position: fixed; inset: 0; z-index: 95; pointer-events: none; background: repeating-linear-gradient(to bottom, rgba(255, 255, 255, .025) 0 1px, transparent 1px 3px); }
.stars { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.sparkle {
  position: absolute; width: 45px; height: 45px; pointer-events: none; image-rendering: pixelated;
  background: url('/img/ui/sparkle.svg') center / 45px 45px no-repeat; animation: sparkle 4.8s steps(6) infinite;
}
@keyframes sparkle { 0%, 100% { opacity: 1; transform: scale(1); } 45% { opacity: .55; transform: scale(.8); } 60% { opacity: .9; transform: scale(1.05); } }
.vignette { position: absolute; inset: 0; pointer-events: none; background: radial-gradient(ellipse at 50% 40%, transparent 55%, rgba(0, 0, 0, .55) 100%); }

/* ------------------------------------------------------------------------------------------ 11 hero */

.hero { position: relative; isolation: isolate; overflow: clip; background: var(--ink-0); padding-top: var(--hdr-space); }
.hero-text { position: relative; z-index: 3; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 28px; padding-top: 56px; }
.hero-text .h1 { max-width: 880px; }
.hero-text .lead { max-width: 760px; color: var(--fg); }
.hero-ctas { display: flex; flex-direction: column; align-items: stretch; gap: 12px; width: 100%; max-width: 280px; margin-top: 8px; }
@media (min-width: 640px) {
  .hero-ctas { flex-direction: row; align-items: center; justify-content: center; max-width: none; width: auto; gap: 16px; }
}
@media (min-width: 1024px) { .hero-text { padding-top: 96px; gap: 32px; } .hero-ctas { margin-top: 32px; } }
.hero-scene { --reef-h: clamp(180px, 30vw, 440px); position: relative; z-index: 2; margin-top: 56px; }
.hero-reefs { position: relative; height: var(--reef-h); }
.hero-reef { position: absolute; inset: 0; z-index: 1; width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; image-rendering: pixelated; }
.hero-reef--front { z-index: 3; }
.hero-monitor { position: relative; z-index: 2; display: none; padding-inline: var(--gutter); margin-bottom: calc(var(--reef-h) * -.8); }
@media (min-width: 768px) { .hero-monitor { display: block; } }
@media (min-width: 1024px) { .hero-monitor { padding-inline: 128px; } }
.hero h1 .w { display: inline-block; }

/* CRT monitor (bezel art in img/crt.webp, screen is HTML) */
.crt { position: relative; max-width: 1184px; margin-inline: auto; aspect-ratio: 300 / 262; }
.crt-bezel { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 2; }
.crt-tube { position: absolute; left: 8.667%; top: 8.779%; width: 82.667%; height: 60.687%; overflow: hidden; z-index: 1; background: #0b0d0b; }
.crt-screen { position: absolute; inset: 0; overflow: hidden; background: #c7cfc7 url('/img/crt-wall.webp') center bottom / cover no-repeat; image-rendering: pixelated; }
.crt-glass { position: absolute; inset: 0; z-index: 30; pointer-events: none;
  background:
    repeating-linear-gradient(to bottom, rgba(0, 0, 0, .07) 0 1px, transparent 1px 3px),
    radial-gradient(ellipse at 30% 18%, rgba(255, 255, 255, .22), transparent 42%),
    radial-gradient(ellipse at 50% 50%, transparent 58%, rgba(0, 20, 8, .38) 100%);
  box-shadow: inset 0 0 28px rgba(0, 0, 0, .45);
}
.crt-sweep { position: absolute; left: 0; right: 0; top: -20%; height: 18%; z-index: 31; pointer-events: none; will-change: transform;
  background: linear-gradient(to bottom, transparent, rgba(180, 255, 210, .06), transparent); animation: sweep 7s linear infinite; }
@keyframes sweep { to { transform: translateY(700%); } }
.crt-power .crt-screen { animation: crt-on 900ms var(--ease-out) both; }
@keyframes crt-on { 0% { filter: brightness(3) contrast(.4); transform: scaleY(.02); } 45% { filter: brightness(2); transform: scaleY(1.02); } 100% { filter: none; transform: none; } }

/* sound toggle (optional, off by default) */
.sound-toggle { position: fixed; left: 16px; bottom: 16px; z-index: 55; }

/* ------------------------------------------------------------------------------------------ 12 sections */

.intro { padding-top: calc(var(--sec-y) + 16px); }
.intro-grid { display: grid; gap: 32px; align-items: end; }
.intro-copy { display: flex; flex-direction: column; gap: 20px; max-width: 672px; }
.intro-copy .body { max-width: 576px; }
.index { display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; row-gap: 4px; align-self: center; }
.index a { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-family: var(--f-label); text-transform: uppercase; font-size: var(--t-eyebrow); color: var(--fg); }
.index a .n { color: var(--acc); }
.index a:hover { color: var(--acc-hi); }
.intro-rule { margin-top: 40px; }
@media (min-width: 1024px) {
  .intro-grid { grid-template-columns: minmax(0, 1fr) auto; gap: 64px; }
  .index { column-gap: 40px; }
}

.prow { padding-block: var(--sec-y); }
.prow-grid { display: grid; gap: 32px; align-items: center; }
.prow-copy { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.prow-copy .h2-product { margin-top: 4px; }
.prow-copy .body { max-width: 512px; text-wrap: pretty; }
.prow-copy .btn { align-self: flex-start; margin-top: 12px; }
.prow-media { min-width: 0; }
@media (min-width: 1024px) {
  .prow-grid { grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 40px; }
  .prow-copy { grid-column: span 4; }
  .prow-media { grid-column: span 8; }
}
@media (min-width: 1280px) { .prow-grid { gap: 56px; } }

.found-head { display: flex; flex-direction: column; gap: 20px; max-width: 768px; }
.found-head .lead { color: var(--fg-2); }
.pill {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 8px; font-size: 13px; line-height: 1; color: var(--acc);
  box-shadow: inset 0 0 0 2px var(--acc-lo); clip-path: var(--step-2); align-self: flex-start;
}
.found-band { margin-top: 48px; }
.found-cards { display: grid; gap: 4px; background: var(--ink-1); padding: 16px; }
.found-card { display: flex; gap: 16px; padding: 16px; align-items: flex-start; }
.found-card .card-text { margin-top: 6px; max-width: 320px; }
@media (min-width: 900px) { .found-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); padding: 24px 12px; } }

/* updates band: a vine strip behind a framed box */
.updates { position: relative; padding-block: 64px; overflow: clip; }
.vines-band {
  position: absolute; left: 0; right: 0; top: 50%; height: 92px; transform: translateY(-50%); pointer-events: none;
  background: url('/img/vines-band.webp') 0 50% / 480px 92px repeat-x; image-rendering: pixelated;
}
.vines-band::after { content: ''; position: absolute; inset: 0 0 46px; }
.updates-box {
  position: relative; z-index: 1; margin-inline: auto; max-width: 760px; background: var(--ink-1); padding: 20px;
  /* the accent line, then a dark mat (taller than wide) so only the side foliage shows, never stray leaves */
  box-shadow: 0 0 0 2px var(--acc), 0 0 0 12px var(--page), 0 -18px 0 12px var(--page), 0 18px 0 12px var(--page);
}
.updates-row { display: flex; flex-direction: column; gap: 12px; }
.updates-label { font-family: var(--f-label); font-weight: 400; text-transform: uppercase; font-size: 13px; color: var(--fg); white-space: nowrap; }
.updates-note { margin-top: 12px; font-size: 13px; color: var(--fg-3); }
.field-btn {
  position: relative; isolation: isolate; flex: 1; display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0 14px;
  color: var(--fg-3); font-family: var(--f-body); font-size: 15px; text-align: left;
}
.field-btn::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--ink-3); clip-path: var(--step-2); }
.field-btn:hover { color: var(--fg); }
.field-btn svg { width: 16px; height: 16px; color: var(--fg); }
@media (min-width: 640px) {
  .updates-row { flex-direction: row; align-items: center; gap: 16px; }
  .updates-box { padding: 20px 24px; }
}
@media (min-width: 1024px) {
  .updates { padding-block: 80px; }
  .vines-band { height: 138px; background-size: 720px 138px; }
}

/* closing call to action: a box framed by pixel vines (border-image 9-slice) */
.cta { padding-block: calc(var(--sec-y) + 16px) calc(var(--sec-y) + 32px); text-align: center; }
.cta .h2-sm { max-width: 720px; margin-inline: auto; }
.cta .body { margin-top: 16px; }
.cta-box {
  position: relative; margin: 48px auto 0; max-width: 620px; border: 44px solid transparent;
  border-image: url('/img/vines-frame.webp') 44 / 44px / 0 round; image-rendering: pixelated;
}
.cta-box-in { background: var(--ink-1); padding: 18px; display: grid; gap: 12px; box-shadow: 0 0 0 2px #26221e; }
@media (min-width: 640px) {
  .cta-box { max-width: 680px; border-width: 66px; border-image-width: 66px; }
  .cta-box-in { grid-template-columns: 1fr 1fr; padding: 20px; }
}
@media (max-width: 380px) { .cta-box { border-width: 34px; border-image-width: 34px; } }

/* page components for inner pages (product, pricing, colony, docs): see reference/requests/PAGE-TEMPLATE.md */
.phero { position: relative; padding-top: calc(var(--hdr-space) + 56px); padding-bottom: 48px; overflow: clip; }
.phero .h1 { max-width: 960px; }
.phero .h1 .dim2 { color: var(--fg-3); }
.phero .lead { margin-top: 24px; max-width: 720px; color: var(--fg-2); }
.phero-ctas { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.phero-vines { position: relative; height: 92px; margin-top: 48px; background: url('/img/vines-band.webp') 0 50% / 480px 92px repeat-x; image-rendering: pixelated; }
@media (min-width: 1024px) { .phero { padding-top: calc(var(--hdr-space) + 100px); } }
@media (max-width: 639px) { .phero-ctas { flex-direction: column; align-items: stretch; max-width: 280px; } }
.split { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .split { grid-template-columns: 2fr 1fr; } .split--rev { grid-template-columns: 1fr 2fr; } .split--rev > :first-child { order: 0; } }
.feature { display: flex; flex-direction: column; gap: 14px; padding: 24px; background: var(--ink-1); }
.feature .h4 { font-family: var(--f-body); font-size: 22px; letter-spacing: -.25px; line-height: 1.2; }
.feature .tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 8px; }
.list-check { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.list-check li { position: relative; padding-left: 28px; font-size: var(--t-small); line-height: 1.3; color: var(--fg-2); }
.list-check li::before { content: ''; position: absolute; left: 0; top: 1px; width: 16px; height: 16px; background: url('/img/ui/check.svg') center / 16px 16px no-repeat; image-rendering: pixelated; }
.plans { display: grid; gap: 24px; grid-template-columns: 1fr; }
@media (min-width: 1024px) { .plans { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.plan { display: flex; flex-direction: column; gap: 16px; padding: 28px 24px; background: var(--ink-1); height: 100%; }
.plan-name { font-family: var(--f-label); text-transform: uppercase; font-size: 13px; letter-spacing: .04em; color: var(--fg-3); display: flex; justify-content: space-between; align-items: center; }
.plan-price { font-family: var(--f-display); font-size: 48px; line-height: 1; letter-spacing: -.75px; color: var(--fg); }
.plan-price small { font-family: var(--f-body); font-size: 15px; color: var(--fg-4); letter-spacing: 0; margin-left: 6px; }
.plan .btn { width: 100%; }
.faq { display: flex; flex-direction: column; max-width: 760px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 56px; padding: 12px 0; font-family: var(--f-display); font-size: var(--t-h4); line-height: 1.15; letter-spacing: -.5px; color: var(--fg); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-family: var(--f-label); font-size: 20px; color: var(--acc); flex: none; }
.faq details[open] summary::after { content: '\2212'; }
.faq details > div { padding: 0 0 18px; color: var(--fg-2); font-size: var(--t-body); line-height: 1.35; }
.filters { display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.filters::-webkit-scrollbar { display: none; }
.filter {
  position: relative; isolation: isolate; flex: none; display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px;
  font-family: var(--f-label); text-transform: uppercase; font-size: 13px; color: var(--fg-3);
}
.filter::before { content: ''; position: absolute; inset: 0; z-index: -1; clip-path: var(--step-2); background: transparent; }
.filter:hover { color: var(--fg); }
.filter[aria-pressed='true'], .filter.is-active { color: var(--on-acc); }
.filter[aria-pressed='true']::before, .filter.is-active::before { background: var(--acc); }
.lib { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 768px) { .lib { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .lib { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.lib-card { display: flex; flex-direction: column; gap: 12px; padding: 20px; background: var(--ink-2); clip-path: var(--step-4); min-width: 0; }
.lib-card:hover { background: var(--ink-3); }
.lib-card .h4 { font-size: 32px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; font-size: 14px; }
.kv dt { font-family: var(--f-label); text-transform: uppercase; font-size: 11px; color: var(--fg-4); letter-spacing: .04em; align-self: center; }
.kv dd { margin: 0; font-family: var(--f-mono); color: var(--fg); text-align: right; }
.empty { padding: 40px 20px; text-align: center; color: var(--fg-3); font-size: 15px; }
.skeleton { background: linear-gradient(90deg, var(--ink-2), var(--ink-3), var(--ink-2)); background-size: 200% 100%; animation: shimmer 1.4s linear infinite; min-height: 16px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ------------------------------------------------------------------------------------------ 13 footer */

.ftr { position: relative; isolation: isolate; overflow: hidden; min-height: 175vh; display: flex; flex-direction: column; background: var(--page); }
.ftr-scene { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.ftr-scene img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 100%; image-rendering: pixelated; }
.ftr-scene::before { content: ''; position: absolute; inset: 0 0 auto; height: 40%; background: linear-gradient(var(--page), transparent); }
@media (max-width: 639px) { .ftr-scene::before { height: 70%; background: linear-gradient(var(--page) 42%, transparent); } }
.ftr-in { position: relative; padding-top: 80px; padding-bottom: 60px; }
.ftr-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 32px 24px; }
.ftr-brand { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.ftr-brand img { width: 48px; height: 48px; image-rendering: pixelated; }
.ftr-col h2 { font-family: var(--f-label); text-transform: uppercase; font-size: 13px; color: var(--fg-3); letter-spacing: .04em; font-weight: 400; margin-bottom: 10px; }
.ftr-col ul { display: flex; flex-direction: column; list-style: none; padding: 0; margin: 0; }
.ftr-col a { display: inline-flex; align-items: center; min-height: 32px; font-size: 16px; color: var(--fg-2); }
.ftr-col a:hover { color: var(--acc-hi); }
.ftr-social { display: flex; align-items: center; gap: 14px; }
.ftr-social a { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--fg-3); font-size: 15px; }
.ftr-social a:hover { color: var(--acc); }
.ftr-social svg { width: 20px; height: 20px; }
.ftr-legal { margin-top: 32px; font-size: 14px; color: var(--fg-3); }
@media (min-width: 1024px) {
  .ftr-grid { grid-template-columns: 1.2fr repeat(4, 1fr); gap: 32px 48px; }
  .ftr-brand { grid-column: auto; flex-direction: column; align-items: flex-start; justify-content: flex-start; }
  .ftr-brand img { width: 64px; height: 64px; }
  .ftr-col a { min-height: 28px; }
}

/* ------------------------------------------------------------------------------------------ 14 forms, tables, tabs, tags */

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field-label { font-family: var(--f-label); text-transform: uppercase; font-size: 13px; color: var(--fg-3); letter-spacing: .04em; }
.input, .select, .textarea {
  width: 100%; min-height: 44px; padding: 10px 12px; background: var(--ink-0); color: var(--fg); border: 2px solid var(--ink-4);
  font-family: var(--f-body); font-size: 16px; border-radius: 0; appearance: none; -webkit-appearance: none;
}
.input:focus, .select:focus, .textarea:focus { border-color: var(--acc); outline: none; }
.input::placeholder, .textarea::placeholder { color: var(--fg-4); }
.select { padding-right: 36px; background-image: linear-gradient(45deg, transparent 50%, var(--fg-3) 50%), linear-gradient(135deg, var(--fg-3) 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.textarea { min-height: 96px; resize: vertical; }
.input.mono, .mono .input { font-family: var(--f-mono); }
.check { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.check input { appearance: none; -webkit-appearance: none; width: 18px; height: 18px; margin: 0; border: 2px solid var(--fg-3); background: var(--ink-0); display: grid; place-items: center; }
.check input:checked { background: var(--acc); border-color: var(--acc); box-shadow: inset 0 0 0 3px var(--ink-0); }
.help { font-size: 13px; color: var(--fg-3); }
.err { font-size: 13px; color: var(--down); }

.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.table { width: 100%; font-size: 15px; }
.table th { font-family: var(--f-label); text-transform: uppercase; font-size: 12px; font-weight: 400; letter-spacing: .04em; color: var(--fg-3); text-align: left; padding: 10px 12px; border-bottom: 2px solid var(--ink-4); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--line); color: var(--fg-2); vertical-align: middle; }
.table tr:hover td { background: rgba(255, 255, 255, .025); }
.table .num, .table td.r, .table th.r { text-align: right; font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.table td.strong { color: var(--fg); }

.tabs { display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; -webkit-overflow-scrolling: touch; border-bottom: 2px solid var(--ink-4); }
.tabs::-webkit-scrollbar { display: none; }
.tab {
  position: relative; flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px;
  font-family: var(--f-label); text-transform: uppercase; font-size: 14px; color: var(--fg-3); letter-spacing: .02em;
}
.tab:hover { color: var(--fg); }
.tab[aria-selected='true'], .tab.is-active { color: var(--fg); }
.tab[aria-selected='true']::after, .tab.is-active::after { content: ''; position: absolute; left: 8px; right: 8px; bottom: -2px; height: 2px; background: var(--acc); }
.tag {
  display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px; font-size: 12px; line-height: 1; color: var(--fg-2);
  background: var(--ink-3); clip-path: var(--step-2); white-space: nowrap;
}
.tag--acc { background: var(--acc); color: var(--on-acc); }
.tag--up { color: var(--up); background: rgba(47, 209, 107, .12); }
.tag--down { color: var(--down); background: rgba(255, 107, 90, .12); }
.tag--pending { color: var(--pending); background: rgba(242, 193, 76, .12); }
.stat { display: flex; flex-direction: column; gap: 6px; }
.stat-k { font-family: var(--f-label); text-transform: uppercase; font-size: 12px; color: var(--fg-3); letter-spacing: .04em; }
.stat-v { font-family: var(--f-mono); font-size: 22px; color: var(--fg); font-variant-numeric: tabular-nums; }
.up { color: var(--up); }
.down { color: var(--down); }
.pending { color: var(--pending); }
.kbd { font-family: var(--f-mono); font-size: 12px; padding: 1px 6px; background: var(--ink-3); color: var(--fg-2); }
.codeblock { position: relative; background: var(--ink-0); border: 1px solid var(--line); padding: 16px; overflow-x: auto; font-family: var(--f-mono); font-size: 14px; line-height: 1.55; color: var(--fg-2); }
.notice { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; background: var(--ink-1); box-shadow: inset 2px 0 0 var(--acc); font-size: 15px; color: var(--fg-2); }
.notice--warn { box-shadow: inset 2px 0 0 var(--pending); }
.notice--err { box-shadow: inset 2px 0 0 var(--down); }

/* ------------------------------------------------------------------------------------------ 15 toasts, modal, wallet */

.toasts { position: fixed; z-index: 120; left: 16px; right: 16px; bottom: 16px; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
@media (min-width: 640px) { .toasts { left: auto; right: 24px; bottom: 24px; align-items: flex-end; } }
.toast {
  position: relative; isolation: isolate; pointer-events: auto; display: flex; align-items: center; gap: 10px; max-width: 420px; min-height: 44px;
  padding: 12px 16px; font-size: 15px; line-height: 1.25; color: var(--fg); animation: toast-in 240ms var(--ease-out) both;
}
.toast::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--ink-2); clip-path: var(--step-4); box-shadow: inset 0 0 0 2px var(--ink-4); }
.toast-dot { width: 8px; height: 8px; flex: none; background: var(--acc); }
.toast--error .toast-dot { background: var(--down); }
.toast--warn .toast-dot { background: var(--pending); }
.toast a { color: var(--acc); text-decoration: underline; text-underline-offset: 3px; }
.toast.is-out { animation: toast-out 200ms var(--ease) both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(6px); } }

.modal {
  width: min(440px, calc(100vw - 32px)); max-height: calc(100vh - 48px); padding: 0; border: 0; color: var(--fg); background: transparent; overflow: visible;
}
.modal::backdrop { background: rgba(4, 4, 3, .72); }
.modal[open] { animation: toast-in 220ms var(--ease-out) both; }
.modal-box { position: relative; background: var(--ink-1); padding: 24px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.modal-title { font-family: var(--f-display); font-size: 32px; line-height: 1; letter-spacing: -.5px; }
.modal-sub { margin-top: 8px; font-size: 14px; color: var(--fg-3); }
.modal-x { display: inline-grid; place-items: center; width: 44px; height: 44px; margin: -10px -10px 0 0; color: var(--fg-3); }
.modal-x:hover { color: var(--fg); }
.modal-x svg { width: 16px; height: 16px; }
.wallet-list { display: flex; flex-direction: column; gap: 8px; }
.wallet-opt {
  position: relative; isolation: isolate; display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 10px 14px; text-align: left;
  font-family: var(--f-label); text-transform: uppercase; font-size: 15px; color: var(--fg);
}
.wallet-opt::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--ink-3); clip-path: var(--step-4); box-shadow: inset 0 0 0 2px var(--ink-4); transition: background-color var(--t-fast) var(--ease); }
.wallet-opt:hover::before, .wallet-opt:focus-visible::before { background: var(--ink-4); box-shadow: inset 0 0 0 2px var(--acc-lo); }
.wallet-opt:focus-visible { outline: none; }
.wallet-opt img, .wallet-opt .wallet-ico { width: 32px; height: 32px; flex: none; }
.wallet-opt .wallet-ico { display: grid; place-items: center; background: var(--ink-0); color: var(--acc); }
.wallet-opt .wallet-ico svg { width: 20px; height: 20px; }
.wallet-opt .go { margin-left: auto; color: var(--fg-3); }
.wallet-opt .go svg { width: 14px; height: 14px; }
.wallet-empty { font-size: 15px; color: var(--fg-2); line-height: 1.35; }
.wallet-foot { margin-top: 16px; font-size: 13px; color: var(--fg-3); line-height: 1.35; }

/* ------------------------------------------------------------------------------------------ 16 reveal and motion */

.reveal { opacity: 0; transform: translateY(8px); transition: opacity 600ms var(--ease), transform 600ms var(--ease); transition-delay: var(--d, 0ms); }
.reveal.is-in { opacity: 1; transform: none; }
.rise .w { display: inline-block; opacity: 0; transform: translateY(.35em); animation: rise 800ms var(--ease-out) forwards; animation-delay: 80ms; }
.rise .w:nth-child(2) { animation-delay: 140ms; } .rise .w:nth-child(3) { animation-delay: 200ms; } .rise .w:nth-child(4) { animation-delay: 260ms; }
.rise .w:nth-child(5) { animation-delay: 320ms; } .rise .w:nth-child(6) { animation-delay: 380ms; } .rise .w:nth-child(7) { animation-delay: 440ms; }
.rise .w:nth-child(8) { animation-delay: 500ms; } .rise .w:nth-child(n+9) { animation-delay: 560ms; }
@keyframes rise { to { opacity: 1; transform: none; } }
.blink { animation: blink 1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

/* a hero scrolled out of view pauses its looping CSS (sparkles, CRT sweep); the canvases pause themselves */
.is-offscreen *, .is-offscreen *::before, .is-offscreen *::after { animation-play-state: paused !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
  .rise .w { opacity: 1; transform: none; animation: none; }
  .sparkle, .crt-sweep { animation: none; }
}

/* ------------------------------------------------------------------------------------------ 17 utilities */

.center { text-align: center; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; } .mt-32 { margin-top: 32px; } .mt-48 { margin-top: 48px; }
.w-full { width: 100%; }
.nowrap { white-space: nowrap; }
.hide-sm { display: none; }
@media (min-width: 640px) { .hide-sm { display: initial; } .only-sm { display: none; } }
.pixelated { image-rendering: pixelated; }

/* 404 */
.lost .hero-text { padding-bottom: 24px; }
.lost-reef { position: relative; display: block; width: 100%; height: clamp(180px, 30vw, 440px); object-fit: cover; object-position: 50% 100%; image-rendering: pixelated; margin-top: 40px; }
.lost-sparkle { left: 12%; top: 38%; }
@media (max-width: 767px) { .lost-sparkle { top: auto; bottom: calc(180px + 8px); left: 7%; width: 30px; height: 30px; background-size: 30px 30px; } }

/* the connected chip keeps a 44 px touch target in the header */
.hdr .chip { min-height: 44px; }
.hdr .chip::before { inset: 7px 0; }

/* ------------------------------------------------------------------------------------------ 18 touch targets */

/* phones and touch screens: every control is at least 44 px tall (the drawn shape may stay smaller) */
@media (pointer: coarse), (max-width: 767px) {
  .btn, .btn--sm { min-height: 44px; }
  .hdr .btn--sm { min-height: 44px; }
  .hdr .btn--sm::before { inset: 5px 0; }
  .hdr .btn--sm::after { inset: -1px -6px; }
  .hdr .nav-link { height: 44px; }
  .hdr .nav-link::before { inset: 7px 0; }
  .ftr-col a { min-height: 44px; min-width: 44px; }
  .ftr-col h2 { margin-bottom: 2px; }
  .tab, .filter { min-height: 44px; }
}
