/*
 * Öffentliche Seiten hinter einem Link (Belegseite, Angebot annehmen, Übergabe an die Steuerberatung) und die Seite
 * „Nicht gefunden“. Sie sprechen im Namen des Nutzers zu seinen Kunden: neutral, hell, ohne Verlauf und ohne
 * Markenfarbe im Text (CI-Briefing, Abschnitt 11). Farbwerte aus tokens.css; immer hell (<html data-theme="light">).
 */
@import url('tokens.css');
@import url('fonts.css');

* { box-sizing: border-box; }
/* ein- und ausblenden über die Klasse (label.field setzt display und hebt das Attribut hidden auf) */
.hidden { display: none !important; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--fs); font-size: 15.5px; line-height: 1.55; color: var(--ink); background: var(--page, var(--soft)); -webkit-font-smoothing: antialiased; padding: 0 16px 40px; }
header { max-width: 720px; margin: 0 auto; padding: 28px 0 20px; }
header img { width: auto; max-width: min(240px, 60%); max-height: 72px; height: auto; display: block; }
/* Bild der Terminart statt des Logos (0.126.0): ganz zu sehen, nicht beschnitten */
header img.type-image { max-width: 100%; max-height: 220px; width: auto; height: auto; border-radius: 12px; }
header .brand-name { font-size: 22px; font-weight: 600; letter-spacing: -.015em; color: var(--ink); }
header .wm { font-family: var(--fd); font-size: 24px; letter-spacing: -.035em; line-height: 1; display: inline-flex; color: var(--ink); }
header .wm .a { font-weight: 400; } header .wm .b { font-weight: 700; }
header .wm .wm-ico { display: none; }
main.card { max-width: 720px; margin: 0 auto; background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r-lg); padding: 30px 32px; box-shadow: var(--sh); }
footer { max-width: 720px; margin: 18px auto 0; font-size: 12.5px; color: var(--muted); text-align: center; }
footer p { margin: 0 0 4px; }
html[data-framed] footer > p:not(.brand) { display: none; } /* im Rahmen einer Website nur „Erstellt mit …“ (0.85.1; der Server lässt den Rest weg, das Skript setzt data-framed für Browser ohne Sec-Fetch-Dest) */
footer .note { margin-top: 12px; font-size: 11px; }
/* „Erstellt mit“ mit Zeichen und Wortmarke (0.36.1) – wie im Fuß der Belege, nur in Grau */
footer .brand { display: flex; align-items: center; justify-content: center; gap: 6px; }
footer .brand .mark { display: inline-flex; align-items: center; gap: 4px; }
footer .brand .wm-tile { width: 14px; height: 14px; }
footer .brand .wm-svg { height: 12px; width: auto; margin-top: 2px; }
footer .brand strong { color: var(--ink); font-weight: 600; }
/* Link auf die Website (0.81.2): ohne Unterstreichung, Fokus sichtbar */
footer .brand a.mark { text-decoration: none; color: inherit; border-radius: 4px; padding: 6px 4px; margin: -6px -4px; } /* größere Fläche zum Treffen, ohne das Bild zu verschieben */
footer .brand a.mark:hover .wm-svg { opacity: .8; }
footer .brand a.mark:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
h1, h2 { font-weight: 600; line-height: 1.2; letter-spacing: -.02em; margin: 0 0 .5em; text-wrap: balance; }
h1 { font-size: 26px; }
h2 { font-size: 18px; margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--hair); }
p { margin: 0 0 .8em; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--ink); }
.eyebrow { font-family: var(--fm); font-size: 11px; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-2); font-weight: 500; margin-bottom: 6px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--fm); font-size: 13.5px; }

/* Status: Punkt plus Wort; Farbe nur für Geld und Zeit */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 1px 10px; border-radius: var(--r-pill); font-size: 12.5px; font-weight: 600; line-height: 1.6; background: var(--soft); color: var(--ink-2); }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.ok { background: var(--paid-bg); color: var(--paid); }
.badge.open { background: var(--tint); color: var(--violet-deep); }
.badge.warn { background: var(--due-bg); color: var(--due); }
.badge.err { background: var(--over-bg); color: var(--over); }
.alert { padding: 12px 16px; border-radius: var(--r-sm); margin: 14px 0; font-size: 14.5px; border-left: 3px solid var(--line-strong); background: var(--soft); }
.alert.ok { background: var(--paid-bg); border-color: var(--paid); font-weight: 600; }
.alert.info { background: var(--soft); border-color: var(--line-strong); }
.alert.warn, .alert.err { background: var(--due-bg); border-color: var(--due); }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: 6px 22px; margin: 14px 0 0; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }

