.trend-hero { padding-block: clamp(1.65rem, 5vw, 3.25rem) 1.4rem; }
.trend-hero h1 { font-size: clamp(2.15rem, 5.2vw, 4rem); }
.trend-explorer { margin-bottom: 2.6rem; }
.trend-explorer .state-map {
    border: 1px solid var(--line);
    border-radius: 1rem 1rem 0 0;
    background: var(--surface);
}
.state-map--history .state-map__legend { grid-template-columns: 1fr; }
.state-map--history .state-map__svg { height: auto; max-height: 27rem; }
.state-map__band--trend-0 { --state-band: #b36350; }
.state-map__band--trend-1 { --state-band: #d99075; }
.state-map__band--trend-2 { --state-band: #edbd9f; }
.state-map__band--trend-3 { --state-band: #efe7d8; }
.state-map__band--trend-4 { --state-band: #bed6d1; }
.state-map__band--trend-5 { --state-band: #86b6b0; }
.state-map__band--trend-6 { --state-band: #458982; }
.state-map--history .state-map__link { -webkit-tap-highlight-color: transparent; }
.state-map--history .state-map__link[aria-current="true"] :is(path, rect) {
    stroke: var(--night);
    stroke-width: 2.5;
}
.state-map--history .state-map__picker a[aria-current="true"] { font-weight: 750; }
.trend-card {
    display: grid;
    grid-template-columns: clamp(5rem, 16vw, 9rem) 1fr;
    align-items: center;
    padding: .75rem clamp(.7rem, 3vw, 1.7rem);
    gap: clamp(.45rem, 2vw, 1.25rem);
    border-radius: 0 0 1rem 1rem;
    background: var(--night);
    color: var(--on-dark);
}
.trend-wallet { display: block; width: 100%; height: auto; }
.trend-card h2 { font-size: clamp(1.45rem, 3vw, 2.25rem); }
.trend-card__body { grid-column: 2; min-width: 0; }
.trend-card__body p { margin-top: .25rem; }
.trend-card__change strong { margin-right: .22em; font-size: 1.25em; color: var(--highlight); }
.trend-card__period { color: #bcd0e1; font-size: .84rem; }
.trend-card__links, .trend-steps { display: flex; flex-wrap: wrap; align-items: center; gap: .4rem .65rem; }
.trend-card__links { margin-top: .65rem; }
.trend-card__links a, .trend-steps button {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    color: var(--on-dark);
}
.trend-steps button {
    padding: 0 .72rem;
    border: 1px solid #8fa9bf;
    border-radius: .4rem;
    background: transparent;
    font: inherit;
    cursor: pointer;
}
.trend-steps button:disabled { opacity: .5; cursor: default; }
.trend-card :focus-visible { outline-color: var(--highlight); }
.trend-tooltip {
    position: fixed;
    z-index: 5;
    display: flex;
    align-items: center;
    gap: .35rem;
    max-width: min(19rem, calc(100vw - 1.5rem));
    padding: .4rem .7rem .4rem .35rem;
    border: 1px solid #435b73;
    border-radius: .6rem;
    background: var(--night);
    color: var(--on-dark);
    box-shadow: 0 .4rem 1rem #17294020;
    pointer-events: none;
}
.trend-tooltip img { width: 4.3rem; height: auto; }
.trend-tooltip p { margin-top: .18rem; font-size: .84rem; color: var(--highlight); }
.trend-table { margin-block: 0 3rem; }
.trend-table table, .history-values table {
    min-width: 0;
    margin-top: .75rem;
    background: var(--surface);
}
.trend-table :is(th, td), .history-values :is(th, td) {
    padding: .6rem clamp(.25rem, 1.1vw, .8rem);
    overflow-wrap: anywhere;
}
.trend-table th:first-child { width: 12%; }
.trend-table th:nth-child(2) { width: 39%; }
.trend-table th:nth-child(3) { width: 19%; }
.trend-table__value { color: var(--wage-accent); font-weight: 730; }
.state-history {
    margin-block: 0 2rem;
    padding: clamp(.85rem, 3vw, 1.5rem);
    border: 1px solid var(--line);
    border-radius: 1rem;
    background: var(--surface);
}
.state-history h3, .state-history h4 { margin: 0 0 .4rem; }
.history-chart {
    --pay-line: #a34834;
    --price-line: #235e70;
    margin: .3rem 0 1rem;
    padding: .9rem .5rem .4rem;
    border-top: 1px solid var(--line);
}
.history-chart figcaption p { color: var(--muted); }
.history-chart__legend {
    display: flex;
    flex-wrap: wrap;
    gap: .3rem 1.1rem;
    padding: 0;
    margin: .5rem 0 0;
    list-style: none;
    font-size: .9rem;
}
.history-chart__legend li::before {
    content: "";
    display: inline-block;
    width: 1.25em;
    margin-right: .35em;
    border-top: 3px solid var(--series-color);
    vertical-align: .18em;
}
.history-chart__wage { --series-color: var(--pay-line); }
.history-chart__price { --series-color: var(--price-line); }
.history-chart__legend .history-chart__price::before { border-top-style: dashed; }
.history-chart__plot { display: block; width: 100%; max-width: 48rem; }
.history-chart__plot text { fill: var(--muted); font-size: 18px; }
.history-chart__grid { stroke: var(--line); stroke-width: 1; }
.history-chart__plot path { fill: none; stroke: var(--series-color); stroke-width: 4; stroke-linejoin: round; }
.history-chart__plot .history-chart__price path { stroke-dasharray: 8 6; }
.history-chart__plot circle { fill: var(--series-color); }
.history-values summary { cursor: pointer; width: fit-content; font-weight: 650; }
.history-occupations { border-top: 1px solid var(--line); margin-top: 1.1rem; padding-top: 1rem; }
.history-occupation-groups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; margin-top: .85rem; }
.history-occupation-groups > div { background: var(--tint); padding: .8rem; border-radius: .6rem; }
.history-occupation-groups ul { margin: 0; padding-left: 1.15rem; }
.history-occupation-groups li { margin-top: .28rem; }
@media (max-width: 43rem) {
    .state-map--history .state-map__legend { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .state-map--history .state-map__legend li { white-space: normal; }
    .trend-card { grid-template-columns: 4.4rem 1fr; }
    .history-occupation-groups { grid-template-columns: 1fr; }
}