:root {
  color-scheme: light;
  --canvas: #f1f4f7;
  --paper: #ffffff;
  --ink: #162333;
  --deep: #0b2945;
  --muted: #35475a;
  --line: #cdd7e2;
  --blue: #245985;
  --blue-dark: #1d476c;
  --tools: #edf3f8;
  --selected: #dbe8f4;
  --orange: #a95334;
  --green: #246448;
  --solid-blue: #245985;
  --body: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-padding-top: 82px; }
body { margin: 0; background: var(--canvas); color: var(--ink); font: 17px/1.7 var(--body); }
button, input, select { font: inherit; color: inherit; }
button, select, summary { cursor: pointer; }
button:disabled { opacity: .5; cursor: default; }
input, select, button { min-width: 0; }
input[type="range"] { accent-color: var(--blue); }
input[type="number"], select { border: 1px solid var(--line); border-radius: 5px; padding: 5px 8px; background: var(--paper); }
input:invalid { border-color: var(--orange); }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, p, figure { margin: 0; }
i { font-family: Georgia, serif; }
.sr-only, .skip-link { position: absolute; width: 1px; height: 1px; clip-path: inset(100%); overflow: hidden; white-space: nowrap; }
.skip-link:focus { width: auto; height: auto; clip-path: none; z-index: 8; top: 6px; left: 12px; background: var(--paper); padding: 8px 12px; }
.shell { width: min(1224px, calc(100% - 92px)); margin-inline: auto; min-width: 0; }
.site-header { position: sticky; top: 0; z-index: 4; background: var(--paper); border-bottom: 1px solid var(--line); color: var(--ink); }
.header-inner { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 14px; min-height: 66px; }
.brand { display: inline-flex; align-items: center; gap: 9px; font-weight: 670; color: var(--deep); white-space: nowrap; }
.brand-mark { width: 32px; height: 32px; }
#navigation { display: flex; align-items: stretch; gap: 8px; }
#navigation > .nav-item, .nav-group > summary { display: flex; align-items: center; gap: 8px; min-height: 66px; padding: 0 9px; border-bottom: 3px solid transparent; font-size: 15px; font-weight: 620; white-space: nowrap; list-style: none; }
#navigation > .nav-item:hover, #navigation > .nav-item[aria-current], .nav-group.active > summary, .nav-group[open] > summary, .nav-group > summary:hover { border-bottom-color: var(--blue); color: var(--blue-dark); }
.nav-group { position: relative; }
summary::-webkit-details-marker { display: none; }
.nav-group > summary::after { content: ""; width: 6px; height: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: translateY(-2px) rotate(45deg); }
.nav-group[open] > summary::after { transform: translateY(2px) rotate(225deg); }
.nav-menu { position: absolute; right: 0; top: 100%; z-index: 2; width: min(360px, 85vw); padding: 7px; border: 1px solid var(--line); border-radius: 0 0 6px 6px; background: var(--paper); color: var(--ink); box-shadow: 0 8px 20px rgb(17 43 67 / .13); }
.nav-menu a { display: grid; grid-template-columns: 2ch minmax(0,1fr); gap: 10px; align-items: baseline; min-height: 44px; padding: 8px 10px; font-size: 15px; }
.nav-menu p { padding: 8px 10px; }
.nav-menu a:hover, .nav-menu a[aria-current] { background: var(--selected); color: var(--blue-dark); }
.directory-index { color: var(--blue-dark); font-variant-numeric: tabular-nums; }
.nav-toggle { display: none; }
#main.shell { padding-bottom: 34px; }
.title { margin-top: clamp(22px,4vw,46px); padding-bottom: 19px; border-bottom: 1px solid var(--line); }
.title-line { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; }
h1 { color: var(--deep); font-size: clamp(28px,3.8vw,45px); line-height: 1.23; font-weight: 720; overflow-wrap: anywhere; }
.title-line > .secondary { flex-shrink: 0; }
.breadcrumb { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 12px; margin-bottom: 7px; color: var(--blue-dark); font-size: 15px; font-weight: 640; }
.breadcrumb span + span { padding-left: 12px; border-left: 1px solid var(--line); color: var(--muted); }
#export-status, #compare-status, #common-status { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }
#export-status:empty, #compare-status:empty, .note:empty { display: none; }
.report-part { min-width: 0; margin-top: clamp(25px,3.6vw,45px); border-bottom: 1px solid var(--line); padding-bottom: clamp(23px,3.6vw,38px); }
h2 { color: var(--deep); font-size: clamp(22px,2.4vw,30px); line-height: 1.34; font-weight: 710; }
.report-part h2 + * { margin-top: 12px; }
h3 { color: var(--deep); font-size: 19px; line-height: 1.4; font-weight: 670; }
.report-part h3 { margin-top: 19px; margin-bottom: 5px; }
.problem-copy p, .goal p { text-indent: 2em; }
.problem-copy p + p, .reading-content p + p { margin-top: 6px; }
.goal + .goal { margin-top: 12px; }
.goal h3 { font-size: 18px; }
.tasks { margin: 8px 0; padding-left: 0; counter-reset: step; list-style: none; }
.tasks > li { position: relative; margin: 5px 0; padding-left: 2.25em; counter-increment: step; }
.tasks > li::before { position: absolute; left: 0; content: "（" counter(step) "）"; color: var(--blue-dark); }
.diagram { margin-top: 14px; text-align: center; }
.diagram-scroll { overflow-x: auto; overscroll-behavior-inline: contain; width: min(100%, 860px); margin: auto; background: #fff; border: 1px solid var(--line); border-radius: 7px; }
.diagram img { display: block; margin: auto; width: 100%; max-width: 880px; min-width: 560px; height: auto; }
#intro .diagram-scroll { width: min(740px,100%); }
#intro .diagram img { min-width: min(410px,100%); }
figcaption { font-size: 14px; text-align: center; color: var(--muted); margin-top: 5px; }
.formula { min-width: 0; max-width: 100%; overflow-x: auto; margin: 6px 0; padding-inline: 5px; overscroll-behavior-inline: contain; color: var(--deep); }
.formula .katex-display { margin: .52em auto; min-width: 100%; width: max-content; }
.katex { white-space: nowrap; }
.primary, .secondary { border: 1px solid var(--line); border-radius: 5px; min-height: 39px; padding: 6px 12px; font-size: 15px; line-height: 1.25; font-weight: 630; }
.primary { color: #fff; background: var(--solid-blue); border-color: var(--solid-blue); }
.primary:hover:not(:disabled) { background: #1d476c; }
.secondary { color: var(--deep); background: var(--paper); }
.secondary:hover:not(:disabled) { background: var(--tools); }
.secondary[aria-pressed="true"] { background: var(--selected); color: var(--blue-dark); }
.text-button { border: 0; background: transparent; color: var(--blue-dark); padding: 5px 0; font-size: 14px; font-weight: 620; text-decoration: underline; text-underline-offset: 3px; }
.actions { display: flex; align-items: center; gap: 6px 12px; flex-wrap: wrap; }
.common-form { border: 1px solid var(--line); border-radius: 8px; background: var(--tools); padding: 14px 18px; }
.common-form p { color: var(--muted); font-size: 15px; }
.common-form fieldset { min-width: 0; border: 0; padding: 0; margin: 12px 0; }
.common-form legend { padding: 0; color: var(--blue-dark); font-weight: 640; font-size: 15px; margin-bottom: 5px; }
.slider-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px 11px; }
.slider-field { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: start; gap: 1px 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); min-width: 0; padding: 8px 10px; font-size: 14px; }
.slider-field input { width: 100%; grid-column: 1/-1; margin: 3px 0; }
.slider-field output { color: var(--blue-dark); font-variant-numeric: tabular-nums; }
.slider-field small { color: var(--muted); }
.slider-field small:last-child { justify-self: end; }
.common-tabs { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 8px; }
.web-workspace { display: grid; gap: 14px; margin-top: 16px; }
.settings { min-width: 0; padding: 12px 15px; background: var(--tools); border: 1px solid var(--line); border-radius: 7px; }
.panel-head { min-width: 0; display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 5px 10px; }
.panel-head h3 { margin: 0; }
.settings .note { display: block; margin-top: 7px; color: var(--orange); font-size: 13px; }
.selector-grid, .field-grid { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(188px,100%),1fr)); gap: 8px; align-items: stretch; }
.selector-grid { margin: 9px 0 8px; }
.select-field, .number-field { display: flex; flex-direction: column; gap: 4px; min-width: 0; border: 1px solid var(--line); border-radius: 5px; background: var(--paper); padding: 6px 8px; font-size: 14px; }
.select-field > span, .number-field > span { font-weight: 610; }
.select-field select { width: 100%; margin-top: auto; min-height: 36px; }
.field-group { margin: 6px 0; min-width: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); }
.field-group[open] { background: var(--tools); }
.field-group > summary { display: grid; grid-template-columns: 10px max-content minmax(0,1fr); align-items: center; gap: 7px; min-height: 38px; padding: 6px 8px; list-style: none; font-size: 14px; border-radius: 5px; }
.field-group > summary::before { content: ""; justify-self: center; width: 6px; height: 6px; border: solid var(--blue-dark); border-width: 0 1.4px 1.4px 0; transform: rotate(-45deg); }
.field-group[open] > summary::before { transform: rotate(45deg); }
.field-summary { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.field-grid { padding: 0 8px 8px; }
.field-grid:has(> :only-child) { grid-template-columns: 1fr; }
.field-grid:has(> :only-child) .number-field { display: grid; grid-template-columns: minmax(0,1fr) minmax(110px,205px); align-items: center; }
.field-grid:has(> :only-child) .range { grid-column: 2; }
.number-field > div { margin-top: auto; display: flex; align-items: baseline; gap: 6px; }
.number-field input { width: 100%; min-height: 34px; font: 14px var(--mono); }
.number-field input::selection { background: var(--selected); }
.number-field small { white-space: nowrap; color: var(--muted); font-size: 12px; }
.stage { min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.stage .panel-head { padding: 8px 12px; min-height: 48px; }
.stage .actions { margin-left: auto; }
.status { font-size: 13px; line-height: 1.3; font-weight: 600; }
.status[data-tone="done"], .good { color: var(--green); }
.status[data-tone="warn"], .caution { color: var(--orange); }
canvas { display: block; width: 100%; max-width: 100%; }
#apparatus { height: clamp(218px,23vw,310px); }
.readouts { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); border-block: 1px solid var(--line); background: var(--paper); }
.readouts > div { display: flex; justify-content: center; align-items: baseline; flex-wrap: wrap; padding: 5px 6px; gap: 1px 6px; border-right: 1px solid var(--line); }
.readouts > div:last-child { border: 0; }
.readouts span { font-size: 13px; color: var(--muted); }
.readouts strong { font: 650 16px var(--mono); }
.readouts small { font-size: 12px; color: var(--muted); }
.playback { display: flex; align-items: center; gap: 8px; padding: 7px 10px; }
.playback input { flex: 1; }
.playback select { font-size: 14px; }
.playback output { white-space: nowrap; font: 13px var(--mono); }
.playback button { min-width: 61px; }
.analysis { min-width: 0; }
.result-tabs { display: flex; flex-wrap: wrap; gap: 0 9px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
.result-tabs button, .desktop-tabs button { color: var(--muted); border: 0; border-bottom: 2px solid transparent; border-radius: 0; background: transparent; min-height: 36px; padding: 4px 7px; font-size: 14px; font-weight: 620; }
.result-tabs button:hover, .desktop-tabs button:hover { color: var(--blue-dark); }
.result-tabs button[aria-pressed="true"], .desktop-tabs button[aria-pressed="true"] { color: var(--blue-dark); border-bottom-color: var(--blue); }
.chart-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.chart-grid.count-1, .chart-grid.count-2 { grid-template-columns: repeat(2,minmax(0,1fr)); }
.chart-grid.count-1 .chart { grid-column: 1/-1; }
.chart-grid:empty { display: none; }
.chart { min-width: 0; overflow: hidden; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); padding: 3px 5px 5px; }
.chart canvas { height: clamp(194px,19vw,252px); }
.count-1 .chart canvas { height: clamp(210px,28vw,312px); }
.legend { display: flex; justify-content: center; align-items: baseline; flex-wrap: wrap; column-gap: 10px; line-height: 1.35; font-size: 12px; }
.legend span { display: inline-flex; gap: 4px; align-items: center; white-space: nowrap; }
.legend i { display: block; width: 15px; border-top: 2px solid; }
.legend .dashed { border-top-style: dashed; }
.trace-blue { color: var(--blue); } .trace-orange { color: #ba6340; } .trace-teal { color: #168078; } .trace-purple { color: #766099; }
.chart figcaption { margin-top: 1px; }
#result-content > p { margin: 6px 0; color: var(--muted); font-size: 14px; }
.table-scroll { min-width: 0; overflow: auto; margin: 8px 0 4px; overscroll-behavior-inline: contain; }
table { width: 100%; border-collapse: collapse; background: var(--paper); font-size: 14px; line-height: 1.45; font-variant-numeric: tabular-nums; }
caption { padding: 4px 6px; color: var(--deep); font-weight: 640; text-align: center; background: var(--tools); }
td, th { text-align: left; border: 1px solid var(--line); padding: 6px 8px; vertical-align: top; font-weight: 450; }
th { font-weight: 610; }
thead { background: var(--tools); }
#discussion th, #discussion td { white-space: nowrap; }
.metrics td:nth-child(2) { font-weight: 630; white-space: nowrap; }
.metrics td:nth-child(3):not(:empty) { white-space: nowrap; }
.compare-actions { margin: 8px 0; }
.plot-menu { z-index: 8; position: fixed; min-width: 157px; background: var(--paper); border: 1px solid var(--line); border-radius: 6px; box-shadow: 0 5px 20px #112c4550; padding: 4px; }
.plot-menu button { display: block; width: 100%; min-height: 29px; text-align: left; border: 0; border-radius: 4px; padding: 4px 8px; background: transparent; font-size: 14px; }
.plot-menu button:hover, .plot-menu button:focus-visible { background: var(--selected); }
#print-report { display: none; }
@media screen {
  #print-report[data-preparing] { display: block; position: absolute; left: -10000px; top: 0; width: 180mm; opacity: 0; pointer-events: none; }
}
@media (max-width:1000px) { .shell { width: calc(100% - 48px); } }
@media (max-width:960px) {
  .nav-toggle { display: block; }
  #navigation { display: none; }
  #navigation.is-open { display: flex; flex-direction: column; gap: 2px; position: absolute; right: 0; top: 100%; z-index: 2; width: min(370px,100%); max-height: calc(100dvh - 70px); overflow: auto; padding: 6px; border: 1px solid var(--line); background: var(--paper); box-shadow: 0 8px 20px rgb(17 43 67 / .14); }
  #navigation > .nav-item, .nav-group > summary { min-height: 44px; padding-inline: 10px; border-bottom-width: 1px; justify-content: space-between; }
  .nav-menu { position: static; width: auto; box-shadow: none; border: 0; padding: 3px 4px; }
  #navigation [aria-current] { background: var(--tools); }
  .chart-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .chart-grid.count-3 > .chart:last-child { grid-column: 1/-1; }
}
@media (max-width:860px) { .slider-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width:720px) {
  .shell { width: calc(100% - 28px); }
  body { font-size: 16px; }
  .header-inner { min-height: 57px; }
  .chart-grid, .chart-grid.count-2 { grid-template-columns: minmax(0,1fr); }
  .selector-grid, .field-grid { grid-template-columns: repeat(auto-fit,minmax(min(144px,100%),1fr)); }
  .primary, .secondary, .result-tabs button, .select-field select, .number-field input { min-height: 44px; }
  .chart-grid.count-3 > .chart:last-child { grid-column: auto; }
  .metrics td:nth-child(4) { min-width: 110px; }
}
@media (max-width:520px) {
  .title-line { display: block; }
  .title-line .secondary { margin-top: 8px; }
  .slider-grid { grid-template-columns: 1fr; }
  .settings, .common-form { padding-inline: 9px; }
  .stage .panel-head { padding-inline: 8px; }
  .status { margin-left: auto; }
  .stage .actions { width: 100%; margin-left: 0; }
  .readouts > div { align-content: start; gap: 2px 3px; }
  .readouts span { flex-basis: 100%; text-align: center; }
  .playback output { font-size: 11px; }
}
@media (max-width:350px) {
  .shell { width: calc(100% - 20px); }
  .selector-grid, .field-grid { grid-template-columns: 1fr; }
}
@media screen {
  html[data-mode="desktop"] { height: 100%; overflow: hidden; scroll-padding-top: 0; }
  [data-mode="desktop"] body { display: flex; flex-direction: column; height: 100%; overflow: hidden; background: var(--paper); font-size: 15px; line-height: 1.5; --body: system-ui, "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", "Noto Sans CJK SC", sans-serif; }
  [data-mode="desktop"][data-theme="dark"] {
    color-scheme: dark;
    --canvas: #161f2c; --paper: #111923; --ink: #e0e9f3; --deep: #edf4fc;
    --muted: #aabbd0; --line: #36475b; --blue: #8ebdf0; --blue-dark: #a9cff8;
    --tools: #1b2838; --selected: #2b4561; --green: #9cd1b1; --orange: #f0ad8d;
  }
  [data-theme="dark"] .trace-orange { color: #f1aa8b; }
  [data-theme="dark"] .trace-teal { color: #6bcfc4; }
  [data-theme="dark"] .trace-purple { color: #c0ade7; }
  .desktop-bar { height: 45px; flex: 0 0 45px; display: flex; align-items: center; padding: 0 16px; gap: 10px; background: var(--canvas); border-bottom: 1px solid var(--line); }
  .desktop-bar .brand-mark { width: 27px; height: 27px; }
  .credits { margin-left: auto; color: var(--muted); font-size: 13px; }
  .credits span { margin-left: 10px; font-variant-numeric: tabular-nums; }
  .theme { display: flex; padding: 2px; gap: 2px; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); }
  .theme button { border: 0; border-radius: 4px; min-height: 24px; padding: 1px 9px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 610; }
  .theme button:is(:hover,[aria-pressed="true"]) { background: var(--selected); color: var(--deep); }
  [data-mode="desktop"] #frame { display: grid; grid-template-columns: var(--side,282px) 9px minmax(0,1fr); min-height: 0; flex: 1; }
  #sidebar { min-width: 0; min-height: 0; display: flex; flex-direction: column; background: var(--tools); }
  .side-figure { flex: none; display: grid; justify-items: center; padding: 5px 6px; margin: 12px 12px 2px; border: 1px solid var(--line); border-radius: 7px; background: var(--paper); }
  .side-figure img { display: block; width: 100%; max-height: 139px; object-fit: contain; background: white; border-radius: 4px; }
  .side-figure figcaption { margin-top: 2px; }
  .side-scroll { min-height: 0; overflow: auto; flex: 1; padding: 8px 12px 7px; }
  .side-scroll h2 { margin-top: 9px; padding: 7px 6px 3px; border-top: 1px solid var(--line); font-size: 15px; }
  .side-scroll a, .side-scroll button { display: block; border: 0; border-radius: 4px; padding: 5px 6px; text-align: left; width: 100%; background: transparent; color: var(--deep); font-size: 14px; line-height: 1.42; }
  .side-scroll a:hover, .side-scroll button:hover { background: var(--selected); }
  .side-scroll [aria-current] { background: var(--selected); box-shadow: inset 3px 0 var(--blue); color: var(--blue-dark); font-weight: 630; }
  .side-scroll .side-group { display: grid; grid-template-columns: minmax(0,1fr) 15px; gap: 6px; align-items: baseline; }
  .side-scroll .side-link { font-size: 15px; font-weight: 650; }
  .side-items { margin: 2px 0 3px 5px; }
  .side-items a { display: grid; grid-template-columns: 2em minmax(0,1fr); gap: 4px; }
  .outline-items { margin-left: 13px; }
  .side-exports { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; padding: 8px 12px; border-top: 1px solid var(--line); }
  .side-exports button:first-child { justify-self: start; }
  .side-exports button:nth-child(2) { justify-self: end; }
  .side-exports #export-status { grid-column: 1/-1; }
  .splitter { position: relative; touch-action: none; cursor: col-resize; background: var(--canvas); }
  .splitter::after { content: ""; position: absolute; inset: 0 calc(50% - .5px); border-left: 1px solid var(--line); }
  .splitter:is(:hover,:focus-visible) { background: var(--selected); }
  .desktop-main { min-width: 0; min-height: 0; display: flex; flex-direction: column; padding: 12px 18px 13px; }
  .desktop-main .title { margin: 0; padding: 0 0 5px; border: 0; }
  .desktop-main h1 { margin: 3px 0 4px; font-size: clamp(23px,2.16vw,32px); }
  [data-mode="desktop"] .primary, [data-mode="desktop"] .secondary { min-height: 31px; padding: 4px 9px; font-size: 14px; }
  .desktop-tabs { display: flex; gap: 15px; border-bottom: 1px solid var(--line); margin-bottom: 8px; }
  .desktop-tabs button { font-size: 15px; min-height: 32px; }
  .reading { min-height: 0; min-width: 0; flex: 1; display: flex; flex-direction: column; margin-top: 3px; border-top: 1px solid var(--line); }
  .reading-content { width: 100%; min-height: 0; min-width: 0; flex: 1; overflow: auto; padding: 10px 7px 5px 3px; font-size: 16px; line-height: 1.6; }
  .reading-content h2 { font-size: 22px; margin: 11px 0 7px; }
  .reading-content h2:first-child { margin-top: 0; }
  .reading-content h3 { font-size: 18px; margin: 9px 0 4px; }
  .reading-content .goal h3 { font-size: 16px; }
  .reading-content h2 + p:not(.formula), .reading-content > p { text-indent: 2em; }
  .reading-content .diagram { margin-top: 7px; }
  .reading-content .slider-grid { grid-template-columns: repeat(3,minmax(0,1fr)); }
  .pager { display: flex; justify-content: center; align-items: center; gap: 10px; padding: 7px 0 0; border-top: 1px solid var(--line); }
  #page-number { min-width: 70px; text-align: center; color: var(--muted); font: 13px var(--mono); }
  .desktop-workspace { flex: 1; display: grid; min-height: 0; min-width: 0; grid-template-columns: var(--sim,43%) 9px minmax(0,1fr); }
  .sim-left { min-height: 0; min-width: 0; overflow: auto; padding-right: 8px; }
  .sim-left > .settings, .sim-instructions { margin-top: 8px; }
  .sim-instructions { background: var(--tools); padding: 5px 8px; border: 1px solid var(--line); border-radius: 6px; font-size: 14px; }
  .sim-instructions summary { font-weight: 610; }
  .sim-instructions h3 { margin: 7px 0; font-size: 16px; }
  .desktop-workspace .settings { padding: 8px; }
  .desktop-workspace .panel-head h3 { font-size: 16px; }
  .desktop-workspace .stage .panel-head { padding: 7px 8px; min-height: 40px; }
  .desktop-workspace #apparatus { height: clamp(165px,26vh,250px); }
  .desktop-workspace .readouts span { flex-basis: 100%; text-align: center; }
  .desktop-workspace .readouts > div { gap: 1px 4px; padding: 4px 3px; }
  .desktop-workspace .readouts small { font-size: 11px; }
  .desktop-workspace .selector-grid, .desktop-workspace .field-grid { grid-template-columns: repeat(auto-fit,minmax(min(128px,100%),1fr)); }
  .desktop-workspace .field-grid:has(> :only-child) { grid-template-columns: minmax(0,1fr); }
  .desktop-workspace .select-field select, .desktop-workspace .number-field input { min-height: 31px; }
  .desktop-workspace .analysis { display: flex; flex-direction: column; min-height: 0; padding-left: 8px; }
  .desktop-workspace #result-content { flex: 1 1 auto; min-height: 100px; overflow: auto; }
  .desktop-workspace #result-metrics { flex: 0 1 auto; max-height: 34%; overflow: auto; border-top: 1px solid var(--line); }
  .desktop-workspace #result-metrics .table-scroll { margin: 0; }
  .desktop-workspace .metrics caption { position: sticky; top: 0; }
  .desktop-workspace .chart-grid { grid-template-columns: minmax(0,1fr); }
  .desktop-workspace .chart canvas { height: clamp(162px,21vh,228px); }
  .desktop-workspace .count-1 .chart canvas { height: clamp(185px,28vh,280px); }
  .desktop-workspace .result-tabs { gap: 0 4px; margin-bottom: 6px; }
  .desktop-workspace th, .desktop-workspace td { padding: 4px 6px; font-size: 13px; }
}
.diagram[data-diagram="open"] .diagram-scroll { width: min(100%,660px); }
.diagram[data-diagram="open"] img { min-width: min(440px,100%); }
