:root {
  color-scheme: light;
  --page: #f4f2ed;
  --paper: #ffffff;
  --ink: #182632;
  --muted: #5e6c70;
  --line: #dce1dc;
  --line-strong: #bec9c2;
  --accent: #bd4e2d;
  --accent-dark: #983c21;
  --accent-soft: #fbf0e9;
  --teal: #316c66;
  --teal-soft: #edf5ef;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.55;
  color: var(--ink);
  background: var(--page);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 24px; }
body { margin: 0; min-width: 0; }
[hidden] { display: none !important; }
::selection { background: #f1d4c3; color: var(--ink); }
button, input, select { font: inherit; }
button, a, input, select, summary { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button, a { transition: background-color 140ms ease, border-color 140ms ease, color 140ms ease; }
button:disabled { cursor: not-allowed; opacity: .46; }
button:focus-visible, a:focus-visible, summary:focus-visible,
input:focus-visible, select:focus-visible, [tabindex]:focus-visible {
  outline: 3px solid #a14a2d;
  outline-offset: 3px;
}
a { color: var(--accent-dark); text-underline-offset: 3px; }
a:hover { color: var(--accent); }
h1, h2, h3, h4, p { margin-top: 0; }
h1, h2, h3, h4 { line-height: 1.25; }
h2, h3, h4 { font-weight: 620; }
p { margin-bottom: 14px; }
svg { max-width: 100%; }
code, pre, .mono { font-family: var(--mono); }
.mono { overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip {
  position: fixed; top: 12px; left: 12px; z-index: 100;
  transform: translateY(-200%); padding: 12px 18px;
  border-radius: 5px; background: var(--ink); color: #fff; text-decoration: none;
}
.skip:focus { transform: translateY(0); color: #fff; }
.site-header, main, footer { width: calc(100% - 96px); max-width: 1440px; margin-inline: auto; }
.site-header {
  display: flex; align-items: center; justify-content: space-between; gap: 28px;
  padding-block: 25px; border-bottom: 1px solid #d8ddd5;
}
.brand { display: flex; align-items: center; gap: 13px; color: var(--ink); text-decoration: none; }
.brand:hover { color: var(--ink); }
.brand > span:last-child { font-size: 12px; font-weight: 700; letter-spacing: .14em; }
.brand small { display: block; margin-top: 3px; font-size: 10px; font-weight: 400; letter-spacing: .01em; color: var(--muted); }
.brand-mark {
  display: flex; align-items: center; justify-content: center; flex: 0 0 45px;
  height: 45px; background: var(--ink); color: #fff; border-radius: 2px;
  font: 26px/1 Georgia, serif; letter-spacing: -2px;
}
.brand-mark span { color: #edb999; font-size: 21px; transform: translateY(3px); }
.site-header nav { display: flex; align-items: center; flex-wrap: wrap; gap: 26px; }
.site-header nav a { color: var(--ink); text-decoration: none; font-size: 12px; }
.site-header nav a:hover { color: var(--accent); }
.hero {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(230px, 310px);
  gap: 70px; align-items: center; padding-block: 56px 48px;
}
.hero > *, .main-grid > *, .inspection-grid > *, .clarification-layout > * { min-width: 0; }
.eyebrow {
  margin-bottom: 12px; font-family: var(--mono); font-size: 10px; font-weight: 500;
  line-height: 1.6; letter-spacing: .095em; text-transform: uppercase; color: var(--muted);
}
.live-dot { display: inline-block; width: 6px; height: 6px; margin: 0 4px 1px 0; border-radius: 50%; background: var(--accent); }
h1 { margin-bottom: 20px; font-size: clamp(38px, 4.25vw, 61px); font-weight: 550; line-height: 1.09; letter-spacing: -.052em; }
h1 span { font-family: Georgia, "Times New Roman", serif; font-style: italic; font-weight: 400; letter-spacing: -.04em; }
.hero-copy { max-width: 750px; margin-bottom: 0; color: #526167; font-size: 16px; line-height: 1.7; }
.hero-note { border-left: 1px solid #cbd2c9; padding-left: 28px; }
.note-number { display: block; margin-bottom: 13px; font: 11px/1.4 var(--mono); letter-spacing: .12em; color: var(--accent); }
.hero-note strong { display: block; font-size: 17px; font-weight: 550; line-height: 1.45; }
.hero-note p { margin-block: 13px 16px; font-size: 12px; line-height: 1.7; color: var(--muted); }
.badge {
  display: inline-flex; align-items: center; align-self: flex-start; max-width: 100%;
  padding: 5px 9px; border: 1px solid var(--line); border-radius: 30px;
  background: #f6f7f3; color: #566369; font-size: 10px; line-height: 1.35; font-weight: 500;
}
.problem-tabs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--line-strong); border-bottom: 0; border-radius: 12px 12px 0 0; }
.problem-tab {
  position: relative; display: flex; align-items: flex-start; gap: 12px; min-width: 0;
  padding: 19px 17px; border: 0; border-right: 1px solid var(--line); background: #ecefe8;
  text-align: left; color: var(--muted); line-height: 1.4;
}
.problem-tab:first-child { border-top-left-radius: 11px; }
.problem-tab:last-child { border-right: 0; border-top-right-radius: 11px; }
.problem-tab:hover { background: #f9faf6; color: var(--ink); }
.problem-tab.active, .problem-tab[aria-selected="true"] { background: var(--paper); color: var(--ink); box-shadow: inset 0 3px 0 var(--accent); }
.problem-tab:focus-visible { z-index: 1; outline-offset: -4px; }
.tab-index { flex-shrink: 0; margin-top: 1px; font: 11px/1.6 var(--mono); color: #79857d; }
.problem-tab[aria-selected="true"] .tab-index { color: var(--accent); }
.problem-tab strong { display: block; font-size: 13px; font-weight: 650; }
.problem-tab small { display: block; margin-top: 4px; font-size: 10px; color: var(--muted); }
.workspace {
  padding: 30px; border: 1px solid var(--line-strong); border-top: 0;
  border-radius: 0 0 12px 12px; background: var(--paper); box-shadow: 0 12px 36px #18263206;
}
.workspace-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 24px; margin-bottom: 24px; }
.workspace-heading .eyebrow { margin-bottom: 8px; color: var(--accent); }
.workspace-heading h2 { margin-bottom: 9px; font-size: clamp(24px, 2.3vw, 31px); letter-spacing: -.03em; }
.workspace-heading p:not(.eyebrow) { max-width: 900px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.run-identity { display: flex; flex: 0 0 auto; flex-direction: column; align-items: flex-end; gap: 7px; }
.run-identity .badge { align-self: auto; }
.run-identity small { font: 10px/1.5 var(--mono); color: var(--muted); }
.experiment-controls {
  display: grid; grid-template-columns: minmax(220px, 1.3fr) 88px minmax(175px, 1fr) auto;
  gap: 16px; align-items: end; padding: 15px 16px; border: 1px solid var(--line);
  border-radius: 7px; background: #f8f9f6;
}
.experiment-controls > *, label { min-width: 0; }
.experiment-controls label { font-size: 10px; font-weight: 550; color: #57656a; }
select, input[type="number"] {
  width: 100%; min-width: 0; min-height: 42px; padding: 9px 11px;
  border: 1px solid #cbd3cd; border-radius: 5px; background: var(--paper); color: var(--ink);
  font-size: 12px; line-height: 1.4;
}
select { padding-right: 26px; text-overflow: ellipsis; }
select:hover, input[type="number"]:hover { border-color: #879b8f; }
.experiment-controls select, .seed-control input { margin-top: 5px; }
.seed-control input { font-family: var(--mono); }
.reference-control { display: flex; align-items: center; gap: 8px; min-height: 42px; }
.reference-control input { flex-shrink: 0; width: 16px; height: 16px; margin: 0; accent-color: var(--teal); }
.reference-control span { font-size: 11px; line-height: 1.45; }
.button {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 10px 15px; border: 1px solid var(--line-strong); border-radius: 5px;
  font-size: 12px; font-weight: 600; line-height: 1.4; text-align: center;
}
.button.primary { border-color: var(--accent); background: var(--accent); color: #fff; }
.button.primary:hover:not(:disabled) { border-color: var(--accent-dark); background: var(--accent-dark); }
.button.secondary { background: #fff; color: var(--ink); }
.button.secondary:hover:not(:disabled) { background: #f0f4ed; border-color: #8b9f91; }
.button.compact { padding-inline: 13px; font-size: 11px; }
.world-note { margin: 10px 0 22px; color: var(--muted); font-size: 10.5px; line-height: 1.6; }
.main-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 18px; }
.chart-card, .model-card, .inspector-card { min-width: 0; padding: 21px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); }
.card-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 14px; }
.card-heading .eyebrow { margin-bottom: 5px; }
.card-heading h3 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -.02em; }
.count-label { flex-shrink: 0; margin-top: 3px; font: 10px/1.5 var(--mono); color: var(--muted); }
.measurement-chart { min-width: 0; min-height: 225px; margin: 19px -5px 0; }
.measurement-chart svg { display: block; width: 100%; height: auto; }
.measurement-chart svg text { font-family: var(--mono); }
.chart-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 7px 15px; margin-top: 11px; font-size: 10px; color: var(--muted); }
.chart-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; }
.dot.a { background: var(--accent); }
.dot.b { background: #536d93; }
.dot.ref { background: var(--teal); }
.threshold-key { margin-left: auto; font-family: var(--mono); color: #8d6141; }
.decision-card { display: flex; flex-direction: column; padding: 21px; border: 1px solid #d7dacf; border-left: 3px solid #9da89b; border-radius: 8px; background: #f7f7f1; }
.decision-card.hold { border-color: #e6d8ba; border-left-color: #a47a3d; background: #fcf7ed; }
.decision-card.permit { border-color: #c5d9cb; border-left-color: var(--teal); background: #f1f7f1; }
.decision-card.refuse { border-color: #ead0c7; border-left-color: var(--accent); background: #fcf2ee; }
.decision-card .eyebrow { margin-bottom: 13px; }
.decision-line { display: flex; justify-content: space-between; align-items: center; gap: 14px; }
.decision-line h3 { margin: 0; font-size: 27px; font-weight: 550; letter-spacing: -.035em; }
#decision-icon { display: grid; place-items: center; flex: 0 0 32px; height: 32px; border: 1px solid currentColor; border-radius: 50%; color: #7c795c; font: 19px/1 var(--mono); }
.permit #decision-icon { color: var(--teal); }
.refuse #decision-icon { color: var(--accent); }
#decision-reason { flex: 1; margin: 12px 0 17px; font-size: 12px; line-height: 1.65; }
.decision-contrast { padding-block: 12px; border-top: 1px solid #dbe0d5; }
.decision-contrast > span, .claim-scope > span { display: block; font-size: 9px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); }
.decision-contrast strong { display: inline-block; margin-top: 5px; font-size: 12px; font-weight: 600; }
.decision-contrast small { margin-left: 6px; font: 10px/1.6 var(--mono); color: var(--muted); }
.claim-scope { padding: 11px 12px; border: 1px solid #dce1d7; border-radius: 5px; background: #ffffffa6; }
.claim-scope p { margin: 4px 0 0; font-size: 11px; line-height: 1.55; overflow-wrap: anywhere; }
.action-bar { display: flex; justify-content: space-between; align-items: center; gap: 25px; margin-top: 23px; padding-block: 20px; border-top: 1px solid var(--line); }
.action-bar .primary { padding-inline: 20px; }
.action-bar p { margin: 6px 0 0; font-size: 10px; color: var(--muted); }
.run-counters { display: flex; align-items: flex-start; gap: 25px; }
.run-counters span { color: var(--muted); font-size: 10px; text-align: center; line-height: 1.5; }
.run-counters b { display: block; color: var(--ink); font: 21px/1.5 var(--mono); font-weight: 500; }
.action-controls { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.inquiry-button { min-width: 0; min-height: 65px; padding: 12px; border: 1px solid var(--line); border-radius: 5px; background: #fafbf8; color: var(--ink); text-align: left; font-size: 11px; line-height: 1.5; }
.inquiry-button strong { display: block; font-size: 11px; font-weight: 600; }
.inquiry-button small { display: block; margin-top: 3px; color: var(--muted); font-size: 9.5px; line-height: 1.45; }
.inquiry-button:hover:not(:disabled) { background: #f0f4ec; border-color: #95aa9b; }
.inquiry-button.recommended { border-color: #c98265; background: var(--accent-soft); color: var(--accent-dark); }
.inquiry-button.recommended:hover:not(:disabled) { background: #f6e5d9; border-color: var(--accent); }
.run-message { min-height: 43px; margin-top: 13px; padding: 12px 14px; border-left: 3px solid #cfb48e; background: #faf8f2; font-size: 11px; line-height: 1.65; overflow-wrap: anywhere; }
.evidence-trail { margin-top: 27px; }
.section-label { display: flex; justify-content: space-between; align-items: baseline; gap: 18px; }
.section-label h3 { margin: 0; font-size: 15px; font-weight: 600; }
.section-label > span { font: 9px/1.7 var(--mono); color: var(--muted); }
.trail { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 9px; margin-top: 12px; }
.trail-step { position: relative; min-width: 0; min-height: 86px; padding: 11px 10px; border: 1px solid var(--line); border-radius: 5px; background: #f8f9f5; font-size: 10px; line-height: 1.5; }
.trail-step:not(:last-child)::after { content: ""; position: absolute; top: 50%; right: -10px; width: 9px; border-top: 1px solid var(--line-strong); }
.trail-step > span { display: block; margin-bottom: 5px; font: 9px/1.5 var(--mono); color: #738177; }
.trail-step strong, .trail-step b { display: block; margin-bottom: 4px; font-size: 10.5px; font-weight: 600; }
.trail-step small { display: block; font-size: 9px; color: var(--muted); line-height: 1.5; }
.trail-step.active { border-color: #b9cebf; background: var(--teal-soft); }
.trail-step.active > span { color: var(--teal); }
.trail-step.current { border-color: #c98060; background: var(--accent-soft); box-shadow: inset 0 2px 0 #c98060; }
.inspection-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; margin-top: 24px; }
.expression { display: block; min-height: 65px; margin-top: 17px; padding: 15px; border: 1px solid #e6e9e2; border-radius: 5px; background: #f5f7f1; color: #294539; font-size: 15px; line-height: 1.8; white-space: pre-wrap; overflow-wrap: anywhere; }
.model-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; padding-block: 14px; border-bottom: 1px solid var(--line); }
.model-stats span { display: block; font-size: 9px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.model-stats strong { display: block; margin-top: 5px; font: 18px/1.5 var(--mono); font-weight: 500; }
.feature-list { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 14px; }
.feature-tag { padding: 4px 7px; border: 1px solid #dfe4dc; border-radius: 3px; background: #f7f8f4; color: #54675b; font: 9px/1.5 var(--mono); overflow-wrap: anywhere; }
.feature-tag.new { background: #eaf4ee; border-color: #a8c8b3; color: #2a6253; }
.microcopy { margin: 12px 0 0; color: var(--muted); font-size: 10.5px; line-height: 1.65; }
.inspector-card select { margin-top: 17px; }
.inspector-answer { min-height: 160px; margin-top: 12px; padding: 15px; border: 1px solid #e2e7dd; border-radius: 5px; background: #f7f9f3; font-size: 12px; line-height: 1.75; overflow-wrap: anywhere; }
.inspector-answer p:last-child { margin-bottom: 0; }
.inspector-answer ul, .inspector-answer ol { padding-left: 18px; }
.inspector-answer code { font-size: 11px; }
.text-button { border: 0; padding: 8px 0; background: transparent; color: var(--accent-dark); font-size: 11px; line-height: 1.5; font-weight: 600; text-align: left; }
.text-button:hover:not(:disabled) { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
#export-inquiry { margin-top: 5px; }
details { margin-top: 16px; padding-top: 13px; border-top: 1px solid var(--line); }
summary { color: var(--ink); font-size: 11px; line-height: 1.6; font-weight: 600; cursor: pointer; }
summary::marker { color: var(--accent); }
details[open] summary { margin-bottom: 14px; }
pre { max-width: 100%; max-height: 260px; overflow: auto; margin-bottom: 12px; padding: 14px; border-radius: 5px; background: #20312d; color: #e1ecdc; font-size: 10px; line-height: 1.7; }
#fitness-history { max-width: 100%; overflow-x: auto; }
.fit-table { width: 100%; border-collapse: collapse; font-size: 10px; font-variant-numeric: tabular-nums; }
.fit-table th, .fit-table td { padding: 6px 9px; border-bottom: 1px solid var(--line); text-align: left; }
.fit-table th { color: var(--muted); font-size: 9px; font-weight: 500; }
.record-section { min-width: 0; margin-top: 24px; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.record-tabs { display: flex; flex-wrap: wrap; border-bottom: 1px solid var(--line); background: #f5f7f1; }
.record-tabs button { flex: 1; min-width: 0; min-height: 45px; padding: 11px 14px; border: 0; background: transparent; color: var(--muted); text-align: left; font-size: 11px; line-height: 1.5; }
.record-tabs button:hover { background: #eef2e8; color: var(--ink); }
.record-tabs button[aria-selected="true"] { box-shadow: inset 0 -2px 0 var(--accent); background: var(--paper); color: var(--ink); font-weight: 600; }
.record-tabs button:focus-visible { outline-offset: -4px; }
.record-content { min-width: 0; min-height: 90px; max-height: 390px; overflow: auto; overscroll-behavior-inline: contain; }
.record-content table { min-width: 660px; width: 100%; border-collapse: collapse; font-size: 10.5px; line-height: 1.6; font-variant-numeric: tabular-nums; }
.record-content th { position: sticky; top: 0; z-index: 1; background: #fafbf8; color: var(--muted); font-size: 9px; font-weight: 550; text-transform: uppercase; letter-spacing: .05em; white-space: nowrap; }
.record-content th, .record-content td { padding: 10px 13px; border-bottom: 1px solid #e8ece5; text-align: left; vertical-align: top; }
.record-content tbody tr:last-child td { border-bottom: 0; }
.record-content tbody tr:hover { background: #fafbf7; }
.record-content code { font-size: 10px; }
.record-list { margin: 0; padding: 0; list-style: none; }
.record-item { padding: 15px 17px; border-bottom: 1px solid var(--line); font-size: 11px; line-height: 1.7; overflow-wrap: anywhere; }
.record-item:last-child { border-bottom: 0; }
.record-item h4 { margin-bottom: 6px; font-size: 12px; }
.record-item p { margin: 7px 0 0; }
.record-item .mono { font-size: 10px; }
.empty-record { margin: 0; padding: 22px 18px; color: var(--muted); font-size: 12px; }
.status-pill { display: inline-flex; align-items: center; padding: 3px 8px; border: 1px solid #d7dfd5; border-radius: 30px; background: #f2f5ed; color: #52634f; font-size: 9px; line-height: 1.5; font-weight: 600; white-space: nowrap; }
.status-pill.hold { background: #fbf2df; border-color: #e7d4aa; color: #815b21; }
.status-pill.permit, .status-pill.active { background: #eaf5ee; border-color: #b8d5c2; color: #2b6258; }
.status-pill.refuse { background: #fbeee8; border-color: #e9c6b8; color: #943f2c; }
.status-pill.expired { background: #eef0ed; border-color: #d2dad3; color: #626e66; }
.persistence-panel { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 30px; align-items: center; margin-top: 24px; padding: 20px 21px; border: 1px solid var(--line); border-radius: 7px; background: #f7f8f2; }
.persistence-panel .eyebrow { margin-bottom: 6px; }
.persistence-panel h3 { margin-bottom: 9px; font-size: 16px; font-weight: 600; letter-spacing: -.01em; }
.persistence-panel p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.65; }
.persistence-buttons { display: flex; flex-direction: column; gap: 9px; }
.export-bar { display: flex; justify-content: space-between; align-items: center; gap: 20px; margin-top: 17px; padding-top: 9px; border-top: 1px solid var(--line); }
.export-bar > div { display: flex; flex-wrap: wrap; gap: 5px 21px; }
.evaluation-panel { margin-top: 18px; padding: 18px; border: 1px dashed #aebdad; border-radius: 6px; background: #f6f8f1; font-size: 12px; }
.evaluation-panel h3 { font-size: 15px; }
.evaluation-panel p:last-child { margin: 0; }
.evaluation-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); gap: 12px; margin-block: 12px; }
.evaluation-grid > div { padding: 11px; border: 1px solid #dce4d8; border-radius: 4px; background: #fff; color: var(--muted); font-size: 11px; overflow-wrap: anywhere; }
.evaluation-grid strong { display: block; color: var(--ink); font-size: 13px; }
.clarification-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1.25fr); gap: 18px; }
.cupboard-card { padding: 24px 20px 16px; border: 1px solid var(--line); border-radius: 8px; background: #f8f9f4; }
.cupboard { --wood-edge: #8a6c50; position: relative; width: 112px; height: 150px; margin: 0 auto 26px; border: 6px solid var(--wood-edge); border-radius: 3px; background: linear-gradient(90deg, #cba784, #d4b996); box-shadow: 0 7px 0 #e5e6dd; }
.cupboard::before { content: ""; position: absolute; top: 46%; left: 0; width: 100%; border-top: 3px solid var(--wood-edge); opacity: .3; }
.cupboard::after { content: ""; position: absolute; bottom: -13px; left: 7px; width: 9px; height: 8px; background: var(--wood-edge); box-shadow: 77px 0 0 var(--wood-edge); }
.cupboard i { position: absolute; top: 0; height: 100%; width: 50%; border: 2px solid #ffffff29; }
.cupboard i:first-child { left: 0; border-right: 1px solid var(--wood-edge); }
.cupboard i:last-child { right: 0; border-left: 1px solid var(--wood-edge); }
.cupboard i::after { content: ""; position: absolute; top: 44%; width: 4px; height: 13px; border-radius: 2px; background: var(--wood-edge); }
.cupboard i:first-child::after { right: 6px; }
.cupboard i:last-child::after { left: 6px; }
.cupboard.b { --wood-edge: #748069; height: 118px; margin-top: 32px; background: linear-gradient(90deg, #b9c6ab, #d2d9bd); }
.cupboard-card h3 { margin-bottom: 17px; font-size: 17px; text-align: center; }
.cupboard-card dl { margin: 0; }
.cupboard-card dl > div { display: flex; justify-content: space-between; gap: 12px; padding-block: 10px; border-top: 1px solid var(--line); font-size: 11px; line-height: 1.6; }
.cupboard-card dt { color: var(--muted); }
.cupboard-card dd { flex-shrink: 0; margin: 0; font-weight: 600; }
.specification-control { padding: 23px; border: 1px solid #e5d2c4; border-radius: 8px; background: #fcf6ee; }
.specification-control h3 { margin: 17px 0 12px; font-size: 20px; letter-spacing: -.02em; }
.specification-control label { display: block; color: var(--muted); font-size: 10px; }
.specification-control select { margin: 7px 0 12px; }
.specification-control .button { width: 100%; margin-bottom: 9px; }
.result-text { margin: 15px 0 0; font-size: 12px; line-height: 1.7; }
#spec-counter { font: 9px/1.7 var(--mono); }
.insight-note { display: grid; grid-template-columns: 160px minmax(0, 1fr); gap: 22px; margin-top: 23px; padding-top: 19px; border-top: 1px solid var(--line); }
.insight-note > strong { font-size: 11px; font-weight: 600; }
.insight-note p { margin: 0; color: var(--muted); font-size: 12px; line-height: 1.65; }
.methods { padding-block: 55px 45px; }
.methods-heading { max-width: 810px; }
.methods-heading h2 { margin-bottom: 15px; font-size: clamp(26px, 3vw, 34px); letter-spacing: -.035em; font-weight: 550; }
.methods-heading > p:last-child { color: var(--muted); font-size: 14px; line-height: 1.7; }
.method-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin-top: 28px; }
.method-grid article { padding-top: 18px; border-top: 1px solid #bac6b8; }
.method-grid article > span { font: 9px/1.6 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: var(--accent-dark); }
.method-grid h3 { margin: 11px 0 9px; font-size: 16px; }
.method-grid p { color: var(--muted); font-size: 12px; line-height: 1.75; }
.method-details { margin-top: 24px; padding: 19px 23px; border: 1px solid #d4dcd0; border-radius: 7px; background: #ffffff8c; }
.method-details summary { font-size: 12px; }
.method-details > div { max-width: 1100px; }
.method-details p { color: var(--muted); font-size: 12px; line-height: 1.8; }
.method-details strong { color: var(--ink); font-weight: 600; }
.download-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 19px; }
.download-links a { padding: 10px 13px; border: 1px solid var(--line-strong); border-radius: 4px; background: #fff; font-size: 11px; font-weight: 600; text-decoration: none; }
.download-links a:hover { border-color: #bd8062; background: var(--accent-soft); }
footer { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 13px 22px; padding-block: 22px 30px; border-top: 1px solid #d2dacf; color: var(--muted); font-size: 10px; }
footer strong { color: var(--ink); font-weight: 600; }
footer a { text-decoration: none; }
.noscript { margin: 24px; padding: 18px; border: 1px solid var(--line-strong); background: #fff; }

@media (max-width: 1200px) {
  .site-header, main, footer { width: calc(100% - 64px); }
  .hero { grid-template-columns: minmax(0, 1fr) 260px; gap: 38px; }
  .workspace { padding: 25px; }
  .problem-tab { padding-inline: 12px; gap: 9px; }
  .problem-tab strong { font-size: 12px; }
  .experiment-controls { gap: 12px; grid-template-columns: minmax(200px, 1.3fr) 80px minmax(155px, 1fr) auto; }
  .reference-control span { font-size: 10px; }
  .chart-card, .decision-card, .model-card, .inspector-card { padding: 18px; }
  .run-counters { gap: 17px; }
  .trail-step { padding-inline: 8px; }
}

@media (max-width: 950px) {
  .site-header { flex-wrap: wrap; gap: 18px; }
  .site-header nav { gap: 20px; }
  .hero { gap: 28px; grid-template-columns: minmax(0, 1fr) 220px; }
  .hero-note { padding-left: 21px; }
  .hero-note strong { font-size: 15px; }
  .hero-copy { font-size: 15px; }
  .experiment-controls { grid-template-columns: minmax(0, 1fr) 90px; gap: 12px 16px; }
  .reference-control span { font-size: 11px; }
  .reference-control { grid-column: 1; }
  .experiment-controls .compact { grid-column: 2; }
  .main-grid { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 14px; }
  .card-heading h3 { font-size: 15px; }
  .card-heading { gap: 9px; }
  .count-label { font-size: 9px; }
  .decision-line h3 { font-size: 24px; }
  .decision-card { padding: 17px; }
  .chart-legend { gap: 6px 10px; }
  .threshold-key { margin-left: 0; }
  .inspection-grid { gap: 14px; }
  .trail { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .trail-step { min-height: 76px; padding: 11px 12px; }
  .trail-step:nth-child(3n)::after { display: none; }
  .trail-step strong, .trail-step b { font-size: 11px; }
  .clarification-layout { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .specification-control { grid-column: 1 / -1; }
  .specification-control .button { width: auto; margin-right: 7px; }
  .specification-control select { display: block; max-width: 460px; }
  .method-grid { gap: 22px; }
}

@media (max-width: 740px) {
  .site-header, main, footer { width: calc(100% - 40px); }
  .hero { grid-template-columns: minmax(0, 1fr); gap: 25px; padding-block: 35px; }
  h1 { font-size: clamp(37px, 7.2vw, 51px); }
  .hero-note { border-left: 0; border-top: 1px solid #cbd2c9; padding: 20px 0 0; }
  .hero-note strong { font-size: 16px; }
  .hero-note p { max-width: 520px; margin-block: 10px 12px; }
  .note-number { margin-bottom: 9px; }
  .problem-tabs { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .problem-tab { padding: 14px 12px; }
  .problem-tab:first-child { border-top-left-radius: 11px; }
  .problem-tab:nth-child(2) { border-top-right-radius: 11px; border-right: 0; }
  .problem-tab:nth-child(n+3) { border-top: 1px solid var(--line); }
  .problem-tab:last-child { border-top-right-radius: 0; }
  .problem-tab strong { font-size: 12px; }
  .problem-tab small { font-size: 10px; }
  .workspace { padding: 21px; }
  .workspace-heading { flex-direction: column; gap: 13px; margin-bottom: 19px; }
  .workspace-heading h2 { font-size: 26px; }
  .run-identity { flex-direction: row; align-items: center; gap: 12px; }
  .main-grid, .inspection-grid { grid-template-columns: minmax(0, 1fr); }
  .card-heading h3 { font-size: 17px; }
  .measurement-chart { min-height: 200px; }
  .decision-card { padding: 19px; }
  .decision-line h3 { font-size: 27px; }
  .decision-contrast { margin-top: 0; }
  .action-bar { align-items: flex-start; gap: 16px; }
  .action-bar .primary { padding-inline: 12px; font-size: 11px; }
  .run-counters { gap: 11px; }
  .run-counters b { font-size: 18px; }
  .run-counters span { font-size: 9px; }
  .action-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .inquiry-button { min-height: 62px; font-size: 12px; }
  .inquiry-button strong { font-size: 12px; }
  .inquiry-button small { font-size: 10px; }
  .section-label { flex-direction: column; align-items: flex-start; gap: 5px; }
  .section-label > span { font-size: 9px; }
  .inspector-answer { min-height: 125px; }
  .record-tabs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .record-tabs button { font-size: 11px; }
  .persistence-panel { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .persistence-buttons { flex-direction: row; }
  .persistence-buttons .button { flex: 1; }
  .export-bar { align-items: flex-start; flex-direction: column; gap: 0; }
  .export-bar > div { gap: 5px 18px; }
  .method-grid { grid-template-columns: minmax(0, 1fr); gap: 9px; margin-top: 24px; }
  .method-grid article { padding-top: 17px; }
  .method-grid p { max-width: 620px; font-size: 13px; }
  .methods { padding-block: 40px 33px; }
  .methods-heading h2 { font-size: 29px; }
  .method-details { padding: 18px; }
}

@media (max-width: 600px) {
  .site-header, main, footer { width: calc(100% - 32px); }
  .site-header { padding-block: 18px; gap: 17px; }
  .brand-mark { flex-basis: 39px; height: 39px; font-size: 24px; }
  .brand > span:last-child { font-size: 11px; }
  .brand small { font-size: 9px; }
  .site-header nav { width: 100%; justify-content: space-between; gap: 9px 14px; }
  .site-header nav a { font-size: 10px; }
  .hero { padding-block: 29px 28px; }
  .hero .eyebrow { font-size: 9px; letter-spacing: .05em; }
  h1 { font-size: clamp(34px, 8.6vw, 46px); letter-spacing: -.045em; }
  .hero-copy { font-size: 14px; line-height: 1.7; }
  .hero-note { padding-top: 17px; }
  .hero-note p { font-size: 12px; }
  .workspace { padding: 17px 14px; }
  .workspace-heading h2 { font-size: 24px; }
  .workspace-heading p:not(.eyebrow) { font-size: 12px; }
  .problem-tab { padding: 13px 10px; gap: 8px; }
  .problem-tab strong { font-size: 11px; }
  .problem-tab small { font-size: 9px; line-height: 1.5; }
  .tab-index { font-size: 10px; }
  .experiment-controls { padding: 12px; grid-template-columns: minmax(0, 1fr) 84px; gap: 11px; }
  .experiment-controls label { font-size: 10px; }
  .experiment-controls select, .experiment-controls input[type="number"] { font-size: 16px; padding-left: 8px; }
  .reference-control span { font-size: 10px; }
  .button.compact { padding-inline: 8px; }
  .world-note { font-size: 10px; margin-bottom: 18px; }
  .chart-card, .model-card, .inspector-card { padding: 16px 13px; }
  .card-heading h3 { font-size: 16px; }
  .card-heading .eyebrow { font-size: 9px; }
  .count-label { font-size: 9px; }
  .measurement-chart { margin-inline: -5px; min-height: 150px; }
  .chart-legend { font-size: 9px; gap: 7px 11px; }
  .action-bar { flex-direction: column; align-items: stretch; padding-block: 18px; }
  .action-bar .primary { width: 100%; font-size: 12px; }
  .action-bar p { text-align: center; font-size: 10px; }
  .run-counters { width: 100%; justify-content: space-between; gap: 8px; }
  .run-counters span { flex: 1; font-size: 9px; }
  .run-counters b { font-size: 20px; }
  .run-message { padding-inline: 11px; font-size: 11px; }
  .trail { gap: 8px; }
  .trail-step { padding: 10px 8px; }
  .trail-step:not(:last-child)::after { right: -9px; width: 8px; }
  .trail-step strong, .trail-step b { font-size: 10px; }
  .trail-step small { font-size: 9px; }
  .expression { font-size: 14px; padding: 12px; }
  .inspector-answer { padding: 13px; font-size: 12px; }
  select, input[type="number"] { font-size: 16px; }
  .microcopy { font-size: 10.5px; }
  .persistence-panel { padding: 17px 14px; }
  .persistence-buttons { flex-direction: column; }
  .persistence-panel h3 { font-size: 16px; }
  .text-button { font-size: 11px; }
  .evaluation-panel { padding: 14px; }
  .clarification-layout { grid-template-columns: minmax(0, 1fr); gap: 14px; }
  .cupboard-card { padding: 22px; }
  .cupboard-card dl > div { font-size: 12px; }
  .specification-control { padding: 20px; }
  .specification-control .button { width: 100%; margin-right: 0; }
  .specification-control label { font-size: 11px; }
  .insight-note { grid-template-columns: minmax(0, 1fr); gap: 7px; }
  .methods-heading h2 { font-size: 27px; }
  .methods-heading > p:last-child { font-size: 13px; }
  .method-details summary { font-size: 12px; }
  .download-links { flex-direction: column; align-items: flex-start; }
  .download-links a { max-width: 100%; font-size: 11px; }
  footer { flex-direction: column; align-items: flex-start; gap: 8px; font-size: 10px; }
}

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

@media print {
  :root { font-size: 11px; background: #fff; }
  body { color: #000; background: #fff; }
  .site-header, main, footer { width: 100%; max-width: none; }
  .site-header { padding-block: 10px; }
  .site-header nav, .skip, .problem-tabs, .experiment-controls, .action-bar,
  .action-controls, .export-bar, .text-button, .persistence-buttons, .download-links,
  .record-tabs, .specification-control button, .noscript { display: none !important; }
  .hero { padding-block: 20px; gap: 25px; }
  h1 { font-size: 32px; }
  .hero-copy { font-size: 12px; }
  .workspace { padding: 15px; border: 1px solid #aaa; border-radius: 0; box-shadow: none; }
  .main-grid, .inspection-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 12px; }
  .chart-card, .decision-card, .model-card, .inspector-card, .persistence-panel,
  .method-grid article, .cupboard-card, .trail { break-inside: avoid; box-shadow: none; }
  .trail { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .trail-step::after { display: none; }
  .record-content, pre { max-height: none; overflow: visible; }
  .record-content table { min-width: 0; font-size: 8px; }
  .record-content th, .record-content td { padding: 5px; }
  .record-content th { position: static; white-space: normal; }
  .methods { padding-block: 25px; }
  .method-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
  .method-details { background: #fff; }
  details > :not(summary) { display: block !important; }
  a { color: inherit; text-decoration: none; }
  footer { margin-top: 20px; padding-block: 10px; }
}
