/* AI Usage Guide Generator — stylesheet (light theme only)
   Swiss typographic style: strict grid, flush-left, one blue accent.
   Status colours derive from the Okabe-Ito colour-blind-safe palette; status is never colour alone. */

:root {
  color-scheme: light;
  --bg: #f5f6f8;
  --surface: #ffffff;
  --surface-2: #eceef2;
  --ink: #12151c;
  --ink-2: #4f5561;
  --ink-3: #6b7180;
  --line: #d6d9e0;
  --line-soft: #e6e8ed;
  --accent: #0b5fa5;
  --accent-ink: #ffffff;
  --accent-soft: #d5e4f6;
  --accent-soft-2: #eaf1fb;
  --ok: #00694f; --ok-soft: #dff3ec;
  --warn: #7a4f00; --warn-soft: #fbebc8;
  --no: #9a3800; --no-soft: #fbe1d4;
  --neutral: #4f5561; --neutral-soft: #e6e8ed;
  --shadow: 0 1px 2px rgba(18, 21, 28, 0.06), 0 8px 24px rgba(18, 21, 28, 0.06);
  --display: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --body: -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --measure: 36rem;
  --wide: 76rem;
  --gutter: clamp(1rem, 4vw, 3rem);
}

/* ---------- language switching (static chrome only; the app renders in one language) ---------- */
[data-lang="en"] .de, [data-lang="de"] .en { display: none !important; }

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 1.0625rem; line-height: 1.55; }
.app-root { min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 0.15em; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }
h1[tabindex="-1"]:focus { outline: none; }
button { font: inherit; color: inherit; }
input, textarea, select { font: inherit; color: inherit; }
img, svg { max-width: 100%; }
strong { font-weight: 600; }
h1, h2, h3, h4 { font-family: var(--display); letter-spacing: -0.01em; line-height: 1.15; margin: 0; }
p { margin: 0 0 1rem; text-wrap: pretty; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: 0.5rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; top: 1rem; }
.muted { color: var(--ink-3); }
.small { font-size: 0.85rem; }
.kicker { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); font-weight: 600; margin: 0 0 0.75rem; }

/* ---------- top bar ---------- */
.top { position: sticky; top: 0; z-index: 20; background: rgba(245, 246, 248, 0.9); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid var(--line-soft); }
.top-row { max-width: var(--wide); margin: 0 auto; padding: 0.65rem var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.home { font-family: var(--display); font-weight: 600; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.home:hover { text-decoration: none; color: var(--accent); }
.top-right { display: flex; align-items: center; gap: 0.75rem; flex-shrink: 0; }
.lang { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--surface); }
.lang button { border: 0; background: transparent; border-radius: 999px; padding: 0.2rem 0.7rem; font-size: 0.8rem; font-weight: 600; letter-spacing: 0.06em; color: var(--ink-2); cursor: pointer; }
.lang button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 0.4rem; border: 1px solid var(--ink); background: var(--ink); color: var(--bg); border-radius: 999px; padding: 0.55rem 1.15rem; font-size: 0.95rem; font-weight: 600; cursor: pointer; line-height: 1.3; text-decoration: none; }
.btn:hover { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.1); }
.btn.secondary { background: transparent; color: var(--ink); }
.btn.secondary:hover { background: var(--surface-2); color: var(--ink); border-color: var(--ink); }
.btn-ghost { border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: 0.4rem 0.9rem; font-size: 0.85rem; font-weight: 500; cursor: pointer; color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--ink-3); color: var(--ink); }
.btn-ghost.small { padding: 0.3rem 0.7rem; font-size: 0.8rem; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 2px; background: var(--surface); }
.seg button { border: 0; background: transparent; padding: 0.3rem 0.9rem; border-radius: 999px; font-size: 0.9rem; font-weight: 500; cursor: pointer; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: var(--ink); color: var(--bg); }
.seg-wrap { display: flex; flex-direction: column; gap: 0.3rem; }

