[hidden] { display: none !important; }

/* The Daily Trace: black and white, with color only inside charts. Mobile first. */

:root {
  --ink: #0a0a0a;
  --ink-2: #3f3f46;
  --muted: #71717a;
  --line: #e4e4e7;
  --line-strong: #d4d4d8;
  --paper: #ffffff;
  --wash: #fafafa;
  --radius: 14px;
  --gutter: 16px;
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 120px; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 16px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, canvas, svg { max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.2; margin: 0; letter-spacing: -0.01em; }
h2 { font-size: 1.375rem; margin-bottom: 20px; }
h3 { font-size: 1.0625rem; }
p { margin: 0 0 12px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.num { font-variant-numeric: tabular-nums; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 28px; } h2 { font-size: 1.625rem; } }

/* --- Header ------------------------------------------------------------- */
.topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.topbar-inner { display: flex; align-items: center; justify-content: space-between; height: 56px; gap: 12px; }
/* The name, set like a newspaper headline (Playfair Display Black, OFL, served from /fonts). */
@font-face { font-family: "Daily Trace"; font-weight: 900; font-display: swap; src: url("/fonts/playfair-display-900.woff2") format("woff2"); }
.brand { font-family: "Daily Trace", Georgia, "Times New Roman", serif; font-weight: 900; font-size: 1.375rem; text-decoration: none; letter-spacing: -0.01em; color: var(--ink); white-space: nowrap; }
.account { display: flex; align-items: center; gap: 8px; min-width: 0; }
.account .email { max-width: 34vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.875rem; color: var(--muted); }

.sectionnav { border-top: 1px solid var(--line); }
.sectionnav-inner {
  display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none;
  padding-top: 6px; padding-bottom: 6px;
}
.sectionnav-inner::-webkit-scrollbar { display: none; }
.sectionnav a {
  flex: none; text-decoration: none; font-size: 0.875rem; color: var(--ink-2);
  padding: 6px 12px; border-radius: 999px; white-space: nowrap;
}
.sectionnav a:hover, .sectionnav a:focus-visible { background: var(--wash); color: var(--ink); }

/* --- Ticker strip: scrolls inside itself, never the page ----------------- */
.tickerstrip {
  display: flex; gap: 0; overflow-x: auto; scrollbar-width: none;
  border-bottom: 1px solid var(--line); background: var(--wash);
  scroll-snap-type: x proximity;
}
.tickerstrip::-webkit-scrollbar { display: none; }
.tick {
  flex: none; display: grid; grid-template-columns: auto auto; column-gap: 8px; align-items: baseline;
  padding: 10px 16px; border-right: 1px solid var(--line); scroll-snap-align: start;
  text-decoration: none; min-width: 0;
}
.tick b { font-size: 0.8125rem; letter-spacing: 0.02em; }
.tick .p { font-size: 0.875rem; }
.tick .c { grid-column: 2; font-size: 0.75rem; color: var(--muted); }
.tick .na { grid-column: 1 / -1; font-size: 0.75rem; color: var(--muted); }

/* --- Sections ------------------------------------------------------------ */
.section { padding: 40px 0; border-bottom: 1px solid var(--line); }
@media (min-width: 720px) { .section { padding: 64px 0; } }
.eyebrow {
  text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.75rem; font-weight: 700;
  color: var(--muted); margin-bottom: 8px;
}
.loading { color: var(--muted); padding: 24px 0; }

.banner {
  margin-top: 16px; padding: 12px 14px; border: 1px dashed var(--line-strong); border-radius: 10px;
  font-size: 0.875rem; color: var(--ink-2); background: var(--wash);
}
.banner strong { color: var(--ink); }

/* --- Summary ------------------------------------------------------------- */
.hero-stat { font-size: clamp(2.75rem, 12vw, 4.5rem); font-weight: 800; letter-spacing: -0.04em; line-height: 1; }
.hero-line { font-size: clamp(1.125rem, 4.5vw, 1.5rem); font-weight: 600; max-width: 34ch; margin: 10px 0 24px; line-height: 1.3; }
.kpis { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 24px 0; }
@media (min-width: 720px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
.kpi { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.kpi .label { font-size: 0.8125rem; color: var(--muted); margin-bottom: 6px; }
.kpi .value { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; }
.kpi .sub { font-size: 0.875rem; color: var(--ink-2); margin-top: 4px; }
.briefing { border-left: 3px solid var(--ink); padding: 4px 0 4px 16px; margin: 24px 0; max-width: 70ch; }
.briefing p { color: var(--ink-2); }

/* --- Status chips (monochrome) --------------------------------------------- */
.status {
  display: inline-flex; align-items: center; gap: 6px; font-size: 0.8125rem; font-weight: 600;
  padding: 4px 10px; border-radius: 999px; white-space: nowrap; border: 1px solid var(--ink);
}
.status.good { background: var(--ink); color: #fff; }
.status.bad { background: #fff; color: var(--ink); }
.status.neutral { border-color: var(--line-strong); color: var(--muted); }

/* --- Buttons, forms -------------------------------------------------------- */
.btn {
  appearance: none; border: 1px solid var(--ink); background: #fff; color: var(--ink);
  font: inherit; font-weight: 600; font-size: 0.9375rem; border-radius: 10px;
  padding: 10px 16px; min-height: 44px; cursor: pointer; text-decoration: none;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-primary { background: var(--ink); color: #fff; }
.btn-ghost { border-color: transparent; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: 0.875rem; }
.btn:focus-visible, a:focus-visible, summary:focus-visible, input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--ink); text-decoration: underline; cursor: pointer; }

input[type="number"], input[type="email"], input[type="password"], input[type="text"] {
  width: 100%; font: inherit; font-size: 1rem; padding: 12px 14px; min-height: 48px;
  border: 1px solid var(--line-strong); border-radius: 10px; background: #fff; color: var(--ink);
}
label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 14px; }
label input { margin-top: 6px; }

.segmented { display: flex; border: 1px solid var(--line-strong); border-radius: 10px; padding: 3px; gap: 3px; }
.segmented button {
  flex: 1; border: 0; background: transparent; font: inherit; font-size: 0.875rem; font-weight: 600;
  padding: 8px 6px; border-radius: 7px; min-height: 40px; color: var(--ink-2); cursor: pointer;
}
.segmented button[aria-pressed="true"] { background: var(--ink); color: #fff; }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)) 20px; padding: 2px var(--gutter); }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1px solid var(--line-strong); background: #fff; color: var(--ink-2);
  font: inherit; font-size: 0.875rem; padding: 7px 14px; border-radius: 999px; cursor: pointer; min-height: 36px;
}
.chip[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }

/* --- Charts ---------------------------------------------------------------- */
.chartbox { position: relative; width: 100%; height: 280px; }
.chartbox.tall { height: 320px; }
.chartbox.small { height: 170px; }
@media (min-width: 720px) { .chartbox { height: 340px; } .chartbox.tall { height: 380px; } }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 0.8125rem; color: var(--ink-2); margin: 12px 0 0; }
.legend i { display: inline-block; width: 18px; height: 3px; border-radius: 2px; vertical-align: middle; margin-right: 6px; }
.legend i.dash { background: repeating-linear-gradient(90deg, currentColor 0 4px, transparent 4px 7px) !important; }

/* --- Panels, grids ------------------------------------------------------------ */
.panel { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; background: #fff; }
@media (min-width: 720px) { .panel { padding: 24px; } }
.grid2 { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .grid2 { grid-template-columns: 1.6fr 1fr; gap: 24px; } }
.stack > * + * { margin-top: 16px; }

.verdict { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; margin-bottom: 16px; }
.verdict .big { font-size: 1.25rem; font-weight: 700; }

.scenario-list { list-style: none; padding: 0; margin: 0; }
.scenario-list li { padding: 14px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 14px 1fr auto; gap: 4px 12px; align-items: baseline; }
.scenario-list li:first-child { border-top: 0; }
.scenario-list .dot { width: 10px; height: 10px; border-radius: 50%; }
.scenario-list .pct { font-weight: 700; font-size: 1.125rem; }
.scenario-list .desc { grid-column: 2 / -1; font-size: 0.875rem; color: var(--muted); }

.timeline { display: grid; gap: 12px; grid-template-columns: 1fr; margin-top: 20px; }
@media (min-width: 720px) { .timeline { grid-template-columns: repeat(3, 1fr); } }
.phase { border-top: 2px solid var(--ink); padding-top: 12px; }
.phase .when { font-size: 0.75rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.phase p { font-size: 0.9375rem; color: var(--ink-2); margin: 4px 0 0; }

/* --- Stock cards -------------------------------------------------------------- */
.cards { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .cards { grid-template-columns: repeat(2, 1fr); gap: 20px; } }
@media (min-width: 1100px) { .cards { grid-template-columns: repeat(3, 1fr); } }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; }
.card-head .sym { font-weight: 800; font-size: 1.125rem; letter-spacing: 0.01em; }
.card-head .name { font-size: 0.875rem; color: var(--muted); }
.card-head .price { text-align: right; }
.card-head .price b { font-size: 1.125rem; display: block; }
.card-head .price span { font-size: 0.8125rem; color: var(--muted); }
.card .role { font-size: 0.9375rem; color: var(--ink-2); margin: 0; }
.tag { display: inline-block; font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; color: var(--muted); }

.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--line); border-radius: 10px; }
.stats > div { padding: 10px 8px; text-align: center; min-width: 0; }
.stats > div + div { border-left: 1px solid var(--line); }
.stats .k { font-size: 0.6875rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
.stats .v { font-weight: 700; font-size: 1rem; }
.rowline { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 0.875rem; }

/* --- Expandable proof --------------------------------------------------------- */
details.proof { border-top: 1px solid var(--line); padding-top: 4px; }
details.proof > summary {
  list-style: none; cursor: pointer; font-size: 0.875rem; font-weight: 600; padding: 10px 0; min-height: 44px;
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
}
details.proof > summary::-webkit-details-marker { display: none; }
details.proof > summary::after { content: "+"; font-size: 1.25rem; font-weight: 400; line-height: 1; }
details.proof[open] > summary::after { content: "–"; }
.proof-body { font-size: 0.9375rem; color: var(--ink-2); padding-bottom: 8px; }
.proof-body h4 { font-size: 0.8125rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 14px 0 6px; }
.claim { padding: 10px 0; border-top: 1px dashed var(--line); }
.claim:first-of-type { border-top: 0; }
.claim .badge { font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; border: 1px solid var(--line-strong); border-radius: 4px; padding: 1px 6px; margin-right: 6px; white-space: nowrap; }
.claim .badge.supported, .claim .badge.reference { border-color: var(--ink); color: var(--ink); }
.claim .badge.contradicted { background: var(--ink); color: #fff; border-color: var(--ink); }
.claim .badge.unverified, .claim .badge.unclear { color: var(--muted); }
.claim .badge.partly_supported { border-color: var(--ink); color: var(--ink); border-style: dashed; }
.links { list-style: none; padding: 0; margin: 6px 0 0; }
.links li { margin: 4px 0; }
.links a { font-size: 0.875rem; word-break: break-word; }

/* --- Planner ------------------------------------------------------------------ */
.planner-form { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .planner-form { grid-template-columns: 1.2fr 1fr 1.4fr auto; align-items: end; } .planner-form label { margin: 0; } }
.fieldlabel { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 6px; }
.alloc-table { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.alloc-table th { text-align: left; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); font-weight: 700; padding: 8px 6px; border-bottom: 1px solid var(--line-strong); }
.alloc-table td { padding: 10px 6px; border-bottom: 1px solid var(--line); }
.alloc-table td.r, .alloc-table th.r { text-align: right; }
.bar { height: 6px; background: var(--line); border-radius: 3px; margin-top: 4px; overflow: hidden; }
.bar span { display: block; height: 100%; background: var(--ink); }
@media (max-width: 520px) { .alloc-table .hide-sm { display: none; } }

/* --- News --------------------------------------------------------------------- */
.newslist { border-top: 1px solid var(--line); }
details.news { border-bottom: 1px solid var(--line); }
details.news > summary { list-style: none; cursor: pointer; padding: 16px 0; display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
/* The tag sits on its own line under the headline, the same small size on every item. */
details.news > summary .status { order: 2; align-self: flex-start; font-size: 0.75rem; padding: 3px 10px; white-space: nowrap; }
details.news .meta { order: 3; }
details.news > summary::-webkit-details-marker { display: none; }
details.news .headline { font-weight: 600; font-size: 1rem; line-height: 1.35; }
details.news .meta { grid-column: 1 / -1; font-size: 0.8125rem; color: var(--muted); display: flex; gap: 6px 10px; flex-wrap: wrap; align-items: center; }
details.news .body { padding: 0 0 18px; font-size: 0.9375rem; color: var(--ink-2); max-width: 72ch; }
details.news .body h4 { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); margin: 14px 0 4px; }
.impact { font-family: var(--mono); letter-spacing: 1px; }

/* --- Locked (Pro) ---------------------------------------------------------- */
.locked { border: 1px dashed var(--line-strong); border-radius: var(--radius); padding: 28px 20px; text-align: center; background: var(--wash); }
.locked h3 { margin-bottom: 8px; }
.locked p { color: var(--ink-2); max-width: 46ch; margin: 0 auto 16px; }

/* --- Signals ----------------------------------------------------------------- */
.signal { padding: 14px 0; border-top: 1px solid var(--line); }
.signal:first-child { border-top: 0; padding-top: 0; }
.signal .why { font-size: 0.9375rem; color: var(--ink-2); margin-top: 6px; }

/* --- Model history table ---------------------------------------------------- */
.tablewrap { overflow-x: auto; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter); }
.hist { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 0.875rem; }
.hist th, .hist td { text-align: right; padding: 10px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.hist th:first-child, .hist td:first-child { text-align: left; }
.hist th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }

/* --- Dialog ------------------------------------------------------------------ */
.dialog { border: 1px solid var(--line); border-radius: 16px; padding: 24px; width: min(420px, calc(100vw - 32px)); }
.dialog::backdrop { background: rgba(0, 0, 0, 0.35); }
.dialog h2 { margin-bottom: 18px; font-size: 1.375rem; }
.dialog-actions { display: flex; gap: 8px; margin-top: 8px; }
.dialog-actions .btn-primary { flex: 1; }
.formerror { color: var(--ink); font-weight: 600; font-size: 0.875rem; min-height: 1.2em; margin: 0; }

.footer { padding: 40px 0 64px; font-size: 0.875rem; color: var(--muted); max-width: 80ch; }
.footer strong { color: var(--ink); }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
html { scroll-behavior: smooth; }

/* Keep the header to one line on phones. */
.account .btn { white-space: nowrap; }
@media (max-width: 560px) {
  .account .email { display: none; }
  .account { gap: 4px; }
  .account .btn-sm { padding: 6px 10px; }
}

/* --- Signal engine ------------------------------------------------------- */
.regime-head { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 900px) { .regime-head { grid-template-columns: 1.1fr 1fr; gap: 24px; } }
.regime-name { font-size: clamp(2.25rem, 10vw, 3.5rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1; margin: 6px 0 10px; }
.regime-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 0.875rem; color: var(--ink-2); }
.regime-meta strong { color: var(--ink); }
.pips { display: inline-flex; gap: 4px; vertical-align: middle; margin-left: 4px; }
.pips i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--ink); display: inline-block; }
.pips i.on { background: var(--ink); }

.horizon { display: grid; grid-template-columns: 74px 1fr 56px; gap: 10px; align-items: center; padding: 8px 0; font-size: 0.9375rem; }
.horizon .track { height: 10px; background: var(--line); border-radius: 5px; position: relative; overflow: hidden; }
.horizon .band { position: absolute; top: 0; bottom: 0; background: var(--line-strong); }
.horizon .fill { position: absolute; top: 0; bottom: 0; left: 0; background: var(--ink); border-radius: 5px; }
.horizon .v { text-align: right; font-weight: 700; }
.badge-inline { display: inline-block; font-size: 0.6875rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; border: 1px solid var(--line-strong); color: var(--muted); border-radius: 4px; padding: 1px 6px; margin-left: 6px; vertical-align: middle; }

.pillars { border-top: 1px solid var(--line); margin-top: 8px; }
details.pillar { border-bottom: 1px solid var(--line); }
details.pillar > summary { list-style: none; cursor: pointer; padding: 14px 0; display: grid; grid-template-columns: 34px 1fr auto; gap: 4px 12px; align-items: center; }
details.pillar > summary::-webkit-details-marker { display: none; }
details.pillar .pid { font-family: var(--mono); font-size: 0.8125rem; font-weight: 700; color: var(--muted); }
details.pillar .pname { font-weight: 700; }
details.pillar .pq { grid-column: 2 / 3; font-size: 0.8125rem; color: var(--muted); }
details.pillar .reading { grid-column: 2 / -1; font-size: 0.875rem; color: var(--ink-2); }
details.pillar .scorebar { grid-column: 2 / -1; height: 6px; background: var(--line); border-radius: 3px; position: relative; margin-top: 4px; }
details.pillar .scorebar::after { content: ""; position: absolute; left: 50%; top: -3px; bottom: -3px; width: 1px; background: var(--line-strong); }
details.pillar .scorebar span { position: absolute; top: 0; bottom: 0; background: var(--ink); border-radius: 3px; }
details.pillar .pbody { padding: 0 0 16px 46px; font-size: 0.9375rem; color: var(--ink-2); }
@media (max-width: 520px) { details.pillar .pbody { padding-left: 0; } }
.rules { display: grid; gap: 8px; margin: 10px 0; }
.rules div { border-left: 3px solid var(--line-strong); padding: 2px 0 2px 10px; font-size: 0.875rem; }
.rules div.on { border-left-color: var(--ink); }
.rules b { display: block; font-size: 0.6875rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--muted); }

