/* Liticx Tarif 595: free tool for health-insurance receipts (Tarif 595)
   Plain CSS, no build step. Mobile first; the sidebar layout starts at 1024px.
   Design tokens mirror the Liticx website (website/src/styles/site.css). */

/* ---- Fonts (self-hosted, SIL OFL) ------------------------------------------------------------ */
@font-face {
  font-family: 'Geist';
  src: url('assets/fonts/geist-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Geist';
  src: url('assets/fonts/geist-latin-ext-wght-normal.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range:
    U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329,
    U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F,
    U+A720-A7FF;
}
@font-face {
  font-family: 'Geist Mono';
  src: url('assets/fonts/geist-mono-latin-wght-normal.woff2') format('woff2-variations');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
  unicode-range:
    U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---- Tokens ---------------------------------------------------------------------------------- */
:root {
  /* Colour scale: Liticx Brand Identity 2026 (brand-identity-2026.html). Do not add other tones. */
  --navy-950: #050a1c;
  --navy-900: #0a1433;
  --navy-800: #14214a;
  --navy-700: #24335f;
  --navy-600: #3a4a78;
  --navy-500: #5a6893;
  --navy-400: #8691b3;
  --navy-300: #b4bcd3;
  --navy-200: #d6dbe8;
  --navy-100: #ebeef5;
  --navy-50: #f5f7fa;
  --green-950: #042f19;
  --green-900: #125531;
  --green-800: #136839;
  --green-700: #118443;
  --green-600: #11a853;
  --green-500: #1ed96f;
  --green-400: #45e389;
  --green-300: #82f3b2;
  --green-200: #b9f9d4;
  --green-100: #dbfde9;
  --green-50: #f0fdf5;
  --white: #ffffff;
  --mist: #f4f6f9;
  --line: #e3e7ee;
  --stone: #8a93a6;
  --slate: #535d75;
  --err: #dc2626;
  --err-fg: #b91c1c;
  --err-bg: #fde8e8;
  --ok-bg: var(--green-100);
  --ok-fg: var(--green-950);
  --warn-bg: #fef3c7;
  --warn-fg: #78350f;
  --bad-bg: var(--err-bg);
  --bad-fg: var(--err-fg);

  --text: var(--navy-900);
  --text-muted: var(--slate);
  --text-accent: var(--green-700);
  --action: var(--green-500);
  --action-hover: var(--green-400);
  --on-action: var(--navy-900);
  --field-border: var(--navy-200); /* fine 1px line, like a card (decision 2026-11-17) */
  --ring: 0 0 0 4px rgba(10, 20, 51, 0.14);
  --ring-err: 0 0 0 4px rgba(220, 38, 38, 0.2);

  /* Type scale, derived from the Liticx brand sizes (Obertitel 12, Klein 14, Text 16, Titel klein 24).
     Only these seven sizes are used anywhere in the product. */
  --fs-xs: 12px; /* Obertitel (mono, uppercase), chips, badges, table heads, numbers in circles */
  --fs-sm: 14px; /* field labels, hints, errors, meta lines, small links and buttons */
  --fs-md: 16px; /* body text, inputs, buttons, names in lists */
  --fs-lg: 18px; /* titles of cards, sections and steps */
  --fs-xl: 24px; /* prominent titles; page title and big numbers on phones */
  --fs-2xl: 32px; /* page title and big numbers on desktop */
  --fs-3xl: 40px; /* headline of the logged-out panel (desktop only) */
  --f-sans: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --f-mono: 'Geist Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  --r-s: 8px;
  --r-m: 12px;
  --r-l: 16px;
  --r-xl: 22px;
  --shadow-card: 0 0 0 1px var(--line);
  --shadow-pop: 0 20px 40px -24px rgba(10, 20, 51, 0.55);
  --side-w: 248px;
  --tabbar-h: 64px;
}

/* ---- Base ------------------------------------------------------------------------------------ */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
}
body {
  margin: 0;
  background: var(--mist);
  color: var(--text);
  font: 400 var(--fs-md)/1.5 var(--f-sans);
  -webkit-font-smoothing: antialiased;
}
h1,
h2,
h3,
h4,
p {
  margin: 0;
}
h1,
h2,
h3 {
  letter-spacing: -0.03em;
  line-height: 1.1;
}
a {
  color: inherit;
}
button,
input,
select,
textarea {
  font: inherit;
  color: inherit;
}
button {
  cursor: pointer;
}
[hidden] {
  display: none !important;
}
svg.ic {
  width: 18px;
  height: 18px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
:focus-visible {
  outline: 2px solid var(--navy-900);
  outline-offset: 2px;
  border-radius: 4px;
}
.on-navy :focus-visible,
.side :focus-visible,
.topbar :focus-visible {
  outline-color: var(--green-500);
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 100;
  background: var(--white);
  padding: 10px 14px;
  border-radius: var(--r-s);
  font-weight: 600;
}
.skip:focus {
  top: 12px;
}
.mono {
  font-family: var(--f-mono);
}
.nw {
  white-space: nowrap;
} /* keeps a date range on one line */
.lang-note {
  color: var(--navy-900);
  font-weight: 600;
}
.tbl small.lang-note {
  display: block;
  margin-top: 2px;
  font-size: var(--fs-sm);
  font-weight: 400;
  color: var(--slate);
}
.kicker {
  font: 500 var(--fs-xs)/1.3 var(--f-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-700);
}
.muted {
  color: var(--text-muted);
}
.link {
  color: var(--green-700);
  font-weight: 600;
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
}
.link:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
/* Edit button: a grey pencil, vertically centred on its row or heading. */
.edit-btn {
  flex: none;
  align-self: center;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin: -6px -8px -6px 0;
  border-radius: 10px;
  color: var(--stone);
  transition:
    color 0.15s var(--ease),
    background-color 0.15s var(--ease);
}
.edit-btn:hover {
  color: var(--navy-900);
  background: var(--navy-50);
}
.edit-btn svg.ic {
  width: 18px;
  height: 18px;
}
.ctx .edit-btn {
  width: 30px;
  height: 30px;
  margin: -4px 0;
}
.ctx .edit-btn svg.ic {
  width: 16px;
  height: 16px;
}
/* "Ändern" and similar links next to a title or in a row stay small. */
.sect-hd .link,
.sec-hd .link,
.rows .link,
.ctx .link,
.auth-row .link {
  font-size: var(--fs-sm);
}
.nowrap {
  white-space: nowrap;
}

/* ---- Buttons --------------------------------------------------------------------------------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 46px;
  padding: 0 20px;
  border: 0;
  border-radius: var(--r-m);
  font-weight: 600;
  font-size: var(--fs-md);
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  transition:
    background-color 0.15s var(--ease),
    box-shadow 0.15s var(--ease),
    transform 0.1s var(--ease);
}
.btn:active {
  transform: translateY(1px);
}
.btn-primary {
  background: var(--action);
  color: var(--on-action);
}
.btn-primary:hover {
  background: var(--action-hover);
}
.btn-secondary {
  background: var(--white);
  color: var(--navy-900);
  box-shadow: inset 0 0 0 1px var(--navy-300);
}
.btn-secondary:hover {
  background: var(--navy-50);
  box-shadow: inset 0 0 0 1px var(--navy-400);
}
.btn-ghost {
  background: none;
  color: var(--slate);
  padding: 0 12px;
}
.btn-ghost:hover {
  color: var(--navy-900);
  background: var(--navy-100);
}
.btn-danger {
  background: var(--white);
  color: var(--err-fg);
  box-shadow: inset 0 0 0 1px var(--err);
}
.btn-danger:hover {
  background: var(--bad-bg);
}
.btn-s {
  min-height: 38px;
  padding: 0 14px;
  font-size: var(--fs-sm);
  border-radius: 10px;
}
.btn[disabled],
.btn[aria-disabled='true'] {
  opacity: 0.5;
  cursor: not-allowed;
}
.btn.is-busy {
  position: relative;
  color: transparent !important;
  pointer-events: none;
}
.btn.is-busy::after {
  content: '';
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2.5px solid rgba(10, 20, 51, 0.25);
  border-top-color: var(--navy-900);
  animation: spin 0.7s linear infinite;
}
@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* ---- Form fields ----------------------------------------------------------------------------- */
.field {
  display: block;
  min-width: 0;
}
.field > label,
.legend {
  display: flex;
  align-items: baseline;
  gap: 8px;
  font-size: var(--fs-sm);
  font-weight: 600;
  margin-bottom: 6px;
}
.opt {
  font: 500 var(--fs-xs)/1 var(--f-mono);
  letter-spacing: 0.04em;
  color: var(--slate);
  background: var(--navy-100);
  border-radius: 999px;
  padding: 3px 7px;
}
.input,
.select {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  background: var(--white);
  border: 1px solid var(--field-border);
  border-radius: var(--r-m);
  font-size: var(--fs-md);
  transition:
    border-color 0.15s var(--ease),
    box-shadow 0.15s var(--ease);
}
.input.mono {
  font-family: var(--f-mono);
  font-size: var(--fs-md);
  letter-spacing: 0.01em;
}
.input::placeholder {
  color: var(--stone);
}
.input:hover,
.select:hover {
  border-color: var(--navy-300);
}
.input:focus,
.select:focus {
  outline: none;
  border-color: var(--navy-900);
  box-shadow: var(--ring);
}
.input[aria-invalid='true'],
.select[aria-invalid='true'] {
  border-color: var(--err);
}
.input[aria-invalid='true']:focus,
.select[aria-invalid='true']:focus {
  border-color: var(--err);
  box-shadow: var(--ring-err);
}
@media (forced-colors: active) {
  .input:focus,
  .select:focus {
    outline: 2px solid CanvasText;
  }
}
.select {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%230A1433' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 8l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  background-size: 18px;
}
.hint {
  font-size: var(--fs-sm);
  color: var(--slate);
  margin-top: 7px;
  line-height: 1.4;
}
/* Adapted: the canton hint under a postal code stays empty until a postal code is looked up. */
.hint:empty {
  display: none;
}
.error {
  display: flex;
  gap: 6px;
  align-items: flex-start;
  font-size: var(--fs-sm);
  font-weight: 500;
  color: var(--bad-fg);
  margin-top: 7px;
  line-height: 1.4;
}
.error svg.ic {
  width: 15px;
  height: 15px;
  margin-top: 1px;
}
.row {
  display: grid;
  gap: 16px;
}
.form-grid {
  display: grid;
  gap: 18px;
}

/* Inline help ("Wo finde ich sie?") */
.help-inline {
  margin-top: 6px;
  font-size: var(--fs-sm);
}
.help-inline > summary {
  display: inline;
  cursor: pointer;
  color: var(--green-700);
  font-weight: 600;
  list-style: none;
}
.help-inline > summary::-webkit-details-marker {
  display: none;
}
.help-inline > summary:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}
.help-inline > div {
  margin-top: 8px;
  padding: 10px 12px;
  background: var(--navy-50);
  border-radius: 10px;
  color: var(--navy-700);
  line-height: 1.45;
}

/* Checkbox and radio */
.choice {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  font-size: var(--fs-md);
  font-weight: 600;
  cursor: pointer;
}
.choice input {
  /* Same box in every state (no pseudo-element: Safari draws none on inputs, which made the box jump). */
  -webkit-appearance: none;
  appearance: none;
  flex: none;
  box-sizing: border-box;
  display: block;
  width: 22px;
  height: 22px;
  min-width: 22px;
  margin: 1px 0 0;
  padding: 0;
  background: var(--white) no-repeat center / 14px 14px;
  border: 1.5px solid var(--navy-300);
  border-radius: 6px;
  cursor: pointer;
  transition:
    background-color 0.12s var(--ease),
    border-color 0.12s var(--ease);
}
.choice input[type='radio'] {
  border-radius: 50%;
}
.choice input:checked {
  background-color: var(--navy-900);
  border-color: var(--navy-900);
}
.choice input[type='checkbox']:checked {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4.5 10.5l3.5 3.5 7.5-8'/%3E%3C/svg%3E");
}
.choice input[type='radio']:checked {
  background-image: radial-gradient(circle, var(--green-500) 0 4px, transparent 4.5px);
  background-size: 100% 100%;
}
.choice input:focus-visible {
  outline: 2px solid var(--navy-900);
  outline-offset: 2px;
}
.field > label.choice {
  align-items: flex-start;
  margin-bottom: 0;
  font-size: var(--fs-md);
}
/* The box (22px) is centred on the first line of its text: 16px text = 24px line, 14px text = 22px line. */
.choice .plain {
  line-height: 22px;
}
.choice:has(> .plain) input {
  margin-top: 0;
}
.choice small {
  display: block;
  font-weight: 400;
  color: var(--slate);
  font-size: var(--fs-sm);
  margin-top: 2px;
  line-height: 1.4;
}

/* Segmented control (radio group) */
.seg {
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  background: var(--navy-100);
  border-radius: var(--r-m);
  max-width: 100%;
}
.seg label {
  position: relative;
}
.seg input {
  position: absolute;
  opacity: 0;
  inset: 0;
  cursor: pointer;
}
.seg span {
  display: grid;
  place-items: center;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 9px;
  font-size: var(--fs-md);
  font-weight: 600;
  color: var(--navy-700);
  white-space: nowrap;
}
.seg input:checked + span {
  background: var(--white);
  color: var(--navy-900);
  box-shadow:
    0 1px 2px rgba(10, 20, 51, 0.18),
    0 0 0 1px var(--navy-200);
}
.seg input:focus-visible + span {
  outline: 2px solid var(--navy-900);
  outline-offset: 2px;
}
.seg.mono span {
  font-family: var(--f-mono);
  font-size: var(--fs-sm);
}

/* ---- Custom select (button + listbox) ------------------------------------------------------------ */
.sel {
  position: relative;
}
.sel-native {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  pointer-events: none;
}
.sel-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  height: 48px;
  padding: 0 12px 0 14px;
  background: var(--white);
  border: 1px solid var(--field-border);
  border-radius: var(--r-m);
  font-size: var(--fs-md);
  color: var(--navy-900);
  text-align: left;
  transition:
    border-color 0.15s var(--ease),
    box-shadow 0.15s var(--ease);
}
.sel-btn:hover {
  border-color: var(--navy-300);
}
.sel-btn:focus {
  outline: none;
}
.sel-btn:focus-visible,
.sel-btn[aria-expanded='true'] {
  border-color: var(--navy-900);
  box-shadow: var(--ring);
}
.sel-btn[aria-invalid='true'] {
  border-color: var(--err);
}
.sel-btn[aria-invalid='true']:focus-visible,
.sel-btn[aria-invalid='true'][aria-expanded='true'] {
  box-shadow: var(--ring-err);
}
.sel-btn.is-placeholder .sel-val {
  color: var(--stone);
}
.sel-btn[disabled] {
  background: var(--navy-50);
  color: var(--stone);
  cursor: not-allowed;
}
.sel-val {
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sel-btn svg.ic {
  width: 18px;
  height: 18px;
  color: var(--slate);
  transition: transform 0.15s var(--ease);
}
.sel-btn[aria-expanded='true'] svg.ic {
  transform: rotate(180deg);
}
.sel-inline {
  display: inline-block;
}
.sel-inline .sel-btn {
  width: auto;
  height: 40px;
  font-size: var(--fs-sm);
  font-weight: 600;
  gap: 6px;
}
@media (max-width: 639.98px) {
  .sel-btn {
    height: 50px;
  }
}

/* Popover (wide screens) and bottom sheet (phones) */
.pop {
  position: absolute;
  z-index: 40;
  top: calc(100% + 6px);
  left: 0;
  min-width: 100%;
  width: max-content;
  max-width: min(340px, 92vw);
  padding: 6px;
  background: var(--white);
  border-radius: var(--r-m);
  box-shadow:
    0 0 0 1px var(--line),
    0 18px 36px -14px rgba(10, 20, 51, 0.3);
  animation: pop-in 0.12s var(--ease) both;
}
.pop.pop-up {
  top: auto;
  bottom: calc(100% + 6px);
}
.sel-inline .pop {
  left: auto;
  right: 0;
}
@keyframes pop-in {
  from {
    opacity: 0;
    transform: translateY(-4px);
  }
}
.pop-backdrop {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(10, 20, 51, 0.45);
  animation: fade-in 0.15s var(--ease) both;
}
@keyframes fade-in {
  from {
    opacity: 0;
  }
}
.pop.is-sheet {
  position: fixed;
  top: auto;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 71;
  width: auto;
  max-width: none;
  max-height: 80vh;
  display: flex;
  flex-direction: column;
  padding: 6px 12px calc(14px + env(safe-area-inset-bottom));
  border-radius: 22px 22px 0 0;
  animation: sheet-in 0.2s var(--ease) both;
}
@keyframes sheet-in {
  from {
    transform: translateY(100%);
  }
}
.pop-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 4px 10px 6px;
}
.pop-hd b {
  font-size: var(--fs-md);
}
.pop-x {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 12px;
  background: var(--navy-50);
  color: var(--navy-900);
}
.pop-search {
  position: relative;
  margin-bottom: 6px;
}
.pop-search svg.ic {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 16px;
  height: 16px;
  color: var(--stone);
}
.pop-search .input {
  height: 40px;
  padding-left: 36px;
  font-size: var(--fs-sm);
}
.pop-list {
  list-style: none;
  margin: 0;
  padding: 0;
  max-height: 280px;
  overflow-y: auto;
  outline: none;
}
.pop.is-sheet .pop-list {
  max-height: none;
  flex: 1;
}
.pop-list [role='option'] {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 38px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: var(--fs-sm);
  color: var(--navy-900);
  cursor: pointer;
}
.pop.is-sheet .pop-list [role='option'] {
  min-height: 48px;
  font-size: var(--fs-md);
}
.pop-list [role='option'].is-active {
  background: var(--navy-50);
}
.pop-list [role='option'][aria-selected='true'] {
  font-weight: 600;
}
.pop-list [role='option'][aria-disabled='true'] {
  color: var(--stone);
  cursor: not-allowed;
}
.pop-txt {
  flex: 1;
  min-width: 0;
}
.pop-list small {
  font: 500 var(--fs-xs)/1 var(--f-mono);
  color: var(--stone);
}
.pop-check {
  width: 16px;
  height: 16px;
  flex: none;
  stroke: var(--green-700);
  stroke-width: 2.4;
  visibility: hidden;
}
[aria-selected='true'] > .pop-check {
  visibility: visible;
}
.pop-none {
  padding: 14px 10px;
  font-size: var(--fs-sm);
  color: var(--slate);
}

/* Date field and calendar */
.datef {
  position: relative;
}
.datef .input {
  font-variant-numeric: tabular-nums;
}
.datef.has-cal .input {
  padding-right: 50px;
}
.date-btn {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 42px;
  height: 40px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--slate);
}
.date-btn:hover {
  color: var(--navy-900);
  background: var(--navy-50);
}
.date-btn svg.ic {
  width: 19px;
  height: 19px;
}
.pop-cal {
  width: 300px;
  padding: 12px;
}
.pop-cal.is-sheet {
  width: auto;
}
.datef .pop-cal {
  left: auto;
  right: 0;
}
.cal-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.cal-title {
  display: flex;
  align-items: center;
  gap: 2px;
  font-size: var(--fs-sm);
  font-weight: 600;
}
.cal-pick {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 8px;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--navy-900);
  font: 600 var(--fs-sm)/1 var(--f-sans);
}
.cal-pick:hover {
  background: var(--navy-50);
}
.cal-range {
  padding: 0 8px;
}
.cal-cells {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
  padding-top: 4px;
}
.cal-cell {
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--navy-900);
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
}
.pop.is-sheet .cal-cell {
  height: 56px;
  font-size: var(--fs-md);
}
.cal-cell:hover {
  background: var(--navy-50);
}
.cal-cell.is-today {
  box-shadow: inset 0 0 0 1px var(--navy-300);
}
.cal-cell[aria-pressed='true'] {
  background: var(--navy-900);
  color: var(--white);
  font-weight: 600;
  box-shadow: none;
}
.cal-nav {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--navy-900);
}
.cal-nav:hover {
  background: var(--navy-50);
}
.cal-nav svg.ic {
  width: 16px;
  height: 16px;
}
.cal-wd,
.cal-days {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 2px;
}
.cal-wd span {
  text-align: center;
  font: 500 var(--fs-xs)/28px var(--f-mono);
  color: var(--stone);
}
.cal-day {
  height: 36px;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--navy-900);
  font-size: var(--fs-sm);
  font-variant-numeric: tabular-nums;
}
.pop.is-sheet .cal-day {
  height: 44px;
  font-size: var(--fs-md);
}
.cal-day:hover {
  background: var(--navy-50);
}
.cal-day.is-today {
  box-shadow: inset 0 0 0 1px var(--navy-300);
}
.cal-day[aria-pressed='true'] {
  background: var(--navy-900);
  color: var(--white);
  font-weight: 600;
  box-shadow: none;
}

