/* B21-Kit · bar.css · 1.1.0 · 2026-11-21 · 6194bff – Quelle: Bitcoin Offer/kit/src/bar.css (hier nicht ändern, neu mit kit/sync.mjs) */
/* ──────────────────────────────────────────────────────────────
   B21-Kit · bar.css – Kopfleiste „Blockchain21 / Projekt“ (docs/NEUAUFBAU-2026-11.md §7.4, Kit 1.1 „Zentrale“)

   Für Login- und Projektseiten, nie über einer laufenden Spielfläche (Canvas, Karte, Tisch).
   Varianten: .b21-bar--night – wie der Kopf der Startseite (Kommandozentrale): Nacht #06080c, Marmorweiß, Linie .10,
              Wortmarke Schibsted mit oranger „21“ in der Zeile, Projekt in Plex Mono, „Alle Projekte“ in Inter.
              .b21-bar--light – helle Seiten im Ratgeber-Look (Schibsted, „21“ hochgestellt in Mono).
   Höhe 40 px (≤ 767 px: 44 px), Trefferflächen ≥ 44 × 44 px. Keine Bewegung.
   Nur .b21-Klassen und --b21-Variablen; Markup: snippets/bar.html.
   ────────────────────────────────────────────────────────────── */

.b21-bar {
  --b21-bar-bg: var(--b21-bg, #ffffff);
  --b21-bar-word: var(--b21-ink, #0f1115);
  --b21-bar-project: var(--b21-ink-2, #3d434d);
  --b21-bar-sep: var(--b21-ink-3, #666d78);
  --b21-bar-line: var(--b21-line, #e8e6e1);
  --b21-bar-under: var(--b21-line-strong, #d3d0c9);
  --b21-bar-hover: var(--b21-accent-ink, #b54708);
  --b21-bar-hover-line: currentColor;
  --b21-bar-text: var(--b21-font-sans, 'Schibsted Grotesk Variable', 'Helvetica Neue', Arial, system-ui, sans-serif);
  --b21-bar-head: var(--b21-font-display, 'Schibsted Grotesk Variable', 'Helvetica Neue', Arial, system-ui, sans-serif);
  --b21-bar-mono: var(--b21-font-mono, 'IBM Plex Mono', ui-monospace, Menlo, monospace);
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  box-sizing: border-box;
  width: 100%;
  min-height: 40px;
  margin: 0;
  padding: 0 max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
  border-bottom: 1px solid var(--b21-bar-line);
  background: var(--b21-bar-bg);
  color: var(--b21-bar-word);
  font-family: var(--b21-bar-text);
  font-size: 15px;
  line-height: 1;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
.b21-bar--light {
  --b21-bar-bg: var(--b21-bg, #ffffff);
  --b21-bar-word: var(--b21-ink, #0f1115);
  --b21-bar-project: var(--b21-ink-2, #3d434d);
  --b21-bar-sep: var(--b21-ink-3, #666d78);
  --b21-bar-line: var(--b21-line, #e8e6e1);
  --b21-bar-under: var(--b21-line-strong, #d3d0c9);
  --b21-bar-hover: var(--b21-accent-ink, #b54708);
}
/* Nacht wie die Startseite: Flächen, Linien und Text der Kommandozentrale, Hover ohne Orange (Orange = Live/Bitcoin) */
.b21-bar--night {
  --b21-bar-bg: #06080c;
  --b21-bar-word: #ece8e0;
  --b21-bar-project: #b9bcc2;
  --b21-bar-sep: #8f96a1;
  --b21-bar-line: rgb(236 232 224 / 0.1);
  --b21-bar-under: rgb(236 232 224 / 0.32);
  --b21-bar-hover: #ffffff;
  --b21-bar-hover-line: #ece8e0;
  --b21-bar-text: 'Inter Variable', 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --b21-bar-head: 'Schibsted Grotesk Variable', 'Inter Variable', system-ui, sans-serif;
  --b21-bar-mono: 'IBM Plex Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  /* Inhalt in derselben Spalte wie der Kopf der Startseite (1180 px, Rand 16–48 px): die Marke springt beim Wechsel nicht */
  padding-inline: max(clamp(16px, 4vw, 48px), (100% - 1180px) / 2, env(safe-area-inset-left));
  font-feature-settings: 'cv11', 'ss01';
  color-scheme: dark;
}

/* Zeichen + Wortmarke: ein Link zur Startseite */
.b21-bar-home {
  display: inline-flex;
  flex: none;
  align-items: center;
  gap: 0.5rem;
  min-height: 44px;
  margin-block: -2px;
  color: var(--b21-bar-word);
  text-decoration: none;
}
.b21-bar-mark {
  flex: none;
  width: 18px;
  height: 18px;
  overflow: visible;
}
.b21-bar-word {
  font-family: var(--b21-bar-head);
  font-size: 15px;
  font-weight: 620;
  letter-spacing: -0.03em;
  line-height: 1;
  white-space: nowrap;
}
.b21-bar-21 {
  position: relative;
  top: -0.42em;
  margin-left: 0.18em;
  font-family: var(--b21-bar-mono);
  font-size: 0.72em;
  font-weight: 500;
  letter-spacing: 0;
  color: var(--b21-accent, #f7931a);
}
/* Nacht: Wortmarke wie im Kopf der Startseite – „21“ in derselben Schrift, orange, in der Zeile */
.b21-bar--night .b21-bar-home { gap: 0.6rem; }
.b21-bar--night .b21-bar-mark {
  width: 24px;
  height: 24px;
}
.b21-bar--night .b21-bar-word {
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.01em;
}
.b21-bar--night .b21-bar-21 {
  position: static;
  margin-left: 0;
  font-family: inherit;
  font-size: 1em;
  font-weight: inherit;
  letter-spacing: inherit;
  color: #f7931a;
}

/* Trenner „/“ – wird wie eine Adresse gelesen */
.b21-bar-sep {
  flex: none;
  color: var(--b21-bar-sep);
  font-family: var(--b21-bar-mono);
  font-size: 14px;
  font-weight: 500;
}

/* Projektname: Mono 12 px, Versalien, +0,12 em */
.b21-bar-project {
  flex: 0 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--b21-bar-project);
  font-family: var(--b21-bar-mono);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
/* Nacht: Kennung wie der Kicker der Startseite (Mono 13 px, +0,07 em) */
.b21-bar--night .b21-bar-project {
  font-size: 13px;
  letter-spacing: 0.07em;
}

/* „Alle Projekte“ rechts: Unterstrich 1 px (hell Schibsted 520 14 px, Nacht Inter 500 15 px) */
.b21-bar-all {
  display: inline-flex;
  flex: none;
  align-items: center;
  min-height: 44px;
  margin-block: -2px;
  margin-left: auto;
  color: var(--b21-bar-word);
  font-family: var(--b21-bar-text);
  font-size: 14px;
  font-weight: var(--b21-fw-ui, 520);
  text-decoration: underline;
  text-decoration-color: var(--b21-bar-under);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.3em;
  white-space: nowrap;
}
.b21-bar--night .b21-bar-all {
  font-size: 15px;
  font-weight: 500;
  text-underline-offset: 0.35em;
}
.b21-bar-home:hover .b21-bar-word,
.b21-bar-all:hover {
  color: var(--b21-bar-hover);
  text-decoration-color: var(--b21-bar-hover-line);
}

.b21-bar-home:focus-visible,
.b21-bar-all:focus-visible {
  outline: 2px solid var(--b21-accent, #f7931a);
  outline-offset: 2px;
  border-radius: 4px;
}

@media (max-width: 767px) {
  .b21-bar { min-height: 44px; }
  .b21-bar-project { letter-spacing: 0.08em; }
  .b21-bar--night .b21-bar-project { letter-spacing: 0.05em; }
  .b21-bar-home,
  .b21-bar-all { margin-block: 0; }
}

/* Sehr schmal: Wortmarke nur noch für Screenreader (der Link behält seinen Namen), Projekt und „Alle Projekte“ bleiben */
@media (max-width: 399px) {
  .b21-bar { gap: 0.6rem; }
  .b21-bar-word {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }
}
