/* SETh-Portal – Farben wie linktree.interseth.de, Hell- und Dunkelmodus */
:root {
  --bordeaux: #6e1d2a;
  --bordeaux-dark: #551621;
  --header-bg: var(--bordeaux);
  --header-fg: #ffffff;
  --bg: #f6f2f2;
  --surface: #ffffff;
  --surface-2: #faf6f6;
  --border: #e5dadb;
  --text: #1d1d1b;
  --muted: #6c6163;
  --accent: #6e1d2a;
  --accent-hover: #551621;
  --accent-fg: #ffffff;
  --link: #6e1d2a;
  --focus: #6e1d2a;
  --warn-bg: #fff4dd;
  --warn-fg: #7a4a00;
  --ok-bg: #e9f5ec;
  --ok-fg: #1f5f33;
  --err-bg: #fdeceb;
  --err-fg: #8c1d18;
  --chip: #f1e6e8;
  --shadow: 0 1px 2px rgba(29, 29, 27, .06), 0 4px 16px rgba(29, 29, 27, .05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --header-bg: #3e1018;
    --bg: #141011;
    --surface: #1e1718;
    --surface-2: #251c1d;
    --border: #3b2f31;
    --text: #f3eeee;
    --muted: #b8adaf;
    --accent: #9c3446;
    --accent-hover: #b24257;
    --link: #e7a3ae;
    --focus: #e7a3ae;
    --warn-bg: #3a2a0c;
    --warn-fg: #f5cf86;
    --ok-bg: #12301c;
    --ok-fg: #9fd9b1;
    --err-bg: #3c1514;
    --err-fg: #f4aaa5;
    --chip: #33272a;
    --shadow: 0 1px 2px rgba(0, 0, 0, .4);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --header-bg: #3e1018;
  --bg: #141011;
  --surface: #1e1718;
  --surface-2: #251c1d;
  --border: #3b2f31;
  --text: #f3eeee;
  --muted: #b8adaf;
  --accent: #9c3446;
  --accent-hover: #b24257;
  --link: #e7a3ae;
  --focus: #e7a3ae;
  --warn-bg: #3a2a0c;
  --warn-fg: #f5cf86;
  --ok-bg: #12301c;
  --ok-fg: #9fd9b1;
  --err-bg: #3c1514;
  --err-fg: #f4aaa5;
  --chip: #33272a;
  --shadow: 0 1px 2px rgba(0, 0, 0, .4);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  line-height: 1.45; font-size: 15px;
}
a { color: var(--link); }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
:root { accent-color: var(--accent); }
::selection { background: color-mix(in srgb, var(--accent) 22%, transparent); }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--surface); color: var(--link);
  padding: 8px 14px; border-radius: 0 0 10px 10px; font-weight: 700; box-shadow: var(--shadow); }
