/* Cashflyt — TD-like dark title UI */
:root {
  --paper: #0c1018;
  --ink: #e8eef8;
  --muted: #8fa3c0;
  --dim: #6d82a0;
  --line: #2a3a55;
  --surface: #141c2c;
  --surface-2: #1a2438;
  --accent: #3ddec8;
  --gold: #f0c14a;
  --crypto: #c084fc;
  --loan: #7dd3fc;
  --crit: #ff5c5c;
  --ok: #3dd68c;
  --shadow: 0 10px 28px rgba(0, 0, 0, .45);
  --font: "Plus Jakarta Sans", "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --touch: 48px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
}
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { height: 100%; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  min-height: 100dvh;
  line-height: 1.45;
}
.bg {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background:
    radial-gradient(720px 400px at 12% -8%, rgba(240, 193, 74, .14), transparent 55%),
    radial-gradient(640px 380px at 100% 0%, rgba(61, 222, 200, .10), transparent 50%),
    linear-gradient(180deg, #101828, #0c1018 50%, #0a0e16);
}
a { color: inherit; }
.screen {
  position: relative; z-index: 1;
  max-width: 920px;
  margin: 0 auto;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: calc(1.15rem + var(--safe-t)) 1.15rem calc(1.4rem + var(--safe-b));
}
.top {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; margin-bottom: .85rem;
}
.kicker {
  font-family: var(--mono);
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--accent);
}
.quiet {
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--dim);
  text-decoration: none;
}
.quiet:hover { color: var(--ink); }
h1 {
  font-size: clamp(3.1rem, 11vw, 5.5rem);
  line-height: .88;
  letter-spacing: -.045em;
  font-weight: 800;
  color: var(--ink);
}
h1 em { font-style: normal; color: var(--accent); }
.tagline {
  margin-top: .85rem;
  font-size: 1.05rem;
  font-weight: 600;
  color: var(--muted);
  max-width: 28rem;
}
.privacy {
  margin-top: .55rem;
  font-family: var(--mono);
  font-size: .75rem;
  color: var(--dim);
  max-width: 36rem;
}
.actions { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.25rem; }
.btn {
  appearance: none; border: 0; cursor: pointer;
  font-family: inherit; font-weight: 800;
  border-radius: 999px;
  padding: .8rem 1.2rem;
  font-size: .95rem;
  text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center;
  min-height: var(--touch);
  transition: transform .12s, border-color .12s, background .12s;
  -webkit-tap-highlight-color: transparent;
}
.btn:active { transform: scale(.98); }
.btn-primary {
  background: linear-gradient(180deg, #f5b84a, #f0a030);
  color: #1a1000;
  box-shadow: 0 8px 20px rgba(240, 160, 48, .35);
}
.btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--accent); }
.btn-sm { min-height: 40px; padding: .45rem .8rem; font-size: .82rem; font-weight: 700; }
.btn:focus-visible, .plat:focus-visible, .flow-node:focus-visible rect {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.flow-node:focus-visible rect { outline: none; stroke: var(--accent); stroke-width: 2.4; }

.board {
  margin-top: 1.45rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: .75rem .75rem .85rem;
  box-shadow: var(--shadow);
}
.board-kicker {
  display: flex; justify-content: space-between; gap: .6rem; flex-wrap: wrap;
  padding: .15rem .35rem .35rem;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--dim);
}
.flow-svg { width: 100%; height: auto; display: block; }
.board-scroll { overflow: visible; }
.swipe-hint { display: none; margin: 0 .35rem .35rem; font-family: var(--mono); font-size: .62rem; letter-spacing: .06em; text-transform: uppercase; color: var(--dim); }
.flow-svg text { font-family: var(--font); }
.flow-svg .mono { font-family: var(--mono); }
.flow-edge { opacity: .32; transition: opacity .18s ease; }
.flow-edge.hot { opacity: 1; }
.flow-edge.goal { opacity: .72; }
.flow-edge.goal.hot { opacity: 1; }
.flow-node { cursor: pointer; }
.flow-node rect { transition: stroke .15s ease, filter .15s ease; }
.flow-node.on rect { filter: drop-shadow(0 0 8px rgba(240, 193, 74, .28)); }
.flow-cap {
  margin: .7rem .4rem 0;
  min-height: 2.6em;
  font-size: .92rem;
  line-height: 1.5;
  color: var(--muted);
}
.flow-cap strong { color: var(--gold); font-weight: 700; }
.nowrap { white-space: nowrap; }
.legend {
  display: flex; flex-wrap: wrap; gap: .35rem .85rem;
  list-style: none;
  margin: .55rem .35rem 0;
  font-family: var(--mono);
  font-size: .68rem;
  color: var(--dim);
}
.legend i {
  display: inline-block; width: 8px; height: 8px; border-radius: 99px;
  margin-right: .35rem; vertical-align: 0;
}
.legend .g { background: var(--gold); }
.legend .c { background: var(--crypto); }
.legend .l { background: var(--loan); }
.legend .a { background: var(--accent); }

