/* =========================================================================
   Die Offensive — Online-Bedienungsanleitung (doku.dieoffensive.com)
   Diese Datei wird vom Generator (docs/manual/build.mjs) unveraendert nach
   doku.dieoffensive.com/assets/styles.css kopiert. Nicht im Output editieren.
   ========================================================================= */

:root {
  /* Markenfarben (aus index.html Tailwind-Config) */
  --wine: #632343;
  --wine-dark: #4a1a32;
  --wine-tint: #f3e9ee;
  --wine-light: #c9788f;
  --ink: #0a0a0a;
  --paper: #ffffff;
  --line: #e7e2de;
  --line-soft: #f0ece8;
  --line-strong: #d8d2cc;
  --muted: #8a8278;
  --muted-light: #c8c2bc;

  /* Kompatibilitaets-Variablen fuer die uebernommenen pc-* Artikelbausteine */
  --pc-white: #ffffff;
  --pc-gray-50: #f7f5f3;
  --pc-gray-200: #e7e2de;
  --pc-gray-500: #8a8278;
  --pc-gray-700: #57534e;
  --pc-gray-900: #1c1917;
  --pc-blue: var(--wine);
  --pc-blue-light: var(--wine-tint);

  --radius: 12px;
  --radius-sm: 8px;
  --sidebar-w: 300px;
  --header-h: 60px;
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('/assets/fonts/inter.woff2') format('woff2');
}

* { box-sizing: border-box; }

/* Inline-Lucide-Icons (ersetzen alle Emoji) */
.ic { width: 1em; height: 1em; flex-shrink: 0; vertical-align: -0.15em; }
.doc-sidebar .ch-title .ic { width: 15px; height: 15px; color: var(--wine); }
.chapter-card .ci .ic { width: 26px; height: 26px; color: var(--wine); }
.pc-feature-list-icon .fi { width: 20px; height: 20px; color: var(--wine); }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: var(--wine); text-decoration: none; }
a:hover { color: var(--wine-dark); text-decoration: underline; }

/* ---------- Header ---------- */
.doc-header {
  position: sticky;
  top: 0;
  z-index: 40;
  height: var(--header-h);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 20px;
  background: rgba(255, 255, 255, 0.9);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}
.doc-header .brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: var(--ink);
  white-space: nowrap;
}
.doc-header .brand:hover { text-decoration: none; }
.doc-header .brand .mark {
  width: 30px; height: 30px; border-radius: 9px;
  background: var(--wine); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; letter-spacing: .02em;
}
.doc-header .brand .sub { color: var(--muted); font-weight: 500; }
.doc-header .spacer { flex: 1; }
.doc-header .hlink { color: var(--muted); font-weight: 500; font-size: 14px; }
.doc-header .hlink:hover { color: var(--wine); text-decoration: none; }
.doc-header .app-btn {
  background: var(--wine); color: #fff; padding: 8px 16px;
  border-radius: var(--radius-sm); font-size: 14px; font-weight: 600;
}
.doc-header .app-btn:hover { background: var(--wine-dark); text-decoration: none; }

.menu-toggle {
  display: none; border: 1px solid var(--line); background: #fff;
  width: 38px; height: 38px; border-radius: var(--radius-sm);
  cursor: pointer; align-items: center; justify-content: center;
}
.menu-toggle svg { width: 20px; height: 20px; }

/* ---------- Suche ---------- */
.doc-search { position: relative; }
.doc-search input {
  width: 220px; max-width: 40vw; height: 38px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  padding: 0 12px 0 34px; font: inherit; font-size: 14px; background: #fff;
}
.doc-search input:focus { outline: none; border-color: var(--wine); box-shadow: 0 0 0 3px var(--wine-tint); }
.doc-search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); }
.search-results {
  position: absolute; top: 46px; left: 0; right: 0; min-width: 320px;
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 12px 40px rgba(0,0,0,.12); max-height: 60vh; overflow-y: auto;
  display: none; padding: 6px;
}
.search-results.open { display: block; }
.search-results a { display: block; padding: 9px 12px; border-radius: var(--radius-sm); color: var(--ink); font-size: 14px; }
.search-results a:hover, .search-results a.active { background: var(--wine-tint); text-decoration: none; }
.search-results .sr-chapter { font-size: 12px; color: var(--muted); display: block; }
.search-results .sr-empty { padding: 12px; color: var(--muted); font-size: 14px; }

/* ---------- Layout ---------- */
.doc-shell { display: flex; align-items: flex-start; max-width: 1360px; margin: 0 auto; }