/* ---- Cards, chips, alerts -------------------------------------------------------------------- */
.card {
  background: var(--white);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-card);
}
.card-pad {
  padding: 20px;
}
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: 500 var(--fs-xs)/1 var(--f-mono);
  letter-spacing: 0.03em;
  padding: 5px 9px;
  border-radius: 999px;
  background: var(--navy-100);
  color: var(--navy-700);
  white-space: nowrap;
}
.chip::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}
.chip.plain::before {
  display: none;
}
.chip.ok {
  background: var(--ok-bg);
  color: var(--green-950);
}
.chip.ok::before {
  background: var(--green-700);
}
.chip.warn {
  background: var(--warn-bg);
  color: var(--warn-fg);
}
.chip.bad {
  background: var(--bad-bg);
  color: var(--bad-fg);
}
.alert {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: var(--r-l);
  font-size: var(--fs-sm);
  line-height: 1.45;
}
.alert svg.ic {
  margin-top: 2px;
}
.alert.bad {
  background: var(--bad-bg);
  color: var(--bad-fg);
}
.alert.warn {
  background: var(--warn-bg);
  color: var(--warn-fg);
}
.alert.ok {
  background: var(--ok-bg);
  color: var(--ok-fg);
}
.alert.info {
  background: var(--navy-100);
  color: var(--navy-800);
}
.alert .grow {
  flex: 1;
  min-width: 0;
}
.alert b {
  display: block;
}
.alert .x {
  background: none;
  border: 0;
  padding: 4px;
  margin: -2px -4px 0 0;
  color: inherit;
  border-radius: 6px;
}
.avatar {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--navy-900);
  color: var(--white);
  font: 600 var(--fs-xs)/1 var(--f-mono);
}
.avatar.l {
  width: 52px;
  height: 52px;
  border-radius: 15px;
  font-size: var(--fs-md);
}

