/* Quarta */

:root {
  /* Warm near-black rather than blue-black, and paper-cream rather than
     white. The whole palette leans warm so nothing on the page reads as
     cold screen grey. */
  --bg: #090a08;
  --bg-2: #11120f;
  --panel: #131411;
  --panel-2: #1b1c18;
  --line: #24251f;
  --line-2: #33342c;

  --text: #f9eed3;
  /* Lifted so body copy still clears AA over the brightest part of the lit
     backdrop, not just over a panel. */
  --text-2: #bbb39f;
  /* Raised twice over: once off the reference palette, where the dimmest
     tone could not carry a 10px caption, and again for the lit backdrop. */
  --text-3: #989282;

  --up: #3dd68c;
  --up-soft: rgba(61, 214, 140, 0.12);
  --down: #ff5c7c;
  --down-soft: rgba(255, 92, 124, 0.12);
  --accent: #3dd68c;
  --accent-soft: rgba(61, 214, 140, 0.12);
  --warn: #e8c15a;

  /* Squared off. Corners this tight read as instrument panel, not app card. */
  --radius: 6px;
  --radius-sm: 4px;
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.6);

  --font: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-brand: 'Geist', ui-sans-serif, system-ui, sans-serif;
  --font-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --shell: 1180px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

[hidden] {
  display: none !important;
}

h1,
h2,
h3 {
  margin: 0;
  line-height: 1.08;
  font-weight: 500;
  letter-spacing: -0.03em;
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

button {
  font: inherit;
  color: inherit;
}

.mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 10px 0;
  z-index: 200;
}
.skip-link:focus {
  left: 0;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ------------------------------------------------------------ scrollbars */

* {
  scrollbar-width: thin;
  scrollbar-color: var(--line-2) transparent;
}
::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: var(--line-2);
  border-radius: 10px;
  border: 2px solid var(--bg);
}
::-webkit-scrollbar-thumb:hover {
  background: #3a4353;
}

/* ----------------------------------------------------------------- brand */

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* The mark takes its colour from the wordmark beside it, so the two can
   never drift apart. */
.brand-mark {
  width: 23px;
  height: 23px;
  flex: none;
  color: var(--text);
  overflow: visible;
}

.brand-word {
  font-family: var(--font-brand);
  font-weight: 500;
  font-size: 19px;
  letter-spacing: -0.04em;
}

/* --------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 38px;
  padding: 0 16px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  background: var(--panel-2);
  color: var(--text);
  font-weight: 500;
  font-size: 14px;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.08s, opacity 0.15s;
  white-space: nowrap;
}
.btn:active {
  transform: translateY(1px);
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--text);
  color: var(--bg);
  border-color: var(--text);
}
.btn-primary:hover:not(:disabled) {
  background: #fff8e6;
  border-color: #fff8e6;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line-2);
  color: var(--text);
}
.btn-ghost:hover {
  border-color: #3c4757;
  background: var(--panel);
}

.btn-lg {
  height: 44px;
  padding: 0 20px;
  font-size: 15px;
}

.btn-wallet {
  border-color: var(--line-2);
  background: var(--panel-2);
}
.btn-wallet:hover {
  border-color: var(--accent);
}
.btn-wallet.is-connected {
  border-color: var(--line-2);
}

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--panel);
  color: var(--text-2);
  cursor: pointer;
  transition: color 0.15s, border-color 0.15s;
}
.icon-btn:hover {
  color: var(--text);
  border-color: var(--line-2);
}

.ca-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 36px;
  padding: 0 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--panel);
  cursor: pointer;
  font-size: 13px;
  transition: border-color 0.15s;
}
.ca-btn:hover {
  border-color: var(--line-2);
}
.ca-label {
  color: var(--text-3);
  font-weight: 600;
  letter-spacing: 0.06em;
  font-size: 11px;
}
.ca-value {
  font-family: var(--font-mono);
  color: var(--text);
  font-weight: 600;
  max-width: 130px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.ca-btn.is-soon {
  cursor: default;
}
.ca-btn.is-soon .ca-value {
  color: var(--text-3);
  font-family: var(--font);
}

/* ------------------------------------------------------------------- nav */

.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 20px;
  height: 68px;
  padding: 0 24px;
  max-width: var(--shell);
  margin: 0 auto;
  background: rgba(9, 10, 8, 0.86);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}

.nav-links {
  display: flex;
  gap: 4px;
  margin-left: auto;
}
.nav-links a {
  padding: 8px 11px;
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s;
}
.nav-links a:hover {
  color: var(--text);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.menu-btn {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 4px;
  width: 36px;
  height: 36px;
  padding: 0 9px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--panel);
  cursor: pointer;
}
.menu-btn span {
  display: block;
  height: 2px;
  background: var(--text-2);
  border-radius: 2px;
}

/* ------------------------------------------------------------------ hero */

.hero {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 72px 24px 40px;
}

.hero-inner {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 56px;
  align-items: start;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 28px;
  padding: 0 11px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-2);
  background: var(--panel);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--text-3);
}
.dot.is-live {
  background: var(--up);
  box-shadow: 0 0 0 3px var(--up-soft);
}
.dot.is-warn {
  background: var(--warn);
  box-shadow: 0 0 0 3px rgba(228, 181, 60, 0.16);
}
.dot.is-off {
  background: var(--down);
  box-shadow: 0 0 0 3px var(--down-soft);
}

.hero h1 {
  margin: 22px 0 0;
  font-family: var(--font-brand);
  font-weight: 500;
  font-size: clamp(38px, 5.4vw, 58px);
  letter-spacing: -0.035em;
  line-height: 1.06;
}

.lede {
  margin-top: 20px;
  max-width: 50ch;
  color: var(--text-2);
  font-size: 17px;
}

