/* Self-hosted fonts (plan D19), from Fontsource 5.3.0, SIL Open Font License 1.1: see /fonts/OFL-*.txt.
   Archivo is one variable file per subset (width 62–125 %, weight 100–900). */
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("/fonts/archivo-latin-ext-wdth-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "Archivo";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  font-stretch: 62% 125%;
  src: url("/fonts/archivo-latin-wdth-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("/fonts/ibm-plex-mono-latin-ext-400-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 400;
  src: url("/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url("/fonts/ibm-plex-mono-latin-ext-500-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 500;
  src: url("/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url("/fonts/ibm-plex-mono-latin-ext-600-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF;
}
@font-face {
  font-family: "IBM Plex Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 600;
  src: url("/fonts/ibm-plex-mono-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD;
}

/* Light only, by CTO decision. Swiss-style: left-anchored grid, hairlines instead of cards,
   one bold object (the surebet slip). Every text pair below is measured at 4.5:1 or better. */
:root {
  color-scheme: light;
  --paper: #F5F7FA;       /* cool white, biased toward the brand blue */
  --sheet: #FFFFFF;
  --ink: #0F1828;         /* 16.6:1 on paper */
  --muted: #586579;       /* 5.5:1 on paper */
  --rule: #D9DFE8;        /* hairlines only, never text */
  --brand: #2C5BA4;       /* BetOven ring blue, 6.2:1 on paper */
  --brand-deep: #1C3B6E;
  --brand-wash: #E7EEF8;
  --gold: #7D5F33;        /* text gold: 5.1:1 on gold-wash */
  --gold-line: #C6A580;   /* the Wix accent, decorative use only */
  --gold-wash: #F4EEE4;
  --chart-gold: #A8762A;  /* chart marks: passes CVD and 3:1 against paper with the brand blue */
  --on-brand: #FFFFFF;

  --display: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --body: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --step--1: clamp(0.8125rem, 0.79rem + 0.1vw, 0.875rem);  /* never below 13px */
  --step-0: clamp(1rem, 0.96rem + 0.2vw, 1.0625rem);
  --step-1: clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);
  --step-2: clamp(1.6rem, 1.3rem + 1.4vw, 2.3rem);
  --step-3: clamp(2.4rem, 1.6rem + 3.6vw, 4.6rem);
  --label: 0.8125rem;     /* mono labels: 13px floor */

  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px; --s9: 96px;
  --radius: 8px;
  --shadow: 0 1px 0 var(--rule), 0 24px 48px -28px rgb(44 91 164 / 0.45);
  --dur: 160ms;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --header-h: 72px;
  --gutter: max(16px, env(safe-area-inset-left, 0px));
  --wrap: 1180px;
}

* { box-sizing: border-box; }
html { scroll-padding-top: calc(var(--header-h) + var(--s4)); -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--body); font-size: var(--step-0); line-height: 1.55; -webkit-font-smoothing: antialiased; }
a { color: inherit; transition: color var(--dur) var(--ease), background-color var(--dur) var(--ease), border-color var(--dur) var(--ease); }
a:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 2px; }
img { max-width: 100%; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding-left: var(--gutter); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 1em; height: 1em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.skip { position: absolute; left: var(--gutter); top: -100px; z-index: 20; padding: var(--s3) var(--s4); background: var(--ink); color: var(--paper); border-radius: var(--radius); font-weight: 600; text-decoration: none; }
.skip:focus { top: var(--s2); }

/* Header: solid, no decorative blur */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--paper); }
header.site { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5; background: var(--paper); border-bottom: 1px solid var(--rule); }
header.site .wrap { display: flex; align-items: center; gap: var(--s5); min-height: var(--header-h); }
.logo { display: flex; align-items: center; gap: var(--s3); min-height: 44px; text-decoration: none; }
.logo img { width: 30px; height: 30px; }
.logo span { font-family: var(--display); font-size: 1.45rem; letter-spacing: -0.02em; line-height: 1; }
.logo b { font-weight: 800; }
.logo i { font-style: normal; font-weight: 400; }
nav.main { display: flex; gap: var(--s2); margin-left: auto; font-size: var(--step--1); font-weight: 500; }
nav.main a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s3); text-decoration: none; color: var(--muted); border-radius: var(--radius); }
nav.main a:hover { color: var(--ink); background: var(--brand-wash); }
.lang { display: flex; border: 1px solid var(--rule); border-radius: 999px; font-family: var(--mono); font-size: var(--label); overflow: hidden; }
.lang a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 var(--s3); text-decoration: none; color: var(--muted); }
.lang a:hover { color: var(--ink); }
.lang a[aria-current] { background: var(--ink); color: var(--paper); }

