/* Stock Forecasting & Market Intelligence — private application. One stylesheet, no JS, no external assets.
   Semantic colours (strict): GREEN favourable/outperformance · RED adverse/underperformance · AMBER pending/caution/provisional
   BLUE information/context · PURPLE regime/analog · GRAY insufficient/unavailable. Never use them decoratively.
   Theme: server-rendered `data-theme` on <html> ("light" | "dark" | absent = follow the system). Light = blue-and-white content under a navy header/hero band. */
:root {
  --bg: #e9f0fa; --surface: #ffffff; --surface-2: #f1f6fd; --border: #cfdcec; --text: #13203a; --muted: #4d5d78;
  --green: #0b6a3a; --red: #b0202b; --amber: #834c00; --blue: #1a5bc4; --purple: #6a3db3; --gray: #536074; --on-accent: #ffffff;
  --green-bg: #dff3e7; --red-bg: #fbe3e5; --amber-bg: #fcecc9; --blue-bg: #dde9fb; --purple-bg: #ece4f8; --gray-bg: #e8edf4;
  --nav-bg: #0a1730; --nav-text: #d5deec; --nav-active: #ffffff; --nav-line: #5aa2ff; --hero-text: #eef3fb; --hero-muted: #b4c1d6;
  --radius: 14px; --tap: 44px; --shadow: 0 1px 2px rgba(19, 32, 58, .06), 0 6px 20px rgba(19, 32, 58, .06);
  --gutter: 16px; --page-max: 1560px; --bar-max: 1760px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1220; --surface: #121b2c; --surface-2: #1a2538; --border: #29364c; --text: #e8edf5; --muted: #a1adc0;
    --green: #4cc38a; --red: #ff7176; --amber: #f0b350; --blue: #6aaaf5; --purple: #b592f0; --gray: #97a4b6; --on-accent: #0b1220;
    --green-bg: #12301f; --red-bg: #3a1a1c; --amber-bg: #38290f; --blue-bg: #14263f; --purple-bg: #271d3d; --gray-bg: #212b3a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  }
}
:root[data-theme="dark"] {
  --bg: #0b1220; --surface: #121b2c; --surface-2: #1a2538; --border: #29364c; --text: #e8edf5; --muted: #a1adc0;
  --green: #4cc38a; --red: #ff7176; --amber: #f0b350; --blue: #6aaaf5; --purple: #b592f0; --gray: #97a4b6; --on-accent: #0b1220;
  --green-bg: #12301f; --red-bg: #3a1a1c; --amber-bg: #38290f; --blue-bg: #14263f; --purple-bg: #271d3d; --gray-bg: #212b3a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; color-scheme: light dark; }
:root[data-theme="light"] { color-scheme: light; } :root[data-theme="dark"] { color-scheme: dark; }
body { margin: 0; background: var(--bg); color: var(--text); font: 17px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif; }
a { color: var(--blue); }
h1 { font-size: 1.85rem; line-height: 1.2; margin: 0; letter-spacing: -.015em; } h2 { font-size: 1.25rem; line-height: 1.3; margin: 0 0 .55rem; } h3 { font-size: 1.05rem; margin: 0 0 .4rem; }
p { margin: .45rem 0; } small, .muted { color: var(--muted); } .small { font-size: .9rem; }
.prose { max-width: 75ch; } .narrow { max-width: 34rem; }
/* the page container: a wide, centred column; the gutter grows with the screen (never a narrow root wrapper) */
.container { width: 100%; max-width: var(--page-max); margin: 0 auto; padding: 0 var(--gutter) 56px; }

/* ---- header: navy bar, ONE row on wide screens (brand · links · tools); a CSS-only <details> menu below 1360px ---- */
.site-header { background: var(--nav-bg); color: var(--nav-text); position: sticky; top: 0; z-index: 10; border-bottom: 1px solid rgba(255, 255, 255, .08); }
/* The header is a wrapping flex row: brand · links · tools. Links carry SHORT labels only (full names are the aria-label/tooltip), search appears only
   when it genuinely fits, and if a browser/zoom/font ever makes the row too wide it WRAPS to a second row instead of overlapping (flex-wrap + no shrinking). */
.headbar { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; padding: 4px var(--gutter); max-width: var(--bar-max); margin: 0 auto; min-height: 60px; }
.brand { font-weight: 700; text-decoration: none; color: var(--nav-active); display: inline-flex; align-items: center; gap: 10px; line-height: 1.15; flex: 0 0 auto; white-space: nowrap; }
.brand small { display: none; }
.brand .mark { width: 32px; height: 32px; border-radius: 9px; background: var(--blue-bg); color: var(--blue); display: inline-flex; align-items: center; justify-content: center; font-weight: 800; font-size: .95rem; }
nav.main { display: none; flex: 1 0 auto; }
nav.main ul, .menu-panel ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0; }
nav.main a { display: block; padding: 0 6px; line-height: 56px; text-decoration: none; color: var(--nav-text); border-bottom: 3px solid transparent; white-space: nowrap; font-size: .92rem; }
nav.main a:hover { color: var(--nav-active); }
nav.main a[aria-current="page"], .menu-panel a[aria-current="page"] { color: var(--nav-active); border-bottom-color: var(--nav-line); font-weight: 600; }
.bar-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: 0 0 auto; }
form.search { display: none; gap: 6px; }
form.search input[type=search] { background: rgba(255, 255, 255, .1); color: var(--nav-active); border-color: rgba(255, 255, 255, .25); min-height: 40px; width: 170px; }
form.search input::placeholder { color: var(--hero-muted); }
.site-header button.ghost, .site-header summary.ghost { background: transparent; color: var(--nav-active); border: 1px solid rgba(255, 255, 255, .3); min-height: 40px; }
.btn.cta, .site-header .cta { background: var(--nav-line); border-color: var(--nav-line); color: #06132a; font-weight: 700; min-height: 40px; white-space: nowrap; }
details.usermenu, details.burger { position: relative; }
details > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 0 12px; border-radius: 8px; white-space: nowrap; }
details > summary::-webkit-details-marker { display: none; }
.menu-panel { position: absolute; right: 0; top: calc(100% + 6px); min-width: 250px; max-width: calc(100vw - 24px); background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 6px; z-index: 20; }
.menu-panel ul { flex-direction: column; } .menu-panel a, .menu-panel button.linklike { display: block; width: 100%; padding: 0 12px; line-height: var(--tap); color: var(--text); text-decoration: none; border-radius: 8px; text-align: left; background: transparent; border: 0; font: inherit; cursor: pointer; }
.menu-panel a:hover, .menu-panel button.linklike:hover { background: var(--surface-2); }
.menu-panel a[aria-current="page"] { border-bottom-color: transparent; background: var(--blue-bg); color: var(--blue); }
.menu-panel .who { padding: 8px 12px; color: var(--muted); font-size: .9rem; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.menu-panel form.menu-search { display: flex; gap: 6px; padding: 8px 6px; } .uname { display: inline-block; max-width: 7rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; vertical-align: bottom; } details.searchmenu { display: none; } .menu-panel form.menu-search input { min-height: 40px; }
.theme-btn .theme-label { display: none; }
.bar-tools .cta, details.usermenu { display: none; } .menu-sep { border-top: 1px solid var(--border); margin: 6px 0; } details.burger .menu-panel { max-height: calc(100vh - 80px); overflow-y: auto; }
/* Breakpoints come from the measured (upper-bound) widths of the header's contents, each with slack; tests/test_web_responsive.py models them at 1920…360px.
   below 1500px: brand · theme · ☰ menu (links, search, Run New Forecast and account all live in the menu).
   1500–1759px : links + Search (dropdown) + Run Forecast + theme + account.   1760px and up: the search box itself is inline. */
@media (min-width: 1500px) { nav.main { display: block; } details.burger { display: none; } .bar-tools .cta { display: inline-flex; } details.usermenu, details.searchmenu { display: block; } details.usermenu .menu-panel form.menu-search { display: none; } .container, .headbar, .hero-inner { padding-left: 24px; padding-right: 24px; } }
@media (min-width: 1760px) { form.search { display: flex; } details.searchmenu { display: none; } .container, .headbar, .hero-inner { padding-left: 32px; padding-right: 32px; } }
.skip { position: absolute; left: 8px; top: -60px; z-index: 30; background: var(--surface); color: var(--text); padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border); } .skip:focus { top: 8px; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 2px; } main:focus { outline: none; }

