/* Feinbuch — Website "Das Schreiben" (siehe DESIGN.md).
   Ein Geschaeftsbrief nach DIN 5008 auf dem Schreibtisch: weisses Papier auf
   Formularpapier, Formgruen fuer Linien, Stempelviolett fuer "geprueft" und
   die Aktion, Stempelrot nur fuer Fehlendes, Textmarker-Gelb nur fuer den
   fertigen Monat. Nur Archivo (selbst ausgeliefert, /assets/fonts.css). */

:root {
  color-scheme: light;
  --desk: #F2F5F1;
  --paper: #FFFFFF;
  --paper-soft: #FAFBF8;
  --field: #EBF1EC;
  --ink: #12221A;
  --ink-soft: #3D5247;
  --ink-mute: #56695F;
  --form: #1E5B45;
  --form-deep: #123D2E;
  --rule: rgba(30, 91, 69, .2);
  --rule-strong: rgba(30, 91, 69, .5);
  --stamp: #5A3A92;
  --stamp-deep: #472C78;
  --red: #B0242B;
  --marker: #FFE45C;
  --metal: #7E8F86;
  --sheet-shadow: 0 1px 0 rgba(18, 34, 26, .04), 0 18px 40px -18px rgba(18, 34, 26, .28), 0 4px 10px -6px rgba(18, 34, 26, .18);
  --paper-edge: 1px solid rgba(30, 91, 69, .14);
  --gutter: 40px;
  --font: 'Archivo', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  margin: 0;
  background: var(--desk);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.55;
  font-feature-settings: 'tnum' 1, 'lnum' 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
a { color: inherit; }
img, svg { display: block; }
h1, h2, h3 { margin: 0; text-wrap: balance; }
p { margin: 0; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--stamp); outline-offset: 3px; border-radius: 2px; }
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 50; background: var(--form); color: #fff; padding: 10px 14px; border-radius: 3px; text-decoration: none; font-weight: 600; }
.skip:focus { top: 12px; }

/* ---------- Kopfleiste ---------- */
.bar { position: sticky; top: 0; z-index: 20; background: rgba(242, 245, 241, .94); border-bottom: 1px solid transparent; transition: border-color .2s; }
@supports (backdrop-filter: blur(6px)) { .bar { background: rgba(242, 245, 241, .86); backdrop-filter: saturate(1.2) blur(8px); } }
.bar.is-scrolled { border-bottom-color: var(--rule); }
.bar-in { max-width: 1320px; margin: 0 auto; padding: 14px var(--gutter); display: flex; align-items: center; gap: 34px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 720; font-size: 20px; letter-spacing: -.01em; }
.brand-box { width: 26px; height: 26px; flex: none; border: 1.5px solid var(--form); border-radius: 2px; position: relative; background: #fff; }
.brand-box svg { position: absolute; inset: -4px -6px auto auto; width: 27px; height: 27px; }
.bar-nav { display: flex; gap: 26px; font-size: 15.5px; color: var(--ink-soft); }
.bar-nav a, .bar-login { text-decoration: none; }
.bar-nav a:hover, .bar-login:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--rule-strong); }
.bar-right { margin-left: auto; display: flex; align-items: center; gap: 20px; font-size: 15px; }
.lang { display: flex; border: 1px solid var(--rule-strong); border-radius: 3px; overflow: hidden; background: #fff; }
.lang button { all: unset; cursor: pointer; padding: 5px 10px; font-size: 13px; font-weight: 650; color: var(--form); line-height: 1.2; }
.lang button[aria-pressed="true"] { background: var(--form); color: #fff; }
.lang button + button { border-left: 1px solid var(--rule-strong); }
.lang button:focus-visible { outline: 2px solid var(--stamp); outline-offset: -2px; }

/* ---------- Knoepfe ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; font: inherit; font-weight: 650; cursor: pointer; text-decoration: none; border-radius: 3px; border: 0; transition: transform .15s var(--ease-out), box-shadow .15s, background-color .15s, color .15s; white-space: nowrap; }
.btn-key { background: var(--stamp); color: #fff; padding: 15px 24px; font-size: 17px; box-shadow: 0 2px 0 var(--stamp-deep), 0 10px 22px -12px rgba(71, 44, 120, .7); }
.btn-key:hover { background: var(--stamp-deep); transform: translateY(-1px); }
.btn-key:active { transform: translateY(1px); box-shadow: 0 1px 0 var(--stamp-deep); }
.btn-key[disabled] { cursor: progress; opacity: .75; transform: none; }
.btn-outline { padding: 8px 14px; font-size: 15px; background: transparent; color: var(--ink); border: 1.5px solid var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-quiet { font-size: 17px; font-weight: 600; color: var(--form); text-decoration: underline; text-underline-offset: 5px; text-decoration-color: var(--rule-strong); padding: 12px 2px; }
.btn-quiet:hover { text-decoration-color: var(--form); }

/* ---------- Schreibtisch ---------- */
.desk { max-width: 1320px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.hero { display: grid; grid-template-columns: minmax(0, 740px) minmax(440px, 1fr); align-items: start; padding-top: 28px; padding-bottom: 96px; }

/* ---------- Der Brief ---------- */
.letter { position: relative; z-index: 1; background: var(--paper); border: var(--paper-edge); box-shadow: var(--sheet-shadow); padding: 54px 70px 64px 96px; }
.letter:focus { outline: none; }
/* Falz- und Lochmarken am linken Rand, wie auf jedem DIN-Briefbogen */
.fold { position: absolute; left: 0; width: 14px; height: 0; border-top: 1px solid var(--ink-mute); opacity: .55; }
.fold-1 { top: 397px; }
.fold-punch { top: 561px; width: 22px; }
.fold-2 { top: 794px; }

.letterhead { display: flex; flex-direction: column; align-items: flex-end; margin-bottom: 40px; }
.wordmark { display: flex; align-items: center; gap: 12px; font-weight: 760; font-size: 27px; letter-spacing: -.015em; line-height: 1; }
.wordmark .brand-box { width: 30px; height: 30px; }
.wordmark .brand-box svg { width: 31px; height: 31px; }
.wordmark-sub { margin-top: 8px; font-size: 13px; color: var(--form); font-weight: 550; }

.letter-meta { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px 40px; align-items: start; }
.address { max-width: 330px; }
.return { font-size: 11.5px; color: var(--ink-mute); border-bottom: 1px solid var(--rule-strong); padding-bottom: 3px; margin-bottom: 14px; display: inline-block; }
.recipient { font-size: 16px; line-height: 1.5; }
.infoblock { margin: 0; display: grid; grid-template-columns: auto auto; gap: 6px 18px; align-content: start; padding-top: 24px; }
.infoblock div { display: contents; }
.infoblock dt { font-size: 12.5px; color: var(--form); padding-top: 2px; }
.infoblock dd { margin: 0; font-size: 15px; font-weight: 600; }

#betreff { margin: 54px 0 34px; font-size: clamp(2.35rem, 3.65vw, 3.55rem); line-height: 1.03; letter-spacing: -.028em; font-weight: 720; font-variation-settings: 'wdth' 94; }
#betreff .soft { color: var(--form); }
.letter-body { max-width: 60ch; }
.letter-body p { font-size: 17.5px; line-height: 1.62; margin-bottom: 14px; }
.letter-body .salutation { margin-bottom: 12px; }
.letter-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 26px; margin: 30px 0 40px; }
.closing { font-size: 17.5px; margin-bottom: 8px; }
.signature { display: flex; align-items: center; gap: 8px; font-size: 19px; font-weight: 720; }

.enclosures { margin-top: 46px; max-width: 470px; }
.enclosures h2 { font-size: 15px; font-weight: 750; margin-bottom: 8px; }
.enclosures ol { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule-strong); }
.enclosures a { display: grid; grid-template-columns: 34px 1fr 16px; gap: 12px; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--rule); text-decoration: none; font-size: 15.5px; }
.enclosures a::after { content: ''; width: 9px; height: 9px; border-right: 1.8px solid var(--form); border-bottom: 1.8px solid var(--form); transform: rotate(45deg) translate(-2px, -2px); opacity: .5; transition: opacity .15s, transform .15s var(--ease-out); }
.enclosures a:hover { color: var(--form); }
.enclosures a:hover::after { opacity: 1; transform: rotate(45deg) translate(1px, 1px); }
.no { display: grid; place-items: center; width: 34px; height: 24px; font-size: 13px; font-weight: 650; color: var(--form); background: var(--field); border: 1px solid var(--rule-strong); }
.no-cut svg { width: 14px; height: 14px; }

