/* ── Screener ─────────────────────────────────────────── */

.screener-page {
  --screener-bg: var(--bg);
  --screener-panel: var(--panel);
  --screener-panel-soft: color-mix(in srgb, var(--ghost-bg) 74%, var(--panel));
  --screener-panel-alt: color-mix(in srgb, var(--ghost-bg) 56%, var(--panel));
  --screener-line: color-mix(in srgb, var(--line) 88%, transparent);
  --screener-line-strong: color-mix(in srgb, var(--brand) 24%, var(--line));
  --screener-text: var(--text);
  --screener-muted: var(--muted);
  --screener-accent: var(--brand);
  --screener-accent-soft: rgba(30, 141, 91, .14);
  --screener-benchmark: #5f93bb;
  --screener-tooltip-bg: rgba(255, 255, 255, .96);
  --screener-tooltip-border: rgba(30, 141, 91, .18);
  --screener-positive: #18aa6e;
  --screener-negative: #dc4e56;
  gap: 16px;
}

html[data-theme="dark"] .screener-page,
body[data-theme="dark"] .screener-page {
  --screener-accent-soft: rgba(75, 156, 255, .16);
  --screener-benchmark: #76a6ff;
  --screener-tooltip-bg: rgba(22, 27, 34, .96);
  --screener-tooltip-border: rgba(75, 156, 255, .28);
}

.screener-page .panel {
  margin-top: 0;
}

.screener-page .muted {
  color: var(--screener-muted);
}

.screener-page .btn.ghost {
  border-color: var(--screener-line);
  background: color-mix(in srgb, var(--ghost-bg) 74%, var(--panel));
  color: var(--screener-text);
}

.screener-page .btn.ghost:hover {
  border-color: var(--screener-line-strong);
  background: color-mix(in srgb, var(--brand) 8%, var(--ghost-bg));
}

.screener-terminal,
.screener-filter-shell,
.screener-results {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--screener-line);
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, color-mix(in srgb, var(--brand) 10%, transparent) 0%, transparent 42%),
    linear-gradient(180deg, color-mix(in srgb, var(--ghost-bg) 72%, var(--panel)) 0%, var(--panel) 100%);
  box-shadow:
    0 12px 28px color-mix(in srgb, var(--brand) 8%, transparent),
    inset 0 1px 0 rgba(255, 255, 255, .65);
  color: var(--screener-text);
}

.screener-terminal::before,
.screener-terminal::after {
  content: "";
  position: absolute;
  pointer-events: none;
  filter: blur(12px);
  opacity: .74;
}

.screener-terminal::before {
  top: -120px;
  left: -80px;
  width: 360px;
  height: 360px;
  background: radial-gradient(circle, color-mix(in srgb, var(--brand) 16%, transparent) 0%, transparent 68%);
}

.screener-terminal::after {
  right: -100px;
  bottom: -160px;
  width: 320px;
  height: 320px;
  background: radial-gradient(circle, rgba(120, 188, 153, .16) 0%, transparent 72%);
}

.screener-terminal > *,
.screener-filter-shell > *,
.screener-results > * {
  position: relative;
  z-index: 1;
}

.screener-terminal {
  padding: 16px;
}

.screener-filter-shell,
.screener-results {
  padding: 16px;
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--ghost-bg) 68%, var(--panel)) 0%, var(--panel) 100%);
}

.screener-terminal-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: end;
}

.screener-terminal-copy {
  display: grid;
  gap: 10px;
}

.screener-terminal-kicker {
  width: fit-content;
  background: color-mix(in srgb, var(--brand) 10%, var(--ghost-bg));
  color: var(--brand);
}

.screener-terminal-copy h1 {
  margin: 0;
  font-size: clamp(34px, 5.2vw, 54px);
  line-height: .92;
  letter-spacing: -.05em;
  color: var(--screener-text);
}

