/* Erzeugt aus brand/tokens.json des Inhaltspakets (nicht von Hand ändern). */
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/brand/fonts/IBMPlexSans-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/brand/fonts/IBMPlexSans-Medium.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("/brand/fonts/IBMPlexSans-SemiBold.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/brand/fonts/IBMPlexSans-Bold.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/brand/fonts/JetBrainsMono-Regular.woff2") format("woff2");
}
@font-face {
  font-family: "JetBrains Mono";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/brand/fonts/JetBrainsMono-Bold.woff2") format("woff2");
}
:root {
  --bg: #04121E;
  --surface: #0B1D2C;
  --surface-2: #1D3347;
  --accent: #4DC2FF;
  --on-accent: #04121E;
  --text: #EEF3FC;
  --text-muted: #A9B8CC;
  --ok: #3DDC97;
  --warn: #FFB547;
  --err: #FF6B6B;
  --font-sans: "IBM Plex Sans","Segoe UI",system-ui,-apple-system,sans-serif;
  --font-mono: "JetBrains Mono",Consolas,"Courier New",monospace;
  --fs-14: .875rem;
  --fs-16: 1rem;
  --fs-17: 1.0625rem;
  --fs-18: 1.125rem;
  --fs-20: 1.25rem;
  --fs-24: 1.5rem;
  --fs-32: 2rem;
  --fs-36: 2.25rem;
  --sp-8: 8px;
  --sp-16: 16px;
  --sp-24: 24px;
  --sp-32: 32px;
  --sp-48: 48px;
  --sp-64: 64px;
  --sp-96: 96px;
  --radius: 8px;
  --radius-klein: 6px;
  --max: 1200px;
  --kopf-hoehe: 64px;
  --dauer: 180ms;
  --ease-aus: cubic-bezier(.16,1,.3,1);
}

/*
 * Stylesheet von docs.plantbeat.io (apps/help, Plan 625 T2.7). Eigene Arbeit: nachgebildet ist nur die Anordnung
 * (Kopfzeile, linke Navigation, Artikel, „Auf dieser Seite“, Fußzeile), keine Regel und kein Wert aus der Quelle des
 * Vorlieferanten. Farben, Schriften, Abstände und Radien kommen ausschließlich als CSS-Variablen aus brand/tokens.json
 * des Inhaltspakets (tokens.ts schreibt sie vor dieses Stylesheet). Hier steht kein fester Farbwert.
 * Dunkles Thema (F12: helles Thema später). Ohne Skript bedienbar; bei Telefonbreite ohne waagerechtes Scrollen.
 */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  color-scheme: dark;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--kopf-hoehe, 64px) + 16px);
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans, system-ui, sans-serif);
  font-size: var(--fs-16, 1rem);
  line-height: 1.6;
  overflow-wrap: break-word;
}

a {
  color: var(--accent);
  text-underline-offset: 0.18em;
}

a:hover {
  text-decoration-thickness: 2px;
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

main:focus {
  outline: none;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: 8px;
  left: 16px;
  z-index: 100;
  padding: 8px 16px;
  border-radius: var(--radius, 8px);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

.icon {
  width: 20px;
  height: 20px;
  flex: none;
  vertical-align: middle;
}

/* Kopfzeile */

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--surface);
  border-bottom: 1px solid var(--surface-2);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px 24px;
  min-height: var(--kopf-hoehe, 64px);
  max-width: 1440px;
  margin: 0 auto;
  padding: 8px 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  text-decoration: none;
  flex: none;
}

.brand img {
  display: block;
  height: 28px;
  width: auto;
}

.brand-docs {
  padding-left: 12px;
  border-left: 1px solid var(--surface-2);
  color: var(--text-muted);
  font-weight: 500;
}

.tabs {
  display: flex;
  gap: 4px;
}

.tabs a,
.header-link,
.lang-switch,
.menu-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 12px;
  border-radius: var(--radius-klein, 6px);
  color: var(--text-muted);
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
}

.tabs a:hover,
.header-link:hover,
.lang-switch:hover,
.menu-link:hover {
  background: var(--surface-2);
  color: var(--text);
}

