/* Tokens, html/body defaults, header chrome and focus/selection styling all
   live in public-finance/css/tokens.css and base.css now — the single
   source for the whole site. This file keeps only the landing page's own
   hero/section/band layout. */

* {
  box-sizing: border-box;
}

button,
input,
select,
textarea {
  font: inherit;
}

a {
  color: inherit;
  text-decoration-color: var(--gold);
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--maroon);
}

/* The landing page has full-bleed bands, so it has no .page wrapper.
   Put the shared header, the in-page links and the footer on the same
   column as the portal pages (--gutter, tokens.css). */
.site-head {
  margin: 0 var(--gutter);
}

body > .foot {
  padding-bottom: 60px;
}

.page-toc,
body > .foot {
  margin-left: var(--gutter);
  margin-right: var(--gutter);
}

/* Page-local links for the landing sections: a second row under the
   header, styled like the header nav links. */
.page-toc {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 10px 4px;
  border-bottom: 1px solid var(--hair);
}

.page-toc a {
  padding: 4px 11px;
  border-bottom: 2px solid transparent;
  color: var(--ink-2);
  font-size: 14.5px;
  text-decoration: none;
  white-space: nowrap;
}

.page-toc a:hover,
.page-toc a:focus-visible {
  background: var(--ground-2);
  border-bottom-color: var(--coral);
  color: var(--maroon);
}

.portal {
  display: grid;
  grid-template-columns: minmax(340px, 0.9fr) minmax(440px, 1.1fr);
  gap: 40px 5vw;
  align-items: center;
  min-height: auto;
  padding: 56px var(--gutter) 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line-strong);
}

.portal > *,
.split > *,
.table-grid > *,
.query-layout > * {
  min-width: 0;
}

.portal-copy {
  max-width: 760px;
}

.kicker {
  margin: 0 0 18px;
  color: var(--maroon);
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  line-height: 1.35;
  text-transform: uppercase;
}

.kicker::before {
  display: inline-block;
  width: 30px;
  height: 1px;
  margin: 0 10px 0 0;
  background: var(--gold);
  content: "";
  vertical-align: 0.28em;
}

h1,
h2,
h3 {
  color: var(--ink);
  font-family: var(--sans);
  font-weight: 750;
}

h1,
h2 {
  font-family: var(--serif);
  font-weight: 400;
}

h1 {
  max-width: 800px;
  margin: 0;
  font-size: clamp(3.2rem, 5.6vw, 5.8rem);
  letter-spacing: -0.025em;
  line-height: 1.02;
}

h1 em {
  font-style: italic;
  color: var(--coral-deep);
}

h2 {
  margin: 0 0 18px;
  font-size: clamp(1.9rem, 2.6vw, 2.8rem);
  letter-spacing: -0.025em;
  line-height: 1.04;
}

h3 {
  margin: 0 0 10px;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.25;
}

p {
  line-height: 1.65;
}

.lede {
  max-width: 58ch;
  margin: 24px 0 0;
  color: var(--ink-soft);
  font-size: clamp(1.05rem, 1.25vw, 1.22rem);
  line-height: 1.55;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 11px;
  margin: 34px 0 23px;
}

.button,
button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 43px;
  margin: 0;
  padding: 9px 17px;
  border: 1px solid var(--maroon);
  border-radius: 0;
  background: transparent;
  color: var(--maroon);
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 140ms ease, color 140ms ease, border-color 140ms ease;
}

.button:hover,
button:hover {
  transform: none;
  background: var(--maroon-deep);
  color: #ffffff;
}

.button.primary {
  background: var(--maroon);
  color: #ffffff;
}

.button.primary:hover {
  background: var(--maroon-deep);
}

.button.secondary {
  background: var(--paper);
}

.button.secondary:hover {
  background: var(--maroon-deep);
}

