:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --text: #1c2430;
  --muted: #566274;
  --line: #d5dbe3;
  --primary: #0b5cad;
  --primary-text: #ffffff;
  --primary-soft: #e3effb;
  --ok: #1a7f37;
  --ok-bg: #e6f5ea;
  --warn: #8a5a00;
  --warn-bg: #fff4d6;
  --bad: #b3261e;
  --bad-bg: #fde8e6;
  --focus: #ffb000;
  --hl: rgba(255, 176, 0, 0.35);
  --seg: rgba(11, 92, 173, 0.10);
  --seg-hover: rgba(11, 92, 173, 0.28);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #12161c;
    --surface: #1b212a;
    --text: #e8edf3;
    --muted: #a6b0bf;
    --line: #34404f;
    --primary: #6cb2ff;
    --primary-text: #0b1a2b;
    --primary-soft: #1d3652;
    --ok: #62d07f;
    --ok-bg: #173324;
    --warn: #f1c56a;
    --warn-bg: #3a2f12;
    --bad: #ff8f87;
    --bad-bg: #432020;
  }
}

* { box-sizing: border-box; }

html { font-size: 18px; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
}

a { color: var(--primary); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

header.top {
  background: var(--surface);
  border-bottom: 1px solid var(--line);
  padding: 12px 16px;
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
}
header.top .brand { font-weight: 700; font-size: 1.1rem; color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: .6rem; }
header.top .brand .logo { display: block; flex: none; }
header.top .brand:hover, header.top .brand:focus-visible { text-decoration: underline; }

main { max-width: 1280px; margin: 0 auto; padding: 24px 16px 64px; }

h1 { font-size: 1.7rem; margin: 0 0 8px; }
h2 { font-size: 1.35rem; margin: 0 0 8px; }
h3 { font-size: 1.1rem; margin: 20px 0 8px; }
p.lead { color: var(--muted); margin: 0 0 24px; font-size: 1.05rem; }

.cards { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card {
  background: var(--surface);
  border: 2px solid var(--line);
  border-radius: 14px;
  padding: 22px;
  text-align: left;
  font: inherit;
  color: inherit;
  cursor: pointer;
}
.card:hover { border-color: var(--primary); }
.card .big { font-size: 1.2rem; font-weight: 700; display: block; margin-bottom: 6px; }
.card .small { color: var(--muted); font-size: 0.9rem; }

.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 20px;
}

.btn {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 10px;
  border: 2px solid var(--primary);
  background: var(--primary);
  color: var(--primary-text);
  cursor: pointer;
  text-decoration: none;
}
.btn.secondary { background: transparent; color: var(--primary); }
.btn.small { padding: 6px 12px; font-size: 0.85rem; }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; }
.mt { margin-top: 16px; }
.muted { color: var(--muted); }
.small { font-size: 0.85rem; }

.crumbs { width: 100%; max-width: 1280px; margin: 0 auto; padding: 8px 16px 0; font-size: 0.8rem; color: var(--muted); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.crumbs .sep { opacity: 0.6; }
.crumbs .here { font-weight: 600; color: var(--text); }
.crumbs .crumb { font: inherit; background: none; border: 0; padding: 0; color: var(--primary); cursor: pointer; text-decoration: underline; }
[hidden] { display: none !important; }

.steps { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 20px; padding: 0; list-style: none; }
.steps li {
  padding: 6px 12px; border-radius: 999px; background: var(--line); color: var(--muted); font-size: 0.85rem;
}
.steps li.on { background: var(--primary); color: var(--primary-text); font-weight: 600; }
.steps li.done { background: var(--ok-bg); color: var(--ok); }

.progress { height: 10px; background: var(--line); border-radius: 999px; overflow: hidden; margin-bottom: 16px; }
.progress > div { height: 100%; background: var(--primary); }

.drop {
  display: block;
  border: 3px dashed var(--line);
  border-radius: 14px;
  padding: 28px 16px;
  text-align: center;
  cursor: pointer;
  background: var(--surface);
}
.drop:hover, .drop.over { border-color: var(--primary); background: var(--primary-soft); }
.drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.drop:focus-within { outline: 3px solid var(--focus); }
.drop .name { font-weight: 700; color: var(--ok); display: block; margin-top: 6px; word-break: break-all; }

.banner { border-radius: 14px; padding: 18px 20px; font-size: 1.1rem; font-weight: 600; margin: 8px 0 16px; border: 2px solid; }
.banner.green { background: var(--ok-bg); color: var(--ok); border-color: var(--ok); }
.banner.yellow { background: var(--warn-bg); color: var(--warn); border-color: var(--warn); }
.banner.red { background: var(--bad-bg); color: var(--bad); border-color: var(--bad); }

.busy { padding: 28px; text-align: center; }
.spinner {
  width: 40px; height: 40px; margin: 0 auto 12px;
  border: 5px solid var(--line); border-top-color: var(--primary); border-radius: 50%;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation-duration: 4s; } }