.skip:focus { top: 0; }
main.page:focus { outline: none; }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .5rem; }
h1 { font-size: 1.6rem; font-weight: 800; letter-spacing: .01em; }
h2 { font-size: 1.15rem; font-weight: 750; margin-top: 1.6rem; }
h3 { font-size: 1rem; font-weight: 700; }
p { margin: 0 0 .8rem; }
.muted { color: var(--muted); }
.small { font-size: .86rem; }
.eyebrow { font-size: .75rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* Kopfzeile */
.topbar { background: var(--header-bg); color: var(--header-fg); }
/* Fokus auf Bordeaux: hell statt in der Kopffarbe */
.topbar :focus-visible { outline-color: #fff; }
.topbar-inner { max-width: 1200px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 800; letter-spacing: .02em; }
.brand img { width: 38px; height: 38px; border-radius: 50%; background: #fff; }
.nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.nav a { color: inherit; text-decoration: none; padding: 6px 10px; border-radius: 8px; font-weight: 600; opacity: .9; }
.nav a:hover, .nav a.active { background: rgba(255, 255, 255, .14); opacity: 1; }
.userbox { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.userbox form { margin: 0; }
.iconbtn { background: transparent; border: 1px solid rgba(255, 255, 255, .35); color: inherit; border-radius: 8px;
  padding: 5px 9px; cursor: pointer; font: inherit; font-size: .85rem; display: inline-flex; align-items: center; gap: 6px; }
.iconbtn:hover { background: rgba(255, 255, 255, .14); }
.iconbtn svg { width: 16px; height: 16px; }

main.page { max-width: 1200px; margin: 0 auto; padding: 24px 16px 64px; }
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 6px; }
.crumbs a { color: var(--muted); }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }

/* Karten und Raster */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px; box-shadow: var(--shadow); }
.card + .card { margin-top: 16px; }
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.tile { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px; box-shadow: var(--shadow);
  transition: transform .12s ease, border-color .12s ease; }
.tile:hover { transform: translateY(-1px); border-color: var(--accent); }
.tile svg { width: 26px; height: 26px; flex: none; stroke: var(--link); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.tile strong { font-size: 1.05rem; }
.tile:has(.tile-text) { flex-direction: row; align-items: flex-start; gap: 14px; padding: 16px 18px; }
.tile-text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tile-text .chip { align-self: flex-start; margin-top: 4px; }
.stats { display: flex; gap: 10px; flex-wrap: wrap; margin: 8px 0 16px; }
.stat { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 14px; min-width: 120px; }
.stat b { display: block; font-size: 1.4rem; }

/* Knöpfe und Formulare */
.btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--accent); background: var(--accent);
  color: var(--accent-fg); border-radius: 10px; padding: 8px 14px; font: inherit; font-weight: 650; cursor: pointer;
  text-decoration: none; white-space: nowrap; }
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn.secondary { background: transparent; color: var(--link); border-color: var(--border); }
.btn.secondary:hover { border-color: var(--link); background: var(--surface-2); }
.btn.danger { background: transparent; color: var(--err-fg); border-color: var(--err-fg); }
.btn.danger:hover { background: var(--err-bg); }
.btn.small { padding: 4px 9px; font-size: .85rem; border-radius: 8px; }
.btn svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
label { font-weight: 600; font-size: .9rem; display: block; margin-bottom: 4px; }
input[type=text], input[type=search], input[type=email], input[type=url], input[type=date], input[type=datetime-local], input[type=number], input[type=password], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border);
  border-radius: 9px; padding: 7px 10px; }
textarea { min-height: 70px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--focus); outline: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
.form-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); align-items: start; }
.check { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.check input { width: 17px; height: 17px; accent-color: var(--accent); }
.hint { font-size: .84rem; color: var(--muted); margin-top: 4px; }
.hint.fehler { color: var(--err-fg); }
.save-status.dirty-hint { color: var(--warn-fg); font-weight: 650; }

/* Tabellen */
.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th { background: var(--surface-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); position: sticky; top: 0; }
tr:last-child td { border-bottom: 0; }
tr.excluded td { opacity: .5; }
tr.has-warning td:first-child { box-shadow: inset 3px 0 0 var(--warn-fg); }
td input[type=text], td input[type=email], td select { padding: 5px 7px; min-width: 110px; }
td.num { text-align: right; font-variant-numeric: tabular-nums; }
tr.subrow td { padding-top: 0; border-top: 0; }
tr:has(+ tr.subrow) td { border-bottom: 0; }
.warntext { color: var(--warn-fg); margin-left: 12px; display: inline-block; }
tr.has-warning + tr.subrow td:first-child { box-shadow: inset 3px 0 0 var(--warn-fg); }
tr.subrow.has-warning td:first-child { box-shadow: inset 3px 0 0 var(--warn-fg); }

/* Kennzeichen */
.chip { display: inline-block; white-space: nowrap; padding: 2px 8px; border-radius: 99px; background: var(--chip); font-size: .78rem; font-weight: 650; }
.chip.warn { background: var(--warn-bg); color: var(--warn-fg); }
.chip.ok { background: var(--ok-bg); color: var(--ok-fg); }
.chip.lock { background: var(--chip); color: var(--link); }
.warnlist { margin: 4px 0 0; padding-left: 16px; color: var(--warn-fg); font-size: .82rem; }

/* Meldungen */
.flash { border-radius: 10px; padding: 10px 14px; margin-bottom: 12px; border: 1px solid transparent; }
.flash.ok { background: var(--ok-bg); color: var(--ok-fg); }
.flash.error { background: var(--err-bg); color: var(--err-fg); }
.flash.warn { background: var(--warn-bg); color: var(--warn-fg); }

/* Tagesordnung */
.agenda-row { display: grid; grid-template-columns: 74px 1fr auto; gap: 10px; align-items: start;
  padding: 10px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface); margin-bottom: 8px; }