.release-note {
  max-width: 65ch;
  margin: 0;
  padding-top: 17px;
  border-top: 1px solid var(--gold-soft);
  color: var(--muted);
  font-size: 0.9rem;
}
.release-actions {display:flex;flex-wrap:wrap;gap:14px 22px;margin-top:16px;font-size:.82rem;font-weight:700;}
.release-actions a {color:var(--maroon);text-decoration:underline;text-underline-offset:3px;}
.tool-button {border:1px solid var(--line-strong);background:var(--paper);color:var(--maroon);padding:9px 12px;font:inherit;font-size:.78rem;font-weight:700;cursor:pointer;white-space:nowrap;}
.tool-button:hover,.tool-button:focus-visible {background:var(--maroon);color:var(--paper);}
.tool-button:disabled {opacity:.5;cursor:wait;}
.tool-status {font-size:.76rem;color:var(--muted);align-self:center;}
.citation-box {display:grid;grid-template-columns:minmax(0,1fr) auto;gap:14px 24px;align-items:center;border-top:1px solid var(--gold);padding-top:18px;margin-top:22px;}
.citation-box strong {font-size:.8rem;text-transform:uppercase;letter-spacing:.1em;color:var(--maroon);}
.citation-box p {margin:6px 0 0;font-size:.82rem;color:var(--ink-soft);overflow-wrap:anywhere;}
#citationStatus {grid-column:1 / -1;font-size:.78rem;color:var(--muted);}
.final-band .citation-box {border-top-color:rgba(255,255,255,.25);}
.final-band .citation-box strong {color:var(--gold);}
.final-band .citation-box p,#citationStatus {color:#eadbd5;}

code,
pre {
  font-family: var(--mono);
}

code {
  padding: 1px 4px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--paper-warm);
  color: var(--maroon-deep);
  font-size: 0.82em;
}

.portal-visual {
  display: grid;
  min-width: 0;
  gap: 0;
  border-top: 3px solid var(--maroon);
  border-bottom: 1px solid var(--line-strong);
  background: rgba(255, 255, 255, 0.55);
}

.metric-row {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line-strong);
}

.metric,
.heatmap-shell,
.query-box,
.coverage-table,
.validation-list,
.table-list,
.data-table-wrap,
.pf-table-wrap {
  border-radius: 0;
  box-shadow: none;
}

.metric {
  min-height: 100px;
  padding: 20px 24px;
  border-right: 1px solid var(--line);
}

.metric:last-child {
  border-right: 0;
}

.metric strong {
  display: block;
  font-size: clamp(1.75rem, 3vw, 2.75rem);
}

.metric span {
  display: block;
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.35;
}

.heatmap-shell {
  padding: 22px 18px 24px;
  overflow-x: auto;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 23px;
  color: var(--maroon);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  line-height: 1.25;
  text-transform: uppercase;
}

.section-heading::after {
  flex: 1;
  order: 1;
  min-width: 28px;
  height: 1px;
  background: var(--gold-soft);
  content: "";
}

.section-heading > span {
  order: 0;
}

.section-heading small {
  order: 2;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.05em;
  text-align: right;
  text-transform: none;
}

.heatmap {
  display: grid;
  grid-template-columns: 78px repeat(7, minmax(30px, 1fr));
  gap: 5px;
  align-items: stretch;
}

#coverageHeatmap {
  grid-template-columns: repeat(9, minmax(44px, 1fr));
  min-width: 510px;
}

.heat-label,
.heat-cell {
  display: grid;
  place-items: center;
  min-height: 32px;
  border-radius: 0;
  font-size: 0.72rem;
}

.heat-cell.quality {
  min-height: 52px;
  padding: 5px 2px;
  background: color-mix(in srgb, var(--maroon) var(--quality), var(--coral-deep));
  color: #ffffff;
  font-size: 0.68rem;
  font-variant-numeric: tabular-nums lining-nums;
  line-height: 1.1;
  text-align: center;
}

