/* Sir Pickle Backtester in the Sir Pickle design language (sirpickle-design-language.md), light like the member
   dashboard by default (a dark theme on request): warm page, white cards, two-layer shadows, one near-black primary
   action, accent green for meaning and selection, ok/bad green and red only for up and down. The entry models' and the
   directions' colours are the brand's category solids (no green or red). Layout: a centred question card (the steps),
   the run card, then a results column. */
:root {
  --bg: #fafaf8; --surface: #ffffff; --well: #f4f4f1; --well-strong: #ecece7; --line: #ecece7; --line-strong: #deded6;
  --ink: #1a1a17; --ink-2: #6b6b63; --muted: #9c9c93;
  --accent: #15803d; --accent-deep: #0f5c2c; --accent-wash: rgb(21 128 61 / 8%); --accent-wash-strong: rgb(21 128 61 / 14%);
  --ok: #1f7a4d; --bad: #b3341f; --ok-soft: rgb(31 122 77 / 8%); --bad-soft: rgb(179 52 31 / 8%);
  --inv: #1a1a17; --inv-ink: #fafaf8;
  --m0: #7c3aed; --m1: #1d4ed8; --m2: #ca8a04; --m3: #0891b2; --m4: #3f3f46; --m5: #b45309;
  --d-long: #2563eb; --d-short: #c2410c;
  --e-raised: 0 1px 2px rgb(26 26 23 / 4%), 0 4px 12px rgb(26 26 23 / 5%);
  --e-sheet: 0 2px 4px rgb(26 26 23 / 6%), 0 12px 32px rgb(26 26 23 / 10%);
  --e-hero: 0 2px 4px rgb(26 26 23 / 12%), 0 20px 40px -14px rgb(26 26 23 / 30%);
  --font: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  /* numbers: the page's own font with equal-width figures (the user: no monospace look, 2026-10-13) */
  --mono: "Inter Tight", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --ease: cubic-bezier(0.2, 0, 0, 1);
  color-scheme: light;
}
/* the dark theme (the design language's dark proposal), only when chosen */
:root[data-theme="dark"] {
  --bg: #121211; --surface: #1b1b19; --well: #24241f; --well-strong: #2e2e28; --line: #2c2c27; --line-strong: #3b3b34;
  --ink: #f2f2ee; --ink-2: #a8a89f; --muted: #7a7a72;
  --accent: #4ade80; --accent-deep: #86efac; --accent-wash: rgb(74 222 128 / 12%); --accent-wash-strong: rgb(74 222 128 / 20%);
  --ok: #4ade80; --bad: #f87171; --ok-soft: rgb(74 222 128 / 10%); --bad-soft: rgb(248 113 113 / 12%);
  --inv: #f2f2ee; --inv-ink: #121211;
  --m0: #a78bfa; --m1: #60a5fa; --m2: #facc15; --m3: #22d3ee; --m4: #d4d4d8; --m5: #fb923c;
  --d-long: #60a5fa; --d-short: #fb923c;
  --e-raised: 0 1px 2px rgb(0 0 0 / 30%), 0 4px 12px rgb(0 0 0 / 25%);
  --e-sheet: 0 2px 4px rgb(0 0 0 / 35%), 0 12px 32px rgb(0 0 0 / 45%);
  --e-hero: 0 2px 4px rgb(0 0 0 / 40%), 0 20px 40px -14px rgb(0 0 0 / 60%);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/22px var(--font); -webkit-font-smoothing: antialiased; font-variant-numeric: tabular-nums; }
body { min-height: 100vh; }
b, strong { font-weight: 600; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--accent-wash-strong); outline-offset: 2px; }
.up { color: var(--ok); }
.down { color: var(--bad); }
.muted { color: var(--ink-2); }
.num { font-family: var(--mono); font-variant-numeric: tabular-nums; }
svg.ic { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }

/* header */
header.top { display: flex; align-items: center; gap: 12px; max-width: 1180px; margin: 0 auto; padding: 20px 20px 0; }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.mark { display: block; width: 40px; height: 40px; border-radius: 50%; }
.brand .name { font: 600 15px/20px var(--font); }
.brand .tag { display: block; font: 500 12px/16px var(--font); color: var(--ink-2); }
header .spacer { flex: 1; }

/* buttons: one near-black primary per screen, the back pill, quiet text buttons */
.primary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 52px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--inv); color: var(--inv-ink); font: 600 16px/20px var(--font); cursor: pointer; transition: transform 120ms var(--ease), filter 120ms var(--ease); }
.primary:active { transform: scale(.97); filter: brightness(.94); }
.primary:disabled { background: var(--well); color: var(--muted); cursor: default; transform: none; filter: none; }
.backpill { display: inline-flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px 0 12px; border: 0; border-radius: 999px; background: var(--inv); color: var(--inv-ink); font: 600 14px/18px var(--font); cursor: pointer; box-shadow: var(--e-raised); transition: transform 120ms var(--ease); }
.backpill:active { transform: scale(.97); }
.backpill svg.ic { width: 16px; height: 16px; }
.text { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; border: 0; border-radius: 999px; background: none; color: var(--ink-2); font: 600 14px/18px var(--font); cursor: pointer; transition: background-color 120ms var(--ease), color 120ms var(--ease); text-decoration: none; }
.text:hover { color: var(--ink); background: var(--well); }
.text svg.ic { width: 16px; height: 16px; }