/* Hero */
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr); gap: clamp(var(--s6), 5vw, 72px); align-items: center; padding-block: clamp(var(--s7), 8vw, 104px) clamp(var(--s7), 7vw, 88px); }
.eyebrow { font-family: var(--mono); font-size: var(--label); letter-spacing: 0.08em; text-transform: uppercase; color: var(--brand); margin: 0 0 var(--s4); }
h1 { font-family: var(--display); font-stretch: 112%; font-weight: 780; font-size: var(--step-3); line-height: 0.98; letter-spacing: -0.035em; margin: 0; text-wrap: balance; }
h1 .line { display: block; }
h1 .line:nth-child(2) { color: var(--brand); }
h1 .line:nth-child(3) { font-weight: 420; font-stretch: 100%; }
.lede { max-width: 34em; margin: var(--s5) 0 var(--s6); color: var(--muted); font-size: var(--step-1); line-height: 1.45; }
.ctas { display: flex; flex-wrap: wrap; gap: var(--s3); }
.btn { display: inline-flex; align-items: center; gap: var(--s2); min-height: 48px; padding: 0 var(--s5); border-radius: var(--radius); font-weight: 600; text-decoration: none; font-size: var(--step-0); border: 1.5px solid var(--brand); }
.btn:active { transform: scale(0.98); }
.btn.solid { background: var(--brand); color: var(--on-brand); }
.btn.solid:hover { background: var(--brand-deep); border-color: var(--brand-deep); }
.btn.line { color: var(--brand); }
.btn.line:hover { background: var(--brand-wash); }
.btn small { font-family: var(--mono); font-weight: 400; font-size: var(--label); opacity: 0.85; }
.platforms { margin-top: var(--s4); font-size: var(--step--1); color: var(--muted); }

/* The surebet slip: the page's one bold object */
.slip { background: var(--sheet); border: 1px solid var(--rule); border-radius: 10px; box-shadow: var(--shadow); font-family: var(--mono); font-size: 0.875rem; overflow: hidden; }
.slip-head { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); padding: var(--s3) var(--s4); border-bottom: 1px dashed var(--rule); color: var(--muted); font-size: var(--label); letter-spacing: 0.06em; text-transform: uppercase; }
.slip-event { padding: var(--s4) var(--s4) var(--s1); }
.slip-event strong { display: block; font-family: var(--body); font-size: 1.05rem; font-weight: 650; color: var(--ink); }
.slip-event span { color: var(--muted); font-size: var(--label); }
.legs { width: 100%; border-collapse: collapse; margin-top: var(--s3); font-variant-numeric: tabular-nums; }
.legs th { text-align: left; font-weight: 500; color: var(--muted); font-size: var(--label); letter-spacing: 0.06em; text-transform: uppercase; padding: var(--s2) var(--s4); }
.legs th:not(:first-child), .legs td:not(:first-child) { text-align: right; }
.legs td { padding: var(--s3) var(--s4); border-top: 1px solid var(--rule); white-space: nowrap; }
.legs td.odd { color: var(--brand); font-weight: 600; font-size: 1.05rem; }
.calc { padding: var(--s3) var(--s4); border-top: 1px dashed var(--rule); display: grid; gap: var(--s2); color: var(--muted); }
.calc div { display: flex; justify-content: space-between; gap: var(--s3); }
.calc .ink { color: var(--ink); }
.profit { display: flex; justify-content: space-between; align-items: baseline; gap: var(--s3); padding: var(--s4); background: var(--gold-wash); border-top: 2px solid var(--gold-line); }
.profit span { color: var(--muted); font-size: var(--label); letter-spacing: 0.06em; text-transform: uppercase; }
.profit strong { white-space: nowrap; color: var(--gold); font-size: 1.6rem; font-weight: 600; letter-spacing: -0.02em; }
.slip-note { margin: var(--s3) 2px 0; font-size: var(--label); color: var(--muted); font-family: var(--mono); }

