stocks / static /css /research.css
user
python version
ee446e8
Raw History Blame Contribute Delete
51.6 kB
/* ═══════════════════════════════════════════════════════════════════════ Flash Research shell A two-pane study surface laid over the long-form page: the ticker is resolved in the top bar, the chart and the context tabs sit on the left, the study controls / statistics / event table on the right. Height is viewport-bound and each pane scrolls on its own, so the study never becomes a single long scroll the way the sections below it do. Tokens only, and every owner class is scoped under .flash so nothing here can leak into the rest of the app. ═══════════════════════════════════════════════════════════════════════ */ .flash-foot { padding: 1rem; font-size: .85rem; color: var(--muted); } .flash { --flash-topbar-h: var(--toolbar-height); --flash-viewtabs-h: var(--tab-height); --flash-right-w: min(46vw, var(--panel-width-xl)); --flash-pane-h: 320px; display: flex; flex-direction: column; /* A flex column rather than a fixed grid template on purpose. The status line is display:none once a study lands, and a display:none child stops being a grid item -- which shifted every later child up one track and handed the overview view an `auto` track (589px) while the `1fr` track (419px) sat empty. Flex does not renumber anything when a child is hidden, so the views can be shown and hidden freely. */ /* Centred exactly like .page-wrapper (max-width + auto margins). The app does NOT offset content for the fixed sidebar -- it lets the centred column clear it -- so a margin-left here only added dead space. */ width: 100%; max-width: 1600px; margin: 0 auto; /* A DEFINITE height, not min-height: `fr` only distributes in a grid whose height is resolved, so with min-height the 1fr track collapsed and the right pane's 1300px of content pushed the whole study below the fold instead of scrolling inside it. Hosted as a tab of /backtest, the study no longer owns the whole viewport: the tab bar and the page wrapper sit above it, and the panel declares how much in --research-layout-offset (static/css/backtest.css). The default of 0px keeps the standalone behaviour this rule had. */ height: calc(var(--viewport-h) - var(--research-layout-offset, 0px)); background: var(--bg); color: var(--text); font-family: var(--font-sans); font-size: var(--font-sm); } /* ── top bar ─────────────────────────────────────────────────────────── */ .flash-topbar { flex: none; display: flex; align-items: center; gap: var(--space-sm); flex-wrap: wrap; height: auto; min-width: 0; min-height: var(--flash-topbar-h); padding: var(--space-xs) var(--space-sm); background: var(--bg-elevated); border-bottom: 1px solid var(--border); } .flash-tickerbar { flex: 0 1 auto; display: flex; align-items: center; gap: var(--space-xs); min-width: 0; overflow-x: auto; scrollbar-width: none; } .flash-controls, .flash-topbar__actions { min-width: 0; flex: 0 1 auto; /* A control that cannot shrink wraps onto its own line rather than being squeezed: the selects are sized by their own options (below), so a narrow viewport has to stack them, not clip them. */ flex-wrap: wrap; } .flash-tickerbar::-webkit-scrollbar { display: none; } .flash-tickertab { align-items: center; background: var(--bg-secondary); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-secondary); display: flex; flex: none; gap: var(--space-2xs); transition: background var(--transition-fast), color var(--transition-fast); } .flash-tickertab.is-active { background: var(--accent-bg); border-color: var(--accent); color: var(--text); } .flash-tickertab__open, .flash-tickertab__remove { background: transparent; border: 0; color: inherit; cursor: pointer; font: inherit; } .flash-tickertab__open { align-items: baseline; display: flex; gap: var(--space-xs); padding: var(--space-2xs) 0 var(--space-2xs) var(--space-sm); white-space: nowrap; } .flash-tickertab__open:hover, .flash-tickertab__remove:hover { color: var(--text); } .flash-tickertab__remove { align-items: center; border-radius: var(--radius-sm); display: inline-flex; font-size: var(--font-sm); justify-content: center; line-height: 1; min-height: var(--touch-floor); min-width: var(--touch-floor); padding: 0; } .flash-tickertab__ticker { font-weight: 700; } .flash-tickertab__name { color: var(--text-muted); } .flash-tickerbar__clear { background: transparent; border: 0; color: var(--text-muted); cursor: pointer; flex: none; font-size: var(--font-xxs); text-decoration: underline; white-space: nowrap; } .flash-symbol { display: flex; align-items: baseline; gap: var(--space-xs); flex: none; max-width: 40vw; padding: var(--space-2xs) var(--space-sm); border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-input); color: var(--text); } .flash-symbol__ticker { font-weight: 700; font-size: var(--font-xs); } .flash-symbol__name { color: var(--primary); font-size: var(--font-xs); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } /* ── view tabs ───────────────────────────────────────────────────────── */ /* Four tab bars (view / right / bottom / event) and one tab button: the .tabs row and the .tab / .tab--active button live in common.css. What is left here is each bar's own box β€” its height, padding and borders. */ .flash-viewtabs { flex: none; height: var(--flash-viewtabs-h); padding: 0 var(--space-sm); background: var(--bg-elevated); border-bottom: 1px solid var(--border); } /* ── the two panes ───────────────────────────────────────────────────── */ /* The view is the only growing child of the .flash column, so the panes inside it get a bounded height to scroll within. */ .flash-view { flex: 1 1 auto; min-height: 0; overflow: hidden; } .flash-body { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) var(--flash-right-w); min-height: 0; height: 100%; } /* The seam between the two panes. A grid item in the right pane's column, pinned to its start edge and pulled 5px left by the negative margin, so it straddles the seam without the offset having to be recomputed from `--flash-right-w` (whose default is a clamp, not a length calc can use). */ .flash-body > .panel-resize-handle { grid-column: 2; grid-row: 1; justify-self: start; margin-left: -5px; margin-right: 0; position: relative; } .flash-left { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr); min-width: 0; min-height: 0; border-right: 1px solid var(--border); } /* Pinned to the body's second column, row 1. Without it the pane is auto-placed, and the seam handle above already holds that cell, so the pane fell into column 1 under the chart and the right track stayed empty. */ .flash-right { grid-column: 2; grid-row: 1; display: grid; grid-template-rows: auto auto auto auto auto minmax(0, 1fr); min-width: 0; min-height: 0; height: 100%; overflow-y: auto; } .flash-chartbar { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-sm); padding: var(--space-xs) var(--space-sm); border-bottom: 1px solid var(--border); } .flash-chartbar__group { display: flex; align-items: center; gap: var(--space-xs); } .flash-chartbar__label { color: var(--text-muted); font-size: var(--font-xxs); text-transform: uppercase; letter-spacing: 0.04em; } .flash-chart { min-height: 320px; } /* The chart/context-panes seam: a grid item in the panes' row (row 5, after quote/chart/chartbar/bottomtabs), pinned to the row's top edge. In flow it tracks the seam as the panes grow; absolutely positioned it would have no seam to sit on, because the panes are capped by a max-height rather than owning a definite one. */ .flash-panes-seam { grid-column: 1; grid-row: 5; align-self: start; position: relative; } /* ── bottom context tabs ─────────────────────────────────────────────── */ .flash-bottomtabs { padding: var(--space-xs) var(--space-sm); background: var(--bg-elevated); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); } .flash-panes { overflow-y: auto; max-height: var(--flash-pane-h); padding: var(--space-sm); } .flash-pane { display: block; } /* ── right pane controls ─────────────────────────────────────────────── */ .flash-controls { display: flex; align-items: center; gap: var(--space-md); flex-wrap: wrap; padding: var(--space-sm); background: var(--bg-elevated); border-bottom: 1px solid var(--border); } .flash-control { display: flex; align-items: center; gap: var(--space-xs); } .flash-control__label { color: var(--text-secondary); font-size: var(--font-xs); white-space: nowrap; } /* Sized by its widest option, not by the space left over. A minimum of 0 let the flex row shrink the select below its selected label, which then rendered ellipsized -- "Close gr..." -- and hid the one line the control exists to show. */ .flash-control .select-field { height: var(--control-height); min-width: max-content; /* The common select pads top and bottom, and inside a 28px box that left the selected label with no room: "Gaps Up" was cut off at the bottom. */ padding-block: 0; padding-inline: var(--space-xs); line-height: 1.2; } .flash-iconbtn { display: grid; place-items: center; width: var(--touch-min); height: var(--control-height); padding: 0; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-input); color: var(--text-secondary); cursor: pointer; } .flash-iconbtn:hover { color: var(--text); border-color: var(--border-focus); } .flash-iconbtn svg { width: var(--icon-size); height: var(--icon-size); } .flash-righttabs { padding: var(--space-xs) var(--space-sm); border-bottom: 1px solid var(--border); } .flash-avgmed { margin-left: auto; } /* ── stat cards ──────────────────────────────────────────────────────── */ .flash-statcards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--border); } .flash-statcard { display: flex; flex-direction: column; gap: var(--space-xs); padding: var(--space-sm); background: var(--bg-surface); } .flash-statcard__label { color: var(--text-secondary); font-size: var(--font-xs); } .flash-statcard__value { margin-top: auto; color: var(--accent); font-family: var(--font-mono); font-size: var(--font-lg); text-align: right; } /* ── two-column stat table ───────────────────────────────────────────── */ .flash-statstable { padding: var(--space-xs) var(--space-sm); border-bottom: 1px solid var(--border); } .flash-stattable__head { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-sm); padding-bottom: var(--space-2xs); } .flash-stattable__col { color: var(--text-primary); font-size: var(--font-xxs); font-weight: 600; letter-spacing: 0.04em; } /* The reference tints each session's header so the two columns are separable at a glance: the gap day reads cool, the day after reads warm. Token text colours only -- the alpha-tint form needs an `--x-rgb` triple and this palette only ships one for --warning, so a tinted background would have meant a hardcoded channel value on the cool side. */ .flash-stattable__col.is-gap { color: var(--info); } .flash-stattable__col.is-day2 { color: var(--warning); } /* The reference fits ~12 rows of stats plus the cards, the split bars, the price-change chart and the event table on one screen, so a row is a single line of --font-xxs with no vertical padding: 29 stat cells at a comfortable 21px each pushed the study past the fold. */ .flash-stattable__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-sm); line-height: 1.35; } .flash-stat { display: flex; align-items: baseline; gap: var(--space-xs); min-width: 0; } .flash-stat__label { color: var(--text-secondary); font-size: var(--font-xxs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .flash-stat__value { margin-left: auto; font-family: var(--font-mono); font-size: var(--font-xxs); white-space: nowrap; } .flash-stat__value.is-pos { color: var(--positive); } .flash-stat__value.is-neg { color: var(--negative); } /* ── close-direction split bars ──────────────────────────────────────── */ .flash-closebars { display: grid; gap: var(--space-xs); padding: var(--space-xs) var(--space-sm); border-bottom: 1px solid var(--border); } .flash-closebar__label { color: var(--text-secondary); font-size: var(--font-xxs); margin-bottom: 1px; } .flash-closebar__track { display: flex; height: 14px; border-radius: var(--radius-sm); overflow: hidden; } .flash-closebar__seg { display: grid; place-items: center; font-family: var(--font-mono); font-size: var(--font-xxs); color: var(--on-accent); } .flash-closebar__seg--red { background: var(--negative); } .flash-closebar__seg--green { background: var(--positive); } .flash-closebar__seg--empty { flex: 1; background: var(--bg-tertiary); color: var(--text-dim); } /* ── event table ─────────────────────────────────────────────────────── */ .flash-events { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; min-height: 240px; border-top: 1px solid var(--border); } .flash-events__table { overflow: auto; } .flash-events__pager { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-xs) var(--space-sm); border-top: 1px solid var(--border); color: var(--text-muted); font-size: var(--font-xs); } .flash-events__pager-spacer { flex: 1; } .flash-pagebtn { min-width: var(--touch-min); height: var(--touch-min); border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-input); color: var(--text-secondary); font: inherit; font-size: var(--font-xs); cursor: pointer; } .flash-pagebtn:hover:not(:disabled) { border-color: var(--border-focus); color: var(--text); } .flash-pagebtn:disabled { color: var(--text-disabled); cursor: default; } .flash-pagebtn.is-active { background: var(--primary); border-color: var(--primary); color: var(--on-accent); } /* Event rows share the project table look but are laid out by the data-table-wrap primitives so a wide row scrolls rather than wraps. */ .flash-evtable { width: 100%; border-collapse: collapse; font-size: var(--font-xs); } .flash-evtable th, .flash-evtable td { padding: var(--table-cell-pad-y) var(--table-cell-pad-x); text-align: right; white-space: nowrap; border-bottom: 1px solid var(--border); } .flash-evtable th { user-select: none; } /* The sort control is a real button inside the header cell, so keyboard focus reaches it; the reset keeps the header's own look. */ .flash-sort { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; } .flash-evtable th:first-child, .flash-evtable td:first-child { text-align: left; } .flash-evtable tbody tr:hover { background: var(--bg-tertiary); } .flash-evtable .is-pos { color: var(--positive); } .flash-evtable .is-neg { color: var(--negative); } .flash-dir { display: inline-flex; align-items: center; gap: var(--space-xs); } .flash-dir__dot { width: var(--space-xs); height: var(--space-xs); border-radius: var(--radius-round); } .flash-dir__dot--red { background: var(--negative); } .flash-dir__dot--green { background: var(--positive); } /* One focus ring on every control this page styles, so a keyboard reaches the same state the mouse does: the shared offset-2 form, except for the two that sit against a scrolling container's edge (the chip buttons in the ticker bar and the filing cards in a column that scrolls), where an outward ring would be clipped by that container and the conventions' negative offset is the answer. */ .flash-iconbtn:focus-visible, .flash-pagebtn:focus-visible, .flash-link:focus-visible, .flash-related__link:focus-visible, .flash-sort:focus-visible { outline: var(--focus-ring-width) solid var(--accent); outline-offset: var(--focus-ring-offset); } .flash-tickertab__open:focus-visible, .flash-tickertab__remove:focus-visible, .flash-fcard:focus-visible { outline: var(--focus-ring-width) solid var(--accent); outline-offset: -2px; } /* ── gap-filters modal ───────────────────────────────────────────────── */ .flash-modal { position: fixed; inset: 0; z-index: var(--z-max); display: grid; place-items: center; } .flash-modal__backdrop { position: absolute; inset: 0; background: var(--overlay-3); } .flash-modal__panel { /* Surface from .surface (common.css) β€” which resolves --surface-1, and the page tier above remaps that to the shell's panel, so the modal matches the shell without this rule knowing anything about it. */ position: relative; width: min(560px, 92vw); max-height: min(90dvh, 760px); overflow-y: auto; box-shadow: var(--shadow-lg); } .flash-modal__head { display: flex; align-items: center; justify-content: space-between; padding: var(--space-sm) var(--space-md); border-bottom: 1px solid var(--border); font-weight: 600; } .flash-modal__body { display: grid; gap: var(--space-md); padding: var(--space-md); } .flash-field { align-items: center; display: grid; gap: var(--space-xs); grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr); min-width: 0; } .flash-field > .flash-field__label:first-child { grid-column: 1 / -1; } .flash-field .input-field, .flash-field .select-field { box-sizing: border-box; max-width: 100%; min-width: 0; width: 100%; } #research-symbol, #flash-filter-date-from, #flash-tag-input { grid-column: 1 / -1; } .flash-field > .flash-field__sub:only-of-type { grid-column: 1 / -1; } .flash-field:first-child { grid-template-columns: minmax(0, 1fr); } .flash-field:has(#research-min-gap), .flash-field:has(#flash-filter-vol-min) { grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr); } .flash-field:has(#research-min-gap) > .flash-field__label, .flash-field:has(#flash-filter-vol-min) > .flash-field__label { grid-column: 1 / -1; } .flash-field:has(#research-lookback) { grid-template-columns: minmax(0, 1fr); } .flash-field:has(#research-lookback) > .flash-field__sub { grid-column: 1 / -1; } .flash-field__label { color: var(--text-secondary); font-size: var(--font-xs); } .flash-field__sub { color: var(--text-muted); font-size: var(--font-xs); } .flash-field .input-field { width: 100%; } /* ── responsive ──────────────────────────────────────────────────────── */ @media (width <= 1024px) { .flash-body { grid-template-columns: minmax(0, 1fr); } /* Stacked, each pane is as tall as its content, so the chart cannot run under the stats pane. The viewport-bound height and the panes' own scroll are for side by side; here the page scrolls instead. */ .flash, .flash-body { height: auto; } .flash-left { border-right: 0; border-bottom: 1px solid var(--border); min-height: auto; } /* One column here, so the desktop placement (column 2) would open an implicit second track beside the chart. Stacked, the pane goes below. */ .flash-right { grid-column: 1; grid-row: 2; height: auto; overflow: visible; } /* Stacked: the width seams have no columns to sit between. The splitter gates on the same breakpoint, which also clears stored sizes instead of letting them outlive the layout they were measured in. */ .flash-body > .panel-resize-handle { display: none; } } @media (width <= 768px) { .flash-topbar { gap: var(--space-xs); height: auto; min-height: var(--flash-topbar-h); flex-wrap: wrap; padding-block: var(--space-xs); } .flash-controls { order: 3; width: 100%; } .flash-tickerbar { flex: 1 1 100%; } .flash-symbol { max-width: 48vw; } .flash-modal__panel { width: min(560px, calc(100vw - var(--space-md))); max-height: calc(100dvh - var(--space-md)); } .flash-field { grid-template-columns: auto minmax(0, 1fr) auto minmax(0, 1fr); } .flash-modal__actions { align-items: stretch; display: flex; flex-direction: column; } .flash-field > .flash-field__label:first-child { grid-column: 1 / -1; } .flash-field:has(#research-symbol), .flash-field:has(#flash-filter-date-from), .flash-field:has(#research-lookback), .flash-field:has(#flash-tag-input) { grid-template-columns: minmax(0, 1fr); } .flash-field:has(#research-symbol) > *, .flash-field:has(#flash-filter-date-from) > *, .flash-field:has(#research-lookback) > *, .flash-field:has(#flash-tag-input) > * { grid-column: 1; } .flash { max-width: none; } .flash-statcards { grid-template-columns: minmax(0, 1fr); } } .flash-empty-stats { color: var(--text-muted); font-size: var(--font-xs); line-height: 1.5; margin: var(--space-sm) 0; } .flash-stattable__row--single { grid-template-columns: minmax(0, 1fr); } /* ── the quote strip above the candles ──────────────────────────────── */ .flash-quote { display: flex; align-items: baseline; flex-wrap: wrap; gap: var(--space-sm); padding: var(--space-xs) var(--space-sm) 0; font-family: var(--font-mono); font-size: var(--font-xs); } .flash-quote__field { display: inline-flex; align-items: baseline; gap: var(--space-2xs); } .flash-quote__key { color: var(--text-muted); font-family: var(--font-sans); font-size: var(--font-xxs); font-weight: 600; letter-spacing: 0.04em; } .flash-quote__num { color: var(--text-primary); } .flash-quote__field--move { padding-left: var(--space-sm); border-left: 1px solid var(--border); } .flash-quote__field--move.is-pos .flash-quote__num { color: var(--positive); } .flash-quote__field--move.is-neg .flash-quote__num { color: var(--negative); } .flash-quote__field--vwap .flash-quote__num { color: var(--warning); } /* ── chart bar: legend, range, scale ────────────────────────────────── */ .flash-chartbar__clock { color: var(--text-muted); font-family: var(--font-mono); font-size: var(--font-xxs); white-space: nowrap; } /* ── statement sub-tabs inside Financial metrics ─────────────────────── */ .flash-subtabs { display: flex; gap: var(--space-xs); border-bottom: 1px solid var(--border); } .flash-subtab { background: none; border: 0; border-bottom: var(--space-2xs) solid transparent; color: var(--text-muted); cursor: pointer; font-size: var(--font-xxs); padding: var(--space-xs) var(--space-sm); text-transform: uppercase; letter-spacing: 0.04em; } .flash-subtab.is-active { border-bottom-color: var(--border-focus); color: var(--text-primary); } /* ── overview: tags, meta grid, links ───────────────────────────────── */ .flash-tags { display: flex; flex-wrap: wrap; gap: var(--space-xs); margin: var(--space-sm) 0; } .flash-tag { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-muted); font-size: var(--font-xxs); padding: var(--space-2xs) var(--space-xs-plus); } .flash-metagrid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-2xs) var(--space-md); } .flash-link { color: var(--accent); text-decoration: none; } .flash-link:hover { text-decoration: underline; } .flash-description p { color: var(--text-muted); font-size: var(--font-xs); line-height: 1.5; margin: var(--space-xs) 0 0; } .flash-stat.is-missing .flash-stat__value { color: var(--text-dim); } /* ── performance tiles ──────────────────────────────────────────────── */ .flash-perf { margin: var(--space-sm) 0; } .flash-perf__title { color: var(--text-muted); font-size: var(--font-xxs); margin-bottom: var(--space-xs); text-transform: uppercase; letter-spacing: 0.04em; } .flash-perf__row { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: var(--space-xs); } .flash-perf__tile { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-sm); display: flex; flex-direction: column; gap: var(--space-2xs); padding: var(--space-xs); text-align: center; } .flash-perf__period { color: var(--text-dim); font-size: var(--font-xxs); } .flash-perf__value { font-family: var(--font-mono); font-size: var(--font-xs); font-weight: 600; } .flash-perf__tile.is-pos { border-color: var(--positive); } .flash-perf__tile.is-pos .flash-perf__value { color: var(--positive); } .flash-perf__tile.is-neg { border-color: var(--negative); } .flash-perf__tile.is-neg .flash-perf__value { color: var(--negative); } /* ── related links ──────────────────────────────────────────────────── */ .flash-related__row { display: flex; flex-wrap: wrap; gap: var(--space-sm); padding: var(--space-xs) 0; } .flash-related__link { border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-primary); font-size: var(--font-xxs); padding: 3px var(--space-sm); text-decoration: none; } .flash-related__link:hover { border-color: var(--border-focus); } /* ── notes ──────────────────────────────────────────────────────────── */ .flash-note__text { background: var(--bg-primary); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-primary); font-family: var(--font-mono); font-size: var(--font-xs); padding: var(--space-sm); width: 100%; } .flash-note__actions { align-items: center; display: flex; gap: var(--space-sm); margin-top: var(--space-sm); } .flash-note__status { color: var(--text-muted); font-size: var(--font-xxs); } @media (width <= 1024px) { #flash-view-filings { grid-template-columns: minmax(0, 1fr); } .flash-docviewer { border-left: 0; border-top: 1px solid var(--border); } } /* ── Flash palette ──────────────────────────────────────────────────── Sampled from the reference tool's screenshots: page #0e0f15, panel #191a24, raised surface #232432, and the positive/negative pair #55c465 / #e15447, a brighter green and a warmer red than the app's own. Scoped to `body[data-page="research"]` on purpose. The rest of the app keeps its palette; this page matches the reference without a global theme change that would touch every other screen. */ /* * The reference tool's own colours, sampled from its screenshots. * * Only ever referenced from this file, so `:root` is safe here: the values * are inert until something maps them onto a token another stylesheet reads. */ :root { --flash-bg: var(--bg); --flash-panel: var(--bg-elevated); --flash-raised: var(--bg-secondary); --flash-border: var(--border); --flash-border-focus: var(--border-focus); --flash-text: var(--text); --flash-text-muted: var(--text-muted); --flash-text-dim: var(--text-dim); --flash-pos: var(--positive); --flash-neg: var(--negative); --flash-neg-text: var(--negative-text); --flash-info-text: var(--info-text); --flash-accent: var(--info); --flash-elite: var(--warning); --flash-upgrade: var(--info); } /* * The same palette mapped onto the app's own token names, so the existing * rules pick it up without being touched. * * `body[data-page="research"]` rather than `:root`, so no other page changes. * The chart library is the one exception and is handled at its call site in * `charts.ts`, which passes this page's background in explicitly. */ body[data-page="research"], body[data-page="research"] .page-wrapper { background: var(--flash-bg); } body[data-page="research"] .flash { flex: 1 1 0; height: auto; min-height: 0; background: var(--flash-panel); color: var(--text-primary); } /* The raised surface: the tiles, the tags and the related links sit on the mid panel and are lifted by the third colour. Only those three are named here. The stat cards carry their own rule below, and the filing cards their own above -- and a border-colour at this selector's weight would outrank the hover and open states those cards repaint it with, which is how the card that marks the filing you are reading stopped showing it. */ body[data-page="research"] .flash-perf__tile, body[data-page="research"] .flash-tag, body[data-page="research"] .flash-related__link { background: var(--bg-secondary); } /* The reference's stat card is label-over-value, and the label carries the colour: one hue per metric, not a sign on the number. The value underneath is always plain white, so a negative gap value does not turn the card red. The four hues are the reference's own, in its own order. */ body[data-page="research"] .flash-statcards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--border); } body[data-page="research"] .flash-statcard { align-items: flex-start; background: var(--bg-elevated); display: flex; flex-direction: column; gap: var(--space-xs); justify-content: center; padding: var(--space-sm) var(--space-md); } body[data-page="research"] .flash-statcard__label { color: var(--text-muted); font-size: var(--font-xs); order: 1; } body[data-page="research"] .flash-statcard__label.is-indigo { color: var(--info); } body[data-page="research"] .flash-statcard__label.is-green { color: var(--positive); } /* The reference's cyan has no token in this palette, which is TradingView's by design, so the neutral stands in rather than a hardcoded hex. */ body[data-page="research"] .flash-statcard__label.is-cyan { color: var(--primary); } body[data-page="research"] .flash-statcard__label.is-yellow { color: var(--warning); } body[data-page="research"] .flash-statcard__value { color: var(--text-primary); font-family: var(--font-mono); font-size: var(--font-xl); font-weight: 600; order: 2; } /* ── SEC filings: chronological column, grouped column, reader ─────── */ /* One row the height of the view: a long column scrolls inside it instead of stretching the row and pushing the reader out of the screen. */ .flash-flayout { display: grid; grid-template-columns: minmax(0, var(--flash-chrono-w, 0.3fr)) minmax(0, 1fr); grid-template-rows: minmax(0, 1fr); height: 100%; min-height: 0; overflow: hidden; } /* One seam per column boundary, each a grid item pinned to the end of the column it follows β€” the same in-flow trick as the panes seam, for the same reason: the column split is fr-based until the first drag, so no offset can be computed from the size variables before then. */ .flash-flayout > .panel-resize-handle { grid-row: 1; justify-self: end; margin-left: 0; margin-right: -5px; position: relative; } #flash-chrono-resize { grid-column: 1; } /* Explicit tracks: the filing list and reader share one row. */ #flash-chrono-pane { grid-column: 1; grid-row: 1; } .flash-flayout > .flash-docviewer { grid-column: 2; grid-row: 1; } .flash-fpane { border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; min-width: 0; } .flash-fpane__head { color: var(--text-muted); font-size: var(--font-xs); font-weight: 600; margin: 0; padding: var(--space-sm) var(--space-sm) 0; } .flash-filing-filters { display: flex; flex: none; flex-wrap: wrap; gap: var(--space-2xs); padding: var(--space-xs) var(--space-sm); } .flash-filing-filters .flash-ffilter { font-size: var(--font-xxs); min-height: var(--touch-floor); } .flash-ffilter__count { color: var(--text-dim); font-family: var(--font-mono); margin-left: var(--space-2xs); } .flash-fpane > .flash-flist { flex: 1 1 auto; min-height: 0; overflow-y: auto; } .flash-fcol { display: flex; flex-direction: column; gap: var(--space-xs); } .flash-fcard { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-sm); color: var(--text-primary); cursor: pointer; display: flex; flex-direction: column; gap: var(--space-2xs); padding: var(--space-xs); text-align: left; } .flash-fcard:hover { border-color: var(--border-focus); } .flash-fcard.is-active { border-color: var(--accent); } .flash-fcard__date { color: var(--text-dim); font-family: var(--font-mono); font-size: var(--font-xxs); } .flash-fcard__form { align-items: center; display: flex; font-family: var(--font-mono); font-size: var(--font-xs); font-weight: 600; gap: var(--space-xs); } .flash-fcard__desc { color: var(--text-muted); font-size: var(--font-xxs); line-height: 1.4; } .flash-fcard__link { color: var(--text-muted); font-size: var(--font-xxs); font-weight: 500; margin-left: var(--space-xs); text-decoration: none; } .flash-fcard__link:hover { color: var(--primary); text-decoration: underline; } /* The chronological column is a narrow index: one line per filing, the date, the form and the description truncated, so the column stays narrow and the reader gets the width. */ #flash-chrono-pane .flash-fcard { align-items: baseline; flex-direction: row; gap: var(--space-xs); min-width: 0; padding: var(--space-2xs) var(--space-xs); } #flash-chrono-pane .flash-fcard__date, #flash-chrono-pane .flash-fcard__form { flex: 0 0 auto; font-size: var(--font-xxs); } #flash-chrono-pane .flash-fcard__desc { flex: 1 1 auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .flash-badge { border-radius: var(--radius-sm); /* 8px was below the scale's smallest step; the badge is a micro label. */ font-size: var(--font-xxs); font-weight: 700; letter-spacing: 0.05em; padding: 1px var(--space-xs); } .flash-badge--elite { background: var(--warning-18); color: var(--flash-elite); } .flash-badge--upgrade { background: var(--info-18); color: var(--flash-upgrade); } .flash-docviewer { border-left: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; overflow: hidden; } .flash-docviewer__head { align-items: center; border-bottom: 1px solid var(--border); display: flex; gap: var(--space-sm); padding: var(--space-sm); } .flash-docviewer__title { flex: 1 1 auto; font-size: var(--font-xs); font-weight: 600; min-width: 0; } .flash-docviewer__verdict { color: var(--text-dim); font-size: var(--font-xxs); } .flash-docviewer__link { color: var(--accent); font-size: var(--font-xxs); text-decoration: none; white-space: nowrap; } .flash-docviewer__frame { /* stylelint-disable-next-line lt/no-raw-hex-outside-root -- SEC filings are authored for a white page; the frame keeps that ground. */ background: #fff; border: 0; flex: 1 1 auto; min-height: 0; width: 100%; } .flash-docviewer__text { flex: 1 1 auto; font-family: var(--font-mono); font-size: var(--font-xxs); line-height: 1.5; margin: 0; overflow-y: auto; padding: var(--space-sm); white-space: pre-wrap; overflow-wrap: anywhere; } .flash-docviewer__empty { color: var(--text-muted); padding: var(--space-md); } /* ── the tags control on the Overview pane ──────────────────────────── */ .flash-tagger { align-items: center; display: flex; gap: var(--space-sm); padding: var(--space-xs) 0; } .flash-tagger__label { color: var(--text-muted); font-size: var(--font-xxs); } @media (width <= 1024px) { .flash-flayout { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; overflow-y: auto; } /* Stacked: same standing-down as the study panes above. */ .flash-flayout > .panel-resize-handle { display: none; } /* Stacked: the filings list, then the reader. */ .flash-fpane { border-bottom: 1px solid var(--border); border-right: 0; } .flash-flayout > .flash-fpane, .flash-flayout > .flash-docviewer { grid-column: 1; grid-row: auto; } .flash-docviewer { border-left: 0; border-top: 1px solid var(--border); } } /* ── top bar actions ────────────────────────────────────────────────── */ .flash-topbar__actions { align-items: center; display: flex; gap: var(--space-sm); } .flash-btnlabel { color: var(--text-secondary); font-size: var(--font-xs); white-space: nowrap; } /* An icon button that carries its label: sized by the label, with the icon and the words in a row. The square icon-only size would let "Indicators" spill out of its box. */ .flash-iconbtn--labelled { width: auto; display: inline-flex; align-items: center; gap: var(--space-xs); padding-inline: var(--space-sm); } /* ── global ticker and Stats toolbar ─────────────────────────────────── */ /* The one ticker field of the top bar: Enter and Go submit it. */ .flash-tickerform { flex: none; display: flex; align-items: center; gap: var(--space-xs); min-width: 0; } .flash-tickerform .input-field { width: 12rem; height: var(--control-height); } .flash-topbar__backtest { flex: none; } /* The research page fills the viewport and does not scroll as a document. The wrapper is exactly one viewport tall and the study takes what the toolbar and the top bar leave. The h1 is drawn nowhere, so it takes no room. */ body[data-page="research"] .research-page-wrapper { display: flex; flex-direction: column; height: var(--viewport-h); margin: 0; padding-block: var(--space-sm) 0; overflow: hidden; } @media (width <= 480px) { body[data-page="research"] .research-page-wrapper { padding-block: calc(var(--nav-float-size) + var(--space-sm)) 0; } } /* The responsive audit's 28px touch floor (scripts/responsive-audit.mjs) for the research shell's small targets on a phone: the ticker tab's open, the backtest and stat links, the tagger edit, the indicators button and the filing cards. The hit area grows by min-height; the text keeps its size. The chip's remove button is not among them: it carries the floor at every width. */ @media (width <= 480px) { .flash-tickertab__open, .flash-iconbtn, .flash-fcard { min-height: var(--touch-floor); } .flash-topbar__backtest a, .flash-link, .flash-tagger__edit { display: inline-flex; align-items: center; min-height: var(--touch-floor); } } body[data-page="research"] .research-page-main { display: flex; flex-direction: column; flex: 1 1 0; min-height: 0; margin: 0; padding: 0; } /* The Stats view is a column: its toolbar sits above the study. On a wide screen the study takes the rest of the height: the chart gets what is left and the context panes keep their own height (the seam between them still moves it). Each column scrolls inside itself, so the page does not. Below the wide breakpoint the study stacks, and the view scrolls instead. */ .flash-view--overview, .flash-view--dilution, .flash-view--checklist { overflow-y: auto; } /* The Dilution profile is a document, not a viewport-bound study: the shell is one screen tall (body[data-page="research"] .research-page-wrapper) and the page under it does not scroll at all, so a view that does not scroll its own content loses whatever hangs past the fold -- on a phone the AIOK profile runs past the box with no scrollbar, and the end of the checklist is out of reach. The gutter is the one the bars above it use. */ .flash-view--dilution, .flash-view--checklist { padding: var(--space-sm); } /* The ticker row the retired /dilution page owned is `hidden` on this page (the top bar's own field is the one ticker now), which left the panel around it as 16px of empty padding and margin above the profile. */ .flash-view--dilution > .control-panel { padding: 0; margin-bottom: 0; } /* ── Checklist 1: financial health audit ──────────────────────────────── Six steps, each an article whose left border carries the verdict. The header summarises how much of the filing could be read; a step whose value is absent says so instead of showing a zero. */ .checklist-container { max-width: 960px; margin: 0 auto; padding-bottom: var(--space-lg); } .checklist { display: flex; flex-direction: column; gap: var(--space-md); } .checklist__header { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-md); flex-wrap: wrap; } .checklist__title { margin: 0; font-family: var(--font-heading); font-size: var(--font-xxl); font-weight: 600; color: var(--text); } .checklist__symbol { margin: var(--space-xs) 0 0; font-family: var(--font-mono); font-size: var(--font-md); color: var(--text-secondary); } .checklist__status { padding: var(--space-2xs) var(--space-sm); border: 1px solid var(--border); border-radius: var(--radius-sm); font-size: var(--font-xs); letter-spacing: 0.04em; text-transform: uppercase; color: var(--text-secondary); } .checklist__status--verified { border-color: color-mix(in srgb, var(--positive) 45%, transparent); background: color-mix(in srgb, var(--positive) 12%, transparent); color: var(--positive-text); } .checklist__status--partial { border-color: color-mix(in srgb, var(--warning) 45%, transparent); background: color-mix(in srgb, var(--warning) 12%, transparent); color: var(--warning-text); } .checklist__status--unverifiable { border-color: color-mix(in srgb, var(--negative) 45%, transparent); background: color-mix(in srgb, var(--negative) 12%, transparent); color: var(--negative-text); } .checklist__steps { display: flex; flex-direction: column; gap: var(--space-sm); } .checklist-step { padding: var(--space-md); border-left: 3px solid var(--border); } .checklist-step--pass { border-left-color: var(--positive); } .checklist-step--fail { border-left-color: var(--negative); } .checklist-step--warn { border-left-color: var(--warning); } .checklist-step--unknown { border-left-color: var(--muted); } .checklist-step__citation { display: block; border-left: var(--radius-sm) solid var(--muted-border); padding: 0.5rem 0.75rem; margin: 0.25rem 0; background: var(--bg-surface); border-radius: 0 var(--radius-lg) var(--radius-lg) 0; } .checklist-step__citation a { color: var(--muted-text); font-weight: 600; text-decoration: none; font-size: 0.85em; } .checklist-step__citation span { display: block; color: var(--mute); font-size: 0.82em; margin-top: 0.15rem; line-height: 1.35; } .evidence-details details { margin-top: 0.5rem; } .evidence-details summary { cursor: pointer; color: var(--mute); font-size: 0.85em; font-weight: 600; padding: 0.25rem 0; user-select: none; } .evidence-details details[open] summary { color: var(--muted-text); border-bottom: 1px solid var(--muted-border); padding-bottom: 0.25rem; } .checklist-step__head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-sm); flex-wrap: wrap; } .checklist-step__title { margin: 0; font-size: var(--font-lg); font-weight: 600; color: var(--text); } .checklist-step__mark { margin-right: var(--space-xs); font-family: var(--font-mono); color: var(--text-muted); } .checklist-step__verdict { font-size: var(--font-xs); font-weight: 700; letter-spacing: 0.04em; color: var(--text-muted); } .checklist-step--pass .checklist-step__verdict { color: var(--positive-text); } .checklist-step--fail .checklist-step__verdict { color: var(--negative-text); } .checklist-step--warn .checklist-step__verdict { color: var(--warning-text); } .checklist-step__hint { max-width: 80ch; margin: var(--space-xs) 0 0; font-size: var(--font-sm); color: var(--text-muted); } .checklist-step__value { margin: var(--space-sm) 0 0; font-family: var(--font-mono); font-size: var(--font-lg); color: var(--text); } .checklist-step__source { margin: var(--space-xs) 0 0; font-size: var(--font-xs); color: var(--text-muted); } .checklist__takeaway { padding: var(--space-md); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface-2); } .checklist__takeaway h3 { margin: 0 0 var(--space-xs); font-size: var(--font-md); color: var(--text); } .checklist__takeaway p { margin: 0; font-size: var(--font-sm); color: var(--text-secondary); } .checklist__takeaway .checklist__missing { margin-top: var(--space-sm); color: var(--negative-text); } .flash-view--overview > .flash-body { flex: none; height: auto; } .flash-view--overview .flash-left, .flash-view--overview .flash-right { height: auto; } @media (width > 1024px) { .flash-view--overview:not(.hidden) { display: flex; flex-direction: column; overflow: hidden; } .flash-view--overview:not(.hidden) > .flash-body { flex: 1 1 0; min-height: 0; grid-template-rows: minmax(0, 1fr); } .flash-view--overview:not(.hidden) .flash-left { height: 100%; min-height: 0; grid-template-rows: auto minmax(160px, 1fr) auto auto auto minmax(0, var(--flash-pane-h)); } .flash-view--overview:not(.hidden) .flip-card, .flash-view--overview:not(.hidden) .flip-card__inner, .flash-view--overview:not(.hidden) .flip-card__face, .flash-view--overview:not(.hidden) .flash-chart { height: 100%; min-height: 0; } .flash-view--overview:not(.hidden) .flash-panes { max-height: none; } .flash-view--overview:not(.hidden) .flash-right { height: 100%; min-height: 0; } } .flash-statsbar { flex: none; display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-xs) var(--space-md); padding: var(--space-xs) var(--space-sm); background: var(--bg-elevated); border-bottom: 1px solid var(--border); } .flash-statsbar .flash-controls { order: 0; width: auto; padding: 0; background: none; border: 0; } .flash-statsbar__notes { display: flex; align-items: center; gap: var(--space-xs); margin-left: auto; } .flash-statsbar__notes .input-field { width: 14rem; height: var(--control-height); } /* Phone width: the form and the notes take a full row each, with a 16px gutter at the sides and no row wider than the screen. */ @media (width <= 768px) { .flash-topbar, .flash-viewtabs, .flash-statsbar { padding-inline: var(--space-md); } .flash-fpane__head, .flash-fpane > .flash-flist { padding-inline: var(--space-md); } /* The Dilution profile brings its own content rather than the shell's bars, so it takes the same 16px gutter as its own rule. */ .flash-view--dilution { padding-inline: var(--space-md); } .flash-tickerform { flex: 1 1 100%; } .flash-tickerform .input-field, .flash-statsbar__notes .input-field { flex: 1 1 auto; width: auto; min-width: 0; } .flash-statsbar__notes { width: 100%; margin-left: 0; } } /* No ticker yet: the prompt covers both panes, so the empty chart behind it never reads as a broken one. It is taken out of the grid and laid over the whole body, because a grid line of -1 is only the explicit row, not the height of the panes. */ .flash-empty { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--space-sm); padding: var(--space-xl) var(--space-md); background: var(--bg); text-align: center; } .flash-empty__title { margin: 0; color: var(--text); font-size: var(--font-md); font-weight: 600; } .flash-empty__body { max-width: 52ch; margin: 0 0 var(--space-xs); color: var(--text-muted); font-size: var(--font-sm); line-height: 1.5; } .flash-tags--themes { margin: 0 0 var(--space-sm); } .flash-tag--theme { background: none; border-style: dashed; } .flash-tagger__empty { color: var(--text-dim); font-size: var(--font-xs); } .flash-tagger__edit { background: none; border: 0; color: var(--accent); cursor: pointer; font-size: var(--font-xxs); padding: 0; text-decoration: underline; } /* The research page has its own topbar; its h1 names the document for assistive tech and is not drawn. */ .research-page-title { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; } /* Filing form names and filters share their category's semantic colour. */ .flash-fcard[data-group] .flash-fcard__form { font-weight: 600; } .flash-fcard[data-group="Financials"] .flash-fcard__form { color: var(--info); } .flash-filing-filters [data-group="Financials"] { color: var(--info); } .flash-fcard[data-group="News"] .flash-fcard__form { color: var(--warning); } .flash-filing-filters [data-group="News"] { color: var(--warning); } .flash-fcard[data-group="Prospectuses"] .flash-fcard__form { color: var(--accent); } .flash-filing-filters [data-group="Prospectuses"] { color: var(--accent); } .flash-fcard[data-group="Ownership"] .flash-fcard__form { color: var(--positive); } .flash-filing-filters [data-group="Ownership"] { color: var(--positive); } .flash-fcard[data-group="Proxies"] .flash-fcard__form { color: var(--negative); } .flash-filing-filters [data-group="Proxies"] { color: var(--negative); } .flash-fcard[data-group="Others"] .flash-fcard__form { color: var(--secondary); } .flash-filing-filters [data-group="Others"] { color: var(--secondary); } /* Deliberately outside the shell: the filings-source footer belongs to the research page, not to .flash, and its link text already names the source. */ .filing-source { padding: var(--space-md); color: var(--text-dim); font-size: var(--font-sm); }
/* ═══════════════════════════════════════════════════════════════════════
Flash Research shell
A two-pane study surface laid over the long-form page: the ticker is
resolved in the top bar, the chart and the context tabs sit on the left,
the study controls / statistics / event table on the right. Height is
viewport-bound and each pane scrolls on its own, so the study never
becomes a single long scroll the way the sections below it do.
Tokens only, and every owner class is scoped under .flash so nothing
here can leak into the rest of the app.
═══════════════════════════════════════════════════════════════════════ */
.flash-foot {
padding: 1rem;
font-size: .85rem;
color: var(--muted);
}
.flash {
--flash-topbar-h: var(--toolbar-height);
--flash-viewtabs-h: var(--tab-height);
--flash-right-w: min(46vw, var(--panel-width-xl));
--flash-pane-h: 320px;
display: flex;
flex-direction: column;
/* A flex column rather than a fixed grid template on purpose. The status
line is display:none once a study lands, and a display:none child stops
being a grid item -- which shifted every later child up one track and
handed the overview view an `auto` track (589px) while the `1fr` track
(419px) sat empty. Flex does not renumber anything when a child is
hidden, so the views can be shown and hidden freely. */
/* Centred exactly like .page-wrapper (max-width + auto margins). The app
does NOT offset content for the fixed sidebar -- it lets the centred
column clear it -- so a margin-left here only added dead space. */
width: 100%;
max-width: 1600px;
margin: 0 auto;
/* A DEFINITE height, not min-height: `fr` only distributes in a grid whose
height is resolved, so with min-height the 1fr track collapsed and the
right pane's 1300px of content pushed the whole study below the fold
instead of scrolling inside it.
Hosted as a tab of /backtest, the study no longer owns the whole
viewport: the tab bar and the page wrapper sit above it, and the panel
declares how much in --research-layout-offset (static/css/backtest.css).
The default of 0px keeps the standalone behaviour this rule had. */
height: calc(var(--viewport-h) - var(--research-layout-offset, 0px));
background: var(--bg);
color: var(--text);
font-family: var(--font-sans);
font-size: var(--font-sm);
}
/* ── top bar ─────────────────────────────────────────────────────────── */
.flash-topbar {
flex: none;
display: flex;
align-items: center;
gap: var(--space-sm);
flex-wrap: wrap;
height: auto;
min-width: 0;
min-height: var(--flash-topbar-h);
padding: var(--space-xs) var(--space-sm);
background: var(--bg-elevated);
border-bottom: 1px solid var(--border);
}
.flash-tickerbar {
flex: 0 1 auto;
display: flex;
align-items: center;
gap: var(--space-xs);
min-width: 0;
overflow-x: auto;
scrollbar-width: none;
}
.flash-controls,
.flash-topbar__actions {
min-width: 0;
flex: 0 1 auto;
/* A control that cannot shrink wraps onto its own line rather than
being squeezed: the selects are sized by their own options (below),
so a narrow viewport has to stack them, not clip them. */
flex-wrap: wrap;
}
.flash-tickerbar::-webkit-scrollbar {
display: none;
}
.flash-tickertab {