.finding { border-left: 6px solid var(--line); background: var(--surface); padding: 12px 14px; margin: 10px 0; border-radius: 0 10px 10px 0; }
.finding.error { border-left-color: var(--bad); }
.finding.warning { border-left-color: var(--warn); }
.finding.info { border-left-color: var(--primary); }
.finding .t { font-weight: 700; }
.finding .todo { margin-top: 4px; font-weight: 600; }
.markerwrap { position: relative; display: inline-block; margin: 4px 0 10px; }
.marker { font: inherit; font-size: 0.9rem; color: var(--muted); background: transparent; border: 1px dashed var(--line); border-radius: 999px; padding: 4px 12px; cursor: pointer; }
.marker:hover, .marker:focus-visible { color: var(--primary); border-color: var(--primary); }
.markerwrap .pop { display: none; position: absolute; left: 0; top: 100%; z-index: 20; width: min(440px, 90vw); max-height: 60vh; overflow: auto; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,0.18); padding: 12px 14px; text-align: left; }
.markerwrap:hover .pop, .markerwrap:focus-within .pop, .markerwrap.open .pop { display: block; }
.pop .popitem { border-top: 1px solid var(--line); padding: 8px 0; }
.pop details { font-size: 0.85rem; color: var(--muted); }
.pop pre { white-space: pre-wrap; word-break: break-word; margin: 6px 0 0; font-size: 0.8rem; }
.finding details { margin-top: 6px; font-size: 0.85rem; color: var(--muted); }
.finding pre { white-space: pre-wrap; word-break: break-word; margin: 6px 0 0; font-size: 0.8rem; }

table.res { width: 100%; border-collapse: collapse; font-size: 0.95rem; table-layout: fixed; }
table.res th:nth-child(1) { width: 36%; }
table.res th:nth-child(3) { width: 135px; }
table.res td { overflow-wrap: break-word; }
table.res th { text-align: left; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 2px solid var(--line); }
table.res td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.res tr.clickable { cursor: pointer; }
table.res tr.clickable:hover td { background: var(--primary-soft); }
table.res tr.sel td { background: var(--hl); }
table.res .grp td { background: var(--bg); font-weight: 700; padding-top: 14px; }

.chip { display: inline-block; padding: 2px 10px; border-radius: 999px; font-weight: 700; font-size: 0.8rem; white-space: nowrap; }
.chip.ok { background: var(--ok-bg); color: var(--ok); }
.chip.diff { background: var(--bad-bg); color: var(--bad); }
.chip.missing { background: var(--warn-bg); color: var(--warn); }
.chip.info { background: var(--primary-soft); color: var(--primary); }

.split { display: grid; gap: 20px; grid-template-columns: minmax(320px, 480px) minmax(0, 1fr); align-items: start; }
.split.lines { grid-template-columns: minmax(540px, 1.5fr) minmax(0, 1fr); }
/* Im Assistenten bleibt die PDF beim Scrollen der Eingaben sichtbar */
.split:not(.wide) > :nth-child(2) { position: sticky; top: 8px; }
.split:not(.wide) .pdfbox .scroller { max-height: calc(100vh - 210px); }
@media (max-width: 960px) { .split, .split.wide { grid-template-columns: 1fr; } }
.split > * { min-width: 0; }
.split.wide { grid-template-columns: minmax(420px, 560px) minmax(0, 1fr); }
@media (max-width: 960px) { .split.wide { grid-template-columns: 1fr; } }