/* Sections */
section.band { border-top: 1px solid var(--rule); }
section.band > .wrap { padding-block: clamp(var(--s8), 8vw, var(--s9)); }
h2 { font-family: var(--display); font-stretch: 108%; font-weight: 720; font-size: var(--step-2); letter-spacing: -0.025em; line-height: 1.05; margin: 0 0 var(--s3); text-wrap: balance; }
/* Titles in the brand blue, as on Wix; the hero h1 keeps its one blue line and the h4 card labels stay ink */
h2, h3, .page-title { color: var(--brand); }
.section-lede { color: var(--muted); max-width: 40em; margin: 0 0 var(--s7); }

/* Two programs: one row each, capture large on the left, hairline between rows, no cards */
.program { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: clamp(var(--s5), 4vw, 56px); align-items: center; }
.program + .program { margin-top: var(--s8); padding-top: var(--s8); border-top: 1px solid var(--rule); }
.program h3 { font-family: var(--display); font-size: var(--step-1); font-weight: 700; margin: 0 0 var(--s2); letter-spacing: -0.01em; }
.program p { color: var(--muted); margin: 0 0 var(--s4); max-width: 34em; }
.links { display: flex; flex-wrap: wrap; gap: 0 var(--s5); font-weight: 600; font-size: var(--step--1); }
.links a { display: inline-flex; align-items: center; min-height: 44px; color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 4px; }
.links a:hover { color: var(--brand-deep); }

.capture { margin: 0; }
.capture img { display: block; width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--rule); background: var(--sheet); box-shadow: var(--shadow); }
.capture figcaption { margin-top: var(--s2); font-family: var(--mono); font-size: var(--label); color: var(--muted); }

.formula { margin-top: var(--s4); padding: var(--s3) var(--s4); border-left: 2px solid var(--brand); background: var(--brand-wash); font-family: var(--mono); font-size: 0.875rem; color: var(--ink); overflow-wrap: anywhere; }

/* Worked examples: text on the left, the example as a figure on the right */
.example { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(var(--s5), 4vw, 56px); align-items: start; }
.example + .example { margin-top: var(--s8); padding-top: var(--s8); border-top: 1px solid var(--rule); }
.example h3 { font-family: var(--display); font-size: var(--step-1); font-weight: 700; margin: 0 0 var(--s2); }
.example-text p { color: var(--muted); margin: 0; max-width: 34em; }
.viz { margin: 0; background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); padding: var(--s5); min-width: 0; }
.viz-title { font-family: var(--mono); font-size: var(--label); color: var(--muted); margin: 0 0 var(--s3); }
.viz-note { margin: var(--s4) 0 0; color: var(--ink); font-size: var(--step--1); }
.legend { display: flex; flex-wrap: wrap; gap: var(--s1) var(--s5); font-size: var(--step--1); color: var(--muted); margin-bottom: var(--s4); }
.legend span { display: inline-flex; align-items: center; gap: var(--s2); }
.key { display: inline-block; flex: none; }
.key.rect { width: 10px; height: 10px; border-radius: 2px; }
.key.line { width: 18px; height: 0; border-top: 2px solid; }
.key.line.k-actual { border-top-color: var(--brand); }
.key.line.k-expected { border-top-style: dashed; border-top-color: var(--chart-gold); }

