:root {
  color-scheme: dark;
  --bg: #0b1210;
  --bg-soft: #101a16;
  --panel: #111b17;
  --line: #28352e;
  --line-bright: #3b4a40;
  --ink: #edf1e8;
  --muted: #9ba79c;
  --quiet: #647268;
  --lime: #d5f078;
  --lime-ink: #18200d;
  --amber: #f0bf6c;
  --red: #ff987f;
  --sans: "Manrope", "Segoe UI", sans-serif;
  --mono: "DM Mono", Consolas, monospace;
  font-family: var(--sans);
  background: var(--bg);
  color: var(--ink);
}

* { box-sizing: border-box; }

html { min-width: 320px; background: var(--bg); }

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(ellipse at 79% 4%, rgba(115, 147, 77, .12), transparent 34rem),
    linear-gradient(180deg, #0d1511 0%, var(--bg) 46rem);
}

button, input { font: inherit; }
a { color: inherit; }

.topbar {
  height: 76px;
  padding: 0 5.2vw;
  border-bottom: 1px solid rgba(163, 184, 163, .12);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  text-decoration: none;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: -.035em;
}
.brand b { color: var(--lime); font-weight: 700; }
.brand-mark {
  position: relative;
  width: 27px;
  height: 27px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(213, 240, 120, .7);
  border-radius: 50%;
}
.brand-mark::before, .brand-mark::after, .brand-mark span {
  content: "";
  position: absolute;
  background: var(--lime);
  border-radius: 1px;
}
.brand-mark::before { width: 1px; height: 14px; transform: rotate(35deg); }
.brand-mark::after { width: 11px; height: 1px; transform: translate(2px, 2px) rotate(-35deg); }
.brand-mark span { width: 4px; height: 4px; border-radius: 50%; }
.topbar-right { display: flex; align-items: center; gap: 30px; }
.data-pulse, .top-link, .eyebrow, .panel-topline, .step-index, .live-tag, .foot-pin,
.metric-label, .metric-period, .section-kicker, .result-meta, .how-number, .footer,
.source-link, .chip, .icms-range-title, .hint-pill { font-family: var(--mono); }
.data-pulse { color: var(--muted); font-size: 10px; letter-spacing: .09em; display: flex; align-items: center; gap: 9px; }
.data-pulse i, .foot-pin { display: inline-block; width: 6px; height: 6px; background: var(--lime); border-radius: 50%; box-shadow: 0 0 12px rgba(213,240,120,.5); }
.top-link { color: var(--muted); font-size: 11px; text-decoration: none; transition: color .2s ease; }
.top-link span { color: var(--lime); margin-left: 4px; }
.top-link:hover { color: var(--ink); }

