/* brand.css — Bausteine der One-Brand (Spec docs/superpowers/specs/2026-09-29-ui-kampagne-design.md §3).
   Einzige Wertequelle für Farbe, Radius und Schriftfamilie migrierter Seiten; workflow.css enthält nur Layout.
   Zustandsklassen bleiben flach (.b-step.active), Bausteine heissen b-*. */

/* ── Schriften: selbst gehostet, SIL OFL 1.1 (static/fonts/OFL-*.txt, THIRD_PARTY.md) ── */
@font-face { font-family: "Geist"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/Geist-Regular.woff2") format("woff2"); }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/Geist-Medium.woff2") format("woff2"); }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 600; font-display: swap; src: url("../fonts/Geist-SemiBold.woff2") format("woff2"); }
@font-face { font-family: "Geist"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/Geist-Bold.woff2") format("woff2"); }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/GeistMono-Regular.woff2") format("woff2"); }
@font-face { font-family: "Geist Mono"; font-style: normal; font-weight: 500; font-display: swap; src: url("../fonts/GeistMono-Medium.woff2") format("woff2"); }
@font-face { font-family: "Courier Prime"; font-style: normal; font-weight: 400; font-display: swap; src: url("../fonts/CourierPrime-Regular.woff2") format("woff2"); }
@font-face { font-family: "Courier Prime"; font-style: normal; font-weight: 700; font-display: swap; src: url("../fonts/CourierPrime-Bold.woff2") format("woff2"); }

/* ── Abgeleitete Werte (nur Bausteine; Quelle Mockup/Brand Board) ── */
:root {
  --text-soft:     rgba(232,238,252,0.86);  /* NOTAM-Wortlaut, Route in Flugzeilen */
  --catbar-info:   rgba(232,238,252,0.22);
  --on-cta-muted:  rgba(6,13,32,0.6);       /* Zähler im aktiven weissen Segment */
  --done-tint:     rgba(82,224,143,0.16);   /* Kreis hinter dem «erledigt»-Häkchen */
  --err-tint:      rgba(255,91,87,0.16);    /* Kreis hinter dem «ungültig»-Symbol */
  --selected-fill: rgba(255,255,255,0.06);
  --nav-bg:        rgba(6,13,32,0.55);
  --bar-bg:        rgba(6,13,32,0.88);
  --pulse-on:      rgba(255,255,255,0.35);
  --pulse-off:     rgba(255,255,255,0);
  --sheet-well:    #d9dde5;                 /* neutral-grauer Grund um das weisse Sheet */
  --sheet-paper:   #ffffff;
}

/* ── Nachthimmel (§3.2): Flecken = glow-* mit Web-Deckkraft ── */
body.night {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 15px;
  line-height: 22px;
  -webkit-font-smoothing: antialiased;
  background-color: var(--background);
  background-image:
    radial-gradient(ellipse 45% 22% at 90% 8%, color-mix(in srgb, var(--glow-teal) 30%, transparent), transparent 70%),
    radial-gradient(ellipse 40% 18% at 6% 36%, color-mix(in srgb, var(--glow-blue) 26%, transparent), transparent 70%),
    radial-gradient(ellipse 40% 16% at 84% 64%, color-mix(in srgb, var(--glow-green) 16%, transparent), transparent 70%),
    radial-gradient(ellipse 45% 18% at 16% 92%, color-mix(in srgb, var(--glow-rose) 14%, transparent), transparent 70%),
    radial-gradient(ellipse 120% 60% at 85% 0%, var(--light-top), transparent 55%),
    radial-gradient(ellipse 90% 50% at 0% 100%, var(--light-bottom), transparent 60%),
    linear-gradient(180deg, var(--background), var(--backdrop-end));
  background-attachment: fixed;
}
.night a:where(:not(.b-btn)) { color: var(--text); }
.b-icon { display: inline-block; flex-shrink: 0; vertical-align: -0.125em; }
.b-mono { font-family: var(--font-mono); font-variant-numeric: tabular-nums; }
.b-label { display: block; margin: 0 0 6px; font-size: 13px; line-height: 18px; font-weight: 400; color: var(--muted); }
.b-hint { margin: 0; font-size: 13px; line-height: 18px; color: var(--muted); }

