/* Filing Notes design system. Brand: navy, cream, amber.
   Mobile-first, plain links and real hrefs first; JS enhances. */

:root {
  --navy: #0a1e3c;
  --navy-dark: #061226;
  --navy-raise: #12294f;
  --cream: #f7f2e4;
  --cream-dark: #ece4cd;
  --amber: #f5a800;
  --amber-dark: #d9930d;
  /* Accessibility pass (Nov 21, 2026): --amber-dark as TEXT on the light
     backgrounds measured 2.31:1 on cream and 2.56:1 on card, far under
     the 4.5:1 AA line, but it cannot simply darken: as the button hover
     background it carries navy text, which needs it light (6.43:1).
     So the roles split. --amber-text (#8a5a00: 5.30:1 on cream, 5.87:1
     on card, 5.13:1 on amber-soft) carries amber TEXT and chart strokes
     on light backgrounds; --amber-dark keeps the hover background and
     text on navy, where it passes. --focus (#a86e00) is the focus-ring
     color: the old amber ring measured 1.79:1 on cream, under the 3:1
     line for focus indicators; #a86e00 measures 3.84:1 on cream, 4.25:1
     on card, and 3.87:1 on navy, so one ring color passes everywhere. */
  --amber-text: #8a5a00;
  --focus: #a86e00;
  --amber-soft: #fdeec2;
  --ink: #1b2431;
  --muted: #5b6472;
  --line: #ddd4bd;
  --line-soft: #e7dfc9;
  --cheap: #1e6b3a;
  --cheap-bg: #e2f2e6;
  --pricey: #9c2b1f;
  --pricey-bg: #fbe7e3;
  --fair: #5b6472;
  --fair-bg: #ececec;
  --card: #fffef9;
  --shadow-sm: 0 1px 2px rgba(10, 30, 60, 0.05), 0 1px 6px rgba(10, 30, 60, 0.05);
  --shadow-md: 0 2px 6px rgba(10, 30, 60, 0.07), 0 10px 28px rgba(10, 30, 60, 0.10);
  --shadow-lg: 0 18px 44px rgba(6, 18, 38, 0.28);
  --radius: 14px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: var(--amber); color: var(--navy); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* Accessibility utilities (Nov 21, 2026): the skip link is the first
   thing a keyboard or screen-reader user meets; it stays off screen
   until it takes focus, then sits over the header corner. The
   visually-hidden class carries headings and text that exist for
   assistive technology only (a section heading whose visible label
   is a <summary>, for instance). */
.skip-link {
  position: absolute; left: 12px; top: -60px; z-index: 200;
  background: var(--navy); color: var(--cream); font-weight: 700;
  padding: 12px 18px; border-radius: 0 0 10px 10px; text-decoration: none;
  transition: top 140ms ease;
}
.skip-link:focus-visible { top: 0; color: var(--cream); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  margin: -1px; padding: 0; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  border: 0; white-space: nowrap;
}

a { color: var(--navy); text-underline-offset: 2px; }
a:visited { color: #3a4a6b; }

h1 { font-size: 2rem; line-height: 1.18; letter-spacing: -0.02em; font-weight: 800; margin: 1.4rem 0 0.6rem; color: var(--navy); }
h2 { font-size: 1.42rem; line-height: 1.25; letter-spacing: -0.015em; font-weight: 750; margin: 2.1rem 0 0.55rem; color: var(--navy); }
h3 { font-size: 1.12rem; line-height: 1.3; font-weight: 700; margin: 1.4rem 0 0.4rem; color: var(--navy); }
p { margin: 0.55rem 0; }

main { padding-bottom: 1rem; }

/* Header: sticky navy bar, brand left, nav right. Plain links, no JS needed. */
.site-header {
  background: linear-gradient(180deg, var(--navy) 0%, var(--navy-dark) 100%);
  color: var(--cream);
  position: sticky; top: 0; z-index: 60;
  box-shadow: 0 1px 0 rgba(245, 168, 0, 0.35), 0 6px 18px rgba(6, 18, 38, 0.25);
}
.header-inner { display: flex; align-items: center; gap: 10px 22px; flex-wrap: wrap; padding-top: 12px; padding-bottom: 12px; }
.brand-block { display: flex; flex-direction: column; justify-content: center; margin-right: auto; }
.brand { color: var(--cream); font-weight: 800; font-size: 1.42rem; letter-spacing: -0.01em; text-decoration: none; line-height: 1.1; }
.brand:visited { color: var(--cream); }
.tagline { margin: 1px 0 0; color: var(--amber); font-size: 0.86rem; font-weight: 600; }
.topnav { display: flex; flex-wrap: wrap; gap: 2px; align-items: center; }
.topnav a { color: var(--cream); text-decoration: none; padding: 8px 11px; border-radius: 999px; font-size: 0.94rem; font-weight: 550; white-space: nowrap; transition: background 140ms ease, color 140ms ease; }
.topnav a:visited { color: var(--cream); }
.topnav a:hover { background: var(--navy-raise); }
.topnav a[aria-current="page"] { background: var(--amber); color: var(--navy); font-weight: 700; }
.topnav a[aria-current="page"]:hover { background: var(--amber); }
@media (max-width: 760px) {
  .header-inner { gap: 8px 12px; }
  .topnav { flex-wrap: nowrap; overflow-x: auto; max-width: 100%; padding-bottom: 2px; scrollbar-width: none; }
  .topnav::-webkit-scrollbar { display: none; }
}
.account-slot { display: inline-flex; gap: 2px; align-items: center; }
.nav-signout { background: none; border: none; color: var(--cream); font: inherit; font-size: 0.95rem; padding: 8px 10px; border-radius: 999px; cursor: pointer; white-space: nowrap; min-height: 44px; }
.nav-signout:hover { background: var(--navy-raise); }
.site-header a.nav-signin { border: 1.5px solid var(--amber); color: var(--amber); font-weight: 700; margin-left: 8px; padding: 7px 14px; display: inline-flex; align-items: center; min-height: 44px; }
.topnav a.nav-signin:visited { color: var(--amber); }
.topnav a.nav-signin:hover { background: var(--amber); color: var(--navy); }
.acct-menu-wrap { position: relative; display: inline-flex; margin-left: 8px; }
.acct-avatar { width: 44px; height: 44px; border-radius: 50%; border: 2px solid var(--amber); background: var(--navy-raise); color: var(--cream); font: inherit; font-weight: 700; font-size: 0.85rem; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; padding: 0; overflow: hidden; transition: border-color 140ms ease, transform 140ms ease; }
.acct-avatar:hover { border-color: var(--cream); transform: translateY(-1px); }
.acct-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.acct-menu { position: absolute; right: 0; top: calc(100% + 10px); min-width: 248px; max-width: 86vw; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 8px; z-index: 80; text-align: left; }
.acct-menu[hidden] { display: none; }
.acct-menu-head { padding: 10px 12px 12px; border-bottom: 1px solid var(--line-soft); margin-bottom: 6px; }
.acct-menu-head .who { font-weight: 700; font-size: 0.98rem; color: var(--navy); }
.acct-menu-head .mail { color: var(--muted); font-size: 0.83rem; word-break: break-all; }
.acct-menu a { display: block; color: var(--navy); padding: 10px 12px; border-radius: 9px; font-size: 0.96rem; font-weight: 550; white-space: normal; }
.acct-menu a:visited { color: var(--navy); }
.acct-menu a:hover { background: var(--cream); }
.acct-menu .nav-signout { color: var(--navy); width: 100%; text-align: left; border-top: 1px solid var(--line-soft); border-radius: 0 0 9px 9px; margin-top: 6px; padding: 11px 12px; font-weight: 550; }
.acct-menu .nav-signout:hover { background: var(--cream); }

/* Footer */
.site-footer { background: var(--navy-dark); color: var(--cream); margin-top: 3.5rem; padding: 2.4rem 0 2rem; }
.site-footer a { color: var(--cream); text-decoration: none; }
.site-footer a:hover { color: var(--amber); text-decoration: underline; }
.footer-grid { display: grid; gap: 26px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1.5fr; } }
.footer-waitlist .field { max-width: 300px; }
.footer-waitlist .field label { color: #c9cede; }
.coming-next { background: var(--amber-soft); border: 1px solid var(--line); border-radius: 10px; padding: 10px 14px; font-size: 0.95rem; }
.footer-logo { font-weight: 800; font-size: 1.3rem; margin: 0 0 0.3rem; color: var(--cream); }
.footer-brand p { color: #c9cede; margin: 0.25rem 0; max-width: 40ch; }
.footer-head { text-transform: uppercase; letter-spacing: 0.07em; font-size: 0.78rem; font-weight: 700; color: var(--amber); margin: 0 0 0.5rem; }
.footer-col p { margin: 0.42rem 0; }
.footer-legal { border-top: 1px solid rgba(246, 241, 227, 0.16); margin-top: 1.8rem; padding-top: 1.1rem; color: #9aa5bb; font-size: 0.9rem; }

/* Hero */
.hero { padding: 2.2rem 0 0.4rem; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.09em; font-size: 0.8rem; font-weight: 800; color: var(--amber-text); margin: 0 0 0.4rem; }
.hero h1 { font-size: 2.55rem; margin: 0 0 0.7rem; max-width: 16em; }
@media (max-width: 560px) { .hero h1 { font-size: 2.05rem; } }
.lede { font-size: 1.14rem; color: #37414f; max-width: 38em; margin: 0.2rem 0 1.1rem; }
.hero-ctas { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 1.6rem; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0.4rem 0 0.6rem; display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { counter-increment: step; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 14px 16px 14px 52px; position: relative; }
.steps li::before { content: counter(step); position: absolute; left: 14px; top: 13px; width: 28px; height: 28px; border-radius: 50%; background: var(--navy); color: var(--amber); font-weight: 800; font-size: 0.95rem; display: flex; align-items: center; justify-content: center; }
.steps li strong { display: block; color: var(--navy); }
.steps li span { color: var(--muted); font-size: 0.94rem; }

/* Cards and grids */
.card-grid { display: grid; gap: 16px; grid-template-columns: 1fr; margin: 1rem 0; }
@media (min-width: 720px) { .card-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1024px) { .card-grid { grid-template-columns: 1fr 1fr 1fr; } }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px; }
.card h2, .card h3 { margin-top: 0; }
.dive-card { display: flex; flex-direction: column; transition: transform 150ms ease, box-shadow 150ms ease; }
@media (hover: hover) { .dive-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); } }
.card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.card-top h3 { font-size: 1.35rem; letter-spacing: -0.01em; margin: 0; }
.card-top h3 a { text-decoration: none; }
.card-top h3 a:hover { text-decoration: underline; }
.card-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: auto; padding-top: 0.7rem; }
.company { color: var(--muted); margin: 0.15rem 0; }
.dive-date { color: var(--muted); font-size: 0.9rem; }

.cases { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0.9rem 0; }
.cases div { background: var(--cream); border: 1px solid var(--line-soft); border-radius: 10px; padding: 10px; text-align: center; min-width: 0; }
.cases dt { font-size: 0.82rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
.cases dd { margin: 0.2rem 0 0; font-weight: 800; font-size: 1.15rem; font-variant-numeric: tabular-nums; color: var(--navy); overflow-wrap: anywhere; }
.cases.large div { padding: 14px 10px; background: var(--card); border-color: var(--line); box-shadow: var(--shadow-sm); }
.cases.large div:nth-child(2) { border: 2px solid var(--amber); }
.cases.large dd { font-size: 1.45rem; }

/* Case values are the widest fixed content on a dive page: a four-figure
   value like "$3,047.72" at desktop size is wider than a third of a phone
   column, and a grid track sized by min-content pushed the whole page
   sideways (MELI's bull case ended at x=417 on a 390px viewport,
   adversarial check M3, Nov 21, 2026; the earlier shrink only covered
   widths below 390px, and 390 itself is a standard phone width). The
   tracks are minmax(0, 1fr) with min-width: 0 cells at every width, the
   values scale down with the viewport across the whole phone range,
   and overflow-wrap is the last-resort guard so no value can ever push
   the page wider than the screen. */
@media (max-width: 480px) {
  .cases { gap: 6px; }
  .cases div { padding: 8px 4px; }
  .cases dd { font-size: clamp(0.88rem, 4.6vw, 1.05rem); }
  .cases.large dd { font-size: clamp(0.95rem, 5vw, 1.2rem); }
}

/* What Changed valuation history (Dec 1, 2026): the chain of past
   valuations under the headline change. Plain list rows separated by
   hairlines; the figures line wraps freely and uses tabular numerals,
   so no row can push the page wider than the screen at any width. */
.history-list { list-style: none; padding: 0; margin: 0.4rem 0 0; }
.history-list li { border-top: 1px solid var(--line-soft); padding: 10px 0 12px; }
.history-head { margin: 0; font-weight: 700; color: var(--navy); }
.history-figures { margin: 2px 0 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.history-note { margin: 4px 0 0; color: var(--muted); }

.verdict { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: 0.86rem; font-weight: 700; white-space: nowrap; }
.verdict::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.verdict.cheap { background: var(--cheap-bg); color: var(--cheap); }
.verdict.pricey { background: var(--pricey-bg); color: var(--pricey); }
.verdict.fair { background: var(--fair-bg); color: var(--fair); }

.button {
  display: inline-flex; align-items: center; justify-content: center; background: var(--amber); color: var(--navy); text-decoration: none;
  padding: 11px 20px; border-radius: 999px; border: 1.5px solid var(--amber); font-size: 1rem; font-weight: 700; cursor: pointer;
  min-height: 46px; line-height: 1.25; font-family: inherit;
  transition: background 140ms ease, border-color 140ms ease, transform 140ms ease;
}
.button:visited { color: var(--navy); }
.button:hover { background: var(--amber-dark); border-color: var(--amber-dark); }
.button:active { transform: translateY(1px); }
.button.secondary { background: transparent; color: var(--navy); border: 1.5px solid var(--navy); }
.button.secondary:visited { color: var(--navy); }
.button.secondary:hover { background: var(--navy); color: var(--cream); }
.button.small { padding: 8px 14px; min-height: 44px; font-size: 0.9rem; }

button:focus-visible, a:focus-visible, input:focus-visible, summary:focus-visible, select:focus-visible,
label:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid var(--focus); outline-offset: 2px;
}

.callout { background: var(--amber-soft); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; margin: 1.8rem 0; }
.callout h2 { margin-top: 0; }
.caveat { color: var(--muted); font-size: 0.92rem; }
.note { background: var(--amber-soft); border-radius: 10px; padding: 12px 16px; }
.breadcrumb { margin-top: 1.1rem; font-size: 0.92rem; }
.breadcrumb a { font-weight: 600; }

/* Screen list */
.screen-list { list-style: none; padding: 0; }
.screen-row { background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-sm); padding: 13px 16px; margin: 0.55rem 0; }
.screen-row strong { margin-right: 0.4rem; }

/* Tables: wrap in .table-scroll as a safety net; stack under breakpoints. */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; background: var(--card); font-variant-numeric: tabular-nums; }
th, td { padding: 11px 13px; border-bottom: 1px solid var(--line-soft); text-align: left; vertical-align: top; overflow-wrap: break-word; }
thead th { background: var(--navy); color: var(--cream); font-size: 0.83rem; text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; border-bottom: none; }
tbody tr { transition: background 120ms ease; }
tbody tr:hover { background: #faf5e6; }
tbody tr:last-child td { border-bottom: none; }
.board-table thead th { white-space: nowrap; }
.board-table td:nth-child(2), .board-table td:last-child { white-space: nowrap; }
/* A cell carrying an explanatory note wraps instead of clipping. */
.board-table td.cell-note { white-space: normal; }

/* Coverage board price columns (redesign, Nov 21, 2026): Current
   Price and % Change are separate columns, brokerage style. The old
   single "Price now" cell carried price, day move, and timestamp as
   one string and wrapped to five lines, and the Stock column was
   squeezed until company names wrapped to three. The numeric cells
   never wrap, the day move carries the brokerage colors, the quote
   time sits under the price as small muted text, and the Stock
   column holds a floor width so names read at a normal row height. */
.coverage-table { font-size: 0.9rem; }
.coverage-table th, .coverage-table td { padding: 10px 7px; }
.coverage-table td:first-child { min-width: 140px; }
.coverage-table td.num { white-space: nowrap; }
.coverage-table .verdict { font-size: 0.8rem; }
.day-change { font-weight: 700; white-space: nowrap; }
.day-change.up { color: var(--cheap); }
.day-change.dn { color: var(--pricey); }
.price-asof { display: block; font-size: 0.72rem; font-weight: 400; color: var(--muted); white-space: nowrap; margin-top: 2px; }

/* Change log + updates view */
.change-list { list-style: none; padding: 0; }
.change-item { background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-sm); padding: 13px 16px; margin: 0.55rem 0; }
.change-item strong { margin-right: 0.4rem; }
.update-block { margin: 1.4rem 0; }
.update-points { list-style: none; padding: 0; }
.update-point { background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-sm); padding: 13px 16px; margin: 0.55rem 0; }
.update-point p { margin: 0.3rem 0; }

