/* /steuerberatung (web/steuerberatung-src/build.mjs). Builds on /site.css tokens: light and dark come with them. */
.stb [hidden] { display: none !important; }
/* Field borders at 3:1 or more against --bg, --surface and --surface-2 (WCAG 1.4.11; design-review
   30.10.2026 S8): light 3.33, 3.61, 3.18; dark 3.78, 3.54, 3.33. */
.stb { --stb-field-line: #7f8984; }
@media (prefers-color-scheme: dark) { .stb { --stb-field-line: #65726c; } }
.stb-main { max-width: 760px; padding: 40px 0 64px; display: grid; gap: 40px; }
.stb h1 { font-size: clamp(28px, 4.4vw, 40px); line-height: 1.15; margin: 0 0 12px; letter-spacing: -0.01em; }
.stb h2 { font-size: 21px; margin: 0 0 8px; }
.stb .lead { color: var(--text-2); font-size: 17px; margin: 0; max-width: 62ch; }
.stb .hint, .stb .f small { font-size: 13.5px; color: var(--text-3); margin: 0; }
.stb-head, .stb-client { display: grid; gap: 4px; }
.stb-client { gap: 20px; }
.stb-client .eyebrow { margin-bottom: -12px; }
.stb-rows { margin: 0; display: grid; gap: 0; border-radius: var(--r); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); overflow: hidden; }
.stb-rows div { display: grid; grid-template-columns: minmax(0, 15em) minmax(0, 1fr); gap: 12px; padding: 10px 16px; border-top: 1px solid var(--line); }
.stb-rows div:first-child { border-top: 0; }
.stb-rows dt { color: var(--text-2); font-size: 14.5px; }
.stb-rows dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }
@media (max-width: 560px) { .stb-rows div { grid-template-columns: minmax(0, 1fr); gap: 0; } }
.stb-steps { list-style: none; counter-reset: s; padding: 0; margin: 0; display: grid; gap: 14px; }
.stb-steps li { counter-increment: s; position: relative; padding: 18px 18px 18px 60px; border-radius: var(--r); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.stb-steps li::before { content: counter(s); position: absolute; left: 18px; top: 18px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-weight: 600; font-size: 14px; }
.stb-steps h2 { font-size: 18px; margin: 2px 0 4px; }
.stb-steps p { margin: 0; color: var(--text-2); }
.stb-steps p + p { margin-top: 6px; }
.stb-dl, .stb-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.stb-dl .btn, .stb-actions .btn { max-width: 100%; }
.stb-after { margin: 0; color: var(--text-2); }
.stb-unchecked { margin: -8px 0 0; color: var(--text-2); }
.stb-personal { margin: 0; padding: 12px 16px; border-radius: var(--r); background: var(--warn-soft); box-shadow: inset 4px 0 0 var(--warn); font-weight: 500; }
.stb-bad { padding: 14px 16px; border-radius: var(--r); background: var(--warn-soft); box-shadow: inset 4px 0 0 var(--warn); }
.stb-bad p { margin: 0; }
.stb-bad p + p { margin-top: 6px; color: var(--text-2); }
.stb-make { display: grid; gap: 16px; padding: 24px; border-radius: var(--r-lg); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.stb-make h2 { margin: 0; }
.stb-form { display: grid; gap: 16px; }
.stb-form .f { display: grid; gap: 6px; min-width: 0; align-content: start; }
.stb-form label { font-size: 14px; font-weight: 500; }
.stb-form input, .stb-form select, .stb-link {
  width: 100%; min-width: 0; height: 44px; padding: 0 12px; border: 0; border-radius: 10px; font: inherit; font-size: 16px; color: var(--text);
  background: var(--bg); box-shadow: inset 0 0 0 1px var(--stb-field-line); transition: box-shadow 150ms ease;
}
.stb-form select { appearance: none; -webkit-appearance: none; padding-right: 32px;
  background-image: linear-gradient(45deg, transparent 50%, var(--text-3) 50%), linear-gradient(135deg, var(--text-3) 50%, transparent 50%);
  background-position: calc(100% - 18px) 19px, calc(100% - 13px) 19px; background-size: 5px 5px; background-repeat: no-repeat; }
.stb-form [aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--warn); }
.stb-form input:focus, .stb-form select:focus, .stb-link:focus { outline: none; box-shadow: inset 0 0 0 2px var(--accent); }
.stb-form fieldset { border: 0; margin: 0; padding: 16px; border-radius: var(--r); background: var(--surface-2); display: grid; gap: 12px; min-width: 0; }
.stb-form legend { float: left; width: 100%; padding: 0; font-size: 15px; font-weight: 600; }
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 640px) { .row3 { grid-template-columns: minmax(0, 1fr); } .stb-make { padding: 18px; } }
.stb-out:empty { display: none; }
.stb-problems { padding: 12px 16px; border-radius: var(--r); background: var(--warn-soft); box-shadow: inset 4px 0 0 var(--warn); }
.stb-problems p { margin: 0 0 4px; font-weight: 500; }
.stb-problems ul { margin: 0; padding-left: 1.2em; }
.stb-result { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 24px; align-items: start; padding: 18px; border-radius: var(--r); background: var(--ok-soft); }
.stb-result h3 { margin: 0 0 8px; font-size: 17px; }
.stb-result .hint { margin-top: 10px; }
.stb-link { font-family: var(--mono); font-size: 13.5px; background: var(--surface); }
.stb-qr { margin: 0; display: grid; justify-items: center; gap: 6px; }
.stb-qr svg { width: 150px; height: 150px; border-radius: 6px; }
.stb-qr figcaption { font-size: 12.5px; color: var(--text-3); }
@media (max-width: 640px) { .stb-result { grid-template-columns: minmax(0, 1fr); } }
.stb-how ul { margin: 0 0 12px; padding-left: 1.2em; color: var(--text-2); display: grid; gap: 6px; }
.stb-sheet, .stb-letter-sheet { display: none; }
.stb-jump { margin: 8px 0 0; }
/* The banner for a Steuerberatung a Mandant sent here (#anfrage). */
.stb-anfrage { display: grid; gap: 8px; padding: 18px 20px; border-radius: var(--r); background: var(--accent-soft); box-shadow: inset 4px 0 0 var(--accent); }
.stb-anfrage p { margin: 0; }
.stb-anfrage-title { font-size: 19px; font-weight: 600; }
/* The Mandantenbrief generator and its preview. */
.stb-brief-out:empty { display: none; }
.stb-brief-out { display: grid; gap: 12px; }
.stb-letter { padding: 24px; border-radius: var(--r); background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); max-height: 520px; overflow: auto; }
/* On a phone the letter runs with the page: no scroll box inside the scrolling page (design-review 16.11.2026 W4). */
@media (max-width: 640px) { .stb-letter { max-height: none; overflow: visible; padding: 18px; } }
/* "E-Rechnung" never breaks after "E-" (page.ts nobr, as the app's PDF; design-review W3). */
.stb .nobr { white-space: nowrap; }
.stb-letter-date { display: none; }
.stb-letter p, .stb-letter ul { margin: 0 0 10px; }
.stb-letter ul { padding-left: 1.2em; }
.stb-letter h4 { margin: 16px 0 6px; font-size: 16px; }
.stb-letter-subject { font-weight: 600; }

