/* ---------- Reset & Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.65;
  color: #1f2433;
  background: #f7f8fb;
  -webkit-font-smoothing: antialiased;
}

:root {
  --c-text: #2b2b2b;
  --c-muted: #7c7c7c;
  --c-line: #e8e8e8;
  --c-line-strong: #cfcfcf;
  --c-bg: #ffffff;
  --c-bg-alt: #f9f9f9;
  --c-card: #ffffff;
  --c-accent: #15779b;
  --c-accent-dark: #11607d;
  --c-accent-soft: #eaf3f7;
  --c-accent-2: #11607d;
  --c-warn-bg: #fff8e6;
  --c-warn-border: #d9b35d;
  --c-success-bg: #f3faf5;
  --c-danger-bg: #fbf3f3;
  --r: 4px;
  --shadow: none;
}

a { color: var(--c-accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 28px; }

/* ---------- Header ---------- */
.site-header {
  background: #fff;
  border-bottom: 1px solid var(--c-line);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 22px;
  padding-bottom: 22px;
  gap: 24px;
}
.brand { display: flex; align-items: center; gap: 14px; }
.brand-mark {
  width: 4px;
  height: 38px;
  background: var(--c-accent);
}
.brand-title {
  font-weight: 700;
  font-size: 19px;
  line-height: 1.2;
  letter-spacing: -0.01em;
  color: #1a1a1a;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.brand-sub {
  color: var(--c-muted);
  font-size: 13px;
  margin-top: 2px;
  letter-spacing: 0.02em;
}
.meta { text-align: right; font-size: 13.5px; color: var(--c-muted); }
.meta-date { font-size: 12.5px; opacity: 0.85; }

/* ---------- Top Navigation (multi-page) ---------- */
.topnav {
  background: #fff;
  border-bottom: 1px solid var(--c-line);
  position: sticky;
  top: 0;
  z-index: 5;
}
.topnav .container {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
}
.topnav a {
  display: block;
  padding: 14px 18px;
  font-size: 14px;
  color: var(--c-text);
  letter-spacing: 0.01em;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  text-decoration: none;
}
.topnav a:hover {
  color: var(--c-accent);
  text-decoration: none;
}
.topnav a.active {
  color: var(--c-accent);
  border-bottom-color: var(--c-accent);
  font-weight: 600;
}
@media (max-width: 700px) {
  .topnav { position: static; }
  .topnav a { padding: 12px 12px; font-size: 13.5px; }
}

/* ---------- Page navigation (prev/next at end) ---------- */
.page-nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin: 30px 0 50px;
}
.page-nav a {
  display: block;
  padding: 18px 22px;
  border: 1px solid var(--c-line);
  background: #fff;
  color: var(--c-text);
  text-decoration: none;
  font-size: 14px;
  border-left: 3px solid transparent;
}
.page-nav a:hover {
  border-left-color: var(--c-accent);
  color: var(--c-accent);
  text-decoration: none;
}
.page-nav .label {
  display: block;
  font-size: 11.5px;
  color: var(--c-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 4px;
}
.page-nav .next { text-align: right; border-left: none; border-right: 3px solid transparent; }
.page-nav .next:hover { border-right-color: var(--c-accent); border-left: none; }
.page-nav .placeholder {
  visibility: hidden;
}
@media (max-width: 700px) {
  .page-nav { grid-template-columns: 1fr; }
  .page-nav .next { text-align: left; border-right: none; border-left: 3px solid transparent; }
  .page-nav .next:hover { border-left-color: var(--c-accent); border-right: none; }
}

/* ---------- Page hero (small intro per page) ---------- */
.page-hero {
  margin: 28px 0 0;
  padding: 28px 0 8px;
}
.page-hero .eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--c-accent);
  font-weight: 600;
  margin-bottom: 8px;
}
.page-hero h1 {
  font-size: 32px;
  margin: 0 0 10px;
  letter-spacing: -0.01em;
}
.page-hero p {
  font-size: 16.5px;
  color: #3a3a3a;
  max-width: 78ch;
}