/* ── Knöpfe ── */
.b-btn {
  box-sizing: border-box; display: inline-flex; align-items: center; justify-content: center; gap: var(--space-sm);
  height: 44px; padding: 0 20px; border: 1px solid transparent; border-radius: var(--radius-md);
  background: transparent; color: var(--text); font-family: var(--font-sans); font-size: 15px; line-height: 22px;
  font-weight: 600; white-space: nowrap; text-decoration: none; cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, box-shadow 0.15s, opacity 0.15s;
}
.b-btn--primary { background: var(--cta-fill); border-color: var(--cta-fill); color: var(--cta-label); }
.b-btn--primary:hover { background: var(--text); border-color: var(--text); }
.b-btn--ghost { background: transparent; border-color: var(--hairline-strong); color: var(--text); font-weight: 500; }
.b-btn--ghost:hover { border-color: var(--text); }
.b-btn--sm { height: 32px; padding: 0 12px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; }
.b-btn--icon { width: 40px; height: 40px; padding: 0; border-radius: 12px; background: var(--surface); border-color: var(--hairline); }
.b-btn--icon:hover { border-color: var(--hairline-strong); }
.b-btn--step { width: 30px; height: 30px; padding: 0; border-radius: 9px; font-family: var(--font-mono); font-size: 15px; font-weight: 400; }
.b-btn--block { display: flex; width: 100%; }
/* Löschen (Settings → Fleet): weisse Schrift wie im Mockup (Roland 06.10., 3.05:1 bewusst akzeptiert). */
.b-btn--danger { background: var(--red); border-color: var(--red); color: var(--cta-fill); }
/* Hover dunkler statt heller: weisse Schrift bleibt mindestens bei den akzeptierten 3.05:1. */
.b-btn--danger:hover { background: color-mix(in srgb, var(--red) 85%, var(--background)); border-color: color-mix(in srgb, var(--red) 85%, var(--background)); }
.b-btn:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }
.b-btn:disabled, .b-btn[aria-disabled="true"] { opacity: var(--opacity-disabled); cursor: not-allowed; }
.b-btn[aria-disabled="true"] { pointer-events: none; }
.b-btn.primed { animation: b-pulse 1.8s ease-in-out infinite; }
@keyframes b-pulse {
  0%, 100% { box-shadow: 0 0 0 0 var(--pulse-on); }
  50%      { box-shadow: 0 0 0 8px var(--pulse-off); }
}

/* ── Flächen ── */
.b-panel { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-xl); overflow: hidden; }
.b-panel__head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--hairline); }
.b-panel__head h2 { margin: 0; font-size: 24px; line-height: 30px; font-weight: 600; letter-spacing: -0.24px; color: var(--text); }
.b-panel__meta { margin-top: 2px; font-size: 13px; line-height: 18px; color: var(--muted); }
.b-panel__body { padding: 20px 24px 24px; }
.b-card { box-sizing: border-box; padding: 20px; background: var(--elevated); border: 1px solid var(--hairline); border-radius: var(--radius-lg); }
.b-card--single { padding: var(--space-xxl); }
.b-card__title { margin: 0 0 16px; font-size: 16px; line-height: 22px; font-weight: 600; letter-spacing: -0.3px; color: var(--text); }
.b-card__title--split { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.b-row { box-sizing: border-box; background: var(--elevated); border: 1px solid var(--hairline); border-radius: var(--radius-md); font-family: var(--font-mono); font-size: 14px; line-height: 20px; font-variant-numeric: tabular-nums; }

/* ── Status = Punkt + Wort ── */
.b-status { display: inline-flex; align-items: center; gap: 8px; margin: 0; font-family: var(--font-sans); font-size: 13px; line-height: 18px; font-weight: 500; color: var(--muted); }
.b-status.running { color: var(--text); }
.b-status.err { color: var(--red); }
.b-status__dot { display: inline-block; flex-shrink: 0; width: 7px; height: 7px; border-radius: var(--radius-pill); background: var(--faint); }
.b-status__dot--ok   { background: var(--green); }
.b-status__dot--warn { background: var(--amber); }
.b-status__dot--err  { background: var(--red); }
.b-status__dot--idle { background: var(--faint); }
.b-spin { box-sizing: border-box; display: inline-block; flex-shrink: 0; width: 11px; height: 11px; border: 1.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: b-spin 0.9s linear infinite; }
@keyframes b-spin { to { transform: rotate(360deg); } }
.b-progress { width: 100%; height: 4px; border-radius: var(--radius-pill); background: var(--hairline); overflow: hidden; }
.b-progress__fill { height: 100%; background: var(--text); transition: width 0.3s; }

/* ── Segment-Tabs ── */
.b-tabs { display: inline-flex; gap: var(--space-xs); padding: var(--space-xs); background: var(--elevated); border: 1px solid var(--hairline); border-radius: var(--radius-md); }
.b-tab { display: inline-flex; flex-shrink: 0; align-items: center; gap: 8px; height: 36px; padding: 0 14px; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--muted); font-family: var(--font-sans); font-size: 14px; font-weight: 500; white-space: nowrap; cursor: pointer; }
.b-tab:hover { color: var(--text); }
.b-tab.active { background: var(--cta-fill); color: var(--cta-label); font-weight: 600; }
.b-tab:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }
.b-tab__n { font-family: var(--font-mono); font-size: 12px; font-weight: 400; font-variant-numeric: tabular-nums; color: var(--text); }
.b-tab.active .b-tab__n { color: var(--on-cta-muted); }

