@font-face {
  font-family: "IBM Plex Sans";
  src: url("./IBMPlexSans-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Sans";
  src: url("./IBMPlexSans-SemiBold.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}
@font-face {
  font-family: "IBM Plex Mono";
  src: url("./IBMPlexMono-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

:root,
html[data-theme="dark"] {
  color-scheme: dark;
  --background: #161616;
  --layer-01: #262626;
  --layer-02: #393939;
  --layer-03: #525252;
  --field: #262626;
  --field-hover: #333333;
  --text-primary: #f4f4f4;
  --text-secondary: #c6c6c6;
  --text-helper: #a8a8a8;
  --text-placeholder: #8d8d8d;
  --border-subtle: #393939;
  --border-strong: #6f6f6f;
  --interactive: #0f62fe;
  --interactive-hover: #0353e9;
  --interactive-active: #002d9c;
  --focus: #ffffff;
  --support-success: #42be65;
  --support-warning: #f1c21b;
  --support-error: #fa4d56;
  --support-info: #4589ff;
  --chart-secondary: #8a3ffc;
  --bg: var(--background);
  --surface: var(--layer-01);
  --surface-2: var(--layer-02);
  --text: var(--text-primary);
  --muted: var(--text-secondary);
  --line: var(--border-subtle);
  --accent: var(--interactive);
  --accent-soft: var(--interactive-active);
  --violet: var(--chart-secondary);
  --amber: var(--support-warning);
  --red: var(--support-error);
  --blue: var(--interactive);
  --shadow: none;
  --radius: 0;
  --font: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
}

html[data-theme="light"] {
  color-scheme: light;
  --background: #f4f4f4;
  --layer-01: #ffffff;
  --layer-02: #e0e0e0;
  --layer-03: #c6c6c6;
  --field: #ffffff;
  --field-hover: #e8e8e8;
  --text-primary: #161616;
  --text-secondary: #525252;
  --text-helper: #6f6f6f;
  --text-placeholder: #a8a8a8;
  --border-subtle: #c6c6c6;
  --border-strong: #8d8d8d;
  --interactive: #0f62fe;
  --interactive-hover: #0353e9;
  --interactive-active: #d0e2ff;
  --focus: #0f62fe;
  --support-success: #24a148;
  --support-warning: #8e6a00;
  --support-error: #da1e28;
  --support-info: #0043ce;
  --chart-secondary: #6929c4;
}

*,
*::before,
*::after { box-sizing: border-box; border-radius: 0 !important; }
html { background: var(--background); }
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
body {
  margin: 0;
  padding-top: 3rem;
  background: var(--background);
  color: var(--text-primary);
  font-family: var(--font);
  font-size: .875rem;
  line-height: 1.43;
  letter-spacing: .16px;
}
button, input, select { font: inherit; }
button, select { cursor: pointer; }
:focus-visible { outline: 2px solid var(--focus) !important; outline-offset: -2px !important; }
.skip-link {
  position: fixed;
  z-index: 50;
  left: 1rem;
  top: -4rem;
  padding: .75rem 1rem;
  background: var(--interactive);
  color: #fff;
}
.skip-link:focus { top: .25rem; }

.app-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 30;
  height: 3rem;
  display: flex;
  align-items: stretch;
  background: #161616;
  color: #f4f4f4;
  border-bottom: 1px solid #393939;
}
.header-menu,
.header-action {
  width: 3rem;
  height: 3rem;
  border: 0;
  border-right: 1px solid #393939;
  background: transparent;
  color: inherit;
}
.header-menu { display: none; font-size: 1.15rem; }
.header-menu:hover,
.header-action:hover { background: #353535; }
.header-name {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  min-width: 0;
  padding: 0 1rem;
  font-size: .875rem;
  white-space: nowrap;
}
.header-name strong { margin-right: .25rem; font-weight: 600; }
.header-meta {
  align-self: center;
  margin-left: auto;
  padding-right: 1rem;
  color: #a8a8a8;
  font-family: "IBM Plex Mono", monospace;
  font-size: .75rem;
}
.theme-field {
  height: 3rem;
  border: 0;
  border-left: 1px solid #393939;
  padding: 0 2.25rem 0 1rem;
  background: #161616;
  color: #f4f4f4;
}

.shell {
  max-width: none;
  min-height: calc(100dvh - 3rem);
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 16rem minmax(0, 1fr);
  gap: 0;
}
.sidebar {
  position: sticky;
  top: 3rem;
  align-self: start;
  height: calc(100dvh - 3rem);
  min-height: 0;
  overflow-y: auto;
  background: var(--layer-01);
  border: 0;
  border-right: 1px solid var(--border-subtle);
  padding: 1.5rem 0;
  box-shadow: none;
}
.brand { padding: 0 1rem 1.5rem; margin: 0; border-bottom: 1px solid var(--border-subtle); }
.brand h1 { margin: .5rem 0 0; font-size: 1rem; line-height: 1.25; font-weight: 600; letter-spacing: 0; }
.brand p { margin: .5rem 0 0; color: var(--text-secondary); font-size: .75rem; line-height: 1.34; }
.eyebrow { color: var(--text-helper); font-size: .75rem; line-height: 1rem; font-weight: 400; letter-spacing: .32px; text-transform: none; }
.nav { display: grid; gap: 0; padding-top: .5rem; }
.nav button {
  position: relative;
  width: 100%;
  min-height: 3rem;
  border: 0;
  padding: .75rem 1rem;
  background: transparent;
  color: var(--text-secondary);
  text-align: left;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nav button:hover { background: var(--layer-02); color: var(--text-primary); }
.nav button[aria-selected="true"] { background: var(--layer-02); color: var(--text-primary); font-weight: 600; }
.nav button[aria-selected="true"]::before { content: ""; position: absolute; inset: 0 auto 0 0; width: .25rem; background: var(--interactive); }
.nav .count { color: var(--text-helper); font-family: "IBM Plex Mono", monospace; font-size: .75rem; }
.source-note { margin: 1.5rem 1rem 0; color: var(--text-helper); font-size: .75rem; }

main { min-width: 0; padding: 2rem 2rem 4rem; }
.panel { display: none; min-width: 0; max-width: 100rem; margin: 0 auto; }
.panel.active { display: block; animation: carbon-enter .16s ease-out; }
@keyframes carbon-enter { from { opacity: 0; transform: translateY(.25rem); } }
.page-head { min-height: 8rem; margin: 0; padding: 1rem 0 2rem; display: flex; align-items: flex-end; border-bottom: 1px solid var(--border-subtle); }
.page-head h2 { margin: .5rem 0 0; max-width: 64rem; font-size: clamp(2rem, 3.4vw, 3.375rem); line-height: 1.05; letter-spacing: 0; font-weight: 300; text-wrap: balance; }
.page-head p { max-width: 44rem; margin: 1rem 0 0; color: var(--text-secondary); font-size: .875rem; }

.card { background: var(--layer-01); border: 0; box-shadow: none; }
.thesis {
  padding: 2rem;
  min-height: 22rem;
  display: grid;
  grid-template-columns: repeat(16, minmax(0, 1fr));
  align-content: start;
  border-bottom: 1px solid var(--border-subtle);
}
.thesis::after { display: none; }
.thesis > .eyebrow { grid-column: 1 / 5; }
.thesis h3 { grid-column: 5 / 15; margin: 0; max-width: none; font-size: clamp(2rem, 4vw, 4.25rem); line-height: 1.02; font-weight: 300; letter-spacing: 0; }
.thesis > p { grid-column: 5 / 13; margin: 2rem 0 0; max-width: 42rem; color: var(--text-secondary); font-size: 1rem; }
.thesis-flow { grid-column: 5 / 16; margin-top: 2rem; display: grid; grid-template-columns: repeat(5, 1fr); gap: 1px; background: var(--border-subtle); }
.flow-step { min-height: 4.5rem; padding: 1rem; border: 0; background: var(--layer-02); color: var(--text-primary); font-size: .75rem; }
.flow-arrow { display: none; }
.metrics { margin: 1px 0 2rem; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--border-subtle); }
.metric { min-height: 9rem; padding: 1rem; background: var(--layer-01); border-top: .25rem solid transparent; }
.metric:first-child { border-top-color: var(--interactive); }
.metric .value { font-family: "IBM Plex Mono", monospace; font-size: 2.625rem; line-height: 1; font-weight: 400; letter-spacing: 0; }
.metric .label { display: block; max-width: 14rem; margin-top: 1rem; color: var(--text-secondary); font-size: .75rem; }
.section-grid { margin-top: 0; display: grid; grid-template-columns: repeat(16, minmax(0, 1fr)); gap: 1px; background: var(--border-subtle); }
.section-grid > :first-child { grid-column: 1 / 10; }
.section-grid > :last-child { grid-column: 10 / 17; }
.section-card { padding: 2rem; }
.section-card h3 { margin: 0 0 1.5rem; font-size: 1.25rem; font-weight: 400; }
.section-card p { max-width: 52ch; color: var(--text-secondary); }
.principles { gap: 0; }
.principle { grid-template-columns: 3rem 1fr; min-height: 4.5rem; padding: .75rem 0; border-top: 1px solid var(--border-subtle); }
.principle:first-child { border-top: 0; }
.principle b { font-weight: 600; }
.principle span { color: var(--text-secondary); font-size: .75rem; }
.num { width: 2rem; height: 2rem; background: var(--interactive); color: #fff; font-family: "IBM Plex Mono", monospace; font-weight: 400; }
.warning { margin-top: 1.5rem; border: 0; border-left: .25rem solid var(--support-warning); padding: 1rem; background: var(--layer-02); color: var(--text-secondary); }

.controls {
  margin: 0;
  padding: 1rem;
  display: grid;
  grid-template-columns: minmax(16rem, 2fr) repeat(3, minmax(10rem, 1fr));
  gap: 1px;
  background: var(--layer-01);
  border-bottom: 1px solid var(--border-subtle);
}
.control { min-width: 0; gap: .25rem; color: var(--text-secondary); font-size: .75rem; }
.control input,
.control select {
  width: 100%;
  height: 3rem;
  border: 0;
  border-bottom: 1px solid var(--border-strong);
  padding: 0 1rem;
  background: var(--field);
  color: var(--text-primary);
}
.control input:hover,
.control select:hover { background: var(--field-hover); }
.control input:focus,
.control select:focus { outline: 2px solid var(--focus); outline-offset: -2px; border-color: transparent; }
.results-line { min-height: 2.5rem; margin: 0; padding: .75rem 1rem; background: var(--layer-01); color: var(--text-secondary); font-size: .75rem; }

.table-wrap { overflow: auto; max-width: 100%; background: var(--layer-01); border: 0; }
table { width: 100%; border-collapse: collapse; font-size: .875rem; }
thead { position: sticky; top: 0; z-index: 2; }
th {
  height: 3rem;
  padding: 0 1rem;
  background: var(--layer-02);
  color: var(--text-primary);
  border: 0;
  border-right: 1px solid var(--border-subtle);
  border-bottom: 1px solid var(--border-strong);
  font-size: .75rem;
  font-weight: 600;
  text-transform: none;
  letter-spacing: .32px;
  white-space: nowrap;
  vertical-align: middle;
}
td {
  height: 3rem;
  padding: .75rem 1rem;
  border: 0;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}
tbody tr:hover > td { background: var(--layer-02); }
th button { width: 100%; height: 100%; display: flex; align-items: center; border: 0; background: transparent; color: inherit; font-weight: inherit; text-transform: none; letter-spacing: inherit; text-align: left; }
.mono,
.num-cell,
.model-id { font-family: "IBM Plex Mono", monospace; font-variant-numeric: tabular-nums; }
.num-cell { text-align: right; }
.model-name { font-weight: 600; letter-spacing: 0; }
.model-sub { color: var(--text-secondary); font-size: .75rem; }
.tag { display: inline-flex; width: fit-content; padding: .25rem .5rem; background: var(--layer-02); color: var(--text-secondary); font-size: .75rem; white-space: nowrap; border-left: .1875rem solid var(--border-strong); }
.tag.current { background: var(--interactive-active); color: var(--text-primary); border-left-color: var(--interactive); }
.tag.revised { color: var(--support-warning); border-left-color: var(--support-warning); }
.tag.check { color: var(--support-info); border-left-color: var(--support-info); }
.dots { display: inline-flex; gap: 2px; }
.dot { width: .375rem; height: .875rem; background: var(--layer-03); }
.dot.on { background: var(--interactive); }
.expand-btn { width: 3rem; height: 3rem; border: 0; background: transparent; color: var(--text-primary); font-size: 1.125rem; }
.expand-btn:hover { background: var(--layer-03); }
.model-expand[hidden] { display: none; }
.model-expand > td { height: auto; padding: 0; background: var(--layer-02) !important; }
.model-detail { padding: 1.5rem 3rem; display: grid; grid-template-columns: 1fr 1fr; gap: 2rem; border: 0; border-left: .25rem solid var(--interactive); }
.model-detail h3 { margin: .5rem 0 1rem; font-size: 1.5rem; font-weight: 400; line-height: 1.2; }
.model-detail p { max-width: 58ch; color: var(--text-secondary); }
.profile-grid { margin: 1.5rem 0 0; display: grid; grid-template-columns: 10rem minmax(0, 1fr); border-top: 1px solid var(--border-subtle); }
.profile-grid dt,
.profile-grid dd { margin: 0; padding: .75rem 0; border-bottom: 1px solid var(--border-subtle); }
.profile-grid dt { padding-right: 1rem; color: var(--text-helper); font-size: .75rem; }
.profile-grid dd { color: var(--text-secondary); }
.profile-facts { margin-top: .5rem; }
.source-heading { margin-top: 1.5rem; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; background: var(--border-subtle); }
.fact { padding: 1rem; background: var(--layer-01); }
.fact small { display: block; color: var(--text-helper); font-size: .75rem; }
.fact b { font-family: "IBM Plex Mono", monospace; font-size: .875rem; font-weight: 400; }
.sources { display: flex; flex-wrap: wrap; gap: 1px; margin-top: 1rem; }
.source-chip { padding: .5rem; border: 0; background: var(--layer-01); color: var(--text-secondary); font-size: .75rem; }
.source-link { color: var(--interactive); text-decoration: none; }
.source-link:hover { text-decoration: underline; }
.source-link:focus-visible { outline: .125rem solid var(--focus); outline-offset: .125rem; }
.provenance { margin-top: 1rem; padding: .75rem 1rem; border-left: .1875rem solid var(--support-info); background: var(--layer-01); color: var(--text-secondary); font-size: .75rem; line-height: 1.45; }
.field-basis-compact { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1px; margin: .5rem 0; background: var(--border-subtle); }
.field-basis-compact span { padding: .375rem .5rem; background: var(--layer-02); color: var(--text-helper); font-family: "IBM Plex Mono", monospace; font-size: .6875rem; }

.calculator-controls { display: grid; grid-template-columns: repeat(4, minmax(9rem, 1fr)); gap: 1px; margin-bottom: 1rem; background: var(--border-subtle); }
.calculator-controls--primary { grid-template-columns: 2fr 1fr 1fr; }
.calculator-controls .control { background: var(--layer-01); }
.calculator-controls input,
.calculator-controls select { width: 100%; height: 2.5rem; margin-top: .5rem; border: 0; border-bottom: 1px solid var(--border-strong); padding: 0 .75rem; background: var(--field); color: var(--text-primary); font: inherit; font-variant-numeric: tabular-nums; }
.model-context { margin-bottom: 1rem; display: grid; grid-template-columns: minmax(18rem, 1fr) minmax(30rem, 2fr); gap: 1px; background: var(--border-subtle); }
.model-context > div { padding: 1rem; background: var(--layer-01); }
.model-context > div,
.model-case-strip span,
.calculator-controls .control { min-width: 0; }
.model-context h3 { margin: .25rem 0 .5rem; font-size: 1.25rem; font-weight: 400; overflow-wrap: anywhere; }
.model-context p { margin: 0; color: var(--text-secondary); font-size: .8125rem; overflow-wrap: anywhere; }
.model-case-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1px; padding: 0 !important; }
.model-case-strip span { min-height: 6.5rem; padding: 1rem; background: var(--layer-01); }
.model-case-strip small { display: block; min-height: 2.5rem; color: var(--text-helper); }
.model-case-strip b { display: block; margin-top: .5rem; font-family: "IBM Plex Mono", monospace; font-size: .875rem; font-weight: 400; }
.calc-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1px; margin-bottom: 1rem; background: var(--border-subtle); }
.calc-summary .metric { min-height: 7rem; }
.calc-summary .value { font-size: clamp(1.2rem, 2vw, 1.75rem); }
.calc-summary .metric--total { box-shadow: inset .25rem 0 var(--interactive); }
.calc-actions { display: flex; flex-wrap: wrap; gap: 1px; margin-bottom: .5rem; }
.carbon-button { min-height: 3rem; border: 0; padding: .75rem 3rem .75rem 1rem; background: var(--interactive); color: #fff; font: inherit; text-align: left; cursor: pointer; }
.carbon-button:hover { background: var(--interactive-hover); }
.carbon-button--secondary { background: var(--layer-02); color: var(--text-primary); }
.carbon-button--secondary:hover { background: var(--layer-03); }
.carbon-button--ghost { background: transparent; color: var(--interactive); }
.carbon-button--ghost:hover { background: var(--layer-02); }
.calc-status { min-height: 1.5rem; color: var(--text-helper); font-size: .75rem; }
.calc-section-title { margin: 1.5rem 0 .75rem; font-size: 1rem; font-weight: 600; }
.calc-legend { display: flex; gap: 1rem; margin-bottom: .75rem; color: var(--text-helper); font-size: .75rem; }
.cost-dot { display: inline-block; width: .5rem; height: .5rem; margin-right: .375rem; background: var(--interactive); }
.cost-dot--external { background: var(--support-warning); }
.cost-dot--recurring { background: var(--support-success); }
.calc-table { min-width: 78rem; }
.calc-table th { white-space: nowrap; }
.calc-table td { vertical-align: middle; }
.calc-table input[type="number"],
.calc-table input[type="text"],
.calc-table select { width: 100%; min-width: 4.75rem; height: 2.5rem; border: 0; border-bottom: 1px solid var(--border-subtle); padding: 0 .5rem; background: var(--field); color: var(--text-primary); font: inherit; font-variant-numeric: tabular-nums; }
.calc-table input[type="text"] { min-width: 12rem; }
.calc-table input.calc-group-input { height: 1.75rem; border-bottom: 0; color: var(--text-helper); font-size: .6875rem; text-transform: uppercase; letter-spacing: .04em; }
.calc-table input[type="checkbox"] { width: 1rem; height: 1rem; accent-color: var(--interactive); }
.calc-table td small { display: block; margin-top: .25rem; color: var(--text-helper); font-size: .625rem; }
.calc-table .calc-total { white-space: nowrap; text-align: right; font-family: "IBM Plex Mono", monospace; font-variant-numeric: tabular-nums; }
.calc-table tr.calc-disabled td { opacity: .45; }
.row-actions { display: flex; flex-wrap: wrap; gap: 1px; min-width: 8rem; }
.row-actions button,
.snapshot-row button { border: 0; padding: .375rem .5rem; background: var(--layer-03); color: var(--text-secondary); font-size: .6875rem; cursor: pointer; }
.row-actions button:hover,
.snapshot-row button:hover { background: var(--interactive); color: #fff; }
.calc-lower-grid { display: grid; grid-template-columns: 3fr 2fr; gap: 1px; margin-top: 1rem; background: var(--border-subtle); }
.calc-method,
.calc-snapshots { padding: 1rem; }
.calc-method h3,
.calc-snapshots h3 { margin: 0 0 1rem; font-size: 1rem; }
.definition-list { display: grid; grid-template-columns: 10rem 1fr; margin: 0; border-top: 1px solid var(--border-subtle); }
.definition-list dt,
.definition-list dd { margin: 0; padding: .625rem 0; border-bottom: 1px solid var(--border-subtle); }
.definition-list dt { color: var(--text-helper); font-size: .75rem; }
.definition-list dd { color: var(--text-secondary); font-size: .75rem; }
.field-sources h4 { margin: 1.25rem 0 .5rem; font-size: .875rem; }
.field-source { padding: .75rem 0; border-top: 1px solid var(--border-subtle); }
.field-source > b { display: inline-block; min-width: 8rem; font-size: .8125rem; }
.field-source p { margin: .375rem 0; color: var(--text-secondary); font-size: .75rem; }
.field-source small { color: var(--text-helper); }
.field-source a { color: var(--interactive); }
.snapshot-list { display: grid; gap: 1px; background: var(--border-subtle); }
.snapshot-row { display: flex; justify-content: space-between; gap: 1rem; padding: .75rem; background: var(--layer-02); }
.snapshot-row small { display: block; margin-top: .25rem; color: var(--text-helper); font-size: .6875rem; }
.snapshot-row > div:last-child { display: flex; align-items: start; gap: 1px; }
.finance-toolbar { display: flex; align-items: end; gap: 1rem; margin-bottom: 1px; padding: 1rem; background: var(--layer-01); }
.finance-toolbar .control { min-width: 18rem; }
.finance-toolbar p { margin: 0 0 .5rem; color: var(--text-helper); font-size: .75rem; }
.calc-footnotes { margin-top: 1px; padding: 1rem; background: var(--layer-01); color: var(--text-secondary); font-size: .8125rem; }
.calc-footnotes p { max-width: 78rem; }
.calc-footnotes p + p { margin-top: .5rem; }
.model-expand { content-visibility: auto; }

@media (max-width: 64rem) {
  .calculator-controls,
  .calculator-controls--primary,
  .model-context,
  .calc-lower-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calc-model-control { grid-column: 1 / -1; }
  .model-case-strip { grid-column: 1 / -1; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .calc-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 47.5rem) {
  html,
  body { max-width: 100%; overflow-x: hidden; }
  .calculator-controls,
  .calculator-controls--primary,
  .model-context,
  .calc-summary,
  .calc-lower-grid { grid-template-columns: 1fr; }
  .model-case-strip { grid-template-columns: 1fr 1fr; }
  .finance-toolbar { display: block; }
  .finance-toolbar .control { min-width: 0; }
  .finance-toolbar p { margin-top: .75rem; }
  .calc-table-wrap { overflow: visible; border: 0; }
  .calc-table,
  .calc-table tbody,
  .calc-table tr,
  .calc-table td { display: block; width: 100%; min-width: 0; }
  .calc-table thead { display: none; }
  .calc-table tr { margin-bottom: 1px; padding: .5rem 0; background: var(--layer-01); border-left: .1875rem solid var(--border-strong); }
  .calc-table td { min-height: 2.75rem; padding: .375rem .75rem; border: 0; display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: .75rem; align-items: center; }
  .calc-table td::before { content: attr(data-label); color: var(--text-helper); font-size: .6875rem; text-transform: uppercase; letter-spacing: .04em; }
  .calc-table td[colspan]::before { display: none; }
  .calc-table input[type="text"],
  .calc-table input[type="number"],
  .calc-table select { min-width: 0; }
  .calc-table .calc-total { text-align: left; }
  .row-actions { min-width: 0; }
}

@media (max-width: 35rem) {
  .model-case-strip { grid-template-columns: 1fr; }
}

.na { color: var(--text-helper); font-style: normal; }

.chart-tools { margin: 0; min-height: 5rem; padding: 1rem; display: flex; flex-wrap: wrap; align-items: end; gap: 1rem; background: var(--layer-01); border-bottom: 1px solid var(--border-subtle); }
.chart-wrap { min-height: 34rem; padding: 1rem; background: var(--layer-01); }
#opportunitySvg { width: 100%; height: 31rem; }
.chart-grid { stroke: var(--border-subtle); opacity: 1; }
.chart-axis { stroke: var(--border-strong); }
.chart-label { fill: var(--text-secondary); font-family: "IBM Plex Mono", monospace; font-size: 11px; }
.chart-title-label { fill: var(--text-primary); font-family: "IBM Plex Sans", sans-serif; font-size: 12px; font-weight: 600; }
.bubble { fill: var(--interactive); fill-opacity: .78; stroke: var(--layer-01); stroke-width: 2; }
.bubble.current { fill: var(--chart-secondary); }
.legend { color: var(--text-secondary); }
.legend span::before { background: var(--interactive); }
.legend span:last-child::before { background: var(--interactive); }
.content-switcher { display: inline-grid; grid-template-columns: repeat(4, minmax(8rem, 1fr)); min-height: 3rem; }
.content-switcher button { min-height: 3rem; border: 1px solid var(--border-subtle); border-right: 0; padding: .5rem 1rem; background: var(--layer-01); color: var(--text-secondary); }
.content-switcher button:last-child { border-right: 1px solid var(--border-subtle); }
.content-switcher button:hover { background: var(--layer-02); color: var(--text-primary); }
.content-switcher button[aria-pressed="true"] { background: var(--interactive); color: #fff; }
.metric-select { display: none; }

.matrix { min-width: 52rem; }
.vertical-grid,
.jurisdiction-grid,
.timeline { display: block; padding: 0; }
.timeline::before { display: none; }
.matrix td:first-child { width: 18%; font-weight: 600; }
.matrix td:last-child { width: 18%; }
.decision-table td:first-child { width: 12rem; color: var(--text-helper); font-family: "IBM Plex Mono", monospace; font-size: .75rem; }
.decision-table td:nth-child(2) { width: 22%; font-weight: 600; }

.shortlist-layout { display: grid; grid-template-columns: minmax(20rem, 5fr) minmax(24rem, 7fr); min-height: 32rem; background: var(--border-subtle); gap: 1px; }
.shortlist-list,
.shortlist-detail { background: var(--layer-01); }
.shortlist-item { width: 100%; min-height: 5rem; display: grid; grid-template-columns: 3rem 1fr; align-items: stretch; border: 0; border-bottom: 1px solid var(--border-subtle); padding: 0; background: transparent; color: var(--text-primary); text-align: left; }
.shortlist-item:hover { background: var(--layer-02); }
.shortlist-item[aria-selected="true"] { background: var(--layer-02); box-shadow: inset .25rem 0 var(--interactive); }
.shortlist-rank { display: grid; place-items: center; color: var(--text-helper); font-family: "IBM Plex Mono", monospace; }
.shortlist-copy { padding: 1rem; }
.shortlist-copy b { display: block; font-weight: 600; }
.shortlist-copy span { display: block; margin-top: .25rem; color: var(--text-secondary); font-size: .75rem; }
.shortlist-detail { padding: 2rem; }
.shortlist-detail .kicker { color: var(--text-helper); font-family: "IBM Plex Mono", monospace; font-size: .75rem; }
.shortlist-detail h3 { margin: 1rem 0 2rem; max-width: 28rem; font-size: 2rem; line-height: 1.12; font-weight: 300; }
.shortlist-detail dl { display: grid; grid-template-columns: 10rem 1fr; margin: 0; border-top: 1px solid var(--border-subtle); }
.shortlist-detail dt,
.shortlist-detail dd { margin: 0; padding: 1rem 0; border-bottom: 1px solid var(--border-subtle); }
.shortlist-detail dt { color: var(--text-helper); font-size: .75rem; }
.shortlist-detail dd { color: var(--text-secondary); }
.checklist { gap: 0; }
.check-row { min-height: 3rem; grid-template-columns: 2rem 1fr; padding: .75rem 0; border-top: 1px solid var(--border-subtle); color: var(--text-secondary); }
.check-row::before { width: 1.25rem; height: 1.25rem; background: var(--interactive); color: #fff; }
.section-card--spaced { margin-top: 1px; }
.tooltip { z-index: 40; max-width: 20rem; padding: .75rem 1rem; border: 1px solid var(--border-strong); background: var(--layer-02); color: var(--text-primary); box-shadow: none; }
.footer { margin: 2rem 0 0; padding-top: 1rem; border-top: 1px solid var(--border-subtle); color: var(--text-helper); font-family: "IBM Plex Mono", monospace; font-size: .75rem; text-align: left; }

@media (max-width: 1050px) {
  .header-menu { display: block; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; z-index: 25; top: 3rem; bottom: 0; left: 0; width: 16rem; height: auto; transform: translateX(-100%); transition: transform .16s ease-out; }
  body.nav-open .sidebar { transform: translateX(0); }
  body.nav-open::after { content: ""; position: fixed; z-index: 20; inset: 3rem 0 0; background: rgba(0,0,0,.55); }
  main { padding: 2rem 1.5rem 4rem; }
  .nav { display: grid; overflow: visible; }
  .nav button { width: 100%; }
  .source-note { display: block; }
}

@media (max-width: 760px) {
  .header-meta { display: none; }
  .theme-field { max-width: 8rem; }
  main { padding: 1rem 1rem 3rem; }
  .page-head { min-height: 7rem; }
  .thesis { grid-template-columns: 1fr; min-height: 0; padding: 1.5rem; }
  .thesis > .eyebrow,
  .thesis h3,
  .thesis > p,
  .thesis-flow { grid-column: 1; }
  .thesis h3 { margin-top: 1rem; font-size: 2.625rem; }
  .thesis-flow { grid-template-columns: 1fr 1fr; }
  .metrics { grid-template-columns: 1fr 1fr; }
  .section-grid { display: block; background: transparent; }
  .section-grid > * { margin-bottom: 1px; }
  .controls { grid-template-columns: 1fr 1fr; }
  .controls .control:first-child { grid-column: 1 / -1; }
  .model-detail { grid-template-columns: 1fr; padding: 1.5rem; }
  .profile-grid { grid-template-columns: 1fr; }
  .profile-grid dt { padding-bottom: 0; border-bottom: 0; }
  .content-switcher { width: 100%; grid-template-columns: 1fr 1fr; }
  .shortlist-layout { grid-template-columns: 1fr; }
  .shortlist-detail { min-height: 24rem; }
}

@media (max-width: 460px) {
  .header-name { padding: 0 .75rem; font-size: .75rem; }
  .theme-field { width: 6.5rem; padding: 0 .5rem; font-size: .75rem; }
  .metrics,
  .controls,
  .facts { grid-template-columns: 1fr; }
  .controls .control:first-child { grid-column: auto; }
  .thesis h3 { font-size: 2rem; }
  .thesis-flow { grid-template-columns: 1fr; }
  .metric { min-height: 7rem; }
  .chart-wrap { min-height: 27rem; padding: .5rem; }
  #opportunitySvg { height: 25rem; }
  .shortlist-detail dl { grid-template-columns: 1fr; }
  .shortlist-detail dt { padding-bottom: 0; border-bottom: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; }
}
