#dashboard {
  --analysis-good:#60d9ae;
  --analysis-rise:#f5a27c;
  --analysis-neutral:#8296b7;
  --analysis-track:#263247;
}
.market-intro {
  align-items:center;
  padding:clamp(15px,1.3vw,24px) clamp(15px,2.2vw,35px);
  border:1px solid #303a4d;
  border-radius:17px;
  background:radial-gradient(ellipse at 6% -80%,#56402c 0%,transparent 63%),linear-gradient(118deg,#192130,#121a28 64%);
}
.market-intro h1 {font-size:clamp(29px,3vw,47px);letter-spacing:-.045em}
.market-intro .eyebrow {color:#ffd18b}
.market-intro .intro-actions {gap:10px 14px}
#insights-link {border-color:#615037;background:#31291f;color:#ffd391;text-decoration:none}
#insights-link:hover {background:#412f20;border-color:#a17a49}
#dashboard .filterbar {box-shadow:0 6px 19px #0002;border-radius:12px}
#dashboard .chart-panel {background:linear-gradient(160deg,#171f2d 0%,var(--surface) 45%)}
#chart-tooltip small {color:var(--muted);display:block;margin-top:7px}
#price-view,.insights {scroll-margin-top:140px}

.insights {container-type:inline-size;margin:24px 0 20px;min-width:0}
.insight-section-heading {display:flex;align-items:center;justify-content:space-between;flex-wrap:wrap;gap:8px 14px;margin-bottom:12px}
.insight-section-heading h2 {display:flex;align-items:center;gap:8px;margin:0;font-size:22px;line-height:1.22;letter-spacing:-.025em}
.insight-section-heading h2 i {width:19px;height:19px;color:var(--amber)}
#insights-scope {font-size:13px;color:var(--muted);margin-top:4px}
.insight-period {display:inline-flex;align-items:center;gap:6px;padding:5px 9px;border:1px solid var(--border);border-radius:7px;background:#182131;color:var(--muted);font-size:12px;font-weight:650}
.insight-period i,.insight-empty i {width:15px;height:15px;flex:none;color:var(--amber)}
.insight-grid {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:11px}
.insight-card {display:flex;flex-direction:column;min-width:0;margin:0;padding:14px;background:linear-gradient(145deg,#192233 0%,var(--surface) 84%);border-radius:13px}
.insight-heading {display:flex;align-items:center;gap:10px;margin-bottom:13px}
.insight-heading .panel-icon {width:34px;height:34px;flex-basis:34px;background:#302820}
.insight-heading .panel-icon svg {width:17px;height:17px}
.insight-heading h3 {margin:0;font-size:15px;line-height:1.25}
.insight-heading p {margin:4px 0 0;color:var(--muted);font-size:11px;line-height:1.3}
.insight-chart {display:grid;align-content:start;gap:9px;min-height:125px}
.insight-value {display:grid;gap:2px}
.insight-value strong {color:var(--ink);font:600 22px/1.1 var(--mono);letter-spacing:-.04em}
.insight-value[data-tone=good] strong,.mover-column[data-tone=good] .mover-change {color:var(--analysis-good)}
.insight-value[data-tone=rise] strong,.mover-column[data-tone=rise] .mover-change {color:var(--analysis-rise)}
.insight-value span,.insight-caption,.insight-empty {font-size:11px;color:var(--muted)}
.insight-empty {display:flex;gap:8px;align-items:center;min-height:50px;line-height:1.45}
.insight-empty i {color:var(--subtle)}
.direction-bar {display:flex;gap:2px;height:7px;overflow:hidden;background:var(--analysis-track);border-radius:20px}
.direction-bar span {flex-basis:0;min-width:2px}
.direction-bar span,.insight-dot,.index-track span {background:var(--tone,var(--analysis-neutral))}
.insight-card [data-tone=good] {--tone:var(--analysis-good)}
.insight-card [data-tone=rise] {--tone:var(--analysis-rise)}
.insight-legend,.level-bars {display:grid;gap:5px;list-style:none;margin:0;padding:0;min-width:0}
.insight-legend li,.level-bars li {display:grid;align-items:center;gap:6px;font-size:11px;color:var(--muted)}
.insight-legend li {grid-template-columns:7px minmax(0,1fr) auto}
.insight-legend strong,.level-bars strong {font:500 11px var(--mono);color:var(--ink);text-align:right}
.insight-dot {width:6px;height:6px;border-radius:50%}
.stock-figure {display:grid;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:10px}
.stock-ring {width:77px;height:77px;border-radius:50%;display:grid;place-items:center;background:conic-gradient(var(--analysis-good) 0 var(--stock-in),var(--analysis-rise) var(--stock-in) var(--stock-known),var(--analysis-neutral) var(--stock-known) 100%)}
.stock-ring .insight-value {height:calc(100% - 12px);width:calc(100% - 12px);place-content:center;text-align:center;border-radius:50%;background:#171f2e}
.stock-ring .insight-value strong {font-size:14px}
.stock-ring .insight-value span {font-size:9px}
.level-bars li {grid-template-columns:minmax(55px,auto) minmax(14px,1fr) minmax(15px,auto)}
.level-bars li[data-tier=very-low] {--tier-fill:#62dbad}
.level-bars li[data-tier=low] {--tier-fill:#a2cd86}
.level-bars li[data-tier=average] {--tier-fill:#e3c176}
.level-bars li[data-tier=high] {--tier-fill:#eda875}
.level-bars li[data-tier=extreme] {--tier-fill:#f58c9a}
.level-track {background:var(--analysis-track);height:6px;display:block;overflow:hidden;border-radius:12px}
.level-track span {background:var(--tier-fill);display:block;height:100%;border-radius:inherit;transform-origin:left}
.insight-movers,.shop-index-chart {margin-top:11px}
.shop-index-chart {margin-bottom:14px}
.mover-grid {display:grid;grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr));gap:14px}
.mover-column h4 {display:flex;align-items:center;gap:6px;color:var(--tone);font-size:12px;margin:0 0 7px}
.mover-column h4 i,.mover-row i {width:14px;height:14px}
.mover-row {position:relative;isolation:isolate;display:grid;grid-template-columns:minmax(0,1fr) auto 13px;gap:3px 7px;align-items:center;min-height:47px;margin-top:5px;padding:6px 8px;border:1px solid var(--border);border-radius:8px;color:var(--ink);text-decoration:none;transition:border-color .18s,background .18s;overflow:hidden}
.mover-row::before {content:'';position:absolute;z-index:-1;inset:0 auto 0 0;width:var(--movement);background:color-mix(in srgb,var(--tone) 9%,transparent);transform-origin:left}
.mover-row:hover,.mover-row:focus-visible {border-color:var(--tone);background:#1b2535}
.mover-row strong {font-size:12px;overflow-wrap:anywhere}
.mover-row small {grid-column:1;color:var(--muted);font-size:10px}
.mover-change,.mover-row i {grid-row:1/span 2}
.mover-change {grid-column:2;font:600 12px var(--mono)}
.mover-row i {grid-column:3;color:var(--subtle)}
.index-rows {--index-label:clamp(103px,25%,190px);min-width:0}
.index-axis {margin:0 60px 6px var(--index-label);display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:4px;color:var(--muted);font-size:11px;text-align:center}
.index-axis strong {margin:0 auto;color:var(--ink)}
.index-axis span:first-child {color:var(--analysis-good);text-align:left}
.index-axis span:last-child {color:var(--analysis-rise);text-align:right}
.index-row {display:grid;grid-template-columns:var(--index-label) minmax(0,1fr) 60px;align-items:center;min-height:35px;padding:4px 0;border-top:1px solid var(--hair)}
.index-label {display:grid;gap:1px;padding-right:6px;overflow-wrap:anywhere}
.index-label a {font-weight:750;font-size:12px;color:var(--ink)}
.index-label a:hover {color:var(--amber)}
.index-label small {font-size:10px;color:var(--muted)}
.index-track {position:relative;height:8px;background:var(--analysis-track);border-radius:7px}
.index-track::after {content:'';position:absolute;left:50%;top:-4px;bottom:-4px;width:1px;background:#9facbf}
.index-track span {height:100%;position:absolute;left:50%;border-radius:inherit;transform-origin:left;animation:insight-fill .44s ease-out both}
.index-track span.index-under {left:auto;right:50%;transform-origin:right}
.index-value {font:600 12px var(--mono);text-align:right;color:var(--ink)}
.insight-animate .direction-bar,.insight-animate .level-track span,.insight-animate .mover-row::before {animation:insight-fill .42s ease-out both;transform-origin:left}
.insight-animate .stock-ring {animation:insight-ring .4s ease-out both}
@keyframes insight-fill {from {transform:scaleX(0)} to {transform:scaleX(1)}}
@keyframes insight-ring {from {transform:scale(.86);opacity:.25} to {transform:scale(1);opacity:1}}
@container (max-width:760px) {.insight-grid {grid-template-columns:repeat(2,minmax(0,1fr))}}
@container (max-width:490px) {.insight-grid {grid-template-columns:1fr}.insight-chart {min-height:0}.stock-figure {grid-template-columns:77px minmax(0,1fr);gap:15px}}
@media (max-width:900px) {.market-intro {flex-wrap:wrap}}
@media (max-width:520px) {
  .market-intro {align-items:flex-start;border-radius:12px}
  .market-intro .intro-actions {gap:7px 12px}
  .index-axis {grid-template-columns:1fr;font-size:10px;margin-right:45px}
  .index-row {grid-template-columns:var(--index-label) minmax(0,1fr) 45px}
  .index-axis span {display:none}
}
@media (prefers-reduced-motion:reduce) {
  #dashboard .insight-card *,#dashboard .insight-card *::before {animation:none!important;transition:none!important}
}

#insight-grid[data-view=overview] {grid-template-columns:repeat(2,minmax(0,1fr))}
#insight-grid[data-view=trends] {grid-template-columns:1fr}
#direction-card .insight-legend {grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
#direction-card .insight-legend li {padding:5px 7px;border-radius:6px;background:#202b3b}
#direction-card .insight-chart {min-height:0}
.trend-board {margin:0 0 19px;scroll-margin-top:145px}
.trend-toolbar {display:flex;justify-content:space-between;align-items:center;flex-wrap:wrap;gap:12px;padding:12px}
.sector-panel {margin-top:12px}
.sector-toolbar {display:flex;align-items:center;gap:8px;margin:0 0 12px;font-size:12px;color:var(--muted)}
.sector-toolbar select {min-height:32px;border-radius:7px;padding:3px 6px;border:1px solid var(--border);background:#141d2b;color:var(--ink)}
.sector-legend {display:flex;gap:7px 14px;flex-wrap:wrap;align-items:center;margin-bottom:7px;color:var(--muted);font-size:11px}
.sector-legend>span {display:flex;gap:5px;align-items:center}
.sector-row {display:grid;grid-template-columns:minmax(108px,1fr) minmax(90px,1.2fr) 61px 12px;align-items:center;gap:7px;border-top:1px solid var(--hair);padding:9px 4px;border-radius:6px;font-size:12px;transition:background .18s,color .18s}
.sector-row:hover,.sector-row:focus-visible {background:#1d293a;color:var(--amber)}
.sector-name {display:flex;align-items:center;gap:7px;overflow-wrap:anywhere;min-width:0}
.sector-name>i,.sector-row>i {width:15px;height:15px;color:var(--subtle)}
.sector-chart {display:grid;gap:3px}
.sector-chart small {color:var(--muted);font-size:10px}
.sector-change {text-align:right;color:var(--tone,var(--ink));font:600 12px var(--mono)}
.sector-panel:has(.sector-row) .direction-bar {transform-origin:left;animation:insight-fill .35s ease-out both}
#more-sectors {align-self:flex-start;margin-top:9px}
.store-coverage {margin:13px 0;padding:0 12px}
.store-coverage summary {padding:12px 0;cursor:pointer;font-weight:750;font-size:13px}
.store-coverage summary i {width:15px;height:15px;margin:0 6px;color:var(--amber)}
#store-coverage-note {color:var(--muted);font-size:12px;margin:0 0 9px}
#store-coverage-rows {max-height:330px;overflow:auto;overscroll-behavior:contain;margin:0 0 8px;scrollbar-width:thin}
.store-coverage-row {display:grid;grid-template-columns:minmax(80px,1fr) minmax(50px,1fr) 52px;align-items:center;gap:8px;padding:5px;border-top:1px solid var(--hair);font-size:12px}
.store-coverage-row a {overflow-wrap:anywhere}
.store-coverage-row a:hover {color:var(--amber)}
.store-coverage-row progress {width:100%;height:8px;accent-color:var(--amber)}
.store-coverage-row span {text-align:right;color:var(--muted);font-family:var(--mono)}
#trend-board,#price-view {animation:market-view-enter .27s ease-out both}
@keyframes market-view-enter {from {opacity:.55;transform:translateY(4px)} to {opacity:1;transform:translateY(0)}}
@container(max-width:490px) {
  #insight-grid[data-view=overview] {grid-template-columns:1fr}
  #direction-card .insight-legend {grid-template-columns:1fr}
}
@media(max-width:520px) {
  .sector-row {grid-template-columns:minmax(0,1fr) 65px 12px}
  .sector-chart {grid-column:1/-1;grid-row:2}
  .sector-change {grid-column:2;grid-row:1}
  .sector-row>i {grid-column:3;grid-row:1}
}