/* ---------- cover ---------- */
main { flex: 1; }
.cover { max-width: var(--wide); margin: 0 auto; padding: clamp(2rem, 6vw, 5rem) var(--gutter) 3rem; }
.cover h1 { font-weight: 600; letter-spacing: -0.03em; line-height: 0.98; font-size: clamp(2.6rem, 7.5vw, 5.5rem); margin: 0 0 1.25rem; max-width: 14ch; text-wrap: balance; }
.cover .sub { font-size: clamp(1.15rem, 2vw, 1.4rem); line-height: 1.4; max-width: var(--measure); color: var(--ink-2); margin: 0 0 2rem; }
.cover-cta { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.start { display: inline-flex; align-items: center; gap: 0.6rem; background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 999px; padding: 0.85rem 1.6rem; font-family: var(--display); font-weight: 600; font-size: 1.05rem; cursor: pointer; }
.start:hover { filter: brightness(1.1); }
.cover-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 2rem 3rem; border-top: 1px solid var(--line); padding-top: 2rem; margin-top: 2.5rem; }
.cover-grid h2, .cover-steps h2 { font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin-bottom: 0.75rem; }
.how { margin: 0; padding-left: 1.2rem; }
.how li { margin-bottom: 0.5rem; }
.cover-steps { margin-top: 2.5rem; }
.cover-steps ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 0.25rem 1.5rem; counter-reset: st; }
.cover-steps li { counter-increment: st; border-top: 1px solid var(--line-soft); padding: 0.45rem 0; display: grid; grid-template-columns: 1.6rem 1fr; gap: 0.4rem; }
.cover-steps li::before { content: counter(st); font-family: var(--mono); font-size: 0.85rem; color: var(--ink-3); padding-top: 0.15rem; }
.cover-steps a { color: var(--ink); }
.cover-steps a:hover { color: var(--accent); }

