/* B21-Kit · base.css · 1.1.0 · 2026-11-21 · 6194bff – Quelle: Bitcoin Offer/kit/src/base.css (hier nicht ändern, neu mit kit/sync.mjs) */
/* ──────────────────────────────────────────────────────────────
   B21-Kit · base.css – gemeinsame Bausteine aller Blockchain21-Projekte
   (docs/NEUAUFBAU-2026-11.md §7.1, Werte aus docs/BRAND-V3.md §2.4–§2.7).

   Regeln (test/kit.test.mjs prüft sie):
   - nur Klassen mit Präfix .b21-, keine Element-Selektoren (wirkt nie auf fremde Seitenteile),
   - nur Variablen mit Präfix --b21- (tokens.css vorher laden; jede Variable hat einen hellen Rückfallwert),
   - keine externen Adressen.
   Farben folgen den Tokens: auf .b21-night und im dunklen Schema (.b21-auto, .b21-dark) passen sie sich an.
   ────────────────────────────────────────────────────────────── */

/* ── Schrift-Rollen ─────────────────────────────────────────── */

/* Kicker: Mono 500, 12 px, Versalien, +0,12 em, davor ein orangem 6-px-Quadrat */
.b21-kicker {
  display: inline-flex;
  align-items: baseline;
  gap: 0.6em;
  margin: 0;
  font-family: var(--b21-font-mono, 'IBM Plex Mono', ui-monospace, Menlo, monospace);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--b21-ink-3, #666d78);
  hyphens: manual;
}
.b21-kicker::before {
  content: '';
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 1px;
  background: var(--b21-accent, #f7931a);
  transform: translateY(-0.12em);
}

/* Lead: ein ruhiger Satz unter der Überschrift */
.b21-lead {
  margin: 0;
  max-width: 52ch;
  font-family: var(--b21-font-sans, 'Schibsted Grotesk Variable', 'Helvetica Neue', Arial, system-ui, sans-serif);
  font-size: clamp(1.05rem, 0.98rem + 0.3vw, 1.2rem);
  font-weight: 400;
  line-height: 1.65;
  color: var(--b21-ink-3, #666d78);
}

/* Kennzahl/Ergebnis: Source Serif 4, opsz 60, 360, Tabellenziffern (einzelne große Zahl: .b21-figure--single) */
.b21-figure {
  font-family: var(--b21-font-serif, 'Source Serif 4 Variable', Georgia, serif);
  font-variation-settings: 'opsz' 60;
  font-weight: var(--b21-fw-figure, 360);
  font-style: normal;
  letter-spacing: -0.02em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums lining-nums;
}
.b21-figure--single { font-variant-numeric: proportional-nums lining-nums; }

/* Mono für Zeit, Kennung, Label */
.b21-mono {
  font-family: var(--b21-font-mono, 'IBM Plex Mono', ui-monospace, Menlo, monospace);
  font-weight: 500;
}

/* Handy: Mono-Versalien etwas enger (+0,08 em), Größe bleibt 12 px */
@media (max-width: 767px) {
  .b21-kicker,
  .b21-note-title { letter-spacing: 0.08em; }
}

/* ── Knöpfe ─────────────────────────────────────────────────── */

/* Haupt-Knopf: Fläche Tinte, Schrift Fläche, davor ein orangem 7-px-Quadrat.
   Im dunklen Schema und auf .b21-night kehren sich Tinte und Fläche über die Tokens von selbst um. */
.b21-btn-primary,
.b21-btn-ghost {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.6em;
  min-height: 48px;
  padding: 0.7em 1.3em;
  border: 1px solid transparent;
  border-radius: var(--b21-radius-sm, 8px);
  font-family: var(--b21-font-sans, 'Schibsted Grotesk Variable', 'Helvetica Neue', Arial, system-ui, sans-serif);
  font-size: 0.9375rem;
  font-weight: var(--b21-fw-ui, 520);
  line-height: 1.2;
  letter-spacing: 0;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.2s, border-color 0.2s, color 0.2s;
}
.b21-btn-primary {
  background: var(--b21-ink, #0f1115);
  color: var(--b21-bg, #ffffff);
}
.b21-btn-primary::before {
  content: '';
  flex: none;
  width: 7px;
  height: 7px;
  background: var(--b21-accent, #f7931a);
}
.b21-btn-primary:hover {
  background: color-mix(in srgb, var(--b21-ink, #0f1115) 86%, var(--b21-bg, #ffffff));
  color: var(--b21-bg, #ffffff);
}
/* Zweite Aktion ohne Gewicht (Zurücksetzen, Erneut versuchen) */
.b21-btn-ghost {
  background: transparent;
  border-color: var(--b21-line-strong, #d3d0c9);
  color: var(--b21-ink, #0f1115);
}
.b21-btn-ghost:hover {
  background: var(--b21-bg-sunk, #f1f0ec);
  color: var(--b21-ink, #0f1115);
}
.b21-btn--lg { min-height: 52px; font-size: 1rem; }
.b21-btn--block { width: 100%; }
.b21-btn-primary:disabled,
.b21-btn-ghost:disabled,
.b21-btn-primary[aria-disabled='true'],
.b21-btn-ghost[aria-disabled='true'] { opacity: 0.55; cursor: not-allowed; }

/* Sekundäre Aktion: Textlink mit 1-px-Linie in --b21-line-strong, Hover --b21-accent-ink, dazu „→“ */
.b21-link-arrow {
  /* inline: im Fließtext ändert sich die Zeilenhöhe nicht; padding-block vergrößert nur die Trefferfläche auf 44 px */
  padding-block: 0.7rem;
  font-family: var(--b21-font-sans, 'Schibsted Grotesk Variable', 'Helvetica Neue', Arial, system-ui, sans-serif);
  font-weight: var(--b21-fw-ui, 520);
  color: var(--b21-ink, #0f1115);
  text-decoration: underline;
  text-decoration-color: var(--b21-line-strong, #d3d0c9);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  transition: color 0.2s, text-decoration-color 0.2s;
}
.b21-link-arrow::after {
  content: '→';
  display: inline-block;
  margin-left: 0.4em;
  transition: transform 0.25s var(--b21-ease-out, cubic-bezier(0.16, 1, 0.3, 1));
}
.b21-link-arrow:hover {
  color: var(--b21-accent-ink, #b54708);
  text-decoration-color: currentColor;
}
.b21-link-arrow:hover::after { transform: translateX(4px); }

/* ── Chips, Status, Hinweise ────────────────────────────────── */

/* Chip: Pille, 1-px-Rahmen, Mono 12 px (Richtung, Produktart, Kennungen – nie farbig) */
.b21-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  width: fit-content;
  padding: 0.2em 0.7em;
  border: 1px solid var(--b21-line-strong, #d3d0c9);
  border-radius: var(--b21-radius-pill, 999px);
  font-family: var(--b21-font-mono, 'IBM Plex Mono', ui-monospace, Menlo, monospace);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--b21-ink-2, #3d434d);
  white-space: nowrap;
}

/* Status eines Projekts (§5.2): Online · Im Aufbau · In Vorbereitung */
.b21-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5em;
  width: fit-content;
  font-family: var(--b21-font-mono, 'IBM Plex Mono', ui-monospace, Menlo, monospace);
  font-size: 0.75rem;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--b21-ink-2, #3d434d);
  white-space: nowrap;
}
.b21-status--online::before {
  content: '';
  flex: none;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--b21-accent, #f7931a);
}
.b21-status--aufbau {
  padding: 0.2em 0.7em;
  border: 1px solid var(--b21-line-strong, #d3d0c9);
  border-radius: var(--b21-radius-pill, 999px);
}
.b21-status--vorbereitung { color: var(--b21-ink-3, #666d78); }

/* Hinweis: Linie links 3 px in der Bedeutungsfarbe, Text ruhig (keine Fläche, kein Symbol) */
.b21-note {
  margin: 0;
  padding: 0.15rem 0 0.15rem 1rem;
  border-left: 3px solid var(--b21-line-strong, #d3d0c9);
  font-family: var(--b21-font-sans, 'Schibsted Grotesk Variable', 'Helvetica Neue', Arial, system-ui, sans-serif);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--b21-ink-2, #3d434d);
}
.b21-note--info { border-left-color: var(--b21-info, #2455c3); }
.b21-note--risk { border-left-color: var(--b21-risk, #b42318); }
.b21-note--warn { border-left-color: var(--b21-warn, #8a5300); }
.b21-note-title {
  display: block;
  margin-bottom: 0.2rem;
  font-family: var(--b21-font-mono, 'IBM Plex Mono', ui-monospace, Menlo, monospace);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--b21-ink-3, #666d78);
}
.b21-note--info .b21-note-title { color: var(--b21-info, #2455c3); }
.b21-note--risk .b21-note-title { color: var(--b21-risk, #b42318); }
.b21-note--warn .b21-note-title { color: var(--b21-warn, #8a5300); }

/* ── Schalter „Bewegung reduzieren“ (motion.js, localStorage b21-motion) ───────
   Markup: <button type="button" class="b21-switch" role="switch" aria-checked="false" data-b21-motion hidden>…
   Ohne JavaScript bleibt er versteckt (hidden), weil er dann nichts bewirken kann. */
.b21-switch {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: 44px;
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--b21-font-sans, 'Schibsted Grotesk Variable', 'Helvetica Neue', Arial, system-ui, sans-serif);
  font-size: 0.875rem;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.b21-switch[hidden] { display: none; }
.b21-switch-track {
  position: relative;
  flex: none;
  width: 30px;
  height: 18px;
  border: 1px solid var(--b21-line-strong, #d3d0c9);
  border-radius: var(--b21-radius-pill, 999px);
  background: transparent;
  transition: background-color 0.2s, border-color 0.2s;
}
.b21-switch-track::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--b21-ink-3, #666d78);
  transition: transform 0.25s var(--b21-ease-out, cubic-bezier(0.16, 1, 0.3, 1)), background-color 0.2s;
}
.b21-switch[aria-checked='true'] .b21-switch-track {
  background: var(--b21-accent, #f7931a);
  border-color: var(--b21-accent, #f7931a);
}
.b21-switch[aria-checked='true'] .b21-switch-track::after {
  transform: translateX(12px);
  background: #140c02;
}
.b21-switch[aria-disabled='true'] { cursor: default; }
.b21-switch[aria-disabled='true'] .b21-switch-track { opacity: 0.7; }
.b21-switch-note { color: var(--b21-ink-3, #666d78); }

/* ── Hilfsklassen ───────────────────────────────────────────── */

/* Nur für Screenreader sichtbar */
.b21-sr {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Sprunglink: erstes Element der Seite, sichtbar nur mit Tastaturfokus */
.b21-skip {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 200;
  padding: 0.6rem 1rem;
  border-radius: var(--b21-radius-sm, 8px);
  background: var(--b21-ink, #0f1115);
  color: var(--b21-bg, #ffffff);
  font-family: var(--b21-font-sans, 'Schibsted Grotesk Variable', 'Helvetica Neue', Arial, system-ui, sans-serif);
  font-weight: var(--b21-fw-ui, 520);
  text-decoration: none;
}
.b21-skip:focus { top: 0.75rem; }

/* ── Fokusring (überall gleich: 2 px Orange, 3 px Abstand) ──── */
.b21-focus:focus-visible,
.b21-btn-primary:focus-visible,
.b21-btn-ghost:focus-visible,
.b21-link-arrow:focus-visible,
.b21-switch:focus-visible,
.b21-skip:focus-visible {
  outline: 2px solid var(--b21-accent, #f7931a);
  outline-offset: 3px;
}

/* ── Bewegung (§6.7): Hover höchstens 4 px, nichts blinkt.
   prefers-reduced-motion und html[data-motion="reduce"] (motion.js) schalten die Übergänge der Kit-Bausteine ab.
   Projekte schalten ihre eigenen Übergänge in ihrer eigenen CSS ab (das Kit greift nicht in fremde Elemente ein). */
@media (prefers-reduced-motion: reduce) {
  .b21-btn-primary,
  .b21-btn-ghost,
  .b21-link-arrow,
  .b21-link-arrow::after,
  .b21-switch-track,
  .b21-switch-track::after,
  .b21-motion-off,
  .b21-motion-off::before,
  .b21-motion-off::after { transition: none !important; animation: none !important; }
  .b21-link-arrow:hover::after { transform: none; }
}
:root[data-motion='reduce'] .b21-btn-primary,
:root[data-motion='reduce'] .b21-btn-ghost,
:root[data-motion='reduce'] .b21-link-arrow,
:root[data-motion='reduce'] .b21-link-arrow::after,
:root[data-motion='reduce'] .b21-switch-track,
:root[data-motion='reduce'] .b21-switch-track::after,
:root[data-motion='reduce'] .b21-motion-off,
:root[data-motion='reduce'] .b21-motion-off::before,
:root[data-motion='reduce'] .b21-motion-off::after { transition: none !important; animation: none !important; }
:root[data-motion='reduce'] .b21-link-arrow:hover::after { transform: none; }
