/*
 * css/site.css: base, layout and every shared component of SPEC 12 A and B (shell owns it).
 * Colours come from css/tokens.css only. Page groups add css/pages/<group>.css for their own layouts.
 * Order: fonts, scale tokens, base, layout, type, controls, components (A6, A7), shell (B), states, motion.
 */
/* css/tokens.css is linked before this sheet by the stamped head (no @import round trip). */

/* ------------------------------------------------------------------------------------------------ fonts (A2) */
@font-face { font-family: "Array"; src: url("/fonts/array-regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Figtree"; src: url("/fonts/figtree-var.woff2") format("woff2"); font-weight: 300 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/fonts/geist-mono-var.woff2") format("woff2"); font-weight: 100 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/fonts/newsreader-var.woff2") format("woff2"); font-weight: 200 800; font-style: normal; font-display: swap; }
@font-face { font-family: "Array Fallback"; src: local("Arial"); ascent-override: 91.57%; descent-override: 19.62%; line-gap-override: 9.16%; size-adjust: 95.56%; }
@font-face { font-family: "Figtree Fallback"; src: local("Arial"); ascent-override: 95.06%; descent-override: 25.02%; line-gap-override: 0%; size-adjust: 99.94%; }
@font-face { font-family: "Geist Mono Fallback"; src: local("Arial"); ascent-override: 74.67%; descent-override: 21.92%; line-gap-override: 0%; size-adjust: 134.59%; }
@font-face { font-family: "Newsreader Fallback"; src: local("Times New Roman"); ascent-override: 69.68%; descent-override: 25.12%; line-gap-override: 0%; size-adjust: 105.48%; }

/* ------------------------------------------------------------------------------------------------ scale (A2 to A4) */
:root {
  --font-body: "Figtree", "Figtree Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Array", "Array Fallback", "Figtree", sans-serif;
  --font-mono: "Geist Mono", "Geist Mono Fallback", ui-monospace, SFMono-Regular, Menlo, monospace;
  --font-serif: "Newsreader", "Newsreader Fallback", Georgia, "Times New Roman", serif;

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s7: 32px; --s8: 40px;
  --s9: 48px; --s10: 64px; --s11: 80px; --s12: 96px; --s13: 128px;
  --section: clamp(64px, 8vw, 112px);
  --gutter: clamp(16px, 4vw, 64px);
  --card-pad: 32px;

  --r1: 4px; --r2: 6px; --r3: 10px; --r4: 16px; --r-pill: 999px;

  --t1: 120ms; --t2: 200ms; --t3: 320ms; --t4: 620ms;
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --ease-io: cubic-bezier(.65, 0, .35, 1);
  --ease-sheet: cubic-bezier(.32, .72, 0, 1);

  --header-h: 72px;
  --col-w: clamp(72px, 7vw, 132px);
}
@media (max-width: 819px) { :root { --header-h: 60px; } }
@media (max-width: 639px) { :root { --card-pad: 24px; } }