/* ---------- rail ---------- */
.rail-wrap { border-bottom: 1px solid var(--line-soft); background: var(--surface); overflow-x: auto; }
.rail { list-style: none; margin: 0 auto; padding: 0.4rem var(--gutter); max-width: var(--wide); display: flex; gap: 0.15rem; min-width: max-content; }
.rail a { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.35rem 0.6rem; border-radius: 999px; color: var(--ink-3); font-size: 0.85rem; white-space: nowrap; }
.rail a:hover { text-decoration: none; background: var(--surface-2); color: var(--ink); }
.rail .n { display: inline-grid; place-items: center; width: 1.4rem; height: 1.4rem; border-radius: 50%; border: 1px solid var(--line); font-family: var(--mono); font-size: 0.72rem; }
.rail .done a { color: var(--ink-2); }
.rail .done .n { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.rail .current a { color: var(--accent); font-weight: 600; }
.rail .current .n { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }

/* ---------- wizard layout ---------- */
.wizard { max-width: var(--wide); margin: 0 auto; padding: clamp(1.5rem, 4vw, 3rem) var(--gutter) 3rem; display: flex; flex-direction: column; gap: 2rem; }
.step h1 { font-weight: 600; letter-spacing: -0.025em; font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 0.75rem; max-width: 22ch; text-wrap: balance; }
.step .intro { font-size: 1.1rem; color: var(--ink-2); max-width: var(--measure); margin-bottom: 2rem; }
.questions { display: flex; flex-direction: column; gap: 2rem; }
.step-nav { display: flex; justify-content: space-between; gap: 1rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.step-nav .btn:only-child { margin-left: auto; }

.q { border: 0; padding: 0; margin: 0; min-width: 0; }
.q legend { padding: 0; font-family: var(--display); font-weight: 600; font-size: 1.1rem; margin-bottom: 0.35rem; }
.q-head { margin-bottom: 0.5rem; }
.q-label { display: block; font-family: var(--display); font-weight: 600; font-size: 1.1rem; margin-bottom: 0.35rem; }
.q-label.small { font-family: var(--body); font-weight: 500; font-size: 0.85rem; color: var(--ink-2); margin: 0.75rem 0 0.3rem; }
.q-help { font-size: 0.9rem; color: var(--ink-3); margin: 0 0 0.75rem; max-width: var(--measure); }
.q-error { color: var(--no); font-size: 0.9rem; margin: 0.5rem 0 0; font-weight: 500; }
.q-error::before { content: "! "; font-weight: 700; }
.has-error input[type="text"], .has-error textarea { border-color: var(--no); }
.q-text input, .q-text textarea, .tier-name, .contact-cell input, .per-item input[type="text"] { width: 100%; padding: 0.6rem 0.8rem; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); }
.q-text input:focus, .q-text textarea:focus, .tier-name:focus, .contact-cell input:focus, .per-item input[type="text"]:focus { border-color: var(--accent); outline: 2px solid var(--accent-soft); outline-offset: 0; }
.q-text input { max-width: 30rem; }
.q-text textarea { max-width: 40rem; resize: vertical; }
.q-text input[type="date"] { max-width: 14rem; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 0.85rem; }
.card { position: relative; display: flex; gap: 0.75rem; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 12px; padding: 1rem 1rem 1rem 0.9rem; cursor: pointer; transition: border-color 0.15s ease, box-shadow 0.15s ease; }
.card:hover { border-color: var(--ink-3); }
.card:has(input:checked), .card.is-checked { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.card:has(input:focus-visible), .card:focus-within { outline: 2px solid var(--accent); outline-offset: 3px; }
.card input[type="radio"], .card input[type="checkbox"] { flex-shrink: 0; margin: 0.2rem 0 0; width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }
.card-body { display: flex; flex-direction: column; gap: 0.25rem; min-width: 0; flex: 1; }
.card-title { font-family: var(--display); font-weight: 600; font-size: 1rem; }
.card-desc { font-size: 0.9rem; color: var(--ink-2); }
.card-multi { flex-direction: column; gap: 0.6rem; }
.card-check { display: flex; gap: 0.75rem; cursor: pointer; }
.card-check input { flex-shrink: 0; margin: 0.2rem 0 0; width: 1.1rem; height: 1.1rem; accent-color: var(--accent); }
.card input:disabled + .card-body { opacity: 0.5; }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 0.15rem 0.6rem; margin: 0; font-size: 0.8rem; color: var(--ink-2); border-top: 1px solid var(--line-soft); padding-top: 0.6rem; }
.facts dt { color: var(--ink-3); }
.facts dd { margin: 0; }
.more { font-size: 0.88rem; }
.more summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 0.5rem; color: var(--accent); font-weight: 500; padding: 0.2rem 0; }
.more summary::-webkit-details-marker { display: none; }
.more summary::before { content: ""; width: 0.45rem; height: 0.45rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); transition: transform 0.2s ease; }
.more[open] summary::before { transform: rotate(-135deg) translateY(-2px); }
.pc-grid { display: grid; gap: 0.5rem 1rem; margin-top: 0.5rem; }
.pc h4 { font-size: 0.75rem; letter-spacing: 0.06em; text-transform: uppercase; margin: 0 0 0.25rem; color: var(--ink-3); }
.pc ul { margin: 0; padding-left: 1.1rem; }
.pc li { margin-bottom: 0.2rem; }
.pc-pro li::marker { content: "✓ "; color: var(--ok); }
.pc-con li::marker { content: "– "; color: var(--no); }
.pc-ex li::marker { content: "· "; color: var(--ink-3); }

