/*
 * The Pain Dealer — interface edition 14.0
 * Shared presentation layer, loaded after the preserved page styles.
 * Data, source links, chart scales, and template behavior remain in their
 * original files. Global navigation is maintained by header-v14.css.
 */

:root {
  color-scheme: dark;
  --bg: #101215;
  --bg2: #15181c;
  --panel: #191c20;
  --panel2: #202429;
  --panel-solid: #191c20;
  --panel-2: #202429;
  --paper: #f1eadf;
  --ink: #f1eadf;
  --text: #f1eadf;
  --muted: #b1b4b7;
  --soft: #a7acb2;
  --dim: #a7acb2;
  --gold: #e2b96e;
  --gold-2: #e2b96e;
  --amber: #edcc92;
  --red: #db8073;
  --cyan: #99c5d1;
  --teal: #99c5d1;
  --blue: #a4bfdd;
  --green: #a4c7ae;
  --line: #35383b;
  --line-2: #55595e;
  --stroke: #35383b;
  --stroke2: #55595e;
  --shadow: none;
  --radius: 10px;
  --radius-lg: 10px;
  --serif: Georgia, Cambria, 'Times New Roman', serif;
  --sans: 'Segoe UI', Inter, ui-sans-serif, system-ui, -apple-system, Arial, sans-serif;
  --font: var(--sans);
  --mono: 'SFMono-Regular', Consolas, 'Liberation Mono', monospace;
  --wrap: min(1280px, calc(100% - 64px));
  --jc-bg: var(--bg);
  --jc-paper: var(--paper);
  --jc-gold: var(--gold);
  --jc-red: var(--red);
  --jc-cyan: var(--cyan);
  --jc-line: var(--line);
  --jc-muted: var(--muted);
  --jc-card: var(--panel);
}

