/* Google Fonts — single source of truth for the whole app's font stack. Barlow Condensed (headings via --font-heading), Inter (body via --font-sans), JetBrains Mono (Level 2 tape via --l2-font-mono). Pages no longer carry their own ; loading common.css loads the fonts. */ @import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@700;900&family=Inter:wght@400;600;700&family=JetBrains+Mono:wght@400;600;700&display=swap'); /* Breakpoint tokens (static/CONVENTIONS.md, "Breakpoint tokens"). A custom property cannot appear inside @media, so the widths are literal numbers and this block is the one place they are named: --bp-phone: 480px @media (width <= 480px) --bp-tablet: 768px @media (width <= 768px) New and touched media queries use only these two widths. The other legacy widths (600, 640, 900, 1024, ...) stay until the rule that carries them is rewritten. */ /* stylelint-disable color-no-hex -- this is the token definition block itself */ :root { /* ── Colors: TradingView Dark Theme Paleta exactamente de TradingView */ /* Accent - TV style. Three colours have six live names. Every duplicate below is now an ALIAS rather than a second hex, so there is one value per colour and a reader can see that --danger and --negative cannot drift apart: #d1d4dc --accent --primary --text --text-primary #089981 --positive --success #f23645 --negative --danger The alias pairs are the TradingView spellings kept for the chart library and for the older call sites; --success-hover / --danger-hover keep their own values because a hover is a different colour, not an alias. */ --primary: var(--accent); --primary-hover: #e1e3e8; --secondary: #787b86; --secondary-hover: #9a9ea6; --danger: var(--negative); --danger-hover: #f65b68; --success: #065f46; --success-hover: #0ab08f; --warning: #a65b00; --warning-rgb: 240 185 11; --chart-marker: #fff; --premarket-band: rgb(255 187 0 / 8%); /* Drawing-tool chrome. The horizontal line, the trend line and the selected-drawing highlight used to borrow --info, --corporate and --warning, and the last two are #f59e0b against #f0b90b: one shade apart, so selecting an amber trend line left it looking unselected. Tool chrome gets its own three colours here; no semantic token changes, and the semantic tokens keep every non-drawing use they already had. */ --draw-hline: #2962ff; --draw-trend: #f59e0b; --draw-selected: #22d3ee; --postmarket-band: rgb(41 98 255 / 8%); --warning-text: #d97706; /* darker amber for text on dark bg (vs. bright --warning used for accents) */ /* ── The ambers, and which one you want ───────────────────────────────── Four amber tokens with no selection rule is how --corporate ended up holding Tailwind's amber-500 (#f59e0b) in a TradingView palette: --warning #f0b90b a FILLED amber (badge fill, chart marker) --warning-text #d97706 amber TEXT on a dark surface --catalyst #e3b341 an event that is news before it is a trade --corporate deleted: #f59e0b, one shade from --warning, with one reader (a corporate-action highlight) whose meaning is --catalyst. --corporate-rgb had no reader at all. --draw-trend keeps #f59e0b: that one IS a drawing tool's own colour and the reason it exists is to NOT look like --warning. */ --info: #2962ff; /* Surfaces - TV dark palette */ --bg: #0e0f15; --bg-elevated: #191a24; --bg-secondary: #232432; --bg-tertiary: #232432; --bg-input: #191a24; --surface: #191a24; --bg-surface: var(--surface); --surface-raised: #232432; --bg-primary: var(--bg-elevated); /* Text - research palette */ --text: #e6e6ea; --text-primary: var(--text); --text-secondary: #93939e; /* Borders - research palette */ --border: #2e2f41; /* A focus ring is a non-text indicator: WCAG 2.1 SC 1.4.11 asks 3:1 against the adjacent colour. At #3d3d52 it measured 1.81:1 on --bg, so a keyboard user could not see where the ring was. #6b6b8a is 3.73:1 -- above the floor, still native to the border family. */ --border-focus: #6b6b8a; /* Muted is the tier most text actually lands on, and it sits on cards as often as on the page: at #828694 it read 4.38:1 on --surface. Lifted to the nearest value that clears 4.5:1 on all four dark surfaces (5.92 / 5.25 / 4.75 / 4.72). --text-dim stays below it — dim is for axis labels and placeholder meta, and its own debt row in check-contrast.py is where that finding is tracked. */ --text-muted: #9094a2; --text-dim: #88909c; --text-disabled: #363a45; /* Borders - TV subtle (unified to research palette) */ /* Semantic colors - TV bright */ --accent: #e6e6ea; --positive: #55c465; --positive-rgb: 85 196 101; --negative: #e15447; --negative-rgb: 225 84 71; --catalyst: #e3b341; --catalyst-rgb: 227 179 65; --black: #000; --black-rgb: 0 0 0; /* Ink for text sitting on a solid fill. --on-accent is the one owner: --on-primary, --on-success and --l2-bg-contrast used to spell the same #131722, which is how a fifth name (--text-on-accent, P0.1) managed to look plausible. --on-danger is the same ink and always was a bad default: white on --danger measured 3.90:1 while this reads 4.59:1. The light island below re-declares it white, because its --danger is dark and white is the only ink that reaches AA there. */ --on-accent: #131722; --on-danger: #131722; /* Status text ON a status tint. The fill above stays at the TradingView value the chart palette is built on; at 12% over a card that green reads 3.86:1, under AA for the 12px type .badge uses. These are the same hues lifted until they clear 4.5:1 on every surface a tint can land on, at the 12% resting tint AND the 20% a hover deepens it to (.reversal-btn.active:hover and its neighbours) — worst case 4.6. */ --positive-text: #0abc9e; --negative-text: #f67c85; --info-text: #789dff; /* Semantic backgrounds - TV style */ --positive-bg: rgb(8 153 129 / 12%); --negative-bg: rgb(243 54 69 / 12%); --warning-bg: rgb(240 185 11 / 12%); --catalyst-bg: rgb(227 179 65 / 13%); --info-bg: rgb(41 98 255 / 12%); --accent-bg: rgb(209 212 220 / 6%); /* ── Border radius ── */ --radius-sm: 2px; --radius-md: 4px; --radius-lg: 6px; --radius-xl: 8px; --radius-none: 0; --radius-round: 50%; /* ── Spacing ── */ --touch-target-size: 36px; /* dense touch target: the compact minimum on phones */ --aside-width: 380px; /* a side panel next to the main column */ --chart-stage-height: 420px; /* a chart card that stands alone in a column */ --space-2xs: 2px; --space-xs: 4px; --space-xs-plus: 6px; --space-sm-plus: 12px; --space-sm: 8px; --space-md: 16px; --space-lg: 24px; --space-xl: 32px; --space-xxl: 48px; /* ── Font scale ── */ --font-xs: 0.6875rem; --font-xxs: 0.625rem; /* 10px — micro labels */ --font-sm: 0.75rem; --font-md: 0.8125rem; --font-lg: 0.9375rem; --font-xl: 1.0625rem; --font-xxl: 1.25rem; --font-xxxl: 1.5rem; --font-display: 1.75rem; /* off-scale display size, Wave 4.3 */ --font-hero: 2.25rem; /* off-scale hero size, Wave 4.3 */ /* 14px, the one step the scale has no name for: --font-md is 13 and --font-lg is 15. Named for its first two readers, the "x" on a tab close and on a filter row (.analyze-tab-close, .filter-remove); the third is the phone-layout P&L chip in the trades calendar, which bumps to 14px for legibility in a full-width row and owes the scale a step of its own (Wave 4.3). It was called --font-base, which is a misnomer twice over: nothing in this app sets a base font size, so the real base is 16px. */ --font-icon: 0.875rem; /* ── Z-Index Scale ── One owner per layer, documented so a new z-index can be placed instead of invented. Pick the row that matches the element's ROLE, never a number between rows. | Capa | Token | Elementos | |-------|----------------------|----------------------------------------------------| | 1 | --z-1 | thead sticky, celdas fijas de tabla | | 2 | --z-2 | leyenda de chart (session label / ohlc) | | 5 | --z-5 | resize handle, hijos flotantes de panel docked | | 10 | --z-10 | botón de fullscreen chart, botones de panel docked | | 50 | --z-50 | scrim de panel overlay de chart, bottom-sheet | | 100 | --z-100 | sheet de trades, popovers de chart | | 199 | --z-199 | (reservado, sin owner hoy | | 200 | --z-200 | scrim del drawer de navegación | | 500 | --z-500 | sidebar de navegación | | 1000 | --z-1000 | modal overlay, alerts panel, fullscreen chart | | 1001 | calc(--z-1000 + 1) | tooltip flotante | | 10000 | --z-max | chat modal, diálogos flotantes | Nota: el botón de menú flotante (#nav-toggle-float) NO vive en --z-1000 — se bajó a --z-200 para que el modal sea owner del corner superior izquierdo cuando está abierto. */ --z-1: 1; --z-2: 2; --z-5: 5; --z-10: 10; --z-50: 50; --z-100: 100; --z-199: 199; --z-200: 200; --z-500: 500; --z-1000: 1000; --z-max: 10000; /* ── Transitions ── */ /* The motion scale: five steps, nothing between them. A duration that is not one of these is a decision nobody drew. Keyframe periods are NOT on this scale — a loop's period is how often it repeats, not how long a thing takes to move. */ --transition-instant: 0.08s ease; --transition-fast: 0.1s ease; --transition-base: 0.15s ease; --transition-slow: 0.25s ease; --transition-slower: 0.4s ease; /* ── Fonts ── */ --font-sans: inter, -apple-system, blinkmacsystemfont, "Trebuchet MS", "Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", sans-serif; --font-mono: "JetBrains Mono", "Consolas", "Lucida Console", "Monaco", monospace; --font-heading: "Barlow Condensed", var(--font-sans); /* ── Shadows ── */ --shadow-sm: 0 1px 3px color-mix(in srgb, var(--black) 40%, transparent); --shadow-md: 0 4px 12px color-mix(in srgb, var(--black) 50%, transparent); --shadow-lg: 0 8px 24px color-mix(in srgb, var(--black) 60%, transparent); /* Named translucent tints (theme-independent alpha colours) */ --scrim-60: rgb(0 0 0 / 60%); --scrim-25: rgb(0 0 0 / 25%); --shade-4: rgb(0 0 0 / 4%); --shade-7: rgb(0 0 0 / 7%); --shade-10: rgb(0 0 0 / 10%); --shade-14: rgb(0 0 0 / 14%); --ink-scrim-70: rgb(10 10 10 / 70%); --neutral-15: rgb(102 102 102 / 15%); --neutral-12: rgb(120 123 134 / 12%); --neutral-20: rgb(120 123 134 / 20%); --info-18: rgb(0 168 255 / 18%); --info-10: rgb(27 79 189 / 10%); --warning-18: rgb(255 193 7 / 18%); --warning-10: rgb(122 92 0 / 10%); --positive-10: rgb(10 106 82 / 10%); --negative-10: rgb(161 29 44 / 10%); /* ── Overlay scale ── white overlays on dark surfaces (hover / zebra / dividers) */ --overlay-1: rgb(255 255 255 / 3%); --overlay-2: rgb(255 255 255 / 6%); --overlay-3: rgb(255 255 255 / 8%); --overlay-4: rgb(255 255 255 / 12%); /* Info channel for rgba() usage (matches --info #2962ff) */ --info-rgb: 41 98 255; /* Glass surface for dialogs (matches --bg-elevated #1e222d at 0.85) */ --glass-bg: rgb(30 34 45 / 85%); --glass-border: rgb(255 255 255 / 8%); /* ── Level 2 Trading Terminal tokens ── Aliases of the global app tokens: the Level 2 / Time & Sales panel shares the application's palette instead of carrying its own. */ --l2-text: var(--text); --l2-bg: var(--bg-elevated); --l2-accent: var(--accent); --l2-accent-hover: var(--primary-hover); --l2-bid: var(--positive); --l2-ask: var(--negative); --l2-panel: var(--bg-elevated); --l2-panel-border: var(--border); --l2-border-width: 1px; /* Level 2 font stack: same mono as the rest of the app */ --l2-font-mono: var(--font-mono); /* ── Layout tokens (panel widths, toolbar, chart, header) ── */ --control-height: 26px; /* ── Inline SVG icons ────────────────────────────────────────────────── One stroke for every inline icon, at either grid: 1.6 reads the same at a 24px nav icon and an 11px chart-card one, which is why the tree had four values for what is one decision. `stroke-width` is a presentation ATTRIBUTE in the markup and an attribute cannot read a custom property, so the rule that owns it is `svg[stroke="currentColor"]` below and the attribute is simply absent. */ --icon-stroke: 1.6; --icon-size: 20px; /* the CSS-sized 24-grid icons: nav links, toolbar buttons */ --spinner-size: 24px; /* .spinner ring box */ --nav-float-size: 44px; /* #nav-toggle-float: the touch minimum; the 20px glyph sits inside the padding */ --panel-width-md: 380px; --panel-width-xl: 700px; --chart-min-width: 360px; /* Offset subtracted from 100dvh so .trades-layout fills the viewport's free vertical space. Trades has no page header: only the page-wrapper's top padding (space-sm = 8px) and bottom padding (space-xl = 32px). */ --trades-layout-offset: 40px; --dash-card-min: 380px; --split-card-min: 400px; --split-card-min-mobile: 280px; --presets-card-min: 14em; /* ── Semantic height/width tokens (dashboard/backtest magic numbers) ── */ --chart-height-default: 420px; --picker-list-height: 220px; /* ── Dialog widths: three sizes, no more. A dialog that does not fit one of them needs its layout built to fit one of them; the two exceptions (the risk calculator, the chat panel) carry the reason inline. ── */ --dialog-width-sm: 480px; --dialog-width-md: 640px; --dialog-width-lg: 780px; /* ── Viewport ── One place that knows how tall "the whole screen" is, so pages don't each spell out the vh/dvh pair. The vh line is the fallback for browsers without dvh. */ --viewport-h: 100vh; /* stylelint-disable-next-line declaration-block-no-duplicate-custom-properties -- the vh line above IS the fallback; a browser without dvh drops this one and keeps it */ --viewport-h: 100dvh; --safe-b: env(safe-area-inset-bottom, 0px); /* ── Touch ── */ --touch-min: 44px; /* Floor for controls on tablet/phone widths: under the 44px touch target, but well above the compact desktop size. */ --touch-compact: 40px; /* The responsive audit's floor for a tap target (scripts/responsive-audit.mjs): below the 44px touch minimum, but a target a thumb can still hit. Used where a small glyph button or a sort header cannot take the full minimum. */ --touch-floor: 28px; /* Phone height of the scan day chart (scan.css, width <= 480px). 40dvh put the first results row at y=642 at 390x844, with the results header at y=565; 36dvh brings the table header and the first six rows onto the first screen. Measured during the mobile UI rebuild (MOB-16 step 2). */ --scan-chart-phone-height: 36dvh; /* ── Shared control, tab and table geometry ── One value per property. A component that needs a different size names its own modifier and sets it from these tokens, never a literal. */ --control-font-size: var(--font-sm); --tab-height: 28px; --tab-font-size: var(--font-sm); --toolbar-height: 36px; --page-title-size: var(--font-lg); --card-title-margin: var(--space-sm); /* Focus ring: one 2px ring and offset for every :focus-visible outline. */ --focus-ring-width: 2px; --focus-ring-offset: 2px; /* ── Data density ── */ --table-cell-pad-y: 6px; --table-cell-pad-x: var(--space-sm); --table-font-size: var(--font-sm); /* ── Native control theming ── The app is dark end to end, but the UA form-control palette is light unless the document opts in. Stated once here so the 28 number inputs, the 10 date inputs, 7 radios, 4 checkboxes, 2 time inputs, the file input and the scrollbars all render dark instead of each stylesheet patching its own control. */ color-scheme: dark; accent-color: var(--accent); } /* stylelint-enable color-no-hex */ * { box-sizing: border-box; } /* ── Native form-control surfaces ────────────────── The date picker glyph is the one control the UA still draws with its own light artwork on a dark field. Stated once for every date input instead of the single stylesheet that used to carry it. Number inputs keep their native steppers: the Backtest and Scanner PDF offset fields are stepped through them, and `color-scheme: dark` above is what themes them, so there is nothing to suppress. */ input[type="date"]::-webkit-calendar-picker-indicator { cursor: pointer; } body { margin: 0; padding: 0; background: var(--bg); color: var(--text); font-family: var(--font-sans); min-height: var(--viewport-h); line-height: 1.5; /* Better readability */ --sidebar-w: 56px; padding-left: var(--sidebar-w); /* The content offset and the sidebar it clears are the same measurement in two places: --sidebar-w drives this padding-left and nav.main-nav's width. The nav animates its width (below), so without a matching transition here the two disagree for the length of the animation and the sidebar's right edge sweeps across the content. */ transition: padding-left var(--transition-base); } /* dvh fallback for full-viewport elements */ @supports (height: 100dvh) { .modal-overlay { height: 100dvh; } } .container { width: 100%; max-width: 1600px; margin: 0 auto; padding: 0 var(--space-md); } .page-wrapper { max-width: 1600px; margin: 0 auto; width: 100%; padding: var(--space-sm) var(--space-md) var(--space-xl); } /* ── Vertical Sidebar ──────────────────────────────── Fixed on the left edge, full height. Collapsed by default (icons only, 56px) to maximize content width; toggled expanded (200px) via the hamburger. `--sidebar-w` lives on
so body-left padding and nav width stay in sync; .sidebar-expanded widens both. */ body.sidebar-expanded { --sidebar-w: 200px; } nav.main-nav { position: fixed; top: 0; left: 0; bottom: 0; width: var(--sidebar-w); display: flex; flex-direction: column; background: var(--bg); border-right: 1px solid var(--border); z-index: var(--z-500); /* Pairs with body's padding-left transition above: the two must animate over the same duration or the seam is visible mid-toggle. */ transition: width var(--transition-base); overflow: hidden; } /* Floating hamburger for mobile drawers — hidden on desktop */ #nav-toggle-float { display: none; } /* Sidebar toggle row + brand */ .sidebar-toggle-wrap { display: flex; align-items: center; gap: var(--space-xs); padding: var(--space-sm); border-bottom: 1px solid var(--border); flex-shrink: 0; } .nav-brand { display: flex; align-items: center; gap: var(--space-sm); white-space: nowrap; flex: 1; min-width: 0; } .nav-brand-mark { font-family: var(--font-heading); /* 900 is the one weight that stays: the heading face is Barlow Condensed, loaded at 700 and 900 only, so this is a real cut of the brand face rather than a stray in a 400/600/700 stack. */ font-weight: 900; font-size: var(--font-xl); color: var(--accent); letter-spacing: 0.05em; white-space: nowrap; } .nav-brand-label { white-space: nowrap; } /* Nav links: vertical stack, flex to fill */ .nav-links { display: flex; flex-direction: column; gap: var(--space-xs); flex: 1; padding: var(--space-sm); overflow: hidden auto; scrollbar-width: none; } .nav-links::-webkit-scrollbar { display: none; } nav.main-nav a, nav.main-nav .nav-search-btn { display: flex; align-items: center; gap: var(--space-sm); font-family: var(--font-sans); font-size: var(--font-sm); font-weight: 600; text-decoration: none; color: var(--text-muted); padding: var(--space-sm); border-radius: var(--radius-md); transition: all var(--transition-fast); white-space: nowrap; flex-shrink: 0; width: 100%; border: none; background: none; cursor: pointer; } nav.main-nav a:hover, nav.main-nav .nav-search-btn:hover { color: var(--text); background: var(--border); } nav.main-nav a.active { background: var(--accent); color: var(--bg); } nav.main-nav a svg, nav.main-nav .nav-search-btn svg { width: var(--icon-size); height: var(--icon-size); flex-shrink: 0; } /* The one place an inline icon's stroke is written. Scoped by the attribute every stroked icon already carries, so a filled icon (fill="currentColor", no stroke) is untouched and no class has to be invented. The chart-card shadow root repeats this rule inside its own scope — a shadow tree does not inherit the document's selectors, only its variables. */ svg[stroke="currentColor"] { stroke-width: var(--icon-stroke); } /* Labels: hidden while collapsed, shown when expanded */ .nav-label, .nav-brand-label { font-size: var(--font-sm); font-weight: 600; white-space: nowrap; transition: opacity var(--transition-fast); } body:not(.sidebar-expanded) .nav-label, body:not(.sidebar-expanded) .nav-brand-label { display: none; } body:not(.sidebar-expanded) .nav-brand { display: none; } /* Watchlist badge in nav — hidden by default, shown only with .has-items */ nav.main-nav a .nav-badge { display: none; } nav.main-nav a .nav-badge.has-items { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: var(--space-xs); border-radius: var(--radius-round); background: var(--accent); color: var(--bg); font-size: var(--font-xs); font-weight: 700; line-height: 1; vertical-align: middle; } nav.main-nav a.active .nav-badge.has-items { background: var(--bg); color: var(--accent); } nav.main-nav .nav-actions { display: flex; flex-direction: column; gap: var(--space-xs); padding: var(--space-sm); border-top: 1px solid var(--border); flex-shrink: 0; } nav.main-nav .nav-toggle { display: flex; background: none; border: none; color: var(--text-muted); cursor: pointer; padding: var(--space-sm); border-radius: var(--radius-md); transition: all var(--transition-fast); flex-shrink: 0; } nav.main-nav .nav-toggle:hover { color: var(--text); background: var(--border); } nav.main-nav .nav-toggle svg { width: var(--icon-size); height: var(--icon-size); display: block; } .control-panel { /* Surface from .surface (this file); the rule owns the panel's spacing. */ padding: var(--space-md); margin-bottom: var(--space-md); } /* Control Panel Modifiers (BEM-lite) */ .control-panel--compact { padding: var(--space-sm); margin-bottom: var(--space-sm); } /* Unified Control Panel BEM Structure */ .control-panel__main { display: flex; gap: var(--space-sm); flex-wrap: wrap; align-items: center; position: relative; } .control-panel__secondary { display: flex; gap: var(--space-sm); flex-wrap: wrap; align-items: center; padding-top: var(--space-sm); margin-top: var(--space-sm); border-top: 1px solid var(--border); } .control-panel__secondary.hidden { display: none; } .control-panel__toggle { background: transparent; border: 1px solid var(--border); color: var(--text-muted); padding: var(--space-2xs) var(--space-sm); font-size: var(--font-xs); border-radius: var(--radius-sm); cursor: pointer; transition: all var(--transition-fast); margin-left: auto; } .control-panel__toggle:hover { border-color: var(--accent); color: var(--text); } .control-panel__toggle.active { background: var(--accent); color: var(--bg); border-color: var(--accent); } /* ── Panel resize seams (shared by every page) ───────────────────────── The drag handle a `features/shared/splitter.ts` binding rides on: a 10px hit area over a 1px rule that only appears on hover, drag or focus. Positioning stays per page — the seam sits wherever that page's layout puts it (the splitter's size variable is the one offset both the panel and the handle read). `--resize-offset` is the shared offset hook: when a page sets it, the handle rides that distance from the container's edge; when it is absent or invalid, `auto` leaves the handle at its static position, which is what a seam that has not been dragged yet needs. */ .panel-resize-handle { position: absolute; inset-block: 0; width: 10px; margin-left: -5px; cursor: col-resize; touch-action: none; z-index: var(--z-10); } .panel-resize-handle::after { content: ""; position: absolute; inset-block: 0; left: 50%; width: 1px; margin-left: -0.5px; background: var(--border); opacity: 0; transition: opacity var(--transition-base); } /* The row-seam twin of the handle above: same affordance, riding a horizontal seam. One class with the axis flipped, so the visual contract (10px of grab area, touch-action off, a focus ring) cannot drift. */ .panel-resize-handle--row { inset-block: auto; inset-inline: 0; top: var(--resize-offset, auto); width: auto; height: 10px; margin-left: 0; margin-top: -5px; cursor: row-resize; } .panel-resize-handle--row::after { inset-block: auto; inset-inline: 0; top: 50%; left: 0; width: auto; height: 1px; margin-left: 0; margin-top: -0.5px; } .panel-resize-handle:hover::after, .panel-resize-handle.dragging::after, .panel-resize-handle:focus-visible::after { background: var(--accent); opacity: 1; } .panel-resize-handle:focus-visible { outline: var(--focus-ring-width) solid var(--accent); outline-offset: -2px; } .input-row, .filter-row, .action-row { display: flex; gap: var(--space-sm); flex-wrap: wrap; align-items: center; } .input-row > *, .filter-row > *, .action-row > * { flex-shrink: 0; } .input-group { display: flex; flex-direction: column; gap: var(--space-sm); } .input-label { font-family: var(--font-sans); font-size: var(--font-xs); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.1em; } .input-field, .select-field, .filter-textarea, .modal-input { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-md); font-family: var(--font-sans); font-size: var(--control-font-size); color: var(--text); transition: border-color var(--transition-fast); min-width: 150px; } .filter-textarea, .modal-input { padding: var(--space-sm) var(--space-md); } /* One control height for the single-line fields: the text centres in it. */ .input-field, .select-field { height: var(--control-height); padding: 0 var(--space-md); } /* The compact geometry (filter rows, inline selectors, toolbar fields), so a page that wants a short field asks for it instead of writing padding. */ .input-field--sm, .select-field--sm { height: var(--control-height); padding: 0 var(--space-sm); } .modal-input--sm { padding: var(--space-xs) var(--space-sm); font-size: var(--control-font-size); } .input-field--upper { text-transform: uppercase; } .input-field:focus, .select-field:focus, .filter-textarea:focus, .modal-input:focus { outline: var(--focus-ring-width) solid var(--accent); outline-offset: var(--focus-ring-offset); border-color: var(--accent); } .input-field::placeholder, .filter-textarea::placeholder, .modal-input::placeholder { color: var(--text-muted); opacity: 0.5; } .filter-textarea { flex: 1; min-height: var(--touch-min); max-height: 150px; resize: vertical; } /* One height and one font size for every button; .btn is the only button shape. */ .btn { font-family: var(--font-sans); font-weight: 600; font-size: var(--control-font-size); height: var(--control-height); padding: 0 var(--space-md); border-radius: var(--radius-md); border: 1px solid var(--border); cursor: pointer; transition: all var(--transition-fast); text-transform: uppercase; letter-spacing: 0.05em; white-space: nowrap; background: var(--bg); color: var(--text); } .btn:hover { background: var(--border); color: var(--text); } .btn:active { transform: scale(0.98); } .btn:disabled { opacity: 0.5; cursor: not-allowed; } .btn-primary { background: var(--primary); color: var(--bg); border-color: var(--primary); } .btn-primary:hover { background: var(--primary-hover); border-color: var(--primary-hover); } .btn-secondary { background: var(--bg-elevated); color: var(--secondary); border-color: var(--border); } .btn-secondary:hover { background: var(--border); color: var(--text); } .btn-danger { background: var(--danger); color: var(--bg); border-color: var(--danger); } .btn-danger:hover { background: var(--danger-hover); border-color: var(--danger-hover); } /* ── Icon button (unified — was duplicated per-page in dashboard.css/backtest.css) ── */ .btn-icon { background: none; border: 1px solid var(--border); border-radius: var(--radius-md); cursor: pointer; line-height: 1; color: var(--text-secondary); transition: all var(--transition-fast); } .btn-icon:hover { background: var(--bg-input); color: var(--text-primary); } .tf-selector { display: flex; gap: var(--space-xs); background: var(--bg); padding: var(--space-xs); border-radius: var(--radius-md); } @media (width <= 768px) { .tf-selector { overflow-x: auto; scrollbar-width: none; flex-wrap: nowrap; } .tf-selector::-webkit-scrollbar { display: none; } .tf-selector .tf-btn { flex-shrink: 0; } } /* Segment buttons share the tab height, font and padding; the bordered strip is the only thing that tells them apart from .tab. */ .tf-selector .tf-btn { display: inline-flex; align-items: center; justify-content: center; min-height: var(--tab-height); font-family: var(--font-sans); background: var(--bg); border: 1px solid var(--border); color: var(--text-muted); padding: 0 var(--space-md); font-size: var(--tab-font-size); font-weight: 600; border-radius: var(--radius-sm); cursor: pointer; transition: all var(--transition-base); } .tf-selector .tf-btn:hover { border-color: var(--accent); color: var(--text); } .tf-selector .tf-btn.active { background: var(--accent); color: var(--bg); border-color: var(--accent); } .view-toggle { display: flex; gap: var(--space-2xs); background: var(--bg); padding: var(--space-2xs); border-radius: var(--radius-md); border: 1px solid var(--border); } .view-toggle .view-btn { font-family: var(--font-sans); background: transparent; border: none; color: var(--text-muted); min-height: var(--control-height); padding: 0 var(--space-sm); font-size: var(--font-xs); font-weight: 600; border-radius: var(--radius-sm); cursor: pointer; transition: all var(--transition-base); text-transform: uppercase; letter-spacing: 0.05em; } .view-toggle .view-btn:hover { color: var(--text); } .view-toggle .view-btn.active { background: var(--accent); color: var(--bg); } /* ── Tab bars: .tabs / .tab / .tab--active ────────────────────────────────── One tab button for the whole app. The row is `.tabs` and it scrolls when its tabs do not fit (eleven At Risk tabs overflow any phone), so the page never has to. Everything else about a tab bar — where it sits, whether it carries a border-bottom, how wide the pane below it is — stays the page's; only the button is shared. A page that needs a different button wants a different component, not a fifth spelling of this one. */ .tabs { display: flex; align-items: center; gap: var(--space-xs); min-width: 0; overflow-x: auto; scroll-snap-type: x proximity; scrollbar-width: none; } /* In a control panel the tab row takes the free width and scrolls, so the action beside it (Refresh) stays on the same line instead of wrapping. */ .control-panel__main > .tabs { flex: 1 1 0; } .tabs::-webkit-scrollbar { display: none; } .tab { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: var(--tab-height); scroll-snap-align: center; font-family: var(--font-sans); font-size: var(--tab-font-size); font-weight: 600; background: transparent; border: 0; border-radius: var(--radius-sm); color: var(--text-secondary); padding: 0 var(--space-md); white-space: nowrap; cursor: pointer; transition: background var(--transition-fast), color var(--transition-fast); } .tab:hover { background: var(--overlay-1); color: var(--text-primary); } /* The selected chip every other selector in the tree already uses (nav a.active, .control-panel__toggle.active, .tf-btn.active): accent surface, background-coloured text for the contrast. */ .tab--active, .tab--active:hover { background: var(--accent); color: var(--bg); } .results-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: var(--space-md); } .grid-layout { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: var(--space-md); } .list-layout { display: flex; flex-direction: column; gap: var(--space-xs); /* Was declared a second time ~1,700 lines down, in the horizontal-scroll group. Both rules are one class with the same specificity, so the split bought nothing and only let the two halves drift apart. */ overflow-x: auto; } .status { font-family: var(--font-sans); font-size: var(--font-sm); color: var(--text-muted); padding: var(--space-lg); text-align: center; } /* ── State cards: .state + one variant ───────────────────────────────────── The one box for "nothing is here yet", "still fetching" and "that failed". Only three variants, deliberately: a fourth state means a component that happened to arrive in this shape, and it should keep its own class. `.status-empty` / `.status-loading` / `.status-error` are the same rule: discover-page.ts is PROTECTED and still writes them. Delete the aliases when that file is released. */ .state, .status-empty, .status-loading, .status-error { padding: var(--space-xl) var(--space-md); text-align: center; border-radius: var(--radius-md); border: 1px solid var(--border); background: var(--bg-elevated); color: var(--text-muted); font-size: var(--font-sm); } .state--loading, .state--empty { color: var(--text-muted); } .state--error, .status-error { color: var(--negative); border-color: var(--negative); } .state--spaced { margin: var(--space-md) 0; } /* Generic loading/error placeholders (promoted from reverse-splits page) */ .loading-state { text-align: center; padding: var(--space-xxl) var(--space-md); color: var(--text-muted); font-size: var(--font-md); } .card-title { font-weight: 600; font-size: var(--font-lg); margin-bottom: var(--card-title-margin); } .card-subtitle { font-family: var(--font-sans); font-size: var(--font-xs); color: var(--text-muted); } .metric-label { font-family: var(--font-sans); font-size: var(--font-xs); color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; font-weight: 600; margin-bottom: var(--space-xs); } .metric-value { font-family: var(--font-sans); font-size: var(--font-md); font-weight: 700; color: var(--text); } .metric-value.positive { color: var(--positive); } .metric-value.negative { color: var(--negative); } .metric-value.accent { color: var(--accent); } .badge { display: inline-block; padding: 3px var(--space-sm); border-radius: var(--radius-md); font-size: var(--font-sm); font-weight: 600; text-transform: uppercase; } /* The tier modifiers are the whole contract: geometry lives on `.badge`, a modifier carries colour and nothing else. `--sm` is the only size variant, for the families whose chips were a step smaller than the default. */ .badge--sm { padding: var(--space-2xs) var(--space-sm); font-size: var(--font-xs); } .badge--positive { background: var(--positive-bg); color: var(--positive-text); } .badge--negative { background: var(--negative-bg); color: var(--negative-text); } .badge--neutral { background: var(--neutral-15); color: var(--text-muted); } .badge--info { background: var(--info-bg); color: var(--info-text); } /* Symbol flags — emoji badges rendered next to a symbol. */ .symbol-flag { display: inline-block; margin-left: var(--space-xs); font-size: var(--font-sm); cursor: help; } .symbol-flag-more { color: var(--text-muted); font-weight: 600; } .modal-overlay { position: fixed; inset: 0; background: color-mix(in srgb, var(--black) 80%, transparent); display: flex; align-items: center; justify-content: center; z-index: var(--z-1000); } .modal-overlay.hidden { display: none; } body.modal-open { overflow: hidden; } .modal-content { background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-lg); width: var(--dialog-width-sm); max-width: 95vw; max-height: 85vh; max-height: 85dvh; overflow-y: auto; } /* The width belongs here, not on a page's own dialog class: a dialog that picks its width by hand is how 350/420/520/560/640/780/980 got into the tree in the first place. sm is the default, so only the other two are opt-in. */ .modal-content--md { width: var(--dialog-width-md); } .modal-content--lg { width: var(--dialog-width-lg); } /* Symbol Flags dialog — list view management */ .symbol-flags-dialog { display: flex; flex-direction: column; } .symbol-flags-dialog__header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-md); } .symbol-flags-dialog__body { flex: 1; min-height: 0; overflow-y: auto; } .symbol-flags-dialog__error { padding: var(--space-xl); text-align: center; color: var(--text-muted); } .symbol-flags-dialog__empty { padding: var(--space-xxl) var(--space-md); text-align: center; } .symbol-flags-dialog__empty p { color: var(--text-muted); margin-bottom: var(--space-md); } .symbol-flags-dialog__new-btn { margin: 0 auto; } .symbol-flags-list { list-style: none; margin: 0; padding: 0; } .symbol-flags-row { display: flex; align-items: center; gap: var(--space-sm); padding: var(--space-sm) 0; border-bottom: 1px solid var(--border); } .symbol-flags-row:last-child { border-bottom: none; } .symbol-flags-row__drag { width: 1.25em; height: 1.25em; display: flex; align-items: center; justify-content: center; cursor: grab; color: var(--text-dim); font-size: var(--font-sm); flex-shrink: 0; } .symbol-flags-row__move-btns { display: none; flex-direction: column; width: 1.25em; height: 1.25em; justify-content: center; gap: 0; } .symbol-flags-row__move-up, .symbol-flags-row__move-down { width: 1.25em; height: 0.875em; padding: 0; font-size: var(--font-xs); } .symbol-flags-row__emoji { font-size: var(--font-lg); width: 1.5em; text-align: center; flex-shrink: 0; } .symbol-flags-row__name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .symbol-flags-row__summary { color: var(--text-muted); font-size: var(--font-sm); min-width: 100px; text-align: right; flex-shrink: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .symbol-flags-toggle { appearance: none; border: 1px solid var(--border); border-radius: var(--radius-round); width: 52px; height: var(--control-height); position: relative; background: var(--border); cursor: pointer; padding: 0; transition: all var(--transition-fast); flex-shrink: 0; } .symbol-flags-toggle--on { background: color-mix(in srgb, var(--positive) 20%, transparent); border-color: var(--positive); } .symbol-flags-toggle__track { position: absolute; top: 3px; left: 3px; width: var(--icon-size); height: var(--icon-size); border-radius: var(--radius-round); background: var(--text); transition: transform var(--transition-fast); } .symbol-flags-toggle--on .symbol-flags-toggle__track { /* A 26px slide distance, not a control height: --control-height has the same value but names a control, so it is not reused here. */ transform: translateX(26px); } .symbol-flags-toggle__label { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); font-size: var(--font-xxs); font-weight: 600; color: var(--text-dim); } .symbol-flags-toggle--on .symbol-flags-toggle__label { color: var(--positive); } .symbol-flags-row__actions { display: flex; align-items: center; gap: var(--space-xs); flex-shrink: 0; } .symbol-flags-row__edit, .symbol-flags-row__duplicate, .symbol-flags-row__delete { width: 1.5em; height: 1.5em; padding: 0; font-size: var(--font-sm); } .symbol-flags-row__confirm { display: flex; align-items: center; gap: var(--space-xs); } .symbol-flags-row__confirm-text { color: var(--text-muted); font-size: var(--font-xs); } .symbol-flags-row__confirm-yes, .symbol-flags-row__confirm-no { width: 1.75em; height: 1.5em; padding: 0; font-size: var(--font-xs); } .symbol-flags-row--drag-over { background: var(--overlay-2); } .symbol-flags-row--dragging { opacity: 0.5; } /* Narrow/touch: hide drag handle, show move buttons */ @media (width <= 768px) { .symbol-flags-row__drag { display: none; } .symbol-flags-row__move-btns { display: flex; } } /* Full-screen below dialog width */ /* Card-density scale: every content grid walks down one step at each of the 4 documented breakpoints (lg/md/sm/xs) so 1440→1280→1024→768→480 stays homogeneous instead of each page inventing its own 1400/900/700/etc. Families that already use min(Npx,100%) own their own --*-card-min token; the generic fallback (.results-grid/.grid-layout) keeps its 340→320 steps as the lowest-density tier. */ @media (width <= 1400px) { .results-grid, .grid-layout { grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); } } @media (width <= 1024px) { .dash-grid, .split-grid { grid-template-columns: repeat(auto-fill, minmax(min(var(--dash-card-min), 100%), 1fr)); } /* .action-row stacks a column earlier than the other two row patterns: the buttons inside it are long enough that a row of them wraps into an unreadable two-line mess on a tablet. It lives here, with the class, instead of being re-declared in the page that first needed it. */ .action-row { flex-direction: column; align-items: stretch; } } @media (width <= 768px) { .results-grid, .grid-layout { grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); } .dash-grid { grid-template-columns: repeat(auto-fill, minmax(min(var(--dash-card-min), 100%), 1fr)); } .split-grid { grid-template-columns: repeat(auto-fill, minmax(min(var(--split-card-min-mobile), 100%), 1fr)); } .presets-panel { grid-template-columns: repeat(auto-fill, minmax(min(var(--presets-card-min), 100%), 1fr)); } .input-row, .filter-row { flex-direction: column; align-items: stretch; } .input-row > *, .filter-row > * { flex-shrink: 1; } .input-field, .select-field, .modal-input { width: 100%; } .input-field, .modal-input { min-width: 0; } .inspector-metrics { grid-template-columns: repeat(2, 1fr); } .modal-content { width: 100%; max-width: 95vw; margin: 0 var(--space-sm); } /* Cards stacked instead of side-by-side */ .split-charts { grid-template-columns: 1fr; } .split-charts stock-chart-card:first-child { border-right: none; border-bottom: 1px solid var(--border); } /* Mobile touch targets: controls meant to be tapped need ≥ ~36px hit area. The compact paddings above are desktop-optimized. */ .control-panel__toggle { padding: 7px var(--space-sm); } .unified-chart-action-btn { min-width: var(--toolbar-height); min-height: var(--toolbar-height); padding: var(--space-sm); } } /* intentional breakpoint: 640px matches the dialog full-screen spec */ @media (width <= 640px) { .modal-content--md.symbol-flags-dialog { width: 100vw; height: 100dvh; max-width: 100vw; max-height: 100dvh; margin: 0; border-radius: var(--radius-none); } } /* Symbol Flags dialog — editor view (compact) */ .symbol-flags-editor { display: flex; flex-direction: column; gap: var(--space-sm); padding-bottom: var(--space-sm); } .symbol-flags-editor__head { display: flex; align-items: center; gap: var(--space-sm); } .symbol-flags-editor__back { width: 1.75em; height: 1.75em; padding: 0; font-size: var(--font-md); } .symbol-flags-editor__heading { font-size: var(--font-md); font-weight: 600; color: var(--text); } .symbol-flags-editor__identity { display: flex; gap: var(--space-sm); align-items: flex-start; } .symbol-flags-editor__field { display: flex; flex-direction: column; gap: var(--space-xs); min-width: 0; flex: 1; } .symbol-flags-editor__field--emoji { position: relative; flex: 0 0 auto; min-width: 88px; } .symbol-flags-editor__emoji-control { display: flex; align-items: stretch; gap: 0; } .symbol-flags-editor__label { font-size: var(--font-xs); font-weight: 600; color: var(--text-muted); } .symbol-flags-editor__input, .symbol-flags-editor__select { font-size: var(--font-md); padding: var(--space-xs) var(--space-sm); } .symbol-flags-editor__emoji-input { width: 2.8em; text-align: center; border-right: 0; border-radius: var(--radius-md) 0 0 var(--radius-md); } .symbol-flags-editor__emoji-trigger { padding: 0 var(--space-xs-plus); font-size: var(--font-xs); line-height: 1; background: var(--bg); border: 1px solid var(--border); border-left: 0; border-radius: 0 var(--radius-md) var(--radius-md) 0; color: var(--text-muted); cursor: pointer; } .symbol-flags-editor__emoji-trigger:hover, .symbol-flags-editor__emoji-trigger[aria-expanded="true"] { color: var(--text); background: var(--overlay-1); } .symbol-flags-editor__emoji-picker { position: absolute; z-index: var(--z-100); top: calc(100% + var(--space-xs)); left: 0; width: min(22rem, calc(100vw - var(--space-xl) - var(--space-xl))); border-radius: var(--radius-md); box-shadow: var(--shadow-md); overflow: hidden; } .symbol-flags-editor__emoji-picker.hidden { display: none !important; } .symbol-flags-editor__emoji-picker-element { display: block; width: 100%; height: 20rem; color-scheme: dark; --background: var(--bg-elevated); --border-color: var(--border); --border-radius: var(--radius-md); --button-active-background: var(--overlay-3); --button-hover-background: var(--overlay-2); --category-font-color: var(--text); --category-font-size: var(--font-sm); --emoji-padding: var(--space-xs); --emoji-size: var(--font-xxl); --indicator-color: var(--info); --input-border-color: var(--border); --input-border-radius: var(--radius-sm); --input-font-color: var(--text); --input-font-size: var(--font-sm); --input-placeholder-color: var(--text-muted); --outline-color: var(--border-focus); --skintone-border-radius: var(--radius-round); } .symbol-flags-editor__match { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-sm); border: none; margin: 0; padding: 0; } .symbol-flags-editor__radio { display: flex; align-items: center; gap: var(--space-xs); font-size: var(--font-sm); color: var(--text); } .symbol-flags-editor__hint, .symbol-flags-editor__suffix, .symbol-flags-editor__sep { font-size: var(--font-xs); color: var(--text-muted); } .symbol-flags-editor__rules { display: flex; flex-direction: column; gap: var(--space-sm); border: 1px solid var(--border); border-radius: var(--radius-md); padding: var(--space-sm); } .symbol-flags-editor__rule { display: flex; flex-direction: column; gap: var(--space-xs); } .symbol-flags-editor__rule:not(:last-child) { border-bottom: 1px dashed var(--border); padding-bottom: var(--space-sm); } .symbol-flags-editor__rule-main { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xs); } .symbol-flags-editor__rule-field { flex: 1; min-width: 8em; } .symbol-flags-editor__rule-remove { margin-left: auto; width: 1.5em; height: 1.5em; padding: 0; font-size: var(--font-sm); } .symbol-flags-editor__value, .symbol-flags-editor__value-wrap, .symbol-flags-editor__source-param { display: flex; align-items: center; gap: var(--space-xs); } .symbol-flags-editor__value-input { width: 7em; } .symbol-flags-editor__value-input--list { width: 12em; } .symbol-flags-editor__days-input { width: 3.5em; text-align: center; } .symbol-flags-editor__rule-extra { display: flex; flex-wrap: wrap; gap: var(--space-xs); } .symbol-flags-editor__rule-extra:empty, .symbol-flags-editor__chips:empty, .symbol-flags-editor__preview-status:empty, .symbol-flags-editor__preview-rows:empty, .symbol-flags-editor__error:empty { display: none; } .symbol-flags-editor__rule-actions { display: flex; gap: var(--space-sm); } .symbol-flags-editor__template-input { font-size: var(--font-md); font-family: var(--font-sans); padding: var(--space-sm); min-height: 2.75em; max-height: 6em; width: 100%; box-sizing: border-box; } .symbol-flags-editor__chips { display: flex; flex-wrap: wrap; gap: var(--space-xs); } .symbol-flags-editor__chip { padding: var(--space-xs) var(--space-sm); font-size: var(--font-xs); line-height: 1; color: var(--text-muted); background: none; border: 1px solid var(--border); border-radius: var(--radius-md); transition: all var(--transition-fast); } .symbol-flags-editor__chip:hover { background: var(--overlay-2); color: var(--text); } .symbol-flags-editor__chip[aria-pressed="true"] { border-color: var(--accent); color: var(--text); background: var(--accent-bg); } .symbol-flags-editor__chip--placeholder { font-family: var(--font-mono); } .symbol-flags-editor__error { margin: 0; font-size: var(--font-xs); color: var(--danger); } .symbol-flags-editor__rule-error { padding-left: var(--space-sm); } .symbol-flags-editor__preview-head { font-size: var(--font-sm); font-weight: 600; color: var(--text-muted); } .symbol-flags-editor__preview-status { display: flex; flex-direction: column; gap: var(--space-xs); } .symbol-flags-editor__preview-status-line { font-size: var(--font-xs); color: var(--text-muted); } .symbol-flags-editor__preview-status-line--error { color: var(--danger); } .symbol-flags-editor__preview-rows { display: flex; flex-direction: column; gap: var(--space-xs); font-size: var(--font-xs); color: var(--text-muted); } .symbol-flags-editor__preview-row { display: flex; align-items: center; gap: var(--space-sm); min-width: 0; } .symbol-flags-editor__preview-emoji { width: 1.5em; text-align: center; flex-shrink: 0; } .symbol-flags-editor__preview-body { display: flex; align-items: baseline; gap: var(--space-sm); flex: 1; min-width: 0; } .symbol-flags-editor__preview-symbol { font-weight: 600; color: var(--text); flex-shrink: 0; } .symbol-flags-editor__preview-tip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; } .symbol-flags-editor__foot { display: flex; align-items: flex-start; gap: var(--space-sm); margin-top: var(--space-xs); } .symbol-flags-editor__form-error { flex: 1; } .symbol-flags-editor__actions { display: flex; gap: var(--space-sm); margin-left: auto; } .symbol-flags-editor__discard { display: flex; align-items: center; gap: var(--space-sm); margin-left: auto; } .symbol-flags-editor__discard-text { font-size: var(--font-sm); color: var(--text-muted); } @keyframes symbol-flags-row-flash { from { background-color: color-mix(in srgb, var(--accent) 22%, transparent); } to { background-color: transparent; } } .symbol-flags-row--highlighted { animation: symbol-flags-row-flash 1.8s ease 1; border-radius: var(--radius-sm); } /* Analyze Modal Styles — width comes from .modal-content--lg. */ .analyze-modal-content { max-width: 95vw; max-height: 85vh; max-height: 85dvh; padding: 0; display: flex; flex-direction: column; } .analyze-modal-body { flex: 1; min-height: 0; overflow-y: auto; } /* Settings Modal — Data Sync panel in a dialog (gear icon in nav). It fits the default sm width, so it names no size. */ .settings-modal-content { max-width: 95vw; max-height: 85vh; max-height: 85dvh; display: flex; flex-direction: column; } .settings-modal-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-md); } .settings-modal-body { flex: 1; min-height: 0; overflow-y: auto; } /* Sidebar sections in Settings: one row per section, a toggle and two movers. */ .nav-layout-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-xs); } .nav-layout-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-sm); padding: var(--space-xs) var(--space-sm); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--bg-elevated); } .nav-layout-row__toggle { display: flex; align-items: center; gap: var(--space-sm); cursor: pointer; } .nav-layout-row__toggle input:disabled + span { color: var(--text-muted); } .nav-layout-row__move { display: flex; gap: var(--space-xs); } .nav-layout-row__move button { min-width: var(--control-height); min-height: var(--control-height); border: 1px solid var(--border); border-radius: var(--radius-sm); background: transparent; color: var(--text-secondary); cursor: pointer; } .nav-layout-row__move button:disabled { opacity: 0.4; cursor: default; } .settings-sync-status { display: flex; gap: var(--space-md); flex-wrap: wrap; } /* Notifications — same scroll shape as Settings, with a filing table and the global bankruptcy banner the poller raises. */ .notifications-modal-content { max-width: 95vw; max-height: 85vh; max-height: 85dvh; display: flex; flex-direction: column; } .notifications-status { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-xs) var(--space-sm); font-size: var(--font-xs); } .notifications-status__text { color: var(--text-muted); } /* The unread count reads as a state, not as a second sentence in the status line, so it cannot be lost inside the `·` join the old line used. */ .notifications-status__unread { padding: 0 var(--space-xs); border-radius: var(--radius-sm); background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--text-primary); font-weight: 600; } .notifications-status__unread--quiet { background: transparent; color: var(--text-muted); font-weight: 400; } .notifications-error { display: flex; align-items: center; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-sm); padding: var(--space-sm) var(--space-md); background: var(--negative-bg); border: 1px solid var(--negative); border-radius: var(--radius-md); color: var(--negative-text); font-size: var(--font-sm); } /* `.notifications-error` sets `display: flex`, which outranks the UA's `[hidden] { display: none }`; the hidden state has to be restated. */ .notifications-error[hidden] { display: none; } .notifications-error__text { flex: 1; min-width: 0; } .notifications-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-sm); margin-top: var(--space-md); } .notifications-filters { justify-content: flex-end; } .notifications-prefs { flex-direction: column; align-items: stretch; width: 100%; } .notifications-prefs__group { width: 100%; } .notifications-table { width: 100%; table-layout: fixed; } .notifications-table .notification-cell--kind { width: 16%; } .notifications-table .notification-cell--symbol { width: 11%; } .notifications-table .notification-cell--date { width: 15%; } .notifications-table .notification-cell--actions { width: 14%; } .notification-row--unread { background: color-mix(in srgb, var(--accent) 6%, transparent); } .notification-row__title { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 2; } .notification-row__meta { color: var(--text-muted); font-size: var(--font-xs); } .notification-row__read { font-size: var(--font-xs); white-space: nowrap; } /* Below the tablet width the four-column table does not fit a dialog capped at 95vw: the rows become stacked blocks instead of a horizontal scroller inside the modal. Explicit roles keep the table semantics across the display change. */ @media (width <= 768px) { .notifications-table, .notifications-table tbody { display: block; } .notifications-table thead { display: none; } .notifications-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "kind actions" "filing filing" "symbol date"; gap: var(--space-xs) var(--space-sm); padding: var(--space-sm) 0; border-bottom: 1px solid var(--border); } .notifications-table tr:last-child { border-bottom: 0; } .notifications-table td { display: block; width: auto; padding: 0; border: 0; } .notification-cell--kind { grid-area: kind; } .notification-cell--filing { grid-area: filing; } .notification-cell--symbol { grid-area: symbol; align-self: center; } .notification-cell--date { grid-area: date; text-align: right; } .notification-cell--actions { grid-area: actions; justify-self: end; } .notifications-filters { justify-content: flex-start; } } .notification-banner { position: fixed; top: var(--space-lg); right: var(--space-lg); z-index: var(--z-500); display: flex; align-items: center; gap: var(--space-sm); max-width: 90vw; padding: var(--space-md); background: var(--bg-elevated); border: 1px solid var(--border); border-left: 3px solid var(--danger); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); } .notification-banner__text { flex: 1; font-size: var(--font-sm); color: var(--text-primary); } @media (width <= 480px) { .notification-banner { inset: auto var(--space-md) var(--space-md); max-width: none; } } /* Geometry comes from .modal-input--sm; what is left here is what makes it an Analyze field — a symbol, so uppercase and tracked. The old radius-sm was the only radius in the tree outside the scale's --radius-md. */ .analyze-modal-input { flex: 1; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; } .analyze-modal-input:focus { outline: var(--focus-ring-width) solid var(--accent); outline-offset: var(--focus-ring-offset); border-color: var(--accent); } .analyze-input-group { display: flex; gap: var(--space-xs); flex: 1; } .analyze-search-btn { padding: var(--space-xs-plus) var(--space-sm-plus); font-size: var(--font-sm); font-weight: 700; background: var(--accent); color: var(--bg); border: none; border-radius: var(--radius-sm); cursor: pointer; transition: all var(--transition-fast); } .analyze-search-btn:hover { filter: brightness(1.2); } .analyze-search-btn:active { transform: scale(0.95); } @media (width <= 768px) { .analyze-modal-content { width: 100%; max-height: var(--viewport-h); border-radius: var(--radius-md); } } .modal-title { font-size: var(--font-xl); font-weight: 600; margin-bottom: var(--space-md); } .flex { display: flex; } .text-dim { color: var(--text-muted); } .hidden { display: none !important; } /* ── Utility classes ── */ .u-flex-1 { flex: 1; } .u-ml-auto { margin-left: auto; } .u-text-dim { font-size: var(--font-sm); color: var(--text-dim); font-weight: 600; } .u-text-xs { font-size: var(--font-xs); color: var(--text-muted); } .u-mb-xs { margin-bottom: var(--space-xs); } .u-mb-sm { margin-bottom: var(--space-sm); } .u-mb-md { margin-bottom: var(--space-md); } .u-mt-md { margin-top: var(--space-md); } .u-mt-xl { margin-top: 2rem; } .u-ml-sm { margin-left: var(--space-sm); } .u-pl-lg { padding-left: var(--space-lg); } .u-min-w-0 { min-width: 0; } .u-min-line { min-height: 1.5em; } .u-m-0 { margin: 0; } .u-cursor-pointer { cursor: pointer; } .u-w-full { width: 100%; } /* Initial state for elements JS reveals with `el.style.display = …`. Not the `.hidden` class: that one is !important and would win over the reveal. */ .u-hidden { display: none; } .u-mono { font-family: var(--font-mono); } .u-text-sm { font-size: var(--font-sm); color: var(--text-secondary); } .u-stack { display: flex; flex-direction: column; gap: var(--space-sm); } .u-row { display: flex; align-items: center; gap: var(--space-sm); } .u-progress-track { height: var(--space-sm); background: var(--bg); border-radius: var(--radius-md); overflow: hidden; } .u-progress-bar { height: 100%; width: 0%; background: var(--accent); transition: width var(--transition-slow); } /* ── Symbol / Stock Link ── */ .symbol-link { color: var(--accent); font-weight: 700; cursor: pointer; text-decoration: none; } /* The surfaces that style the symbol under their own class (chart legend, chart symbol search, the calendar rows, the inspector header, the level2 quote bar, the alert panel) now render a real anchor too, via shared/symbol-link.ts's `symbolActionHtml`. They keep their own class and their own colours; what they share is this reset, so none of them picks up a user-agent underline the moment it stops being a span. A global rule rather than six, because "every symbol is a link" is one rule. */ :is( .chart-legend-symbol, .chart-dropdown-symbol, .cal-stock-symbol, .inspector-symbol, .l2-quote-symbol-name, .chart-alert-symbol, .dilution-symbol ) { text-decoration: none; } /* ── Responsive Breakpoints System ── */ /* BREAKPOINTS UNIFICADOS (usar estos en TODOS los archivos CSS): xs: <480px → phones chicos (iPhone SE) sm: <768px → tablets / phones grandes md: <1024px → tablets landscape / laptops chicos lg: <1400px → desktop Base (>1400px): desktop grande Regla: siempre reducir columnas / apilar antes de recortar padding. */ /* ── Sidebar Responsive ── The sidebar is fixed and full-height on all sizes. On ≤768px it becomes a slide-in drawer (hidden by default) to preserve content width on small screens; a `nav--open` class (plus overlay) reveals it. */ @media (width <= 768px) { body { padding-left: 0; } /* Lock background scroll while the drawer is open */ body.nav--open { overflow: hidden; } /* Hide the floating hamburger while the drawer is open (closing happens via overlay click, Escape, or a nav action) */ body.nav--open #nav-toggle-float { display: none; } nav.main-nav { transform: translateX(-100%); width: 200px; box-shadow: var(--shadow-lg); transition: transform var(--transition-base); } body.nav--open nav.main-nav, nav.main-nav.nav--open { transform: translateX(0); } /* Drawer rows are touch targets: at least the 44px minimum tall. */ nav.main-nav .nav-search-btn, nav.main-nav .nav-links a { min-height: var(--touch-min); } /* The drawer's own toggle is off-screen while closed; use the floating hamburger (rendered as a body sibling) instead. */ nav.main-nav .nav-toggle { display: none; } /* The float is 38px tall and sits 8px from the top-left corner, so every page needs a real offset for its first content child or the hamburger covers the page title / topbar. The chart page has no .page-wrapper — chart.css offsets .chart-shell instead. The bottom padding keeps the last row of a page clear of the iPhone home indicator (pages opt into the notch via viewport-fit=cover). */ .page-wrapper { padding-top: calc(var(--nav-float-size) + var(--space-md)); padding-bottom: calc(var(--space-xl) + var(--safe-b)); } /* Full-screen modals: keep the close/send row above the home indicator instead of letting it sit on the physical bottom edge. */ .modal-content, .chat-modal-content, .analyze-modal-content { padding-bottom: calc(var(--space-lg) + var(--safe-b)); } #nav-toggle-float { display: flex; align-items: center; justify-content: center; position: fixed; top: var(--space-sm); left: var(--space-sm); /* Below the modals (--z-1000) so an open modal owns the top-left corner; the drawer's own scrim (--z-200) matches it. */ z-index: var(--z-200); /* Explicit box: the real size is 8 padding + 1 border + 20 svg + 1 border + 8 padding. Stating it means the offset pages reserve above cannot drift 2px short of the button. */ width: var(--nav-float-size); height: var(--nav-float-size); background: var(--bg-elevated); border: 1px solid var(--border); color: var(--text-muted); cursor: pointer; padding: var(--space-sm); border-radius: var(--radius-md); transition: all var(--transition-fast); } #nav-toggle-float:hover { color: var(--text); background: var(--border); } #nav-toggle-float svg { width: var(--icon-size); height: var(--icon-size); display: block; } /* Overlay to close the drawer */ body.nav--open::before { content: ""; position: fixed; inset: 0; background: color-mix(in srgb, var(--black) 50%, transparent); z-index: var(--z-200); } /* Drawer always shows the nav labels for easy navigation. Matches the specificity of the collapsed-sidebar hide rule above (body:not(...) .x), because body .nav-label alone lost to it and the drawer showed icons only. */ body:not(.sidebar-expanded) .nav-label, body .nav-label { display: inline; } body .nav-brand-label { display: inline; } } /* ── Grid Breakpoints ── */ @media (width <= 1400px) { .results-grid, .grid-layout { grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); } } @media (width <= 1024px) { .results-grid, .grid-layout { grid-template-columns: repeat(auto-fill, minmax(min(var(--split-card-min-mobile), 100%), 1fr)); } /* .action-row stacks a column earlier than the other two row patterns: the buttons inside it are long enough that a row of them wraps into an unreadable two-line mess on a tablet. It lives here, with the class, instead of being re-declared in the page that first needed it. */ .action-row { flex-direction: column; align-items: stretch; } } @media (width <= 480px) { .results-grid, .grid-layout, .dash-grid, .split-grid, .presets-panel { grid-template-columns: 1fr; } .inspector-metrics { grid-template-columns: 1fr 1fr; } /* Touch targets: minimum 44px for buttons on mobile */ .btn, .tf-selector .tf-btn, .view-toggle .view-btn, nav.main-nav a { min-height: var(--touch-min); } /* Icon buttons and dense controls are 18–32px wide on desktop — a thumb can't hit them. 44px min keeps the same visual weight (the icon stays put) while the hit area grows. Only the selectors common.css owns are listed. The chart page's and the playbook page's own controls used to be named here too, which forced this file to track the class inventory of three pages it does not style; each of those now carries its own list in its own <=480px block (chart.css, playbook.css), where the rest of its page overrides already live. */ .chart-topbar__actions .btn, .chart-date-jump-cal-header button, .ac-card-remove, .analyze-tab-close, .symbol-flags-toggle, .cal-nav-btn { min-width: var(--touch-min); min-height: var(--touch-min); } .chart-screener-filters .input-field { min-height: var(--touch-min); } /* Type scale step for small phones. 10–11px text was tuned on a desktop monitor and is unreadable at 6" / DPR 3; every rule in the app goes through these tokens, so this is the whole responsive type system in four lines. The four smallest steps move together, and they have to: this block used to raise only xxs/xs/sm, which pushed --font-sm onto --font-md's value (both 13px) so a --font-sm label next to a --font-md one was indistinguishable. Any subset leaves a collision — raising xxs alone lands it on the base --font-xs, raising xxs+xs lands --font-xs on the base --font-sm — so the step is taken as a unit and --font-md moves with it. The ladder stays strictly increasing and 14px still leaves room below the unmoved --font-lg (15px). */ :root { --font-xxs: 0.6875rem; --font-xs: 0.75rem; --font-sm: 0.8125rem; --font-md: 0.875rem; } /* Uppercase micro-labels: the 0.05–0.1em tracking was tuned on a desktop monitor and, with a bigger glyph in a narrower column, it makes the word harder to read rather than easier. 0.04em is the cap. Scoped to the selectors common.css owns. A page stylesheet's own uppercase rule sits after this file at equal specificity, so listing its selectors here would be dead weight — each page's overrides belong in that page's own <=480px block. */ .input-label, .btn, .view-toggle .view-btn, .metric-label, .badge, .analyze-modal-input, .modal-field-label, .info__label, .chart-alert-status, .alb-preview-head, .fbc-sort-label, .flip-card__notes-label { letter-spacing: 0.04em; } .stock-row { grid-template-columns: 80px 1fr 1fr 1fr; /* hide the less critical columns at the narrowest mobile width */ } body:not([data-page="chart"]) .page-wrapper { padding-top: calc(var(--nav-float-size) + var(--space-sm)); } .cal-day { min-height: var(--touch-min); } } /* The horizontal-scroll wrapper and the trades table's 500px floor used to live here as a shared rule. Both consumers have since taken ownership -- `.trades-sidebar .trades-table-wrap` in trades.css and `.results-table-container` in scan.css -- so these were dead weight in a file that does not style either page. */ /* stock-row: per-page variants — they replace inline styles from JS */ .stock-row--label { /* A 20px leading column, not an icon size: no column token names it, and --icon-size is for glyphs. */ grid-template-columns: 20px 1fr auto; padding: var(--space-sm); background: var(--bg); border: none; } /* The Manage Labels list is a set of named rows, not stock cards: the swatch carries the label's own colour, and the name reads as body text rather than the muted row copy the stock variant uses. */ .stock-row--label strong { color: var(--text); } .label-badge--swatch { width: var(--space-md); height: var(--space-md); padding: 0; } .label-list-hint { color: var(--text-muted); font-size: var(--font-xs); margin-top: var(--space-sm); } /* list-view rows: JS writes only the --row-cols track list, so the stylesheet keeps ownership of the track sizing and can reshape it per breakpoint. Qualified with .stock-row on purpose. The base .stock-row card rule further down this file declares its own six-track grid-template-columns at the SAME specificity, and being later it won: --row-cols was silently discarded, the 7th cell onward fell into implicit grid rows, and one result rendered as up to three stacked sub-rows. Measured on discover (17 columns): 6 tracks resolved instead of 17, 3 template rows, 4 distinct cell top offsets, 85px per record. Source order alone is not a contract — the qualifier makes the list track list win regardless of where the base rule sits. */ .stock-row.stock-row--list, .stock-row.stock-row--list-header { /* 40px is the list-header fallback column, not a control floor: --touch-compact has the same value but names a control. */ grid-template-columns: var(--row-cols, 40px); } /* A list row is a data-table row, not the card the base .stock-row styles. The card spent ~31px of chrome around an 18px line (1px border top and bottom, 6px padding top and bottom, 4px radius), so a results list showed roughly a third of the rows it could and read as stacked cards rather than a table. A hairline separator and 2px padding hand the height back to the line. The base card rule is untouched for its tile usage. line-height is a fixed length, not the inherited ratio, because cells in one row do not share a font size: .metric-value is --font-md against the row's --font-sm, and a ratio line box sized each of them independently (19.5px vs 18px), leaving the numeric columns 1.5px off the symbol column's baseline. One box height for the whole row puts every cell on one baseline. */ .stock-row.stock-row--list { background: transparent; border: 0; border-bottom: 1px solid var(--border); border-radius: var(--radius-none); padding: var(--space-2xs) var(--space-sm); line-height: 18px; } /* The lead star shares the row's line box. Left at its natural 25px it made the row taller than the header, and since the cells are centred in the row (align-self: center, so a tall neighbour does not drag single-line text) they ended up 4px below the header label for their own column — a vertical misalignment that only appears on pages that render a star. The whole row is the click target; the star is a secondary toggle, so it takes the line. */ .stock-row.stock-row--list > .unified-chart-action-btn { height: 18px; min-width: 18px; padding: 0 var(--space-xs); line-height: 1; } /* The base hover only recolours a border, which on a hairline row means one coloured pixel — give the row a surface so the pointer's row is findable. */ .stock-row.stock-row--list:hover { background: var(--bg-elevated); border-bottom-color: var(--accent); } @media (width <= 480px) { /* 40px lead track plus one flexible track per data column, so a list row fits the viewport instead of overflowing at 670px+. */ .stock-row.stock-row--list, .stock-row.stock-row--list-header { /* 40px is the phone list-header column, not a control floor: --touch-compact has the same value but names a control. */ grid-template-columns: 40px; grid-auto-columns: minmax(0, 1fr); } .stock-row.stock-row--list > *, .stock-row.stock-row--list-header > * { min-width: 0; } /* Dense rows are a pointer layout: 2px of padding and an 18px line box hand the height back to the text. A phone has no pointer, so the row's own link and its secondary star each take the 28px touch floor the responsive audit enforces instead — a taller row is the cost of a hit area a finger can actually land on. */ .stock-row.stock-row--list .symbol-link { display: inline-flex; align-items: center; min-height: var(--control-height); } .stock-row.stock-row--list > .unified-chart-action-btn { height: var(--control-height); min-width: var(--control-height); } } /* The header shares the rows' horizontal padding and column gap, or every label sits a padding-width to the left of the column it titles. Vertical padding stays 0: this is a label row, and giving it the rows' 2px only makes the header taller than the labels need. */ .stock-row.stock-row--list-header { background: transparent; border: none; padding: 0 var(--space-sm); } .list-header { display: grid; gap: var(--space-sm); } /* A headerCell list header (ListView.renderTable) is a table so its th cells parse. The table, thead and tr take no box, so the cells are the row's grid tracks exactly as the span headers were. */ .list-header__table, .list-header__table thead, .list-header__table tr { display: contents; } /* The lead cell is pinned to the first track instead of being placed in source order. A page whose header cells are its own s (discover) hands them to the parser inside the header table's