/* Feinsaldo · reference stylesheet (design system "Kontoblatt")
   A printed ledger page: one serif, paper and ink, ruled tables, the double closing rule.
   Desktop only for launch: the app is drafted at 1280 px and needs about 1180 px of width.
   The one optional block at the end lets the single-column pages (sign-in family, Startseite)
   collapse below 720 px. Class names are those of docs/design/tour-74/round-2/kontoblatt.
   Rules and usage: docs/design/design-system.md. Look: docs/design/system/bausteine.html. */

/* Source Serif 4 (SIL Open Font License). The app serves the two font files and the OFL text
   from apps/web/src/web/static/fonts/; the path below is relative to this stylesheet there.
   No font is loaded from another host. */
@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/SourceSerif4-var.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/SourceSerif4-var-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

/* ---------- tokens ---------- */
:root {
  /* colour: grounds */
  --paper: #f5f0e3; /* header strip, landing ground */
  --sheet: #fcfaf3; /* page ground of the app */
  --field: #fffefb; /* inputs, secondary buttons */
  --shade: #efe8d6; /* excluded rows, disabled controls */
  --edge: #cdc5b0; /* edge of a framed figure */
  /* colour: ink */
  --ink: #1d1b18; /* text, rules, primary button; 16.4:1 on sheet */
  --ink-2: #47423b; /* secondary text; 9.5:1 on sheet, 7.8:1 on shade */
  --ink-hover: #3b3630; /* primary button, hovered */
  --line: var(--ink); /* ledger devices: column rules, closing rule */
  /* colour: ruling */
  --rule: #b7c3ce; /* Lineatur: separators in the header, form rows */
  --rule-soft: #d5dbe1; /* row hairlines */
  --rule-five: #93a1ae; /* every fifth row */
  /* colour: states. Red means error and nothing else. */
  --red: #8c1c13; /* Fehler, blockiert; 8.8:1 on sheet */
  --red-tint: #f6e4df; /* ground of an error row or notice */
  --ochre: #5f4000; /* Hinweis, zu prüfen; 9.2:1 on sheet */
  /* colour: brand. Petrol is the bar of the logo and nothing else. */
  --brand: #0b4f56;
  --brand-light: #5fb3bc; /* the same bar on ink; 7.1:1 */

  /* type */
  --serif: "Source Serif 4", "Source Serif Pro", Georgia, serif;
  --fs-tag: 12.5px; /* Fehler/Hinweis label inside a table row */
  --fs-xs: 13px; /* caps line, field labels, Fehler/Hinweis label */
  --fs-th: 13.5px; /* column heads, tab counters, small notes */
  --fs-s: 14px; /* notes, second lines */
  --fs-table: 14.5px;
  --fs-ui: 15px; /* meta line, lists, filter, toolbar text */
  --fs-m: 15.5px; /* body */
  --fs-control: 16px; /* buttons, text inputs, message list */
  --fs-figure: 16.5px; /* count line, figures of the example */
  --fs-l: 17px; /* lead, verdict help, tab labels */
  --fs-h3: 17px; /* role heading on Kontenzuordnung */
  --fs-lead: 18.5px; /* lead of the Startseite */
  --fs-h3-l: 19px; /* step headings */
  --fs-h2: 21px; /* section heading */
  --fs-h1-s: 22px; /* client name on Prüfung, title of the example */
  --fs-h1-m: 30px; /* heading of Anmelden, step numerals */
  --fs-numeral: 34px; /* step numerals of the Startseite */
  --fs-hero: 41px; /* h1 of the Startseite */
  --fs-title: 32px; /* page title */
  --fs-headline: 40px; /* headline of the Übersicht */
  --fs-verdict: 44px; /* verdict sentence on Prüfung: the largest text in the app */
  --w-regular: 400;
  --w-semi: 600;
  --w-bold: 650;

  /* spacing steps */
  --s1: 4px;
  --s2: 8px;
  --s3: 12px;
  --s4: 16px;
  --s5: 24px;
  --s6: 32px;
  --s7: 48px;
  --s8: 64px;
  --s9: 72px;
  --gutter: max(32px, calc((100% - 1216px) / 2)); /* content up to 1216 px wide */

  /* rule weights */
  --r-hair: 1px;
  --r-rule: 2px; /* under a section head */
  --r-head: 3px; /* top of the page, current section */
  --r-double: 4px; /* closing rule, drawn double */
  --r-focus: 3px;

  /* controls and rows */
  --control: 46px; /* primary button, inputs */
  --control-2: 44px; /* secondary button, filter */
  --row: 36px; /* table row */
  --row-client: 40px;
  --radius: 2px;
}