.hero-actions {
  display: flex;
  gap: 12px;
  margin-top: 28px;
  flex-wrap: wrap;
}

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  margin: 44px 0 0;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
}
.hero-stats div {
  min-width: 0;
  padding: 14px 16px;
  border-right: 1px solid var(--line);
  /* A label that wraps to two lines must not push its value out of line
     with the others. */
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 78px;
}
.hero-stats div:last-child {
  border-right: 0;
}
.hero-stats dt {
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.hero-stats dd {
  margin: 7px 0 0;
  font-family: var(--font-mono);
  font-size: 18px;
  font-weight: 400;
  letter-spacing: -0.02em;
}

/* Live board */

.hero-board {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.board-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.board-head strong {
  color: var(--text);
  font-size: 17px;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.board-list {
  display: flex;
  flex-direction: column;
}
.board-row {
  display: grid;
  /* symbol, price, chart, pool split */
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 14px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  background: none;
  border-left: 0;
  border-right: 0;
  border-top: 0;
  width: 100%;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s;
}
.board-row:hover {
  background: var(--panel-2);
}
.board-sym {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}
/* A market coin: its logo over a tile in the market colour, which is what
   shows if the logo is missing or still loading. */
.coin {
  position: relative;
  flex: none;
  width: var(--coin-size, 20px);
  height: var(--coin-size, 20px);
  border-radius: 50%;
  background: var(--coin-tint, var(--line-2));
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}
.coin img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.board-sym b {
  font-size: 14.5px;
  font-weight: 600;
}
.board-px {
  font-family: var(--font-mono);
  font-size: 14.5px;
  font-weight: 600;
  text-align: right;
}
.board-px small {
  display: block;
  font-size: 11.5px;
  font-weight: 600;
}
.up-txt {
  color: var(--up);
}
.down-txt {
  color: var(--down);
}
.board-split {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 4px;
  width: 92px;
}
.split-bar {
  display: flex;
  width: 100%;
  height: 5px;
  border-radius: 3px;
  overflow: hidden;
  background: var(--down);
}
.split-bar i {
  display: block;
  background: var(--up);
}
.split-txt {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-3);
}
.board-note {
  padding: 12px 16px;
  color: var(--text-3);
  font-size: 12px;
  line-height: 1.55;
}

/* -------------------------------------------------------------- sections */

.section {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 72px 24px;
  scroll-margin-top: 80px;
}

.section-head {
  max-width: 62ch;
  margin-bottom: 40px;
}
.section-num {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 400;
  color: var(--text-2);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.section-head h2 {
  font-family: var(--font-brand);
  font-size: clamp(30px, 3.8vw, 44px);
  font-weight: 500;
}
.section-head p {
  margin-top: 14px;
  color: var(--text-2);
  font-size: 16.5px;
}

/* Timeline */

.timeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.tl-step {
  padding: 26px 22px;
  border-right: 1px solid var(--line);
  background: var(--panel);
  border-radius: var(--radius-sm);
  transition:
    scale 0.32s cubic-bezier(0.2, 0.7, 0.3, 1),
    box-shadow 0.32s ease,
    border-color 0.32s ease;
}

.tl-step:last-child {
  border-right: 0;
}
.tl-step h3 {
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.tl-step p {
  margin-top: 10px;
  color: var(--text-2);
  font-size: 14.5px;
}

.callout {
  margin-top: 28px;
  padding: 24px 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.callout h3 {
  font-size: 17px;
  font-weight: 500;
}
.callout p {
  margin-top: 10px;
  color: var(--text-2);
  max-width: 78ch;
  font-size: 15px;
}
/* The warning callout is distinguished by its heading, not by a coloured
   edge, so the section reads as one set of panels. */
.callout-warn h3 {
  color: var(--warn);
}

/* Markets */

.market-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 14px;
}
.market-card {
  display: block;
  width: 100%;
  text-align: left;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  cursor: pointer;
  transition: border-color 0.15s, transform 0.12s, background 0.15s;
}
.market-card:hover {
  background: var(--panel-2);
}
.mc-top {
  display: flex;
  align-items: center;
  gap: 10px;
}
.mc-top b {
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.mc-top span {
  color: var(--text-3);
  font-size: 12px;
  margin-left: auto;
}
.mc-px {
  margin-top: 16px;
  font-family: var(--font-mono);
  font-size: 25px;
  font-weight: 400;
  letter-spacing: -0.03em;
}
.mc-sub {
  margin-top: 7px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-3);
}
.mc-foot {
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--text-3);
}

/* Payouts */

.payout-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.formula-card,
.worked {
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.formula {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  font-family: var(--font-mono);
  font-size: 15px;
  padding: 20px;
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  border: 1px solid var(--line);
}
.f-eq {
  color: var(--text-3);
}
.f-frac {
  display: inline-flex;
  flex-direction: column;
  text-align: center;
}
.f-num {
  padding-bottom: 4px;
}
.f-den {
  border-top: 1px solid var(--text-3);
  padding-top: 4px;
}
.formula-card p {
  margin-top: 18px;
  color: var(--text-2);
  font-size: 15px;
}
.worked h3 {
  font-size: 17px;
  font-weight: 500;
}
.worked-table {
  width: 100%;
  margin-top: 16px;
  border-collapse: collapse;
  font-size: 14.5px;
}
.worked-table th {
  text-align: left;
  font-weight: 500;
  color: var(--text-2);
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.worked-table td {
  text-align: right;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}
.worked-table tr.hl th,
.worked-table tr.hl td {
  color: var(--up);
  border-bottom: 0;
}
.worked p {
  margin-top: 16px;
  color: var(--text-2);
  font-size: 15px;
}

/* Features */

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}
.feature {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  transition:
    scale 0.32s cubic-bezier(0.2, 0.7, 0.3, 1),
    box-shadow 0.32s ease,
    border-color 0.32s ease;
}

.feature h3 {
  font-size: 15.5px;
  font-weight: 500;
}
.feature p {
  margin-top: 10px;
  color: var(--text-2);
  font-size: 14.5px;
}

/* FAQ */

.faq {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
}
.faq-item {
  border-bottom: 1px solid var(--line);
}
.faq-item:last-child {
  border-bottom: 0;
}
.faq-q {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  width: 100%;
  padding: 19px 22px;
  background: none;
  border: 0;
  text-align: left;
  font-size: 15.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
  cursor: pointer;
}
.faq-q:hover {
  background: var(--panel-2);
}
.faq-q i {
  flex: none;
  width: 14px;
  height: 14px;
  position: relative;
}
.faq-q i::before,
.faq-q i::after {
  content: '';
  position: absolute;
  background: var(--text-3);
  border-radius: 2px;
  transition: transform 0.2s;
}
.faq-q i::before {
  inset: 6px 0 6px 0;
  height: 2px;
}
.faq-q i::after {
  inset: 0 6px 0 6px;
  width: 2px;
}
.faq-item.is-open .faq-q i::after {
  transform: scaleY(0);
}
.faq-a {
  padding: 0 22px 22px;
  color: var(--text-2);
  font-size: 15px;
  max-width: 82ch;
}

/* CTA + footer */

.cta {
  max-width: var(--shell);
  margin: 0 auto;
  padding: 24px 24px 90px;
  text-align: center;
}
.cta h2 {
  font-family: var(--font-brand);
  font-size: clamp(24px, 3.2vw, 34px);
  font-weight: 500;
  margin-bottom: 26px;
}

.footer {
  border-top: 1px solid var(--line);
  padding: 40px 24px;
}
.footer-brand,
.footer-note,
.footer-links {
  max-width: var(--shell);
  margin: 0 auto;
}
.footer-note {
  margin-top: 16px;
  color: var(--text-3);
  font-size: 13.5px;
  max-width: 76ch;
}
.footer-links {
  margin-top: 20px;
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 14px;
  color: var(--text-2);
}
.footer-links a:hover {
  color: var(--text);
}

/* =============================== APP =============================== */

.app {
  display: grid;
  grid-template-columns: 236px 1fr;
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px 14px;
  border-right: 1px solid var(--line);
  background: var(--bg-2);
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-brand {
  padding: 6px 8px 18px;
  border-radius: 10px;
}
.sidebar-brand:hover {
  background: var(--panel);
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.side-link {
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--text-2);
  font-size: 14.5px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.side-link:hover {
  background: var(--panel);
  color: var(--text);
}
.side-link.is-active {
  background: var(--panel-2);
  color: var(--text);
  font-weight: 600;
}
.side-link svg {
  flex: none;
  opacity: 0.85;
}

.side-foot {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.side-status {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--panel);
  font-size: 12.5px;
  color: var(--text-3);
  line-height: 1.5;
}
.side-status b {
  color: var(--text-2);
}
.side-x {
  padding: 9px 12px;
  border-radius: 9px;
  border: 1px solid var(--line);
  color: var(--text-2);
  font-size: 13.5px;
  text-align: center;
}
.side-x:hover {
  border-color: var(--line-2);
  color: var(--text);
}

.app-main {
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.app-bar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 14px;
  height: 64px;
  padding: 0 22px;
  border-bottom: 1px solid var(--line);
  background: rgba(9, 10, 8, 0.92);
  backdrop-filter: blur(12px);
}
.app-title {
  font-family: var(--font-brand);
  font-weight: 700;
  font-size: 18px;
}
.app-bar-actions {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 8px;
}
.app-menu {
  display: none;
}

.screens {
  padding: 22px;
  min-height: 0;
}
.screen {
  max-width: 1080px;
}

/* Trade screen */

.trade-head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.trade-grid {
  display: grid;
  grid-template-columns: 1.35fr 1fr;
  gap: 16px;
  align-items: start;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--panel);
  overflow: hidden;
}
.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
}
.card-head h3 {
  font-size: 14.5px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.card-body {
  padding: 18px;
}

.round-phase {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
  flex: none;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid var(--line-2);
  color: var(--text-2);
}
.round-phase.is-betting {
  color: var(--up);
  border-color: rgba(33, 192, 122, 0.4);
  background: var(--up-soft);
}
.round-phase.is-live {
  color: var(--warn);
  border-color: rgba(228, 181, 60, 0.4);
  background: rgba(228, 181, 60, 0.12);
}

.big-price {
  font-family: var(--font-mono);
  font-size: 38px;
  font-weight: 400;
  letter-spacing: -0.04em;
}
.price-meta {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  color: var(--text-3);
  font-size: 13.5px;
  flex-wrap: wrap;
}

.countdown {
  font-family: var(--font-mono);
  font-size: 32px;
  font-weight: 400;
  letter-spacing: -0.03em;
}

.pool-bar {
  margin-top: 18px;
}
.pool-legend {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  margin-bottom: 8px;
}
.pool-track {
  display: flex;
  height: 10px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--down);
}
.pool-track i {
  display: block;
  background: var(--up);
  transition: width 0.4s ease;
}
.pool-nums {
  display: flex;
  justify-content: space-between;
  margin-top: 8px;
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-3);
}

.side-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 4px;
}
.side-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 16px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.side-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}
.side-btn b {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
}
.side-btn span {
  font-family: var(--font-mono);
  font-size: 13px;
  color: var(--text-3);
}
.side-btn.up.is-active,
.side-btn.up:hover:not(:disabled) {
  border-color: var(--up);
  background: var(--up-soft);
}
.side-btn.up b {
  color: var(--up);
}
.side-btn.down.is-active,
.side-btn.down:hover:not(:disabled) {
  border-color: var(--down);
  background: var(--down-soft);
}
.side-btn.down b {
  color: var(--down);
}

.field {
  margin-top: 16px;
}
.field label {
  display: block;
  font-size: 13px;
  color: var(--text-2);
  margin-bottom: 7px;
  font-weight: 500;
}
.input-wrap {
  display: flex;
  align-items: center;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--bg-2);
  overflow: hidden;
}
.input-wrap:focus-within {
  border-color: var(--accent);
}
.input-wrap input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 17px;
  font-weight: 600;
  padding: 12px 14px;
  outline: none;
}
.input-wrap input::-webkit-outer-spin-button,
.input-wrap input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.input-wrap input[type='number'] {
  -moz-appearance: textfield;
  appearance: textfield;
}
.input-suffix {
  padding: 0 14px;
  color: var(--text-3);
  font-size: 14px;
  font-weight: 600;
}