html { background: var(--bg); scroll-padding-top: 155px; }
body, body.jcsc, body.nv-profile {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
}
body { overflow-x: clip; }
*, *::before, *::after { box-sizing: border-box; }
::selection { background: #594a32; color: #fff9ef; }
[hidden] { display: none !important; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
img, video { max-width: 100%; }
main, section, article, aside, nav, form { min-width: 0; }
main h1, main h2, main h3 { text-wrap: balance; overflow-wrap: break-word; }
main p, main li { overflow-wrap: break-word; }
main p { line-height: 1.65; }
main a, main button, main input, main select { scroll-margin-top: 160px; }
main :is(h2, h3, section[id]) { scroll-margin-top: 160px; }
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, summary:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 4px;
}
input::placeholder, textarea::placeholder { color: #a7acb2; opacity: 1; }

/* One reading width for current dashboards and the older source pages. */
main, main.rv-wrap, .wrap, .jc-wrap, .rv-wrap, .pd-footer {
  width: min(1280px, calc(100% - 64px));
  max-width: 1280px;
  margin-inline: auto;
}
main { padding-bottom: 24px; }
main > .jc-wrap,
main > .jc-section > .jc-wrap,
main > .section > .wrap,
main > .wrap { width: 100%; }
.nv-profile main { width: 100%; max-width: none; overflow: visible; }
.nv-profile .nv-wrap { width: min(1280px, calc(100% - 64px)); }
.nv-profile .nv-crumbs {
  max-width: 1344px;
  padding: 18px 32px 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: .05em;
}
.nv-profile .nv-crumbs a { color: var(--muted); }

/* Quiet secondary navigation retains every existing destination. */
.pd-tabs {
  padding: 6px max(24px, calc((100vw - 1280px) / 2));
  background: #191c20;
  border-bottom-color: var(--line);
  backdrop-filter: none;
  gap: 4px;
  scrollbar-width: thin;
  scrollbar-color: #6a655a transparent;
}
.pd-tabs::-webkit-scrollbar { display: block; height: 4px; }
.pd-tabs::-webkit-scrollbar-thumb { background: #6a655a; }
.pd-tabs a {
  padding: 9px 12px;
  min-height: 42px;
  border-radius: 5px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.pd-tabs a:hover, .pd-tabs a.active {
  background: #29251e;
  color: var(--paper);
  box-shadow: inset 0 -2px var(--gold);
}
.pd-leafbar {
  padding: 8px max(24px, calc((100vw - 1280px) / 2));
  background: #191c20;
  border-bottom-color: var(--line);
  gap: 4px;
}
.pd-leafbar a { min-height: 40px; padding: 9px 10px; font-size: 13px; font-weight: 600; }
.pd-leafbar b { font-size: 12px; letter-spacing: .055em; }
.jc-rail, .hudbar {
  position: relative;
  top: auto;
  background: var(--bg2);
  backdrop-filter: none;
  border-bottom-color: var(--line);
}
.jc-rail .jc-wrap { min-height: 66px; padding-block: 10px; }
.jc-brand { font-size: 13px; letter-spacing: .06em; }
.jc-brand i { background: var(--gold); box-shadow: none; }
.jc-nav { gap: 8px; }
.jc-nav a { padding: 9px 12px; font-size: 13px; border-radius: 6px; }

/* Newspaper typography belongs to the headline, not every interface label. */
main h1 { font: 700 clamp(38px, 5vw, 60px)/1.07 var(--serif); letter-spacing: -.035em; }
.pd-hero, .jc-mast, .rv-head, .nv-profile .nv-hero {
  min-height: 0;
  padding: 38px 0 28px;
  background: transparent;
  border-bottom: 1px solid var(--line);
}
.pd-hero-copy { max-width: 1000px; }
.pd-hero h1, .jc-mast h1, .rv-head h1, .nv-profile .nv-hero h1,
.hero-copy h1, .hero-panel h1, .hero h1 {
  max-width: 1100px;
  font-family: var(--serif);
  font-size: clamp(40px, 4.9vw, 60px);
  font-weight: 700;
  line-height: 1.07;
  letter-spacing: -.035em;
  margin: 8px 0 0;
  text-shadow: none;
}
.pd-hero p, .jc-deck, .rv-head p, .nv-profile .nv-deck, .hero-deck {
  max-width: 850px;
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
  margin: 16px 0 0;
}
.hero {
  min-height: 0;
  grid-template-columns: minmax(0, 1.5fr) minmax(240px, .5fr);
  gap: 36px;
  padding: 38px 0 28px;
}
.hero .deck { font-size: 17px; line-height: 1.65; color: var(--muted); margin-top: 16px; }
.hero h1 .hot { color: var(--gold); text-shadow: none; }
.portrait-shell { min-height: 0; }
.portrait-shell .portrait, .portrait-shell .portrait-frame { width: 100%; max-width: 300px; border-radius: 10px; clip-path: none; }
.portrait-shell .portrait::after, .portrait-frame::before { content: none; }
.portrait-stamp { bottom: 12px; right: 0; font-size: 12px; transform: none; box-shadow: none; }
.portrait-code { position: static; transform: none; margin-top: 10px; font-size: 12px; }
.metric-strip { margin-bottom: 32px; }
.pd-eyebrow, .pd-section-head small, .jc-edition, .jc-kicker,
.rv-kicker, .nv-profile .nv-kicker, .eyebrow, .kicker {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.5;
  letter-spacing: .095em;
  color: var(--gold);
}
.pd-section, .jc-section, .section, .nv-profile .nv-section { padding: 32px 0; }
.pd-section-head, .jc-head, .section-head, .nv-profile .nv-section-head {
  align-items: start;
  gap: 20px 32px;
  margin-bottom: 20px;
}
.pd-section-head h2, .jc-head h2, .section-head h2, .nv-profile .nv-section-head h2 {
  font: 650 clamp(26px, 3vw, 36px)/1.16 var(--serif);
  letter-spacing: -.02em;
  margin-top: 7px;
  color: var(--paper);
}
.pd-section-head > p, .jc-head p, .section-head p, .nv-profile .nv-section-head p {
  font-size: 15px;
  line-height: 1.65;
  color: var(--muted);
  max-width: 620px;
}
.pd-panel h3, .jc-panel h3, .panel h3, .chart-card h3 {
  font: 650 25px/1.2 var(--serif);
  letter-spacing: -.02em;
}
.pd-callout, .jc-quote { font: 600 21px/1.5 var(--serif); }
.jc-rule { height: 3px; border-top: 1px solid var(--line); border-bottom: 0; margin-top: 24px; }

/* Flat surfaces; meaningful status colors keep their own labeled classes. */
.pd-card, .pd-panel, .pd-stat, .pd-lane, .pd-audit, .pd-dir-item,
.pd-kv > div, .pd-jur, .pd-note, .pd-source-row, .pd-empty,
.jc-card, .jc-panel, .jc-stat, .jc-node, .school-kpi,
.rv-stat, .area-card, .history-event, .chain-card, .era,
.audit-alert, .year-pip, .source-cta, .panel, .chart-card,
.case-card, .module-card, .status-card, .launch-card, .microstat,
.glass, .metric, .chart-tile, .vault-card {
  background: var(--panel);
  border-color: var(--line);
  border-radius: 10px;
  box-shadow: none;
  backdrop-filter: none;
}
.dossier-panel, .finding, .pulse-card, .scope-card, .context-card,
.payroll-viz, .role-chart, .roster-shell, .big-quote, .progress-card,
.case, .claim-stage, .claim-total, .flow-step, .archive-stat,
.archive-card, .access-card, .ordinance-wrap, .meeting-stat,
.coverage-box, .meeting-card, .stat {
  background: var(--panel);
  border-color: var(--line);
  border-radius: 10px;
  box-shadow: none;
}
.metric b, .pulse-card strong, .stat strong, .meeting-stat b { font: 650 clamp(27px, 3.5vw, 36px)/1.15 var(--sans); }
.metric, .stat, .meeting-stat { min-height: 120px; }
.metric span, .stat span, .pulse-card span, .meeting-stat span { color: var(--muted); font-size: 13px; line-height: 1.5; }
.finding .label, .case .tag, .meeting-date, .meeting-tag, .badge,
.archive-download small, .meeting-download small, .source-ribbon,
.source-meta span, .result-note, .person-hint, .legend, .stack-legend {
  font-size: 12px;
  line-height: 1.5;
}
.finding .note, .panel .sub, .payroll-viz .sub, .role-chart-head p,
.case p, .case .receipt, .flow-step p, .meeting-card p,
.progress-item span, .access-card p { font-size: 14px; line-height: 1.6; color: var(--muted); }
.chart-controls .seg { font-size: 13px; min-height: 42px; }
.axistext, .axislabel { fill: #b1b4b7; font-size: 13px; }
.line-main { filter: none; }
.department-grid { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
.department-grid > *, .dep-list, .dep-row { min-width: 0; max-width: 100%; }
.dep-name { overflow-wrap: anywhere; }
.archive-sourcebar .stamp {
  position: static;
  transform: none;
  max-width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  box-shadow: none;
  font-size: 12px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.pd-card, .jc-card { min-height: 190px; padding: 20px; }
.jc-card { display: flex; flex-direction: column; }
.jc-card footer { position: static; margin-top: auto; padding-top: 14px; flex-wrap: wrap; }
.pd-card h3, .jc-card h3 { font: 650 25px/1.2 var(--serif); margin: 22px 0 10px; }
.pd-card p, .jc-card p, .pd-lane p, .pd-panel p, .jc-panel p { font-size: 15px; line-height: 1.6; }
.pd-card-top, .pd-lane > div > span, .pd-lane > b, .jc-code {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 650;
  line-height: 1.4;
  letter-spacing: .055em;
}
.pd-card:hover, .jc-card:hover, .pd-lane:hover, .pd-dir-item:hover,
.pd-audit:hover, .area-card:hover, .launch-card:hover,
.case-card:hover, .module-card:hover, .vault-card:hover {
  transform: none;
  border-color: #8c7956;
  background: #202429;
  box-shadow: none;
}
.pd-card, .pd-lane, .jc-card, .area-card, .vault-card { transition: background-color .15s, border-color .15s; }
.pd-card.red, .jc-danger { background: #221d1e; border-color: #70433e; }
.pd-card.cyan { border-color: #42606a; }
.pd-note.good { background: #192325; border-color: #42606a; }
.pd-note.warn { background: #27231d; border-color: #74603b; }
.pd-note, .school-note, .rv-note, .audit-alert p { font-size: 15px; line-height: 1.65; }
.pd-badge, .school-tag, .jc-badge, .chain-state, .panel-badge {
  font-size: 12px;
  line-height: 1.3;
  letter-spacing: .025em;
  border-radius: 5px;
  padding: 5px 8px;
}
.pd-badge.red, .school-tag.warn { color: #efa699; border-color: #805047; }
.school-tag.good { color: #b4d5b9; border-color: #507159; }
.pd-callout, .school-note, .jc-quote {
  background: #24221e;
  border-left-width: 3px;
  border-radius: 0 8px 8px 0;
}
.pd-audit { padding: 18px; min-height: 180px; }
.pd-audit h3 { font: 650 22px/1.2 var(--serif); margin-top: 18px; }
.pd-audit p, .pd-dir-item p { font-size: 14px; line-height: 1.55; }
.pd-audit footer { font-size: 12px; line-height: 1.4; flex-wrap: wrap; }
.pd-audit .year { font-size: 12px; }
.pd-dir-item small { font: 650 12px/1.4 var(--sans); letter-spacing: .06em; color: var(--gold); }
.pd-dir-item h3 { font: 650 23px/1.2 var(--serif); }
.pd-dir-item b { font-size: 12px; }
.pd-source-row p, .pd-source-row span, .pd-source-row b { font-size: 13px; line-height: 1.5; }
.pd-stat b, .jc-stat b, .school-kpi b, .rv-stat b, .microstat b { font: 650 30px/1.15 var(--sans); letter-spacing: -.03em; }
.pd-stat span, .school-kpi span, .pd-kv span, .rv-stat span,
.pd-feature span, .status-card small { font-size: 13px; line-height: 1.5; color: var(--muted); }
.pd-stats, .jc-statbar, .school-grid, .rv-stats { gap: 12px; }
.pd-stat, .jc-stat, .school-kpi, .rv-stat { padding: 16px 18px; }
.pd-feature { background: var(--panel); border-top-width: 2px; border-radius: 0 0 8px 8px; }
.pd-feature b { font: 650 27px/1.2 var(--sans); }
.school-number { font: 700 clamp(36px, 5vw, 56px)/1.06 var(--serif); }
.pd-era time { font-size: 18px; }
.pd-era h3, .history-event h3, .chain-card h3, .era h3 { line-height: 1.2; }
.chain-card small, .jc-source { color: var(--muted); font-size: 12px; line-height: 1.6; }
.year-pip span { font-size: 12px; }

/* Remove decoration only: controls, chart marks, and evidence stay visible. */
.pd-noise, .ambient, .grain, .scanlines, .vignette,
.noise, .edge-fade, .halftone-burst, .ink-ripple, .press-flash {
  display: none;
}
.pd-hero::after, .pd-card::before, .pd-jur::after,
.jc-card::after, .history-event::after, .audit-hero::after,
.panel::before, .chart-card::before, .case-card::before,
.module-card::before, .glass::before, .glass::after,
.microstat::before, .metric::after, .vault-card::after {
  content: none;
}
body:has(.portrait-shell)::before, body:has(.portrait-shell)::after,
.meeting-stat::after, .person-dialog::before, .case::before { content: none; }
.pd-dealer-stage::before, .pd-dealer-stage::after,
.paper.p1, .paper.p2, .proof-stamp, .holo::after { animation: none; }
.vault-card { clip-path: none; transform: none; }
.jc-event::before { box-shadow: none; }
.pd-bar i, .pd-progress i, .jc-fill, .gap-fill { background: var(--gold); box-shadow: none; }
.school-fill { background: #a4bfdd; }
.pd-bar, .pd-progress, .school-track, .jc-track { background: #30353a; }
.pd-list-row span, .school-bar span, .jc-bar span { font-size: 14px; line-height: 1.4; }
.pd-list-row b, .school-bar b, .jc-bar b { font-size: 13px; line-height: 1.4; font-variant-numeric: tabular-nums; }
.pd-list-row { grid-template-columns: minmax(125px, 180px) minmax(0, 1fr) 95px; }
.school-bar { grid-template-columns: minmax(140px, 210px) minmax(0, 1fr) 100px; }

/* Tables remain tables. Their own containers provide horizontal scrolling. */
.pd-table-wrap, .jc-table-wrap, .school-table-wrap, .rv-table-wrap,
.pay-history-table, .table-wrap, .table-scroll {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow: auto;
  overscroll-behavior-x: contain;
  -webkit-overflow-scrolling: touch;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel);
  scrollbar-color: #736c5f #202429;
  scrollbar-width: thin;
}
.roster-table-wrap, .person-history-table, .matrix-wrap {
  min-width: 0;
  max-width: 100%;
  overflow: auto;
  scrollbar-color: #736c5f #202429;
}
main table, .pay-history-table table { border-collapse: collapse; font-variant-numeric: tabular-nums; }
.pd-table th, .jc-table th, .school-table th, .rv-table-wrap th,
.pay-history-table th, main .table-wrap th {
  top: 0;
  padding: 13px 15px;
  background: #24282d;
  color: #e6d4b4;
  border-bottom: 1px solid #555248;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .045em;
  line-height: 1.4;
}
.roster-table th, .person-history-table th {
  padding: 13px 15px;
  font: 650 12px/1.4 var(--sans);
  color: #e6d4b4;
  background: #24282d;
  letter-spacing: .045em;
}
.pd-table td, .jc-table td, .school-table td, .rv-table-wrap td,
.pay-history-table td, main .table-wrap td {
  padding: 13px 15px;
  font-size: 14px;
  line-height: 1.55;
  color: #d9d8d4;
  border-bottom-color: #303438;
  vertical-align: top;
}
.roster-table td, .person-history-table td { padding: 13px 15px; font-size: 14px; line-height: 1.55; }
main tbody tr:nth-child(even), .pay-history-table tbody tr:nth-child(even) { background: #1d2024; }
main tbody tr:hover, .pay-history-table tbody tr:hover { background: #292a28; }
.rv-table-wrap td small, main td small { color: var(--muted); font-size: 12px; }
main td a { color: var(--gold); text-underline-offset: 3px; text-decoration: underline; text-decoration-color: #6d5e43; }
main td a:hover { text-decoration-color: var(--gold); }
.school-table td.money, .pay-history-table .money { color: var(--paper); white-space: nowrap; }
.pay-name { color: #ead1a1; min-height: 32px; border-bottom: 1px solid #74603b; line-height: 1.5; }
.pay-name:hover { color: #fff3d3; }
.path, code, main pre { overflow-wrap: anywhere; }
main pre { white-space: pre-wrap; font-size: 13px; }

/* Form controls use a predictable size and visible focus state. */
.pd-filterbar input, .pd-filterbar select, .pay-tools input, .pay-tools select,
.jc-input, .jc-select, .rv-tools input, .rv-tools select,
main input[type='search'], main select {
  min-height: 46px;
  min-width: 0;
  padding: 11px 13px;
  border: 1px solid #595b5d;
  border-radius: 7px;
  background: #171a1e;
  color: var(--paper);
  font-size: 16px;
  line-height: 1.4;
}
.pd-filterbar input { flex-basis: 240px; }
.pd-filterbar select { min-width: 170px; }
.pd-filterbar input:focus, .pd-filterbar select:focus,
.pay-tools input:focus, .pay-tools select:focus { border-color: var(--gold); }
.pd-results-count { font: 500 13px/1.5 var(--sans); padding: 12px 0; color: var(--muted); }
.pd-pill, .rv-back, .btn, .ghost-btn, .rv-tools button, .source-cta a {
  border-radius: 7px;
  font-size: 14px;
  font-weight: 600;
  min-height: 42px;
  box-shadow: none;
  line-height: 1.4;
}
.pd-pill { padding: 10px 13px; }
.pd-pill.active, .pd-pill:hover, .area-card.active { background: #30291f; border-color: #9f8250; color: var(--paper); }
.btn.primary, .source-cta a { background: var(--gold); color: #211b12; border-color: var(--gold); }
.rv-tools { background: var(--panel); border-radius: 10px; backdrop-filter: none; position: relative; top: auto; }
.rv-tools button { background: #30291f; color: #f1d7a7; }

/* Individual profiles share the same evidence-first type and spacing. */
.nv-profile .nv-card, .nv-profile .nv-metric, .nv-profile .nv-breakdown,
.nv-profile .nv-doc, .nv-profile .nv-person, .nv-profile .nv-contact > div {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: none;
}
.nv-profile .nv-card::before { background: #607885; height: 2px; }
.nv-profile .nv-card .label, .nv-profile .nv-metric span,
.nv-profile .nv-person span, .nv-profile .nv-doc small,
.nv-profile .nv-pill {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .045em;
  color: var(--muted);
}
.nv-profile .nv-card .label { color: var(--cyan); }
.nv-profile .nv-metric strong { font: 650 30px/1.15 var(--sans); color: var(--paper); }
.nv-profile .nv-metric { min-height: 110px; }
.nv-profile .nv-card p, .nv-profile .nv-card li { font-size: 15px; line-height: 1.65; color: var(--muted); }
.nv-profile .nv-card h3 { font: 650 23px/1.2 var(--serif); }
.nv-profile .nv-callout { color: var(--muted); background: #202729; border-color: #42606a; border-radius: 8px; font-size: 14px; }
.nv-profile .nv-action { min-height: 44px; padding: 11px 13px; font: 600 13px/1.4 var(--sans); letter-spacing: 0; border-radius: 7px; }
.nv-profile .nv-doc b { color: var(--paper); font-size: 15px; line-height: 1.45; }
.nv-profile .nv-doc i { color: var(--cyan); font: 600 12px/1.4 var(--sans); }
.nv-profile .nv-doc:hover { transform: none; background: #202429; border-color: #6c7d86; }
.nv-profile .nv-bar-row { grid-template-columns: minmax(100px, 125px) minmax(0, 1fr) auto; }
.nv-profile .nv-bar-row span { color: var(--muted); font-size: 14px; }
.nv-profile .nv-bar-row b { font-size: 13px; }
.nv-profile .nv-bar i { background: #99c5d1; }
.nv-profile .nv-warning { background: #27231d; border-color: #74603b; }
.nv-profile .nv-warning::before { background: var(--gold); }
.nv-profile .nv-warning .label { color: var(--gold); }
.nv-profile .nv-contact > div, .nv-profile .nv-contact b { font-size: 14px; }
.nv-profile .nv-person strong { line-height: 1.4; }
.nv-directory-page .pd-dir-item small { color: var(--muted); }

/* Salary histories: readable charts retain their original data and axes. */
.pay-dialog { border-radius: 10px; background: var(--bg); border-color: #595b5d; box-shadow: 0 16px 60px #0009; }
.pay-head { padding: 28px 28px 22px; border-bottom-color: var(--line); }
.pay-head h2 { font: 700 clamp(30px, 4vw, 46px)/1.1 var(--serif); letter-spacing: -.025em; }
.pay-meta { font-size: 14px; line-height: 1.6; color: var(--muted); }
.pay-stats { padding-inline: 28px; grid-template-columns: repeat(5, minmax(0, 1fr)); }
.pay-stat { padding: 15px; border-radius: 8px; background: var(--panel); border-color: var(--line); }
.pay-stat b { font: 650 clamp(20px, 2vw, 27px)/1.2 var(--sans); overflow-wrap: anywhere; }
.pay-stat span { font-size: 12px; line-height: 1.5; color: var(--muted); letter-spacing: .025em; }
.pay-chart-grid { padding-inline: 28px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pay-chart { min-width: 0; overflow: auto; border-radius: 8px; background: var(--panel); border-color: var(--line); }
.pay-chart h3 { font: 650 23px/1.2 var(--serif); }
.pay-chart p { font-size: 13px; line-height: 1.6; color: var(--muted); }
.pay-history { padding-inline: 28px; }
.pay-svg text, .annual-svg text { fill: #c4c4be; font-family: var(--sans); font-size: 14px; }
.pay-close { border-radius: 7px; background: var(--panel2); color: var(--paper); border-color: #65645d; }
.person-dialog { border-radius: 10px; background: var(--bg); border-color: #595b5d; }
.person-head h2 { font: 700 clamp(30px, 4vw, 46px)/1.1 var(--serif); letter-spacing: -.025em; }
.person-kicker { font: 650 12px/1.5 var(--sans); letter-spacing: .055em; }
.person-meta, .person-history .sub { color: var(--muted); font-size: 14px; line-height: 1.6; }
.person-stat, .person-chart-panel { border-radius: 8px; background: var(--panel); border-color: var(--line); }
.person-stats { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.person-stat b { font: 650 clamp(20px, 2vw, 27px)/1.2 var(--sans); }
.person-stat span { font-size: 12px; line-height: 1.5; color: var(--muted); letter-spacing: .025em; }
.person-chart-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.person-chart-panel { overflow: auto; }
.person-chart-panel h3 { font: 650 23px/1.2 var(--serif); }
.person-chart-panel p { color: var(--muted); font-size: 13px; line-height: 1.6; }
.person-chart-svg text { fill: #c4c4be; font-family: var(--sans); font-size: 14px; }
.person-close { border-radius: 7px; background: var(--panel2); }
.school-source small, .school-source p, .school-source > a { font-size: 13px; line-height: 1.5; }
.school-source b { font: 650 22px/1.25 var(--serif); }

.pd-footer, .jc-footer, .rv-footer {
  margin-top: 20px;
  padding: 26px 0 32px;
  border-top: 1px solid var(--line);
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.6;
}
.pd-footer b { color: var(--paper); font: 650 19px/1.3 var(--serif); letter-spacing: -.01em; }
.pd-footer span, .pd-footer-links { font-size: 13px; line-height: 1.6; }
.pd-footer-links { flex-wrap: wrap; gap: 10px 20px; }
.pd-footer-links a { padding-block: 7px; }
.pd-footer-links a:hover { color: var(--gold); text-decoration: underline; text-underline-offset: 4px; }
.nv-profile > footer { border-top: 1px solid var(--line); background: var(--bg); color: var(--muted); }
.nv-profile > footer .nv-wrap { font-size: 13px; }

@media (max-width: 1100px) {
  .pd-grid, .pd-audit-grid, .jc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pd-split { grid-template-columns: minmax(0, 1fr); }
  .pay-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .person-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nv-profile .nv-people { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .nv-profile .nv-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .school-bar { grid-template-columns: minmax(140px, 210px) minmax(0, 1fr) 100px; }
}

@media (max-width: 800px) {
  :root { --wrap: min(1280px, calc(100% - 40px)); }
  main, main.rv-wrap, .wrap, .jc-wrap, .rv-wrap, .pd-footer,
  .nv-profile .nv-wrap { width: calc(100% - 40px); }
  .nv-profile main { width: 100%; }
  .nv-profile .nv-crumbs { padding-inline: 20px; }
  .pd-hero, .jc-mast, .rv-head, .nv-profile .nv-hero { padding: 28px 0 24px; }
  .pd-hero h1, .jc-mast h1, .rv-head h1, .nv-profile .nv-hero h1,
  .hero-copy h1, .hero-panel h1, .hero h1 { font-size: 42px; }
  .hero { grid-template-columns: 1fr; gap: 24px; padding: 28px 0 24px; }
  .portrait-shell { justify-self: start; width: 220px; max-width: 100%; }
  .dossier, .charts, .chart-grid, .department-grid, .scope-grid, .transparency-intro { grid-template-columns: minmax(0, 1fr); }
  .pd-section-head, .jc-head, .section-head { display: block; }
  .pd-section-head > p, .jc-head p, .section-head p { margin-top: 10px; }
  .pd-section, .jc-section, .section, .nv-profile .nv-section { padding: 26px 0; }
  .nv-profile .nv-section-head { grid-template-columns: 1fr; gap: 10px; }
  .nv-profile .nv-grid, .nv-profile .nv-grid.two, .nv-profile .nv-record-layout { grid-template-columns: 1fr; }
  .pd-tabs { padding-inline: 16px; }
  .pd-leafbar { padding-inline: 16px; }
  .pd-leafbar b { flex-basis: 100%; margin: 0; }
  .pd-leafbar .spacer { display: none; }
  .jc-rail .jc-wrap { display: block; }
  .jc-nav { margin-top: 10px; }
  .pd-grid.two, .pd-directory, .jc-two { grid-template-columns: 1fr; }
  .school-grid, .pd-stats, .pd-stats.five, .rv-stats, .jc-statbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pay-chart-grid { grid-template-columns: 1fr; }
  .person-chart-grid { grid-template-columns: 1fr; }
  .person-chart-svg { min-width: 640px; }
  .pay-tools { grid-template-columns: 1fr; }
  .rv-tools { grid-template-columns: 1fr 1fr; }
  .annual-svg { min-width: 760px; min-height: 250px; }
  .pd-panel:has(> .annual-svg) { overflow-x: auto; scrollbar-color: #736c5f #202429; }
  .pay-svg { min-width: 640px; }
  .pay-chart { scrollbar-color: #736c5f #202429; }
  .pay-modal { padding: 12px; }
  .pay-head, .pay-stats, .pay-chart-grid, .pay-history { padding-inline: 20px; }
  .pd-footer { display: block; }
  .pd-footer-links { margin-top: 14px; }
}

@media (max-width: 540px) {
  :root { --wrap: calc(100% - 32px); }
  body { font-size: 15px; }
  main, main.rv-wrap, .wrap, .jc-wrap, .rv-wrap, .pd-footer,
  .nv-profile .nv-wrap { width: calc(100% - 32px); }
  .nv-profile main { width: 100%; }
  .nv-profile .nv-crumbs { padding-inline: 16px; }
  .pd-hero h1, .jc-mast h1, .rv-head h1, .nv-profile .nv-hero h1,
  .hero-copy h1, .hero-panel h1, .hero h1, main h1 { font-size: clamp(32px, 8.4vw, 40px); line-height: 1.12; letter-spacing: -.03em; }
  .pd-hero p, .jc-deck, .rv-head p, .nv-profile .nv-deck, .hero-deck { font-size: 16px; margin-top: 14px; }
  .pd-eyebrow, .jc-edition, .rv-kicker, .nv-profile .nv-kicker { font-size: 12px; letter-spacing: .065em; }
  .pd-section-head h2, .jc-head h2, .section-head h2, .nv-profile .nv-section-head h2 { font-size: 28px; }
  .pd-grid, .pd-grid.two, .pd-audit-grid, .pd-directory, .jc-grid,
  .pd-jur-cards, .pd-feature-strip, .nv-directory-page .pd-directory,
  .nv-profile .nv-docs, .nv-profile .nv-contact, .nv-profile .nv-people { grid-template-columns: 1fr; }
  .pd-card, .jc-card { min-height: 175px; padding: 18px; }
  .pd-card h3, .jc-card h3 { font-size: 24px; margin-top: 18px; }
  .pd-panel, .jc-panel, .nv-profile .nv-card, .nv-profile .nv-breakdown { padding: 18px; }
  .pd-card-top { gap: 10px; }
  .pd-card-top span { overflow-wrap: anywhere; }
  .pd-lane { display: block; padding: 17px; }
  .pd-lane > b { display: block; margin-top: 10px; white-space: normal; }
  .pd-lane h3 { font-size: 24px; line-height: 1.2; }
  .pd-source-row { grid-template-columns: 1fr; gap: 7px; padding: 16px; }
  .pd-source-row b { grid-column: auto; white-space: normal; }
  .pd-list-row { grid-template-columns: minmax(0, 1fr) 90px; gap: 7px 12px; }
  .pd-list-row > .pd-bar { grid-column: 1; grid-row: 2; }
  .pd-list-row > b { grid-column: 2; grid-row: 1 / 3; }
  .school-bar, .jc-bar { grid-template-columns: minmax(0, 1fr) 96px; gap: 5px 12px; }
  .school-bar > .school-track, .jc-bar > .jc-track { grid-column: 1; grid-row: 2; }
  .school-bar > b, .jc-bar > b { grid-column: 2; grid-row: 1 / 3; align-self: center; }
  .school-bars, .jc-bars { gap: 16px; }
  .pd-stat, .school-kpi, .jc-stat, .rv-stat { padding: 14px; }
  .pd-stat b, .school-kpi b, .jc-stat b, .rv-stat b, .nv-profile .nv-metric strong { font-size: 27px; overflow-wrap: anywhere; }
  .pd-stat span, .school-kpi span, .jc-stat span, .rv-stat span { font-size: 12px; }
  .pd-kv { grid-template-columns: 1fr; }
  .pd-filterbar { display: grid; grid-template-columns: 1fr; }
  .pd-filterbar input, .pd-filterbar select { width: 100%; min-width: 0; }
  .rv-tools { grid-template-columns: 1fr; padding: 14px; }
  .pd-dir-item { grid-template-columns: 1fr; }
  .pd-dir-item b { grid-column: 1; grid-row: auto; margin-top: 6px; }
  .nv-profile .nv-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .nv-profile .nv-metric { padding: 14px; min-height: 110px; }
  .nv-profile .nv-bar-row { grid-template-columns: minmax(0, 1fr) auto; gap: 5px 12px; }
  .nv-profile .nv-bar-row > .nv-bar { grid-column: 1; grid-row: 2; }
  .nv-profile .nv-bar-row > b { grid-column: 2; grid-row: 1 / 3; }
  .nv-profile .nv-doc { gap: 10px; }
  .nv-profile .nv-doc small { overflow-wrap: anywhere; }
  .pay-modal { padding: 0; }
  .pay-dialog { margin-top: 0; border-radius: 0; }
  .pay-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .person-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .person-head h2 { font-size: 32px; }
  .dep-row { grid-template-columns: minmax(0, 1fr) auto; gap: 5px 12px; }
  .dep-row .dep-bar { grid-column: 1; grid-row: 2; }
  .dep-row .dep-val { grid-column: 2; grid-row: 1 / 3; }
  .dep-name { font-size: 14px; white-space: normal; }
  .pay-head, .pay-stats, .pay-chart-grid, .pay-history { padding-inline: 16px; }
  .pay-head { padding-top: 22px; }
  .pay-head h2 { font-size: 32px; margin-right: 48px; }
  .pay-stat b { font-size: 22px; }
  .pay-chart { padding: 14px; }
  .school-source { display: block; }
  .school-source > a { display: inline-block; padding: 10px 0; white-space: normal; }
  .pd-callout, .jc-quote { font-size: 20px; padding: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

@media print {
  body, body.jcsc, body.nv-profile { background: #fff; color: #111; }
  main, main.rv-wrap, .wrap, .jc-wrap, .rv-wrap, .nv-profile .nv-wrap { width: 100%; max-width: none; }
  .pd-tabs, .pd-leafbar, .jc-rail, .hudbar, .pay-close { display: none; }
  .pd-card, .pd-panel, .jc-card, .jc-panel, .nv-profile .nv-card { background: #fff; border-color: #aaa; box-shadow: none; }
  main p, main li, main h1, main h2, main h3, main td, main small, .pd-hero p, .jc-deck { color: #111 !important; }
  .pd-table-wrap, .jc-table-wrap, .school-table-wrap, .rv-table-wrap { overflow: visible; }
  main table { min-width: 0; }
  main th { position: static; background: #eee; color: #111 !important; }
}