/* ---- notices, badges ---- */
.banner { background: var(--surface); color: var(--muted); border-bottom: 1px solid var(--border); padding: 5px var(--gutter); font-size: .85rem; text-align: center; }
.banner b { color: var(--amber); font-weight: 600; }
.notice { border-left: 4px solid var(--blue); background: var(--blue-bg); padding: 11px 14px; border-radius: 8px; margin: 12px 0; }
.notice.warn { border-color: var(--amber); background: var(--amber-bg); } .notice.error { border-color: var(--red); background: var(--red-bg); }
.notice.ok { border-color: var(--green); background: var(--green-bg); } .notice.gray { border-color: var(--gray); background: var(--gray-bg); }
.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .82rem; font-weight: 600; white-space: nowrap; border: 1px solid transparent; }
.badge.green { color: var(--green); background: var(--green-bg); border-color: var(--green); } .badge.red { color: var(--red); background: var(--red-bg); border-color: var(--red); }
.badge.amber { color: var(--amber); background: var(--amber-bg); border-color: var(--amber); } .badge.blue { color: var(--blue); background: var(--blue-bg); border-color: var(--blue); }
.badge.purple { color: var(--purple); background: var(--purple-bg); border-color: var(--purple); } .badge.gray { color: var(--gray); background: var(--gray-bg); border-color: var(--gray); }
.txt-green { color: var(--green); } .txt-red { color: var(--red); } .txt-amber { color: var(--amber); } .txt-blue { color: var(--blue); } .txt-purple { color: var(--purple); } .txt-gray { color: var(--gray); }
.insufficient { color: var(--gray); font-style: italic; }