.chips {
  display: flex;
  gap: 7px;
  margin-top: 9px;
  flex-wrap: wrap;
}
.chip {
  padding: 6px 12px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--panel-2);
  color: var(--text-2);
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
}
.chip:hover {
  border-color: var(--line-2);
  color: var(--text);
}

.quote {
  margin-top: 16px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-2);
}
.quote-row {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  padding: 3px 0;
}
.quote-row span {
  color: var(--text-2);
}
.quote-row b {
  font-family: var(--font-mono);
  font-weight: 600;
}
.quote-row.big b {
  font-size: 17px;
  color: var(--up);
}
.quote-warn {
  margin-top: 10px;
  color: var(--warn);
  font-size: 13px;
}

/* Tables */

.table-wrap {
  overflow-x: auto;
}
/* Marked so the inertia scroll does not swallow this elements own wheel. */
.table-wrap,
.select-menu,
.modal-body {
  scrollbar-width: thin;
}
table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
table.data th {
  text-align: left;
  padding: 11px 16px;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 10.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.data td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
table.data tr:last-child td {
  border-bottom: 0;
}
table.data tbody tr:hover {
  background: var(--panel-2);
}
.num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}
.tag {
  display: inline-block;
  padding: 3px 9px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 650;
}
.tag.up {
  color: var(--up);
  background: var(--up-soft);
}
.tag.down {
  color: var(--down);
  background: var(--down-soft);
}
.tag.neutral {
  color: var(--text-2);
  background: var(--panel-2);
}
.tag.win {
  color: var(--up);
  background: var(--up-soft);
}
.tag.lose {
  color: var(--down);
  background: var(--down-soft);
}

.empty {
  padding: 46px 20px;
  text-align: center;
  color: var(--text-3);
  font-size: 14.5px;
}
.empty b {
  display: block;
  color: var(--text-2);
  font-size: 16px;
  margin-bottom: 6px;
}