/* ---------- Sections ---------- */
main section {
  background: var(--c-card);
  border: 1px solid var(--c-line);
  border-radius: var(--r);
  padding: 36px 44px;
  margin: 28px 0;
}
main section + section {
  margin-top: 0;
  border-top: none;
}
main section:nth-of-type(even) {
  background: var(--c-bg-alt);
}
@media (max-width: 700px) {
  main section { padding: 26px 22px; }
}

h1, h2, h3, h4 { color: #0f1729; line-height: 1.25; }
h1 { font-size: 34px; margin: 0 0 14px; letter-spacing: -0.01em; }
h2 {
  font-size: 24px;
  margin: 0 0 18px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--c-line);
}
h3 { font-size: 18px; margin: 22px 0 10px; }
h4 { font-size: 15.5px; margin: 14px 0 6px; color: #2d3656; }

p { margin: 0 0 12px; }
ul, ol { padding-left: 22px; margin: 8px 0 14px; }
li { margin: 4px 0; }
strong { color: #0f1729; }
em { font-style: italic; color: #2c3756; }
.muted { color: var(--c-muted); }
.muted.small { font-size: 13.5px; }

/* ---------- Hero ---------- */
.hero h1 { font-size: 38px; }
.hero .lead {
  font-size: 18px;
  line-height: 1.65;
  color: #2a3247;
  max-width: 78ch;
}
.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 24px;
}
.stat {
  background: #fff;
  border: 1px solid var(--c-line);
  border-left: 3px solid var(--c-accent);
  border-radius: 0;
  padding: 16px 18px;
}
.stat-value {
  font-size: 24px;
  font-weight: 700;
  color: #1a1a1a;
  letter-spacing: -0.01em;
}
.stat-label {
  font-size: 13px;
  color: var(--c-muted);
  margin-top: 4px;
}
@media (max-width: 800px) {
  .hero-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- Callouts ---------- */
.callout {
  background: #fff;
  border: 1px solid var(--c-line);
  border-left: 3px solid var(--c-accent);
  padding: 16px 20px;
  border-radius: 0;
  margin: 18px 0;
}
.callout.warn {
  background: var(--c-warn-bg);
  border-left-color: var(--c-warn-border);
}

/* ---------- Capabilities ---------- */
.capabilities {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 18px;
}
.capabilities article {
  position: relative;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: 0;
  padding: 20px 22px 22px;
}
.cap-num {
  display: inline-block;
  font-size: 12px;
  font-weight: 700;
  color: var(--c-accent);
  letter-spacing: 0.1em;
  margin-bottom: 6px;
}
.cap-num::before { content: "0"; }
.capabilities h3 { margin-top: 4px; }
.example {
  margin-top: 10px;
  background: #f3f5fb;
  border-radius: 6px;
  padding: 10px 12px;
  font-size: 13.5px;
  font-family: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, monospace;
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.ex-arrow { color: var(--c-accent); font-weight: 700; }
.ex-out { color: var(--c-accent-2); }
@media (max-width: 800px) { .capabilities { grid-template-columns: 1fr; } }

/* ---------- Modules ---------- */
.module {
  border: 1px solid var(--c-line);
  border-top: 3px solid var(--c-accent);
  border-radius: 0;
  padding: 22px 24px;
  margin: 22px 0;
  background: #fff;
}
.module-head {
  display: flex; align-items: center; gap: 10px;
  margin-bottom: 4px;
}
.module-head h3 { margin: 0; }
.badge {
  background: transparent;
  color: var(--c-accent);
  border: 1px solid var(--c-accent);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 0;
  font-weight: 600;
}
.lead-small { color: var(--c-muted); margin-bottom: 10px; }

.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
@media (max-width: 800px) { .grid-2 { grid-template-columns: 1fr; } }

/* ---------- Comparison ---------- */
.comparison {
  display: grid;
  gap: 14px;
  margin-top: 8px;
}
.case {
  border: 1px solid var(--c-line);
  border-radius: 0;
  padding: 18px 20px;
  background: #fff;
}
.case h4 { margin-top: 0; }
.case .before, .case .after {
  border-radius: 0;
  padding: 12px 14px;
  margin-top: 8px;
  border-left: 3px solid;
}
.case .before { background: var(--c-danger-bg); border-left-color: #c0392b; }
.case .after { background: var(--c-success-bg); border-left-color: var(--c-accent); }
.case-label {
  font-weight: 700;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-bottom: 4px;
  color: #2c3756;
}

/* ---------- Layers ---------- */
.layers {
  display: grid;
  gap: 10px;
  margin: 12px 0 18px;
}
.layer {
  display: flex; gap: 16px;
  border: 1px solid var(--c-line);
  border-radius: 0;
  padding: 18px 20px;
  background: #fff;
}
.layer-num {
  flex: 0 0 36px;
  height: 36px;
  border: 2px solid var(--c-accent);
  border-radius: 0;
  background: #fff;
  color: var(--c-accent);
  display: grid; place-items: center;
  font-weight: 700;
}
.layer h3 { margin: 0 0 6px; }

/* ---------- ASCII Architektur ---------- */
pre.ascii {
  background: #1a1a1a;
  color: #e8e8e8;
  padding: 18px 22px;
  border-radius: 0;
  overflow-x: auto;
  font-size: 13px;
  line-height: 1.55;
}

/* ---------- Tables ---------- */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0 18px;
  font-size: 14.5px;
}
thead th {
  text-align: left;
  background: #f1f3fb;
  color: #2c3756;
  border-bottom: 1px solid var(--c-line-strong);
  padding: 10px 12px;
  font-weight: 600;
  font-size: 13.5px;
}
tbody td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--c-line);
  vertical-align: top;
}
tbody tr:hover { background: #fafbfe; }
tr.sum td {
  background: var(--c-accent-soft);
  font-weight: 600;
  border-bottom: none;
}
table.roadmap td:nth-child(3),
table.roadmap td:nth-child(4) { white-space: nowrap; }

/* ---------- Questions ---------- */
.questions {
  counter-reset: q;
  list-style: none;
  padding-left: 0;
}
.questions li {
  counter-increment: q;
  padding: 10px 12px 10px 44px;
  position: relative;
  border-bottom: 1px dashed var(--c-line);
}
.questions li::before {
  content: counter(q);
  position: absolute;
  left: 12px; top: 10px;
  width: 22px; height: 22px;
  border-radius: 0;
  background: transparent;
  border: 1px solid var(--c-accent);
  color: var(--c-accent);
  font-size: 11.5px;
  display: grid; place-items: center;
  font-weight: 700;
}
.questions li:last-child { border-bottom: none; }

/* ---------- Glossary ---------- */
.glossary {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: 6px 24px;
  margin: 8px 0 0;
}
.glossary dt {
  font-weight: 700;
  color: #2c3756;
}
.glossary dd { margin: 0 0 6px; color: #344057; }

/* ---------- Footer ---------- */
.site-footer {
  margin: 30px 0 50px;
  text-align: center;
  color: var(--c-muted);
  font-size: 13px;
}

/* ---------- Overview cards (Start-Seite) ---------- */
.overview-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  margin-top: 8px;
}
.ov-card {
  display: block;
  padding: 22px 24px;
  background: #fff;
  border: 1px solid var(--c-line);
  border-left: 3px solid transparent;
  text-decoration: none;
  color: var(--c-text);
  transition: border-color 0.15s ease;
}
.ov-card:hover {
  border-left-color: var(--c-accent);
  text-decoration: none;
  color: var(--c-text);
}
.ov-card:hover h3 { color: var(--c-accent); }
.ov-eyebrow {
  display: block;
  font-size: 11.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--c-accent);
  font-weight: 600;
  margin-bottom: 6px;
}
.ov-card h3 {
  margin: 0 0 6px;
  font-size: 17px;
}
.ov-card p {
  margin: 0;
  color: #444;
  font-size: 14.5px;
  line-height: 1.55;
}
@media (max-width: 700px) {
  .overview-grid { grid-template-columns: 1fr; }
}

/* ---------- KI-Ideen (lange Beschreibungen) ---------- */
.idea-group {
  margin: 26px 0 14px;
}
.idea-group h3 {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--c-accent);
  border-bottom: 1px solid var(--c-line);
  padding-bottom: 6px;
  margin: 28px 0 10px;
}
.idea {
  background: #fff;
  border: 1px solid var(--c-line);
  border-left: 3px solid var(--c-accent);
  padding: 14px 20px 16px;
  margin: 10px 0;
}
.idea h4 {
  margin: 0 0 6px;
  font-size: 15.5px;
  color: #1a1a1a;
}
.idea p {
  margin: 0;
  color: #2f2f2f;
  font-size: 14.5px;
  line-height: 1.6;
}

/* ---------- Extension modules (Module-Seite) ---------- */
.extension-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin: 16px 0 8px;
}
.ext-group {
  background: #fff;
  border: 1px solid var(--c-line);
  border-top: 2px solid var(--c-accent);
  padding: 16px 20px 18px;
}
.ext-group h4 {
  margin: 0 0 8px;
  font-size: 14.5px;
  color: #1a1a1a;
  letter-spacing: 0.01em;
}
.ext-group ul {
  margin: 0;
  padding-left: 18px;
  font-size: 13.8px;
  line-height: 1.55;
}
.ext-group li {
  margin: 4px 0;
}
@media (max-width: 800px) {
  .extension-grid { grid-template-columns: 1fr; }
}