/* the quiz */
.stage { max-width: 1180px; margin: 0 auto; padding: 24px 20px 64px; }
.qcard { max-width: 620px; margin: 8px auto 0; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--e-raised); padding: 24px; }
@media (min-width: 700px) { .qcard { padding: 32px; } }
.progress { display: grid; gap: 8px; margin-bottom: 24px; }
.ptext { display: flex; justify-content: space-between; font: 500 12px/16px var(--font); color: var(--ink-2); }
.ptext b { color: var(--ink); font-weight: 600; }
.pbar { height: 6px; border-radius: 999px; background: var(--well); overflow: hidden; }
.pbar i { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--accent); transition: width 200ms var(--ease); }
.qcard h1 { margin: 0; font: 600 24px/28px var(--font); letter-spacing: -.006em; text-wrap: balance; }
.qcard h2 { margin: 28px 0 0; font: 700 12px/16px var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.lead { margin: 8px 0 0; color: var(--ink-2); }
.sent { margin: 18px 0 0; font: 500 20px/44px var(--font); color: var(--ink); }
.sent .tail { color: var(--ink); }
.hint { margin: 14px 0 0; font: 500 12px/17px var(--font); color: var(--ink-2); }
.qfoot { display: flex; align-items: center; gap: 12px; margin-top: 32px; }
.qfoot .spacer { flex: 1; }

/* a choice inside a sentence: a pill select (value in the accent) or a fixed value */
.sel { position: relative; display: inline-flex; vertical-align: baseline; max-width: 100%; min-width: 0; }
.sel select { appearance: none; -webkit-appearance: none; height: 44px; padding: 0 40px 0 16px; border: 1px solid transparent; border-radius: 999px; background: var(--accent-wash); color: var(--accent-deep); font: 600 18px/22px var(--font); cursor: pointer; max-width: 100%; text-overflow: ellipsis; transition: background-color 120ms var(--ease), border-color 120ms var(--ease);
  background-image: linear-gradient(45deg, transparent 50%, var(--accent-deep) 50%), linear-gradient(135deg, var(--accent-deep) 50%, transparent 50%);
  background-position: calc(100% - 22px) 20px, calc(100% - 16px) 20px; background-size: 6px 6px; background-repeat: no-repeat; }
.sel select:hover { background-color: var(--accent-wash-strong); }
.sel select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash-strong); }
.fixed { display: inline-flex; align-items: center; height: 44px; padding: 0 16px; border-radius: 999px; background: var(--well); color: var(--ink); font: 600 18px/22px var(--font); max-width: 100%; }
@media (max-width: 480px) {
  .sent { font-size: 18px; line-height: 40px; }
  .sel select { height: 40px; font-size: 16px; padding-right: 34px; background-position: calc(100% - 19px) 18px, calc(100% - 13px) 18px; }
  .fixed { height: 40px; font-size: 16px; }
  .qcard, .scard { padding: 20px; }
  .hero .big { font-size: 40px; line-height: 40px; }
}

/* the market search: the brand's input with a list under it */
.combo { position: relative; margin-top: 20px; }
.combo input { width: 100%; height: 52px; padding: 0 16px 0 44px; border: 1px solid transparent; border-radius: 14px; background: var(--well); color: var(--ink); font: 400 16px/20px var(--font); transition: background-color 120ms var(--ease), border-color 120ms var(--ease), box-shadow 120ms var(--ease); }
.combo input::placeholder { color: var(--muted); }
.combo input:focus { outline: none; background: var(--surface); border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash-strong); }
.combo .lens { position: absolute; left: 14px; top: 17px; color: var(--muted); pointer-events: none; }
.combo ul { position: absolute; z-index: 20; left: 0; right: 0; top: 58px; max-height: 380px; overflow-y: auto; margin: 0; padding: 6px; list-style: none; background: var(--surface); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--e-sheet); overscroll-behavior: contain; }
.combo li.head { padding: 12px 10px 6px; font: 700 12px/16px var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.combo li.opt { display: flex; align-items: baseline; gap: 10px; padding: 10px; border-radius: 10px; cursor: pointer; }
.combo li.opt b { font: 600 15px/20px var(--mono); min-width: 64px; }
.combo li.opt span { color: var(--ink-2); font-size: 14px; }
.combo li.opt.active { background: var(--accent-wash); }
.combo li.none { padding: 14px 10px; color: var(--ink-2); }
.picked { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; background: var(--well); font: 500 13px/16px var(--font); color: var(--ink); }

/* yes / no and the killzones: the brand's selectable chips; selected is a fill change */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip { display: inline-flex; align-items: center; height: 48px; padding: 0 18px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink); font: 500 15px/20px var(--font); cursor: pointer; transition: background-color 120ms var(--ease), border-color 120ms var(--ease); }
.chip:hover { background: var(--well); }
.chip[aria-pressed="true"] { background: var(--accent-wash-strong); border-color: transparent; color: var(--accent-deep); font-weight: 600; }