/* Custom select (no native popup anywhere) */

.select {
  position: relative;
}
.select-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 12px;
  min-width: 150px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  cursor: pointer;
  font-size: 14.5px;
  font-weight: 600;
}
.select-btn:hover {
  border-color: #3c4757;
}
.select-btn .caret {
  margin-left: auto;
  width: 8px;
  height: 8px;
  border-right: 2px solid var(--text-3);
  border-bottom: 2px solid var(--text-3);
  transform: rotate(45deg) translate(-2px, -2px);
}
.select-menu {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  min-width: 100%;
  z-index: 40;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  box-shadow: var(--shadow);
  max-height: 300px;
  overflow-y: auto;
}
.select-opt {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 9px 11px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--text-2);
  font-size: 14.5px;
  text-align: left;
  cursor: pointer;
}
.select-opt:hover {
  background: var(--panel);
  color: var(--text);
}
.select-opt.is-active {
  background: var(--accent-soft);
  color: var(--text);
  font-weight: 600;
}

/* Toggle */

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}
.toggle-row:last-child {
  border-bottom: 0;
}
.toggle-row p {
  color: var(--text-3);
  font-size: 13.5px;
  margin-top: 3px;
  max-width: 54ch;
}
.toggle-row strong {
  font-size: 14.5px;
  font-weight: 600;
}
.switch {
  flex: none;
  width: 46px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  position: relative;
  cursor: pointer;
  transition: background 0.18s, border-color 0.18s;
}
.switch::after {
  content: '';
  position: absolute;
  top: 3px;
  left: 3px;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--text-3);
  transition: transform 0.18s, background 0.18s;
}
.switch[aria-checked='true'] {
  background: var(--accent);
  border-color: var(--accent);
}
.switch[aria-checked='true']::after {
  transform: translateX(20px);
  background: #fff;
}

/* Banner */

.banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 14px 16px;
  margin-bottom: 16px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(228, 181, 60, 0.35);
  background: rgba(228, 181, 60, 0.09);
  font-size: 14px;
  color: var(--text-2);
}
.banner b {
  color: var(--warn);
}

/* Modal */

.modal-root {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: grid;
  place-items: center;
  padding: 20px;
}
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(4, 6, 9, 0.7);
  backdrop-filter: blur(3px);
}
.modal {
  position: relative;
  width: min(460px, 100%);
  max-height: min(84vh, 720px);
  display: flex;
  flex-direction: column;
  border-radius: var(--radius);
  border: 1px solid var(--line-2);
  background: var(--panel);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  border-bottom: 1px solid var(--line);
}
.modal-head h2 {
  font-size: 17px;
  font-weight: 650;
}
.modal-body {
  padding: 18px;
  overflow-y: auto;
}

.wallet-option {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 13px 14px;
  margin-bottom: 8px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--panel-2);
  cursor: pointer;
  font-size: 15px;
  font-weight: 600;
  text-align: left;
}
.wallet-option:hover {
  border-color: var(--accent);
}
.wallet-option img {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}
.wallet-option .fallback {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  background: var(--panel);
  display: grid;
  place-items: center;
  font-size: 12px;
  color: var(--text-3);
}

.modal-note {
  color: var(--text-3);
  font-size: 13.5px;
  margin-top: 10px;
}

.kv {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 14.5px;
}
.kv:last-of-type {
  border-bottom: 0;
}
.kv span {
  color: var(--text-2);
}
.kv b {
  font-family: var(--font-mono);
  font-weight: 600;
  text-align: right;
  word-break: break-all;
}

/* Toasts */

.toasts {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: min(360px, calc(100vw - 36px));
}
.toast {
  padding: 13px 16px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line-2);
  background: var(--panel-2);
  box-shadow: var(--shadow);
  font-size: 14px;
  animation: toast-in 0.22s ease;
}
.toast b {
  display: block;
  margin-bottom: 3px;
  font-weight: 650;
}
.toast.ok {
  border-left: 3px solid var(--up);
}
.toast.err {
  border-left: 3px solid var(--down);
}
.toast.info {
  border-left: 3px solid var(--accent);
}
.toast p {
  color: var(--text-2);
  word-break: break-word;
}
@keyframes toast-in {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

/* ---------------------------------------------------------- responsive */

@media (max-width: 1000px) {
  .hero-inner {
    grid-template-columns: 1fr;
    gap: 36px;
  }
  .timeline {
    grid-template-columns: 1fr 1fr;
  }
  .tl-step:nth-child(2) {
    border-right: 0;
  }
  .tl-step:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }
  .payout-grid {
    grid-template-columns: 1fr;
  }
  .trade-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .nav-links {
    display: none;
  }
  .nav-links.is-open {
    display: flex;
    position: absolute;
    top: 68px;
    left: 12px;
    right: 12px;
    flex-direction: column;
    padding: 8px;
    border-radius: var(--radius);
    border: 1px solid var(--line-2);
    background: var(--panel-2);
    box-shadow: var(--shadow);
  }
  .nav-links.is-open a {
    padding: 12px;
  }
  .menu-btn {
    display: flex;
  }
  .app {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 232px;
    z-index: 60;
    transform: translateX(-100%);
    transition: transform 0.22s ease;
    height: 100dvh;
  }
  .sidebar.is-open {
    transform: none;
  }
  .app-menu {
    display: flex;
  }
  .sidebar-scrim {
    position: fixed;
    inset: 0;
    z-index: 55;
    background: rgba(4, 6, 9, 0.6);
  }
}