main { width: min(1440px, 100%); margin: 0 auto; padding: 0 5.2vw; }
.hero {
  min-height: 518px;
  padding: 92px 0 78px;
  display: grid;
  grid-template-columns: minmax(0, 1.04fr) minmax(420px, .96fr);
  gap: clamp(55px, 8vw, 132px);
  align-items: center;
}
.hero-copy { max-width: 640px; }
.eyebrow { display: flex; align-items: center; gap: 12px; color: var(--lime); font-size: 10px; letter-spacing: .13em; margin: 0 0 25px; }
.eyebrow-line { width: 33px; height: 1px; background: #738551; }
.eyebrow span:last-child { color: var(--quiet); }
h1 { margin: 0; font-size: clamp(48px, 6.3vw, 88px); line-height: .99; letter-spacing: -.075em; font-weight: 600; }
h1 em { color: var(--lime); font-style: normal; }
.hero-deck { max-width: 480px; margin: 27px 0 34px; color: #a7b1a6; font-size: 15px; line-height: 1.8; }
.coverage { display: flex; align-items: center; gap: 15px; }
.coverage-mark { color: var(--lime); font-family: var(--mono); font-size: 19px; letter-spacing: -.08em; }
.coverage-mark span { color: #738551; padding: 0 3px; }
.coverage strong, .coverage small { display: block; }
.coverage strong { font-size: 11px; font-weight: 600; }
.coverage small { color: var(--quiet); font-size: 10px; margin-top: 4px; }

.search-panel {
  position: relative;
  padding: clamp(25px, 3vw, 39px);
  border: 1px solid #334139;
  background: linear-gradient(145deg, rgba(23, 34, 28, .96), rgba(15, 24, 19, .94));
  box-shadow: 0 26px 90px rgba(0,0,0,.24), inset 0 1px rgba(255,255,255,.025);
}
.search-panel::after { content: ""; position: absolute; top: -1px; left: 30px; width: 52px; height: 2px; background: var(--lime); }
.panel-topline { display: flex; align-items: center; gap: 10px; color: #9ca99b; font-size: 9px; letter-spacing: .12em; }
.step-index { color: var(--lime); font-size: 12px; }
.live-tag { margin-left: auto; color: #a4bc70; font-size: 8px; letter-spacing: .1em; }
.live-tag::before { content: ""; display: inline-block; width: 5px; height: 5px; margin: 0 6px 1px 0; border-radius: 50%; background: var(--lime); }
.search-label { display: block; margin: 36px 0 12px; color: #e5ebdf; font-size: 14px; font-weight: 600; }
.search-wrap { position: relative; z-index: 4; }
.search-wrap input {
  width: 100%; height: 60px; padding: 0 53px 0 47px;
  border: 1px solid #445347; border-radius: 2px;
  outline: none; background: #0b1310; color: var(--ink);
  font-size: 14px; transition: border-color .2s ease, box-shadow .2s ease;
}
.search-wrap input::placeholder { color: #68766a; }
.search-wrap input:focus { border-color: var(--lime); box-shadow: 0 0 0 3px rgba(213,240,120,.08); }
.search-icon { position: absolute; z-index: 1; top: 20px; left: 16px; width: 19px; color: #92a18d; pointer-events: none; }
.search-wrap kbd { position: absolute; right: 14px; top: 20px; color: #667367; font: 11px var(--mono); }
.search-hint { margin: 11px 0 0; min-height: 17px; color: #758276; font-size: 10px; }
.panel-foot { margin-top: 27px; padding-top: 18px; border-top: 1px solid rgba(163,184,163,.13); color: #839084; display: flex; align-items: center; gap: 9px; font: 9px var(--mono); }
.foot-pin { width: 5px; height: 5px; flex: none; }

.suggestions {
  position: absolute; top: calc(100% + 7px); left: 0; right: 0; z-index: 10;
  margin: 0; padding: 5px; list-style: none; max-height: 340px; overflow: auto;
  border: 1px solid var(--line-bright); background: #121c17;
  box-shadow: 0 18px 42px rgba(0,0,0,.44);
}
.suggestions[hidden] { display: none; }
.suggestion { display: flex; align-items: center; width: 100%; gap: 12px; padding: 12px 11px; border: 0; background: transparent; color: var(--ink); text-align: left; cursor: pointer; }
.suggestion:hover, .suggestion[aria-selected="true"] { background: #1d2a22; }
.suggestion-icon { display: grid; flex: none; place-items: center; width: 29px; height: 29px; border: 1px solid #33433a; color: var(--lime); font: 12px var(--mono); }
.suggestion-main { min-width: 0; flex: 1; }
.suggestion-name { display: block; overflow: hidden; color: #e9eee6; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.suggestion-detail { display: block; margin-top: 3px; color: #829084; font: 9px var(--mono); }
.suggestion-kind { flex: none; color: #83917f; font: 8px var(--mono); letter-spacing: .08em; }
.suggestion-empty { padding: 17px 12px; color: var(--muted); font-size: 12px; line-height: 1.6; }

.result { padding: 0 0 74px; animation: reveal .28s ease both; }
.result[hidden] { display: none; }
@keyframes reveal { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
.result-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin-bottom: 19px; }
.section-kicker { display: flex; gap: 10px; align-items: center; color: var(--lime); font-size: 9px; letter-spacing: .13em; text-transform: uppercase; }
.section-kicker span { color: var(--quiet); }
.result h2 { margin: 10px 0 0; font-size: clamp(25px, 3vw, 37px); font-weight: 600; letter-spacing: -.055em; }
.result-meta { color: #879488; font-size: 10px; text-align: right; }
.back-button { margin-top: 12px; border: 0; padding: 0; background: none; color: var(--lime); font: 10px var(--mono); cursor: pointer; }
.back-button:hover { color: white; }

.tax-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; border: 1px solid var(--line); background: var(--line); }
.tax-card { min-height: 176px; padding: 23px 25px; background: #111a16; position: relative; overflow: hidden; }
.tax-card.primary { background: linear-gradient(135deg, #1b281e, #121b16 80%); }
.tax-card.primary::after { content: "%"; position: absolute; right: 17px; bottom: -37px; color: rgba(213,240,120,.045); font: 126px var(--mono); line-height: 1; }
.metric-label { position: relative; z-index: 1; color: #9ca99b; font-size: 9px; letter-spacing: .1em; text-transform: uppercase; }
.metric-value { position: relative; z-index: 1; margin-top: 24px; color: #edf1e8; font-size: clamp(31px, 4vw, 47px); line-height: 1; letter-spacing: -.065em; font-weight: 500; }
.primary .metric-value { color: var(--lime); }
.metric-value small { font: 12px var(--mono); color: #a6b19f; letter-spacing: 0; margin-left: 4px; }
.metric-period { position: relative; z-index: 1; margin-top: 12px; color: #728074; font-size: 9px; }
.icms-control { display: flex; align-items: center; gap: 7px; margin-top: 14px; position: relative; z-index: 1; }
.icms-control input { width: 90px; height: 31px; padding: 0 8px; border: 1px solid #465449; border-radius: 1px; outline: none; background: #0b1310; color: var(--ink); font: 11px var(--mono); }
.icms-control input:focus { border-color: var(--lime); }
.icms-control span { color: #829084; font: 9px var(--mono); }
.icms-band-note { position: relative; z-index: 1; min-height: 13px; margin-top: 8px; color: #839084; font-size: 9px; }

.detail-lower { display: grid; grid-template-columns: minmax(0, 1fr) minmax(250px, .58fr); gap: 12px; margin-top: 12px; }
.info-box { border: 1px solid var(--line); background: rgba(17,27,23,.82); padding: 19px 22px; }
.info-title { margin: 0 0 12px; color: #c9d1c6; font: 10px var(--mono); letter-spacing: .09em; text-transform: uppercase; }
.range-list { display: flex; flex-wrap: wrap; gap: 7px; }
.chip { padding: 8px 9px; border: 1px solid #35443a; color: #b4c0b2; font-size: 9px; }
.chip strong { color: var(--lime); font-weight: 500; }
.source-link { display: inline-flex; align-items: center; gap: 7px; color: var(--lime); font-size: 10px; text-decoration: none; }
.source-link:hover { text-decoration: underline; text-underline-offset: 4px; }
.source-note { margin: 11px 0 0; color: #849084; font-size: 10px; line-height: 1.65; }
.quality-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; padding: 12px 14px; border-left: 2px solid var(--amber); background: rgba(240,191,108,.07); color: #d7c39e; font-size: 10px; line-height: 1.65; }
.quality-note.official { border-color: #91bd68; background: rgba(145,189,104,.06); color: #b8c9a5; }
.quality-note svg { flex: none; width: 14px; margin-top: 1px; }
.share-row { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 14px; }
.share-button { min-height: 36px; padding: 0 13px; border: 1px solid #56664e; background: transparent; color: #c8d5c2; cursor: pointer; font: 9px var(--mono); letter-spacing: .02em; transition: border-color .2s, background .2s, color .2s; }
.share-button:hover { border-color: var(--lime); background: #1a271d; color: var(--lime); }
.share-button span { color: var(--lime); margin-left: 6px; }
.share-status { color: #9fb696; font: 9px var(--mono); }
.city-note { margin: 0 0 12px; padding: 12px 14px; border: 1px solid #3a473b; color: #adb8aa; font-size: 11px; line-height: 1.6; }

.history-panel { margin-top: 12px; padding: 22px 24px 18px; border: 1px solid var(--line); background: linear-gradient(145deg, rgba(17,27,23,.96), rgba(13,21,17,.94)); }
.history-head { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.history-head h3 { margin: 9px 0 0; color: var(--ink); font-size: 20px; font-weight: 600; letter-spacing: -.045em; }
.history-controls { display: flex; align-items: end; justify-content: flex-end; flex-wrap: wrap; gap: 14px 18px; }
.competence-control { display: grid; gap: 7px; }
.competence-control > span, .period-label { color: #829084; font: 8px var(--mono); letter-spacing: .1em; }
.competence-control select { min-width: 112px; height: 34px; padding: 0 25px 0 10px; border: 1px solid #405045; border-radius: 1px; outline: none; background: #0b1310; color: var(--ink); font: 10px var(--mono); }
.competence-control select:focus { border-color: var(--lime); }
.period-control { display: flex; align-items: center; gap: 8px; }
.period-label { align-self: center; margin-right: 3px; }
.period-control button { width: 27px; height: 29px; border: 1px solid #3d4b40; border-radius: 1px; background: #111b16; color: var(--lime); cursor: pointer; font: 16px var(--mono); transition: background .2s ease, border-color .2s ease; }
.period-control button:hover:not(:disabled) { border-color: var(--lime); background: #1b281e; }
.period-control button:disabled { opacity: .35; cursor: not-allowed; }
.period-control input { width: 104px; height: 4px; accent-color: var(--lime); cursor: pointer; }
.period-control input:disabled { opacity: .35; cursor: not-allowed; }
.period-control output { min-width: 67px; color: #aab5a8; font: 9px var(--mono); text-align: right; }
.average-toggle { display: inline-flex; align-items: center; gap: 8px; color: #c5cec2; font-size: 10px; cursor: pointer; white-space: nowrap; }
.average-toggle input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.toggle-track { width: 29px; height: 16px; position: relative; border: 1px solid #526052; border-radius: 20px; background: #202b23; transition: background .18s, border-color .18s; }
.toggle-track::after { content: ""; position: absolute; top: 3px; left: 3px; width: 8px; height: 8px; border-radius: 50%; background: #899489; transition: transform .18s, background .18s; }
.average-toggle input:checked + .toggle-track { border-color: #9dbb59; background: #354323; }
.average-toggle input:checked + .toggle-track::after { transform: translateX(13px); background: var(--lime); }
.average-toggle input:focus-visible + .toggle-track { outline: 2px solid var(--lime); outline-offset: 3px; }
.average-period { display: grid; gap: 5px; }
.average-period span { color: #829084; font: 8px var(--mono); letter-spacing: .1em; }
.average-period input { width: 58px; height: 29px; padding: 0 6px; border: 1px solid #405045; border-radius: 1px; outline: none; background: #0b1310; color: var(--ink); font: 10px var(--mono); }
.average-period input:focus { border-color: var(--lime); }
.average-period input:disabled { opacity: .4; }
.history-chart-layout { display: grid; grid-template-columns: minmax(0, 1fr) 142px; gap: 16px; align-items: center; }
.chart-legend { display: flex; flex-direction: column; align-items: flex-start; gap: 11px; color: #b9c3b6; font: 10px var(--mono); }
.legend-title { margin-bottom: 3px; color: #e4ebe0; font-size: 11px; }
.chart-legend > span:not(.chart-window) { display: inline-flex; align-items: center; gap: 8px; }
.chart-legend i { display: inline-block; width: 9px; height: 9px; flex: none; }
.legend-pis { background: #aeb6af; }
.legend-cofins { background: #00c896; }
.legend-average { width: 18px !important; height: 2px !important; background: var(--lime); }
.chart-window { margin-top: 7px; color: #768479; font-size: 8px; }
.history-chart { width: 100%; min-width: 0; min-height: 120px; overflow-x: auto; overflow-y: hidden; border-top: 1px solid rgba(163,184,163,.1); border-bottom: 1px solid rgba(163,184,163,.1); }
.history-svg { display: block; width: auto; max-width: none; height: auto; overflow: visible; }
.chart-gridline { stroke: #28352e; stroke-width: 1; }
.chart-y-label, .chart-x-label { fill: #7e8a7f; font: 10px var(--mono); }
.chart-x-label { font-size: 8px; }
.bar-pis { fill: #aeb6af; }
.bar-cofins { fill: #00c896; }
.bar-value { font: 8px var(--mono); pointer-events: none; }
.bar-value-pis, .bar-value-cofins { fill: #18211b; }
.bar-value-small { fill: #202820; stroke: rgba(240,245,236,.48); stroke-width: .55px; paint-order: stroke; }
.moving-average-line { fill: none; stroke: var(--lime); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.moving-average-point { fill: var(--lime); stroke: #111a15; stroke-width: 1.5; }
.chart-average-label { fill: var(--lime); font: 8px var(--mono); letter-spacing: .06em; }
.history-note { margin: 12px 0 0; color: #7f8c80; font-size: 9px; line-height: 1.65; }
.history-table { margin-top: 10px; }
.history-table summary { width: fit-content; color: #a8b4a6; cursor: pointer; font: 9px var(--mono); }
.history-table summary:hover { color: var(--lime); }
.history-table-scroll { max-height: 260px; margin-top: 10px; overflow: auto; border: 1px solid #2d3a31; }
.history-table table { width: 100%; border-collapse: collapse; font: 10px var(--mono); }
.history-table th, .history-table td { padding: 8px 11px; border-bottom: 1px solid #253129; text-align: right; }
.history-table th:first-child, .history-table td:first-child { text-align: left; }
.history-table th { position: sticky; top: 0; background: #17211b; color: #99a697; font-weight: 400; }
.history-table td { color: #d0d8ce; }

.candidate-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.candidate { display: flex; align-items: center; justify-content: space-between; gap: 15px; padding: 18px 20px; border: 1px solid var(--line); background: #111a16; color: var(--ink); text-align: left; cursor: pointer; transition: border-color .2s, background .2s, transform .2s; }
.candidate:hover { transform: translateY(-2px); border-color: #70834d; background: #16211b; }
.candidate-name { display: block; font-size: 14px; font-weight: 600; }
.candidate-code { display: block; margin-top: 5px; color: #849084; font: 9px var(--mono); }
.candidate-arrow { color: var(--lime); font-size: 19px; }
.empty-state { margin: 8px 0 0; padding: 24px; border: 1px dashed #465347; color: #a8b3a5; font-size: 12px; line-height: 1.7; }
.empty-state strong { color: var(--ink); }

.how { min-height: 91px; display: grid; grid-template-columns: 150px minmax(0,1fr) auto; gap: 22px; align-items: center; border-top: 1px solid rgba(163,184,163,.16); border-bottom: 1px solid rgba(163,184,163,.16); }
.how-number { color: var(--lime); font-size: 9px; letter-spacing: .08em; }
.how-number span { margin-left: 6px; color: #778379; }
.how p { max-width: 720px; margin: 0; color: #889589; font-size: 10px; line-height: 1.7; }
.how a { color: #b8c3b4; font: 9px var(--mono); text-decoration: none; white-space: nowrap; }
.how a span { color: var(--lime); }
.how a:hover { color: var(--lime); }
.footer { min-height: 72px; padding: 0 5.2vw; display: flex; align-items: center; justify-content: space-between; gap: 20px; color: #667267; font-size: 8px; letter-spacing: .06em; }
.footer-dot { color: var(--lime); margin: 0 5px; }
.footer-links { display: flex; align-items: center; gap: 16px; font: 9px var(--mono); letter-spacing: 0; }
.footer-links a, .footer-links button { border: 0; padding: 0; background: none; color: #899589; font: inherit; text-decoration: none; cursor: pointer; }
.footer-links a:hover, .footer-links button:hover { color: var(--lime); }
.no-script { margin: 0 5.2vw; padding: 16px 18px; border: 1px solid #465347; background: #111a16; color: #b4c0b2; font-size: 12px; line-height: 1.6; }
.no-script strong { color: var(--ink); }
.no-script a { color: var(--lime); }
.consent-banner { position: fixed; z-index: 30; right: 22px; bottom: 22px; left: 22px; max-width: 760px; margin-left: auto; padding: 18px 20px; display: flex; align-items: center; gap: 22px; justify-content: space-between; border: 1px solid #536348; background: #151f19; box-shadow: 0 19px 60px rgba(0,0,0,.45); color: #d4dcd0; }
.consent-banner[hidden] { display: none; }
.consent-banner strong { display: block; color: var(--ink); font-size: 12px; }
.consent-banner p { max-width: 430px; margin: 5px 0 0; color: #8d9a8d; font-size: 10px; line-height: 1.6; }
.consent-actions { display: flex; align-items: center; flex: none; gap: 9px; }
.consent-actions button { height: 32px; padding: 0 12px; border: 1px solid #4b5b4a; background: transparent; color: #c4cec0; cursor: pointer; font: 9px var(--mono); }
.consent-actions button:hover { border-color: var(--lime); color: var(--lime); }
.consent-actions .consent-accept { border-color: #a9c85c; background: var(--lime); color: var(--lime-ink); }
.consent-actions .consent-accept:hover { background: #e3ff91; color: var(--lime-ink); }
.consent-actions a { color: #a6b2a4; font: 9px var(--mono); text-decoration: none; }
.consent-actions a:hover { color: var(--lime); }

.load-error { border-color: rgba(255,152,127,.45); color: #e4a89b; }
.legal { max-width: 760px; padding: 70px 0 80px; }
.data-page { max-width: 1320px; }
.data-page h1 { font-size: clamp(38px, 5vw, 58px); }
.data-table-wrap { margin: 30px 0 18px; overflow-x: auto; border: 1px solid var(--line); }
.data-table { width: 100%; border-collapse: collapse; font-size: 11px; }
.data-table caption { padding: 12px 14px; color: #8b988c; font: 9px var(--mono); text-align: left; }
.data-table th, .data-table td { padding: 10px 12px; border-bottom: 1px solid #253129; text-align: left; vertical-align: top; }
.data-table th { position: sticky; top: 0; z-index: 1; background: #17211b; color: #aebba9; font: 9px var(--mono); font-weight: 400; white-space: nowrap; }
.data-table td { color: #c8d1c6; }
.data-table td small { display: block; margin-top: 4px; color: #718074; font: 8px var(--mono); }
.data-table td a { color: var(--lime); text-decoration: none; white-space: nowrap; }
.data-table td a:hover { text-decoration: underline; }
.data-table tr:hover td { background: #142019; }
.legal h1 { margin: 0 0 20px; font-size: clamp(42px, 6vw, 66px); }
.legal h2 { margin: 38px 0 9px; color: #e5ebdf; font-size: 18px; font-weight: 600; letter-spacing: -.035em; }
.legal p { margin: 0 0 13px; color: #a5b0a4; font-size: 13px; line-height: 1.8; }
.legal code { padding: 2px 5px; background: #18231b; color: #cfe697; font: 10px var(--mono); }
.legal a { color: var(--lime); }
.legal-deck { max-width: 620px; margin-bottom: 30px !important; font-size: 15px !important; }
.legal-button { height: 34px; padding: 0 12px; border: 1px solid #4b5b4a; background: transparent; color: var(--lime); cursor: pointer; font: 9px var(--mono); }
.legal-button:hover { border-color: var(--lime); background: #1a271d; }
.legal-back { margin-top: 36px !important; font: 10px var(--mono) !important; }
@media (max-width: 700px) { .legal { padding: 48px 0 54px; } }

@media (min-width: 1500px) { main { padding-inline: 0; } }
@media (max-width: 900px) {
  .hero { grid-template-columns: minmax(0,1fr) minmax(340px,.9fr); gap: 36px; padding-top: 72px; }
  h1 { font-size: clamp(46px, 7vw, 68px); }
  .topbar { padding-inline: 4vw; }
  main { padding-inline: 4vw; }
}
@media (max-width: 820px) {
  .hero { grid-template-columns: 1fr; gap: 35px; }
  .hero-copy { max-width: 700px; }
}
@media (max-width: 700px) {
  .topbar { height: 64px; padding-inline: 20px; }
  .data-pulse { display: none; }
  .topbar-right { gap: 0; }
  main { padding-inline: 20px; }
  .hero { display: flex; flex-direction: column; align-items: stretch; gap: 35px; padding: 58px 0 48px; }
  .hero-copy { max-width: none; }
  .eyebrow { margin-bottom: 20px; font-size: 8px; }
  h1 { font-size: clamp(47px, 14vw, 68px); }
  .hero-deck { margin: 20px 0 24px; font-size: 13px; }
  .search-panel { padding: 24px 19px 20px; }
  .search-label { margin-top: 27px; }
  .search-wrap input { height: 56px; }
  .search-icon { top: 18px; }
  .search-wrap kbd { top: 19px; }
  .result { padding-bottom: 48px; }
  .result-heading { align-items: flex-start; flex-direction: column; gap: 10px; }
  .result-meta { text-align: left; }
  .tax-grid { grid-template-columns: 1fr; }
  .tax-card { min-height: 142px; padding: 19px 20px; }
  .metric-value { margin-top: 18px; font-size: 39px; }
  .detail-lower { grid-template-columns: 1fr; }
  .candidate-list { grid-template-columns: 1fr; }
  .history-panel { padding: 19px 15px 15px; }
  .history-head { align-items: flex-start; flex-direction: column; gap: 17px; }
  .history-controls { width: 100%; flex-wrap: wrap; justify-content: space-between; gap: 13px; }
  .period-control { flex: 1 1 100%; }
  .period-control input { flex: 1; }
  .history-chart-layout { grid-template-columns: 1fr; gap: 9px; }
  .chart-legend { flex-direction: row; flex-wrap: wrap; align-items: center; gap: 10px 15px; }
  .legend-title { margin: 0; }
  .chart-window { margin: 0 0 0 auto; }
  .chart-x-label, .chart-y-label { font-size: 11px; }
  .how { grid-template-columns: auto 1fr; gap: 12px; padding: 17px 0; }
  .how-number { align-self: start; padding-top: 2px; }
  .how p { font-size: 9px; }
  .how a { grid-column: 2; }
  .footer { padding: 17px 20px; align-items: flex-start; flex-direction: column; gap: 7px; line-height: 1.5; }
  .footer-links { flex-wrap: wrap; gap: 8px 13px; }
  .consent-banner { right: 12px; bottom: 12px; left: 12px; display: block; padding: 16px; }
  .consent-actions { margin-top: 13px; flex-wrap: wrap; }
}
@media (max-width: 980px) {
  .consent-banner { max-width: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