.field { margin: 14px 0; }
.field label { display: block; font-weight: 600; margin-bottom: 4px; }
.field .hint { color: var(--muted); font-size: 0.85rem; margin-top: 4px; }
input[type="text"], select {
  width: 100%;
  font: inherit;
  padding: 10px 12px;
  border: 2px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
}
input[type="text"].active { border-color: var(--focus); box-shadow: 0 0 0 3px var(--hl); }
.suggest { background: var(--primary-soft); border-radius: 10px; padding: 8px 12px; margin-top: 6px; font-size: 0.9rem; }

.pdfbox { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.pdfbox .bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 8px 12px; border-bottom: 1px solid var(--line); background: var(--bg); font-size: 0.9rem; }
.pdfbox .scroller { overflow: auto; max-height: 78vh; padding: 12px; background: #8a919c; }
.pdfbox .stage { position: relative; margin: 0 auto; background: #fff; }
.pdfbox canvas { display: block; }
.pdfbox .overlay { position: absolute; left: 0; top: 0; }
.pdfbox .overlay { cursor: text; user-select: none; -webkit-user-select: none; }
.pdfbox .seg { position: absolute; background: var(--seg); border-radius: 3px; pointer-events: none; }
.pdfbox .frame { position: absolute; border: 1px dashed var(--primary); pointer-events: none; }
.pdfbox .dragsel { position: absolute; background: var(--seg-hover); outline: 2px solid var(--primary); border-radius: 3px; pointer-events: none; }
.pdfbox .hl { position: absolute; background: var(--hl); outline: 3px solid var(--focus); border-radius: 3px; pointer-events: none; }
.pdfbox .picked { position: absolute; background: rgba(26, 127, 55, 0.25); outline: 2px solid var(--ok); border-radius: 3px; pointer-events: none; }


.sumrow { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.sumrow .k { color: var(--muted); font-size: 0.85rem; }
.sumrow .v { font-weight: 700; word-break: break-word; }

.hidden { display: none !important; }
.sr { position: absolute; left: -9999px; }

.pos { border: 1px solid var(--line); border-radius: 12px; padding: 12px; margin: 10px 0; background: var(--bg); }
.pos .head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px; font-weight: 700; }
.pos .field { margin: 8px 0; }
.pos .grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(105px, 1fr)); gap: 8px; }
.pos label { display: block; font-size: 0.8rem; color: var(--muted); margin-bottom: 2px; font-weight: 600; }

/* Startseite */
.start { display: grid; gap: 24px; grid-template-columns: minmax(0, 1fr); align-items: start; }
@media (min-width: 960px) { .start { grid-template-columns: minmax(0, 1fr) 280px; } }
.start .drop { padding: 48px 16px; }
.fineprint { color: var(--muted); font-size: 0.78rem; margin: 10px 0 0; }
.examples { margin-top: 20px; }
.linkbtn { font: inherit; font-size: 0.78rem; background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; }
.linkbtn:hover { color: var(--primary); }

/* Hinweiskasten: blass, klein, einklappbar */
.hint { border: 1px solid var(--line); border-radius: 12px; background: transparent; color: var(--muted); font-size: 0.82rem; }
.hint-head { width: 100%; display: flex; gap: 8px; align-items: center; font: inherit; font-weight: 600; color: var(--muted);
  background: none; border: 0; padding: 10px 12px; cursor: pointer; text-align: left; }
.hint-head .ttl { flex: 1; }
.hint .bulb { filter: grayscale(0.5); opacity: 0.8; }
.hint-body { display: none; padding: 0 12px 10px; }
.hint.open .hint-body { display: block; }
.hint-body p { margin: 0 0 8px; }

/* Zwischenstaende nach dem Ablegen */
.checks { list-style: none; margin: 8px 0 16px; padding: 0; display: grid; gap: 8px; }
.checks li { display: flex; gap: 12px; align-items: center; background: var(--surface); border: 1px solid var(--line);
  border-left-width: 6px; border-radius: 10px; padding: 10px 14px; font-weight: 600; }
