/* FinEdg equity research screener — page layout.
   Built entirely on the shared Play tokens (--p-*), so this screen inherits the
   site theme, the light/dark switch and the PlayInter face instead of carrying a
   palette of its own. No colour is defined here outside a token; the only fixed
   values are focus rings, which must stay visible in both themes. */

.eq { max-width: 1320px; padding: 26px 24px 80px; }

/* Hero -------------------------------------------------------------------- */
.eq-hero { padding: 22px 0 0; }
.eq-eyebrow { margin: 0 0 12px; font-size: 11px; font-weight: 600; letter-spacing: 1.6px; color: var(--p-lavender); }
.eq-hero h1 { margin: 0 0 14px; font-size: 38px; line-height: 1.1; letter-spacing: -1.2px; }
.eq-lede { margin: 0 0 12px; max-width: 730px; font-size: 15px; line-height: 1.75; color: var(--p-muted); }
.eq-disclosure { margin: 0; font-size: 11px; color: var(--p-muted); }

/* Coverage strip. Same rhythm as the hub market summary so the numbers read as
   one family with the rest of the site rather than as a separate widget. */
.eq-coverage { display: flex; flex-wrap: wrap; gap: 34px; margin: 28px 0 0; padding: 20px 0; border-block: 1px solid var(--p-line); }
.eq-coverage > span { display: grid; gap: 5px; min-width: 120px; font-size: 11px; color: var(--p-muted); }
.eq-coverage b { font-size: 23px; font-weight: 600; line-height: 1.15; color: var(--p-ink); font-variant-numeric: tabular-nums; }

.eq-state { margin: 26px 0 0; padding: 22px 24px; border: 1px solid var(--p-line); border-radius: 14px; background: var(--p-surface); font-size: 13px; color: var(--p-muted); }
.eq-state p { margin: 0 0 8px; }
.eq-state p:last-child { margin-bottom: 0; }

/* Filters ----------------------------------------------------------------- */
.eq-filters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 26px 0 0; padding: 22px; border: 1px solid var(--p-line); border-radius: 16px; background: var(--p-surface); }
.eq-field { min-width: 0; }
.eq-wide { grid-column: span 2; }
.eq-field label { display: block; margin-bottom: 7px; font-size: 11px; font-weight: 600; letter-spacing: .3px; color: var(--p-muted); }
.eq-field input, .eq-field select { width: 100%; min-height: 42px; padding: 10px 12px; font: inherit; font-size: 13px; color: var(--p-ink); background: var(--p-soft); border: 1px solid var(--p-line); border-radius: 9px; }
.eq-field input::placeholder { color: var(--p-muted); }
.eq-actions { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 18px; }
.eq-check { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; color: var(--p-ink); cursor: pointer; }
.eq-check input { width: 17px; height: 17px; accent-color: var(--p-lavender); }
.eq-reset { margin-left: auto; font-size: 12px; color: var(--p-muted); }
.eq-reset:hover { color: var(--p-ink); }
.eq-button { display: inline-flex; align-items: center; justify-content: center; min-height: 42px; padding: 10px 22px; border: 0; border-radius: 9px; background: var(--p-lavender); color: #16121f; font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.eq-button:hover { filter: brightness(1.08); }
.eq-help { grid-column: 1 / -1; margin: 0; font-size: 11px; line-height: 1.7; color: var(--p-muted); }

/* Results header ---------------------------------------------------------- */
.eq-results { margin: 34px 0 0; }
.eq-results-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 20px; padding-bottom: 16px; border-bottom: 1px solid var(--p-line); }
.eq-results-head h2 { margin: 0; font-size: 20px; font-weight: 600; }
.eq-range { margin: 0; font-size: 12px; color: var(--p-muted); }
.eq-pagesize { display: flex; align-items: center; gap: 4px; margin-left: auto; font-size: 11px; color: var(--p-muted); }
.eq-pagesize span { margin-right: 4px; }
.eq-pagesize a { display: inline-flex; align-items: center; justify-content: center; min-width: 34px; min-height: 30px; padding: 4px 8px; border: 1px solid transparent; border-radius: 7px; color: var(--p-muted); font-size: 12px; }
.eq-pagesize a:hover { color: var(--p-ink); border-color: var(--p-line); }
.eq-pagesize a[aria-current="true"] { background: var(--p-soft); border-color: var(--p-line); color: var(--p-ink); font-weight: 600; }