.status.warn { background: #fff; color: var(--ink); border-style: dashed; }
.tripwire { padding: 12px 0; border-top: 1px solid var(--line); font-size: 0.9375rem; }
.tripwire:first-child { border-top: 0; padding-top: 0; }
.tripwire .tw-head { display: flex; justify-content: space-between; gap: 8px; font-size: 0.8125rem; color: var(--muted); margin-bottom: 4px; }

.playbook { width: 100%; border-collapse: collapse; font-size: 0.875rem; min-width: 560px; }
.playbook th, .playbook td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.playbook th { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--muted); }
.playbook tr.current td { background: var(--wash); font-weight: 600; }
.playbook tr.current td:first-child { box-shadow: inset 3px 0 0 var(--ink); }

/* --- Standalone pages: pricing, account, reset, legal ---------------------- */
.page-title { font-size: clamp(1.75rem, 7vw, 2.5rem); font-weight: 800; letter-spacing: -0.03em; margin: 0 0 12px; }
.lede { font-size: 1.125rem; color: var(--ink-2); max-width: 60ch; margin-bottom: 28px; }
.narrow { max-width: 460px; }
.plans { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .plans { grid-template-columns: 1fr 1fr; gap: 24px; } }
.plan { border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 14px; }
.plan.featured { border: 2px solid var(--ink); }
.plan .price { font-size: 2rem; font-weight: 800; letter-spacing: -0.02em; }
.plan ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.plan li { padding-left: 24px; position: relative; font-size: 0.9375rem; }
.plan li::before { content: "✓"; position: absolute; left: 0; font-weight: 700; }
.plan .btn { width: 100%; }
.acct-grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .acct-grid { grid-template-columns: 1fr 1fr; gap: 24px; } }
.acct-row { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); font-size: 0.9375rem; flex-wrap: wrap; }
.acct-row:first-of-type { border-top: 0; }
.formok { color: var(--ink); font-weight: 600; font-size: 0.875rem; min-height: 1.2em; margin: 0; }
.prose { max-width: 72ch; }
.prose h2 { font-size: 1.125rem; margin: 28px 0 8px; }
.prose p, .prose li { color: var(--ink-2); }
.divider { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.8125rem; margin: 14px 0; }
.divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.btn-google { width: 100%; }
.check { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; font-size: 0.875rem; color: var(--ink-2); }
.check input { margin-top: 3px; width: 18px; height: 18px; flex: none; }
.linkrow { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* --- Free-tier teasers and sign-in buttons -------------------------------- */
.pro-tag { display: inline-block; font-size: 0.6875rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; border: 1px solid var(--ink); border-radius: 4px; padding: 2px 7px; color: var(--ink); text-decoration: none; vertical-align: middle; }
a.pro-tag:hover { background: var(--ink); color: #fff; }
.locked-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; border: 1px dashed var(--line-strong); border-radius: 10px; padding: 12px 14px; font-size: 0.875rem; color: var(--ink-2); text-decoration: none; }
.oauth-buttons { display: grid; gap: 8px; }
.btn-oauth { width: 100%; gap: 10px; }
.btn-oauth .g { font-weight: 800; font-family: Arial, sans-serif; }

/* Pricing: calculator and "why" cards */
.calc { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end; margin: 12px 0; }
.calc label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; }
.calc input { font: inherit; padding: 8px 10px; width: 160px; max-width: 100%; }
.calc-result p { margin: 0 0 10px; }
.calc-result .kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin: 12px 0; }
.calc-result .welcome { font-weight: 700; font-size: 1.1rem; margin: 8px 0 0; }
.why-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.why-grid h3 { margin: 0 0 6px; }
@media (max-width: 480px) { .calc-result .kpis { grid-template-columns: 1fr; } }
.calc .segmented button { white-space: nowrap; }

