/* Shared by every page of the site. */
:root {
  /* The Rally Riders: deep-space navy, the porthole's blue for links, the nose
     cone's red for buttons and a flame stripe under the header */
  --bg: #f3f5fa; --surface: #ffffff; --sunk: #e8ecf4; --ink: #0f1a30; --muted: #535e78; --line: #d5dbe7;
  --accent: #1a5cc4; --accent-ink: #ffffff; --brand: #c9381b; --brand-ink: #ffffff;
  --space: #0d1733; --space-2: #1c2d5c; --flame: linear-gradient(90deg, #c9381b, #ee6a1e 55%, #f7b733);
  --good: #16784a; --good-bg: #e2f3ea; --mixed: #9a6200; --mixed-bg: #fbf0d9; --avoid: #b3261e; --avoid-bg: #fbe5e2;
  --scrim: rgba(13, 17, 23, .62);
  --display: "Archivo", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --body: "Source Sans 3", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a1122; --surface: #121b2e; --sunk: #18233a; --ink: #e8edf6; --muted: #9ba8c0; --line: #26314a;
    --accent: #7fb1ff; --accent-ink: #0a1122; --brand: #ff7a4d; --brand-ink: #0a1122; --space: #08102a; --space-2: #16244d; --good: #4cc48b; --good-bg: #13291f; --mixed: #e3ad45; --mixed-bg: #2c2312;
    --avoid: #ff8173; --avoid-bg: #33181a; --scrim: rgba(0, 0, 0, .72); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a1122; --surface: #121b2e; --sunk: #18233a; --ink: #e8edf6; --muted: #9ba8c0; --line: #26314a;
  --accent: #7fb1ff; --accent-ink: #0a1122; --brand: #ff7a4d; --brand-ink: #0a1122; --space: #08102a; --space-2: #16244d; --good: #4cc48b; --good-bg: #13291f; --mixed: #e3ad45; --mixed-bg: #2c2312;
  --avoid: #ff8173; --avoid-bg: #33181a; --scrim: rgba(0, 0, 0, .72); color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 16px; line-height: 1.5;
  padding: 28px max(16px, env(safe-area-inset-right, 0px)) 48px max(16px, env(safe-area-inset-left, 0px));
}
a { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
button { font: inherit; cursor: pointer; }
.wrap { max-width: 1320px; margin: 0 auto; display: grid; gap: 22px; }
.wrap.narrow { max-width: 860px; }

/* the report beside a short "New here?" sidebar; stacked on narrow screens */
.layout { display: grid; gap: 22px; grid-template-columns: minmax(0, 1fr); align-items: start; }
.main { display: grid; gap: 22px; min-width: 0; }
.side { min-width: 0; display: grid; gap: 22px; align-content: start; }
.side .panel { gap: 12px; }
@media (min-width: 1060px) { .layout { grid-template-columns: minmax(0, 1fr) 330px; } }
.side-md { font-size: 14.5px; }
.side-md h4 { font-family: var(--display); font-stretch: 88%; font-weight: 700; font-size: 14px; letter-spacing: .03em; text-transform: uppercase; color: var(--accent); margin: 14px 0 2px; }
.side-md h4:first-child { margin-top: 0; }
.side-md p, .side-md ul { margin: 4px 0; }
.side-md li { margin: 3px 0; }
.howlink { display: block; text-align: center; background: var(--brand); color: var(--brand-ink); border-radius: 8px; padding: 10px 14px; font-family: var(--display); font-stretch: 85%; font-weight: 700; font-size: 18px; letter-spacing: .02em; text-decoration: none; }
.howlink:hover { filter: brightness(1.08); }
.summary p { font-size: 16.5px; color: var(--ink); max-width: 76ch; margin: 0 0 10px; }

/* How it works page */
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 18px; }
.toc h2 { font-size: 15px; font-stretch: 88%; letter-spacing: .03em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }
.toc ol { margin: 0; padding-left: 22px; columns: 2 220px; column-gap: 28px; font-size: 15px; }
.toc li { margin: 2px 0; break-inside: avoid; }
.explainer h2 { scroll-margin-top: 16px; }
.explainer h2:first-child { border-top: 0; padding-top: 0; margin-top: 0; }
.back { font-size: 15px; }