/* ---------- Anlage 1: das Monatsblatt ---------- */
.encl-1 { position: sticky; top: 92px; z-index: 2; margin: 132px 0 0 -56px; }
.clip { position: absolute; z-index: 3; width: 30px; height: 82px; left: 30px; top: -34px; transform: rotate(-4deg); filter: drop-shadow(0 2px 1px rgba(18, 34, 26, .25)); }
.encl-tab { position: absolute; top: -26px; right: 22px; font-size: 13px; font-weight: 650; color: var(--form); }
.sheet { position: relative; margin: 0; background: var(--paper); border: 1px solid var(--rule-strong); box-shadow: var(--sheet-shadow); padding: 28px 28px 24px 54px; transform: rotate(1deg); }
.holes { position: absolute; left: 17px; top: 0; bottom: 0; display: flex; flex-direction: column; justify-content: center; gap: 96px; }
.holes span { width: 14px; height: 14px; border-radius: 50%; background: var(--desk); box-shadow: inset 0 1px 2px rgba(18, 34, 26, .28); }
.sheet-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: 'title month' 'biz biz'; gap: 12px 18px; align-items: end; padding-bottom: 14px; border-bottom: 2px solid var(--form); }
.sheet-title { grid-area: title; font-weight: 750; font-size: 21px; letter-spacing: -.01em; line-height: 1.15; }
.sheet-title small { display: block; font-size: 12.5px; font-weight: 500; color: var(--form); letter-spacing: 0; margin-bottom: 4px; }
.meta { grid-area: month; font-size: 12px; color: var(--form); line-height: 1.2; }
.meta-biz { grid-area: biz; display: flex; align-items: center; gap: 10px; }
.meta b { display: block; margin-top: 5px; font-size: 15px; color: var(--ink); font-weight: 600; border: 1px solid var(--rule-strong); background: var(--field); padding: 4px 9px; border-radius: 1px; white-space: nowrap; }
.meta-biz b { margin-top: 0; }
.cols, .line { display: grid; grid-template-columns: 34px minmax(0, 1fr) 62px 124px; align-items: center; gap: 0 12px; }
.cols { font-size: 12px; color: var(--form); padding: 10px 0 8px; border-bottom: 1px solid var(--rule-strong); }
.qty-h { text-align: right; padding-right: 4px; }
.lines { list-style: none; margin: 0; padding: 0; }
.line { min-height: 58px; border-bottom: 1px solid var(--rule); position: relative; }
.line .what { font-weight: 600; font-size: 16px; line-height: 1.25; padding: 8px 0; }
.line .what small { display: block; font-weight: 400; font-size: 13px; color: var(--ink-soft); margin-top: 3px; }
.line .qty { font-size: 15.5px; font-weight: 600; text-align: right; padding-right: 4px; white-space: nowrap; }
.line .qty.is-short { color: var(--red); }
.line .check { position: relative; height: 52px; display: grid; align-items: center; justify-items: start; }
.line .check .stamp + .stamp { position: absolute; left: 0; top: 50%; margin-top: -19px; }
.line.total { border-bottom: 0; min-height: 96px; align-items: start; padding-top: 14px; }
.line.total .what { grid-column: 2 / -1; font-size: 15px; color: var(--ink-soft); font-weight: 500; position: relative; z-index: 0; justify-self: start; padding: 2px 0; }
/* Textmarker: der einzige Gelbton, nur fuer den fertigen Monat */
.line.total .what::before { content: ''; position: absolute; z-index: -1; left: -8px; right: -12px; top: 50%; height: 1.35em; transform: translateY(-48%) rotate(-1.2deg); background: var(--marker); border-radius: 3px 9px 4px 10px; mix-blend-mode: multiply; clip-path: inset(0 100% 0 0); transition: clip-path .7s cubic-bezier(.65, 0, .35, 1); }
.line.total.is-done .what { color: var(--ink); font-weight: 650; font-size: 16px; }
.line.total.is-done .what::before { clip-path: inset(0 0 0 0); }
.sheet-foot { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 16px; padding: 0 6px; font-size: 13px; color: var(--ink-soft); }
.replay { all: unset; cursor: pointer; color: var(--form); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; text-decoration-color: var(--rule-strong); }
.replay:hover { text-decoration-color: var(--form); }
.replay:focus-visible { outline: 2px solid var(--stamp); outline-offset: 3px; }