.checks .ic { width: 1.4em; text-align: center; flex: none; }
.checks li.green { border-left-color: var(--ok); } .checks li.green .ic { color: var(--ok); }
.checks li.yellow { border-left-color: var(--warn); } .checks li.yellow .ic { color: var(--warn); }
.checks li.red { border-left-color: var(--bad); } .checks li.red .ic { color: var(--bad); }
.checks li.run .ic::before { content: ""; display: inline-block; width: 0.9em; height: 0.9em; border: 3px solid var(--line);
  border-top-color: var(--primary); border-radius: 50%; animation: spin 1s linear infinite; }
.results h2 { margin-top: 24px; }
.panel.ask { margin-top: 8px; }

.next { margin-top: 32px; }
.next .drop { padding: 22px 16px; }

.start-side { display: grid; gap: 12px; }
.hint a { color: var(--primary); }
.hint .src { font-size: 0.75rem; }
.termine { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 8px; }
.termine li { border-left: 3px solid var(--line); padding-left: 8px; }
.termine li.past { opacity: 0.8; }
.termine li.next { border-left-color: var(--primary); color: var(--text); }
.termine .tag-next { color: var(--primary); font-weight: 600; font-size: 0.75rem; }

/* Assistent: Kopfleiste bleibt oben, Weiter liegt neben der PDF */
.stepbar { position: sticky; top: 0; z-index: 5; background: var(--surface); margin: -20px -20px 12px; padding: 14px 20px 10px; border-bottom: 1px solid var(--line); border-radius: 14px 14px 0 0; }
.stepbar .progress { margin-bottom: 8px; }
.stepbar .stephead { display: flex; gap: 12px; justify-content: space-between; align-items: flex-end; flex-wrap: wrap; }
.stepbar h2 { margin: 0; }
.stepbar .nav { justify-content: flex-end; margin-left: auto; }

/* Positionsliste */
.small-banner { font-size: 0.9rem; font-weight: 600; padding: 10px 14px; margin: 0 0 10px; }
.banner.info { background: var(--primary-soft); color: var(--text); border-color: var(--primary); }
.sumcheck { font-size: 0.9rem; font-weight: 600; margin: 0 0 10px; }
.sumcheck.ok { color: var(--ok); }
.sumcheck.warn { color: var(--warn); }
.posheader, .pos.compact { display: grid; grid-template-columns: 22px minmax(120px, 1fr) 54px 84px 84px 84px 54px 30px; gap: 6px; align-items: center; }
.posheader { font-size: 0.72rem; color: var(--muted); font-weight: 600; padding: 0 12px; }
.pos.compact { padding: 8px 12px; margin: 6px 0; }
.pos.compact input[type="text"], .pos.compact select { padding: 6px 8px; font-size: 0.85rem; min-width: 0; width: 100%; }
.pos.compact .btn.small { padding: 4px 0; }
.pos.compact.skip { opacity: 0.55; }
.pos.compact.cur { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary-soft); opacity: 1; }
.pos .rownote { grid-column: 2 / -1; font-size: 0.75rem; color: var(--muted); }
@media (max-width: 960px) {
  .posheader { display: none; }
  .pos.compact { grid-template-columns: 22px 1fr 1fr 1fr 1fr 30px; }
  .pos.compact .nm { grid-column: 2 / -2; }
}

/* Ergebnis-Overlay */
body.ov-open { overflow: hidden; }
.resultov { position: fixed; inset: 0; z-index: 100; background: rgba(20, 24, 30, .6); display: flex; align-items: center; justify-content: center; padding: 16px; }
.resultov[hidden] { display: none; }
.ov-card { background: var(--surface); color: inherit; border-radius: 10px; width: min(760px, 100%); max-height: calc(100vh - 32px); display: flex; flex-direction: column; box-shadow: 0 10px 40px rgba(0,0,0,.4); outline: none; }
.ov-body { padding: 18px 20px; overflow: auto; flex: 1 1 auto; }
.ov-foot { display: flex; flex-wrap: wrap; gap: 10px; justify-content: flex-end; align-items: center; padding: 12px 20px; border-top: 1px solid rgba(128,128,128,.35); }
.ov-foot [hidden] { display: none; }
.ov-head { padding: 12px 20px 0; flex: 0 0 auto; }
.ov-head .next { margin: 0; }