@media (max-width: 620px) {
  .card-head {
    flex-wrap: wrap;
    row-gap: 8px;
  }
  .nav {
    padding: 0 16px;
    gap: 10px;
  }
  .nav .btn-primary {
    display: none;
  }
  .hero,
  .section,
  .cta,
  .footer {
    padding-left: 16px;
    padding-right: 16px;
  }
  .hero {
    padding-top: 44px;
  }
  .screens {
    padding: 16px;
  }
  .app-bar {
    padding: 0 16px;
    gap: 10px;
  }
  .app-bar .ca-btn {
    display: none;
  }
  .hero-stats {
    grid-template-columns: 1fr 1fr;
    gap: 16px;
  }
  .timeline {
    grid-template-columns: 1fr;
  }
  .tl-step {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
  .tl-step:last-child {
    border-bottom: 0;
  }
  .ca-value {
    max-width: 74px;
  }
  .side-buttons {
    grid-template-columns: 1fr;
  }
  .big-price {
    font-size: 32px;
  }
  .toasts {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* ------------------------------------------------------- order ticket */

.ticket-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.ticket-tabs {
  display: flex;
  gap: 18px;
  margin-right: auto;
}
.ticket-tab {
  position: relative;
  padding: 2px 0 10px;
  border: 0;
  background: none;
  color: var(--text-3);
  font-size: 16px;
  font-weight: 650;
  cursor: pointer;
}
.ticket-tab:hover {
  color: var(--text-2);
}
.ticket-tab.is-active {
  color: var(--text);
}
.ticket-tab.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
}

.ticket-ordertype .select-btn {
  height: 34px;
  min-width: 0;
  padding: 0 10px;
  border-color: transparent;
  background: none;
  color: var(--text-2);
  font-size: 14px;
}
.ticket-ordertype .select-btn:hover {
  border-color: var(--line-2);
  background: var(--panel-2);
}
.ticket-ordertype .select-menu {
  left: auto;
  right: 0;
}

.liquidity-note {
  display: flex;
  flex-direction: column;
  gap: 3px;
  margin-top: 12px;
  padding: 11px 13px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(228, 181, 60, 0.35);
  background: rgba(228, 181, 60, 0.09);
}
.liquidity-note b {
  color: var(--warn);
  font-size: 13px;
  font-weight: 650;
}
.liquidity-note p {
  color: var(--text-2);
  font-size: 13px;
  line-height: 1.5;
}

.resting {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.resting-title {
  font-size: 12.5px;
  font-weight: 650;
  color: var(--text-3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.resting-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 9px 12px;
  margin-bottom: 7px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: var(--bg-2);
  font-family: var(--font-mono);
  font-size: 13px;
}

/* The two priced sides carry the odds, so they need the room to show them. */
.side-btn span {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
}
.side-btn.up span {
  color: var(--up);
}
.side-btn.down span {
  color: var(--down);
}
.side-btn b {
  color: var(--text-3);
  font-size: 12.5px;
  letter-spacing: 0.08em;
}
.side-btn.up.is-active b,
.side-btn.down.is-active b {
  color: var(--text-2);
}

/* Price first, payout second, so the bar reads like the ticket above it. */
.pool-legend em {
  font-style: normal;
  color: var(--text-3);
  font-family: var(--font-mono);
  font-size: 12.5px;
}

/* ------------------------------------------------------- markets screen */

.markets-head {
  gap: 10px;
}

.search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1;
  min-width: 0;
  height: 40px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--line-2);
  background: var(--bg-2);
  color: var(--text-3);
}
.search:focus-within {
  border-color: var(--accent);
}
.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  background: none;
  color: var(--text);
  font: inherit;
  font-size: 14.5px;
  outline: none;
}
.search input::placeholder {
  color: var(--text-3);
}
/* The native clear button is drawn by the OS and ignores the theme. */
.search input::-webkit-search-cancel-button,
.search input::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}

table.data .board-sym {
  gap: 9px;
}
table.data .board-sym small {
  color: var(--text-3);
  font-size: 12.5px;
  font-weight: 500;
}
table.data .split-bar {
  width: 78px;
  height: 5px;
}

.board-all {
  border: 0;
  background: none;
  padding: 0;
  color: var(--accent);
  font: inherit;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.board-all:hover {
  text-decoration: underline;
}

.select-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}
.select-opt {
  gap: 9px;
}
.price-title {
  display: inline-flex;
  align-items: center;
  gap: 9px;
}
.mc-top .coin {
  margin-right: 2px;
}

/* ============================== MOTION ============================== */

/* Scroll reveals. Elements start slightly low and transparent, and the
   observer in motion.js adds .is-revealed once they come into view. The
   delay is set per child by the stagger, so a row arrives in sequence. */
[data-reveal] {
  opacity: 0;
  translate: 0 22px;
  transition:
    opacity 0.55s cubic-bezier(0.2, 0.7, 0.3, 1),
    translate 0.55s cubic-bezier(0.2, 0.7, 0.3, 1);
  transition-delay: var(--reveal-delay, 0ms);
  will-change: opacity, translate;
}
[data-reveal].is-revealed {
  opacity: 1;
  translate: none;
  will-change: auto;
}

/* Page load. The hero comes in on its own timeline rather than waiting for
   an observer that would fire immediately anyway. */
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(16px);
  }
}
.hero-copy > * {
  animation: rise 0.7s cubic-bezier(0.2, 0.7, 0.3, 1) backwards;
}
.hero-copy > *:nth-child(1) { animation-delay: 0.05s; }
.hero-copy > *:nth-child(2) { animation-delay: 0.13s; }
.hero-copy > *:nth-child(3) { animation-delay: 0.21s; }
.hero-copy > *:nth-child(4) { animation-delay: 0.29s; }
.hero-copy > *:nth-child(5) { animation-delay: 0.37s; }
.hero-board {
  animation: rise 0.8s cubic-bezier(0.2, 0.7, 0.3, 1) 0.2s backwards;
}