/* ---------- base ---------- */
* {
  box-sizing: border-box;
}
html {
  background: var(--sheet);
}
body {
  margin: 0;
  background: var(--sheet);
  color: var(--ink);
  font: var(--w-regular) var(--fs-m) / 1.5 var(--serif);
  font-variant-numeric: lining-nums tabular-nums;
  font-feature-settings: "tnum" 1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
}
h1,
h2,
h3,
p,
ul,
ol,
dl,
dd,
figure {
  margin: 0;
  padding: 0;
}
ul,
ol {
  list-style: none;
}
a {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover,
a.is-hover {
  text-decoration-thickness: 2px;
}
button {
  font: inherit;
  color: inherit;
}
/* Keyboard focus: a heavy ink ring with a gap, visible on paper and around ink buttons. */
:focus-visible,
.is-focus {
  outline: var(--r-focus) solid var(--ink);
  outline-offset: 2px;
  border-radius: 1px;
}
.on-ink :focus-visible,
.on-ink .is-focus {
  outline-color: var(--paper);
}
.vh {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.caps {
  font-size: var(--fs-xs);
  font-weight: var(--w-semi);
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-2);
}
.quiet {
  color: var(--ink-2);
}
.num {
  text-align: right;
  white-space: nowrap;
}
.neg {
  /* negative amounts: ink, bold, with the minus, and in a thin ink frame.
     The frame is drawn outside the box, so the digits stay in their column. */
  padding: 0 3px;
  margin: 0 -3px;
  box-shadow: 0 0 0 1px var(--ink);
  font-weight: 700;
}
/* ---------- logo lockup, drawn on the pixel grid ----------
   The sign is built from boxes in whole pixels (three fine lines, three gaps, one bar);
   its height is the cap height of the wordmark and both stand on one baseline.
   --cap = 3 x --l + 3 x --g + --b. */
.logo {
  --cap: 21px;
  --l: 2px;
  --g: 3px;
  --b: 6px;
  --w1: 10px;
  --w2: 14px;
  --w3: 19px;
  --w4: 22px;
  --gap: 8px;
  display: inline-flex;
  align-items: flex-end;
  gap: var(--gap);
  padding: 2px 0 1px;
  vertical-align: top;
  color: var(--ink);
}
.logo-m {
  --cap: 25px;
  --g: 4px;
  --b: 7px;
  --w1: 11px;
  --w2: 17px;
  --w3: 22px;
  --w4: 26px;
  --gap: 10px;
}
/* also the logo in the header strip of the sign-in family */
.logo-l,
.login-head .logo {
  --cap: 30px;
  --g: 5px;
  --b: 9px;
  --w1: 14px;
  --w2: 21px;
  --w3: 27px;
  --w4: 32px;
  --gap: 12px;
  padding: 2px 0;
}
.logo-sign {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  width: var(--w4);
  height: var(--cap);
}
.logo-sign i {
  display: block;
  height: var(--l);
  margin-bottom: var(--g);
  background: currentColor;
}
.logo-sign i:nth-child(1) {
  width: var(--w1);
}
.logo-sign i:nth-child(2) {
  width: var(--w2);
}
.logo-sign i:nth-child(3) {
  width: var(--w3);
}
.logo-sign b {
  display: block;
  width: 100%;
  height: var(--b);
  background: var(--brand);
}
.logo-word {
  flex: none;
  display: block;
  width: auto;
  height: calc(var(--cap) * 1.16418); /* 780 / 670: ascender and overshoot included */
  margin: calc(var(--cap) * -0.1194) 0 calc(var(--cap) * -0.04478);
}
.on-ink {
  --brand: var(--brand-light);
  background: var(--ink);
  color: var(--paper);
}
.on-ink .logo {
  color: var(--paper);
}

/* ---------- buttons and links ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: var(--control);
  padding: 0 var(--s5);
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  background: var(--ink);
  color: var(--sheet);
  font-size: var(--fs-control);
  font-weight: var(--w-semi);
  letter-spacing: 0.005em;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover,
.btn.is-hover {
  background: var(--ink-hover);
}
.btn[disabled] {
  background: var(--shade);
  border: 1px dashed var(--ink-2);
  color: var(--ink-2);
  cursor: not-allowed;
}
.btn-2 {
  min-height: var(--control-2);
  padding: 0 18px;
  background: var(--field);
  color: var(--ink);
  font-size: var(--fs-m);
}
.btn-2:hover,
.btn-2.is-hover {
  background: var(--paper);
  box-shadow: inset 0 -2px 0 var(--ink);
}
.btn-quiet {
  display: inline-flex;
  align-items: center;
  min-height: var(--control);
  padding: 0 6px;
  border: 0;
  background: none;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: pointer;
}
.btn-quiet:hover,
.btn-quiet.is-hover {
  text-decoration-thickness: 2px;
}
.btn-quiet[disabled] {
  color: var(--ink-2);
  text-decoration: none;
  cursor: not-allowed;
}
.linkbtn {
  border: 0;
  padding: 0;
  background: none;
  font-size: var(--fs-s);
  font-weight: var(--w-semi);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  cursor: pointer;
  white-space: nowrap;
}
.linkbtn:hover {
  text-decoration-thickness: 2px;
}
.linkbtn[disabled] {
  color: var(--ink-2);
  text-decoration: none;
  cursor: not-allowed;
}

/* ---------- status marks and labels: shape plus word, never colour alone ---------- */
.st {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  white-space: nowrap;
}
.st svg {
  flex: none;
  width: 12px;
  height: 12px;
}
.st-bereit {
  font-weight: var(--w-semi);
}
.st-pruefen {
  color: var(--ochre);
  font-weight: var(--w-semi);
}
.st-blockiert {
  color: var(--red);
  font-weight: var(--w-bold);
}
.st-exportiert,
.st-excluded {
  color: var(--ink-2);
}
.st-sm {
  font-size: var(--fs-s);
  font-weight: var(--w-regular);
  gap: 6px;
}
.lab {
  display: inline-block;
  min-width: 62px;
  padding: 1px 7px 2px;
  border: 1.5px solid;
  border-radius: 1px;
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: 0.07em;
  line-height: 16px;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}
.lab-fehler {
  background: var(--red);
  border-color: var(--red);
  color: var(--sheet);
}
.lab-hinweis {
  border-color: var(--ochre);
  color: var(--ochre);
}

/* ---------- notices: neutral note, Hinweis, Fehler ---------- */
.notice {
  padding: 2px 0 2px var(--s4);
  border-left: 3px solid var(--ink);
  max-width: 46em;
}
.notice strong {
  font-weight: var(--w-bold);
}
.notice-flag {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--s1) 14px;
  align-items: baseline;
  max-width: 46em;
  padding: 10px 14px 11px;
  border-left: 6px double var(--ochre);
}
.notice-flag .lab {
  align-self: start;
  margin-top: 2px;
}
.notice-flag small {
  display: block;
  font-size: var(--fs-s);
  font-weight: var(--w-regular);
}
.notice-fehler {
  border-left: 6px solid var(--red);
  background: var(--red-tint);
  font-weight: var(--w-semi);
}

/* ---------- forms ---------- */
/* `.field-label`: the label of a field that is not a single input (the file field) */
.field label,
.field .field-label {
  display: block;
  margin-bottom: 3px;
  font-size: var(--fs-xs);
  font-weight: var(--w-semi);
}
.field label span {
  font-weight: var(--w-regular);
  color: var(--ink-2);
}
.input {
  display: block;
  width: 100%;
  height: var(--control);
  padding: 0 var(--s3);
  border: 1px solid var(--ink-2);
  border-bottom: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--field);
  color: var(--ink);
  font: 500 var(--fs-l) / 1 var(--serif);
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: 0.02em;
}
.input-text {
  font-size: var(--fs-control);
  letter-spacing: 0;
}
.input[disabled],
.input[readonly] {
  border: 1px dashed var(--ink-2);
  background: var(--shade);
  color: var(--ink-2);
  cursor: not-allowed;
}
.input.is-error {
  border: 2px solid var(--red);
}
.field-error {
  display: flex;
  align-items: center;
  gap: var(--s2);
  margin-top: 6px;
  font-size: var(--fs-s);
  font-weight: var(--w-semi);
  color: var(--red);
}
.field-error svg {
  flex: none;
  width: 12px;
  height: 12px;
}
.field-hint {
  margin-top: 6px;
  font-size: var(--fs-s);
  color: var(--ink-2);
}
/* file field: a zone to drop a file on; the real input covers it, so keyboard and screen
   reader use the input itself */
.field .dropzone {
  position: relative;
  display: grid;
  justify-items: center;
  gap: var(--s1);
  margin: 0;
  padding: var(--s6) var(--s4);
  border: 1px dashed var(--ink-2);
  border-bottom: 2px solid var(--ink);
  border-radius: var(--radius);
  background: var(--field);
  font-size: var(--fs-control);
  font-weight: var(--w-regular);
  text-align: center;
  cursor: pointer;
}
.field .dropzone:hover,
.field .dropzone.is-active {
  border-style: solid;
  background: var(--paper);
}
.field .dropzone:focus-within {
  outline: var(--r-focus) solid var(--ink);
  outline-offset: 2px;
}
.field .dropzone.is-error {
  border: 2px solid var(--red);
}
.field .dropzone .dropzone-title {
  font-weight: var(--w-semi);
  color: var(--ink);
  overflow-wrap: anywhere;
}
.field .dropzone .dropzone-hint {
  font-size: var(--fs-s);
}
.dropzone input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
/* a list that is opened on demand; its summary is drawn with `.more` of the sign-in pages */
.fold {
  margin-top: var(--s5);
  padding-top: var(--s4);
  border-top: var(--r-hair) solid var(--rule-soft);
}
.fold[open] summary {
  margin-bottom: var(--s2);
}
/* checkbox: an 18 px box; the label is the hit area */
.cb {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-width: 44px;
  min-height: var(--row);
  cursor: pointer;
}
.cb input {
  flex: none;
  appearance: none;
  -webkit-appearance: none;
  width: 20px;
  height: 20px;
  margin: 0;
  border: 1.5px solid var(--ink);
  border-radius: var(--radius);
  background: var(--field);
  cursor: pointer;
  display: grid;
  place-content: center;
}
.cb input:checked {
  background: var(--ink);
}
.cb input[disabled] {
  border: 1px dashed var(--ink-2);
  background: var(--shade);
  cursor: not-allowed;
}
/* The tick is drawn, not an image: nothing to load, and no embedded image under the
   app's content policy. */
