.market-page { display: grid; gap: 10px; }
.market-screener-intro { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 16px; padding: 13px 15px; }
.market-list-heading { display: flex; min-width: 0; align-items: center; justify-content: space-between; gap: 16px; padding: 11px 14px; }
.market-list-heading h2 { margin: 3px 0 0; color: var(--text); font-size: 14px; font-weight: 650; letter-spacing: -.02em; }
.market-screener-intro-copy { display: flex; min-width: 0; align-items: center; gap: 11px; }
.market-screener-intro-copy h2 { margin: 3px 0 2px; color: var(--text); font-size: 16px; font-weight: 650; letter-spacing: -.025em; }
.market-screener-intro-copy p { margin: 0; color: var(--muted); font-size: 9px; }
.market-screener-icon { display: grid; width: 35px; height: 35px; flex: 0 0 auto; place-items: center; border: 1px solid #3d5435; border-radius: 8px; background: #18241a; color: var(--accent); }
.market-screener-icon svg { width: 19px; height: 19px; }
.market-screener-meta { display: flex; flex: 0 0 auto; align-items: center; gap: 13px; }
.market-list-link, .market-radar-link { display: inline-flex; min-height: 32px; align-items: center; justify-content: center; gap: 6px; padding: 0 9px; border: 1px solid var(--line-2); border-radius: 6px; background: #111d16; color: #d0dfd4; font-size: 9px; font-weight: 650; text-decoration: none; white-space: nowrap; }
.market-list-link:hover, .market-radar-link:hover { border-color: #456047; background: #17251b; color: var(--text); }
.market-list-link svg, .market-radar-link svg { width: 15px; height: 15px; }
.market-list-page { display: grid; gap: 10px; }
.market-section-heading { display: flex; min-width: 0; align-items: end; justify-content: space-between; gap: 10px; margin: 2px 1px 7px; }
.market-section-heading h2 { margin: 3px 0 0; color: var(--text); font-size: 14px; font-weight: 680; letter-spacing: -.02em; }
.market-section-note { color: var(--muted); font-size: 8px; text-align: right; }
.market-feed-state { display: inline-flex; min-height: 24px; align-items: center; gap: 6px; padding: 0 8px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); font-size: 8px; font-weight: 700; letter-spacing: .04em; white-space: nowrap; }
.market-feed-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--quiet); }
.market-feed-state.is-live { border-color: #315641; background: #142019; color: #a6e4b8; }
.market-feed-state.is-live .market-feed-dot { background: var(--green); }
.market-feed-state.is-error { border-color: #603d3c; background: #271c1d; color: #f29a95; }
.market-feed-state.is-error .market-feed-dot { background: var(--red); }
.market-feed-state.is-checking .market-feed-dot { background: var(--amber); }
.market-screener-summary-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.market-summary-card { display: grid; min-width: 0; min-height: 78px; align-content: center; gap: 4px; padding: 10px 12px; }
.market-summary-card > strong { overflow: hidden; color: var(--text); font-size: 17px; font-weight: 680; letter-spacing: -.035em; text-overflow: ellipsis; white-space: nowrap; }
.market-summary-card > small { overflow: hidden; color: var(--muted); font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.market-summary-card > small.is-positive { color: var(--green); }
.market-summary-card > small.is-negative { color: var(--red); }
.market-breadth-card { position: relative; }
.market-breadth-card > strong { color: var(--green); }
.market-breadth-track { display: block; height: 3px; margin-top: 3px; overflow: hidden; border-radius: 2px; background: #5b3333; }
.market-breadth-track > span { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--green); transition: width .25s ease; }
.market-funding-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.market-funding-panel { min-width: 0; padding: 10px 12px; }
.market-funding-heading { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 7px; }
.market-funding-heading h3 { margin: 3px 0 0; color: var(--text); font-size: 11px; font-weight: 650; }
.market-funding-mark { display: grid; width: 25px; height: 25px; place-items: center; border: 1px solid var(--line); border-radius: 6px; font-size: 14px; font-weight: 700; }
.market-funding-mark.is-positive { border-color: #315641; background: #142019; color: var(--green); }
.market-funding-mark.is-negative { border-color: #603d3c; background: #271c1d; color: var(--red); }
.market-funding-list { display: grid; }
.market-funding-row { display: flex; min-width: 0; min-height: 34px; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid rgb(174 210 194 / 7%); }
.market-funding-contract { display: grid; min-width: 0; gap: 2px; }
.market-funding-contract strong { overflow: hidden; color: #e2eee6; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.market-funding-contract small, .market-funding-empty { color: var(--muted); font-size: 8px; }
.market-funding-empty { margin: 0; padding: 7px 0 2px; }
.market-screener-panel { min-width: 0; overflow: hidden; }
.market-screener-toolbar { display: flex; flex-wrap: wrap; align-items: end; gap: 8px; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.market-toolbar-title { min-width: 125px; margin-right: auto; }
.market-toolbar-title h3 { margin: 3px 0 0; color: var(--text); font-size: 12px; font-weight: 650; }
.market-search { display: flex; width: min(190px, 100%); min-height: 36px; align-items: center; gap: 7px; padding: 0 9px; border: 1px solid var(--line-2); border-radius: 7px; background: #0b1510; color: var(--quiet); }
.market-search svg { width: 14px; height: 14px; flex: 0 0 auto; }
.market-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--text); font-size: 10px; }
.market-search input::placeholder { color: var(--quiet); }
.market-filter-label { display: grid; gap: 4px; color: var(--muted); font-size: 8px; font-weight: 650; }
.market-filter-label select { min-width: 102px; height: 36px; padding: 0 8px; border: 1px solid var(--line-2); border-radius: 7px; background: #0b1510; color: var(--text); font-size: 9px; }
.market-control-button { display: inline-flex; min-height: 36px; align-items: center; justify-content: center; gap: 6px; padding: 0 9px; border: 1px solid var(--line-2); border-radius: 7px; background: #111d16; color: #c5d4c9; cursor: pointer; font-size: 9px; font-weight: 650; white-space: nowrap; }
.market-control-button:hover { border-color: #456047; background: #17251b; color: var(--text); }
.market-control-button:disabled { cursor: wait; opacity: .65; }
.market-control-button svg { width: 14px; height: 14px; }
.market-refresh-button.is-loading svg { animation: market-rotate .8s linear infinite; }
@keyframes market-rotate { to { transform: rotate(360deg); } }
.market-screener-status-row { display: flex; min-height: 31px; align-items: center; justify-content: space-between; gap: 10px; padding: 0 12px; }
.market-screener-count, .market-data-source { color: var(--muted); font-size: 8px; }
.market-data-source { text-align: right; }
.market-screener-error { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 0 12px 8px; padding: 8px 10px; border: 1px solid #603d3c; border-radius: 6px; background: #271c1d; color: #f0a09b; font-size: 9px; }
.market-error-retry { flex: 0 0 auto; padding: 3px 5px; border: 0; background: transparent; color: #ffd2c7; cursor: pointer; font: inherit; font-weight: 700; text-decoration: underline; }
.market-screener-table-wrap { min-width: 0; overflow-x: auto; }
.market-screener-table { width: 100%; min-width: 790px; border-collapse: collapse; text-align: right; }
.market-screener-table th { height: 34px; padding: 0 11px; border-bottom: 1px solid var(--line); background: #101a14; color: var(--quiet); font-size: 8px; font-weight: 720; letter-spacing: .055em; white-space: nowrap; }
.market-screener-table th:first-child, .market-screener-table td:first-child { text-align: left; }
.market-screener-table td { height: 46px; padding: 6px 11px; border-bottom: 1px solid rgb(174 210 194 / 7%); color: #c3d2c8; font-size: 9px; }
.market-screener-table tbody tr:hover { background: rgb(255 255 255 / 2%); }
.market-screener-symbol { display: grid; gap: 2px; }
.market-screener-symbol strong { color: #e2eee6; font-size: 10px; font-weight: 680; }
.market-screener-symbol small { color: var(--quiet); font-size: 8px; }
.market-number { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-variant-numeric: tabular-nums; white-space: nowrap; }
.market-number.is-positive { color: var(--green) !important; }
.market-number.is-negative { color: var(--red) !important; }
.market-screener-empty { padding: 24px !important; color: var(--muted) !important; text-align: center !important; }
.market-data-disclaimer { margin: 0; padding: 9px 12px 11px; color: var(--quiet); font-size: 8px; line-height: 1.5; }

@media (max-width: 820px) {
  .market-screener-intro { align-items: flex-start; flex-direction: column; gap: 10px; }
  .market-screener-meta { width: 100%; justify-content: space-between; }
  .market-list-heading { align-items: flex-start; flex-direction: column; gap: 9px; }
  .market-toolbar-title { width: 100%; }
  .market-search { flex: 1 1 180px; }
}

@media (max-width: 600px) {
  .market-screener-summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .market-funding-grid { grid-template-columns: 1fr; }
  .market-summary-card { min-height: 75px; padding: 9px; }
  .market-summary-card > strong { font-size: 14px; }
  .market-summary-card > small { font-size: 8px; white-space: normal; }
  .market-breadth-card { grid-column: 1 / -1; }
  .market-section-heading { align-items: flex-start; }
  .market-section-note { max-width: 45%; }
  .market-screener-intro .market-screener-meta { flex-wrap: wrap; gap: 7px; }
  .market-list-heading .market-screener-meta { flex-wrap: wrap; gap: 7px; }
  .market-screener-toolbar { align-items: stretch; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 10px; }
  .market-toolbar-title, .market-search { grid-column: 1 / -1; width: 100%; }
  .market-search { min-height: 44px; }
  .market-filter-label select { width: 100%; min-width: 0; height: 44px; }
  .market-control-button { min-height: 44px; }
  .market-refresh-button { grid-column: 1 / -1; }
  .market-screener-status-row { align-items: flex-start; flex-direction: column; justify-content: center; gap: 3px; padding: 6px 10px; }
  .market-data-source { text-align: left; }
  .market-screener-table { min-width: 790px; }
  .market-data-disclaimer { padding-right: 10px; padding-left: 10px; }
}

@media (prefers-reduced-motion: reduce) {
  .market-refresh-button.is-loading svg { animation: none; }
}