.heat-label {
  justify-content: start;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

.heat-cell {
  border: 1px solid rgba(75, 10, 30, 0.16);
  color: #ffffff;
  cursor: default;
  transition: border-color 130ms ease, filter 130ms ease;
}

.heat-cell:hover {
  transform: none;
  border-color: var(--maroon-deep);
  filter: brightness(0.95);
}

.heat-cell.released,
.legend-dot.released {
  background: var(--maroon);
}

.heat-cell.recovered,
.legend-dot.recovered,
.heat-cell.partial,
.legend-dot.partial {
  background: var(--warn);
}

.heat-cell.missing,
.legend-dot.missing {
  background: var(--risk);
}

.heat-cell.blank {
  background: #ddd6cf;
  color: var(--ink-soft);
}

.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 9px 18px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.78rem;
}

.legend-dot {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 0;
  border: 1px solid rgba(26, 24, 23, 0.13);
}

.band {
  padding: 56px var(--gutter);
  border-bottom: 1px solid var(--line-strong);
  background: var(--paper);
}

.band:nth-of-type(odd):not(.final-band) {
  background: var(--paper-warm);
}

.band > .section-heading,
.split,
.table-grid,
.query-layout,
.method-grid,
.interactive,
.pf-explore,
.citation {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.split,
.table-grid,
.query-layout {
  display: grid;
  grid-template-columns: minmax(280px, 0.82fr) minmax(420px, 1.18fr);
  gap: 5vw;
  align-items: start;
}

.split > div:first-child > p,
.table-grid > div:first-child > p,
.query-layout > div:first-child > p {
  max-width: 58ch;
  color: var(--ink-soft);
}

.table-list,
.coverage-table,
.validation-list {
  overflow: visible;
  border-top: 3px solid var(--maroon);
  border-bottom: 1px solid var(--line-strong);
  background: transparent;
}

.table-item,
.coverage-row,
.validation-row {
  display: grid;
  gap: 5px;
  padding: 14px 2px;
  border-bottom: 1px solid var(--line);
}

.table-item:last-child,
.coverage-row:last-child,
.validation-row:last-child {
  border-bottom: 0;
}

.table-item strong,
.coverage-row strong,
.validation-row strong {
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 700;
}

.table-item span,
.coverage-row span,
.validation-row span {
  color: var(--muted);
  font-size: 0.86rem;
}

.status {
  width: max-content;
  padding: 2px 0;
  border-bottom: 2px solid currentColor;
  border-radius: 0;
  background: transparent !important;
  color: var(--maroon) !important;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  line-height: 1.25;
  text-transform: none;
}

.status.partial {
  color: var(--warn) !important;
}

.status.missing {
  color: var(--risk) !important;
}

.coverage-table {
  max-width: 100%;
  overflow-x: auto;
}

.coverage-data {
  width: 100%;
  min-width: 0;
  overflow: visible;
  background: transparent;
  font-variant-numeric: tabular-nums lining-nums;
}

.coverage-data table,
table.coverage-data {
  width: 100%;
  min-width: 570px;
  border-collapse: collapse;
  background: transparent;
}

.coverage-data th,
.coverage-data td,
table.coverage-data th,
table.coverage-data td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: right;
  white-space: nowrap;
}

.coverage-data th:first-child,
.coverage-data td:first-child,
table.coverage-data th:first-child,
table.coverage-data td:first-child {
  padding-left: 2px;
  text-align: left;
}

.coverage-data th:last-child,
.coverage-data td:last-child,
table.coverage-data th:last-child,
table.coverage-data td:last-child {
  padding-right: 2px;
}

.coverage-data th,
table.coverage-data th {
  color: var(--maroon);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.coverage-data td,
table.coverage-data td {
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.coverage-data tbody tr:last-child td,
table.coverage-data tbody tr:last-child td {
  border-bottom: 0;
}

.coverage-data tbody tr:hover td,
table.coverage-data tbody tr:hover td {
  background: rgba(201, 162, 95, 0.08);
  color: var(--ink);
}

.coverage-note {
  margin: 13px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.5;
}

.interactive {
  width: 100%;
  max-width: none;
}

.toolbar,
.pf-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
  align-items: flex-end;
  margin: 0 auto 17px;
}

label,
.pf-field > label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--maroon);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

select,
.searchbox input,
.field select,
.field input[type="text"],
.field textarea {
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--line-strong);
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: none;
}

select:hover,
.searchbox input:hover {
  border-color: var(--coral);
}