/* ---- App shell ------------------------------------------------------------------------------- */
.shell {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}
.side {
  display: none;
}
.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  background: var(--navy-900);
  color: var(--white);
}
.topbar .logo img,
.side .logo img {
  height: 26px;
  width: auto;
  display: block;
}
.topbar .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.topbar .acc {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border-radius: 11px;
  background: var(--navy-700);
  font: 600 var(--fs-xs)/1 var(--f-mono);
  text-decoration: none;
}
.tag {
  font: 500 var(--fs-xs)/1 var(--f-mono);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-500);
  border: 1px solid rgba(30, 217, 111, 0.4);
  border-radius: 999px;
  padding: 4px 7px;
}
.main {
  flex: 1;
  padding: 22px 16px calc(var(--tabbar-h) + 32px + env(safe-area-inset-bottom));
  min-width: 0;
}
.main > .inner {
  max-width: 1120px;
  margin: 0 auto;
}
.main h1:focus {
  outline: none;
}

.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  background: var(--white);
  border-top: 1px solid var(--line);
  padding: 6px 4px calc(6px + env(safe-area-inset-bottom));
}
.tabbar a {
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 6px 2px;
  min-height: 52px;
  border-radius: 10px;
  font-size: var(--fs-xs);
  font-weight: 500;
  color: var(--slate);
  text-decoration: none;
}
.tabbar a svg.ic {
  width: 21px;
  height: 21px;
}
.tabbar a[aria-current='page'] {
  color: var(--navy-900);
  font-weight: 600;
}
.tabbar a[aria-current='page'] svg.ic {
  stroke: var(--green-700);
}
.tabbar a[aria-disabled='true'] {
  color: var(--navy-300);
}

@media (min-width: 1024px) {
  .shell {
    display: grid;
    grid-template-columns: var(--side-w) minmax(0, 1fr);
  }
  .topbar,
  .tabbar {
    display: none;
  }
  .main {
    padding: 40px 48px 56px;
  }
  .side {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 24px 14px 16px;
    background: var(--navy-900);
    color: var(--white);
    overflow-y: auto;
  }
  .side .logo {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 10px 24px;
    text-decoration: none;
  }
  .side .grp {
    font: 500 var(--fs-xs)/1 var(--f-mono);
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--navy-400);
    margin: 16px 12px 8px;
  }
  .side nav {
    display: grid;
    gap: 2px;
  }
  .side nav a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 10px 12px;
    border-radius: 10px;
    color: var(--navy-200);
    font-size: var(--fs-sm);
    text-decoration: none;
  }
  .side nav a:hover {
    background: rgba(255, 255, 255, 0.06);
    color: var(--white);
  }
  .side nav a[aria-current='page'] {
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    font-weight: 600;
  }
  .side nav a[aria-current='page'] svg.ic:first-child {
    stroke: var(--green-500);
  }
  .side nav a em {
    margin-left: auto;
    font: 600 var(--fs-xs)/1 var(--f-mono);
    font-style: normal;
    background: var(--green-500);
    color: var(--navy-900);
    border-radius: 999px;
    padding: 3px 7px;
  }
  .side nav a[aria-disabled='true'] {
    color: var(--navy-400);
    cursor: default;
  }
  .side nav a[aria-disabled='true']:hover {
    background: none;
    color: var(--navy-400);
  }
  .side nav a .lock {
    margin-left: auto;
    width: 14px;
    height: 14px;
  }
  .side .up {
    margin-top: auto;
    padding: 12px;
  }
  .side .up a {
    gap: 6px;
  }
  .side .acc {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 8px 0;
    margin-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
  }
  .side .acc > a {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
    text-decoration: none;
    border-radius: 10px;
  }
  .side .acc .avatar {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    background: var(--navy-700);
    font-size: var(--fs-xs);
  }
  /* Up to two lines (long e-mail addresses, "3 établissements"), then cut. The full text is in the title. */
  .side .acc b {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    overflow-wrap: anywhere;
    font-size: var(--fs-sm);
    line-height: 1.3;
  }
  .side .acc small {
    color: var(--navy-400);
    font-size: var(--fs-xs);
  }
  .side .acc .out {
    background: none;
    border: 0;
    padding: 8px;
    color: var(--navy-300);
    border-radius: 8px;
  }
  .side .acc .out:hover {
    color: var(--white);
    background: rgba(255, 255, 255, 0.08);
  }
}

/* "Mehr über Liticx erfahren" (sidebar on desktop, start page on phones) */
.up {
  border: 1px solid rgba(30, 217, 111, 0.3);
  background: rgba(30, 217, 111, 0.08);
  border-radius: var(--r-m);
  padding: 14px;
  font-size: var(--fs-sm);
  color: var(--navy-200);
  line-height: 1.4;
}
.up a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  color: var(--white);
  font-weight: 600;
  font-size: var(--fs-sm);
  text-decoration: none;
}
.up a:hover {
  color: var(--green-500);
}
.up a svg.ic {
  width: 15px;
  height: 15px;
}
.up-phone {
  background: var(--navy-900);
  border-radius: var(--r-xl);
  padding: 6px;
}
.up-phone .up {
  border: 0;
  background: none;
  font-size: var(--fs-sm);
}
.up-phone .up a {
  font-size: var(--fs-md);
}
@media (min-width: 1024px) {
  .up-phone {
    display: none;
  }
}

/* ---- Page header ----------------------------------------------------------------------------- */
.page-hd {
  margin-bottom: 22px;
}
.page-hd h1 {
  font-size: var(--fs-xl);
  letter-spacing: -0.04em;
  line-height: 1.05;
  margin: 8px 0 6px;
}
.page-hd p {
  color: var(--slate);
  font-size: var(--fs-md);
  max-width: 40em;
}
.page-hd.split {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: flex-end;
  justify-content: space-between;
}
.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: var(--fs-sm);
  font-weight: 600;
  color: var(--slate);
  text-decoration: none;
  margin-bottom: 10px;
}
.back:hover {
  color: var(--navy-900);
}
@media (min-width: 1024px) {
  .page-hd {
    margin-bottom: 26px;
  }
  .page-hd h1 {
    font-size: var(--fs-2xl);
  }
  .page-hd p {
    font-size: var(--fs-md);
  }
}

/* ---- Visibility helpers: small = phones and tablets (< 1024px), large = desktop ------------------ */
@media (min-width: 1024px) {
  .only-small {
    display: none !important;
  }
}
@media (max-width: 1023.98px) {
  .only-large {
    display: none !important;
  }
}

/* ---- Step bar (setup, add Betrieb, Beleg erstellen, Excel-Import) ------------------------------ */
.segbar ol {
  list-style: none;
  margin: 0 0 18px;
  padding: 0;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 8px;
}
.segbar a {
  display: block;
  color: inherit;
  text-decoration: none;
}
.seg-line {
  display: block;
  height: 5px;
  border-radius: 3px;
  background: var(--navy-200);
}
.segbar .done .seg-line {
  background: var(--green-500);
}
.segbar .now .seg-line {
  background: var(--navy-900);
}
.seg-l {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  font-size: var(--fs-sm);
  color: var(--slate);
  min-width: 0;
}
.seg-l > span {
  min-width: 0;
  line-height: 1.3;
  overflow-wrap: break-word;
} /* long step names wrap, never cut */
.seg-l em {
  font: 600 var(--fs-xs)/1 var(--f-mono);
  font-style: normal;
  color: var(--navy-400);
}
.seg-l svg.ic {
  width: 15px;
  height: 15px;
  stroke: var(--green-700);
  stroke-width: 2.6;
}
.segbar .done .seg-l {
  color: var(--navy-900);
}
.segbar .now .seg-l {
  color: var(--navy-900);
  font-weight: 600;
}
.segbar .now .seg-l em {
  color: var(--navy-900);
}
.segbar a:hover .seg-l > span {
  text-decoration: underline;
  text-underline-offset: 3px;
}
@media (max-width: 639.98px) {
  /* Phones: only the bars; the step name is the title below. Names stay for screen readers. */
  .seg-l {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
    margin: 0;
  }
}

/* ---- Setup and step forms ------------------------------------------------------------------------ */
.setup {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr);
}
.setup-main {
  min-width: 0;
}
.setup-side {
  display: none;
}
.fcard {
  overflow: visible;
}
.fhd {
  padding: 22px 20px 0;
}
.fhd h2 {
  font-size: var(--fs-lg);
  letter-spacing: -0.02em;
}
.fhd p {
  color: var(--slate);
  font-size: var(--fs-sm);
  margin-top: 4px;
}
.fhd .kicker {
  display: block;
  margin-bottom: 6px;
}
.fbd {
  padding: 20px;
  display: grid;
  gap: 18px;
}
.fft {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px 20px;
  border-top: 1px solid var(--line);
}
.reveal {
  display: grid;
  gap: 18px;
  padding: 16px;
  background: var(--navy-50);
  box-shadow: inset 0 0 0 1px var(--line);
  border-radius: var(--r-m);
}
.copy-box {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  padding: 14px 16px;
  background: var(--navy-50);
  box-shadow: inset 0 0 0 1px var(--line);
  border-radius: var(--r-m);
}
.helpcard {
  padding: 20px;
  display: grid;
  gap: 8px;
  font-size: var(--fs-sm);
  color: var(--navy-700);
  line-height: 1.45;
}