.doc-sidebar {
  position: sticky; top: var(--header-h);
  width: var(--sidebar-w); flex-shrink: 0;
  height: calc(100vh - var(--header-h));
  overflow-y: auto; padding: 24px 12px 60px 20px;
  border-right: 1px solid var(--line);
}
.doc-sidebar .nav-chapter { margin-bottom: 6px; }
.doc-sidebar .nav-chapter > .ch-title {
  display: flex; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--muted); padding: 10px 10px 6px;
}
.doc-sidebar .nav-chapter a {
  display: block; padding: 7px 10px; border-radius: var(--radius-sm);
  color: var(--pc-gray-700); font-size: 14px; line-height: 1.4;
}
.doc-sidebar .nav-chapter a:hover { background: var(--line-soft); text-decoration: none; color: var(--ink); }
.doc-sidebar .nav-chapter a.active { background: var(--wine-tint); color: var(--wine); font-weight: 600; }
.doc-sidebar .nav-top { display: block; padding: 8px 10px; border-radius: var(--radius-sm); font-weight: 600; color: var(--ink); margin-bottom: 2px; }
.doc-sidebar .nav-top:hover { background: var(--line-soft); text-decoration: none; }
.doc-sidebar .nav-top.active { background: var(--wine-tint); color: var(--wine); }

.doc-main { flex: 1; min-width: 0; padding: 40px 48px 96px; }

/* ---------- Startseite ---------- */
.hero {
  padding: 8px 0 40px; border-bottom: 1px solid var(--line-soft); margin-bottom: 40px;
}
.hero .eyebrow { color: var(--wine); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; font-size: 12px; }
.hero h1 { font-size: clamp(1.9rem, 4vw, 2.6rem); line-height: 1.15; margin: 12px 0 14px; letter-spacing: -.02em; }
.hero p { font-size: 1.125rem; color: var(--muted); max-width: 640px; margin: 0; }

.chapter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.chapter-card {
  border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; background: #fff;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.chapter-card:hover { border-color: var(--line-strong); box-shadow: 0 8px 30px rgba(0,0,0,.06); transform: translateY(-2px); }
.chapter-card .ci { font-size: 1.7rem; line-height: 1; }
.chapter-card h2 { font-size: 1.15rem; margin: 12px 0 6px; }
.chapter-card p { color: var(--muted); font-size: .95rem; margin: 0 0 14px; }
.chapter-card ul { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line-soft); }
.chapter-card ul li a { display: block; padding: 8px 0; font-size: .9rem; color: var(--pc-gray-700); border-bottom: 1px solid var(--line-soft); }
.chapter-card ul li:last-child a { border-bottom: none; }
.chapter-card ul li a:hover { color: var(--wine); text-decoration: none; }
.chapter-card .more { color: var(--muted); font-size: .85rem; padding-top: 8px; display: inline-block; }

/* ---------- Artikelseite ---------- */
.breadcrumbs { font-size: 13px; color: var(--muted); margin-bottom: 18px; }
.breadcrumbs a { color: var(--muted); }
.breadcrumbs a:hover { color: var(--wine); }
.breadcrumbs .sep { margin: 0 7px; color: var(--muted-light); }

.article-title { font-size: clamp(1.6rem, 3.2vw, 2.1rem); line-height: 1.2; margin: 0 0 28px; letter-spacing: -.01em; }

/* Uebernommene pc-* Artikelbausteine (aus landing-pages/unterseiten-styles.css) */
.pc-page { color: var(--ink); }
.pc-container { max-width: 820px; margin: 0; padding: 0 !important; }
.pc-page h2 { font-size: 1.4rem; margin: 40px 0 20px; letter-spacing: -.01em; }
.pc-page h3 { font-size: 1.1rem; margin: 24px 0 10px; }
.pc-page > p, .pc-container > p { font-size: 1.05rem; }

.pc-feature-list { list-style: none; display: flex; flex-direction: column; gap: 14px; margin: 0 0 32px; padding: 0; }
.pc-feature-list li { display: flex; align-items: flex-start; gap: 16px; padding: 18px 20px; background: var(--pc-gray-50); border-radius: var(--radius); }
.pc-feature-list-icon { width: 40px; height: 40px; background: var(--pc-white); border: 1px solid var(--pc-gray-200); border-radius: 10px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 1.25rem; }
.pc-feature-list-content h3 { font-size: 1rem; font-weight: 600; color: var(--pc-gray-900); margin: 0 0 4px; }
.pc-feature-list-content p { font-size: .9375rem; color: var(--pc-gray-500); margin: 0; line-height: 1.6; }

