/* ==========================================================================
   install.de – Design-System
   Lokal gehostet (keine externen Fonts/Dienste, passend zur Datenschutzseite)
   ========================================================================== */

:root {
  --bg: #f8fafc;
  --surface: #ffffff;
  --surface-2: #f1f5f9;
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --primary: #4f46e5;
  --primary-2: #6d28d9;
  --primary-ink: #ffffff;
  --accent: #8b5cf6;
  --success: #16a34a;
  --danger: #dc2626;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .06), 0 8px 24px -12px rgba(15, 23, 42, .14);
  --shadow-lg: 0 24px 48px -20px rgba(79, 70, 229, .35);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

.container {
  width: 100%;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 20px;
}

.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;
}

.text-muted { color: var(--muted); }
.small { font-size: .875rem; }
.center { text-align: center; margin-top: 24px; }

/* ---------------------------------------------------------------- Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  font-weight: 800;
  color: var(--ink);
}
.logo:hover { text-decoration: none; }

.logo-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-weight: 900;
  box-shadow: var(--shadow-lg);
}

.logo-text b { color: var(--primary); }

.site-nav { display: flex; gap: 6px; align-items: center; }
.site-nav a {
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--ink-2);
  font-weight: 600;
  font-size: .95rem;
}
.site-nav a:hover { background: var(--surface-2); color: var(--ink); text-decoration: none; }
.site-nav a[aria-current="page"] { background: var(--primary); color: #fff; }

/* Mobiles Menü ohne JavaScript: versteckte Checkbox + Label (Hack, progressive enhancement) */
.nav-check { position: absolute; opacity: 0; pointer-events: none; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: 0;
  padding: 10px;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2.5px;
  border-radius: 2px;
  background: var(--ink);
  transition: transform .2s;
}

/* ---------------------------------------------------------------- Hero */
.hero {
  background:
    radial-gradient(900px 420px at 80% -10%, rgba(139, 92, 246, .25), transparent 60%),
    radial-gradient(700px 380px at 10% -20%, rgba(79, 70, 229, .22), transparent 60%),
    linear-gradient(180deg, #eef2ff, var(--bg));
  padding: 64px 0 48px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(1.9rem, 4.2vw, 3rem);
  line-height: 1.15;
  letter-spacing: -.02em;
  max-width: 820px;
  margin: 0 auto 14px;
}
.gradient-text {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .lead { max-width: 720px; margin: 0 auto 26px; font-size: 1.1rem; }

.hero-search form {
  display: flex;
  gap: 10px;
  max-width: 620px;
  margin: 0 auto;
}
.hero-search input {
  flex: 1;
  padding: 14px 18px;
  font-size: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  box-shadow: var(--shadow);
}
.hero-search input:focus { outline: 3px solid rgba(79, 70, 229, .2); border-color: var(--primary); }

.hero-facts {
  display: flex;
  justify-content: center;
  gap: 28px;
  flex-wrap: wrap;
  margin: 26px 0 0;
  color: var(--muted);
  font-size: .95rem;
}
.hero-facts strong { color: var(--ink); }

/* ---------------------------------------------------------------- Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-weight: 700;
  font-size: .95rem;
  cursor: pointer;
  transition: transform .12s, box-shadow .2s;
  text-decoration: none;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-2));
  color: #fff;
  box-shadow: 0 8px 20px -8px rgba(79, 70, 229, .6);
}
.btn-primary:hover { box-shadow: 0 12px 26px -8px rgba(79, 70, 229, .7); }
.btn-ghost {
  background: var(--surface);
  color: var(--primary);
  border-color: var(--line);
}
.btn-ghost:hover { border-color: var(--primary); }
.btn-lg { padding: 15px 28px; font-size: 1.05rem; border-radius: 14px; }

/* ---------------------------------------------------------------- Layout */
.section { padding: 40px 0; }

.section-title {
  font-size: 1.45rem;
  letter-spacing: -.01em;
  margin: 0 0 20px;
  display: flex;
  align-items: baseline;
  gap: 8px;
  flex-wrap: wrap;
}
.section-title::before {
  content: "";
  width: 5px;
  height: 22px;
  border-radius: 3px;
  background: linear-gradient(180deg, var(--primary), var(--accent));
  align-self: center;
}

.page-head {
  padding: 32px 0 8px;
}
.page-head h1 { margin: 0 0 8px; font-size: clamp(1.6rem, 3.4vw, 2.3rem); letter-spacing: -.02em; }
.page-head .lead { margin: 0; color: var(--ink-2); font-size: 1.05rem; max-width: 760px; }
.page-404 { min-height: 55vh; }
.page-404 code { background: var(--surface-2); padding: 2px 8px; border-radius: 6px; font-size: .9em; word-break: break-all; }

.lead { font-size: 1.1rem; }

.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.two-col p { color: var(--ink-2); }

.intro-seo p { color: var(--ink-2); }

.breadcrumb { font-size: .9rem; color: var(--muted); padding: 14px 0 4px; }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumb li + li::before { content: "›"; margin-right: 6px; color: var(--line); }
.breadcrumb a { color: var(--muted); }
.breadcrumb a:hover { color: var(--primary); }

/* ---------------------------------------------------------------- Cards */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 20px;
}

.tool-card { background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--line); transition: transform .15s, box-shadow .2s, border-color .2s; }
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: rgba(79, 70, 229, .4); }

