/* The forecast screener (screener.js, docs/screener.md). It follows the workspace's own
   sheets (workbench.css, then expressive.css) and their tokens: the board's market sheet for
   the table, pill controls, rounded panes, monospace figures. Brand blue marks the selection
   and the history line, the chart's forecast ink marks the forecast, the ticker colour marks
   tickers and class tags, green and red mark direction only. */
#viewScreener [hidden] { display: none !important; }
.scr-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
/* The method link ends on the content's right edge, like every page action. */
.workbench .scr-head .text-button { padding-right: 0; }
.workbench .scr-scopes { display: flex; flex-wrap: wrap; overflow: visible; padding: 0; margin: 0 0 10px; }
.scr-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin: 0 0 10px; }
.scr-tools .monitor-search { flex: 1 1 220px; }
.scr-check { display: inline-flex; align-items: center; gap: 6px; min-height: 28px; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: var(--label); text-transform: uppercase; cursor: pointer; }
.scr-check input, .scr-menu input[type=checkbox], .scr-picks input { accent-color: var(--brand); }
.scr-facets { display: flex; flex-wrap: wrap; gap: 6px; }
.scr-facet { position: relative; }
.scr-facet > summary { display: flex; align-items: center; gap: 6px; min-height: 28px; padding: 0 12px; border-radius: var(--pill); background: var(--surface-2); color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: 0.03em; cursor: pointer; list-style: none; }
.scr-facet > summary::-webkit-details-marker { display: none; }
.scr-facet > summary::after { content: "▾"; color: var(--muted); }
.scr-facet > summary:hover, .scr-facet[open] > summary { color: var(--ink); background: var(--surface-hover); }
.scr-facet[open] > summary { box-shadow: inset 0 0 0 1px var(--brand); }
.scr-count { min-width: 16px; padding: 0 5px; border-radius: var(--pill); color: var(--brand-ink); background: var(--brand); font: 600 11px var(--mono); text-align: center; }
.scr-menu { position: absolute; z-index: 6; top: calc(100% + 4px); left: 0; width: 280px; max-width: calc(100vw - 32px); max-height: 336px; overflow: auto; background: var(--surface); border: 1px solid var(--rule-strong); border-radius: var(--r); box-shadow: var(--shadow); scrollbar-width: thin; }
.scr-menu ul, .scr-unranked ul, .scr-chips { list-style: none; margin: 0; padding: 0; }
.scr-menu label, .scr-picks label { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 8px; min-height: 32px; padding: 0 12px; border-bottom: 1px solid var(--rule-soft); font-size: 12.5px; cursor: pointer; }
.scr-menu label:hover, .scr-picks label:hover { background: var(--surface-hover); }
.scr-n { color: var(--muted); font: 11px var(--mono); font-variant-numeric: tabular-nums; }
.workbench .scr-find { width: 100%; height: 32px; padding: 0 12px; border: 0; border-bottom: 1px solid var(--rule); border-radius: 0; outline: none; color: var(--ink); background: var(--surface-2); font-size: 12px; }
.workbench .scr-find:focus { box-shadow: inset 0 -2px 0 var(--brand); }
.scr-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 8px 0 0; }
.scr-chips li { display: inline-flex; align-items: center; }
.scr-chips li > span { padding: 2px 4px 2px 10px; border-radius: var(--pill) 0 0 var(--pill); background: var(--brand-wash); color: var(--ink); font-size: 11px; font-weight: 500; }
.scr-chips li > button[data-scr-drop] { min-width: 22px; padding: 2px 8px 2px 6px; border: 0; border-radius: 0 var(--pill) var(--pill) 0; background: var(--brand-wash); color: var(--ink); font-size: 11px; font-weight: 600; cursor: pointer; }
.scr-chips li > button[data-scr-drop]:hover { color: var(--brand-ink); background: var(--brand); }
.scr-coverage { margin: 10px 0; color: var(--muted); font: 11px/1.6 var(--mono); }
.scr-coverage strong { color: var(--ink); }
.scr-notice { color: var(--ink); }
.scr-loading { margin: 0; padding: 24px 16px; border: 1px solid var(--rule); border-radius: var(--r-lg); color: var(--muted); font-size: 12.5px; }
.workbench .market-sheet .scr-table { min-width: 940px; }
.workbench .market-sheet .scr-table > thead th { padding-inline: 8px; line-height: 1.2; white-space: normal; }
.workbench .market-sheet .scr-table td { height: 32px; padding-inline: 8px; white-space: nowrap; }
.workbench .market-sheet .scr-table td:first-child { width: auto; min-width: 210px; max-width: 300px; white-space: normal; }
.workbench .market-sheet .scr-table td small { display: block; margin-left: 0; white-space: nowrap; }
/* A value breaks only between its figure and its unit; the unit's qualifier
   ("(exchange quote)") is one small line of its own. */