/* Surebet: the two bets, then what happens in each outcome */
.sb-bets { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3) var(--s5); padding-bottom: var(--s4); border-bottom: 1px solid var(--rule); }
.sb-bet { display: flex; gap: var(--s3); align-items: baseline; }
.sb-bet strong { display: block; font-weight: 650; }
.sb-bet span { font-size: var(--step--1); color: var(--muted); }
.sb-bet b, .sb-total b { color: var(--ink); font-weight: 600; }
.sb-total { grid-column: 1 / -1; font-size: var(--step--1); color: var(--muted); }
.scenarios { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.scenario { padding: var(--s4) var(--s5) 0 0; }
.scenario + .scenario { padding: var(--s4) 0 0 var(--s5); border-left: 1px solid var(--rule); }
.scenario h4 { font-family: var(--display); font-size: 1.05rem; font-weight: 700; margin: 0 0 var(--s2); }
.scenario > p { margin: 0; font-size: var(--step--1); color: var(--muted); }
.scenario > p b, .scenario > p strong { color: var(--ink); font-weight: 600; }
.bars { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: var(--s2) var(--s3); align-items: center; margin: var(--s4) 0; }
.bl { font-size: var(--label); color: var(--muted); }
.bv { font-size: var(--label); color: var(--ink); text-align: right; }
.track { --max: var(--track-max, 104); display: flex; gap: 2px; height: 12px; }
.seg { display: block; height: 100%; width: calc(100% * var(--v) / var(--max)); }
.seg.end { border-radius: 0 4px 4px 0; }
.seg-a, .k-a { background: var(--brand); }
.seg-b, .k-b { background: var(--chart-gold); }
.result { margin: 0; font-size: var(--step--1); color: var(--muted); }
.result b { font-size: 1.35rem; font-weight: 700; color: var(--ink); margin-left: var(--s1); }

/* Wide example: text across the top, the cards side by side below */
.example-wide { grid-template-columns: minmax(0, 1fr); gap: var(--s5); }
.example-wide .example-text { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 clamp(var(--s5), 4vw, 56px); align-items: start; }
.example-wide .example-text h3 { grid-column: 1 / -1; }
.example-wide .example-text .formula { margin-top: 0; }
.example-wide .viz-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; }
.example-wide .viz { display: flex; flex-direction: column; }
.example-wide .table-view { margin-top: auto; }
.example-wide .viz-note + .table-view { padding-top: 0; }

/* Valuebet: one bet, its two outcomes, 100 of them, then the long run */
.viz-stack { display: grid; gap: var(--s5); min-width: 0; }
.freq { font-family: var(--mono); font-size: var(--label); font-weight: 400; color: var(--muted); margin-left: var(--s2); }
.hundred { border-top: 1px solid var(--rule); margin-top: var(--s5); padding-top: var(--s4); }
.hundred h4 { font-family: var(--display); font-size: 1.05rem; font-weight: 700; margin: 0 0 var(--s3); }
.units { display: grid; grid-template-columns: repeat(25, minmax(0, 1fr)); gap: 3px; max-width: 420px; }
.u, .key.unit { display: block; aspect-ratio: 1; border-radius: 2px; }
.u.won, .key.unit.won { background: var(--brand); }
.u.lost, .key.unit.lost { box-shadow: inset 0 0 0 1px var(--muted); }
.key.unit { width: 10px; height: 10px; }
.hundred .legend { margin: var(--s3) 0 0; }
.ledger { margin: var(--s3) 0 var(--s2); font-size: var(--label); color: var(--ink); line-height: 1.7; }
.result span { color: var(--muted); }

