/* Tipline design system. Concept: "the line" -- a tip line / telegraph wire where a link becomes a
   trade becomes a credit. Ledger paper, ticket stubs, perforations, mono figures.
   Fonts are self-hosted (CSP: style-src 'self', font-src 'self'). No inline styles anywhere. */

@font-face { font-family: "Archivo"; src: url(/fonts/archivo.woff2) format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
@font-face { font-family: "Martian Mono"; src: url(/fonts/martian-mono.woff2) format("woff2"); font-weight: 100 800; font-stretch: 75% 112.5%; font-display: swap; }

:root {
  /* palette */
  --teal: #0b7285;
  --teal-deep: #085766;
  --teal-tint: #d8eef2;
  --cream: #fff3bf;
  --cream-deep: #ffe685;
  --indigo: #364fc7;
  --indigo-tint: #e1e6fa;
  --ink: #10262b;
  --ink-2: #2f464b;
  --muted: #566a6e;
  --paper: #fcf9ee;
  --paper-2: #f5efd9;
  --paper-3: #ebe3c3;
  --line: #d8d0b0;
  --line-strong: #b9b08a;
  --white: #ffffff;
  --danger: #a4262c;
  --danger-tint: #f9dfdd;
  --warn-ink: #6b4d00;

  --display: "Archivo", "Segoe UI", system-ui, sans-serif;
  --sans: "Archivo", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "Martian Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --gutter: clamp(16px, 4vw, 32px);
  --section: clamp(72px, 10vw, 136px);
  --maxw: 1120px;
  --r: 4px;
  --r-lg: 10px;

  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --t-press: 120ms;
  --t-hover: 180ms;

  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 88px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.6 var(--sans);
  font-stretch: 100%;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: clip;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1 0 auto; }
img, svg { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0; color: var(--ink); text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--indigo); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--teal-deep); text-decoration-thickness: 2px; }
button, input, select, textarea { font: inherit; color: inherit; }
button { touch-action: manipulation; }
::selection { background: var(--cream-deep); color: var(--ink); }
[hidden] { display: none !important; }

/* focus */
:focus-visible { outline: 3px solid var(--indigo); outline-offset: 3px; border-radius: 2px; }
.on-dark :focus-visible { outline-color: var(--cream); }

