/*
 * rax — "the tape"
 * One warm-dark ground, orange brand, a muted teal as the sparing complement.
 * Native system type (matching realsports.io), bold for display. Flat: radius 0,
 * no gradients, no glow, no color-band panels — rhythm comes from hairlines,
 * type scale, and the live price-line background on the landing.
 */

:root {
    --bg: #171310;          /* warm near-black — the single page ground */
    --bg-2: #1e1a15;        /* barely-raised, for input fields only */
    --line: #2b2620;        /* hairline */
    --line-2: #3a332b;      /* heavier rule */
    --fg: #f3ede3;          /* warm bone text */
    --fg-2: #d8d1c4;        /* body text */
    --dim: #a89d8d;         /* secondary / captions */

    --orange: #f26a1b;      /* BRAND */
    --orange-2: #ff8038;    /* brighter, hover / set-piece */
    --orange-deep: #c8540f;
    --teal: #37a396;        /* the sparing complement */

    /* Functional betting colours — same values as the board's. These are
       never restyled for aesthetics: green is a gain, red is a loss. */
    --up: #34b06a;
    --down: #d9564d;

    --sans: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --disp: var(--sans);
    --mono: var(--sans);

    --wrap: 74rem;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body.ts {
    margin: 0;
    background: var(--bg);
    color: var(--fg);
    font-family: var(--sans);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

::selection { background: var(--orange); color: #171310; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: clamp(20px, 5vw, 64px); padding-right: clamp(20px, 5vw, 64px); }
.num { font-variant-numeric: tabular-nums; font-feature-settings: "tnum" 1; }

/* the eyebrow/kicker tell — removed site-wide */
.hero-eyebrow, .section-eyebrow, .doc-eyebrow { display: none !important; }
/* the full-bleed color band tell — neutralized to the single ground */
.band-ink { background: transparent; color: inherit; }

/* ---------------- masthead (shared) ---------------- */

.mast {
    display: flex;
    align-items: center;
    gap: clamp(12px, 3vw, 24px);
    padding: 18px clamp(20px, 5vw, 64px);
    max-width: var(--wrap);
    margin: 0 auto;
}
.mast-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--disp);
    font-weight: 800;
    font-size: 25px;
    letter-spacing: -0.02em;
    line-height: 1;
    text-decoration: none;
    color: var(--fg);
}
.mast-brand::before {
    content: "";
    width: 26px; height: 26px; flex: none;
    background: url("/img/logo.svg") center / contain no-repeat;
}
.mast-status { font-size: 12.5px; color: var(--dim); }
.mast-nav { margin-left: auto; display: flex; gap: clamp(16px, 3vw, 26px); align-items: center; }
.mast-nav a { font-size: 15px; text-decoration: none; color: var(--dim); }
.mast-nav a:hover { color: var(--fg); }

main { display: block; }

/* ---------------- buttons + links (shared) ---------------- */

.btn {
    display: inline-flex; align-items: center; gap: 8px;
    font-family: var(--sans); font-weight: 700; font-size: 15px;
    text-decoration: none; padding: 13px 22px; border: 1px solid transparent; cursor: pointer;
    transition: background-color 160ms ease, color 160ms ease, border-color 160ms ease;
}
.btn-solid { background: var(--orange); color: #171310; border-color: var(--orange); }
.btn-solid:hover { background: var(--orange-2); border-color: var(--orange-2); }
.btn-line { background: transparent; color: var(--fg); border-color: var(--line-2); }
.btn-line:hover { border-color: var(--orange); color: var(--orange); }

.tlink, .txtlink {
    text-decoration: none; color: var(--fg); font-weight: 600;
    border-bottom: 2px solid var(--fg); padding-bottom: 2px;
}
.tlink:hover, .txtlink:hover { color: var(--orange); border-color: var(--orange); }

.section-title {
    font-family: var(--disp); font-weight: 800;
    font-size: clamp(1.9rem, 3.8vw, 2.7rem);
    line-height: 1.02; letter-spacing: -0.02em; margin: 0; text-wrap: balance;
}

/* ==================== LANDING ==================== */

.hero { position: relative; isolation: isolate; padding: 24px 0 clamp(48px, 7vw, 90px); min-height: 80vh; }
.hero-wrap { position: relative; z-index: 1; max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(20px, 5vw, 64px); }
#chart { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.hero-content { position: relative; z-index: 2; }     /* words sit above the graph */
.hero .kick { font-size: 14px; color: var(--dim); margin: 0 0 4px; }
.giant {
    font-family: var(--disp); font-weight: 800;
    font-size: clamp(104px, 26vw, 340px); line-height: 0.9; letter-spacing: -0.03em;
    font-variant-numeric: tabular-nums; color: var(--orange); margin: 0;
}
.giant .u { display: inline-block; }
.js .giant .u { opacity: 0; transform: translateY(0.12em); }
.hero h1 {
    font-family: var(--disp); font-weight: 800;
    font-size: clamp(30px, 4.6vw, 54px); line-height: 1; letter-spacing: -0.02em;
    margin: 14px 0 0; max-width: 18ch;
}
.hero .lede { font-size: 19px; color: var(--fg-2); max-width: 54ch; margin: 20px 0 30px; }
.hero .lede a { color: var(--fg); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--orange); }
.hero .cta { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.legend { position: absolute; right: clamp(20px, 5vw, 64px); bottom: 26px; z-index: 1; font-size: 12.5px; color: var(--dim); text-align: right; line-height: 1.9; }
.legend span { display: inline-block; width: 22px; height: 0; border-top: 2px solid; vertical-align: middle; margin-right: 8px; }
.legend .b span { border-color: #6f6350; }
.legend .r span { border-color: var(--teal); }
/* the gap is a shaded AREA on the chart, not a line — show it as one,
   at the tint the canvas actually paints */
.legend .g span { height: 9px; border: 0; background: rgba(242, 106, 27, 0.32); }

.wide { max-width: var(--wrap); margin: 0 auto; padding: clamp(56px, 7vw, 84px) clamp(20px, 5vw, 64px); border-top: 1px solid var(--line-2); }
.wide h2 { margin-bottom: 30px; }

.bars { display: grid; gap: 18px; max-width: 760px; }
.brow { display: grid; grid-template-columns: 130px 1fr 74px; gap: 16px; align-items: center; }
.brow .blab { font-size: 14px; color: var(--dim); }
.track { height: 26px; background: #231e19; position: relative; overflow: hidden; }
.fill { position: absolute; inset: 0 100% 0 0; transition: right 1.1s cubic-bezier(.2,.7,.2,1); }
.fill.book { background: #514738; }
.fill.real { background: var(--teal); }
/* the disagreement itself, drawn where it happens */
.seg {
    position: absolute; top: 0; bottom: 0; left: 100%; right: 0;
    background: var(--orange);
    transition: left 1.1s cubic-bezier(.2,.7,.2,1), right 1.1s cubic-bezier(.2,.7,.2,1);
    transition-delay: 0.5s;
}
.brow .val { font-weight: 700; font-size: 16px; text-align: right; font-variant-numeric: tabular-nums; }
.record-sample { color: var(--dim); font-size: 14.5px; max-width: 62ch; margin: 18px 0 34px; }

.gapline { margin-top: 22px; font-size: 15px; color: var(--dim); }
.gapline b { color: var(--orange); font-size: 20px; }

.deal { border-top: 2px solid var(--orange); }
.deal .intro { color: var(--dim); margin: -14px 0 22px; max-width: 52ch; }
.drow { display: grid; grid-template-columns: 1.5fr .7fr .7fr .6fr .7fr; gap: 14px; padding: 14px 4px; border-bottom: 1px solid var(--line); align-items: baseline; }
.js .drow { opacity: 0; transform: translateY(14px); }
.drow.in { opacity: 1; transform: none; transition: opacity .5s ease, transform .5s cubic-bezier(.2,.7,.2,1); }
.drow.head { border-bottom: 1px solid var(--line-2); font-size: 12.5px; color: var(--dim); opacity: 1; transform: none; }
.drow .t { font-weight: 700; }
.drow .m { font-variant-numeric: tabular-nums; text-align: right; }
.drow .pos { color: var(--orange); font-weight: 700; }

/* the method — three steps, no boxes, no color band */
.method { max-width: var(--wrap); margin: 0 auto; padding: clamp(56px, 7vw, 84px) clamp(20px, 5vw, 64px); border-top: 1px solid var(--line-2); }
.method h2 { margin-bottom: 26px; }
.steps { list-style: none; margin: 0; padding: 0; }
.step { padding: 22px 0; border-bottom: 1px solid var(--line); max-width: 72ch; }
.step-n { display: block; font-size: 13px; color: var(--orange); margin-bottom: 6px; letter-spacing: 0.04em; }
.step p { margin: 0; font-size: 18px; color: var(--fg-2); }
.step b { color: var(--fg); font-weight: 700; }

.prov { max-width: var(--wrap); margin: 0 auto; padding: clamp(48px, 6vw, 72px) clamp(20px, 5vw, 64px); border-top: 1px solid var(--line-2); font-size: 20px; }
.prov p { max-width: 44ch; margin: 0; }
.prov b { font-weight: 700; }
.prov span { color: var(--dim); font-size: 15px; display: block; margin-top: 8px; }

/* board screenshot section (kept for reuse) */
.board { max-width: var(--wrap); margin: 0 auto; padding: clamp(48px, 6vw, 80px) clamp(20px, 5vw, 64px); border-top: 1px solid var(--line-2); display: grid; grid-template-columns: minmax(0,.82fr) minmax(0,1.18fr); gap: clamp(24px, 4vw, 56px); align-items: center; }
.board-lede { color: var(--dim); max-width: 42ch; margin: 14px 0 24px; }
.board-shot { margin: 0; }
.board-shot img { display: block; width: 100%; height: auto; border: 1px solid var(--line-2); }
.board-shot figcaption { padding-top: 10px; font-size: 12.5px; color: var(--dim); }

/* ---------------- footer (shared) ---------------- */

.foot { padding: 0; }
.foot-inner { max-width: var(--wrap); margin: 0 auto; padding: 28px clamp(20px, 5vw, 64px) 64px; border-top: 2px solid var(--orange); }
.foot-links { font-size: 13.5px; margin: 0 0 12px; }
.foot-links a { color: var(--dim); text-decoration: underline; text-underline-offset: 2px; }
.foot-links a:hover { color: var(--fg); }
.foot-sep { color: var(--line-2); padding: 0 8px; }
.foot-colophon { font-size: 13.5px; color: var(--dim); margin: 0 0 10px; }
.foot-colophon a { color: var(--fg); text-decoration: underline; text-underline-offset: 2px; }
.foot-colophon a:hover { color: var(--orange); }
.foot-fine { font-size: 12.5px; color: var(--dim); max-width: 64ch; margin: 0; line-height: 1.7; }

/* ================= track record page ================= */

.rec-hero { max-width: var(--wrap); margin: 0 auto; padding: clamp(36px, 5vw, 72px) clamp(20px, 5vw, 64px) clamp(20px, 3vw, 36px); }
.rec-hero .section-title { max-width: 16ch; margin-bottom: 16px; }
.rec-lede { max-width: 56ch; color: var(--dim); font-size: 17px; }
.rec-body { max-width: var(--wrap); margin: 0 auto; padding: 0 clamp(20px, 5vw, 64px) clamp(48px, 6vw, 88px); }
.record-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.record-tile { padding: 18px 20px 20px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.record-tile .v { font-family: var(--disp); font-weight: 800; font-size: clamp(1.9rem, 3vw, 2.6rem); line-height: 1; color: var(--fg); font-variant-numeric: tabular-nums; }
.record-tile .l { font-size: 12.5px; color: var(--dim); margin-top: 8px; }
.record-tile.pos .v { color: var(--up); }
.record-tile.neg .v { color: var(--down); }
.record-card { margin-top: 40px; }
.record-card h2 { font-size: 15px; color: var(--dim); font-weight: 700; margin: 0 0 18px; }
.record-equity svg { width: 100%; height: auto; display: block; border: 1px solid var(--line); }
.eq-zero { stroke: var(--line-2); stroke-width: 1; stroke-dasharray: 3 3; }
.eq-fill { fill: rgba(242, 106, 27, 0.12); stroke: none; }
.eq-line { fill: none; stroke: var(--orange); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
/* the curve reads as the number it is, not as the brand */
.record-equity.pos .eq-line { stroke: var(--up); }
.record-equity.pos .eq-fill { fill: rgba(52, 176, 106, 0.12); }
.record-equity.neg .eq-line { stroke: var(--down); }
.record-equity.neg .eq-fill { fill: rgba(217, 86, 77, 0.12); }
.eq-scale { color: var(--dim); font-size: 13px; margin: 12px 0 0; }
.record-retired { margin-top: 14px; font-size: 14px; }
.record-note { color: var(--dim); margin: 0; max-width: 64ch; line-height: 1.65; font-size: 14.5px; }
.record-empty { color: var(--dim); padding: 48px 0; }
.record-equity.draw .eq-line { stroke-dasharray: 2600; stroke-dashoffset: 2600; animation: eq-draw 1.4s cubic-bezier(0.2, 0.8, 0.2, 1) forwards; }
.record-equity.draw .eq-fill { opacity: 0; animation: eq-fade 1.4s ease forwards; }
@keyframes eq-draw { to { stroke-dashoffset: 0; } }
@keyframes eq-fade { to { opacity: 1; } }

/* ================= auth pages ================= */

.auth-page { min-height: 100vh; }
.slip-main { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 20px; }
.slip { width: 100%; max-width: 25rem; border: 1px solid var(--line-2); padding: 30px 28px 32px; }
.slip-brand {
    display: inline-flex; align-items: center; gap: 10px;
    font-family: var(--disp); font-weight: 800; font-size: 28px;
    letter-spacing: -0.02em; line-height: 1; margin: 0 0 4px;
}
.slip-brand::before {
    content: ""; width: 27px; height: 27px; flex: none;
    background: url("/img/logo.svg") center / contain no-repeat;
}
.slip-sub { font-size: 13px; color: var(--dim); margin: 0 0 26px; }
.slip label { display: block; font-size: 13px; color: var(--dim); margin: 18px 0 7px; }
.slip input { width: 100%; font-family: var(--sans); font-size: 15px; color: var(--fg); background: var(--bg-2); border: 1px solid var(--line-2); padding: 11px 12px; }
.slip input:focus-visible { outline: 2px solid var(--orange); outline-offset: 1px; border-color: var(--orange); }
.slip-error { color: var(--orange-2); font-weight: 600; margin: 16px 0 0; min-height: 1.3em; }
.slip-ok { color: var(--fg); margin: 16px 0 0; line-height: 1.5; }
.slip button { width: 100%; margin-top: 22px; font-family: var(--sans); font-weight: 700; font-size: 15px; background: var(--orange); color: #171310; border: 1px solid var(--orange); padding: 13px; cursor: pointer; transition: background-color 160ms; }
.slip button:hover { background: var(--orange-2); }
.slip button:disabled { opacity: 0.55; cursor: default; }
.slip-back { font-size: 14px; margin: 14px 0 0; }
.slip-back a { text-decoration: underline; text-underline-offset: 2px; color: var(--dim); }
.slip-back a:hover { color: var(--orange); }
.slip-note { color: var(--dim); line-height: 1.55; margin: 0 0 8px; }

/* ================= public share card (/p/:id) ================= */

.card-page { min-height: 100vh; }
.card-main { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px; }
.pcard { width: 100%; max-width: 25rem; border: 1px solid var(--line-2); padding: 28px 28px 24px; }
.pcard-brand { font-family: var(--disp); font-weight: 800; font-size: 28px; letter-spacing: -0.02em; line-height: 1; margin: 0; }
.pcard-market { font-size: 12.5px; color: var(--dim); margin: 4px 0 22px; }
.pcard-team { font-family: var(--disp); font-weight: 800; font-size: clamp(1.9rem, 6vw, 2.6rem); line-height: 1; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
.pcard-sub { font-size: 13.5px; color: var(--dim); margin: 6px 0 0; }
.pcard-ev { display: flex; flex-direction: column; margin: 22px 0; padding: 16px 0; border-top: 2px solid var(--orange); border-bottom: 1px solid var(--line); }
.pcard-ev-v { font-family: var(--disp); font-weight: 800; font-size: 3rem; line-height: 0.9; color: var(--orange); font-variant-numeric: tabular-nums; }
.pcard-ev-l { font-size: 12.5px; color: var(--dim); margin-top: 8px; }
.pcard-grid { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.pcard-stat { display: flex; flex-direction: column; gap: 3px; padding: 12px 14px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.pcard-stat-v { font-size: 17px; font-weight: 700; color: var(--fg); }
.pcard-stat-l { font-size: 11.5px; color: var(--dim); }
.pcard-foot { font-size: 12.5px; color: var(--dim); margin: 22px 0 0; line-height: 1.5; }

/* ================= legal / document pages ================= */

.doc { max-width: 720px; margin: 0 auto; padding: clamp(36px, 5vw, 80px) clamp(20px, 5vw, 40px) clamp(48px, 6vw, 96px); }
.doc-title { font-family: var(--disp); font-weight: 800; font-size: clamp(2rem, 5vw, 3rem); line-height: 1.02; letter-spacing: -0.02em; margin: 0 0 10px; }
.doc-updated { font-size: 12.5px; color: var(--dim); margin: 0 0 32px; }
.doc-note { font-size: 14px; line-height: 1.6; color: var(--dim); border-left: 2px solid var(--line-2); padding-left: 14px; margin: 0 0 36px; }
.doc-body { font-size: 17px; line-height: 1.62; color: var(--fg-2); }
.doc-body h2 { font-family: var(--disp); font-weight: 700; font-size: 1.3rem; line-height: 1.2; letter-spacing: -0.01em; margin: 38px 0 10px; color: var(--fg); }
.doc-body h2:first-child { margin-top: 0; }
.doc-body p { margin: 0 0 16px; max-width: 68ch; }
.doc-body ul { margin: 0 0 16px; padding-left: 1.2em; }
.doc-body li { margin: 0 0 8px; max-width: 66ch; }
.doc-body a { color: var(--orange); text-decoration: underline; text-underline-offset: 2px; }
.doc-body strong { font-weight: 700; color: var(--fg); }

/* ================= pricing ================= */

.pricing { max-width: var(--wrap); margin: 0 auto; padding: clamp(36px, 5vw, 72px) clamp(20px, 5vw, 64px) clamp(48px, 6vw, 96px); }
.pricing-head { max-width: 46ch; margin-bottom: 32px; }
.pricing-lede { color: var(--dim); font-size: 18px; margin: 12px 0 24px; }
.bill-toggle { display: flex; gap: 22px; align-items: baseline; }
.bill-toggle button { background: none; border: none; cursor: pointer; padding: 4px 0; font-family: var(--sans); font-size: 14px; color: var(--dim); font-weight: 600; }
.bill-toggle button.on { color: var(--fg); box-shadow: inset 0 -2px 0 var(--orange); }
.bill-toggle button em { font-style: normal; color: var(--orange); margin-left: 7px; font-weight: 600; }
.plans { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); }
.plan { display: flex; flex-direction: column; padding: 30px clamp(18px, 2.2vw, 30px) 32px; }
.plan + .plan { border-left: 1px solid var(--line); }
.plan-featured { background: rgba(242, 106, 27, 0.05); }
.plan-tag { font-size: 13px; color: var(--orange); margin: 0 0 10px; min-height: 1em; font-weight: 700; }
.plan-name { font-family: var(--disp); font-weight: 800; font-size: 1.7rem; line-height: 1; margin: 0 0 8px; }
.plan-price { display: flex; align-items: baseline; gap: 6px; margin: 0 0 2px; }
.plan-amt { font-weight: 800; font-size: 2rem; letter-spacing: -0.02em; color: var(--fg); font-variant-numeric: tabular-nums; }
.plan-per { font-size: 13.5px; color: var(--dim); }
.plan-sub { color: var(--dim); font-size: 15px; margin: 6px 0 22px; }
.plan-feats { list-style: none; margin: 0 0 24px; padding: 0; font-size: 15px; line-height: 1.45; color: var(--fg-2); flex: 1; }
.plan-feats li { display: flex; gap: 9px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.plan-feats li::before { content: "✓"; color: var(--orange); font-weight: 700; }
.plan-feats li.off { color: var(--dim); }
.plan-feats li.off::before { content: "–"; color: var(--dim); }
.plan .btn { margin-top: auto; justify-content: center; }
.plan .btn[aria-disabled="true"] {
    background: transparent; color: var(--dim);
    border-color: var(--line-2); pointer-events: none;
}
.plan-current { margin-top: auto; text-align: center; font-size: 13.5px; color: var(--orange); padding: 13px; border: 1px solid var(--line-2); }
.pricing-fine { font-size: 12.5px; color: var(--dim); line-height: 1.7; margin: 26px 0 0; max-width: 74ch; }
.pricing-fine a { color: var(--orange); text-decoration: underline; text-underline-offset: 2px; }

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

@media (max-width: 900px) {
    .board { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .plans { grid-template-columns: 1fr; }
    .plan + .plan { border-left: 0; border-top: 1px solid var(--line); }
}
@media (max-width: 640px) {
    .mast-status { display: none; }
    .legend { display: none; }
    /* the wave crossed three lines of 16px body copy — keep it in the
       upper band, behind the big number, where it stays legible */
    #chart { height: 46%; }
    .brow { grid-template-columns: 96px 1fr 60px; }
    .drow { grid-template-columns: 1.4fr .8fr .8fr; }
    .drow .c4, .drow .c5 { display: none; }
}

/* ---------------- reduced motion ---------------- */

@media (prefers-reduced-motion: reduce) {
    .giant .u { opacity: 1 !important; transform: none !important; }
    .drow { opacity: 1 !important; transform: none !important; }
    .fill { transition: none; }
    .record-equity.draw .eq-line { animation: none; stroke-dashoffset: 0; }
    .record-equity.draw .eq-fill { animation: none; opacity: 1; }
    * { scroll-behavior: auto !important; }
}
