:root {
  --ink: #1d2733;
  --ink-2: #52606d;
  --bench: #e7ecef;
  --paper: #ffffff;
  --rule: #c7d0d7;
  --accent: #2f6886;
  --accent-dark: #24526b;
  --flag: #b2182b;
  --sans: "Helvetica Neue", Helvetica, Arial, "PingFang SC", "Microsoft YaHei", sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Songti SC", serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bench);
  color: var(--ink);
  font: 16px/1.5 var(--sans);
}
a { color: var(--accent); }
a:focus-visible, button:focus-visible, input:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.masthead { max-width: 1240px; margin: 0 auto; padding: 40px 24px 28px; }
.model-line { margin: 0 0 8px; font-size: 14px; color: var(--ink-2); letter-spacing: .01em; }
.masthead h1 {
  margin: 0;
  max-width: 30em;
  font: 600 clamp(1.5rem, 2.4vw, 2.1rem)/1.2 var(--serif);
  letter-spacing: -.005em;
}
.outcome { margin: 14px 0 0; color: var(--ink-2); }
.outcome strong { color: var(--ink); font-weight: 600; }

.workbench {
  max-width: 1240px; margin: 0 auto; padding: 0 24px 40px;
  display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 32px; align-items: start;
}

/* requisition (input form) */
.requisition {
  background: var(--paper); border: 1px solid var(--rule); border-radius: 6px; padding: 20px 20px 18px;
  position: sticky; top: 16px;
}
.req-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
h2 { margin: 0; font-size: 18px; line-height: 1.3; font-weight: 600; }
h3 { margin: 22px 0 8px; font-size: 15px; font-weight: 600; }
.link-button { background: none; border: 0; padding: 2px 0; color: var(--accent); font: inherit; font-size: 14px; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.fields { display: grid; gap: 2px; }
.field {
  display: grid; grid-template-columns: 1fr 112px 46px; column-gap: 10px; align-items: center;
  padding: 7px 0; border-bottom: 1px solid #e3e8ec;
}
.field:last-child { border-bottom: 0; }
.field label { display: block; line-height: 1.25; }
.field .abbr { font-weight: 600; font-size: 15px; }
.field .name { display: block; font-size: 12px; color: var(--ink-2); }
.field .range { display: block; font-size: 12px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.field input {
  width: 100%; height: 36px; padding: 0 8px; border: 1px solid var(--rule); border-radius: 4px;
  font: 15px var(--sans); text-align: right; font-variant-numeric: tabular-nums; color: var(--ink); background: #fff;
}
.field input[aria-invalid="true"] { border-color: var(--flag); box-shadow: inset 0 0 0 1px var(--flag); }
.field .unit { font-size: 13px; color: var(--ink-2); white-space: nowrap; }
.field .msg { grid-column: 1 / -1; font-size: 12px; color: var(--flag); min-height: 0; }
.field .msg:empty { display: none; }
.form-note { font-size: 12.5px; color: var(--ink-2); margin: 12px 0 14px; }
button {
  font: inherit; font-size: 15px; border-radius: 4px; padding: 9px 16px; cursor: pointer;
  border: 1px solid var(--rule); background: #fff; color: var(--ink);
}
button:disabled { cursor: not-allowed; opacity: .5; }
button.primary { width: 100%; background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; padding: 11px 16px; }
button.primary:not(:disabled):hover { background: var(--accent-dark); }
.server-status { margin-top: 12px; font-size: 13px; color: var(--ink-2); }
.server-status.error { color: var(--flag); }
.server-status:empty { display: none; }

.progress { list-style: none; counter-reset: step; margin: 14px 0 0; padding: 0; font-size: 13px; }
.progress li { counter-increment: step; display: grid; grid-template-columns: 22px 1fr auto; column-gap: 6px; row-gap: 4px; padding: 6px 0; }
.progress li::before { content: counter(step) "."; color: var(--ink-2); }
.progress .step-state { color: var(--ink-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.progress .bar { grid-column: 2 / -1; height: 3px; background: #e3e8ec; border-radius: 2px; overflow: hidden; }
.progress .bar > span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .4s ease; }
.progress li.done .bar > span { background: #8aa5b5; }
.progress li.done .step-state { color: var(--ink); }

/* report sheet */
.sheet-area { min-width: 0; }
.sheet {
  background: var(--paper); width: 100%; max-width: 860px; aspect-ratio: 595 / 841;
  box-shadow: 0 1px 2px rgba(29, 39, 51, .16), 0 10px 30px rgba(29, 39, 51, .10);
  position: relative;
}
.sheet svg { display: block; width: 100%; height: 100%; }
.sheet-empty { position: absolute; inset: 0; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 24px; color: var(--ink-2); text-align: center; }
.sheet-empty p { margin: 4px 0; max-width: 28em; }
.sheet-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; max-width: 860px; }
.sheet-hint { font-size: 13px; color: var(--ink-2); }

/* facts */
.facts {
  max-width: 1240px; margin: 0 auto; padding: 8px 24px 40px;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 32px 40px;
}
.fact-block h2 { margin-bottom: 12px; }
table.perf { border-collapse: collapse; width: 100%; font-size: 14px; font-variant-numeric: tabular-nums; }
table.perf th, table.perf td { padding: 6px 8px; text-align: right; border-bottom: 1px solid var(--rule); vertical-align: bottom; }
table.perf th:first-child, table.perf td:first-child { text-align: left; padding-left: 0; }
table.perf thead th { font-weight: 600; font-size: 13px; color: var(--ink-2); line-height: 1.2; }
table.perf thead small { font-weight: 400; }
table.strata td, table.strata th[scope="row"] { font-size: 13px; line-height: 1.3; vertical-align: top; }
table.strata td small, table.strata th small { display: block; font-size: 11.5px; color: var(--ink-2); font-weight: 400; }
.nowrap { white-space: nowrap; }
.note { font-size: 13px; color: var(--ink-2); margin: 10px 0 0; }
.method dl { margin: 0; font-size: 14px; }
.method dt { font-weight: 600; margin-top: 10px; }
.method dd { margin: 2px 0 0; color: var(--ink-2); max-width: 46em; }

.footer {
  max-width: 1240px; margin: 0 auto; padding: 20px 24px 36px; border-top: 1px solid var(--rule);
  font-size: 13px; color: var(--ink-2); display: flex; flex-wrap: wrap; gap: 6px 24px;
}
.footer p { margin: 0; }
.footer strong { color: var(--ink); }

@media (max-width: 900px) {
  .workbench { grid-template-columns: minmax(0, 1fr); }
  .requisition { position: static; }
  .masthead { padding: 28px 16px 20px; }
  .workbench, .facts { padding-left: 16px; padding-right: 16px; }
  .footer { padding-left: 16px; padding-right: 16px; }
}
@media (max-width: 420px) {
  .field { grid-template-columns: 1fr 96px 44px; column-gap: 8px; }
}
@media (prefers-reduced-motion: reduce) {
  .progress .bar > span { transition: none; }
}

@page { size: A4; margin: 0; }
@media print {
  body { background: #fff; }
  body > *:not(main) { display: none !important; }
  .workbench { display: block; padding: 0; max-width: none; }
  .requisition, .sheet-actions { display: none !important; }
  .sheet { box-shadow: none; max-width: none; width: 210mm; height: 297mm; aspect-ratio: auto; }
  .sheet svg { width: 210mm; height: 297mm; }
}