header { display: grid; gap: 6px; }
.brand { display: flex; align-items: center; gap: 18px; padding: 16px 20px 18px; border-radius: 14px; color: #ffffff;
  background: var(--flame) bottom / 100% 5px no-repeat, linear-gradient(135deg, var(--space), var(--space-2)); }
.brand .eyebrow { color: #b8c4de; }
.brand-text { display: grid; gap: 6px; min-width: 0; }
.contact { margin: 0; font-size: 14px; color: var(--muted); }
.brand .contact { color: #b8c4de; }
.brand .contact a { color: #ffffff; }
.logo { width: 96px; height: 96px; flex: none; filter: drop-shadow(0 2px 6px rgba(0, 0, 0, .35)); }
@media (max-width: 520px) { .logo { width: 68px; height: 68px; } .brand { gap: 12px; padding: 12px 14px 15px; } }
.eyebrow { font-family: var(--mono); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
h1 { font-family: var(--display); font-stretch: 78%; font-weight: 800; font-size: clamp(30px, 5vw, 44px); line-height: 1.02; margin: 0; letter-spacing: -.01em; text-wrap: balance; }
.lede { margin: 0; color: var(--muted); max-width: 64ch; }

/* search slip */
.slip { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px; display: grid; gap: 12px; }
.slip label { font-family: var(--display); font-stretch: 85%; font-weight: 700; font-size: 15px; letter-spacing: .02em; text-transform: uppercase; }
.row { display: flex; gap: 10px; flex-wrap: wrap; }
.field { flex: 1 1 260px; display: flex; align-items: center; gap: 8px; background: var(--sunk); border: 1px solid var(--line); border-radius: 8px; padding: 0 12px; min-width: 0; }
.field:focus-within { border-color: var(--accent); }
.field span { font-family: var(--mono); color: var(--muted); font-size: 20px; }
#q { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font-family: var(--mono); font-size: 22px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; padding: 12px 0; }
#q:focus { outline: none; }
#q::-webkit-calendar-picker-indicator { display: none !important; }
#q::placeholder { color: var(--muted); opacity: .6; text-transform: none; letter-spacing: 0; font-size: 18px; }
.go { background: var(--brand); color: var(--brand-ink); border: 0; border-radius: 8px; padding: 12px 22px; font-family: var(--display); font-stretch: 85%; font-weight: 700; font-size: 18px; letter-spacing: .02em; }
.go:disabled { opacity: .5; cursor: not-allowed; }
.hint { margin: 0; font-size: 14px; color: var(--muted); }
.hint.err { color: var(--avoid); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; font-size: 14px; color: var(--muted); }
.chip { font-family: var(--mono); font-size: 13px; background: transparent; border: 1px solid var(--line); color: var(--ink); border-radius: 999px; padding: 2px 10px; }
.chip:hover { border-color: var(--accent); }
.chips.also { margin-bottom: 10px; }
.chips .chip { max-width: 100%; text-align: left; }

/* panels */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 18px 20px 22px; display: grid; gap: 14px; min-width: 0; }
.panel > *, .card > *, #daily-body > * { min-width: 0; }
#daily-body { display: grid; gap: 12px; }
.panel-head { display: flex; gap: 6px 16px; justify-content: space-between; align-items: baseline; flex-wrap: wrap; border-bottom: 2px solid var(--ink); padding-bottom: 10px; }
h2 { font-family: var(--display); font-stretch: 82%; font-weight: 800; font-size: 26px; line-height: 1.1; margin: 0; }
.stamp { font-family: var(--mono); font-size: 12.5px; color: var(--muted); max-width: 100%; }
.sub { font-family: var(--display); font-stretch: 88%; font-weight: 700; font-size: 15px; letter-spacing: .03em; text-transform: uppercase; margin: 6px 0 -6px; color: var(--accent); }
@media (max-width: 560px) { .panel { padding: 16px 14px 18px; } .card { padding: 14px 12px 16px; } h2 { font-size: 23px; } }
.note { margin: 0; font-size: 14.5px; color: var(--muted); max-width: 78ch; }
.regime { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 14px; color: var(--muted); }

.pill { font-family: var(--mono); font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; border-radius: 4px; padding: 2px 7px; background: var(--sunk); color: var(--muted); white-space: nowrap; display: inline-block; }
.pill.good, .pill.ENTER { background: var(--good-bg); color: var(--good); }
.pill.mixed, .pill.WATCH { background: var(--mixed-bg); color: var(--mixed); }
.pill.avoid, .pill.DROPPED, .pill.dropped { background: var(--avoid-bg); color: var(--avoid); }
.pill.active { color: var(--ink); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 6px; }
table { border-collapse: collapse; width: 100%; font-size: 14.5px; font-variant-numeric: tabular-nums; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { font-family: var(--mono); font-size: 11.5px; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); background: var(--sunk); white-space: nowrap; font-weight: 600; }
tr:last-child td { border-bottom: 0; }
td.num, th.num { text-align: right; white-space: nowrap; }
td.whycol { min-width: 260px; }
/* the reasons sit under the ticker, so the weekly table needs no Why column */
.why-under { margin-top: 8px; min-width: 190px; max-width: 290px; font-size: 12.5px; line-height: 1.35; color: var(--muted); }
.why-under .plain-line { font-size: 13.5px; }
.why-under .why { font-size: 12px; }
.swipe-hint { margin: 0 0 6px; font-size: 13.5px; font-weight: 600; color: var(--accent); }
/* phones: keep the ticker (and its reasons) in view while the numbers swipe past */
@media (max-width: 700px) {
  table.picks td:nth-child(2), table.picks th:nth-child(2) { position: sticky; left: 0; z-index: 1; background: var(--surface); box-shadow: 1px 0 0 var(--line); }
  table.picks th:nth-child(2) { background: var(--sunk); }
  .why-under { min-width: 170px; max-width: 200px; }
  table.picks th, table.picks td { padding: 7px 8px; }
}
.tick { font-family: var(--mono); font-weight: 600; font-size: 15px; letter-spacing: .03em; background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.tick.big { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 1px; padding: 5px 9px; border: 1.5px solid var(--accent); border-radius: 6px; text-decoration: none; cursor: pointer; }
.tick.big .tick-go { font-family: var(--body); font-size: 11.5px; font-weight: 600; letter-spacing: 0; white-space: nowrap; }
tr.pick { cursor: pointer; }
/* odds shared by the model's top group: the number opens a short "why" pop-up */
.odds-tip { position: relative; font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: help; text-decoration: underline dotted; text-underline-offset: 3px; white-space: nowrap; }
.odds-tip .tip-i { margin-left: 3px; font-size: 12px; color: var(--accent); text-decoration: none; display: inline-block; }
.odds-pop { position: fixed; z-index: 50; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; font-size: 13.5px; line-height: 1.4; box-shadow: 0 6px 22px rgba(0, 0, 0, .22); pointer-events: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.seen { display: block; max-width: 9em; margin-top: 4px; font-size: 11px; line-height: 1.25; color: var(--muted); }
/* the day a stock was picked, under its ticker; kept picks from an earlier list say how many days they have left */
.picked { display: block; max-width: 12em; margin-top: 5px; font-size: 11.5px; font-weight: 600; line-height: 1.25; color: var(--ink); }
tr.carried-head th { background: var(--sunk); border-top: 2px solid var(--line); padding: 8px 10px; text-align: left;
  font-family: var(--body); font-size: 14px; font-weight: 700; text-transform: none; letter-spacing: 0; color: var(--ink); }
/* the label stays in view, and wraps, while the table swipes sideways on a phone */
tr.carried-head th span { position: sticky; left: 10px; display: inline-block; max-width: min(100%, calc(100vw - 72px)); white-space: normal; }
tr.carried .picked { color: var(--mixed); }
/* under the odds, once a pick closed at its 5% target */
.reached { display: block; margin-top: 4px; font-size: 12px; font-weight: 700; line-height: 1.25; color: var(--good); white-space: nowrap; }
.reached-note { display: block; font-size: 11.5px; line-height: 1.25; color: var(--muted); white-space: nowrap; }
.weeks { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.weeklink { width: 100%; text-align: left; background: var(--sunk); border: 1px solid var(--line); border-radius: 8px; padding: 9px 12px; font: inherit; font-weight: 600; color: var(--accent); cursor: pointer; }
.weeklink:hover { border-color: var(--accent); }
@media (hover: hover) {
  .tick.big:hover, tr.pick:hover .tick.big { background: var(--accent); color: var(--accent-ink); }
  tr.pick:hover td { background: var(--sunk); }
}
/* the moving strip above the weekly table: picks at their 5% target so far */
.news { display: flex; align-items: stretch; margin: 18px 0 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--sunk); font-size: 15px; }
.news-label { flex: none; display: flex; align-items: center; max-width: 11em; padding: 8px 12px; background: var(--good); color: var(--accent-ink); font-family: var(--display); font-stretch: 88%; font-weight: 700; font-size: 14px; letter-spacing: .03em; text-transform: uppercase; line-height: 1.2; }
.news-window { flex: 1; min-width: 0; overflow: hidden; display: flex; align-items: center; -webkit-mask-image: linear-gradient(to right, transparent, #000 14px, #000 calc(100% - 22px), transparent); mask-image: linear-gradient(to right, transparent, #000 14px, #000 calc(100% - 22px), transparent); }
.news-track { display: flex; width: max-content; animation: news-roll var(--news-s, 30s) linear infinite; }
.news-run { display: flex; flex: none; }
.news-item { flex: none; white-space: nowrap; padding: 8px 0 8px 26px; }
.news-item::after { content: "•"; margin-left: 26px; color: var(--muted); }
.news-item .tick { font-size: 15px; margin-right: 6px; }
.news-gain { font-family: var(--mono); font-weight: 600; color: var(--good); font-variant-numeric: tabular-nums; }
.news-none { margin: 0; padding: 8px 14px; color: var(--muted); }
.news-pause { flex: none; border: 0; border-left: 1px solid var(--line); background: none; color: var(--muted); padding: 0 12px; font-size: 13px; }
.news-pause:hover { color: var(--ink); }
.news.paused .news-track, .news:hover .news-track, .news:focus-within .news-track { animation-play-state: paused; }
@keyframes news-roll { to { transform: translateX(-50%); } }
/* phones: the label sits on top so the moving line gets the full width */
@media (max-width: 560px) { .news { flex-wrap: wrap; font-size: 14px; } .news-label { flex-basis: 100%; max-width: none; font-size: 12.5px; padding: 5px 12px; } .news-window { flex-basis: 60%; } .news-item { padding-left: 18px; } .news-item::after { margin-left: 18px; } .news-pause { padding: 8px 12px; } }
/* no motion wanted: the strip stands still and wraps, listed once */
@media (prefers-reduced-motion: reduce) {
  .news-track { animation: none; width: auto; flex: 1; min-width: 0; }
  .news-run { flex-wrap: wrap; flex: 1; }
  .news-run[aria-hidden], .news-item[data-copy], .news-pause { display: none; }
  .news-item { padding: 6px 14px; }
  .news-item::after { content: none; }
  .news-window { -webkit-mask-image: none; mask-image: none; }
}
.tap-hint { margin: 18px 0 8px; padding: 10px 14px; border-left: 3px solid var(--accent); background: var(--sunk); border-radius: 0 6px 6px 0; font-size: 15px; }
.why { display: block; font-size: 13px; color: var(--muted); margin-top: 2px; max-width: 34ch; }
tr.out td:not(:first-child):not(:nth-child(2)):not(:nth-child(3)) { opacity: .55; }
.context { font-size: 14.5px; color: var(--muted); display: grid; gap: 6px; border-top: 1px solid var(--line); padding-top: 12px; }
.context p { margin: 0; max-width: 84ch; }
.context strong { color: var(--ink); }

/* search results */
#results { scroll-margin-top: 16px; }
.loading { display: flex; gap: 14px; align-items: center; padding: 18px 4px; color: var(--muted); font-size: 16px; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 4px solid var(--sunk); border-top-color: var(--accent); animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }
.cards { display: grid; gap: 18px; }
.card { border: 1px solid var(--line); border-radius: 8px; padding: 16px 18px 20px; display: grid; gap: 14px; min-width: 0; }
.card-head { display: flex; gap: 8px 10px; align-items: center; flex-wrap: wrap; border-bottom: 1px solid var(--line); padding-bottom: 10px; }
.card-head .sym { font-family: var(--display); font-stretch: 85%; font-weight: 700; font-size: 15px; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.card-head .coname { font-weight: 600; font-size: 15px; color: var(--ink); }
.missing { background: var(--sunk); border-radius: 8px; padding: 12px 14px; display: grid; gap: 8px; }
.missing p { margin: 0; }
.err { color: var(--avoid); }

/* the report text */
.md { min-width: 0; font-size: 15.5px; }
.md > :first-child { margin-top: 0; }
.md h1 { font-family: var(--display); font-stretch: 78%; font-weight: 800; font-size: clamp(22px, 3vw, 30px); line-height: 1.1; margin: 0 0 10px; text-wrap: balance; }
.md h2 { font-family: var(--display); font-stretch: 82%; font-weight: 800; font-size: 24px; margin: 26px 0 6px; padding-top: 14px; border-top: 2px solid var(--ink); text-wrap: balance; }
.md blockquote { margin: 10px 0; padding: 8px 12px; border-left: 3px solid var(--line); color: var(--muted); font-size: 14.5px; max-width: 76ch; }
.md blockquote p { margin: 0; }
.md strong { color: var(--ink); }
.md h3 { font-family: var(--display); font-stretch: 88%; font-weight: 700; font-size: 17px; letter-spacing: .02em; text-transform: uppercase; margin: 22px 0 6px; color: var(--accent); }
.md h4 { font-family: var(--display); font-stretch: 90%; font-weight: 700; font-size: 15px; margin: 18px 0 6px; }
.md p, .md ul { max-width: 76ch; margin: 8px 0; }
.md ul { padding-left: 20px; }
.md .table-wrap { margin: 10px 0; }
.md table { font-size: 14px; }
.md td:first-child { white-space: nowrap; }
.md code { font-family: var(--mono); font-size: .9em; background: var(--sunk); padding: 0 4px; border-radius: 3px; }

/* a pick's plain-English summary, above its three steps, and its line in the table */
.plain { background: color-mix(in srgb, var(--accent) 8%, var(--surface)); border-radius: 8px; padding: 12px 16px; margin: 12px 0 4px; display: grid; gap: 6px; max-width: 80ch; }
.plain-head { font-family: var(--display); font-stretch: 88%; font-weight: 700; font-size: 15px; letter-spacing: .03em; text-transform: uppercase; color: var(--accent); }
.md .plain p { margin: 0; max-width: none; }
.plain p:not(.plain-by) { font-size: 16.5px; line-height: 1.55; }
.plain-by { font-size: 13px; color: var(--muted); }
.plain-line { display: block; font-size: 14.5px; color: var(--ink); max-width: 46ch; margin-bottom: 4px; }

footer { font-size: 13px; color: var(--muted); max-width: 80ch; display: grid; gap: 6px; }
footer p { margin: 0; }
.linkish { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; font-size: inherit; }

/* disclaimer gate */
.gate { position: fixed; inset: 0; z-index: 10; background: var(--scrim); display: grid; place-items: center; padding: 16px; overflow-y: auto; }
.accepted .gate { display: none; }
.gate-card { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; max-width: 640px; width: 100%; padding: 22px 22px 20px; display: grid; gap: 12px; box-shadow: 0 20px 60px rgba(0,0,0,.25); max-height: calc(100dvh - 32px); overflow-y: auto; }
.gate-card h2 { font-size: 28px; }
.gate-text { display: grid; gap: 10px; font-size: 15px; }
.gate-text p { margin: 0; }
.agree { display: flex; gap: 10px; align-items: flex-start; font-weight: 600; background: var(--sunk); border-radius: 8px; padding: 10px 12px; cursor: pointer; }
.agree input { width: 18px; height: 18px; margin-top: 3px; flex: none; accent-color: var(--accent); }
.gate-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }
.leave { font-size: 15px; color: var(--muted); }