.workbench .market-sheet .scr-table td:is(:nth-child(3), :nth-child(4)) { padding-inline: 6px; white-space: normal; text-wrap: balance; }
.workbench .market-sheet .scr-table td small.scr-qualifier { font-size: 10px; }
.workbench .market-sheet .scr-table :is(td, th).scr-trend { width: 104px; padding-inline: 4px; }
.scr-name a { display: inline-grid; grid-template-columns: auto; vertical-align: middle; max-width: calc(100% - 44px); text-decoration: none; }
.scr-name .code { color: var(--code); font: 600 12px var(--mono); }
.scr-name .nm { overflow: hidden; color: var(--ink-2); font-size: 12px; font-weight: 400; text-overflow: ellipsis; white-space: nowrap; }
.workbench .scr-class { margin-left: 8px; padding: 0 7px; color: var(--code); font-size: 10px; vertical-align: middle; }
.scr-flag { margin-left: 6px; padding: 0 6px; border: 1px solid var(--rule-strong); border-radius: var(--pill); color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; vertical-align: middle; }
.workbench .scr-table td.scr-forecast { color: var(--chart-fc); font-weight: 600; }
.scr-none { color: var(--muted); font-size: 11px; }
.scr-band, .scr-evidence { font-size: 12px; }
.workbench .scr-evidence .tag { font-weight: 500; white-space: nowrap; }
.scr-spark { display: block; overflow: visible; }
.scr-spark polyline { fill: none; stroke-width: 1.25; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.scr-spark .scr-hist { stroke: var(--chart-line); }
.scr-spark .scr-fc { stroke: var(--chart-fc); stroke-dasharray: 3 2; }
.workbench .scr-table tr.is-active { background: var(--surface-hover); box-shadow: inset 3px 0 var(--brand); }
#scrMore { margin-top: 10px; }
.scr-state { padding: 24px 20px; border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--surface); }
.scr-state h2 { margin: 0 0 6px; color: var(--ink); font-size: 15px; font-weight: 600; }
.scr-state p { margin: 0 0 12px; max-width: 70ch; color: var(--muted); font-size: 12.5px; }
.scr-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.scr-unranked { margin-top: 16px; border: 1px solid var(--rule); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); }
.scr-unranked h2 { margin: 0; padding: 10px 16px 0; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: var(--label); text-transform: uppercase; }
.scr-unranked > p { margin: 0; padding: 4px 16px 10px; color: var(--muted); }
/* The copy of a requested series an agent carries into the list (agents.js). */
.scr-ghost { display: inline-flex; align-items: center; gap: 10px; padding: 6px 8px; font-size: 12.5px; color: var(--ink); white-space: nowrap; }
.scr-unranked li { display: grid; grid-template-columns: minmax(110px, auto) 1fr auto auto; align-items: center; gap: 4px 12px; min-height: 36px; padding: 4px 16px; border-top: 1px solid var(--rule-soft); font-size: 12.5px; }
.scr-unranked .code { color: var(--code); font: 600 12px var(--mono); }
.scr-reason { color: var(--muted); font: 11px var(--mono); }
.scr-request-status:empty { display: none; }
.scr-request-status { margin: 0; padding: 8px 16px; border-top: 1px solid var(--rule-soft); font-size: 12.5px; }
.scr-dialog { padding: 0; width: min(600px, calc(100% - 32px)); max-height: 86dvh; color: var(--ink); background: var(--surface); border: 1px solid var(--rule-strong); border-radius: var(--r-lg); box-shadow: var(--shadow); }
.scr-dialog::backdrop { background: rgba(5, 6, 8, 0.6); }
.scr-dialog[open] { display: flex; flex-direction: column; }
.scr-dialog h2 { margin: 0; font-size: 14px; font-weight: 600; }
.scr-dialog-note { margin: 0; padding: 10px 16px; border-bottom: 1px solid var(--rule-soft); color: var(--muted); font-size: 12px; }
.scr-dialog-body { overflow: auto; min-height: 0; scrollbar-width: thin; }
.scr-dialog fieldset { margin: 0; padding: 0; border: 0; border-bottom: 1px solid var(--rule); min-width: 0; }
.scr-dialog legend { float: left; width: 100%; padding: 8px 16px; background: var(--surface-2); border-bottom: 1px solid var(--rule-soft); color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: var(--label); text-transform: uppercase; }
.scr-picks { clear: both; display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.scr-countries { max-height: 240px; overflow: auto; scrollbar-width: thin; }
.scr-dialog .scr-find { clear: both; display: block; }
.scr-dialog-foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; padding: 10px 16px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 12px; }
.scr-dialog-foot .btn { margin-left: auto; }
.scr-method { margin: 0; overflow: auto; font-size: 12.5px; }
.scr-method dt { padding: 10px 16px 0; color: var(--muted); font-size: 11px; font-weight: 600; letter-spacing: var(--label); text-transform: uppercase; }
.scr-method dd { margin: 0; padding: 2px 16px 10px; border-bottom: 1px solid var(--rule-soft); color: var(--ink-2); line-height: 1.5; }
@media (pointer: coarse) { .scr-facet > summary, .scr-menu label, .scr-picks label { min-height: 44px; } }
@media (max-width: 720px) {
  /* A list: each series is one block, every figure labelled, nothing scrolls sideways. */
  .scr-sort { flex: 1 1 100%; }
  .scr-sort select { flex: 1; min-width: 0; }
  .workbench .scr-tools .ranges { flex: 1 1 100%; }
  .scr-tools .ranges button { flex: 1; }
  .scr-menu { position: fixed; top: auto; bottom: var(--status-bar); left: 8px; right: 8px; width: auto; max-width: none; max-height: 60dvh; }
  .workbench .scr-sheet { max-height: none; overflow: visible; border: 0; border-radius: 0; background: transparent; }
  .workbench .market-sheet .scr-table, .scr-table tbody { display: block; min-width: 0; }
  .workbench .market-sheet .scr-table > thead { display: none; }
  .scr-table tr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2px 16px; margin-bottom: 8px; padding: 10px 14px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--surface); }
  .workbench .market-sheet .scr-table td { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; position: static; width: auto; min-width: 0; height: auto; padding: 1px 0; border: 0; background: transparent; white-space: normal; text-align: right; }
  .workbench .market-sheet .scr-table td:first-child { display: block; grid-column: 1; min-width: 0; width: auto; text-align: left; background: transparent; }
  .workbench .market-sheet .scr-table td.scr-trend { display: flex; justify-content: flex-end; align-items: center; }
  .scr-table td[data-label]::before { content: attr(data-label); flex-shrink: 0; color: var(--muted); font-size: 10px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; text-align: left; }
  .workbench .market-sheet .scr-table td small { display: none; }
  .scr-name a { max-width: 100%; }
  .scr-name .nm { white-space: normal; }
  .scr-unranked li { grid-template-columns: 1fr; }
  .scr-picks { grid-template-columns: 1fr 1fr; }
}
