/* ============ MANTIS subpages — riptide skin over the original markup ==== */
:root {
  --bg: #050a12;
  --bg-card: #0d1626;
  --ink: #e8f1fa;
  --ink-dim: #93a6bd;
  --ink-faint: #5b6b82;
  --cyan: #35c7ec;
  --cyan-bright: #6ee3ff;
  --cyan-deep: #0e7fa8;
  --line: rgba(120, 170, 220, 0.12);
  --radius: 2px;
  --font-display: "Space Grotesk", "Inter", sans-serif;
  --font-body: "Inter", sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
  /* canvas palettes (tape.js reads these) */
  --up: #4ade80;
  --accent: #6ee3ff;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: rgba(53, 199, 236, 0.35); }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.12; letter-spacing: -0.02em; }
.shell { max-width: 1100px; margin: 0 auto; padding: 0 32px; position: relative; z-index: 2; }
.acc { color: var(--cyan); }
.mut { color: var(--ink-faint); }
.up { color: var(--cyan-bright); }
.tx { color: var(--ink-dim); font-size: 16px; }
.tx + .tx { margin-top: 18px; }
code { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.9em; color: var(--ink-dim); }

/* reveals (web.js toggles .in) */
.rv { opacity: 0; transform: translateY(26px); transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out); transition-delay: calc(var(--i, 0) * 90ms); }
.rv.in { opacity: 1; transform: translateY(0); }
.rv.from-up { transform: translateY(-18px); }
.rv.from-up.in { transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .rv { opacity: 1 !important; transform: none !important; transition: none !important; } }

/* ============ NAV ============ */
nav.top {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; gap: 26px;
  padding: 16px 0;
  background: rgba(5, 10, 18, 0.82);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
  margin: 0 -32px; padding-left: 32px; padding-right: 32px;
}
.wm { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; }
.wm .mark { height: 28px; width: auto; }
.wm .mark path { fill: var(--ink); }
.wm-name { font-family: var(--font-display); font-weight: 700; font-size: 18px; letter-spacing: 0.14em; color: var(--ink); }
.its { display: flex; gap: 28px; margin-left: 8px; }
.it { color: var(--ink-dim); text-decoration: none; font-size: 14px; font-weight: 500; transition: color 0.25s; }
.it:hover { color: var(--ink); }
.it.on { color: var(--cyan-bright); }
.btct { margin-left: auto; display: inline-flex; align-items: baseline; gap: 8px; font-size: 13px; color: var(--ink-dim); font-variant-numeric: tabular-nums; }
.btct .l { font-size: 11px; letter-spacing: 0.14em; color: var(--ink-faint); }
.btct .px { color: var(--cyan-bright); font-weight: 600; }
.btct .arw { display: none; }

