/* Layout: feste Kopfleiste, Inhalt bis 1280px. Eine Bestellung ist ein Blatt: Kopfblock, darunter die Bestell-Tabelle.
   Bestellspalten neutral, Antwortspalten im Blau des Durchschlags getönt. Status als Stempel und Marke. */
:root {
  --paper: #f3f5f8; --sheet: #ffffff; --band: #eceff3; --sunk: #f7f9fb;
  --ink: #14202b; --ink-2: #44525f; --ink-3: #71808e;
  --line: #d3dae2; --line-2: #e6eaef;
  --accent: #1f4fbf; --accent-strong: #173b8f; --accent-ink: #ffffff; --accent-soft: #e8effd; --accent-line: #b9cbf5;
  --good: #0b6b2b; --good-bg: #e2f3e7; --good-mark: #0ca30c;
  --warn: #7a4e00; --warn-bg: #fff0cf; --warn-mark: #d08a00;
  --bad: #a3231c; --bad-bg: #fce5e3; --bad-mark: #d03b3b;
  --serious-mark: #d9662f;
  --shadow: 0 1px 2px rgba(20, 32, 43, .06), 0 6px 18px rgba(20, 32, 43, .06);
  --f-display: "Barlow Semi Condensed", "Arial Narrow", "Segoe UI", system-ui, sans-serif;
  --f-body: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  --r: 6px;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0d1318; --sheet: #151d24; --band: #1c262e; --sunk: #111920;
    --ink: #e8eef3; --ink-2: #b1bdc8; --ink-3: #8794a0;
    --line: #2b3742; --line-2: #222d36;
    --accent: #84a9ff; --accent-strong: #a9c2ff; --accent-ink: #0b1424; --accent-soft: #18284a; --accent-line: #2d4580;
    --good: #72d897; --good-bg: #11301d; --good-mark: #0ca30c;
    --warn: #f1c46b; --warn-bg: #382a0c; --warn-mark: #fab219;
    --bad: #ff9a90; --bad-bg: #3b1613; --bad-mark: #e66767;
    --serious-mark: #ec835a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 18px rgba(0, 0, 0, .25);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0d1318; --sheet: #151d24; --band: #1c262e; --sunk: #111920;
  --ink: #e8eef3; --ink-2: #b1bdc8; --ink-3: #8794a0;
  --line: #2b3742; --line-2: #222d36;
  --accent: #84a9ff; --accent-strong: #a9c2ff; --accent-ink: #0b1424; --accent-soft: #18284a; --accent-line: #2d4580;
  --good: #72d897; --good-bg: #11301d; --good-mark: #0ca30c;
  --warn: #f1c46b; --warn-bg: #382a0c; --warn-mark: #fab219;
  --bad: #ff9a90; --bad-bg: #3b1613; --bad-mark: #e66767;
  --serious-mark: #ec835a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 6px 18px rgba(0, 0, 0, .25);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
body { background: var(--paper); color: var(--ink); font-family: var(--f-body); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { font-family: var(--f-display); font-weight: 600; letter-spacing: .005em; margin: 0; text-wrap: balance; line-height: 1.15; }
h1 { font-size: 28px; } h2 { font-size: 21px; } h3 { font-size: 17px; } h4 { font-size: 15px; }
p { margin: 0; }
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px; }
.mono { font-family: var(--f-mono); font-size: .92em; }
.muted { color: var(--ink-3); } .sec { color: var(--ink-2); }
.num { font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.nowrap { white-space: nowrap; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Gerüst ---------- */
.topbar { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 30; background: var(--sheet); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1280px; margin: 0 auto; padding: 10px 20px; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 22px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--f-display); font-weight: 700; font-size: 19px; letter-spacing: .01em; white-space: nowrap; }
.brand-mark { width: 26px; height: 26px; flex: none; }
.brand small { font-family: var(--f-mono); font-weight: 500; font-size: 11px; color: var(--ink-3); border: 1px solid var(--line); border-radius: 3px; padding: 1px 5px; }
.nav { display: flex; gap: 2px; flex-wrap: wrap; }
.nav button { background: none; border: 0; padding: 7px 11px; border-radius: var(--r); cursor: pointer; color: var(--ink-2); font-weight: 500; }
.nav button:hover { background: var(--band); color: var(--ink); }
.nav button[aria-current="page"] { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); border-radius: var(--r) var(--r) 0 0; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--sunk); }
.seg button { border: 0; background: none; padding: 6px 11px; cursor: pointer; color: var(--ink-2); font-weight: 500; white-space: nowrap; }
.seg button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); }
.seg-label { font-size: 12px; color: var(--ink-3); }
.page { max-width: 1280px; margin: 0 auto; padding-inline: 20px; padding-block: 20px 56px; display: flex; flex-direction: column; gap: 18px; }
@media (max-width: 560px) { .page { padding-inline: 16px; } .topbar-in { padding-inline: 16px; } h1 { font-size: 24px; } }
@media (max-width: 760px) { .topbar { position: static; } .topbar-right { margin-left: 0; } }