/* ------------------------------------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  font-synthesis: none;
  background: var(--bg);
  scroll-padding-top: calc(var(--header-h) + 16px);
}
html.motion { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--body);
  font: 400 16px/1.6 var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
body.is-locked { overflow: hidden; }
[data-theme="dark"]:not(html), [data-theme="light"]:not(html) { color: var(--body); }
main { flex: 1 0 auto; display: block; }
h1, h2, h3, h4, h5, h6 { margin: 0; color: var(--text); font-weight: 700; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ul, ol { margin: 0; padding: 0; }
dl, dd, figure, blockquote { margin: 0; }
a { color: inherit; text-decoration: none; }
img, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
svg { flex: none; }
button, input, select, textarea { font: inherit; color: inherit; letter-spacing: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
button:disabled { cursor: not-allowed; }
table { border-collapse: collapse; width: 100%; }
hr { border: 0; border-top: 1px solid var(--line); margin: 0; }
code, kbd, samp, pre { font-family: var(--font-mono); }
::selection { background: var(--accent-tint); color: var(--text); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
[hidden] { display: none !important; }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; left: 16px; top: 12px; z-index: 100;
  padding: 10px 16px; border-radius: var(--r2);
  background: var(--action); color: var(--on-action); font-weight: 600; font-size: 15px;
  transform: translateY(-160%); transition: transform var(--t2) var(--ease-out);
}
.skip:focus, .skip:focus-visible { transform: none; }

.icon {
  display: inline-block; width: 20px; height: 20px; flex: none; vertical-align: middle;
  fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round;
}
.icon--16 { width: 16px; height: 16px; }
.icon--24 { width: 24px; height: 24px; }

/* ------------------------------------------------------------------------------------------------ layout (A3) */
.shell { width: min(1360px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.col { width: min(960px, 100% - 2 * var(--gutter)); margin-inline: auto; }
.col--wide { width: min(1200px, 100% - 2 * var(--gutter)); }
.prose { max-width: 70ch; }
.section { padding-block: var(--section); position: relative; }
.section--rule { border-top: 1px solid var(--line); }
.section--tight { padding-block: calc(var(--section) * .6); }
.stack { display: flex; flex-direction: column; gap: var(--s4); }
.stack--l { gap: var(--s6); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3); }
.grid { display: grid; gap: var(--s4); grid-template-columns: minmax(0, 1fr); }
@media (min-width: 820px) {
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
.center { text-align: center; }
.center .lede { margin-inline: auto; }

.page-head { padding-block: calc(var(--section) * .75) calc(var(--section) * .5); }
.page-head--center { text-align: center; }
.page-head--center .lede { margin-inline: auto; }
.page-head .lede { margin-top: var(--s5); }

/* section glow (A7): two faint radial gradients at the margins, dark theme only, at most two per page */
.glow-left, .glow-right { position: relative; isolation: isolate; }
.glow-left::before, .glow-right::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(ellipse 30% 14% at var(--glow-x, 2%) 22%, var(--glow-soft), transparent 72%),
    radial-gradient(ellipse 30% 14% at var(--glow-x, 2%) 62%, var(--glow-soft), transparent 72%);
}
.glow-right { --glow-x: 98%; }
[data-theme="light"] .glow-left::before, [data-theme="light"] .glow-right::before { display: none; }

/* ------------------------------------------------------------------------------------------------ type (A2) */
.display-xl {
  font: 400 clamp(42px, 5.2vw, 72px)/1.05 var(--font-display);
  letter-spacing: 0; color: var(--text);
}
.display-xl .l2, .display-xl em { display: block; font-style: normal; color: var(--hero-2nd); }
.page-title {
  font: 400 clamp(40px, 5vw, 64px)/1.05 var(--font-display);
  letter-spacing: 0; color: var(--text);
}
.caret { color: var(--accent); margin-left: .06em; font-family: var(--font-display); font-weight: 400; }
.h2 {
  font: 800 clamp(32px, 3.8vw, 52px)/1.06 var(--font-body);
  letter-spacing: -0.03em; color: var(--text);
}
.h2 em, .h2--s em, .h3 em {
  font-family: var(--font-display); font-style: normal; font-weight: 400; letter-spacing: 0; color: var(--accent);
}
.h2--s { font: 800 clamp(26px, 2.8vw, 36px)/1.1 var(--font-body); letter-spacing: -0.025em; color: var(--text); }
.h3-display { font: 400 32px/1.15 var(--font-display); color: var(--text); letter-spacing: 0; }
.h3 { font: 700 22px/1.25 var(--font-body); letter-spacing: -0.01em; color: var(--text); }
@media (max-width: 639px) { .h3-display { font-size: 28px; } .h3 { font-size: 20px; } .display-xl { font-size: clamp(34px, 10.4vw, 48px); } }
.lede { font-size: 19px; line-height: 1.6; color: var(--body); max-width: 60ch; }
@media (max-width: 639px) { .lede { font-size: 16px; } }
.small { font-size: 14.5px; line-height: 1.55; }
.kicker {
  display: block; font: 600 12px/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: .12em; color: var(--accent);
}
.label { font: 600 11px/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.num { font: 500 15px/1.4 var(--font-mono); color: var(--dim); font-variant-numeric: tabular-nums; }
.num--s { font-size: 13px; }
.stat { font: 400 clamp(34px, 3.4vw, 48px)/1.05 var(--font-display); color: var(--text); letter-spacing: 0; }
.note { font: 400 11.5px/1.6 var(--font-mono); color: var(--faint); }
.muted { color: var(--muted); }
.accent { color: var(--accent); }
.epigraph {
  font: 400 20px/1.45 var(--font-serif); font-variation-settings: "opsz" 24; color: var(--dim);
}
@media (max-width: 639px) { .epigraph { font-size: 18px; } }
.link { color: var(--text); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; transition: color var(--t1), text-decoration-color var(--t1); }
.link:hover { color: var(--accent); text-decoration-color: currentColor; }
.unknown { color: var(--muted); }
.tabnum { font-variant-numeric: tabular-nums; }

pre, .code {
  margin: 0; padding: 18px 20px; overflow-x: auto;
  background: var(--bg-deep); color: var(--dim); border: 1px solid var(--line); border-radius: var(--r2);
  font: 400 13.5px/1.75 var(--font-mono); tab-size: 2;
}
@media (max-width: 639px) { pre, .code { font-size: 12.5px; } }
:not(pre) > code { font-size: .9em; color: var(--dim); background: var(--panel-2); padding: .1em .35em; border-radius: var(--r1); }

/* ------------------------------------------------------------------------------------------------ brand lockup (A9) */
.lockup { display: inline-flex; align-items: center; gap: 10px; color: var(--text); border-radius: var(--r2); }
.lockup .mark { width: 30px; height: 30px; object-fit: contain; flex: none; }
.mark__node { fill: var(--accent); }
.mark__glow { fill: var(--accent); opacity: .18; }
.wordmark {
  font: 600 18px/1 var(--font-serif); font-variation-settings: "opsz" 36;
  text-transform: uppercase; letter-spacing: .16em; color: var(--text);
  margin-right: -.16em;
}
@media (max-width: 819px) { .wordmark { font-size: 16px; } }

/* ------------------------------------------------------------------------------------------------ buttons (A3) */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; padding: 0 22px; border-radius: var(--r2);
  border: 1px solid transparent; background: transparent; color: var(--text);
  font: 600 15px/1 var(--font-body); letter-spacing: -0.01em; white-space: nowrap; text-decoration: none;
  cursor: pointer; user-select: none;
  transition: background-color var(--t2) var(--ease-out), border-color var(--t2) var(--ease-out), color var(--t1), box-shadow var(--t2), transform var(--t2) var(--ease-out);
}
.btn .icon { width: 18px; height: 18px; }
.btn--primary { background: var(--action); color: var(--on-action); box-shadow: var(--shadow-action); }
.btn--primary:hover { background: var(--action-hover); }
.btn--primary:active { transform: translateY(1px); }
.btn--ghost { border-color: var(--line-strong); color: var(--text); }
.btn--ghost:hover { background: var(--panel-2); border-color: var(--line-input); }
.btn--danger { border-color: var(--danger); color: var(--danger); }
.btn--danger:hover { background: var(--danger-tint); }
.btn--quiet {
  height: auto; min-height: 44px; padding: 0; border: 0; color: var(--dim); font-weight: 500; gap: 0;
}
.btn--quiet::before { content: "/"; color: var(--accent); margin-right: .45em; font-family: var(--font-mono); font-weight: 500; }
.btn--quiet:hover { color: var(--text); }
.btn--sm { height: 36px; padding: 0 14px; font-size: 14px; }
.btn--block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] {
  background: var(--panel-2); border-color: var(--line); color: var(--muted); box-shadow: none; opacity: 1; cursor: not-allowed; transform: none;
}
.btn--quiet:disabled, .btn--quiet[aria-disabled="true"] { background: none; }
.btn.is-inert { cursor: default; color: var(--muted); border-color: var(--line-strong); border-style: dashed; background: transparent; box-shadow: none; }
.btn.is-inert:hover { background: transparent; }
.btn.is-busy { cursor: progress; }
.btn--ghost.is-busy:disabled { background: transparent; border-color: var(--line-strong); color: var(--dim); }

.icon-btn {
  display: inline-grid; place-items: center; width: 40px; height: 40px; flex: none;
  border-radius: var(--r2); border: 1px solid var(--line-strong); color: var(--text); background: transparent;
  transition: background-color var(--t2), border-color var(--t2), color var(--t1);
}
.icon-btn:hover { background: var(--panel-2); border-color: var(--line-input); }
.icon-btn--bare { border-color: transparent; }
.icon-btn--s { width: 32px; height: 32px; }
.icon-btn--s .icon { width: 16px; height: 16px; }

/* three dot pulse: connecting, pending */
.dots { display: inline-flex; gap: 3px; align-items: center; }
.dots i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .5; }
html.motion .dots i { animation: dots 1.1s var(--ease-io) infinite; }
html.motion .dots i:nth-child(2) { animation-delay: .15s; }
html.motion .dots i:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 0%, 100% { opacity: .3; } 40% { opacity: 1; } }

/* ------------------------------------------------------------------------------------------------ forms (A3) */
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field__label { font-size: 14px; font-weight: 600; color: var(--dim); }
.field__hint { font-size: 13px; line-height: 1.5; color: var(--muted); }
.field__error { font-size: 13px; line-height: 1.5; color: var(--danger); }
.field__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.input, .select, .textarea {
  width: 100%; min-width: 0; height: 48px; padding: 0 14px;
  background: var(--panel); color: var(--text); border: 1px solid var(--line-input); border-radius: var(--r2);
  font: 400 16px/1.4 var(--font-body);
  transition: border-color var(--t1), box-shadow var(--t1);
}
.textarea { height: auto; min-height: 96px; padding: 12px 14px; resize: vertical; line-height: 1.55; }
.input::placeholder, .textarea::placeholder { color: var(--muted); opacity: 1; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--muted); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--danger); }
.input:disabled, .select:disabled, .textarea:disabled { background: var(--panel-2); color: var(--muted); border-color: var(--line-strong); cursor: not-allowed; }
.select {
  appearance: none; padding-right: 40px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 20px) 21px, calc(100% - 15px) 21px; background-size: 5px 5px; background-repeat: no-repeat;
}
.amount { position: relative; display: flex; align-items: center; }
.amount .input { height: 56px; padding-right: 76px; font: 500 20px/1 var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: 0; }
.amount__unit {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  font: 600 13px/1 var(--font-mono); letter-spacing: .06em; color: var(--muted); pointer-events: none;
}
.amount__max {
  position: absolute; right: 70px; top: 50%; transform: translateY(-50%);
  height: 28px; padding: 0 10px; border-radius: var(--r1); border: 1px solid var(--line-strong);
  font: 600 11px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--dim);
}
.amount__max:hover { color: var(--text); border-color: var(--line-input); }
.amount:has(.amount__max) .input { padding-right: 140px; }