.tool-card-link { display: flex; gap: 14px; padding: 18px; color: inherit; text-decoration: none; }
.tool-card-link:hover { text-decoration: none; }

.tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  min-width: 46px;
  font-size: 1.5rem;
  background: var(--surface-2);
  border-radius: 12px;
}
.tool-icon-lg { width: 64px; height: 64px; min-width: 64px; font-size: 2.1rem; border-radius: 16px; }

.tool-card-body { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.tool-card-title { font-weight: 800; font-size: 1.02rem; color: var(--ink); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.tool-card-short { font-size: .9rem; color: var(--muted); }
.tool-card-meta { margin-top: 4px; }

.badge-ver {
  font-size: .7rem;
  font-weight: 700;
  color: var(--primary);
  background: #eef2ff;
  border: 1px solid #c7d2fe;
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}

.tag {
  display: inline-block;
  font-size: .78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  background: #eef2ff;
  color: var(--primary);
  margin-right: 6px;
}
.tag-lite { background: var(--surface-2); color: var(--muted); font-weight: 600; }
.tag-link { text-decoration: none; }
.tag-link:hover { background: var(--primary); color: #fff; }
.tag-list { display: flex; flex-wrap: wrap; gap: 8px; }
.tag-list .tag { margin: 0; }

/* Kategorien */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.cat-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  color: var(--ink);
  box-shadow: var(--shadow);
  transition: transform .15s, box-shadow .2s, border-color .2s;
}
.cat-card:hover { text-decoration: none; transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: rgba(79, 70, 229, .4); }
.cat-icon { font-size: 1.9rem; }
.cat-icon-lg { font-size: 2.4rem; display: inline-flex; align-items: center; justify-content: center; width: 76px; height: 76px; background: var(--surface-2); border-radius: 18px; margin-bottom: 8px; }
.cat-name { font-weight: 800; font-size: 1.05rem; }
.cat-desc { font-size: .85rem; color: var(--muted); }
.cat-count { font-size: .8rem; color: var(--primary); font-weight: 700; }

/* ---------------------------------------------------------------- Tool-Seite */
.tool-page { padding-bottom: 60px; }

.tool-head { display: flex; gap: 22px; align-items: flex-start; padding-top: 20px; }

.meta-row { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 14px; color: var(--ink-2); font-size: .92rem; }
.meta-row span { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; box-shadow: var(--shadow); }

.dl-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  background: linear-gradient(135deg, #eef2ff, #faf5ff);
  border: 1px solid #c7d2fe;
  border-radius: var(--radius);
  padding: 26px;
  margin: 22px 0;
  box-shadow: var(--shadow-lg);
}
.dl-text { margin: 0; color: var(--ink-2); flex: 1; min-width: 240px; }

.prose p, .prose ul, .prose ol, .prose h2, .prose h3 { color: var(--ink-2); }
.prose h1, .prose h2, .prose h3 { color: var(--ink); }
.prose li { margin-bottom: 8px; }

.features ul, .features ol { columns: 2; column-gap: 40px; list-style: none; padding: 0; margin: 0; }
.features li {
  break-inside: avoid;
  padding: 10px 14px 10px 38px;
  margin-bottom: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  position: relative;
  color: var(--ink-2);
}
.features li::before {
  content: "✓";
  position: absolute;
  left: 12px;
  top: 10px;
  color: var(--success);
  font-weight: 900;
}

.steps-list { list-style: none; counter-reset: step; margin: 0; padding: 0; display: grid; gap: 12px; }
.steps-list li {
  counter-increment: step;
  position: relative;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 16px 18px 16px 56px;
  color: var(--ink-2);
  box-shadow: var(--shadow);
}
.steps-list li::before {
  content: counter(step);
  position: absolute;
  left: 14px;
  top: 14px;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--primary), var(--accent));
  color: #fff;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
}