/* ── Formular ── */
.b-check { appearance: none; -webkit-appearance: none; box-sizing: border-box; display: inline-grid; place-items: center; flex-shrink: 0; width: 20px; height: 20px; margin: 0; border: 1.5px solid var(--hairline-strong); border-radius: 6px; background: transparent; cursor: pointer; }
.b-check:checked { background: var(--cta-fill); border-color: var(--cta-fill); }
.b-check:checked::after { content: ""; width: 5px; height: 9px; border: solid var(--cta-label); border-width: 0 2px 2px 0; transform: translateY(-1px) rotate(45deg); }
.b-check:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }
.b-check:disabled { opacity: var(--opacity-disabled); cursor: not-allowed; }
.b-input, .b-select { box-sizing: border-box; height: 40px; padding: 0 12px; border: 1px solid var(--hairline-strong); border-radius: var(--radius-md); background-color: var(--elevated); color: var(--text); font-family: var(--font-sans); font-size: 14px; }
.b-input::placeholder { color: var(--faint); }
.b-input:focus, .b-select:focus { outline: none; border-color: var(--text); box-shadow: 0 0 0 3px var(--focus-ring); }
.b-input.is-override, .b-select.is-override { border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-ring); }
.b-input.is-error, .b-select.is-error { border-color: var(--red); }
.b-input:disabled, .b-select:disabled { opacity: var(--opacity-disabled); cursor: not-allowed; }
/* Autofill (Chrome/Safari färben sonst hellgelb): Feld bleibt dunkel, damit Schrift und Augen-Icon lesbar bleiben. */
.b-input:-webkit-autofill { -webkit-text-fill-color: var(--text); caret-color: var(--text); box-shadow: 0 0 0 1000px var(--surface-solid) inset; transition: background-color 9999s ease-out; }
.b-input:-webkit-autofill:focus { box-shadow: 0 0 0 1000px var(--surface-solid) inset, 0 0 0 3px var(--focus-ring); }
.b-input:autofill { -webkit-text-fill-color: var(--text); caret-color: var(--text); box-shadow: 0 0 0 1000px var(--surface-solid) inset; transition: background-color 9999s ease-out; }
.b-input:autofill:focus { box-shadow: 0 0 0 1000px var(--surface-solid) inset, 0 0 0 3px var(--focus-ring); }
.b-select {
  appearance: none; -webkit-appearance: none; padding-right: 36px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='rgba(232,238,252,0.64)' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 14px 14px;
}
.b-select option { background: var(--surface-solid); color: var(--text); }
.b-input--mono, .b-select--mono { font-family: var(--font-mono); }
@media (max-width: 920px) {
  /* 44 hoch (Spec §3.4); 16 px verhindert das Auto-Zoom von iOS Safari beim Fokus. */
  .b-input, .b-select { height: 44px; font-size: 16px; }
}

/* ── Stepper ── */
.b-stepper { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-md); }
.b-step { position: relative; padding: 16px 18px; background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-lg); cursor: pointer; transition: border-color 0.15s, background-color 0.15s; }
.b-step:hover:not(.locked) { border-color: var(--hairline-strong); }
.b-step.active { background: var(--surface-2); border-color: var(--text); box-shadow: inset 0 0 0 0.5px var(--text); }
.b-step.locked { opacity: var(--opacity-locked); cursor: not-allowed; }
.b-step__num { margin-bottom: 8px; font-family: var(--font-mono); font-size: 12px; line-height: 16px; color: var(--faint); }
.b-step.active .b-step__num { color: var(--text); }
.b-step__ttl { font-size: 17px; line-height: 22px; font-weight: 600; color: var(--text); }
.b-step__sub { margin-top: 3px; font-size: 13px; line-height: 18px; color: var(--muted); }
.b-step__ok { display: none; position: absolute; top: 16px; right: 16px; width: 20px; height: 20px; place-items: center; border-radius: var(--radius-pill); background: var(--done-tint); color: var(--green); }
.b-step.done .b-step__ok { display: grid; }

/* ── Kopfleiste, Menü, Handy-Leiste ── */
.b-nav { position: sticky; top: 0; z-index: 50; background: var(--nav-bg); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--hairline); }
.b-wordmark { font-family: var(--font-sans); font-size: 18px; line-height: 24px; font-weight: 700; letter-spacing: -0.18px; color: var(--text); text-decoration: none; }
.b-menu { display: none; position: absolute; top: 48px; right: 0; z-index: 100; min-width: 200px; padding: 6px; background: var(--surface-solid); border: 1px solid var(--hairline-strong); border-radius: var(--radius-md); box-shadow: var(--shadow-modal); }
.b-menu.show { display: block; }
.b-menu a { display: block; padding: 10px 12px; border-radius: var(--radius-sm); color: var(--text); font-size: 14px; line-height: 20px; font-weight: 500; text-decoration: none; }
.b-menu a:hover, .b-menu a:focus-visible { background: var(--surface-2); outline: none; }
.b-menu__sep { height: 1px; margin: 6px 0; background: var(--hairline); }
.b-bottombar { display: contents; }

