/* PMT – Projektmanagement-Tool
   Erscheinungsbild angelehnt an die Vorlage «Dr. Matthias Meyer»:
   Rot #871a5d für Absender und Titel, Blau #b9c7e4 als Arbeitsfarbe in mehreren Deckungsstufen,
   Ocker nur für Meilensteine (Raute), Orangerot nur für Warnungen. */
:root {
  --rot: #871a5d;
  --blau: #b9c7e4;
  --ink: #1f2433;
  --ink-2: #434a5e;
  --muted: #646b80;
  --paper: #ffffff;
  --canvas: #f7f9fc;
  --line: #d8dfec;
  --soft: #eef2f9;
  --accent: #34508a;       /* Blau, volle Deckung: Schaltflächen, Links, Balken */
  --accent-mid: #6f88bf;   /* Blau, mittlere Deckung */
  --accent-ink: #ffffff;
  --accent-soft: #d5ddef;  /* Blau, geringe Deckung: Markierungen, Hover */
  --ochre: #c8891d;
  --alarm: #b8432a;
  --alarm-soft: #f7e2dc;
  --warn-soft: #f7ecd5;
  --ok-soft: #e3e9f5;
  --radius: 6px;
  --font: "Segoe UI", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --font-display: "Gill Sans", "Gill Sans MT", "Gill Sans Nova", Seravek, Calibri, "Trebuchet MS", sans-serif;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --rot: #dc8fc0; --blau: #6b7fae;
    --ink: #e5e9f2; --ink-2: #c3cad9; --muted: #96a0b7; --paper: #1b1f2a; --canvas: #13161e;
    --line: #323a4d; --soft: #232a3a; --accent: #a3b6e3; --accent-mid: #7d93c7; --accent-ink: #121726; --accent-soft: #2b3652;
    --ochre: #e0a43c; --alarm: #e5826a; --alarm-soft: #3d2420; --warn-soft: #3a3020; --ok-soft: #222c42;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 var(--font); color: var(--ink); background: var(--canvas); }
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--rot); outline-offset: 2px; }
h1 { font-family: var(--font-display); font-size: 1.85rem; line-height: 1.15; margin: 0; font-weight: 400; color: var(--rot); }
h2, .h3 { font-family: var(--font-display); font-size: 1.2rem; margin: 0 0 .6rem; font-weight: 500; color: var(--ink); }
h3 { font-size: 1rem; margin: 0 0 .5rem; }
h4 { font-size: .9rem; margin: .8rem 0 .2rem; color: var(--ink-2); }
p { margin: 0 0 .8rem; }
code { font-size: .85em; background: var(--soft); padding: 1px 4px; border-radius: 3px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Rahmen: Kopfzeile mit Absender, darunter das blaue Band der Vorlage */
.masthead { position: sticky; top: 0; z-index: 20; }
.topbar { display: flex; align-items: center; gap: 1rem; height: 60px; padding: 0 1.5rem 0 1.25rem; background: var(--paper); }
.wave { height: 40px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 40' preserveAspectRatio='none'%3E%3Cdefs%3E%3ClinearGradient id='g' x1='0' y1='0' x2='0' y2='1'%3E%3Cstop offset='0' stop-color='%23c4d0e9'/%3E%3Cstop offset='.65' stop-color='%23b9c7e4'/%3E%3Cstop offset='1' stop-color='%2397abd6'/%3E%3C/linearGradient%3E%3C/defs%3E%3Cpath d='M0 0H1440V27C1180 23 910 20 690 25C470 30 230 38 0 34Z' fill='url(%23g)'/%3E%3Cpath d='M0 34C230 38 470 30 690 25C910 20 1180 23 1440 27' fill='none' stroke='%237d95c9' stroke-width='2.5' stroke-opacity='.5'/%3E%3C/svg%3E") no-repeat center / 100% 100%; margin-bottom: -8px; pointer-events: none; }
.brand { display: flex; align-items: center; gap: .7rem; color: var(--rot); text-decoration: none; min-width: 0; }
.brand-name { font-family: var(--font-display); font-size: 1.5rem; line-height: 1; letter-spacing: .005em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mark { display: none; flex-shrink: 0; }
.mark img, img.mark { display: block; width: 32px; height: 32px; }
.logo { display: block; flex-shrink: 0; margin-left: 1.5rem; }
.logo img, img.logo { display: block; height: 34px; width: auto; }
.push { margin-left: auto; }
.who { margin-left: auto; display: flex; align-items: center; gap: 1rem; font-size: .9rem; }
.who form { margin: 0; }
.menu-toggle { display: none; }
.shell { display: grid; grid-template-columns: 256px minmax(0, 1fr); min-height: calc(100vh - 92px); }
.sidenav { padding: 1.4rem .75rem 2rem 1rem; border-right: 1px solid var(--line); }
.sidenav ul { list-style: none; margin: 0 0 1.3rem; padding: 0; }
.sidenav a { display: block; padding: .36rem .65rem; border-radius: var(--radius); color: var(--ink); text-decoration: none; font-size: .93rem; }
.sidenav a:hover { background: var(--soft); }
.sidenav a[aria-current="page"] { background: var(--accent-soft); font-weight: 600; box-shadow: inset 3px 0 0 var(--accent); }
.navgroup { font-family: var(--font-display); font-size: .98rem; color: var(--rot); margin: 0 .65rem .3rem; }
.main { padding: 1.6rem 2.2rem 4rem; max-width: 1280px; width: 100%; min-width: 0; }
.main.solo { max-width: 760px; margin: 0 auto; padding-top: 3rem; }

/* ---------- Seitenkopf */
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.page-head .sub { margin: .35rem 0 0; color: var(--muted); display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; }
.sub .sep { width: 4px; height: 4px; border-radius: 50%; background: var(--line); }
.page-actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.page-actions.left { justify-content: flex-start; margin-bottom: 1rem; }
.crumbs { margin: 0 0 .3rem; font-size: .9rem; }
.crumbs a::before { content: "‹ "; }

/* ---------- Bedienelemente */
.btn { display: inline-flex; align-items: center; gap: .4rem; padding: .48rem .95rem; border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink);
  border-radius: var(--radius); font: inherit; font-size: .92rem; font-weight: 550; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--accent); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--accent); }