.agenda-row.sub { margin-left: 34px; background: var(--surface-2); }
.agenda-num { font-weight: 800; color: var(--link); padding-top: 7px; font-variant-numeric: tabular-nums; }
.agenda-fields { display: grid; gap: 6px; }
.agenda-fields textarea { min-height: 38px; height: 38px; }
.agenda-fields textarea:focus, .agenda-fields textarea:not(:placeholder-shown) { height: auto; min-height: 64px; }
.agenda-tools { display: flex; gap: 4px; flex-wrap: nowrap; }
.agenda-tools .btn.small { padding: 3px 8px; }
details.more summary { cursor: pointer; color: var(--muted); font-size: .86rem; }

/* Links */
.link-row { display: grid; grid-template-columns: 34px 1fr auto; gap: 12px; align-items: center; padding: 10px 12px;
  border-bottom: 1px solid var(--border); }
.link-row:last-child { border-bottom: 0; }
.link-row > svg { width: 22px; height: 22px; fill: none; stroke: var(--link); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.link-title { font-weight: 700; }
.link-meta { font-size: .84rem; color: var(--muted); word-break: break-all; }
.link-edit { grid-column: 1 / -1; margin-top: 8px; }
.icon-pick { display: flex; flex-wrap: wrap; gap: 6px; }
.icon-pick label { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--border); border-radius: 8px;
  padding: 4px 7px; font-weight: 500; cursor: pointer; margin: 0; }
.icon-pick svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.icon-pick input { accent-color: var(--accent); }

.empty { text-align: center; padding: 32px; color: var(--muted); }
footer.foot { max-width: 1200px; margin: 0 auto; padding: 16px; color: var(--muted); font-size: .84rem; }

@media (max-width: 720px) {
  .agenda-row { grid-template-columns: 1fr; }
  .agenda-row.sub { margin-left: 14px; }
  .agenda-tools { flex-direction: row; }
  .nav { order: 3; flex-basis: 100%; }
}
@media (prefers-reduced-motion: reduce) { .tile { transition: none; } .tile:hover { transform: none; } }