.check { display: inline-flex; align-items: flex-start; gap: 10px; cursor: pointer; font-size: 15px; color: var(--dim); line-height: 1.45; min-height: 24px; }
.check input {
  appearance: none; flex: none; width: 18px; height: 18px; margin: 2px 0 0; border-radius: var(--r1);
  border: 1px solid var(--line-input); background: var(--panel); display: grid; place-items: center; cursor: pointer;
  transition: background-color var(--t1), border-color var(--t1);
}
.check input::after { content: ""; width: 10px; height: 6px; border: 2px solid var(--on-action); border-top: 0; border-right: 0; transform: translateY(-1px) rotate(-45deg) scale(0); transition: transform var(--t1); }
.check input:checked { background: var(--action); border-color: var(--action); }
.check input:checked::after { transform: translateY(-1px) rotate(-45deg) scale(1); }
.check input:disabled { background: var(--panel-2); border-color: var(--line-strong); cursor: not-allowed; }
.check:has(input:disabled) { color: var(--muted); cursor: not-allowed; }

.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-size: 15px; color: var(--dim); min-height: 24px; }
.switch input {
  appearance: none; position: relative; flex: none; width: 38px; height: 22px; margin: 0; border-radius: var(--r-pill);
  border: 1px solid var(--line-input); background: var(--panel-2); cursor: pointer; transition: background-color var(--t2), border-color var(--t2);
}
.switch input::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--muted); transition: transform var(--t2) var(--ease-out), background-color var(--t2);
}
.switch input:checked { background: var(--action); border-color: var(--action); }
.switch input:checked::after { transform: translateX(16px); background: var(--on-action); }
.switch input:disabled { cursor: not-allowed; opacity: 1; }
.switch:has(input:disabled) { color: var(--muted); cursor: not-allowed; }

/* segmented control (theme, pay with, filters) */
.seg { display: inline-flex; padding: 3px; gap: 2px; border: 1px solid var(--line-strong); border-radius: var(--r2); background: var(--panel); max-width: 100%; }
.seg button {
  min-height: 34px; padding: 0 14px; border-radius: 4px; font: 600 13px/1 var(--font-body); color: var(--muted); white-space: nowrap;
  transition: background-color var(--t2), color var(--t1);
}
.seg button:hover { color: var(--text); }
.seg button[aria-pressed="true"], .seg button[aria-checked="true"] { background: var(--panel-2); color: var(--text); box-shadow: inset 0 0 0 1px var(--line-strong); }
.seg button:disabled { color: var(--muted); cursor: not-allowed; opacity: .7; }
.seg--block { display: flex; width: 100%; }
.seg--block button { flex: 1; }

/* pill tabs (job picker, account) and line tabs (quote card, code tabs) */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; }
.tabs [role="tab"] {
  min-height: 40px; padding: 0 16px; border-radius: var(--r-pill); border: 1px solid var(--line);
  font: 500 14px/1 var(--font-body); color: var(--muted); white-space: nowrap;
  transition: background-color var(--t2), border-color var(--t2), color var(--t1);
}
.tabs [role="tab"]:hover { color: var(--text); }
.tabs [role="tab"][aria-selected="true"] { background: var(--panel-2); border-color: var(--line-strong); color: var(--text); }
.tabs--line { gap: 20px; border-bottom: 1px solid var(--line); flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
.tabs--line::-webkit-scrollbar { display: none; }
.tabs--line [role="tab"] { border: 0; border-radius: 0; padding: 0 0 12px; min-height: 36px; background: none; position: relative; font-weight: 600; font-size: 15px; }
.tabs--line [role="tab"][aria-selected="true"] { background: none; color: var(--text); }
.tabs--line [role="tab"][aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--accent); }

/* ------------------------------------------------------------------------------------------------ chips and dots (A7) */
.chip {
  display: inline-flex; align-items: center; gap: 7px; height: 24px; padding: 0 10px; flex: none;
  border-radius: var(--r-pill); border: 1px solid transparent;
  font: 600 11px/1 var(--font-mono); text-transform: uppercase; letter-spacing: .12em; white-space: nowrap;
}
.chip .dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.chip .icon { width: 14px; height: 14px; stroke-width: 1.75; }
.chip--live { color: var(--accent); background: var(--accent-tint); }
.chip--idle { color: var(--muted); background: var(--panel-2); }
.chip--idle .dot { background: var(--faint); }
.chip--warn { color: var(--warn); background: var(--panel-2); }
.chip--danger { color: var(--danger); background: var(--danger-tint); }
.chip--illustrative { color: var(--warn); background: transparent; border: 1px dashed var(--line-strong); }
.chip--plain { color: var(--dim); background: var(--panel-2); }

.live-dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex: none; }
.live-dot--idle { background: var(--faint); }
html.motion .chip--live .dot, html.motion .live-dot:not(.live-dot--idle), html.motion .is-live > .dot {
  animation: pulse 2s var(--ease-out) infinite;
}
@keyframes pulse { 0% { box-shadow: 0 0 0 0 var(--glow); } 100% { box-shadow: 0 0 0 6px transparent; } }

/* ------------------------------------------------------------------------------------------------ cards */
.card {
  position: relative; min-width: 0;
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r3);
  padding: var(--card-pad); box-shadow: var(--shadow-card);
}
.card--raised { border-color: var(--line-strong); }
.card--accent { border-color: var(--accent-line); background: linear-gradient(180deg, var(--accent-tint), var(--panel) 72%); }
.card--link { display: block; transition: transform var(--t2) var(--ease-out), box-shadow var(--t2), border-color var(--t2); }
.card--link:hover { transform: translateY(-2px); box-shadow: var(--ring); border-color: var(--line-strong); }
.card .kicker { margin-bottom: 14px; }
.card .h3 + p { margin-top: 10px; }
/* plain paragraphs only: a p.kicker, p.label, p.note or p.num keeps its own size */
.card p:not([class]) { font-size: 14.5px; line-height: 1.55; }

