/* Decision System docs site — thin layout glue on top of the real brand.
   Everything visual (hero, steps, feature-grid, callout, buttons, docnav, footer)
   comes from the brand's tokens + components.css. This file only adds the
   section rhythm + a lede style the editorial pages need. Keep it minimal:
   if a rule belongs to the brand, it goes in the brand, not here. */

.docs-section {
  padding: clamp(40px, 7vw, 80px) 0;
}

/* Alternating band to separate adjacent light sections. */
.docs-section--alt {
  background: var(--bg-card, #fff);
  border-top: 1px solid var(--border-divider, rgba(0, 0, 0, .08));
  border-bottom: 1px solid var(--border-divider, rgba(0, 0, 0, .08));
}

/* Section intro paragraph — wider measure than body, slightly muted. */
.docs-lede {
  max-width: 60ch;
  color: var(--fg-2, #444);
  font-size: 1.125rem;
  line-height: 1.6;
  margin: 0 0 clamp(20px, 3vw, 36px);
}

.docs-section h2 {
  margin: 0 0 12px;
}

/* ── Generated field reference (referenz) ─────────────────────────────────── */
.ref-schema {
  padding: clamp(28px, 4vw, 48px) 0;
  border-top: 1px solid var(--border-divider, rgba(0, 0, 0, .08));
}
.ref-schema:first-of-type { border-top: 0; }

.ref-table {
  width: 100%;
  font-size: 0.9rem;
}
.ref-table th { text-align: left; white-space: nowrap; }
.ref-table td { vertical-align: top; }

.ref-field code {
  display: inline-block;
  font-size: 0.85rem;
  color: var(--fg-1, #1e1c1a);
  font-weight: 600;
}
.ref-type {
  font-family: var(--font-mono, monospace);
  font-size: 0.72rem;
  white-space: nowrap;
}
.ref-req {
  font-size: 0.62rem;
  letter-spacing: .04em;
  vertical-align: middle;
}
.ref-enum {
  margin-top: 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
}
.ref-enum code {
  font-size: 0.74rem;
  background: var(--bg-card, #f5f1ea);
  border: 1px solid var(--border-divider, rgba(0, 0, 0, .1));
  border-radius: var(--radius-sm, 4px);
  padding: 1px 6px;
}
.ref-ext-name {
  margin: 28px 0 4px;
  text-transform: capitalize;
}
.ref-ext-file { color: var(--fg-2, #444); font-size: 0.92rem; margin: 0 0 10px; }
.ref-source { font-size: 0.8rem; color: var(--fg-3, #777); margin: 4px 0 0; }
.ref-source code { font-size: 0.78rem; }

/* ── Rendered doctrine prose (methodik) ───────────────────────────────────── */
.md-title { margin: 6px 0 4px; }
.md-foot { margin-top: 44px; padding-top: 20px; border-top: 1px solid var(--border-divider, rgba(0,0,0,.08)); }

.md-content {
  max-width: 72ch;
  font-size: 1rem;
  line-height: 1.7;
  color: var(--fg-1, #1e1c1a);
}
.md-content > :first-child { margin-top: 0; }
.md-content h2 {
  font-family: var(--font-headline, "Space Grotesk", sans-serif);
  font-size: 1.5rem;
  margin: 2em 0 .5em;
  padding-top: .6em;
  border-top: 1px solid var(--border-divider, rgba(0,0,0,.08));
}
.md-content h3 { font-size: 1.18rem; margin: 1.6em 0 .4em; }
.md-content h4 { font-size: 1.02rem; margin: 1.4em 0 .3em; }
.md-content p,
.md-content ul,
.md-content ol { margin: 0 0 1em; }
.md-content ul,
.md-content ol { padding-left: 1.4em; }
.md-content li { margin: .3em 0; }
.md-content a { color: var(--color-terracotta, #c5603a); }
.md-content strong { font-weight: 650; }

.md-content code {
  font-family: var(--font-mono, monospace);
  font-size: 0.85em;
  background: var(--bg-card, #f5f1ea);
  border: 1px solid var(--border-divider, rgba(0,0,0,.08));
  border-radius: var(--radius-sm, 4px);
  padding: 1px 5px;
}
.md-content pre {
  background: var(--bg-dark, #1e1c1a);
  color: #f5f1ea;
  border-radius: var(--radius-card, 10px);
  padding: 16px 18px;
  overflow-x: auto;
  font-size: 0.85rem;
  line-height: 1.55;
  margin: 0 0 1.2em;
}
.md-content pre code { background: none; border: 0; padding: 0; color: inherit; font-size: inherit; }

.md-content blockquote {
  margin: 0 0 1.2em;
  padding: 4px 0 4px 18px;
  border-left: 3px solid var(--color-terracotta, #c5603a);
  color: var(--fg-2, #444);
}
.md-content hr { border: 0; border-top: 1px solid var(--border-divider, rgba(0,0,0,.1)); margin: 2em 0; }

.md-content table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
  margin: 0 0 1.4em;
}
.md-content th,
.md-content td {
  text-align: left;
  vertical-align: top;
  padding: 8px 12px;
  border-bottom: 1px solid var(--border-divider, rgba(0,0,0,.08));
}
.md-content thead th {
  border-bottom: 2px solid var(--border-divider, rgba(0,0,0,.16));
  font-family: var(--font-ui, "Manrope", sans-serif);
}

/* ── Worked example (beispiel) ────────────────────────────────────────────── */
/* Per-phase provenance line: data location · method link · live link. */
.ex-meta {
  margin: 20px 0 0;
  font-size: 0.86rem;
  color: var(--fg-2, #444);
  line-height: 1.9;
}
.ex-meta code { font-size: 0.82em; }
.ex-meta .pill { margin-right: 4px; }

/* Inline criterion / solution descriptions inside the example tables. */
.ex-desc {
  display: inline-block;
  margin-top: 3px;
  font-size: 0.86rem;
  color: var(--fg-2, #555);
  line-height: 1.45;
}
.ex-crit td:first-child,
.ex-sols td:first-child { max-width: 38ch; }

/* Axis-tinted pills reuse the brand pill; only the hue is local. */
.ex-axis-fit {
  background: color-mix(in srgb, var(--color-terracotta, #c5603a) 12%, transparent);
  border-color: color-mix(in srgb, var(--color-terracotta, #c5603a) 30%, transparent);
}
.ex-axis-risk {
  background: color-mix(in srgb, var(--fg-1, #1e1c1a) 8%, transparent);
}

/* Eliminated (gate-failed) solution row reads as struck-through / dimmed. */
.ex-sols tr.is-eliminated { opacity: 0.6; }
.ex-sols tr.is-eliminated td:first-child strong { text-decoration: line-through; }
.ex-gate-fail {
  background: color-mix(in srgb, var(--color-terracotta, #c5603a) 16%, transparent);
}