.btn.small { padding: .25rem .65rem; font-size: .85rem; }
.btn.danger { background: transparent; color: var(--alarm); border-color: var(--alarm); }
button.link { background: none; border: 0; padding: 0; font: inherit; color: var(--accent); cursor: pointer; text-decoration: underline; text-underline-offset: 2px; }

input, select, textarea { font: inherit; color: var(--ink); background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: .45rem .6rem; width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); outline: 2px solid var(--accent-soft); outline-offset: 0; }
input[type="checkbox"] { width: 1.05rem; height: 1.05rem; accent-color: var(--accent); margin: 0; }
input[type="color"] { padding: 2px; height: 2.3rem; width: 4rem; }
textarea { resize: vertical; min-height: 6rem; line-height: 1.45; }
textarea.code { font-family: ui-monospace, Consolas, monospace; font-size: .8rem; margin-bottom: 1rem; }

.field { display: flex; flex-direction: column; gap: .3rem; min-width: 0; }
.field > label, .field .label { font-size: .85rem; color: var(--ink-2); font-weight: 550; }
.field.check { flex-direction: row; align-items: center; gap: .5rem; }
.field.check label { font-weight: 400; color: var(--ink); font-size: .92rem; }
.field.wide, .field.span2 { grid-column: 1 / -1; }
.field .static { padding: .45rem 0; font-weight: 550; }
.req { color: var(--alarm); }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1.25rem; }
.card.narrow { max-width: 460px; }
.form .grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .9rem 1.2rem; align-items: start; }
.form fieldset { border: 0; border-top: 1px solid var(--line); margin: 1.4rem 0 0; padding: 1rem 0 0; }
.form legend { font-weight: 650; padding: 0 .5rem 0 0; }
.form .grid .field.check { align-self: end; min-height: 2.4rem; }
.form-actions { display: flex; gap: .6rem; flex-wrap: wrap; margin-top: 1.4rem; }
.stack { display: grid; gap: .9rem; }
.danger-zone { margin-top: 1rem; }