/* ── NOTAM-Karte (§5.5) ── */
.b-notam { display: grid; grid-template-columns: 4px minmax(0, 1fr); column-gap: 14px; padding: 14px 16px; background: var(--elevated); border: 1px solid var(--hairline); border-radius: var(--radius-md); cursor: pointer; transition: border-color 0.15s, background-color 0.15s; }
.b-notam:hover { border-color: var(--hairline-strong); }
.b-notam.selected { background: var(--selected-fill); border-color: var(--text); box-shadow: inset 0 0 0 0.5px var(--text); }
.b-notam__main { min-width: 0; }
.b-notam__head { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 8px; }
.b-notam__check { box-sizing: border-box; display: inline-grid; place-items: center; flex-shrink: 0; width: 22px; height: 22px; border: 1.5px solid var(--hairline-strong); border-radius: 7px; color: transparent; }
.b-notam.selected .b-notam__check { background: var(--cta-fill); border-color: var(--cta-fill); color: var(--cta-label); }
.b-notam__body { padding-left: 34px; font-family: var(--font-notam); font-size: 14px; line-height: 1.35; color: var(--text-soft); white-space: pre-wrap; word-break: break-word; }
.b-catbar { width: 4px; align-self: stretch; border-radius: var(--radius-pill); }
.b-catbar--crit { background: var(--red); }
.b-catbar--rel  { background: var(--amber); }
.b-catbar--info { background: var(--catbar-info); }

/* ── Laden, Meldungen ── */
.b-skeleton { height: 44px; border-radius: var(--radius-md); background: linear-gradient(90deg, var(--hairline), var(--hairline-strong), var(--hairline)); background-size: 200% 100%; animation: b-shimmer 1.4s ease-in-out infinite; }
@keyframes b-shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }
.b-alert--error { box-sizing: border-box; padding: 12px 14px; background: var(--red-tint); border: 1px solid var(--red-line); border-radius: var(--radius-md); color: var(--red-soft); font-family: var(--font-mono); font-size: 13px; line-height: 1.55; word-break: break-word; }
.b-alert--error[hidden] { display: none; }
.b-notice { display: flex; align-items: flex-start; gap: 12px; padding: 14px 16px; background: var(--elevated); border: 1px solid var(--hairline); border-radius: var(--radius-md); font-size: 14px; line-height: 1.5; color: var(--muted); }
.b-notice > .b-icon { margin-top: 1px; color: var(--text); }
.b-notice a { color: var(--cta-fill); text-decoration: underline; text-underline-offset: 2px; }

/* ── Modal ── */
.b-scrim { position: absolute; inset: 0; background: var(--scrim); -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px); }
.b-modal { position: relative; box-sizing: border-box; background: var(--surface-solid); border: 1px solid var(--hairline-strong); border-radius: var(--radius-xl); box-shadow: var(--shadow-modal); color: var(--text); }
.b-modal__title { margin: 0; font-size: 18px; line-height: 24px; font-weight: 600; letter-spacing: -0.3px; }

