#market-analysis-dashboard {
  --mad-bg: #0b141d;
  --mad-panel: #111e29;
  --mad-border: #2b3b48;
  --mad-text: #f0f5f7;
  --mad-muted: #b0bfcb;
  --mad-accent: #c2dc62;
  max-width: 1250px;
  margin: 2rem auto 3.5rem;
  padding: clamp(1rem, 3vw, 2rem);
  background: var(--mad-bg);
  border: 1px solid var(--mad-border);
  border-radius: 14px;
  color: var(--mad-text);
  color-scheme: dark;
  font: 400 .9rem/1.5 system-ui, sans-serif;
}
#analysis #market-analysis-dashboard {
  width: min(1250px, calc(100% - 8vw));
  margin-top: 0;
}
#market-analysis-dashboard [hidden] { display: none !important; }
#market-analysis-dashboard h2,
#market-analysis-dashboard h3,
#market-analysis-dashboard p { margin: 0; color: inherit; }
#market-analysis-dashboard h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -.035em;
  margin-bottom: .45rem;
}
#market-analysis-dashboard h3 { font-size: 1rem; font-weight: 700; }
#market-analysis-dashboard a { color: var(--mad-accent); text-decoration: underline; text-underline-offset: .18em; }
#market-analysis-dashboard :is(a, button, select, [tabindex]):focus-visible {
  outline: 2px solid var(--mad-accent);
  outline-offset: 3px;
}
#market-analysis-dashboard .mad-row,
#market-analysis-dashboard .mad-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
#market-analysis-dashboard .mad-head { align-items: flex-start; margin-bottom: 1.4rem; }
#market-analysis-dashboard .mad-head p,
#market-analysis-dashboard .mad-count,
#market-analysis-dashboard .mad-reviews p { color: var(--mad-muted); }
#market-analysis-dashboard .mad-links { display: flex; flex-wrap: wrap; gap: .55rem 1rem; padding-top: .35rem; }
#market-analysis-dashboard .mad-links a { white-space: nowrap; }
#market-analysis-dashboard .mad-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr)) auto;
  align-items: end;
  gap: .65rem;
  margin-bottom: .85rem;
}
#market-analysis-dashboard .mad-filters label { display: grid; gap: .35rem; color: var(--mad-muted); font-weight: 650; }
#market-analysis-dashboard :is(select, .mad-button) {
  min-height: 2.6rem;
  border: 1px solid var(--mad-border);
  border-radius: 6px;
  background: var(--mad-panel);
  color: var(--mad-text);
  font: inherit;
  padding: .45rem .65rem;
}
#market-analysis-dashboard select { width: 100%; }
#market-analysis-dashboard button { cursor: pointer; }
#market-analysis-dashboard .mad-button:not(:disabled):hover { border-color: var(--mad-accent); color: var(--mad-accent); }
#market-analysis-dashboard .mad-button:disabled { opacity: .48; cursor: default; }
#market-analysis-dashboard .mad-export { border-color: var(--mad-accent); color: var(--mad-accent); }
#market-analysis-dashboard :is(.mad-metrics, .mad-charts, .mad-reviews) { display: grid; gap: .7rem; }
#market-analysis-dashboard .mad-metrics { grid-template-columns: repeat(4, 1fr); margin: 0 0 .7rem; }
#market-analysis-dashboard :is(.mad-panel, .mad-metrics > div) {
  background: var(--mad-panel);
  border: 1px solid var(--mad-border);
  border-radius: 8px;
  padding: .85rem 1rem;
}
#market-analysis-dashboard .mad-metrics dt { color: var(--mad-muted); font-weight: 600; }
#market-analysis-dashboard .mad-metrics dd { margin: .1rem 0 0; font-size: 1.8rem; font-weight: 750; line-height: 1.1; }
#market-analysis-dashboard .mad-charts { grid-template-columns: 1fr 1fr; margin-bottom: .7rem; }
#market-analysis-dashboard .mad-charts h3 { margin-bottom: .6rem; }
#market-analysis-dashboard .mad-bar {
  display: grid;
  grid-template-columns: minmax(8rem, 10.5rem) 1fr 2ch;
  gap: .6rem;
  align-items: center;
  width: 100%;
  min-height: 2rem;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--mad-text);
  font: inherit;
  text-align: left;
  padding: .2rem .25rem;
}
#market-analysis-dashboard .mad-months .mad-bar { grid-template-columns: 6rem 1fr 2ch; }
#market-analysis-dashboard .mad-bar:hover,
#market-analysis-dashboard .mad-bar[aria-pressed="true"] { background: #1d2e3b; border-color: var(--mad-border); }
#market-analysis-dashboard .mad-bar[aria-pressed="true"] { border-color: var(--mad-bar-color); }
#market-analysis-dashboard .mad-bar b { justify-self: end; }
#market-analysis-dashboard .mad-track { display: block; border-radius: 5px; background: #273744; height: .55rem; }
#market-analysis-dashboard .mad-track i { display: block; height: 100%; border-radius: inherit; background: var(--mad-bar-color); }
#market-analysis-dashboard .mad-lime { --mad-bar-color: var(--mad-accent); }
#market-analysis-dashboard .mad-green { --mad-bar-color: #8adead; }
#market-analysis-dashboard .mad-amber { --mad-bar-color: #f9cf7b; }
#market-analysis-dashboard .mad-rose { --mad-bar-color: #f6a7a7; }
#market-analysis-dashboard .mad-lavender { --mad-bar-color: #c8b8ff; }
#market-analysis-dashboard .mad-blue { --mad-bar-color: #9bc8f2; }
#market-analysis-dashboard .mad-slate { --mad-bar-color: #b3c3d0; }
#market-analysis-dashboard .mad-count { margin: .25rem 0 .65rem; }
#market-analysis-dashboard .mad-table-wrap { overflow: auto; }
#market-analysis-dashboard table { width: 100%; min-width: 42rem; border-collapse: collapse; text-align: left; }
#market-analysis-dashboard :is(td, th) { padding: .58rem .65rem; border-bottom: 1px solid var(--mad-border); vertical-align: top; }
#market-analysis-dashboard thead th { color: var(--mad-muted); font-weight: 610; }
#market-analysis-dashboard :is(.mad-date, td:last-child) { white-space: nowrap; }
#market-analysis-dashboard td small,
#market-analysis-dashboard th small { display: block; color: var(--mad-muted); font-size: .77rem; font-weight: 400; }
#market-analysis-dashboard .mad-date small { display: inline; }
#market-analysis-dashboard .mad-outcome { color: var(--mad-bar-color); font-size: .84rem; font-weight: 650; }
#market-analysis-dashboard .mad-pagination { margin-top: .7rem; }
#market-analysis-dashboard .mad-reviews { grid-template-columns: 1fr 1fr; margin-top: 1rem; font-size: .86rem; }
#market-analysis-dashboard .mad-reviews p { margin: .2rem 0; }
@media (max-width: 820px) {
  #market-analysis-dashboard .mad-filters { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  #market-analysis-dashboard .mad-charts { grid-template-columns: 1fr; }
}
@media (max-width: 520px) {
  #market-analysis-dashboard .mad-head { flex-direction: column; }
  #market-analysis-dashboard :is(.mad-filters, .mad-metrics) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  #market-analysis-dashboard .mad-reviews { grid-template-columns: 1fr; }
  #market-analysis-dashboard .mad-bar { grid-template-columns: minmax(8.6rem, 1fr) 1fr 2ch; }
}
