@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Space+Grotesk:wght@500;600;700&display=swap");

:root {
  --ink: #16181c;
  --ink-2: #3f444c;
  --ink-3: #6d727b;
  --pearl: #fbfbfc;
  --pearl-2: #f1f1f3;
  --titanium: #b8bcc3; /* gunmetal family */
  --gunmetal: #4a4f57;
  --crimson: #c8102e;
  --crimson-deep: #9e0c25;
  --cyan: #c8102e; /* crimson (3FS); var name kept so every rule follows */
  --cyan-deep: #9e0c25;
  --danger: #b4232f;
  --ok: #157a4a;
  --glass: rgba(255, 255, 255, 0.55);
  --glass-strong: rgba(255, 255, 255, 0.72);
  --glass-edge: rgba(255, 255, 255, 0.9);
  --shadow: 0 1px 1px rgba(13, 20, 32, 0.04), 0 10px 30px -10px rgba(13, 20, 32, 0.18), 0 30px 60px -30px rgba(13, 20, 32, 0.22);
  --radius: 22px;
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--pearl);
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

/* ---------- Liquid background ---------- */
.liquid { position: fixed; inset: 0; z-index: -1; overflow: hidden;
  background: radial-gradient(120% 80% at 50% 0%, #ffffff 0%, var(--pearl) 45%, var(--pearl-2) 100%); }
.liquid span { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.55; mix-blend-mode: multiply;
  animation: drift 26s ease-in-out infinite alternate; }
.liquid span:nth-child(1) { width: 46vmax; height: 46vmax; left: -12vmax; top: -10vmax; background: #f7d6dc; }
.liquid span:nth-child(2) { width: 38vmax; height: 38vmax; right: -10vmax; top: 10vmax; background: #e6e7ea; animation-duration: 32s; }
.liquid span:nth-child(3) { width: 30vmax; height: 30vmax; left: 30vw; bottom: -14vmax; background: #fbe4e8; animation-duration: 38s; }
@keyframes drift { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(6vmax, 4vmax, 0) scale(1.12); } }

/* ---------- Glass ---------- */
.glass {
  position: relative;
  background: linear-gradient(145deg, var(--glass-strong), var(--glass));
  backdrop-filter: blur(22px) saturate(160%);
  -webkit-backdrop-filter: blur(22px) saturate(160%);
  border: 1px solid var(--glass-edge);
  border-radius: var(--radius);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,0.95), inset 0 -1px 0 rgba(13,20,32,0.04);
}
.glass::before { /* specular rim */
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  background: linear-gradient(180deg, rgba(255,255,255,0.7), rgba(255,255,255,0) 38%);
  mask: linear-gradient(#000, #000) content-box, linear-gradient(#000, #000); -webkit-mask-composite: xor; mask-composite: exclude;
  padding: 1px;
}

/* ---------- Nav ---------- */
.nav { position: sticky; top: 14px; z-index: 10; margin: 14px auto 0; max-width: 1120px; width: calc(100% - 32px);
  display: flex; align-items: center; justify-content: space-between; padding: 10px 14px 10px 12px; border-radius: 18px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand img { width: 34px; height: 34px; border-radius: 10px; box-shadow: 0 2px 8px rgba(13,20,32,.25); }
.brand b { font-family: "Space Grotesk", Inter, sans-serif; letter-spacing: 0.14em; font-size: 15px; }
.brand small { color: var(--ink-3); font-weight: 600; letter-spacing: 0.1em; font-size: 12px; }
.nav-links { display: flex; gap: 8px; align-items: center; }

.btn { appearance: none; border: 0; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center;
  gap: 8px; font: 600 14px/1 Inter, sans-serif; padding: 12px 18px; border-radius: 14px; transition: transform .15s ease, box-shadow .2s ease, background .2s ease; }
.btn:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(200,16,46,.45); outline-offset: 2px; }
.btn-primary { color: #fff; background: linear-gradient(180deg, #d8183a, #a50d27);
  box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 8px 20px -8px rgba(13,20,32,.55); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 14px 26px -10px rgba(13,20,32,.6); }
.btn-ghost { color: var(--ink); background: rgba(255,255,255,.6); border: 1px solid rgba(13,20,32,.08); }
.btn-ghost:hover { background: #fff; }
.btn[disabled] { opacity: .55; cursor: not-allowed; transform: none; }

/* ---------- Hero ---------- */
main { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; min-height: calc(100vh - 120px); padding: 40px 0 56px; }
.eyebrow { display: inline-flex; gap: 8px; align-items: center; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-2); padding: 7px 12px; border-radius: 999px; }
.eyebrow i { width: 7px; height: 7px; border-radius: 50%; background: var(--cyan); box-shadow: 0 0 0 4px rgba(200,16,46,.18); }
h1 { font-family: "Space Grotesk", Inter, sans-serif; font-size: clamp(44px, 7vw, 84px); line-height: .98; letter-spacing: -0.02em; margin: 18px 0 18px; }
h1 .sheen { background: linear-gradient(100deg, #0d1420 0%, #4b5a70 30%, #0d1420 45%, #6c7c93 60%, #0d1420 80%);
  background-size: 250% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: sheen 9s linear infinite; }
@keyframes sheen { from { background-position: 100% 0; } to { background-position: -150% 0; } }
.lede { font-size: 19px; line-height: 1.55; color: var(--ink-2); max-width: 34ch; margin: 0 0 26px; }
.cta { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---------- 3D logo stage ---------- */
.stage { perspective: 1200px; display: grid; place-items: center; }
.orb { position: relative; width: min(440px, 80vw); aspect-ratio: 1; border-radius: 50%;
  transform-style: preserve-3d; transform: rotateX(var(--rx, 0deg)) rotateY(var(--ry, 0deg));
  transition: transform .25s cubic-bezier(.2,.7,.2,1); animation: float 7s ease-in-out infinite; }
@keyframes float { 0%,100% { translate: 0 0; } 50% { translate: 0 -14px; } }
.orb-glass { position: absolute; inset: 0; border-radius: 50%;
  background: radial-gradient(60% 60% at 32% 26%, rgba(255,255,255,.95), rgba(255,255,255,.35) 42%, rgba(220,232,244,.25) 70%, rgba(180,196,214,.35) 100%);
  border: 1px solid rgba(255,255,255,.95);
  box-shadow: 0 50px 80px -40px rgba(13,20,32,.45), 0 20px 40px -20px rgba(200,16,46,.25), inset 0 -18px 40px rgba(120,140,165,.25), inset 0 10px 30px rgba(255,255,255,.9);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.orb-coin { position: absolute; inset: 15%; border-radius: 50%; overflow: hidden; transform: translateZ(60px);
  box-shadow: 0 26px 50px -18px rgba(13,20,32,.6), 0 0 0 1px rgba(255,255,255,.6), 0 0 0 6px rgba(185,194,207,.55), 0 0 0 7px rgba(255,255,255,.8); }
.orb-coin img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.04); }
.orb-coin::after { /* moving specular sweep across the metal */
  content: ""; position: absolute; inset: -40%; background: linear-gradient(115deg, transparent 40%, rgba(255,255,255,.55) 50%, transparent 60%);
  transform: translateX(-60%); animation: sweep 6s ease-in-out infinite; mix-blend-mode: screen; }
@keyframes sweep { 0%, 55% { transform: translateX(-60%); } 85%, 100% { transform: translateX(60%); } }
.orb-eye { position: absolute; width: 4.5%; aspect-ratio: 1; left: 49.1%; top: 44.4%; border-radius: 50%; transform: translateZ(61px);
  background: radial-gradient(circle, #9ff3ff 0%, #21d4fd 45%, transparent 70%); filter: blur(1px); animation: pulse 3.2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: .35; scale: 1; } 50% { opacity: 1; scale: 1.8; } }
.orb-ring { position: absolute; inset: -6%; border-radius: 50%; border: 1px solid rgba(13,20,32,.06); transform: translateZ(-30px) rotateX(72deg);
  box-shadow: 0 0 0 10px rgba(255,255,255,.25); animation: spin 18s linear infinite; }
.orb-ring::after { content: ""; position: absolute; width: 10px; height: 10px; border-radius: 50%; top: -5px; left: calc(50% - 5px);
  background: var(--cyan); box-shadow: 0 0 14px 4px rgba(200,16,46,.5); }
@keyframes spin { to { transform: translateZ(-30px) rotateX(72deg) rotateZ(360deg); } }
.orb-shadow { position: absolute; bottom: -9%; left: 18%; right: 18%; height: 8%; border-radius: 50%; background: rgba(13,20,32,.22); filter: blur(18px);
  transform: translateZ(-80px); animation: shadow 7s ease-in-out infinite; }
@keyframes shadow { 0%,100% { opacity: .9; scale: 1; } 50% { opacity: .55; scale: .86; } }

/* ---------- Sections ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin: 0 0 56px; }
.card { padding: 24px; }
.card h3 { margin: 0 0 8px; font-family: "Space Grotesk", Inter, sans-serif; font-size: 18px; }
.card p { margin: 0; color: var(--ink-2); line-height: 1.55; }
.label { display: inline-block; font: 700 11px/1 Inter, sans-serif; letter-spacing: .1em; padding: 5px 8px; border-radius: 8px; margin-bottom: 12px; }
.label-real { background: rgba(21,122,74,.12); color: var(--ok); }
.label-demo { background: rgba(200,16,46,.14); color: var(--cyan-deep); }
.label-nd { background: rgba(13,20,32,.08); color: var(--ink-2); }

.perimeter { padding: 22px 24px; margin: 0 0 40px; color: var(--ink-2); line-height: 1.6; font-size: 14px; }
footer { max-width: 1120px; margin: 0 auto; padding: 28px 16px 40px; color: var(--ink-3); font-size: 13px; line-height: 1.6;
  border-top: 1px solid rgba(13,20,32,.08); display: flex; gap: 16px; justify-content: space-between; flex-wrap: wrap; }

/* ---------- Forms / auth ---------- */
.auth-wrap { min-height: calc(100vh - 160px); display: grid; place-items: center; padding: 40px 0; }
.auth { width: min(440px, 100%); padding: 32px 28px; }
.auth h2, .panel h2 { font-family: "Space Grotesk", Inter, sans-serif; margin: 0 0 6px; font-size: 26px; }
.auth p.sub { margin: 0 0 22px; color: var(--ink-2); }
label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 14px 0 6px; }
input, select, textarea { width: 100%; font: 15px/1.4 Inter, sans-serif; color: var(--ink); padding: 12px 14px; border-radius: 12px;
  border: 1px solid rgba(13,20,32,.12); background: rgba(255,255,255,.85); box-shadow: inset 0 1px 2px rgba(13,20,32,.05); }
textarea { min-height: 120px; font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.row { display: flex; gap: 10px; align-items: center; justify-content: space-between; margin-top: 18px; flex-wrap: wrap; }
.full { width: 100%; }
.msg { margin-top: 14px; padding: 12px 14px; border-radius: 12px; font-size: 14px; display: none; }
.msg.show { display: block; }
.msg.err { background: rgba(180,35,47,.08); color: var(--danger); border: 1px solid rgba(180,35,47,.2); }
.msg.ok { background: rgba(21,122,74,.08); color: var(--ok); border: 1px solid rgba(21,122,74,.2); }
.muted { color: var(--ink-3); font-size: 13px; }
a { color: var(--cyan-deep); }
.divider { display: flex; align-items: center; gap: 10px; color: var(--ink-3); font-size: 12px; margin: 22px 0 6px; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: rgba(13,20,32,.1); }
.cf-turnstile { margin-top: 16px; min-height: 65px; }

/* ---------- App ---------- */
.dash { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; padding: 32px 0 56px; }
.panel { padding: 24px; }
.panel.wide { grid-column: 1 / -1; }
.kv { display: grid; grid-template-columns: 160px 1fr; gap: 8px 14px; font-size: 14px; margin-top: 12px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; }
table { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 10px; }
th, td { text-align: left; padding: 10px 6px; border-bottom: 1px solid rgba(13,20,32,.07); }
th { color: var(--ink-3); font-weight: 600; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 24px; min-height: 0; padding-top: 28px; }
  .stage { order: -1; }
  .orb { width: min(320px, 78vw); }
  .cards, .dash { grid-template-columns: 1fr; }
  .nav-links .hide-sm { display: none; }
  .kv { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

.mt { margin-top: 18px; }
.row.mt-sm { margin-top: 6px; }
.row.start { justify-content: flex-start; }

/* ---------- Front page: logo + Register / Log in only ---------- */
body.front { display: flex; flex-direction: column; min-height: 100vh; }
body.front main { flex: 1; display: grid; place-items: center; width: 100%; }
.front-hero { display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 48px 0 32px; text-align: center; }
.front-hero .orb { width: min(400px, 74vw); }
.wordmark { font-size: clamp(30px, 5vw, 48px); letter-spacing: 0.22em; margin: 10px 0 0; }
.btn-lg { padding: 15px 30px; font-size: 16px; border-radius: 16px; min-width: 150px; }
body.front footer { width: 100%; justify-content: center; text-align: center; }

/* ---------- App shell ---------- */
.navlink { color: var(--ink-2); text-decoration: none; font-weight: 600; font-size: 14px; padding: 10px 12px; border-radius: 12px; }
.navlink:hover { background: rgba(255,255,255,.7); color: var(--ink); }
.navlink.on { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(13,20,32,.08); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; padding: 30px 0 14px; }
.page-head h2 { font-family: "Space Grotesk", Inter, sans-serif; font-size: 30px; margin: 0; }
.panel h3 { font-family: "Space Grotesk", Inter, sans-serif; margin: 0 0 10px; font-size: 18px; display: flex; gap: 10px; align-items: center; }
.panel h3 .label { margin: 0; }
.tabs { display: flex; gap: 6px; padding: 5px; border-radius: 14px; background: rgba(255,255,255,.55); border: 1px solid rgba(255,255,255,.9); }
.tab { appearance: none; border: 0; background: transparent; font: 600 14px Inter, sans-serif; color: var(--ink-2); padding: 9px 14px; border-radius: 10px; cursor: pointer; }
.tab.on { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(13,20,32,.1); }
.grid td a { color: var(--ink); font-weight: 600; text-decoration: none; }
.grid td a:hover { color: var(--cyan-deep); }
.num { text-align: right; font-variant-numeric: tabular-nums; }
.small { font-size: 12px; }
.tag { font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.big { font-family: "Space Grotesk", Inter, sans-serif; font-size: 34px; margin: 4px 0; font-variant-numeric: tabular-nums; }
.book { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.book tbody td:first-child { font-variant-numeric: tabular-nums; }
.ticket { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) auto auto; gap: 14px; align-items: end; }
.ticket label { margin-top: 0; }
.ticket-sum { display: flex; flex-direction: column; gap: 4px; padding-bottom: 10px; }
.ticket-sum b { font-variant-numeric: tabular-nums; font-size: 18px; }
.confirm { margin-top: 16px; padding: 18px; }
.confirm p { margin: 0; line-height: 1.5; }
body.in-app .nav-links { flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 860px) {
  .ticket { grid-template-columns: 1fr 1fr; }
  .book { grid-template-columns: 1fr; }
  .grid th:nth-child(4), .grid td:nth-child(4), .grid th:nth-child(5), .grid td:nth-child(5) { display: none; }
  body.in-app .nav { position: static; }
}

/* =================== Trading app v2 =================== */
:root { --yes: #0f8a5f; --yes-bg: rgba(15,138,95,.10); --no: #4a4f57; --no-bg: rgba(74,79,87,.10); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 12.5px; }
body.in-app main { max-width: 1240px; }
body.in-app .nav { max-width: 1240px; }

/* pills */
.pill { display: inline-flex; align-items: center; gap: 5px; font: 700 10.5px/1 Inter, sans-serif; letter-spacing: .06em; padding: 5px 8px; border-radius: 999px; white-space: nowrap; }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-live { color: var(--yes); background: var(--yes-bg); }
.pill-live::before { animation: pulse 2s ease-in-out infinite; }
.pill-watching { color: #8a5a00; background: rgba(214,160,40,.16); }
.pill-training { color: #3a55a8; background: rgba(70,110,220,.12); }
.pill-off { color: var(--ink-2); background: rgba(13,20,32,.07); }

/* discover header */
.disc-head { align-items: center; }
.disc-head p { margin: 4px 0 0; }
.search { display: flex; align-items: center; border-radius: 14px; padding: 2px; min-width: min(380px, 100%); position: relative; }
.search .search-ico { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.search input { border: 0; background: transparent; box-shadow: none; padding: 12px 14px 12px 38px; font-size: 15px; }

/* agent strip */
.strip-wrap { margin: 6px 0 18px; }
.strip-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.strip-head h3 { margin: 0; font: 600 16px "Space Grotesk", Inter, sans-serif; }
.strip-head a { margin-left: auto; }
.strip { display: flex; gap: 12px; overflow-x: auto; padding: 4px 2px 10px; scroll-snap-type: x mandatory; }
.agent-mini, .pick { flex: 0 0 auto; scroll-snap-align: start; display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 18px; text-decoration: none; color: var(--ink); min-width: 230px; }
.agent-mini div { display: flex; flex-direction: column; gap: 3px; }
.agent-mini b { font-size: 14px; }
.agent-mini .pill { align-self: flex-start; }
.mini-cov { margin-left: auto; align-self: flex-end; }
.pick { flex-direction: column; align-items: flex-start; max-width: 280px; gap: 6px; }
.avatar { flex: 0 0 auto; border-radius: 12px; box-shadow: 0 2px 8px rgba(13,20,32,.12); }

/* chips and sorts */
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin: 4px 0 10px; }
.chips.sub { margin-top: -2px; }
.chip { appearance: none; border: 1px solid rgba(13,20,32,.08); background: rgba(255,255,255,.65); color: var(--ink-2); font: 600 13.5px Inter, sans-serif;
  padding: 8px 14px; border-radius: 999px; cursor: pointer; display: inline-flex; gap: 7px; align-items: center; transition: background .15s, color .15s, box-shadow .15s; }
.chip:hover { background: #fff; color: var(--ink); }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); box-shadow: 0 6px 16px -8px rgba(13,20,32,.6); }
.chip-n { font-size: 11px; opacity: .65; font-variant-numeric: tabular-nums; }
.sorts { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(255,255,255,.55); border: 1px solid rgba(255,255,255,.9); margin: 2px 0 16px; }
.sorts button { appearance: none; border: 0; background: transparent; font: 600 13px Inter, sans-serif; color: var(--ink-2); padding: 8px 12px; border-radius: 9px; cursor: pointer; }
.sorts button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 4px rgba(13,20,32,.1); }
.sorts.mini { margin: 0; }

/* market cards */
.mgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.mcard { padding: 16px 16px 12px; border-radius: 20px; display: flex; flex-direction: column; gap: 8px; cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; min-height: 270px; }
.mcard:hover, .mcard:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow), 0 24px 40px -24px rgba(200,16,46,.35); outline: none; }
.mcard.skel { cursor: default; background: linear-gradient(100deg, rgba(255,255,255,.5) 30%, rgba(255,255,255,.85) 50%, rgba(255,255,255,.5) 70%); background-size: 300% 100%; animation: skel 1.4s linear infinite; }
@keyframes skel { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.mcard-top { display: flex; justify-content: space-between; align-items: center; }
.cat-tag { font: 700 10.5px Inter, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--cyan-deep); }
.mcard-title { margin: 0; font: 600 16px/1.3 "Space Grotesk", Inter, sans-serif; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mcard-label { margin: -2px 0 0; color: var(--ink-2); font-size: 13.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mcard-prob { display: flex; align-items: baseline; gap: 6px; }
.mcard-prob b { font: 700 30px/1 "Space Grotesk", Inter, sans-serif; font-variant-numeric: tabular-nums; }
.chg { font: 700 12px Inter, sans-serif; margin-left: auto; font-variant-numeric: tabular-nums; }
.chg.up { color: var(--yes); }
.chg.down { color: var(--no); }
.prob-bar { height: 6px; border-radius: 999px; background: var(--no-bg); overflow: hidden; }
.prob-fill { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, #36c79a, var(--yes)); transition: width .4s ease; }
.card-spark { height: 36px; }
.spark-line { fill: none; stroke-width: 1.8; vector-effect: non-scaling-stroke; }
.spark-line.up { stroke: var(--yes); }
.spark-line.down { stroke: var(--no); }
.spark-fill.up { fill: rgba(15,138,95,.08); }
.spark-fill.down { fill: rgba(194,65,59,.07); }
.spark-empty { stroke: rgba(13,20,32,.12); stroke-dasharray: 3 4; vector-effect: non-scaling-stroke; }
.yn { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 2px; }
.yn-btn { appearance: none; border: 0; cursor: pointer; display: flex; justify-content: space-between; align-items: center; padding: 11px 14px; border-radius: 13px; font: 600 14px Inter, sans-serif; transition: transform .12s ease, filter .12s ease; }
.yn-btn b { font-variant-numeric: tabular-nums; }
.yn-btn.yes { color: var(--yes); background: var(--yes-bg); }
.yn-btn.no { color: var(--no); background: var(--no-bg); }
.yn-btn:hover { filter: saturate(1.3) brightness(.97); transform: translateY(-1px); }
.mcard-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding-top: 8px; border-top: 1px solid rgba(13,20,32,.06); margin-top: auto; }
.agent-chip { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; min-width: 0; }
.agent-chip .avatar { border-radius: 6px; box-shadow: none; }
.agent-chip .pill { padding: 3px 6px; font-size: 9.5px; }
.empty { padding: 28px; text-align: center; color: var(--ink-2); grid-column: 1 / -1; border-radius: 18px; }
.foot-note { margin: 18px 0 40px; }

/* market page */
.m-head { padding: 26px 0 16px; }
.crumbs { margin: 0 0 8px; color: var(--ink-3); }
.crumbs a { color: var(--cyan-deep); text-decoration: none; font-weight: 600; }
.m-head h2 { font: 700 clamp(24px, 3.2vw, 34px)/1.15 "Space Grotesk", Inter, sans-serif; margin: 0; max-width: 30ch; }
.m-sub { margin: 6px 0 0; color: var(--ink-2); font-size: 16px; }
.m-prob { display: flex; align-items: baseline; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.m-prob b { font: 700 46px/1 "Space Grotesk", Inter, sans-serif; font-variant-numeric: tabular-nums; }
.m-prob .chg { margin-left: 4px; }
.m-layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 18px; align-items: start; padding-bottom: 48px; }
.m-main { display: flex; flex-direction: column; gap: 18px; }
.m-side { display: flex; flex-direction: column; gap: 18px; position: sticky; top: 88px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; }
.panel-head h3 { margin: 0; }
.chart-box { position: relative; }
.chart { width: 100%; height: auto; display: block; touch-action: none; }
.grid-line { stroke: rgba(13,20,32,.06); }
.axis { font: 11px Inter, sans-serif; fill: var(--ink-3); }
.chart-line { fill: none; stroke: var(--cyan-deep); stroke-width: 2.2; stroke-linejoin: round; }
.chart-fill { fill: rgba(200,16,46,.08); }
.chart-dot { fill: #fff; stroke: var(--cyan-deep); stroke-width: 2.5; }
.chart-tip { position: absolute; top: 4px; transform: translateX(-50%); background: var(--ink); color: #fff; font: 600 12px Inter, sans-serif; padding: 5px 9px; border-radius: 8px; pointer-events: none; white-space: nowrap; }
.chart-empty { padding: 40px 0; text-align: center; }
.book table { margin-top: 0; }
.depth-cell { width: 40%; padding-left: 0; }
.depth { display: block; height: 14px; border-radius: 4px; }
.depth.ask { background: var(--yes-bg); box-shadow: inset 0 0 0 1px rgba(15,138,95,.18); }
.depth.bid { background: var(--no-bg); box-shadow: inset 0 0 0 1px rgba(194,65,59,.16); }
.kv.tight { grid-template-columns: 150px 1fr; gap: 7px 12px; }
.related { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.rel { display: flex; justify-content: space-between; gap: 10px; padding: 10px 12px; border-radius: 12px; background: rgba(255,255,255,.6); text-decoration: none; color: var(--ink); font-size: 14px; border: 1px solid rgba(13,20,32,.05); }
.rel:hover { background: #fff; }
.rel b { font-variant-numeric: tabular-nums; }
.side-toggle { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 6px 0 4px; }
.side-toggle button { appearance: none; border: 2px solid transparent; cursor: pointer; padding: 14px; border-radius: 14px; font: 700 15px Inter, sans-serif; display: flex; justify-content: space-between; }
.side-toggle .yes { color: var(--yes); background: var(--yes-bg); }
.side-toggle .no { color: var(--no); background: var(--no-bg); }
.side-toggle .yes.on { border-color: var(--yes); background: #fff; }
.side-toggle .no.on { border-color: var(--no); background: #fff; }
.amt { display: flex; align-items: center; gap: 6px; border: 1px solid rgba(13,20,32,.12); border-radius: 12px; background: rgba(255,255,255,.85); padding: 0 12px; }
.amt span { font: 600 20px "Space Grotesk", Inter, sans-serif; color: var(--ink-3); }
.amt input { border: 0; box-shadow: none; background: transparent; font: 600 22px "Space Grotesk", Inter, sans-serif; padding: 10px 0; }
.sum { margin: 14px 0; }
.sum dd { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
.ticket2 .confirm { margin-top: 12px; padding: 14px; border-radius: 14px; background: rgba(255,255,255,.75); }
.msg.note { display: block; background: rgba(13,20,32,.04); color: var(--ink-2); border: 1px solid rgba(13,20,32,.08); }
.agent-card .agent-head { display: flex; gap: 12px; align-items: center; margin-bottom: 8px; }
.agent-card .agent-head h3 { margin: 0; }
.agent-card .agent-head p { margin: 2px 0 0; }
.agent-card .agent-head .pill { margin-left: auto; }
.watching { margin-top: 12px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.6); }
.watching p { margin: 4px 0 0; font-size: 14px; line-height: 1.5; color: var(--ink-2); }

/* agents board */
.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 4px 0 18px; }
.stat { padding: 16px 18px; border-radius: 18px; display: flex; align-items: center; gap: 12px; }
.stat b { font: 700 30px "Space Grotesk", Inter, sans-serif; }
.board { display: flex; flex-direction: column; gap: 10px; }
.agent-row { display: grid; grid-template-columns: 26px 44px minmax(160px, 1.3fr) repeat(4, minmax(110px, 1fr)) auto; gap: 14px; align-items: center; padding: 12px 16px; border-radius: 18px; cursor: pointer; }
.agent-row.skel { height: 70px; }
.agent-row .rank { font: 700 14px "Space Grotesk", Inter, sans-serif; color: var(--ink-3); text-align: center; }
.agent-id { min-width: 0; }
.agent-id h3 { margin: 0; font: 600 16px "Space Grotesk", Inter, sans-serif; }
.agent-id p { margin: 2px 0 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11.5px; }
.agent-cell { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.agent-more { display: none; grid-template-columns: 1fr 1fr; gap: 20px; padding: 14px 20px 6px 96px; }
.agent-wrap.open .agent-more { display: grid; }
.agent-more p { margin: 6px 0; line-height: 1.5; }
.toplist { list-style: none; padding: 0; margin: 6px 0; display: flex; flex-direction: column; gap: 6px; }
.toplist li { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; }
.toplist a { color: var(--ink); text-decoration: none; }

/* market favorite vs agent call */
.type-tag { font: 700 10px Inter, sans-serif; letter-spacing: .06em; text-transform: uppercase; padding: 4px 7px; border-radius: 6px; max-width: 60%; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.type-tag.data { color: #8a0b21; background: rgba(200,16,46,.12); }
.type-tag.event { color: #7a4a00; background: rgba(214,160,40,.16); }
.mcard .cat-tag { margin: 0; font-size: 10px; color: var(--ink-3); }
.when { white-space: nowrap; }
.fav { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 12px; background: rgba(255,255,255,.55); border: 1px solid rgba(13,20,32,.05); }
.fav-k { font: 700 9.5px Inter, sans-serif; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.fav-row { display: flex; align-items: baseline; gap: 8px; }
.fav-out { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fav-side { font-size: 11px; padding: 2px 6px; border-radius: 5px; }
.fav-side.yes { color: var(--yes); background: var(--yes-bg); }
.fav-side.no { color: var(--no); background: var(--no-bg); }
.fav-p { font: 700 24px/1 "Space Grotesk", Inter, sans-serif; font-variant-numeric: tabular-nums; }
.prob-fill.no { background: linear-gradient(90deg, #9aa0a8, var(--no)); }
.agent-foot { flex-direction: column; align-items: flex-start; gap: 5px; }
.agent-call b { font-weight: 600; }
.loading-banner { padding: 10px 14px; border-radius: 12px; font-size: 14px; color: var(--ink-2); margin: 0 0 14px; }

/* live feeds */
.pill-stale { color: var(--no); background: var(--no-bg); }
.pill-polling { color: var(--ink-2); background: rgba(13,20,32,.07); }
.panel h3 .pill { font-size: 9.5px; padding: 4px 7px; }
.spot-line { color: var(--ink-2); font-weight: 600; font-variant-numeric: tabular-nums; min-height: 16px; }
.spot-line.stale { color: var(--no); }
.spot-row { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.spot-px { font: 700 30px "Space Grotesk", Inter, sans-serif; font-variant-numeric: tabular-nums; }
.spot-row .chg { margin-left: 0; }
tr.stale td { color: var(--no); }
.score { display: flex; flex-direction: column; gap: 8px; }
.score-team { display: flex; justify-content: space-between; font-size: 18px; padding: 8px 12px; background: rgba(255,255,255,.6); border-radius: 12px; }
.score-team b { font: 700 22px "Space Grotesk", Inter, sans-serif; }

/* advisor picks */
.pick { min-width: 260px; max-width: 300px; }
.pick-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; width: 100%; }
.pick-action { font: 700 15px "Space Grotesk", Inter, sans-serif; margin: 0; }
.pick-nobet .pick-action { color: var(--ink-2); }
.pick-bet .pick-action { color: var(--yes); }
.pick-title { font-size: 13.5px; font-weight: 600; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.advisor-view p { margin: 4px 0; }
.advisor-nodes { margin: 24px 0 8px; }
.adv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.adv-node { padding: 14px 16px; border-radius: 16px; }
.adv-node p { margin: 4px 0; }
.ledger-line { padding: 8px 10px; border-radius: 10px; background: rgba(255,255,255,.65); border: 1px solid rgba(13,20,32,.06); font-weight: 600; }
.trades { font-size: 12px; margin-top: 6px; }
.trades th, .trades td { padding: 5px 4px; }

/* api page */
.code { background: #0d1420; color: #dfe7f2; border-radius: 12px; padding: 12px 14px; font: 12.5px/1.55 ui-monospace, Consolas, monospace; overflow-x: auto; white-space: pre; }
.newkey { margin-top: 12px; padding: 14px; border-radius: 14px; background: rgba(200,16,46,.08); border: 1px solid rgba(200,16,46,.25); }
.keyval { display: block; word-break: break-all; padding: 10px; background: #fff; border-radius: 10px; margin: 6px 0 10px; }
#k-form input { flex: 1; min-width: 180px; }

@media (max-width: 1000px) {
  .m-layout { grid-template-columns: 1fr; }
  .m-side { position: static; }
  .agent-row { grid-template-columns: 44px 1fr auto; }
  .agent-row .rank, .agent-row .agent-cell { display: none; }
  .agent-more { grid-template-columns: 1fr; padding-left: 16px; }
  .stats { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  body.in-app .nav { flex-wrap: wrap; gap: 8px; }
  body.in-app .nav-links { width: 100%; flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; padding-bottom: 2px; }
  body.in-app .nav-links > * { flex: 0 0 auto; }
  .chips { flex-wrap: nowrap; overflow-x: auto; padding-bottom: 4px; }
  .chip { flex: 0 0 auto; }
  body.in-app .nav-links .navlink { padding: 8px; font-size: 13px; }
  .mgrid { grid-template-columns: 1fr; }
  .book { grid-template-columns: 1fr; }
}

.stale-row { color: var(--no); }

.pane { margin-top: 6px; }
textarea.plain { font-family: Inter, system-ui, sans-serif; font-size: 14px; min-height: 80px; }
.auth .tabs { margin: 4px 0 2px; }
.panel.narrow { max-width: 560px; }

/* membership */
.paywall { max-width: 620px; margin: 48px auto; text-align: center; display: flex; flex-direction: column; gap: 12px; align-items: center; }
.paywall h2 { font-family: "Space Grotesk", Inter, sans-serif; margin: 0; }
.plan-terms { font: 600 18px "Space Grotesk", Inter, sans-serif; margin: 6px 0 10px; }

/* stats */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { flex-direction: column; align-items: flex-start; gap: 2px; }
.tile b { font-size: 26px; }
.statbars { width: 100%; height: auto; display: block; }
.statbars .bar { fill: rgba(200,16,46,.35); }
.statbars .bar.today { fill: var(--cyan-deep); }
.visit-badge { margin-left: 6px; font: 700 10px Inter, sans-serif; padding: 2px 6px; border-radius: 999px; background: rgba(200,16,46,.15); color: var(--cyan-deep); }

/* ---------- Member documents / clickwrap ---------- */
.clickwrap { border: 1px solid rgba(13,20,32,.1); border-radius: 14px; padding: 14px 16px 10px; margin: 14px 0; background: rgba(255,255,255,.55); }
.clickwrap legend { font-weight: 700; padding: 0 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; color: var(--ink); margin: 10px 0; line-height: 1.45; cursor: pointer; }
.check input { width: 18px; height: 18px; flex: 0 0 auto; margin-top: 2px; padding: 0; }
.check.agree { font-weight: 700; }
.draft-banner { background: rgba(214,140,20,.12); color: #8a5a00; border: 1px solid rgba(214,140,20,.35); border-radius: 10px; padding: 8px 12px; font-weight: 700; font-size: 13px; }
.legal { max-width: 760px; margin: 0 auto; line-height: 1.6; }
.legal h3 { margin-top: 22px; }
.legal code { word-break: break-all; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 14px; }
@media (max-width: 640px) { .grid3 { grid-template-columns: 1fr; } }
textarea.tall { min-height: 260px; }
.label-live { background: rgba(21,122,74,.12); color: var(--ok); margin: 0 8px 0 0; }
.label-build { background: rgba(214,140,20,.14); color: #8a5a00; margin: 0 8px 0 0; }
.benefit-list { list-style: none; padding: 0; margin: 0 0 18px; }
.benefit-list li { padding: 12px 0; border-bottom: 1px solid rgba(13,20,32,.06); line-height: 1.5; }
.benefits { max-width: 760px; margin: 0 auto; }
footer .foot-links { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 8px; }
footer .foot-links a { color: var(--ink-2); }
.q-line { margin: 6px 0 2px; }
/* Phones: a fieldset defaults to min-width:min-content, which pushed the clickwrap past the screen edge. */
.clickwrap { min-width: 0; max-width: 100%; }
.clickwrap .mono, .legal code, .q-line { overflow-wrap: anywhere; word-break: break-word; }
.check span { min-width: 0; overflow-wrap: anywhere; }
/* Document and agent pages on phones */
.legal h2, .legal h3 { overflow-wrap: anywhere; }
.legal-nav { flex-wrap: wrap; justify-content: flex-end; gap: 2px; }
.legal-nav .navlink { padding: 6px 8px; font-size: 13px; }
.badges { list-style: none; padding: 0; margin: 8px 0 12px; }
.badge { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 0; border-bottom: 1px solid rgba(13,20,32,.07); }
.badge small { grid-column: 1 / -1; color: var(--ink-3); }
.badge span { font: 700 11px/1.6 Inter, sans-serif; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.badge.verified span { color: var(--ok); }
.agent-img { border-radius: 18px; display: block; margin-bottom: 12px; }
@media (max-width: 480px) { .legal-nav .navlink { font-size: 12px; padding: 5px 6px; } }

/* ---------- 3FS brand: white and crimson ---------- */
.brand img { width: 36px; height: 36px; border-radius: 50%; box-shadow: 0 2px 10px rgba(158,12,37,.25); background: #fff; }
.brand-word b { font-family: "Space Grotesk", Inter, sans-serif; font-size: 20px; letter-spacing: .14em; color: var(--ink);
  background: linear-gradient(180deg, #2b2f35, #5b616b); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.liquid { background: radial-gradient(120% 80% at 50% 0%, #ffffff 0%, #fbfbfc 50%, #f3f1f2 100%); }
.btn-primary { box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 10px 22px -10px rgba(200,16,46,.6); }
.btn-primary:hover { box-shadow: 0 1px 0 rgba(255,255,255,.25) inset, 0 14px 26px -10px rgba(200,16,46,.7); }
.btn-ghost { border-color: rgba(200,16,46,.18); }
.navlink.on { box-shadow: inset 0 -2px 0 var(--crimson), 0 1px 4px rgba(13,20,32,.08); }

/* Front page: full-bleed hero built on the motion emblem */
body.front { background: #fff; }
body.front .liquid { display: none; }
body.front main { display: block; }
.hero3 { position: relative; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 22px; padding: 0 0 28px; }
.hero-media { position: relative; width: min(100%, calc(min(80vh, 820px) * 16 / 9)); aspect-ratio: 16 / 9; margin: 0 auto; overflow: hidden; background: #fff; }
.hero3 { background: #fff; }
.hero-media::after { content: ""; position: absolute; inset: auto 0 0 0; height: 18%; background: linear-gradient(180deg, rgba(255,255,255,0), #fff); pointer-events: none; }
.hero-still, .hero-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 50% 45%; display: block; }
.hero-video { opacity: 0; transition: opacity .6s ease; }
.hero-video.on { opacity: 1; }
.hero3 .cta { justify-content: center; margin-top: -6px; position: relative; z-index: 2; }
.hero3 .btn-lg { min-width: 168px; }
body.front footer { padding-top: 8px; }
@media (max-width: 640px) {
  .hero-media { aspect-ratio: 1 / 1; max-height: none; }
  .hero-still, .hero-video { object-position: 50% 50%; }
  .hero3 .cta { flex-direction: column; width: calc(100% - 48px); }
  .hero3 .btn-lg { width: 100%; }
}
@media (prefers-reduced-motion: reduce) { .hero-video { display: none !important; } }

/* "Talk to 3FS" slot (the advisor's widget), in brand colours */
.t3fs { --t3-accent: #c8102e; --t3-ink: #16181c; --t3-bg: #ffffff; --t3-line: #ece8e9; }
.guide-slot.app .t3fs-fab { bottom: 20px; }
.guide-slot.app .t3fs-panel { bottom: 80px; }
body.front .t3fs-fab { bottom: 24px; }
body.front .t3fs-panel { bottom: 84px; }
/* Keep the "Talk to 3FS" button clear of the footer links */
body.front footer, body.in-app footer { padding-bottom: 88px; }