/* ── Beta-Banner (vorher Inline-Stil im früheren Tokens-Partial) ── */
.b-beta { position: fixed; top: 12px; left: 50%; z-index: 100; transform: translateX(-50%); display: inline-flex; align-items: center; gap: 8px; padding: 4px 12px; background: var(--nav-bg); border: 1px solid var(--hairline-strong); border-radius: var(--radius-sm); color: var(--muted); font-family: var(--font-mono); font-size: 12px; line-height: 16px; font-weight: 500; pointer-events: none; user-select: none; -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.b-beta--inline { position: static; transform: none; margin: 0 auto 0 12px; }
@media print { .b-beta { display: none !important; } }

/* ── Anmeldung (Paket 2): Typo, Felder, Meldungen, Seitenspalte ── */
.b-title { margin: 0; font-size: 28px; line-height: 34px; font-weight: 600; letter-spacing: -0.4px; color: var(--text); text-wrap: balance; }
.b-subhead { margin: 0; font-size: 22px; line-height: 28px; font-weight: 600; letter-spacing: -0.3px; color: var(--text); text-wrap: balance; }
.b-lead { margin: 0; font-size: 14px; line-height: 20px; color: var(--muted); }
.b-eyebrow { display: flex; align-items: center; gap: 8px; margin: 0; font-size: 13px; line-height: 18px; font-weight: 500; color: var(--muted); }
.b-link { color: var(--text); font-weight: 500; text-decoration: underline; text-decoration-color: var(--hairline-strong); text-underline-offset: 4px; }
.b-link:hover { text-decoration-color: var(--text); }
.b-hint b { color: var(--text); font-weight: 600; }

.b-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.b-field__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.b-field > label, .b-field__row > label { font-size: 13px; line-height: 18px; color: var(--muted); }
.b-field > .b-input { width: 100%; }
.b-field__hint { font-size: 12px; line-height: 16px; color: var(--faint); }
.b-checkrow { display: flex; align-items: center; gap: 10px; font-size: 14px; line-height: 20px; color: var(--text); cursor: pointer; }
.b-field > .b-checkrow { margin-top: 4px; font-size: 14px; line-height: 20px; color: var(--text); }
.b-pw { position: relative; }
.b-pw > .b-input { width: 100%; padding-right: 44px; }
.b-pw__toggle { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: var(--radius-sm); background: transparent; color: var(--muted); cursor: pointer; }
.b-pw__toggle:hover { color: var(--text); }
.b-pw__toggle:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }
.b-pw__off { display: none; }
.b-pw__toggle[data-shown="true"] .b-pw__on { display: none; }
.b-pw__toggle[data-shown="true"] .b-pw__off { display: inline; }
.b-rules { list-style: none; margin: 0; padding: 10px 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px 14px; background: var(--elevated); border: 1px solid var(--hairline); border-radius: var(--radius-md); }
.b-rules li { display: flex; align-items: center; gap: 8px; font-family: var(--font-mono); font-size: 12px; line-height: 18px; color: var(--faint); }
.b-rules li.ok { color: var(--green); }
.b-rules li.err { color: var(--red); }
.b-rules .mk { width: 12px; text-align: center; font-weight: 600; }
.b-match { margin: 0; min-height: 18px; font-family: var(--font-mono); font-size: 12px; line-height: 18px; color: var(--faint); }
.b-match.ok { color: var(--green); }
.b-match.err { color: var(--red); }

.b-alert--icon { display: flex; align-items: flex-start; gap: 10px; }
.b-alert--icon > .b-icon { margin-top: 3px; color: var(--red); }
.b-notice--ok { color: var(--text); }
.b-notice--ok > .b-icon { color: var(--green); }
.b-notice__title { display: block; margin-bottom: 2px; color: var(--text); font-weight: 600; }
.b-iconcircle { display: inline-grid; place-items: center; flex-shrink: 0; width: 28px; height: 28px; border-radius: var(--radius-pill); background: var(--surface-2); color: var(--text); }
.b-iconcircle--sm { width: 20px; height: 20px; }
.b-iconcircle--lg { width: 56px; height: 56px; }
.b-iconcircle--ok { background: var(--done-tint); color: var(--green); }
.b-iconcircle--err { background: var(--err-tint); color: var(--red); }
.b-text--ok { color: var(--green); }
.b-text--err { color: var(--red); }

.b-card__head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.b-card__head .b-card__title { margin: 0; }
.b-card__text { margin: 0; font-size: 14px; line-height: 21px; color: var(--muted); }
.b-card__text + .b-card__text { margin-top: 8px; }
.b-card__text b { color: var(--text); font-weight: 600; }
.b-card__meta { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px 14px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--hairline); font-family: var(--font-mono); font-size: 12px; line-height: 16px; color: var(--faint); }

.b-panel__aside { background: var(--elevated); border-left: 1px solid var(--hairline); }
.b-checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.b-checklist li { display: grid; grid-template-columns: 20px minmax(0, 1fr); gap: 12px; align-items: start; font-size: 14px; line-height: 20px; color: var(--muted); }
.b-checklist b { color: var(--text); font-weight: 600; }
.b-checklist--steps { counter-reset: b-step; }
.b-checklist--steps li { counter-increment: b-step; }
.b-checklist--steps li::before { content: "0" counter(b-step); font-family: var(--font-mono); font-size: 12px; line-height: 20px; color: var(--faint); }
.b-aside__foot { margin-top: auto; padding-top: 14px; border-top: 1px solid var(--hairline); font-family: var(--font-mono); font-size: 12px; line-height: 16px; color: var(--faint); }
.b-formfoot { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px 12px; margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--hairline); font-size: 14px; line-height: 20px; color: var(--muted); }

/* Knopf beim Senden (Entscheid 9): bleibt weiss — muss nach .b-btn:disabled stehen. */
.b-btn__label { display: inline-flex; align-items: center; gap: var(--space-sm); }
.b-btn[aria-busy="true"] { opacity: 1; cursor: progress; }
.b-back { justify-content: center; }