.plat-label { margin: 1.35rem 0 .55rem; }
.plats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: .55rem;
}
.plat {
  appearance: none;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: .8rem .85rem .9rem;
  min-height: 84px;
}
.plat:hover { border-color: #3d5a78; }
.plat.on {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px rgba(61, 222, 200, .35);
}
.plat .idx {
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .12em;
  color: var(--accent);
}
.plat strong {
  display: block;
  margin-top: .2rem;
  font-size: 1.02rem;
  letter-spacing: -.02em;
}
.plat span.sub {
  display: block;
  margin-top: .15rem;
  font-family: var(--mono);
  font-size: .68rem;
  color: var(--dim);
}
.foot {
  margin-top: 1.75rem;
  padding-top: 0;
}
.soon {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .02em;
  color: #6a5a32;
}

/* Subpages */
.bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: .75rem; margin-bottom: 1.35rem;
}
.logo {
  text-decoration: none;
  font-weight: 800;
  font-size: 1.15rem;
  letter-spacing: -.03em;
}
.logo em { font-style: normal; color: var(--accent); }
.bar nav { display: flex; flex-wrap: wrap; gap: .35rem; }
.bar nav a {
  text-decoration: none;
  font-size: .82rem;
  font-weight: 700;
  color: var(--muted);
  border: 1px solid transparent;
  border-radius: 999px;
  padding: .35rem .7rem;
  min-height: 36px;
  display: inline-flex; align-items: center;
}
.bar nav a:hover { color: var(--ink); }
.bar nav a[aria-current="page"] {
  color: var(--ink);
  border-color: var(--line);
  background: var(--surface);
}
.page h1 { font-size: clamp(2.1rem, 6vw, 3.1rem); line-height: .95; }
.lede { margin-top: .7rem; color: var(--muted); max-width: 40rem; font-weight: 500; }
.panel {
  margin-top: 1.1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem 1rem 1.05rem;
  box-shadow: var(--shadow);
}
.panel h2 {
  font-size: 1rem;
  letter-spacing: -.02em;
  margin-bottom: .25rem;
}
.hint { color: var(--dim); font-size: .82rem; margin-bottom: .75rem; }
.stack { display: flex; flex-direction: column; gap: .45rem; }
.line, .gline {
  display: grid;
  grid-template-columns: 1.4fr 8.5rem auto;
  gap: .4rem;
  align-items: center;
}
.gline { grid-template-columns: 7.2rem 1fr; }
.gline.three { grid-template-columns: 7.2rem 1fr 1fr; }
label.lbl {
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--dim);
}
input, select {
  width: 100%;
  background: #0c1018;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 44px;
  padding: .45rem .7rem;
  font: 600 .92rem var(--font);
}
input.amt, input.mono {
  font-family: var(--mono);
  font-weight: 500;
  font-size: .85rem;
}
input:focus, select:focus {
  outline: 2px solid rgba(61, 222, 200, .55);
  outline-offset: 1px;
  border-color: var(--accent);
}
.goal-block, .loan-block {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: .75rem;
  margin-top: .55rem;
  background: rgba(0,0,0,.18);
}
.goal-block header, .loan-block header {
  display: flex; justify-content: space-between; align-items: center; gap: .5rem;
  margin-bottom: .55rem;
}
.goal-block header strong, .loan-block header strong { letter-spacing: -.02em; }
.name-row { display: flex; align-items: center; gap: .35rem; min-width: 0; flex: 1; }
.name-title {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  cursor: pointer;
}
.name-title:hover, .name-title:focus-visible { color: var(--accent); }
button.rename {
  flex: none;
  border: 0;
  background: transparent;
  color: var(--dim);
  font: 600 .68rem var(--font);
  letter-spacing: .01em;
  padding: .1rem .15rem;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}