/* stage card (heyaskr engine card): copy | hairline list */
.stagecard {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 40px;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--r4); padding: 32px;
  box-shadow: var(--shadow-card);
}
.stagecard .h3-display { margin: 12px 0 14px; }
.stagecard p:not([class]) { font-size: 15px; }
.slashlist { list-style: none; display: flex; flex-direction: column; gap: 10px; padding-left: 24px; border-left: 1px solid var(--line); align-self: start; }
.slashlist li { font-size: 13.5px; line-height: 1.5; color: var(--dim); }
.slashlist li::before { content: "/"; color: var(--accent); margin-right: .5em; font-family: var(--font-mono); }
@media (max-width: 1023px) {
  .stagecard { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .stagecard .slashlist { border-left: 0; padding-left: 0; padding-top: 18px; border-top: 1px solid var(--line); }
}
@media (max-width: 639px) { .stagecard { padding: 24px; } }

/* band (stats) */
.band {
  display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 1px;
  background: var(--line); border: 1px solid var(--line); border-radius: var(--r3); overflow: hidden;
}
.band > div { background: var(--panel); padding: 20px 24px; min-width: 0; }
.band dt { font: 600 11px/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); }
.band dd { margin-top: 8px; font: 600 18px/1.3 var(--font-mono); color: var(--text); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.band dd.is-launch, .band dd .is-launch { color: var(--muted); font-weight: 500; }
.band .band__sub { display: block; margin-top: 4px; font: 400 12px/1.5 var(--font-mono); color: var(--faint); }
@media (max-width: 819px) {
  .band { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .band > div:last-child:nth-child(odd) { grid-column: 1 / -1; }
}
@media (max-width: 399px) { .band { grid-template-columns: minmax(0, 1fr); } }

/* table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r3); background: var(--panel); }
.table th, .table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line-row); vertical-align: middle; }
.table thead th { background: var(--panel); font: 600 11px/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); white-space: nowrap; }
.table tbody tr:last-child td, .table tbody tr:last-child th { border-bottom: 0; }
.table tbody tr:hover { background: var(--panel-2); }
.table td { font-size: 14.5px; color: var(--dim); }
.table .num, .table td.num { font-size: 13px; }
.table .r { text-align: right; }

/* FAQ */
.faq { display: flex; flex-direction: column; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; list-style: none;
  padding: 18px 0; font: 600 17px/1.4 var(--font-body); color: var(--text);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary .icon { color: var(--accent); transition: transform var(--t2) var(--ease-out); }
.faq details[open] summary .icon { transform: rotate(45deg); }
.faq .faq__a { padding: 0 40px 20px 0; color: var(--body); font-size: 15.5px; }

/* callout (docs and notes inside pages) */
.callout { padding: 14px 18px; border-radius: var(--r2); background: var(--panel); border: 1px solid var(--line); border-left: 3px solid var(--accent); font-size: 15px; color: var(--dim); }
.callout--warn { border-left-color: var(--warn); }

/* chain badge and token pill (B4) */
.chain-badge {
  display: inline-flex; align-items: center; gap: 8px; height: 30px; padding: 0 12px 0 10px;
  border: 1px solid var(--line-strong); border-radius: var(--r-pill);
  font: 400 12px/1 var(--font-mono); color: var(--muted); white-space: nowrap;
  transition: border-color var(--t2), color var(--t1);
}
.chain-badge strong { color: var(--text); font-weight: 600; }
.chain-badge .icon { width: 14px; height: 14px; color: var(--accent); }
a.chain-badge:hover { border-color: var(--line-input); }
.token-pill {
  display: inline-flex; align-items: center; gap: 8px; height: 32px; padding: 0 12px; flex: none;
  border: 1px solid var(--line-strong); border-radius: var(--r-pill);
  font: 500 12.5px/1 var(--font-mono); color: var(--text); white-space: nowrap;
  transition: border-color var(--t2), background-color var(--t2);
}
.token-pill:hover { border-color: var(--line-input); background: var(--panel-2); }
.token-pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--faint); flex: none; }
.token-pill.is-live .dot { background: var(--accent); }
.token-pill__when { color: var(--muted); }
.token-pill--block { width: 100%; height: 44px; justify-content: center; }
@media (max-width: 1439px) { .site-header .token-pill__when { display: none; } }

/* ------------------------------------------------------------------------------------------------ Greek motifs (A6) */
.meander {
  display: block; width: 100%; height: 12px; flex: none;
  background: var(--meander-color, color-mix(in srgb, var(--line-input) 55%, transparent));
  -webkit-mask: url("/img/meander.svg") 0 0 / 24px 12px repeat-x, linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  -webkit-mask-composite: source-in;
  mask: url("/img/meander.svg") 0 0 / 24px 12px repeat-x, linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
  mask-composite: intersect;
}
.meander--short { width: 120px; margin-inline: auto; }
.meander--accent { --meander-color: var(--accent); opacity: .55; }
.rule-wrap { width: min(1360px, 100% - 2 * var(--gutter)); margin-inline: auto; }

.laurel { display: inline-flex; align-items: center; gap: 10px; }
.laurel::before, .laurel::after {
  content: ""; flex: none; width: 11px; height: 22px; background: var(--accent); opacity: .7;
  -webkit-mask: url("/img/laurel-s.svg") center / contain no-repeat; mask: url("/img/laurel-s.svg") center / contain no-repeat;
}
.laurel::after { transform: scaleX(-1); }
.laurel--stat { gap: 14px; }
.laurel--stat::before, .laurel--stat::after { width: 20px; height: 40px; -webkit-mask-image: url("/img/laurel.svg"); mask-image: url("/img/laurel.svg"); }

.obol-icon { display: inline-block; width: 18px; height: 18px; vertical-align: -3px; color: var(--accent); }

/* marble columns (A6) */
.colframe { position: absolute; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.colframe img {
  position: absolute; top: -6vh; width: var(--col-w); height: 118vh; max-width: none;
  object-fit: cover; object-position: 50% 0;
  transform: translate3d(0, var(--par, 0px), 0);
}
.colframe .col-l { left: -2vw; }
.colframe .col-r { right: -2vw; transform: translate3d(0, var(--par, 0px), 0) scaleX(-1); }

/* ------------------------------------------------------------------------------------------------ home stage (A7) */
.stage {
  position: relative; isolation: isolate; overflow: hidden; background: var(--bg); color: var(--body);
  min-height: clamp(620px, 86vh, 900px); display: flex; flex-direction: column; justify-content: flex-end;
  padding-top: calc(var(--header-h) + 32px); padding-bottom: 56px;
}
.stage__art { position: absolute; inset: 0; z-index: -2; }
.stage__art img, .stage__art video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 44%; }
.stage__art video { opacity: 0; transition: opacity 450ms var(--ease-out); }
.stage__art video.is-playing { opacity: 1; }
.stage__veil {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(90deg, var(--bg) 8%, rgba(10, 15, 13, .95) 36%, rgba(10, 15, 13, .52) 54%, transparent 66%),
    linear-gradient(to bottom, rgba(10, 15, 13, .32), transparent 22%, transparent 62%, var(--bg));
}
.stage__grain {
  position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: .08; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.82' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
}
.stage .colframe { z-index: -1; }
/* the columns stand under the header bar, which reads as their lintel (the temple Pi of the mark) */
.stage .colframe img {
  top: calc(var(--header-h) + var(--notice-h, 0px));
  -webkit-mask: linear-gradient(to bottom, #000 34%, transparent 60%); mask: linear-gradient(to bottom, #000 34%, transparent 60%);
}
html[data-stage] .stage__art { top: var(--notice-h, 0px); }
.stage__content { position: relative; z-index: 1; display: grid; grid-template-columns: minmax(0, 1fr) 26rem; gap: 56px; align-items: end; }
.stage__copy { display: flex; flex-direction: column; align-items: flex-start; gap: 28px; min-width: 0; }
.stage__copy .lede { max-width: 52ch; color: var(--body); }
.stage__actions { display: flex; flex-wrap: wrap; gap: 12px; }
.stage__side { display: flex; flex-direction: column; align-items: stretch; gap: 16px; min-width: 0; }
.stage__side .term { width: 100%; }
@media (max-width: 1099px) {
  .stage__content { grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: start; }
  .stage__side { max-width: 26rem; }
}
/* the text keeps at least 48px of air from the marble columns */
@media (min-width: 820px) {
  .stage__content.shell { width: min(1360px, 100% - 2 * max(var(--gutter), var(--col-w) - 2vw + 48px)); }
}
@media (max-width: 819px) {
  .stage__content { grid-template-columns: minmax(0, 1fr); gap: 32px; align-items: start; }
  .stage__copy { gap: 22px; }
  .stage { min-height: 0; justify-content: flex-start; padding-top: 316px; padding-bottom: 40px; }
  .stage__art { inset: 0 0 auto; height: 360px; }
  .stage__art img { object-position: 50% 30%; }
  .stage__veil { background: linear-gradient(180deg, rgba(10, 15, 13, .35) 0%, transparent 22%, transparent 40%, var(--bg) 100%); height: 360px; bottom: auto; }
  .stage .colframe { inset: 0 0 auto; height: 360px; z-index: -1; }
  .stage .colframe img {
    top: calc(var(--header-h) + 4px); width: 52px; height: 262px; object-fit: cover; object-position: 50% 0;
    -webkit-mask: linear-gradient(to bottom, #000 62%, transparent); mask: linear-gradient(to bottom, #000 62%, transparent);
  }
  .stage .colframe .col-l { left: 0; }
  .stage .colframe .col-r { right: 0; }
}
@media (min-width: 420px) and (max-width: 819px) { .stage .colframe img { width: 60px; } }

/* ticker (A7) */
.ticker {
  position: relative; height: 44px; overflow: hidden; background: var(--bg-deep);
  border-block: 1px solid var(--line);
  -webkit-mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}
.ticker__track { display: flex; width: max-content; height: 100%; }
.ticker__list { display: flex; align-items: center; list-style: none; height: 100%; flex: none; }
.ticker__item { display: inline-flex; align-items: center; gap: 10px; padding: 0 22px; white-space: nowrap; font: 500 12px/1 var(--font-mono); font-variant-numeric: tabular-nums; position: relative; }
.ticker__item::after { content: ""; position: absolute; right: -2px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.ticker__label { color: var(--muted); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.ticker__value { color: var(--text); }
.ticker.is-static { -webkit-mask: none; mask: none; }
.ticker.is-static .ticker__track { width: 100%; justify-content: center; }
.ticker.is-static .ticker__item:last-child::after { display: none; }
html.motion .ticker.is-running .ticker__track { animation: ticker var(--ticker-dur, 60s) linear infinite; }
.ticker:hover .ticker__track, .ticker:focus-within .ticker__track { animation-play-state: paused !important; }
@keyframes ticker { to { transform: translateX(-50%); } }
.ticker.is-empty { display: none; }

/* terminal panel (A7) */
.term {
  width: 380px; max-width: 100%; border-radius: var(--r2);
  background: var(--term-glass); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px);
  border: 1px solid var(--line-strong); padding: 8px 12px 6px; color: var(--text);
}
.term__head { display: flex; align-items: center; gap: 8px; height: 22px; }
.term__title { font: 600 11px/1 var(--font-mono); letter-spacing: .08em; text-transform: uppercase; color: var(--dim); }
.term__head .live-dot { margin-left: 1px; }
.term__rows { list-style: none; margin-top: 4px; }
.term__row { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; align-items: center; gap: 8px; height: 28px; border-top: 1px solid var(--line); }
.term__age { font: 500 11px/1 var(--font-mono); color: var(--faint); font-variant-numeric: tabular-nums; }
.term__event { font: 600 11px/1 var(--font-mono); color: var(--muted); letter-spacing: .06em; text-transform: uppercase; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.term__value { font: 500 12px/1 var(--font-mono); color: var(--text); text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
a.term__value:hover { color: var(--accent); }
.term__msg { display: flex; align-items: center; min-height: 36px; border-top: 1px solid var(--line); margin-top: 4px; font: 400 12px/1.4 var(--font-mono); color: var(--muted); }
.term__msg--error { color: var(--danger); }
.term .skeleton { margin-block: 10px; }
.term__body { min-height: 36px; }
.term.is-compact { width: auto; display: inline-flex; align-self: flex-start; align-items: center; padding: 8px 14px; }
.term.is-compact .term__head { height: auto; }
.term.is-compact .term__body { min-height: 0; }
.term.is-compact .term__msg { display: none; }
@media (max-width: 559px) {
  .term { width: 100%; }
  .term__row { grid-template-columns: minmax(0, 1fr) auto; }
  .term__age { display: none; }
}

/* ------------------------------------------------------------------------------------------------ header (B2) */
.site-header {
  position: sticky; top: 0; z-index: 50; height: var(--header-h); flex: none;
  background: var(--header-glass); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line); color: var(--text);
  transition: background-color var(--t3) var(--ease-out), border-color var(--t3) var(--ease-out);
}
html[data-stage] .site-header { position: fixed; inset: 0 0 auto; }
html[data-stage] .site-header:not([data-header]), html[data-stage] .site-header[data-header="overlay"] {
  background: transparent; border-bottom-color: var(--line-strong); -webkit-backdrop-filter: none; backdrop-filter: none;
}
.site-header__inner {
  height: 100%; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 24px;
}
.site-header .lockup { min-height: 44px; }
.nav { display: none; justify-self: center; align-items: center; gap: 4px; }
.nav__link {
  position: relative; display: inline-flex; align-items: center; gap: 4px; height: 40px; padding: 0 11px;
  font: 500 15px/1 var(--font-body); color: var(--body); white-space: nowrap; border-radius: var(--r2);
  transition: color var(--t1);
}
.nav__link:hover, .nav__link[aria-expanded="true"] { color: var(--text); }
.nav__link[aria-current="page"], .nav__link.is-current { color: var(--text); }
.nav__link[aria-current="page"]::after, .nav__link.is-current::after {
  content: ""; position: absolute; left: 11px; right: 11px; bottom: 4px; height: 2px; background: var(--accent); border-radius: 1px;
}
.nav__link .icon { width: 16px; height: 16px; transition: transform var(--t2) var(--ease-out); }
.nav__link[aria-expanded="true"] .icon { transform: rotate(180deg); }
.nav__drop { position: relative; }
.dropdown {
  position: absolute; top: calc(100% + 8px); left: 50%; translate: -50% 0; z-index: 60; width: 232px;
  padding: 6px; background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--r3); box-shadow: var(--shadow-pop);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: opacity var(--t2) var(--ease-out), transform var(--t2) var(--ease-out), visibility 0s linear var(--t2);
}
.dropdown.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.dropdown a {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; height: 40px; padding: 0 12px;
  border-radius: var(--r2); font-size: 14px; font-weight: 500; color: var(--dim);
}
.dropdown a:hover, .dropdown a:focus-visible { background: var(--panel-2); color: var(--text); outline-offset: -2px; }
.dropdown a[aria-current="page"] { color: var(--text); }
.dropdown a[aria-current="page"]::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.header-actions { display: flex; align-items: center; justify-content: flex-end; gap: 10px; min-width: 0; }
.header-actions > * { flex: none; }
.header-actions .token-pill, .header-actions .theme-toggle { display: none; }
.header-actions .get-obol { display: none; }
.menu-btn .i-close { display: none; }
.menu-btn[aria-expanded="true"] .i-open { display: none; }
.menu-btn[aria-expanded="true"] .i-close { display: inline-block; }
@media (min-width: 640px) { .header-actions .token-pill, .header-actions .theme-toggle { display: inline-flex; } }
@media (min-width: 820px) { .header-actions .get-obol { display: inline-flex; } }
@media (min-width: 1280px) {
  .nav { display: flex; }
  .menu-btn { display: none; }
}
@media (max-width: 379px) { .header-actions .token-pill { display: none; } }
.site-header .theme-toggle { width: 36px; height: 36px; }
@media (min-width: 1280px) { .wallet-btn { min-width: 148px; } }
@media (min-width: 1280px) and (max-width: 1439px) {
  .site-header__inner { gap: 16px; }
  .site-header .token-pill__when { display: none; }
  .nav { gap: 2px; }
  .nav__link { padding: 0 9px; }
  .nav__link[aria-current="page"]::after, .nav__link.is-current::after { left: 9px; right: 9px; }
}
@media (max-width: 1279px) { .site-header__inner { grid-template-columns: auto minmax(0, 1fr); } .nav { display: none; } }
/* the icon shows the theme a click switches to, matching the aria-label */
.theme-toggle .i-moon { display: none; }
html[data-theme="light"] .theme-toggle .i-sun { display: none; }
html[data-theme="light"] .theme-toggle .i-moon { display: inline-block; }

/* wallet button (B3) */
.wallet-btn { min-width: 0; max-width: 100%; }
.wallet-btn .l-sm { display: none; }
@media (max-width: 479px) { .wallet-btn .l-lg { display: none; } .wallet-btn .l-sm { display: inline; } }
.wallet-btn.is-connected { font: 500 13.5px/1 var(--font-mono); letter-spacing: 0; gap: 8px; }
.wallet-btn.is-connected .live-dot { width: 6px; height: 6px; }

/* mobile sheet (B2) */
.sheet {
  position: fixed; left: 0; right: 0; top: var(--header-h); bottom: 0; z-index: 45;
  height: calc(100dvh - var(--header-h)); overflow-y: auto; overscroll-behavior: contain;
  background: var(--bg-deep); color: var(--text); border-top: 1px solid var(--line);
  opacity: 0; visibility: hidden; transform: translateY(-8px);
  transition: opacity var(--t3) var(--ease-sheet), transform var(--t3) var(--ease-sheet), visibility 0s linear var(--t3);
}
.sheet.is-open { opacity: 1; visibility: visible; transform: none; transition-delay: 0s; }
.sheet__inner { width: min(640px, 100% - 2 * var(--gutter)); margin-inline: auto; padding-block: 20px 32px; display: flex; flex-direction: column; gap: 22px; }
.sheet__nav { display: flex; flex-direction: column; gap: 22px; }
.sheet__group { display: flex; flex-direction: column; }
.sheet__group .label { padding: 0 4px 8px; }
.sheet__group a {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 48px; padding: 0 4px;
  border-top: 1px solid var(--line); font-size: 16px; font-weight: 500; color: var(--dim);
}
.sheet__group a:last-child { border-bottom: 1px solid var(--line); }
.sheet__group a:hover { color: var(--text); }
.sheet__group a[aria-current="page"] { color: var(--text); }
.sheet__group a[aria-current="page"]::after { content: ""; width: 6px; height: 6px; margin-right: 5px; border-radius: 50%; background: var(--accent); }
.sheet__group a[aria-current="page"] .icon { display: none; }
.sheet__group a .icon { width: 16px; height: 16px; color: var(--muted); }
.sheet__foot { display: flex; flex-direction: column; gap: 12px; }
.sheet__foot .token-pill { justify-content: center; height: 44px; width: 100%; }
.sheet__foot .seg { width: 100%; }
.sheet__foot .seg button { flex: 1; min-height: 38px; }
@media (min-width: 1280px) { .sheet { display: none; } }

/* notice region (B2) */
.notice-region { position: relative; z-index: 40; }
html[data-stage] .notice-region { position: fixed; top: var(--header-h); left: 0; right: 0; }
/* the banner overlays the stage's sky on home, so the stage copy moves down by its height */
html[data-stage][data-notice] .stage { padding-top: calc(var(--header-h) + 32px + var(--notice-h, 44px)); }
@media (max-width: 819px) {
  html[data-stage][data-notice] .stage { padding-top: calc(316px + var(--notice-h, 44px)); }
  html[data-stage] .stage .colframe, html[data-stage] .stage__veil { top: var(--notice-h, 0px); }
}
.banner {
  display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 8px var(--gutter);
  background: var(--panel-2); border-left: 3px solid var(--banner-color, var(--accent)); border-bottom: 1px solid var(--line);
  font-size: 14.5px; color: var(--dim); line-height: 1.45;
}
.banner .icon { color: var(--banner-color, var(--accent)); width: 18px; height: 18px; }
.banner__text { flex: 1; min-width: 0; }
.banner .btn { margin-left: auto; }
.banner--network { --banner-color: var(--danger); }
.banner--paused, .banner--stale { --banner-color: var(--warn); }
.banner--gateway { --banner-color: var(--muted); }
@media (min-width: 480px) and (max-width: 639px) { .banner { flex-wrap: wrap; } .banner__text { flex-basis: calc(100% - 40px); } .banner .btn { margin-left: 30px; } }
/* one line on phones: the text truncates (the full text stays in the title attribute), the action stays */
@media (max-width: 479px) {
  .banner { gap: 10px; font-size: 13.5px; }
  .banner__text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* ------------------------------------------------------------------------------------------------ footer (B5) */
.site-footer { background: var(--bg-deep); color: var(--body); flex: none; }
.cta-band {
  position: relative; isolation: isolate; overflow: hidden; background: var(--bg-deep);
  min-height: 320px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: 64px var(--gutter) 72px; text-align: center; border-top: 1px solid var(--line);
}
.cta-band .meander { position: absolute; top: 0; left: 0; right: 0; }
.cta-band__title { font: 400 clamp(30px, 3.6vw, 48px)/1.12 var(--font-display); color: var(--text); letter-spacing: 0; max-width: 100%; }
.cta-band__title span { display: block; }
.cta-band__title em { font-style: normal; color: var(--accent); }
.cta-band__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 12px 28px; margin-top: 32px; }
.cta-band .colframe { display: none; }
@media (min-width: 1024px) {
  .cta-band .colframe { display: block; z-index: -1; }
  .cta-band .colframe img { top: 0; width: 72px; height: 100%; object-fit: cover; object-position: 50% 0; opacity: .9;
    -webkit-mask: linear-gradient(to bottom, #000 55%, transparent); mask: linear-gradient(to bottom, #000 55%, transparent); }
  .cta-band .colframe img { top: 20px; }
  .cta-band .colframe .col-l { left: max(32px, 50% - 680px); }
  .cta-band .colframe .col-r { right: max(32px, 50% - 680px); }
}
.footer-cols {
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 40px 32px;
  padding-block: 56px 48px; border-top: 1px solid var(--line);
}
.footer-brand { display: flex; flex-direction: column; align-items: flex-start; gap: 16px; grid-column: 1 / -1; min-width: 0; }
@media (min-width: 1280px) {
  .footer-cols { grid-template-columns: minmax(304px, 1.2fr) repeat(4, minmax(0, 1fr)); }
  .footer-brand { grid-column: auto; }
}
.footer-brand .epigraph { font-size: 18px; }
.footer-brand__links { display: flex; flex-direction: column; gap: 4px; font-size: 14.5px; }
.footer-brand__links a { color: var(--dim); min-height: 32px; display: inline-flex; align-items: center; gap: 8px; }
.footer-brand__links .icon { color: var(--muted); }
.footer-brand__links a:hover { color: var(--text); }
.footer-token { display: flex; flex-wrap: wrap; gap: 8px; }
.footer-token .is-inert { color: var(--muted); }
.footer-token .btn--sm { padding: 0 12px; }
.footer-col h2 { font: 600 11px/1.4 var(--font-mono); text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: 12px; }
.footer-col ul { list-style: none; display: flex; flex-direction: column; }
.footer-col a { display: inline-flex; align-items: center; min-height: 32px; font-size: 14.5px; color: var(--dim); transition: color var(--t1); }
.footer-col a:hover { color: var(--text); }
.footer-col a[aria-current="page"] { color: var(--text); }
.footer-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 24px;
  padding-block: 18px 22px; border-top: 1px solid var(--line);
  font: 400 11.5px/1.6 var(--font-mono); color: var(--faint);
}
.footer-bar__legal { flex: 1 1 320px; text-align: center; }
.footer-bar p { margin: 0; }
.seg--s button { min-height: 30px; font-size: 12px; padding: 0 12px; }
@media (max-width: 1023px) { .footer-bar__legal { text-align: left; order: 3; flex-basis: 100%; } }
@media (max-width: 819px) {
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 339px) { .footer-cols { grid-template-columns: minmax(0, 1fr); } }
.site-footer--slim .footer-bar { border-top: 1px solid var(--line); }

/* ------------------------------------------------------------------------------------------------ toasts (B6) */
.toasts {
  position: fixed; right: 24px; bottom: 24px; z-index: 90; width: min(380px, 100vw - 32px);
  display: flex; flex-direction: column-reverse; gap: 10px; pointer-events: none;
}
.toast {
  pointer-events: auto; display: grid; grid-template-columns: 20px minmax(0, 1fr) auto; align-items: start; gap: 12px;
  padding: 14px 14px 14px 16px; background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--r3);
  box-shadow: var(--shadow-pop); color: var(--text); font-size: 14.5px; line-height: 1.45;
  animation: toast-in var(--t3) var(--ease-out);
}
.toast.is-leaving { animation: toast-out var(--t2) var(--ease-out) forwards; }
.toast > .icon { color: var(--muted); margin-top: 1px; }
.toast--success > .icon { color: var(--accent); }
.toast--error > .icon { color: var(--danger); }
.toast--pending > .dots { color: var(--accent); height: 20px; }
.toast__text { min-width: 0; }
.toast__text p { margin: 0; overflow-wrap: anywhere; }
.toast__action { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 13.5px; font-weight: 600; color: var(--accent); }
.toast__action:hover { text-decoration: underline; text-underline-offset: 3px; }
.toast__close { width: 28px; height: 28px; margin: -4px -4px 0 0; display: grid; place-items: center; border-radius: var(--r1); color: var(--muted); }
.toast__close:hover { color: var(--text); background: var(--panel-2); }
.toast__close .icon { width: 16px; height: 16px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } }
@keyframes toast-out { to { opacity: 0; } }
@media (max-width: 639px) {
  .toasts { left: 16px; right: 16px; width: auto; bottom: calc(16px + env(safe-area-inset-bottom)); }
}

/* ------------------------------------------------------------------------------------------------ dialogs (B7) */
.dialog {
  width: min(480px, 100vw - 32px); max-width: none; max-height: min(88dvh, 820px); padding: 0; margin: auto;
  background: var(--panel); color: var(--text); border: 1px solid var(--line-strong); border-radius: var(--r4); box-shadow: var(--shadow-pop);
  overflow: hidden; flex-direction: column;
}
.dialog[open] { display: flex; animation: dialog-in var(--t3) var(--ease-out); }
.dialog--wide { width: min(640px, 100vw - 32px); }
.dialog::backdrop { background: var(--scrim, rgba(3, 8, 6, .72)); }
.dialog__close--busy { height: 44px; padding: 0 4px; font: 500 14px/1 var(--font-body); color: var(--dim); white-space: nowrap; }
.dialog__close--busy:hover { color: var(--text); }
.dialog__head { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 18px 14px 24px; border-bottom: 1px solid var(--line); flex: none; }
.dialog__title { font: 700 20px/1.3 var(--font-body); color: var(--text); letter-spacing: -0.01em; }
.dialog__body { padding: 20px 24px; overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 16px; color: var(--body); font-size: 15px; }
.dialog__foot { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding: 14px 24px 20px; border-top: 1px solid var(--line); flex: none; }
.dialog__foot .note { margin-right: auto; align-self: center; }
@keyframes dialog-in { from { opacity: 0; transform: translateY(10px) scale(.99); } }
@media (max-width: 639px) {
  .dialog, .dialog--wide {
    width: 100%; max-width: 100%; max-height: 90dvh; margin: auto 0 0; border-radius: 16px 16px 0 0; border-bottom: 0;
    padding-bottom: env(safe-area-inset-bottom);
  }
  .dialog[open] { animation: sheet-in var(--t3) var(--ease-sheet); }
  .dialog__foot .btn { flex: 1 1 auto; }
}
@keyframes sheet-in { from { transform: translateY(24px); opacity: 0; } }

/* wallet chooser rows (B3) */
.wallet-list { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.wallet-row {
  width: 100%; display: grid; grid-template-columns: 32px minmax(0, 1fr) auto auto; align-items: center; gap: 12px;
  min-height: 56px; padding: 10px 12px; border-radius: var(--r3); border: 1px solid var(--line); background: var(--panel-3); text-align: left;
  transition: border-color var(--t2), background-color var(--t2);
}
.wallet-row:hover { border-color: var(--line-strong); background: var(--panel-2); }
.wallet-row:disabled { cursor: progress; }
.wallet-row__icon { width: 32px; height: 32px; border-radius: var(--r2); background: var(--panel-2); display: grid; place-items: center; overflow: hidden; }
.wallet-row__icon img { width: 100%; height: 100%; object-fit: cover; }
.wallet-row__icon .icon { color: var(--muted); }
.wallet-row__name { font-weight: 600; font-size: 15.5px; color: var(--text); min-width: 0; overflow-wrap: anywhere; }
.wallet-row__tag { font: 600 11px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--accent); background: var(--accent-tint); border-radius: var(--r-pill); padding: 5px 8px; }
.wallet-row__go { color: var(--muted); }
.wallet-row.is-busy .wallet-row__go { display: none; }
.wallet-empty { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--r3); background: var(--panel-3); border: 1px solid var(--line); color: var(--dim); font-size: 15px; }
.wallet-empty .icon { color: var(--muted); margin-top: 2px; }
.form-error { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r2); background: var(--danger-tint); color: var(--text); font-size: 14.5px; line-height: 1.45; }
.form-error .icon { color: var(--danger); margin-top: 1px; width: 18px; height: 18px; }

/* wallet menu (B3): a popover under the button, a bottom sheet under 640px */
.wallet-menu {
  position: fixed; z-index: 70; width: 300px; padding: 14px;
  background: var(--panel); border: 1px solid var(--line-strong); border-radius: var(--r3); box-shadow: var(--shadow-pop);
  color: var(--text); display: flex; flex-direction: column; gap: 12px;
}
.wallet-menu:focus, .wallet-menu:focus-visible { outline: none; }
.wallet-menu__head { display: none; }
.wallet-menu__addr { display: flex; align-items: flex-start; gap: 8px; }
.wallet-menu__addr code { flex: 1; min-width: 0; background: none; padding: 0; font: 500 12.5px/1.55 var(--font-mono); color: var(--text); overflow-wrap: anywhere; }
.wallet-menu__bal { display: flex; flex-direction: column; border-block: 1px solid var(--line); padding-block: 6px; }
.wallet-menu__bal div { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-height: 30px; }
.wallet-menu__bal dt { font: 600 11px/1 var(--font-mono); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.wallet-menu__bal dd { font: 500 13px/1 var(--font-mono); color: var(--dim); font-variant-numeric: tabular-nums; }
.wallet-menu__links { list-style: none; display: flex; flex-direction: column; }
.wallet-menu__links a, .wallet-menu__links button {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; padding: 0 8px;
  border-radius: var(--r2); font-size: 14.5px; font-weight: 500; color: var(--dim); text-align: left;
}
.wallet-menu__links a:hover, .wallet-menu__links button:hover { background: var(--panel-2); color: var(--text); }
.wallet-menu__links .icon { width: 16px; height: 16px; color: var(--muted); }
.wallet-menu__disconnect { border-top: 1px solid var(--line); padding-top: 6px; }
.wallet-menu__chain { display: flex; align-items: center; gap: 8px; font: 500 12px/1 var(--font-mono); color: var(--muted); }
@media (max-width: 639px) {
  .wallet-menu { left: 0 !important; right: 0 !important; top: auto !important; bottom: 0; width: 100%; border-radius: 16px 16px 0 0; border-bottom: 0; padding: 10px 18px calc(18px + env(safe-area-inset-bottom)); max-height: 88dvh; overflow-y: auto; }
  .wallet-menu::before { content: ""; align-self: center; width: 36px; height: 4px; border-radius: 2px; background: var(--line-strong); flex: none; }
  .wallet-menu__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-right: -8px; }
  .wallet-menu__title { font: 700 18px/1.3 var(--font-body); color: var(--text); }
  .wallet-menu__head .icon-btn { width: 44px; height: 44px; }
  .wallet-menu__links a, .wallet-menu__links button { min-height: 44px; }
}
.wallet-scrim { position: fixed; inset: 0; z-index: 69; background: transparent; }
@media (max-width: 639px) { .wallet-scrim { background: var(--scrim); } }

/* transaction steps (B7 runTx) */
.steps { list-style: none; display: flex; flex-direction: column; gap: 2px; }
.step { display: grid; grid-template-columns: 22px minmax(0, 1fr); gap: 12px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--line-row); }
.step:last-child { border-bottom: 0; }
.step__icon { width: 22px; height: 22px; display: grid; place-items: center; color: var(--muted); }
.step__icon .icon { width: 18px; height: 18px; }
.step__label { font-size: 15px; color: var(--dim); }
.step__detail { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; }
.step.is-active .step__label { color: var(--text); font-weight: 600; }
.step.is-done .step__icon { color: var(--accent); }
.step.is-done .step__label { color: var(--dim); }
.step.is-failed .step__icon { color: var(--danger); }
.step.is-failed .step__detail { color: var(--danger); }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--accent); }
html.motion .spinner { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.tx-summary { padding: 14px 16px; border-radius: var(--r3); background: var(--panel-3); border: 1px solid var(--line); }

/* ------------------------------------------------------------------------------------------------ states (B8) */
.skeleton { display: flex; flex-direction: column; gap: 10px; }
.skeleton i, .sk {
  display: block; height: 12px; border-radius: var(--r1); background: var(--panel-2); width: var(--w, 100%);
}
.sk--num { display: inline-block; height: 1em; width: var(--w, 5.5em); vertical-align: -0.12em; }
html.motion .skeleton i, html.motion .sk { animation: sk 1.4s var(--ease-io) infinite; }
[data-theme="light"] .skeleton i, [data-theme="light"] .sk { background: var(--line); }
@keyframes sk { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }

.state {
  display: flex; flex-direction: column; align-items: flex-start; gap: 12px;
  padding: 24px; border-radius: var(--r3); border: 1px solid var(--line); background: var(--panel);
}
.state > .icon { width: 24px; height: 24px; color: var(--muted); }
.state__text { color: var(--body); font-size: 15.5px; max-width: 62ch; }
.state__live { font-size: 14px; color: var(--muted); }
.state__live strong { color: var(--dim); font-weight: 600; }
.state--empty { border-style: dashed; border-color: var(--line-strong); background: transparent; }
.state--error { background: var(--danger-tint); border-color: transparent; }
.state--error > .icon { color: var(--danger); }
.state--error .state__text { color: var(--text); }
.state--launch { border-color: var(--line-strong); background: var(--panel); }
.state--paused { border-color: var(--line-strong); border-left: 3px solid var(--warn); }
.state--center { align-items: center; text-align: center; }
.state .btn--quiet { min-height: 32px; }
.is-disabled-form { position: relative; }
.is-disabled-form :is(input, select, textarea, button) { pointer-events: none; }
.launch-cell { color: var(--muted); font-weight: 500; }

/* ------------------------------------------------------------------------------------------------ touch sizes (A3) */
/* tap targets on touch widths: at least 44px (A3; the header's 36px buttons grow into the 60px header) */
@media (max-width: 819px) {
  .btn--sm { height: 44px; }
  .icon-btn, .icon-btn--s, .site-header .theme-toggle { width: 44px; height: 44px; }
  .state .btn--quiet { min-height: 44px; }
  .footer-col a, .footer-brand__links a { min-height: 44px; }
  .footer-col a { display: flex; }
  .footer-brand .chain-badge { height: 44px; }
  .footer-brand .lockup { min-height: 44px; }
  .seg--s button, .seg button { min-height: 44px; }
  .sheet__foot .seg button { min-height: 44px; }
  .toast__close { width: 44px; height: 44px; margin: -10px -10px -6px 0; }
  .tabs [role="tab"] { min-height: 44px; }
  .dropdown a { height: 44px; }
  .token-pill, .chain-badge { height: 44px; }
  .lockup { min-height: 44px; }
  .amount__max { height: 36px; }
  .toast__action { min-height: 44px; margin-block: -6px -10px; }
  .seg button { min-width: 44px; }
}

/* ------------------------------------------------------------------------------------------------ 404 and stubs */
.notfound { padding-block: calc(var(--section) * 1.2) var(--section); text-align: center; display: flex; flex-direction: column; align-items: center; gap: 24px; }
.notfound .epigraph { max-width: 34ch; }
.notfound__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
@media (max-width: 479px) { .notfound__links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; } .notfound__links .btn { padding-inline: 12px; } }
.stub { padding-block: calc(var(--section) * .9) var(--section); display: flex; flex-direction: column; gap: 28px; }
.stub .state { max-width: 640px; }