/* Pricing page: simple hero, featured Pro card, quiet Free card, FAQ */
.hero-pricing .page-title { max-width: 18ch; }
.plan .promise { font-weight: 600; margin: 0; }
.plan.quiet { opacity: 0.92; }
.plan .see-all summary { cursor: pointer; font-size: 0.9rem; }
.plan .see-all ul { margin: 8px 0 0; }
.plan .trust { margin: 0; }
.faq details { border-top: 1px solid var(--line, #e4e4e7); padding: 12px 0; }
.faq summary { cursor: pointer; font-weight: 600; }
.faq details p { margin: 8px 0 0; }
.calc-result .welcome { font-weight: 600; font-size: 0.95rem; opacity: 0.8; margin: 4px 0 0; }

/* Admin: iOS Settings-style grouped list */
.admin { max-width: 720px; }
.admin .page-title { margin: 24px 0 8px; }
.settings-group-title { font-size: 0.78rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; color: #71717a; margin: 28px 16px 8px; }
.settings-group { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid #e4e4e7; border-radius: 14px; overflow: hidden; }
.settings-group li + li .settings-row { border-top: 1px solid #f0f0f2; }
.settings-row { display: flex; align-items: center; gap: 12px; padding: 14px 16px; color: inherit; text-decoration: none; min-height: 56px; }
.settings-row:hover, .settings-row:focus-visible { background: #f7f7f8; }
.settings-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.settings-title { font-weight: 600; }
.settings-desc { font-size: 0.85rem; color: #71717a; }
.settings-badge { font-size: 0.78rem; color: #52525b; background: #f4f4f5; border-radius: 999px; padding: 3px 10px; white-space: nowrap; }
.settings-badge.ok { color: #166534; background: #dcfce7; }
.settings-badge.warn { color: #9a3412; background: #ffedd5; }
.settings-badge.alert { color: #fff; background: #ef4444; }
.settings-chevron { color: #a1a1aa; font-size: 1.4rem; line-height: 1; }
.pane { padding-bottom: 40px; }
.pane-back { display: inline-block; margin-top: 16px; font-weight: 600; text-decoration: none; }
.pane-title { margin-top: 8px !important; }
.pane-desc { margin: 0 0 20px; }

/* --- Story: first screen, chapter steps, one-line locks ------------------------------ */
.story-steps { display: grid; gap: 12px; margin-top: 20px; }
@media (min-width: 720px) { .story-steps { grid-template-columns: 1fr 1fr; } }
.story-step { border-top: 1px solid var(--line-strong); padding-top: 12px; }
.step-label { margin: 0; font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-2); }
.step-big { margin: 4px 0 0; font-size: 1.125rem; font-weight: 600; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.step-big a { color: inherit; text-decoration: none; }
.today-card .regime-name { margin-top: 4px; }
.lockline { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-top: 16px; border: 1px dashed var(--line-strong); border-radius: 10px; padding: 12px 14px; font-size: 0.9375rem; color: var(--ink-2); }
.fullread { margin-top: 16px; }
.fullread > summary { cursor: pointer; font-weight: 600; padding: 12px 0; }
#summary .see-all summary { cursor: pointer; }
/* On a phone the story comes first: the price strip waits for the company cards. */
@media (max-width: 640px) { .tickerstrip { display: none; } }

/* More details page and the card that leads to it. */
.more-card { display: flex; justify-content: space-between; align-items: center; gap: 16px; text-decoration: none; color: inherit; }
.more-card:hover { border-color: var(--line-strong); }
@media (max-width: 640px) { .more-strip { display: flex; } }
.more-strip { flex-wrap: wrap; border: 1px solid var(--line); border-radius: var(--radius); }

/* Share */
.story-actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 0; }
.share-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); opacity: 0; transition: opacity .2s, transform .2s; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 0.875rem; z-index: 50; max-width: calc(100% - 32px); text-align: center; pointer-events: none; }
.share-toast.show { opacity: 1; transform: translate(-50%, 0); }

/* --- Design pass (Nov 14) ---------------------------------------------------------- */
/* Pricing: each plan card is as tall as its content; the calculator's fields line up. */
.plans { align-items: start; }
.calc label { margin: 0; }
.calc label input { margin-top: 0; }
.calc input { min-height: 48px; padding: 10px 12px; box-sizing: border-box; }
.calc .btn { min-height: 48px; }
.calc .segmented { min-height: 48px; box-sizing: border-box; }
.calc .segmented button { min-height: 0; height: 100%; }
/* One-line locks: the button never wraps and is a full-size tap target. */
.lockline .btn { white-space: nowrap; flex: none; min-height: 44px; }
/* The upgrade card reads like every other card: left-aligned. */
.locked.upgrade { text-align: left; }
.locked.upgrade p { margin: 0 0 16px; max-width: 60ch; }
/* Forms: an empty message line takes no space, so buttons don't jump. */
.formerror:empty, .formok:empty { display: none; }
.formerror, .formok { margin: 0 0 4px; }
.dialog-actions, .form-actions { margin-top: 16px; }
.account-actions .btn-ghost:first-child { padding-left: 0; }

/* Admin: on a phone, each AI run is a small stacked card instead of a wide table. */
@media (max-width: 640px) {
  #runs .hist { min-width: 0; }
  #runs .hist thead { display: none; }
  #runs .hist tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); }
  #runs .hist td { display: flex; gap: 8px; border: 0; padding: 2px 0; text-align: left !important; white-space: normal; }
  #runs .hist td::before { content: attr(data-label); flex: 0 0 72px; color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; }
}

/* --- First screen: the question, today's answer, the forecast, the chart ----------- */
h1.question { font-size: 1.875rem; line-height: 1.12; letter-spacing: -0.03em; margin: 0 0 16px; }
@media (min-width: 720px) { h1.question { font-size: 2.5rem; } }
.first-stack { display: grid; gap: 14px; }
@media (min-width: 900px) { .first-stack { grid-template-columns: 1.1fr 1fr; } .first-stack > :last-child { grid-column: 1 / -1; } }
.answer-big { font-size: 2.75rem; font-weight: 800; letter-spacing: -0.04em; line-height: 1; margin: 6px 0 10px; }
.answer-big a { color: inherit; text-decoration: none; }
.sign-meter { display: flex; gap: 6px; }
.sign-meter i { flex: 1; height: 10px; border-radius: 6px; background: var(--line); }
.sign-meter i.on { background: var(--ink); }
ul.signs { list-style: none; padding: 0; margin: 12px 0 0; }
ul.signs li { display: flex; gap: 10px; align-items: center; margin: 7px 0; color: var(--muted); }
ul.signs li.on { color: var(--ink); }
ul.signs .sign-tick { flex: none; width: 22px; height: 22px; border-radius: 50%; border: 1.5px solid #d4d4d8; display: inline-flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 800; }
ul.signs li.on .sign-tick { background: var(--ink); border-color: var(--ink); color: #fff; }
.within-row { display: flex; align-items: center; gap: 14px; }
.within-row .answer-big { margin: 6px 0; }
.within-row p { margin: 0; font-weight: 600; line-height: 1.3; }
.forecast-bar { height: 12px; border-radius: 999px; background: var(--line); overflow: hidden; margin-top: 8px; }
.forecast-bar span { display: block; height: 100%; background: #2563eb; border-radius: 999px; }

/* Original first screen with the new content: a compact signs list under Today. */
ul.signs.signs-compact { margin: 10px 0 0; }
ul.signs.signs-compact li { margin: 4px 0; font-size: 0.875rem; gap: 8px; }
ul.signs.signs-compact .sign-tick { width: 16px; height: 16px; font-size: 0.6rem; }

/* --- Landing page (/start) ------------------------------------------------------------ */
.landing .land-hero { padding-top: 36px; }
.land-opens { font-size: clamp(1.5rem, 6vw, 2.25rem); font-weight: 800; letter-spacing: -0.03em; margin: 18px 0 0; }
.land-video { position: relative; aspect-ratio: 16 / 9; border-radius: 16px; overflow: hidden; background: #0a0a0a; }
.land-video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.land-video-placeholder { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; color: #fff; font-weight: 600; }
.land-video-placeholder .muted { color: #a1a1aa; }
.land-video-placeholder .play { width: 64px; height: 64px; border-radius: 50%; background: #fff; color: #0a0a0a; display: inline-flex; align-items: center; justify-content: center; font-size: 1.4rem; padding-left: 4px; margin-bottom: 6px; }
.land-three { display: grid; gap: 22px; }
@media (min-width: 820px) { .land-three { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; } .land-two { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.land-big { font-size: 1.375rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.2; margin: 6px 0 8px; }

/* --- Side panel (desktop) / slide-over page (phone) ------------------------------------- */
.sheet-open { display: flex; justify-content: space-between; align-items: center; width: 100%; margin-top: 14px; padding: 12px 0 0; border: 0; border-top: 1px solid var(--line); background: none; font: inherit; font-weight: 600; font-size: 0.9375rem; color: var(--ink); cursor: pointer; text-align: left; min-height: 44px; }
.sheet-open:hover { text-decoration: underline; }
.sheet-root { position: fixed; inset: 0; z-index: 60; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(10, 10, 10, 0.32); opacity: 0; transition: opacity 0.2s ease; }
.sheet { position: absolute; top: 0; right: 0; bottom: 0; width: min(480px, 100%); background: #fff; display: flex; flex-direction: column; transform: translateX(100%); transition: transform 0.22s ease; box-shadow: -12px 0 32px rgba(0, 0, 0, 0.12); }
.sheet-root.open .sheet { transform: translateX(0); }
.sheet-root.open .sheet-backdrop { opacity: 1; }
.sheet-head { display: flex; align-items: flex-start; gap: 12px; padding: 18px 20px 14px; border-bottom: 1px solid var(--line); }
.sheet-titles { flex: 1; min-width: 0; }
.sheet-titles h2 { font-size: 1.25rem; margin: 2px 0 0; letter-spacing: -0.02em; }
.sheet-x, .sheet-back { border: 0; background: none; font: inherit; color: var(--ink); cursor: pointer; min-width: 44px; min-height: 44px; }
.sheet-x { font-size: 1.1rem; margin: -8px -10px 0 0; }
.sheet-back { display: none; font-weight: 600; padding: 0; text-align: left; }
.sheet-body { flex: 1; overflow-y: auto; padding: 16px 20px 32px; -webkit-overflow-scrolling: touch; }
body.sheet-lock { overflow: hidden; }
@media (max-width: 719px) {
  .sheet { width: 100%; box-shadow: none; }
  .sheet-backdrop { display: none; }
  .sheet-head { flex-direction: column; gap: 4px; padding-top: max(14px, env(safe-area-inset-top)); }
  .sheet-back { display: inline-block; min-height: 36px; }
  .sheet-x { display: none; }
}

/* --- Day by day: the calendar shell ------------------------------------------------------ */
.side { display: none; }
.datebar { border-top: 1px solid var(--line); }
.datebar-inner { padding-top: 6px; padding-bottom: 6px; }
.db-row { display: flex; align-items: center; justify-content: space-between; }
.db-date { border: 0; background: none; font: inherit; font-weight: 700; font-size: 1.05rem; color: var(--ink); cursor: pointer; min-height: 40px; }
.db-date span { font-size: 0.7rem; color: var(--muted); }
.ib { width: 40px; height: 40px; border-radius: 50%; border: 0; background: none; font-size: 1.15rem; color: var(--ink); cursor: pointer; }
.ib:disabled { color: #d4d4d8; cursor: default; }
.week { display: grid; grid-template-columns: repeat(5, 1fr); gap: 4px; }
.wd { display: flex; flex-direction: column; align-items: center; gap: 2px; font: inherit; font-size: 0.68rem; color: var(--muted); padding: 2px 0 4px; border: 0; background: none; cursor: pointer; }
.wd b { font-size: 0.98rem; color: var(--ink); width: 32px; height: 32px; line-height: 32px; text-align: center; border-radius: 50%; font-weight: 600; }
.wd i { width: 5px; height: 5px; border-radius: 50%; font-style: normal; font-size: 0.5rem; line-height: 5px; }
.wd i.lock { width: auto; height: auto; }
.wd.sel b { background: #2563eb; color: #fff; }
.wd.today:not(.sel) b { box-shadow: inset 0 0 0 1.5px #2563eb; color: #2563eb; }
.wd.none { cursor: default; }
.wd.none b, .wd.locked b { color: #c4c4c8; }
/* Month grid (sidebar and sheet) */
.mm-head { display: flex; justify-content: space-between; align-items: center; margin: 0 0 4px; }
.mm-head strong { font-size: 0.95rem; }
.mm-arr { display: flex; gap: 2px; }
.mm-arr .ib { width: 32px; height: 32px; }
.mm-dow, .mm-grid { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; }
.mm-dow span { font-size: 0.66rem; color: var(--muted); padding: 4px 0; }
.mm-d { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; height: 34px; font: inherit; font-size: 0.8rem; border: 0; background: none; color: var(--ink); padding: 0; }
button.mm-d { cursor: pointer; }
.mm-d b { width: 26px; height: 26px; line-height: 26px; border-radius: 50%; font-weight: 500; }
button.mm-d:hover b { background: var(--wash); }
.mm-d i { position: absolute; bottom: 0; width: 5px; height: 5px; border-radius: 50%; font-style: normal; }
.mm-d i.lock { width: auto; height: auto; font-size: 0.5rem; bottom: -2px; }
.mm-d.out, .mm-d.wkend { color: #c4c4c8; }
.mm-d.replayed b { color: #a1a1aa; }
.mm-d.locked b { color: #c4c4c8; }
.mm-d.sel b { background: #2563eb !important; color: #fff; font-weight: 700; }
.mm-d.today:not(.sel) b { box-shadow: inset 0 0 0 1.5px #2563eb; color: #2563eb; font-weight: 700; }
.mm-d.visited::after { content: ""; position: absolute; top: 3px; right: 5px; width: 4px; height: 4px; border-radius: 50%; background: var(--ink); }
.mm-legend { display: flex; flex-wrap: wrap; gap: 6px 10px; font-size: 0.7rem; color: var(--ink-2); margin: 8px 0 0; }
.mm-legend i { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 4px; }
.mm-note { font-size: 0.7rem; color: var(--muted); margin: 6px 0 0; line-height: 1.4; }
/* Phone month sheet */
.cal-sheet-root { position: fixed; inset: 0; z-index: 70; }
.cal-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.35); opacity: 0; transition: opacity 0.2s; }
.cal-sheet { position: absolute; left: 0; right: 0; bottom: 0; background: #fff; border-radius: 20px 20px 0 0; padding: 8px 16px max(20px, env(safe-area-inset-bottom)); transform: translateY(100%); transition: transform 0.2s ease; max-height: 88vh; overflow-y: auto; }
.cal-sheet-root.open .cal-sheet { transform: none; }
.cal-sheet-root.open .cal-scrim { opacity: 1; }
.cal-sheet .grab { width: 40px; height: 5px; border-radius: 3px; background: #d4d4d8; margin: 2px auto 10px; }
.upsell { margin-top: 12px; background: var(--wash); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 0.82rem; display: flex; justify-content: space-between; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.upsell b { white-space: nowrap; background: var(--ink); color: #fff; border-radius: 10px; padding: 6px 10px; font-size: 0.78rem; }
/* Past day */
.past-bar { background: #eff6ff; border: 1px solid #bfdbfe; border-radius: 12px; padding: 10px 12px; font-size: 0.9rem; margin: 0 0 14px; }
.since { background: var(--wash); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; font-size: 0.9rem; margin: 0 0 18px; }
.pips { display: inline-flex; gap: 4px; }
.pips i { width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--ink); }
.pips i.on { background: var(--ink); }
.day-news { display: flex; flex-direction: column; gap: 4px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.day-news .status { align-self: flex-start; font-size: 0.72rem; padding: 2px 9px; }
.day-news .headline { font-weight: 600; color: var(--ink); text-decoration: none; line-height: 1.3; }
.day-news a.headline[href]:hover { text-decoration: underline; }

/* Desktop: the left panel replaces the section tabs, the price strip and the date bar. */
@media (min-width: 1024px) {
  .shell { display: grid; grid-template-columns: 272px minmax(0, 1fr); }
  .side { display: block; position: sticky; top: 0; align-self: start; max-height: 100vh; overflow-y: auto; padding: 18px 16px 24px; border-right: 1px solid var(--line); scrollbar-width: thin; }
  .shell > main.wrap { max-width: 1000px; margin: 0; padding-left: 40px; padding-right: 40px; }
  .sectionnav, .tickerstrip, .datebar { display: none; }
  .topbar { position: sticky; top: 0; z-index: 20; }
  .side { top: 57px; max-height: calc(100vh - 57px); }
  .todaybtn { border: 1px solid #d4d4d8; border-radius: 999px; padding: 8px 18px; font: inherit; font-weight: 600; background: #fff; margin-bottom: 14px; cursor: pointer; min-height: 40px; }
  .side-h { margin: 20px 0 4px; }
  .side-nav a { display: block; padding: 7px 12px; border-radius: 999px; font-size: 0.9rem; color: var(--ink-2); text-decoration: none; }
  .side-nav a:hover { background: var(--wash); color: var(--ink); }
  .px-head { display: flex; justify-content: space-between; align-items: baseline; margin: 20px 0 4px; }
  .px { display: grid; grid-template-columns: 54px 1fr 62px; align-items: center; padding: 4px 10px; border-radius: 8px; font-size: 0.8rem; color: var(--ink); text-decoration: none; }
  .px:hover { background: var(--wash); }
  .px .sym { font-weight: 700; }
  .px .pr { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; }
  .px .ch { text-align: right; font-size: 0.76rem; font-variant-numeric: tabular-nums; }
  .px .ch.up { color: #16a34a; }
  .px .ch.down { color: #dc2626; }
  .px.bench { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 7px; border-radius: 0; }
}
@media (min-width: 1024px) {
  .topbar .topbar-inner { max-width: none; padding-left: 24px; padding-right: 40px; }
}
/* Smallest phones: keep the name, Go Pro and Account on one line. */
@media (max-width: 380px) {
  .brand { font-size: 1.125rem; }
  .topbar-inner { gap: 8px; }
}

/* The section the reader is on, in the brand blue. */
:root { --brand: #2563eb; --brand-wash: #eff6ff; }
.sectionnav a.on { background: var(--brand-wash); color: var(--brand); font-weight: 600; }
@media (min-width: 1024px) {
  .side-nav a.on { background: var(--brand-wash); color: var(--brand); font-weight: 600; }
}