/* Info-Symbol mit Text bei Mouseover/Fokus */
.tip { position: relative; display: inline-block; margin-left: 6px; cursor: help; font-weight: 600; }
.tip .tipbox { display: none; position: fixed; z-index: 200; overflow: auto; pointer-events: none; padding: 10px 12px; background: var(--surface); color: inherit; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.2); font-weight: 400; font-size: .9rem; text-align: left; }
.tip:hover .tipbox, .tip:focus .tipbox, .tip.open .tipbox { display: block; }
.tip.open .tipbox { pointer-events: auto; }

/* Benutzer-Symbol (Mock-Login) */
.top .user { position: relative; margin-left: auto; }
.avatar { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--surface); color: var(--primary); font-weight: 700; font-size: .85rem; cursor: pointer; display: inline-flex; align-items: center; justify-content: center; }
.avatar:hover, .avatar:focus-visible { border-color: var(--primary); }
.userpop { position: absolute; right: 0; top: 42px; z-index: 50; width: 260px; padding: 10px 14px; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.2); text-align: left; }
.userpop[hidden] { display: none; }
.ov-body textarea, .ov-body input[type=email] { width: 100%; box-sizing: border-box; font: inherit; padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); color: inherit; }
.ov-body label { display: block; font-weight: 600; margin: 8px 0 4px; }

/* Ergebnisseite: Inhalt links, Upload rechts oben (sticky) */
.resultgrid { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; align-items: start; }
.resultgrid .rg-side { position: sticky; top: 8px; }
.resultgrid .rg-side .next { margin: 0; }
@media (max-width: 900px) { .resultgrid { grid-template-columns: 1fr; } .resultgrid .rg-side { position: static; order: -1; } }

/* Overlay mit Titel links und Upload rechts oben */
.ov-head { display: flex; gap: 16px; align-items: flex-start; justify-content: space-between; }
.ov-head .ov-title { margin: 0; font-size: 1.15rem; }
.ov-head .next { width: 340px; max-width: 50%; margin: 0 0 0 auto; }
.ov-head .next .drop { padding: 12px; }
.ov-head .next .drop .small, .ov-head .next .drop p { display: none; }
.ov-card.full { width: calc(100vw - 32px); height: calc(100vh - 32px); max-height: none; }
.ov-card.full .ov-body { padding: 12px 20px; }
.ov-card.full .split.wide { grid-template-columns: minmax(420px, 42%) minmax(0, 1fr); }
.ov-card.full .split.wide > :nth-child(2) { position: sticky; top: 0; }
.ov-card.full .pdfbox .scroller { max-height: calc(100vh - 230px); }
@media (max-width: 960px) { .ov-card.full .split.wide { grid-template-columns: 1fr; } .ov-head .next { display: none; } }

/* Fusszeile mittig am unteren Rand */
main { width: 100%; }
footer.site { margin-top: auto; padding: 16px; text-align: center; color: var(--muted); font-size: 0.85rem; }
footer.site .sitelink, footer.site > span, footer.site > img { vertical-align: middle; }
footer.site .sitelink { display: inline-flex; align-items: center; gap: 8px; color: inherit; text-decoration: none; }
footer.site .sitelink:hover .ft, footer.site .sitelink:focus-visible .ft { text-decoration: underline; }
footer.site img { height: 36px; width: auto; margin-left: 6px; }
footer.site .sitelink img { margin-left: 0; }