/* The navy card with the ring */
.ring {
  display: grid;
  gap: 16px;
  background: var(--navy-900);
  color: var(--white);
  border-radius: var(--r-xl);
  padding: 22px;
}
.ring .r1 {
  display: flex;
  align-items: center;
  gap: 18px;
}
.ring svg {
  width: 84px;
  height: 84px;
  flex: none;
}
.ring .r1 b {
  display: block;
  font-size: var(--fs-xl);
  letter-spacing: -0.02em;
}
.ring .r1 small {
  color: var(--navy-300);
  font-size: var(--fs-sm);
}
.ring .lbl {
  font: 500 var(--fs-xs)/1 var(--f-mono);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--navy-400);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 16px;
}
.ring ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.ring li {
  display: flex;
  gap: 10px;
  font-size: var(--fs-sm);
  color: var(--navy-200);
  line-height: 1.35;
}
.ring li svg.ic {
  width: 16px;
  height: 16px;
  stroke: var(--green-500);
  margin-top: 1px;
}

/* Phone overview of the setup: navy card, the three steps, one button */
.setup-overview {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 16px;
}
.plist {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--white);
  border-radius: var(--r-l);
  box-shadow: var(--shadow-card);
}
.plist li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 14px;
}
.plist li + li {
  border-top: 1px solid var(--line);
}
.plist .n {
  flex: none;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  font: 600 var(--fs-xs)/1 var(--f-mono);
  color: var(--navy-700);
  box-shadow: inset 0 0 0 1px var(--navy-200);
}
.plist .done .n {
  background: var(--green-100);
  color: var(--green-700);
  box-shadow: none;
}
.plist .n svg.ic {
  width: 13px;
  height: 13px;
  stroke-width: 2.6;
}
.plist .grow {
  flex: 1;
  min-width: 0;
}
.plist b {
  display: block;
  font-size: var(--fs-sm);
}
.plist small {
  display: block;
  font-size: var(--fs-xs);
  color: var(--slate);
  line-height: 1.4;
  overflow-wrap: break-word;
}
.plist i {
  font: 500 var(--fs-xs)/1 var(--f-mono);
  font-style: normal;
  color: var(--slate);
  white-space: nowrap;
}

@media (min-width: 640px) {
  .row.c2 {
    grid-template-columns: 1fr 1fr;
  }
  .row.street {
    grid-template-columns: 1fr 140px;
  }
  .row.zip {
    grid-template-columns: 130px 1fr 210px;
  }
}
@media (max-width: 639.98px) {
  .row.street {
    grid-template-columns: 1fr 112px;
  }
  .row.zip {
    grid-template-columns: 112px 1fr;
  }
  .row.zip > :last-child {
    grid-column: 1 / -1;
  }
  .input,
  .select {
    height: 50px;
  }
}
@media (min-width: 1024px) {
  .fhd {
    padding: 26px 30px 0;
  }
  .fbd {
    padding: 22px 30px 24px;
  }
  .fft {
    padding: 16px 30px;
  }
}
@media (min-width: 1180px) {
  .setup {
    grid-template-columns: minmax(0, 1fr) 316px;
    gap: 28px;
    align-items: start;
  }
  .setup-side {
    display: grid;
    gap: 16px;
    align-content: start;
    padding-top: 0;
  }
}

/* ---- Full-screen flows on phones (setup steps, Beleg erstellen, Excel-Import, …) --------------------- */
.focusbar {
  display: none;
}
@media (max-width: 1023.98px) {
  .is-focus {
    background: var(--white);
  }
  .is-focus .topbar,
  .is-focus .tabbar {
    display: none;
  }
  .is-focus .focusbar {
    display: flex;
    align-items: center;
    gap: 8px;
    position: sticky;
    top: 0;
    z-index: 20;
    background: var(--white);
    padding: calc(8px + env(safe-area-inset-top)) 10px 8px;
  }
  .focusbar b {
    flex: 1;
    text-align: center;
    font-size: var(--fs-sm);
    font-weight: 600;
  }
  .fb-x {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    color: var(--navy-900);
  }
  .fb-x:hover {
    background: var(--navy-50);
  }
  .fb-x svg.ic {
    width: 20px;
    height: 20px;
  }
  .fb-n {
    width: 44px;
    text-align: right;
    font: 500 var(--fs-xs)/1 var(--f-mono);
    color: var(--slate);
  }
  .is-focus .main {
    background: var(--white);
    padding: 4px 16px 0;
    display: flex;
    flex-direction: column;
  }
  .is-focus .main > .inner,
  .is-focus .setup,
  .is-focus .setup-main,
  .is-focus .setup-step,
  .is-focus .step-wrap {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
  }
  .is-focus .main > .inner > .segbar {
    order: -1;
  }
  .is-focus .hide-in-focus,
  .is-focus .back,
  .is-focus .page-hd .kicker,
  .is-focus .setup-side {
    display: none;
  }
  .is-focus .page-hd {
    margin: 14px 0 18px;
  }
  .is-focus .card.fcard,
  .is-focus .card.wiz {
    flex: 1;
    display: flex;
    flex-direction: column;
    box-shadow: none;
    border-radius: 0;
    background: transparent;
    overflow: visible;
  }
  .is-focus .fhd {
    padding: 14px 0 0;
  }
  .is-focus .fhd h2 {
    font-size: var(--fs-xl);
    letter-spacing: -0.035em;
    line-height: 1.1;
  }
  .is-focus .fbd,
  .is-focus .wiz-body {
    padding: 18px 0 24px;
  }
  .is-focus .wiz-body .rows,
  .is-focus .tbl-wrap {
    margin: 0 -16px;
  }
  .is-focus .fft,
  .is-focus .wiz-foot {
    position: sticky;
    bottom: 0;
    z-index: 5;
    margin: auto -16px 0;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: var(--white);
    border-top: 1px solid var(--line);
    flex-wrap: nowrap;
  }
  .is-focus .fft .btn-primary,
  .is-focus .wiz-foot .btn-primary {
    flex: 1;
    min-height: 50px;
  }
  .is-focus .fft .spacer,
  .is-focus .wiz-foot .spacer {
    display: none;
  }
  .is-focus .back-btn {
    flex: none;
    width: 50px;
    min-height: 50px;
    padding: 0;
    color: var(--navy-900);
    box-shadow: inset 0 0 0 1px var(--navy-200);
  }
  .is-focus .back-btn > span {
    display: none;
  }
  .is-focus .wiz-foot .meta {
    flex: none;
  }
  /* "Abbrechen" is the X at the top on phones */
  .is-focus .wiz-foot .btn-ghost:not(.back-btn) {
    display: none;
  }
  /* Member form: the main button on top, "save and add the next one" as a quieter button below it */
  .is-focus #member .wiz-foot {
    flex-direction: column-reverse;
    align-items: stretch;
    gap: 4px;
  }
  .is-focus #member .wiz-foot .btn-primary {
    flex: none;
  }
  .is-focus #member .wiz-foot .btn-secondary {
    min-height: 44px;
    background: none;
    box-shadow: none;
    color: var(--green-700);
  }
  .is-focus #member .wiz-foot .btn-danger {
    min-height: 44px;
    box-shadow: none;
  }
}

/* ---- Start (dashboard) ----------------------------------------------------------------------- */
.dash {
  display: grid;
  gap: 20px;
  grid-template-columns: minmax(0, 1fr);
}
.actions2 {
  display: grid;
  gap: 14px;
}
.act {
  position: relative;
  display: grid;
  gap: 14px;
  align-content: start;
  padding: 22px;
  border-radius: var(--r-xl);
}
.act h2 {
  font-size: var(--fs-xl);
  letter-spacing: -0.03em;
}
.act p {
  font-size: var(--fs-sm);
  line-height: 1.45;
}
.act .btn {
  justify-self: start;
  margin-top: 4px;
}
.act .ico {
  width: 44px;
  height: 44px;
  border-radius: 13px;
  display: grid;
  place-items: center;
}
.act .ico svg.ic {
  width: 22px;
  height: 22px;
}
.act.navy {
  background: var(--navy-900);
  color: var(--white);
}
.act.navy p {
  color: var(--navy-200);
}
.act.navy .ico {
  background: rgba(30, 217, 111, 0.14);
  color: var(--green-500);
}
.act.light {
  background: var(--white);
  box-shadow: var(--shadow-card);
}
.act.light p {
  color: var(--slate);
}
.act.light .ico {
  background: var(--navy-100);
  color: var(--navy-900);
}
.stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  padding: 0;
  overflow: hidden;
}
.stat {
  padding: 16px 14px;
}
.stat + .stat {
  border-left: 1px solid var(--line);
}
.stat b {
  display: block;
  font: 600 var(--fs-xl)/1 var(--f-mono);
  letter-spacing: -0.04em;
}
.stat span {
  display: block;
  font-size: var(--fs-xs);
  color: var(--slate);
  margin-top: 6px;
  line-height: 1.3;
}
.sec-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 18px 20px 12px;
}
.sec-hd h2 {
  font-size: var(--fs-lg);
  letter-spacing: -0.02em;
}
.sec-hd .link {
  font-size: var(--fs-sm);
}
.rows {
  list-style: none;
  margin: 0;
  padding: 0;
}
.rows > li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 13px 20px;
  border-top: 1px solid var(--line);
}
.rows .grow {
  flex: 1;
  min-width: 0;
}
.rows b {
  display: block;
  font-size: var(--fs-md);
  line-height: 1.35;
  overflow-wrap: break-word;
}
.rows small {
  display: block;
  font-size: var(--fs-sm);
  color: var(--slate);
  line-height: 1.35;
  overflow-wrap: break-word;
}
.rows .amt {
  font: 500 var(--fs-sm)/1 var(--f-mono);
  white-space: nowrap;
}
.rows .btn svg.ic {
  width: 15px;
  height: 15px;
}
.empty {
  display: grid;
  justify-items: center;
  gap: 10px;
  text-align: center;
  padding: 36px 24px 40px;
}
.empty .ico {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--green-100);
  color: var(--green-700);
  display: grid;
  place-items: center;
}
.empty .ico svg.ic {
  width: 26px;
  height: 26px;
}
.empty h2 {
  font-size: var(--fs-lg);
}
.empty p {
  color: var(--slate);
  font-size: var(--fs-md);
  max-width: 30em;
}
.empty .btns {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 8px;
}
.side-col {
  display: grid;
  gap: 16px;
  align-content: start;
}
.mini {
  list-style: none;
  margin: 0;
  padding: 0 0 8px;
}
.mini li a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 20px;
  text-decoration: none;
}
.mini li a:hover {
  background: var(--navy-50);
}
.mini .avatar {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  font-size: var(--fs-xs);
}
.mini b {
  display: block;
  font-size: var(--fs-sm);
}
.mini small {
  display: block;
  font-size: var(--fs-xs);
  color: var(--slate);
}
.note-card {
  padding: 18px 20px;
  display: grid;
  gap: 6px;
  font-size: var(--fs-sm);
  line-height: 1.45;
  color: var(--navy-700);
}
.note-card b {
  color: var(--navy-900);
  font-size: var(--fs-md);
}