.cb input:checked::before {
  content: "";
  width: 5px;
  height: 10px;
  border: solid var(--sheet);
  border-width: 0 2.4px 2.4px 0;
  transform: translateY(-1px) rotate(45deg);
}
.cb-text {
  justify-content: flex-start;
  align-items: flex-start;
  gap: var(--s3);
  min-height: var(--control-2);
  padding: 11px 0;
}
.cb-text input {
  margin-top: 2px;
}
.hit {
  display: inline-block;
  width: 44px;
  outline: 1px dotted var(--ink);
}
.cb-text b {
  font-weight: var(--w-semi);
}

/* ---------- app shell: a full-width head strip, then the page ---------- */
.head {
  position: relative;
  padding: var(--s4) var(--gutter) 0;
  border-top: var(--r-head) solid var(--ink);
  border-bottom: var(--r-hair) solid var(--ink);
  background: var(--paper);
}
.head-top {
  display: flex;
  align-items: baseline;
  gap: 22px;
}
.brand {
  align-self: center;
  text-decoration: none;
}
.head-kanzlei {
  padding-left: 22px;
  border-left: 1px solid var(--rule);
  font-style: italic;
  font-size: var(--fs-control);
}
.head-user {
  margin-left: auto;
  display: flex;
  align-items: baseline;
  gap: 18px;
  font-size: var(--fs-s);
}
.head-user .trial {
  padding-left: 18px;
  border-left: 1px solid var(--rule);
  color: var(--ink-2);
}
.nav {
  display: flex;
  gap: 30px;
  margin-top: var(--s3);
}
.nav a {
  display: block;
  padding: 9px 0;
  margin-bottom: -1px;
  border-bottom: var(--r-head) solid transparent;
  text-decoration: none;
}
.nav a:hover {
  border-bottom-color: var(--rule);
}
.nav a[aria-current] {
  border-bottom-color: var(--ink);
  font-weight: var(--w-bold);
}
.body {
  min-height: 80vh;
  padding: 28px var(--gutter) 88px;
}
.pagehead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--s5);
  min-height: var(--control);
  margin-bottom: 26px;
}
.crumbs a {
  text-decoration: none;
}
.crumbs a:hover {
  text-decoration: underline;
}
.crumbs .sep {
  margin: 0 7px;
}
.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 0;
  margin-top: var(--s1);
  font-size: var(--fs-ui);
  color: var(--ink-2);
}
.meta span + span::before {
  content: "·";
  margin: 0 9px;
}
.meta b {
  font-weight: var(--w-semi);
  color: var(--ink);
}
h2.sect {
  font-size: var(--fs-h2);
  font-weight: var(--w-bold);
  line-height: 1.25;
}
.secthead {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s4);
  padding-bottom: 6px;
  border-bottom: var(--r-rule) solid var(--ink);
}
.secthead .quiet {
  font-size: var(--fs-table);
}

/* ---------- ledger tables ---------- */
.ledger {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-table);
}
.ledger th {
  height: var(--row);
  padding: 0 10px;
  border-bottom: var(--r-hair) solid var(--ink);
  font-size: var(--fs-th);
  font-weight: var(--w-bold);
  text-align: left;
  white-space: nowrap;
}
.ledger th.num {
  text-align: right;
}
.ledger td {
  height: var(--row);
  padding: 0 10px;
  border-bottom: var(--r-hair) solid var(--rule-soft);
  vertical-align: middle;
}
/* the header cell of a body row reads like the cells beside it */
.ledger tbody th {
  border-bottom-color: var(--rule-soft);
  font-size: inherit;
  font-weight: var(--w-regular);
  white-space: normal;
}
/* a cell that holds a short list keeps its lines off the rules */
.ledger tbody ul {
  padding: var(--s2) 0;
}
.ledger tbody tr:hover > *,
.ledger tbody tr.is-hover > * {
  background: var(--paper);
}
.ledger.plain tbody tr:hover > * {
  background: none;
}
/* column rules: the amount block is bracketed by a double ink rule */
.ledger .cr {
  border-left: var(--r-hair) solid var(--rule-soft);
}
.ledger .cr-first {
  border-left: 3px double var(--line);
}
.ledger .cr-end {
  border-right: 3px double var(--line);
}
.ledger tfoot td {
  height: 44px;
  border-top: var(--r-hair) solid var(--ink);
  border-bottom: 0;
  font-weight: var(--w-bold);
}
/* Abschlussstrich: the double closing rule under every final sum */
.ledger tfoot td.num,
.closing {
  border-bottom: var(--r-double) double var(--line);
}
.ledger tfoot td.num {
  font-size: var(--fs-ui);
}
.ledger tr.five > * {
  border-bottom-color: var(--rule-five);
}
.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s4);
  margin-top: var(--s2);
  font-size: var(--fs-table);
}
.pager nav {
  display: flex;
  align-items: center;
  gap: var(--s2);
}
.empty {
  padding: var(--s6) var(--s4);
  border-bottom: var(--r-hair) solid var(--rule-soft);
  text-align: center;
}
.empty strong {
  display: block;
  font-size: var(--fs-l);
  font-weight: var(--w-bold);
}
.empty p {
  margin-top: var(--s1);
  color: var(--ink-2);
}

/* ---------- Übersicht ---------- */
.ov-cta {
  display: flex;
  align-items: center;
  gap: var(--s4);
  font-size: var(--fs-table);
  color: var(--ink-2);
}
.ov-top {
  margin-bottom: 56px;
}
.ov-headline {
  font-size: var(--fs-headline);
  font-weight: var(--w-semi);
  line-height: 1.16;
  letter-spacing: -0.012em;
}
.ov-headline .fig {
  display: inline-block;
  padding-bottom: 1px;
  border-bottom: 5px double var(--line);
  line-height: 1.1;
  white-space: nowrap;
}
.ov-counts {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 6px 30px;
  margin-top: 20px;
  font-size: var(--fs-figure);
}
.ov-counts strong {
  font-weight: var(--w-bold);
}
.ov-counts .st {
  font-weight: var(--w-regular);
}
.ov-counts .st b {
  font-weight: var(--w-bold);
  margin-right: -2px;
}
.ov-counts .st svg {
  width: 13px;
  height: 13px;
  align-self: center;
}
.ov-counts .sep {
  padding-left: 30px;
  border-left: 1px solid var(--rule);
}
.ov-lead {
  margin-top: var(--s3);
  font-size: var(--fs-l);
}
.clients th,
.clients td {
  padding: 0 var(--s2);
}
.clients td {
  height: var(--row-client);
  white-space: nowrap;
  line-height: 1.3;
}
.clients th:first-child,
.clients td:first-child {
  padding-left: 10px;
}
.clients td.nr {
  color: var(--ink-2);
}
.clients td.name {
  font-size: var(--fs-table);
  font-weight: var(--w-semi);
}
.clients td.past .st-only {
  display: inline-flex;
  min-width: 24px;
  min-height: 24px;
  align-items: center;
}
.clients td.cur {
  border-left: var(--r-hair) solid var(--rule-soft);
  font-size: var(--fs-ui);
}
.clients td.reason {
  font-size: var(--fs-s); /* one line per client: the reason never wraps */
}
.clients th.past,
.clients td.past {
  width: 52px;
}
.clients tr.is-fehlt td.reason,
.clients tr.is-bereit td.reason {
  color: var(--ink-2);
}
.clients tr.is-pruefen td.reason {
  color: var(--ochre);
}
.clients tr.is-blockiert td.reason {
  color: var(--red);
}
.clients tr.is-blockiert td:first-child {
  box-shadow: inset 4px 0 0 var(--red);
}
.clients tbody tr:last-child td {
  border-bottom-color: var(--ink);
}
.clients th.act,
.clients td.act {
  padding: 0;
  text-align: right;
}
.clients th.act {
  padding-right: 0;
}
/* row action: the link fills the cell, so the hit area is the row height */
.clients td.act a {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  min-height: var(--row-client);
  padding: 0 0 0 var(--s5);
  font-size: var(--fs-s);
}
.legend {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 28px;
  margin-top: 18px;
  font-size: var(--fs-s);
  line-height: 1.4;
}
.legend li > span:last-child {
  display: block;
  margin-top: 2px;
  color: var(--ink-2);
}
.legend .st {
  font-size: var(--fs-table);
}
.ov-lower {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s8);
  margin-top: var(--s9);
}
.ov-lower .secthead {
  padding-bottom: var(--s2);
}
.entries li {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: var(--s1) 14px;
  align-items: start;
  padding: var(--s3) 0 13px;
  border-bottom: var(--r-hair) solid var(--rule-soft);
  font-size: var(--fs-ui);
  line-height: 1.4;
}
.entries .date {
  color: var(--ink-2);
}
.entries strong {
  font-weight: var(--w-semi);
}
.entries .sub {
  display: block;
  font-size: var(--fs-table);
  color: var(--ink-2);
}
.entries a {
  display: inline-flex;
  align-items: center;
  min-height: var(--control-2);
  margin: -11px 0;
}
.firstrun {
  max-width: 760px;
  margin-top: var(--s6);
  border-top: var(--r-rule) solid var(--ink);
  counter-reset: step;
}
.firstrun li {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  padding: 14px 0 var(--s4);
  border-bottom: var(--r-hair) solid var(--rule-soft);
}
.firstrun li::before {
  counter-increment: step;
  content: counter(step);
  font-size: var(--fs-h1-m);
  font-weight: 300;
  line-height: 1;
}
.firstrun h3 {
  font-size: var(--fs-h3-l);
  font-weight: var(--w-bold);
  line-height: 1.25;
}
.firstrun p {
  margin-top: 2px;
  color: var(--ink-2);
}
.firstrun-act {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s2) 20px;
  margin-top: var(--s5);
}
.firstrun-act small {
  font-size: var(--fs-s);
  color: var(--ink-2);
}