.filters { display: flex; gap: .8rem 1rem; align-items: flex-end; flex-wrap: wrap; margin-bottom: 1.2rem; }
.filters .field { width: auto; min-width: 170px; }
.filters .field.check { min-width: 0; padding-bottom: .5rem; }
.filters fieldset.inline { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; flex-basis: 100%; }
.filters fieldset.inline legend { font-size: .85rem; color: var(--ink-2); font-weight: 550; margin-bottom: .3rem; padding: 0; }
.yearswitch { display: inline-flex; gap: .3rem; align-items: center; margin: 0; }
.yearswitch input { width: 5.2rem; text-align: center; padding: .3rem; }

.flash { padding: .7rem 1rem; border-radius: var(--radius); margin-bottom: 1rem; border-left: 4px solid var(--accent); background: var(--ok-soft); }
.flash.err { border-color: var(--alarm); background: var(--alarm-soft); }
.flash.warn { border-color: var(--ochre); background: var(--warn-soft); }
ul.errors { font-size: .9rem; color: var(--ink-2); }
.hint { color: var(--muted); font-size: .88rem; margin-top: .7rem; }
.hint.warn { color: var(--alarm); }
.empty { color: var(--muted); font-style: italic; padding: .6rem 0; margin: 0; }
.meta { display: block; color: var(--muted); font-size: .84rem; }

/* ---------- Tabellen */
.table-wrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
.data th, .data td { padding: .5rem .7rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
.data thead th { font-size: .8rem; font-weight: 600; color: var(--ink-2); background: var(--soft); white-space: nowrap; }
.data tbody tr:hover { background: color-mix(in srgb, var(--accent-soft) 45%, transparent); }
.data tfoot td { font-weight: 650; border-top: 2px solid var(--ink-2); border-bottom: 0; }
.data .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.data .strong, tr.strong th, tr.strong td { font-weight: 650; }
.data .neg, .neg { color: var(--alarm); }
.data.compact th { font-weight: 450; color: var(--ink); background: none; font-size: .92rem; white-space: normal; }
.data td.actions { width: 1%; white-space: nowrap; text-align: right; }
.data .icon { font-size: .84rem; color: var(--muted); }
.data .icon:hover { color: var(--accent); }
.data.matrix th a { color: var(--ink-2); }
.tick { color: var(--accent); font-weight: 700; }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 2px; vertical-align: -2px; }

