Spaces:
Running
Running
Download static/css/scan.css from Arrechenash/stocks: direct link, hf CLI and curl.
- Browser
- Download file 40.9 kB
-
https://huggingface.co/spaces/Arrechenash/stocks/resolve/main/static/css/scan.css
- Command line
-
hf download hf://spaces/Arrechenash/stocks/static/css/scan.css
-
curl -L -o scan.css https://huggingface.co/spaces/Arrechenash/stocks/resolve/main/static/css/scan.css
40.9 kB
/* ========================================
LT Scanner - Section-Specific Styles
======================================== */
/*
NOTE: Many base components defined in common.css:
- .results-grid (base)
- .control-panel (override below for scanner)
- .input-row, .filter-row
- .empty-state
- .tf-selector, .tf-btn
- .view-toggle, .view-btn
*/
/* Results grid - use unified breakpoints from common.css */
/* Base .results-grid defined in common.css */
.results-grid.hidden {
display: none;
}
/* Preset Modal Styles: .preset-info/.preset-actions live in common.css
(shared with the backtest alert-config manager). */
.status-inline {
font-size: var(--font-xs);
color: var(--text-muted);
margin-left: var(--space-sm);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 300px;
}
@media (width <= 768px) {
.status-inline {
max-width: 120px;
}
}
/* Run + status side by side above the phone tier. Stacked, the group is
taller than the filter textarea next to it (58px vs 48px) and sets the
panel's first-row height for the whole page. The status truncates instead
of growing, so a long "[1D] Found 300 results (capped)" cannot widen the
row into a wrap. Left stacked on phones: there the textarea's 150px floor
plus the help button already exceed the row, so inlining would push the
group onto a second line and make the panel taller, not shorter.
Scoped through .control-panel__main so it outranks the .u-stack utility
the markup carries, instead of depending on stylesheet order. */
@media (width > 768px) {
.control-panel__main .control-panel__run {
display: flex;
flex-direction: row;
align-items: center;
gap: var(--space-sm);
min-width: 0;
}
.control-panel__main .control-panel__run .status-inline {
margin-left: 0;
min-width: 0;
}
}
/* .empty-state β defined in common.css */
/* Filter Controls */
/* Geometry comes from .select-field--sm; only the transparent outline at rest
is this filter's, so the focus ring does not flash on first click. */
#filter-select {
outline: var(--radius-sm) solid transparent;
outline-offset: var(--radius-sm);
}
#filter-select:focus {
outline: var(--radius-sm) solid var(--accent);
outline-offset: var(--radius-sm);
border-color: var(--accent);
}
/* .btn-help-icon β promoted to common.css: the reports page carries the same
"?" next to its filter and does not load this stylesheet, so the button
rendered unstyled there. The mobile size override is in the shared block. */
/* Date picker */
.date-range-picker {
display: flex;
align-items: center;
gap: var(--space-xs);
}
.date-picker-input {
background: var(--bg);
color: var(--text);
border: 1px solid var(--border);
border-radius: var(--radius-md);
padding: var(--space-xs) var(--space-sm);
font-size: var(--font-sm);
font-family: inherit;
outline: var(--radius-sm) solid transparent;
outline-offset: var(--radius-sm);
width: auto;
cursor: pointer;
height: var(--space-xl);
box-sizing: border-box;
}
.date-picker-input:focus {
outline: var(--radius-sm) solid var(--accent);
outline-offset: var(--radius-sm);
border-color: var(--accent);
}
.date-separator {
color: var(--text-muted);
font-size: var(--font-xs);
user-select: none;
}
/* Active date badge */
.date-badge {
display: none;
align-items: center;
gap: var(--space-xs);
background: var(--primary);
color: var(--on-accent);
padding: var(--space-2xs) var(--space-sm);
border-radius: var(--radius-md);
font-size: var(--font-xs);
font-weight: 600;
white-space: nowrap;
}
.date-badge.active {
display: inline-flex;
}
.date-badge .remove-date {
background: none;
border: none;
color: var(--on-accent);
cursor: pointer;
font-size: var(--font-lg);
line-height: 1;
padding: 0 0 0 var(--space-2xs);
opacity: 0.7;
}
.date-badge .remove-date:hover {
opacity: 1;
}
/* The x is a 12px glyph; on a phone its hit area takes the touch floor. */
@media (width <= 480px) {
.date-badge .remove-date {
min-width: var(--touch-floor);
min-height: var(--touch-floor);
}
}
/* Page header */
/* .page-header β defined in common.css */
/* .input-label and .filter-textarea β defined in common.css */
/* .tf-selector, .tf-btn β defined in common.css */
.view-toggle--main {
align-self: flex-end;
}
/* Display controls section β always visible below primary.
margin-top is 0 because the border-top is the separator: an extra 8px of
margin above a 1px rule just pushed the controls away from the row they
belong to. The panel's own padding (below) absorbs the breathing room. */
.control-panel__display {
display: flex;
flex-wrap: wrap;
gap: var(--space-sm);
align-items: center;
padding-top: var(--space-xs-plus);
margin-top: 0;
border-top: 1px solid var(--border);
}
/* Scans run a 24px-tall timeframe selector, so 8px of panel padding put 33px
of chrome around 24px of control. Trimmed to 6px: measured +3px of plot on
every tier, and it applies to the grid and list views too. Qualifier needed
to outrank .control-panel--compact in common.css, not to win on order. */
.control-panel.control-panel--compact {
padding-top: var(--space-xs-plus);
padding-bottom: var(--space-xs-plus);
}
/* Scoped to the scan workspace because .control-panel is shared with every
other page. Content-sized until a drag gives it a height, after which it
scrolls instead of pushing the view below it off the screen β that scroll
is what makes shrinking it below its content meaningful rather than a drag
that appears to do nothing. The help dialog is appended to document.body, so
nothing in the panel's own overflow can clip it.
flex-shrink: 0 is what makes that scroll reachable. The panel is the only
child of the workspace that can absorb a shortfall β overflow makes its
automatic minimum size 0 and nothing sets a flex-shrink β so a result set
taller than the remaining space took the shrink out of the panel itself and
`overflow: hidden auto` then hid everything past the first row: the Run
button, the status, the Grid/List/Calendar and Grid/Split toggles, the
timeframe selector and the More disclosure all became unreachable, in Grid
view only, at every window width (measured: a 14px panel against 99px of
content). `.results-grid` cannot shrink below its cards, so with the panel
out of the negotiation the workspace overflows and the page scrolls, which
is what Calendar already does via `.calendar-view { flex: 1; min-height: 0 }`.
`scrollbar-width: thin` is the affordance for the case the floor in
scan-page.ts cannot cover: content that grows after a drag (opening the More
disclosure) makes the panel overflow what it was sized to. */
.scan-workspace > .control-panel {
height: var(--scan-control-height, auto);
overflow: hidden auto;
flex-shrink: 0;
scrollbar-width: thin;
}
@media (width <= 768px) {
/* Phones: the display row wraps so the disclosure can own a line. It used
to, but it now lives at the end of this row, where margin-left:auto
pushed it β and the date pickers + Copy behind it β past the right edge
of a strip that has no visible scrollbar, so they were unreachable.
The view toggle and the timeframe selector still share the first line
(the selector shrinks and scrolls inside itself via the .tf-selector
rule in common.css), which costs one line, not three. */
.control-panel__display {
flex-wrap: wrap;
overflow-x: visible;
scrollbar-width: none;
padding-bottom: var(--space-xs);
}
.control-panel__display::-webkit-scrollbar {
display: none;
}
.control-panel__display > * {
flex-shrink: 0;
}
.control-panel__display .tf-selector {
flex: 1 1 0;
min-width: 0;
}
.control-panel__display .control-panel__toggle {
order: 9;
flex-basis: 100%;
text-align: center;
}
}
/* Lightweight separator for display bar */
.nav-sep {
width: 1px;
height: var(--icon-size);
background: var(--border);
flex-shrink: 0;
}
/* Calendar View Layout
scan-workspace is the page's own modifier on the shared .page-wrapper: the
nav is a fixed sidebar, so the wrapper owns the whole viewport height and
the active view panel claims whatever the control panel leaves over. The
previous `height: calc(100vh - 220px)` was a hardcoded guess at the chrome
height, so the calendar either overflowed the fold (taller panel, secondary
panel open) or left dead space below it (shorter panel).
A definite `height` (not min-height) is what makes this work: with an
indefinite height the flex share of the calendar panel is content-sized, so
the month grid's `1fr` rows resolve to their max-content height and the whole
page grows past the viewport. The grid view is unaffected β its cards cannot
shrink below min-content, so they overflow the wrapper and scroll the page
exactly as before. */
.scan-workspace {
display: flex;
flex-direction: column;
height: var(--viewport-h);
/* The control panel's seam handle is positioned against the workspace,
since the panel is its first child and sits at the top: 0. */
position: relative;
}
.calendar-view {
display: flex;
flex-direction: column;
flex: 1;
min-height: 0;
animation: fadeIn 0.3s ease-out;
}
.calendar-layout {
position: relative;
display: flex;
gap: var(--space-md);
flex: 1;
min-height: 0;
/* One custom property owns the split: the sidebar's width and the drag
handle's position both read it, so a drag can never leave the handle
off the seam. The width tiers below override the property, not the
panel, which is what lets splitter.ts drop the inline value and hand
the width back to the media query when the panels stack. */
/* 280px sidebar floor: no sidebar token; --split-card-min-mobile has the same value but names a card column. */
--calendar-sidebar-width: clamp(280px, 38%, 720px);
}
/* The sidebar owns the chart/list seam as well, so both the chart's flex
basis and its handle's offset read the same property. */
.calendar-sidebar {
position: relative;
width: var(--calendar-sidebar-width);
display: flex;
flex-direction: column;
gap: var(--space-md);
min-height: 0;
/* The sidebar also owns the chart/list seam, so the chart's flex basis
and its handle's offset read this one property. */
--sidebar-chart-height: 62%;
}
/* Position only: the hit area, the 1px rule, its hover reveal and the focus
ring are the shared .panel-resize-handle (common.css). The seam rides the
sidebar's own width, so the handle and the panel read one property. */
.calendar-resize-handle {
left: var(--calendar-sidebar-width);
}
.sidebar-chart-container {
/* The chart is the primary read in this panel, so it takes the larger
share of the sidebar's height and the day list scrolls in what is left.
This share is the multiplier on every pixel reclaimed elsewhere on the
page: at 45% a 100px recovery elsewhere reached the plot as 45px.
The share is a single token now, so a drag writes one custom property
and both this basis and the seam's offset follow it. `min-height: 0` is
required, not cosmetic: a flex item's default `min-height: auto` refuses
to shrink below its content, which would silently reinstate a floor. */
flex: 0 0 var(--sidebar-chart-height);
min-height: 0;
display: flex;
flex-direction: column;
overflow: hidden;
}
.sidebar-chart-controls {
display: flex;
align-items: center;
gap: var(--space-xs-plus);
padding-inline: var(--space-sm);
flex-shrink: 0;
}
/* Stand-in for the symbol the compact card no longer prints in a header of
its own. Truncates rather than widening the row, so a long ticker cannot
push Signal/Full off the panel edge. */
.sidebar-chart-symbol {
font-size: var(--font-sm);
font-weight: 700;
color: var(--text);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
min-width: 0;
margin-right: auto;
}
.sidebar-chart-mode {
display: flex;
gap: 1px;
border: 1px solid var(--border);
border-radius: var(--radius-sm);
overflow: hidden;
}
.mode-btn {
background: var(--bg);
border: none;
color: var(--text-muted);
min-height: var(--control-height);
padding: 0 var(--space-sm);
font-size: var(--font-xs);
font-weight: 600;
cursor: pointer;
transition:
background var(--transition-base),
color var(--transition-base);
}
.mode-btn.active {
background: var(--accent);
color: var(--on-accent);
}
.mode-btn:not(.active):hover {
background: var(--surface-raised);
color: var(--text);
}
.sidebar-chart {
flex: 1;
background: var(--bg);
}
.sidebar-chart-container > .flip-card {
flex: 1 1 0;
min-height: 0;
height: auto;
}
.sidebar-list-container {
/* Takes whatever the chart does not, and may shrink to nothing: the seam
handle is absolutely positioned over the boundary, so a collapsed list
is still reachable. `min-height: 0` again for the flex `auto` minimum. */
flex: 1 1 auto;
min-height: 0;
display: flex;
flex-direction: column;
overflow: auto hidden;
}
.sidebar-list-header {
display: flex;
justify-content: space-between;
padding: var(--space-sm) var(--space-md);
border-bottom: 1px solid var(--border);
font-size: var(--font-xs);
color: var(--text-muted);
font-weight: 600;
}
.sidebar-list {
flex: 1;
overflow-y: auto;
}
.calendar-main {
flex: 1;
display: flex;
flex-direction: column;
overflow: hidden auto;
}
.calendar-nav-header {
display: flex;
justify-content: space-between;
align-items: center;
gap: var(--space-sm);
padding: var(--space-sm) var(--space-md);
border-bottom: 1px solid var(--border);
}
.calendar-nav-header h2 {
margin: 0;
font-size: var(--font-lg);
}
.calendar-nav-controls {
display: flex;
gap: var(--space-sm);
align-items: center;
}
/* The month title and the data-age caption travel together on the left of the
header, so the header keeps its two groups (title | controls) and the caption
reads as part of the title rather than as a third column the flex spread
would have pulled apart. */
.calendar-nav-title {
display: flex;
align-items: baseline;
gap: var(--space-sm);
min-width: 0;
}
.calendar-nav-title .text-dim {
font-size: var(--font-xs);
white-space: nowrap;
}
/* Calendar Grid Implementation
Only the weekday header row is declared: day cells flow into implicit rows
via grid-auto-rows, so a month that needs 6 or 7 Mon-Fri rows (any 31-day
month starting on a Monday) shares the available height instead of
overflowing into a scrollbar with dead space above it. */
.calendar-grid {
flex: 1;
display: grid;
grid-template-columns: repeat(5, 1fr);
grid-template-rows: auto;
grid-auto-rows: minmax(min(64px, 100%), 1fr);
min-height: 0;
}
.cal-weekday {
padding: var(--space-xs);
text-align: center;
font-size: var(--font-xs);
font-weight: 700;
color: var(--text-dim);
text-transform: uppercase;
border-bottom: 1px solid var(--border);
}
.cal-day {
padding: var(--space-xs);
border-right: 1px solid var(--border);
border-bottom: 1px solid var(--border);
/* A busy day scrolls inside its own cell instead of silently losing rows. */
overflow-y: auto;
scrollbar-width: thin;
scrollbar-color: var(--border) transparent;
}
.cal-day:nth-child(7n) {
border-right: none;
}
/* today/selected styling comes from the shared BEM component in
common.css (.cal-day--today / .cal-day--selected / .day-num) β
do not re-declare it here. */
/* Scanner-only: number sits above dense stock rows, needs breathing room */
.cal-day .day-num {
margin-bottom: var(--space-xs);
}
/* Calendar Stock Item */
.cal-stock {
font-size: var(--font-xs);
display: flex;
flex-wrap: wrap;
justify-content: space-between;
align-items: center;
padding: var(--space-2xs) var(--space-xs);
border-radius: var(--radius-sm);
background: color-mix(in srgb, var(--black) 25%, transparent);
margin-bottom: 3px;
gap: var(--space-xs);
transition: background var(--transition-fast);
}
.cal-stock:hover {
background: var(--overlay-3);
}
/* A real basis (not 0) so the row can wrap: with `flex: 1` alone the symbol
shrinks to nothing and the price, change and volume overflow the card at
tablet width, where their clipped text cannot be reached. */
.cal-stock-symbol {
font-weight: 700;
color: var(--accent);
flex: 1 1 64px;
min-width: 0;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
cursor: pointer;
}
.cal-stock-symbol:hover {
text-decoration: underline;
}
.cal-stock-price {
color: var(--text);
font-weight: 600;
min-width: var(--toolbar-height);
text-align: right;
}
.cal-stock-pct {
font-weight: 600;
min-width: var(--toolbar-height);
text-align: right;
}
.cal-stock-vol {
color: var(--text-dim);
min-width: var(--spinner-size);
text-align: right;
}
.cal-stock-pct.positive {
color: var(--positive);
}
.cal-stock-pct.negative {
color: var(--negative);
}
/* News indicator dot for stocks with news */
/* Calendar Day Count Badge */
.cal-day-count {
position: absolute;
top: var(--radius-sm);
right: var(--space-xs);
background: var(--accent);
color: var(--on-accent);
font-size: var(--font-xs);
font-weight: 700;
padding: 1px var(--space-xs);
border-radius: var(--radius-sm);
min-width: 14px;
text-align: center;
}
.cal-day-more {
font-size: var(--font-xs);
text-align: center;
color: var(--text-dim);
padding: var(--space-2xs) 0;
font-weight: 600;
}
.empty-state-mini {
padding: var(--space-xl);
text-align: center;
color: var(--text-muted);
font-size: var(--font-sm);
}
/* Sidebar Stock Table */
.sidebar-stock-table {
width: 100%;
font-size: var(--font-xs);
}
.sidebar-stock-table thead {
position: sticky;
top: 0;
z-index: var(--z-10);
}
/* Header and cell padding, font and case come from the shared `.data-table`;
this table keeps only its sticky fill (the page surface), its sort affordance
and its row rules. */
.sidebar-stock-table th {
background: var(--bg);
cursor: pointer;
user-select: none;
white-space: nowrap;
}
.sidebar-stock-table th:hover {
color: var(--text);
}
.sidebar-stock-table td {
border-bottom: 1px solid var(--border);
color: var(--text);
white-space: nowrap;
}
.sidebar-stock-row {
cursor: pointer;
transition: background var(--transition-fast);
}
.sidebar-stock-row:hover {
background: var(--overlay-1);
}
.sidebar-stock-row.active {
background: var(--overlay-3);
box-shadow: inset var(--radius-sm) 0 0 var(--accent);
}
.sidebar-stock-row .sidebar-stock-symbol {
font-weight: 700;
color: var(--accent);
cursor: pointer;
}
.sidebar-stock-row .sidebar-stock-symbol:hover {
text-decoration: underline;
}
.sidebar-stock-row td.positive {
color: var(--positive);
}
.sidebar-stock-row td.negative {
color: var(--negative);
}
.scan-page .symbol-cell {
font-weight: 700;
color: var(--accent);
cursor: pointer;
}
.scan-page .symbol-cell:hover {
text-decoration: underline;
}
/* ========================================
Results Table View
======================================== */
/* List view claims the same leftover height the calendar does, instead of a
hardcoded 280px chrome allowance that went wrong whenever the control panel
grew (secondary panel open, filter textarea resized). */
.results-table-container {
background: var(--bg-elevated);
border: 1px solid var(--border);
border-radius: var(--radius-md);
overflow: auto;
flex: 1;
min-height: 0;
}
/* Pagination bar under the list view, between the table and the card edge.
Was a style.cssText assignment in scan-results.ts, with a #222 hairline
that no palette defines. */
.pagination-controls {
display: flex;
justify-content: center;
align-items: center;
gap: var(--space-sm);
padding: var(--space-sm-plus) var(--space-md);
margin-top: var(--space-sm);
border-top: 1px solid var(--border);
}
/* Split Grid Mode */
.split-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(min(var(--split-card-min), 100%), 1fr));
gap: var(--space-md);
}
.split-card {
background: var(--bg-elevated);
border: 1px solid var(--border);
border-radius: var(--radius-md);
overflow: hidden;
}
.split-header {
display: flex;
justify-content: space-between;
align-items: center;
padding: var(--space-sm) var(--space-md);
border-bottom: 1px solid var(--border);
background: var(--bg);
}
.split-symbol {
font-weight: 700;
color: var(--accent);
cursor: pointer;
}
.split-symbol:hover {
text-decoration: underline;
}
/* ========================================
Filter Help Dialog
======================================== */
/* Width comes from .modal-content--lg. */
.filter-help-content {
max-width: 95vw;
max-height: 85vh;
max-height: 85dvh;
padding: 0;
display: flex;
flex-direction: column;
overflow: hidden;
background: var(--glass-bg);
/* A 20px blur radius, not a length the token block names: --icon-size shares
the value but names a glyph box. */
backdrop-filter: blur(20px);
border: 1px solid var(--glass-border);
border-radius: var(--radius-lg);
box-shadow: 0 var(--space-lg) 60px color-mix(in srgb, var(--black) 60%, transparent);
animation: slideUpFade 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.filter-help-header {
display: flex;
align-items: center;
gap: var(--space-sm);
padding: var(--space-md) var(--space-lg);
border-bottom: 1px solid var(--overlay-2);
flex-shrink: 0;
}
.filter-help-header h3 {
margin: 0;
font-size: var(--font-lg);
font-weight: 700;
color: var(--text-primary);
letter-spacing: -0.02em;
}
.filter-help-header-hint {
margin-left: auto;
display: flex;
align-items: center;
}
.filter-help-body {
flex: 1;
overflow-y: auto;
padding: var(--space-lg);
scroll-behavior: smooth;
}
.filter-help-text {
margin: 0 0 var(--space-sm);
font-size: var(--font-xs);
color: var(--text-secondary);
line-height: 1.6;
}
.filter-help-text code {
font-family: var(--font-mono);
font-size: var(--font-xs);
background: color-mix(in srgb, var(--black) 20%, transparent);
padding: var(--space-2xs) var(--space-xs);
border-radius: var(--radius-sm);
color: var(--text);
border: 1px solid var(--overlay-2);
}
.filter-help-examples {
display: flex;
flex-direction: column;
gap: var(--space-xs);
}
.filter-help-examples code {
font-family: var(--font-mono);
font-size: var(--font-xs);
background: color-mix(in srgb, var(--black) 20%, transparent);
padding: var(--space-xs) var(--space-sm);
border-radius: var(--radius-sm);
border: 1px solid var(--overlay-2);
color: var(--positive);
display: inline-block;
line-height: 1.5;
word-break: break-all;
}
.filter-help-label {
font-size: var(--font-xs);
color: var(--text-muted);
margin-bottom: var(--space-xs);
padding-left: var(--space-sm);
border-left: var(--radius-sm) solid var(--overlay-3);
}
.filter-help-table {
width: 100%;
font-size: var(--font-xs);
margin-bottom: var(--space-sm);
}
/* The glossary's header and cell padding and font are the shared `.data-table`
ones; only the row rule and the body colour are this table's own. */
.filter-help-table td {
border-bottom: 1px solid var(--overlay-2);
color: var(--text-secondary);
line-height: 1.6;
vertical-align: middle;
}
.filter-help-table td:first-child {
white-space: nowrap;
}
.filter-help-table td code {
font-family: var(--font-mono);
font-size: var(--font-xs);
color: var(--accent);
}
.filter-help-table tr:last-child td {
border-bottom: none;
}
/* ββ Custom badges inside table ββ */
.fh-badge {
display: inline-block;
font-size: var(--font-xs);
font-weight: 700;
padding: var(--space-2xs) var(--space-xs-plus);
border-radius: var(--radius-sm);
margin-left: var(--space-sm);
letter-spacing: 0.04em;
vertical-align: middle;
}
.fh-badge--daily {
background: var(--neutral-12);
color: var(--text-secondary);
border: 1px solid var(--neutral-20);
}
.fh-badge--intraday {
background: color-mix(in srgb, var(--warning) 10%, transparent);
color: var(--warning);
border: 1px solid color-mix(in srgb, var(--warning) 20%, transparent);
}
.fh-badge--metadata {
background: color-mix(in srgb, var(--info) 10%, transparent);
color: var(--info);
border: 1px solid color-mix(in srgb, var(--info) 20%, transparent);
}
.filter-help-table td .fh-col-code {
font-family: var(--font-mono);
font-size: var(--font-xs);
color: var(--text);
background: color-mix(in srgb, var(--black) 20%, transparent);
padding: var(--space-2xs) var(--space-xs-plus);
border-radius: var(--radius-sm);
border: 1px solid var(--overlay-2);
cursor: pointer;
transition: all 0.12s ease;
}
.filter-help-table td .fh-col-code:hover {
color: var(--text-primary);
background: var(--overlay-3);
border-color: var(--overlay-4);
}
/* ββ Filter Help Dialog β Tab-free single-page layout ββββββ */
.fh-nav {
display: flex;
flex-wrap: wrap;
gap: var(--space-xs);
padding: var(--space-sm) var(--space-lg);
background: color-mix(in srgb, var(--black) 18%, transparent);
border-bottom: 1px solid var(--overlay-2);
flex-shrink: 0;
}
.fh-nav-link {
font-size: var(--font-xs);
font-weight: 700;
text-transform: uppercase;
letter-spacing: 0.06em;
color: var(--text-muted);
text-decoration: none;
padding: var(--space-xs) 10px;
border-radius: var(--radius-round);
border: 1px solid transparent;
transition: all var(--transition-base);
white-space: nowrap;
}
.fh-nav-link:hover {
color: var(--text-primary);
background: var(--overlay-3);
border-color: var(--overlay-4);
}
.fh-block {
margin-bottom: var(--space-lg);
padding-bottom: var(--space-md);
border-bottom: 1px solid var(--overlay-2);
scroll-margin-top: var(--space-lg);
}
.fh-block:last-child {
border-bottom: none;
margin-bottom: 0;
}
.fh-h2 {
margin: 0 0 var(--space-md);
font-size: var(--font-md);
font-weight: 700;
color: var(--text-primary);
letter-spacing: -0.01em;
}
.fh-h3 {
margin: var(--space-lg) 0 var(--space-sm);
font-size: var(--font-sm);
font-weight: 700;
color: var(--text-secondary);
text-transform: uppercase;
letter-spacing: 0.06em;
}
.fh-h4 {
margin: 0 0 var(--space-sm);
font-size: var(--font-xs);
font-weight: 700;
color: var(--text-primary);
text-transform: uppercase;
letter-spacing: 0.08em;
opacity: 0.9;
}
.fh-list {
margin: 0 0 var(--space-sm);
padding-left: var(--space-lg);
}
.fh-list li {
font-size: var(--font-xs);
color: var(--text-secondary);
line-height: 1.8;
margin-bottom: var(--space-xs);
}
.fh-k {
font-weight: 700;
color: var(--text-primary);
}
.fh-lead {
color: var(--text-secondary);
}
.fh-muted {
color: var(--text-muted);
}
.fh-mt-sm {
margin-top: var(--space-sm);
}
.fh-tier {
margin: var(--space-lg) 0 var(--space-xs);
font-size: var(--font-sm);
font-weight: 700;
color: var(--text-primary);
letter-spacing: 0.02em;
}
.fh-tier-hint {
margin: 0 0 var(--space-sm);
}
.fh-kitchen {
font-family: var(--font-mono);
font-size: var(--font-xs);
background: color-mix(in srgb, var(--black) 25%, transparent);
border: 1px solid var(--overlay-2);
border-radius: var(--radius-md);
padding: var(--space-md);
color: var(--accent);
line-height: 1.7;
word-break: break-all;
cursor: pointer;
transition: all var(--transition-base);
}
.fh-kitchen:hover {
border-color: var(--overlay-4);
background: color-mix(in srgb, var(--black) 35%, transparent);
}
.fh-breakdown {
margin: var(--space-sm) 0 0;
padding: 0;
display: grid;
grid-template-columns: auto 1fr;
gap: var(--space-xs) var(--space-md);
}
.fh-breakdown dt {
font-family: var(--font-mono);
font-size: var(--font-xs);
font-weight: 700;
color: var(--accent);
white-space: nowrap;
}
.fh-breakdown dd {
margin: 0;
font-size: var(--font-xs);
color: var(--text-secondary);
line-height: 1.6;
}
.filter-help-table td.fh-success {
color: var(--success);
font-weight: 600;
}
.fh-warning {
color: var(--warning);
}
.filter-help-table td.fh-danger,
.filter-help-text.fh-danger {
color: var(--danger);
font-weight: 600;
}
/* ββ Premium Search Bar Style ββ */
.fh-search-container {
display: flex;
align-items: center;
padding: var(--space-sm) var(--space-lg);
background: color-mix(in srgb, var(--black) 20%, transparent);
border-bottom: 1px solid var(--overlay-2);
position: relative;
gap: var(--space-sm);
}
.fh-search-icon {
color: var(--text-muted);
flex-shrink: 0;
transition: color var(--transition-base);
}
#fh-search-input {
flex: 1;
background: transparent;
border: none;
outline: none;
color: var(--text-primary);
font-family: inherit;
font-size: var(--font-sm);
padding: var(--space-xs) 0;
}
#fh-search-input:focus-visible {
outline: var(--radius-sm) solid var(--accent);
outline-offset: var(--radius-sm);
}
#fh-search-input::placeholder {
color: var(--text-muted);
opacity: 0.5;
}
#fh-search-input:focus ~ .fh-search-icon {
color: var(--text-primary);
}
#fh-search-clear {
background: transparent;
border: none;
color: var(--text-muted);
font-size: var(--font-lg);
cursor: pointer;
padding: var(--space-xs);
line-height: 1;
border-radius: var(--radius-round);
transition: all 0.12s ease;
}
#fh-search-clear:hover {
color: var(--text-primary);
background: var(--overlay-3);
}
/* ββ Collapsible sections ββ */
.fh-section {
border: 1px solid var(--overlay-2);
border-radius: var(--radius-md);
margin-bottom: var(--space-sm);
overflow: hidden;
background: var(--overlay-1);
transition: all var(--transition-base);
}
.fh-section:hover {
border-color: var(--overlay-4);
background: var(--overlay-2);
}
.fh-section-toggle {
display: flex;
align-items: center;
gap: var(--space-md);
width: 100%;
padding: var(--space-sm) var(--space-md);
background: none;
border: none;
cursor: pointer;
color: var(--text-primary);
font-size: var(--font-sm);
font-weight: 600;
text-align: left;
transition: background var(--transition-fast);
}
.fh-section-toggle:hover {
background: var(--overlay-1);
}
.fh-section-arrow {
font-size: var(--font-xs);
color: var(--text-muted);
width: 14px;
flex-shrink: 0;
transition: transform var(--transition-base);
}
.fh-section-title {
flex: 1;
}
.fh-section-title code {
background: color-mix(in srgb, var(--black) 20%, transparent);
padding: var(--space-2xs) var(--space-xs-plus);
border-radius: var(--radius-sm);
font-size: var(--font-xs);
color: var(--text-primary);
}
.fh-section-body {
padding: var(--space-xs) var(--space-md) var(--space-md);
border-top: 1px solid var(--overlay-2);
background: color-mix(in srgb, var(--black) 10%, transparent);
animation: slideDownFade 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.fh-section-body > *:first-child {
margin-top: var(--space-sm);
}
/* ββ Clickable code expressions ββ */
code.fh-click {
font-family: var(--font-mono);
font-size: var(--font-xs);
background: color-mix(in srgb, var(--black) 20%, transparent);
padding: var(--space-sm) var(--space-md);
border-radius: var(--radius-md);
border: 1px solid var(--overlay-2);
color: var(--success);
display: block;
line-height: 1.5;
word-break: break-all;
cursor: pointer;
position: relative;
transition: all var(--transition-base);
}
code.fh-click::after {
content: "π Load into scanner";
position: absolute;
right: var(--space-md);
top: 50%;
transform: translateY(-50%);
font-family: var(--font-sans);
font-size: var(--font-xs);
font-weight: 700;
color: var(--text-muted);
opacity: 0;
transition: all var(--transition-base);
}
code.fh-click:hover {
background: color-mix(in srgb, var(--positive) 8%, transparent);
color: var(--success-hover);
border-color: color-mix(in srgb, var(--positive) 30%, transparent);
padding-right: 140px;
}
code.fh-click:hover::after {
opacity: 1;
color: var(--success-hover);
}
code.fh-click:active {
transform: scale(0.99);
}
/* ββ Preset cards ββ */
.fh-preset-card {
padding: var(--space-md);
border: 1px solid var(--overlay-2);
border-radius: var(--radius-md);
margin-bottom: var(--space-sm);
cursor: pointer;
background: var(--overlay-1);
position: relative;
transition: all var(--transition-base);
}
.fh-preset-card::after {
content: "π Load Preset";
position: absolute;
right: var(--space-md);
top: 50%;
transform: translateY(-50%);
font-size: var(--font-xs);
font-weight: 700;
color: var(--text-muted);
opacity: 0;
transition: all var(--transition-base);
}
.fh-preset-card:hover {
background: var(--overlay-2);
border-color: var(--overlay-4);
padding-right: 120px;
}
.fh-preset-card:hover::after {
opacity: 1;
}
.fh-preset-name {
font-weight: 600;
font-size: var(--font-sm);
color: var(--text-primary);
}
.fh-preset-expr {
margin-top: var(--space-xs);
}
.fh-preset-expr code {
font-family: var(--font-mono);
font-size: var(--font-xs);
color: var(--text-muted);
background: none;
border: none;
padding: 0;
}
.fh-preset-hint {
font-size: var(--font-xs);
color: var(--text-dim);
margin-top: var(--space-xs);
}
.fh-example-row {
margin-bottom: var(--space-md);
}
.fh-example-row:last-child {
margin-bottom: 0;
}
@media (width <= 480px) {
.filter-help-content {
width: 100%;
max-width: 100vw;
max-height: var(--viewport-h);
border-radius: var(--radius-none);
border: none;
}
.fh-search-container {
padding: var(--space-sm);
}
.fh-nav {
padding: var(--space-sm);
}
code.fh-click {
padding: var(--space-sm);
}
code.fh-click::after {
display: none;
}
code.fh-click:hover {
padding-right: var(--space-sm);
}
}
/* ββββββββββββββββββββββββββββββββββββββββββββ
Responsive β Calendar View y otros layouts
ββββββββββββββββββββββββββββββββββββββββββββ */
/* Tablet: narrower sidebar, stackable layout */
@media (width <= 1024px) and (width >= 901px) {
.calendar-layout {
--calendar-sidebar-width: var(--aside-width);
}
/* Tablet: the chart is the primary read, so give it the larger share of
the sidebar's height and let the list scroll in what is left. Same
62/38 as the base tier β one split to reason about, not three. */
.sidebar-chart-container {
flex: 1 1 62%;
min-height: var(--split-card-min-mobile);
}
.sidebar-list-container {
flex: 1 1 38%;
min-height: 150px;
}
.calendar-nav-header h2 {
font-size: var(--font-md);
}
}
/* Tablet chico: sidebar angosta */
/* intentional breakpoint: a width tier, not a column-count change β the
901β1024 tier above keeps the wider sidebar for iPad landscape. */
@media (width <= 900px) and (width >= 769px) {
.calendar-layout {
--calendar-sidebar-width: 260px;
}
/* Narrow but still side-by-side: keep the roomier of the share and the
old 240px floor, expressed as the one token the seam now writes. */
.calendar-sidebar {
--sidebar-chart-height: max(62%, 240px);
}
.calendar-nav-header h2 {
font-size: var(--font-sm);
}
}
/* Mobile: todo apilado vertical */
@media (width <= 768px) {
/* Stacked natural flow: the desktop workspace reserves a full viewport of
height, which a column of sidebar + calendar has no use for on a phone. */
.scan-workspace {
display: block;
height: auto;
}
.calendar-view {
height: auto;
min-height: auto;
}
.calendar-layout {
flex-direction: column;
height: auto;
/* Stacked: the sidebar takes the row's full width and the seam the
handle rides on does not exist, so the property is the whole
width and the handle is hidden below. */
--calendar-sidebar-width: 100%;
}
.calendar-sidebar {
height: auto;
/* Stacked, the sidebar's height is content-driven, so a percentage
basis would resolve to `auto` and hand the chart back to its
content. An explicit token keeps the two 320px panels and leaves the
seam between them draggable. */
--sidebar-chart-height: 320px;
}
/* Stacked: there is no width seam to drag. splitter.ts also stops applying
a stored width here, so the rule above is the one that wins. The row seam
stays: the sidebar is still two panels stacked, and a touch drag on it
works. */
.calendar-resize-handle {
display: none;
}
.sidebar-chart-container {
flex: 0 0 var(--sidebar-chart-height);
}
.sidebar-list-container {
flex: none;
height: 320px;
}
/* Stacked, the workspace's height is content-driven too, so the control
panel's seam would chase its own ceiling. */
#scan-control-resize {
display: none;
}
.calendar-main {
min-height: var(--split-card-min);
}
.calendar-grid {
grid-template-columns: repeat(5, 1fr);
grid-template-rows: auto;
grid-auto-rows: minmax(min(60px, 100%), 1fr);
min-height: 300px;
}
.cal-day {
padding: var(--space-2xs);
}
/* The day number is the shared .day-num (common.css), not a .cal-day-num
that no markup ever renders. */
.cal-day .day-num {
font-size: var(--font-xs);
}
.cal-stock {
font-size: var(--font-xs);
padding: 1px var(--space-2xs);
}
.cal-stock-symbol {
font-size: var(--font-xs);
}
.cal-stock-price,
.cal-stock-pct {
min-width: var(--spinner-size);
font-size: var(--font-xs);
}
.cal-day-count {
font-size: var(--font-xs);
padding: 1px 3px;
min-width: var(--space-sm-plus);
top: 1px;
right: var(--radius-sm);
}
.calendar-nav-header {
padding: var(--space-sm);
}
.calendar-nav-header h2 {
font-size: var(--font-sm);
}
.sidebar-chart-controls {
flex-wrap: wrap;
}
.split-grid {
grid-template-columns: repeat(auto-fill, minmax(min(var(--split-card-min-mobile), 100%), 1fr));
}
}
/* Muy chico: calendar header controls compactos */
@media (width <= 480px) {
.calendar-grid {
grid-template-columns: repeat(5, 1fr);
grid-auto-rows: minmax(min(var(--touch-min), 100%), 1fr);
}
.cal-day {
padding: 1px;
min-height: 56px;
}
/* Touch targets: bump sub-44px controls on phones. `.cal-nav-btn` is
shared with the trades calendar and so is sized by the one rule in
common.css, which this page's duplicate used to contradict at 40px --
below the app's own --touch-min. */
.date-picker-input {
height: var(--trades-layout-offset);
}
/* Hiding the whole row left the calendar counting tickers without
saying which ones β the main information of the view. Keep the
symbol and drop the numbers that cannot fit a 62px cell. */
.cal-stock-price,
.cal-stock-pct,
.cal-stock-vol {
display: none;
}
.cal-day-count {
display: flex;
}
.split-grid {
grid-template-columns: 1fr;
}
.presets-panel {
grid-template-columns: 1fr;
}
.filter-help-content {
max-width: 100vw;
max-height: var(--viewport-h);
border-radius: var(--radius-none);
}
.filter-help-header {
padding: var(--space-sm);
}
.filter-help-body {
padding: var(--space-sm);
}
}
/* ββ Scan toolbar: one calm row ββ
Filter, help, Run and status, the view switch, then Advanced at the right
end. The row wraps on narrow widths instead of scrolling sideways. */
.scan-toolbar {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: var(--space-sm);
padding: var(--space-sm) var(--space-md);
}
.scan-toolbar__filter {
flex: 1 1 24rem;
min-width: 12rem;
min-height: 2.25rem;
height: 2.25rem;
resize: none;
overflow: hidden;
white-space: nowrap;
font-family: var(--font-mono);
transition: height var(--transition-fast);
}
.scan-toolbar__filter:focus {
height: 6rem;
white-space: pre-wrap;
overflow: auto;
}
.scan-toolbar__status {
white-space: nowrap;
}
.scan-toolbar__advanced {
margin-left: auto;
flex-shrink: 0;
}
/* The Advanced popover hangs below the toolbar; the toolbar must not clip it. */
.scan-workspace > .scan-toolbar {
overflow: visible;
}
/* Touch screens: the sidebar mode buttons are at least 36px tall. */
@media (pointer: coarse) {
.scan-workspace [id^="sidebar-mode-"],
.scan-workspace [id^="sidebar-watchlist-btn"] {
min-height: var(--touch-target-size);
min-width: var(--touch-target-size);
}
}
@media (width <= 600px) {
.scan-workspace [id^="sidebar-mode-"] {
min-height: var(--touch-target-size);
}
}
/* ββ Phone: chart first, then the day's stocks in a scrolling table ββ
The day chart is a fixed 36% of the viewport (--scan-chart-phone-height), so the day list starts above
the fold instead of under a full-height chart. The table scrolls inside its
own box (#sidebar-list), keeps its columns at their natural width instead of
squeezing them, and pins the symbol column so the rest can scroll under it
without losing the row's name. */
@media (width <= 480px) {
.sidebar-chart-container {
flex: 0 0 var(--scan-chart-phone-height);
}
#sidebar-list {
overflow: auto;
overscroll-behavior: contain;
}
.sidebar-stock-table {
width: max-content;
min-width: 100%;
}
.sidebar-stock-table th:first-child,
.sidebar-stock-table td:first-child {
position: sticky;
left: 0;
z-index: var(--z-10);
background: var(--surface-1);
}
}
/* ========================================
LT Scanner - Section-Specific Styles
======================================== */
/*
NOTE: Many base components defined in common.css:
- .results-grid (base)
- .control-panel (override below for scanner)
- .input-row, .filter-row
- .empty-state
- .tf-selector, .tf-btn
- .view-toggle, .view-btn
*/
/* Results grid - use unified breakpoints from common.css */
/* Base .results-grid defined in common.css */
.results-grid.hidden {
display: none;
}
/* Preset Modal Styles: .preset-info/.preset-actions live in common.css
(shared with the backtest alert-config manager). */
.status-inline {
font-size: var(--font-xs);
color: var(--text-muted);
margin-left: var(--space-sm);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
max-width: 300px;
}
@media (width <= 768px) {
.status-inline {
max-width: 120px;
}
}
/* Run + status side by side above the phone tier. Stacked, the group is
taller than the filter textarea next to it (58px vs 48px) and sets the
panel's first-row height for the whole page. The status truncates instead
of growing, so a long "[1D] Found 300 results (capped)" cannot widen the
row into a wrap. Left stacked on phones: there the textarea's 150px floor
plus the help button already exceed the row, so inlining would push the
group onto a second line and make the panel taller, not shorter.
Scoped through .control-panel__main so it outranks the .u-stack utility
the markup carries, instead of depending on stylesheet order. */
@media (width > 768px) {
.control-panel__main .control-panel__run {
display: flex;
flex-direction: row;
align-items: center;
gap: var(--space-sm);
min-width: 0;
}
.control-panel__main .control-panel__run .status-inline {
margin-left: 0;
min-width: 0;
}
}
/* .empty-state β defined in common.css */
/* Filter Controls */
/* Geometry comes from .select-field--sm; only the transparent outline at rest
is this filter's, so the focus ring does not flash on first click. */
#filter-select {
outline: var(--radius-sm) solid transparent;
outline-offset: var(--radius-sm);
}
#filter-select:focus {
outline: var(--radius-sm) solid var(--accent);
outline-offset: var(--radius-sm);
border-color: var(--accent);
}
/* .btn-help-icon β promoted to common.css: the reports page carries the same
"?" next to its filter and does not load this stylesheet, so the button
rendered unstyled there. The mobile size override is in the shared block. */
/* Date picker */
.date-range-picker {
display: flex;
align-items: center;
gap: var(--space-xs);
}
.date-picker-input {
background: var(--bg);
color: var(--text);
border: 1px solid var(--border);
border-radius: var(--radius-md);
padding: var(--space-xs) var(--space-sm);
font-size: var(--font-sm);