/* ---------- Prüfung ---------- */
.rv-title {
  font-size: var(--fs-h1-s);
  font-weight: var(--w-bold);
  line-height: 1.2;
}
.verdict {
  margin: 28px 0 var(--s8);
}
.verdict-kind {
  display: flex;
  align-items: center;
  gap: var(--s3);
  font-size: var(--fs-l);
  font-weight: var(--w-bold);
}
.verdict-kind.is-fehler {
  color: var(--red);
}
.verdict-kind .lab {
  padding: 3px 10px var(--s1);
}
.verdict-kind .st {
  font-weight: var(--w-bold);
}
.verdict-kind .st svg {
  width: 14px;
  height: 14px;
}
.verdict-line {
  margin-top: var(--s3);
  max-width: 17em;
  font-size: var(--fs-verdict);
  font-weight: var(--w-semi);
  line-height: 1.1;
  letter-spacing: -0.018em;
}
.verdict-help {
  margin-top: var(--s4);
  max-width: 40em;
  font-size: var(--fs-l);
}
.verdict-confirm {
  max-width: 44em;
  margin-top: var(--s4);
  padding-top: var(--s2);
  border-top: var(--r-hair) solid var(--rule);
}
.verdict-confirm .field-hint {
  margin: -6px 0 0 30px;
}
.verdict-act {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: var(--s5);
}
.verdict-act .why {
  font-size: var(--fs-ui);
  line-height: 1.4;
}
.verdict-act .why b {
  font-weight: var(--w-bold);
}
.flags {
  margin-bottom: var(--s8);
}
.flags li {
  display: grid;
  grid-template-columns: 82px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  min-height: 52px;
  padding: var(--s1) 0;
  border-bottom: var(--r-hair) solid var(--rule-soft);
  font-size: var(--fs-control);
  line-height: 1.35;
}
.flags li.is-fehler .text {
  font-weight: var(--w-semi);
}
.flags .acts {
  display: flex;
  align-items: center;
  gap: var(--s4);
  font-size: var(--fs-table);
}
.flags .acts a {
  display: inline-flex;
  align-items: center;
  min-height: var(--control-2);
  white-space: nowrap;
}
.rv-mid {
  display: grid;
  grid-template-columns: minmax(0, 700px) minmax(0, 1fr);
  gap: var(--s8);
  align-items: start;
  margin-bottom: var(--s9);
}
.recon {
  font-size: var(--fs-m);
  table-layout: fixed;
}
.recon td {
  height: 38px;
}
.recon tbody tr:first-child td {
  padding-top: 6px;
  padding-bottom: 7px;
  line-height: 1.3;
}
/* the columns of the calculation: sign, item, Vorspalte, Betrag */
.recon th.op {
  width: 34px;
}
.recon th.cr-first {
  width: 112px;
}
.recon th.cr-end {
  width: 132px;
}
.recon td.op {
  padding-right: 0;
  text-align: center;
  font-size: var(--fs-l);
  font-weight: var(--w-bold);
}
.recon td.num {
  font-size: var(--fs-control);
}
.recon .opf {
  float: left;
  font-size: var(--fs-l);
  font-weight: var(--w-bold);
  line-height: 1.2;
}
.recon .expl {
  display: block;
  font-size: var(--fs-s);
  line-height: 1.25;
  color: var(--ink-2);
}
.recon tr.sub td {
  height: var(--s6);
  font-size: var(--fs-table);
  color: var(--ink-2);
}
.recon tr.sub td.num {
  font-size: var(--fs-table);
}
.recon tr.sum td {
  border-top: var(--r-hair) solid var(--ink);
  border-bottom: var(--r-hair) solid var(--ink);
  font-weight: var(--w-bold);
}
.recon tfoot td.num {
  font-size: var(--fs-l);
}
.recon tfoot td.nofoot {
  border-bottom: 0;
}
.terms {
  padding-top: 46px;
}
.terms h3 {
  font-size: var(--fs-table);
  font-weight: var(--w-bold);
}
.terms dl {
  margin-top: 6px;
}
.terms dl div {
  padding-bottom: 9px;
  font-size: var(--fs-table);
  line-height: 1.45;
}
.terms dt {
  display: inline;
  font-weight: var(--w-bold);
}
.terms dt::after {
  content: ": ";
}
.terms dd {
  display: inline;
  color: var(--ink-2);
}
.tabs {
  display: flex;
  align-items: flex-end;
  gap: 34px;
  /* Sideways only, for a narrow window. Without the second line the row may scroll up and
     down too, and the browser draws a scroll bar for the one pixel the tabs stand over
     the rule below them. */
  overflow-x: auto;
  overflow-y: hidden;
  border-bottom: var(--r-hair) solid var(--ink);
}
.tabs a {
  display: flex;
  align-items: baseline;
  gap: var(--s2);
  min-height: var(--control-2);
  padding: 10px 0 var(--s2);
  margin-bottom: -1px;
  border-bottom: var(--r-head) solid transparent;
  font-size: var(--fs-l);
  text-decoration: none;
  white-space: nowrap;
}
.tabs a:focus-visible {
  /* The row clips what stands outside it: draw the focus ring inside the link. */
  outline-offset: calc(-1 * var(--r-focus));
}
.tabs a:hover {
  border-bottom-color: var(--rule);
}
.tabs a[aria-current] {
  border-bottom-color: var(--ink);
  font-weight: var(--w-bold);
}
.tabs .cnt {
  color: var(--ink-2);
  font-weight: var(--w-regular);
}
.tabs .tflag {
  font-size: var(--fs-th);
  font-weight: var(--w-semi);
}
.tabs .tflag.f {
  color: var(--red);
}
.tabs .tflag.h {
  color: var(--ochre);
}
.toolbar {
  display: flex;
  align-items: center;
  gap: var(--s4);
  padding: var(--s4) 0;
}
.toolbar .sel {
  margin-left: auto;
  font-size: var(--fs-ui);
}
/* filter: one segmented control */
.seg {
  display: flex;
}
.seg a,
.seg button {
  display: inline-flex;
  align-items: center;
  color: inherit;
  text-decoration: none;
  min-height: var(--control-2);
  padding: 0 var(--s4);
  border: 1px solid var(--ink-2);
  border-radius: 0;
  background: transparent;
  font-size: var(--fs-ui);
  cursor: pointer;
  white-space: nowrap;
}
.seg a + a,
.seg button + button {
  margin-left: -1px;
}
.seg a:hover,
.seg button:hover {
  background: var(--paper);
}
.seg a[aria-current="true"],
.seg button[aria-pressed="true"] {
  position: relative;
  border-color: var(--ink);
  background: var(--field);
  box-shadow: inset 0 -3px 0 var(--ink);
  font-weight: var(--w-bold);
}
.bookings th,
.bookings td {
  padding: 0 6px;
}
.bookings .amt {
  padding: 0 var(--s2);
}
.bookings th.sel,
.bookings td.sel {
  width: 44px; /* the whole cell is the label: 44 x 36 px */
  padding: 0;
}
.bookings td.pos {
  width: 34px;
  padding-left: 2px;
  color: var(--ink-2);
  text-align: right;
}
.bookings td.chk {
  padding-right: 0;
  line-height: 1.25;
}
.bookings td.chk .st {
  align-items: flex-start;
  white-space: normal;
}
.bookings td.chk .st svg {
  margin-top: 3px;
}
.bookings td.chk .why-row {
  display: flex;
  align-items: center;
  gap: var(--s2);
  font-size: var(--fs-s);
}
.bookings td.chk .lab {
  flex: none;
  min-width: 0;
  font-size: var(--fs-tag);
}
.bookings td.chk .linkbtn {
  min-height: var(--row);
  margin-left: 10px;
  padding: 0 6px;
}
.bookings .bad {
  display: inline-block;
  margin: 0 -5px;
  padding: 0 3px;
  border: 2px solid var(--red);
  color: var(--red);
  font-weight: var(--w-bold);
  line-height: 1.3;
}
.bookings tr.r-error > *,
.bookings tr.r-error:hover > * {
  background: var(--red-tint);
}
.bookings tr.r-error > :first-child {
  box-shadow: -5px 0 0 var(--red);
}
.bookings tr.r-error td.chk {
  font-weight: var(--w-semi);
}
.ledger tr.r-warning > :first-child {
  box-shadow: -2px 0 0 var(--sheet), -3px 0 0 var(--ochre), -4px 0 0 var(--sheet), -5px 0 0 var(--ochre);
}
.bookings tr.r-excluded > *,
.bookings tr.r-excluded:hover > * {
  background: var(--shade);
  color: var(--ink-2);
}
.bookings tr.r-excluded .strike {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}
.bookings tr.r-excluded .neg {
  box-shadow: none;
  font-weight: var(--w-regular);
}
.bookings tr.is-selected > * {
  background: var(--paper);
}
.bookings tr:target > * {
  box-shadow: inset 0 2px 0 var(--ink), inset 0 -2px 0 var(--ink);
}
.bookings tfoot td.lbl {
  white-space: nowrap;
}
.bookings tfoot .lbl small {
  margin-left: var(--s2);
  font-size: var(--fs-th);
  font-weight: var(--w-regular);
  color: var(--ink-2);
}
.tablefoot {
  margin-top: var(--s4);
  font-size: var(--fs-s);
  color: var(--ink-2);
}