.pc-info-box { background: var(--wine-tint); border: 1px solid rgba(99,35,67,.16); border-radius: var(--radius); padding: 18px 22px; margin: 28px 0; }
.pc-info-box h4 { font-size: .9375rem; font-weight: 700; color: var(--wine); margin: 0 0 8px; }
.pc-info-box p { font-size: .9375rem; color: var(--pc-gray-700); margin: 0; }
.pc-info-box.pc-info-warning { background: #fef3c7; border-color: rgba(245,158,11,.3); }
.pc-info-box.pc-info-warning h4 { color: #b45309; }

.pc-steps { display: flex; flex-direction: column; gap: 22px; margin: 0 0 32px; }
.pc-step { display: flex; gap: 18px; align-items: flex-start; }
.pc-step-number { width: 34px; height: 34px; background: var(--wine); color: #fff; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: .875rem; font-weight: 700; flex-shrink: 0; }
.pc-step-content h3 { font-size: 1rem; font-weight: 600; color: var(--pc-gray-900); margin: 0 0 4px; }
.pc-step-content p { font-size: .9375rem; color: var(--pc-gray-500); margin: 0; }

/* Artikel-Fussnavigation */
.article-foot { margin-top: 56px; padding-top: 24px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--muted); }
.article-foot .updated { display: inline-flex; align-items: center; gap: 6px; }

/* ---------- Changelog ---------- */
.cl-section { margin-bottom: 48px; }
.cl-release { border: 1px solid var(--line); border-radius: var(--radius); padding: 4px 24px 20px; margin-bottom: 20px; }
.cl-release h2 { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.cl-release h2 .ver { font-size: 1.3rem; }
.cl-release h2 .date { font-size: .85rem; color: var(--muted); font-weight: 500; }
.cl-release h3 { font-size: 1rem; }
.cl-release table { width: 100%; border-collapse: collapse; margin: 16px 0; font-size: .9rem; display: block; overflow-x: auto; }
.cl-release th, .cl-release td { border: 1px solid var(--line); padding: 8px 12px; text-align: left; }
.cl-release th { background: var(--pc-gray-50); }
.cl-release ul { padding-left: 20px; }
.cl-release code { background: var(--pc-gray-50); padding: 1px 6px; border-radius: 5px; font-size: .85em; }

.feed-item { display: flex; gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line-soft); }
.feed-day { margin: 28px 0 6px; font-size: 13px; font-weight: 700; color: var(--muted); letter-spacing: .03em; }
.badge { flex-shrink: 0; align-self: flex-start; font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px; letter-spacing: .02em; }
.badge.feat { background: #eef6ee; color: #3d6b3d; }
.badge.fix { background: #fdeceb; color: #a3392f; }
.badge.perf { background: #eef2fb; color: #3a52a0; }
.badge.style { background: var(--wine-tint); color: var(--wine); }
.badge.revert { background: #f2efe9; color: #7a6a44; }
.badge.other { background: var(--pc-gray-50); color: var(--muted); }
.feed-body { min-width: 0; }
.feed-scope { font-weight: 600; }
.feed-hash { color: var(--muted-light); font-size: 12px; font-family: ui-monospace, monospace; }

.prose p { font-size: 1.05rem; }
.callout { background: var(--wine-tint); border: 1px solid rgba(99,35,67,.16); border-radius: var(--radius); padding: 18px 22px; margin: 24px 0; }
.callout h4 { margin: 0 0 6px; color: var(--wine); }
.callout p { margin: 0; font-size: .95rem; }

/* ---------- API-Platzhalter ---------- */
.soon-badge { display: inline-block; background: #fef3c7; color: #b45309; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 999px; letter-spacing: .03em; margin-bottom: 16px; }

/* ---------- Footer ---------- */
.doc-footer { border-top: 1px solid var(--line); padding: 28px 48px; color: var(--muted); font-size: 13px; display: flex; gap: 20px; flex-wrap: wrap; align-items: center; }
.doc-footer a { color: var(--muted); }
.doc-footer a:hover { color: var(--wine); }
.doc-footer .spacer { flex: 1; }

/* ---------- Backdrop fuer mobile Sidebar ---------- */
.sidebar-backdrop { display: none; position: fixed; inset: var(--header-h) 0 0 0; background: rgba(10,10,10,.35); z-index: 30; }
.sidebar-backdrop.open { display: block; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .menu-toggle { display: flex; }
  .doc-sidebar {
    position: fixed; top: var(--header-h); left: 0; z-index: 35;
    background: #fff; transform: translateX(-100%); transition: transform .2s ease;
    box-shadow: 0 12px 40px rgba(0,0,0,.12); width: 84vw; max-width: 340px;
  }
  .doc-sidebar.open { transform: translateX(0); }
  .doc-main { padding: 28px 20px 80px; }
  .doc-header .hlink.hide-sm { display: none; }
  .doc-search input { width: 150px; }
  .doc-footer { padding: 24px 20px; }
}
@media (max-width: 560px) {
  .doc-header .brand .sub { display: none; }
  .doc-search { display: none; }
}