@media (min-width: 720px) {
  .actions2 {
    grid-template-columns: 1.15fr 1fr;
  }
  .act {
    padding: 26px;
  }
  .stat {
    padding: 20px 22px;
  }
  .stat b {
    font-size: var(--fs-2xl);
  }
  .stat span {
    font-size: var(--fs-sm);
  }
}
@media (min-width: 1180px) {
  .dash {
    grid-template-columns: minmax(0, 1fr) 316px;
    gap: 28px;
    align-items: start;
  }
  .dash-main {
    display: grid;
    gap: 20px;
  }
}
.dash-main,
.side-col,
.stack,
.biz-list {
  grid-template-columns: minmax(0, 1fr);
}
.dash-main {
  display: grid;
  gap: 20px;
}
.setup > div {
  min-width: 0;
}

/* ---- Mein Betrieb ---------------------------------------------------------------------------- */
.biz-list {
  display: grid;
  gap: 14px;
}
.biz-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  text-decoration: none;
  transition: box-shadow 0.15s var(--ease);
}
a.biz-card:hover {
  box-shadow: 0 0 0 1.5px var(--navy-900);
}
.biz-card .grow {
  flex: 1;
  min-width: 0;
}
.biz-card h2 {
  font-size: var(--fs-lg);
  letter-spacing: -0.02em;
  line-height: 1.25;
}
.biz-card p {
  color: var(--slate);
  font-size: var(--fs-sm);
  margin-top: 2px;
}
.biz-card .nums {
  font: 400 var(--fs-xs)/1.5 var(--f-mono);
  color: var(--navy-600);
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 0 14px;
}
.biz-card .nums span {
  white-space: nowrap;
}
.biz-card .end {
  display: flex;
  align-items: center;
  gap: 10px;
}
.biz-card .chev {
  color: var(--stone);
}
.add-card {
  display: flex;
  align-items: center;
  gap: 14px;
  width: 100%;
  padding: 18px;
  border: 1px dashed var(--navy-300);
  border-radius: var(--r-xl);
  background: none;
  text-align: left;
  text-decoration: none;
  transition:
    border-color 0.15s var(--ease),
    background-color 0.15s var(--ease);
}
.add-card:hover {
  border-color: var(--navy-900);
  background: var(--white);
}
.add-card .ico {
  flex: none;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--green-100);
  color: var(--green-700);
  display: grid;
  place-items: center;
}
.add-card b {
  display: block;
  font-size: var(--fs-md);
}
.add-card small {
  display: block;
  color: var(--slate);
  font-size: var(--fs-sm);
  line-height: 1.4;
  margin-top: 2px;
}

.biz-head {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  padding: 20px;
}
.biz-head .grow {
  flex: 1;
  min-width: 200px;
}
.biz-head h2 {
  font-size: var(--fs-lg);
}
.biz-head p {
  color: var(--slate);
  font-size: var(--fs-sm);
  margin-top: 3px;
}
.sect {
  border-top: 1px solid var(--line);
  padding: 18px 20px 20px;
}
.sect-hd {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}
.sect-hd h3 {
  font-size: var(--fs-md);
  letter-spacing: -0.01em;
  flex: 1;
}
.dl {
  display: grid;
  gap: 10px 24px;
  margin: 0;
}
.dl > div {
  min-width: 0;
}
.dl dt {
  font-size: var(--fs-xs);
  color: var(--slate);
}
.dl dd {
  margin: 2px 0 0;
  font-size: var(--fs-md);
  overflow-wrap: anywhere;
}
.dl dd.mono {
  font-size: var(--fs-sm);
}
.dl dd.missing {
  color: var(--warn-fg);
  font-weight: 500;
}
.sect form {
  display: grid;
  gap: 18px;
}
.sect .form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.danger-zone {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  padding: 18px 20px;
  margin-top: 16px;
}
.danger-zone p {
  font-size: var(--fs-sm);
  color: var(--slate);
  max-width: 36em;
}
.stack {
  display: grid;
  gap: 16px;
}
@media (min-width: 640px) {
  .dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .dl.c3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .biz-card,
  .add-card {
    padding: 20px 22px;
  }
  .biz-head,
  .sect {
    padding-left: 24px;
    padding-right: 24px;
  }
}
@media (max-width: 639.98px) {
  .rows > li {
    align-items: flex-start;
    padding: 13px 16px;
  }
  /* Receipt rows (start page): name and dates use the full width, the amount sits under them,
     the PDF button on the right. */
  .rows > li.rrow {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    column-gap: 12px;
    row-gap: 6px;
    align-items: center;
  }
  .rrow > .grow {
    grid-column: 1;
    grid-row: 1;
  }
  .rrow > .amt {
    grid-column: 1;
    grid-row: 2;
  }
  .rrow > .btn {
    grid-column: 2;
    grid-row: 1 / span 2;
  }
  /* "Fertig" pages: buttons one under the other, full width, the main action first. */
  .done-foot {
    flex-direction: column;
    align-items: stretch;
  }
  .done-foot .spacer {
    display: none;
  }
  .done-foot .btn {
    width: 100%;
    justify-content: center;
  }
  .done-foot .btn-primary {
    order: 1;
  }
  .done-foot .btn-secondary {
    order: 2;
  }
  .done-foot .btn-ghost {
    order: 3;
  }
  .rows small {
    white-space: normal;
  }
  .sec-hd {
    padding-left: 16px;
    padding-right: 16px;
  }
  .biz-card .chip-d {
    display: none;
  }
  .biz-card .chip-m {
    display: block;
    margin-top: 10px;
  }
}
@media (min-width: 640px) {
  .biz-card .chip-m {
    display: none;
  }
}
.narrow {
  max-width: 760px;
}

