@charset "UTF-8";

:root {
  color-scheme: light;
  --paper: #f5f5ef;
  --surface: #ffffff;
  --ink: #20372f;
  --muted: #617068;
  --forest: #183d32;
  --forest-deep: #123127;
  --line: #dce2d9;
  --soft: #edf1e9;
  --lime: #dce99e;
  --yellow: #f1d781;
  --amber-ink: #73551b;
  --red-ink: #92392e;
  --red-soft: #f9e9e3;
  --radius: 15px;
  --shadow: 0 5px 22px rgb(28 56 43 / 4%);
  --sidebar: 250px;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 15px;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
.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-link { position: fixed; z-index: 200; top: 8px; left: 10px; padding: 12px 18px; background: white; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
html { min-width: 320px; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); line-height: 1.6; }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
button:disabled, input:disabled, select:disabled { cursor: not-allowed; opacity: .56; }
a { color: #2c5f4c; text-underline-offset: 3px; }
a:hover { color: var(--forest-deep); }
img, svg { max-width: 100%; }
svg { vertical-align: middle; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid #8b711e; outline-offset: 4px; }
::selection { background: var(--lime); color: var(--forest-deep); }

h1, h2, h3, h4, p { margin-top: 0; }
h1, h2 { font-family: Georgia, "Times New Roman", serif; font-weight: 400; }
h1 { margin-bottom: 16px; font-size: clamp(2.75rem, 3.6vw, 3.47rem); line-height: 1.08; letter-spacing: -.045em; }
h2 { margin-bottom: 14px; font-size: 1.9rem; line-height: 1.2; letter-spacing: -.025em; }
h3 { margin-bottom: 10px; font-size: 1.04rem; line-height: 1.4; font-weight: 650; }
h4 { margin-bottom: 8px; font-size: .94rem; line-height: 1.4; }
p { margin-bottom: 16px; }
p:last-child { margin-bottom: 0; }
small { font-size: .8rem; }
strong { font-weight: 650; }
ul, ol { padding-left: 23px; }
li + li { margin-top: 7px; }
hr { margin: 26px 0; border: 0; border-top: 1px solid var(--line); }
code { padding: 2px 5px; background: var(--soft); border-radius: 4px; font-size: .9em; overflow-wrap: anywhere; }
pre { max-width: 100%; padding: 18px; overflow: auto; background: var(--soft); border-radius: 8px; }

.app-shell { min-height: 100vh; min-height: 100dvh; padding-left: var(--sidebar); }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 40; display: flex; flex-direction: column;
  width: var(--sidebar); padding: 30px 19px 23px; overflow-y: auto;
  background: var(--forest); color: #eff3e8;
}
.brand { display: flex; align-items: center; gap: 12px; margin: 0 9px 45px; color: inherit; text-decoration: none; }
.brand-mark {
  display: grid; place-items: center; flex: 0 0 39px; width: 39px; height: 42px;
  border: 1px solid #759a78; border-radius: 9px; color: var(--lime);
  font-family: Georgia, serif; font-size: 26px; line-height: 1;
}
.brand-name { display: block; color: #f4f5e9; font-size: 17px; font-weight: 650; line-height: 1.25; letter-spacing: -.025em; }
.brand-sub { display: block; margin-top: 5px; color: #c0d0c3; font-size: 9px; line-height: 1.4; letter-spacing: .14em; text-transform: uppercase; }
.sidebar nav { display: flex; flex-direction: column; gap: 6px; }
.nav-link {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 12px 15px;
  border: 1px solid transparent; border-radius: 8px; background: transparent; color: #d7e1d7;
  text-align: left; text-decoration: none; font-size: 13px; font-weight: 500; line-height: 1.35;
  transition: background .16s ease, color .16s ease;
}
.nav-link svg { width: 18px; height: 18px; flex-shrink: 0; }
.nav-link:hover { background: rgb(255 255 255 / 7%); color: #fff; }
.nav-link.active, .nav-link[aria-current="page"] { background: var(--lime); color: var(--forest-deep); font-weight: 650; }
.sidebar :focus-visible { outline-color: var(--yellow); }
.sidebar-bottom { margin-top: auto; padding: 25px 12px 0; color: #c0d0c3; font-size: 11px; line-height: 1.6; }
.sidebar-bottom::before { content: ""; display: block; height: 1px; margin-bottom: 19px; background: rgb(225 237 219 / 17%); }
.sidebar-bottom p { margin-bottom: 8px; }
.sidebar-bottom a { color: #e5eccf; }
.sidebar-bottom .pill { margin-bottom: 10px; }
.topbar {
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 12px;
  min-height: 78px; padding: 16px clamp(24px, 3.5vw, 54px); border-bottom: 1px solid var(--line);
  background: var(--paper);
}
.topbar-title { color: #52655a; font-size: 12px; font-weight: 550; }
.topbar-status { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 11px; }
.workspace { max-width: 1540px; margin: 0 auto; padding: 38px clamp(24px, 3.5vw, 54px) 65px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-start; flex-wrap: wrap; gap: 20px; margin-bottom: 30px; }
.page-head > div:first-child { max-width: 780px; }
.page-head p { max-width: 740px; color: var(--muted); font-size: 14px; line-height: 1.7; }
.eyebrow { display: block; margin-bottom: 13px; color: #58745d; font-size: 10px; font-weight: 700; letter-spacing: .14em; line-height: 1.5; text-transform: uppercase; }
.muted { color: var(--muted); }
.actions, .form-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; }
.page-head .actions { padding-top: 5px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 17px;
  border: 1px solid var(--line); border-radius: 7px; background: var(--surface); color: var(--forest);
  text-decoration: none; text-align: center; font-size: 12px; font-weight: 600; line-height: 1.5;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.btn:hover { background: var(--soft); border-color: #acbcac; color: var(--forest-deep); }
.btn.primary { border-color: var(--forest); background: var(--forest); color: #f5f6ed; }
.btn.primary:hover { background: var(--forest-deep); box-shadow: 0 3px 10px rgb(24 61 50 / 15%); }
.btn.secondary { background: var(--surface); color: var(--forest); }
.btn.danger { border-color: #e5c2b7; background: var(--red-soft); color: var(--red-ink); }
.btn.danger:hover { background: #f3d7cd; border-color: #cf9486; }
.btn.quiet { border-color: transparent; background: transparent; color: #53695a; }
.btn.quiet:hover { background: #e9eee5; }
.btn svg { width: 16px; height: 16px; }
.pill {
  display: inline-flex; align-items: center; gap: 6px; max-width: 100%; padding: 5px 9px;
  border: 1px solid #d5dfce; border-radius: 5px; background: #edf2e7; color: #426245;
  font-size: 10px; font-weight: 650; line-height: 1.35; overflow-wrap: anywhere;
}
.pill.ok { border-color: #cdddbb; background: #edf4df; color: #3c5f35; }
.pill.warn { border-color: #e7d397; background: #fbf3d7; color: var(--amber-ink); }
.pill.danger { border-color: #e6c7bc; background: var(--red-soft); color: var(--red-ink); }
.card { min-width: 0; padding: 26px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.grid { display: grid; gap: 18px; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.three-col { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.grid > *, .two-col > *, .three-col > * { min-width: 0; }
.machine-card {
  position: relative; display: flex; flex-direction: column; align-items: flex-start; min-width: 0;
  padding: 28px; border: 1px solid #d4ddce; border-radius: var(--radius); background: var(--surface);
  color: var(--ink); text-align: left; text-decoration: none; box-shadow: var(--shadow);
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
button.machine-card, a.machine-card { cursor: pointer; }
.machine-card:hover { border-color: #9bb78e; background: #fcfdf8; box-shadow: 0 8px 24px rgb(30 65 46 / 7%); }
.machine-card.selected { border: 2px solid #507543; padding: 27px; background: #f3f6e9; }
.machine-card h2 { margin: 19px 0 10px; font-size: 2rem; }
.machine-card h3 { margin: 18px 0 8px; font-family: Georgia, serif; font-size: 25px; font-weight: 400; }
.machine-card p { color: var(--muted); font-size: 12px; line-height: 1.75; }
.machine-card .btn, .machine-card .actions { margin-top: 16px; }
.machine-card > .pill { margin-top: 14px; }
.machine-icon { display: grid; place-items: center; width: 58px; height: 58px; border-radius: 11px; background: #eef2e5; color: #44653c; font-size: 28px; }
.machine-icon svg { width: 35px; height: 35px; }
.stat-card { padding: 20px 23px; border: 1px solid var(--line); border-radius: 11px; background: #fafbf6; }
.stat-card p, .stat-card .muted { font-size: 11px; }
.stat-number { display: block; margin-bottom: 3px; font-family: Georgia, serif; font-size: 32px; line-height: 1.25; letter-spacing: -.04em; }
.section-heading { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 31px 0 16px; }
.section-heading h2 { margin: 0; font-size: 25px; }
.section-heading h3 { margin: 0; }
.section-heading > .muted { font-size: 11px; }
.symptom-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.symptom-card {
  display: flex; align-items: flex-start; gap: 12px; min-height: 93px; padding: 19px 17px;
  border: 1px solid var(--line); border-radius: 10px; background: var(--surface);
  color: var(--ink); text-align: left; text-decoration: none; transition: background .15s ease, border-color .15s ease;
}
.symptom-card:hover { border-color: #9ab18c; background: #f5f8ed; }
.symptom-card h3 { margin: 0 0 5px; font-size: 12px; font-weight: 600; }
.symptom-card p { margin: 0; color: var(--muted); font-size: 11px; }
.symptom-number { flex-shrink: 0; display: grid; place-items: center; min-width: 29px; height: 29px; border: 1px solid #e0e6d8; border-radius: 6px; color: #76826a; background: #f7f9f2; font-size: 10px; font-variant-numeric: tabular-nums; }
.symptom-group { display: block; margin: 24px 0 10px; color: #52684e; font-size: 12px; line-height: 1.5; }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin: 20px 0; }
.toolbar .search { flex: 1 1 220px; }
.toolbar select { width: auto; min-width: 165px; }
.search { width: 100%; min-height: 45px; }
.section-heading .search { max-width: 310px; }
.section-heading h2 { flex-shrink: 0; }
.symptom-card > span:nth-child(2) { flex: 1; font-size: 13px; font-weight: 550; }
.stat-card > span:last-child { display: block; font-size: 12px; color: var(--muted); }
.step-main > .card + .card { margin-top: 20px; }
.workspace > .card + .card, .workspace > .grid + .card { margin-top: 22px; }
.sidebar > .eyebrow { margin-left: 14px; color: #b6c8b4; }
.fields + .marker-options, .marker-options + .fields, #reading-form > details, #reading-form > .field { margin-top: 22px; }
.empty-state { padding: 45px 25px; border: 1px dashed #cdd7c6; border-radius: 12px; background: #fafbf6; color: var(--muted); text-align: center; }
.empty-state h2, .empty-state h3 { color: var(--ink); }
.alert { margin-bottom: 20px; padding: 17px 20px; border: 1px solid #d3dfcb; border-left: 3px solid #6e8f54; border-radius: 9px; background: #edf3e5; color: #3f5c38; font-size: 12px; line-height: 1.75; overflow-wrap: anywhere; }
.alert p { margin-bottom: 8px; }
.alert.warning { border-color: #e6d7a1; border-left-color: #a7832f; background: #fbf5df; color: #705622; }
.alert.danger { border-color: #e4bfb1; border-left-color: #a8513b; background: #faeae3; color: #813d2c; }
.alert.info { border-color: #d4dfd0; border-left-color: #78926d; background: #eef3e9; color: #4a6244; }
.alert strong { display: inline; font-weight: 700; }

.step-layout { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 22px; align-items: start; }
.step-main { min-width: 0; }
.step-main.card { padding: 30px; }
.step-aside { min-width: 0; }
.step-aside > * + * { margin-top: 18px; }
.step-aside .card { padding: 20px; }
.step-aside h3 { font-size: 12px; }
.step-aside p { font-size: 11px; }
.step-count { display: inline-block; margin-bottom: 18px; color: #617458; font-size: 10px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.check-title { margin-bottom: 17px; font-family: Georgia, serif; font-size: clamp(24px, 2.5vw, 34px); font-weight: 400; line-height: 1.22; letter-spacing: -.025em; }
.check-detail { margin: 20px 0; color: #465a4b; font-size: 13px; line-height: 1.85; white-space: pre-line; overflow-wrap: anywhere; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 23px; margin: 22px 0; padding: 20px; border: 1px solid #e0e6d9; border-radius: 10px; background: #f7f9f3; }
.facts > * { min-width: 0; }
.facts p { margin-bottom: 0; }
.fact-label { display: block; margin-bottom: 6px; color: #77856e; font-size: 9px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; }
.fact-value { display: block; margin: 0; color: #394e3e; font-size: 12px; line-height: 1.7; overflow-wrap: anywhere; }
.choice-list { display: grid; gap: 10px; margin-top: 24px; }
.choice-btn {
  display: flex; align-items: center; justify-content: space-between; gap: 15px; min-height: 49px; width: 100%;
  padding: 14px 17px; border: 1px solid #ccd8c3; border-radius: 8px; background: #f7faf0;
  color: var(--forest); text-align: left; font-size: 12px; font-weight: 550; line-height: 1.65;
  transition: border-color .15s ease, background .15s ease;
}
.choice-btn:hover { border-color: #8ca67a; background: #eaf1da; }
.choice-btn:active { background: #dce9c2; }
.choice-btn.danger { border-color: #e0bcb0; background: var(--red-soft); color: var(--red-ink); }
.choice-btn.quiet { border-color: var(--line); background: #fbfcf8; color: #61705e; }
.choice-btn.selected, .choice-btn[aria-pressed="true"] { border-color: var(--forest); background: #e3ebd3; }

label { display: block; color: #4b6050; font-size: 11px; font-weight: 550; }
input, select, textarea {
  display: block; width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid #ccd7c7;
  border-radius: 7px; background: var(--surface); color: var(--ink); font-size: 12px; line-height: 1.6;
}
input:hover, select:hover, textarea:hover { border-color: #9aaf90; }
input:focus, select:focus, textarea:focus { border-color: #637e50; }
input::placeholder, textarea::placeholder { color: #788474; opacity: 1; }
input[type="number"] { font-variant-numeric: tabular-nums; }
input[type="checkbox"], input[type="radio"] { display: inline-block; flex-shrink: 0; width: 18px; min-height: 18px; height: 18px; margin: 0; accent-color: var(--forest); }
textarea { min-height: 110px; resize: vertical; }
fieldset { min-width: 0; margin: 0; padding: 17px; border: 1px solid var(--line); border-radius: 9px; }
legend { padding: 0 7px; font-size: 11px; font-weight: 600; }
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field label { margin-bottom: 0; }
.field small, .field .muted { font-size: 10px; font-weight: 400; }
.fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px; }
.full { grid-column: 1 / -1; }
.form-actions { margin-top: 23px; padding-top: 20px; border-top: 1px solid var(--line); }
.reading-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.marker-options { display: flex; align-items: center; flex-wrap: wrap; gap: 9px 17px; }
.checkbox { display: flex; align-items: center; gap: 9px; min-height: 44px; padding: 7px 0; font-size: 11px; font-weight: 450; cursor: pointer; }
.error-text { margin-top: 7px; color: var(--red-ink); font-size: 11px; font-weight: 550; }
[aria-invalid="true"] { border-color: #b75942; background: #fff9f5; }

.source-list { display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.source-card { min-width: 0; padding: 16px; border: 1px solid var(--line); border-radius: 9px; background: #fafbf7; font-size: 11px; overflow-wrap: anywhere; }
.source-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.source-card h3, .source-card h4 { margin-bottom: 7px; font-size: 12px; }
.source-card p { margin-bottom: 9px; font-size: 11px; }
.source-card a { font-weight: 550; }
.source-card .pill { margin-bottom: 9px; }
.path-list { margin: 0; padding: 0; list-style: none; }
.path-item { position: relative; margin: 0; padding: 0 0 19px 19px; border-left: 1px solid #d5dfcf; color: #667560; font-size: 10px; line-height: 1.6; overflow-wrap: anywhere; }
.path-item::before { content: ""; position: absolute; top: 4px; left: -4px; width: 7px; height: 7px; border-radius: 50%; background: #8aa57c; box-shadow: 0 0 0 3px #fff; }
.path-item:last-child { padding-bottom: 0; border-left-color: transparent; }
.path-item strong { display: block; margin-bottom: 5px; color: #3d5743; font-size: 11px; }
.path-item p { margin-bottom: 4px; }
.metric-card { min-width: 0; padding: 20px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); }
.metric-card h3 { margin-bottom: 3px; font-size: 12px; }
.metric-card .muted { font-size: 10px; }
.chart-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.trend-chart { display: block; width: 100%; height: auto; min-height: 170px; margin-top: 15px; overflow: visible; }
.trend-chart text { fill: #66755f; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif; font-size: 10px; }
.chart-empty { display: grid; place-items: center; min-height: 190px; padding: 25px; border-bottom: 1px solid var(--line); color: #7a8774; text-align: center; font-size: 11px; }
.table-wrap { max-width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: 11px; }
th { padding: 12px 13px; border-bottom: 1px solid #d8e0d0; background: #f0f4e9; color: #5a7050; font-size: 10px; font-weight: 650; line-height: 1.45; vertical-align: bottom; }
td { padding: 13px; border-bottom: 1px solid #e7ebe2; color: #475b48; line-height: 1.65; vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafcf6; }
.reading-table { min-width: 730px; font-variant-numeric: tabular-nums; }
.reading-table td:first-child { color: #2b4935; font-weight: 600; }
.reading-table .btn { min-height: 44px; padding: 7px 10px; font-size: 10px; }
.saved-session { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 16px; padding: 18px 20px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.saved-session + .saved-session { margin-top: 12px; }
.saved-session h3 { margin-bottom: 4px; font-size: 13px; }
.saved-session p { color: var(--muted); font-size: 11px; }
.details-panel { margin: 19px 0; border: 1px solid var(--line); border-radius: 9px; background: #fbfcf8; }
details > summary { min-height: 44px; padding: 12px 16px; color: #42603e; font-size: 12px; font-weight: 600; cursor: pointer; }
details > summary::marker { color: #7d956b; }
details[open] > summary { border-bottom: 1px solid var(--line); }
.details-panel > :not(summary) { margin: 15px 17px; }
.doc-links { display: flex; align-items: flex-start; flex-wrap: wrap; gap: 8px 18px; margin-top: 18px; }
.doc-links a { display: inline-flex; align-items: center; min-height: 44px; font-size: 11px; }
.toast { position: fixed; z-index: 100; right: 25px; bottom: 25px; max-width: min(420px, calc(100vw - 36px)); padding: 15px 21px; border: 1px solid #496d4d; border-radius: 10px; background: var(--forest); color: #f5f6e9; box-shadow: 0 8px 35px rgb(19 48 31 / 18%); font-size: 12px; }
.report { max-width: 1060px; margin: 0 auto; padding: 34px; border: 1px solid var(--line); border-radius: 13px; background: #fff; color: var(--ink); }
.report h1 { font-size: 36px; }
.report h2 { font-size: 25px; }
.report h3 { font-size: 14px; }
.report-section { margin-top: 27px; padding-top: 21px; border-top: 1px solid var(--line); }
.report-meta { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 12px 25px; margin: 24px 0; font-size: 12px; }
.report-meta dt { color: var(--muted); font-size: 10px; }
.report-meta dd { margin: 3px 0 0; overflow-wrap: anywhere; }
.report-path { margin: 12px 0; padding: 13px 16px; border-left: 2px solid #aebf9f; background: #f7f9f2; font-size: 12px; overflow-wrap: anywhere; }
.report-path p { margin-bottom: 7px; }
.report-reading { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 12px; overflow-wrap: anywhere; }
.report-reading:last-child { border-bottom: 0; }
.report-only, .mobile-only { display: none; }

@media (min-width: 1500px) {
  .workspace { padding-top: 46px; }
  .step-layout { grid-template-columns: minmax(0, 1fr) 325px; gap: 26px; }
  .symptom-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .step-layout { grid-template-columns: minmax(0, 1fr); }
  .step-aside { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .step-aside > * + * { margin-top: 0; }
  .symptom-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .three-col { gap: 12px; }
  .stat-card { padding: 16px; }
  .reading-fields { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .machine-card { padding: 23px; }
  .machine-card.selected { padding: 22px; }
  .machine-card h2 { font-size: 27px; }
  .chart-grid { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  :root { --sidebar: 0px; font-size: 14px; }
  .app-shell { padding-left: 0; }
  .sidebar { position: static; width: auto; height: auto; padding: 18px 18px 12px; overflow: visible; }
  .brand { margin: 0 0 17px 2px; gap: 10px; }
  .brand-mark { flex-basis: 34px; width: 34px; height: 36px; font-size: 23px; }
  .brand-name { font-size: 16px; }
  .brand-sub { font-size: 8px; margin-top: 4px; }
  .sidebar nav { flex-direction: row; gap: 6px; overflow-x: auto; padding: 3px 2px 5px; scrollbar-width: thin; scrollbar-color: #80967c transparent; }
  .nav-link { flex: 0 0 auto; width: auto; min-height: 44px; padding: 11px 13px; font-size: 11px; gap: 7px; white-space: nowrap; }
  .nav-link svg { width: 15px; height: 15px; }
  .sidebar-bottom { display: none; }
  .topbar { min-height: 59px; gap: 8px; padding: 13px 21px; }
  .topbar-title { font-size: 11px; }
  .topbar-status { font-size: 10px; }
  .workspace { padding: 28px 21px 48px; }
  .page-head { margin-bottom: 24px; gap: 12px; }
  h1 { font-size: clamp(35px, 7.2vw, 46px); }
  h2 { font-size: 26px; }
  .page-head p { font-size: 12px; }
  .eyebrow { margin-bottom: 11px; font-size: 9px; }
  .card { padding: 21px; }
  .step-main.card { padding: 23px; }
  .check-title { font-size: 27px; }
  .step-aside { grid-template-columns: minmax(0, 1fr); }
  .two-col { gap: 14px; }
  .three-col { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 9px; }
  .stat-card { padding: 15px 12px; }
  .stat-number { font-size: 29px; }
  .stat-card p { font-size: 10px; }
  .machine-card { padding: 21px; }
  .machine-card.selected { padding: 20px; }
  .machine-card h2 { font-size: 26px; }
  .machine-icon { width: 49px; height: 49px; }
  .facts { padding: 17px; gap: 16px; }
  .choice-btn { font-size: 12px; }
  .report { padding: 23px; }
  .report h1 { font-size: 30px; }
  .report-meta { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .desktop-only { display: none !important; }
  .mobile-only { display: block; }
}
@media (max-width: 500px) {
  .topbar { align-items: flex-start; }
  .topbar-status { flex-wrap: wrap; }
  .workspace { padding-right: 16px; padding-left: 16px; }
  .two-col, .symptom-grid, .fields, .reading-fields, .facts { grid-template-columns: minmax(0, 1fr); }
  .machine-card h2 { font-size: 29px; }
  .section-heading { align-items: flex-start; flex-wrap: wrap; gap: 8px; }
  .section-heading h2 { font-size: 24px; }
  .toolbar { align-items: stretch; }
  .toolbar select { flex: 1 1 150px; width: 100%; }
  .actions .btn { flex: 1 1 auto; }
  .page-head .actions { width: 100%; }
  .form-actions .btn { flex: 1 1 135px; }
  .step-main.card { padding: 20px; }
  .alert { padding: 15px 16px; }
  .report { padding: 19px; }
  .report-meta { gap: 12px; }
  .toast { right: 18px; bottom: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Question-by-question diagnostic view. */
.tree-workspace .page-head { margin-bottom: 20px; }
.tree-workspace h1 { font-size: clamp(1.9rem, 2.5vw, 2.6rem); margin-bottom: 8px; }
.tree-workspace .page-head .eyebrow { margin-bottom: 8px; }
.tree-constraint { padding: 12px 16px; border: 1px solid #e7d397; border-radius: 9px; background: #fbf3d7; font-size: 12px; color: var(--amber-ink); }
.tree-constraint > strong { margin-right: 12px; }
.tree-constraint details { margin-top: 4px; }
.tree-constraint summary { min-height: 0; padding: 3px 0; background: transparent; font-size: 12px; }
.tree-constraint details p { margin: 8px 0; }
.phase-rail { display: flex; flex-wrap: wrap; gap: 12px 24px; list-style: none; padding: 0; margin: 22px 0; }
.phase-rail li { display: flex; align-items: center; gap: 7px; margin: 0; color: var(--muted); font-size: 12px; }
.phase-rail li > span { display: grid; place-items: center; width: 24px; height: 24px; border: 1px solid var(--line); border-radius: 50%; font-size: 10px; }
.phase-rail [aria-current] { color: var(--forest); font-weight: 700; }
.phase-rail [aria-current] > span { border-color: var(--forest); background: var(--forest); color: white; }
.tree-layout { grid-template-columns: minmax(0, 1fr) 290px; align-items: start; }
.question-card { border-top: 4px solid var(--forest); scroll-margin-top: 20px; }
.question-meta { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.question-card .check-title { font-size: clamp(1.65rem, 2.1vw, 2rem); line-height: 1.25; margin: 0 0 20px; }
.question-card .check-title:focus { outline: none; }
.operating-state { display: flex; flex-direction: column; gap: 5px; padding: 12px 15px; background: var(--soft); border-radius: 7px; font-size: 12px; }
.operating-state strong { text-transform: uppercase; font-size: 10px; letter-spacing: .07em; }
.check-method { margin-bottom: 20px; }
.check-method summary { padding: 11px 0; background: transparent; font-size: 12px; }
.check-method .check-detail { font-size: 13px; margin: 12px 0; }
.check-method .facts { padding: 15px; margin: 0; gap: 14px; }
.check-method .facts .full { grid-column: 1 / -1; }
.check-method .fact-value { font-size: 12px; }
.question-card .choice-list { gap: 10px; }
.question-card .choice-btn { padding: 15px 17px; font-size: 14px; line-height: 1.55; border-radius: 8px; }
.question-card .choice-btn:hover { border-color: var(--forest); background: #f0f5e6; }
.question-card .choice-btn > span:first-child { min-width: 0; }
.question-card .choice-btn.quiet { font-size: 12px; background: #fafbf8; }
.answer-prompt { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.required-evidence { padding: 16px; background: #f7f8f2; border: 1px solid var(--line); border-radius: 8px; margin-bottom: 16px; }
.question-card textarea { width: 100%; }
.note-help { font-size: 12px; margin: 7px 0 0; }
.optional-note { margin-top: 18px; }
.optional-note summary { padding: 10px 0; font-size: 12px; background: transparent; }
.optional-note .field { margin-top: 10px; }
.tree-sources, .tree-layout #session-details { margin-top: 18px; }
.tree-layout .step-aside { gap: 16px; }
.path-card, .stop-card { padding: 20px; }
.path-hint { font-size: 11px; }
.tree-layout .path-list { padding: 0; max-height: 530px; overflow-y: auto; }
.tree-layout .path-item { display: flex; gap: 10px; padding: 0 0 18px; margin: 0; border: 0; }
.tree-layout .path-item::before { display: none; }
.path-number { display: grid; place-items: center; flex: 0 0 22px; height: 22px; border-radius: 50%; background: var(--soft); font-size: 10px; }
.tree-layout .path-item strong { font-size: 12px; font-weight: 500; line-height: 1.5; }
.tree-layout .path-item small { color: var(--forest); margin-top: 5px; font-size: 11px; font-weight: 600; }
.change-answer { min-height: 36px; padding: 6px 0; border: 0; background: transparent; color: var(--muted); font-size: 11px; text-decoration: underline; text-underline-offset: 3px; }
.session-summary summary { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 7px; font-size: 12px; }
.stop-card p { font-size: 12px; }
.stop-card summary { padding: 10px 0; background: transparent; color: var(--red-ink); font-size: 12px; font-weight: 650; }
@media (max-width: 1150px) {
  .tree-layout { grid-template-columns: minmax(0, 1fr); }
  .tree-layout .step-aside { display: grid; grid-template-columns: minmax(0, 1fr); }
  .tree-layout .path-list { max-height: 350px; }
}
@media (max-width: 600px) {
  .phase-rail { gap: 9px 12px; margin: 16px 0; }
  .phase-rail li { font-size: 10px; gap: 5px; }
  .question-card { padding: 20px 17px; }
  .tree-constraint > strong, .tree-constraint > span { display: block; }
  .question-card .choice-btn { padding: 13px; font-size: 13px; }
  .tree-workspace .page-head .actions { gap: 7px; }
}

/* Simple click-through workspace. */
.simple-header { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px max(24px, calc((100vw - 1000px) / 2)); background: var(--surface); border-bottom: 1px solid var(--line); }
.simple-brand { color: var(--forest); font-size: 18px; font-weight: 750; text-decoration: none; white-space: nowrap; }
.simple-brand span { margin-left: 10px; font-size: 12px; color: var(--muted); font-weight: 400; }
.simple-header nav { display: flex; align-items: center; gap: 4px; }
.more-menu { position: relative; }
.more-menu summary { font-size: 12px; padding: 12px; background: transparent; }
.more-menu > div { position: absolute; right: 0; top: 100%; min-width: 195px; padding: 8px; background: white; border: 1px solid var(--line); border-radius: 9px; box-shadow: 0 5px 20px #183d3214; }
.more-menu button { display: block; width: 100%; padding: 12px; border: 0; background: none; text-align: left; font-size: 13px; color: var(--ink); }
.more-menu button:hover { background: var(--soft); }
.simple-workspace { max-width: 1000px; padding: 34px 24px 60px; }
.simple-diagnose { max-width: 790px; }
.simple-workspace h1, .simple-workspace h2 { font-family: inherit; font-weight: 650; letter-spacing: -.025em; }
.simple-intro h1 { font-size: 32px; margin-bottom: 8px; }
.simple-intro p { font-size: 14px; color: var(--muted); }
.machine-toggle { display: flex; gap: 8px; margin-top: 24px; }
.machine-toggle button { flex: 1; min-height: 48px; padding: 12px 20px; border: 1px solid var(--line); border-radius: 8px; background: white; font-size: 14px; color: var(--ink); }
.machine-toggle [aria-pressed="true"] { border-color: var(--forest); background: var(--forest); color: white; }
.machine-note { margin: 9px 0 24px; font-size: 12px; color: var(--muted); }
.quick-search { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 14px; border: 1px solid #b7c5b6; border-radius: 9px; background: white; }
.quick-search input { width: 100%; min-width: 0; border: 0; box-shadow: none; padding: 10px 0; background: transparent; font-size: 15px; }
.search-shortcuts { display: flex; flex-wrap: wrap; gap: 7px; margin: 12px 0 25px; }
.search-shortcuts button { min-height: 36px; padding: 6px 12px; border: 1px solid var(--line); border-radius: 18px; background: transparent; font-size: 12px; color: var(--muted); }
.search-shortcuts [aria-pressed="true"] { background: var(--soft); border-color: #9aaf95; color: var(--forest); }
.simple-workspace .symptom-group { margin: 24px 0 10px; font-size: 12px; font-weight: 600; color: var(--muted); }
.simple-workspace .symptom-card { min-height: 62px; padding: 14px 17px; background: white; font-size: 14px; }
.simple-workspace .symptom-number { display: none; }
.simple-workspace .symptom-card { grid-template-columns: minmax(0,1fr) auto; }
.simple-context { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-bottom: 18px; }
.simple-context p { font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.simple-context h1 { font-size: 21px; margin: 0; line-height: 1.3; }
.simple-context .btn { flex-shrink: 0; }
.oem-notice { font-size: 11px; line-height: 1.6; color: var(--amber-ink); margin: 0 0 17px; }
.simple-diagnose .question-card { border-top: 1px solid var(--line); padding: 28px; scroll-margin-top: 92px; box-shadow: none; }
.simple-diagnose #current-question { font-size: clamp(1.45rem, 3vw, 1.75rem); line-height: 1.3; margin-bottom: 16px; }
#current-question:focus { outline: none; }
.simple-state { display: inline-block; padding: 5px 9px; border-radius: 5px; background: var(--soft); color: var(--forest); font-size: 11px; font-weight: 600; margin-bottom: 18px; }
.essential-instruction { font-size: 13px; line-height: 1.65; color: #4d6156; }
.external-records { font-size: 12px; color: var(--muted); }
.simple-diagnose .choice-list { margin-top: 20px; gap: 9px; }
.simple-diagnose .choice-btn { font-size: 14px; padding: 14px 16px; min-height: 50px; background: #fbfcf8; }
.simple-diagnose .choice-btn.quiet { background: white; font-size: 12px; color: var(--muted); }
.simple-diagnose .choice-btn:hover { background: var(--soft); }
.check-help { margin-top: 18px; }
.check-help summary { padding: 8px 0; background: none; font-size: 12px; }
.check-help p, .check-facts { font-size: 13px; }
.check-facts dt { margin-top: 12px; font-weight: 650; }
.check-facts dd { margin: 3px 0 0; color: var(--muted); }
.simple-step-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; padding-top: 12px; border-top: 1px solid var(--line); }
.simple-step-actions .stop-link { color: var(--red-ink); }
.simple-details { margin-top: 16px; border-bottom: 1px solid var(--line); }
.simple-details > summary { padding: 13px 0; font-size: 13px; background: none; }
.simple-details > p { font-size: 13px; }
.simple-path { list-style: none; padding: 0; }
.simple-path li { display: flex; align-items: flex-start; gap: 15px; padding: 14px 0; border-top: 1px solid var(--line); }
.simple-path li > div { flex: 1; }
.simple-path strong, .simple-path p { font-size: 12px; }
.simple-path p { margin: 5px 0 0; color: var(--muted); }
.saved-checks { margin-top: 30px; }
.answer-report { padding: 26px; }
.answer-report h1 { font-size: 29px; }
.answer-report .report-path h3 { font-size: 14px; }
@media (max-width: 600px) {
  .simple-header { padding: 10px 16px; flex-wrap: wrap; gap: 2px; }
  .simple-header nav { margin-left: -10px; width: calc(100% + 10px); justify-content: space-between; }
  .simple-header .btn, .more-menu summary { min-height: 40px; padding: 8px 10px; font-size: 11px; }
  .simple-workspace { padding: 24px 16px 45px; }
  .simple-intro h1 { font-size: 28px; }
  .machine-toggle button { padding: 10px; font-size: 13px; }
  .simple-context { align-items: flex-start; }
  .simple-context h1 { font-size: 18px; }
  .simple-context .btn { padding: 5px; font-size: 11px; }
  .simple-diagnose .question-card { padding: 22px 18px; scroll-margin-top: 110px; }
  .simple-diagnose .choice-btn { font-size: 13px; }
}

@page { size: A4 landscape; margin: 14mm; }
@media print {
  :root { font-size: 10pt; --paper: #fff; --line: #c9cfc5; }
  html, body { min-width: 0 !important; width: auto !important; margin: 0 !important; padding: 0 !important; background: #fff !important; color: #172b21 !important; }
  body { -webkit-print-color-adjust: exact; print-color-adjust: exact; line-height: 1.45; }
  .simple-header, .sidebar, .topbar, .actions, .form-actions, .toolbar, .non-print, .toast,
  button, .btn, form, input, select, textarea, .choice-list, .mobile-only { display: none !important; }
  .app-shell, .workspace, .report { display: block !important; width: auto !important; max-width: none !important; min-height: 0 !important; margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important; box-shadow: none !important; overflow: visible !important; }
  .report-only { display: block !important; }
  h1 { margin-bottom: 9pt; font-size: 26pt !important; }
  h2 { margin-bottom: 7pt; font-size: 17pt !important; }
  h3 { font-size: 11pt !important; }
  h1, h2, h3, h4 { break-after: avoid; page-break-after: avoid; }
  p, li { orphans: 3; widows: 3; }
  a { color: inherit !important; text-decoration: underline; overflow-wrap: anywhere; }
  .page-head { display: block; margin-bottom: 14pt; }
  .page-head p, .check-detail, .fact-value, .source-card p, .report-path, .report-reading { font-size: 9pt; }
  .eyebrow { font-size: 8pt; }
  .card, .machine-card, .stat-card, .metric-card, .source-card { margin-bottom: 10pt; padding: 11pt; border: 1px solid #d1d6cc; border-radius: 0; box-shadow: none; break-inside: avoid; page-break-inside: avoid; }
  .step-layout { display: block; }
  .step-aside { display: block; }
  .facts, .fields, .report-meta { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10pt 16pt; }
  .report-meta { grid-template-columns: 120pt minmax(0, 1fr); }
  .workspace > .page-head, .skip-link { display: none !important; }
  .report-section { margin-top: 14pt; padding-top: 11pt; }
  .report-path { break-inside: auto; page-break-inside: auto; }
  .report-path li { break-inside: avoid; page-break-inside: avoid; }
  .report-reading { break-inside: auto; page-break-inside: auto; }
  .alert { margin-bottom: 12pt; padding: 10pt; font-size: 9pt; break-inside: avoid; page-break-inside: avoid; }
  .pill { font-size: 7pt; border-radius: 2pt; }
  .table-wrap { width: auto !important; max-width: none !important; overflow: visible !important; border: 0; border-radius: 0; }
  table, .reading-table { width: 100% !important; min-width: 0 !important; table-layout: fixed; font-size: 7pt; }
  th, td { padding: 5pt; overflow-wrap: anywhere; word-break: normal; white-space: normal !important; font-size: 7pt; }
  thead { display: table-header-group; }
  tfoot { display: table-footer-group; }
  tr { break-inside: avoid; page-break-inside: avoid; }
  .chart-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12pt; }
  .trend-chart { min-height: 0; max-height: 62mm; }
  .chart-empty { min-height: 30mm; }
  .source-list { gap: 9pt; }
  .source-card { overflow: visible; overflow-wrap: anywhere; }
  .details-panel { overflow: visible; }
  details > summary { min-height: 0; padding: 7pt 9pt; }
  details::details-content { display: block; content-visibility: visible; }
  .doc-links { gap: 5pt 12pt; }
  .doc-links a { min-height: 0; }
  pre, code { white-space: pre-wrap; overflow-wrap: anywhere; }
}