.files { list-style: none; margin: 0 0 10px; padding: 0; }
.files li { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--hair); }
.files li:last-child { border-bottom: 0; }
.files li div { display: grid; min-width: 0; }
.files li span { font-size: 13px; color: var(--muted); overflow-wrap: anywhere; }

/* Knöpfe neutral: Haupthandlung in Tinte, sonst weiß mit Haarlinie */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 9px 18px; border-radius: var(--r-pill); border: 1px solid var(--line); background: var(--surface); color: var(--ink); font: inherit; font-size: 14.5px; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--soft); }
.btn.primary { background: var(--accent-strong, var(--ink)); border-color: var(--accent-strong, var(--ink)); color: var(--on-accent, var(--surface)); }
.btn.primary:hover { background: var(--accent-strong-hover, var(--ink-2)); border-color: var(--accent-strong-hover, var(--ink-2)); }
.btn.small { min-height: 30px; padding: 4px 12px; font-size: 13px; }
.btn[disabled] { opacity: .6; cursor: progress; }
.btn:focus-visible, a:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }

form.pay { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin: 6px 0 18px; }
/* Angebot online annehmen */
form.accept { display: grid; gap: 12px; margin: 8px 0 18px; }
form.accept .field { display: grid; gap: 4px; max-width: 380px; }
form.accept .field span { font-size: 13.5px; color: var(--muted); }
form.accept input[type=text] { font: inherit; min-height: 40px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); }
form.accept input[type=text]:focus, form.accept input[type=email]:focus { outline: 2px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }
form.accept .check { display: flex; gap: 10px; align-items: flex-start; }
form.accept .check input { margin-top: 5px; width: 17px; height: 17px; accent-color: var(--ink); flex: none; }
form.accept .pay { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.transfer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px 24px; align-items: start; background: var(--soft); border-radius: var(--r); padding: 16px 18px; }
.transfer .kv { margin: 0; }
.transfer dd span { white-space: nowrap; margin-right: 8px; }
.giro { display: grid; justify-items: center; gap: 6px; text-align: center; max-width: 170px; }
.giro svg { width: 150px; height: 150px; display: block; background: var(--sheet); }
.btn.copy { padding: 2px 10px; min-height: 0; font-size: 12.5px; vertical-align: 1px; }

@media (max-width: 560px) {
  main.card { padding: 22px 18px; border-radius: var(--r); }
  h1 { font-size: 22px; }
  .kv { grid-template-columns: 1fr; gap: 0; }
  .kv dt { margin-top: 8px; font-size: 13px; }
  .files li { flex-direction: column; align-items: flex-start; }
  .transfer { grid-template-columns: 1fr; }
  .giro { justify-items: start; }
}
@media print {
  body { background: #fff; }
  main.card { box-shadow: none; border: 0; padding: 0; }
  form.pay, .files a, .copy { display: none; }
}
.kv + p { margin-top: 22px; }

/* Zahlungsplan und Rechnungsdaten bei der Annahme (0.29.0) */
table.plan { border-collapse: collapse; width: 100%; margin: 6px 0 4px; font-size: 14px; }
table.plan td { padding: 6px 8px 6px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
table.plan td.num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; padding-right: 14px; }
/* Aufforderung, die Rechnungsdaten zu prüfen (0.30.1): leicht abgehoben in Violett */
details.billing { border: 1px solid color-mix(in srgb, var(--violet) 35%, var(--line)); border-left: 3px solid var(--violet); background: var(--tint); border-radius: var(--r-sm); padding: 10px 14px; }
details.billing[open] { background: var(--surface); }
details.billing summary { cursor: pointer; font-weight: 600; color: var(--violet-deep); }
details.billing summary .muted { font-weight: 400; }
details.billing .grid { display: grid; gap: 10px; margin-top: 12px; }
details.billing .row { display: grid; grid-template-columns: 110px minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
details.billing .field { max-width: none; min-width: 0; }
details.billing input { width: 100%; min-width: 0; box-sizing: border-box; }
/* Land als Auswahl (0.40.1) */
details.billing select { width: 100%; min-width: 0; box-sizing: border-box; font: inherit; min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); }
details.billing select:focus { outline: 2px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }
form.accept input[type=email] { font: inherit; min-height: 40px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); }
@media (max-width: 520px) {
  details.billing .row { grid-template-columns: 1fr; }
  table.plan td:nth-child(4) { display: block; padding-top: 0; color: var(--muted); }
  table.plan tr { display: grid; grid-template-columns: 1fr auto auto; }
}