/* ---------- Kontenzuordnung ---------- */
.mp-title {
  font-size: var(--fs-title);
  font-weight: var(--w-semi);
  line-height: 1.15;
  letter-spacing: -0.01em;
}
.mp-grid {
  display: grid;
  grid-template-columns: minmax(0, 800px) minmax(0, 340px);
  justify-content: space-between;
  gap: 56px;
  align-items: start;
  margin-top: 30px;
}
.roles {
  margin-top: var(--s5);
  border-top: var(--r-rule) solid var(--ink);
}
.roles-head,
.role {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 150px 170px;
  column-gap: 20px;
}
.roles-head {
  align-items: center;
  height: 30px;
  border-bottom: var(--r-hair) solid var(--ink);
  font-size: var(--fs-th);
  font-weight: var(--w-bold);
}
.roles-head .no {
  text-align: right;
}
.roles-head .wide {
  grid-column: 3 / 5;
}
.role {
  align-items: start;
  padding: 14px 0 var(--s4);
  border-bottom: var(--r-hair) solid var(--rule-soft);
}
.role .no {
  padding-top: 1px;
  color: var(--ink-2);
  text-align: right;
}
.role h3 {
  font-size: var(--fs-h3);
  font-weight: var(--w-bold);
  line-height: 1.3;
}
.role .hint {
  margin-top: 2px;
  max-width: 34em;
  font-size: var(--fs-table);
  color: var(--ink-2);
  line-height: 1.4;
}
.role .empty-note {
  margin-top: 5px;
  font-size: var(--fs-th);
}
.role .input-bu {
  width: 96px; /* a BU-Schlüssel is short: the field is narrower than the Konto */
}
.role .field.none {
  padding-top: var(--s6);
  font-size: var(--fs-th);
  color: var(--ink-2);
}
.role.kost {
  border-bottom-color: var(--ink);
}
.role.kost .field {
  grid-column: 3 / 5;
}
.mp-actions {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-top: 22px;
}
.mp-actions .after {
  margin-left: auto;
  font-size: var(--fs-th);
  color: var(--ink-2);
}
.aside h2 {
  padding-bottom: 6px;
  border-bottom: var(--r-rule) solid var(--ink);
  font-size: var(--fs-control);
  font-weight: var(--w-bold);
}
.aside section + section {
  margin-top: 28px;
}
.aside p {
  margin-top: 9px;
  font-size: var(--fs-table);
  line-height: 1.45;
}
.aside dl {
  font-size: var(--fs-table);
}
.aside dl div {
  display: flex;
  justify-content: space-between;
  gap: var(--s4);
  padding: 6px 0;
  border-bottom: var(--r-hair) solid var(--rule);
}
.aside dt {
  color: var(--ink-2);
}
.aside dd {
  text-align: right;
}

/* ---------- Mandanten: list, form, delete ---------- */
.titlebar {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: var(--s5);
}
.mp-gap {
  margin: var(--s4) 0 var(--s5);
}
.mp-grid form > .notice-flag {
  margin-bottom: var(--s5);
}
.client-table {
  margin-top: var(--s6);
}
.client-table td {
  height: var(--row-client);
}
.client-table .note {
  margin-left: var(--s3);
  font-size: var(--fs-th);
}
.client-table .note .lab {
  margin-right: var(--s1);
}
.client-table td.act {
  text-align: right;
  white-space: nowrap;
}
.client-table td.act a,
.client-table td.act .is-off {
  display: inline-flex;
  align-items: center;
  min-height: var(--row-client);
  margin-left: var(--s4);
}
.client-empty {
  margin-top: var(--s6);
  border-top: var(--r-rule) solid var(--ink);
}
.client-empty .btn {
  margin-top: var(--s3);
}
.formpage {
  max-width: 46em;
}
.formpage .lead {
  margin-top: var(--s4);
  font-size: var(--fs-l);
}
.formpage form > .notice-flag,
.formpage > .notice {
  margin-top: var(--s5);
}
.formpage .field,
.formpage .check {
  margin-top: var(--s5);
}
.formpage .pair {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 0 var(--s5);
}
.formpage .secthead {
  margin-top: var(--s7);
}
.formpage .sectnote {
  margin-top: var(--s2);
  font-size: var(--fs-table);
  color: var(--ink-2);
}
.formpage .mp-actions {
  margin-top: var(--s6);
}
.formpage-more {
  display: flex;
  justify-content: space-between;
  gap: var(--s4);
  margin-top: var(--s6);
  padding-top: var(--s3);
  border-top: var(--r-hair) solid var(--rule);
  font-size: var(--fs-table);
}
/* text-sized actions are still a full target */
.formpage-more a,
.formpage-more .is-off {
  display: inline-flex;
  align-items: center;
  min-height: var(--control-2);
}