/* Valuebet: simulated cumulative profit */
.vb { position: relative; outline: none; touch-action: pan-y; }
.vb:focus-visible { box-shadow: 0 0 0 2px var(--sheet), 0 0 0 4px var(--brand); border-radius: 4px; }
.vb-svg { display: block; overflow: visible; }
.vb-svg .grid { stroke: var(--rule); stroke-width: 1; }
.vb-svg .zero { stroke: var(--muted); stroke-width: 1; }
.vb-svg .tick { font: 13px var(--mono); fill: var(--muted); font-variant-numeric: tabular-nums; }
.vb-svg .actual { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.vb-svg .expected { stroke: var(--chart-gold); stroke-width: 2; stroke-dasharray: 6 5; }
.vb-svg .end-label { font: 600 13px var(--mono); fill: var(--ink); }
.vb-svg .cross, .vb-svg .dot, .vb-tip { opacity: 0; transition: opacity var(--dur) var(--ease); }
.vb-svg .cross { stroke: var(--ink); stroke-width: 1; }
.vb-svg .dot { fill: var(--brand); stroke: var(--sheet); stroke-width: 2; }
.vb.active .cross, .vb.active .dot, .vb.active .vb-tip { opacity: 1; }
.vb-tip { position: absolute; top: 0; width: 150px; pointer-events: none; display: grid; gap: 2px; padding: var(--s2) var(--s3); background: var(--sheet); border: 1px solid var(--rule); border-radius: 6px; box-shadow: 0 6px 18px -10px rgb(15 24 40 / 0.4); font-size: var(--label); color: var(--muted); }
.vb-tip b { font: 600 0.95rem var(--mono); color: var(--ink); }
.table-view { margin-top: var(--s4); border-top: 1px solid var(--rule); }
.table-view summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; font-weight: 600; font-size: var(--step--1); color: var(--brand); }
.table-view table { width: 100%; border-collapse: collapse; font-size: var(--label); }
.table-view th, .table-view td { text-align: right; padding: var(--s1) var(--s2); border-bottom: 1px solid var(--rule); }
.table-view th:first-child, .table-view td:first-child { text-align: left; }
.table-view th { color: var(--muted); font-weight: 500; }

/* Área de clientes: a plain index beside the panel it opens */
.panels-layout { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: clamp(var(--s6), 5vw, 72px); align-items: start; }
.panels { border-top: 1px solid var(--ink); }
.panel { display: grid; gap: var(--s1); padding: var(--s4) 0 var(--s5); text-decoration: none; border-bottom: 1px solid var(--rule); }
.panel strong { font-family: var(--display); font-size: var(--step-1); font-weight: 700; display: flex; justify-content: space-between; align-items: center; gap: var(--s3); }
.panel strong .icon { color: var(--brand); width: 18px; height: 18px; transition: transform var(--dur) var(--ease); }
.panel span { color: var(--muted); font-size: var(--step--1); }
.panel code { font-family: var(--mono); font-size: var(--label); color: var(--muted); }
.panel:hover strong { color: var(--brand); }
.panel:hover strong .icon { transform: translate(2px, -2px); }

footer.site { border-top: 1px solid var(--rule); font-size: var(--step--1); color: var(--muted); }
footer.site .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--s5); padding-block: var(--s6) var(--s7); }
footer.site nav { display: flex; flex-wrap: wrap; gap: 0 var(--s5); }
footer.site nav a { display: inline-flex; align-items: center; min-height: 44px; }
footer.site nav a:hover { color: var(--ink); }
footer.site nav .linklike { display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-decoration: underline; cursor: pointer; }
footer.site nav .linklike:hover { color: var(--ink); }

/* Cookie banner (D10): Accept and Reject at the same level; nothing behind it is blocked */
.consent { position: fixed; z-index: 30; left: var(--gutter); right: max(16px, env(safe-area-inset-right, 0px)); bottom: max(16px, env(safe-area-inset-bottom, 0px)); max-width: 720px; margin-inline: auto; display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s5); padding: var(--s4) var(--s5); background: var(--sheet); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: 0 12px 32px -12px rgb(15 24 40 / 0.35); font-size: var(--step--1); }
.consent[hidden] { display: none; }
.consent p { margin: 0; flex: 1 1 320px; color: var(--ink); }
.consent p a { color: var(--brand); text-underline-offset: 3px; }
.consent-actions { display: flex; gap: var(--s3); }
.consent-actions .btn { min-height: 44px; background: transparent; font-family: inherit; cursor: pointer; }  /* <button>s: drop the browser's grey */
footer.site p { margin: 0; }
footer.site .todo { font-family: var(--mono); color: var(--gold); }

/* Current page in the nav */
nav.main a[aria-current="page"] { color: var(--ink); box-shadow: inset 0 -2px 0 var(--brand); border-radius: 0; }