.variant-block {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--primary);
  border-radius: var(--radius-sm);
  padding: 16px 20px;
  margin-bottom: 14px;
}
.variant-block h3 { margin: 0 0 6px; font-size: 1.02rem; }
.variant-block p { margin: 0; color: var(--muted); }

.recent-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.recent-list a { font-weight: 600; }

/* ---------------------------------------------------------------- FAQ */
.faq { display: grid; gap: 10px; }
.faq-item {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.faq-item summary {
  cursor: pointer;
  padding: 16px 20px;
  font-weight: 700;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 1.4rem; color: var(--primary); font-weight: 700; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin: 0; padding: 0 20px 16px; color: var(--ink-2); }

/* ---------------------------------------------------------------- Alle Programme */
.search-filter, .search-form { margin: 20px 0; }
.search-filter form, .search-form { display: flex; gap: 10px; max-width: 560px; }
.search-filter input, .search-form input {
  flex: 1;
  padding: 12px 16px;
  font-size: 1rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
.search-filter input:focus, .search-form input:focus { outline: 3px solid rgba(79, 70, 229, .2); border-color: var(--primary); }

.alle-index h2 { scroll-margin-top: 90px; }
.alle-list { list-style: none; margin: 0 0 26px; padding: 0; columns: 2; column-gap: 36px; }
.alle-list li {
  break-inside: avoid;
  padding: 9px 0;
  border-bottom: 1px dashed var(--line);
}
.alle-list a { font-weight: 600; }
.alle-list .is-hidden { display: none; }
.alle-list .is-muted { opacity: .35; }

/* ---------------------------------------------------------------- Render-Performance */
/* Unterhalb des Folds liegende Abschnitte erst bei Annäherung rendern (Browser-Support wird progressiv verbessert) */
.tool-page .features, .tool-page .steps, .tool-page .variants,
.tool-page .related, .tool-page .faq, .two-col, .intro-seo, .alle-index, #neu {
  content-visibility: auto;
  contain-intrinsic-size: auto 180px;
}

/* ---------------------------------------------------------------- Tabelle */
.table { width: 100%; border-collapse: collapse; background: var(--surface); border-radius: var(--radius-sm); overflow: hidden; box-shadow: var(--shadow); }
.table th, .table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: .92rem; }
.table th { background: var(--surface-2); font-weight: 800; color: var(--ink-2); }
.table tbody tr:hover { background: #f8fafc; }
.table-wrap { overflow-x: auto; }

/* ---------------------------------------------------------------- Footer */
.site-footer {
  background: #0f172a;
  color: #cbd5e1;
  margin-top: 40px;
  padding: 56px 0 28px;
  font-size: .92rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 36px;
  margin-bottom: 36px;
}
.footer-col { display: flex; flex-direction: column; gap: 9px; }
.footer-col a { color: #cbd5e1; }
.footer-col a:hover { color: #fff; }
.footer-about p { margin: 0 0 10px; }
.footer-logo { color: #fff !important; font-size: 1.2rem; font-weight: 800; }
.footer-heading { color: #fff; font-size: .95rem; margin: 0 0 6px; }
.footer-bottom { border-top: 1px solid #1e293b; padding-top: 22px; color: #94a3b8; font-size: .85rem; }

/* ---------------------------------------------------------------- Responsive */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .two-col { grid-template-columns: 1fr; gap: 20px; }
}

@media (max-width: 720px) {
  .site-nav {
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    flex-direction: column;
    align-items: stretch;
    padding: 12px 20px 20px;
    border-bottom: 1px solid var(--line);
    display: none;
    box-shadow: var(--shadow-lg);
  }
  .nav-check:checked ~ .site-nav { display: flex; }
  .nav-check:checked ~ .nav-toggle span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .nav-check:checked ~ .nav-toggle span:nth-child(2) { opacity: 0; }
  .nav-check:checked ~ .nav-toggle span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
  .site-nav a { padding: 12px 14px; border-radius: 10px; }
  .nav-toggle { display: flex; }
  .features ul, .features ol { columns: 1; }
  .alle-list { columns: 1; }
  .tool-head { flex-direction: column; }
  .dl-card { padding: 20px; }
  .hero { padding: 44px 0 36px; }
  .grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 440px) {
  .cat-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-facts { flex-direction: column; gap: 6px; }
}
