/* Taste Skill · Achromatic ledger · seed 815342376.
   Brand exception: the single primary run action retains LPAS × CEPM blue.
   The existing responsive chart geometry and paging remain in app.css.
   Desktop arithmetic: 224px sidebar + 2 × 20px gutters + fluid workspace.
   Model workspaces: 280px inputs + 16px gutter + remaining report width. */
:root {
  --sidebar: 224px;
  --bg: #f4f6f8;
  --secondary: #f4f6f8;
  --surface: #fff;
  --ink: #202831;
  --muted: #59636e;
  --line: #e2e6ea;
  --control-line: #bcc5ce;
  --primary: #194b92;
  --primary-hover: #153f7b;
  --primary-active: #123564;
  --primary-soft: #e8eff8;
  --primary-tint: #f5f8fc;
  --chart-grid: #e7ebef;
  --radius: 6px;
  color: var(--ink);
  font-size: 14px;
}
body { background: var(--bg); color: var(--ink); line-height: 1.5; }
button, input, select, textarea { font-family: inherit; }
h1 { font-size: 26px; line-height: 1.2; letter-spacing: -.025em; font-weight: 650; }
h2 { font-size: 17px; letter-spacing: -.01em; font-weight: 600; }
h3 { font-size: 15px; font-weight: 600; }
strong, b { font-weight: 600; }
td, input[type=number], .kpi-value, .macro-kpi strong, .abm-kpi strong { font-variant-numeric: tabular-nums; }
.button { min-height: 36px; padding: 8px 14px; border-radius: 4px; font-size: 14px; font-weight: 600; box-shadow: none; }
.button.secondary { background: var(--surface); color: var(--ink); border-color: var(--control-line); }
.button.secondary:hover:not(:disabled) { background: var(--secondary); border-color: var(--muted); }
.button:not(.secondary):not(:disabled) { background: var(--primary); border-color: var(--primary); color: white; }
.button:disabled { opacity: 1; color: var(--muted); background: var(--secondary); border-color: var(--line); }
:where(button, a, input, select, textarea, summary):focus-visible { outline: 2px solid var(--primary); outline-offset: 3px; }
input::placeholder, textarea::placeholder { color: var(--muted); opacity: 1; }
.sidebar { padding: 24px 14px 16px; background: var(--bg); border: 0; }
.sidebar > .co-brand { padding: 0 0 22px; gap: 4px; margin: 0 0 22px; border-bottom: 1px solid var(--line); }
.sidebar > .co-brand .partner-logos { height: 48px; gap: 10px; }
.sidebar > .co-brand .partner-logos img { height: 44px; }
.brand-caption { color: var(--ink); font-size: 14px; letter-spacing: 0; font-weight: 600; margin-top: 4px; }
.brand-scope { color: var(--muted); font-size: 12px; line-height: 1.4; }
.sidebar nav { gap: 2px; padding: 0; margin: 0; }
.sidebar .nav-item, .sidebar .macro-navigation summary, .sidebar .subnav, .sidebar .sidebar-contact {
  min-height: 38px; padding: 8px 10px; font-size: 14px; line-height: 20px; font-weight: 400; border: 0; border-radius: 6px; color: var(--muted); gap: 10px; background: transparent; box-shadow: none;
}
.sidebar .nav-item .icon, .sidebar .macro-navigation .icon, .sidebar-contact .icon { width: 17px; height: 17px; color: inherit; }
.sidebar .nav-item[aria-current=page], .sidebar .subnav[aria-current=page], .sidebar .sidebar-contact[aria-current=page] { background: #e6e9ed; color: var(--ink); font-weight: 600; box-shadow: none; }
.sidebar .macro-nav-links .subnav[aria-current=page], .macro-navigation.current-branch > summary { color: var(--ink); }
.sidebar .sidebar-contact[aria-current=page] { color: var(--ink); background: #e6e9ed; }
.sidebar .nav-item:hover, .sidebar .subnav:hover, .sidebar .macro-navigation summary:hover, .sidebar .sidebar-contact:hover { background: #e9edf0; color: var(--ink); text-decoration: none; }
.sidebar .nav-item::before, .sidebar .subnav::before { display: none; }
.sidebar-section-label { font-size: 12px; text-transform: none; letter-spacing: 0; font-weight: 400; color: var(--muted); margin: 20px 10px 8px; }
.sidebar-nav-group, .sidebar-explore { border: 0; padding: 0; margin: 0; }
.sidebar .macro-nav-links { margin: 2px 0 2px 18px; padding: 0 0 0 10px; border-color: var(--line); }
.sidebar .subnav { margin: 2px 0; min-height: 34px; padding-block: 6px; font-size: 13px; }
.nav-branch-dot { width: 3px; height: 3px; background: currentColor; }
.sidebar-footer { border-top: 1px solid var(--line); padding-top: 12px; }
.sidebar .sidebar-contact { padding: 8px 10px; }
.main-shell { background: var(--bg); }
.main-shell > main { width: 100%; max-width: none; border: 0; border-radius: 0; margin: 0; padding: 24px 20px 16px; background: var(--bg); }
.page-footer { padding: 4px 20px 8px; font-size: 11px; color: var(--muted); }
.page-heading { align-items: flex-start; margin-bottom: 18px; gap: 16px; }
.page-heading h1 { font-size: 26px; margin: 0; }
.page-intro { color: var(--muted); font-size: 14px; line-height: 1.5; margin-top: 6px; }
.page-heading .eyebrow { display: none; }
.text-action { display: inline-flex; align-items: center; gap: 10px; min-height: 36px; color: var(--ink); font-size: 14px; white-space: nowrap; }
.text-action .icon { width: 16px; }
.text-action:hover { color: var(--primary); text-decoration: none; }
.viz-card, .policy-panel, .kpi-grid, .detail-card, .macro-kpis, .method-note, .chat-panel { background: var(--surface); border-color: var(--line); border-radius: 6px; box-shadow: none; }
#main-content .tool-icon { color: var(--muted); background: transparent; border: 0; border-radius: 0; width: 20px; height: 20px; }
#main-content .tool-icon .icon { width: 19px; height: 19px; }
.viz-eyebrow { color: var(--muted); font-size: 12px; font-weight: 400; letter-spacing: 0; text-transform: none; }
.dataset-meta { background: transparent; border: 0; color: var(--muted); gap: 8px 18px; font-size: 12px; }
.dataset-meta .icon { color: var(--muted); width: 15px; height: 15px; }
.dataset-meta strong { color: var(--ink); font-weight: 500; }
.policy-panel { padding: 0; overflow: hidden; }
.policy-setup-grid { display: grid; grid-template-columns: minmax(0,1fr) 248px; gap: 16px; min-height: 0; }
.policy-reference { display: flex; flex-direction: column; padding: 18px; border: 1px solid var(--line); background: white; border-radius: 6px; }
.policy-reference h2 { font-size: 16px; margin: 0 0 4px; }
.policy-reference header p { color: var(--muted); font-size: 12px; line-height: 1.5; margin: 0; }
.policy-reference dl { margin: 6px 0 0; }
.policy-reference dl > div { padding: 20px 0; border-bottom: 1px solid var(--line); }
.policy-reference dt { color: var(--muted); font-size: 13px; }
.policy-reference dd { margin: 4px 0 2px; font-size: 28px; line-height: 1.2; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.policy-reference small { font-size: 11px; color: var(--muted); }
.reference-note { display: flex; gap: 8px; padding-top: 16px; margin-top: auto; color: var(--muted); }
.reference-note .icon { width: 16px; margin-top: 2px; }
.reference-note p { margin: 0; font-size: 12px; line-height: 1.5; }
.panel-heading { padding: 18px 20px 12px; }
.panel-heading h2 { font-size: 17px; margin: 0 0 4px; }
.panel-heading p, .field-hint, .action-hint { color: var(--muted); font-size: 12px; }
.policy-tabs { padding-inline: 20px; border-color: var(--line); background: transparent; gap: 24px; }
.policy-tabs button, .detail-tabs button, .abm-tabs button { color: var(--muted); font-size: 13px; font-weight: 500; border-radius: 0; background: transparent; }
.policy-tabs button[aria-selected=true], .detail-tabs button[aria-selected=true], .abm-tabs button[aria-selected=true] { color: var(--ink); border-color: var(--primary); font-weight: 600; background: transparent; }
.policy-tab-content { padding: 16px 20px; }
.field-hint { background: transparent; border: 0; padding: 0; margin-bottom: 14px; }
.field-group-title { font-size: 14px; font-weight: 600; color: var(--ink); padding-bottom: 10px; border-bottom: 1px solid var(--line); margin-bottom: 4px; }
.field-columns { gap: 24px; }
.field-row { padding-block: 8px; border-color: #edf0f3; }
.field-row label { color: var(--ink); font-size: 14px; }
.input-wrap { border-color: var(--control-line); border-radius: 4px; background: white; }
.input-wrap input { background: white; color: var(--ink); height: 34px; font-size: 14px; }
.input-wrap .unit { color: var(--muted); }
.policy-actions { border-color: var(--line); background: white; padding: 14px 20px; }
.changed-count { color: var(--ink); font-size: 13px; font-weight: 500; }
.workflow { font-size: 12px; }
.workflow li { color: var(--muted); }
.workflow li.current { color: var(--ink); }
.workflow li span { background: transparent; color: inherit; border-color: var(--control-line); }
.kpi-grid { gap: 0; border: 1px solid var(--line); }
#main-content .kpi-card { padding: 14px 16px; background: white; border-color: var(--line); }
#main-content .kpi-label { font-size: 13px; font-weight: 400; color: var(--muted); }
#main-content .kpi-value { font-size: 28px; font-weight: 600; letter-spacing: -.025em; color: var(--ink); }
#main-content .kpi-bottom small { font-size: 11px; }
.delta.neutral, .score-change.neutral, .pair-row-heading .neutral { color: var(--muted); background: transparent; }
.kpi-delta:not(.up):not(.down), .score-change { color: var(--muted); background: transparent; }
.abm-kpi > div > span, .abm-chart figcaption > span strong { color: var(--ink); }
#main-content .detail-tabs { gap: 20px; background: transparent; border-color: var(--line); }
#main-content .detail-tabs button { min-height: 38px; padding: 8px 0; }
#main-content .detail-card, #main-content .income-viz, #main-content .comparison-card { border-color: var(--line); border-radius: 6px; background: white; }
#main-content table { font-size: 13px; font-variant-numeric: tabular-nums; }
#main-content table thead th { background: white; color: var(--muted); text-transform: none; letter-spacing: 0; font-weight: 500; border-color: var(--line); }
#main-content table tbody tr:nth-child(even):not(.selected):not(.active) { background: transparent; }
#main-content table tbody tr { border-color: #edf0f3; }
#main-content table td { color: var(--ink); border-color: #edf0f3; }
#main-content table th:first-child, #main-content table td:first-child { padding-left: 10px; }
#main-content table td:last-child, #main-content table th:last-child { padding-right: 10px; }
#main-content .data-pagination { border: 0; color: var(--muted); font-size: 12px; padding-top: 8px; }
#main-content .data-pagination button, #main-content .data-pagination select { border-color: var(--control-line); color: var(--ink); background: white; border-radius: 4px; }
.viz-header h3, .comparison-header h3, .abm-chart h3, .dsge-curve h3 { color: var(--ink); font-weight: 600; }
.chart-readout { background: var(--secondary); border: 0; border-radius: 4px; }
.chart-readout strong { color: var(--ink); font-size: 15px; }
.plot-meta, .pair-axis, .pair-legend, .region-legend, .table-note { color: var(--muted); font-size: 12px; }
.map-card { border-color: var(--line); border-radius: 6px; background: white; }
.map-canvas { background: #f6f8fa; }
.map-detail { background: white; }
.map-detail-values { font-variant-numeric: tabular-nums; }
.map-detail-values strong { color: var(--ink); }
.map-scale-ticks { font-size: 11px; }
.map-card-header > span { font-size: 11px; letter-spacing: 0; text-transform: none; }
.map-tooltip { border: 1px solid var(--line); border-radius: 4px; background: white; color: var(--ink); }
.pair-track { background: #edf1f5; }
.gini-track { background: #e7ecf2; }
.poverty-category { border-radius: 4px; border-color: var(--line); background: white; }
.poverty-category h4 { color: var(--muted); font-weight: 400; }
.analysis-note { background: var(--secondary); color: var(--muted); border-left: 0; border-radius: 4px; }
.methodology-report { background: white; }
.method-provenance { background: var(--secondary); }
.method-grid article { border: 0; }
.chat-panel.inactive { border-color: var(--line); background: white; border-radius: 6px; }
.chat-panel.inactive #chat-status { color: var(--muted); }
.chat-prompts button { border-color: var(--line); border-radius: 4px; background: white; }
.chat-status, .chat-privacy { color: var(--muted); }
.macro-layout, .abm-layout { gap: 16px; }
.macro-panel-heading { padding: 16px 16px 12px; border-color: var(--line); }
.macro-panel-heading h2 { font-size: 16px; font-weight: 600; }
.macro-panel-heading p { font-size: 12px; color: var(--muted); }
.macro-inputs, .abm-inputs { border-color: var(--line); border-radius: 6px; background: white; }
.macro-results { gap: 12px; }
.macro-result-heading { color: var(--muted); }
.macro-result-heading h2 { font-size: 14px; color: var(--ink); font-weight: 500; }
.macro-result-heading > span { font-size: 12px; }
.macro-kpi { padding: 14px 16px; }
.macro-kpi h3 { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.macro-kpi strong { font-size: 24px; color: var(--ink); letter-spacing: -.025em; }
.macro-kpi.lead strong { font-size: 30px; }
.macro-kpi p { font-size: 12px; color: var(--muted); margin-top: 6px; }
.shock-input { background: white; border-color: var(--control-line); border-radius: 4px; }
.shock-table tbody th { font-size: 13px; font-weight: 500; }
.shock-table input { font-size: 14px; }
.shock-presets { border-color: var(--line); gap: 8px; }
.shock-submit, .abm-run { background: white; border-color: var(--line); padding: 14px 16px; }
.shock-submit .button, .abm-actions .button { border-radius: 4px; }
.dsge-parameter-group, .abm-group-selector { padding: 12px 16px; background: transparent; }
.dsge-parameter-group select, .abm-group-selector select, .abm-control-group select, .abm-control-group input, .abm-parameter-value input { background: white; border-color: var(--control-line); border-radius: 4px; color: var(--ink); }
.abm-mode { border: 1px solid var(--line); background: var(--secondary); padding: 3px; border-radius: 4px; }
.abm-mode button { font-size: 12px; border: 0; border-radius: 2px; background: transparent; color: var(--muted); }
.abm-mode button.active { background: white; color: var(--ink); box-shadow: none; }
.abm-fields { padding-inline: 16px; }
.abm-inputs label, .abm-parameter-label { color: var(--ink); font-size: 13px; }
.abm-inputs small, .abm-input-hint { color: var(--muted); font-size: 12px; }
.abm-kpi { background: white; border-color: var(--line); }
.abm-kpi h3 { font-size: 13px; font-weight: 400; color: var(--muted); }
.abm-kpi strong { font-size: 26px; font-weight: 600; color: var(--ink); }
.abm-kpi small { color: var(--muted); font-size: 11px; }
.abm-chart, .dsge-curve, .dsge-pair-card, .abm-data-card { border-color: var(--line); border-radius: 6px; padding: 14px; }
.abm-chart h3, .dsge-curve figcaption > strong, .dsge-pair-card figcaption > strong { font-size: 14px; font-weight: 600; color: var(--ink); }
.abm-chart-unit, .abm-chart-foot, .abm-chart-unit small, .abm-chart-unit > span { font-size: 11px; color: var(--muted); }
.abm-point::after, .dsge-curve-point::after { opacity: 0; }
.abm-point.active::after, .abm-point:hover::after, .abm-point:focus-visible::after, .dsge-curve-point.active::after, .dsge-curve-point:hover::after, .dsge-curve-point:focus-visible::after { opacity: 1; }
.abm-line.after, .dsge-response-line { stroke-width: 2; }
.abm-line.before, .dsge-reference-line { stroke: #94acc6; stroke-width: 1.5; }
.abm-x-axis { display: block; }
.abm-x-axis > span { position: absolute; white-space: nowrap; }
.dsge-curve-x .axis-midpoint { position: absolute; left: 50%; transform: translateX(-50%); }
.dsge-curve-grid, .abm-chart-gridline { border-color: var(--chart-grid); }
.dsge-curve-grid > span, .dsge-curve-x, .dsge-curve-readout, .dsge-card-note, .dsge-pair-axis { font-size: 11px; }
.dsge-curve > p, .dsge-curve > small, .dsge-pair-card figcaption small { font-size: 11px; line-height: 1.4; }
.dsge-delta-track { background: transparent; }
.dsge-delta-track::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; width: 1px; background: var(--line); }
.dsge-pair-row { font-size: 12px; }
.method-note { border-color: var(--line); background: white; }
.method-note summary { font-size: 13px; color: var(--muted); min-height: 34px; }
.method-note[open] summary { color: var(--ink); }
/* Keep legacy chart annotations readable after the shared design layer. */
#main-content :is(.abm-chart-unit .mc-range, .abm-parameter-reset, .abm-parameter-reset > span, .abm-parameter-label small, .dsge-report tbody th small, .dsge-parameter-group small, .dsge-parameter-hint, .province-tooltip-value small) { font-size: 11px; }
#output-stage :is(.map-card-header > span, .map-source, .map-scale-caption > span:first-child) { font-size: 11px; }

/* The home is a model index, not a row of promotional tiles.
   (fluid model ledger + 280px reading column) share the same bottom edge. */
.research-home { display: flex; flex-direction: column; align-items: stretch; min-height: 0; }
.research-home-grid { display: grid; grid-template-columns: minmax(0,1fr) 280px; gap: 16px; }
.model-ledger { border: 1px solid var(--line); background: white; border-radius: 6px; overflow: hidden; }
.ledger-heading { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.ledger-heading h2 { margin: 0; font-size: 16px; }
.ledger-heading > span { font-size: 12px; color: var(--muted); }
.model-entry { display: grid; grid-template-columns: minmax(180px,1fr) minmax(140px,.85fr) auto; gap: 20px; padding: 24px 20px; border-bottom: 1px solid var(--line); align-items: center; }
.model-entry:last-child { border: 0; }
.model-kind { display: block; font-size: 12px; line-height: 1.4; color: var(--muted); margin-bottom: 6px; }
.model-identity h3 { font-size: 22px; font-weight: 600; letter-spacing: -.025em; line-height: 1.2; margin: 0 0 6px; }
.model-identity p, .model-evidence p { font-size: 13px; line-height: 1.5; color: var(--muted); margin: 0; }
.model-evidence strong { display: block; font-size: 14px; color: var(--ink); margin-bottom: 4px; }
.model-evidence small { display: block; color: var(--muted); font-size: 12px; line-height: 1.5; margin-top: 6px; }
.model-entry .button { white-space: nowrap; }
.model-entry .button .icon { width: 16px; }
.research-context { display: flex; flex-direction: column; padding: 18px; border: 1px solid var(--line); background: white; border-radius: 6px; }
.research-context h2 { margin: 0 0 20px; font-size: 16px; }
.research-context section { margin: 0 0 20px; }
.research-context h3 { margin: 0 0 5px; font-size: 14px; }
.research-context p { font-size: 13px; line-height: 1.6; color: var(--muted); margin: 0; }
.research-context-note { display: flex; gap: 8px; margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line); }
.research-context-note .icon { width: 16px; color: var(--muted); margin-top: 2px; }
.research-context-note p { font-size: 12px; }
.research-services { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 20px; border: 1px solid var(--line); background: white; border-radius: 6px; }
.research-services h2 { font-size: 16px; margin: 0 0 4px; }
.research-services p { margin: 0; font-size: 13px; color: var(--muted); }
.research-services .button { flex-shrink: 0; }

/* Contact pages share a research brief and the real partner directory. */
.contact-page.contact-redesign { display: flex; flex-direction: column; align-items: stretch; width: 100%; min-width: 0; }
.contact-workspace { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); gap: 16px; }
.research-brief, .partner-directory { padding: 24px; border: 1px solid var(--line); border-radius: 6px; background: white; }
.research-brief h2, .partner-directory h2 { margin: 0 0 12px; font-size: 18px; }
.research-brief > p { font-size: 14px; color: var(--muted); line-height: 1.6; max-width: 58ch; }
.research-brief ul { padding: 0; list-style: none; margin: 20px 0; }
.research-brief li { border-top: 1px solid var(--line); padding: 14px 0; font-size: 14px; }
.brief-note { display: flex; align-items: flex-start; gap: 10px; color: var(--muted); }
.brief-note .icon { width: 16px; margin-top: 2px; }
.brief-note p { margin: 0; font-size: 12px; }
.partner-directory article { display: flex; flex-direction: column; align-items: flex-start; gap: 14px; padding: 18px 0; }
.partner-directory article + article { border-top: 1px solid var(--line); }
.partner-directory h3 { font-size: 22px; margin: 0 0 6px; font-weight: 600; letter-spacing: -.02em; }
.partner-directory p { font-size: 14px; margin: 0; color: var(--muted); max-width: 48ch; }
.contact-next { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 18px 24px; background: white; border: 1px solid var(--line); border-radius: 6px; }
.contact-next h2 { margin: 0 0 4px; font-size: 16px; }
.contact-next p { margin: 0; color: var(--muted); font-size: 13px; }

@media (min-width:1081px) and (min-height:650px) {
  .main-shell > main { padding: 20px 20px 12px; overflow: hidden; }
  .page-footer { flex-basis: 24px; padding: 2px 20px; }
  #input-stage > .policy-setup-grid { flex: 1 1 0; min-height: 0; }
  .policy-setup-grid #policy-form { height: 100%; min-height: 0; margin: 0; }
  .policy-setup-grid .policy-reference { min-height: 0; }
  .policy-setup-grid .field-columns { grid-template-columns: minmax(0,1fr); gap: 20px; }
  #policy-panel-benefits .field-columns > div { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 20px; }
  #policy-panel-tax .tax-columns { grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
  #policy-panel-tax .tax-columns > div { display: block; }
  .policy-setup-grid .field-row { gap: 10px; }
  .policy-setup-grid .input-wrap { flex-shrink: 0; }
  #output-stage:not([hidden]) { gap: 8px 16px; }
  #output-stage .kpi-card { padding: 12px 16px; }
  #output-stage .kpi-value { font-size: 28px; }
  #output-stage .kpi-bottom { margin-top: 3px; }
  .macro-layout, .abm-layout { grid-template-columns: 280px minmax(0,1fr); }
  .macro-layout > .macro-results, .abm-layout > .abm-results { min-width: 0; }
  .abm-chart-grid, .dsge-pair-grid, .dsge-curve-grid-layout, .dsge-welfare-grid { gap: 12px; }
  #main-content .detail-card { padding: 14px; }
  #main-content .comparison-card.compact-regions .table-scroll { flex: 1 1 0; }
  .comparison-card.compact-regions table { height: 100%; }
  #main-content .comparison-card.compact-regions td { font-size: 15px; vertical-align: middle; }
  #main-content .comparison-card.compact-regions thead { height: 36px; }
  .comparison-card.compact-regions .region-name { display: block; font-size: 14px; }
  .comparison-card.compact-regions .region-mini { display: flex; width: 100%; max-width: 130px; gap: 5px; margin: 8px 0 0; }
  .comparison-card.compact-regions .region-mini i { height: 5px; }
  .research-home-grid { flex: 1; grid-template-rows: minmax(0,1fr) auto; }
  .model-ledger { display: flex; flex-direction: column; }
  .model-entry { flex: 1; }
}
@media (min-width:1081px) and (max-width:1340px) {
  .research-home-grid { grid-template-columns: minmax(0,1fr) 240px; }
  .model-entry { grid-template-columns: minmax(0,1fr) auto; gap: 12px; padding: 18px; }
  .model-evidence { grid-column: 1; grid-row: 2; }
  .model-entry .button { grid-column: 2; grid-row: 1 / 3; }
  .model-identity h3 { font-size: 20px; }
  .model-evidence strong, .model-evidence p, .model-evidence small { display: inline; margin-right: 5px; font-size: 12px; }
}
@media (min-width:1081px) and (max-height:760px) {
  .main-shell > main { padding: 14px 16px 8px; }
  .sidebar { padding-top: 16px; }
  .sidebar > .co-brand { margin-bottom: 12px; padding-bottom: 14px; }
  .sidebar-section-label { margin-top: 14px; }
  .policy-reference { padding: 16px; }
  .policy-reference dl > div { padding-block: 14px; }
  .policy-reference dd { font-size: 25px; }
  #main-content .kpi-card { padding: 8px 12px; }
  #main-content .kpi-value { font-size: 24px; }
  #main-content .detail-tabs button { min-height: 34px; padding-block: 6px; }
  #main-content .detail-card { padding: 10px; }
  .macro-kpi { padding: 10px 14px; }
  .macro-kpi.lead strong { font-size: 26px; }
  .abm-chart, .dsge-curve, .dsge-pair-card { padding: 10px 12px; }
  .research-context { padding: 16px; }
  .research-context section { margin-bottom: 14px; }
  .model-entry { padding-block: 16px; }
  .research-services { padding-block: 14px; }
}
@media (max-width:1080px) {
  .sidebar { padding: 12px 16px; background: var(--bg); border-bottom: 1px solid var(--line); }
  .sidebar > .co-brand { width: 190px; padding: 0; margin: 0; gap: 0; border: 0; }
  .sidebar > .co-brand .partner-logos { height: 32px; }
  .sidebar > .co-brand .partner-logos img { height: 32px; }
  .sidebar > .co-brand .brand-caption { display: none; }
  .sidebar > .co-brand .brand-scope { margin-top: 4px; font-size: 11px; }
  .sidebar nav { padding: 12px 0 0; margin-top: 12px; max-height: none; }
  .sidebar .nav-item, .sidebar .subnav, .sidebar .macro-navigation summary { min-height: 44px; }
  .sidebar.menu-open { max-height: 100dvh; overflow-y: auto; }
  .sidebar .mobile-menu-toggle { min-height: 40px; color: var(--ink); background: white; font-size: 13px; }
  .sidebar-footer { margin-top: 12px; }
  .main-shell > main { padding: 20px 16px; border: 0; margin: 0; width: 100%; }
  .policy-setup-grid { grid-template-columns: 1fr; }
  .policy-reference dl { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 16px; }
  .policy-reference dl > div { border: 0; padding-bottom: 0; }
  .policy-reference .reference-note { margin-top: 16px; border-top: 1px solid var(--line); }
  .page-heading { margin-bottom: 18px; }
  .page-heading h1 { font-size: 24px; }
  .research-home-grid { grid-template-columns: 1fr; }
  .model-entry { grid-template-columns: minmax(0,1fr) minmax(140px,.7fr) auto; gap: 12px; }
  .research-context { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; }
  .research-context > h2, .research-context-note { grid-column: 1 / -1; margin: 0; }
  .research-context section { margin: 0; }
  .contact-workspace { grid-template-columns: 1fr 1fr; }
}
@media (max-width:640px) {
  :root { font-size: 14px; }
  .page-heading { flex-direction: column; gap: 10px; }
  .page-heading h1 { font-size: 23px; }
  .page-intro { font-size: 14px; }
  .research-home .page-heading .text-action { display: none; }
  .ledger-heading { padding: 14px 16px; flex-wrap: wrap; gap: 4px; }
  .model-entry { grid-template-columns: minmax(0,1fr) auto; padding: 18px 16px; gap: 12px; }
  .model-identity { grid-column: 1 / -1; }
  .model-identity h3 { font-size: 22px; }
  .model-evidence { min-width: 0; }
  .model-evidence strong { font-size: 13px; }
  .model-evidence p, .model-evidence small { font-size: 12px; }
  .model-entry .button { grid-column: 2; grid-row: 2; padding-inline: 12px; }
  .research-context { display: flex; gap: 0; }
  .research-context > h2 { margin-bottom: 18px; }
  .research-context section { margin-bottom: 18px; }
  .research-context-note { margin-top: 0; }
  .research-services, .contact-next { flex-direction: column; align-items: flex-start; gap: 14px; padding: 18px 16px; }
  .contact-workspace { grid-template-columns: 1fr; }
  .research-brief, .partner-directory { padding: 20px 16px; }
  .button, .policy-tabs button, .detail-tabs button { min-height: 44px; }
  .policy-tabs { padding-inline: 16px; gap: 20px; }
  .panel-heading, .policy-tab-content, .policy-actions { padding-inline: 16px; }
  .field-row { padding-block: 10px; }
  .policy-reference dl { grid-template-columns: 1fr 1fr; }
  .policy-reference dd { font-size: 24px; }
  .input-wrap input { min-height: 42px; }
  #main-content table { font-size: 12px; }
  #main-content .detail-tabs { gap: 18px; }
  #main-content .detail-tabs button { min-height: 44px; }
  .macro-layout, .abm-layout { gap: 16px; }
  .macro-kpi.lead strong { font-size: 26px; }
  .macro-kpi { padding: 14px; }
  .abm-chart, .dsge-curve { padding: 14px 12px; }
  .page-footer { padding: 4px 16px 12px; }
}
@media (prefers-reduced-motion:reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