.container { width: 100%; max-width: calc(var(--maxw) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section); }
.section--tight { padding-block: clamp(40px, 6vw, 72px); }
.field-paper { background: var(--paper-2); }
.field-teal { background: var(--teal); color: var(--white); }
.field-ink { background: var(--ink); color: var(--paper); }
.sr-only { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 12px; top: -80px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: var(--r); }
.skip-link:focus { top: 12px; color: var(--paper); }
.mono { font-family: var(--mono); font-stretch: 100%; font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.break { overflow-wrap: anywhere; }
.muted { color: var(--muted); }

/* type scale: Archivo expanded for display, normal width for text, Martian Mono for figures */
.display, h1.display { font-family: var(--display); font-weight: 780; font-stretch: 112%; letter-spacing: -.028em; line-height: 1; font-size: clamp(2.05rem, 1.1rem + 4.6vw, 4.6rem); }
.h2, h2 { font-family: var(--display); font-weight: 740; font-stretch: 110%; letter-spacing: -.022em; line-height: 1.08; font-size: clamp(1.7rem, 1.15rem + 2.2vw, 2.9rem); }
.h3, h3 { font-family: var(--display); font-weight: 700; font-stretch: 104%; letter-spacing: -.012em; line-height: 1.2; font-size: clamp(1.15rem, 1.05rem + .5vw, 1.4rem); }
.lead { font-size: clamp(1.05rem, 1rem + .3vw, 1.25rem); line-height: 1.55; color: var(--ink-2); max-width: 58ch; }
.small { font-size: .875rem; line-height: 1.5; }
.fig { font-family: var(--mono); font-stretch: 90%; font-variant-numeric: tabular-nums; letter-spacing: -.02em; }
.label { font-size: .8125rem; font-weight: 650; color: var(--ink-2); letter-spacing: .01em; }

/* ---------- header / footer ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 12px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-family: var(--display); font-weight: 760; font-stretch: 116%; font-size: 1.15rem; letter-spacing: -.02em; margin-right: auto; }
.brand:hover { color: var(--ink); }
.brand img { width: 34px; height: 34px; }
.nav { display: none; align-items: center; gap: 4px; }
.nav a { color: var(--ink-2); text-decoration: none; font-weight: 560; padding: 10px 12px; border-radius: var(--r); transition: color var(--t-hover), background-color var(--t-hover); }
.nav a:hover { color: var(--ink); background: var(--paper-2); }
.nav a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--teal); border-radius: 0; }
.menu-btn { appearance: none; background: transparent; border: 1px solid var(--line-strong); border-radius: var(--r); width: 44px; height: 44px; display: inline-grid; place-items: center; cursor: pointer; color: var(--ink); }
.menu-btn:hover { background: var(--paper-2); }
.menu-btn svg { width: 22px; height: 22px; }
.menu-btn .bars { transition: transform var(--t-hover) var(--ease-out); transform-origin: center; transform-box: fill-box; }
.menu-panel { border-top: 1px solid var(--line); background: var(--paper); }
.menu-panel .container { display: grid; padding-block: 8px 16px; }
.menu-panel a { color: var(--ink); text-decoration: none; padding: 14px 0; border-bottom: 1px dashed var(--line); font-weight: 600; }
.menu-panel a:last-child { border-bottom: 0; }
.header-cta .long { display: none; }
@media (min-width: 400px) { .header-cta .long { display: inline; } .header-cta .short { display: none; } }
@media (min-width: 860px) {
  .nav { display: flex; }
  .menu-btn, .menu-panel { display: none; }
}

.site-footer { background: var(--ink); color: var(--paper); padding-block: 48px 40px; flex-shrink: 0; }
.site-footer a { color: var(--paper); }
.site-footer a:hover { color: var(--cream); }
.footer-inner { display: grid; gap: 28px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 6px 22px; list-style: none; padding: 0; margin: 0; }
.footer-links a { text-decoration: none; display: inline-block; padding: 8px 0; font-weight: 560; }
.footer-links a:hover { text-decoration: underline; }
.footer-note { color: #b9c9cc; font-size: .875rem; max-width: 60ch; margin: 0; }
.footer-brand { display: inline-flex; align-items: center; gap: 12px; font-family: var(--display); font-weight: 780; font-stretch: 120%; letter-spacing: -.03em; font-size: clamp(1.8rem, 1rem + 4vw, 3.4rem); line-height: 1; color: var(--paper); text-decoration: none; }
.footer-brand img { width: 1em; height: 1em; }
.footer-row { display: flex; flex-wrap: wrap; gap: 16px 32px; align-items: center; justify-content: space-between; }
.icon-btn { display: inline-grid; place-items: center; width: 44px; height: 44px; border-radius: var(--r); border: 1px solid #3f585d; background: transparent; color: var(--paper); cursor: pointer; transition: background-color var(--t-hover), transform var(--t-press); }
.icon-btn:hover { background: #1e3a40; color: var(--cream); }
.icon-btn:active { transform: scale(.94); }
.icon-btn svg { width: 18px; height: 18px; fill: currentColor; }

/* ---------- buttons ---------- */
.btn { appearance: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 0 22px; border-radius: var(--r); border: 2px solid transparent; font-weight: 650; font-size: 1rem; line-height: 1; text-decoration: none; cursor: pointer; white-space: nowrap; transition: background-color var(--t-hover), color var(--t-hover), border-color var(--t-hover), transform var(--t-press) var(--ease-out); }
.btn:active { transform: translateY(1px) scale(.985); }
.btn--primary { background: var(--teal); color: var(--white); border-color: var(--teal); }
.btn--primary:hover { background: var(--teal-deep); border-color: var(--teal-deep); color: var(--white); }
.btn--secondary { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn--secondary:hover { background: var(--ink); color: var(--paper); }
.btn--cream { background: var(--cream); color: var(--ink); border-color: var(--cream); }
.btn--cream:hover { background: var(--white); border-color: var(--white); color: var(--ink); }
.btn--ghost { background: transparent; color: var(--indigo); border-color: transparent; padding-inline: 12px; }
.btn--ghost:hover { background: var(--indigo-tint); color: var(--indigo); }
.btn--danger { background: var(--danger); color: var(--white); border-color: var(--danger); }
.btn--danger:hover { background: #7e1d22; border-color: #7e1d22; color: var(--white); }
.btn--sm { min-height: 40px; padding: 0 14px; font-size: .9375rem; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; cursor: not-allowed; pointer-events: none; }
.btn .spinner { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

/* ---------- forms ---------- */
.field { display: grid; gap: 6px; margin-bottom: 18px; }
.field > label, .field > .label { font-weight: 650; font-size: .9375rem; }
.hint { font-size: .8125rem; color: var(--muted); margin: 0; }
.input { width: 100%; min-height: 48px; padding: 10px 14px; background: var(--white); border: 1.5px solid var(--line-strong); border-radius: var(--r); color: var(--ink); transition: border-color var(--t-hover), box-shadow var(--t-hover); }
.input:hover { border-color: var(--ink-2); }
.input:focus-visible { outline: 3px solid var(--indigo); outline-offset: 1px; border-color: var(--indigo); }
.input::placeholder { color: #7b8c8f; }
.input--mono { font-family: var(--mono); font-stretch: 90%; font-size: .95rem; }
.input[aria-invalid="true"] { border-color: var(--danger); }
.error-text { color: var(--danger); font-size: .875rem; margin: 0; font-weight: 560; }
.input-group { display: flex; align-items: stretch; }
.input-group .input { border-radius: var(--r) 0 0 var(--r); min-width: 0; }
.input-group .suffix { display: inline-flex; align-items: center; padding: 0 12px; background: var(--paper-3); border: 1.5px solid var(--line-strong); border-left: 0; border-radius: 0 var(--r) var(--r) 0; font-family: var(--mono); font-size: .85rem; color: var(--ink-2); }
select.input { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%2310262b' stroke-width='2'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; background-size: 12px; }
.check { display: flex; align-items: flex-start; gap: 12px; min-height: 44px; cursor: pointer; }
.check input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--teal); flex: none; }

/* range */
.range { -webkit-appearance: none; appearance: none; width: 100%; height: 44px; background: transparent; cursor: pointer; touch-action: pan-y; margin: 0; }
.range::-webkit-slider-runnable-track { height: 6px; background: var(--paper-3); border-radius: 3px; border: 1px solid var(--line-strong); }
.range::-moz-range-track { height: 6px; background: var(--paper-3); border-radius: 3px; border: 1px solid var(--line-strong); }
.range::-webkit-slider-thumb { -webkit-appearance: none; width: 28px; height: 28px; margin-top: -12px; border-radius: 50%; background: var(--teal); border: 4px solid var(--cream); box-shadow: 0 0 0 2px var(--teal), 0 2px 6px rgba(16,38,43,.25); transition: transform var(--t-press); }
.range::-moz-range-thumb { width: 20px; height: 20px; border-radius: 50%; background: var(--teal); border: 4px solid var(--cream); box-shadow: 0 0 0 2px var(--teal), 0 2px 6px rgba(16,38,43,.25); }
.range:active::-webkit-slider-thumb { transform: scale(1.12); }
.range:focus-visible { outline: 3px solid var(--indigo); outline-offset: 2px; }

/* chips / presets */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { appearance: none; min-height: 40px; padding: 0 14px; border-radius: 999px; border: 1.5px solid var(--line-strong); background: var(--white); color: var(--ink); font-family: var(--mono); font-stretch: 90%; font-size: .85rem; cursor: pointer; transition: background-color var(--t-hover), border-color var(--t-hover), color var(--t-hover), transform var(--t-press); }
.chip:hover { border-color: var(--teal); }
.chip:active { transform: scale(.96); }
.chip[aria-pressed="true"] { background: var(--teal); border-color: var(--teal); color: var(--white); }

/* ---------- cards / tickets ---------- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: clamp(18px, 3vw, 28px); }
.card--paper { background: var(--paper-2); border-color: var(--line); }
.card + .card { margin-top: 16px; }
.card-title { margin-bottom: 8px; }

/* ledger: ruled lines like ledger paper */
.ledger { background-color: var(--white); background-image: repeating-linear-gradient(to bottom, transparent 0 31px, var(--paper-3) 31px 32px); background-position: 0 14px; border: 1px solid var(--line); border-radius: var(--r-lg); }
.rows { list-style: none; margin: 0; padding: 0; }
.rows > li, .rows > .row { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 12px 0; border-bottom: 1px dashed var(--line-strong); }
.rows > li:last-child { border-bottom: 0; }
.rows .k { color: var(--ink-2); }
.rows .v { font-family: var(--mono); font-stretch: 90%; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }

/* ticket: cream stub with side notches and a perforated divider */
.ticket { --pad: clamp(18px, 3vw, 28px); --notch: 14px; position: relative; overflow: hidden; background: var(--cream); color: var(--ink); border-radius: var(--r-lg); padding: var(--pad); }
.ticket--white { background: var(--white); }
.ticket-perf { border: 0; border-top: 2px dashed rgba(16, 38, 43, .35); margin: 18px 0; }
.ticket-notches { position: relative; }
.ticket-notches::before, .ticket-notches::after { content: ""; position: absolute; width: calc(var(--notch) * 2); height: calc(var(--notch) * 2); border-radius: 50%; background: var(--paper); top: calc(var(--notch) * -1 - 1px); }
.ticket-notches::before { left: calc(var(--pad) * -1 - var(--notch)); }
.ticket-notches::after { right: calc(var(--pad) * -1 - var(--notch)); }
.ticket-label { font-size: .8125rem; font-weight: 650; color: var(--ink-2); }
.ticket-figure { font-family: var(--mono); font-stretch: 85%; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -.03em; line-height: 1.1; }

/* stat */
.stat { display: grid; gap: 2px; }
.stat .n { font-family: var(--mono); font-stretch: 85%; font-weight: 650; font-size: clamp(1.4rem, 1.1rem + 1.4vw, 2rem); letter-spacing: -.03em; font-variant-numeric: tabular-nums; line-height: 1.15; overflow-wrap: anywhere; }
.stat .t { font-size: .8125rem; color: var(--muted); font-weight: 560; }
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 16px 24px; }

/* ---------- badges: credit states ---------- */
.badge { display: inline-flex; align-items: center; gap: 7px; height: 26px; padding: 0 10px 0 9px; border-radius: 999px; font-size: .78rem; font-weight: 650; line-height: 1; white-space: nowrap; background: var(--paper-3); color: var(--ink); border: 1px solid transparent; }
.badge::before { content: ""; width: 9px; height: 9px; flex: none; background: currentColor; }
.badge--pending { background: var(--paper-3); color: var(--ink-2); }
.badge--pending::before { background: transparent; border: 2px solid currentColor; border-radius: 50%; }
.badge--claimable { background: var(--teal-tint); color: var(--teal-deep); }
.badge--claimable::before { border-radius: 50%; }
.badge--claimed { background: var(--indigo-tint); color: #2a3ea0; }
.badge--claimed::before { border-radius: 1px; }
.badge--paid { background: var(--teal); color: var(--white); }
.badge--paid::before { background: transparent; width: 5px; height: 9px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.badge--review { background: var(--cream-deep); color: var(--warn-ink); }
.badge--review::before { clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.badge--voided { background: transparent; color: var(--muted); border: 1px dashed var(--line-strong); }
.badge--voided::before { height: 2px; }

/* ---------- tables ---------- */
.table-wrap { width: 100%; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .9375rem; }
.table caption { text-align: left; font-weight: 650; padding-bottom: 8px; }
.table th { text-align: left; font-size: .8125rem; font-weight: 650; color: var(--ink-2); padding: 10px 12px; border-bottom: 2px solid var(--ink); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tbody tr:hover { background: var(--paper-2); }
.table .num { text-align: right; font-family: var(--mono); font-stretch: 90%; font-variant-numeric: tabular-nums; white-space: nowrap; }
.table td.num { font-weight: 560; }
@media (max-width: 599px) {
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .table tr { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 6px 14px; margin-bottom: 12px; }
  .table td { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding: 9px 0; border-bottom: 1px dashed var(--line); text-align: right; min-width: 0; }
  .table td:last-child { border-bottom: 0; }
  .table td::before { content: attr(data-label); flex: none; font-size: .8125rem; font-weight: 650; color: var(--ink-2); text-align: left; }
  .table td.num { text-align: right; }
  .table tbody tr:hover { background: var(--white); }
}

/* ---------- toasts ---------- */
.toasts { position: fixed; z-index: 90; left: 0; right: 0; bottom: max(16px, env(safe-area-inset-bottom)); display: grid; justify-items: center; gap: 8px; padding-inline: 16px; pointer-events: none; }
.toast { pointer-events: auto; max-width: 440px; width: 100%; display: flex; gap: 12px; align-items: flex-start; background: var(--ink); color: var(--paper); border-radius: var(--r-lg); padding: 12px 16px; font-size: .9375rem; box-shadow: 0 8px 28px rgba(16,38,43,.3); animation: toast-in 260ms var(--ease-out); }
.toast--error { background: var(--danger); }
.toast--ok { background: var(--teal-deep); }
.toast button { margin-left: auto; background: transparent; border: 0; color: inherit; cursor: pointer; padding: 0 4px; min-height: 24px; font-size: 1.1rem; line-height: 1; }
.toast.is-leaving { opacity: 0; transform: translateY(8px); transition: opacity 200ms, transform 200ms; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

/* notice (inline, honest not-available states) */
.notice { display: grid; gap: 4px; padding: 14px 16px; border-radius: var(--r); border-left: 4px solid var(--teal); background: var(--teal-tint); color: var(--ink); font-size: .9375rem; }
.notice--warn { border-left-color: #b88400; background: #fff3c2; }
.notice--error { border-left-color: var(--danger); background: var(--danger-tint); }
.notice p { margin: 0; }
.notice strong { font-weight: 700; }

/* ---------- empty state ---------- */
.empty { text-align: center; padding: clamp(32px, 6vw, 64px) 20px; border: 2px dashed var(--line-strong); border-radius: var(--r-lg); background: transparent; display: grid; justify-items: center; gap: 10px; }
.empty svg { width: 72px; height: 40px; color: var(--line-strong); }
.empty h3 { font-size: 1.15rem; }
.empty p { color: var(--muted); max-width: 44ch; margin: 0; }

/* ---------- reveal ---------- */
.js [data-reveal] { opacity: 0; transform: translate3d(0, 18px, 0); transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out); transition-delay: calc(var(--i, 0) * 80ms); will-change: opacity, transform; }
.js [data-reveal].is-in { opacity: 1; transform: none; will-change: auto; }
.js [data-reveal="1"] { --i: 1; } .js [data-reveal="2"] { --i: 2; } .js [data-reveal="3"] { --i: 3; } .js [data-reveal="4"] { --i: 4; } .js [data-reveal="5"] { --i: 5; }

/* ================= landing ================= */
.hero { padding-block: clamp(36px, 6vw, 84px) clamp(48px, 7vw, 96px); background-image: repeating-linear-gradient(to bottom, transparent 0 39px, rgba(185, 176, 138, .22) 39px 40px); }
.hero-title { max-width: 17ch; font-stretch: 108%; }
.hero-sub { margin-top: 22px; }
.hero-cta { margin-top: 28px; }
.hero-trust { margin: 18px 0 0; font-size: .875rem; color: var(--muted); max-width: 60ch; }
@media (min-width: 900px) { .hero-title { font-stretch: 118%; max-width: 15ch; } }

.line-wrap { margin-top: clamp(36px, 6vw, 72px); background: var(--paper); border: 1px solid var(--line-strong); border-radius: var(--r-lg); padding: clamp(16px, 3vw, 32px); }
.line-head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 24px; margin-bottom: 22px; }
.line-head h2 { font-size: 1.1rem; font-stretch: 108%; letter-spacing: -.01em; }
.line-head p { margin: 0; color: var(--muted); font-size: .875rem; max-width: 44ch; }

.line { --len: 0px; position: relative; }
.line-nodes { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 0; }
.node { position: relative; display: grid; grid-template-columns: 56px 1fr; column-gap: 16px; align-items: start; min-height: 96px; }
.node-icon { position: relative; width: 56px; height: 56px; border-radius: 50%; background: var(--cream); border: 2px solid var(--ink); display: grid; place-items: center; z-index: 2; }
.node-icon svg { width: 28px; height: 28px; position: relative; z-index: 1; color: var(--ink); }
.node-icon::after { content: ""; position: absolute; inset: -2px; border-radius: 50%; background: var(--teal); opacity: 0; }
.node-body { padding-top: 2px; min-width: 0; }
.node-role { display: block; font-family: var(--display); font-weight: 720; font-stretch: 108%; font-size: 1.05rem; letter-spacing: -.01em; line-height: 1.2; }
.node-text { display: block; margin-top: 3px; color: var(--ink-2); font-size: .9rem; line-height: 1.4; overflow-wrap: anywhere; }
.node-text .fig { color: var(--ink); font-weight: 650; }
.wire { position: absolute; z-index: 1; background: var(--ink); border-radius: 2px; left: 26px; top: 28px; bottom: 68px; width: 4px; pointer-events: none; }
.wire-fill { position: absolute; inset: 0; background: var(--teal); transform-origin: top; transform: scaleY(0); border-radius: 2px; }
.pulse { position: absolute; left: 50%; top: 0; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: var(--cream); border: 4px solid var(--teal); opacity: 0; will-change: transform, opacity; }

.is-run .pulse { animation: travel-y 1100ms cubic-bezier(.5, .05, .35, 1) both; }
.is-run .wire-fill { animation: fill-y 1100ms cubic-bezier(.5, .05, .35, 1) both; }
.is-run .node-icon::after { animation: lit 1100ms linear both; animation-delay: calc(var(--n) * 340ms - 140ms); }
.is-run .node-icon svg { animation: lit-icon 1100ms linear both; animation-delay: calc(var(--n) * 340ms - 140ms); }
.node:nth-child(1) { --n: 0; } .node:nth-child(2) { --n: 1; } .node:nth-child(3) { --n: 2; } .node:nth-child(4) { --n: 3; }
.is-run .node:nth-child(1) .node-icon::after { animation-delay: 0ms; }
.is-run .node:nth-child(1) .node-icon svg { animation-delay: 0ms; }
@keyframes travel-y { 0% { opacity: 1; transform: translate3d(0, 0, 0); } 92% { opacity: 1; } 100% { opacity: 0; transform: translate3d(0, var(--len), 0); } }
@keyframes travel-x { 0% { opacity: 1; transform: translate3d(0, 0, 0); } 92% { opacity: 1; } 100% { opacity: 0; transform: translate3d(var(--len), 0, 0); } }
@keyframes fill-y { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes fill-x { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes lit { 0% { opacity: 0; } 12% { opacity: 1; } 70% { opacity: 1; } 100% { opacity: 0; } }
@keyframes lit-icon { 0%, 100% { color: var(--ink); } 12%, 70% { color: var(--cream); } }
.node-icon svg { transition: color 0s; }

@media (min-width: 900px) {
  .line-nodes { grid-template-columns: repeat(4, 1fr); column-gap: 20px; }
  .node { grid-template-columns: 1fr; row-gap: 14px; min-height: 0; }
  .node-body { padding-top: 0; }
  .wire { left: 28px; right: calc((100% - 60px) / 4 - 28px); top: 26px; bottom: auto; height: 4px; width: auto; }
  .wire-fill { transform-origin: left; transform: scaleX(0); }
  .pulse { left: 0; top: 50%; }
  .is-run .pulse { animation-name: travel-x; }
  .is-run .wire-fill { animation-name: fill-x; }
}

/* the ticket (calculator) */
.calc { margin-top: 28px; display: grid; gap: 0; }
@media (min-width: 900px) { .calc { grid-template-columns: 1fr 300px; } }
.calc-main { display: grid; gap: 20px; }
.calc-terms { display: grid; gap: 18px; }
.term { display: grid; gap: 8px; min-width: 0; align-content: start; }
.term-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.term .input { background: var(--paper); }
.op { font-family: var(--mono); font-size: 1.25rem; color: var(--ink-2); line-height: 1; }
.size-readout { font-family: var(--mono); font-stretch: 85%; font-weight: 650; font-size: clamp(1.7rem, 1.2rem + 2vw, 2.4rem); letter-spacing: -.04em; line-height: 1; }
.size-readout small { font-size: .5em; letter-spacing: 0; margin-left: 4px; font-weight: 560; }
.calc-rates { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .calc-rates { grid-template-columns: 1fr 1fr; } }
@media (min-width: 900px) { .calc-rates { grid-template-columns: 1fr 1fr 1fr; } }
.calc-rates .term > label { font-size: .8125rem; font-weight: 650; color: var(--ink-2); }
.calc-rates .hint { color: #4a5a5d; }
.receipt { margin: 4px 0 0; padding: 14px 0 0; border-top: 2px dashed rgba(16, 38, 43, .3); display: grid; gap: 8px; font-family: var(--mono); font-stretch: 90%; font-size: .78rem; line-height: 1.55; color: var(--ink); }
.receipt-line { display: grid; gap: 2px; }
.receipt-line .k { font-family: var(--sans); font-size: .8125rem; font-weight: 650; color: var(--ink-2); }
.receipt-line .f { overflow-wrap: anywhere; }
.calc-stub { position: relative; border-top: 2px dashed rgba(16, 38, 43, .35); margin-top: 22px; padding-top: 20px; display: grid; align-content: center; gap: 6px; }
.calc-stub::before, .calc-stub::after { content: ""; position: absolute; width: 28px; height: 28px; border-radius: 50%; background: var(--paper); top: -15px; }
.calc-stub::before { left: calc(var(--pad) * -1 - 14px); }
.calc-stub::after { right: calc(var(--pad) * -1 - 14px); }
@media (min-width: 900px) { .calc-stub::before, .calc-stub::after { left: -15px; right: auto; } .calc-stub::before { top: calc(var(--pad) * -1 - 14px); } .calc-stub::after { top: auto; bottom: calc(var(--pad) * -1 - 14px); } }
@media (min-width: 900px) { .calc-stub { position: relative; border-top: 0; border-left: 2px dashed rgba(16, 38, 43, .35); margin: 0 0 0 28px; padding: 0 0 0 28px; } }
.credit-out { font-family: var(--mono); font-stretch: 80%; font-weight: 700; font-size: clamp(1.8rem, 1.2rem + 2.4vw, 2.3rem); letter-spacing: -.05em; line-height: 1.05; color: var(--teal-deep); overflow-wrap: anywhere; }
.credit-out .unit { font-size: .45em; letter-spacing: -.01em; margin-left: 6px; color: var(--ink); }
.credit-lamports { font-family: var(--mono); font-stretch: 90%; font-size: .78rem; color: var(--ink-2); overflow-wrap: anywhere; }
.credit-out.bump { animation: bump 380ms var(--ease-out); }
@keyframes bump { 0% { transform: scale(1); } 35% { transform: scale(1.05); } 100% { transform: scale(1); } }
.credit-out { transform-origin: left center; }
.calc-note { font-size: .78rem; color: var(--ink-2); margin: 8px 0 0; }

/* stations */
.stations-head { max-width: 640px; margin-bottom: clamp(32px, 5vw, 56px); }
.stations-head p { margin-top: 14px; }
.stations { list-style: none; margin: 0; padding: 0; position: relative; display: grid; gap: 36px; counter-reset: station; }
.station { position: relative; padding-left: 64px; counter-increment: station; }
.station::before { content: counter(station); position: absolute; left: 0; top: 0; width: 44px; height: 44px; border-radius: 50%; background: var(--cream); border: 2px solid var(--ink); display: grid; place-items: center; font-family: var(--mono); font-weight: 700; font-size: .95rem; z-index: 1; }
.stations::before { content: ""; position: absolute; left: 21px; top: 22px; bottom: 22px; width: 2px; background: repeating-linear-gradient(to bottom, var(--ink) 0 6px, transparent 6px 12px); }
.station h3 { margin-bottom: 8px; padding-top: 6px; }
.station p { margin: 0 0 8px; color: var(--ink-2); max-width: 46ch; }
.station .who { font-weight: 700; font-size: .8125rem; color: var(--teal-deep); margin-bottom: 4px; display: block; }
@media (min-width: 900px) {
  .stations { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .stations::before { left: 22px; right: 0; top: 21px; bottom: auto; width: auto; height: 2px; background: repeating-linear-gradient(to right, var(--ink) 0 6px, transparent 6px 12px); }
  .station { padding-left: 0; padding-top: 68px; }
  .station h3 { padding-top: 0; }
}

/* split blocks */
.split { display: grid; gap: clamp(28px, 5vw, 64px); align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: 5fr 6fr; } .split--flip { grid-template-columns: 6fr 5fr; } .split--flip > :first-child { order: 2; } }
.split h2 { margin-bottom: 16px; }
.split p { color: var(--ink-2); max-width: 52ch; }
.ticks { list-style: none; padding: 0; margin: 20px 0 0; display: grid; gap: 12px; }
.ticks li { position: relative; padding-left: 30px; max-width: 52ch; }
.ticks li::before { content: ""; position: absolute; left: 3px; top: .38em; width: 7px; height: 12px; border: solid var(--teal); border-width: 0 3px 3px 0; transform: rotate(45deg); }
.lifecycle { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 8px; margin-top: 4px; }
.lifecycle .arrow { width: 22px; height: 2px; background: var(--ink); position: relative; flex: none; }
.lifecycle .arrow::after { content: ""; position: absolute; right: 0; top: -4px; width: 8px; height: 8px; border: solid var(--ink); border-width: 2px 2px 0 0; transform: rotate(45deg); }
.state-list { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 0; }
.state-list li { display: grid; grid-template-columns: 104px 1fr; gap: 14px; align-items: center; padding: 12px 0; border-bottom: 1px dashed var(--line-strong); font-size: .9375rem; color: var(--ink-2); }
.state-list li:last-child { border-bottom: 0; }
.state-list .badge { justify-self: start; }

/* trust (teal field) */
.trust-head { max-width: 640px; margin-bottom: clamp(28px, 5vw, 52px); }
.trust-head h2 { color: var(--white); }
.trust-grid { display: grid; gap: 0; border-top: 2px solid var(--cream); }
@media (min-width: 760px) { .trust-grid { grid-template-columns: 1fr 1fr; column-gap: 56px; } }
.trust-item { padding: 22px 0; border-bottom: 1px dashed rgba(255, 243, 191, .5); }
.trust-item h3 { color: var(--cream); margin-bottom: 6px; font-size: 1.15rem; }
.trust-item p { margin: 0; color: #e7f4f6; max-width: 46ch; }

/* faq */
.faq { max-width: 780px; border-top: 2px solid var(--ink); margin-top: 28px; }
.faq details { border-bottom: 1px solid var(--line-strong); }
.faq summary { list-style: none; cursor: pointer; padding: 20px 44px 20px 0; font-weight: 650; font-size: 1.05rem; position: relative; min-height: 56px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 8px; top: 50%; width: 10px; height: 10px; border: solid var(--ink); border-width: 0 2px 2px 0; transform: translateY(-70%) rotate(45deg); transition: transform var(--t-hover) var(--ease-out); }
.faq details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.faq summary:hover { color: var(--teal-deep); }
.faq .answer { padding: 0 0 22px; color: var(--ink-2); max-width: 62ch; }
.faq .answer p:last-child { margin-bottom: 0; }

.cta-band { text-align: left; }
.cta-band h2 { max-width: 20ch; margin-bottom: 20px; }

/* 404 */
.lost { padding-block: clamp(56px, 10vw, 128px); }
.lost .fig-big { font-family: var(--mono); font-stretch: 80%; font-weight: 700; font-size: clamp(4rem, 2rem + 14vw, 11rem); letter-spacing: -.06em; line-height: .9; color: var(--teal); }
.lost-wire { display: flex; align-items: center; margin: 24px 0 28px; max-width: 420px; }
.lost-wire .seg { flex: 1; height: 4px; background: var(--ink); }
.lost-wire .seg--cut { background: repeating-linear-gradient(to right, var(--ink) 0 8px, transparent 8px 14px); }
.lost-wire .dot { width: 18px; height: 18px; border-radius: 50%; border: 4px solid var(--ink); background: var(--cream); flex: none; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; transition-delay: 0ms !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .pulse, .wire-fill { display: none; }
}

/* Wallet chooser (session.js) */
.wallet-dialog { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 1.25rem; width: min(92vw, 380px); background: var(--paper); color: inherit; }
.wallet-dialog::backdrop { background: rgb(16 38 43 / 0.45); }
.wallet-dialog__title { margin: 0 0 .75rem; font-size: 1.15rem; }
.wallet-dialog__list { display: grid; gap: .5rem; margin: .75rem 0; }
.wallet-dialog__list img { margin-right: .5rem; vertical-align: -4px; }