/* Fusszeile (_footer.html, Paket 6): reines Markup, Stil nur hier. */
.night .site-footer { box-sizing: border-box; width: 100%; padding: 24px 16px 20px; text-align: center; border-top: 1px solid var(--hairline); color: var(--faint); font-family: var(--font-sans); font-size: 12px; line-height: 16px; }
.night .site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 24px; margin-bottom: 12px; }
.night .site-footer nav a { color: var(--muted); font-size: 13px; line-height: 18px; text-decoration: none; transition: color .15s; }
.night .site-footer nav a:hover { color: var(--text); }
.night .site-footer__meta { margin: 0; font-size: 12px; }

/* ── Settings (Paket 3): Panel, Bereichsliste, Schalter, Feldfehler ── */
.b-shell { box-sizing: border-box; background: var(--surface-solid); border: 1px solid var(--hairline-strong); border-radius: var(--radius-xl); box-shadow: var(--shadow-modal); overflow: hidden; }
.b-shell__side { background: var(--elevated); border-right: 1px solid var(--hairline); }
.b-navlist { display: flex; flex-direction: column; gap: 2px; }
.b-navlist .b-navitem { box-sizing: border-box; display: flex; align-items: center; gap: 12px; min-height: 40px; padding: 0 12px; border: 1px solid transparent; border-radius: var(--radius-sm); color: var(--text-soft); font-size: 15px; line-height: 22px; font-weight: 500; text-decoration: none; }
.b-navlist .b-navitem:hover { background: var(--surface); }
.b-navlist .b-navitem.active { background: var(--surface-2); border-color: var(--text); color: var(--text); }
.b-navlist .b-navitem:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }
.b-navitem__label { flex: 1; min-width: 0; }
.b-navitem__dot { flex-shrink: 0; width: 7px; height: 7px; border-radius: var(--radius-pill); background: var(--amber); }
.b-navitem__go { display: none; }
.b-section { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 26px 0 14px; padding-top: 24px; border-top: 1px solid var(--hairline); font-size: 16px; line-height: 22px; font-weight: 600; letter-spacing: -0.3px; color: var(--text); }
.b-section--first { margin-top: 0; padding-top: 0; border-top: 0; }
.b-link--ext { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; line-height: 18px; }
.b-setrow { display: flex; justify-content: space-between; align-items: center; gap: 24px; padding: 14px 0; border-top: 1px solid var(--hairline); }
.b-setrow--first { padding-top: 0; border-top: 0; }
.b-setrow > div { min-width: 0; }
.b-setrow__title { font-size: 15px; line-height: 22px; font-weight: 500; color: var(--text); }
.b-setrow__text { margin: 2px 0 0; font-size: 13px; line-height: 18px; color: var(--muted); overflow-wrap: anywhere; }
.b-switch { appearance: none; -webkit-appearance: none; box-sizing: border-box; position: relative; flex-shrink: 0; width: 46px; height: 28px; margin: 0; padding: 0; border: 1px solid var(--hairline-strong); border-radius: var(--radius-pill); background: var(--selected-fill); cursor: pointer; transition: background-color 0.15s, border-color 0.15s; }
.b-switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: var(--radius-pill); background: var(--muted); transition: transform 0.15s, background-color 0.15s; }
.b-switch::before { content: ""; position: absolute; inset: -9px 0; }
.b-switch[aria-checked="true"] { background: var(--cta-fill); border-color: var(--cta-fill); }
.b-switch[aria-checked="true"]::after { background: var(--cta-label); transform: translateX(18px); }
.b-switch:focus-visible { outline: none; box-shadow: 0 0 0 3px var(--focus-ring); }
.b-switch:disabled { cursor: progress; }
.b-field__error { margin: 0; font-size: 13px; line-height: 18px; color: var(--red); }
/* `hidden` verliert gegen ein Autoren-`display` — diese Bausteine werden per Attribut geschaltet. */
.b-field__error[hidden], .b-status[hidden], .b-pw__toggle[hidden] { display: none; }
.b-hrow { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 14px; background: var(--elevated); border: 1px solid var(--hairline); border-radius: var(--radius-md); font-size: 14px; line-height: 20px; color: var(--text); }
.b-hrow__mail { font-family: var(--font-mono); font-size: 13px; color: var(--muted); }
.b-value { margin: 0; font-size: 15px; line-height: 22px; color: var(--text); overflow-wrap: anywhere; }

/* ── Inhaltsseiten (Paket 4): Fliesstext aus Markdown, Tabellen, Textfeld ──
   Migrierte Seiten haben kein globales Reset: jeder Rand steht hier ausdrücklich. */
