/* Oberflaeche der HonorarApp — Anmutung nach CD BR·03b.
 *
 * Uebernommen: Mono-Labels in Versalien mit weiter Laufweite, Ink-Regel als
 * kraeftige Trennlinie, Hairlines dazwischen, Teal als einziger Akzent, viel
 * Weissraum. Nicht uebernommen: der Satzspiegel des Briefbogens — eine App ist
 * kein A4-Blatt.
 *
 * Bedienung auf drei Geraeten: unter 860 px eine Spalte mit Tab-Leiste unten
 * (Daumen), darueber Seitenleiste links. Touch-Ziele durchgehend >= 44 px.
 */

:root {
  --ink: #0a0a0a;
  --ink-soft: #1a1a1c;
  --grey-1: #3f3f43;
  --grey-2: #6f6f72;
  --grey-3: #a8a6a1;
  --hair: #d4d2cd;
  --flaeche: #f6f6f4;
  --paper: #ffffff;
  --accent: #14b8a6;
  --accent-dunkel: #0f8a7c;
  --warn: #b45309;
  --fehler: #b91c1c;

  --schrift: Geist, "Segoe UI", Inter, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --mono: "IBM Plex Mono", Consolas, Menlo, "Courier New", monospace;

  --r: 2px;
  --tab-hoehe: 58px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #f4f4f2; --ink-soft: #e6e6e3; --grey-1: #c4c4c0; --grey-2: #9a9a96;
    --grey-3: #6b6b67; --hair: #35353a; --flaeche: #1c1c1f; --paper: #111113;
    --accent: #2dd4bf; --accent-dunkel: #5eead4;
  }
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

html, body {
  margin: 0; padding: 0; height: 100%;
  background: var(--paper); color: var(--ink-soft);
  font: 15px/1.5 var(--schrift);
  font-variant-numeric: tabular-nums lining-nums;
  -webkit-text-size-adjust: 100%;
}

/* ── Grundgerüst ───────────────────────────────────────── */
#app { display: flex; min-height: 100%; flex-direction: column; }

.seitenleiste { display: none; }

.inhalt {
  flex: 1; padding: 20px 18px calc(var(--tab-hoehe) + 28px);
  max-width: 900px; width: 100%; margin: 0 auto;
}