/* ---------- Team ---------- */
.team-gap {
  margin-top: var(--s5);
}
.team-section {
  margin-top: var(--s8);
}
.team-inline .team-select {
  display: inline-block;
  width: 11em;
  height: var(--control-2);
  margin-right: var(--s2);
}
.team-invite {
  display: grid;
  gap: var(--s5);
  max-width: 34em;
  margin-top: var(--s5);
}

/* ---------- Anmelden ---------- */
.login-wrap {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.login-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  padding: 22px var(--gutter) 20px;
  border-top: var(--r-head) solid var(--ink);
  border-bottom: var(--r-hair) solid var(--ink);
  background: var(--paper);
}
.login-cols {
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  width: 100%;
  max-width: 1040px;
  margin: var(--s9) auto 0;
  padding: 0 var(--s5);
}
.login-form {
  padding: 30px 44px 40px 20px;
  border-right: 3px double var(--line);
}
.login-form h1 {
  margin-bottom: 18px;
  font-size: var(--fs-h1-m);
  font-weight: var(--w-semi);
  line-height: 1.2;
}
.login-form .notice-flag {
  margin-bottom: 18px;
}
.login-form .field {
  margin-bottom: var(--s4);
}
.login-form .field label {
  font-size: var(--fs-table);
}
.login-form .row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.login-form .row a {
  font-size: var(--fs-s);
}
.login-form .btn {
  margin-top: var(--s2);
  min-width: 170px;
}
.login-form .reg {
  margin-top: 22px;
  padding-top: 14px;
  border-top: var(--r-hair) solid var(--rule);
  font-size: var(--fs-table);
}
.login-side {
  padding: 30px 20px 40px 40px;
}
.login-side .what {
  max-width: 17em;
  margin-bottom: 26px;
  font-size: var(--fs-h2);
  font-weight: 500;
  line-height: 1.3;
}
.assure {
  border-top: var(--r-rule) solid var(--ink);
}
.assure li {
  padding: 11px 0 var(--s3);
  border-bottom: var(--r-hair) solid var(--rule);
  font-size: var(--fs-control);
}
.login-foot {
  display: flex;
  justify-content: space-between;
  gap: var(--s4);
  margin-top: auto;
  padding: 20px var(--gutter) 28px;
  font-size: var(--fs-th);
  color: var(--ink-2);
}
.login-foot a {
  margin-left: 20px;
}

/* The sign-in family beyond Anmelden: a lead under the heading, a row of actions, a part
   that opens on request, and the same two columns below the app's header (Konto). */
.login-form .lead {
  margin-bottom: 18px;
}
.login-form .acts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--s3) var(--s4);
  margin-top: var(--s2);
}
.login-form .acts .btn {
  margin-top: 0;
}
.login-form .check,
.login-form .notice {
  margin-bottom: 18px;
}
.login-form .more {
  margin-top: 22px;
  padding-top: var(--s2);
  border-top: var(--r-hair) solid var(--rule);
}
.fold summary,
.login-form .more summary {
  display: flex;
  align-items: center;
  min-height: var(--control-2);
  font-weight: var(--w-semi);
  text-decoration: underline;
  cursor: pointer;
}
.login-form .more + .reg {
  margin-top: var(--s2);
}
.login-side .side-act {
  margin-top: var(--s4);
  font-size: var(--fs-table);
}
/* A field whose label line ends in a link ("Passwort vergessen?"): the link follows the
   input in the page and is drawn beside the label. */
.login-form .field-linked {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: baseline;
}
.login-form .field-linked > * {
  grid-column: 1 / -1;
}
.login-form .field-linked > label {
  grid-area: 1 / 1;
}
.login-form .field-linked > a {
  grid-area: 1 / 2;
  font-size: var(--fs-s);
}
/* text-sized actions are still a full target */
.login-form .notice-flag .linkbtn,
.login-side .side-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--control-2);
}
/* greyed for a role that may not use it: still text, no slab behind it */
.login-side .side-link.is-off,
.formpage-more .is-off {
  border: 0;
  background: none;
  color: var(--ink-2);
}
.login-cols.in-app {
  margin-top: var(--s6);
}

/* ---------- Startseite ---------- */
.p-landing,
.p-landing body {
  background: var(--paper);
}
body.p-landing {
  background: var(--paper);
}
.lp {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 var(--s6);
}
.lp-nav {
  position: relative;
  display: flex;
  align-items: center;
  gap: 34px;
  padding: 18px 0 var(--s4);
  border-bottom: var(--r-hair) solid var(--ink);
}
.lp-nav .links {
  display: flex;
  gap: 28px;
  margin-left: 18px;
}
.lp-nav .links a,
.lp-nav .login {
  text-decoration: none;
}
.lp-nav .links a:hover,
.lp-nav .login:hover {
  text-decoration: underline;
}
.lp-nav .right {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: var(--s5);
}
.lp-nav .login {
  font-weight: var(--w-semi);
}
.lp-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 520px;
  gap: 44px;
  align-items: center;
  padding: 60px 0 var(--s8);
}
/* without the example beside it: the app's own start page */
.lp-hero.solo {
  grid-template-columns: minmax(0, 1fr);
}
.lp-hero h1 {
  margin-top: var(--s4);
  font-size: var(--fs-hero);
  font-weight: var(--w-semi);
  line-height: 1.12;
  letter-spacing: -0.016em;
}
.lp-hero .lead {
  margin-top: 22px;
  max-width: 31em;
  font-size: var(--fs-lead);
}
.lp-hero .more {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 26px;
  font-size: var(--fs-l);
}
.lp-hero .more a {
  display: inline-flex;
  align-items: center;
  min-height: var(--control-2);
  font-weight: var(--w-semi);
}
.lp-hero .more svg {
  width: 14px;
  height: 14px;
}
/* the example: a small Kontoblatt extract, the one framed figure */
.kb {
  background: var(--sheet);
  border: 1px solid var(--edge);
  border-top: var(--r-head) solid var(--ink);
  padding: 20px 26px 22px;
}
.kb-title {
  margin-top: var(--s1);
  font-size: var(--fs-h1-s);
  font-weight: var(--w-bold);
  line-height: 1.2;
}
.kb-sub {
  margin-bottom: 14px;
  font-size: var(--fs-table);
  color: var(--ink-2);
}
.kb .ledger {
  font-size: var(--fs-control);
  table-layout: fixed;
}
.kb .ledger th {
  border-top: var(--r-head) solid var(--ink);
}
.kb .ledger th.num {
  text-align: center;
}
.kb .ledger th.no {
  padding-right: 0;
  text-align: right;
}
.kb .ledger td {
  height: 38px;
}
.kb .ledger td.num {
  font-size: var(--fs-figure);
}
.kb .ledger td.no {
  padding-right: 0;
  color: var(--ink-2);
  text-align: right;
}
.kb .ledger tr.payout td {
  font-weight: var(--w-bold);
}
.kb-check {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s3);
  margin-top: var(--s4);
  padding-top: var(--s3);
  border-top: var(--r-hair) solid var(--rule);
  font-size: var(--fs-control);
}
.kb-check .st {
  font-weight: var(--w-bold);
}
.kb-check .st svg {
  width: 14px;
  height: 14px;
}
.kb-note {
  margin-top: 10px;
  font-size: var(--fs-s);
  line-height: 1.4;
  color: var(--ink-2);
}
.lp-steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: var(--r-rule) solid var(--ink);
  border-bottom: var(--r-hair) solid var(--ink);
}
.lp-steps li {
  display: grid;
  grid-template-columns: 44px 1fr;
  padding: 18px 26px 20px 0;
}
.lp-steps li + li {
  padding-left: 26px;
  border-left: var(--r-hair) solid var(--ink);
}
.lp-steps .n {
  font-size: var(--fs-numeral);
  font-weight: 300;
  line-height: 1;
}
.lp-steps h2 {
  font-size: var(--fs-h3-l);
  font-weight: var(--w-bold);
  line-height: 1.25;
}
.lp-steps p {
  margin-top: 3px;
  line-height: 1.4;
}
.lp-assure {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: var(--s4) 0 40px;
  font-size: var(--fs-table);
}
.lp-assure li {
  display: flex;
  gap: 9px;
  align-items: baseline;
  padding-right: 26px;
}
.lp-assure li + li {
  padding-left: 26px;
}
.lp-assure svg {
  flex: none;
  width: 10px;
  height: 10px;
}