/* ---- hero band (Dashboard, stock page): navy atmosphere, decorative SVG behind the text ---- */
.hero { background: var(--nav-bg) url("hero.svg") center / cover no-repeat; color: var(--hero-text); }
.hero-inner { max-width: var(--page-max); margin: 0 auto; padding: 24px var(--gutter) 28px; }
.hero h1 { color: var(--hero-text); font-size: 2rem; } .hero p, .hero .muted { color: var(--hero-muted); }
.hero a { color: #9cc7ff; }
.hero-sub { margin: 6px 0 0; font-size: 1.05rem; max-width: 70ch; }
.hero-date { margin: 2px 0 0; font-size: 1.1rem; font-weight: 600; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 6px 26px; margin-top: 12px; font-size: .98rem; color: var(--hero-muted); } .hero-meta b { color: var(--hero-text); font-weight: 600; }
.hero .btn.secondary, .hero button.secondary { background: rgba(255, 255, 255, .08); color: var(--hero-text); border-color: rgba(255, 255, 255, .4); }
.hero-price { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 18px; margin: 8px 0; } .hero-price .big { font-size: 2.4rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.hero .txt-green { color: #59d69b; } .hero .txt-red { color: #ff8a8f; } .hero .txt-gray, .hero .insufficient { color: var(--hero-muted); }
.hero .chips { margin: 8px 0; }

/* Anchors that a control links to with a URL fragment (e.g. a chart's period/benchmark switches) must not land under the sticky header. */
h2[id], h3[id] { scroll-margin-top: 84px; }
@media (max-width: 480px) { h2[id], h3[id] { scroll-margin-top: 104px; } }

/* ---- layout primitives ---- */
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 10px 20px; margin: 24px 0 6px; }
.page-head .sub { color: var(--muted); margin: 4px 0 0; max-width: 80ch; }
.stack > * + * { margin-top: 18px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); margin: 16px 0; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.grid.tiles { grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); }
@media (min-width: 1400px) { .grid.tiles.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.row2, .row3 { display: grid; gap: 18px; grid-template-columns: 1fr; margin: 18px 0; align-items: start; } .row2 > *, .row3 > * { min-width: 0; }
@media (min-width: 1100px) { .row2 { grid-template-columns: 1fr 1fr; } .row2.wide-left { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); } .row2.wide-right { grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); } .row3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; min-width: 0; box-shadow: var(--shadow); }
.card > h2:first-child, .card > h3:first-child { margin-top: 0; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px 14px; flex-wrap: wrap; margin-bottom: 12px; } .card-head h2 { margin: 0; }
.tile { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 14px 16px; box-shadow: var(--shadow); min-width: 0; }
.tile .sym { font-weight: 700; font-size: 1.05rem; } .tile .big { font-size: 1.6rem; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; }
.kpi { font-size: 1.9rem; font-weight: 700; line-height: 1.2; font-variant-numeric: tabular-nums; } .kpi-label { color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
.strip { display: grid; gap: 14px 22px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr)); margin: 4px 0 2px; } .strip > div { min-width: 0; }
.strip .v { font-size: 1.15rem; font-weight: 650; overflow-wrap: anywhere; } .strip .k { color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; }
dl.facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 18px; margin: 0; } dl.facts dt { color: var(--muted); } dl.facts dd { margin: 0; overflow-wrap: anywhere; }
@media (max-width: 520px) { dl.facts { grid-template-columns: 1fr; } dl.facts dt { margin-top: 6px; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
meter { width: 100%; height: 9px; vertical-align: middle; } .pct-cell { min-width: 110px; }
.insights { list-style: none; margin: 0; padding: 0; } .insights li { padding: 11px 0; border-bottom: 1px solid var(--border); display: grid; gap: 3px; } .insights li:last-child { border-bottom: 0; }
.insights .ev { color: var(--muted); font-size: .88rem; }
.steps { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); counter-reset: s; padding: 0; list-style: none; margin: 8px 0; }
.steps li { counter-increment: s; border: 1px solid var(--border); border-radius: var(--radius); padding: 12px 14px; background: var(--surface-2); } .steps li::before { content: counter(s); font-weight: 700; color: var(--blue); margin-right: 8px; }
.stock-cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr)); }
.hz-cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr)); }
.hz-card { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--surface-2); } .hz-card.on { background: var(--surface); border-color: var(--blue); }
.hz-card .h { font-weight: 700; font-size: 1.05rem; } .hz-card .st { color: var(--muted); font-size: .9rem; margin-top: 2px; }
details.disc { border: 1px solid var(--border); border-radius: 12px; background: var(--surface); padding: 0 16px; margin: 12px 0; }
details.disc > summary { padding: 12px 0; font-weight: 600; cursor: pointer; display: flex; justify-content: space-between; gap: 12px; width: 100%; }
details.disc > summary::after { content: "▾"; color: var(--muted); } details.disc[open] > summary::after { content: "▴"; } details.disc[open] > summary { border-bottom: 1px solid var(--border); margin-bottom: 12px; }
details.disc > *:last-child { margin-bottom: 14px; }
.empty-state { text-align: center; color: var(--muted); padding: 28px 12px; }
.news-item { padding: 12px 0; border-bottom: 1px solid var(--border); } .news-item:last-child { border-bottom: 0; }
.news-item a.headline { font-weight: 600; text-decoration: none; font-size: 1.02rem; overflow-wrap: anywhere; } .news-item a.headline:hover { text-decoration: underline; }
.news-item .meta { color: var(--muted); font-size: .88rem; margin-top: 2px; }