@media (max-width: 900px) {
  .board-table thead { display: none; }
  .board-table, .board-table tbody, .board-table tr, .board-table td { display: block; width: 100%; }
  .board-table tr { border: 1px solid var(--line); border-radius: 10px; margin: 0.6rem 0; padding: 4px 0; box-shadow: var(--shadow-sm); }
  .board-table td { border-bottom: none; padding: 6px 12px; }
  .board-table td::before { content: attr(data-label); display: block; font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
  .board-table td:first-child::before { display: none; }
}
@media (max-width: 720px) {
  .kpi-table thead, .research-table thead, .calc-table thead { display: none; }
  .kpi-table, .research-table, .calc-table,
  .kpi-table tbody, .research-table tbody, .calc-table tbody,
  .kpi-table tr, .research-table tr, .calc-table tr,
  .kpi-table td, .research-table td, .calc-table td { display: block; width: 100%; }
  .kpi-table tr, .research-table tr, .calc-table tr { border: 1px solid var(--line); border-radius: 10px; margin: 0.6rem 0; padding: 4px 0; }
  .kpi-table td, .research-table td, .calc-table td { border-bottom: none; padding: 6px 12px; }
  .kpi-table td::before, .research-table td::before, .calc-table td::before { content: attr(data-label); display: block; font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
}

/* Assumptions strip */
.assumptions-strip { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.assumptions-strip li { background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-sm); padding: 12px 15px; flex: 1 1 160px; }

/* Workspace sliders */
.slider-block { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px; margin: 0.9rem 0; }
.slider-block label { font-weight: 700; display: block; }
.slider-why { color: var(--muted); font-size: 0.92rem; margin: 0.2rem 0 0.6rem; }
.slider-row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.slider-row input[type="range"] { flex: 1 1 220px; min-height: 44px; accent-color: var(--amber); cursor: pointer; }
.kpi-input { width: 110px; padding: 10px; font-size: 1rem; border: 2px solid var(--line); border-radius: 10px; font-variant-numeric: tabular-nums; }
.kpi-unit { color: var(--muted); }
.scale { position: relative; height: 10px; border-radius: 5px; margin: 6px 0 2px; background: linear-gradient(to right, #ddd4bd 0%, #ddd4bd 33.333%, var(--amber) 33.333%, var(--amber) 66.667%, #ddd4bd 66.667%, #ddd4bd 100%); }
.scale .mark { position: absolute; top: -3px; width: 2px; height: 16px; background: var(--navy); }
.scale-labels { display: flex; justify-content: space-between; font-size: 0.8rem; color: var(--muted); }
.bear-max-note { color: var(--muted); font-size: 0.88rem; margin: 0.3rem 0 0; }
.path-presets { display: flex; flex-wrap: wrap; gap: 8px; margin: 0.7rem 0 0.2rem; }
.year-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(86px, 1fr)); gap: 8px; margin-top: 0.5rem; }
.slider-block .year-cell { display: block; font-weight: 400; }
.year-cap { display: block; font-size: 0.78rem; font-weight: 600; color: var(--muted); margin-bottom: 3px; white-space: nowrap; }
.year-input { width: 100%; box-sizing: border-box; padding: 8px 6px; font-size: 0.95rem; border: 2px solid var(--line); border-radius: 8px; font-variant-numeric: tabular-nums; }

.your-value { background: linear-gradient(135deg, var(--navy) 0%, var(--navy-dark) 100%); color: var(--cream); border-radius: var(--radius); box-shadow: var(--shadow-md); padding: 18px; margin: 1rem 0; }
.your-value .big-value { font-size: 2rem; font-weight: 800; margin: 0.2rem 0; font-variant-numeric: tabular-nums; }
.your-value p { margin: 0.3rem 0; }
.beyond { color: var(--amber); font-weight: 700; }

.save-row, .scenario-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0.8rem 0; }
.scenario-form input[type="text"] { flex: 1 1 200px; padding: 10px; font-size: 1rem; border: 2px solid var(--line); border-radius: 10px; }
.scenario-form > label { font-weight: 700; }
.scenario-list { list-style: none; padding: 0; }
.scenario-list li { background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-sm); padding: 12px 14px; margin: 0.5rem 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.scenario-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.compare-panel { background: var(--card); border: 2px solid var(--amber); border-radius: var(--radius); padding: 18px; margin: 1rem 0; }
.compare-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 720px) { .compare-grid { grid-template-columns: 1fr 1fr; } }
.inline-note { color: var(--muted); font-size: 0.92rem; }
.link-field { width: 100%; padding: 10px; font-size: 0.92rem; border: 2px solid var(--line); border-radius: 10px; margin: 0.4rem 0; }