.tabs a[aria-current] {
  color: var(--text);
  box-shadow: inset 0 -2px 0 var(--accent);
  border-radius: 0;
}

.menu-link {
  display: none;
}

/* Suche (Verhalten: docs-search.js, T2.8) */

.search {
  position: relative;
  flex: 1 1 280px;
  max-width: 420px;
  margin-left: auto;
}

.search-icon {
  position: absolute;
  top: 50%;
  left: 12px;
  transform: translateY(-50%);
  color: var(--text-muted);
  pointer-events: none;
  display: flex;
}

.search-input {
  width: 100%;
  min-height: 40px;
  padding: 8px 12px 8px 40px;
  border: 1px solid var(--surface-2);
  border-radius: var(--radius, 8px);
  background: var(--bg);
  color: var(--text);
  font: inherit;
}

.search-input::placeholder {
  color: var(--text-muted);
  opacity: 1;
}

.search-input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.search-results:empty,
.search-results[hidden] {
  display: none;
}

/* Statuszeile (role=status): angesagt, sichtbar nur mit Text. */
.search-status {
  margin: 4px 0 0;
  color: var(--text-muted);
  font-size: var(--fs-14, 0.875rem);
  text-align: left;
}

.search-status:empty {
  display: none;
}

.search-results {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 30;
  max-height: 70vh;
  overflow-y: auto;
  padding: 8px;
  border: 1px solid var(--surface-2);
  border-radius: var(--radius, 8px);
  background: var(--surface);
}

.search-list {
  margin: 0;
  padding: 0;
  list-style: none;
  text-align: left;
}

.search-item + .search-item {
  border-top: 1px solid var(--surface-2);
}

.search-hit {
  display: block;
  padding: 8px 8px 2px;
  border-radius: var(--radius-sm, 4px);
  font-weight: 600;
  text-decoration: none;
}

.search-hit:hover {
  text-decoration: underline;
}

.search-hit:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 0;
}

.search-excerpt {
  margin: 0;
  padding: 0 8px 8px;
  color: var(--text-muted);
  font-size: var(--fs-14, 0.875rem);
}

.search-excerpt mark {
  background: var(--surface-2);
  color: var(--text);
  padding: 0 2px;
  border-radius: 2px;
}

/* Aufbau der Artikelseite: Navigation | Artikel | Auf dieser Seite */

.layout {
  flex: 1;
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr) 220px;
  gap: 40px;
  width: 100%;
  max-width: 1440px;
  margin: 0 auto;
  padding: 32px 24px 64px;
}

.sidebar {
  position: sticky;
  top: calc(var(--kopf-hoehe, 64px) + 24px);
  align-self: start;
  max-height: calc(100vh - var(--kopf-hoehe, 64px) - 48px);
  overflow-y: auto;
  font-size: var(--fs-14, 0.875rem);
}

.nav-tree,
.nav-tree ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-section {
  margin-bottom: 20px;
}

.nav-section > a {
  font-weight: 600;
  color: var(--text);
}

.nav-tree ul ul {
  margin-left: 12px;
  padding-left: 8px;
  border-left: 1px solid var(--surface-2);
}

.nav-tree a {
  display: block;
  padding: 5px 10px;
  border-radius: var(--radius-klein, 6px);
  color: var(--text-muted);
  text-decoration: none;
}

.nav-tree a:hover {
  background: var(--surface);
  color: var(--text);
}

.nav-tree a[aria-current="page"] {
  background: var(--surface-2);
  color: var(--text);
  box-shadow: inset 3px 0 0 var(--accent);
}

main {
  min-width: 0;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 0;
  margin: 0 0 16px;
  padding: 0;
  list-style: none;
  font-size: var(--fs-14, 0.875rem);
  color: var(--text-muted);
}

.breadcrumbs li + li::before {
  content: "/";
  padding: 0 8px;
  color: var(--text-muted);
}

.breadcrumbs a {
  color: var(--text-muted);
}

.on-this-page {
  position: sticky;
  top: calc(var(--kopf-hoehe, 64px) + 24px);
  align-self: start;
  font-size: var(--fs-14, 0.875rem);
}