/* Kundenportal (0.34.0) */
.portal-link { margin: 22px 0 0; padding-top: 16px; border-top: 1px solid var(--hair); font-size: 14px; }
form.pform { display: grid; gap: 12px; margin: 8px 0 6px; }
form.pform .field { display: grid; gap: 4px; max-width: 380px; }
form.pform .field span { font-size: 13.5px; color: var(--muted); }
form.pform input[type=email], form.pform input[type=text] { font: inherit; min-height: 40px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); }
form.pform input:focus { outline: 2px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }
form.pform input.code { font-family: var(--fm); font-size: 20px; letter-spacing: .2em; max-width: 180px; }
form.pform .check { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
form.pform .check input { margin-top: 4px; width: 17px; height: 17px; accent-color: var(--ink); flex: none; }
form.pform .pay, div.pay { display: flex; flex-wrap: wrap; gap: 10px; }
div.pay-gap { margin-top: 8px; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 16px 0 6px; }
.tile { background: var(--soft); border-radius: var(--r); padding: 12px 16px; display: grid; gap: 2px; }
.tile span { font-size: 12.5px; color: var(--muted); }
.tile strong { font-size: 20px; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }
ul.docs { list-style: none; margin: 0; padding: 0; }
ul.docs.hours .hours-left { font-variant-numeric: tabular-nums; white-space: nowrap; }
li.doc { display: flex; align-items: center; justify-content: space-between; gap: 10px 16px; padding: 12px 0; border-bottom: 1px solid var(--hair); flex-wrap: wrap; }
li.doc:last-child { border-bottom: 0; }
.doc-main { display: grid; gap: 2px; min-width: 0; flex: 1 1 260px; }
.doc-title { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.doc-main .small { overflow-wrap: anywhere; }
.doc-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
p.session { margin-top: 26px; padding-top: 14px; border-top: 1px solid var(--hair); }
/* Kundenportal in Reitern (0.80.0): Angemeldeter oben, Kennzahlen, Reiter Belege · Termine · Stunden, Filter-Chips, Hauptaktion je Zeile */
.phead { display: flex; justify-content: space-between; align-items: baseline; gap: 6px 18px; flex-wrap: wrap; margin: -4px 0 0; }
.phead p { margin: 0; }
.phead .session { margin: 0; padding: 0; border: 0; }
.ptabs { display: flex; gap: 4px; margin: 18px 0 14px; padding: 4px; background: var(--soft); border-radius: var(--r-pill); width: max-content; max-width: 100%; }
.ptab { font: inherit; font-size: 14.5px; font-weight: 600; color: var(--ink-2); background: none; border: 0; border-radius: var(--r-pill); padding: 7px 16px; cursor: pointer; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.ptab[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--sh); }
.ptab:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.pcount { font-family: var(--fm); font-size: 11.5px; font-weight: 500; color: var(--muted); background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r-pill); padding: 0 7px; line-height: 1.6; }
.ptab[aria-selected="true"] .pcount { background: var(--soft); }
.ptitle { margin: 0 0 10px; padding: 0; border: 0; font-size: 17px; }
.pfilter { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 10px; }
.pchip { font: inherit; font-size: 13.5px; font-weight: 500; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 4px 12px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; }
.pchip[aria-pressed="true"] { background: var(--ink); color: var(--surface); border-color: var(--ink); }
.pchip[aria-pressed="true"] .pcount { background: transparent; color: var(--surface); border-color: color-mix(in srgb, var(--surface) 40%, transparent); }
.pchip:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.doc-files { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.doc-files .btn.small { min-height: 26px; padding: 2px 10px; font-size: 12.5px; }
.doc-actions .btn.primary.small { min-height: 36px; padding: 6px 16px; font-size: 14px; }
/* Adresse des Kontos (0.77.0): Kunden wählen, Datenschutzhinweise unter dem Portal */
ul.docs.choose { margin-top: 10px; }
p.privacy { margin: 18px 0 0; }
@media (max-width: 560px) {
  li.doc { align-items: flex-start; background: var(--soft); border: 0; border-radius: var(--r); padding: 12px 14px; margin-bottom: 8px; }
  ul.docs.appts li.doc, ul.docs.hours li.doc, ul.docs.choose li.doc { background: var(--soft); }
  .doc-actions { justify-content: flex-start; width: 100%; }
  .doc-actions .btn { flex: 1 1 auto; }
  .tile strong { font-size: 18px; }
  .ptabs { width: 100%; }
  .ptab { flex: 1 1 0; justify-content: center; padding: 7px 8px; }
  .phead { flex-direction: column; }
}

/* Terminbuchung (0.35.0) */
.btn.link { border: 0; background: none; padding: 4px 0; min-height: 0; font-weight: 500; text-decoration: underline; text-decoration-color: var(--line-strong); text-underline-offset: 3px; }
.btn.link:hover { background: none; text-decoration-color: var(--ink); }
ul.types { list-style: none; margin: 0; padding: 0; }
.type-thumb { width: 56px; height: 56px; object-fit: cover; border-radius: 10px; flex: 0 0 56px; background: var(--hair); }
li.type { display: flex; align-items: center; justify-content: space-between; gap: 12px 18px; padding: 14px 0; border-bottom: 1px solid var(--hair); flex-wrap: wrap; }
li.type:last-child { border-bottom: 0; }
.type-main { display: grid; gap: 2px; min-width: 0; flex: 1 1 260px; }
.type-main p { margin: 4px 0 0; color: var(--ink-2); }
.type-head { margin: 0 0 6px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 18px 0 8px; }
.cal-title { margin: 0; padding: 0; border: 0; font-size: 17px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-wd { font-family: var(--fm); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); text-align: center; padding: 4px 0; }
.cal .day { font: inherit; font-size: 14.5px; min-height: 40px; border: 1px solid transparent; border-radius: var(--r-sm); background: none; color: var(--muted); cursor: default; }
.cal .day.other { opacity: .35; }
.cal .day.has { background: var(--tint); color: var(--violet-deep); border-color: color-mix(in srgb, var(--violet) 35%, var(--line)); font-weight: 600; cursor: pointer; }
.cal .day.has:hover { border-color: var(--violet); }
.cal .day.sel { background: var(--accent-strong, var(--ink)); color: var(--on-accent, var(--surface)); border-color: var(--accent-strong, var(--ink)); }
.cal .day.today:not(.sel) { text-decoration: underline; text-underline-offset: 3px; }
.cal .day:focus-visible { outline: 2px solid var(--ink); outline-offset: 1px; }
.times { margin-top: 16px; }
.times h3 { font-size: 15px; font-weight: 600; margin: 0 0 8px; }
.time-list { display: flex; flex-wrap: wrap; gap: 8px; }
.btn.time { font-family: var(--fm); font-weight: 500; font-variant-numeric: tabular-nums; }
.tzline { margin-top: 14px; }
.tzline select { font: inherit; font-size: 13.5px; padding: 3px 6px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); max-width: 100%; }
.pick { background: var(--soft); border-radius: var(--r); padding: 12px 16px; margin: 6px 0 14px; display: grid; gap: 2px; }
form.pform textarea, form.pform input[type=tel] { font: inherit; min-height: 40px; padding: 9px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); width: 100%; max-width: 100%; resize: vertical; }
form.pform textarea:focus, form.pform input[type=tel]:focus { outline: 2px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }
form.pform input.invalid, form.pform textarea.invalid { border-color: var(--over); }
/* Pflichtfelder und Fehler des Servers (0.36.1): rotes Feld, Hinweis darunter – auf allen öffentlichen Formularen gleich */
label.field.invalid input, label.field.invalid textarea, label.field.invalid select { border-color: var(--over); box-shadow: 0 0 0 3px color-mix(in srgb, var(--over) 18%, transparent); }
label.check.invalid { outline: 2px solid var(--over); outline-offset: 4px; border-radius: 4px; }
.field-error { display: block; color: var(--over); font-size: 12.5px; margin-top: 4px; }
form .alert.warn.form-check { margin-bottom: 12px; }
form.pform .field small { font-size: 12.5px; }
/* Telefonfeld mit Länderauswahl (0.37.0) */
.phone-wrap { display: flex; gap: 6px; align-items: stretch; }
.phone-wrap select.phone-cc { flex: 0 0 auto; width: auto; max-width: 8.5em; }
.phone-wrap input { flex: 1 1 auto; min-width: 0; }
.hp { position: absolute; left: -10000px; top: auto; width: 1px; height: 1px; overflow: hidden; }
/* bezahlte Termine (0.40.0): Rechnungsanschrift, Gutscheincode, Preis */
form.pform select { font: inherit; min-height: 40px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); max-width: 100%; }
form.pform fieldset.billing-box { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 14px 14px; margin: 0; display: grid; gap: 10px; max-width: 420px; min-width: 0; }
form.pform fieldset.billing-box legend { font-weight: 600; padding: 0 6px; }
form.pform .zip-city { display: grid; grid-template-columns: 110px minmax(0, 1fr); gap: 10px; }
form.pform .zip-city .field { max-width: none; min-width: 0; }
form.pform .zip-city input { width: 100%; box-sizing: border-box; }
form.pform .voucher-row { display: flex; gap: 8px; align-items: stretch; }
form.pform .voucher-row input { flex: 1 1 auto; min-width: 0; font-family: var(--fm); text-transform: uppercase; }
.price-line { margin: 2px 0; }
.ok-text { color: var(--paid); }
/* Termine aus Kundensicht (0.47.0): Vor- und Nachname nebeneinander, Wahl des Orts, Ort vollständig */
form.pform .name-row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; max-width: 420px; }
form.pform .name-row .field { max-width: none; min-width: 0; }
form.pform .name-row input { width: 100%; box-sizing: border-box; }
form.pform fieldset.loc-choice { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 8px 14px 12px; margin: 0; display: grid; gap: 8px; max-width: 420px; min-width: 0; }
form.pform fieldset.loc-choice legend { font-weight: 600; padding: 0 6px; }
form.pform fieldset.loc-choice.invalid { border-color: var(--over); box-shadow: 0 0 0 3px color-mix(in srgb, var(--over) 18%, transparent); }
.where { overflow-wrap: anywhere; }
details.past-appts { margin-top: 12px; }
details.past-appts summary { cursor: pointer; font-size: 14px; color: var(--muted); }
/* Anfrageformular (0.50.0): Einleitung, Nachricht breiter als die übrigen Felder */
#inquiry .intro { margin: 0 0 10px; color: var(--muted); }
form.pform .field.wide { max-width: 560px; }
@media (max-width: 420px) {
  form.pform .name-row { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 520px) {
  li.type { align-items: flex-start; }
  .cal .day { min-height: 36px; font-size: 13.5px; }
}
/* Formulare (0.120.0): Einleitung, Mehrfachauswahl, Einwilligung, Datum, Feld „Termin“ mit Terminart, Tag und Zeit */
#form .intro { margin: 0 0 10px; color: var(--muted); }
form.pform input[type=date] { font: inherit; min-height: 40px; padding: 8px 12px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--surface); color: var(--ink); max-width: 100%; }
form.pform input[type=date]:focus { outline: 2px solid var(--ink); outline-offset: 1px; border-color: var(--ink); }
form.pform fieldset.multi-choice small { font-size: 12.5px; }
form.pform label.check.consent { max-width: 560px; }
form.pform fieldset.termin-box { border: 1px solid var(--line); border-radius: var(--r-sm); padding: 10px 14px 14px; margin: 0; display: grid; gap: 10px; max-width: 560px; min-width: 0; }
form.pform fieldset.termin-box legend { font-weight: 600; padding: 0 6px; }
form.pform fieldset.termin-box.invalid { border-color: var(--over); }
form.pform .termin-types, form.pform .termin-body { display: grid; gap: 8px; }
form.pform .termin-days { display: grid; gap: 8px; }
form.pform .termin-days p { margin: 0; }
.btn.time[aria-pressed="true"] { background: var(--accent-strong, var(--ink)); color: var(--on-accent, var(--surface)); border-color: var(--accent-strong, var(--ink)); }

