@font-face { font-family: "SPUFO Sans"; src: url("/fonts/sans-300.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "SPUFO Sans"; src: url("/fonts/sans-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "SPUFO Sans"; src: url("/fonts/sans-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }
@font-face { font-family: "SPUFO Sans"; src: url("/fonts/sans-600.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "SPUFO Mono"; src: url("/fonts/mono-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "SPUFO Mono"; src: url("/fonts/mono-500.woff2") format("woff2"); font-weight: 500; font-style: normal; font-display: swap; }

:root {
  color-scheme: light dark;
  --paper: #f6f5f1;
  --field: #ffffff;
  --wash: #eceae3;
  --ink: #151514;
  --ink-2: #3c3b38;
  --muted: #74726b;
  --rule: #dddad2;
  --rule-strong: #bdb9ae;
  --signal: #d52b1e;
  --signal-ink: #b3241a;
  --green: #1c7a45;
  --amber: #a35a00;
  --scrim: rgba(21, 21, 20, .52);
  --sans: "SPUFO Sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --mono: "SPUFO Mono", ui-monospace, Menlo, Consolas, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #121211;
    --field: #191918;
    --wash: #1d1d1b;
    --ink: #ecebe6;
    --ink-2: #c8c6be;
    --muted: #8f8d85;
    --rule: #2b2a27;
    --rule-strong: #47453f;
    --signal: #ff5a46;
    --signal-ink: #ff7a69;
    --green: #5fca8c;
    --amber: #e3a33c;
    --scrim: rgba(0, 0, 0, .66);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--ink);
  font: 400 15px/1.55 var(--sans);
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
code, .mono { font-family: var(--mono); }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.alert { color: var(--signal-ink); }
::selection { background: var(--ink); color: var(--paper); }

.wrap { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 48px; }

/* Kopfzeile: rote Linie, Wortmarke, Navigation */
.masthead { border-top: 3px solid var(--signal); border-bottom: 1px solid var(--rule); }
.masthead-inner { display: flex; align-items: stretch; gap: 48px; height: 64px; }
.wordmark { display: flex; align-items: center; gap: 12px; text-decoration: none; white-space: nowrap; }
.wordmark .mark { width: 12px; height: 12px; background: var(--signal); }
.wordmark b { font-weight: 600; font-size: 15px; letter-spacing: .08em; }
.wordmark-sub { padding-left: 12px; border-left: 1px solid var(--rule-strong); color: var(--muted); font-size: 14px; }
.nav { display: flex; gap: 32px; }
.nav a {
  display: flex;
  align-items: center;
  margin-bottom: -1px;
  border-bottom: 2px solid transparent;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: color .15s, border-color .15s;
}
.nav a:hover { color: var(--ink); }
.nav a.is-active { color: var(--ink); border-bottom-color: var(--ink); }
/* Anmeldung rechts in der Kopfzeile: Benutzer und Abmelden */
.session { display: flex; align-items: center; gap: 20px; margin-left: auto; }
.session form { margin: 0; }
.session-user {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink-2);
  font: 500 12.5px var(--mono);
  letter-spacing: .03em;
  text-decoration: none;
}
.session-user::before { content: ""; width: 7px; height: 7px; background: var(--green); }
.session-user:hover, .session-user.is-active { color: var(--ink); text-decoration: underline; text-underline-offset: 4px; }
.session-out {
  padding: 0;
  border: 0;
  background: none;
  color: var(--muted);
  font: 500 13px/1 var(--sans);
  cursor: pointer;
}
.session-out:hover { color: var(--ink); }
.session-out:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* Seitenkopf */
main.wrap { flex: 1; padding-bottom: 96px; }
.page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  padding: 56px 0 40px;
}
.eyebrow, .crumbs { margin-bottom: 18px; color: var(--muted); font-size: 13.5px; }
.crumbs { display: flex; gap: 10px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.title-row { display: flex; align-items: center; gap: 18px; }
h1 { font-size: 46px; line-height: 1.06; font-weight: 500; letter-spacing: -.025em; }
.meta { margin-top: 14px; color: var(--ink-2); font-size: 15px; }
.meta .sep { margin: 0 10px; color: var(--rule-strong); }
.page-actions { display: flex; gap: 12px; }

/* Kantonskürzel wie auf einem Kontrollschild */
.canton {
  display: inline-block;
  min-width: 38px;
  padding: 4px 6px 3px;
  border: 1.5px solid var(--ink);
  font: 500 12.5px/1 var(--mono);
  letter-spacing: .08em;
  text-align: center;
}
.canton-lg { min-width: 0; padding: 7px 10px 6px; border-width: 2px; font-size: 20px; }

/* Knöpfe */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 20px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: 500 14px/1 var(--sans);
  letter-spacing: .01em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.btn:hover { background: var(--wash); }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: var(--ink-2); border-color: var(--ink-2); }
.btn-danger { background: var(--signal); border-color: var(--signal); color: #fff; }
.btn-danger:hover { background: var(--signal-ink); border-color: var(--signal-ink); }
.btn-danger-outline { border-color: var(--signal); color: var(--signal-ink); }
.btn-danger-outline:hover { background: var(--signal); color: #fff; }
.btn-quiet { padding: 0 6px; border-color: transparent; text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: 5px; }
.btn-quiet:hover { background: none; text-decoration-color: currentColor; }
.btn-small { height: 34px; padding: 0 14px; font-size: 13px; }
.link-button {
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  font: 500 13.5px/1.4 var(--sans);
  text-decoration: underline;
  text-decoration-color: var(--rule-strong);
  text-underline-offset: 4px;
  cursor: pointer;
  list-style: none;
}
.link-button:hover { text-decoration-color: currentColor; }
.link-button.is-danger { color: var(--signal-ink); text-decoration-color: currentColor; }
a:focus-visible, .btn:focus-visible, .link-button:focus-visible, summary:focus-visible, .code:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* Kennzahlen */
.figures {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin: 0;
  border-top: 2px solid var(--ink);
  border-bottom: 1px solid var(--rule);
}
/* container-type: die Zahl richtet sich nach der Breite ihrer Spalte und
   läuft so nie in die Nachbarspalte, auch nicht bei einem Datum. */
.figure { container-type: inline-size; min-width: 0; padding: 22px 28px 28px; border-left: 1px solid var(--rule); }
.figure:first-child { padding-left: 0; border-left: 0; }
.figure dt { color: var(--ink-2); font-size: 13.5px; font-weight: 500; }
.figure .value { margin: 14px 0 0; font-size: clamp(30px, 26cqi, 56px); line-height: 1; font-weight: 300; letter-spacing: -.04em; white-space: nowrap; }
.figure .value.is-long { font-size: clamp(24px, 17cqi, 56px); }
.figure .value.is-xlong { font-size: clamp(20px, 13cqi, 56px); }
.figure .detail { margin: 12px 0 0; color: var(--muted); font-size: 13.5px; }
.figure.is-alert .value { color: var(--signal-ink); }
.figure.is-warn .value { color: var(--amber); }
.figure .meter { width: 100%; margin: 2px 0 10px; }
.figure .detail .alert { font-weight: 500; }

/* Abschnitte */
.section { margin-top: 72px; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
  padding-bottom: 14px;
  border-bottom: 2px solid var(--ink);
}
.section-head h2 { font-size: 24px; font-weight: 500; letter-spacing: -.015em; }
.section-head .count { margin-left: 6px; color: var(--muted); font-weight: 300; }
.section-head p { color: var(--muted); font-size: 13.5px; }
.footnote { padding-top: 16px; color: var(--muted); font-size: 13px; }

/* Tabellen */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th {
  padding: 14px 20px 12px 0;
  border-bottom: 1px solid var(--rule-strong);
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 500;
  text-align: left;
  white-space: nowrap;
}
.table td { padding: 20px 20px 20px 0; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.table th:last-child, .table td:last-child { padding-right: 0; }
.table td.end, .table th:last-child { text-align: right; }
.row-title { font-weight: 500; text-decoration: none; }
.row-title:hover { text-decoration: underline; }
.row-open { color: var(--muted); font-size: 13.5px; font-weight: 500; text-decoration: none; }
.row-open::after { content: " →"; }
.row-open:hover { color: var(--ink); }
.seats { display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.seats b { font-weight: 500; }
.over { color: var(--signal-ink); font-size: 13px; font-weight: 500; }
.meter { display: block; width: 120px; height: 3px; margin-top: 8px; }
.meter .track { fill: var(--rule); }
.meter .fill { fill: var(--ink); }
.meter.is-high .fill { fill: var(--amber); }
.meter.is-over .fill { fill: var(--signal); }
.due { display: block; margin-top: 3px; color: var(--amber); font-size: 13px; }
.due.is-ended { color: var(--signal-ink); }
.device-id { font-size: 13.5px; letter-spacing: .02em; word-break: break-all; }
.status { display: inline-flex; align-items: center; gap: 9px; font-size: 14px; white-space: nowrap; }
.status::before { content: ""; width: 8px; height: 8px; background: var(--ink); }
.status.is-active::before { background: var(--green); }
.status.is-revoked { color: var(--signal-ink); }
.status.is-revoked::before { background: var(--signal); }
.status.is-idle { color: var(--muted); }
.status.is-idle::before { background: transparent; box-shadow: inset 0 0 0 1.5px var(--muted); }
.row-actions { display: flex; align-items: flex-start; justify-content: flex-end; gap: 28px; }
.row-actions form { margin: 0; }
.inline-edit summary::-webkit-details-marker { display: none; }
.inline-edit[open] summary { text-decoration-color: currentColor; }
.inline-form { display: flex; gap: 8px; margin-top: 12px; }
.inline-form input { width: 150px; height: 34px; font-size: 13.5px; }

/* Formulare */
.sheet { border-top: 2px solid var(--ink); }
.form-section { display: grid; grid-template-columns: minmax(0, 320px) minmax(0, 1fr); gap: 64px; padding: 40px 0; border-bottom: 1px solid var(--rule); }
.form-intro h2 { font-size: 19px; font-weight: 500; letter-spacing: -.01em; }
.form-intro p { margin-top: 8px; color: var(--muted); font-size: 14px; }
.form-fields { display: grid; gap: 28px; max-width: 760px; }
.form-footer { display: flex; justify-content: flex-end; align-items: center; gap: 16px; padding-top: 28px; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.field-grid.single { grid-template-columns: minmax(0, 1fr); }
.field { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.field-label { color: var(--ink-2); font-size: 13.5px; font-weight: 500; }
.field-hint { color: var(--muted); font-size: 13px; }
input:not([type]), input[type=text], input[type=password], select {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1px solid var(--rule-strong);
  border-radius: 0;
  background: var(--field);
  color: var(--ink);
  font: 400 15px var(--sans);
  transition: border-color .15s, box-shadow .15s;
}
input:not([type]):hover, input[type=text]:hover, input[type=password]:hover, select:hover { border-color: var(--muted); }
input:not([type]):focus, input[type=text]:focus, input[type=password]:focus, select:focus { outline: none; border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
input[aria-invalid=true] { border-color: var(--signal); box-shadow: inset 0 0 0 1px var(--signal); }
input[readonly] { background: var(--wash); color: var(--ink-2); }
input[readonly]:hover { border-color: var(--rule-strong); }
input.otp { font-family: var(--mono); letter-spacing: .18em; }
input.otp::placeholder { font-family: var(--sans); letter-spacing: 0; }
select {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 40px;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-2) 50%), linear-gradient(-45deg, transparent 50%, var(--ink-2) 50%);
  background-position: calc(100% - 20px) 19px, calc(100% - 15px) 19px;
  background-size: 5px 5px;
  background-repeat: no-repeat;
  cursor: pointer;
}
input::placeholder { color: var(--muted); opacity: .7; }
.field-error { color: var(--signal-ink); font-size: 13px; font-weight: 500; }
.form-alert {
  padding: 12px 0 12px 16px;
  border-left: 3px solid var(--signal);
  color: var(--signal-ink);
  font-weight: 500;
}
.sheet > .form-alert { margin-top: 28px; }
input.mono { font-family: var(--mono); letter-spacing: .08em; text-transform: uppercase; }
.options { min-width: 0; margin: 0; padding: 0; border: 0; }
.options legend { margin-bottom: 10px; padding: 0; }
.option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.option {
  display: flex;
  gap: 14px;
  padding: 18px 20px;
  border: 1px solid var(--rule-strong);
  background: var(--field);
  cursor: pointer;
  transition: border-color .15s, box-shadow .15s;
}
.option:hover { border-color: var(--muted); }
.option:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.option input {
  appearance: none;
  -webkit-appearance: none;
  flex: none;
  width: 16px;
  height: 16px;
  margin: 3px 0 0;
  border: 1.5px solid var(--muted);
  border-radius: 50%;
  background: var(--field);
}
.option input:checked { border-color: var(--ink); background: var(--ink); box-shadow: inset 0 0 0 3px var(--field); }
.option input:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.option-body b { display: block; font-weight: 600; }
.option-body span { display: block; margin-top: 4px; color: var(--muted); font-size: 13.5px; }

/* Aktivierungscodes */
.code-forms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.code-form { display: grid; gap: 20px; align-content: start; margin: 0; padding: 32px 48px 8px 0; }
.code-form + .code-form { padding-left: 48px; padding-right: 0; border-left: 1px solid var(--rule); }
.code-form h3 { font-size: 17px; font-weight: 500; }
.code-form > p { margin-top: -12px; color: var(--muted); font-size: 14px; }

/* Meldungen */
.notice {
  margin: -16px 0 40px;
  padding: 12px 0 12px 16px;
  border-left: 3px solid var(--green);
  color: var(--ink);
  font-weight: 500;
  animation: arrive .4s ease-out;
}
.note { margin-top: 20px; padding-left: 16px; border-left: 2px solid var(--rule-strong); color: var(--ink-2); font-size: 14px; }
.note.is-danger { border-left-color: var(--signal); }
.empty { padding: 48px 0 40px; border-bottom: 1px solid var(--rule); }
.empty-title { font-size: 17px; font-weight: 500; }
.empty p + p { margin-top: 6px; color: var(--muted); }

/* Bestätigungsdialog */
.scrim {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow-y: auto;
  background: var(--scrim);
  animation: fade .18s ease-out;
}
.dialog {
  width: min(580px, 100%);
  padding: 40px 44px 36px;
  border-top: 4px solid var(--ink);
  background: var(--paper);
  box-shadow: 0 40px 100px -30px rgba(0, 0, 0, .55);
  animation: rise .22s ease-out;
}
.dialog.is-danger { border-top-color: var(--signal); }
.dialog .eyebrow { margin-bottom: 10px; }
.dialog h1 { font-size: 30px; letter-spacing: -.02em; }
.dialog .lead { margin-top: 12px; color: var(--ink-2); }
.facts { margin: 28px 0 0; border-top: 1px solid var(--rule-strong); }
.facts > div { display: grid; grid-template-columns: 180px minmax(0, 1fr); gap: 16px; padding: 11px 0; border-bottom: 1px solid var(--rule); font-size: 14.5px; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 500; overflow-wrap: anywhere; }
.diff { width: 100%; margin-top: 28px; border-collapse: collapse; border-top: 1px solid var(--rule-strong); font-size: 14.5px; }
.diff th, .diff td { padding: 11px 12px 11px 0; border-bottom: 1px solid var(--rule); text-align: left; }
.diff th { width: 180px; color: var(--muted); font-weight: 400; }
.diff .old { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--rule-strong); }
.diff .arrow { width: 28px; color: var(--muted); }
.diff .new { font-weight: 600; }
.dialog-actions { display: flex; justify-content: flex-end; align-items: center; gap: 16px; margin-top: 36px; }
.dialog form { margin: 0; }
.dialog-code { margin-top: 28px; padding-top: 24px; border-top: 1px solid var(--rule-strong); }
.dialog-code input { max-width: 240px; }

/* Anmeldung */
.auth {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 440px);
  gap: 96px;
  align-items: start;
  margin-top: 88px;
  padding-top: 40px;
  border-top: 2px solid var(--ink);
}
.auth-intro h1 { font-size: 64px; letter-spacing: -.035em; }
.auth-intro .lead { max-width: 440px; margin-top: 22px; color: var(--ink-2); font-size: 17px; }
.auth-form { display: grid; gap: 22px; margin: 0; }
.btn-wide { width: 100%; height: 48px; margin-top: 6px; }
.auth-help { padding-top: 18px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 13.5px; }

/* Einrichtung der Authenticator-App */
.form-intro .step-no { display: block; margin-bottom: 10px; }
.totp { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 32px; align-items: start; }
.totp-qr { margin: 0; }
.totp-qr svg { display: block; width: 200px; height: auto; border: 1px solid var(--rule); }
.totp-key { display: grid; gap: 10px; }
.secret {
  padding: 14px 0;
  border-top: 1px solid var(--rule-strong);
  border-bottom: 1px solid var(--rule);
  font: 500 18px/1.5 var(--mono);
  letter-spacing: .08em;
  word-spacing: .2em;
  user-select: all;
  -webkit-user-select: all;
}

/* Eigenes Konto */
.account-facts { margin: 0 0 8px; border-top: 2px solid var(--ink); }
.account-facts > div { grid-template-columns: 220px minmax(0, 1fr); padding: 14px 0; }
.account-sheet { margin-top: 56px; }
.account-sheet .form-section { margin: 0; }
.form-fields > div > .btn { margin-top: 2px; }

/* Konten */
.section-first { margin-top: 0; }
.access { display: inline-flex; align-items: center; gap: 12px; }
.access a { text-decoration: none; }
.access a:hover { text-decoration: underline; }
.access-admin { font-weight: 500; }
.link-box {
  margin: 14px 0 0;
  padding: 24px 0;
  border-bottom: 1px solid var(--rule);
  font: 500 17px/1.6 var(--mono);
  overflow-wrap: anywhere;
  user-select: all;
  -webkit-user-select: all;
}
.code-sheet .steps { margin-top: 0; border-top: 0; }

/* Neuer Aktivierungscode */
.code-sheet { display: grid; gap: 0; max-width: 760px; padding-top: 32px; border-top: 2px solid var(--ink); }
.code {
  margin: 14px 0 0;
  padding: 28px 0;
  border-bottom: 1px solid var(--rule);
  font: 500 52px/1 var(--mono);
  letter-spacing: .06em;
  user-select: all;
  -webkit-user-select: all;
}
.code-sheet .facts { margin-top: 0; border-top: 0; }
.code-sheet .note { margin: 28px 0 32px; }

/* Verlängerungs-QR */
.qr-sheet { display: grid; grid-template-columns: minmax(0, 400px) minmax(0, 1fr); gap: 72px; padding-top: 40px; border-top: 2px solid var(--ink); }
.qr { margin: 0; }
.qr svg { display: block; width: 100%; height: auto; border: 1px solid var(--rule); }
.qr figcaption { margin-top: 12px; color: var(--muted); font: 400 12px var(--mono); letter-spacing: .04em; }
.valid-until { margin-top: 8px; font-size: 64px; line-height: 1; font-weight: 300; letter-spacing: -.04em; }
.steps { margin: 40px 0 0; padding: 0; list-style: none; border-top: 1px solid var(--rule-strong); }
.steps li { display: grid; grid-template-columns: 56px minmax(0, 1fr); padding: 16px 0; border-bottom: 1px solid var(--rule); }
.step-no { color: var(--muted); font: 400 13px/1.7 var(--mono); }
.qr-copy .note { margin-top: 28px; }
details.token { margin-top: 28px; }
details.token summary { color: var(--muted); font-size: 13.5px; cursor: pointer; }
textarea.token {
  width: 100%;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--rule-strong);
  border-radius: 0;
  background: var(--field);
  color: var(--ink);
  font: 12px/1.6 var(--mono);
  word-break: break-all;
  resize: vertical;
}

/* Fehlerseite */
.error-page { max-width: 760px; padding: 96px 0 0; }
.error-page .eyebrow { color: var(--signal-ink); font-weight: 500; }
.error-page h1 { font-size: 46px; }
.error-page .lead { margin-top: 16px; color: var(--ink-2); font-size: 17px; }
.error-code { margin-top: 18px; color: var(--muted); font-size: 13.5px; }
.error-actions { display: flex; gap: 16px; margin-top: 40px; }

.footer { display: flex; justify-content: space-between; gap: 24px; padding-top: 20px; padding-bottom: 32px; border-top: 1px solid var(--rule); color: var(--muted); font-size: 12.5px; }

@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(12px); } }
@keyframes arrive { from { opacity: 0; transform: translateX(-6px); } }

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

@media (max-width: 1080px) {
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .figure:nth-child(3) { padding-left: 0; border-left: 0; }
  .figure:nth-child(n+3) { border-top: 1px solid var(--rule); }
  .form-section { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .qr-sheet { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .qr { max-width: 400px; }
  .auth { grid-template-columns: minmax(0, 1fr); gap: 40px; margin-top: 48px; }
  .auth-form { max-width: 480px; }
}
@media (max-width: 760px) {
  .wrap { padding: 0 20px; }
  /* Zwei Zeilen: Wortmarke und Anmeldung, darunter die Navigation */
  .masthead-inner { flex-wrap: wrap; height: auto; gap: 0 16px; }
  .wordmark { height: 56px; }
  .wordmark-sub, .session-user::before { display: none; }
  .session { order: 2; height: 56px; gap: 16px; min-width: 0; }
  .session-user { display: block; min-width: 0; max-width: 46vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .nav { order: 3; width: 100%; height: 46px; gap: 24px; overflow-x: auto; border-top: 1px solid var(--rule); scrollbar-width: none; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex: none; white-space: nowrap; }
  .auth { margin-top: 32px; padding-top: 28px; }
  .auth-intro h1 { font-size: 44px; }
  .totp { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .account-facts > div { grid-template-columns: 120px minmax(0, 1fr); }
  .page-head { padding: 36px 0 28px; }
  h1, .error-page h1 { font-size: 34px; }
  .figures { grid-template-columns: minmax(0, 1fr); }
  .figure, .figure:nth-child(3) { padding: 18px 0 22px; border-left: 0; }
  .figure + .figure { border-top: 1px solid var(--rule); }
  .figure .value, .figure .value.is-long, .figure .value.is-xlong { font-size: clamp(24px, 13cqi, 44px); }
  .field-grid, .option-grid, .code-forms { grid-template-columns: minmax(0, 1fr); }
  .code-form, .code-form + .code-form { padding: 28px 0 8px; border-left: 0; }
  .code-form + .code-form { border-top: 1px solid var(--rule); }
  .code { font-size: 30px; }
  .valid-until { font-size: 44px; }
  .dialog { padding: 32px 24px 28px; }
  .facts > div, .diff th { grid-template-columns: 120px minmax(0, 1fr); width: auto; }
  .footer { flex-direction: column; gap: 4px; }
}