.notice { display: flex; gap: 10px; align-items: flex-start; padding: 9px 12px; border-radius: var(--r); border: 1px solid var(--line); background: var(--sheet); font-size: 13px; }
.notice.warn { background: var(--warn-bg); border-color: transparent; color: var(--warn); }
.notice.bad { background: var(--bad-bg); border-color: transparent; color: var(--bad); }
.notice.info { background: var(--accent-soft); border-color: transparent; }
.notice svg { flex: none; margin-top: 2px; }

/* ---------- Bedienelemente ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 1px solid var(--line); background: var(--sheet); color: var(--ink); padding: 7px 13px; border-radius: var(--r); cursor: pointer; font-weight: 500; white-space: nowrap; min-height: 34px; text-decoration: none; }
.btn:hover { border-color: var(--ink-3); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { background: var(--accent-strong); border-color: var(--accent-strong); }
.btn.ghost { border-color: transparent; background: none; color: var(--accent); padding-inline: 8px; }
.btn.ghost:hover { background: var(--accent-soft); }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 4px 9px; min-height: 28px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn svg { flex: none; }
.btnrow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.field { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.field > label, .field > .lab { font-size: 12.5px; font-weight: 600; color: var(--ink-2); display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; }
.field .var { font-family: var(--f-mono); font-size: 10.5px; font-weight: 400; color: var(--ink-3); }
.field .req { color: var(--bad); font-weight: 600; }
.input, select.input, textarea.input { width: 100%; min-width: 0; background: var(--sheet); border: 1px solid var(--line); border-radius: var(--r); padding: 7px 9px; min-height: 34px; }
.input:hover { border-color: var(--ink-3); }
.input.err { border-color: var(--bad-mark); box-shadow: inset 0 0 0 1px var(--bad-mark); }
textarea.input { resize: vertical; line-height: 1.4; }
.input.mono { font-family: var(--f-mono); font-size: 13px; }
.field .hint { font-size: 12px; color: var(--ink-3); }
.field .errtext { font-size: 12px; color: var(--bad); }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--accent); flex: none; }
.grid { display: grid; gap: 12px 14px; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.grid.wide { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.span2 { grid-column: span 2; } .spanall { grid-column: 1 / -1; }
@media (max-width: 520px) { .span2 { grid-column: auto; } }

/* ---------- Marken, Stempel ---------- */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--band); color: var(--ink-2); white-space: nowrap; line-height: 1.5; }
.chip svg { flex: none; }
.chip.info { background: var(--accent-soft); color: var(--accent-strong); }
.chip.good { background: var(--good-bg); color: var(--good); }
.chip.warn { background: var(--warn-bg); color: var(--warn); }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
.chip.outline { background: none; box-shadow: inset 0 0 0 1px var(--line); font-weight: 500; }
.chip.sample { background: none; box-shadow: inset 0 0 0 1px var(--warn-mark); color: var(--warn); }
.stamp { display: inline-block; font-family: var(--f-mono); font-weight: 500; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; padding: 5px 12px; border: 2px solid currentColor; border-radius: 4px; transform: rotate(-3deg); color: var(--ink-2); background: var(--sheet); white-space: nowrap; }
.stamp.good { color: var(--good); } .stamp.warn { color: var(--warn); } .stamp.bad { color: var(--bad); } .stamp.info { color: var(--accent); }
.code { font-family: var(--f-mono); font-size: 12.5px; background: var(--band); border-radius: 3px; padding: 1px 5px; white-space: nowrap; }
.varname { font-family: var(--f-mono); font-size: 11.5px; color: var(--ink-3); }
button.varname { border: 0; background: none; padding: 0; cursor: copy; text-align: left; }
button.varname:hover { color: var(--accent); }