/* Werkzeug „E-Rechnung prüfen und lesbar machen“ (0.124.0, Plan 4.46): breiter für die Positionen */
html[data-tool] main.card, html[data-tool] footer { max-width: 960px; }
.tool-drop { display: grid; justify-items: center; gap: 6px; margin: 18px 0; padding: 26px 16px; border: 2px dashed var(--line); border-radius: var(--r); text-align: center; }
.tool-drop.over { border-color: var(--ink); background: var(--soft); }
.tool-drop input[type=file] { position: absolute; width: 1px; height: 1px; opacity: 0; }
.tool-drop input[type=file]:focus-visible + label { outline: 2px solid var(--ink); outline-offset: 2px; }
.tool-drop p { margin: 0; }
.tool-checks { margin: 6px 0 14px; padding-left: 20px; font-size: 14.5px; }
.tool-checks li { margin: 4px 0; }
.tool-checks.info { color: var(--muted); }
.tool-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
.tool-view { margin-top: 18px; border-top: 1px solid var(--hair); padding-top: 6px; }
.tool-view h3 { font-size: 15px; margin: 20px 0 6px; }
.tool-parties { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 8px 24px; }
.tool-parties p { margin: 0; overflow-wrap: anywhere; }
.tool-scroll { overflow-x: auto; }
table.tool-grid { border-collapse: collapse; width: 100%; font-size: 14px; }
table.tool-grid th { text-align: left; font-weight: 600; color: var(--muted); border-bottom: 1px solid var(--line); padding: 6px 8px 6px 0; }
table.tool-grid td { padding: 6px 8px 6px 0; border-bottom: 1px solid var(--hair); vertical-align: top; white-space: pre-line; overflow-wrap: anywhere; }
table.tool-grid .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.kv.tool-sum { max-width: 420px; margin-left: auto; }
.kv.tool-sum dd { text-align: right; }
.tool-note { white-space: pre-line; overflow-wrap: anywhere; }
.tool-about { margin: 20px 0 0; font-size: 14px; }
.tool-about summary { cursor: pointer; font-weight: 600; }
.tool-cta { margin-top: 22px; padding: 16px 18px; border-radius: var(--r-sm); background: var(--soft); }
.tool-cta h2 { margin-top: 0; }
@media print {
  html[data-tool] header, .tool-drop, .tool-actions, .tool-cta, .tool-about, [data-tool-privacy], html[data-tool] main.card > h1, html[data-tool] main.card > p, html[data-tool] footer { display: none; }
}
.tool-view .kv dd { white-space: pre-line; }