/* The Merkblatt: one A4 page, nothing else of the site. */
@page { size: A4; margin: 18mm; }
@media print {
  body.stb { background: #fff; color: #000; }
  body.stb > :not(main), .stb main > .wrap { display: none !important; }
  .stb-sheet { display: block; font-size: 11pt; line-height: 1.45; color: #000; }
  /* "Brief drucken" or a letter made last: only the letter, nothing else of the site. */
  body.stb[data-print="brief"] .stb-sheet { display: none !important; }
  body.stb[data-print="brief"] .stb-letter-sheet { display: block; padding: 0; font-size: 9.5pt; line-height: 1.35; color: #000; }
  body.stb[data-print="brief"] main { margin: 0 !important; padding: 0 !important; }
  .stb-letter-sheet .stb-letter-source { font-size: 8.5pt; color: #444; margin-top: 8pt; }
  /* The Taktwert section to the end in one piece, and greeting, name and source in one more: a letter
     that runs over never puts the "Stand" line alone on page 2 (design-review kanzleikitre2 W7). The
     greeting keeps room to sign, as in the app (D7). */
  .stb-letter-sheet .stb-letter-close, .stb-letter-sheet .stb-letter-sign { break-inside: avoid; }
  .stb-letter-sheet .stb-letter-greeting { margin-bottom: 13mm; }
  /* The top 45 mm (18 mm page margin and 27 mm here) stay free for the Kanzlei's letterhead, then the date (design-review W2). */
  body.stb[data-print="brief"] .stb-letter-sheet { padding-top: 27mm; }
  .stb-letter-sheet .stb-letter-date { display: block; text-align: right; margin: 0 0 10pt; }
  .stb-letter-sheet p, .stb-letter-sheet ul { margin: 0 0 6pt; }
  .stb-letter-sheet ul { padding-left: 1.2em; }
  .stb-letter-sheet h4 { font-size: 10.5pt; margin: 8pt 0 2pt; break-after: avoid; }
  .stb-letter-sheet .stb-letter-subject { font-weight: 700; margin-bottom: 12pt; }
  .stb-sheet h2 { font-size: 18pt; margin: 0 0 8pt; }
  .stb-sheet-eyebrow { font-size: 10pt; color: #444; margin: 0 0 4pt; }
  .stb-sheet-qr { margin: 12pt 0 4pt; }
  .stb-sheet-qr svg { width: 50mm; height: 50mm; }
  .stb-sheet-link { font-family: var(--mono); font-size: 8.5pt; word-break: break-all; margin: 0 0 10pt; }
  .stb-sheet ol { padding-left: 1.3em; }
  .stb-sheet .stb-rows { box-shadow: none; border: 0.5pt solid #999; background: #fff; }
  .stb-sheet .stb-rows div { border-top: 0.5pt solid #ccc; padding: 4pt 8pt; }
  .stb-sheet .stb-rows dt { color: #444; }
  .stb-sheet-personal { font-weight: 600; margin: 0 0 10pt; }
}