.on-this-page h2 {
  margin: 0 0 8px;
  font-size: var(--fs-14, 0.875rem);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.on-this-page ul {
  list-style: none;
  margin: 0;
  padding: 0 0 0 12px;
  border-left: 1px solid var(--surface-2);
}

.on-this-page li {
  padding: 3px 0;
}

.on-this-page li.sub {
  padding-left: 12px;
}

.on-this-page a {
  color: var(--text-muted);
  text-decoration: none;
}

.on-this-page a:hover {
  color: var(--text);
}

/* Artikel */

#md-content {
  max-width: 76ch;
}

#md-content h1 {
  margin: 0 0 8px;
  font-size: var(--fs-36, 2.25rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
}

#md-content h2 {
  margin: 40px 0 12px;
  font-size: var(--fs-24, 1.5rem);
  line-height: 1.3;
}

#md-content h3 {
  margin: 28px 0 8px;
  font-size: var(--fs-20, 1.25rem);
  line-height: 1.35;
}

#md-content h4 {
  margin: 24px 0 8px;
  font-size: var(--fs-17, 1.0625rem);
}

#md-content p,
#md-content ul,
#md-content ol,
#md-content table,
#md-content pre {
  margin: 0 0 16px;
}

#md-content li + li {
  margin-top: 4px;
}

#md-content img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 16px 0;
  border: 1px solid var(--surface-2);
  border-radius: var(--radius, 8px);
}

.page-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 16px;
  margin: 0 0 24px;
  color: var(--text-muted);
  font-size: var(--fs-14, 0.875rem);
}

.page-meta .version {
  padding: 0 8px;
  border: 1px solid var(--surface-2);
  border-radius: 999px;
}

.badge {
  display: inline-block;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--warn);
  color: var(--on-accent);
  font-size: 0.75rem;
  font-weight: 600;
  line-height: 1.6;
  vertical-align: middle;
}

.preview-note {
  margin: 0 0 12px;
  color: var(--text-muted);
}

code,
kbd,
pre {
  font-family: var(--font-mono, ui-monospace, monospace);
  font-size: 0.9em;
}

:not(pre) > code {
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: var(--surface-2);
  color: var(--text);
}

kbd {
  display: inline-block;
  padding: 0 0.4em;
  border: 1px solid var(--surface-2);
  border-bottom-width: 2px;
  border-radius: 4px;
  background: var(--surface);
  color: var(--text);
}

pre {
  overflow-x: auto;
  padding: 16px;
  border: 1px solid var(--surface-2);
  border-radius: var(--radius, 8px);
  background: var(--surface);
  line-height: 1.5;
}

#md-content table {
  display: block;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
}

#md-content th,
#md-content td {
  padding: 8px 12px;
  border: 1px solid var(--surface-2);
  text-align: left;
  vertical-align: top;
}

#md-content th {
  background: var(--surface);
}

.markdown-alert {
  margin: 0 0 16px;
  padding: 12px 16px;
  border-left: 4px solid var(--accent);
  border-radius: 0 var(--radius, 8px) var(--radius, 8px) 0;
  background: var(--surface);
}

.markdown-alert > :last-child {
  margin-bottom: 0;
}

.markdown-alert-title {
  margin: 0 0 4px;
  font-weight: 600;
}

.markdown-alert-note .markdown-alert-title {
  color: var(--accent);
}

.markdown-alert-tip {
  border-left-color: var(--ok);
}

.markdown-alert-tip .markdown-alert-title {
  color: var(--ok);
}

.markdown-alert-warning {
  border-left-color: var(--warn);
}

.markdown-alert-warning .markdown-alert-title {
  color: var(--warn);
}

.markdown-alert-caution {
  border-left-color: var(--err);
}

.markdown-alert-caution .markdown-alert-title {
  color: var(--err);
}

.pager {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  max-width: 76ch;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--surface-2);
}

.pager a {
  display: grid;
  grid-template-columns: auto 1fr;
  column-gap: 8px;
  align-items: center;
  max-width: 48%;
  padding: 12px 16px;
  border: 1px solid var(--surface-2);
  border-radius: var(--radius, 8px);
  text-decoration: none;
  color: var(--text);
}

.pager a:hover {
  border-color: var(--accent);
}

.pager-prev .icon {
  grid-row: span 2;
}