/* ---------- Flächen ---------- */
.sheet { background: var(--sheet); border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); min-width: 0; }
.sheet-pad { padding: 18px 20px; }
.card { background: var(--sheet); border: 1px solid var(--line); border-radius: 8px; padding: 14px 16px; min-width: 0; }
.plain { min-width: 0; }
.cols { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
@media (max-width: 980px) { .cols { grid-template-columns: minmax(0, 1fr); } }
.stack { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.row { display: flex; flex-wrap: wrap; gap: 8px 14px; align-items: center; min-width: 0; }
.row.between { justify-content: space-between; }
.row.top { align-items: flex-start; }
.grow { flex: 1 1 auto; min-width: 0; }
.sticky-side { position: sticky; top: calc(env(safe-area-inset-top, 0px) + 70px); }
@media (max-width: 980px) { .sticky-side { position: static; } }
.eyebrow { font-family: var(--f-mono); font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.lead { font-size: 15px; color: var(--ink-2); max-width: 68ch; }

/* ---------- Kennzahlen ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; }
.kpi { background: var(--sheet); border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; }
.kpi .l { font-size: 12.5px; color: var(--ink-2); }
.kpi .v { font-size: 26px; font-weight: 600; line-height: 1.15; }
.kpi .s { font-size: 12px; color: var(--ink-3); }
.meter { height: 8px; border-radius: 4px; background: var(--accent-soft); overflow: hidden; }
.meter > i { display: block; height: 100%; background: var(--accent); border-radius: 4px 0 0 4px; }
.meter.good { background: var(--good-bg); } .meter.good > i { background: var(--good-mark); }
.meter.warn { background: var(--warn-bg); } .meter.warn > i { background: var(--warn-mark); }
.meter.bad { background: var(--bad-bg); } .meter.bad > i { background: var(--bad-mark); }
.hbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; }
.hbar .track { height: 14px; background: var(--band); border-radius: 0 4px 4px 0; position: relative; }
.hbar .fill { position: absolute; inset: 0 auto 0 0; background: var(--accent); border-radius: 0 4px 4px 0; }
.hbar .ref { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink-2); }

/* ---------- Listen ---------- */
.olist { display: flex; flex-direction: column; }
.oitem { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; padding: 13px 18px; border-top: 1px solid var(--line-2); cursor: pointer; background: none; border-inline: 0; border-bottom: 0; text-align: left; width: 100%; align-items: center; }
.oitem:first-child { border-top: 0; }
.oitem:hover { background: var(--sunk); }
.oitem .t { font-family: var(--f-display); font-size: 18px; font-weight: 600; }
.oitem .m { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12.5px; color: var(--ink-2); }
.oitem .side { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
@media (max-width: 640px) { .oitem { grid-template-columns: minmax(0, 1fr); } .oitem .side { align-items: flex-start; flex-direction: row; flex-wrap: wrap; } }
.empty { padding: 34px 20px; text-align: center; color: var(--ink-2); display: flex; flex-direction: column; gap: 10px; align-items: center; }
.empty h3 { color: var(--ink); }
.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.filters .input { width: auto; min-width: 150px; }
.filters .search { flex: 1 1 200px; }

/* ---------- Tabellen ---------- */
.tablewrap { overflow-x: auto; min-width: 0; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th { text-align: left; font-size: 11.5px; font-weight: 600; color: var(--ink-2); background: var(--band); padding: 7px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; position: sticky; top: 0; }
table.t td { padding: 6px 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
table.t tr.band td { background: var(--sunk); font-family: var(--f-display); font-weight: 600; font-size: 14px; padding-top: 10px; border-bottom: 1px solid var(--line); color: var(--ink); }
table.t tr.band .cnt { font-family: var(--f-mono); font-size: 11px; font-weight: 400; color: var(--ink-3); margin-left: 4px; }
table.t th.resp, table.t td.resp { background: var(--accent-soft); }
table.t th.resp { color: var(--accent-strong); border-bottom-color: var(--accent-line); }
table.t td.resp { border-bottom-color: var(--accent-line); }
table.t td .lbl { font-weight: 500; margin-right: 6px; }
.bandbtn { border: 0; background: none; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; display: flex; align-items: center; gap: 8px; width: 100%; text-align: left; }
.bandbtn .chev { display: inline-flex; color: var(--ink-3); transition: transform .15s; }
.bandbtn .chev.open { transform: rotate(90deg); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
table.t td.w-val { min-width: 220px; max-width: 420px; }
table.t tr.dim td { color: var(--ink-3); }
table.t td.num, table.t th.num { text-align: right; }
.delta-up { color: var(--bad); } .delta-down { color: var(--good); }
.prio { font-size: 11.5px; color: var(--ink-3); }
.prio.should, .prio.optional { color: var(--accent-strong); font-weight: 600; }

/* ---------- Blattkopf ---------- */
.sheet-head { padding: 18px 20px 14px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 20px; border-bottom: 1px solid var(--line); }
.sheet-head .ids { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12px; color: var(--ink-3); align-items: center; }
.sheet-head h1 { margin-top: 4px; }
.sheet-head .sub { color: var(--ink-2); font-size: 15px; margin-top: 2px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px 18px; padding: 14px 20px; border-bottom: 1px solid var(--line); }
.fact .k { font-size: 11.5px; color: var(--ink-3); }
.fact .v { font-weight: 500; overflow-wrap: anywhere; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; padding: 12px 20px; align-items: center; border-bottom: 1px solid var(--line); background: var(--sunk); }
.actions .sp { flex: 1 1 auto; }
.tabs { display: flex; gap: 2px; padding: 0 12px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 12px; cursor: pointer; color: var(--ink-2); font-weight: 500; white-space: nowrap; }
.tabs button[aria-selected="true"] { color: var(--accent); box-shadow: inset 0 -2px 0 var(--accent); }
@media (max-width: 640px) { .sheet-head { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Befunde ---------- */
.findings { display: flex; flex-direction: column; gap: 6px; }
.finding { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 8px; font-size: 13px; align-items: start; }
.finding svg { margin-top: 2px; }
.finding.error { color: var(--bad); } .finding.warn { color: var(--warn); } .finding.info { color: var(--ink-2); } .finding.ok { color: var(--good); }
.sev { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.sev.high { color: var(--bad); } .sev.medium { color: var(--warn); } .sev.low, .sev.info { color: var(--ink-2); }

/* ---------- Angebote ---------- */
.offers { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 14px; }
.offer { border: 1px solid var(--line); border-radius: 8px; background: var(--sheet); display: flex; flex-direction: column; min-width: 0; }
.offer.sel { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.offer-h { padding: 12px 14px 10px; border-bottom: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 6px; }
.offer-h .who { font-family: var(--f-display); font-weight: 600; font-size: 17px; overflow-wrap: anywhere; }
.offer-b { padding: 12px 14px; display: flex; flex-direction: column; gap: 10px; flex: 1 1 auto; }
.offer-f { padding: 10px 14px; border-top: 1px solid var(--line-2); display: flex; flex-wrap: wrap; gap: 8px; }
.big { font-size: 24px; font-weight: 600; line-height: 1.1; }
.kv { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 3px 12px; font-size: 13px; }
.kv dt { color: var(--ink-3); } .kv dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.best { display: inline-flex; gap: 4px; align-items: center; font-size: 11.5px; font-weight: 600; color: var(--good); }

/* ---------- Verlauf ---------- */
.timeline { display: flex; flex-direction: column; padding: 16px 20px; }
.tl { display: grid; grid-template-columns: 16px minmax(0, 1fr); gap: 12px; padding-bottom: 14px; position: relative; }
.tl::before { content: ""; position: absolute; left: 7px; top: 14px; bottom: 0; width: 2px; background: var(--line); }
.tl:last-child::before { display: none; }
.tl .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); margin: 4px 3px 0; box-shadow: 0 0 0 3px var(--sheet); position: relative; }
.tl .when { font-size: 12px; color: var(--ink-3); }

/* ---------- Dialog, Meldung ---------- */
.overlay { position: fixed; inset: 0; background: rgba(10, 16, 22, .55); z-index: 60; display: flex; align-items: flex-start; justify-content: center; padding: max(24px, env(safe-area-inset-top, 0px)) 16px 24px; overflow-y: auto; }
.modal { background: var(--sheet); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); width: min(100%, 760px); display: flex; flex-direction: column; }
.modal.narrow { width: min(100%, 480px); }
.modal.wide { width: min(100%, 1040px); }
.modal-h { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 12px; }
.modal-h h3 { flex: 1 1 auto; }
.modal-b { padding: 16px 18px; display: flex; flex-direction: column; gap: 14px; }
.modal-f { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }
.toasts { position: fixed; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); left: 50%; transform: translateX(-50%); z-index: 80; display: flex; flex-direction: column; gap: 8px; width: min(92vw, 520px); }
.toast { background: var(--ink); color: var(--sheet); padding: 10px 14px; border-radius: 8px; box-shadow: var(--shadow); font-size: 13.5px; display: flex; gap: 10px; align-items: flex-start; }
.toast.bad { background: var(--bad-mark); color: #fff; }
.drop { border: 2px dashed var(--line); border-radius: 8px; padding: 22px 16px; text-align: center; color: var(--ink-2); background: var(--sunk); display: flex; flex-direction: column; gap: 8px; align-items: center; }
.drop.over { border-color: var(--accent); background: var(--accent-soft); }
pre.pre { margin: 0; background: var(--sunk); border: 1px solid var(--line); border-radius: var(--r); padding: 10px 12px; overflow: auto; font-family: var(--f-mono); font-size: 12px; line-height: 1.5; max-height: 360px; white-space: pre; }
.aitext { border-left: 3px solid var(--accent-line); padding: 4px 0 4px 12px; white-space: pre-wrap; color: var(--ink); }
.aitag { font-family: var(--f-mono); font-size: 11px; color: var(--ink-3); letter-spacing: .04em; }
.spinner { width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 2.4s; } }

/* ---------- Antwort bearbeiten ---------- */
.rgrid { display: flex; flex-direction: column; }
.rrow { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1.6fr); border-top: 1px solid var(--line-2); }
.rrow > .rq { padding: 10px 14px; min-width: 0; }
.rrow > .rs { padding: 10px 14px; background: var(--accent-soft); min-width: 0; display: grid; grid-template-columns: 150px minmax(0, 1fr) 130px; gap: 8px; align-items: start; }
.rrow .rs .more { grid-column: 1 / -1; display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 8px; }
.rrow .rs .input { background: var(--sheet); }
.rband { padding: 9px 14px; background: var(--sunk); font-family: var(--f-display); font-weight: 600; border-top: 1px solid var(--line); }
@media (max-width: 860px) { .rrow { grid-template-columns: minmax(0, 1fr); } .rrow > .rs { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .rrow .rs .more { grid-template-columns: minmax(0, 1fr); } }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: 0; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; background: var(--sheet); }
.step { padding: 14px 16px; border-right: 1px solid var(--line-2); display: flex; flex-direction: column; gap: 4px; }
.step:last-child { border-right: 0; }
.step .n { font-family: var(--f-mono); font-size: 12px; color: var(--accent); }
.step h4 { font-size: 16px; }
.step p { font-size: 13px; color: var(--ink-2); }
@media (max-width: 700px) { .step { border-right: 0; border-bottom: 1px solid var(--line-2); } .step:last-child { border-bottom: 0; } }
.flow { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.flow .node { border: 1px solid var(--line); border-radius: var(--r); padding: 7px 11px; background: var(--sheet); font-weight: 500; }
.flow .node small { display: block; font-family: var(--f-mono); font-size: 11px; color: var(--ink-3); font-weight: 400; }
.flow .arr { color: var(--ink-3); }
details.acc { border-top: 1px solid var(--line); }
details.acc:first-of-type { border-top: 0; }
details.acc > summary { list-style: none; cursor: pointer; padding: 13px 20px; display: flex; gap: 10px; align-items: center; font-family: var(--f-display); font-size: 18px; font-weight: 600; }
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary .chev { transition: transform .15s; color: var(--ink-3); }
details.acc[open] > summary .chev { transform: rotate(90deg); }
details.acc > summary .cnt { font-family: var(--f-mono); font-size: 11.5px; font-weight: 400; color: var(--ink-3); margin-left: auto; }
details.acc > .acc-b { padding: 4px 20px 20px; }
.evi { font-family: var(--f-mono); font-size: 11.5px; color: var(--ink-2); background: var(--band); padding: 1px 5px; border-radius: 3px; overflow-wrap: anywhere; }
.rules { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 5px; font-size: 13.5px; color: var(--ink-2); max-width: 92ch; }
.rules li::marker { color: var(--ink-3); }

/* Zusätzliche Stile der Testversion T1 (CR-001). Ergänzt src/styles.css, ohne es zu ändern (ADR-004). */
.testbanner { background: #b45309; color: #fff; text-align: center; font-weight: 600; padding: 6px 12px; font-size: 13.5px; letter-spacing: .02em; }
.testbanner-app { display: none; }
.auth-page { max-width: 640px; margin: 0 auto; padding: 24px 16px; display: flex; flex-direction: column; gap: 12px; }
.sheet-pad { padding: 20px; }
.row-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 14px; }
.check { display: flex; gap: 8px; align-items: flex-start; margin-top: 10px; font-size: 14px; }
.terms-text { white-space: pre-wrap; max-height: 220px; overflow: auto; background: var(--paper-2, #f4f4f2); padding: 10px 12px; border-radius: 6px; font-size: 13px; }
.terms summary { cursor: pointer; margin-top: 10px; }
.infolist { margin: 6px 0 12px; padding-left: 20px; }
.outbox { list-style: none; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 10px; }
.msg { border: 1px solid var(--line, #ddd); border-radius: 8px; padding: 10px 12px; }
.msg-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.msg-body { white-space: pre-wrap; margin: 6px 0; font-size: 13.5px; }
.timeline { font-size: 13px; padding-left: 18px; }
.evidence { margin-top: 18px; }
.mono { font-family: "IBM Plex Mono", ui-monospace, Consolas, monospace; font-size: 12.5px; word-break: break-all; }
.linkbtn { background: none; border: 0; color: var(--accent, #0b6); cursor: pointer; padding: 0; text-decoration: underline; font: inherit; }
.who { font-size: 13px; }
.input.sm { width: 220px; display: inline-block; margin-right: 6px; }
.appfoot { text-align: center; font-size: 12px; color: var(--muted, #777); padding: 18px 12px 28px; }
tr.sel td { background: var(--paper-2, #f4f4f2); }
@media (max-width: 600px) { .input.sm { width: 100%; margin: 4px 0; } .topbar-right { flex-wrap: wrap; } }
@media (prefers-color-scheme: dark) { .testbanner { background: #92400e; } .terms-text { background: rgba(255,255,255,.06); } }