/* Removable filter chips: one click widens the view by exactly one condition. */
.eq-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 16px 0 0; }
.eq-chips-label { font-size: 11px; letter-spacing: .3px; color: var(--p-muted); }
.eq-chip { display: inline-flex; align-items: center; gap: 9px; min-height: 32px; padding: 5px 8px 5px 13px; border: 1px solid var(--p-line); border-radius: 999px; background: var(--p-soft); color: var(--p-ink); font-size: 12px; }
.eq-chip:hover { border-color: var(--p-lavender); }
.eq-chip b { font-weight: 600; }
.eq-chip-x { display: inline-flex; align-items: center; justify-content: center; width: 20px; height: 20px; border-radius: 50%; color: var(--p-muted); font-size: 14px; line-height: 1; }
.eq-chip:hover .eq-chip-x { color: var(--p-ink); }

/* Table ------------------------------------------------------------------- */
.eq-table-wrap { margin-top: 18px; overflow-x: auto; border: 1px solid var(--p-line); border-radius: 14px; background: var(--p-surface); }
.eq-table { width: 100%; min-width: 900px; border-collapse: collapse; }
.eq-table th, .eq-table td { padding: 13px 16px; text-align: left; vertical-align: middle; }
.eq-table thead th { position: sticky; top: 0; z-index: 1; background: var(--p-surface); border-bottom: 1px solid var(--p-line); font-size: 11px; font-weight: 600; letter-spacing: .4px; color: var(--p-muted); white-space: nowrap; }
.eq-sort { display: inline-flex; align-items: center; gap: 6px; min-height: 30px; color: inherit; }
.eq-sort:hover { color: var(--p-ink); }
.eq-table thead th[aria-sort] .eq-sort { color: var(--p-ink); }
.eq-caret { font-size: 9px; color: var(--p-lavender); }
.eq-table tbody tr { border-bottom: 1px solid var(--p-line); }
.eq-table tbody tr:last-child { border-bottom: 0; }
.eq-table tbody tr:hover { background: var(--p-soft); }
.eq-table td { font-size: 13px; font-variant-numeric: tabular-nums; }
.eq-table td:first-child { min-width: 240px; }
.eq-ticker { font-size: 14px; font-weight: 600; color: var(--p-ink); }
.eq-ticker:hover { color: var(--p-lavender); }
.eq-company { display: block; max-width: 250px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 11px; color: var(--p-muted); }
.eq-venue { display: block; margin-top: 3px; font-size: 10px; letter-spacing: .8px; color: var(--p-muted); }
.eq-rank { font-weight: 600; color: var(--p-lime); }
.eq-period { display: block; }
.eq-filed { display: block; margin-top: 3px; font-size: 10px; color: var(--p-muted); }

/* Pagination -------------------------------------------------------------- */
/* The same controls sit under both presentations (table and chart cards), so a
   reader who reached the end of the chart grid is not stuck there. */
.eq-results-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 10px 18px; margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--p-line); }
.eq-results-foot .eq-pagesize { margin-left: 0; }
.eq-results-foot .eq-pager { padding: 0; margin-left: auto; }
.eq-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; padding: 22px 0 4px; }
.eq-step { display: inline-flex; align-items: center; min-height: 38px; padding: 8px 15px; border: 1px solid var(--p-line); border-radius: 9px; font-size: 12px; color: var(--p-ink); white-space: nowrap; }
.eq-step:hover { border-color: var(--p-lavender); }
.eq-off { color: var(--p-muted); opacity: .45; border-color: transparent; }
.eq-pager-list { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; margin: 0; padding: 0; list-style: none; }
.eq-num { display: inline-flex; align-items: center; justify-content: center; min-width: 38px; min-height: 38px; padding: 6px 10px; border: 1px solid transparent; border-radius: 9px; font-size: 13px; color: var(--p-muted); font-variant-numeric: tabular-nums; }
.eq-num:hover { color: var(--p-ink); border-color: var(--p-line); }
.eq-num[aria-current="page"] { background: var(--p-lavender); border-color: var(--p-lavender); color: #16121f; font-weight: 600; }
.eq-gap { display: inline-flex; align-items: center; justify-content: center; min-width: 30px; min-height: 38px; color: var(--p-muted); }

.eq-empty { padding: 52px 20px; text-align: center; color: var(--p-muted); }
.eq-empty p { margin: 0 0 20px; font-size: 14px; }

/* Explanation ------------------------------------------------------------- */
.eq-explain { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 44px; margin: 58px 0 0; padding-top: 34px; border-top: 1px solid var(--p-line); }
.eq-explain h2 { margin: 0 0 14px; font-size: 17px; }
.eq-explain p { margin: 0 0 14px; font-size: 12px; line-height: 1.85; color: var(--p-muted); }
.eq-explain a { color: var(--p-lavender); }

.eq-footer { margin-top: 46px; border-top: 1px solid var(--p-line); }
.eq-foot-wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; max-width: 1320px; margin: 0 auto; padding: 22px 24px; font-size: 11px; color: var(--p-muted); }
.eq-foot-wrap a { color: var(--p-ink); }