/* Download pages */
.page-head .wrap { padding-block: clamp(var(--s7), 6vw, 80px) var(--s6); }
.page-title { font-family: var(--display); font-stretch: 112%; font-weight: 780; font-size: clamp(2.2rem, 1.6rem + 2.6vw, 3.6rem); line-height: 1; letter-spacing: -0.03em; margin: 0; text-wrap: balance; }
.page-head .lede { margin-bottom: 0; }
.get { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s3) var(--s5); }
.meta { font-family: var(--mono); font-size: var(--label); color: var(--muted); }

.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: var(--s5); max-width: 40em; }
.steps > li { counter-increment: step; display: grid; grid-template-columns: 2rem minmax(0, 1fr); gap: var(--s3); }
.steps > li::before { content: counter(step); font-family: var(--mono); font-weight: 600; color: var(--brand); border-top: 2px solid var(--brand); padding-top: var(--s1); height: fit-content; }
.steps > li > div > p { margin: 0; }

.cmd { display: flex; align-items: stretch; margin-top: var(--s3); border-radius: var(--radius); background: var(--ink); color: var(--paper); overflow: hidden; }
.cmd code { flex: 1; min-width: 0; padding: var(--s3) var(--s4); font-family: var(--mono); font-size: 0.875rem; line-height: 1.5; overflow-wrap: break-word; align-self: center; }
.cmd button { flex: none; min-width: 88px; min-height: 44px; border: 0; border-left: 1px solid rgb(255 255 255 / 0.18); background: transparent; color: var(--paper); font: 600 var(--label) var(--mono); letter-spacing: 0.04em; cursor: pointer; transition: background-color var(--dur) var(--ease); }
.cmd button:hover { background: rgb(255 255 255 / 0.1); }
.cmd button:focus-visible { outline: 2px solid var(--gold-line); outline-offset: -4px; }

.note { margin: var(--s5) 0 0; padding: var(--s3) var(--s4); border-left: 2px solid var(--gold-line); background: var(--gold-wash); color: var(--muted); font-size: var(--step--1); max-width: 40em; }
.note strong { color: var(--ink); font-weight: 600; }
.note a { color: var(--brand); text-underline-offset: 3px; }
/* Phones and tablets (touch, no mouse): the programs install on a computer. The download stays available. */
.touch-note { display: none; }
@media (hover: none) and (pointer: coarse) { .touch-note { display: block; } }

.os-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.os { padding-right: clamp(var(--s5), 4vw, 56px); }
.os + .os { padding-right: 0; padding-left: clamp(var(--s5), 4vw, 56px); border-left: 1px solid var(--rule); }
.os h2 { display: flex; align-items: baseline; gap: var(--s3); margin-bottom: var(--s5); }
.tag { font-family: var(--mono); font-size: var(--label); font-weight: 500; letter-spacing: 0.04em; color: var(--brand); background: var(--brand-wash); padding: 2px var(--s2); border-radius: 4px; }
details.alt { margin-top: var(--s5); border-top: 1px solid var(--rule); max-width: 40em; }
details.alt summary { display: flex; align-items: center; min-height: 48px; cursor: pointer; font-weight: 600; color: var(--brand); }
details.alt summary:hover { color: var(--brand-deep); }
details.alt summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
details.alt > div { padding-bottom: var(--s4); }
details.alt p { margin: 0 0 var(--s4); color: var(--muted); }

.extras { border-top: 1px solid var(--ink); max-width: 56em; }
.extra { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--s2) var(--s5); align-items: center; padding: var(--s5) 0; border-bottom: 1px solid var(--rule); }
.extra h3 { font-family: var(--display); font-size: var(--step-1); font-weight: 700; margin: 0 0 var(--s1); }
.extra p { margin: 0; color: var(--muted); }
.extra p + p { margin-top: var(--s2); }
.extra .meta { display: block; margin-top: var(--s2); }
.extra .btn { justify-self: end; }