button.rename:hover, button.rename:focus-visible { color: var(--ink); }
.name-edit { flex: 1; min-width: 0; }
.goal-block header span { font-family: var(--mono); font-size: .68rem; color: var(--gold); letter-spacing: .06em; }
.loan-block header span { color: var(--loan); }
.fields { display: grid; gap: .45rem; }
.goal-note { margin: .1rem 0 0; }
.tools { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .6rem; }
.add-row { margin-top: .55rem; }
.summary {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: .4rem;
  margin-top: 1rem;
}
.stat {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .45rem .55rem;
}
.stat .s-lbl {
  font-family: var(--mono);
  font-size: .58rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--dim);
}
.stat .s-val {
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
  margin-top: .1rem;
}
.stat .s-val.neg { color: var(--crit); }
.stat .s-val.pos { color: var(--accent); }
pre.json {
  margin-top: .75rem;
  background: #0a0e16;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .8rem;
  max-height: 280px;
  overflow: auto;
  font-family: var(--mono);
  font-size: .68rem;
  line-height: 1.5;
  color: #b7efe4;
}
.status {
  margin-top: .65rem;
  font-family: var(--mono);
  font-size: .68rem;
  color: var(--dim);
}
.how-list { margin: .4rem 0 0 1.15rem; color: var(--muted); }
.how-list li { margin: .55rem 0; }
.how-list strong { color: var(--ink); }
.steps { list-style: none; display: flex; flex-direction: column; gap: .55rem; }
.steps li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .7rem;
  align-items: start;
  padding: .7rem .75rem;
  border-radius: 14px;
  background: rgba(0,0,0,.2);
  border: 1px solid var(--line);
}
.steps .n {
  font-family: var(--mono);
  font-size: .72rem;
  font-weight: 700;
  color: #1a1000;
  background: linear-gradient(180deg, #f5b84a, #f0a030);
  width: 28px; height: 28px; border-radius: 8px;
  display: grid; place-items: center;
}
.steps strong { display: block; margin-bottom: .12rem; }
.steps span { color: var(--muted); font-size: .88rem; }
.call {
  margin-top: 1rem;
  padding: .85rem 1rem;
  border-radius: 14px;
  border: 1px solid rgba(61, 222, 200, .35);
  background: rgba(61, 222, 200, .06);
}
.call strong { color: var(--accent); display: block; margin-bottom: .2rem; }
.call p { color: var(--muted); font-size: .92rem; }
.subfoot {
  margin-top: 1.75rem;
  padding-top: 0;
  font-family: var(--mono);
  font-size: .68rem;
  color: var(--dim);
}
.toast {
  position: fixed; z-index: 20;
  left: 50%; bottom: calc(1.1rem + var(--safe-b));
  transform: translateX(-50%) translateY(140%);
  background: #1a2438;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--mono);
  font-size: .75rem;
  padding: .6rem 1rem;
  border-radius: 999px;
  box-shadow: 0 8px 24px rgba(0,0,0,.5);
  transition: transform .22s ease;
  max-width: min(92vw, 420px);
  text-align: center;
}
.toast.show { transform: translateX(-50%) translateY(0); }

@media (max-width: 800px) {
  .plats { grid-template-columns: 1fr 1fr; }
  .summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .gline.three { grid-template-columns: 7.2rem 1fr; }
}
.mono { font-family: var(--mono); }
@media (max-width: 720px) {
  .board-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; padding-bottom: .2rem; }
  .flow-svg { min-width: 980px; }
  .swipe-hint { display: block; }
}
@media (max-width: 520px) {
  .line, #expense-list .line { grid-template-columns: 1fr 1fr !important; }
  .line .btn, #expense-list .line .btn { grid-column: 1 / -1; }
  .summary { grid-template-columns: 1fr 1fr; }
  .gline { grid-template-columns: 1fr; }
  .period-row { grid-template-columns: 1fr; }
  .plats { grid-template-columns: 1fr 1fr; }
  h1 { font-size: clamp(2.7rem, 16vw, 4rem); }
}
@media (prefers-reduced-motion: reduce) {
  .btn, .flow-edge, .toast { transition: none; }
  .mover { display: none; }
  .mote, .bob, .core, .pool-glow { animation: none !important; }
}