.pf-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.pf-search {
  flex: 1 1 440px;
}

.pf-grow {
  flex: 1 1 230px;
  min-width: 220px;
  justify-content: flex-end;
}

.pf-note,
.pf-meta,
.pf-hint {
  color: var(--muted);
  font-size: 0.84rem;
}

.pf-meta {
  margin: 0 auto 12px;
}

.pf-hint {
  margin: 13px auto 0;
}

.searchbox {
  position: relative;
  width: 100%;
  min-width: 280px;
  max-width: 620px;
}

.pf-explore .searchbox {
  min-width: 280px;
  max-width: 620px;
}

.searchbox::before {
  left: 11px;
  color: var(--maroon);
}

.searchbox input {
  width: 100%;
  padding-left: 34px;
  font-size: 0.92rem;
}

.searchbox .results {
  top: calc(100% + 4px);
  max-height: min(390px, 56vh);
  padding: 4px;
  overflow-y: auto;
  border: 1px solid var(--maroon-deep);
  border-radius: 0;
  background: var(--surface);
  box-shadow: none;
}

.searchbox .results .r {
  min-height: 42px;
  padding: 7px 9px;
  font-family: var(--sans);
}

.searchbox .results .r:hover,
.searchbox .results .r.hot {
  background: var(--paper-warm);
  box-shadow: inset 3px 0 0 var(--coral);
}

.searchbox .results .r .code,
.searchbox .results .r .amt {
  color: var(--maroon);
  font-family: var(--mono);
}

.searchbox .results .r .under,
.searchbox .results .r .lv,
.searchbox .results .note {
  color: var(--muted);
}

.pf-table-wrap,
.data-table-wrap {
  max-width: none;
  margin: 0 auto;
  overflow-x: auto;
  border: 1px solid var(--line-strong);
  border-top: 3px solid var(--maroon);
  background: var(--surface);
}

.data-table,
.pf-table {
  width: 100%;
  min-width: 880px;
  border-collapse: collapse;
  font-variant-numeric: tabular-nums lining-nums;
}

th,
td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--maroon);
  background: var(--paper-warm);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

td {
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.pf-table tbody tr.pf-can {
  cursor: pointer;
}

.pf-table-wrap {
  max-height: 620px;
  overflow: auto;
}

.pf-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
}

.pf-table tbody tr.pf-can:hover,
.pf-table tbody tr.pf-sel,
.pf-table tbody tr.pf-open {
  background: #faf4f5;
}

.pf-table tbody tr.pf-sel,
.pf-table tbody tr.pf-open {
  box-shadow: inset 3px 0 0 var(--coral);
}

.pf-table th.pf-num,
.pf-table td.pf-num {
  text-align: right;
  white-space: nowrap;
}

.pf-name {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 330px;
}

.pf-indent,
.pf-care,
.pf-code {
  flex: 0 0 auto;
}

.pf-care {
  width: 24px;
  min-height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--maroon);
  font-size: 0.82rem;
}

.pf-care:hover {
  background: var(--maroon);
  color: #ffffff;
}

.pf-care-empty {
  display: inline-block;
}

.pf-code {
  min-width: 46px;
  color: var(--maroon);
  font-family: var(--mono);
  font-size: 0.79rem;
  font-weight: 700;
}

.pf-label {
  flex: 1 1 auto;
  color: var(--ink);
}

.pf-empty,
.nil {
  color: var(--muted);
}

.query-box {
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-top: 3px solid var(--gold);
  background: var(--surface);
}

pre {
  margin: 0;
  padding: 20px;
  overflow-x: auto;
  background: var(--maroon-deep);
  color: #fffaf5;
  font-size: 0.82rem;
  line-height: 1.6;
}

pre code {
  padding: 0;
  border: 0;
  background: transparent;
  color: inherit;
}

.query-box button {
  margin: 14px 12px 14px 16px;
}

#copyStatus {
  color: var(--muted);
  font-size: 0.84rem;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
  border-top: 1px solid rgba(255, 255, 255, 0.32);
  border-bottom: 1px solid rgba(255, 255, 255, 0.32);
}