.tableiste {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  display: flex; background: var(--paper);
  border-top: 1px solid var(--hair);
  padding-bottom: env(safe-area-inset-bottom);
}
.tableiste button {
  flex: 1; min-height: var(--tab-hoehe); border: 0; background: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 3px; color: var(--grey-2); cursor: pointer;
  font: 10px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase;
}
.tableiste button svg { width: 21px; height: 21px; stroke: currentColor; fill: none;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.tableiste button[aria-current="page"] { color: var(--accent); }

@media (min-width: 860px) {
  #app { flex-direction: row; }
  .tableiste { display: none; }
  .seitenleiste {
    display: flex; flex-direction: column; gap: 2px;
    width: 232px; flex: 0 0 232px; padding: 24px 14px;
    border-right: 1px solid var(--hair); background: var(--flaeche);
    position: sticky; top: 0; align-self: flex-start; height: 100vh;
  }
  .seitenleiste .marke { padding: 0 8px 22px; font-size: 17px; color: var(--ink); }
  .seitenleiste button {
    display: flex; align-items: center; gap: 10px; width: 100%;
    min-height: 42px; padding: 0 10px; border: 0; border-radius: var(--r);
    background: none; color: var(--grey-1); cursor: pointer; text-align: left;
    font: 13px/1 var(--schrift);
  }
  .seitenleiste button svg { width: 18px; height: 18px; stroke: currentColor; fill: none;
    stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
  .seitenleiste button:hover { background: rgba(127,127,127,.10); }
  .seitenleiste button[aria-current="page"] { color: var(--accent); background: rgba(20,184,166,.10); }
  .inhalt { padding: 30px 34px 60px; }
}

/* ── Typografie ────────────────────────────────────────── */
h1 { margin: 0 0 4px; font-size: 25px; font-weight: 300; letter-spacing: -.02em; color: var(--ink); }
h2 {
  margin: 30px 0 10px; font: 11px/1 var(--mono); letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent);
  padding-bottom: 6px; border-bottom: 1px solid var(--ink);
}
h3 { margin: 18px 0 6px; font-size: 15px; font-weight: 600; color: var(--ink); }
.kicker { font: 11px/1 var(--mono); letter-spacing: .14em; text-transform: uppercase; color: var(--grey-2); }
.unterzeile { color: var(--grey-2); margin: 0 0 18px; }
.klein { font-size: 13px; color: var(--grey-2); }
.mono { font-family: var(--mono); }

/* ── Formulare ─────────────────────────────────────────── */
.feld { margin-bottom: 14px; }
.feld > label, .feldlabel {
  display: block; margin-bottom: 5px;
  font: 10px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--grey-2);
}
input, select, textarea {
  width: 100%; min-height: 44px; padding: 10px 12px;
  border: 1px solid var(--hair); border-radius: var(--r);
  background: var(--paper); color: var(--ink); font: 15px/1.4 var(--schrift);
  font-variant-numeric: tabular-nums;
}
input[type="checkbox"] { width: 22px; min-height: 22px; height: 22px; accent-color: var(--accent); }
textarea { min-height: 84px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
input.zahl, .zahl input { text-align: right; font-family: var(--mono); }
.feldreihe { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
/* Anschrift: Hausnummer und PLZ brauchen wenig Platz, Straße und Ort viel.
   Bewusst zwei eigene Klassen statt :nth-of-type(even) — das zählt alle
   Geschwister-Elemente, nicht nur die mit dieser Klasse, und kippt sobald
   irgendwo ein Feld dazwischenkommt. Genau das war passiert: Straße stand
   schmal, die Nummer breit. */
.reihe-strasse { display: grid; grid-template-columns: 1fr 110px; gap: 12px; }
.reihe-plzort  { display: grid; grid-template-columns: 110px 1fr; gap: 12px; }
.telefon-reihe { display: grid; grid-template-columns: 110px 1fr; gap: 12px; }
@media (max-width: 560px) {
  .reihe-strasse { grid-template-columns: 1fr 74px; }
  .reihe-plzort  { grid-template-columns: 74px 1fr; }
}
.feldreihe-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 560px) { .feldreihe, .feldreihe-3 { grid-template-columns: 1fr; } }
.mitEinheit { display: flex; align-items: center; gap: 8px; }
.mitEinheit .einheit { font: 12px/1 var(--mono); color: var(--grey-2); flex: 0 0 auto; }
.hinweis { margin-top: 5px; font-size: 12.5px; color: var(--grey-2); }
.hinweis.warnung { color: var(--warn); }
.hinweis.fehler { color: var(--fehler); }
.hinweis.gut { color: var(--accent-dunkel); }

/* ── Knöpfe ────────────────────────────────────────────── */
button.knopf, a.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 20px; border: 1px solid var(--ink);
  border-radius: var(--r); background: var(--ink); color: var(--paper);
  font: 14px/1 var(--schrift); cursor: pointer; text-decoration: none;
}
button.knopf.zweit, a.knopf.zweit { background: none; color: var(--ink); }
button.knopf.akzent { background: var(--accent); border-color: var(--accent); color: #fff; }
button.knopf.leise { border-color: var(--hair); background: none; color: var(--grey-1); }
button.knopf:disabled { opacity: .4; cursor: not-allowed; }
.knopfreihe { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 18px; }
.knopfreihe.fest {
  position: sticky; bottom: 0; padding: 14px 0 6px; margin-top: 24px;
  background: linear-gradient(to bottom, transparent, var(--paper) 22%);
}

/* ── Listen und Karten ─────────────────────────────────── */
.liste { list-style: none; margin: 0; padding: 0; }
.liste li { border-bottom: 1px solid var(--hair); }
/* Bewusst ohne den Vorfahren .liste: Ein Eintrag ist überall derselbe Baustein,
   auch in der Schrittliste des Dashboards. Als der Selektor noch .liste
   voraussetzte, fiel er dort durch und die Einträge treppten als inline-block
   nach rechts. */
button.eintrag {
  display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 62px; padding: 12px 4px; border: 0; background: none;
  color: inherit; text-align: left; cursor: pointer; font: inherit;
}
button.eintrag:hover { background: var(--flaeche); }
.eintrag .haupt { flex: 1; min-width: 0; }
.eintrag .titel { color: var(--ink); }
.eintrag .neben { font: 11px/1.4 var(--mono); color: var(--grey-2); letter-spacing: .04em; }
.eintrag .betrag { font-family: var(--mono); white-space: nowrap; color: var(--ink); }

.karte {
  border: 1px solid var(--hair); border-radius: var(--r);
  padding: 16px; margin-bottom: 14px; background: var(--paper);
}
.karte.gefuellt { background: var(--flaeche); }

.marke-status { display: inline-block; padding: 2px 7px; border-radius: 2px;
  font: 10px/1.5 var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.marke-status.entwurf { background: var(--flaeche); color: var(--grey-2); border: 1px solid var(--hair); }
.marke-status.fest { background: rgba(20,184,166,.14); color: var(--accent-dunkel); }
.marke-status.storniert { background: rgba(185,28,28,.10); color: var(--fehler); }

/* ── Werteaufstellung ──────────────────────────────────── */
dl.werte { margin: 0; }
dl.werte div { display: flex; align-items: baseline; gap: 12px; padding: 4px 0; border-bottom: 1px solid var(--hair); }
dl.werte div:last-child { border-bottom: 0; }
dl.werte dt { flex: 1 1 auto; color: var(--grey-1); }
dl.werte dd { margin: 0; flex: 0 0 auto; font-family: var(--mono); color: var(--ink); white-space: nowrap; }
dl.werte div.summe { border-top: 1px solid var(--ink); border-bottom: 0; margin-top: 6px; padding-top: 8px; font-weight: 600; }
dl.werte div.summe dt, dl.werte div.summe dd { color: var(--ink); }

/* ── Assistent ─────────────────────────────────────────── */
.schrittleiste { display: flex; gap: 6px; margin: 4px 0 22px; }
.schrittleiste span { flex: 1; height: 3px; background: var(--hair); border-radius: 2px; }
.schrittleiste span.erledigt { background: var(--accent); }
.schrittleiste span.aktiv { background: var(--ink); }
.schrittkopf { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 4px; }

/* ── Auswahl mit Suche ─────────────────────────────────── */
.suchfeld { position: relative; }
.trefferliste {
  max-height: 300px; overflow-y: auto; margin-top: 8px;
  border: 1px solid var(--hair); border-radius: var(--r);
}
.trefferliste:empty { display: none; }
.trefferliste button {
  display: block; width: 100%; min-height: 48px; padding: 9px 12px;
  border: 0; border-bottom: 1px solid var(--hair); background: none;
  color: inherit; text-align: left; cursor: pointer; font: inherit;
}
.trefferliste button:last-child { border-bottom: 0; }
.trefferliste button:hover, .trefferliste button:focus { background: var(--flaeche); }
.trefferliste .neben { font: 11px/1.4 var(--mono); color: var(--grey-2); }

/* ── Leistungsphasen-Tabelle ───────────────────────────── */
.lphtabelle { width: 100%; border-collapse: collapse; }
.lphtabelle th {
  text-align: left; font: 10px/1.3 var(--mono); letter-spacing: .08em;
  text-transform: uppercase; color: var(--grey-2); font-weight: 400;
  padding: 0 6px 6px 0; border-bottom: 1px solid var(--ink);
}
.lphtabelle th.num, .lphtabelle td.num { text-align: right; }
.lphtabelle td { padding: 5px 6px 5px 0; border-bottom: 1px solid var(--hair); vertical-align: middle; }
.lphtabelle input { min-height: 38px; padding: 5px 8px; text-align: right; font-family: var(--mono); font-size: 14px; }
.lphtabelle .nr { width: 22px; color: var(--grey-2); font-family: var(--mono); }
.lphtabelle .bez { min-width: 0; }
.lphtabelle .bez span { display: block; font-size: 13.5px; }
.lphtabelle tfoot td { border-top: 1px solid var(--ink); border-bottom: 0; padding-top: 8px; font-weight: 600; color: var(--ink); }
@media (max-width: 560px) {
  .lphtabelle .bez span { font-size: 12.5px; }
  .lphtabelle input { width: 68px; }
}

/* ── Meldungen ─────────────────────────────────────────── */
.meldung {
  position: fixed; left: 50%; transform: translateX(-50%);
  bottom: calc(var(--tab-hoehe) + 16px); z-index: 60;
  max-width: 92%; padding: 12px 18px; border-radius: var(--r);
  background: var(--ink); color: var(--paper); font-size: 14px;
  box-shadow: 0 4px 18px rgba(0,0,0,.22);
}
.meldung.fehler { background: var(--fehler); }
@media (min-width: 860px) { .meldung { bottom: 24px; } }

.leer { padding: 44px 10px; text-align: center; color: var(--grey-2); }
.leer p { margin: 0 0 16px; }

/* ── Blattvorschau ─────────────────────────────────────── */
.vorschau {
  border: 1px solid var(--hair); border-radius: var(--r);
  overflow: hidden; background: #fff; margin-top: 8px;
}
.vorschau iframe { display: block; width: 100%; height: 62vh; border: 0; background: #fff; }

/* ── Dashboard ─────────────────────────────────────────── */
.kennzahlen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 18px; }
@media (max-width: 640px) { .kennzahlen { grid-template-columns: 1fr; } }
.kachel { border: 1px solid var(--hair); border-radius: var(--r); padding: 14px 16px; background: var(--flaeche); }
.kachel.warnung { border-color: var(--warn); }
.kacheltitel { font: 10px/1.3 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--grey-2); }
.kachelwert { font-size: 21px; font-weight: 600; color: var(--ink); margin: 6px 0 2px;
  font-variant-numeric: tabular-nums; }
.kachel.warnung .kachelwert { color: var(--warn); }
.kachelneben { font-size: 12.5px; color: var(--grey-2); }

.projektstand { padding: 12px 0; border-bottom: 1px solid var(--hair); }
.projektkopf { display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  width: 100%; border: 0; background: none; padding: 0 0 8px; cursor: pointer;
  color: inherit; text-align: left; font: inherit; }
.projektkopf .name { color: var(--ink); min-width: 0; }
.projektkopf .betrag { font-family: var(--mono); white-space: nowrap; color: var(--ink); }
.balken { height: 8px; background: var(--hair); border-radius: 4px; overflow: hidden; }
.balken .gefuellt { height: 100%; background: var(--accent); }
.balkenzeile { display: flex; justify-content: space-between; gap: 10px;
  margin-top: 5px; font-size: 12.5px; color: var(--grey-2); }

/* ————————————————————————————————————————————————————————————————
   Seitenkopf, Abschnitte
   ———————————————————————————————————————————————————————————————— */

.seitenkopf {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 16px; flex-wrap: wrap;
}
.seitenkopf h1 { margin-bottom: 0; }

/* Trennlinie mit Überschrift — gliedert auch dann, wenn ein Abschnitt leer ist.
   Die Ink-Regel sitzt am Container, nicht am h2: als Flex-Element schrumpfte die
   Linie sonst auf die Breite des Wortes. */
.abschnitt {
  display: flex; align-items: baseline; justify-content: space-between; gap: 12px;
  margin: 32px 0 12px; padding-bottom: 6px; border-bottom: 1px solid var(--ink);
}
.abschnitt h2 { margin: 0; padding: 0; border: 0; }
.abschnitt .anzahl { font-size: 11px; color: var(--grey-2); flex: 0 0 auto; }

/* ————————————————————————————————————————————————————————————————
   Listenseiten (Projekte, Kontakte)
   ———————————————————————————————————————————————————————————————— */

.listenkopf {
  display: grid; grid-template-columns: 1fr auto auto; gap: 10px;
  align-items: end; margin-top: 18px;
}
.listenkopf .feld { margin-bottom: 0; }
.listenkopf .knopf { white-space: nowrap; }
@media (max-width: 720px) {
  .listenkopf { grid-template-columns: 1fr; }
  .listenkopf .knopf { width: 100%; }
}

.trefferzahl {
  font: 11px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase;
  color: var(--grey-2); margin: 16px 0 6px;
}

.eintrag .pfeil { color: var(--grey-3); flex: 0 0 auto; padding-left: 8px; }
.eintrag .marke {
  font: 10px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase;
  color: var(--grey-2); border: 1px solid var(--hair); border-radius: var(--r);
  padding: 4px 6px; flex: 0 0 auto; white-space: nowrap;
}

/* ————————————————————————————————————————————————————————————————
   Dashboard: leerer Zustand
   ———————————————————————————————————————————————————————————————— */

.schrittliste { list-style: none; margin: 0; padding: 0; }
.schrittliste li { border-bottom: 1px solid var(--hair); }
.schrittliste .eintrag { min-height: 54px; }
.schrittliste .haken {
  flex: 0 0 20px; width: 20px; height: 20px; margin-right: 10px;
  border: 1px solid var(--hair); border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; color: var(--paper);
}
.schrittliste .fertig .haken { background: var(--accent); border-color: var(--accent); }
.schrittliste .fertig .titel { color: var(--grey-2); }

.platzhalter { padding: 4px 0 8px; }
.skizze { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.skizzenbalken {
  height: 10px; border: 1px dashed var(--hair); border-radius: var(--r);
  background: repeating-linear-gradient(
    -45deg, transparent 0 5px, var(--flaeche) 5px 10px);
}

/* ————————————————————————————————————————————————————————————————
   Auftritt: Farbe, Schriftprobe, Logo
   ———————————————————————————————————————————————————————————————— */

.farbreihe { display: grid; grid-template-columns: 56px 1fr; gap: 10px; align-items: center; }
.farbreihe input[type="color"] {
  padding: 2px; height: 40px; cursor: pointer; background: var(--paper);
}
.hexfeld { text-transform: lowercase; }

.schriftprobe {
  border: 1px solid var(--hair); border-radius: var(--r);
  padding: 16px 18px; margin: -4px 0 8px; background: var(--paper);
}
.schriftprobe .probe-gross { font-size: 22px; font-weight: 600; letter-spacing: -.01em; }
.schriftprobe .probe-klein { font-size: 13px; color: var(--grey-1); margin-top: 6px; }

.logoblock { margin-bottom: 18px; }
.logovorschau {
  border: 1px solid var(--hair); border-radius: var(--r);
  padding: 18px; background: var(--paper);
  display: flex; align-items: center; justify-content: center; min-height: 90px;
}
.logovorschau.leer { border-style: dashed; }
.logovorschau img { max-width: 240px; max-height: 70px; width: auto; height: auto; }

/* ————————————————————————————————————————————————————————————————
   Seitenleiste: abgesetzter Fuß (Hilfe, HOAI)
   ———————————————————————————————————————————————————————————————— */

/* Nur ab 860 px sichtbar — darunter ist die Seitenleiste ausgeblendet. Auf dem
   Telefon führen die Verweise unter Einstellungen → Nachschlagen dorthin. */
.leistenfuss {
  margin-top: auto; padding-top: 12px; border-top: 1px solid var(--hair);
  display: flex; flex-direction: column;
}
.leistenfuss button { opacity: .72; }
.leistenfuss button:hover { opacity: 1; }

/* Ein langer Dialog (Kontakt bearbeiten) muss auf dem Telefon scrollen können,
   ohne dass die Knopfreihe mitwandert. */
.dialoginhalt { max-height: 60vh; overflow-y: auto; padding-right: 4px; }

/* ————————————————————————————————————————————————————————————————
   Hilfe, HOAI, Vorlagen
   ———————————————————————————————————————————————————————————————— */

/* Fließtext zum Lesen — schmaler als der Rest, sonst wandert das Auge
   beim Zeilenwechsel zu weit. */
.fliess { max-width: 62ch; color: var(--ink-soft); margin: 0 0 12px; line-height: 1.6; }

.regeln { margin: 0 0 16px; }
.regeln dt {
  display: flex; align-items: baseline; gap: 10px;
  margin-top: 16px; font-weight: 600; color: var(--ink);
}
.regeln dt .fund {
  font-size: 11px; letter-spacing: .04em; color: var(--accent);
  flex: 0 0 auto; min-width: 74px;
}
.regeln dd { margin: 4px 0 0 84px; max-width: 58ch; color: var(--grey-1); line-height: 1.6; }
@media (max-width: 560px) {
  .regeln dd { margin-left: 0; }
}

/* Schlichte Liste ohne Klickfläche — reines Nachschlagen. */
.liste.schlicht li { border-bottom: 1px solid var(--hair); }
.liste.schlicht .zeile {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 14px; padding: 9px 0;
}
.liste.schlicht .zone {
  min-width: 34px; color: var(--accent); font-size: 12px; letter-spacing: .06em;
}

.tabelle { width: 100%; border-collapse: collapse; margin: 10px 0 6px; }
.tabelle th {
  font: 10px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase;
  color: var(--grey-2); text-align: left; font-weight: 400;
  padding: 0 8px 6px 0; border-bottom: 1px solid var(--ink);
}
.tabelle th.r, .tabelle td.r { text-align: right; padding-right: 0; }
.tabelle td { padding: 7px 8px 7px 0; border-bottom: 1px solid var(--hair); font-size: 13.5px; }
.tabelle tfoot td {
  border-top: 1px solid var(--ink); border-bottom: 0;
  padding-top: 8px; font-weight: 600; color: var(--ink);
}
.tabelle.schmal td { padding: 5px 8px 5px 0; font-size: 12px; }
.tabelle .grau { color: var(--grey-2); }

/* Die Honorartafeln sind für ein Telefon zu breit. Sie scrollen in sich, statt
   die ganze Seite quer zu ziehen. */
.tabellenrolle { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tabellenrolle .tabelle { min-width: 560px; }

.hinweiskarte { border-left: 3px solid var(--warn); }

/* Vorschau eines Musterbelegs. Feste Höhe, damit die Seite nicht springt. */
.vorschau {
  width: 100%; height: 78vh; min-height: 480px;
  border: 1px solid var(--hair); border-radius: var(--r);
  background: #fff; margin-top: 6px;
}
@media (max-width: 560px) { .vorschau { height: 62vh; } }

/* ————————————————————————————————————————————————————————————————
   Rechner
   ———————————————————————————————————————————————————————————————— */

.kostengruppe {
  display: grid; grid-template-columns: 70px 1fr 150px 190px 40px;
  gap: 10px; align-items: end; margin-bottom: 8px;
}
.kostengruppe .feld { margin-bottom: 0; }
@media (max-width: 860px) {
  .kostengruppe { grid-template-columns: 70px 1fr; }
  .kostengruppe .feld:nth-child(3), .kostengruppe .feld:nth-child(4) { grid-column: span 2; }
}
.knopf.schmal { min-width: 40px; padding: 0 10px; }

.phasentabelle td { vertical-align: middle; }
.phasentabelle tr.aus td { color: var(--grey-2); }
.phasentabelle input[type="checkbox"] { vertical-align: middle; }
.aufklapp {
  border: 0; background: none; cursor: pointer; color: var(--grey-2);
  font-size: 13px; padding: 4px 6px; min-width: 28px;
}
.aufklapp:hover { color: var(--accent); }
input.zahl.schmal { max-width: 76px; min-height: 34px; padding: 4px 8px; }
.mitEinheit.eng { gap: 4px; justify-content: flex-end; }

/* Grundleistungen einer Phase */
.teilzeile > td { background: var(--flaeche); padding: 12px 10px !important; }
.teilleistungen { display: flex; flex-direction: column; gap: 2px; margin: 8px 0; }
.teilzeile-inhalt {
  display: grid; grid-template-columns: 22px 26px 1fr 96px;
  gap: 8px; align-items: start; padding: 6px 0;
  border-bottom: 1px solid var(--hair);
}
.teilzeile-inhalt .buchstabe { color: var(--grey-2); font-size: 12px; padding-top: 3px; }
.teilzeile-inhalt .teiltext { font-size: 13px; line-height: 1.45; color: var(--ink-soft); }
@media (max-width: 560px) {
  .teilzeile-inhalt { grid-template-columns: 22px 26px 1fr; }
  .teilzeile-inhalt .mitEinheit { grid-column: 3; justify-content: flex-start; }
}

.formelblock {
  border-left: 2px solid var(--hair); padding: 8px 0 8px 14px; margin: 12px 0;
}
.formelblock .formel { font-size: 13px; color: var(--grey-1); }
.formelblock .eingesetzt { font-size: 12px; color: var(--grey-2); margin-top: 3px; }
.formelblock .ergebnis { font-size: 14px; color: var(--ink); margin-top: 5px; font-weight: 600; }

.herleitungsklapp { margin-top: 18px; }
.herleitungsklapp > summary {
  cursor: pointer; padding: 10px 0; border-top: 1px solid var(--hair);
  font: 11px/1 var(--mono); letter-spacing: .1em; text-transform: uppercase; color: var(--grey-2);
}
.herleitungsklapp > summary:hover { color: var(--accent); }
.herleitung h3 { margin-top: 20px; }

/* Volltext der Verordnung */
.norm { border-bottom: 1px solid var(--hair); }
.norm > summary {
  cursor: pointer; padding: 11px 0; display: flex; gap: 12px; align-items: baseline;
}
.norm > summary:hover { color: var(--accent); }
.norm > summary .fund { color: var(--accent); font-size: 11px; min-width: 78px; flex: 0 0 auto; }
.normtext { padding: 2px 0 16px 90px; max-width: 74ch; }
.normtext p { margin: 0 0 8px; font-size: 13.5px; line-height: 1.62; color: var(--ink-soft); }
@media (max-width: 560px) {
  .norm > summary { flex-direction: column; gap: 2px; }
  .normtext { padding-left: 0; }
}

.markenreihe { display: flex; gap: 6px; flex-wrap: wrap; margin: -8px 0 16px; }
.markenreihe .marke {
  font: 10px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase;
  color: var(--grey-2); border: 1px solid var(--hair); border-radius: var(--r); padding: 5px 7px;
}
.fliess.notiz { white-space: pre-wrap; }
.teilfuss { margin-top: 10px; padding-top: 8px; border-top: 1px solid var(--hair); }
.teilfuss .klein.fehler { color: var(--fehler); }
.teilfuss .hinweis.fehler { margin-top: 6px; max-width: 68ch; }

/* Stand eines Projekts */
.standreihe { display: flex; gap: 26px; flex-wrap: wrap; margin: 6px 0 4px; }
.standreihe .feld { margin-bottom: 0; }
.standreihe .feld > label:empty { display: none; }

.marke.aktiv { color: var(--accent); border-color: var(--accent); }
.marke.ruht { color: var(--warn); border-color: var(--warn); }
.marke.fertig { color: var(--grey-2); background: var(--flaeche); }

/* ————————————————————————————————————————————————————————————————
   Synopse
   ———————————————————————————————————————————————————————————————— */

.absatz { margin: 0 0 16px; }
.absatzkopf {
  letter-spacing: .06em; text-transform: uppercase; color: var(--grey-2);
  margin-bottom: 5px;
}
.absatz p { margin: 0 0 4px; font-size: 13.5px; line-height: 1.62; }

/* Entfernter Text durchgestrichen, neuer unterlegt — beides mit Farbe UND
   einer zweiten Auszeichnung, damit es auch ohne Farbunterscheidung lesbar
   bleibt. */
.raus, .diff .raus {
  color: var(--fehler); text-decoration: line-through;
  text-decoration-thickness: 1px;
}
.rein, .diff .rein {
  color: var(--ink); background: rgba(20, 184, 166, .16);
  box-shadow: 0 1px 0 var(--accent);
}
.diff { white-space: pre-wrap; }

.marke.geaendert { color: var(--warn); border-color: var(--warn); }
.marke.neu { color: var(--accent); border-color: var(--accent); }
.marke.entfallen { color: var(--fehler); border-color: var(--fehler); }
.norm > summary .marke { margin-left: auto; }

/* ————————————————————————————————————————————————————————————————
   Honorarzone ermitteln
   ———————————————————————————————————————————————————————————————— */

.zonenergebnis { position: sticky; top: 0; z-index: 2; margin-bottom: 4px; }
.zonenwert { display: flex; align-items: baseline; gap: 12px; margin-bottom: 6px; }
.zonenwert .roemisch {
  font-size: 30px; font-weight: 300; letter-spacing: -.02em; color: var(--accent);
  min-width: 52px;
}

.objekttreffer .eintrag { min-height: 52px; }
.objekttreffer .marke { font-size: 11px; letter-spacing: .06em; }

.merkmal { margin-bottom: 14px; }
.merkmaltext {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 12px; font-size: 13.5px; color: var(--ink-soft); margin-bottom: 4px;
}
.merkmaltext .punktwert { font-size: 12px; color: var(--grey-2); flex: 0 0 auto; }
.merkmal input[type="range"] {
  width: 100%; height: 28px; padding: 0; background: none; cursor: pointer;
  accent-color: var(--accent);
}

/* Rechtstexte: Festbreite, damit die Ausrichtung der Entwürfe erhalten bleibt */
.rechtstext {
  font: 12.5px/1.65 var(--mono); white-space: pre-wrap; word-break: break-word;
  border: 1px solid var(--hair); border-radius: var(--r);
  padding: 18px 20px; background: var(--paper); color: var(--ink-soft);
  max-height: 62vh; overflow-y: auto; margin: 6px 0 0;
}
