/*
 * Discover dashboard: a reskin layer over the page's inline styles.
 * Loaded after them, so it overrides look only. Every ID, data hook and script is unchanged.
 */
.discover-page {
  --navy: var(--ink);
  --muted: var(--slate);
  --muted-2: #6f7c86;
  --accent-strong: var(--blue-text);
  --border: var(--line);
  --card-border: var(--line);
  --glass: #ffffff;
  --radius: 16px;
}

html:has(.discover-page),
.discover-page {
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
}

.discover-main {
  padding-block: clamp(40px, 5vw, 72px) clamp(64px, 7vw, 104px);
}

/* Heading: left-aligned display type, like every other page. */
.discover-page .discover-heading {
  margin: 0 0 32px;
}

.discover-page .discover-heading h1 {
  margin: 0;
  padding: 0;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(40px, 5.6vw, 80px);
  font-weight: 700;
  letter-spacing: -.04em;
  line-height: .98;
  text-align: left;
}

/* Containers: hairline borders, no heavy shadows. */
.discover-page .mp-wrap,
.discover-page .mi-capture,
.discover-page .sector-chart-wrap,
.discover-page .across-markets,
.discover-page .filters-card,
.discover-page .table-wrapper {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  box-shadow: none;
}

.discover-page .mp-wrap,
.discover-page .sector-chart-wrap {
  padding: 20px;
  margin-bottom: 20px;
}

.discover-page .mp-date-header {
  margin-bottom: 16px;
  color: var(--slate);
  font-size: 14px;
  text-align: left;
}

.discover-page .mp-grid {
  gap: 12px;
}

.discover-page .mp-card {
  padding: 16px;
  border: 0;
  border-radius: 12px;
  background: var(--mist);
}

.discover-page .mp-label {
  color: var(--slate);
  font-size: 12px;
}

.discover-page .mp-value {
  color: var(--ink);
  font-size: 28px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  letter-spacing: -.02em;
}

.discover-page .mp-sub {
  color: var(--slate);
}

/* Newsletter prompt: same quiet panel as the homepage daily wrap. */
.discover-page .mi-capture {
  max-width: none;
  margin: 0 0 20px;
  padding: 24px;
  border: 0;
  background: var(--mist);
}

.discover-page .mi-capture h3 {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.discover-page .mi-capture p {
  color: var(--slate);
  font-size: 15px;
  line-height: 1.55;
}

.discover-page .mi-capture input[type="email"] {
  min-height: 48px;
  border: 1px solid #c9d3da;
  border-radius: 10px;
  background: #fff;
  font-size: 16px;
}

.discover-page .mi-capture input[type="email"]:focus,
.discover-page input:focus,
.discover-page select:focus {
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(0, 191, 255, .28);
}

.discover-page input::placeholder {
  color: #7d8991;
}

.discover-page .mi-capture button {
  min-height: 48px;
  padding: 0 22px;
  border-radius: 10px;
  background: var(--ink);
  color: #fff;
  font-size: 15px;
  box-shadow: none;
}

.discover-page .mi-capture button:hover {
  background: #22394a;
}

/* Sector chart */
.discover-page .sector-chart-title {
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 24px;
  font-weight: 700;
}

.discover-page .mi-toggle button {
  min-width: 44px;
  min-height: 36px;
  border-color: var(--line);
  border-radius: 8px;
  color: var(--ink);
}

.discover-page .mi-toggle button:hover {
  transform: none;
  border-color: var(--ink);
}

.discover-page .mi-toggle button.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

.discover-page .across-markets {
  margin: 0 0 12px;
  padding: 14px 16px;
}

.discover-page .across-title {
  color: var(--ink);
  font-size: 14px;
}

.discover-page .across-chip {
  border-color: var(--line);
}

.discover-page .across-chip:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--ink);
}

.discover-page .across-chip .px,
.discover-page .across-chip .chg {
  font-variant-numeric: tabular-nums;
}

.discover-page .chg.pos { color: var(--gain); }
.discover-page .chg.neg { color: var(--loss); }

.discover-page .mi-tip {
  margin: 0 0 20px;
  color: var(--slate);
  font-size: 13px;
  line-height: 1.5;
  text-align: left;
}

/* Filters */
.discover-page .filters-card {
  padding: 8px 16px;
  margin-bottom: 16px;
}

.discover-page .filters-toggle {
  min-height: 48px;
}

.discover-page .filters-toggle:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 4px;
  border-radius: 8px;
}

.discover-page .filters-chip {
  border-color: var(--ink);
  background: #fff;
  color: var(--ink);
  font-weight: 600;
}

.discover-page .filters-caption {
  color: var(--slate);
  font-size: 14px;
}

.discover-page .preset-bar {
  padding: 12px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}

.discover-page .preset-title {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}

.discover-page .preset-btn {
  min-height: 40px;
  border-color: var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  box-shadow: none;
}

.discover-page .preset-btn:hover {
  transform: none;
  box-shadow: none;
  border-color: var(--ink);
}

.discover-page .preset-btn.active {
  border-color: var(--ink);
  background: var(--ink);
  color: #fff;
}

/* The not-advice line sits directly under the chips at full contrast. */
.discover-page .preset-hint {
  margin-top: 4px;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}

.discover-page .filter-label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.discover-page .filters input,
.discover-page .filters select {
  min-height: 40px;
  border-radius: 8px;
  background: #fff;
  font-size: 15px;
}

/* Screener table: sticky header, tabular figures, comfortable rows. */
.discover-page .table-wrapper {
  overflow: hidden;
}

.discover-page .table-scroll table {
  font-size: 14px;
  font-variant-numeric: tabular-nums;
}

.discover-page thead,
.discover-page thead th {
  background: var(--mist);
}

.discover-page th,
.discover-page td {
  height: 44px;
  padding: 0 12px;
  border-bottom-color: var(--line);
}

.discover-page th.sortable {
  color: var(--ink);
  font-size: 13px;
  font-weight: 600;
}

.discover-page tbody tr:nth-child(even) {
  background: #fafbfc;
}

.discover-page tbody tr:hover {
  background: #eef8fd;
}

.discover-page .status-bar {
  border-top-color: var(--line);
  background: #fff;
  font-size: 13px;
}

.discover-page .status-bar #statusCount {
  color: var(--ink);
}

/* Discover gains the site footer; keep it clear of the dashboard. */
.discover-page .v3-footer {
  margin-top: 0;
}

@media (max-width: 600px) {
  .discover-page .discover-heading h1 {
    font-size: clamp(36px, 10vw, 44px);
  }

  .discover-page .mp-wrap,
  .discover-page .sector-chart-wrap,
  .discover-page .mi-capture {
    padding: 16px;
  }

  .discover-page .mp-value {
    font-size: 22px;
  }
}