/* the choices so far, under the card (each one opens its step) */
.trail { max-width: 620px; margin: 16px auto 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.trail button { border: 0; padding: 6px 12px; border-radius: 999px; background: var(--well); color: var(--ink-2); font: 500 13px/16px var(--font); cursor: pointer; }
.trail button:hover { color: var(--ink); background: var(--well-strong); }

/* the scan */
.scard { max-width: 760px; margin: 8px auto 0; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--e-raised); padding: 24px; overflow: hidden; }
@media (min-width: 700px) { .scard { padding: 32px; } }
.scard h1 { margin: 0; font: 600 24px/28px var(--font); }
.scard .lead { margin-top: 6px; }
.scanvas { position: relative; margin-top: 20px; border-radius: 12px; background: var(--well); overflow: hidden; }
.scanvas canvas { display: block; width: 100%; height: 200px; }
.counters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
@media (max-width: 600px) { .counters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.counter { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.counter span { display: block; font: 500 12px/16px var(--font); color: var(--ink-2); }
.counter b { display: block; margin-top: 2px; font: 600 24px/28px var(--mono); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.counter small { display: block; font: 500 12px/16px var(--font); color: var(--ink-2); }
.steps { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 8px; }
.steps li { display: flex; align-items: center; gap: 10px; min-height: 28px; font: 500 15px/20px var(--font); color: var(--ink); animation: rise 240ms var(--ease) both; }
.steps li .st { width: 22px; height: 22px; flex: none; border-radius: 999px; display: grid; place-items: center; background: var(--well); }
.steps li .st i { width: 12px; height: 12px; border-radius: 999px; border: 2px solid var(--line-strong); border-top-color: var(--accent); animation: spin 700ms linear infinite; }
.steps li.done .st { background: var(--accent-wash-strong); color: var(--accent); }
.steps li.done .st i { display: none; }
.steps li .st svg { width: 14px; height: 14px; stroke-width: 2.4; }
.steps li .val { margin-left: auto; font: 500 14px/18px var(--mono); color: var(--ink-2); font-variant-numeric: tabular-nums; }
.steps li.done .val { color: var(--ink); }
.sfoot { display: flex; align-items: center; justify-content: flex-end; gap: 12px; margin-top: 20px; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
.fadein { animation: rise 300ms var(--ease) both; }
@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* results */
.rhead { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 12px 16px; }
.rhead h1 { margin: 0; font: 600 24px/28px var(--font); letter-spacing: -.006em; }
.rhead .lead { margin: 4px 0 0; }
.rhead .spacer { flex: 1; }
.cfg { margin-top: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--e-raised); padding: 8px; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 4px; }
.cfg button { text-align: left; border: 0; background: none; border-radius: 12px; padding: 10px 12px; cursor: pointer; color: var(--ink); transition: background-color 120ms var(--ease); }
.cfg button:hover { background: var(--well); }
.cfg button span { display: block; font: 500 12px/16px var(--font); color: var(--ink-2); }
.cfg button b { display: block; margin-top: 2px; font: 600 15px/20px var(--font); }
.typecap { margin-top: 24px; font: 600 11px/14px var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.types { display: flex; flex-wrap: wrap; gap: 8px; padding: 6px; margin-top: 8px; background: var(--well); border-radius: 999px; width: fit-content; max-width: 100%; }
.types button { border: 0; background: none; border-radius: 999px; padding: 9px 24px; color: var(--ink-2); font: 500 14px/18px var(--font); cursor: pointer; text-align: left; }
.types button small { display: block; font: 500 12px/16px var(--mono); color: var(--muted); }
.types button.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--e-raised); }
.types button.on small { color: var(--ink-2); }
.hero { position: relative; overflow: hidden; margin-top: 16px; border-radius: 20px; padding: 24px; color: #fff; box-shadow: var(--e-hero);
  background: radial-gradient(90% 120% at 100% 0%, rgb(255 255 255 / 18%) 0%, rgb(255 255 255 / 0%) 50%), linear-gradient(135deg, #0a2417 0%, #0f5132 32%, #1f9d55 68%, #6bdb84 100%);
  background-size: 100% 100%, 165% 165%; }
.hero.neg { background: radial-gradient(90% 120% at 100% 0%, rgb(255 255 255 / 16%) 0%, rgb(255 255 255 / 0%) 50%), linear-gradient(135deg, #2d0a0a 0%, #7f1d1d 32%, #dc2626 68%, #fca5a5 100%); background-size: 100% 100%, 165% 165%; }
.hero::after { content: ""; position: absolute; left: 0; bottom: 0; width: 50%; height: 80%; pointer-events: none; background-image: radial-gradient(rgb(255 255 255 / 14%) 1px, transparent 1.5px); background-size: 12px 12px; -webkit-mask-image: radial-gradient(110% 110% at 0% 100%, #000 0%, transparent 62%); mask-image: radial-gradient(110% 110% at 0% 100%, #000 0%, transparent 62%); }
.hero > * { position: relative; z-index: 1; }
@media (min-width: 700px) { .hero { padding: 32px; } }
.hero .k { font: 600 10px/12px var(--font); letter-spacing: .06em; text-transform: uppercase; color: rgb(255 255 255 / 82%); }
.hero .big { margin-top: 10px; font: 600 44px/44px var(--font); letter-spacing: -.015em; font-variant-numeric: tabular-nums; }
.hero .sub { margin-top: 8px; font: 500 13px/18px var(--font); color: rgb(255 255 255 / 86%); }
.hero .hstats { display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 16px; margin-top: 24px; max-width: 680px; }
.hero .hstats span { display: block; font: 500 12px/16px var(--font); color: rgb(255 255 255 / 80%); }
.hero .hstats b { display: block; margin-top: 2px; font: 600 24px/28px var(--font); font-variant-numeric: tabular-nums; }
.card { margin-top: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--e-raised); padding: 20px; min-width: 0; }
@media (min-width: 700px) { .card { padding: 24px; } }
.card h2 { margin: 0; font: 600 15px/22px var(--font); }
.card .sub { margin: 2px 0 0; font: 500 12px/17px var(--font); color: var(--ink-2); }
.chead { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; }
.chead .spacer { flex: 1; }
.seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--well); border-radius: 999px; }
.seg button { border: 0; background: none; border-radius: 999px; padding: 6px 12px; color: var(--ink-2); font: 500 13px/18px var(--font); cursor: pointer; }
.seg button.on { background: var(--surface); color: var(--ink); font-weight: 600; box-shadow: var(--e-raised); }
.tw { overflow-x: auto; margin: 12px -20px 0; }
@media (min-width: 700px) { .tw { margin: 12px -24px 0; } }
table { border-collapse: collapse; width: 100%; font: 400 14px/20px var(--font); font-variant-numeric: tabular-nums; }
th, td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: right; white-space: nowrap; }
th { font: 600 12px/16px var(--font); color: var(--ink-2); background: var(--surface); }
th:first-child, td:first-child { text-align: left; padding-left: 20px; }
th:last-child, td:last-child { padding-right: 20px; }
@media (min-width: 700px) { th:first-child, td:first-child { padding-left: 24px; } th:last-child, td:last-child { padding-right: 24px; } }
tbody tr:last-child td { border-bottom: 0; }
td.n { font-family: var(--mono); font-size: 13px; }
tr.sum td { font-weight: 600; background: var(--well); }
.dot { display: inline-block; width: 10px; height: 10px; border-radius: 999px; margin-right: 8px; vertical-align: 0; }
.emo { margin-right: 6px; }
.chartbox { position: relative; margin-top: 16px; }
.chartbox canvas { display: block; width: 100%; height: 320px; }
.legend { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.legend button { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink); font: 500 13px/16px var(--font); cursor: pointer; }
.legend button i { width: 10px; height: 10px; border-radius: 999px; }
.legend button[aria-pressed="false"] { color: var(--muted); background: var(--well); border-color: transparent; }
.legend button[aria-pressed="false"] i { opacity: .35; }
.legend button small { font: 500 12px/16px var(--mono); }
.funnel { display: grid; gap: 8px; margin-top: 16px; }
.frow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: center; }
.frow .fl { font: 500 14px/18px var(--font); }
.frow .fv { font: 600 14px/18px var(--mono); font-variant-numeric: tabular-nums; }
.frow .fb { grid-column: 1 / -1; height: 8px; border-radius: 999px; background: var(--well); overflow: hidden; }
.frow .fb i { display: block; height: 100%; border-radius: 999px; background: var(--accent); }
.notes { margin: 12px 0 0; padding-left: 18px; color: var(--ink-2); font: 400 13px/19px var(--font); }
.notes li + li { margin-top: 6px; }
.empty { margin-top: 16px; padding: 32px 20px; text-align: center; color: var(--ink-2); background: var(--surface); border: 1px dashed var(--line-strong); border-radius: 20px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.err { max-width: 620px; margin: 8px auto 0; padding: 16px 18px; border-radius: 14px; background: var(--bad-soft); color: var(--bad); font: 500 14px/20px var(--font); }

/* the overlays: a sheet over a scrim */
.scrim { position: fixed; inset: 0; z-index: 40; background: rgb(26 26 23 / 28%); }
.sheet { position: fixed; z-index: 41; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(560px, calc(100vw - 32px)); max-height: min(640px, calc(100vh - 48px)); overflow: auto; background: var(--surface); border-radius: 28px; box-shadow: var(--e-sheet); padding: 24px; }
.sheet h2 { margin: 0; font: 600 24px/28px var(--font); }

/* tooltips and the toast */
.tip { position: fixed; pointer-events: none; z-index: 60; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font: 400 12px/18px var(--font); box-shadow: var(--e-sheet); font-variant-numeric: tabular-nums; min-width: 180px; }
.tip b { display: block; font: 600 13px/18px var(--font); margin-bottom: 4px; }
.tip .row { display: flex; align-items: center; gap: 8px; }
.tip .row i { width: 8px; height: 8px; border-radius: 999px; }
.tip .row span { flex: 1; color: var(--ink-2); }
.tip .row em { font-style: normal; font-family: var(--mono); }
.toast { position: fixed; z-index: 70; left: 50%; bottom: 24px; transform: translateX(-50%); background: var(--inv); color: var(--inv-ink); border-radius: 999px; padding: 12px 18px; font: 600 14px/18px var(--font); box-shadow: var(--e-sheet); animation: rise 200ms var(--ease) both; }

/* ---------- added 2026-10-13: the new steps, the run, the results' settings, filters and costs */
.iconbtn { display: inline-grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 999px; background: none; color: var(--ink-2); cursor: pointer; }
.iconbtn:hover { background: var(--well); color: var(--ink); }
.explain { display: inline-block; margin-top: 6px; padding: 0; border: 0; background: none; color: var(--muted); font: 500 13px/18px var(--font); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; cursor: pointer; }
.explain:hover { color: var(--ink-2); }
.linkish { padding: 0; border: 0; background: none; color: var(--accent-deep); font: inherit; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.qcard h1 + .explain { display: block; }
.combo { margin-top: 18px; }

/* the pre-selection screen */
.presel { text-align: center; padding: 12px 4px 4px; }
.presel .seal { display: inline-grid; place-items: center; width: 56px; height: 56px; border-radius: 18px; background: var(--accent-wash-strong); color: var(--accent-deep); margin-bottom: 16px; }
.presel .seal svg.ic { width: 26px; height: 26px; }
.presel h1 { font-size: 22px; line-height: 28px; }
.presel .lead { margin-top: 10px; }

/* the steps under the card: titles until done, then the choice in green */
.trail button { display: inline-flex; align-items: center; gap: 4px; }
.trail button.done { background: var(--accent-wash-strong); color: var(--accent-deep); font-weight: 600; }
.trail button.done svg.ic { width: 13px; height: 13px; stroke-width: 2.4; }
.trail button.cur { background: var(--inv); color: var(--inv-ink); }
.trail button:disabled { opacity: .5; cursor: default; }

/* killzones with their times */
.chip.kzchip { flex-direction: column; justify-content: center; align-items: flex-start; height: 52px; line-height: 18px; }
.chip.kzchip small { font: 500 11px/14px var(--mono); color: var(--ink-2); }
.chip.kzchip[aria-pressed="true"] small { color: var(--accent-deep); opacity: .8; }
.chip.small { height: 36px; padding: 0 12px; font-size: 13px; }
.chip.small.kzchip { height: 44px; }
.chips.tight { gap: 6px; margin-top: 10px; }
#kztimes { margin-top: 10px; display: grid; gap: 6px; }
.kzrow { display: grid; grid-template-columns: 120px 76px 12px 76px; align-items: center; gap: 6px; font: 500 13px/18px var(--font); }
.kzrow input { height: 36px; padding: 0 10px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--surface); color: var(--ink); font: 500 14px/18px var(--mono); width: 100%; }
.kzrow input.bad { border-color: var(--bad); }

/* switches */
.switches { display: grid; gap: 4px; margin-top: 10px; }
.switches.row { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); gap: 8px; margin-top: 14px; }
.switch { display: flex; align-items: flex-start; gap: 12px; padding: 8px 4px; cursor: pointer; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { flex: none; position: relative; width: 38px; height: 22px; margin-top: 1px; border-radius: 999px; background: var(--line-strong); transition: background-color 120ms var(--ease); }
.switch .track i { position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 999px; background: #fff; box-shadow: 0 1px 2px rgb(0 0 0 / 25%); transition: transform 160ms var(--ease); }
.switch input:checked + .track { background: var(--accent); }
.switch input:checked + .track i { transform: translateX(16px); }
.switch input:focus-visible + .track { outline: 3px solid var(--accent-wash-strong); outline-offset: 2px; }
.switch .sl b { display: block; font: 600 14px/20px var(--font); }
.switch .sl small { display: block; font: 500 12px/16px var(--font); color: var(--ink-2); }
.sent.small { font-size: 16px; line-height: 40px; margin-top: 14px; }
.sent.small .sel select { height: 38px; font-size: 15px; }

/* the run */
.scard.compact { margin: 0; box-shadow: none; border: 0; padding: 4px; }
.sheet.runsheet { width: min(760px, calc(100vw - 24px)); padding: 20px; }
.sfoot .primary { height: 48px; font-size: 15px; animation: rise 300ms var(--ease) both; }
@media (max-width: 600px) { .sfoot { flex-direction: column; align-items: stretch; } .sfoot .primary { width: 100%; } }

/* the results' settings card */
.setcard.changed { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash-strong), var(--e-raised); }
.fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 200px), 1fr)); gap: 10px 14px; margin-top: 14px; }
@media (max-width: 600px) { .types { border-radius: 20px; width: 100%; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); } .types button { border-radius: 16px; padding: 9px 16px; } }
@media (max-width: 520px) { .fields { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 10px; } .field .sel select { font-size: 13px; padding-left: 12px; padding-right: 30px; } }
.field { display: grid; gap: 4px; min-width: 0; }
.field > span { font: 500 12px/16px var(--font); color: var(--ink-2); display: inline-flex; align-items: center; gap: 4px; }
.field .sel { width: 100%; }
.field .sel select { width: 100%; height: 40px; font-size: 14px; padding-left: 14px; background-position: calc(100% - 20px) 17px, calc(100% - 14px) 17px; }
.field .fixed { height: 40px; font-size: 14px; }
.primary.small { height: 40px; padding: 0 16px; font-size: 14px; }
details.adv { margin-top: 14px; border-top: 1px solid var(--line); padding-top: 8px; }
details > summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; cursor: pointer; font: 600 14px/20px var(--font); color: var(--ink-2); padding: 6px 0; }
details > summary::-webkit-details-marker { display: none; }
details > summary svg.ic { transition: transform 160ms var(--ease); }
details[open] > summary svg.ic { transform: rotate(180deg); }
details.adv h2, .qcard details h2 { margin: 16px 0 0; font: 700 12px/16px var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.setcard .chead .sub { margin: 0; }

/* the filters */
.filtcard .chead .sub { margin: 0; }
.frow1 { margin-top: 14px; }
.frow1.split { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.seg.wrap { flex-wrap: wrap; border-radius: 20px; }
.chipbtn { display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 14px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink); font: 600 13px/16px var(--font); cursor: pointer; }
.chipbtn:hover { background: var(--well); }
.chipbtn.on { background: var(--accent-wash-strong); border-color: transparent; color: var(--accent-deep); }
.chipbtn svg.ic { width: 16px; height: 16px; }
.inp { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 12px; border: 1px solid var(--line-strong); border-radius: 12px; background: var(--surface); }
.inp:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash-strong); }
.inp input { flex: 1; min-width: 0; border: 0; background: none; color: var(--ink); font: 500 15px/20px var(--mono); outline: none; }
.inp em { font-style: normal; color: var(--ink-2); font: 500 14px/18px var(--mono); }
.field.mini.inline { grid-template-columns: auto 110px; align-items: center; gap: 8px; }
.costs { margin-top: 16px; padding-top: 10px; border-top: 1px solid var(--line); }
.costs .switch { padding-left: 0; }
#results.busy .hero, #results.busy .card:not(.filtcard):not(.setcard), #results.busy .types { opacity: .55; transition: opacity 120ms var(--ease); }