/* A slow drift behind the hero, so the page is never completely still. */
.hero {
  position: relative;
  isolation: isolate;
  /* The glow below bleeds past the hero on purpose. Clipping stops that bleed
     widening the page: an absolutely positioned decoration still counts
     toward the scrollable area however invisible it is. Uses clip rather than
     hidden so this never becomes a scroll container. */
  overflow: clip;
}
.hero::before {
  content: '';
  position: absolute;
  inset: -10% -20% auto;
  height: 520px;
  z-index: -1;
  background:
    radial-gradient(60% 70% at 22% 20%, rgba(249, 238, 211, 0.037), transparent 70%),
    radial-gradient(50% 60% at 78% 10%, rgba(249, 238, 211, 0.026), transparent 70%);
  animation: drift 22s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes drift {
  to {
    transform: translate3d(3%, 2%, 0) scale(1.08);
  }
}

/* The live dot breathes, so "live" is visible rather than merely stated. */
.dot.is-live {
  animation: breathe 2.4s ease-in-out infinite;
}
@keyframes breathe {
  0%, 100% { box-shadow: 0 0 0 0 var(--up-soft); }
  50% { box-shadow: 0 0 0 5px rgba(61, 214, 140, 0); }
}

/* Price flashes. Applied by motion.flash when a number moves. */
@keyframes flash-up {
  0% { background: var(--up-soft); color: var(--up); }
  100% { background: transparent; }
}
@keyframes flash-down {
  0% { background: var(--down-soft); color: var(--down); }
  100% { background: transparent; }
}
.flash-up {
  animation: flash-up 0.9s ease-out;
  border-radius: 3px;
}
.flash-down {
  animation: flash-down 0.9s ease-out;
  border-radius: 3px;
}

/* Screens fade in when the route changes. */
@keyframes screen-in {
  from {
    opacity: 0;
    transform: translateY(6px);
  }
}
.is-entering {
  animation: screen-in 0.38s cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* The countdown gets urgent in its last minute. */
.is-urgent {
  animation: urgent 1s steps(1, end) infinite;
}
@keyframes urgent {
  0%, 60% { color: var(--warn); }
  61%, 100% { color: var(--text); }
}

/* A hairline under the round countdown showing how much of the window is
   left. Driven by --progress from motion.setProgress. */
.progress {
  position: relative;
  height: 2px;
  margin-top: 10px;
  background: var(--line);
  border-radius: 2px;
  overflow: hidden;
}
.progress::after {
  content: '';
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(var(--progress, 0) * 100%);
  background: linear-gradient(90deg, var(--accent), rgba(61, 214, 140, 0.35));
  transition: width 0.9s linear;
}

/* Rows and cards lift very slightly under the cursor. */
.board-row,
.side-btn,
.wallet-option,
table.data tbody tr {
  transition:
    background 0.2s ease,
    transform 0.2s cubic-bezier(0.2, 0.7, 0.3, 1),
    border-color 0.2s ease;
}
.board-row:hover {
  transform: translateX(3px);
}
.market-card {
  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    scale 0.25s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.market-card:active {
  scale: 1.005;
}

/* The brand dial turns a quarter when the logo is hovered, which is the
   whole idea of the name. */
.brand-mark {
  transition: transform 0.55s cubic-bezier(0.3, 0.8, 0.3, 1);
}
/* 45, not 90: the mark has four-fold symmetry, so a quarter turn lands it
   exactly back on itself and the animation cannot be seen at all. Half a
   step swaps the long petals with the short ones, which reads. */
.brand:hover .brand-mark {
  transform: rotate(45deg);
}

/* The side buttons pulse once when selected, to confirm the choice. */
@keyframes pick {
  0% { transform: scale(1); }
  40% { transform: scale(1.02); }
  100% { transform: scale(1); }
}
.side-btn.is-active {
  animation: pick 0.32s cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* The FAQ chevron and the pool bar both ease rather than snap. */
.pool-track i,
.split-bar i {
  transition: width 0.7s cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* Prices that have not arrived yet shimmer rather than sitting blank. */
.loading {
  position: relative;
  overflow: hidden;
  color: transparent !important;
  border-radius: 3px;
  background: var(--panel-2);
}
.loading::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(249, 238, 211, 0.08),
    transparent
  );
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}

/* Toasts leave as well as arrive. */
@keyframes toast-out {
  to {
    opacity: 0;
    transform: translateY(6px) scale(0.98);
  }
}
.toast.is-leaving {
  animation: toast-out 0.3s ease forwards;
}

/* Modals. */
@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
}
@keyframes backdrop-in {
  from {
    opacity: 0;
  }
}
.modal {
  animation: modal-in 0.28s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.modal-backdrop {
  animation: backdrop-in 0.22s ease;
}

/* The custom select menu drops rather than appears. */
@keyframes menu-in {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
}
.select-menu {
  animation: menu-in 0.18s cubic-bezier(0.2, 0.7, 0.3, 1);
  transform-origin: top;
}

/* Sidebar on mobile already slides; the scrim fades with it. */
@keyframes scrim-in {
  from {
    opacity: 0;
  }
}
.sidebar-scrim {
  animation: scrim-in 0.22s ease;
}

/* Nothing above should override someone asking for stillness. The blanket
   rule at the top of this file already flattens durations; these two carry
   infinite animations, so they are stopped outright. */
@media (prefers-reduced-motion: reduce) {
  .hero::before,
  .dot.is-live,
  .loading::after,
  .is-urgent {
    animation: none !important;
  }
  [data-reveal] {
    opacity: 1;
    transform: none;
  }
}

/* A feed problem in the board note is worth noticing. */
.note-trouble {
  color: var(--warn);
}

/* --------------------------------------------------------- round clock */

.board-clock {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

/* A ring that fills as the betting window runs out. The conic gradient is
   driven by --progress, the same value the hairline uses. */
.ring {
  width: 17px;
  height: 17px;
  border-radius: 50%;
  flex: none;
  background: conic-gradient(
    var(--accent) calc(var(--progress, 0) * 360deg),
    var(--line-2) 0
  );
  position: relative;
  transition: background 0.9s linear;
}
.ring::after {
  content: '';
  position: absolute;
  inset: 3px;
  border-radius: 50%;
  background: var(--panel);
}
.ring.is-urgent {
  animation: ring-pulse 1s ease-in-out infinite;
}
@keyframes ring-pulse {
  50% {
    box-shadow: 0 0 0 4px rgba(232, 193, 90, 0.18);
  }
}

@media (prefers-reduced-motion: reduce) {
  .ring.is-urgent {
    animation: none !important;
  }
}

/* With Sell gone the ticket head carries a label rather than a tab row. */
.ticket-label {
  margin-right: auto;
  font-size: 16px;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--text);
}

/* ===================== MOTION, SECOND PASS ===================== */

/* Section headings wipe up from behind a mask rather than fading. The mask
   is on a wrapper so the type itself is never mid-opacity, which keeps it
   crisp all the way through. */
.section-head h2 {
  display: block;
  overflow: hidden;
}
.section-head h2 > span {
  display: block;
  transform: translateY(102%);
  transition: transform 0.75s cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: 60ms;
}
[data-reveal].is-revealed .section-head h2 > span,
.section-head[data-reveal].is-revealed h2 > span {
  transform: none;
}

/* The eyebrow above it draws its rule out to the right. */
.section-num {
  position: relative;
  padding-bottom: 14px;
}
.section-num::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  height: 1px;
  width: 100%;
  background: linear-gradient(90deg, var(--line-2), transparent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.section-head[data-reveal].is-revealed .section-num::after {
  transform: scaleX(1);
}

/* Cards catch a soft light where the cursor is. The gradient is positioned
   from two custom properties the pointer handler writes. */
.market-card,
.feature,
.tl-step,
.card {
  position: relative;
}
.market-card::before,
.feature::before,
.tl-step::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  pointer-events: none;
  background: radial-gradient(
    220px circle at var(--mx, 50%) var(--my, 50%),
    rgba(249, 238, 211, 0.055),
    transparent 65%
  );
  transition: opacity 0.35s ease;
}
.market-card:hover::before,
.feature:hover::before,
.tl-step:hover::before {
  opacity: 1;
}

/* Nav links draw an underline in from the left. */
.nav-links a {
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  left: 11px;
  right: 11px;
  bottom: 3px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.nav-links a:hover::after {
  transform: scaleX(1);
}

/* Buttons get a sheen that crosses them once on hover. */
.btn-primary {
  position: relative;
  overflow: hidden;
}
.btn-primary::after {
  content: '';
  position: absolute;
  inset: 0;
  transform: translateX(-120%) skewX(-18deg);
  background: linear-gradient(90deg, transparent, rgba(9, 10, 8, 0.12), transparent);
}
.btn-primary:hover::after {
  animation: sheen 0.7s cubic-bezier(0.2, 0.7, 0.3, 1);
}
@keyframes sheen {
  to {
    transform: translateX(120%) skewX(-18deg);
  }
}

/* The sidebar marks the active screen with a rule that slides into place. */
.side-link {
  position: relative;
}
.side-link::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  width: 2px;
  height: 0;
  background: var(--accent);
  border-radius: 2px;
  transform: translateY(-50%);
  transition: height 0.32s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.side-link.is-active::before {
  height: 60%;
}

/* Table rows warm up one at a time under the cursor. */
table.data tbody tr:hover {
  background: var(--panel-2);
}

@media (prefers-reduced-motion: reduce) {
  .section-head h2 > span {
    transform: none;
  }
  .section-num::after {
    transform: scaleX(1);
  }
  .btn-primary:hover::after {
    animation: none;
  }
}


/* ------------------------------------------------------- card hover lift */

/* Every card-like block on the home page grows a little under the cursor and
   rises above its neighbours. One rule rather than a hover per component, so
   they cannot drift apart.

   It has to be the scale property, not transform: scale(): the scroll
   reveals animate translate, and two rules writing the same transform would
   wipe each other out depending on which happened to win. */
.tl-step,
.feature,
.market-card,
.callout,
.formula-card,
.worked,
.faq-item,
.hero-stats div {
  position: relative;
  border-radius: var(--radius-sm);
  transition:
    scale 0.3s cubic-bezier(0.2, 0.7, 0.3, 1),
    box-shadow 0.3s ease,
    border-color 0.3s ease,
    background 0.3s ease;
}

.tl-step:hover,
.feature:hover,
.market-card:hover,
.callout:hover,
.formula-card:hover,
.worked:hover,
.faq-item:hover,
.hero-stats div:hover {
  scale: 1.025;
  z-index: 2;
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.45);
}

/* The cells inside a bordered strip need their own background once they
   rise, or the strip shows through behind them. */
.tl-step:hover,
.faq-item:hover,
.hero-stats div:hover {
  background: var(--panel-2);
}

/* Panels that already sit alone need less; they have nothing to rise above. */
.callout:hover,
.formula-card:hover,
.worked:hover {
  scale: 1.012;
  border-color: var(--line-2);
}

/* A whole FAQ row scaling while open would shove the page around, so an
   opened one stays put. */
.faq-item.is-open:hover {
  scale: none;
  box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
  .tl-step:hover,
  .feature:hover,
  .market-card:hover,
  .callout:hover,
  .formula-card:hover,
  .worked:hover,
  .faq-item:hover,
  .hero-stats div:hover {
    scale: none;
  }
}

/* ======================= DEPTH AND TEXTURE ======================= */

/* The page was one flat black field from top to bottom. Three things give it
   depth without any of them being loud: a fine grid that catches the light,
   a faint warm wash behind the top of the page, and alternating section
   tones so the eye has somewhere to rest between blocks. */

body {
  background-color: var(--bg);
}

/* A warm halo behind the first screenful, fading out before the content
   starts competing with it. */
body::before {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 70vh;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(70% 90% at 15% 0%, rgba(61, 214, 140, 0.05), transparent 60%),
    radial-gradient(60% 80% at 85% 5%, rgba(249, 238, 211, 0.035), transparent 60%),
    linear-gradient(180deg, rgba(249, 238, 211, 0.018), transparent 70%);
}

/* Alternating bands. Every other section sits a shade above the page, with
   hairlines top and bottom, so the page reads as a stack of panels rather
   than an unbroken sheet. */
.section:nth-of-type(even) {
  position: relative;
}
/* Sized from the section rather than the viewport: 100vw includes the
   scrollbar, so a full-bleed band always overhangs by a few pixels. */
.section:nth-of-type(even)::before {
  content: '';
  position: absolute;
  inset: 0 -20px;
  z-index: -1;
  border-radius: var(--radius);
  background: linear-gradient(
    180deg,
    transparent,
    rgba(249, 238, 211, 0.016) 12%,
    rgba(249, 238, 211, 0.016) 88%,
    transparent
  );
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  pointer-events: none;
}

/* Panels sit on their own tone rather than inheriting the page, so the grid
   behind does not show through them and flatten the stack. */
.card,
.callout,
.feature,
.tl-step,
.market-card,
.formula-card,
.worked,
.faq,
.hero-board,
.hero-stats {
  background-color: var(--panel);
  background-image: linear-gradient(180deg, rgba(249, 238, 211, 0.014), transparent 60%);
}

/* ------------------------------------------------------------ sparklines */

.spark-host {
  display: block;
  width: 104px;
  height: 26px;
  flex: none;
}
.spark-host.spark-empty {
  /* A feed with no history yet shows a resting hairline, not a fake chart. */
  background: linear-gradient(90deg, transparent, var(--line-2), transparent);
  height: 1px;
  align-self: center;
  opacity: 0.6;
}
.spark {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}
.spark-line {
  stroke-width: 1.4;
  stroke-linejoin: round;
  stroke-linecap: round;
  vector-effect: non-scaling-stroke;
}
.spark.is-up .spark-line,
.spark.is-up .spark-dot {
  stroke: var(--up);
  fill: var(--up);
}
.spark.is-down .spark-line,
.spark.is-down .spark-dot {
  stroke: var(--down);
  fill: var(--down);
}
.spark.is-up .spark-area {
  fill: rgba(61, 214, 140, 0.11);
}
.spark.is-down .spark-area {
  fill: rgba(255, 92, 124, 0.1);
}
.spark-dot {
  stroke: none;
}

/* The market card gives its chart the full width, under the price. */
.market-card .spark-host {
  width: 100%;
  height: 34px;
  margin-top: 14px;
}

/* The board row fits one between the price and the pool split. */
.board-row .spark-host {
  width: 62px;
  height: 20px;
}

@media (max-width: 620px) {
  body {
    background-size: 52px 52px;
  }
  .board-row .spark-host {
    display: none;
  }
}

/* The chart column collapses first when the board gets narrow. */
@media (max-width: 1000px) {
  .board-row {
    grid-template-columns: 1fr auto auto;
  }
  .board-row .spark-host {
    display: none;
  }
}


/* ============================== BACKDROP ============================== */

/*
 * A fixed sheet behind every screen, so the page has somewhere to be other
 * than flat black.
 *
 * Four layers, all of them neutral. Nothing here carries a hue: in this
 * interface colour means something specific (up, down, a warning), and a
 * decorative wash that borrows those colours makes them mean less. The depth
 * comes from light and texture instead.
 *
 * It is fixed rather than scrolling, so it reads as a room the content moves
 * through rather than as wallpaper glued to the page.
 */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  pointer-events: none;
  /* Not one flat value: a slight fall from top to bottom already stops the
     page looking like a switched-off screen. */
  background:
    linear-gradient(180deg, #16180f 0%, #101208 32%, #0b0c09 70%, #080906 100%);
}

/* A fine grid, drifting by exactly one tile so the loop never shows a seam,
   and masked to fade out well before the edges. */
.bd-grid {
  position: absolute;
  inset: -80px;
  background-image:
    linear-gradient(rgba(249, 238, 211, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(249, 238, 211, 0.05) 1px, transparent 1px);
  background-size: 68px 68px;
  -webkit-mask-image: radial-gradient(120% 90% at 50% 0%, #000 20%, transparent 78%);
  mask-image: radial-gradient(120% 90% at 50% 0%, #000 20%, transparent 78%);
  animation: bd-drift 48s linear infinite;
}
@keyframes bd-drift {
  to {
    transform: translate3d(68px, 68px, 0);
  }
}

/* Three soft lights on different cycles. Because the periods do not divide
   into each other the arrangement takes minutes to repeat, which is what
   keeps it from reading as a loop. */
.bd-light {
  position: absolute;
  inset: -30%;
  background:
    radial-gradient(40% 44% at 16% 14%, rgba(249, 238, 211, 0.0975), transparent 70%),
    radial-gradient(36% 42% at 84% 24%, rgba(214, 226, 240, 0.056), transparent 68%),
    radial-gradient(48% 40% at 52% 86%, rgba(249, 238, 211, 0.045), transparent 72%);
  animation: bd-float 41s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes bd-float {
  from {
    transform: translate3d(-2%, -1%, 0) scale(1);
  }
  to {
    transform: translate3d(3%, 2.5%, 0) scale(1.12);
  }
}

/* Grain. Two jobs: it breaks up the banding that large soft gradients show
   on dark screens, and it gives the flat areas a surface. */
.bd-grain {
  position: absolute;
  inset: 0;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='160' height='160' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* Darker at the edges, so the eye settles in the middle where the content is. */
.bd-vignette {
  position: absolute;
  inset: 0;
  background: radial-gradient(135% 105% at 50% 38%, transparent 52%, rgba(0, 0, 0, 0.42) 100%);
}

@media (prefers-reduced-motion: reduce) {
  .bd-grid,
  .bd-light {
    animation: none;
  }
}

/* A wide, very soft sweep that crosses the page every minute or so. Diffuse
   lights alone are too gradual to register as movement; something with an
   edge, however soft, is what the eye actually catches. */
.bd-sweep {
  position: absolute;
  top: -40%;
  bottom: -40%;
  width: 55%;
  background: linear-gradient(
    100deg,
    transparent,
    rgba(249, 238, 211, 0.041) 42%,
    rgba(249, 238, 211, 0.053) 50%,
    rgba(249, 238, 211, 0.041) 58%,
    transparent
  );
  filter: blur(46px);
  animation: bd-sweep 34s ease-in-out infinite alternate;
  will-change: transform;
}
@keyframes bd-sweep {
  from {
    transform: translate3d(-60%, 0, 0) rotate(-6deg);
  }
  to {
    transform: translate3d(180%, 0, 0) rotate(-6deg);
  }
}

@media (prefers-reduced-motion: reduce) {
  .bd-sweep {
    animation: none;
    opacity: 0.4;
  }
}

/* ========================= SCROLL-LINKED MOTION ========================= */

/* A hairline across the very top showing how far through the page you are.
   Driven by --read from scrollfx, so it is exact rather than eased. */
.read-progress {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 60;
  pointer-events: none;
}
.read-progress::after {
  content: '';
  display: block;
  height: 100%;
  width: calc(var(--read, 0) * 100%);
  background: linear-gradient(90deg, rgba(249, 238, 211, 0.35), var(--text));
  transform-origin: left;
}

/* The chapter you are currently reading, bottom left. It stays out of the way
   until there is a chapter to name, so it never shows an empty label. */
.chapter-index {
  position: fixed;
  left: 22px;
  bottom: 20px;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px 7px 10px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(13, 14, 11, 0.72);
  backdrop-filter: blur(10px);
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-2);
  opacity: 0;
  translate: 0 10px;
  transition: opacity 0.4s ease, translate 0.4s cubic-bezier(0.2, 0.7, 0.3, 1);
  pointer-events: none;
}
.chapter-index.is-on {
  opacity: 1;
  translate: none;
}
.ci-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
  flex: none;
}

/* Parallax elements are moved by writing --py, so the property itself stays
   free for anything else that wants to animate translate. */
[data-parallax] {
  will-change: translate;
}

/* The headline arrives a line at a time, each one wiping up from behind its
   own mask so the type is never rendered at a half opacity. */
.hero-title .line {
  display: block;
  overflow: hidden;
}
.hero-title .line > span {
  display: block;
  translate: 0 104%;
  animation: line-in 0.95s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.hero-title .line:nth-child(1) > span { animation-delay: 0.1s; }
.hero-title .line:nth-child(2) > span { animation-delay: 0.22s; }
@keyframes line-in {
  to {
    translate: none;
  }
}

/* Buttons that lean toward the cursor settle back smoothly when it leaves. */
[data-magnetic] {
  transition: translate 0.35s cubic-bezier(0.2, 0.7, 0.3, 1);
}
[data-magnetic]:hover {
  transition: translate 0.08s linear;
}

/* Market cards get an arrow that slides in on hover. */
.market-card .mc-go {
  position: absolute;
  top: 18px;
  right: 18px;
  width: 13px;
  height: 13px;
  opacity: 0;
  translate: -5px 5px;
  color: var(--text-2);
  transition: opacity 0.28s ease, translate 0.28s cubic-bezier(0.2, 0.7, 0.3, 1);
}
.market-card:hover .mc-go {
  opacity: 1;
  translate: none;
}

@media (prefers-reduced-motion: reduce) {
  .hero-title .line > span {
    translate: none;
    animation: none;
  }
  .read-progress,
  .chapter-index {
    display: none;
  }
}

@media (max-width: 860px) {
  /* Not enough room beside the content, and it competes with the nav. */
  .chapter-index {
    display: none;
  }
}