.b-prose { font-size: 15px; line-height: 24px; color: var(--muted); overflow-wrap: break-word; }
.b-prose > :first-child { margin-top: 0; }
.b-prose > :last-child { margin-bottom: 0; }
.b-prose h1 { margin: 0 0 20px; font-size: 28px; line-height: 34px; font-weight: 600; letter-spacing: -0.4px; color: var(--text); text-wrap: balance; }
.b-prose h2 { margin: 36px 0 12px; font-size: 20px; line-height: 26px; font-weight: 600; letter-spacing: -0.2px; color: var(--text); }
.b-prose h3 { margin: 24px 0 8px; font-size: 16px; line-height: 22px; font-weight: 600; color: var(--text); }
.b-prose h4, .b-prose h5, .b-prose h6 { margin: 20px 0 8px; font-size: 15px; line-height: 22px; font-weight: 600; color: var(--text); }
.b-prose p { margin: 0 0 16px; }
.b-prose ul, .b-prose ol { margin: 8px 0 16px; padding: 0 0 0 22px; }
.b-prose li { margin: 0 0 6px; }
.b-prose a { font-weight: 500; text-decoration: underline; text-decoration-color: var(--hairline-strong); text-underline-offset: 4px; }
.b-prose a:hover { text-decoration-color: var(--text); }
.b-prose strong { color: var(--text); font-weight: 600; }
.b-prose code { padding: 2px 6px; border: 1px solid var(--hairline); border-radius: 6px; background: var(--elevated); color: var(--text); font-family: var(--font-mono); font-size: 13px; }
.b-prose hr { margin: 32px 0; border: 0; border-top: 1px solid var(--hairline); }
.b-prose pre { margin: 0 0 16px; padding: 12px 16px; overflow-x: auto; background: var(--elevated); border: 1px solid var(--hairline); border-radius: var(--radius-md); color: var(--text); font-family: var(--font-mono); font-size: 13px; line-height: 20px; }
.b-prose pre code { padding: 0; border: 0; border-radius: 0; background: none; font-size: inherit; }
.b-prose img { max-width: 100%; height: auto; }
.b-prose blockquote { margin: 0 0 16px; padding: 0 0 0 16px; border-left: 2px solid var(--hairline-strong); }
.b-tablewrap { margin: 16px 0 24px; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.b-tablewrap:focus-visible { outline: none; border-radius: var(--radius-sm); box-shadow: 0 0 0 3px var(--focus-ring); }
.b-prose table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 14px; line-height: 20px; }
.b-prose th { padding: 10px 12px; border-bottom: 1px solid var(--hairline-strong); text-align: left; vertical-align: bottom; font-size: 13px; line-height: 18px; font-weight: 500; color: var(--muted); }
.b-prose td { padding: 10px 12px; border-bottom: 1px solid var(--hairline); vertical-align: top; }
.b-prose td:first-child { color: var(--text); }
textarea.b-input { display: block; height: auto; min-height: 160px; padding: 12px; line-height: 22px; resize: vertical; }