/* ---- tables scroll inside their own container, never the page ---- */
.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); }
table.data { border-collapse: collapse; width: 100%; font-size: 1rem; } table.data th, table.data td { padding: 11px 12px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.data th { background: var(--surface-2); font-weight: 650; white-space: normal; color: var(--muted); font-size: .88rem; text-transform: uppercase; letter-spacing: .03em; } table.data td.num, table.data th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.data tr:last-child td { border-bottom: 0; } table.data td.wrap { white-space: normal; min-width: 130px; } table.data th.grp { text-align: center; border-bottom: 1px solid var(--border); white-space: normal; }
table.data td.price b { white-space: nowrap; } table.data td.actions { white-space: nowrap; }
table.data tbody tr:hover td { background: var(--surface-2); }
table.data th a { color: inherit; text-decoration: none; } table.data th a:hover { text-decoration: underline; }
table.data td.ctr, table.data th.ctr { text-align: center; }
table.data th[scope="row"] { text-transform: none; letter-spacing: 0; font-size: 1rem; color: var(--text); background: var(--surface); }
table.data td.nowrap { white-space: nowrap; }
table.data .stick { position: sticky; left: 0; background: var(--surface); z-index: 1; box-shadow: 1px 0 0 var(--border); min-width: 13rem; }
table.data thead .stick { background: var(--surface-2); z-index: 2; }

/* ---- forms + buttons (>= 44px touch targets) ---- */
form.inline { display: inline; } label { display: block; font-weight: 600; margin: 10px 0 4px; }
label.check { display: inline; font-weight: 400; margin: 0; } input[type=checkbox] { width: 20px; height: 20px; vertical-align: -4px; }
input[type=text], input[type=password], input[type=search], input[type=date], select { width: 100%; min-height: var(--tap); padding: 8px 12px; border: 1px solid var(--border); border-radius: 9px; background: var(--surface); color: var(--text); font: inherit; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; } .row > * { flex: 1 1 170px; } .row > .shrink { flex: 0 0 auto; }
button, .btn { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tap); padding: 8px 18px; border-radius: 9px; border: 1px solid var(--blue); background: var(--blue); color: var(--on-accent); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
button.secondary, .btn.secondary { background: var(--surface); color: var(--blue); } button.danger, .btn.danger { background: var(--red); border-color: var(--red); color: #fff; } button.small, .btn.small { min-height: 38px; padding: 4px 12px; font-size: .92rem; }
button[disabled], .btn[disabled] { background: var(--gray-bg); color: var(--gray); border-color: var(--border); cursor: not-allowed; }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; margin: 6px 0; } .seg a { min-height: 40px; padding: 0 15px; display: inline-flex; align-items: center; border: 1px solid var(--border); border-radius: 9px; text-decoration: none; color: var(--text); background: var(--surface); }
.seg a[aria-current="true"] { background: var(--blue); color: var(--on-accent); border-color: var(--blue); }
.seg + .seg { margin-left: 8px; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: .88rem; color: var(--muted); margin-top: 6px; } .swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; } .filters > div { flex: 1 1 170px; min-width: 0; }