/* ---- Logged-out pages: sign-up, confirmation, login ------------------------------------------ */
.auth {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--mist);
}
.auth-side {
  background: var(--navy-900);
  color: var(--white);
  padding: 14px 16px 16px;
}
.auth-side .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.auth-side .logo img {
  height: 26px;
  width: auto;
  display: block;
}
.auth-pitch {
  margin-top: 14px;
}
.auth-pitch .kicker {
  color: var(--green-500);
}
.auth-title {
  font-size: var(--fs-lg);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  margin-top: 6px;
}
.auth-lead,
.auth-steps,
.auth-points,
.auth-foot {
  display: none;
}
.auth-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 18px;
  padding: 20px 16px 28px;
}
.auth-top {
  display: flex;
  justify-content: flex-end;
}
.lang-select {
  width: auto;
  height: 40px;
  font-size: var(--fs-sm);
  font-weight: 600;
}
.auth-card {
  width: 100%;
  max-width: 600px;
  margin: 0 auto;
  padding: 24px 20px 22px;
}
.auth-card h1 {
  font-size: var(--fs-xl);
  letter-spacing: -0.04em;
  line-height: 1.08;
}
.auth-card h1:focus {
  outline: none;
}
.auth-card .lead {
  color: var(--slate);
  font-size: var(--fs-md);
  margin: 8px 0 22px;
}
.auth-card .lead b {
  color: var(--navy-900);
  overflow-wrap: anywhere;
}
.btn-block {
  width: 100%;
  min-height: 50px;
  font-size: var(--fs-md);
}
.checks {
  display: grid;
  gap: 14px;
}
.choice .plain {
  font-weight: 400;
  font-size: var(--fs-sm);
  line-height: 22px;
}
.choice input[aria-invalid='true'] {
  border-color: var(--err);
}
.check > .error {
  margin-top: 6px;
  padding-left: 34px;
}
[data-alert]:empty {
  display: none;
}
.link-inherit {
  color: inherit;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.pw {
  position: relative;
}
.pw .input {
  padding-right: 52px;
}
.pw-toggle {
  position: absolute;
  right: 4px;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 42px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: none;
  color: var(--stone);
}
.pw-toggle:hover {
  color: var(--navy-900);
  background: var(--navy-50);
}
.pw-toggle svg.ic {
  width: 19px;
  height: 19px;
}
.auth-row {
  display: flex;
  justify-content: flex-end;
  margin-top: -8px;
  font-size: var(--fs-sm);
}
.auth-switch {
  margin-top: 20px;
  text-align: center;
  font-size: var(--fs-sm);
  color: var(--slate);
}
.auth-switch.split {
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px 16px;
  text-align: left;
}
.auth-switch.split .link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.auth-switch.split .link svg.ic {
  width: 15px;
  height: 15px;
}
.link-quiet {
  color: var(--slate);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.link-quiet:hover {
  color: var(--navy-900);
}
.auth-ico {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 18px;
  background: var(--navy-100);
  color: var(--navy-900);
  margin-bottom: 18px;
}
.auth-ico svg.ic {
  width: 26px;
  height: 26px;
}
.auth-ico.ok {
  background: var(--green-100);
  color: var(--green-700);
}
.auth-ico.ok svg.ic {
  stroke-width: 2.4;
}
.auth-ico.bad {
  background: var(--bad-bg);
  color: var(--bad-fg);
}
.auth-box {
  display: grid;
  gap: 6px;
  justify-items: start;
  margin-top: 8px;
  padding: 18px 20px;
  background: var(--navy-50);
  border-radius: var(--r-m);
  font-size: var(--fs-sm);
  color: var(--navy-700);
  line-height: 1.5;
}
.auth-box b {
  color: var(--navy-900);
}
.auth-box .btn {
  margin-top: 12px;
}
.auth-card > .alert {
  margin-bottom: 18px;
}
.auth-legal {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: auto;
  padding-top: 8px;
  font-size: var(--fs-sm);
}
.auth-legal a {
  color: var(--slate);
  text-decoration: none;
}
.auth-legal a:hover {
  color: var(--navy-900);
  text-decoration: underline;
}
@media (min-width: 900px) {
  .auth {
    display: grid;
    grid-template-columns: minmax(380px, 42%) minmax(0, 1fr);
  }
  .auth-side {
    position: sticky;
    top: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    padding: 36px 48px 32px;
    overflow-y: auto;
    background:
      radial-gradient(120% 70% at 0% 100%, rgba(30, 217, 111, 0.2), transparent 60%),
      var(--navy-900);
  }
  .auth-side .logo img {
    height: 30px;
  }
  .auth-pitch {
    margin: auto 0;
    padding: 32px 0;
    max-width: 26em;
  }
  .auth-title {
    font-size: var(--fs-3xl);
    letter-spacing: -0.045em;
    line-height: 1.02;
    margin-top: 12px;
  }
  .auth-lead {
    display: block;
    margin-top: 14px;
    font-size: var(--fs-lg);
    line-height: 1.5;
    color: var(--navy-200);
  }
  .auth-steps,
  .auth-points {
    display: grid;
    gap: 4px;
    list-style: none;
    margin: 30px 0 0;
    padding: 0;
  }
  .auth-steps li {
    position: relative;
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 8px 0;
    font-size: var(--fs-md);
    color: var(--navy-300);
  }
  .auth-steps li:not(:last-child)::before {
    content: '';
    position: absolute;
    left: 15px;
    top: 40px;
    height: 12px;
    width: 2px;
    background: rgba(255, 255, 255, 0.16);
  }
  .auth-steps li.done:not(:last-child)::before {
    background: var(--green-500);
  }
  .auth-steps .n {
    flex: none;
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font: 600 var(--fs-xs)/1 var(--f-mono);
    box-shadow: inset 0 0 0 1.5px rgba(255, 255, 255, 0.25);
  }
  .auth-steps .n svg.ic {
    width: 15px;
    height: 15px;
    stroke-width: 2.4;
  }
  .auth-steps li.done {
    color: var(--white);
  }
  .auth-steps li.done .n {
    background: var(--green-500);
    color: var(--navy-900);
    box-shadow: none;
  }
  .auth-steps li.now {
    color: var(--white);
    font-weight: 600;
  }
  .auth-steps li.now .n {
    background: var(--white);
    color: var(--navy-900);
    box-shadow: 0 0 0 4px rgba(30, 217, 111, 0.35);
  }
  .auth-points li {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 7px 0;
    font-size: var(--fs-md);
    color: var(--navy-200);
  }
  .auth-points svg.ic {
    width: 18px;
    height: 18px;
    stroke: var(--green-500);
    stroke-width: 2.2;
  }
  .auth-foot {
    display: block;
    font-size: var(--fs-sm);
    color: var(--navy-300);
    line-height: 1.45;
  }
  .auth-foot a {
    color: var(--white);
    font-weight: 600;
    text-underline-offset: 3px;
  }
  .auth-main {
    padding: 28px 40px 28px;
    justify-content: center;
  }
  .auth-top {
    position: absolute;
    top: 24px;
    right: 32px;
  }
  .auth-card {
    padding: 36px 36px 30px;
    box-shadow:
      var(--shadow-card),
      0 30px 60px -40px rgba(10, 20, 51, 0.35);
  }
  .auth-card h1 {
    font-size: var(--fs-2xl);
  }
  .auth-legal {
    margin-top: 0;
  }
}

/* ---- Wizards: Beleg erstellen and Excel-Import -------------------------------------------------- */
.ctx {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 14px;
  font-size: var(--fs-sm);
  color: var(--slate);
}
.ctx .avatar {
  width: 28px;
  height: 28px;
  border-radius: 9px;
  font-size: var(--fs-xs);
}
.ctx b {
  color: var(--navy-900);
}
.ctx .link {
  font-size: var(--fs-sm);
}
.wiz-body {
  display: grid;
  gap: 18px;
  padding: 20px 16px;
}
.wiz-foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}
.wiz-foot.top {
  border-top: 0;
  border-bottom: 1px solid var(--line);
}
.wiz-foot .meta {
  font-size: var(--fs-sm);
  color: var(--slate);
}
.spacer {
  flex: 1;
}
form.wiz {
  display: block;
}
.list-hd {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.list-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: var(--fs-md);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.list-title .count {
  font: 500 var(--fs-xs)/1 var(--f-mono);
  color: var(--slate);
  background: var(--navy-100);
  border-radius: 999px;
  padding: 4px 8px;
}
.list-tools {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.list-hd.filters {
  padding: 16px 16px 12px;
  justify-content: flex-start;
}
.search {
  position: relative;
  flex: 1;
  min-width: 200px;
  max-width: 360px;
}
.search svg.ic {
  position: absolute;
  left: 13px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--stone);
  pointer-events: none;
}
.search .input {
  height: 42px;
  padding-left: 38px;
  font-size: var(--fs-md);
}
.filters .select {
  height: 42px;
  font-size: var(--fs-md);
  width: auto;
  min-width: 190px;
}
.rows.pick > li {
  padding-left: 16px;
  padding-right: 16px;
}
.wiz-body .rows {
  margin: 0 -16px;
}
.rows.pick .choice {
  flex: 1;
  min-width: 0;
  align-items: center;
  font-weight: 400;
}
.rows.pick .choice .grow {
  display: block;
}
.rows > li[hidden] {
  display: none;
}
.none {
  padding: 20px 16px;
  text-align: center;
  color: var(--slate);
  font-size: var(--fs-sm);
}
.group {
  border: 0;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 16px;
  min-width: 0;
}
.group + .group {
  padding-top: 14px;
}
.sub > legend {
  float: left;
  width: 100%;
  padding: 0;
  margin-bottom: 2px;
  font-size: var(--fs-md);
  font-weight: 600;
  letter-spacing: -0.01em;
}
.sub > legend + * {
  clear: both;
}
/* Section title with a fine line that starts a little after the text */
.group > legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  padding: 0;
} /* for screen readers only */
.sub {
  border: 0;
  margin: 0;
  padding: 16px;
  display: grid;
  gap: 14px;
  background: var(--navy-50);
  box-shadow: inset 0 0 0 1px var(--line);
  border-radius: var(--r-m);
  min-width: 0;
}
.names {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.chip.plain {
  font-family: var(--f-sans);
  font-size: var(--fs-xs);
  letter-spacing: 0;
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--line);
}
.affix {
  position: relative;
}
.affix > span {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  font: 500 var(--fs-xs)/1 var(--f-mono);
  color: var(--slate);
  pointer-events: none;
}
.affix .input {
  padding-left: 52px;
}
.tbl-wrap {
  margin: 0 -16px;
  overflow-x: auto;
}
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--fs-md);
}
.tbl th {
  text-align: left;
  font: 500 var(--fs-xs)/1 var(--f-mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--slate);
  padding: 10px 16px;
  border-bottom: 1px solid var(--line);
}
.tbl td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
.tbl .num {
  text-align: right;
  font-family: var(--f-mono);
  white-space: nowrap;
}
.tbl tfoot td {
  font-weight: 600;
  border-bottom: 0;
}
.review-biz {
  padding: 14px 16px;
  background: var(--navy-50);
  border-radius: var(--r-m);
  box-shadow: inset 0 0 0 1px var(--line);
}
.st-ico {
  flex: none;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
}
.st-ico svg.ic {
  width: 14px;
  height: 14px;
  stroke-width: 2.4;
}
.st-ico.ok {
  background: var(--green-100);
  color: var(--green-700);
}
.st-ico.bad {
  background: var(--err-bg);
  color: var(--err-fg);
}
.failed {
  color: var(--err-fg) !important;
  font-weight: 500;
}
.done-hd .auth-ico {
  margin-bottom: 14px;
}
.icon-btn {
  flex: none;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--slate);
}
.icon-btn:hover {
  background: var(--err-bg);
  color: var(--err-fg);
}
.bulk {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  background: var(--navy-900);
  color: var(--white);
  font-size: var(--fs-sm);
  font-weight: 500;
}
.bulk[hidden] {
  display: none;
}
.biz-tag {
  color: var(--navy-900);
  font-weight: 600;
}
.foot-note {
  margin-top: 12px;
  font-size: var(--fs-sm);
  color: var(--slate);
}
.pager {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}
.pager .meta {
  font-size: var(--fs-sm);
  color: var(--slate);
}
.pages {
  display: flex;
  align-items: center;
  gap: 4px;
}
.pg {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border: 0;
  border-radius: 10px;
  background: none;
  color: var(--navy-700);
  font: 500 var(--fs-sm)/1 var(--f-sans);
}
.pg:hover:not([disabled]) {
  background: var(--navy-50);
  color: var(--navy-900);
}
.pg[aria-current='page'] {
  background: var(--white);
  color: var(--navy-900);
  font-weight: 600;
  box-shadow: inset 0 0 0 1px var(--navy-200);
}
.pg[disabled] {
  opacity: 0.4;
  cursor: default;
}
.pg svg.ic {
  width: 16px;
  height: 16px;
}
.pg-gap {
  width: 28px;
  text-align: center;
  color: var(--stone);
  font-size: var(--fs-sm);
}
.pg-phone {
  display: none;
  font-size: var(--fs-sm);
  color: var(--slate);
  padding: 0 8px;
  white-space: nowrap;
}
#receipt-page[aria-busy='true'] {
  opacity: 0.55;
  transition: opacity 0.15s var(--ease);
}
.foot-note.in {
  margin: 0;
  padding: 14px 16px;
  border-top: 1px solid var(--line);
}
.blk {
  display: grid;
  gap: 12px;
}
.blk + .blk {
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.blk-hd {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: var(--fs-lg);
  letter-spacing: -0.02em;
}
.blk-hd.plain {
  margin-top: 4px;
}
.blk .btn {
  justify-self: start;
}
.drop {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 28px 16px;
  border: 1px solid transparent;
  border-radius: var(--r-l);
  background: var(--navy-50);
  text-align: center;
  cursor: pointer;
  transition:
    border-color 0.15s var(--ease),
    background-color 0.15s var(--ease);
}
.drop:hover {
  background: var(--white);
}
.drop:focus-within {
  border-color: var(--navy-900);
  box-shadow: var(--ring);
}
.drop .ico {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: var(--white);
  box-shadow: inset 0 0 0 1px var(--line);
}
.drop .ico svg.ic {
  width: 22px;
  height: 22px;
}
.drop .btn {
  margin-top: 6px;
  justify-self: center;
}
.drop .muted {
  font-size: var(--fs-sm);
}
.uploading {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  border-radius: var(--r-l);
  background: var(--navy-50);
  box-shadow: inset 0 0 0 1px var(--line);
}
.uploading b {
  display: block;
  overflow-wrap: anywhere;
}
.uploading .muted {
  font-size: var(--fs-sm);
}
.spinner {
  flex: none;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  border: 3px solid var(--navy-200);
  border-top-color: var(--navy-900);
  animation: spin 0.7s linear infinite;
}
.stats.flat {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-radius: var(--r-l);
  box-shadow: inset 0 0 0 1px var(--line);
  overflow: hidden;
}
.stats.flat .stat.ok b {
  color: var(--green-700);
}
.stats.flat .stat.bad b {
  color: var(--err);
}
.line-no {
  flex: none;
  font: 500 var(--fs-xs)/1 var(--f-mono);
  color: var(--navy-700);
  background: var(--navy-100);
  border-radius: 999px;
  padding: 6px 9px;
}
.rows.errs small {
  white-space: normal;
}
.sect.first {
  border-top: 0;
}
.danger-zone b {
  display: block;
  font-size: var(--fs-md);
  margin-bottom: 2px;
}
@media (min-width: 640px) {
  .row.c3 {
    grid-template-columns: 1.2fr 1fr 1fr;
  }
  .wiz-body {
    padding: 24px;
  }
  .wiz-foot {
    padding: 16px 24px;
  }
  .wiz-body .rows,
  .tbl-wrap {
    margin: 0 -24px;
  }
  .rows.pick > li,
  .tbl th,
  .tbl td {
    padding-left: 24px;
    padding-right: 24px;
  }
  .list-hd.filters {
    padding: 18px 24px 14px;
  }
  .bulk,
  .foot-note.in,
  .none,
  .pager {
    padding-left: 24px;
    padding-right: 24px;
  }
  .phone-only {
    display: none;
  }
}
@media (max-width: 639.98px) {
  .pager {
    flex-wrap: nowrap;
    gap: 8px;
  }
  .pager .meta {
    flex: 1;
    min-width: 0;
    line-height: 1.3;
  } /* may wrap in long languages; the page buttons stay in one row */
  .pager .pages {
    flex: none;
  }
  .pg:not(.pg-arrow),
  .pg-gap,
  .pg-arrow > span {
    display: none;
  }
  .pg-phone {
    display: inline;
    padding: 0 4px;
    font: 500 var(--fs-xs)/1 var(--f-mono);
  }
  .pg-arrow {
    width: 40px;
    height: 40px;
    padding: 0;
    box-shadow: inset 0 0 0 1px var(--navy-200);
  }
  .rows.receipts > li {
    flex-wrap: wrap;
    align-items: center;
    row-gap: 10px;
  }
  .rows.receipts .choice {
    flex-basis: 100%;
    align-items: flex-start;
  }
  .rows.receipts b {
    white-space: normal;
  }
  .rows.receipts .amt {
    margin-left: 34px;
    flex: 1;
  }
  /* The review table becomes one block per member. */
  .tbl thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
  }
  .tbl tr {
    display: grid;
    gap: 4px;
    padding: 12px 16px;
    border-bottom: 1px solid var(--line);
  }
  .tbl td {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    padding: 0;
    border: 0;
  }
  .tbl td::before {
    content: attr(data-label);
    color: var(--slate);
    font-size: var(--fs-sm);
  }
  .tbl td:first-child::before {
    display: none;
  }
  .tbl tfoot td::before {
    display: none;
  }
  .tbl tfoot tr {
    grid-template-columns: 1fr auto;
  }
  .filters .search,
  .filters .select {
    max-width: none;
    width: 100%;
    flex-basis: 100%;
  }
}