/* Research panel */
.research-panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px; margin: 1.4rem 0; }
.research-panel summary { font-weight: 700; cursor: pointer; min-height: 44px; display: flex; align-items: center; }

/* Calculator */
.field { margin: 1rem 0; max-width: 520px; }
.field label { font-weight: 700; display: block; }
.field .explainer { color: var(--muted); font-size: 0.92rem; margin: 0.15rem 0 0.4rem; }
.field input { width: 100%; padding: 11px; font-size: 1rem; border: 2px solid var(--line); border-radius: 10px; background: var(--card); }
.field input:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px var(--amber-soft); }
.errors { background: var(--pricey-bg); border: 1px solid var(--pricey); border-radius: 10px; padding: 10px 16px; margin: 1rem 0; }
.calc-result { margin: 1.4rem 0; }
.calc-result .big-value { font-size: 2rem; font-weight: 800; font-variant-numeric: tabular-nums; color: var(--navy); }

/* Financial independence */
.fi-stats { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin: 0.9rem 0; }
@media (min-width: 820px) { .fi-stats { grid-template-columns: repeat(4, 1fr); } }
.fi-stats div { background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-sm); padding: 12px; text-align: center; }
.fi-stats dt { font-size: 0.82rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 700; }
.fi-stats dd { margin: 0.2rem 0 0; font-weight: 800; font-size: 1.12rem; font-variant-numeric: tabular-nums; color: var(--navy); }
.fi-chart { width: 100%; height: auto; display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 6px; }
.fi-line { fill: none; stroke: var(--amber-text); stroke-width: 2.5; }
.fi-target { stroke: var(--navy); stroke-width: 1.5; stroke-dasharray: 6 5; }
.fi-dot { fill: var(--amber); stroke: var(--navy); stroke-width: 1.2; }
.fi-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin: 0.8rem 0; }
.fi-form .field { margin: 0; }
.fi-form input[type="text"], .fi-form input[type="number"] { padding: 10px; font-size: 1rem; border: 2px solid var(--line); border-radius: 10px; }
.fi-form select { padding: 10px; font-size: 1rem; border: 2px solid var(--line); border-radius: 10px; background: #fff; }
.fi-totals { display: flex; flex-wrap: wrap; gap: 6px 22px; font-variant-numeric: tabular-nums; margin: 0.6rem 0; }

/* Watchlist */
.saved-list, .history-rows { list-style: none; padding: 0; }
.saved-list li, .history-rows li { background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-sm); padding: 12px 14px; margin: 0.5rem 0; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }

