/* Hallmark · macrostructure: stacked statement panels (spectup DNA) · tone: austere, technical · anchor hue: neutral, diamond prism accent */
/* CASHFLOW: black and white, money drawn in ASCII, a few cuts of diamond light. */
@font-face { font-family: "Geist"; src: url("/assets/fonts/geist-variable.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Geist Mono"; src: url("/assets/fonts/geist-mono-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --ink: #070707;
  --graphite: #121212;
  --paper: #ecebe8;
  --paper-2: #d9d8d4;
  --out-d: #6f6f6f;
  --out-l: #8e8e8c;
  --ice: #cfe9ff;
  --lilac: #e2dbff;
  --champagne: #f3e9d6;
  --prism: linear-gradient(115deg, #cfe9ff 0%, #e2dbff 42%, #f3e9d6 72%, #d4f2ec 100%);
  --mute: #8a8a88;
  --mute-dark: #5c5c5a;
  --line-d: rgba(236, 235, 232, .1);
  --line-l: rgba(7, 7, 7, .13);
  --mono: "Geist Mono", ui-monospace, monospace;
  --m: clamp(20px, 5vw, 72px);
  --r: 28px;
  --ease: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
body { margin: 0; background: var(--ink); color: var(--paper); font: 400 16px/1.55 "Geist", system-ui, sans-serif; font-feature-settings: "ss01", "tnum"; -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: inherit; }
button, input { font: inherit; color: inherit; }
img { display: block; }
.sr, .skip:not(:focus) { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip:focus { position: fixed; z-index: 99; top: 12px; left: 12px; background: var(--paper); color: var(--ink); padding: 10px 14px; border-radius: 10px; }
:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; border-radius: 6px; }
.dim { color: var(--mute); }

/* ---------- header ---------- */
.bar { position: fixed; z-index: 40; inset: 0 0 auto 0; display: flex; align-items: center; gap: 24px; padding: 18px var(--m); transition: background .4s var(--ease), padding .4s var(--ease); }
.bar.solid { background: rgba(7, 7, 7, .84); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); padding-block: 12px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex: none; }
.brand img { width: 30px; height: 30px; }
.wordmark { font-weight: 560; font-size: 21px; letter-spacing: -.035em; }
.nav { display: flex; gap: 4px; margin-left: 18px; }
.nav a { text-decoration: none; font-size: 14px; color: rgba(236, 235, 232, .66); padding: 8px 12px; border-radius: 99px; transition: color .25s, background .25s; }
.nav a:hover { color: var(--paper); background: rgba(236, 235, 232, .06); }
.tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.ico { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 50%; border: 1px solid var(--line-d); color: var(--paper); transition: background .25s, border-color .25s; }
.ico:hover { background: rgba(236, 235, 232, .08); border-color: rgba(236, 235, 232, .25); }
.ca { height: 38px; padding: 0 14px; border-radius: 99px; border: 1px solid var(--line-d); background: transparent; font-size: 13px; color: rgba(236, 235, 232, .72); cursor: pointer; white-space: nowrap; }
.ca:disabled { cursor: default; }
.ca.live { font-family: "Geist Mono", monospace; color: var(--paper); }
.pairnote { font-size: 13px; color: var(--mute); white-space: nowrap; }
.pairnote a { color: var(--paper); }

/* pill buttons fill from the left on hover */
.pill { position: relative; overflow: hidden; isolation: isolate; display: inline-flex; align-items: center; justify-content: center; height: 38px; padding: 0 18px; border-radius: 99px; font-size: 14px; font-weight: 520; text-decoration: none; cursor: pointer; border: 1px solid transparent; white-space: nowrap; }
.pill::before { content: ""; position: absolute; inset: 0; z-index: -1; transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease); }
.pill:hover::before { transform: scaleX(1); }
.pill-solid { background: var(--paper); color: var(--ink); }
.pill-solid::before { background: var(--prism); }
.pill-line { border-color: rgba(236, 235, 232, .28); color: var(--paper); background: transparent; }
.pill-line::before { background: var(--paper); }
.pill-line:hover { color: var(--ink); }
.pill[aria-disabled="true"], .pill:disabled { opacity: .55; cursor: not-allowed; }
.pill[aria-disabled="true"]::before, .pill:disabled::before { display: none; }
.pill[aria-disabled="true"]:hover, .pill:disabled:hover { color: inherit; }

/* ---------- hero: the live flow ---------- */
.hero { position: relative; min-height: 100vh; min-height: 100svh; padding: 112px var(--m) 56px; background: var(--ink); overflow: hidden; }
.hero::after { content: ""; position: absolute; inset: auto 0 0 0; height: 30%; background: linear-gradient(to top, var(--ink), transparent); pointer-events: none; }
.hero::before { content: ""; position: absolute; z-index: 1; inset: 0 auto 0 0; width: 48%; background: linear-gradient(90deg, var(--ink) 40%, transparent); pointer-events: none; }
.field { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.rules { position: absolute; inset: 0 var(--m); display: grid; grid-template-columns: repeat(6, 1fr); pointer-events: none; }
.rules i { border-left: 1px solid var(--line-d); transform-origin: top; }
.rules i:last-child { border-right: 1px solid var(--line-d); }
.hero-grid { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(28px, 4vw, 80px); align-items: center; min-height: calc(100svh - 168px); }
.head { margin: 0 0 28px; font-weight: 600; font-size: clamp(38px, 3.8vw, 76px); line-height: .98; letter-spacing: -.045em; }
.head .ln { display: block; overflow: hidden; padding-bottom: .06em; }
.head .ln > span { display: inline-block; white-space: nowrap; }
.dot { display: inline-block; width: .17em; height: .17em; margin-left: .1em; background: var(--prism); transform: rotate(45deg); vertical-align: .02em; }
.lede { max-width: 31em; margin: 0 0 30px; font-size: clamp(16px, 1.15vw, 19px); color: rgba(236, 235, 232, .74); }
.paste { display: flex; align-items: center; gap: 6px; padding: 6px; border-radius: 99px; background: var(--graphite); border: 1px solid var(--line-d); max-width: 600px; transition: border-color .3s; }
.paste:focus-within { border-color: rgba(207, 233, 255, .5); }
.paste input { flex: 1; min-width: 0; height: 44px; padding: 0 16px; border: 0; background: transparent; outline: none; font-size: 15px; }
.paste input::placeholder { color: var(--mute); }
.paste .go { height: 44px; padding: 0 22px; }
.ranges { display: flex; gap: 2px; padding: 3px; border-radius: 99px; background: rgba(236, 235, 232, .05); }
.ranges button { height: 38px; padding: 0 12px; border: 0; border-radius: 99px; background: transparent; font-size: 13px; color: var(--mute); cursor: pointer; transition: background .25s, color .25s; }
.ranges button[aria-checked="true"] { background: rgba(236, 235, 232, .12); color: var(--paper); }
.formnote { min-height: 1.5em; margin: 12px 0 0 18px; font-size: 14px; color: var(--mute); }
.formnote.err { color: var(--paper); }
.formnote.err::before { content: "× "; color: var(--mute); }
.hero-stats { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 12px clamp(24px, 3vw, 48px); margin: 34px 0 0; }
.hero-stats div { border-top: 1px solid var(--line-d); padding-top: 12px; }
.hero-stats dt { font-size: 13px; color: var(--mute); }
.hero-stats dd { margin: 4px 0 0; font: 400 clamp(21px, 1.75vw, 30px)/1.2 var(--mono); letter-spacing: -.04em; }
dd.in, .num.in { color: var(--paper); }
dd.out, .num.out { color: var(--out-d); }

.board { margin: 0; position: relative; padding: 22px 22px 16px; border-radius: 22px; background: rgba(10, 10, 10, .78); border: 1px solid var(--line-d); backdrop-filter: blur(6px); }
.board::before { content: ""; position: absolute; inset: -1px; border-radius: inherit; padding: 1px; background: linear-gradient(135deg, rgba(207, 233, 255, .5), rgba(226, 219, 255, 0) 30%, rgba(243, 233, 214, 0) 70%, rgba(243, 233, 214, .35)); -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; pointer-events: none; }
.board-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; margin-bottom: 6px; }
.board-title { margin: 0; font-size: 17px; font-weight: 560; letter-spacing: -.02em; }
.board-sub { margin: 0; font-size: 13px; color: var(--mute); text-align: right; }
.board-legend { display: flex; flex-wrap: wrap; gap: 18px; align-items: center; margin-top: 8px; font-size: 13px; color: var(--mute); }
.key::before { display: inline-block; margin-right: 8px; font: 400 13px/1 var(--mono); letter-spacing: .1em; }
.key.in::before { content: "+++"; color: var(--paper); }
.key.out::before { content: "···"; color: var(--out-d); }
.board-src { margin-left: auto; }

/* sankey: canvas ribbons, HTML labels */
.sankey { position: relative; height: clamp(360px, 56vh, 620px); }
.sankey.small { height: clamp(320px, 42vh, 460px); }
.sankey canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.sankey .labels { position: absolute; inset: 0; pointer-events: none; }
.node { position: absolute; transform: translateY(-50%); display: flex; align-items: center; gap: 8px; font-size: 13px; line-height: 1.2; white-space: nowrap; pointer-events: auto; }
.node.mid { left: 50%; transform: translate(-50%, -50%); padding: 6px 10px 6px 6px; border-radius: 99px; background: var(--ink); border: 1px solid var(--line-d); text-decoration: none; transition: border-color .25s, transform .4s var(--ease); }
.node.mid:hover { border-color: rgba(207, 233, 255, .7); }
.node.mid img, .node.mid .ph { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; background: var(--graphite); flex: none; }
.node .sym { font-weight: 560; }
.light .node.mid { font-size: 16px; }
.light .node.mid .net { font-size: 16px; }
.types .v a { font: 400 16px "Geist", system-ui, sans-serif; letter-spacing: 0; }
.node .net { font-family: var(--mono); font-size: 12px; }
.node .net.pos { color: var(--paper); }
.node .net.neg { color: var(--out-d); }
.light .node .net.pos { color: var(--ink); }
.light .node .net.neg { color: var(--out-l); }
.node.side { flex-direction: column; align-items: flex-start; gap: 2px; padding: 6px 8px; border-radius: 10px; background: rgba(7, 7, 7, .78); }
.light .node.side { background: rgba(226, 225, 221, .85); }
.node.side b { font: 400 19px/1.1 var(--mono); letter-spacing: -.04em; }
.node.side span { color: var(--mute); font-size: 12px; }
.node.side.right { align-items: flex-end; text-align: right; }
.light .node.mid { background: var(--paper); border-color: var(--line-l); color: var(--ink); }
.light .node.side span { color: var(--mute-dark); }
.empty { position: absolute; inset: 0; display: grid; place-items: center; text-align: center; color: var(--mute); font-size: 15px; padding: 24px; }

/* ---------- panels ---------- */
.panel { position: relative; z-index: 3; margin-top: calc(var(--r) * -1); border-radius: var(--r) var(--r) 0 0; padding: clamp(72px, 9vw, 140px) var(--m) clamp(72px, 9vw, 140px); overflow: hidden; }
.panel.light { background: var(--paper); color: var(--ink); color-scheme: light; }
.panel.dark { background: var(--ink); color: var(--paper); }
.panel.dark + .panel, .panel + .panel { z-index: 4; }
#rhythm { z-index: 5; } #method { z-index: 6; } #card { z-index: 7; }
.wrap { position: relative; z-index: 2; }
.glow { position: absolute; z-index: 0; width: 56vw; height: 56vw; max-width: 860px; max-height: 860px; left: 62%; top: -12%; border-radius: 50%; background: conic-gradient(from 210deg, rgba(207, 233, 255, .5), rgba(226, 219, 255, .42), rgba(243, 233, 214, .5), rgba(212, 242, 236, .4), rgba(207, 233, 255, .5)); -webkit-mask: radial-gradient(closest-side, #000, transparent); mask: radial-gradient(closest-side, #000, transparent); filter: blur(30px); opacity: .55; pointer-events: none; animation: turn 40s linear infinite; }
@keyframes turn { to { rotate: 360deg; } }
.h2 { margin: 0; font-weight: 560; font-size: clamp(30px, 3vw, 52px); line-height: 1.04; letter-spacing: -.04em; max-width: 22em; }
.h3 { margin: 0 0 16px; font-weight: 560; font-size: 18px; letter-spacing: -.02em; }
.light .dim { color: #8a8a88; }

/* statement */
.st-top { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.st-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.light .ranges { background: rgba(7, 7, 7, .06); }
.light .ranges button { color: var(--mute-dark); }
.light .ranges button[aria-checked="true"] { background: var(--ink); color: var(--paper); }
.addr { font: 500 13px "Geist", system-ui, sans-serif; color: var(--ink); text-decoration: none; padding: 9px 14px; border-radius: 99px; border: 1px solid var(--line-l); }
.addr:hover { border-color: var(--ink); }
.st-why { margin: 14px 0 0; max-width: 46em; color: var(--mute-dark); min-height: 1.5em; }
.ledger { margin: clamp(36px, 5vw, 72px) 0 0; border-top: 1px solid var(--line-l); }
.ledger .row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 24px; padding: clamp(14px, 1.8vw, 26px) 0; border-bottom: 1px solid var(--line-l); }
.ledger .lbl { margin: 0; font-size: 17px; font-weight: 520; }
.ledger .lbl small { display: block; margin-top: 4px; font-size: 14px; font-weight: 400; color: var(--mute-dark); }
.ledger .num { margin: 0; font: 300 clamp(44px, 7vw, 124px)/.95 var(--mono); letter-spacing: -.07em; white-space: nowrap; }
.light .num.in { color: var(--ink); }
.light .num.out { color: var(--out-l); }
.ledger .row.net .num { position: relative; }
.ledger .row.net .num::after { content: ""; position: absolute; left: 0; right: 0; bottom: -.12em; height: 2px; background: var(--prism); transform: scaleX(var(--k, 1)); transform-origin: right; }
.ledger .num .u { font: 400 .3em "Geist", system-ui, sans-serif; letter-spacing: 0; margin-left: .3em; color: var(--out-l); }
.ledger .num.loading { color: var(--paper-2); }
.st-split { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 4vw, 72px); margin-top: clamp(48px, 6vw, 96px); }
.where .sankey { border-radius: 20px; background: #e2e1dd; }
.types { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-l); }
.types li { position: relative; display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; padding: 14px 4px 14px 16px; border-bottom: 1px solid var(--line-l); overflow: hidden; isolation: isolate; }
.types li::before { content: ""; position: absolute; left: 0; top: 50%; width: 4px; height: 22px; transform: translateY(-50%); border-radius: 2px; background: currentColor; }
.types li.in::before { background: var(--ink); } .types li.out::before { background: repeating-linear-gradient(var(--out-l) 0 2px, transparent 2px 4px); }
.types li::after { content: ""; position: absolute; inset: 0; z-index: -1; opacity: 0; transition: opacity .4s var(--ease); }
.types li.in::after { background: linear-gradient(90deg, rgba(207, 233, 255, .7), rgba(226, 219, 255, .35) 40%, rgba(226, 219, 255, 0) 75%); }
.types li.out::after { background: linear-gradient(90deg, rgba(7, 7, 7, .07), rgba(7, 7, 7, 0) 70%); }
.types li:hover::after { opacity: 1; }
.types .t { font-weight: 520; }
.types .c { grid-column: 1; font-size: 13px; color: var(--mute-dark); }
.types .v { grid-row: 1 / span 2; grid-column: 2; align-self: center; font: 400 18px var(--mono); letter-spacing: -.04em; }
.types li.out .v { color: var(--out-l); }
.types a { text-decoration: none; }
.types img { display: inline-block; width: 18px; height: 18px; border-radius: 50%; vertical-align: -3px; margin-right: 6px; object-fit: cover; }
.coverage { margin-top: 36px; padding: 16px 20px; border-radius: 16px; background: rgba(7, 7, 7, .05); font-size: 14px; color: #4a4a48; }
.coverage:empty { display: none; }
.coverage.err { background: var(--ink); color: var(--paper); }

/* rhythm */
.rh-top { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); gap: 32px; align-items: end; }
.rh-note { margin: 0; color: var(--mute); }
.wave { position: relative; height: clamp(220px, 30vh, 340px); margin-top: clamp(40px, 5vw, 72px); }
.wave canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.wave-tip { position: absolute; top: 0; transform: translateX(-50%); padding: 8px 12px; border-radius: 12px; background: var(--graphite); border: 1px solid var(--line-d); font-size: 13px; white-space: nowrap; pointer-events: none; }
.wave-tip b { font-weight: 520; }
.wave-axis { display: flex; justify-content: space-between; margin-top: 10px; font: 400 12px "Geist", system-ui, sans-serif; color: var(--mute); }
.people { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 4vw, 72px); margin-top: clamp(56px, 6vw, 96px); }
.who { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-d); }
.who li { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line-d); }
.who a { font-size: 16px; text-decoration: none; color: rgba(236, 235, 232, .85); }
.who a:hover { color: var(--paper); text-decoration: underline; }
.who code { font: inherit; font-family: var(--mono); }
.who .v { font-family: var(--mono); font-size: 16px; }
.who.in .v { color: var(--paper); } .who.out .v { color: var(--out-d); }
.who .none { color: var(--mute); justify-content: flex-start; }

/* method */
.fillhead { margin: 0; font-weight: 580; font-size: clamp(42px, 6.4vw, 116px); line-height: .98; letter-spacing: -.05em; }
.fillhead .fl { display: block; }
.fillhead .w { color: #c4c3bf; transition: color .2s linear; }
.fillhead .w.on { color: var(--ink); }
.method { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 56px); margin-top: clamp(56px, 7vw, 112px); }
.method > div { border-top: 1px solid var(--ink); padding-top: 18px; }
.method p { margin: 0; color: #444442; }

/* card */
.card-grid { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 6fr); gap: clamp(32px, 5vw, 96px); align-items: center; }
.card-copy p { color: rgba(236, 235, 232, .72); max-width: 30em; margin: 22px 0 28px; }
.card-btns { display: flex; gap: 10px; flex-wrap: wrap; }
.card-stage { perspective: 1400px; }
#cardCanvas { width: 100%; height: auto; border-radius: 20px; box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .7); transform: rotateX(8deg) rotateY(-10deg); transition: transform .8s var(--ease); background: var(--graphite); }
.card-stage:hover #cardCanvas { transform: none; }

/* footer */
.foot { position: relative; z-index: 8; background: var(--ink); border-top: 1px solid var(--line-d); padding: 32px var(--m); }
.foot-in { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; }
.foot-note { margin: 0; font-size: 14px; color: var(--mute); }
.foot .tools { margin-left: auto; }

.toast { position: fixed; z-index: 60; left: 50%; bottom: 24px; transform: translateX(-50%); padding: 12px 18px; border-radius: 14px; background: var(--paper); color: var(--ink); font-size: 14px; box-shadow: 0 20px 40px -20px rgba(0, 0, 0, .6); }

/* ---------- responsive ---------- */
@media (max-width: 1180px) {
  .nav { display: none; }
  .pairnote { display: none; }
}
@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; min-height: 0; }
  .rules { grid-template-columns: repeat(3, 1fr); }
  .rules i:nth-child(n+4) { display: none; }
  .st-split, .rh-top, .card-grid { grid-template-columns: 1fr; }
  .method { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .bar { gap: 10px; padding-inline: 16px; }
  .wordmark { display: none; }
  .ca { display: none; }
  .ico { width: 34px; height: 34px; }
  .pill { height: 34px; padding: 0 13px; font-size: 13px; }
  .hero { padding-top: 92px; }
  .paste { flex-wrap: wrap; border-radius: 22px; }
  .paste input { flex-basis: 100%; }
  .paste .ranges { flex: 1; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .hero-stats div:last-child { display: none; }
  .board { padding: 16px 12px 12px; }
  .board-head { flex-direction: column; gap: 2px; }
  .board-sub { text-align: left; }
  .sankey { height: 440px; }
  .people { grid-template-columns: 1fr; }
  .ledger .num { font-size: clamp(36px, 11vw, 60px); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