/* the setup types: coloured by their result, clearly tappable */
.types button { transition: background-color 120ms var(--ease); }
.types button:not(.on):hover { background: var(--surface); }
.types button.up small { color: var(--ok); }
.types button.down small { color: var(--bad); }
.types button.up:not(.on) { box-shadow: inset 0 -2px 0 var(--ok); }
.types button.down:not(.on) { box-shadow: inset 0 -2px 0 var(--bad); }
.types button.on.up { box-shadow: inset 0 -2px 0 var(--ok), var(--e-raised); }
.types button.on.down { box-shadow: inset 0 -2px 0 var(--bad), var(--e-raised); }

/* the hero's curve */
.hero canvas.hcurve { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
.hero .info { color: rgb(255 255 255 / 80%); }
.hero .info:hover { color: #fff; }

/* info icons and their tooltips */
.info { display: inline-grid; place-items: center; width: 20px; height: 20px; padding: 0; border: 0; border-radius: 999px; background: none; color: var(--muted); cursor: help; vertical-align: -4px; }
.info:hover { color: var(--ink); }
.info svg.ic { width: 15px; height: 15px; }
svg.ic.inl { width: 13px; height: 13px; vertical-align: -2px; }
.tip .tiptext { margin: 0; max-width: 280px; white-space: normal; }

/* direction rows: tappable, the shown one marked, the best one badged */
tr.pick { cursor: pointer; }
tr.pick:hover td { background: var(--well); }
tr.pick.chosen td { background: var(--accent-wash); font-weight: 600; }
tr.pick.chosen td:first-child { box-shadow: inset 3px 0 0 var(--accent); }
.dline { display: inline-block; width: 14px; height: 3px; border-radius: 2px; margin-right: 8px; vertical-align: 3px; }
.badge { display: inline-block; margin-left: 6px; padding: 1px 7px; border-radius: 999px; background: var(--accent-wash-strong); color: var(--accent-deep); font: 600 11px/16px var(--font); }
.legend button:disabled { opacity: .45; cursor: default; }

/* from setups to trades */
.wf { display: grid; gap: 2px; margin-top: 14px; }
.wrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 6px 0; }
.wrow .wl { font: 500 14px/19px var(--font); }
.wrow .wv { font: 600 14px/18px var(--mono); font-variant-numeric: tabular-nums; text-align: right; }
.wrow .wv.minus { color: var(--ink-2); font-weight: 500; }
.wrow.zero .wl, .wrow.zero .wv { color: var(--muted); }
.wrow .fb { grid-column: 1 / -1; height: 6px; border-radius: 999px; background: var(--well); overflow: hidden; }
.wrow .fb i { display: block; height: 100%; border-radius: 999px; background: var(--line-strong); }
.wrow.top .fb i, .wrow.end .fb i { background: var(--accent); }
.wrow.end { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 10px; }
.wrow.end .wl { font-weight: 600; }


/* the overlays: explanations, hours */
.sheet.explainsheet { width: min(620px, calc(100vw - 24px)); }
.explainbody { margin-top: 12px; font: 400 15px/23px var(--font); color: var(--ink); }
.explainbody p { margin: 0 0 12px; }
.explainbody ul { margin: 0 0 12px; padding-left: 20px; }
.explainbody li + li { margin-top: 8px; }
.sheet .qfoot { margin-top: 20px; }
.sheet .sub { margin: 4px 0 0; font: 500 13px/18px var(--font); color: var(--ink-2); }
.sheet h3 { margin: 18px 0 0; font: 700 12px/16px var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.hgrid { display: grid; grid-template-columns: repeat(8, minmax(0, 1fr)); gap: 6px; margin-top: 10px; }
.hgrid .chip { justify-content: center; padding: 0; font-family: var(--mono); }
@media (max-width: 480px) { .hgrid { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
.quick { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font: 500 13px/18px var(--font); }
.sheet { max-height: min(720px, calc(100vh - 32px)); }
.muted { color: var(--ink-2); }
.hero .freq { margin-top: 4px; font: 500 13px/18px var(--font); color: rgb(255 255 255 / 86%); }
.smtrow { margin-top: 6px; }
.smtrow h2, .qcard .smt h2 { margin: 16px 0 0; font: 700 12px/16px var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }

/* 2026-10-13 (evening): the random pick, the closed advanced step, Continue / Undo below the settings and sticky */
.presel .pick { margin: 14px auto 0; max-width: 460px; padding: 10px 14px; border-radius: 12px; background: var(--well); font: 500 13px/19px var(--font); color: var(--ink); }
.presel #presel_again { margin-top: 8px; }
.advgate .chipbtn { margin-top: 16px; }
.setfoot { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.stickybar { position: fixed; z-index: 30; left: 0; right: 0; margin: 0 auto; width: fit-content; max-width: calc(100vw - 24px); bottom: 16px; display: flex; align-items: center; gap: 8px; padding: 8px 8px 8px 18px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--e-sheet); font: 600 14px/18px var(--font); color: var(--ink); white-space: nowrap; animation: fade 160ms var(--ease) both; }
.stickybar[hidden] { display: none; }
@media (max-width: 480px) { .stickybar { width: auto; left: 12px; right: 12px; justify-content: space-between; padding-left: 14px; } .stickybar > span { display: none; } }

/* the big box's numbers, docked at the bottom until the box's total is on screen */
/* left and width come from the big box (updateMini); fades in (a transform here would undo the placement) */
.minihero { position: fixed; z-index: 29; left: 12px; bottom: 16px; width: calc(100vw - 24px); overflow: hidden; padding: 12px 20px 14px; border-radius: 20px; color: #fff; box-shadow: var(--e-hero);
  background: radial-gradient(90% 120% at 100% 0%, rgb(255 255 255 / 18%) 0%, rgb(255 255 255 / 0%) 50%), linear-gradient(135deg, #0a2417 0%, #0f5132 32%, #1f9d55 68%, #6bdb84 100%); background-size: 100% 100%, 165% 165%; animation: fade 160ms var(--ease) both; }
.minihero > :not(canvas) { position: relative; z-index: 1; }
.minihero canvas.hcurve { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 0; pointer-events: none; }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.minihero.neg { background: radial-gradient(90% 120% at 100% 0%, rgb(255 255 255 / 16%) 0%, rgb(255 255 255 / 0%) 50%), linear-gradient(135deg, #2d0a0a 0%, #7f1d1d 32%, #dc2626 68%, #fca5a5 100%); background-size: 100% 100%, 165% 165%; }
.minihero[hidden] { display: none; }
.minihero .mk { font: 600 10px/12px var(--font); letter-spacing: .06em; text-transform: uppercase; color: rgb(255 255 255 / 80%); }
.minihero .mrow { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-top: 4px; font: 500 13px/18px var(--font); color: rgb(255 255 255 / 88%); }
.minihero .mrow b { font: 600 24px/28px var(--font); color: #fff; margin-right: 4px; }
.types button small.tdir { font: 500 11px/14px var(--font); color: var(--muted); }
.types button.on small.tdir { color: var(--ink-2); }

/* the docked boxes fade out before they hide */
@keyframes fadeout { from { opacity: 1; } to { opacity: 0; } }
.minihero.out, .stickybar.out { animation: fadeout 180ms var(--ease) both; pointer-events: none; }

/* 2026-10-13 (night): the portfolio. The sidebar: docked beside the page on wide screens, over it on small ones */
.side { position: fixed; z-index: 39; top: 0; right: 0; bottom: 0; width: min(360px, 100vw); overflow-y: auto; overscroll-behavior: contain; display: flex; flex-direction: column; gap: 14px; padding: 16px 16px 20px; background: var(--surface); border-left: 1px solid var(--line); box-shadow: var(--e-sheet); animation: slidein 200ms var(--ease) both; }
@keyframes slidein { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
.sidescrim { position: fixed; inset: 0; z-index: 38; background: rgb(26 26 23 / 28%); animation: fade 160ms var(--ease) both; }
@media (min-width: 1200px) {
  body.side-open { padding-right: 360px; }
  body.side-open .sidescrim { display: none; }
  .side { box-shadow: none; }
  body.side-open .stickybar { right: 360px; }
  body.side-open .toast { left: calc(50% - 180px); }
}
.sidehead { display: flex; align-items: center; gap: 8px; }
.sidehead h2 { margin: 0; font: 600 18px/24px var(--font); }
.sidehead .spacer { flex: 1; }
.side .wide { width: 100%; }
.side .chipbtn.on:disabled { cursor: default; }
.sideper { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.sidecap { font: 700 11px/14px var(--font); letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); }
.sideper .seg button { padding: 6px 11px; }
/* the portfolio's combined numbers: a small result box */
.portall { position: relative; display: grid; gap: 2px; width: 100%; text-align: left; border: 0; border-radius: 16px; padding: 14px 16px; cursor: pointer; color: #fff; box-shadow: var(--e-raised); font: inherit;
  background: radial-gradient(90% 120% at 100% 0%, rgb(255 255 255 / 18%) 0%, rgb(255 255 255 / 0%) 50%), linear-gradient(135deg, #0a2417 0%, #0f5132 32%, #1f9d55 68%, #6bdb84 100%); background-size: 100% 100%, 165% 165%; transition: transform 120ms var(--ease); }
.portall:active { transform: scale(.98); }
.portall.neg { background: radial-gradient(90% 120% at 100% 0%, rgb(255 255 255 / 16%) 0%, rgb(255 255 255 / 0%) 50%), linear-gradient(135deg, #2d0a0a 0%, #7f1d1d 32%, #dc2626 68%, #fca5a5 100%); background-size: 100% 100%, 165% 165%; }
.portall .pk { font: 600 10px/12px var(--font); letter-spacing: .06em; text-transform: uppercase; color: rgb(255 255 255 / 82%); }
.portall b { margin-top: 4px; font: 600 28px/32px var(--font); letter-spacing: -.01em; }
.portall span { font: 500 12px/17px var(--font); color: rgb(255 255 255 / 88%); }
.portall .go { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-weight: 600; color: #fff; }
.portall .go svg.ic { width: 14px; height: 14px; }
.portall.none { background: var(--well); color: var(--ink-2); box-shadow: none; cursor: default; }
.portall.none .pk, .portall.none span { color: var(--ink-2); }
/* the strategies */
.portlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.portlist li { display: flex; align-items: flex-start; border: 1px solid var(--line); border-radius: 14px; background: var(--surface); box-shadow: var(--e-raised); transition: border-color 120ms var(--ease); }
.portlist li:hover { border-color: var(--line-strong); }
.portlist li.cur { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-wash-strong); }
.portrow { flex: 1; min-width: 0; display: grid; gap: 2px; padding: 10px 4px 10px 12px; border: 0; border-radius: 14px; background: none; color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
.portrow b { font: 600 14px/19px var(--font); }
.portrow span { font: 500 12px/16px var(--font); color: var(--ink-2); }
.portrow em { margin-top: 2px; font: 600 13px/18px var(--font); font-style: normal; color: var(--ink); }
.portrow em.up { color: var(--ok); }
.portrow em.down { color: var(--bad); }
.portrow em.stale { color: var(--muted); font-weight: 500; }
.portlist .iconbtn { flex: none; width: 32px; height: 32px; margin: 6px 6px 0 0; }
.portlist .iconbtn svg.ic { width: 16px; height: 16px; }
.sidefoot { display: grid; justify-items: start; gap: 0; margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line); }
.sidefoot .text { padding: 0 8px; }
.sidefoot .text:disabled { opacity: .45; cursor: default; background: none; }
/* the portfolio's page and the results page's comparison */
.card.banner { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; font: 500 14px/20px var(--font); }
.card.banner .spacer { flex: 1; }
.pmode { margin-top: 16px; }
.legend .lg { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px 4px 0; font: 500 13px/16px var(--font); color: var(--ink); }
.legend .lg i { width: 10px; height: 10px; border-radius: 999px; }
.withgrid { display: grid; gap: 8px 24px; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .withgrid { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; } .withgrid .tw { margin-right: 0; } }
.chartbox.small canvas { height: 220px; }
#withport .hint { margin-top: 12px; }
#portBtn svg.ic { width: 16px; height: 16px; }

/* the run screen's loading animation while the engine works (the curves come after it) */
.scanvas .sload { position: absolute; inset: 0; display: grid; place-content: center; justify-items: center; gap: 12px; color: var(--ink-2); font: 500 13px/18px var(--font); text-align: center; padding: 0 16px; transition: opacity 200ms var(--ease); }
.scanvas .sload.out { opacity: 0; }
.sload .spin { width: 28px; height: 28px; border-radius: 999px; border: 3px solid var(--line-strong); border-top-color: var(--accent); animation: spin 800ms linear infinite; }
.sload .slbar { width: min(260px, 70vw); height: 4px; border-radius: 999px; background: var(--line-strong); overflow: hidden; }
.sload .slbar i { display: block; width: 0; height: 100%; border-radius: 999px; background: var(--accent); transition: width 120ms linear; }

/* why the setup-type tabs don't add up to "All combined" */
.typenote { margin: 8px 0 0; max-width: 820px; font: 500 12px/17px var(--font); color: var(--ink-2); }

/* Fixed R / Compound % beside the setup-type tabs */
.typerow { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-top: 8px; }
.typerow .types { margin-top: 0; }
.modebox { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-left: auto; }
@media (max-width: 600px) { .modebox { margin-left: 0; } }
/* the best direction changed: before and after */
.sheet.dirsheet { width: min(560px, calc(100vw - 24px)); }
table.dirchg td small { display: block; font: 500 11px/14px var(--font); color: var(--ink-2); }
table.dirchg td.best { font-weight: 600; }
table.dirchg td .badge { margin-left: 4px; }

/* the settings and filters cards: closed at first, a line sums them up */
.ctoggle { display: flex; align-items: center; gap: 12px; width: 100%; padding: 0; border: 0; background: none; color: var(--ink); text-align: left; cursor: pointer; font: inherit; }
.ctoggle .ctitle { flex: none; font: 600 15px/22px var(--font); }
.ctoggle .csum { flex: 1; min-width: 0; font: 500 12px/17px var(--font); color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ctoggle svg.ic { flex: none; color: var(--ink-2); transition: transform 160ms var(--ease); }
.ctoggle[aria-expanded="true"] svg.ic { transform: rotate(180deg); }
.ctoggle:hover svg.ic, .ctoggle:hover .ctitle { color: var(--accent-deep); }
.setcard.changed .ctoggle .csum { color: var(--accent-deep); }
.card.closed .cbody { display: none; }
@media (max-width: 600px) { .ctoggle { flex-wrap: wrap; } .ctoggle .csum { order: 3; flex-basis: 100%; white-space: normal; } .ctoggle svg.ic { margin-left: auto; } }

/* "Add to portfolio": the selection to confirm */
.sheet.addsheet { width: min(560px, calc(100vw - 24px)); }
.addsheet .pick { margin: 12px 0 0; padding: 10px 14px; border-radius: 12px; background: var(--well); font: 500 13px/19px var(--font); color: var(--ink); }
.addsheet .seg { margin-top: 8px; }
.addres { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; margin-top: 18px; }
.addres b { font: 600 26px/30px var(--font); letter-spacing: -.01em; }
.addres span { font: 500 13px/18px var(--font); color: var(--ink-2); }

/* signing in: the user in the header, the screens before the backtester */
.userbox { display: inline-flex; align-items: center; gap: 2px; }
.userbox .uname { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 500 13px/18px var(--font); color: var(--ink-2); padding-left: 6px; }
@media (max-width: 600px) { .userbox .uname { display: none; } .brand .tag { display: none; } }
.presel.gate .primary { margin-top: 20px; text-decoration: none; }
.presel.gate p .text { margin-top: 12px; }
.gatemsg { margin: 14px 0 0; font: 500 13px/18px var(--font); color: var(--bad); }

/* the run screen's button: "Backtesting …" with a spinner while it runs, then the way to the results */
.primary.busy { cursor: progress; opacity: .9; }
.primary.busy:active { transform: none; filter: none; }
.primary .spin { width: 16px; height: 16px; border-radius: 999px; border: 2px solid rgb(255 255 255 / 30%); border-top-color: currentColor; animation: spin 800ms linear infinite; }
:root[data-theme="dark"] .primary .spin { border-color: rgb(0 0 0 / 25%); border-top-color: currentColor; }

/* the sign-in screen's buttons: sign in, and join for those who aren't members yet */
.gatebtns { display: flex; flex-direction: column; align-items: center; gap: 10px; margin-top: 20px; }
.gatebtns .primary, .gatebtns .secondary { min-width: 280px; text-decoration: none; }
.presel.gate .gatebtns .primary { margin-top: 0; }
.secondary { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 48px; padding: 0 22px; border: 1px solid var(--line-strong); border-radius: 999px; background: var(--surface); color: var(--ink); font: 600 15px/20px var(--font); cursor: pointer; transition: background-color 120ms var(--ease); }
.secondary:hover { background: var(--well); }
@media (max-width: 480px) { .gatebtns .primary, .gatebtns .secondary { min-width: 0; width: 100%; } }