@media (max-width: 860px) {
  :root { --header-h: 112px; }
  /* two-row header: scrolls away instead of covering ~15 % of a phone screen */
  header.site { position: static; }
  html { scroll-padding-top: var(--s4); }
  header.site .wrap { flex-wrap: wrap; gap: 0 var(--s4); padding-block: var(--s2); }
  .lang { margin-left: auto; }
  nav.main { order: 3; width: 100%; margin: 0 0 0 calc(-1 * var(--s3)); }
  .hero .wrap, .program, .example, .panels-layout { grid-template-columns: minmax(0, 1fr); }
  .program + .program { margin-top: var(--s7); padding-top: var(--s7); }
  .os-grid { grid-template-columns: minmax(0, 1fr); }
  .os, .os + .os { padding: 0; border-left: 0; }
  .os + .os { margin-top: var(--s7); padding-top: var(--s6); border-top: 1px solid var(--rule); }
  .extra { grid-template-columns: minmax(0, 1fr); }
  .extra .btn { justify-self: start; }
  .viz { padding: var(--s4); }
  .sb-bets, .scenarios { grid-template-columns: minmax(0, 1fr); }
  .example-wide .example-text, .example-wide .viz-stack { grid-template-columns: minmax(0, 1fr); }
  .example-wide .example-text .formula { margin-top: var(--s4); }
  .scenario, .scenario + .scenario { padding: var(--s4) 0 0; border-left: 0; }
  .scenario + .scenario { margin-top: var(--s4); border-top: 1px solid var(--rule); }
  .cmd { flex-direction: column; }
  .cmd button { border-left: 0; border-top: 1px solid rgb(255 255 255 / 0.18); }
  .slip { font-size: var(--label); }
  .legs th, .legs td { padding-inline: var(--s2); }
  .legs th:first-child, .legs td:first-child { padding-left: var(--s4); }
  .legs th:last-child, .legs td:last-child { padding-right: var(--s4); }
  .legs td.odd { font-size: 1rem; }
}
/* smallest phones: the example table's outer padding gives way so the English labels fit at 320 px */
@media (max-width: 360px) {
  .legs th:first-child, .legs td:first-child { padding-left: var(--s3); }
  .legs th:last-child, .legs td:last-child { padding-right: var(--s3); }
}

/* touch screens: the language switch gets full-size targets */
@media (pointer: coarse) {
  .lang a { min-height: 44px; min-width: 44px; justify-content: center; }
}

@media (prefers-reduced-motion: no-preference) {
  .profit strong { animation: settle 900ms 300ms both var(--ease); }
  @keyframes settle { from { opacity: .35; transform: translateY(4px); } to { opacity: 1; transform: none; } }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}

/* Long-form pages (legal, /dgoj): text migrated as-is from Wix (plan D11). */
.prose { max-width: 72ch; }
.prose h2 { font-family: var(--display); font-weight: 700; font-size: var(--step-1); line-height: 1.2; margin: var(--s7) 0 var(--s4); }
.prose p, .prose li { margin: 0 0 var(--s4); }
.prose ul, .prose ol { margin: 0 0 var(--s5); padding-left: 1.4em; }
.prose a { color: var(--brand); text-underline-offset: 3px; overflow-wrap: anywhere; }
.prose img { display: block; max-width: 100%; height: auto; margin: var(--s5) 0; border: 1px solid var(--rule); border-radius: var(--radius); background: var(--sheet); }
.page-head .lede a { color: var(--brand); text-underline-offset: 3px; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 var(--s5); font-size: var(--step--1); }
.prose th, .prose td { text-align: left; vertical-align: top; padding: var(--s2) var(--s3) var(--s2) 0; border-bottom: 1px solid var(--rule); }
.prose th { font-weight: 600; color: var(--muted); }
.prose code { font-family: var(--mono); }
/* phones: each table row becomes a block, every value under its column name (data-label) */
@media (max-width: 600px) {
  .prose table, .prose tbody, .prose tr, .prose td { display: block; }
  .prose thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .prose tr { padding: var(--s2) 0; border-bottom: 1px solid var(--rule); }
  .prose td { display: grid; grid-template-columns: 6.5em minmax(0, 1fr); gap: var(--s3); padding: var(--s1) 0; border: 0; }
  .prose td::before { content: attr(data-label); font-weight: 600; color: var(--muted); }
}