/* Focus. Both themes get a ring that survives on the dark surface and on white. */
.eq :focus-visible { outline: 2px solid var(--p-lavender); outline-offset: 3px; border-radius: 6px; }

@media (max-width: 1200px) {
  .eq { padding: 22px 20px 70px; }
  .eq-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .eq-hero h1 { font-size: 33px; }
}
@media (max-width: 1000px) {
  .eq-explain { grid-template-columns: minmax(0, 1fr); gap: 30px; }
  .eq-coverage { gap: 24px; }
  .eq-coverage > span { min-width: 104px; }
}
@media (max-width: 700px) {
  .eq { padding: 18px 16px 60px; }
  .eq-filters { grid-template-columns: minmax(0, 1fr); padding: 18px; }
  .eq-wide { grid-column: auto; }
  .eq-hero h1 { font-size: 27px; letter-spacing: -.6px; }
  .eq-lede { font-size: 14px; }
  .eq-coverage { gap: 18px; }
  .eq-coverage b { font-size: 19px; }
  .eq-coverage > span { min-width: 88px; }
  .eq-results-head h2 { font-size: 17px; }
  .eq-pagesize { margin-left: 0; }
  .eq-table th, .eq-table td { padding: 11px 12px; }
  .eq-table td:first-child { min-width: 190px; }
  .eq-company { max-width: 190px; }
  /* The numeric window is the compact control on phones: steps alone would make
     the bar wider than the viewport. */
  .eq-pager { gap: 10px; }
  .eq-step { flex: 1 1 100%; justify-content: center; }
  .eq-pager-list { order: -1; }
}

/* Example screens (presets). A strip of saved filter sets, each carrying the
   number of issuers its own filter returns. Deliberately styled as links, not as
   buttons: they navigate to a URL, so a reader can open one in a new tab and can
   see where it goes before clicking. */
.eq-presets { margin: 26px 0 0; }
.eq-presets h2 { margin: 0 0 4px; font-size: 15px; }
.eq-preset-list { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 12px 0 0; padding: 0; }
.eq-preset-list a { display: grid; gap: 6px; height: 100%; padding: 14px 15px; border: 1px solid var(--p-line); border-radius: 12px; background: var(--p-surface); }
.eq-preset-list a:hover { border-color: var(--p-lavender); }
.eq-preset-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.eq-preset-top b { font-size: 13px; }
.eq-preset-count { font-size: 15px; font-weight: 600; color: var(--p-lavender); font-variant-numeric: tabular-nums; }
.eq-preset-list small { font-size: 11px; line-height: 1.6; color: var(--p-muted); }

/* Per-company page. The five headline figures reuse the coverage-strip rhythm so
   a number read in the table and the same number read here look like one family.
   NOTE: the page wrapper must NOT be called .eq-company — that class is the
   table's company-name cell (max-width + ellipsis + nowrap below), and reusing it
   squeezed the whole page into 250px with clipped, overlapping text. */
.eq-stock .eq-stock-ticker { margin: 6px 0 10px; font-size: 15px; font-weight: 600; letter-spacing: 1.4px; color: var(--p-lavender); }
.eq-stock-facts { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1px; margin: 26px 0 0; background: var(--p-line); border: 1px solid var(--p-line); border-radius: 14px; overflow: hidden; }
.eq-stock-facts > div { display: grid; gap: 6px; align-content: start; padding: 18px 16px; background: var(--p-surface); }
.eq-stock-facts span { font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--p-muted); }
.eq-stock-facts b { font-size: 24px; font-weight: 600; letter-spacing: -.6px; font-variant-numeric: tabular-nums; }
.eq-stock-facts small { font-size: 10px; color: var(--p-muted); }
.eq-stock-meta { margin: 22px 0 0; }
.eq-stock-meta dl { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px 26px; margin: 0 0 16px; }
.eq-stock-meta dt { font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--p-muted); }
.eq-stock-meta dd { margin: 5px 0 0; font-size: 14px; font-variant-numeric: tabular-nums; }