.screener-terminal-copy p {
  margin: 0;
  max-width: 60ch;
  color: var(--screener-muted);
  font-size: clamp(14px, 1.7vw, 17px);
  line-height: 1.45;
}

.screener-market-stats {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.screener-stat-pill {
  position: relative;
  min-width: 110px;
  min-height: 60px;
  padding: 10px 12px;
  display: grid;
  gap: 4px;
  border-radius: 16px;
  border: 1px solid var(--screener-line);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--ghost-bg) 54%, var(--panel)) 0%, var(--panel) 100%);
  backdrop-filter: blur(12px);
}

.screener-stat-pill span {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--screener-muted);
}

.screener-stat-pill strong {
  font-size: 22px;
  line-height: 1;
  font-weight: 800;
  color: var(--screener-text);
}

.screener-stat-pill.screener-pos strong {
  color: var(--screener-positive);
}

.screener-stat-pill.screener-neg strong {
  color: var(--screener-negative);
}

.screener-stat-pill.screener-flat strong {
  color: var(--screener-muted);
}

.screener-terminal-toolbar {
  margin-top: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
}

.screener-terminal-toolbar--secondary {
  display: grid;
  gap: 14px;
  align-items: stretch;
  margin-top: 18px;
}

.screener-chip-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.screener-control-group {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.screener-control-group--range {
  justify-self: start;
}

.screener-control-group--themes {
  padding-top: 4px;
}

.screener-control-label {
  color: var(--screener-muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .11em;
  line-height: 1;
  text-transform: uppercase;
}

.screener-chip {
  appearance: none;
  border: 1px solid var(--screener-line);
  background: color-mix(in srgb, var(--ghost-bg) 76%, var(--panel));
  color: var(--screener-muted);
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, color .16s ease, box-shadow .16s ease;
}

.screener-chip:hover {
  transform: translateY(-1px);
  border-color: var(--screener-line-strong);
  color: var(--screener-text);
}

.screener-chip.active {
  color: var(--brand);
  border-color: color-mix(in srgb, var(--brand) 34%, var(--line));
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--brand) 13%, var(--ghost-bg)) 0%, color-mix(in srgb, var(--brand) 8%, var(--panel)) 100%);
  box-shadow: 0 8px 18px color-mix(in srgb, var(--brand) 12%, transparent);
}

.screener-chip-row--compact .screener-chip {
  min-height: 34px;
  min-width: 52px;
  padding: 0 12px;
  font-size: 12px;
}

.screener-chip-row--ghost .screener-chip {
  background: color-mix(in srgb, var(--ghost-bg) 68%, var(--panel));
}

.screener-chip-row--ghost {
  width: 100%;
  min-width: 0;
  flex-wrap: nowrap;
  justify-content: flex-start;
  overflow-x: auto;
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  padding: 0 2px 7px 0;
  scroll-padding-inline: 2px;
  scrollbar-color: color-mix(in srgb, var(--brand) 28%, var(--screener-line)) transparent;
  scrollbar-width: thin;
  -webkit-overflow-scrolling: touch;
}

.screener-chip-row--ghost .screener-chip {
  flex: 0 0 auto;
  min-height: 34px;
  padding: 0 14px;
  font-size: 12px;
  white-space: nowrap;
}

.screener-chip-row--ghost::-webkit-scrollbar {
  height: 4px;
}

.screener-chip-row--ghost::-webkit-scrollbar-track {
  background: transparent;
}

.screener-chip-row--ghost::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--brand) 28%, var(--screener-line));
  border-radius: 999px;
}

.screener-quick-search {
  position: relative;
  width: min(340px, 100%);
  min-height: 44px;
  display: flex;
  align-items: center;
}

.screener-quick-search-icon {
  position: absolute;
  left: 16px;
  color: var(--screener-muted);
  font-size: 17px;
  pointer-events: none;
}