.pager-next {
  margin-left: auto;
  grid-template-columns: 1fr auto;
  text-align: right;
}

.pager-next .icon {
  grid-row: 1 / span 2;
  grid-column: 2;
}

.pager-label {
  color: var(--text-muted);
  font-size: var(--fs-14, 0.875rem);
}

.pager-title {
  font-weight: 600;
}

.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border-radius: var(--radius, 8px);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
}

.button:hover {
  text-decoration: underline;
}

/* Startseite */

.home {
  flex: 1;
  width: 100%;
  max-width: var(--max, 1200px);
  margin: 0 auto;
  padding: 0 24px 64px;
}

.hero {
  padding: 64px 0 48px;
  text-align: center;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: var(--fs-36, 2.25rem);
  line-height: 1.2;
}

.hero-text {
  max-width: 62ch;
  margin: 0 auto 24px;
  color: var(--text-muted);
  font-size: var(--fs-18, 1.125rem);
}

.search-hero {
  max-width: 560px;
  margin: 0 auto 24px;
}

.search-hero .search-input {
  min-height: 48px;
  text-align: left;
}

.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}

.tile {
  padding: 24px;
  border: 1px solid var(--surface-2);
  border-radius: var(--radius, 8px);
  background: var(--surface);
}

.tile h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 8px;
  font-size: var(--fs-18, 1.125rem);
}

.tile h2 .icon {
  width: 24px;
  height: 24px;
  color: var(--accent);
}

.tile p {
  margin: 0 0 12px;
  color: var(--text-muted);
}

.tile ul {
  margin: 0;
  padding-left: 18px;
}

.tile li + li {
  margin-top: 4px;
}

/* 404 */

.not-found {
  max-width: 62ch;
  margin: 0 auto;
  padding: 80px 24px;
  text-align: center;
}

.not-found h1 {
  font-size: var(--fs-32, 2rem);
}

.not-found-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 16px 24px;
  margin: 24px 0 0;
  padding: 0;
  list-style: none;
}

main[data-pagefind-ignore] {
  flex: 1;
}

/* Fußzeile */

.site-footer {
  border-top: 1px solid var(--surface-2);
  background: var(--surface);
  color: var(--text-muted);
  font-size: var(--fs-14, 0.875rem);
}

.footer-inner {
  max-width: 1440px;
  margin: 0 auto;
  padding: 32px 24px;
}

.footer-inner p {
  margin: 0 0 8px;
}

.footer-product {
  color: var(--text);
  font-weight: 600;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 20px;
  margin: 0 0 12px;
  padding: 0;
  list-style: none;
}

.footer-links a {
  display: inline-block;
  padding: 4px 0;
  color: var(--text-muted);
}

.footer-links a:hover {
  color: var(--text);
}

/* Schmalere Bildschirme */

@media (max-width: 1200px) {
  .layout {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  .on-this-page {
    display: none;
  }
}

@media (max-width: 860px) {
  .site-header {
    position: static;
  }

  .header-inner {
    flex-wrap: wrap;
    padding: 8px 16px;
  }

  .tabs {
    display: none;
  }

  .menu-link {
    display: inline-flex;
  }

  .search {
    order: 10;
    flex-basis: 100%;
    max-width: none;
    margin-left: 0;
  }

  .header-link {
    margin-left: auto;
  }

  .layout {
    display: flex;
    flex-direction: column;
    gap: 32px;
    padding: 24px 16px 48px;
  }

  .sidebar {
    order: 2;
    position: static;
    max-height: none;
    overflow: visible;
    padding-top: 24px;
    border-top: 1px solid var(--surface-2);
  }

  .home {
    padding: 0 16px 48px;
  }

  .hero {
    padding: 40px 0 32px;
  }

  #md-content h1,
  .hero h1 {
    font-size: var(--fs-32, 2rem);
  }

  .pager {
    flex-direction: column;
  }

  .pager a {
    max-width: none;
  }

  .footer-inner {
    padding: 24px 16px;
  }
}

@media (max-width: 480px) {
  .brand-docs {
    display: none;
  }

  .header-inner {
    gap: 8px;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .skip-link {
    transition: transform var(--dauer, 180ms) var(--ease-aus, ease-out);
  }
}