/* ---- 404, maintenance, offline, progress ----------------------------------------------------------- */
.nf-page {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--mist);
}
.nf-bar {
  display: flex;
  align-items: center;
  height: 64px;
  padding: 0 20px;
  background: var(--white);
  border-bottom: 1px solid var(--line);
}
.nf-bar .logo {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}
.nf-bar .logo img {
  height: 26px;
  width: auto;
  display: block;
}
.tag-light {
  color: var(--green-700);
  border-color: var(--green-200);
  background: var(--green-50);
}
.nf-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 20px 32px;
  text-align: center;
}
.nf-num {
  margin: 0 0 14px;
  font: 700 clamp(104px, 28vw, 200px)/0.9 var(--f-sans);
  letter-spacing: -0.07em;
  color: var(--navy-900);
  font-variant-numeric: tabular-nums;
}
.nf-zero {
  color: var(--green-500);
}
.nf-main h1 {
  font-size: var(--fs-xl);
  letter-spacing: -0.04em;
  line-height: 1.1;
}
.nf-lead {
  color: var(--slate);
  max-width: 30em;
}
.nf-btns {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-top: 18px;
}
.nf-page .auth-legal {
  padding: 0 16px 24px;
}
@media (min-width: 900px) {
  .nf-bar {
    padding: 0 40px;
  }
  .nf-main h1 {
    font-size: var(--fs-2xl);
  }
}
@media (max-width: 639.98px) {
  .nf-btns {
    flex-direction: column;
    align-self: stretch;
  }
  .nf-btns .btn {
    width: 100%;
    min-height: 50px;
  }
}
.solo {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 22px;
  padding: 24px 16px;
  background: var(--mist);
}
.solo-logo {
  height: 28px;
}
.solo-card {
  width: 100%;
  max-width: 520px;
  padding: 30px 26px 24px;
}
.solo-card h1 {
  font-size: var(--fs-xl);
  letter-spacing: -0.04em;
  line-height: 1.08;
}
.solo-card .lead {
  color: var(--slate);
  margin: 8px 0 22px;
}
.solo-foot {
  margin-top: 18px;
  font-size: var(--fs-sm);
  color: var(--slate);
  text-align: center;
}
.offline {
  position: sticky;
  top: 0;
  z-index: 80;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 10px 16px;
  background: var(--warn-bg);
  color: var(--warn-fg);
  font-size: var(--fs-sm);
  text-align: left;
}
.offline svg.ic {
  width: 18px;
  height: 18px;
  flex: none;
}
.progress {
  height: 10px;
  border-radius: 999px;
  background: var(--navy-100);
  overflow: hidden;
}
.progress span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--green-500);
  transition: width 0.6s var(--ease);
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  margin-top: -6px;
  font-size: var(--fs-sm);
  color: var(--slate);
}
.progress-meta b {
  color: var(--navy-900);
  font-weight: 500;
}
.sect form > .alert.info,
.fbd > .alert.info {
  margin: 0;
}

/* ---- Toast, skeleton, demo panel ------------------------------------------------------------- */
/* The notification looks like the Liticx notification on liticx.com: a message card that slides in
   from the top (phone: top centre, desktop: top right), the check draws itself, then it fades out. */
#toast {
  position: fixed;
  top: 12px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 50;
  display: grid;
  gap: 8px;
  width: min(380px, calc(100vw - 24px));
  pointer-events: none;
}
.toast {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  background: var(--white);
  color: var(--navy-900);
  padding: 12px 14px;
  border-radius: 18px;
  font-size: var(--fs-sm);
  box-shadow:
    0 18px 40px -16px rgba(10, 20, 51, 0.35),
    0 0 0 1px rgba(10, 20, 51, 0.06);
  animation: kn-in 0.32s cubic-bezier(0.2, 0.9, 0.3, 1) both;
}
.toast.out {
  animation: kn-out 0.3s var(--ease) forwards;
}
.toast .ki {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--green-500);
}
.toast .ki svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: var(--navy-900);
  stroke-width: 2.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  animation: draw 0.28s ease-out 0.3s forwards;
}
.toast.bad .ki {
  background: var(--bad-bg);
}
.toast.bad .ki svg.ic {
  width: 20px;
  height: 20px;
  stroke: var(--err-fg);
  stroke-dasharray: none;
  stroke-dashoffset: 0;
  animation: none;
}
.toast b {
  display: block;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.3;
}
.toast small {
  display: block;
  margin-top: 2px;
  font-size: 13px;
  color: var(--slate);
}
.toast em {
  align-self: start;
  margin-top: 2px;
  font: 400 12px/1.2 var(--f-mono);
  font-style: normal;
  color: var(--stone);
}
@keyframes kn-in {
  from {
    opacity: 0;
    transform: translateY(-16px);
  }
}
@keyframes kn-out {
  to {
    opacity: 0;
    transform: translateY(-8px);
  }
}
@keyframes draw {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}
@media (min-width: 1024px) {
  #toast {
    top: 20px;
    right: 24px;
    left: auto;
    transform: none;
  }
}
.skel {
  display: grid;
  gap: 14px;
}
.skel i {
  display: block;
  height: 18px;
  border-radius: 8px;
  background: linear-gradient(90deg, var(--navy-100) 25%, var(--navy-50) 37%, var(--navy-100) 63%);
  background-size: 400% 100%;
  animation: shimmer 1.4s ease infinite;
}
.skel i.h {
  height: 34px;
  width: 55%;
}
.skel i.b {
  height: 120px;
  border-radius: var(--r-l);
}
@keyframes shimmer {
  from {
    background-position: 100% 50%;
  }
  to {
    background-position: 0 50%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    transition-duration: 0.001ms !important;
  }
}

/* ---- Confirm dialog -------------------------------------------------------------------------- */
.dialog {
  border: 0;
  border-radius: var(--r-xl);
  padding: 24px;
  width: min(440px, calc(100vw - 32px));
  color: var(--text);
  box-shadow: 0 30px 60px -20px rgba(10, 20, 51, 0.5);
}
.dialog:focus {
  outline: none;
}
.dialog::backdrop {
  background: rgba(10, 20, 51, 0.55);
}
.dialog h2 {
  font-size: var(--fs-lg);
  margin-bottom: 8px;
}
.dialog p {
  color: var(--slate);
  font-size: var(--fs-md);
}
.dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 22px;
}
.form-dialog {
  width: min(460px, calc(100vw - 32px));
}
.form-dialog .form-grid {
  margin-top: 18px;
}
.form-dialog .form-grid .dialog-actions {
  margin-top: 4px;
}
.dialog button.link {
  cursor: pointer;
}
button.link {
  cursor: pointer;
  font: inherit;
  font-weight: 600;
}

/* ---- Motion: small, brand-made moments ---------------------------------------------------------
   Only transform and opacity (plus SVG strokes), all under a second, no library. The global
   prefers-reduced-motion rule above turns every one of them into its end state. */