.screener-search-input,
.screener-select {
  width: 100%;
  min-height: 44px;
  border-radius: 14px;
  border: 1px solid var(--screener-line);
  background: color-mix(in srgb, var(--ghost-bg) 78%, var(--panel));
  color: var(--screener-text);
  font: inherit;
  transition: border-color .16s ease, box-shadow .16s ease, background .16s ease;
}

.screener-search-input {
  padding: 0 46px 0 44px;
}

.screener-select {
  padding: 0 16px;
}

html[data-theme="light"] .screener-select,
body[data-theme="light"] .screener-select {
  color-scheme: light;
}

html[data-theme="dark"] .screener-select,
body[data-theme="dark"] .screener-select {
  color-scheme: dark;
}

.screener-search-input::placeholder {
  color: color-mix(in srgb, var(--screener-muted) 82%, transparent);
}

.screener-search-input:focus,
.screener-select:focus {
  outline: none;
  border-color: color-mix(in srgb, var(--brand) 42%, var(--line));
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 10%, transparent);
  background: color-mix(in srgb, var(--ghost-bg) 88%, var(--panel));
}

.screener-search-clear {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ghost-bg) 88%, var(--panel));
  color: var(--screener-muted);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.screener-search-clear:hover {
  color: var(--screener-text);
  background: color-mix(in srgb, var(--brand) 8%, var(--ghost-bg));
}

.screener-chart-shell {
  position: relative;
  overflow: hidden;
  margin-top: 14px;
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid var(--screener-line);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--ghost-bg) 74%, var(--panel)) 0%, var(--panel) 100%);
}

.screener-chart-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.screener-chart-title {
  font-size: 19px;
  font-weight: 800;
  color: var(--screener-text);
}

.screener-chart-subtitle {
  margin-top: 6px;
  color: var(--screener-muted);
  font-size: 13px;
}

.screener-chart-aside {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.screener-chart-pill {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  border: 1px solid var(--screener-line);
  background: color-mix(in srgb, var(--ghost-bg) 70%, var(--panel));
  font-size: 13px;
  font-weight: 700;
}

.screener-chart-wrap {
  position: relative;
  height: 300px;
  padding: 2px 0 0;
}

.screener-chart-shell.is-loading .screener-chart-wrap,
.screener-moves-list.is-loading,
.screener-spotlight.is-loading {
  opacity: .68;
}

.screener-chart-shell.is-loading::after,
.screener-moves-list.is-loading::after,
.screener-spotlight.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent 0%, color-mix(in srgb, var(--brand) 10%, transparent) 48%, transparent 100%);
  transform: translateX(-100%);
  animation: screener-range-sweep 1.05s ease-in-out infinite;
}

.screener-chart-shell.is-loading::before {
  content: "Обновляем диапазон";
  position: absolute;
  top: 14px;
  right: 14px;
  z-index: 2;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--screener-line-strong);
  background: color-mix(in srgb, var(--ghost-bg) 88%, var(--panel));
  color: var(--brand);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

@keyframes screener-range-sweep {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

.screener-terminal-grid {
  margin-top: 14px;
  display: grid;
  grid-template-columns: minmax(0, 1.22fr) minmax(0, .88fr) minmax(260px, .78fr);
  gap: 12px;
  align-items: start;
}

.screener-terminal-panel {
  min-width: 0;
  padding: 14px;
  border-radius: 20px;
  border: 1px solid var(--screener-line);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--ghost-bg) 76%, var(--panel)) 0%, var(--panel) 100%);
}

.screener-terminal-panel--spotlight {
  position: relative;
}

.screener-terminal-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  margin-bottom: 12px;
}

.screener-terminal-panel-head h2 {
  margin: 4px 0 0;
  font-size: 22px;
  line-height: 1.05;
  color: var(--screener-text);
}