.method-grid div {
  padding: 24px 24px 26px;
  border-top: 0;
  border-right: 1px solid rgba(255, 255, 255, 0.22);
}

.method-grid div:first-child {
  padding-left: 0;
}

.method-grid div:last-child {
  padding-right: 0;
  border-right: 0;
}

.final-band {
  border-bottom: 0;
  background: var(--maroon-deep);
  color: #f8f0ec;
}

.final-band .section-heading {
  color: var(--gold);
}

.final-band .section-heading::after {
  background: rgba(255, 255, 255, 0.25);
}

.final-band .section-heading small,
.final-band p {
  color: #eadbd5;
}

.final-band h2,
.final-band h3 {
  color: #ffffff;
}

.final-band h3 {
  font-size: 1.12rem;
}

.citation {
  margin-top: 30px;
  color: #eadbd5;
  font-size: 0.92rem;
}

.citation a {
  color: #ffffff;
  font-weight: 700;
  text-decoration-color: var(--gold);
}

.bar-chart {
  display: grid;
  gap: 10px;
  max-width: 1220px;
  margin: 0 auto 18px;
}

.bar-row {
  display: grid;
  grid-template-columns: minmax(170px, 260px) 1fr 90px;
  gap: 12px;
  align-items: center;
}

.bar-track {
  min-height: 27px;
  overflow: hidden;
  border-radius: 0;
  background: var(--line);
}

.bar-fill {
  height: 100%;
  background: var(--maroon);
  transition: width 220ms ease;
}