/* hamburger */
.hb {
  display: none;
  width: 44px; height: 44px;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  background: transparent; border: 1px solid var(--line); border-radius: 2px;
  cursor: pointer; margin-left: auto;
  transition: border-color 0.25s;
}
.hb span { display: block; width: 20px; height: 2px; background: var(--ink); transition: transform 0.32s var(--ease-out), opacity 0.2s; }
.hb:hover { border-color: var(--ink-dim); }
nav.top.open .hb span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
nav.top.open .hb span:nth-child(2) { opacity: 0; }
nav.top.open .hb span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
@media (max-width: 760px) {
  .btct { display: none; }
  .hb { display: flex; }
  /* backdrop-filter would make the nav the containing block for the
     fixed-position menu overlay, clipping it to the bar height */
  nav.top { backdrop-filter: none; -webkit-backdrop-filter: none; background: rgba(5, 10, 18, 0.96); }
  nav.top .its { z-index: 90; backdrop-filter: none; -webkit-backdrop-filter: none; background: #04080f; }
  nav.top .wm, nav.top .hb { position: relative; z-index: 95; }
  .its {
    position: fixed; inset: 0; z-index: -1;
    flex-direction: column; justify-content: center; align-items: center; gap: 8px;
    background: rgba(4, 8, 15, 0.94);
    backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    opacity: 0; pointer-events: none; margin: 0;
    transition: opacity 0.3s var(--ease-out);
  }
  nav.top.open .its { opacity: 1; pointer-events: auto; }
  .its .it {
    font-family: var(--font-display); font-size: clamp(28px, 9vw, 40px); font-weight: 700;
    color: var(--ink); padding: 8px 0;
    opacity: 0; transform: translateY(22px);
    transition: opacity 0.45s var(--ease-out), transform 0.45s var(--ease-out);
  }
  nav.top.open .its .it { opacity: 1; transform: translateY(0); }
  nav.top.open .its .it:nth-child(1) { transition-delay: 60ms; }
  nav.top.open .its .it:nth-child(2) { transition-delay: 120ms; }
  nav.top.open .its .it:nth-child(3) { transition-delay: 180ms; }
  nav.top.open .its .it:nth-child(4) { transition-delay: 240ms; }
  nav.top.open .its .it:nth-child(5) { transition-delay: 300ms; }
}

/* ============ PAGE HEADER ============ */
.pg { padding: 110px 0 30px; }
.pg h1 { font-size: clamp(44px, 8vw, 84px); font-weight: 700; color: var(--ink); }
.pg h1.acc {
  background: linear-gradient(100deg, var(--cyan-bright), var(--cyan-deep));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.crumb { font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-faint); margin-bottom: 14px; }
.crumb b { color: var(--ink-dim); font-weight: 600; }
.deck { color: var(--ink-dim); font-size: 18px; max-width: 640px; margin-top: 18px; }
.pg .tx { max-width: 640px; margin-top: 14px; }

/* ============ SECTIONS ============ */
.blk, .micro, .bt-int, .fundb, .offer, .split-laptop { padding: 64px 0 8px; }
.section-kicker, .micro-kicker {
  font-size: 13px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--cyan); margin-bottom: 14px;
  display: flex; align-items: center; gap: 12px;
}
h2, .offer-head { font-size: clamp(26px, 4vw, 42px); margin-bottom: 16px; }
.micro-kicker { font-size: clamp(26px, 4vw, 42px); font-family: var(--font-display); color: var(--ink); letter-spacing: -0.02em; text-transform: none; margin-bottom: 6px; }
.micro-sub { font-size: 13px; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; margin-bottom: 18px; }
.sep-dots { display: flex; gap: 10px; justify-content: center; padding: 48px 0 8px; }
.sep-dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--ink-faint); opacity: 0.6; }
.pill {
  font-size: 10px; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase;
  border: 1px solid rgba(53, 199, 236, 0.4); color: var(--cyan);
  padding: 2px 10px; border-radius: 999px;
}
.fnote { color: var(--ink-faint); font-size: 13px; margin-top: 26px; }