/* ---------- Stempel ---------- */
.stamp {
  --r: -4deg;
  display: inline-flex; flex-direction: column; align-items: center; line-height: 1; padding: 6px 9px 5px;
  font-style: normal; font-weight: 820; font-variation-settings: 'wdth' 66; text-transform: uppercase;
  letter-spacing: .07em; font-size: 15.5px; color: var(--stamp); white-space: nowrap;
  border: 2.4px solid currentColor; border-radius: 4px; box-shadow: inset 0 0 0 2px #fff, inset 0 0 0 3.4px currentColor;
  transform: rotate(var(--r)); mix-blend-mode: multiply; opacity: .94; filter: url(#ink);
}
.stamp em { font-style: normal; font-weight: 720; font-size: 10.5px; letter-spacing: .09em; margin-top: 3px; }
.stamp.red { color: var(--red); }
.stamp.is-hidden { visibility: hidden; }
.stamp.lands { animation: land .5s var(--ease-out) both; }
@keyframes land {
  0%   { opacity: 0; transform: scale(1.9) rotate(calc(var(--r) - 9deg)); filter: url(#ink) blur(4px); }
  55%  { opacity: .95; transform: scale(.96) rotate(var(--r)); filter: url(#ink) blur(0); }
  100% { opacity: .92; transform: scale(1) rotate(var(--r)); }
}
.stamp.void { animation: void .45s ease-out forwards; }
@keyframes void { to { opacity: 0; transform: rotate(var(--r)) scale(.9); filter: url(#ink) blur(2px); } }
.big-stamp {
  position: absolute; right: 30px; bottom: 26px; --r: -7deg;
  font-size: 36px; padding: 11px 18px 9px; letter-spacing: .06em; border-width: 3.2px;
  box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 5px currentColor; pointer-events: none;
}
.big-stamp em { font-size: 13px; margin-top: 6px; letter-spacing: .08em; }

/* ---------- Anlagen 2-5 ---------- */
.encl { position: relative; padding-bottom: 96px; }
.paper { position: relative; background: var(--paper); border: var(--paper-edge); box-shadow: var(--sheet-shadow); padding: 34px 64px 60px; }
.encl-cap { font-size: 13px; color: var(--form); font-weight: 550; padding-bottom: 10px; border-bottom: 1px solid var(--rule-strong); margin-bottom: 44px; }
.encl h2 { font-size: clamp(2rem, 3.1vw, 2.95rem); line-height: 1.05; letter-spacing: -.024em; font-weight: 720; font-variation-settings: 'wdth' 94; margin-bottom: 18px; }
.encl h3 { font-size: 15px; font-weight: 750; }
.intro { color: var(--ink-soft); font-size: 18.5px; line-height: 1.55; max-width: 48ch; }

/* Anlage 2: Telefon */
.encl-2 { display: grid; grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
.encl-2 .paper { padding-right: 150px; }
.steps { list-style: none; margin: 40px 0 0; padding: 0; border-top: 2px solid var(--form); max-width: 640px; }
.steps li { display: grid; grid-template-columns: 50px 1fr; gap: 16px; padding: 20px 0; border-bottom: 1px solid var(--rule); }
.steps .sec { font-weight: 800; font-variation-settings: 'wdth' 70; font-size: 30px; color: var(--form); line-height: 1; }
.steps b { display: block; font-size: 18px; margin-bottom: 3px; }
.steps li > span:last-child > span { color: var(--ink-soft); font-size: 16.5px; }
.also { margin-top: 38px; max-width: 640px; }
.also ul { list-style: none; margin: 8px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 28px; border-top: 1px solid var(--rule-strong); }
.also li { position: relative; font-size: 15px; color: var(--ink-soft); padding: 9px 0 9px 20px; border-bottom: 1px solid var(--rule); }
.also li::before { content: ''; position: absolute; left: 0; top: 15px; width: 9px; height: 9px; border: 1.5px solid var(--form); background: var(--field); }

.phone { position: relative; z-index: 2; width: 380px; height: 784px; margin: 70px 0 0 -110px; border-radius: 52px; background: #0F1A15; padding: 11px; box-shadow: 0 40px 70px -30px rgba(18, 34, 26, .55), 0 10px 20px -10px rgba(18, 34, 26, .35); transform: rotate(-2.2deg); }
.screen { width: 100%; height: 100%; border-radius: 42px; background: var(--paper-soft); overflow: hidden; display: flex; flex-direction: column; font-size: 15px; line-height: 1.4; }
.status { display: flex; justify-content: space-between; align-items: center; padding: 15px 28px 0; font-size: 14px; font-weight: 650; }
.app-head { margin: 0 18px; padding: 18px 0 12px; display: flex; justify-content: space-between; align-items: flex-end; border-bottom: 2px solid var(--form); }
.app-head small { display: block; color: var(--form); font-size: 12.5px; margin-bottom: 5px; font-weight: 600; }
.app-head b { display: block; font-size: 28px; letter-spacing: -.02em; font-weight: 740; line-height: 1; }
.chip { font-size: 12px; font-weight: 700; border: 1.5px solid var(--form); color: var(--form); padding: 2px 7px; border-radius: 2px; }
.boxes { display: flex; gap: 6px; margin: 13px 18px 2px; align-items: center; }
.boxes i { width: 21px; height: 21px; border: 1px solid var(--rule-strong); background: #fff; position: relative; }
.boxes i.tick::after { content: ''; position: absolute; left: 6px; top: 1px; width: 6px; height: 12px; border-right: 2.6px solid var(--stamp); border-bottom: 2.6px solid var(--stamp); transform: rotate(40deg); }
.boxes i.cross::before, .boxes i.cross::after { content: ''; position: absolute; left: 3px; right: 3px; top: 9px; height: 2.4px; background: var(--red); border-radius: 1px; transform: rotate(45deg); }
.boxes i.cross::after { transform: rotate(-45deg); }
.boxes span { margin-left: 7px; font-size: 13px; color: var(--ink-soft); }
.m-lines { list-style: none; margin: 6px 18px 0; padding: 0; }
.m-lines li { display: grid; grid-template-columns: 30px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--rule); font-size: 14.5px; }
.m-lines .no { width: 30px; height: 20px; font-size: 11px; }
.m-lines .stamp { font-size: 11px; padding: 3px 6px 2px; border-width: 1.8px; box-shadow: inset 0 0 0 1.5px #fff, inset 0 0 0 2.6px currentColor; }
.m-lines b { font-weight: 600; }
.m-lines .qty { color: var(--ink-soft); font-weight: 500; margin-left: 6px; }
.last { margin: 14px 18px 0; display: grid; grid-template-columns: 128px 1fr; gap: 14px; align-items: start; }
.last-label { grid-column: 1 / -1; font-size: 12.5px; color: var(--form); font-weight: 650; margin-bottom: -4px; }
.receipt { position: relative; background: #fff; padding: 10px 9px 16px; font-variation-settings: 'wdth' 66; font-size: 9.5px; line-height: 1.45; text-transform: uppercase; letter-spacing: .03em; color: #2B2B2B; transform: rotate(-2deg); box-shadow: 0 6px 14px -8px rgba(0, 0, 0, .4);
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - 6px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 8px 6px repeat-x;
  mask: linear-gradient(#000 0 0) top / 100% calc(100% - 6px) no-repeat, conic-gradient(from -45deg at bottom, #0000, #000 1deg 89deg, #0000 90deg) bottom / 8px 6px repeat-x; }
.receipt .c { text-align: center; font-weight: 700; font-size: 10.5px; }
.receipt .c.thin { font-weight: 400; font-size: 9.5px; }
.receipt .row { display: flex; justify-content: space-between; gap: 6px; }
.receipt .row.gap { margin-top: 6px; }
.receipt .sum { border-top: 1px dashed #999; margin-top: 4px; padding-top: 3px; font-weight: 700; }
.read { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 5px 10px; font-size: 13.5px; }
.read dt { color: var(--form); font-size: 11.5px; padding-top: 2px; }
.read dd { margin: 0; font-weight: 600; }
.review { margin: auto 18px 12px; display: grid; grid-template-columns: 34px 1fr 18px; gap: 12px; align-items: center; padding: 10px 12px; border: 1.5px solid var(--form); border-radius: 3px; color: var(--form); background: #fff; }
.review .count { width: 34px; height: 34px; display: grid; place-items: center; background: var(--field); border: 1px solid var(--rule-strong); font-weight: 750; font-size: 17px; }
.review b { display: block; color: var(--ink); font-size: 15px; }
.review small { display: block; color: var(--ink-soft); font-size: 12px; margin-top: 1px; }
.capture { margin: 0 18px 12px; background: var(--stamp); color: #fff; border-radius: 4px; padding: 13px 16px; display: grid; grid-template-columns: 30px 1fr; gap: 12px; align-items: center; box-shadow: 0 2px 0 var(--stamp-deep); }
.capture b { display: block; font-size: 17px; font-weight: 700; }
.capture small { display: block; font-size: 12px; opacity: .85; margin-top: 2px; }
.capture small:empty { display: none; }
.tabs { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--rule); padding: 9px 8px 22px; background: #fff; }
.tabs > span { display: grid; justify-items: center; gap: 3px; font-size: 11px; color: var(--ink-soft); text-align: center; }
.tabs > span.on { color: var(--form); font-weight: 700; }
.tabs svg { width: 22px; height: 22px; }

/* Anlage 3: Personal */
.a3-head { max-width: 700px; margin-bottom: 40px; }
.akte { width: 100%; border-collapse: collapse; font-size: 16px; }
.akte thead th { font-size: 12.5px; font-weight: 500; color: var(--form); text-align: left; padding: 0 16px 9px 0; border-bottom: 2px solid var(--form); }
.akte tbody th, .akte tbody td { text-align: left; vertical-align: top; padding: 16px 16px 16px 0; border-bottom: 1px solid var(--rule); }
.akte tbody th { font-weight: 650; width: 230px; }
.akte tbody td { color: var(--ink-soft); }
.akte .c-no { width: 58px; }
.akte sup, .footnote sup { font-size: .7em; color: var(--form); font-weight: 700; margin-left: 1px; }
.footnote { margin-top: 20px; font-size: 14px; color: var(--ink-soft); max-width: 78ch; }
.quittung { position: absolute; top: 72px; right: calc(var(--gutter) + 46px); width: 260px; background: #FFFDF6; padding: 16px 18px 14px; transform: rotate(3.2deg); box-shadow: 0 1px 0 rgba(18, 34, 26, .05), 0 16px 30px -16px rgba(18, 34, 26, .4); border-top: 3px dashed rgba(18, 34, 26, .12); font-size: 13px; }
.q-head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1.5px solid var(--ink); padding-bottom: 6px; margin-bottom: 8px; }
.q-head b { font-size: 17px; font-weight: 760; }
.q-head span { font-size: 12px; color: var(--ink-soft); }
.q-row { display: flex; justify-content: space-between; padding: 3px 0; border-bottom: 1px dotted var(--rule-strong); }
.q-row span:first-child { color: var(--ink-mute); font-size: 12px; }
.q-row span:last-child { font-weight: 600; }
.q-sign { width: 170px; height: 46px; margin: 8px 0 0 6px; }
.q-foot { border-top: 1px solid var(--ink-mute); padding-top: 4px; font-size: 11px; color: var(--ink-mute); }

/* Anlage 4: Kanzlei */
.a4-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 64px; align-items: start; }
.a4-plus { margin-top: 34px; padding-top: 14px; border-top: 1px solid var(--rule-strong); }
.a4-plus p, .a4-not p { margin-top: 4px; font-size: 16px; color: var(--ink-soft); max-width: 46ch; }
.a4-not { margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--rule-strong); }
.folder { position: relative; background: var(--field); border: 1px solid var(--rule-strong); border-radius: 2px; padding: 26px 28px 22px; margin-top: 18px; }
.folder-tab { position: absolute; top: -27px; left: -1px; padding: 4px 16px 3px; background: var(--field); border: 1px solid var(--rule-strong); border-bottom: 0; border-radius: 3px 3px 0 0; font-size: 12.5px; font-weight: 700; color: var(--form); }
.folder-name { font-weight: 700; font-size: 16.5px; padding-bottom: 12px; border-bottom: 2px solid var(--form); overflow-wrap: anywhere; }
.tree { list-style: none; margin: 0; padding: 0; }
.tree li { display: grid; grid-template-columns: auto minmax(16px, 1fr) auto; gap: 10px; align-items: baseline; padding: 11px 0; border-bottom: 1px solid var(--rule); font-size: 15.5px; }
.tree .f { font-weight: 650; }
.tree .lead { border-bottom: 1.5px dotted var(--rule-strong); transform: translateY(-4px); }
.tree .d { color: var(--ink-soft); text-align: right; font-size: 14.5px; }
/* Nur in TR/EN: warum die Ordnernamen deutsch bleiben */
.folder-note { margin-top: 14px; font-size: 13.5px; color: var(--ink-soft); }
.folder-note:empty { display: none; }

/* Anlage 5: Gebuehren */
.a5-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px 40px; flex-wrap: wrap; margin-bottom: 30px; }
.seg { display: flex; border: 1px solid var(--rule-strong); border-radius: 3px; overflow: hidden; background: #fff; }
.seg button { all: unset; cursor: pointer; padding: 9px 14px; font-size: 14.5px; font-weight: 650; color: var(--form); }
.seg button[aria-pressed="true"] { background: var(--form); color: #fff; }
.seg button + button { border-left: 1px solid var(--rule-strong); }
.seg button:focus-visible { outline: 2px solid var(--stamp); outline-offset: -3px; }
.fees { width: 100%; border-collapse: collapse; table-layout: fixed; }
.fees thead th { text-align: left; vertical-align: bottom; padding: 0 18px 12px; border-bottom: 2px solid var(--form); }
.fees thead td { border-bottom: 2px solid var(--form); width: 34%; }
.fees .plan { display: block; font-size: 24px; font-weight: 750; letter-spacing: -.01em; }
.fees thead small { display: block; font-size: 13.5px; color: var(--ink-soft); font-weight: 500; margin-top: 2px; }
.fees tbody th { text-align: left; font-weight: 500; font-size: 15.5px; color: var(--ink-soft); padding: 13px 18px 13px 0; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.fees tbody td { padding: 13px 18px; border-bottom: 1px solid var(--rule); font-size: 16px; font-weight: 600; vertical-align: middle; }
.fees .main { background: rgba(235, 241, 236, .7); }
.fees thead th.main { box-shadow: inset 0 3px 0 var(--form); }
.fees tr.price td { padding-top: 20px; padding-bottom: 18px; }
.fees .js-price { display: block; font-size: 34px; font-weight: 760; letter-spacing: -.02em; line-height: 1.05; }
.fees .js-per { display: block; font-size: 13px; font-weight: 500; color: var(--ink-soft); margin-top: 4px; }
/* Angekreuzt wie auf einem Papierformular: Tinten-X im Kaestchen */
.x { display: inline-block; width: 20px; height: 20px; border: 1px solid var(--rule-strong); background: #fff; position: relative; vertical-align: middle; }
.x::before, .x::after { content: ''; position: absolute; left: 2px; right: 2px; top: 8.5px; height: 2px; background: var(--ink); border-radius: 1px; transform: rotate(42deg); }
.x::after { transform: rotate(-46deg); }
.dash { color: var(--ink-mute); font-weight: 500; padding-left: 6px; }
.fee-foot { display: flex; justify-content: space-between; align-items: center; gap: 20px 40px; flex-wrap: wrap; margin-top: 28px; }
.fee-foot p { color: var(--ink-soft); font-size: 16px; max-width: 60ch; }

/* ---------- Rueckantwort ---------- */
.reply { padding-bottom: 110px; }
.cut { display: flex; align-items: center; gap: 10px; color: var(--ink-mute); font-size: 13px; margin: 0 0 26px; }
.cut::after { content: ''; flex: 1; border-top: 1.5px dashed var(--rule-strong); }
.cut svg { transform: rotate(180deg); color: var(--form); }
.slip { position: relative; background: var(--paper); border: var(--paper-edge); box-shadow: var(--sheet-shadow); padding: 36px 64px 44px; max-width: 1080px; }
.slip-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; padding-bottom: 14px; border-bottom: 2px solid var(--form); }
.slip-to { font-size: 13px; color: var(--form); font-weight: 600; margin-bottom: 4px; }
.slip h2 { font-size: clamp(2rem, 3.1vw, 2.95rem); line-height: 1.05; letter-spacing: -.024em; font-weight: 720; font-variation-settings: 'wdth' 94; }
.slip-ref { font-size: 13px; color: var(--form); }
.slip-ref b { color: var(--ink); font-size: 15px; margin-left: 4px; }
.slip-lead { margin: 22px 0 26px; font-size: 18.5px; font-weight: 600; max-width: 52ch; }
.slip-body { border: 0; margin: 0; padding: 0; min-width: 0; }
.slip-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 0 56px; }
.field { margin-bottom: 18px; }
.field label, .choice legend { display: block; font-size: 13px; color: var(--form); font-weight: 600; margin-bottom: 6px; }
.field input, .field textarea { width: 100%; font: inherit; font-size: 17px; color: var(--ink); background: var(--field); border: 1px solid var(--rule-strong); border-radius: 2px; padding: 11px 12px; transition: border-color .15s, background-color .15s; }
.field textarea { resize: vertical; min-height: 92px; line-height: 1.45; }
.field input:hover, .field textarea:hover { border-color: var(--form); }
.field input:focus, .field textarea:focus { outline: 2px solid var(--stamp); outline-offset: 2px; background: #fff; }
.err { display: none; color: var(--red); font-size: 13.5px; font-weight: 550; margin-top: 6px; }
.is-invalid .err { display: block; }
.is-invalid input:not([type="radio"]):not([type="checkbox"]), .is-invalid textarea { border-color: var(--red); background: #FBEFF0; }
.choice { border: 0; margin: 0 0 18px; padding: 0; min-width: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.choice legend { float: left; width: 100%; }
.choice label { position: relative; display: inline-flex; align-items: center; gap: 8px; cursor: pointer; padding: 7px 12px 7px 9px; border: 1px solid var(--rule-strong); border-radius: 2px; background: #fff; font-size: 15.5px; min-height: 40px; transition: border-color .15s, background-color .15s; }
.choice label:hover { border-color: var(--form); }
.choice input { appearance: none; -webkit-appearance: none; margin: 0; width: 18px; height: 18px; border: 1.5px solid var(--form); border-radius: 1px; background: #fff; flex: none; position: relative; cursor: pointer; }
.choice input:checked::before, .choice input:checked::after { content: ''; position: absolute; left: 1px; right: 1px; top: 6.5px; height: 2px; background: var(--ink); border-radius: 1px; transform: rotate(42deg); }
.choice input:checked::after { transform: rotate(-46deg); }
.choice label:has(input:checked) { border-color: var(--form); background: var(--field); font-weight: 600; }
.choice input:focus-visible { outline: 2px solid var(--stamp); outline-offset: 3px; }
.field-wide { margin-top: 4px; }
.hp { position: absolute; left: -9999px; top: auto; width: 1px; height: 1px; overflow: hidden; }
.consent { display: grid; grid-template-columns: 22px 1fr; gap: 4px 12px; align-items: start; margin: 6px 0 26px; font-size: 14.5px; color: var(--ink-soft); max-width: 82ch; }
.consent input { appearance: none; -webkit-appearance: none; margin: 2px 0 0; width: 20px; height: 20px; border: 1.5px solid var(--form); border-radius: 1px; background: #fff; position: relative; cursor: pointer; }
.consent input:checked::before, .consent input:checked::after { content: ''; position: absolute; left: 1.5px; right: 1.5px; top: 7.5px; height: 2px; background: var(--ink); border-radius: 1px; transform: rotate(42deg); }
.consent input:checked::after { transform: rotate(-46deg); }
.consent label { cursor: pointer; }
.consent a { color: var(--form); text-underline-offset: 3px; }
.consent .err { grid-column: 2; margin-top: 0; }
.consent.is-invalid input { border-color: var(--red); }
.slip-foot { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 24px; }
.slip-note { font-size: 14px; color: var(--ink-soft); }
.form-status { margin-top: 18px; font-size: 16px; font-weight: 600; color: var(--ink); max-width: 46ch; }
.form-status:empty { display: none; }
.form-status.is-error { color: var(--red); }
.slip.is-received .slip-body { opacity: .55; }
.slip.is-received .slip-foot { display: none; }
.slip.is-received .form-status { font-size: 18px; }
.received { position: absolute; right: 64px; bottom: 54px; --r: -8deg; font-size: 46px; padding: 13px 22px 11px; border-width: 3.4px; box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 5.4px currentColor; pointer-events: none; z-index: 2; }
.received em { font-size: 14px; margin-top: 7px; }

/* ---------- Fusszeile ---------- */
.foot { border-top: 1px solid var(--rule); background: var(--desk); }
.foot-in { max-width: 1320px; margin: 0 auto; padding: 28px var(--gutter) 56px; display: grid; grid-template-columns: repeat(3, auto) minmax(0, 1fr); gap: 20px 0; font-size: 13.5px; color: var(--ink-soft); }
.foot-col { display: flex; flex-direction: column; gap: 3px; padding: 0 28px; border-left: 1px solid var(--rule); }
.foot-col:first-child { padding-left: 0; border-left: 0; }
.foot-col b { color: var(--ink); font-weight: 700; }
.foot-col a { text-decoration: none; }
.foot-col a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.foot-note { justify-content: flex-start; }

/* ---------- Breakpoints ---------- */
@media (max-width: 1180px) {
  .hero { grid-template-columns: minmax(0, 1fr); justify-items: center; }
  .letter { width: 100%; max-width: 820px; }
  .encl-1 { position: relative; top: auto; width: 100%; max-width: 640px; margin: -24px 0 0; }
  .encl-2 { grid-template-columns: minmax(0, 1fr); }
  .encl-2 .paper { padding-right: 64px; }
  .phone { margin: -40px auto 0; justify-self: center; transform: rotate(-1.5deg); }
  .quittung { display: none; }
  .bar-nav { display: none; }
}
@media (max-width: 860px) {
  :root { --gutter: 22px; }
  .letter { padding: 40px 36px 48px 48px; }
  .paper, .slip { padding: 30px 32px 44px; }
  .encl-2 .paper { padding-right: 32px; }
  .a4-grid { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .slip-grid { grid-template-columns: minmax(0, 1fr); }
  .received { right: 28px; bottom: 120px; font-size: 38px; }
  .foot-in { grid-template-columns: repeat(3, auto); }
  .foot-note { grid-column: 1 / -1; border-left: 0; padding-left: 0; }
  /* Gebuehren: Zeilenbeschriftung ueber die drei Werte */
  .fees, .fees thead, .fees tbody, .fees tr { display: block; }
  .fees thead tr, .fees tbody tr { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .fees thead td { display: none; }
  .fees thead th { padding: 0 10px 10px; }
  .fees tbody th { grid-column: 1 / -1; padding: 12px 0 2px; border-bottom: 0; font-size: 14px; }
  .fees tbody td { display: block; padding: 4px 10px 12px; font-size: 15px; }
  .fees tr.price td { padding-top: 6px; }
}
@media (max-width: 640px) {
  :root { --gutter: 10px; }
  html { scroll-padding-top: 70px; }
  body { font-size: 16px; }
  .bar-in { padding: 10px 14px; gap: 12px; }
  .brand { font-size: 18px; gap: 8px; }
  .brand-box { width: 22px; height: 22px; }
  .brand-box svg { width: 23px; height: 23px; inset: -3px -5px auto auto; }
  .bar-right { gap: 10px; }
  .bar-login { display: none; }
  .lang button { padding: 5px 8px; font-size: 12.5px; }
  .bar .btn-outline { padding: 7px 10px; font-size: 13.5px; }
  .hero { padding-top: 10px; padding-bottom: 64px; }
  .letter { padding: 26px 20px 34px 22px; }
  .fold { display: none; }
  .letterhead { margin-bottom: 26px; }
  .wordmark { font-size: 22px; gap: 10px; }
  .wordmark .brand-box { width: 25px; height: 25px; }
  .wordmark .brand-box svg { width: 26px; height: 26px; }
  .wordmark-sub { font-size: 12px; }
  .letter-meta { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .recipient { font-size: 15px; }
  .infoblock { padding-top: 0; grid-template-columns: auto 1fr; gap: 3px 14px; }
  .infoblock dd { font-size: 14.5px; }
  #betreff { margin: 34px 0 24px; font-size: 2.15rem; }
  .letter-body p { font-size: 16.5px; }
  .letter-actions { margin: 24px 0 32px; }
  .letter-actions .btn-key { width: 100%; }
  .enclosures { margin-top: 36px; }
  .encl-1 { margin-top: 30px; }
  .clip { left: auto; right: 26px; top: -30px; transform: rotate(5deg); }
  .encl-tab { right: auto; left: 8px; top: -24px; }
  .sheet { padding: 22px 14px 18px 34px; transform: none; }
  .holes { left: 10px; gap: 120px; }
  .holes span { width: 12px; height: 12px; }
  .sheet-head { grid-template-columns: minmax(0, 1fr); grid-template-areas: 'title' 'month' 'biz'; }
  .meta { display: flex; align-items: center; gap: 10px; }
  .meta b { margin-top: 0; }
  .cols, .line { grid-template-columns: 30px minmax(0, 1fr) 54px; gap: 0 10px; }
  .cols span:last-child { display: none; }
  .line .no { width: 30px; height: 22px; font-size: 12px; }
  .line .what { font-size: 15px; }
  .line .qty { font-size: 14.5px; }
  .line .check { grid-column: 2 / -1; height: auto; min-height: 40px; padding-bottom: 10px; }
  .line .check .stamp + .stamp { top: 0; margin-top: 0; }
  .line.total { min-height: 120px; }
  .big-stamp { font-size: 27px; right: 12px; bottom: 16px; }
  .encl { padding-bottom: 56px; }
  .paper, .slip { padding: 22px 18px 34px; }
  .encl-2 .paper { padding-right: 18px; }
  .encl-cap { margin-bottom: 28px; font-size: 12.5px; }
  .intro { font-size: 17px; }
  .steps li { grid-template-columns: 34px 1fr; gap: 12px; }
  .steps .sec { font-size: 26px; }
  .also ul { grid-template-columns: minmax(0, 1fr); }
  .phone { width: 100%; max-width: 360px; height: 760px; margin-top: -24px; transform: none; border-radius: 46px; }
  .screen { border-radius: 36px; }
  .akte, .akte thead, .akte tbody, .akte tr, .akte th, .akte td { display: block; }
  .akte thead { display: none; }
  .akte tbody tr { display: grid; grid-template-columns: 42px minmax(0, 1fr); padding: 14px 0; border-bottom: 1px solid var(--rule); }
  .akte tbody th, .akte tbody td { padding: 0; border: 0; width: auto; }
  .akte .c-no { grid-row: span 2; width: auto; }
  .akte tbody td:last-child { grid-column: 2; margin-top: 3px; font-size: 15px; }
  .tree li { grid-template-columns: minmax(0, 1fr); gap: 1px; }
  .tree .lead { display: none; }
  .tree .d { text-align: left; }
  .folder { padding: 20px 16px 16px; }
  .seg { width: 100%; }
  .seg button { flex: 1; text-align: center; padding: 9px 8px; font-size: 13.5px; }
  .fees .plan { font-size: 18px; }
  .fees thead small { font-size: 12px; }
  .fees thead th { padding: 0 6px 10px; }
  .fees tbody td { padding: 4px 6px 12px; }
  .fees .js-price { font-size: 25px; }
  .fees .js-per { font-size: 12px; }
  .fee-foot .btn-key { width: 100%; }
  .slip-head { flex-direction: column; align-items: flex-start; gap: 6px; }
  .slip-lead { font-size: 17px; }
  .slip-foot .btn-key { width: 100%; }
  .received { right: 16px; bottom: 120px; font-size: 32px; }
  .foot-in { grid-template-columns: minmax(0, 1fr); padding-bottom: 40px; }
  .foot-col { border-left: 0; padding: 0; }
}
@media (max-width: 380px) {
  .bar .btn-outline { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .stamp.lands, .stamp.void { animation: none; }
  .line.total .what::before { transition: none; }
}
@media print {
  .bar, .skip, .replay, .phone, .quittung { display: none !important; }
  body { background: #fff; }
  .letter, .paper, .slip, .sheet { box-shadow: none; transform: none; }
}

/* ---------- Rechtstexte (Impressum, Datenschutz) ---------- */
.legal { max-width: 860px; margin: 28px auto 96px; padding: 0 var(--gutter); }
.legal .paper { padding: 44px 64px 60px; }
.legal h1 { font-size: clamp(2rem, 3.1vw, 2.8rem); line-height: 1.05; letter-spacing: -.024em; font-weight: 720; font-variation-settings: 'wdth' 94; margin-bottom: 26px; }
.legal h2 { font-size: 19px; font-weight: 720; margin: 34px 0 8px; }
.legal p, .legal li { font-size: 16.5px; line-height: 1.6; color: var(--ink); max-width: 68ch; }
.legal p + p { margin-top: 10px; }
.legal ul { padding-left: 20px; margin: 8px 0 0; }
.legal .todo { background: var(--field); border: 1px dashed var(--rule-strong); padding: 0 4px; font-weight: 600; color: var(--form-deep); }
.legal .draft { border: 1.5px solid var(--red); color: var(--red); padding: 10px 14px; font-size: 15px; font-weight: 600; margin-bottom: 26px; }
.legal .back { display: inline-block; margin-bottom: 18px; color: var(--form); font-weight: 600; text-underline-offset: 4px; }
@media (max-width: 640px) { .legal .paper { padding: 26px 18px 36px; } }