/* ------------------------------------------------------------------------------------------------ motion (A4) */
html.motion .reveal { opacity: 0; transform: translateY(12px); transition: opacity var(--t4) var(--ease-out), transform var(--t4) var(--ease-out); }
html.motion .reveal.is-in { opacity: 1; transform: none; }
html.motion .reveal--stagger > * { opacity: 0; transform: translateY(12px); transition: opacity var(--t4) var(--ease-out), transform var(--t4) var(--ease-out); }
html.motion .reveal--stagger.is-in > * { opacity: 1; transform: none; }
html.motion .reveal--stagger.is-in > :nth-child(2) { transition-delay: 60ms; }
html.motion .reveal--stagger.is-in > :nth-child(3) { transition-delay: 120ms; }
html.motion .reveal--stagger.is-in > :nth-child(4) { transition-delay: 180ms; }
html.motion .reveal--stagger.is-in > :nth-child(n+5) { transition-delay: 240ms; }
/* if the scripts never run, nothing stays hidden */
html.motion:not(.js-booted) .reveal:not(.is-in), html.motion:not(.js-booted) .reveal--stagger:not(.is-in) > * { animation: reveal-fallback 1ms linear 2.5s forwards; }
@keyframes reveal-fallback { to { opacity: 1; transform: none; } }
html.motion .caret { animation: caret 1.06s step-end infinite; }
@keyframes caret { 50% { opacity: 0; } }
.scramble-ch { display: inline-block; white-space: pre; text-align: center; clip-path: inset(-0.25em 0); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }
  *, *::before, *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
}