/* Vertrag zur Unterschrift (0.131.0, Plan 8.3): Text gegliedert, Anlagen, Feld zum Zeichnen */
.contract-text { white-space: pre-wrap; font-size: 15px; line-height: 1.55; margin: 18px 0; padding: 16px 18px; border: 1px solid var(--hair); border-radius: var(--r-sm); max-height: 70vh; overflow: auto; }
.contract-text.formatted { white-space: normal; }
.contract-body h2 { font-size: 19px; margin: 18px 0 8px; }
.contract-body h3 { font-size: 16px; margin: 14px 0 6px; }
.contract-body p { margin: 0 0 10px; }
.contract-body blockquote { margin: 0 0 10px; padding-left: 12px; border-left: 2px solid var(--line); color: var(--muted); }
.contract-list { list-style: none; padding: 0; margin: 0 0 10px; }
.contract-list li { margin: 0 0 6px; padding-left: 26px; text-indent: -26px; }
.contract-list li.depth-1 { margin-left: 22px; }
.contract-list li.depth-2 { margin-left: 44px; }
.contract-list .marker { display: inline-block; min-width: 22px; text-indent: 0; }
.contract-table { border-collapse: collapse; width: 100%; margin: 0 0 12px; font-size: 14px; }
.contract-table th, .contract-table td { border-bottom: 1px solid var(--hair); padding: 6px 8px; text-align: left; vertical-align: top; }
.contract-files { padding-left: 18px; }
form.inline { display: inline; }
.sign-form { display: grid; gap: 12px; margin-top: 14px; }
.sign-pad { display: grid; gap: 6px; max-width: 420px; }
.sign-pad span { font-size: 13.5px; color: var(--muted); }
.sign-pad canvas { width: 100%; height: auto; aspect-ratio: 3 / 1; border: 1px dashed var(--line-strong); border-radius: var(--r-sm); background: var(--surface); touch-action: none; }
.sign-pad .btn { justify-self: start; }