/* ---------- Abschnitte */
.block { margin-bottom: 1.6rem; }
.block-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-bottom: .6rem; }
.block-head h2, .block-head h3 { margin: 0; }
.two-col { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 2rem; }
.columns { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 0 2rem; }
.prose p { max-width: 75ch; }
.vision p { font-size: 1.05rem; }
ul.plain { list-style: none; padding: 0; margin: 0; }
ul.plain li { padding: .3rem 0; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; }
.count { color: var(--muted); font-variant-numeric: tabular-nums; }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: .35rem 1.2rem; margin: 0; }
dl.kv dt { color: var(--muted); font-size: .88rem; }
dl.kv dd { margin: 0; }
.tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .8rem; }
.tag { font-size: .8rem; padding: .1rem .55rem; border: 1px solid var(--line); border-radius: 99px; background: var(--paper); }
.badge { display: inline-block; min-width: 1.8rem; text-align: center; font-size: .8rem; font-weight: 650; padding: .05rem .4rem; border-radius: 4px; background: var(--alarm); color: #fff; margin-right: .4rem; }
.badge.low { background: var(--soft); color: var(--ink); }
.status { font-size: .82rem; padding: .08rem .55rem; border-radius: 4px; background: var(--soft); color: var(--ink); font-weight: 600; }
.status.s-luft { background: var(--accent); color: var(--accent-ink); }
.status.s-abgelehnt { background: var(--alarm-soft); }
.risk-high { border-left: 3px solid var(--alarm); padding-left: 1rem; }

.tabs { display: flex; gap: .25rem; border-bottom: 1px solid var(--line); margin-bottom: 1.4rem; overflow-x: auto; }
.tabs a { padding: .55rem .9rem; text-decoration: none; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a:hover { color: var(--ink); }
.tabs a[aria-current="page"] { color: var(--ink); border-color: var(--accent); font-weight: 600; }

/* Kennzahlen */
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 1.8rem; }
.figures > * { background: var(--paper); padding: 1rem 1.1rem; text-decoration: none; color: inherit; display: flex; flex-direction: column; }
.figures a:hover { background: var(--soft); }
.fig { font-size: 1.45rem; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.fig.over { color: var(--alarm); }
.cap { color: var(--muted); font-size: .84rem; }

ul.rows { list-style: none; margin: 0; padding: 0; }
ul.rows li { padding: .55rem 0; border-bottom: 1px solid var(--line); position: relative; }
ul.rows li .dot { position: absolute; left: -16px; top: 1rem; }
.dot { display: inline-block; width: 9px; height: 9px; background: var(--bar, var(--ochre)); transform: rotate(45deg); }
.meter { display: block; height: 4px; background: var(--soft); border-radius: 2px; margin-top: .35rem; overflow: hidden; }
.meter span { display: block; height: 100%; background: var(--accent-mid); }
.meter.over span { background: var(--alarm); }

/* ---------- Zeitplan: das Herzstück */
.timeline { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; font-size: .88rem; }
.tl-row { display: grid; grid-template-columns: minmax(200px, 26%) minmax(520px, 1fr); border-bottom: 1px solid var(--line); min-height: 34px; }
.tl-row:last-child { border-bottom: 0; }
.tl-label { padding: .4rem .8rem; border-right: 1px solid var(--line); min-width: 0; }
.tl-label a { color: var(--ink); text-decoration: none; }
.tl-label a:hover { text-decoration: underline; }
.tl-label .meta { font-size: .76rem; }
.tl-track { position: relative; }
.gl { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px solid var(--soft); pointer-events: none; }
.gl.y { border-left-color: var(--line); }
.tl-head { position: sticky; top: 0; background: var(--paper); min-height: 30px; z-index: 2; }
.tl-head .tl-label { font-size: .78rem; color: var(--muted); }
.tick-m { position: absolute; top: .45rem; font-size: .74rem; color: var(--muted); padding-left: 4px; border-left: 1px solid var(--line); white-space: nowrap; }
.tick-m.year { color: var(--ink); font-weight: 600; }
.tl-group { background: var(--soft); }
.tl-group .tl-label a { font-weight: 650; }
.tl-group .span { position: absolute; top: 50%; height: 2px; margin-top: -1px; background: var(--ink-2); opacity: .45; }
.bar { position: absolute; z-index: 1; top: 9px; bottom: 9px; background: var(--bar, var(--ochre)); border-radius: 3px; min-width: 6px; }
.bar:hover { filter: brightness(1.1); box-shadow: 0 0 0 2px var(--paper), 0 0 0 3px var(--bar, var(--ochre)); }
.bar.point { width: 12px !important; height: 12px; top: 11px; bottom: auto; border-radius: 1px; transform: translateX(-6px) rotate(45deg); }
.today { position: absolute; top: 0; bottom: 0; width: 0; border-left: 2px solid var(--alarm); opacity: .7; z-index: 2; pointer-events: none; }

/* ---------- Ressourcen */
.load { position: relative; display: flex; height: 14px; background: var(--soft); border-radius: 3px; overflow: hidden; min-width: 160px; }
.load .seg { height: 100%; }
.seg.adm { background: color-mix(in srgb, var(--ink-2) 45%, var(--paper)); }
.seg.dl { background: var(--accent-mid); }
.seg.prj { background: var(--accent); }
.load.over .seg.prj { background: var(--alarm); }
.load .mark60, .load .mark80 { position: absolute; top: 0; bottom: 0; width: 0; border-left: 1px dashed var(--ink); opacity: .6; }
.load .mark60 { left: 60%; } .load .mark80 { left: 80%; }
.res .loadcol { min-width: 230px; }
.loadwrap { display: flex; align-items: center; gap: .6rem; padding-top: 3px; }
.loadwrap .load { flex: 1; }
.res .pct { font-size: .82rem; font-variant-numeric: tabular-nums; min-width: 3rem; text-align: right; }
.legend { display: flex; flex-wrap: wrap; gap: .4rem 1rem; align-items: center; font-size: .85rem; color: var(--muted); }
.legend .seg { display: inline-block; width: 14px; height: 10px; border-radius: 2px; margin-right: -.6rem; }
.legend .mk { display: inline-block; width: 0; height: 12px; border-left: 1px dashed var(--ink); margin-right: -.6rem; }

/* ---------- Risikomatrix */
.riskmatrix { display: grid; grid-template-columns: 1.6rem 1fr; grid-template-rows: auto auto; gap: .4rem; max-width: 760px; }
.riskmatrix .axis-y { writing-mode: vertical-rl; transform: rotate(180deg); font-size: .78rem; color: var(--muted); text-align: center; }
.riskmatrix .axis-x { grid-column: 2; font-size: .78rem; color: var(--muted); text-align: center; }
.riskmatrix .cells { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; }
.riskmatrix .cell { min-height: 58px; padding: 4px; border-radius: 3px; display: flex; flex-direction: column; gap: 2px; font-size: .74rem; }
.cell.l1 { background: var(--ok-soft); } .cell.l2 { background: var(--warn-soft); } .cell.l3 { background: var(--alarm-soft); }
.cell a { color: var(--ink); text-decoration: none; background: var(--paper); border-radius: 2px; padding: 1px 4px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Strategiebaum */
ol.tree, ol.tree ol, ol.tree ul { list-style: none; margin: 0; padding: 0; }
ol.tree > li { border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); padding: .8rem 1rem; margin-bottom: .8rem; }
ol.tree ol { margin-top: .5rem; padding-left: 1.2rem; border-left: 2px solid var(--blau); }
ol.tree ol > li { margin-top: .5rem; }
ol.tree ul { padding-left: 1.2rem; margin-top: .3rem; }
ol.tree ul li { margin-top: .35rem; font-size: .92rem; }
.node { display: flex; flex-wrap: wrap; align-items: baseline; gap: .3rem .8rem; }
.node .meta { flex-basis: 100%; }
.node .icon { font-size: .82rem; color: var(--muted); }

/* Strategiebezug */
ul.links { list-style: none; margin: 0; padding: 0; }
ul.links li { padding: .6rem 0 .6rem .9rem; border-bottom: 1px solid var(--line); border-left: 3px solid var(--blau); margin-bottom: .4rem; display: flex; flex-direction: column; gap: .15rem; }
ul.links .path { font-size: .82rem; color: var(--muted); }
ul.links .path a { color: var(--muted); }
ul.links .icon { font-size: .82rem; color: var(--muted); align-self: flex-start; }
.projlinks { display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; margin: .4rem 0 0; }
.projlinks .meta { display: inline; }
.projlinks .tag { text-decoration: none; color: var(--ink); background: var(--soft); border-color: var(--blau); }
.projlinks .tag:hover { border-color: var(--accent); }
ol.tree ul li:target { background: var(--soft); border-radius: var(--radius); outline: 2px solid var(--blau); outline-offset: 4px; }

/* ---------- Login & Installation */
.login { max-width: 400px; margin: 2.5rem auto; }
.login .card { padding: 1.5rem; }
.login h1, .install h1 { margin-bottom: .4rem; }
.login .sub, .install > .sub { color: var(--muted); margin-bottom: 1.6rem; }

/* ---------- Druckdokument */
.printdoc { background: var(--canvas); }
.printbar { display: flex; justify-content: space-between; align-items: center; max-width: 820px; margin: 1rem auto; padding: 0 1rem; }
.sheet { background: #fff; color: #1f2433; max-width: 820px; margin: 0 auto 3rem; padding: 2.5rem 3rem; border: 1px solid var(--line); font-size: 14px; }
.sheet h1 { font-size: 1.5rem; }
.sheet h2 { font-size: 1.05rem; margin-top: 1.6rem; padding-bottom: .2rem; border-bottom: 1px solid #d8dfec; }
.sheet h3 { font-size: .95rem; margin-top: .8rem; }
.sheet-head { border-bottom: 5px solid #b9c7e4; padding-bottom: .8rem; margin-bottom: 1.2rem; }
.sheet-logo { float: right; height: 30px; width: auto; margin: 0 0 .5rem 1rem; }
.sheet-head::after { content: ""; display: block; clear: both; }
.sheet-head .doc { color: #871a5d; font-family: var(--font-display); font-size: 1.05rem; margin-bottom: .2rem; }
.sheet h1 { color: #871a5d; }
.sheet .data th, .sheet .data td { padding: .35rem .5rem; color: #1f2433; }
.sheet .data thead th { background: #eef2f9; }
.kvtable { border-collapse: collapse; margin-bottom: 1rem; }
.kvtable th { text-align: left; font-weight: 450; color: #646b80; padding: .2rem 1.5rem .2rem 0; vertical-align: top; }
.kvtable td { padding: .2rem 0; }
.signatures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; margin-top: 3.5rem; }
.signatures div { border-top: 1px solid #1f2433; padding-top: .3rem; font-size: .8rem; color: #646b80; }

/* ---------- Mobil */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .menu-toggle { display: inline-block; background: none; border: 1px solid var(--line); border-radius: var(--radius); padding: .3rem .7rem; font: inherit; color: var(--ink); }
  .sidenav { display: none; border-right: 0; border-bottom: 1px solid var(--line); background: var(--paper); }
  .sidenav.open { display: block; }
  .main { padding: 1.2rem 1rem 3rem; }
  .two-col { grid-template-columns: 1fr; }
  .who a { display: none; }
  .brand-name { font-size: 1.15rem; }
  .mark { display: block; }
  .mark img { width: 28px; height: 28px; }
  .logo { display: none; }
  .wave { height: 20px; }
  .topbar { gap: .6rem; padding: 0 .8rem; }
  h1 { font-size: 1.35rem; }
  .sheet { padding: 1.5rem; }
}

@media (prefers-color-scheme: dark) { .wave { opacity: .45; } }

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

/* ---------- Druck */
@media print {
  :root { --ink: #000; --paper: #fff; --canvas: #fff; --line: #bbb; --soft: #eee; color-scheme: light; }
  body { background: #fff; font-size: 11pt; }
  .masthead, .sidenav, .page-actions, .filters, .noprint, .actions, .btn, .tabs, .danger-zone, .yearswitch { display: none !important; }
  .shell { display: block; }
  h1 { color: #871a5d; }
  .main { padding: 0; max-width: none; }
  .sheet { border: 0; padding: 0; max-width: none; margin: 0; }
  .table-wrap, .timeline { border: 0; overflow: visible; }
  .tl-row { grid-template-columns: 30% 70%; break-inside: avoid; }
  tr, .block { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
  .bar, .seg, .badge, .status, .cell { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