/* Chip an der Auswahl: Rueckgaengig / Weiter */
.pickchip { position: fixed; z-index: 90; display: flex; gap: 6px; align-items: center; padding: 5px 8px; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; box-shadow: 0 6px 20px rgba(0,0,0,.25); font-size: .85rem; animation: chipin .12s ease-out; }
.pickchip .ok { color: var(--ok); font-weight: 700; }
.pickchip button { font: inherit; border-radius: 999px; padding: 3px 12px; cursor: pointer; border: 1px solid var(--primary); background: transparent; color: var(--primary); }
.pickchip button.go { background: var(--primary); color: #fff; font-weight: 600; }
.pickchip.auto::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; background: var(--primary); transform-origin: left; animation: chipbar 1.5s linear forwards; }
@keyframes chipin { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes chipbar { from { transform: scaleX(1); } to { transform: scaleX(0); } }
@media (prefers-reduced-motion: reduce) { .pickchip, .pickchip.auto::after { animation: none; } }
.pdfbox .bar .zoomgroup { margin-left: auto; display: inline-flex; gap: 8px; }
.pdfbox .bar .hintline { flex-basis: 100%; }

/* Konto: Anmelden, Registrieren, Meine Daten, Benutzerverwaltung */
.accpage { max-width: 620px; margin: 0 auto; }
.accpage.hero { text-align: center; }
.accpage.hero h1 { margin-top: 8px; }
.accpage.hero .accform, .accpage.hero .field, .accpage.hero .banner, .accpage.hero .fineprint { text-align: left; }
.accpage .stamp { display: block; margin: 8px auto 0; max-width: 60%; height: auto; }
.accpage h2 { font-size: 1.2rem; margin: 28px 0 8px; }
.accform .txt, .accpage input.txt { width: 100%; box-sizing: border-box; font: inherit; padding: 10px 12px; border: 2px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--text); }
.accform .txt:focus { border-color: var(--focus); box-shadow: 0 0 0 3px var(--hl); outline: none; }
.accform .txt[readonly] { background: var(--bg); }
.formmsg { color: var(--bad); font-weight: 600; min-height: 1.4em; margin: 6px 0; }
.accbox { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 0; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; font-weight: 600; }
.linkout { font-family: ui-monospace, monospace; font-size: .85rem; }
.invres { margin: 12px 0 8px; }
table.acc { table-layout: auto; margin-bottom: 8px; }
table.acc th:nth-child(1), table.acc th:nth-child(3) { width: auto; }
.userpop .popmail { display: block; overflow-wrap: anywhere; margin-bottom: 8px; }
.userpop .menu { display: flex; flex-direction: column; gap: 2px; border-top: 1px solid var(--line); padding-top: 6px; }
.userpop .menuitem { font: inherit; text-align: left; background: none; border: 0; padding: 8px 6px; border-radius: 6px; color: var(--text); cursor: pointer; }
.userpop .menuitem:hover, .userpop .menuitem:focus-visible { background: var(--primary-soft); }
.linkbtn.big { font-size: .95rem; margin-left: 8px; }
.btn.danger { background: var(--bad); border-color: var(--bad); color: var(--surface); }
.delcell { display: inline-flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* Hilfe-Link in der Kopfzeile und Hilfeseite (hilfe.html) */
.top .helplink { margin-left: auto; color: var(--primary); font-size: .95rem; }
.top .helplink + .user { margin-left: 0; }
main.help { max-width: 860px; }
main.help h2 { margin-top: 2rem; padding-top: .5rem; border-top: 1px solid var(--line); }
main.help h3 { font-size: 1.05rem; margin: 1.2rem 0 .3rem; }
main.help li { margin: .3rem 0; }
main.help .toc { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px 18px; margin: 1rem 0; }
main.help .toc ol { margin: .4rem 0 0; padding-left: 1.3rem; columns: 2 16rem; }
main.help .note { background: var(--primary-soft); border-radius: 10px; padding: 10px 14px; margin: 1rem 0; }
main.help kbd { font: inherit; font-size: .85em; padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; background: var(--surface); white-space: nowrap; }
main.help table.keys { width: 100%; border-collapse: collapse; margin: .6rem 0; font-size: .95rem; }
main.help table.keys th { text-align: left; color: var(--muted); padding: 6px 8px; border-bottom: 2px solid var(--line); }
main.help table.keys td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
main.help .dot { display: inline-block; width: .8em; height: .8em; border-radius: 50%; vertical-align: baseline; }
main.help .dot.ok { background: var(--ok); }
main.help .dot.warn { background: var(--warn); }
main.help .dot.bad { background: var(--bad); }
main.help dl.faq dt { font-weight: 700; margin-top: .9rem; }
main.help dl.faq dd { margin: .2rem 0 0; }
@media print { header.top, footer.site, main.help .toc { display: none; } }