.screener-panel-kicker,
.screener-panel-caption {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.screener-panel-kicker {
  color: var(--brand);
}

.screener-panel-caption {
  color: var(--screener-muted);
  text-align: right;
}

.screener-ranked-list,
.screener-moves-list {
  display: grid;
  gap: 10px;
}

.screener-ranked-row,
.screener-move-row {
  position: relative;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid transparent;
  border-radius: 16px;
  background: color-mix(in srgb, var(--ghost-bg) 70%, var(--panel));
  color: var(--screener-text);
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, box-shadow .16s ease;
}

.screener-ranked-row:hover,
.screener-ranked-row.is-selected,
.screener-move-row:hover,
.screener-move-row.is-selected {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--brand) 28%, var(--line));
  background: color-mix(in srgb, var(--brand) 8%, var(--ghost-bg));
  box-shadow: 0 10px 20px color-mix(in srgb, var(--brand) 8%, transparent);
}

.screener-ranked-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(96px, 32%) auto;
  align-items: center;
  gap: 10px;
}

.screener-ranked-main,
.screener-move-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.screener-ranked-rank {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--ghost-bg) 86%, var(--panel));
  color: var(--screener-muted);
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.screener-ranked-copy,
.screener-move-copy,
.screener-asset-copy,
.screener-card-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.screener-ranked-name,
.screener-move-name {
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  color: var(--screener-text);
}

.screener-ranked-meta,
.screener-move-sector,
.screener-asset-meta,
.screener-card-meta {
  color: var(--screener-muted);
  font-size: 12px;
}

.screener-ranked-bar-shell {
  position: relative;
  height: 12px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ghost-bg) 88%, var(--panel));
  overflow: hidden;
}

.screener-ranked-bar {
  position: absolute;
  inset: 0 auto 0 0;
  border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--brand) 22%, white 10%) 0%, color-mix(in srgb, var(--brand) 88%, #137249 12%) 100%);
}

.screener-ranked-bar.screener-pos {
  background: linear-gradient(90deg, color-mix(in srgb, var(--screener-positive) 18%, white 12%) 0%, var(--screener-positive) 100%);
}

.screener-ranked-bar.screener-neg {
  background: linear-gradient(90deg, color-mix(in srgb, var(--screener-negative) 18%, white 10%) 0%, var(--screener-negative) 100%);
}

.screener-ranked-bar.screener-flat {
  background: linear-gradient(90deg, color-mix(in srgb, var(--screener-muted) 26%, transparent) 0%, color-mix(in srgb, var(--screener-muted) 80%, var(--screener-line)) 100%);
}

.screener-ranked-value {
  justify-self: end;
  font-size: 13px;
  font-weight: 700;
}

.screener-move-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.screener-move-prices {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
  font-size: 13px;
  font-weight: 700;
  color: var(--screener-text);
}

.screener-move-arrow {
  color: var(--screener-muted);
}

.screener-spotlight {
  min-width: 0;
  position: sticky;
  top: 88px;
}

.screener-spotlight-shell {
  display: grid;
  gap: 12px;
}

.screener-spotlight-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-width: 0;
}