/* ---------- public site (site/): the one-pager below its top, and the legal pages ----------
   The same devices as above: ink rules, caps labels, whitespace, the double closing rule. */
.lp-nav .links a,
.lp-nav .brand {
  display: inline-flex;
  align-items: center;
  min-height: var(--control-2);
}
.lp-nav > .btn {
  margin-left: auto;
}
.lp-hero .notice {
  margin-top: var(--s5);
  font-size: var(--fs-ui);
}
/* the columns of the example: number, text, Soll, Haben */
.kb col.c-no {
  width: 38px;
}
.kb col.c-amt {
  width: 104px;
}
/* a section: its caps label and heading on the left, what it says on the right */
.lp-sect {
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: var(--s5) 44px;
  padding: var(--s5) 0 var(--s9);
  border-top: var(--r-hair) solid var(--ink);
}
.lp-sect h2 {
  margin-top: var(--s2);
  font-size: var(--fs-h1-m);
  font-weight: var(--w-semi);
  line-height: 1.15;
  letter-spacing: -0.012em;
}
/* a part of a section that takes the whole width (the heading above the steps, the steps) */
.lp-wide {
  grid-column: 1 / -1;
}
.lp-text {
  max-width: 40em;
  font-size: var(--fs-l);
}
.lp-text p + p {
  margin-top: var(--s4);
}
/* the explainer film: the one dark block of the page. It plays on click and never by itself. */
.p-landing .lp-film {
  max-width: 760px;
  margin-bottom: var(--s5);
}
.p-landing .lp-film video {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  background: var(--ink);
  border: var(--r-hair) solid var(--ink);
}
.p-landing .lp-film figcaption {
  margin-top: var(--s2);
  font-size: var(--fs-s);
  line-height: 1.4;
  color: var(--ink-2);
}
.p-landing .lp-film figcaption a {
  font-weight: var(--w-semi);
  color: var(--ink);
}
.lp-steps h3,
.lp-cols h3,
.lp-items h3 {
  font-size: var(--fs-h3-l);
  font-weight: var(--w-bold);
  line-height: 1.25;
}
/* two columns side by side, parted by an ink rule like the steps */
.lp-cols {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border-top: var(--r-rule) solid var(--ink);
  border-bottom: var(--r-hair) solid var(--ink);
}
.lp-cols > * {
  padding: 18px 26px 22px 0;
}
.lp-cols > * + * {
  padding-left: 26px;
  border-left: var(--r-hair) solid var(--ink);
}
/* a short list, one ruled line per entry */
.lp-list {
  margin-top: var(--s3);
}
.lp-list li {
  padding: 9px 0 10px;
  border-top: var(--r-hair) solid var(--rule);
}
/* the way into the pilot programme: the link to the form, and below it what the form asks */
.lp-join {
  margin: var(--s5) 0 var(--s7);
}
.lp-join .btn {
  min-width: 320px;
  min-height: 52px;
  font-size: var(--fs-l);
}
.lp-join p {
  max-width: 44em;
  margin-top: var(--s3);
  font-size: var(--fs-ui);
  color: var(--ink-2);
}
/* ruled entries of a heading and its text: the assurances (two columns) and the questions */
.lp-items.two {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  column-gap: 44px;
}
.lp-items li {
  padding: 18px 0 22px;
  border-top: var(--r-hair) solid var(--rule);
}
.lp-items p {
  max-width: 44em;
  margin-top: 6px;
}
.lp-foot {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: var(--s3) 44px;
  padding: var(--s5) 0 var(--s8);
  border-top: var(--r-double) double var(--line);
  font-size: var(--fs-s);
  color: var(--ink-2);
}
.lp-foot p + p {
  margin-top: var(--s2);
}
.lp-foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 var(--s5);
  align-items: flex-start;
}
.lp-foot nav a {
  display: inline-flex;
  align-items: center;
  min-height: var(--control-2);
  margin-top: -12px;
  color: var(--ink);
}
/* above every page of a build that must not be published: says so in words */
.lp-draft {
  padding: var(--s2) var(--s6);
  font-size: var(--fs-ui);
  text-align: center;
}
/* Impressum and Datenschutzerklärung: one column of text */
.lp-legal {
  max-width: 46em;
  padding: var(--s7) 0 var(--s9);
}
.lp-legal h1 {
  font-size: var(--fs-hero);
  font-weight: var(--w-semi);
  line-height: 1.12;
  letter-spacing: -0.016em;
}
.lp-legal h2 {
  margin-top: var(--s7);
  padding-top: var(--s3);
  border-top: var(--r-hair) solid var(--ink);
  font-size: var(--fs-h1-s);
  font-weight: var(--w-bold);
  line-height: 1.25;
}
.lp-legal h3 {
  margin-top: var(--s6);
  font-size: var(--fs-h3-l);
  font-weight: var(--w-bold);
  line-height: 1.25;
}
.lp-legal p,
.lp-legal ul,
.lp-legal table {
  margin-top: var(--s3);
}
.lp-legal ul {
  padding-left: 1.2em;
  list-style: square;
}
.lp-legal li + li {
  margin-top: 6px;
}
.lp-legal code {
  padding: 0 3px;
  border: var(--r-hair) solid var(--rule);
  font: inherit;
}
.lp-legal .ledger th {
  white-space: normal;
}
.lp-legal .ledger td {
  height: auto;
  padding: var(--s2) 10px;
  vertical-align: top;
}
/* The public site between phone and desktop: one column, and the navigation is the logo and
   the one button. Its classes only; the app's screens stay as they are. */
@media (max-width: 1000px) {
  .lp-nav .links {
    display: none;
  }
  .p-landing .lp-hero,
  .lp-sect,
  .lp-foot {
    grid-template-columns: minmax(0, 1fr);
  }
  .p-landing .kb {
    max-width: 560px;
  }
  .p-landing .lp-steps {
    grid-template-columns: minmax(0, 1fr);
  }
  .p-landing .lp-steps li,
  .p-landing .lp-steps li + li {
    padding: var(--s4) 0;
    border-left: 0;
  }
  .p-landing .lp-steps li + li {
    border-top: var(--r-hair) solid var(--rule);
  }
  .lp-sect {
    gap: var(--s4);
    padding-bottom: var(--s8);
  }
  .lp-foot nav a {
    margin-top: 0;
  }
}