/* Accounts, feed, waitlist, portfolio (phase 2 step 3) */
.banner { background: var(--amber-soft); border: 1px solid var(--amber); border-radius: var(--radius); padding: 13px 17px; margin: 1rem 0; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.waitlist-form .field { max-width: 430px; }
.waitlist-status { font-weight: 700; }
.feed-list { list-style: none; padding: 0; }
.feed-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 18px; margin: 0 0 14px; }
.feed-item h3 { margin: 0.2rem 0 0.3rem; }
.feed-item p { margin: 0.3rem 0; }
.feed-meta { color: var(--muted); font-size: 0.9rem; }
.feed-reason { display: inline-block; background: var(--amber-soft); color: var(--navy); font-size: 0.82rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; margin: 0.25rem 0 0; }
.feed-legend { color: var(--muted); font-size: 0.88rem; }
.range-bar { width: 100%; height: auto; display: block; margin: 0.45rem 0 0.1rem; }
.rb-track { fill: var(--cream-dark); }
.rb-base { stroke: var(--navy); stroke-width: 2.5; }
.rb-price { fill: var(--amber); stroke: var(--navy); stroke-width: 1.2; }
.range-caption { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); font-size: 0.88rem; margin: 0.1rem 0 0.3rem; font-variant-numeric: tabular-nums; }
.range-caption strong { color: var(--ink); }
.live-slot { display: block; font-size: 0.86rem; color: var(--muted); margin-top: 2px; }
.live-slot.live-on { color: var(--navy); font-weight: 650; }
.live-now { color: var(--navy); font-weight: 650; }
.live-line { color: var(--muted); margin-top: 0; }
.live-line:empty { display: none; }
.live-line .live-on { color: var(--ink); font-weight: 600; }
#clerk-mount { min-height: 220px; margin: 1rem 0; }
#follow-slot { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 0.4rem 0 0.8rem; }
.scenario-form select { flex: 0 1 200px; padding: 10px; font-size: 1rem; border: 2px solid var(--line); border-radius: 10px; background: #fff; }
#portfolio-form .field { max-width: 430px; }

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

/* Sidebar drawer navigation (checkbox-driven, works without JS) */
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
/* The toggle checkbox itself stays in the tab order for no-JS keyboard
   users; its focus has to land somewhere visible, so when it takes
   keyboard focus the ring is drawn on the menu button (and, once the
   drawer is open, on the drawer's close control) via :has(). With
   JavaScript, app.txt makes the labels themselves keyboard-operable
   and moves focus into the drawer; this is the no-JS floor. */
body:has(> .nav-toggle:focus-visible) .menu-btn,
body:has(> .nav-toggle:checked:focus-visible) .drawer-close {
  outline: 3px solid var(--focus); outline-offset: 2px;
}
.menu-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; margin-right: 4px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; color: #f2ede3; cursor: pointer; flex: none; }
.menu-btn:hover { background: rgba(255, 255, 255, .08); }
.drawer-root { position: fixed; inset: 0; z-index: 60; visibility: hidden; }
.drawer-backdrop { position: absolute; inset: 0; background: rgba(7, 18, 38, .55); opacity: 0; transition: opacity .25s ease; cursor: pointer; }
.drawer { position: absolute; top: 0; left: 0; bottom: 0; width: min(344px, 88vw); background: #0a1a33; color: #f2ede3; transform: translateX(-102%); transition: transform .28s ease; overflow-y: auto; padding: 18px 20px 28px; box-shadow: var(--shadow-lg); }
.nav-toggle:checked ~ .drawer-root { visibility: visible; }
.nav-toggle:checked ~ .drawer-root .drawer-backdrop { opacity: 1; }
.nav-toggle:checked ~ .drawer-root .drawer { transform: translateX(0); }
.drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.drawer-brand { font-size: 1.25rem; font-weight: 800; letter-spacing: -.01em; }
.drawer-close { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: 1px solid rgba(255, 255, 255, .22); border-radius: 999px; cursor: pointer; color: #f2ede3; }
.drawer-close:hover { background: rgba(255, 255, 255, .08); }
.drawer-nav { display: flex; flex-direction: column; gap: 2px; }
.drawer-nav a { color: #e8e2d4; text-decoration: none; font-weight: 600; padding: 10px 12px; border-radius: 10px; min-height: 44px; display: flex; align-items: center; }
.drawer-nav a:hover { background: rgba(255, 255, 255, .08); text-decoration: none; }
.drawer-nav a[aria-current="page"] { background: rgba(216, 164, 65, .18); color: #ffd97a; }
.drawer-group { margin: 6px 0; border-top: 1px solid rgba(255, 255, 255, .12); border-bottom: 1px solid rgba(255, 255, 255, .12); padding: 6px 0; }
.drawer-group summary { cursor: pointer; font-weight: 700; padding: 10px 12px; border-radius: 10px; list-style: none; display: flex; justify-content: space-between; align-items: center; min-height: 44px; }
.drawer-group summary::-webkit-details-marker { display: none; }
.drawer-group summary::after { content: "+"; font-weight: 800; color: #d8a441; }
.drawer-group[open] summary::after { content: "–"; }
.drawer-group a { display: block; margin-left: 10px; font-weight: 500; font-size: .9rem; line-height: 1.35; padding: 8px 12px; white-space: nowrap; }
.drawer-follow { margin: 16px 12px 4px; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #9db1cc; }

/* Home live ticker strip */
.ticker-strip { display: flex; gap: 10px; overflow-x: auto; padding: 4px 2px 10px; scrollbar-width: none; }
.ticker-strip::-webkit-scrollbar { display: none; }
.ticker-chip { flex: none; display: inline-flex; gap: 8px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 999px; padding: 8px 14px; min-height: 44px; color: var(--ink); text-decoration: none; font-variant-numeric: tabular-nums; box-shadow: var(--shadow-sm); }
.ticker-chip:hover { border-color: var(--amber); text-decoration: none; }
.ticker-chip strong { letter-spacing: .02em; }
.ticker-chip span { color: var(--muted); font-weight: 600; }

/* FI progress bar */
.fi-progress { height: 14px; background: var(--surface-muted); border: 1px solid var(--border); border-radius: 999px; overflow: hidden; margin: 4px 0 18px; }
.fi-progress-fill { height: 100%; background: linear-gradient(90deg, #b57f1f, var(--amber)); border-radius: 999px; }

/* Earnings calendar */
.earn-list { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.earn-row { display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 10px 14px; }
.earn-row strong { font-size: 1.02rem; }
.earn-name { color: var(--ink); }
.earn-meta { color: var(--muted); font-size: .92rem; margin-left: auto; font-variant-numeric: tabular-nums; }

/* Workspace price chart */
.street-line { font-size: 1.05rem; }
.street-compare { font-size: 1.02rem; }
.chart-ranges { display: flex; flex-wrap: wrap; gap: 4px; margin: 0 0 8px; }
.chart-ranges button { font: inherit; font-size: 0.82rem; font-weight: 600; padding: 6px 12px; min-height: 44px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); color: var(--muted); cursor: pointer; }
.chart-ranges button:hover { color: var(--navy); border-color: var(--navy); }
.chart-ranges button.is-active { background: var(--navy); border-color: var(--navy); color: #fff; }
.price-chart { width: 100%; height: auto; display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 6px; }
.pc-line { fill: none; stroke: var(--navy); stroke-width: 2; }
.pc-case { stroke-width: 1.5; stroke-dasharray: 6 5; }
.pc-case.pc-bear { stroke: var(--pricey); }
.pc-case.pc-base { stroke: var(--navy); }
.pc-case.pc-bull { stroke: var(--cheap); }
.pc-label { font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pc-label.pc-bear { fill: var(--pricey); }
.pc-label.pc-base { fill: var(--navy); }
.pc-label.pc-bull { fill: var(--cheap); }
.pc-dive { stroke: var(--amber-text); stroke-width: 1.5; stroke-dasharray: 3 4; }
.pc-dive-label { font-size: 12px; font-weight: 700; fill: var(--amber-text); }
.pc-axis { stroke: var(--line); stroke-width: 1; }
.pc-date { font-size: 12px; fill: var(--muted); }
.pc-now-tag { fill: var(--amber-soft); stroke: var(--amber-text); stroke-width: 1; }
.pc-now { font-size: 13px; font-weight: 800; fill: var(--navy); font-variant-numeric: tabular-nums; }
.pc-now-date { font-size: 11px; font-weight: 600; fill: var(--muted); font-variant-numeric: tabular-nums; }
.pc-now-dot { fill: var(--navy); stroke: var(--amber); stroke-width: 2.5; }
.pc-leader { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 2 3; }

/* Workspace financial history */
.fin-chart { width: 100%; height: auto; display: block; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 6px; margin-bottom: 0.8rem; }
.fc-bar { fill: var(--navy-raise); }
.fc-bar.fc-neg { fill: var(--pricey); }
.fc-axis { stroke: var(--line); stroke-width: 1; }
.fc-value { font-size: 12px; font-weight: 700; fill: var(--ink); font-variant-numeric: tabular-nums; }
.fc-year { font-size: 12px; fill: var(--muted); }
.fc-gap { font-size: 11px; fill: var(--muted); font-style: italic; }

/* Research the Inputs: not-meaningful cells carry their dollars on a
   second line; gap rows state the missing year in words. */
.ri-sub { display: block; color: var(--muted); font-size: 0.85rem; font-weight: 400; }
.ri-gap td { color: var(--muted); }
.ri-nm-note { margin-top: 0.25rem; }

/* Storefront: admin tables carry a status select; keep it tappable. */
#admin-requests select { font: inherit; padding: 0.35rem 0.5rem; min-height: 44px; border: 1px solid var(--line); border-radius: 8px; background: var(--card); color: var(--ink); max-width: 100%; }

/* Portfolio live summary and allocation */
.pf-summary { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-sm); padding: 14px 16px; margin: 0.9rem 0; }
.pf-summary p { margin: 0.2rem 0; }
.pf-total { font-size: 1.08rem; font-variant-numeric: tabular-nums; }
.pf-total-label { color: var(--muted); font-weight: 650; }
.pf-total strong { color: var(--navy); font-size: 1.3rem; font-weight: 800; }
.pf-today { font-variant-numeric: tabular-nums; }
.pf-up { color: var(--cheap); }
.pf-down { color: var(--pricey); }
.alloc { margin-top: 0.6rem; display: flex; flex-direction: column; gap: 6px; }
.alloc-row { display: flex; align-items: center; gap: 10px; font-variant-numeric: tabular-nums; }
.alloc-ticker { flex: 0 0 52px; font-weight: 750; color: var(--navy); }
.alloc-track { flex: 1 1 auto; height: 10px; background: var(--cream-dark); border-radius: 999px; overflow: hidden; }
.alloc-bar { display: block; height: 100%; background: var(--amber); border-radius: 999px; }
.alloc-meta { flex: 0 0 auto; color: var(--muted); font-size: 0.92rem; font-weight: 600; }

/* Portfolio views, sorting, and categories */
.pf-updated { color: var(--muted); font-size: 0.88rem; font-variant-numeric: tabular-nums; }
.pf-gainline { font-variant-numeric: tabular-nums; }
.pf-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 1rem 0 0.6rem; }
.pf-tab { appearance: none; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 999px; padding: 7px 16px; min-height: 44px; font-weight: 700; font-size: 0.95rem; cursor: pointer; }
.pf-tab:hover { border-color: var(--amber); }
.pf-tab[aria-selected="true"] { background: var(--navy); border-color: var(--navy); color: var(--cream); }
.pf-groupbar { display: flex; align-items: center; gap: 8px; margin: 0.4rem 0; }
.pf-groupbar label { font-weight: 650; color: var(--muted); }
.pf-table th .pf-sort { appearance: none; background: none; border: none; padding: 10px 4px; margin: -10px 0; font: inherit; color: inherit; font-weight: inherit; cursor: pointer; white-space: nowrap; min-height: 40px; display: inline-flex; align-items: center; }
.pf-table th .pf-sort:hover { color: var(--amber-dark); text-decoration: underline; }
.pf-table td { font-variant-numeric: tabular-nums; }
.pf-group-row td { background: var(--cream); font-weight: 750; color: var(--navy); }
.board-table .pf-group-row td::before { content: none; }
.pf-total-row td { border-top: 2px solid var(--line); }
.pf-cat-assign { max-width: 150px; min-height: 40px; }
.alloc-ticker.alloc-wide { flex: 0 1 auto; min-width: 52px; }
.pf-perf-summary { font-variant-numeric: tabular-nums; }
.pf-cat-group { margin: 1.1rem 0; }
.pf-cat-meta { color: var(--muted); font-size: 0.92rem; font-weight: 650; }
.pf-cats { margin-top: 1.4rem; border-top: 1px solid var(--line-soft); padding-top: 0.8rem; }
.pf-cat-list { list-style: none; margin: 0.6rem 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.pf-cat-item { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pf-cat-label { font-weight: 750; color: var(--navy); }
.pf-cat-rename-input { max-width: 220px; }

/* Watchlist live chips */
.live-chip { font-weight: 650; color: var(--navy); font-variant-numeric: tabular-nums; }
.live-chip:empty { display: none; }

/* Ticker search boxes */
.ticker-search { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin: 0.9rem 0; }
.ticker-search .field { margin: 0; flex: 0 1 240px; }
.ticker-search p { margin: 0; }
.ticker-search input { text-transform: uppercase; }

/* Batch 5 (A8, A10, A12, A16): proof strip, countdowns, mobile cards,
   swing-factor cards, portfolio value history. */

/* Proof strip (A10) */
.proof-strip { margin: 1.1rem 0 0; }
.proof-strip ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.proof-strip li { background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-sm); padding: 10px 14px; flex: 1 1 220px; font-size: 0.95rem; }
.proof-label { display: block; font-size: 0.78rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 2px; }

/* Board countdowns and update flags (A12) */
.countdown { font-weight: 700; color: var(--navy); white-space: nowrap; }
.updated-flag { display: inline-block; margin-top: 4px; font-size: 0.82rem; font-weight: 700; color: var(--navy); background: #faf5e6; border: 1px solid var(--amber); border-radius: 999px; padding: 6px 11px; text-decoration: none; }
.earn-when { font-size: 0.85rem; font-weight: 700; color: var(--navy); background: #faf5e6; border: 1px solid var(--amber); border-radius: 999px; padding: 2px 10px; vertical-align: middle; white-space: nowrap; }

/* Two-line mobile cards (A8): shown only at phone widths, where the
   wide table beside them steps aside. CSS only; no script involved. */
.mobile-cards { display: none; }
.m-card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-sm); padding: 12px 14px; margin: 0.6rem 0; }
.m-line1 { margin: 0 0 2px; font-size: 1.02rem; }
.m-line2 { margin: 0; color: var(--ink); font-variant-numeric: tabular-nums; }
.m-details { margin-top: 8px; }
.m-details summary { cursor: pointer; font-weight: 700; color: var(--navy); padding: 6px 0; min-height: 44px; display: flex; align-items: center; }
.m-fields { list-style: none; padding: 0; margin: 6px 0 2px; }
.m-fields li { padding: 4px 0; border-top: 1px solid var(--line-soft); }
.m-label { display: inline-block; min-width: 118px; font-size: 0.8rem; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
@media (max-width: 700px) {
  .has-cards .table-scroll { display: none; }
  .mobile-cards { display: block; }
}

/* Compare table: one column per stock, first column names the row.
   Numeric cells never wrap; the .table-scroll wrapper carries any
   horizontal overflow between phone and desktop widths, and the
   mobile cards take over at phone widths like the board's. */
.cmp-form .field { flex: 0 1 360px; }
.cmp-form input { text-transform: uppercase; }
.cmp-presets { font-size: 0.95rem; }
.compare-table th.cmp-stock { min-width: 150px; }
.compare-table th.cmp-stock a { color: var(--cream); }
.cmp-co { display: block; font-size: 0.78rem; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--cream-dark); white-space: normal; }
.cmp-fy { display: block; font-size: 0.72rem; font-weight: 400; text-transform: none; letter-spacing: 0; color: var(--cream-dark); white-space: normal; margin-top: 2px; }
.compare-table th[scope="row"] { font-weight: 650; color: var(--navy); white-space: nowrap; }
.compare-table td { white-space: nowrap; }
.compare-table td.cmp-cases { white-space: normal; }
.compare-table tr.cmp-group th { background: var(--amber-soft); color: var(--navy); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; }
.cmp-na { color: var(--muted); }
.cmp-note { display: block; font-size: 0.78rem; color: var(--muted); white-space: normal; margin-top: 2px; }

/* Swing-factor cards (A8): the phone rendering of the KPI table. */
.kpi-cards { display: none; }
.kpi-card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow-sm); padding: 13px 15px; margin: 0.6rem 0; }
.kpi-card h3 { margin: 0 0 4px; font-size: 1.02rem; }
.kpi-base { margin: 0 0 8px; }
.kpi-card p { overflow-wrap: break-word; }
.kpi-chips { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-block; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 3px 11px; font-size: 0.88rem; font-weight: 650; font-variant-numeric: tabular-nums; }
.chip-bear { border-color: #c98a8a; }
.chip-bull { border-color: #8ab08a; }
.kpi-card .m-details p { margin: 4px 0; }
@media (max-width: 720px) {
  .kpi-table-wrap { display: none; }
  .kpi-cards { display: block; }
}

/* Portfolio value history (A16) */
.pf-history { margin: 0.4rem 0 1rem; }
.pf-history h3 { margin: 0 0 4px; }
.pf-history-chart { width: 100%; height: auto; display: block; }
.pf-history-meta { color: var(--muted); font-size: 0.92rem; font-variant-numeric: tabular-nums; margin: 4px 0 0; }
.pf-history-meta strong { color: var(--ink); }
.pf-history-dot { fill: var(--amber); stroke: var(--navy); stroke-width: 1; }

/* Research the Inputs panel */
.ri-base { font-weight: 650; }

/* Interface pass (Dec 1, 2026): header search, the dive sticky bar,
   glossary chips, card sparklines, search results. Plain mechanisms
   first: the search form submits to /search, the chips are <details>,
   the sticky bar is plain markup; JavaScript only enhances. */
.site-search { position: relative; display: flex; gap: 8px; align-items: center; }
.site-search input { font: inherit; font-size: 0.95rem; color: var(--ink); background: var(--cream); border: 1.5px solid transparent; border-radius: 999px; padding: 9px 16px; min-height: 44px; width: 210px; max-width: 52vw; }
.site-search input::placeholder { color: var(--muted); }
.site-search input:focus { outline: 2px solid var(--focus); outline-offset: 1px; background: #fff; }
.search-results { position: absolute; top: calc(100% + 8px); right: 0; z-index: 90; min-width: min(300px, 86vw); background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; text-align: left; }
.search-results[hidden] { display: none; }
.search-hit { display: block; padding: 9px 10px; border-radius: 9px; color: var(--ink); text-decoration: none; font-size: 0.95rem; }
.search-hit:visited { color: var(--ink); }
.search-hit:hover, .search-hit.active { background: var(--amber-soft); }
.search-none { margin: 0; padding: 9px 10px; color: var(--muted); font-size: 0.92rem; }
@media (max-width: 760px) {
  .site-search { flex: 1 1 200px; }
  .site-search input { flex: 1; width: auto; }
  .search-results { left: 0; right: auto; }
}
.search-all { columns: 2; column-gap: 28px; padding-left: 1.1rem; }
@media (min-width: 760px) { .search-all { columns: 3; } }
.search-all li { break-inside: avoid; margin: 0.2rem 0; }
.search-all .company { color: var(--muted); }

.dive-sticky { position: sticky; top: 84px; z-index: 40; display: flex; align-items: center; gap: 8px 14px; flex-wrap: wrap; background: var(--card); border: 1px solid var(--line); border-radius: 999px; box-shadow: var(--shadow-md); padding: 6px 8px 6px 16px; margin: 0.7rem 0 0.2rem; }
.ds-ticker { font-weight: 800; font-size: 1.05rem; color: var(--ink); text-decoration: none; }
.ds-ticker:visited { color: var(--ink); }
.ds-price { font-variant-numeric: tabular-nums; font-weight: 650; white-space: nowrap; }
.ds-follow { margin-left: auto; display: inline-flex; align-items: center; gap: 8px; }

.gloss { position: relative; display: inline-block; }
.gloss-pop { display: inline; }
.gloss-pop summary { display: inline-flex; align-items: center; justify-content: center; width: 19px; height: 19px; border-radius: 50%; background: var(--amber-soft); color: var(--amber-text); font-size: 0.72rem; font-weight: 800; line-height: 1; cursor: pointer; list-style: none; margin-left: 4px; vertical-align: 2px; }
.gloss-pop summary::-webkit-details-marker { display: none; }
.gloss-pop summary:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.gloss-card { position: absolute; left: -6px; top: calc(100% + 8px); z-index: 55; width: 290px; max-width: 78vw; background: var(--card); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-md); padding: 10px 12px; font-size: 0.9rem; font-weight: 400; line-height: 1.45; letter-spacing: normal; text-transform: none; text-align: left; }

/* The sticky offset tracks the site header's height, which steps
   down as the header unwraps: 176px tall at 320-339px wide, 124px at
   340-669px, 80px at 670-689px, 72px above that (measured on the
   live pages, Dec 1, 2026). On the narrowest phones the bar stays a
   static summary strip: header plus stuck bar would eat half the
   screen. */
@media (max-width: 689px) { .dive-sticky { top: 92px; } }
@media (max-width: 669px) { .dive-sticky { top: 136px; } }
@media (max-width: 339px) { .dive-sticky { position: static; } }

.section-intro, .assump-note { margin: 0.55rem 0; }

.spark { display: block; width: 84px; height: 28px; margin: 0.25rem 0 0.1rem; }
.spark svg { display: block; }
.spark-line { fill: none; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.spark-up { stroke: var(--cheap); }
.spark-down { stroke: var(--pricey); }
td .spark { margin: 0; }