/* ---- charts (inline SVG; colours from the same semantic classes) ---- */
.chart-wrap { margin: 0; overflow-x: auto; } svg.chart { width: 100%; min-width: 720px; height: auto; display: block; } svg.spark { width: 120px; height: 30px; vertical-align: middle; }
.chart .grid { stroke: var(--border); stroke-width: 1; } .chart .zero { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 3; } .chart .marker { stroke: var(--purple); stroke-width: 1.5; stroke-dasharray: 5 3; }
.chart .tick { fill: var(--muted); font-size: 14px; } .chart .marker-label { fill: var(--purple); font-size: 14px; font-weight: 600; } .line { fill: none; stroke-width: 2.25; stroke-linejoin: round; } .hit { fill: transparent; } .hit:hover { fill: currentColor; } .dot { fill-opacity: .75; }
.chart-note { color: var(--muted); font-size: .88rem; margin: 6px 0 0; } .empty, .spark-empty { color: var(--gray); font-style: italic; }
.line.c-green { stroke: var(--green); } .line.c-red { stroke: var(--red); } .line.c-amber { stroke: var(--amber); } .line.c-blue { stroke: var(--blue); } .line.c-purple { stroke: var(--purple); } .line.c-gray { stroke: var(--gray); }
.bar.c-green, .dot.c-green, .swatch.c-green { fill: var(--green); background: var(--green); } .bar.c-red, .dot.c-red, .swatch.c-red { fill: var(--red); background: var(--red); }
.bar.c-amber, .dot.c-amber, .swatch.c-amber { fill: var(--amber); background: var(--amber); } .bar.c-blue, .dot.c-blue, .swatch.c-blue { fill: var(--blue); background: var(--blue); }
.bar.c-purple, .dot.c-purple, .swatch.c-purple { fill: var(--purple); background: var(--purple); } .bar.c-gray, .dot.c-gray, .swatch.c-gray { fill: var(--gray); background: var(--gray); }
.hit.c-green { color: var(--green); } .hit.c-red { color: var(--red); } .hit.c-amber { color: var(--amber); } .hit.c-blue { color: var(--blue); } .hit.c-purple { color: var(--purple); } .hit.c-gray { color: var(--gray); }
.swatch { fill: none; }