/* An earlier month shows its mark alone; the word stays for screen readers and in the tooltip. */
.clients td.past .w {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}

/* ============================================================
   OPTIONAL: single-column pages below 720 px.
   Only the sign-in family (Anmelden and the pages reached from e-mail links: confirm
   address, reset password, accept invitation) and the Startseite collapse to one column.
   "Ideally usable on a phone, not a blocker." The app screens have no phone layout.
   ============================================================ */
@media (max-width: 720px) {
  :root {
    --gutter: var(--s4);
    --fs-m: 16px;
  }
  .btn {
    min-height: var(--s7);
  }
  .input {
    height: var(--s7);
  }

  /* sign-in family */
  .login-head {
    align-items: center;
    padding: var(--s3) var(--gutter);
  }
  /* The word beside the logo has no room here; the heading names the page. */
  .login-head .caps {
    display: none;
  }
  .login-cols {
    grid-template-columns: minmax(0, 1fr);
    margin-top: var(--s5);
    padding: 0 var(--gutter);
  }
  .login-form {
    padding: 0 0 var(--s6);
    border-right: 0;
    border-bottom: 3px double var(--line);
  }
  .login-form .btn {
    width: 100%;
  }
  .login-side {
    padding: var(--s5) 0 var(--s6);
  }
  .login-foot {
    flex-direction: column;
    gap: var(--s1);
  }
  .login-foot a {
    display: inline-flex;
    align-items: center;
    min-height: var(--control-2);
    margin: 0 20px 0 0;
  }

  /* Startseite */
  .lp {
    padding: 0 var(--gutter);
  }
  .lp-nav {
    flex-wrap: wrap;
    gap: var(--s3);
    padding: var(--s2) 0 0;
  }
  .lp-nav .login {
    display: inline-flex;
    align-items: center;
    min-height: var(--control-2);
  }
  .lp-nav .btn {
    order: 4;
    width: 100%;
    margin-bottom: var(--s3);
  }
  .lp-hero {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--s6);
    padding: var(--s6) 0 var(--s7);
  }
  .lp-hero h1 {
    font-size: var(--fs-title);
  }
  .kb {
    padding: var(--s4) var(--s3);
  }
  .kb .ledger th,
  .kb .ledger td {
    padding: 0 6px;
  }
  .kb .ledger {
    font-size: var(--fs-ui);
  }
  .kb .ledger td.num {
    font-size: var(--fs-ui);
  }
  .kb .ledger col:nth-child(1) {
    width: 26px !important;
  }
  .kb .ledger col:nth-child(3),
  .kb .ledger col:nth-child(4) {
    width: 80px !important;
  }
  .kb-check {
    flex-direction: column;
    gap: var(--s1);
  }
  .lp-steps,
  .lp-assure {
    grid-template-columns: minmax(0, 1fr);
  }
  .lp-steps li,
  .lp-steps li + li {
    padding: var(--s4) 0;
    border-left: 0;
  }
  .lp-steps li + li {
    border-top: var(--r-hair) solid var(--rule);
  }
  .lp-assure {
    gap: var(--s3);
  }
  .lp-assure li,
  .lp-assure li + li {
    padding: 0;
  }

  /* public site */
  .lp-nav > .btn {
    margin-left: 0;
  }
  .lp-sect {
    gap: var(--s3);
    padding: var(--s4) 0 var(--s5);
  }
  .p-landing .lp-hero .lead {
    margin-top: var(--s4);
    font-size: var(--fs-l);
  }
  .p-landing .lp-hero .notice,
  .p-landing .lp-hero .more {
    margin-top: var(--s4);
  }
  .lp-sect h2 {
    font-size: var(--fs-h1-s);
  }
  .lp-cols,
  .lp-items.two {
    grid-template-columns: minmax(0, 1fr);
  }
  .lp-cols > *,
  .lp-cols > * + * {
    padding: var(--s4) 0;
    border-left: 0;
  }
  .lp-cols > * + * {
    border-top: var(--r-hair) solid var(--ink);
  }
  .lp-join {
    margin-bottom: var(--s6);
  }
  .lp-join .btn {
    width: 100%;
    min-width: 0;
  }
  .lp-items li {
    padding: 14px 0 var(--s4);
  }
  .lp-legal {
    padding: var(--s6) 0 var(--s7);
  }
  .lp-legal h1 {
    font-size: var(--fs-title);
  }
}

/* ---------- the app: shell, shared form parts, states ---------- */
/* Components set `display`; `hidden` must still hide them. */
[hidden] {
  display: none !important;
}
.skip-link {
  position: absolute;
  z-index: 10; /* above the header strip */
  left: var(--s4);
  top: -100px;
  padding: var(--s2) var(--s4);
  background: var(--ink);
  color: var(--sheet);
}
.skip-link:focus {
  top: var(--s2);
}
/* Without sections (signed out, error pages) the strip still closes below the logo. */
.head-top:last-child {
  padding-bottom: var(--s4);
}
/* Abmelden and the one link of a signed-out page: as tall as every other control. */
.head-user form {
  margin: 0;
}
.head-user .linkbtn,
.head-user a {
  display: inline-flex;
  align-items: center;
  min-height: var(--control-2);
}
.site-footer {
  padding: var(--s5) var(--gutter);
  border-top: var(--r-hair) solid var(--rule);
  color: var(--ink-2);
  font-size: var(--fs-s);
}
/* A choice of the `select_field` macro is drawn like an input and keeps its arrow. */
select.input {
  appearance: auto;
}
/* A password field with its "Anzeigen" button inside. */
.field-control {
  position: relative;
}
.field-control.is-password input {
  padding-right: 6.5rem;
}
.field-toggle {
  position: absolute;
  top: 50%;
  right: var(--s2);
  transform: translateY(-50%);
  min-height: 36px;
  padding: 0 var(--s3);
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  font-size: var(--fs-s);
  font-weight: var(--w-semi);
  cursor: pointer;
}
.field-toggle:hover {
  background: var(--paper);
}
/* The yes/no setting of the `checkbox_field` macro: its hint lines up with the text. */
.check .field-hint,
.check .field-error {
  margin: 0 0 0 calc(20px + var(--s3));
}
/* What the member's role does not allow: shown, greyed, not usable (5.6:1 on its ground).
   A greyed button keeps its slab; a greyed link in running text or in the sections stays text. */
.is-off,
.is-off:hover {
  color: var(--ink-2);
  cursor: not-allowed;
  text-decoration: none;
}
.btn.is-off,
.btn.is-off:hover {
  border-color: var(--rule-soft);
  background: var(--rule-soft);
  box-shadow: none;
}
.nav .is-off {
  display: block;
  padding: 9px 0;
}
/* Groups fields only to switch them off together; it has no look of its own. */
fieldset.bare {
  display: contents;
}
fieldset:disabled input,
fieldset:disabled select {
  background: var(--paper);
  color: var(--ink-2);
  cursor: not-allowed;
}
.notice[data-role-note] {
  margin-block: var(--s4);
}
/* A form that is being sent: its button waits. */
.btn[aria-busy="true"] {
  opacity: 0.7;
  cursor: progress;
}
/* While htmx loads the next view. */
.htmx-request {
  opacity: 0.6;
  transition: opacity 150ms ease-out;
}
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