.screener-spotlight-copy {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.screener-spotlight-kicker {
  color: var(--screener-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.screener-spotlight-copy h2 {
  margin: 0;
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  font-size: clamp(20px, 2vw, 24px);
  line-height: 1.02;
  letter-spacing: 0;
  color: var(--screener-text);
  overflow-wrap: anywhere;
}

.screener-spotlight-copy p {
  margin: 0;
  color: var(--screener-muted);
  font-size: 13px;
}

.screener-spotlight-price {
  font-size: clamp(28px, 4vw, 42px);
  line-height: .95;
  font-weight: 800;
}

.screener-spotlight-price-sub {
  margin-top: -4px;
  color: var(--screener-muted);
  font-size: 14px;
  font-weight: 600;
}

.screener-spotlight-section-title {
  margin-top: 2px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--screener-muted);
}

.screener-spotlight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.screener-metric {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 10px;
  border-radius: 14px;
  border: 1px solid var(--screener-line);
  background: color-mix(in srgb, var(--ghost-bg) 74%, var(--panel));
}

.screener-metric span {
  color: var(--screener-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.screener-metric strong {
  font-size: 15px;
  line-height: 1.2;
  color: var(--screener-text);
  overflow-wrap: anywhere;
}

.screener-spotlight-grid--top .screener-metric strong {
  font-size: 16px;
}

.screener-spotlight-btn {
  width: 100%;
  justify-content: center;
  border-color: color-mix(in srgb, var(--brand) 28%, var(--line));
  background: linear-gradient(180deg, color-mix(in srgb, var(--brand) 94%, white 6%) 0%, color-mix(in srgb, var(--brand) 90%, #0e673d 10%) 100%);
  color: #ffffff;
}

.screener-spotlight-btn:hover {
  filter: brightness(1.04);
}

.screener-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  align-items: end;
}

.screener-field {
  display: grid;
  gap: 8px;
}

.screener-field > span {
  color: var(--screener-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.screener-toolbar {
  margin-top: 12px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.screener-toggle-group,
.screener-cap-chips {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.screener-toggle,
.screener-cap-chip {
  appearance: none;
  border: 1px solid var(--screener-line);
  background: color-mix(in srgb, var(--ghost-bg) 76%, var(--panel));
  color: var(--screener-muted);
  border-radius: 999px;
  min-height: 36px;
  padding: 0 13px;
  font: inherit;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, background .16s ease, color .16s ease;
}

.screener-toggle:hover,
.screener-cap-chip:hover {
  transform: translateY(-1px);
  border-color: var(--screener-line-strong);
  color: var(--screener-text);
}

.screener-toggle.active,
.screener-cap-chip.active {
  color: var(--brand);
  border-color: color-mix(in srgb, var(--brand) 34%, var(--line));
  background: color-mix(in srgb, var(--brand) 10%, var(--ghost-bg));
}

.screener-sort-dir-btn {
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.screener-results-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 12px;
  margin-bottom: 12px;
}

.screener-results-head h2 {
  margin: 0;
  font-size: 24px;
  line-height: 1.02;
  color: var(--screener-text);
}

.screener-results-head p {
  margin: 6px 0 0;
}

.screener-results .table-wrap {
  overflow-x: auto;
  border-radius: 18px;
  border: 1px solid var(--screener-line);
  background: color-mix(in srgb, var(--ghost-bg) 54%, var(--panel));
}

.screener-results .table-wrap.is-loading {
  opacity: .56;
  pointer-events: none;
}

#screener-table {
  width: 100%;
  border-collapse: collapse;
}

#screener-table th,
#screener-table td {
  padding: 12px 10px;
  border-bottom: 1px solid var(--screener-line);
  vertical-align: middle;
}

#screener-table th {
  color: var(--screener-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.screener-row {
  cursor: pointer;
  transition: background .16s ease, box-shadow .16s ease;
}

.screener-row:hover,
.screener-row.is-selected {
  background: color-mix(in srgb, var(--brand) 8%, var(--ghost-bg));
}

.screener-row:focus-visible {
  outline: none;
  background: color-mix(in srgb, var(--brand) 10%, var(--ghost-bg));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand) 26%, var(--line));
}

.screener-asset-cell {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.screener-asset-link {
  display: -webkit-box;
  overflow: hidden;
  min-width: 0;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow-wrap: anywhere;
  color: var(--screener-text);
  text-decoration: none;
  font-weight: 700;
}

.screener-asset-link:hover {
  text-decoration: underline;
}

.screener-asset-meta,
.screener-card-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.screener-asset-meta code,
.screener-card-meta code {
  padding: 2px 7px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ghost-bg) 82%, var(--panel));
  border: 1px solid var(--screener-line);
  color: var(--screener-muted);
  font-size: 11px;
}

.screener-type-pill {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--brand) 24%, var(--line));
  background: color-mix(in srgb, var(--brand) 10%, var(--ghost-bg));
  color: var(--brand);
  font-size: 11px;
  font-weight: 700;
}

.screener-logo-wrap {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  overflow: hidden;
  border: 1px solid var(--screener-line);
  background: color-mix(in srgb, var(--ghost-bg) 82%, var(--panel));
}

.screener-logo-wrap--xs {
  width: 30px;
  height: 30px;
  border-radius: 10px;
}

.screener-logo-wrap--sm {
  width: 36px;
  height: 36px;
}

.screener-logo-wrap--lg {
  width: 48px;
  height: 48px;
  border-radius: 16px;
}

.screener-logo-wrap-fallback {
  font-size: 14px;
  font-weight: 800;
  color: var(--brand);
}

.screener-logo {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.screener-pos { color: var(--screener-positive); }
.screener-neg { color: var(--screener-negative); }
.screener-flat { color: var(--screener-muted); }

.screener-mobile-list {
  display: grid;
  gap: 12px;
}

.screener-page .hidden,
.screener-mobile-list.hidden,
.screener-empty.hidden {
  display: none !important;
}

.screener-card {
  position: relative;
  display: grid;
  gap: 12px;
  padding: 14px;
  border-radius: 18px;
  border: 1px solid var(--screener-line);
  background: color-mix(in srgb, var(--ghost-bg) 70%, var(--panel));
  min-width: 0;
  overflow: hidden;
}

.screener-card.is-selected {
  border-color: color-mix(in srgb, var(--brand) 30%, var(--line));
  background: color-mix(in srgb, var(--brand) 8%, var(--ghost-bg));
}

.screener-card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.screener-card-rank {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--ghost-bg) 84%, var(--panel));
  color: var(--screener-muted);
  font-size: 12px;
  font-weight: 700;
  flex: 0 0 auto;
}

.screener-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.screener-empty,
.screener-empty-inline {
  padding: 20px;
  border-radius: 18px;
  border: 1px dashed var(--screener-line);
  background: color-mix(in srgb, var(--ghost-bg) 70%, var(--panel));
  color: var(--screener-muted);
  text-align: center;
}

.screener-pager {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  flex-wrap: wrap;
}

.screener-page-list {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.screener-page-btn,
.screener-page-dots {
  min-width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
}

.screener-page-btn {
  border: 1px solid var(--screener-line);
  background: color-mix(in srgb, var(--ghost-bg) 74%, var(--panel));
  color: var(--screener-text);
  cursor: pointer;
}

.screener-page-btn:hover {
  border-color: var(--screener-line-strong);
}

.screener-page-btn.screener-page-active {
  color: var(--brand);
  border-color: color-mix(in srgb, var(--brand) 32%, var(--line));
  background: color-mix(in srgb, var(--brand) 10%, var(--ghost-bg));
}

.screener-page-dots,
.screener-page-summary {
  color: var(--screener-muted);
  font-size: 13px;
}

.screener-stat-pill.is-loading,
.screener-ranked-row.is-loading,
.screener-move-row.is-loading,
.screener-card.is-loading,
.screener-spotlight-shell.is-loading {
  position: relative;
  overflow: hidden;
  color: transparent !important;
  border-color: transparent;
}

.screener-stat-pill.is-loading::after,
.screener-ranked-row.is-loading::after,
.screener-move-row.is-loading::after,
.screener-card.is-loading::after,
.screener-spotlight-shell.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, color-mix(in srgb, var(--ghost-bg) 75%, var(--panel)) 0%, color-mix(in srgb, var(--ghost-bg) 42%, var(--panel)) 50%, color-mix(in srgb, var(--ghost-bg) 75%, var(--panel)) 100%);
  background-size: 200% 100%;
  animation: screener-shimmer 1.3s linear infinite;
}

.screener-stat-pill.is-loading {
  min-width: 126px;
}

.screener-ranked-row.is-loading,
.screener-move-row.is-loading {
  min-height: 72px;
}

.screener-card.is-loading {
  min-height: 148px;
}

.screener-spotlight-shell.is-loading {
  min-height: 340px;
  overflow: hidden;
}

@keyframes screener-shimmer {
  0% { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

@media (max-width: 1120px) {
  .calendar-side {
    grid-template-columns: 1fr;
  }

  .calendar-upcoming {
    position: static;
  }

  .calendar-featured-rail {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .calendar-event-preview {
    display: none;
  }

  .screener-terminal-head,
  .screener-terminal-grid {
    grid-template-columns: 1fr;
  }

  .screener-market-stats {
    justify-content: flex-start;
  }

  .screener-terminal-panel--spotlight,
  .screener-spotlight {
    position: static;
  }

  .screener-spotlight-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .calendar-hero {
    gap: 14px;
  }

  .calendar-toolbar,
  .calendar-hero-head {
    align-items: stretch;
  }

  .calendar-month-summary {
    justify-content: flex-start;
  }

  .calendar-nav h2 {
    min-width: 0;
    text-align: left;
  }

  .calendar-featured-rail {
    grid-template-columns: 1fr;
  }

  .calendar-featured-card {
    grid-template-columns: 1fr;
    min-height: 96px;
  }

  .calendar-featured-meta {
    align-items: flex-start;
  }

  .calendar-board-head {
    align-items: flex-start;
  }

  .calendar-agenda-panel {
    max-height: 320px;
  }

  .calendar-upcoming,
  .calendar-day-detail {
    padding: 14px;
  }

  .calendar-modal-card {
    width: min(760px, 100%);
    padding: 18px;
  }

  .screener-terminal,
  .screener-filter-shell,
  .screener-results {
    border-radius: 24px;
    padding: 16px;
  }

  .screener-terminal-head,
  .screener-terminal-toolbar,
  .screener-chart-head,
  .screener-results-head {
    align-items: stretch;
  }

  .screener-chart-aside,
  .screener-market-stats {
    justify-content: flex-start;
  }

  .screener-chart-wrap {
    height: 320px;
  }

  .screener-filter-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .screener-sort-dir-btn {
    width: 100%;
  }
}

@media (max-width: 720px) {
  .calendar-nav {
    width: 100%;
    justify-content: space-between;
  }

  .calendar-nav h2 {
    font-size: 22px;
  }

  .calendar-month-grid {
    min-width: 980px;
    gap: 8px;
  }

  .calendar-day-card {
    min-height: 178px;
    padding: 8px;
    border-radius: 14px;
    gap: 7px;
  }

  .calendar-day-anchor {
    margin: -8px -8px 0;
    padding: 8px 8px 9px;
  }

  .calendar-day-head-right strong {
    font-size: 18px;
  }

  .calendar-day-today-pill {
    min-height: 20px;
    padding: 0 7px;
    font-size: 9px;
  }

  .calendar-modal-card {
    max-height: calc(100dvh - 18px);
    padding: 18px 16px calc(18px + var(--mobile-bottom-nav-height, env(safe-area-inset-bottom, 0px)));
  }

  .calendar-modal-event {
    padding: 16px;
    border-radius: 18px;
  }

  .calendar-day-event,
  .calendar-day-rollup {
    min-height: 42px;
  }

  .calendar-day-event-title {
    font-size: 12px;
  }

  .screener-terminal-copy h1 {
    font-size: clamp(34px, 10vw, 48px);
  }

  .screener-terminal-toolbar,
  .screener-terminal-toolbar--secondary,
  .screener-toolbar {
    flex-direction: column;
    align-items: stretch;
  }

  .screener-terminal-toolbar--secondary {
    display: grid;
  }

  .screener-quick-search {
    width: 100%;
  }

  .screener-chip-row,
  .screener-toggle-group,
  .screener-cap-chips {
    width: 100%;
  }

  .screener-chip-row--ghost {
    flex: 0 0 auto;
    justify-content: flex-start;
  }

  .screener-filter-grid,
  .screener-terminal-grid,
  .screener-ranked-row {
    grid-template-columns: 1fr;
  }

  .screener-ranked-row {
    gap: 10px;
    padding: 12px;
    border-radius: 16px;
    background: color-mix(in srgb, var(--panel) 82%, var(--ghost-bg));
  }

  .screener-ranked-value {
    justify-self: start;
  }

  .screener-move-row {
    flex-direction: column;
    align-items: stretch;
    padding: 12px;
    border-radius: 16px;
    background: color-mix(in srgb, var(--panel) 82%, var(--ghost-bg));
  }

  .screener-move-prices {
    justify-content: flex-start;
  }

  .screener-spotlight-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .signals-toolbar {
    align-items: stretch;
  }

  .signals-pager {
    justify-content: flex-start;
  }

  .signals-page-list {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .signals-page-list::-webkit-scrollbar {
    display: none;
  }

  .signals-page-btn,
  .signals-page-dots {
    flex: 0 0 auto;
  }
}

@media (max-width: 560px) {
  .calendar-month-summary {
    flex-wrap: wrap;
    overflow: visible;
    padding-bottom: 0;
  }

  .calendar-summary-pill {
    width: 100%;
    justify-content: space-between;
    flex: 1 1 100%;
  }

  .calendar-month-grid {
    min-width: 900px;
  }

  .calendar-day-card {
    min-height: 158px;
    padding: 8px;
  }

  .calendar-day-anchor {
    margin: -8px -8px 0;
    padding: 8px 8px 10px;
  }

  .calendar-day-head-right {
    gap: 4px;
  }

  .calendar-day-head-right strong {
    font-size: 15px;
  }

  .calendar-day-head-right small {
    font-size: 9px;
  }

  .calendar-day-count {
    min-width: 24px;
    min-height: 24px;
    font-size: 11px;
  }

  .calendar-day-event:nth-of-type(n + 3) {
    display: none;
  }

  .calendar-agenda-panel,
  .calendar-month-panel {
    border-radius: 16px;
  }

  .calendar-agenda-panel {
    max-height: 300px;
  }

  .calendar-modal-card {
    padding: 16px 14px calc(16px + var(--mobile-bottom-nav-height, env(safe-area-inset-bottom, 0px)));
    border-radius: 20px;
  }

  .calendar-modal-head {
    padding-right: 38px;
  }

  .calendar-modal-body {
    padding-right: 0;
  }

  .calendar-modal-event {
    padding: 14px;
  }

  .calendar-modal-event-head {
    align-items: flex-start;
  }

  .calendar-modal-event-link {
    width: 100%;
    justify-content: center;
  }

  .screener-terminal,
  .screener-filter-shell,
  .screener-results,
  .screener-terminal-panel,
  .screener-chart-shell {
    border-radius: 20px;
    padding: 14px;
  }

  .screener-results-head {
    align-items: start;
  }

  .screener-card-head {
    align-items: flex-start;
  }

  .screener-chart-wrap {
    height: 280px;
  }

  .screener-card-grid,
  .screener-spotlight-grid {
    grid-template-columns: 1fr;
  }

  .screener-card {
    padding: 12px;
    border-radius: 16px;
  }

  .screener-metric strong {
    font-size: 14px;
  }

  .screener-pager {
    align-items: stretch;
  }

  .screener-page-list {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
    padding-bottom: 4px;
    scrollbar-width: none;
  }

  .screener-page-list::-webkit-scrollbar {
    display: none;
  }

  .screener-pager .btn {
    width: 100%;
  }

  .signals-modal-card,
  .signals-detail-card {
    max-height: calc(100dvh - 18px);
    padding-bottom: calc(16px + var(--mobile-bottom-nav-height, env(safe-area-inset-bottom, 0px)));
  }
}

@media (min-width: 861px) {
  .screener-mobile-list {
    display: none !important;
  }
}

@media (max-width: 860px) {
  #screener-table-wrap {
    display: none !important;
  }
}