.minor { margin-top: .55rem; font-family: var(--mono); font-size: .72rem; }
.minor a { color: var(--dim); text-decoration: none; }
.minor a:hover { color: var(--ink); }
.goal-switch { display: flex; flex-wrap: wrap; gap: .4rem; padding: .1rem .35rem .55rem; }
.goal-switch button {
  appearance: none; cursor: pointer; font: 700 .82rem var(--font); color: var(--muted);
  background: transparent; border: 1px solid var(--line); border-radius: 999px;
  padding: .28rem .75rem; min-height: 36px;
}
.goal-switch button.on { color: #1a1000; background: linear-gradient(180deg, #f5b84a, #f0a030); border-color: transparent; }
.badges { display: flex; flex-wrap: wrap; gap: .55rem .6rem; }
.badge {
  display: flex; flex-direction: column; gap: .18rem;
  background: var(--surface); border: 1px solid var(--line); border-radius: 12px;
  padding: .55rem .8rem .6rem; min-width: 0; flex: 1 1 9.5rem; max-width: 100%;
}
.badge b { font-size: .9rem; letter-spacing: -.02em; font-weight: 800; line-height: 1.2; }
.badge small {
  font-family: var(--mono); font-size: .62rem; letter-spacing: .02em; color: var(--accent);
  line-height: 1.35; white-space: normal; overflow-wrap: anywhere;
}
.agent-row { display: flex; align-items: center; gap: .75rem; margin-top: .75rem; flex-wrap: wrap; }
.bar nav a.dim { color: var(--dim); font-weight: 600; font-size: .75rem; }

textarea {
  width: 100%;
  background: #0c1018;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  min-height: 96px;
  padding: .55rem .7rem;
  font: 500 .8rem var(--mono);
  resize: vertical;
}
textarea:focus {
  outline: 2px solid rgba(61, 222, 200, .55);
  outline-offset: 1px;
  border-color: var(--accent);
}
.paste { margin-top: 1rem; }
.period-row {
  display: grid;
  grid-template-columns: 7.2rem minmax(0, 16rem);
  gap: .4rem;
  align-items: center;
  margin-top: .85rem;
}

.api-card {
  margin-top: 1rem;
  background:
    radial-gradient(420px 120px at 0% 0%, rgba(61, 222, 200, .16), transparent 60%),
    linear-gradient(180deg, #152033, #121a2a);
  border: 1px solid rgba(61, 222, 200, .38);
  border-radius: 18px;
  padding: .85rem .95rem 1rem;
  box-shadow: 0 10px 28px rgba(0, 0, 0, .28);
}
.api-top { display: flex; justify-content: space-between; align-items: baseline; gap: .7rem; flex-wrap: wrap; }
.api-url {
  margin-top: .6rem;
  background: #0a0e16;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .72rem .85rem;
  font-family: var(--mono);
  font-size: .78rem;
  line-height: 1.35;
  color: var(--accent);
  overflow-wrap: anywhere;
  white-space: normal;
}
.api-card .hint { margin-top: .55rem; color: var(--muted); font-size: .9rem; }
.api-card .actions { margin-top: .7rem; }
.btn:disabled { opacity: .55; cursor: progress; transform: none; }


/* Frontpage bot-pool — square, no sideways scroll */
.pool-board { overflow: hidden; container-type: inline-size; }
.pool {
  --orbit: clamp(108px, 38cqi, 188px);
  position: relative;
  width: min(100%, 540px);
  margin: .45rem auto .15rem;
  aspect-ratio: 1;
}
.pool-glow {
  position: absolute;
  left: 50%; top: 50%;
  width: 46%; height: 46%;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(61, 222, 200, .28), rgba(240, 193, 74, .08) 42%, transparent 70%);
  filter: blur(8px);
  animation: pool-breathe 3.6s ease-in-out infinite;
  pointer-events: none;
}
.pool-ring {
  position: absolute;
  left: 50%; top: 50%;
  width: calc(var(--orbit) * 2);
  height: calc(var(--orbit) * 2);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  border: 1px dashed rgba(143, 163, 192, .38);
  box-shadow: inset 0 0 40px rgba(61, 222, 200, .05);
  pointer-events: none;
}
.arm {
  position: absolute;
  left: 50%; top: 50%;
  width: 0; height: 0;
  transform: rotate(var(--ang)) translateY(calc(var(--orbit) * -1));
}
.arm[hidden] { display: none; }
.bob {
  position: absolute;
  left: 0; top: 0;
  transform: translate(-50%, -50%) rotate(calc(var(--ang) * -1));
  animation: chip-bob 3.6s ease-in-out infinite;
  animation-delay: var(--delay, 0s);
}
.chip, .core {
  appearance: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.chip {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .08rem;
  width: max-content;
  min-width: 4.7rem;
  max-width: 6.8rem;
  min-height: 52px;
  padding: .4rem .55rem .42rem;
  border-radius: 16px;
  border: 1px solid color-mix(in srgb, var(--c) 55%, #2a3a55);
  background: rgba(10, 14, 22, .9);
  box-shadow: 0 10px 22px rgba(0, 0, 0, .38);
  text-align: center;
}
.chip-k {
  font-family: var(--mono);
  font-size: .6rem;
  letter-spacing: .03em;
  line-height: 1.15;
  text-transform: uppercase;
  color: var(--c);
  white-space: normal;
  overflow-wrap: anywhere;
  max-width: 6.2rem;
}
.chip strong {
  font-size: 1.02rem;
  font-weight: 800;
  letter-spacing: -.03em;
  line-height: 1.05;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.chip.on {
  border-color: var(--c);
  box-shadow: 0 0 0 1px var(--c), 0 0 20px color-mix(in srgb, var(--c) 50%, transparent);
}
.chip:focus-visible, .core:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}
.core {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: clamp(74px, 20cqi, 132px);
  height: clamp(74px, 20cqi, 132px);
  padding: .3rem .4rem;
  border-radius: 50%;
  border: 1px solid rgba(61, 222, 200, .7);
  background:
    radial-gradient(circle at 50% 38%, rgba(61, 222, 200, .34), rgba(16, 24, 40, .94) 62%);
  box-shadow:
    0 0 0 8px rgba(61, 222, 200, .06),
    0 0 36px rgba(61, 222, 200, .32),
    inset 0 0 22px rgba(240, 193, 74, .14);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .05rem;
  animation: core-pulse 3.4s ease-in-out infinite;
  z-index: 2;
}
.core.on {
  box-shadow:
    0 0 0 2px rgba(240, 193, 74, .85),
    0 0 42px rgba(61, 222, 200, .45),
    inset 0 0 22px rgba(240, 193, 74, .2);
}
.core-kicker {
  font-family: var(--mono);
  font-size: .56rem;
  letter-spacing: .08em;
  line-height: 1.15;
  text-transform: uppercase;
  color: var(--accent);
  text-align: center;
  max-width: 92%;
}
.core strong {
  font-size: clamp(1.35rem, 5vw, 1.7rem);
  font-weight: 800;
  letter-spacing: -.04em;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.core-sub {
  font-family: var(--mono);
  font-size: .56rem;
  color: var(--gold);
  letter-spacing: .02em;
  line-height: 1.15;
  text-align: center;
  max-width: 94%;
  white-space: normal;
}
.mote {
  position: absolute;
  left: 50%; top: 50%;
  width: 7px; height: 7px;
  margin: -3.5px 0 0 -3.5px;
  border-radius: 50%;
  background: var(--c);
  box-shadow: 0 0 10px var(--c);
  pointer-events: none;
  animation: mote-sink 2.9s linear infinite;
  animation-delay: var(--delay, 0s);
}
.mote[hidden] { display: none; }
.pool-more { text-align: center; margin-top: .35rem; }
@keyframes pool-breathe {
  50% { transform: translate(-50%, -50%) scale(1.08); opacity: .8; }
}
@keyframes core-pulse {
  50% {
    box-shadow:
      0 0 0 14px rgba(61, 222, 200, .05),
      0 0 52px rgba(61, 222, 200, .48),
      inset 0 0 28px rgba(240, 193, 74, .22);
  }
}
@keyframes chip-bob {
  0%, 100% { margin-top: 0; }
  50% { margin-top: -4px; }
}
@keyframes mote-sink {
  0% { transform: rotate(var(--ang)) translateY(calc(var(--orbit) * -1)); opacity: 0; }
  14% { opacity: 1; }
  100% { transform: rotate(var(--ang)) translateY(-34px); opacity: 0; }
}
@media (max-width: 420px) {
  .pool { --orbit: clamp(100px, 36cqi, 128px); }
  .chip { min-width: 3.85rem; max-width: 5.05rem; padding: .28rem .36rem .32rem; }
  .chip-k { font-size: .52rem; letter-spacing: .015em; max-width: 4.7rem; }
  .chip strong { font-size: .86rem; }
  .core { width: 74px; height: 74px; }
  .core-kicker, .core-sub { font-size: .5rem; letter-spacing: .03em; }
  .core strong { font-size: 1.15rem; }
}
@media (min-width: 800px) {
  .pool { --orbit: 190px; width: 540px; }
  .chip { min-width: 5.4rem; max-width: 7.4rem; min-height: 58px; }
  .chip-k { font-size: .64rem; max-width: 6.8rem; }
  .chip strong { font-size: 1.12rem; }
  .core { width: 132px; height: 132px; }
}


/* Frontpage focal stack: logo + pool, centered */
.home { max-width: 680px; padding-left: .7rem; padding-right: .7rem; }
.home .top { margin-bottom: .85rem; }
.home-nav { display: flex; align-items: center; gap: .9rem; }
.home-nav .quiet { letter-spacing: .02em; }
.hero-stack {
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: .35rem 0 .15rem;
}
.home h1 {
  font-size: clamp(3.5rem, 20vw, 7.2rem);
  line-height: .92;
  letter-spacing: -.055em;
  margin-top: .15rem;
  padding-bottom: .02em;
}
.home .tagline {
  margin-top: .85rem;
  margin-left: auto;
  margin-right: auto;
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.35;
  max-width: 16rem;
}
.home .actions { justify-content: center; margin-top: 1.05rem; gap: .65rem; }
.home .pool-board {
  margin-top: .2rem;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.home .pool-ring { display: none; }
.home .pool { margin-top: .05rem; margin-bottom: 0; }
.home .board-kicker { padding: 0 0 .15rem; justify-content: center; letter-spacing: .1em; }
.home .flow-cap {
  text-align: center;
  margin: .15rem auto 0;
  max-width: 36rem;
  min-height: 0;
  font-size: .92rem;
  line-height: 1.45;
  padding: 0 .4rem;
  text-wrap: balance;
}
.home .pool-more { margin-top: .35rem; margin-bottom: 0; }
.home .plat-label { margin: 1.35rem 0 .7rem; }
.home .badges { gap: .6rem; }
.home .api-card { margin-top: .7rem; }
.home .agent-row { margin-top: .45rem; }

.advanced {
  margin-top: .85rem;
  border: 1px dashed var(--line);
  border-radius: 14px;
  background: rgba(0, 0, 0, .16);
  padding: .35rem .8rem .8rem;
}
.advanced > summary {
  cursor: pointer;
  list-style: none;
  font-family: var(--mono);
  font-size: .68rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--dim);
  min-height: 40px;
  display: flex;
  align-items: center;
}
.advanced > summary::-webkit-details-marker { display: none; }
.advanced > summary::before { content: "▸"; color: var(--accent); margin-right: .45rem; }
.advanced[open] > summary::before { content: "▾"; }
.advanced[open] > summary { margin-bottom: .45rem; }
.advanced .hint { margin-bottom: .45rem; }
.advanced h2 { font-size: .95rem; letter-spacing: -.02em; margin-bottom: .15rem; }
.advanced .actions { margin-top: .55rem; }
.advanced .api-card { margin-top: .15rem; }

/* Flyt: vertical journey, no sideways scroll */
.journey {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0;
  max-width: 26rem;
  margin: .15rem auto 0;
}
.j-src {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .3rem;
}
.j-src .span { grid-column: 1 / -1; }
.j-node {
  appearance: none;
  font: inherit;
  color: inherit;
  cursor: pointer;
  text-align: left;
  width: 100%;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .45rem;
  min-height: 40px;
  padding: .38rem .65rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #101828;
  -webkit-tap-highlight-color: transparent;
}
.j-node .jk {
  font-family: var(--mono);
  font-size: .62rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
}
.j-node strong {
  font-size: .98rem;
  font-weight: 800;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
}
.j-node.lan { border-color: rgba(125, 211, 252, .65); }
.j-node.lan .jk { color: var(--loan); }
.j-node.uford {
  border-style: dashed;
  border-color: rgba(240, 193, 74, .7);
  background: #16140e;
}
.j-node.uford .jk, .j-node.uford strong { color: var(--gold); }
.j-node.j-hub, .j-node.j-hero, .j-node.j-side {
  flex-direction: column;
  align-items: center;
  text-align: center;
  justify-content: center;
}
.j-hub {
  border-color: rgba(61, 222, 200, .75);
  background: #10211e;
  padding: .55rem .7rem .6rem;
}
.j-hub .jk { color: var(--accent); }
.j-hub strong { font-size: 1.35rem; }
.j-sub { font-family: var(--mono); font-size: .62rem; color: var(--muted); letter-spacing: .04em; }
.j-hero {
  border: 2px solid var(--c, var(--gold));
  background: #1a160e;
  padding: .7rem .85rem .75rem;
  box-shadow: 0 0 24px rgba(240, 193, 74, .12);
}
.j-hero .jk { color: var(--c, var(--gold)); }
.j-hero #hero-title, .j-hero .j-title {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -.03em;
  color: var(--c, var(--gold));
  line-height: 1.1;
}
.j-hero .j-amt { font-weight: 700; font-size: .92rem; }
.j-hero .j-pace { color: var(--c, var(--gold)); font-weight: 700; font-size: .85rem; }
.j-bar {
  display: block;
  width: min(100%, 220px);
  height: 6px;
  margin-top: .4rem;
  border-radius: 3px;
  background: #2a2416;
  overflow: hidden;
}
.j-bar i {
  display: block;
  height: 100%;
  width: 8%;
  border-radius: 3px;
  background: var(--c, var(--gold));
}
.j-side {
  border-color: var(--c, var(--line));
  background: color-mix(in srgb, var(--c, #3ddec8) 12%, #101828);
  padding: .5rem .65rem .55rem;
}
.j-side .jk { color: var(--c, var(--accent)); font-size: .78rem; letter-spacing: .02em; text-transform: none; }
.j-side strong { font-size: 1.15rem; }
.j-rail {
  width: 2px;
  height: 18px;
  margin: 0 auto;
  background: linear-gradient(#3ddec8, #f0c14a);
  opacity: .45;
  position: relative;
}
.j-rail::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -5px;
  transform: translateX(-50%);
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-top: 6px solid #f0c14a;
  opacity: .85;
}
.j-rail.lit { opacity: 1; filter: drop-shadow(0 0 6px rgba(240, 193, 74, .45)); }
.j-sides { display: flex; flex-direction: column; gap: .3rem; }
.j-node.active {
  box-shadow: 0 0 0 1px rgba(240, 193, 74, .65), 0 0 16px rgba(240, 193, 74, .22);
}
.j-node:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.j-node[hidden] { display: none; }
.flyt .bar { margin-bottom: .55rem; }
.flyt-period { margin: 0 0 .15rem; }

.revise {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 1rem;
  background: rgba(6, 8, 14, .66);
}
.revise[hidden] { display: none; }
.revise-card {
  width: min(100%, 26rem);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem 1rem 1.05rem;
  box-shadow: var(--shadow);
  margin-bottom: max(.2rem, var(--safe-b));
}
.revise-card h2 {
  font-size: 1.28rem;
  letter-spacing: -.03em;
  margin: .15rem 0 .35rem;
}
.revise-card .actions { margin-top: .9rem; }
@media (min-width: 700px) {
  .revise { align-items: center; }
  .revise-card { margin-bottom: 0; }
}