/* ---------- Site footer (multi-page) ---------- */
.site-footer {
  padding: 24px 28px 36px;
  margin: 24px auto 0;
  border-top: 1px solid var(--c-line);
  color: var(--c-muted);
  font-size: 13px;
  text-align: center;
}

/* ---------- Charts (inline SVG) ---------- */
.chart {
  margin: 18px 0 4px;
  padding: 14px 16px 12px;
  background: #fff;
  border: 1px solid var(--c-line);
  border-radius: 0;
}
.chart figcaption {
  font-size: 12.5px;
  color: var(--c-muted);
  margin: 0 0 8px;
  letter-spacing: 0.2px;
}
.chart-svg {
  width: 100%;
  height: auto;
  display: block;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
}
.chart-grid line {
  stroke: #e3e6ee;
  stroke-width: 0.5;
  stroke-dasharray: 2 3;
}
.chart-axis {
  stroke: #c9cdd9;
  stroke-width: 0.5;
}
.chart-label {
  fill: #5b6478;
  font-size: 10px;
}
.chart-label-strong {
  fill: #b91c1c;
  font-size: 10px;
  font-weight: 600;
}
.chart-area  { fill: rgba(21, 119, 155, 0.10); }
.chart-line {
  fill: none;
  stroke: #15779b;
  stroke-width: 2;
  stroke-linejoin: round;
  stroke-linecap: round;
}
.chart-marker      { fill: #b91c1c; }
.chart-marker-line { stroke: #b91c1c; stroke-width: 1; stroke-dasharray: 3 3; }
.chart-point       { fill: #15779b; }

/* Audit / horizontal bars */
.audit-label { fill: #2c3756; font-size: 11px; }
.audit-value { fill: #2c3756; font-size: 11px;
  font-family: ui-monospace, SFMono-Regular, "JetBrains Mono", Menlo, monospace; }
.bar-high { fill: #ef4444; }
.bar-med  { fill: #f59e0b; }
.bar-low  { fill: #fde68a; }

/* Score donut */
.score-num { font-size: 28px; font-weight: 700; fill: #15779b; }
.score-sub { font-size: 11px; fill: #5b6478; }

/* Legend */
.chart-legend {
  display: flex;
  gap: 16px;
  margin-top: 8px;
  font-size: 12px;
  color: var(--c-muted);
}
.chart-legend i {
  display: inline-block;
  width: 10px;
  height: 10px;
  margin-right: 6px;
  border-radius: 2px;
  vertical-align: -1px;
}
.chart-legend .lg-high { background: #ef4444; }
.chart-legend .lg-med  { background: #f59e0b; }
.chart-legend .lg-low  { background: #fde68a; }

/* ---------- Print ---------- */
@media print {
  body { background: #fff; font-size: 11.5pt; }
  .toc, .site-header .meta { display: none; }
  main section {
    box-shadow: none;
    border: none;
    border-radius: 0;
    padding: 14px 0;
    margin: 0;
    page-break-inside: avoid;
  }
  h2 { page-break-after: avoid; }
  .module, .case, .layer, .capabilities article {
    page-break-inside: avoid;
    box-shadow: none;
  }
  pre.ascii { background: #fff; color: #000; }
  a { color: #000; text-decoration: none; }
}