/* ============ BUTTONS ============ */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 26px; border-radius: 1px;
  font-weight: 600; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase;
  text-decoration: none; cursor: pointer; font-family: var(--font-body);
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  margin-top: 22px;
}
.btn-solid, .btn-outline { background: var(--cyan); color: #04101a; border: 1px solid var(--cyan); }
.btn-solid:hover, .btn-outline:hover { background: var(--cyan-bright); border-color: var(--cyan-bright); }

/* ============ SPLITS ============ */
.split-laptop { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.split-laptop .split-copy h2 { margin-bottom: 18px; }
.split-fig img { display: block; width: 100%; height: auto; }
.split-fig.coin img {
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.5));
}
.split-fig.tape-anim canvas { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.bt-int { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.bt-e8 canvas { display: block; width: 100%; height: auto; }
@media (max-width: 820px) { .split-laptop, .bt-int { grid-template-columns: 1fr; gap: 32px; } }

/* ============ GLASS CARDS (de-slopped) ============ */
.offer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 16px; margin-top: 28px; }
.offer-grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.glass {
  display: block;
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 26px 26px;
  color: var(--ink); text-decoration: none;
  transition: border-color 0.35s;
}
.glass:hover { border-color: rgba(120, 170, 220, 0.3); }
.glass-k {
  display: block;
  font-family: var(--font-display);
  font-size: 13px; font-weight: 600; letter-spacing: 0.14em;
  color: var(--cyan);
  padding-bottom: 14px; margin-bottom: 18px;
  border-bottom: 1px solid var(--line);
}
.glass-ico { width: 40px; height: 40px; margin-bottom: 16px; display: block; }
.glass h3 { font-size: 19px; margin-bottom: 8px; }
.glass p { color: var(--ink-dim); font-size: 14px; }
.glass-go {
  display: inline-block; margin-top: 18px;
  color: var(--cyan-bright);
  font-size: 12px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase;
  border-bottom: 1px solid rgba(110, 227, 255, 0.35);
}
.glass:hover .glass-go { border-color: var(--cyan-bright); }

/* stroke icons */
.box { fill: none; stroke: rgba(120, 170, 220, 0.5); stroke-width: 2; }
.box.hot { stroke: var(--cyan-bright); }
.wire { fill: none; stroke: rgba(120, 170, 220, 0.4); stroke-width: 2; }
.hotf { fill: var(--cyan); }
.comp-mark { width: 36px; height: 36px; }

/* ============ FUND ============ */
.fund-avail { margin: 18px 0 8px; }
.fund-avail .n { font-family: var(--font-display); font-size: clamp(40px, 7vw, 72px); font-weight: 700; color: var(--cyan-bright); font-variant-numeric: tabular-nums; }
.fund-avail .meta { color: var(--ink-faint); font-size: 14px; }
.fund-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-top: 28px; }
.fund-strip > div {
  background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px 18px 16px;
}
.fund-strip span { display: block; font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); margin-top: 8px; }
.fund-strip strong { font-family: var(--font-display); font-size: 20px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.fund-strip strong.up { color: var(--cyan-bright); }

.prop-house { margin-top: 40px; }
.firm { font-size: 20px; margin-bottom: 14px; }
.prows { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.prow {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr 1fr;
  gap: 12px; padding: 14px 18px;
  font-size: 14px; font-variant-numeric: tabular-nums;
  color: var(--ink-dim); text-decoration: none;
  border-bottom: 1px solid var(--line);
  transition: background 0.2s;
}
.prow:last-child { border-bottom: 0; }
a.prow:hover { background: rgba(120, 170, 220, 0.05); }
.prow.head {
  font-size: 11px; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--ink-faint); background: rgba(120, 170, 220, 0.04);
}
.prow .nm { color: var(--ink); font-weight: 600; }
.prow .r { text-align: right; }
@media (max-width: 720px) {
  .prow { grid-template-columns: 1.4fr 1fr 1fr; }
  .hide-sm { display: none; }
}

/* misc content lists / math on flow pages */
.klist, .ilist { color: var(--ink-dim); margin: 14px 0 0 20px; display: grid; gap: 8px; font-size: 15px; }
.k { color: var(--ink); font-weight: 600; }
.math, .formula { font-family: ui-monospace, "SF Mono", Menlo, monospace; color: var(--ink-dim); background: var(--bg-card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; margin-top: 16px; font-size: 14px; overflow-x: auto; }
.math-key { color: var(--ink-faint); font-size: 13px; margin-top: 10px; }
.frac { display: inline-block; }

/* ============ FOOTER ============ */
.foot {
  border-top: 1px solid var(--line);
  margin-top: 90px; padding: 44px 0 56px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; flex-wrap: wrap;
}
.fbrand { display: flex; align-items: center; gap: 18px; }
.flog { height: 32px; width: auto; filter: invert(0.92) hue-rotate(180deg) saturate(0.4); }
.ftag { color: var(--ink-faint); font-size: 13px; }
.mail {
  color: var(--cyan-bright); font-weight: 600; text-decoration: none;
  border-bottom: 1px solid rgba(110, 227, 255, 0.35);
  transition: color 0.25s, border-color 0.25s;
}
.mail:hover { color: #fff; border-color: #fff; }

/* appendix / FLOW leftovers, restyled to the riptide tokens */
body { position: relative; }
.apx .tx { max-width: 78ch; }
.apx section.blk h2 { max-width: 46ch; }
.apx h3 { font-size: 1.15rem; letter-spacing: -0.02em; font-weight: 700; margin: 1.7rem 0 0.55rem; }
.apx h4 { font-size: 12px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); margin: 1.35rem 0 0.4rem; }
.toc {
  border: 1px solid var(--line); background: var(--bg-card);
  padding: 1.15rem 1.4rem 1.25rem; margin: 1.6rem 0 0;
  font-size: 14px; columns: 2; column-gap: 2.4rem;
}
.toc a { display: block; color: var(--ink); text-decoration: none; padding: 0.1rem 0; break-inside: avoid; }
.toc a:hover { color: var(--cyan-bright); }
.toc .n { color: var(--ink-faint); font-variant-numeric: tabular-nums; margin-right: 0.45em; }
.card, .formula, pre.spec {
  border: 1px solid var(--line); background: var(--bg-card);
  padding: 1.15rem 1.45rem 1.35rem; margin: 1.2rem 0; max-width: 78ch;
}
.formula { font-size: 15px; display: block; overflow-x: auto; }
.card h3 { margin-top: 0; }
.glass.math { max-width: 78ch; }
.glass .formula { border: 0; background: transparent; padding: 0; margin: 0.7rem 0 0; max-width: none; }
.formula .frac { display: inline-block; text-align: center; vertical-align: middle; margin: 0 0.35em; }
.formula .frac .top { display: block; border-bottom: 1px solid var(--ink-dim); padding: 0 0.3em 0.1em; }
.formula .frac .bot { display: block; padding: 0.1em 0.3em 0; }
pre.spec { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 12px; line-height: 1.5; overflow-x: auto; }
.src { font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); margin: -0.15rem 0 1rem; }
.tw { overflow-x: auto; margin-top: 1.4rem; }
table.roster { width: 100%; border-collapse: collapse; font-size: 13px; }
.roster th {
  font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; text-align: left;
  color: var(--ink-faint); padding: 0.5em 0.9em 0.5em 0; border-bottom: 1px solid var(--line); white-space: nowrap;
}
.roster td {
  padding: 0.6em 0.9em 0.6em 0; border-bottom: 1px solid var(--line);
  font-variant-numeric: tabular-nums; white-space: nowrap; vertical-align: top; color: var(--ink-dim);
}
.roster td.r, .roster th.r { text-align: right; }
.roster.wrap td { white-space: normal; }
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 2.4rem; margin: 0.4rem 0 1.6rem; }
.duo h3 { font-size: 1.35rem; margin-bottom: 0.6rem; }
@media (max-width: 860px) { .toc { columns: 1; } .duo { grid-template-columns: 1fr; } }
.lines { font-size: 20px; font-weight: 700; line-height: 1.45; }
.lines span { display: block; padding: 0.32em 0; border-bottom: 1px solid var(--line); max-width: 30ch; }
.lines span:last-child { border-bottom: 0; }
.klist { display: grid; grid-template-columns: max-content 1fr; gap: 0.4rem 1.6rem; }
.klist .k { color: var(--ink-faint); }
.klist .v { font-weight: 500; color: var(--ink); }
.ilist { margin-bottom: 2.6rem; }
.ilist .k { color: var(--cyan); font-weight: 700; }
.fund-strip.six { grid-template-columns: repeat(3, 1fr); }
.acct-nav { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 1.2rem; }
.acct-nav a { color: var(--cyan-bright); text-decoration: none; }
.acct-ledger .prow { grid-template-columns: minmax(6rem, 1fr) 0.9fr 0.9fr 0.9fr; }
.art.chart { margin-top: 1.4rem; }
.art.chart .upbar { fill: var(--up); }
.art.chart .dnbar { fill: var(--accent); }
body.flow section.blk { padding: 40px 0; }
body.flow section.blk h2 { margin-bottom: 40px; }
body.flow section.blk h3 { margin-top: 40px; }
.chmap { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); margin: 24px 0; }
.ch { background: var(--bg-card); padding: 20px; }
.ch > span { font-size: 12px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-faint); }
.ch h3 { font-size: 18px; margin: 0.45rem 0 0.3rem; }
.ch p { font-size: 14px; color: var(--ink-dim); margin: 0; }
.ch.primary { grid-column: 1 / -1; }
@media (max-width: 720px) { .chmap { grid-template-columns: 1fr; } }