.login-box { max-width: 400px; margin: 12vh auto 0; } .flash { margin: 10px 0; }
.foot { color: var(--muted); font-size: .88rem; padding: 18px; text-align: center; border-top: 1px solid var(--border); margin-top: 28px; }
.pageheader { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px; margin: 22px 0 8px; }
@media print { .site-header, .banner, .foot { display: none; } }

ul.news { list-style: none; padding: 0; margin: 0; } ul.news li { padding: 12px 0; border-bottom: 1px solid var(--border); } ul.news li:last-child { border-bottom: 0; } ul.news a b { overflow-wrap: anywhere; }
.mt { margin-top: 14px; } pre.out { white-space: pre-wrap; overflow-wrap: anywhere; background: var(--surface-2); padding: 10px; border-radius: 8px; overflow-x: auto; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.pill-x { display: inline-flex; align-items: center; gap: 6px; padding: 2px 6px 2px 14px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.pill-x a { min-height: 32px; min-width: 32px; display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
body.login-page { background: var(--nav-bg) url("hero.svg") center / cover fixed no-repeat; min-height: 100vh; }
.login-brand { color: var(--hero-text); text-align: center; margin: 10vh 0 0; font-weight: 700; } .login-brand .mark { display: inline-flex; width: 32px; height: 32px; border-radius: 9px; background: var(--blue-bg); color: var(--blue); align-items: center; justify-content: center; margin-right: 8px; }
.login-page .login-box { margin-top: 16px; }
@media (max-width: 480px) { .brand > span:last-child { display: none; } .headbar { gap: 4px 6px; } }
@media (max-width: 700px) { button, .btn, button.small, .btn.small { min-height: 44px; } body { font-size: 16px; } .menu-panel a { line-height: 48px; } .seg a { min-height: 44px; } .hero h1 { font-size: 1.5rem; } h1 { font-size: 1.55rem; } .hero-price .big { font-size: 2rem; } .card { padding: 16px; } }
.headline-line { font-size: 1.35rem; font-weight: 700; line-height: 1.3; margin: 4px 0 8px; }
.row-actions { display: flex; flex-wrap: nowrap; align-items: center; gap: 6px; } .row-actions button.star { min-width: 40px; font-size: 1.1rem; }
/* Row menu: a native popover (top layer) — it overlays the table, is never clipped by .table-wrap and never changes a row's height. Escape and an outside click close it (built in);
   the button that opened it keeps focus. Where anchor positioning exists it opens under its button, flipping to stay inside the viewport; elsewhere it is centred in the viewport. */
.menu-pop { margin: 0; padding: 6px; min-width: 11rem; max-width: calc(100vw - 16px); max-height: calc(100vh - 16px); overflow: auto; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.menu-pop:popover-open { display: flex; flex-direction: column; gap: 4px; } .menu-pop form { display: block; margin: 0; } .menu-pop button { width: 100%; justify-content: flex-start; text-align: left; min-height: var(--tap); }
@supports (position-area: bottom) { .menu-pop { position: fixed; inset: auto; margin: 4px 0; position-area: bottom span-left; position-try-order: most-block-size; position-try-fallbacks: flip-block; max-height: calc(100% - 8px); } }
.hero-cols { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); max-width: 760px; margin: 8px 0; }
.hero-box { border: 1px solid rgba(255, 255, 255, .25); border-radius: 12px; padding: 10px 14px; background: rgba(255, 255, 255, .06); }
.hero-box-title { font-weight: 600; font-size: .95rem; } .hero-box-title .small { font-weight: 400; color: var(--hero-muted); }
.hero-nums { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.company-head { font-size: 1.15rem; padding-top: 6px; border-top: 1px solid var(--border); } .company-head:first-of-type { border-top: 0; }
.chart .xlabel { font-size: 16px; font-weight: 600; fill: var(--text); } .chart .axis-label { fill: var(--muted); font-size: 14px; }
code { overflow-wrap: anywhere; } /* long identifiers/checksums wrap on narrow screens instead of being clipped */