.bar-value {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.chip,
.status,
.seg,
.crumbs .crumb,
.card-b,
.popover {
  border-radius: 0;
  box-shadow: none;
}

/* .chip.notice/.verify/.serious intentionally not redeclared here —
   controls.css defines them from the shared warn/bad/notice tokens;
   redeclaring with different values made landing-page chips render
   differently from every portal page. Single source of truth. */

.research-preview {padding:24px 28px;border-top:3px solid var(--maroon);background:var(--paper-warm);}
.budget-symbol {margin:0;min-width:0;}
.budget-symbol svg {display:block;width:100%;height:auto;max-height:370px;}
.budget-symbol figcaption {font-size:.81rem;color:var(--muted);text-align:center;margin-top:4px;}
.example-detail {display:grid;grid-template-columns:.82fr 1.18fr;gap:5vw;align-items:center;padding:0 0 32px;}
.example-detail h3 {font-size:1.6rem;letter-spacing:-.025em;}
.example-detail p {color:var(--ink-soft);font-size:.95rem;max-width:66ch;}
.example-detail .research-preview {border-bottom:1px solid var(--line-strong);}
.quality-grid {display:grid;grid-template-columns:1fr 1fr;gap:4vw;align-items:start;}
.quality-grid > * {min-width:0;}
.quality-band {padding-top:40px;padding-bottom:40px;}
.quality-band .coverage-data th,.quality-band .coverage-data td {padding:8px 10px;font-size:.82rem;text-transform:none;letter-spacing:0;}
.quality-band .coverage-data thead th {white-space:normal;vertical-align:bottom;line-height:1.3;}
.quality-band .coverage-data tbody th {font-weight:600;color:var(--ink-soft);background:transparent;}
.quality-band .coverage-data tbody tr:last-child th {border-bottom:0;}
.quality-explanation {scroll-margin-top:90px;}
.quality-explanation h2 {font-size:1.8rem;margin-bottom:12px;}
.quality-explanation > p {font-size:.91rem;color:var(--ink-soft);margin:0 0 18px;}
.quality-explanation .validation-row {grid-template-columns:.7fr 1.3fr;gap:3px 20px;padding:12px 0;}
.quality-explanation .validation-row strong {grid-row:span 2;}
.quality-explanation .validation-row span {font-size:.81rem;}
.quality-band .coverage-note {font-size:.76rem;line-height:1.5;margin-top:14px;}
.contribute-layout {display:grid;grid-template-columns:.85fr 1.15fr;gap:5vw;align-items:start;}
.contribute-intro h2 {max-width:16ch;}
.contribute-intro > p {max-width:65ch;font-size:.95rem;color:var(--ink-soft);}
.contribute-intro .button {font-size:.88rem;margin-top:8px;}
.contribute-intro .contribute-access {font-size:.76rem;color:var(--muted);margin-top:14px;max-width:62ch;}
.contribution-types {margin:0;border-top:3px solid var(--maroon);}
.contribution-types > div {padding:17px 0;border-bottom:1px solid var(--line-strong);}
.contribution-types dt {font-size:1rem;font-weight:750;margin-bottom:6px;}
.contribution-types dd {margin:0;font-size:.91rem;color:var(--ink-soft);line-height:1.55;}
.contribution-types a {font-weight:650;color:var(--maroon);}
.contribution-release {border-top:1px solid var(--gold);padding-top:18px;margin:28px 0 0;font-size:.82rem;color:var(--muted);}
.research-preview h2 {font-size:1.5rem;letter-spacing:-.025em;margin-bottom:18px;}
.research-preview .section-heading {margin-bottom:18px;}
.example-toolbar {display:flex;align-items:center;justify-content:space-between;gap:20px;margin-bottom:24px;}
.example-toolbar label {font-size:.8rem;letter-spacing:0;text-transform:none;color:var(--ink-soft);}
.example-toolbar select {min-width:128px;font-size:.85rem;font-weight:600;}
.health-chart {display:grid;gap:16px;min-height:160px;}
.health-bar {display:grid;grid-template-columns:116px minmax(0,1fr) 92px;align-items:center;gap:16px;font-size:.82rem;}
.health-track {height:25px;background:#e8e2d9;}
.health-fill {height:100%;width:var(--bar-width);background:var(--gold);transition:width 180ms ease;}
.health-bar.revised .health-fill {background:#a38e71;}
.health-bar.actuals .health-fill {background:var(--maroon);}
.health-bar strong {font-variant-numeric:tabular-nums;text-align:right;font-size:.88rem;}
.chart-unit {font-size:.75rem;color:var(--muted);margin:0;text-align:right;}
.example-insight {border-top:1px solid var(--line-strong);margin:16px 0 12px;padding-top:14px;font-weight:650;font-size:.95rem;}
.example-source {font-size:.76rem;line-height:1.5;color:var(--muted);margin:0 0 10px;}
.text-link {font-size:.82rem;font-weight:700;color:var(--maroon);}
.examples-intro {display:grid;grid-template-columns:1fr 1fr;gap:5vw;align-items:start;margin-bottom:24px;}
.examples-intro h2 {margin:0;}
.examples-intro p {margin:0;max-width:65ch;color:var(--ink-soft);}
.example-list {border-top:3px solid var(--maroon);}
.example-row {display:grid;grid-template-columns:54px minmax(0,1fr) 220px;gap:24px;align-items:center;padding:24px 0;border-bottom:1px solid var(--line-strong);}
.example-number {font-size:1.25rem;font-weight:750;color:var(--maroon);align-self:start;}
.example-row h3 {font-size:1.17rem;margin:0 0 7px;letter-spacing:-.015em;}
.example-row p {margin:0;font-size:.93rem;color:var(--ink-soft);max-width:92ch;}
.example-code {display:flex;gap:9px;justify-content:flex-end;}
.example-code a {border:1px solid var(--line-strong);padding:7px 11px;min-width:40px;text-align:center;font-size:.8rem;font-weight:650;text-decoration:none;}
.example-code a:hover {border-color:var(--maroon);background:var(--maroon);color:white;}
.examples-footer {display:flex;justify-content:space-between;align-items:center;gap:32px;margin:20px 0 38px;}
.examples-footer p {max-width:85ch;font-size:.82rem;color:var(--muted);margin:0;}
.examples-footer .button {flex-shrink:0;font-size:.82rem;}
.getting-started {display:grid;grid-template-columns:minmax(260px,.6fr) 1.4fr;gap:36px;border-top:1px solid var(--gold);padding-top:32px;align-items:center;}
.guide-preview {display:block;height:275px;overflow:hidden;border:1px solid var(--line-strong);background:white;}
.guide-preview img {display:block;width:100%;height:100%;object-fit:cover;object-position:top;transition:filter 140ms ease;}
.guide-preview:hover img {filter:contrast(1.1);}
.guide-copy h3 {font-size:1.5rem;letter-spacing:-.02em;}
.guide-copy p {color:var(--ink-soft);font-size:.94rem;max-width:86ch;}
.guide-copy .kicker {font-size:.74rem;color:var(--maroon);margin-bottom:10px;}
.guide-copy .command-label {font-size:.76rem;margin-bottom:8px;}
.guide-copy pre {padding:14px 18px;font-size:.83rem;}
.resource-links {display:flex;gap:24px;margin-top:20px;font-size:.84rem;font-weight:650;color:var(--maroon);}
.research-directions {display:grid;grid-template-columns:1fr 1.6fr;gap:10px 40px;margin-top:32px;padding-top:24px;border-top:1px solid var(--gold);}
.research-directions h3 {font-size:1.3rem;}
.research-directions p {margin:0;font-size:.92rem;color:var(--ink-soft);}
.research-shortcuts {grid-column:2;display:flex;gap:12px;margin-top:12px;}
.research-shortcuts button {font-size:.8rem;}
button:disabled {opacity:.5;cursor:wait;}

@media (max-width: 980px) {
  .site-head,
  .page-toc {
    padding-left: 20px;
    padding-right: 20px;
  }

  .portal {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 62px 24px 54px;
    background: var(--paper);
  }

  .portal-copy {
    max-width: 800px;
  }

  .portal-visual {
    max-width: 760px;
  }

  .split,
  .table-grid,
  .query-layout {
    grid-template-columns: 1fr;
    gap: 34px;
  }

  .method-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .method-grid div:nth-child(2) {
    border-right: 0;
  }

  .method-grid div:nth-child(-n + 2) {
    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  }

  .method-grid div:first-child,
  .method-grid div:nth-child(3) {
    padding-left: 0;
  }

  .method-grid div:nth-child(2),
  .method-grid div:last-child {
    padding-right: 0;
  }
}

@media (max-width: 620px) {
  body {
    font-size: 16px;
  }

  html {
    scroll-padding-top: 12px;
  }

  .portal {
    gap: 44px;
    padding: 50px 20px 44px;
  }

  h1 {
    font-size: clamp(2.75rem, 14.5vw, 4.6rem);
  }

  .lede {
    font-size: 1.05rem;
  }

  .actions {
    align-items: stretch;
    flex-direction: column;
  }

  .button {
    width: 100%;
  }

  .metric-row {
    grid-template-columns: 1fr;
  }

  .metric {
    min-height: auto;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .metric:last-child {
    border-bottom: 0;
  }

  .heatmap-shell {
    overflow-x: auto;
  }

  .heatmap {
    min-width: 500px;
  }

  .band {
    padding: 56px 20px;
  }

  .section-heading {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .section-heading::after {
    flex-basis: 30px;
  }

  .section-heading small {
    flex-basis: 100%;
    text-align: left;
  }

  .pf-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .pf-search,
  .pf-grow {
    flex-basis: auto;
    min-width: 0;
  }

  .release-actions {flex-direction:column;gap:9px;}

  .citation-box {grid-template-columns:1fr;}

  .tool-status {align-self:flex-start;}

  .searchbox,
  .pf-explore .searchbox {
    min-width: 0;
    max-width: none;
  }

  select {
    width: 100%;
  }

  .method-grid {
    grid-template-columns: 1fr;
  }

  .method-grid div,
  .method-grid div:first-child,
  .method-grid div:nth-child(2),
  .method-grid div:nth-child(3),
  .method-grid div:last-child {
    padding: 20px 0;
    border-right: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.22);
  }

  .method-grid div:last-child {
    border-bottom: 0;
  }

  .query-box button {
    margin-bottom: 9px;
  }

  #copyStatus {
    display: block;
    margin: 0 16px 14px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
