:root {
  color-scheme: light;
  --background: #f7f6f1;
  --surface: #ffffff;
  --raised: #eeeee7;
  --text: #253534;
  --muted: #54635f;
  --accent: #28665d;
  --accent-ink: #ffffff;
  --line: #cbd2c9;
  --control-line: #74867d;
  --review: #956027;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 2rem; }
body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  overflow-wrap: anywhere;
}
a { color: inherit; text-underline-offset: 0.3em; }
a:hover { color: var(--accent); }
button, input, select { font: inherit; }
button, select { cursor: pointer; }
button { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 5px; }
main:focus { outline: none; }
h1, h2, h3, p { margin-top: 0; }
h1, h2 { font-family: var(--serif); font-weight: 400; letter-spacing: -0.045em; }
h1 { margin-bottom: 1.5rem; font-size: clamp(2.8rem, 6.1vw, 5.2rem); line-height: 1.08; }
h2 { margin-bottom: 0; font-size: clamp(2rem, 3.4vw, 2.9rem); line-height: 1.15; }
h3 { margin-bottom: 0.8rem; font-size: 1.07rem; font-weight: 600; line-height: 1.4; letter-spacing: -0.025em; }
p { margin-bottom: 1rem; }
.container { width: min(1120px, calc(100% - 6rem)); margin-inline: auto; }
.section { padding-block: 5.5rem; }
.skip-link { position: absolute; z-index: 5; top: 1rem; left: 1rem; padding: 0.75rem 1rem; transform: translateY(-200%); background: var(--accent); color: var(--accent-ink); }
.skip-link:focus { transform: translateY(0); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.site-header { --text: #f0f2ee; --muted: #b4c0b9; --accent: #a5cfbd; --control-line: #87978d; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; width: 100%; padding-inline: max(3rem, calc((100% - 1120px) / 2)); min-height: 96px; border-bottom: 1px solid #394541; background: #171c1d; color-scheme: dark; }
.wordmark { display: flex; flex-direction: column; color: var(--text); font-size: 1.17rem; font-weight: 650; letter-spacing: -0.04em; line-height: 1.4; text-decoration: none; }
.wordmark span { margin-top: 0.25rem; color: var(--muted); font-size: 0.8rem; font-weight: 400; letter-spacing: 0.025em; }
nav { display: flex; flex-wrap: wrap; gap: 1.8rem; font-size: 0.95rem; }
nav a { display: inline-flex; min-width: 44px; min-height: 44px; align-items: center; justify-content: center; color: var(--muted); text-decoration: none; }
nav a:last-child { padding-inline: 1.2rem; border: 1px solid var(--control-line); border-radius: 100px; color: var(--text); }
nav a:hover { text-decoration: underline; }
.hero { --text: #f0f2ee; --muted: #b4c0b9; --accent: #a5cfbd; --accent-ink: #17211d; background: #171c1d; color: var(--text); padding-block: 5rem 2rem; }
.hero-layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 0.7fr); align-items: end; gap: 2rem 4rem; }
.hero-introduction { min-width: 0; padding-bottom: 0.5rem; }
.hero-index { grid-column: 1 / -1; display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.6rem 2rem; border-top: 1px solid #394541; padding-top: 1.5rem; margin-top: 3rem; color: var(--muted); font-size: 0.875rem; }
.hero-copy { min-width: 0; }
.hero h1 { font-family: inherit; font-weight: 500; font-size: clamp(3.5rem, 8.5vw, 7.5rem); line-height: 0.96; letter-spacing: -0.07em; margin-bottom: 0; }
.hero h1 em { color: var(--accent); font-family: var(--serif); font-weight: 400; }
.eyebrow { margin-bottom: 1.4rem; color: var(--accent); font-size: 0.875rem; font-weight: 500; letter-spacing: 0.055em; }
.lead { max-width: 39rem; margin-bottom: 0.8rem; font-size: 1.18rem; letter-spacing: -0.02em; }
.hero-description { max-width: 39rem; margin-bottom: 1.6rem; color: var(--muted); font-size: 1rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 2rem; }
.hero-location { margin: 1.3rem 0 0; color: var(--muted); font-size: 0.875rem; }
.button { display: inline-flex; min-height: 48px; align-items: center; justify-content: center; padding: 0.8rem 1.5rem; border: 1px solid var(--accent); border-radius: 4px; background: var(--accent); color: var(--accent-ink); font-size: 0.95rem; font-weight: 500; text-decoration: none; }
.button:hover { background: var(--text); border-color: var(--text); color: var(--accent-ink); }
.text-link { display: inline-flex; min-height: 44px; align-items: center; gap: 1rem; color: var(--accent); font-size: 0.95rem; text-decoration: underline; }
.services { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 5rem; padding-block: 3.5rem 5rem; border-top: 1px solid var(--line); }
.service-intro h2 { margin-bottom: 1.2rem; font-size: clamp(2rem, 3.4vw, 3rem); }
.service-intro p { max-width: 26rem; margin-bottom: 0; color: var(--muted); }
.service-list { margin: 0; padding: 0; list-style: none; }
.service-list li { padding-block: 1.3rem; border-top: 1px solid var(--line); color: var(--muted); }
.service-list li:first-child { padding-top: 0; border-top: 0; }
.service-list strong { display: block; margin-bottom: 0.35rem; color: var(--text); font-weight: 600; }
.showcase-section { --text: #f0f2ee; --muted: #b4c0b9; --accent: #a5cfbd; --accent-ink: #17211d; --line: #43524c; --control-line: #87978d; --surface: #232c29; --review: #e4b982; padding-block: 4.5rem; background: #171c1d; color: var(--text); color-scheme: dark; }
.example-intro { max-width: 52rem; margin-bottom: 2rem; }
.example-intro h2 { margin-bottom: 0.8rem; font-size: clamp(2rem, 4.4vw, 3.8rem); }
.example-intro > p { color: var(--muted); }
.example-intro .eyebrow { color: var(--accent); }
.workspace { border-top: 1px solid var(--line); padding-top: 0.5rem; }
.workspace-toolbar { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem 1rem; border-bottom: 1px solid var(--line); }
.workspace-toolbar > p { margin: 0; padding-block: 0.75rem; color: var(--muted); font-size: 0.875rem; }
.reset-button { min-height: 44px; padding: 0.5rem 0; border: 0; background: transparent; color: var(--muted); font-size: 0.875rem; text-decoration: underline; text-underline-offset: 0.25em; }
.reset-button:hover { color: var(--accent); }
.demo-panel { padding-top: 2rem; }
.scenario-control { display: flex; align-items: center; flex-wrap: wrap; gap: 0.75rem 1.5rem; margin-bottom: 1.5rem; font-size: 0.875rem; }
.scenario-control select { flex: 1; min-width: 0; max-width: 24rem; border-radius: 4px; }
#model-state { margin-left: auto; color: var(--accent); }
.source-documents { border-block: 1px solid var(--line); }
.source-documents summary { padding-block: 1rem; font-size: 0.95rem; }
.source-documents small { display: block; color: var(--muted); font-size: 0.875rem; font-weight: 400; }
.source-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 0.7rem; margin-block: 0.7rem 1.5rem; font-size: 0.875rem; }
.source-actions .button { margin-left: auto; }
.paper-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.paper, .spreadsheet-panel { --text: #253534; --muted: #54635f; --accent: #28665d; --line: #cbd2c9; --control-line: #74867d; --surface: #ffffff; color: var(--text); color-scheme: light; }
.paper { min-width: 0; padding: 1.2rem 0.8rem; background: #f7f6f1; border-top: 4px solid #a5cfbd; font-family: var(--serif); }
.paper h4 { margin: 0.5rem 0 1rem; font-size: 1.05rem; line-height: 1.35; font-weight: 400; }
.paper > p { margin-bottom: 0.5rem; color: var(--muted); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; font-size: 0.875rem; }
.paper table { font-size: 0.875rem; }
.paper th, .paper td { padding: 0.6rem 0.2rem; border-color: #9aa79e; }
.paper th { font-weight: 400; }
.paper caption { font-size: 0.875rem; }
.source-original { overflow-x: auto; }
.prediction-workbench { display: grid; grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); gap: 2rem; align-items: start; margin-top: 1.5rem; scroll-margin-top: 1rem; }
.spreadsheet-panel { min-width: 0; padding: 1.2rem; border-radius: 4px; background: #f7f6f1; }
.stage-heading { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 0.6rem; }
.stage-heading h3 { margin: 0; font-size: 0.95rem; font-weight: 500; }
.small-button { min-height: 44px; padding: 0.5rem 0.8rem; border: 1px solid var(--control-line); border-radius: 4px; background: transparent; font-size: 0.875rem; }
.small-button:hover { color: var(--accent); border-color: var(--accent); }
.small-button:disabled { opacity: 0.5; cursor: not-allowed; }
.sheet-hint, .sheet-footnote, .fit-note { margin: 0.5rem 0 0.8rem; color: var(--muted); font-size: 0.875rem; }
.sheet-scroll { max-height: 570px; overflow: auto; border: 1px solid var(--control-line); background: var(--surface); }
#editable-data { font-size: 0.875rem; }
#editable-data th { font-weight: 500; background: #e8ece4; overflow-wrap: normal; }
#editable-data th:first-child { min-width: 3.4rem; white-space: nowrap; }
#editable-data td { min-width: 4.25rem; }
#editable-data td:nth-last-child(-n+2) { min-width: 6rem; }
#editable-data thead th { position: sticky; top: 0; z-index: 1; }
#editable-data th, #editable-data td { padding: 0.25rem; border: 1px solid var(--line); }
#editable-data input { min-width: 4rem; width: 100%; min-height: 44px; padding: 0.3rem; border: 1px solid var(--control-line); border-radius: 0; background: white; color: var(--text); font-size: 0.875rem; font-variant-numeric: tabular-nums; }
#editable-data input[aria-invalid="true"] { border: 2px solid #aa382f; }
.model-error { margin-top: 1rem; padding: 0.75rem 1rem; border-left: 3px solid #f2b7a8; color: #f2b7a8; font-size: 0.95rem; }
.response-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.8rem; margin-block: 0.8rem; }
.response-metrics > div { display: flex; flex-direction: column; justify-content: space-between; min-width: 0; font-size: 0.875rem; }
.response-metrics span { color: var(--muted); }
.response-metrics strong { font-size: 1.8rem; font-weight: 400; line-height: 1.4; font-variant-numeric: tabular-nums; }
.response-metrics i { height: 3px; max-width: 100%; background: var(--accent); }
#secondary-bar { background: var(--review); }
.surface-card { background: #111817; border: 1px solid var(--line); border-radius: 4px; }
.plot-toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 0.5rem; font-size: 0.875rem; }
.plot-toolbar select { min-width: 0; flex: 1; }
#surface-slice { color: var(--muted); }
.plot-grid { fill: none; stroke: #46554e; stroke-width: 1; vector-effect: non-scaling-stroke; }
.response-chart { touch-action: pan-y; cursor: crosshair; }
.contour-line { fill: none; stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.contour-label { fill: #eef2e9; stroke: #111817; stroke-width: 4px; paint-order: stroke; }
.contour-key { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem 1rem; margin-top: 0.5rem; font-size: 0.875rem; color: var(--muted); }
.contour-key > span { display: inline-flex; align-items: center; gap: 0.4rem; }
.selected-key { width: 10px; height: 10px; border: 2px solid #f0f2ee; border-radius: 50%; }
.optimum-key { width: 10px; height: 10px; background: var(--review); transform: rotate(45deg); }
.optimum-marker { fill: var(--review); stroke: #111817; stroke-width: 2; vector-effect: non-scaling-stroke; }
.optimisation-control { padding-top: 1rem; border-top: 1px solid var(--line); margin-top: 0.8rem; }
.priority-labels { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem; color: var(--muted); font-size: 0.875rem; }
.compromise-result { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 0.8rem; margin-block: 1rem; padding: 1rem; background: #26322c; border-left: 2px solid var(--review); }
.compromise-result > div { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.compromise-result .mini-label { margin: 0; }
#optimum-conditions { font-size: 1.15rem; font-weight: 500; font-variant-numeric: tabular-nums; }
#optimum-responses { color: var(--muted); font-size: 0.875rem; }
.panel-heading { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2rem; align-items: start; margin-bottom: 1.7rem; }
.panel-heading h3 { max-width: 24rem; margin: 0; font-family: var(--serif); font-size: 1.6rem; font-weight: 400; line-height: 1.3; }
.panel-heading p { max-width: 32rem; margin: 0; color: var(--muted); font-size: 0.95rem; }
.demo-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; grid-template-areas: "visual controls"; gap: 2rem; align-items: start; }
.model-visual { min-width: 0; }
.demo-grid > .image-card { grid-area: visual; }
.chart-card { min-width: 0; padding: 1rem 1.2rem 0.75rem; }
.image-card { border: 1px solid var(--line); border-radius: 4px; background: #232c29; }
.canvas-caption { color: var(--muted); font-size: 0.875rem; }
.plot-scale { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.3rem 1rem; margin-block: 0.4rem; color: var(--muted); font-size: 0.875rem; }
.response-chart, .image-sketch { display: block; width: 100%; height: auto; }
.image-sketch { max-height: 300px; }
.point-label { fill: var(--text); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; font-size: 1.25rem; }
.surface-marker { fill: none; stroke: white; stroke-width: 3; filter: drop-shadow(0 1px 1px #142c29); }
.surface-marker, .sketch-object, .detection-ring, .review-marker { vector-effect: non-scaling-stroke; }
.surface-key { display: flex; align-items: center; gap: 0.7rem; margin-top: 0.8rem; color: var(--muted); font-size: 0.875rem; }
.surface-key i { flex: 1; height: 6px; border-radius: 10px; background: linear-gradient(90deg, #edf5f0, #3b6559); }
.chart-key { display: flex; flex-wrap: wrap; gap: 0.6rem 1.5rem; color: var(--muted); font-size: 0.875rem; }
.chart-key > span { display: inline-flex; align-items: center; gap: 0.45rem; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.legend-ring { width: 11px; height: 11px; border: 2px solid var(--muted); border-radius: 50%; }
.legend-elongated { width: 17px; height: 8px; border: 2px solid var(--review); border-radius: 6px; }
.inspector { min-width: 0; grid-area: controls; padding: 0 0 0.5rem 1.5rem; border-left: 1px solid var(--line); }
.mini-label { margin-bottom: 0.75rem; color: var(--muted); font-size: 0.875rem; }
.prediction-result { display: flex; align-items: baseline; gap: 0.5rem; }
.prediction-result strong { font-family: var(--serif); font-size: 3.6rem; font-weight: 400; line-height: 1.1; color: var(--accent); font-variant-numeric: tabular-nums; }
.prediction-result > span { font-size: 0.875rem; color: var(--muted); }
.bar-track { width: 100%; height: 6px; background: var(--line); }
.bar-track > span { display: block; width: 0; height: 100%; background: var(--accent); }
#elongated-bar { background: var(--review); }
.prediction-controls { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0.5rem 1rem; margin-block: 0.8rem; }
.prediction-controls > div { display: flex; flex-direction: column; justify-content: space-between; }
.control-label { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: start; gap: 0.2rem 0.7rem; font-size: 0.875rem; }
.control-label output { font-variant-numeric: tabular-nums; color: var(--accent); }
input[type="range"] { display: block; width: 100%; height: 44px; margin: 0.2rem 0 0; accent-color: var(--accent); cursor: pointer; }
.inspector-note { margin: 1.4rem 0 0; color: var(--muted); font-size: 0.875rem; line-height: 1.7; }
.model-note { margin-top: 0.6rem; }
.dataset-note { color: var(--muted); font-size: 0.875rem; }
.demo-details { margin-top: 1rem; color: var(--muted); font-size: 0.95rem; }
summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 48px; padding-block: 0.75rem; cursor: pointer; list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: ""; flex: 0 0 22px; height: 22px; background: linear-gradient(var(--accent), var(--accent)) center / 18px 2px no-repeat, linear-gradient(var(--accent), var(--accent)) center / 2px 18px no-repeat; }
details[open] > summary::after { background-size: 18px 2px, 2px 0; }
summary:hover { color: var(--accent); }
table { width: 100%; border-collapse: collapse; text-align: left; }
caption { padding-block: 0.75rem; text-align: left; }
th, td { padding: 0.6rem; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.image-card { padding-top: 1.2rem; }
.image-card .chart-key { margin-bottom: 1rem; }
.sketch-object { fill: #d4e6dd; stroke: var(--accent); stroke-width: 1.5; }
.sketch-center { fill: var(--accent); opacity: 0.4; }
.elongated .sketch-object { fill: #e9ddc5; stroke: var(--review); }
.elongated .sketch-center { fill: var(--review); }
.synthetic-cell.excluded { opacity: 0.25; }
.detection-ring { fill: none; stroke: var(--accent); stroke-width: 1; }
.elongated .detection-ring { stroke: var(--review); }
.review-marker { fill: none; stroke: var(--review); stroke-width: 2.5; stroke-dasharray: 5 4; }
.canvas-caption { margin: 0.8rem 0 0; }
.metric { display: flex; flex-direction: column; gap: 0.2rem; margin-bottom: 1.4rem; }
.metric strong { font-family: var(--serif); font-size: 2.6rem; font-weight: 400; line-height: 1.2; }
.metric > span { color: var(--muted); font-size: 0.875rem; }
.metric-denominator { color: var(--muted); font-size: 1.1rem; }
.morphology-counts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.2rem; font-size: 0.875rem; }
.morphology-counts > div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 0.3rem; }
.morphology-counts .bar-track { grid-column: 1 / -1; }
.morphology-controls { display: grid; gap: 0.8rem; }
.morphology-controls .control-label { flex-direction: column; }
.review-button { min-height: 44px; width: 100%; margin-top: 1.4rem; padding: 0.6rem; border: 1px solid var(--control-line); border-radius: 4px; background: transparent; font-size: 0.875rem; }
.review-button[aria-pressed="true"] { border-color: var(--review); color: var(--review); }
.review-result { margin-block: 0.5rem 0; color: var(--muted); font-size: 0.875rem; }
.review-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1rem; margin-top: 0.8rem; }
.review-controls .review-button { width: auto; margin: 0; padding-inline: 1rem; }
.review-controls .review-result { margin: 0; }
select { max-width: 100%; min-height: 44px; padding: 0.5rem 2rem 0.5rem 0.75rem; border: 1px solid var(--control-line); background: var(--surface); color: var(--text); }
#model-data { font-size: 0.875rem; }
#model-data th, #model-data td { padding: 0.5rem 0.3rem; }
.secondary-examples { margin-top: 2.5rem; }
.secondary-example { border-top: 1px solid var(--line); }
.secondary-example:last-child { border-bottom: 1px solid var(--line); }
.secondary-example > summary { padding-block: 1.2rem; font-weight: 500; }
.secondary-example > .demo-panel { padding-block: 0.5rem 2rem; }
.no-script-note { margin: 1rem 0 0; color: var(--muted); font-size: 0.8rem; }
.public-work { padding-top: 0.6rem; }
.about-section { padding-block: 5rem 4rem; }
.about-note { max-width: 46rem; }
.about-note h2 { margin-bottom: 1.8rem; font-size: clamp(2rem, 3.4vw, 3rem); }
.about-copy > p { color: var(--muted); font-size: 1.05rem; }
.about-copy .working-note { margin-top: 1.5rem; margin-bottom: 0; padding-top: 1.2rem; border-top: 1px solid var(--line); font-size: 0.95rem; }
.research-section { max-width: 46rem; padding-block: 0 3.5rem; }
.research-section h2 { margin-bottom: 0.8rem; font-family: inherit; font-size: 1.4rem; font-weight: 500; letter-spacing: -0.025em; }
.research-note, .publication-meta, .publication-topic { color: var(--muted); font-size: 0.875rem; }
.research-note { margin-bottom: 1.5rem; }
.thesis-reference { margin-top: 1.2rem; padding-top: 1.1rem; border-top: 1px solid var(--line); }
.thesis-reference .mini-label { margin-bottom: 0.3rem; }
.thesis-reference .research-note { margin-top: 0.3rem; }
.publication-list { margin: 0; padding: 0; list-style: none; }
.publication-list li { padding-block: 1rem; border-top: 1px solid var(--line); }
.publication-link { display: block; min-height: 44px; padding-block: 0.35rem; font-size: 1rem; font-weight: 500; line-height: 1.55; }
.publication-meta { margin-block: 0.4rem 0; }
.publication-topic { margin-block: 0.3rem 0; }
.more-research { margin-top: 0.5rem; font-size: 0.95rem; }
.contact-section { --text: #edf1e9; --muted: #b2bfb7; --accent: #9dcbbd; padding-block: 4.5rem; background: #142c29; color: var(--text); color-scheme: dark; }
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: center; gap: 5rem; }
.contact-section h2 { font-size: clamp(2.6rem, 4vw, 3.5rem); }
.contact-grid > div:last-child > p:first-child { max-width: 28rem; font-size: 1.05rem; }
.preview-notice { max-width: 33rem; margin-top: 1.5rem; margin-bottom: 0; color: var(--muted); font-size: 0.875rem; }
.site-footer { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem 2rem; padding-block: 1.8rem; border-top: 1px solid var(--line); color: var(--muted); font-size: 0.875rem; }
.site-footer p { margin: 0; }
.site-footer a { display: inline-flex; min-height: 44px; align-items: center; }
.prose { max-width: 46rem; padding-block: 4rem; }
.prose h1 { font-size: clamp(2.5rem, 5vw, 3.8rem); }
.prose h2 { margin-block: 2.5rem 1rem; font-size: 1.8rem; }
.prose > p:not(.eyebrow) { color: var(--muted); font-size: 0.92rem; }

@media (max-width: 1000px) {
  .demo-grid { grid-template-columns: minmax(0, 1fr) 280px; gap: 1.5rem; }
  .hero-layout { gap: 2rem; }
  .services, .contact-grid { gap: 3rem; }
}

@media (max-width: 740px) {
  .container { width: calc(100% - 3rem); }
  .site-header { width: 100%; padding-inline: 1.5rem; min-height: 96px; }
  nav { gap: 1.1rem; font-size: 0.875rem; }
  .wordmark { font-size: 1.05rem; }
  .wordmark span { font-size: 0.8rem; }
  .hero { padding-block: 3rem 1.5rem; }
  .hero-layout { grid-template-columns: minmax(0, 1fr); }
  .hero h1 { font-size: clamp(3.5rem, 13vw, 5.5rem); }
  .hero-index { margin-top: 0.5rem; }
  .services { padding-block: 2.5rem 3.5rem; }
  .showcase-section { padding-block: 2.5rem; }
  .workspace { padding-top: 0.5rem; }
  .paper-grid { grid-template-columns: minmax(0, 1fr); }
  .source-actions .button { width: 100%; margin-left: 0; }
  .prediction-workbench { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .spreadsheet-panel { padding: 0.75rem; }
  .sheet-scroll { max-height: 180px; }
  .sheet-footnote { margin-bottom: 0; }
  .sheet-hint { margin-block: 0.3rem 0.5rem; }
  .stage-heading { gap: 0.3rem; }
  .stage-heading h3 { font-size: 0.875rem; }
  .response-metrics { margin-block: 0.5rem; }
  .response-metrics strong { font-size: 1.5rem; }
  .response-chart { max-height: 230px; }
  .plot-toolbar > label { flex-basis: 100%; }
  #model-state { margin-left: 0; }
  .scenario-control { flex-direction: column; align-items: stretch; margin-bottom: 0.8rem; gap: 0.4rem; }
  .scenario-control select { width: 100%; max-width: none; }
  .example-intro { margin-bottom: 0.75rem; }
  .example-intro h2 { margin-bottom: 0.5rem; font-size: 1.7rem; }
  .example-intro > p { margin-bottom: 0.5rem; font-size: 0.95rem; }
  .demo-panel { padding-top: 0.75rem; }
  .workspace-toolbar { padding-bottom: 0.3rem; }
  .panel-heading { grid-template-columns: minmax(0, 1fr); gap: 0.8rem; }
  .panel-heading h3 { max-width: 30rem; }
  .demo-grid { grid-template-columns: minmax(0, 1fr); grid-template-areas: "controls" "visual"; gap: 1rem; }
  #panel-image .demo-grid { grid-template-areas: "visual" "controls"; }
  .metric { flex-direction: row; align-items: center; gap: 0.8rem; margin-bottom: 0.5rem; }
  .metric strong { font-size: 2rem; }
  .morphology-counts { margin-bottom: 0.5rem; }
  .inspector { padding: 0.5rem 0 0; border: 0; }
  #panel-image .inspector { padding-top: 0; }
  .image-card { padding-bottom: 0.5rem; }
  .image-card .canvas-caption { margin-top: 0.4rem; }
  .prediction-result strong { font-size: 2.8rem; }
  .prediction-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.3rem 0.8rem; }
  .prediction-controls > div:last-child { grid-column: 1 / -1; }
  .prediction-controls .control-label { flex-direction: column; }
  .prediction-controls > div:last-child .control-label { flex-direction: row; }
  .morphology-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .chart-card { padding-inline: 0.7rem; }
  .chart-key { gap: 0.8rem; }
  .section { padding-block: 3.5rem; }
  .services, .contact-grid { grid-template-columns: minmax(0, 1fr); gap: 2rem; }
  .about-section { padding-block: 3.5rem; }
  .contact-section { padding-block: 3.5rem; }
}

@media (max-width: 480px) {
  .site-header { align-items: flex-start; flex-direction: column; justify-content: center; gap: 0.75rem; padding-block: 1.2rem; }
  nav { column-gap: 0.5rem; }
  nav a:last-child { padding-inline: 0.75rem; }
  th, td { padding-inline: 0.3rem; }
}

@media (max-height: 480px) and (min-width: 741px) {
  .sheet-scroll { max-height: 180px; }
  .model-visual { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 150px); gap: 0.5rem 1rem; }
  .model-visual > .stage-heading, .model-visual > .response-metrics, .model-visual > .compromise-result, .model-visual > .fit-note { grid-column: 1 / -1; }
  .surface-card { grid-column: 1; grid-row: 3 / 5; padding: 0.5rem; }
  .plot-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .plot-toolbar label { grid-column: 1; grid-row: 1; }
  #surface-slice { grid-column: 2; grid-row: 1; }
  .plot-toolbar select { grid-column: 1 / -1; grid-row: 2; width: 100%; }
  .response-chart { max-height: 150px; }
  .prediction-controls { grid-column: 2; grid-row: 3; }
  .optimisation-control { grid-column: 2; grid-row: 4; margin-top: 0; padding-top: 0.5rem; }
  .prediction-controls { grid-template-columns: minmax(0, 1fr); gap: 0.3rem; }
  .prediction-controls .control-label { flex-direction: row; }
  .prediction-controls > div:last-child { grid-column: 1 / -1; }
  .prediction-controls > div:last-child .control-label { flex-direction: row; }
  .prediction-result strong { font-size: 2.5rem; }
  .morphology-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric strong { font-size: 2rem; }
}

@media (prefers-reduced-motion: no-preference) {
  .button { transition: background-color 140ms, border-color 140ms; }
  .bar-track > span { transition: width 180ms ease; }
}