:root {
  --ease-land: cubic-bezier(0.3, 1.35, 0.55, 1);
} /* slight overshoot, like the logo on liticx.com */

/* Logo: always still. With a mouse, resting on the mark or the word "Liticx" (not the TARIF 595 tag)
   lets the three bars land, as on liticx.com. The 0.3 s wait means a mouse that only passes over the
   logo (e.g. on its way to the browser's back button) changes nothing: no fill before the start. */
.logo-svg {
  height: 26px;
  width: auto;
  display: block;
  overflow: visible;
}
.logo-svg .pl {
  transform-box: fill-box;
  transform-origin: center;
  transform: rotate(var(--r));
}
@media (hover: hover) {
  .logo-svg:hover .pl {
    animation: land 0.26s var(--ease-land) 0.3s forwards;
  }
  .logo-svg:hover .pl.m {
    animation-delay: 0.42s;
  }
  .logo-svg:hover .pl.t {
    animation-delay: 0.54s;
  }
}
@keyframes land {
  from {
    transform: translateY(-14px) rotate(0deg);
    opacity: 0.35;
  }
  to {
    transform: translateY(0) rotate(var(--r));
    opacity: 1;
  }
}
@media (min-width: 1024px) {
  .auth-side .logo-svg {
    height: 30px;
  }
}

/* 1 · Setup done: the ring fills to 3/3 and turns into a green check (desktop, right column). */
.ring .r1 .ring-ico {
  position: relative;
  width: 84px;
  height: 84px;
  flex: none;
}
.ring .r1 .ring-ico > svg {
  width: 84px;
  height: 84px;
}
.ring.celebrate .arc {
  animation: ring-fill 0.6s var(--ease) both;
}
.ring.celebrate .num {
  animation: fade-out 0.2s var(--ease) 0.5s both;
}
.ring .done-dot {
  position: absolute;
  inset: 9px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green-500);
  transform: scale(0);
  opacity: 0;
}
.ring .done-dot svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: var(--navy-900);
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
}
.ring.celebrate .done-dot {
  animation: pop 0.38s var(--ease-land) 0.6s both;
}
.ring.celebrate .done-dot svg {
  animation: draw 0.3s var(--ease) 0.85s forwards;
}
.ring.celebrate .r1 > div:last-child {
  animation: rise 0.3s var(--ease) 0.7s both;
}
@keyframes ring-fill {
  from {
    stroke-dashoffset: var(--from);
  }
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes fade-out {
  to {
    opacity: 0;
  }
}
@keyframes pop {
  from {
    transform: scale(0);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}
.alert.ok.fresh {
  animation: rise 0.3s var(--ease) both;
}

/* 3 · Receipts per month: navy bars, only the current month green. They grow once per visit. */
.chart-card {
  padding: 18px 20px 14px;
}
.chart-card .sec-hd {
  padding: 0;
  margin-bottom: 14px;
}
@media (max-width: 639px) {
  .chart-card {
    padding: 16px 16px 12px;
  }
}
.chart-card .sec-hd span {
  font: 500 var(--fs-xs)/1 var(--f-mono);
  color: var(--slate);
}
.bars {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 6px;
  height: 140px;
  align-items: end;
}
.bars .c {
  display: grid;
  gap: 6px;
  height: 100%;
  grid-template-rows: 1fr auto;
}
.bars .b {
  align-self: end;
  position: relative;
  height: var(--h);
  border-radius: 5px 5px 2px 2px;
  background: var(--navy-900);
  transform-origin: bottom;
}
.bars .b.now {
  background: var(--green-500);
}
.bars .b.future {
  background: var(--navy-100);
}
.bars .b .v {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 4px);
  transform: translateX(-50%);
  font: 600 var(--fs-xs)/1 var(--f-mono);
  color: var(--green-700);
  white-space: nowrap;
}
.bars .c > span {
  font: 500 var(--fs-xs)/1 var(--f-mono);
  color: var(--stone);
  text-align: center;
}
.bars .c.now > span {
  color: var(--navy-900);
  font-weight: 600;
}
.bars.grow .b {
  animation: grow 0.5s var(--ease) both;
  animation-delay: calc(var(--i) * 40ms);
}
.bars.grow .b .v {
  animation: rise 0.25s var(--ease) 0.9s both;
}
@keyframes grow {
  from {
    transform: scaleY(0.02);
  }
}

/* 5 · Live check: «gültig» appears inside the field as soon as the number and its check digit fit. */
.field .fx {
  position: relative;
}
.field .fx > .input {
  padding-right: 96px;
}
.valid {
  position: absolute;
  right: 10px;
  top: 50%;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 8px 4px 6px;
  border-radius: 999px;
  background: var(--green-100);
  color: var(--green-950);
  font-size: 12px;
  font-weight: 600;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-50%) scale(0.85);
  transition:
    opacity 0.18s var(--ease),
    transform 0.25s var(--ease-land);
}
.valid svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: var(--green-700);
  stroke-width: 2.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  transition: stroke-dashoffset 0.25s var(--ease) 0.08s;
}
.field.is-valid .valid {
  opacity: 1;
  transform: translateY(-50%) scale(1);
}
.field.is-valid .valid svg {
  stroke-dashoffset: 0;
}
.field.is-valid .input:not([aria-invalid='true']) {
  border-color: var(--green-700);
}

/* 6 · Countdown to the new receipt format: one real number, counted up once per visit. */
.cd-card {
  padding: 20px;
  display: grid;
  gap: 16px;
}
.cd-card .big {
  display: flex;
  align-items: center;
  gap: 12px;
}
.cd-card .big b {
  font: 600 var(--fs-3xl)/1 var(--f-mono);
  letter-spacing: -0.05em;
  font-variant-numeric: tabular-nums;
}
.cd-card .big span {
  color: var(--slate);
  font-size: var(--fs-sm);
  line-height: 1.4;
}
.cd-card .yr {
  height: 6px;
  border-radius: 3px;
  background: var(--navy-100);
  overflow: hidden;
}
.cd-card .yr i {
  display: block;
  height: 100%;
  width: var(--p);
  border-radius: 3px;
  background: var(--green-500);
  transform-origin: left;
}
.cd-card.go .yr i {
  animation: fill-x 0.8s var(--ease) both;
}
.cd-card .yr-l {
  margin-top: -6px;
  display: flex;
  justify-content: space-between;
  font: 500 var(--fs-xs)/1 var(--f-mono);
  color: var(--stone);
}
.cd-card .ready {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  justify-self: start;
  padding: 7px 10px;
  border-radius: 8px;
  background: var(--green-100);
  color: var(--green-950);
  font-size: var(--fs-xs);
  font-weight: 600;
  line-height: 1.35;
}
@media (max-width: 639px) {
  .cd-card .ready {
    border-radius: 999px;
  }
}
.cd-card .ready svg.ic {
  width: 13px;
  height: 13px;
  stroke: var(--green-700);
  stroke-width: 3;
}
.cd-card.go .ready {
  animation: rise 0.25s var(--ease) 0.85s both;
}
@keyframes fill-x {
  from {
    transform: scaleX(0);
  }
}

/* 7 · Small touches: the tick pops in, the step bar fills, the drop zone lifts. */
.choice input[type='checkbox']:checked {
  animation: tick 0.2s var(--ease) both;
}
.choice input:active {
  transform: scale(0.92);
}
@keyframes tick {
  from {
    background-size: 0 0;
  }
  to {
    background-size: 14px 14px;
  }
}
.seg-line {
  position: relative;
  overflow: hidden;
}
.segbar .done.fresh .seg-line {
  background: var(--navy-200);
}
.segbar .done.fresh .seg-line::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 3px;
  background: var(--green-500);
  transform-origin: left;
  animation: fill-x 0.45s var(--ease) 0.05s both;
}
.drop {
  position: relative;
}
.drop .border {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}
.drop .border rect {
  fill: none;
  stroke: var(--navy-300);
  stroke-width: 1.5;
  stroke-dasharray: 6 5;
  transition: stroke 0.2s var(--ease);
}
.drop:hover .border rect {
  stroke: var(--navy-900);
}
.drop.over {
  background: var(--green-50);
}
.drop.over .border rect {
  stroke: var(--green-700);
  animation: march 0.6s linear infinite;
}
.drop .ico {
  transition:
    transform 0.25s var(--ease-land),
    box-shadow 0.25s var(--ease);
}
.drop.over .ico {
  transform: translateY(-4px);
  box-shadow:
    0 10px 18px -10px rgba(10, 20, 51, 0.45),
    inset 0 0 0 1px var(--line);
}
@keyframes march {
  to {
    stroke-dashoffset: -11;
  }
}
/* Touch screens (phones, most tablets) cannot drag a file in: only «Datei auswählen» is offered. */
@media (hover: none) and (pointer: coarse) {
  .drop .drag-only {
    display: none;
  }
}
@media (prefers-reduced-motion: reduce) {
  .drop.over .border rect {
    animation: none;
  }
}

/* ---- Touch targets ---------------------------------------------------------------------------
   Text links keep their look, but get a taller invisible hit area (at least 24px high, WCAG 2.2),
   and the step bar segments (only a 5px line on phones) become easy to tap. */
.link,
.back,
.auth-legal a,
.help-inline > summary,
.auth-foot a {
  padding-block: 6px;
  margin-block: -6px;
}
.auth-legal a {
  padding-inline: 4px;
}
.back {
  margin-bottom: 4px;
}
.logo {
  padding-block: 6px;
  margin-block: -6px;
}
.segbar a {
  padding-block: 10px;
  margin-block: -10px;
}

/* ---- iPhone notch and home bar (viewport-fit=cover) -------------------------------------------
   In landscape the notch sits left or right: keep content, bars and sheets out of it. */
body {
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
.tabbar {
  padding-left: max(4px, env(safe-area-inset-left));
  padding-right: max(4px, env(safe-area-inset-right));
}
.pop.is-sheet {
  padding-left: max(12px, env(safe-area-inset-left));
  padding-right: max(12px, env(safe-area-inset-right));
}

/* ---- Long words (French, Italian) on small phones --------------------------------------------
   Buttons may wrap onto a second line instead of pushing the page wider than the screen. */
@media (max-width: 639.98px) {
  .btn {
    white-space: normal;
    text-align: center;
    max-width: 100%;
  }
}

/* Adapted: the Betrieb picker above the start page's numbers and "Meine Belege" (receipts are per
   Betrieb in the Liticx API). */
.biz-pick {
  max-width: 420px;
  margin: 0 0 16px;
}