/* Dokumente: Protokoll, Berichte, WIBEL */
.save-status { font-size: .82rem; color: var(--muted); }
.save-status.ok { color: var(--ok-fg); }
.save-status.err { color: var(--err-fg); font-weight: 650; }
.conflict { margin-top: 10px; border: 1px solid var(--err-fg); background: var(--err-bg); color: var(--err-fg); border-radius: 10px; padding: 10px 12px; font-size: .9rem; }
.conflict pre { white-space: pre-wrap; background: var(--surface); color: var(--text); border-radius: 8px; padding: 8px; max-height: 220px; overflow: auto; font: inherit; font-size: .88rem; }
.md-field textarea { font-family: ui-sans-serif, system-ui, sans-serif; line-height: 1.5; }
.md-tools { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 4px; }
.md-tools button { font: inherit; font-size: .8rem; padding: 2px 8px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); border-radius: 6px; cursor: pointer; }
.md-tools button:hover { border-color: var(--link); }
.md-read { font-size: .95rem; }
.md-read > :last-child { margin-bottom: 0; }
.doc-row { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; margin-bottom: 8px; }
.doc-row.sub { margin-left: 28px; background: var(--surface-2); }
.doc-row.tag { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.doc-row.geloescht { border-color: var(--err-fg); background: var(--err-bg); }
.doc-row.eigen { border-style: dashed; }
.doc-row-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.doc-row-head h3 { margin: 0; flex: 1; font-size: 1rem; }
.doc-row-head .num { color: var(--link); font-weight: 800; font-variant-numeric: tabular-nums; }
.doc-row form { margin: 0; }
.doc-row textarea { min-height: 90px; }
.doc-tools { display: flex; gap: 4px; align-items: center; }
.doc-tools form { display: inline; }
.inserter { margin: -2px 0 8px 0; }
.inserter > summary { list-style: none; cursor: pointer; font-size: .8rem; color: var(--muted); text-align: center; padding: 2px; border-radius: 6px; }
.inserter > summary::-webkit-details-marker { display: none; }
.inserter > summary:hover { color: var(--link); background: var(--surface-2); }
.inserter[open] > summary { color: var(--link); }
.inserter .card { margin-top: 6px; }
.toolbar-sticky { position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 8px 0; border-bottom: 1px solid var(--border); margin-bottom: 12px; }
.wahl { margin-bottom: 12px; }
.wahl:has(input[data-statt]:not(:checked)) .wahl-body { display: none; }
.wahl:has(input[data-statt]:not(:checked)) { opacity: .75; }
.wahl-head { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.wahl-head input[type=text] { flex: 1; min-width: 220px; font-weight: 700; }
.wahl-body { margin-top: 12px; display: grid; gap: 10px; }
.satz { background: var(--surface-2); border: 1px solid var(--border); padding: 8px 10px; border-radius: 8px; font-size: .92rem; }
.basis-card > summary { cursor: pointer; display: flex; justify-content: space-between; gap: 8px; align-items: center; font-weight: 700; }
.basis-card[open] > summary { margin-bottom: 10px; }
.frage-label { font-weight: 650; font-size: .92rem; margin: 10px 0 4px; display: block; }
.tabelle-felder { display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.frage-row { display: grid; grid-template-columns: 1fr 130px 1fr auto; gap: 8px; align-items: start; margin-bottom: 8px; }
.codebox { font-family: ui-monospace, monospace; font-size: 1.4rem; letter-spacing: .12em; font-weight: 800; }
.linkbox { word-break: break-all; font-family: ui-monospace, monospace; font-size: .88rem; }
@media (max-width: 720px) { .frage-row { grid-template-columns: 1fr; } .doc-row.sub { margin-left: 10px; } }
.zp-row { display: flex; gap: 10px; align-items: flex-start; background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 8px 10px; margin-bottom: 6px; }
.zp-row.zp-tag { background: color-mix(in srgb, var(--accent) 8%, var(--surface)); border-color: var(--accent); margin-top: 16px; }
.zp-zeit { width: 200px; display: grid; gap: 4px; flex: none; }
.zp-text { flex: 1; display: grid; gap: 4px; }
.zp-text textarea { min-height: 40px; }
.zp-tops { display: grid; gap: 2px; margin-top: 6px; max-height: 260px; overflow: auto; }
.zp-tops .sub { padding-left: 20px; }
.zp-tools { flex-wrap: wrap; justify-content: flex-end; max-width: 210px; }
@media (max-width: 720px) { .zp-row { flex-direction: column; } .zp-zeit { width: 100%; } .zp-tools { max-width: none; } }

/* Rechte-Matrix */
table.rechte th { white-space: normal; font-size: .7rem; text-align: center; padding: 8px 4px; }
table.rechte th:first-child { text-align: left; min-width: 190px; padding-left: 10px; }
table.rechte td { padding: 6px 4px; }
table.rechte td:first-child { padding-left: 10px; }
table.rechte td { vertical-align: middle; }
table.rechte select.r-sel { width: auto; min-width: 0; padding: 3px 2px; font-size: .78rem; }
table.rechte select.r-lesen { background: color-mix(in srgb, var(--ok-bg) 70%, var(--surface)); }
table.rechte select.r-bearbeiten { background: var(--ok-bg); color: var(--ok-fg); font-weight: 650; }
table.rechte tr.r-neu td { background: var(--surface-2); }
table.rechte .r-tools { margin-top: 4px; font-size: .75rem; color: var(--muted); display: flex; gap: 4px; align-items: center; }
table.rechte .r-tools .btn.small { padding: 1px 7px; font-size: .75rem; }
table.rechte tr.r-geaendert td:first-child { box-shadow: inset 3px 0 0 var(--accent); }

/* Satzung & Ordnungen */
.ord-liste { display: grid; gap: 12px; }
.ord-karte { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.ord-karte + .ord-karte { margin-top: 0; }
.ord-name { font-weight: 700; font-size: 1.1rem; color: var(--text); text-decoration: none; }
.ord-name:hover { color: var(--link); }
.ord-download { margin: 8px 0 14px; }
.ord-dokument { max-width: 52rem; font-family: Georgia, "Times New Roman", serif; font-size: 1.02rem; line-height: 1.55; padding: 28px clamp(16px, 4vw, 48px); }
.ord-dokument h1.ord-titel { text-align: center; margin: 0 0 4px; font-family: system-ui, sans-serif; }
.ord-dokument .ord-untertitel { text-align: center; margin: 0 0 18px; color: var(--muted); }
.ord-dokument .ord-beschluesse { font-size: .82rem; color: var(--muted); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 8px 0; margin-bottom: 18px; }
.ord-dokument .ord-beschluesse p { margin: 0 0 2px; }
.ord-dokument details.ord-beschluesse > summary { cursor: pointer; margin-bottom: 4px; font-family: system-ui, sans-serif; }
.ord-dokument .ord-mehrheit { font-style: italic; margin-top: 6px !important; }
.ord-dokument nav.ord-inhalt { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 10px 16px; margin-bottom: 20px; font-family: system-ui, sans-serif; font-size: .92rem; }
.ord-dokument nav.ord-inhalt h2 { font-size: 1rem; margin: 4px 0 6px; }
.ord-dokument nav.ord-inhalt ol { list-style: none; padding: 0; margin: 0; columns: 2 18rem; }
.ord-dokument nav.ord-inhalt li { margin: 0 0 3px; break-inside: avoid; }
.ord-dokument .ord-text h2 { font-family: system-ui, sans-serif; font-size: 1.12rem; margin: 26px 0 8px; scroll-margin-top: 70px; }
.ord-dokument .ord-text h3 { font-family: system-ui, sans-serif; font-size: 1rem; margin: 18px 0 6px; }
.diff { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .82rem; white-space: pre-wrap; word-break: break-word; margin: 0; }
.diff div { padding: 1px 8px; }
.diff .add { background: var(--ok-bg); color: var(--ok-fg); }
.diff .del { background: var(--err-bg); color: var(--err-fg); }
.diff .hunk { color: var(--muted); border-top: 1px dashed var(--border); margin-top: 6px; }
textarea.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .86rem; line-height: 1.5; }

/* Abschlussbericht */
.namen-wahl { display: flex; flex-wrap: wrap; gap: 6px; }
.namen-wahl .chip { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; margin: 0; font-weight: 400; }
.ab-vorschau { font-family: Georgia, "Times New Roman", serif; line-height: 1.55; max-width: 52rem; }
.ab-vorschau h1 { font-size: 1.15rem; font-family: system-ui, sans-serif; }
.ab-vorschau h2 { font-size: 1.02rem; font-family: system-ui, sans-serif; margin: 18px 0 6px; }
.ab-vorschau .ab-unterschrift { text-align: right; margin-top: 18px; }
.balken { background: var(--text); color: transparent; border-radius: 2px; }
.wz-kopf { margin-top: 0; display: flex; gap: 8px; align-items: center; }
.wz-kopf svg { width: 22px; height: 22px; flex: none; stroke: var(--link); fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* VV-Übersicht: Phasen von der Vorbereitung bis zum Abschluss */
.vv-meta { margin-bottom: 6px; }
.vv-links { display: flex; gap: 6px; flex-wrap: wrap; margin: 0; }
.phasen { list-style: none; margin: 8px 0 0; padding: 0; counter-reset: phase; }
.phase { counter-increment: phase; display: grid; grid-template-columns: 220px 1fr; gap: 8px 28px; position: relative;
  padding: 22px 0; border-top: 1px solid var(--border); }
.phase:first-child { border-top: 0; padding-top: 8px; }
.phase-kopf { padding-left: 44px; position: relative; }
.phase-kopf::before { content: counter(phase); position: absolute; left: 0; top: -3px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center; background: var(--accent); color: var(--accent-fg); font-weight: 800; font-size: .9rem;
  font-variant-numeric: tabular-nums; }
.phase-kopf h2 { margin: 0 0 4px; font-size: 1.08rem; }
.phase-kopf p { margin: 0; max-width: 26ch; }
.phase .grid { grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.schritte { margin: 0 0 12px; padding-left: 20px; display: grid; gap: 4px; }
.schritte li.erledigt { color: var(--muted); }
.schritte .chip { margin-left: 6px; }
details.einstellungen { margin-top: 28px; }
details.einstellungen > summary { cursor: pointer; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; list-style: none; }
details.einstellungen > summary::-webkit-details-marker { display: none; }
details.einstellungen > summary::before { content: "▸"; color: var(--link); transition: transform .15s ease; display: inline-block; }
details.einstellungen[open] > summary::before { transform: rotate(90deg); }
details.einstellungen[open] > summary { margin-bottom: 14px; }
.einst-titel { font-size: 1.08rem; font-weight: 750; }
.form-foot { margin-top: 14px; }
form.gefahr { margin-top: 22px; padding-top: 14px; border-top: 1px dashed var(--border); display: flex; gap: 12px;
  align-items: center; justify-content: space-between; flex-wrap: wrap; }
form.gefahr p { margin: 0; }
@media (max-width: 900px) {
  .phase { grid-template-columns: 1fr; }
  .phase-kopf p { max-width: none; }
}

/* Handy: Kopf kompakt, Navigation als Wischleiste */
@media (max-width: 720px) {
  .topbar-inner { padding: 8px 12px; gap: 8px 12px; }
  .brand img { width: 32px; height: 32px; }
  .userbox > span[title] { display: none; }
  .nav { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -12px; padding: 0 12px; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { white-space: nowrap; flex: none; }
  main.page { padding-top: 16px; }
}
/* Touch: Tippflächen mindestens 40 px */
@media (pointer: coarse) {
  .btn.small, .md-tools button, .iconbtn, .nav a { min-height: 40px; min-width: 40px; justify-content: center; }
  .md-tools button { padding: 6px 12px; }
  .nav a { display: inline-flex; align-items: center; }
  .check input, td > input[type=checkbox] { width: 22px; height: 22px; }
  .inserter > summary { padding: 10px; }
}
@media (prefers-reduced-motion: reduce) { details.einstellungen > summary::before { transition: none; } }

details.ordner-setzen { margin-top: 10px; }
details.ordner-setzen > summary { cursor: pointer; color: var(--link); }
details.ordner-setzen[open] > summary { margin-bottom: 8px; }