/* chips and checklists */
.chips { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.chip-opt { display: inline-flex; align-items: center; gap: 0.45rem; border: 1px solid var(--line); border-radius: 999px; padding: 0.45rem 0.9rem 0.45rem 0.7rem; background: var(--surface); cursor: pointer; font-size: 0.95rem; }
.chip-opt:hover { border-color: var(--ink-3); }
.chip-opt:has(input:checked) { border-color: var(--accent); background: var(--accent-soft-2); color: var(--ink); }
.chip-opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.chip-opt input { width: 1rem; height: 1rem; margin: 0; accent-color: var(--accent); }
.chip-opt:has(input:disabled) { opacity: 0.5; cursor: not-allowed; }
.chip-opt .card-body { display: contents; }
.checklist { display: flex; flex-direction: column; gap: 0.4rem; }
.check-row { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 10px; padding: 0.7rem 0.9rem; }
.check-row:has(input:checked) { border-color: var(--accent-soft); }
.check-row .card-check input { margin-top: 0.25rem; }
.chips-small { gap: 0.35rem; }
.chips-small .chip-opt { font-size: 0.82rem; padding: 0.3rem 0.7rem 0.3rem 0.5rem; }

/* status / tone segments */
.per-item { border-top: 1px solid var(--line-soft); padding-top: 0.75rem; display: flex; flex-direction: column; gap: 0.25rem; }
.seg-group { border: 0; padding: 0; margin: 0; }
.seg-tones { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.seg-opt { display: inline-flex; align-items: center; gap: 0.35rem; border: 1px solid var(--line); border-radius: 999px; padding: 0.3rem 0.7rem 0.3rem 0.45rem; font-size: 0.82rem; font-weight: 500; cursor: pointer; background: var(--surface); color: var(--ink-2); }
.seg-opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.seg-opt .tone-icon { display: inline-grid; place-items: center; width: 1.15rem; height: 1.15rem; border-radius: 50%; font-size: 0.7rem; font-weight: 700; background: var(--surface-2); color: var(--ink-2); }
.seg-opt:has(input:checked) { border-color: currentColor; }
.seg-opt:has(input:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.seg-opt.tone-ok:has(input:checked) { background: var(--ok-soft); color: var(--ok); }
.seg-opt.tone-warn:has(input:checked) { background: var(--warn-soft); color: var(--warn); }
.seg-opt.tone-no:has(input:checked) { background: var(--no-soft); color: var(--no); }
.seg-opt.tone-neutral:has(input:checked) { background: var(--neutral-soft); color: var(--neutral); }
.seg-opt.tone-ok .tone-icon { background: var(--ok); color: #fff; }
.seg-opt.tone-warn .tone-icon { background: var(--warn); color: #fff; }
.seg-opt.tone-no .tone-icon { background: var(--no); color: #fff; }
.seg-opt.tone-neutral .tone-icon { background: var(--neutral); color: #fff; }

/* toggle */
.toggle { display: flex; align-items: center; gap: 0.75rem; cursor: pointer; font-family: var(--display); font-weight: 600; }
.toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.toggle-ui { width: 2.6rem; height: 1.5rem; border-radius: 999px; background: var(--line); position: relative; transition: background 0.15s ease; flex-shrink: 0; }
.toggle-ui::after { content: ""; position: absolute; top: 3px; left: 3px; width: 1.1rem; height: 1.1rem; border-radius: 50%; background: #fff; transition: transform 0.15s ease; box-shadow: 0 1px 2px rgba(0,0,0,0.2); }
.toggle input:checked + .toggle-ui { background: var(--accent); }
.toggle input:checked + .toggle-ui::after { transform: translateX(1.1rem); }
.toggle input:focus-visible + .toggle-ui { outline: 2px solid var(--accent); outline-offset: 3px; }
.q-toggle .q-help { margin-top: 0.4rem; margin-left: 3.35rem; }

/* level slider */
.level-row input[type="range"] { width: 100%; max-width: 32rem; accent-color: var(--accent); height: 2rem; }
.level-ticks { display: grid; grid-template-columns: repeat(4, 1fr); max-width: 32rem; font-size: 0.8rem; color: var(--ink-3); margin-bottom: 1rem; }
.level-ticks span:first-child { text-align: left; } .level-ticks span { text-align: center; } .level-ticks span:last-child { text-align: right; }
.level-ticks .is-active { color: var(--accent); font-weight: 600; }
.level-panel { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 12px; padding: 1.25rem 1.4rem; max-width: 40rem; }
.level-name { font-family: var(--display); font-weight: 600; font-size: 1.3rem; color: var(--accent); margin: 0 0 0.25rem; }
.level-desc { color: var(--ink-2); margin-bottom: 0.75rem; }
.level-panel h3 { font-size: 0.78rem; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-3); margin: 0.9rem 0 0.35rem; }
.level-panel ul { margin: 0; padding-left: 1.15rem; }
.level-panel li { margin-bottom: 0.25rem; }
.level-panel p:last-child { margin: 0; }

/* tiers */
.tiers-top { display: flex; flex-wrap: wrap; gap: 1.5rem; margin-bottom: 0.75rem; }
.tier-list { display: flex; flex-direction: column; gap: 0.85rem; }
.tier { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 12px; padding: 1rem 1.1rem; }
.tier-head { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.4rem; }
.tier-num { display: inline-grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--ink); color: var(--bg); font-family: var(--mono); font-size: 0.85rem; flex-shrink: 0; }
.tier-name { max-width: 20rem; font-family: var(--display); font-weight: 600; }
.tier-ex ul { margin: 0 0 0.25rem; padding-left: 1.15rem; font-size: 0.9rem; color: var(--ink-2); columns: 2; column-gap: 1.5rem; }
.tier-ex li { break-inside: avoid; }

/* contacts */
.contact-rows { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 0.75rem; }
.contact-row { display: grid; grid-template-columns: 1fr 1fr 1.3fr auto; gap: 0.6rem; align-items: end; background: var(--surface); border: 1px solid var(--line-soft); border-radius: 12px; padding: 0.75rem 0.9rem; }
.contact-cell .q-label.small { margin-top: 0; }

/* impact panel */
.impact { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 14px; padding: 1.25rem 1.4rem; }
.impact h2 { font-size: 1rem; font-weight: 600; margin-bottom: 0.3rem; }
.impact .kicker { color: var(--ink-3); font-weight: 500; letter-spacing: 0.04em; text-transform: none; font-size: 0.8rem; }
.doc-preview { font-size: 0.92rem; color: var(--ink-2); }
.doc-preview h2, .doc-preview h1 { font-size: 0.95rem; color: var(--ink); margin: 1rem 0 0.4rem; }
.doc-preview h2:first-child { margin-top: 0.25rem; }

@media (min-width: 1000px) {
  .wizard { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: clamp(2rem, 4vw, 4rem); align-items: start; }
  .impact { position: sticky; top: 4.2rem; max-height: calc(100vh - 5.5rem); overflow: auto; }
  .pc-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .contact-row { grid-template-columns: 1fr; }
  .tier-ex ul { columns: 1; }
  .cards { grid-template-columns: 1fr; }
}

/* ---------- generated document ---------- */
.doc h1 { font-size: 1.9rem; font-weight: 600; margin: 0 0 0.5rem; }
.doc h2 { font-size: 1.25rem; font-weight: 600; margin: 1.75rem 0 0.6rem; color: var(--accent); }
.doc h3 { font-size: 1.05rem; font-weight: 600; margin: 1.25rem 0 0.4rem; }
.doc p { margin: 0 0 0.8rem; }
.doc ul, .doc ol { margin: 0 0 1rem; padding-left: 1.3rem; }
.doc li { margin-bottom: 0.35rem; }
.doc .note { border-left: 3px solid var(--accent); background: var(--accent-soft-2); padding: 0.6rem 0.9rem; border-radius: 0 8px 8px 0; color: var(--ink-2); }
.doc .table-wrap { overflow-x: auto; margin: 0.5rem 0 1.25rem; }
.doc table { border-collapse: collapse; width: 100%; font-size: 0.92rem; }
.doc th, .doc td { text-align: left; padding: 0.5rem 0.7rem; border: 1px solid var(--line); vertical-align: top; }
.doc th { background: var(--surface-2); font-weight: 600; font-size: 0.82rem; letter-spacing: 0.04em; text-transform: uppercase; color: var(--ink-2); }
.doc-full { background: var(--surface); border: 1px solid var(--line-soft); border-radius: 14px; padding: clamp(1.5rem, 4vw, 3rem); box-shadow: var(--shadow); }
.doc-full > h1 + p { color: var(--ink-3); }

/* ---------- result ---------- */
.result { max-width: var(--wide); margin: 0 auto; padding: clamp(1.5rem, 4vw, 3rem) var(--gutter) 3rem; }
.result h1 { font-weight: 600; letter-spacing: -0.025em; font-size: clamp(1.8rem, 4vw, 2.6rem); margin-bottom: 0.5rem; }
.result .intro { color: var(--ink-2); max-width: var(--measure); }
.missing { background: var(--warn-soft); color: var(--warn); border-radius: 12px; padding: 0.9rem 1.1rem; margin: 0 0 1rem; max-width: 40rem; }
.missing ul { margin: 0.35rem 0 0; padding-left: 1.2rem; }
.missing a { color: inherit; text-decoration: underline; }
.toolbar { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin: 1.5rem 0 2rem; }
.result-grid { display: flex; flex-direction: column; gap: 2rem; }
.summary h2 { font-size: 0.8rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; margin-bottom: 0.75rem; }
.sum-step { border-top: 1px solid var(--line-soft); padding: 0.75rem 0; }
.sum-step h3 { display: flex; justify-content: space-between; align-items: baseline; font-size: 0.95rem; font-weight: 600; margin-bottom: 0.35rem; }
.sum-step .edit { font-size: 0.8rem; font-weight: 500; }
.sum-step dl { margin: 0; font-size: 0.85rem; }
.sum-step dt { color: var(--ink-3); }
.sum-step dd { margin: 0 0 0.35rem; color: var(--ink-2); }
@media (min-width: 1000px) {
  .result-grid { display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); column-gap: clamp(2rem, 4vw, 4rem); align-items: start; }
  .summary { position: sticky; top: 4.2rem; max-height: calc(100vh - 5.5rem); overflow: auto; }
}

/* ---------- footer, status ---------- */
.foot { border-top: 1px solid var(--line-soft); }
.foot-row { max-width: var(--wide); margin: 0 auto; padding: 1.25rem var(--gutter) 2rem; font-size: 0.85rem; color: var(--ink-3); display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.status { position: fixed; left: 50%; bottom: 1.25rem; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 0.55rem 1rem; border-radius: 999px; font-size: 0.9rem; z-index: 50; box-shadow: var(--shadow); max-width: calc(100vw - 2rem); }
.status:empty { display: none; }
.selftest { position: fixed; right: 1rem; bottom: 1rem; max-height: 60vh; overflow: auto; background: #fff; border: 2px solid var(--accent); padding: 1rem; font-size: 0.75rem; z-index: 60; }

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

/* ---------- print: only the document ---------- */
@media print {
  @page { size: A4; margin: 2cm; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .top, .foot, .rail-wrap, .result-head, .summary, .status, .skip, .selftest { display: none !important; }
  .result, .result-grid { display: block; padding: 0; max-width: none; }
  .doc-full { border: 0; box-shadow: none; padding: 0; border-radius: 0; }
  .doc h1 { font-size: 22pt; } .doc h2 { font-size: 15pt; color: #0b5fa5; page-break-after: avoid; } .doc h3 { page-break-after: avoid; }
  .doc table { page-break-inside: auto; } .doc tr { page-break-inside: avoid; }
  .doc .note { background: #eaf1fb; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .doc th { background: #eceef2; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  a { color: inherit; }
}