@media (max-width: 1200px) {
  .eq-preset-list { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .eq-stock-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .eq-preset-list { grid-template-columns: minmax(0, 1fr); }
  .eq-stock-facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .eq-stock-facts b { font-size: 20px; }
}

/* Presentation switch (list vs charts) and the period switch that belongs to the
   chart view. Rendered as links, not as JS controls: the mode lives in the URL,
   so a chart view can be shared, bookmarked and opened in a new tab. */
.eq-views { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin: 26px 0 0; }
.eq-view-switch, .eq-range-switch { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
/* The period and drawing switches read as one control row, not as two toolbars
   fighting over the right edge. */
.eq-chart-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.eq-view-switch a, .eq-range-switch a { padding: 8px 13px; border: 1px solid transparent; border-radius: 7px; font-size: 12px; color: var(--p-muted); }
.eq-view-switch a:hover, .eq-range-switch a:hover { color: var(--p-ink); }
.eq-view-switch a[aria-current="true"], .eq-range-switch a[aria-current="true"] { background: var(--p-soft); border-color: var(--p-line); color: var(--p-ink); }
.eq-range-switch > span { margin-right: 6px; font-size: 10px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--p-muted); }
.eq-range-note { margin: 18px 0 0; font-size: 11px; color: var(--p-muted); }

/* Chart cards: the same result set as the table, drawn per company. */
.eq-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 14px 0 0; }
.eq-card { display: grid; gap: 10px; align-content: start; padding: 16px; border: 1px solid var(--p-line); border-radius: 14px; background: var(--p-surface); min-width: 0; }
.eq-card header { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; min-width: 0; }
.eq-card-venue { flex: 0 0 auto; font-size: 10px; letter-spacing: .8px; color: var(--p-muted); }
.eq-card-company { margin: 0; font-size: 14px; font-weight: 600; min-width: 0; }
.eq-card-company a { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eq-card-chart { height: 64px; }
.eq-card-chart svg { width: 100%; height: 100%; display: block; }
.eq-card-chart[data-dir="up"] polyline { stroke: var(--p-lime); stroke-width: 1.8; }
.eq-card-chart[data-dir="down"] polyline { stroke: #d98b8b; stroke-width: 1.8; }

/* Candlesticks. The wick is a line, the body a rect, and direction is carried
   per SESSION (.up/.down on the mark itself, not on the chart): one window can
   contain both, and painting the whole series one colour would hide that. */
.eq-candles .eq-w { stroke-width: 1; }
.eq-candles .eq-b { stroke: none; }
.eq-candles .eq-w.up, .eq-candles .eq-b.up { stroke: var(--p-lime); fill: var(--p-lime); }
.eq-candles .eq-w.down, .eq-candles .eq-b.down { stroke: #d98b8b; fill: #d98b8b; }
.eq-card-figures { display: flex; align-items: baseline; gap: 10px; }
.eq-card-figures strong { font-size: 17px; font-weight: 600; letter-spacing: -.4px; font-variant-numeric: tabular-nums; }
.eq-card-figures small { margin-left: auto; font-size: 10px; color: var(--p-muted); }
.eq-card-change { font-size: 12px; font-variant-numeric: tabular-nums; }
.eq-card-change.up { color: var(--p-lime); }
.eq-card-change.down { color: #d98b8b; }
.eq-card-note, .eq-card-nodata { margin: 0; font-size: 10px; color: var(--p-muted); }
.eq-card-nodata { padding: 22px 0; text-align: center; border: 1px dashed var(--p-line); border-radius: 10px; }
/* The metric strip is a fixed 3-column grid, not a wrapping flex row: at card
   width the three labels wrap onto their own lines, and a flex row that reflowed
   per card made two cards of the same row read differently. */
.eq-card-facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; padding-top: 10px; border-top: 1px solid var(--p-line); }
.eq-card-facts > div { display: grid; gap: 3px; min-width: 0; }
.eq-card-facts dt { font-size: 9px; letter-spacing: 1px; text-transform: uppercase; color: var(--p-muted); }
.eq-card-facts dd { margin: 0; font-size: 13px; font-variant-numeric: tabular-nums; }

/* Company page chart. */
.eq-chart { margin: 26px 0 0; padding: 20px; border: 1px solid var(--p-line); border-radius: 16px; background: var(--p-surface); }
.eq-chart-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; }
.eq-chart-head h2 { margin: 0; font-size: 15px; }
.eq-chart-figures { display: flex; align-items: baseline; gap: 10px; margin: 8px 0 0; }
.eq-chart-figures strong { font-size: 22px; font-weight: 600; letter-spacing: -.6px; font-variant-numeric: tabular-nums; }
.eq-chart-figures small { font-size: 10px; color: var(--p-muted); }
.eq-chart-plot { height: 200px; margin: 16px 0 12px; }
.eq-chart-plot svg { width: 100%; height: 100%; display: block; }
.eq-chart-plot[data-dir="up"] polyline { stroke: var(--p-lime); stroke-width: 1.8; }
.eq-chart-plot[data-dir="down"] polyline { stroke: #d98b8b; stroke-width: 1.8; }
.eq-chart .eq-help { margin: 6px 0 0; font-size: 11px; line-height: 1.7; color: var(--p-muted); }

@media (max-width: 1200px) {
  .eq-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1400px) {
  .eq-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (min-width: 1000px) and (max-width: 1399px) {
  .eq-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  .eq-cards { grid-template-columns: minmax(0, 1fr); }
  .eq-chart { padding: 16px; }
  .eq-chart-plot { height: 150px; }
  .eq-chart-head { align-items: flex-start; }
}