/* ── Handy (< 600 px, §3.2, §5.2, §5.3) ── */
@media (max-width: 599px) {
  body.night {
    background-attachment: scroll;
    background-image:
      radial-gradient(ellipse 80% 12% at 90% 4%, color-mix(in srgb, var(--glow-teal) 30%, transparent), transparent 70%),
      radial-gradient(ellipse 70% 10% at 6% 30%, color-mix(in srgb, var(--glow-blue) 24%, transparent), transparent 70%),
      radial-gradient(ellipse 70% 10% at 84% 62%, color-mix(in srgb, var(--glow-green) 14%, transparent), transparent 70%),
      radial-gradient(ellipse 80% 10% at 16% 92%, color-mix(in srgb, var(--glow-rose) 12%, transparent), transparent 70%),
      radial-gradient(ellipse 120% 40% at 85% 0%, var(--light-top), transparent 55%),
      radial-gradient(ellipse 90% 30% at 0% 100%, var(--light-bottom), transparent 60%),
      linear-gradient(180deg, var(--background), var(--backdrop-end));
  }
  .b-stepper { gap: var(--space-sm); }
  .b-step { display: grid; place-items: center; height: 44px; padding: 0; border-radius: 12px; }
  .b-step__num { margin: 0; font-size: 14px; color: var(--muted); }
  .b-step__ttl, .b-step__sub { display: none; }
  .b-step__ok { top: 5px; right: 6px; width: auto; height: auto; background: none; }
  .b-step.done .b-step__ok { display: block; }
  .b-step__ok .b-icon { width: 10px; height: 10px; }
  .b-bottombar {
    display: block; position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 12px 16px max(12px, env(safe-area-inset-bottom));
    background: var(--bar-bg); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    border-top: 1px solid var(--hairline);
  }
  .b-bottombar .b-btn { width: 100%; height: 50px; font-size: 16px; }
  /* Offene Tastatur: Leiste zurück in den Kopf, damit sie kein Feld verdeckt. */
  body:has(input:not([type=checkbox]):not([type=radio]):focus, select:focus, textarea:focus) .b-bottombar { position: static; padding: 0; background: transparent; border-top: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
  /* Zurück-Link der Anmeldeseiten: Text-Link in eigener Zeile (Entscheid 6) */
  .b-back { height: auto; padding: 0; border: 0; background: none; justify-content: flex-start; font-size: 14px; line-height: 20px; font-weight: 500; text-decoration: underline; text-decoration-color: var(--hairline-strong); text-underline-offset: 4px; }
  /* Settings: kein Panel, Liste und Bereich als Karten (Spec §2.2) */
  .b-shell { background: none; border: 0; border-radius: 0; box-shadow: none; overflow: visible; }
  .b-shell__side { background: none; border-right: 0; }
  .b-navlist, .b-shell__body { background: var(--surface); border: 1px solid var(--hairline); border-radius: var(--radius-xl); }
  .b-navlist { gap: 0; padding: 4px 16px; }
  .b-shell__body { padding: 16px; }
  .b-navlist .b-navitem { min-height: 56px; padding: 0; border: 0; border-top: 1px solid var(--hairline); border-radius: 0; font-size: 16px; color: var(--text); }
  .b-navlist .b-navitem:first-child { border-top: 0; }
  .b-navlist .b-navitem:hover { background: none; }
  .b-navitem__go { display: inline-block; color: var(--faint); }
  .b-switch { width: 52px; height: 32px; }
  .b-switch::after { width: 24px; height: 24px; }
  .b-switch[aria-checked="true"]::after { transform: translateX(20px); }
  .b-setrow { gap: 16px; }
  .b-notam__body { padding-left: 0; }
  .b-prose h1 { font-size: 24px; line-height: 30px; }
  .b-prose h2 { margin: 28px 0 10px; font-size: 18px; line-height: 24px; }
}

/* ── Zelleingabe (Settings → Fleet, Spec 2026-10-06 §3.1) ── Zustände stehen nach --boxed und :focus. */
.b-cell { box-sizing: border-box; height: 34px; padding: 0 8px; border: 1px solid transparent; border-radius: 6px; background: transparent; color: var(--text); font: inherit; text-align: right; }
.b-cell--boxed { border-color: var(--hairline); }
.b-cell:hover { border-color: var(--hairline-strong); }
.b-cell:focus { outline: none; border-color: var(--text); background: var(--elevated); box-shadow: 0 0 0 3px var(--focus-ring); }
.b-cell.is-warn { border-color: var(--amber); box-shadow: 0 0 0 3px var(--amber-ring); }
.b-cell.is-err { border-color: var(--red); color: var(--red-soft); }
.b-cell.is-saved { animation: b-saved 2s ease-out; }
@keyframes b-saved { from { background: var(--done-tint); } to { background: transparent; } }

/* ── Bewegung reduzieren (§3.4) ── */
@media (prefers-reduced-motion: reduce) {
  .b-btn.primed, .b-spin, .b-skeleton, .b-cell.is-saved { animation: none; }
  .b-btn.primed { box-shadow: 0 0 0 3px var(--focus-ring); }
  .b-skeleton { background: var(--hairline); }
  .b-btn, .b-step, .b-notam, .b-progress__fill { transition: none; }
  .b-switch, .b-switch::after { transition: none; }
}

/* ── Farbüberschreibung (Firefox «Farben der Seite überschreiben», Windows-Kontrastmodus) ──
   Hintergrundbilder fallen dort weg — der Pfeil von .b-select ist eines. Nativer Pfeil zurück (Anlass PR #33).
   Aus demselben Grund bekommt der Schalterknopf Systemfarben, ebenso der aktive Eintrag der Bereichsliste
   (ohne Anpassung, sonst malt der Browser eine Canvas-Fläche hinter die Beschriftung); die Punkte behalten ihre Farbe. */
@media (forced-colors: active) {
  .b-select { appearance: auto; -webkit-appearance: auto; padding-right: 12px; background-image: none; }
  .b-switch::after { background: ButtonText; }
  .b-switch[aria-checked="true"]::after { background: Highlight; }
  .b-navlist .b-navitem.active { forced-color-adjust: none; background: Highlight; color: HighlightText; border-color: Highlight; }
  .b-navitem__dot, .b-status__dot { forced-color-adjust: none; }
  .b-cell.is-warn { border-style: dashed; }
  .b-cell.is-err { border-width: 2px; }
  /* box-shadow fällt hier weg: der Fokusring (sonst outline: none) braucht einen echten outline */
  .b-btn:focus-visible, .b-tab:focus-visible, .b-check:focus-visible, .b-input:focus, .b-select:focus,
  .b-menu a:focus-visible, .b-pw__toggle:focus-visible, .b-navlist .b-navitem:focus-visible, .b-switch:focus-visible,
  .b-tablewrap:focus-visible, .b-cell:focus { outline: 2px solid Highlight; outline-offset: 2px; }
}
