/* FREIHEITSPILOT — Long-Form / Ratgeber (Pillar-Pages)
   Editorial-System fuer SEO-Ratgeber. Nutzt ausschliesslich Tokens aus tokens.css
   und Surfaces/Utilities aus main.css + sections.css (.faq, .disclaimer wiederverwendet).
   Kein neues Farb-Vokabular — alle Farben via var(). */

/* ---------- Article-Hero (kompakter Content-Hero) ---------- */
.article-hero {
  position: relative;
  padding-block: clamp(7.5rem, 6rem + 6vw, 11rem) clamp(3rem, 2rem + 4vw, 5rem);
  overflow: clip;
  isolation: isolate;
}
.article-hero__inner { max-width: 62rem; }
.article-hero .eyebrow { margin-bottom: 1.3rem; }
.article-hero h1.display {
  font-size: var(--text-h2);
  max-width: 20ch;
  margin-bottom: 1.4rem;
}
.article-hero .lead { max-width: 60ch; }

/* Meta-Zeile (Lesezeit / Update-Datum) */
.article-meta {
  margin-top: 2rem;
  display: flex; flex-wrap: wrap; align-items: center;
  gap: 0.75rem 1.5rem;
  font-family: var(--font-mono);
  font-size: var(--text-small);
  color: var(--paper-muted);
  padding-top: 1.5rem;
  border-top: 1px solid var(--line-dark-soft);
}
.surface-cream .article-meta, .surface-sand .article-meta {
  color: var(--ink-muted); border-top-color: var(--line-light);
}
.article-meta > span { display: inline-flex; align-items: center; gap: 0.55rem; }
.article-meta svg { width: 16px; height: 16px; flex: none; color: var(--gold-400); }
.surface-cream .article-meta svg, .surface-sand .article-meta svg { color: var(--gold-500); }
.article-meta time { font-variant-numeric: tabular-nums; }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: 0.06em;
  color: var(--paper-faint);
  margin-bottom: 1.6rem;
}
.surface-cream .breadcrumb, .surface-sand .breadcrumb { color: var(--ink-muted); }
.breadcrumb a { color: inherit; transition: color var(--dur-fast) var(--ease-out); }
.breadcrumb a:hover { color: var(--gold-400); }
.surface-cream .breadcrumb a:hover, .surface-sand .breadcrumb a:hover { color: var(--gold-500); }
.breadcrumb a:focus-visible { outline-offset: 2px; }
.breadcrumb [aria-current="page"] { color: var(--paper-muted); }
.surface-cream .breadcrumb [aria-current="page"] { color: var(--ink); }
.breadcrumb__sep { opacity: 0.55; }

/* ---------- Layout: Prosa + optionale sticky Sidebar-TOC ---------- */
.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2.5rem, 5vw, 4.5rem);
  align-items: start;
}
@media (min-width: 1024px) {
  .article-layout--toc {
    grid-template-columns: minmax(0, 1fr) minmax(220px, 260px);
  }
}

/* ---------- Prosa-Container (.article) ---------- */
.article {
  max-width: 72ch;
  font-size: var(--text-base);
  line-height: 1.8;
}
.article > * + * { margin-top: 1.35em; }
.article > h2 + *, .article > h3 + * { margin-top: 0.85em; }

.surface-cream .article, .surface-sand .article { color: var(--ink); }

.article h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: var(--text-h3);
  line-height: 1.18;
  letter-spacing: -0.01em;
  margin-top: 2.4em;
  scroll-margin-top: 6rem;
}
.article h3 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(1.15rem, 1.05rem + 0.5vw, 1.45rem);
  line-height: 1.25;
  margin-top: 1.9em;
  scroll-margin-top: 6rem;
}
.article h2 + h3 { margin-top: 0.9em; }

/* Gold-unterstrichene Links */
.article a:not(.btn) {
  color: inherit;
  background-image: linear-gradient(var(--gold-400), var(--gold-400));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 100% 1px;
  padding-bottom: 1px;
  transition: background-size var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.article a:not(.btn):hover {
  color: var(--gold-400);
  background-size: 100% 2px;
}
.surface-cream .article a:not(.btn):hover, .surface-sand .article a:not(.btn):hover { color: var(--gold-500); }

.article strong { font-weight: 600; color: inherit; }
.article em { font-style: italic; }
.article ul, .article ol { padding-left: 1.4rem; display: grid; gap: 0.6rem; }
.article ul { list-style: disc; }
.article ol { list-style: decimal; }
.article li { padding-left: 0.35rem; }
.article li::marker { color: var(--gold-400); }
.surface-cream .article li::marker, .surface-sand .article li::marker { color: var(--gold-500); }
.article blockquote {
  margin-inline: 0;
  padding-left: 1.4rem;
  border-left: 2px solid var(--gold-400);
  font-family: var(--font-display);
  font-style: italic;
  color: inherit;
}
.article hr { border: none; height: 1px; background: var(--line-dark-soft); margin-block: 2em; }
.surface-cream .article hr, .surface-sand .article hr { background: var(--line-light); }
.article code {
  font-family: var(--font-mono);
  font-size: 0.9em;
  padding: 0.12em 0.4em;
  border-radius: var(--radius-sm);
  background: rgba(233, 196, 106, 0.1);
}

/* ---------- Inhaltsverzeichnis (.toc) ---------- */
.toc {
  font-size: var(--text-small);
}
@media (min-width: 1024px) {
  .toc--sticky { position: sticky; top: 6rem; }
}
.toc__title {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--paper-faint);
  margin-bottom: 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line-dark-soft);
}
.surface-cream .toc__title, .surface-sand .toc__title {
  color: var(--ink-muted); border-bottom-color: var(--line-light);
}
.toc ol { list-style: none; counter-reset: toc; display: grid; gap: 0.15rem; }
.toc li { counter-increment: toc; }
.toc a {
  display: flex; gap: 0.7rem; align-items: baseline;
  padding: 0.5rem 0.6rem 0.5rem 0;
  color: var(--paper-muted);
  line-height: 1.45;
  border-radius: var(--radius-sm);
  transition: color var(--dur-fast) var(--ease-out), padding-left var(--dur-fast) var(--ease-out);
}
.surface-cream .toc a, .surface-sand .toc a { color: var(--ink-muted); }
.toc a::before {
  content: counter(toc, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--gold-400);
  flex: none;
}
.surface-cream .toc a::before, .surface-sand .toc a::before { color: var(--gold-500); }
.toc a:hover { color: var(--gold-400); padding-left: 0.4rem; }
.surface-cream .toc a:hover, .surface-sand .toc a:hover { color: var(--gold-500); }
.toc a[aria-current="true"] { color: var(--gold-300); }

/* Mobil: TOC als aufklappbarer Block oben */
.toc--collapsible {
  border: 1px solid var(--line-dark-soft);
  border-radius: var(--radius-md);
  padding: 0.4rem 1.2rem;
  margin-bottom: 2.5rem;
}
.surface-cream .toc--collapsible, .surface-sand .toc--collapsible { border-color: var(--line-light); }
.toc--collapsible > summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding-block: 1rem;
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-400);
}
.surface-cream .toc--collapsible > summary, .surface-sand .toc--collapsible > summary { color: var(--gold-500); }
.toc--collapsible > summary::-webkit-details-marker { display: none; }
.toc--collapsible > summary::after {
  content: ''; flex: none; width: 10px; height: 10px;
  border-right: 2px solid currentColor; border-bottom: 2px solid currentColor;
  transform: rotate(45deg); transition: transform var(--dur-med) var(--ease-out);
}
.toc--collapsible[open] > summary::after { transform: rotate(-135deg); }
.toc--collapsible .toc__title { display: none; }
.toc--collapsible > ol { padding-bottom: 1rem; }
@media (min-width: 1024px) {
  .toc--collapsible { display: none; }
}

/* ---------- Key-Facts / Callout ---------- */
.key-facts, .callout {
  position: relative;
  padding: clamp(1.4rem, 3vw, 1.9rem) clamp(1.5rem, 3.5vw, 2rem);
  border-radius: var(--radius-md);
  border: 1px solid var(--line-dark);
  background: rgba(233, 196, 106, 0.05);
  margin-block: 2em;
}
.surface-cream .key-facts, .surface-cream .callout,
.surface-sand .key-facts, .surface-sand .callout {
  border-color: rgba(212, 168, 67, 0.28);
  background: rgba(233, 196, 106, 0.08);
  box-shadow: var(--shadow-soft);
}
.key-facts::before, .callout::before {
  content: ''; position: absolute; inset: 0 auto 0 0; width: 3px;
  border-radius: var(--radius-md) 0 0 var(--radius-md);
  background: linear-gradient(180deg, var(--gold-300), var(--gold-500));
}
.key-facts__head, .callout__head {
  display: flex; align-items: center; gap: 0.7rem;
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-400);
  margin-bottom: 1rem;
}
.surface-cream .key-facts__head, .surface-cream .callout__head,
.surface-sand .key-facts__head, .surface-sand .callout__head { color: var(--gold-500); }
.key-facts__head svg, .callout__head svg { width: 18px; height: 18px; flex: none; }

.key-facts ul { list-style: none; padding-left: 0; display: grid; gap: 0.85rem; margin: 0; }
.key-facts li { display: grid; grid-template-columns: auto 1fr; gap: 0.8rem; padding-left: 0; align-items: start; }
.key-facts li::before {
  content: ''; width: 19px; height: 19px; margin-top: 0.15rem; flex: none;
  background: var(--gold-400);
  --check: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6L9 17l-5-5'/%3E%3C/svg%3E") center / contain no-repeat;
  -webkit-mask: var(--check); mask: var(--check);
}
.key-facts li::marker { content: none; }

.callout p:first-of-type { margin-top: 0; }
.callout--warn::before { background: linear-gradient(180deg, var(--red), #8f3a32); }
.callout--warn .callout__head { color: var(--red); }

/* ---------- Pull-Quote ---------- */
.pull-quote {
  margin-block: 2.5em;
  padding: 0;
  border: none;
  text-align: left;
}
.pull-quote blockquote {
  border: none; padding: 0; margin: 0;
  font-family: var(--font-display);
  font-style: normal;
  font-weight: 600;
  font-size: clamp(1.5rem, 1.2rem + 1.6vw, 2.3rem);
  line-height: 1.3;
  letter-spacing: -0.01em;
  color: inherit;
}
.pull-quote blockquote::before {
  content: '\201E';
  display: block;
  font-size: 2.4em;
  line-height: 0.4;
  margin-bottom: 0.35em;
  color: var(--gold-400);
}
.surface-cream .pull-quote blockquote::before, .surface-sand .pull-quote blockquote::before { color: var(--gold-500); }
.pull-quote cite {
  display: block; margin-top: 1.2rem;
  font-family: var(--font-mono); font-style: normal;
  font-size: var(--text-small);
  letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--paper-muted);
}
.surface-cream .pull-quote cite, .surface-sand .pull-quote cite { color: var(--ink-muted); }

/* ---------- CTA-Band (Mid/End) — hell + dunkel ---------- */
.cta-band {
  display: grid; grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(1.4rem, 3vw, 2.5rem);
  align-items: center;
  padding: clamp(1.75rem, 4vw, 2.75rem);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-dark);
  background:
    radial-gradient(620px 260px at 90% 0%, rgba(233, 196, 106, 0.12), transparent 60%),
    var(--navy-800);
  color: var(--paper);
  box-shadow: var(--shadow-deep);
  margin-block: 2.5em;
}
.cta-band__eyebrow {
  font-family: var(--font-mono);
  font-size: var(--text-label);
  letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--gold-300);
  margin-bottom: 0.7rem;
}
.cta-band h2, .cta-band h3 {
  font-family: var(--font-display); font-weight: 600;
  font-size: clamp(1.35rem, 1.1rem + 1vw, 2rem);
  line-height: 1.15; letter-spacing: -0.01em;
  scroll-margin-top: 6rem;
}
.cta-band p { margin-top: 0.7rem; color: var(--paper-muted); max-width: 48ch; }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: 0.9rem; }
.surface-cream .cta-band, .surface-sand .cta-band {
  border-color: rgba(212, 168, 67, 0.3);
}

/* ---------- Related (Pillar-Karten am Seitenende) ---------- */
.related__head { margin-bottom: clamp(1.6rem, 3vw, 2.4rem); }
.related__head h2 { font-family: var(--font-display); font-weight: 600; font-size: var(--text-h3); }
.related__grid {
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem;
}
.related-card {
  position: relative; overflow: hidden;
  display: flex; flex-direction: column; gap: 0.6rem;
  padding: clamp(1.4rem, 3vw, 1.9rem);
  border-radius: var(--radius-lg);
  border: 1px solid var(--line-dark-soft);
  background: rgba(17, 29, 53, 0.4);
  color: var(--paper);
  transition: transform var(--dur-med) var(--ease-out), border-color var(--dur-med) var(--ease-out), box-shadow var(--dur-med) var(--ease-out);
}
.surface-cream .related-card, .surface-sand .related-card {
  background: #fff; border-color: var(--line-light); color: var(--ink);
  box-shadow: var(--shadow-soft);
}
.related-card:hover { transform: translateY(-5px); border-color: rgba(233, 196, 106, 0.45); box-shadow: var(--shadow-gold); }
.related-card__tag {
  font-family: var(--font-mono); font-size: var(--text-label);
  letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--gold-400);
}
.surface-cream .related-card__tag, .surface-sand .related-card__tag { color: var(--gold-500); }
.related-card h3 { font-size: 1.2rem; line-height: 1.25; }
.related-card p { font-size: 0.925rem; color: var(--paper-muted); }
.surface-cream .related-card p, .surface-sand .related-card p { color: var(--ink-muted); }
.related-card__more {
  margin-top: auto; padding-top: 0.6rem;
  display: inline-flex; align-items: center; gap: 0.5rem;
  font-size: var(--text-small); font-weight: 600; color: var(--gold-300);
}
.surface-cream .related-card__more, .surface-sand .related-card__more { color: var(--gold-500); }
.related-card__more svg { width: 16px; height: 16px; transition: transform var(--dur-fast) var(--ease-out); }
.related-card:hover .related-card__more svg { transform: translateX(4px); }
.related-card a.related-card__link::after { content: ''; position: absolute; inset: 0; }

/* ---------- FAQ auf Ratgeber: linksbuendig statt zentriert ---------- */
.article-faq .faq { margin-inline: 0; max-width: 820px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .cta-band { grid-template-columns: 1fr; }
  .related__grid { grid-template-columns: 1fr; }
}
@media (max-width: 1023px) {
  .toc--sticky { display: none; }
}

/* ---------- Grafiken im Artikel (Inline-SVG aus den Content-Paketen) ---------- */

.article figure {
  margin: 2.6rem 0;
}

.article figure svg {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
  background: var(--cream);
}

.article figcaption {
  margin-top: 0.85rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--line-light);
  font-family: var(--font-mono);
  font-size: 0.775rem;
  line-height: 1.55;
  letter-spacing: 0.01em;
  color: var(--ink-muted);
}

/* ---------- Tabellen im Artikel (GFM-Tabellen aus den Content-Paketen) ----------
   display:block + width:max-content + overflow-x:auto macht breite Tabellen im
   eigenen Container scrollbar. Ohne das schneidet body{overflow-x:hidden} sie
   auf schmalen Viewports rechts ab - Inhalt waere unerreichbar. */

.article table {
  display: block;
  width: max-content;
  max-width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  margin: 2.2rem 0;
  font-size: 0.9rem;
  line-height: 1.5;
  font-variant-numeric: tabular-nums;
  -webkit-overflow-scrolling: touch;
}

.article thead th {
  text-align: left;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  background: var(--sand);
  padding: 0.7rem 0.95rem;
  border-bottom: 1px solid var(--line-light);
  white-space: nowrap;
}

.article tbody td {
  padding: 0.7rem 0.95rem;
  border-bottom: 1px solid var(--line-light);
  vertical-align: top;
  color: var(--ink);
}

.article tbody tr:last-child td { border-bottom: none; }
.article tbody tr:nth-child(even) { background: rgba(19, 28, 46, 0.025); }
.article table strong { color: var(--ink); }

/* ---------- Autor-Karte (Portrait + Kurzangabe, Anfang der Autor-Seite) ---------- */

.author-card {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 2.4rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--line-light);
}

.author-card__photo {
  flex: 0 0 auto;
  width: 132px;
  height: 132px;
  border-radius: 14px;
  object-fit: cover;
  box-shadow: 0 10px 30px rgba(19, 28, 46, 0.16);
}

.author-card__name {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.35rem;
  line-height: 1.15;
  color: var(--ink);
  margin-bottom: 0.3rem;
}

.author-card__role {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-bottom: 0.7rem;
}

.author-card__meta { font-size: 0.925rem; color: var(--ink-muted); margin: 0; }

@media (max-width: 560px) {
  .author-card { flex-direction: column; align-items: flex-start; gap: 1.1rem; }
  .author-card__photo { width: 108px; height: 108px; }
}

/* ---------- Aufmacherbild (Blog-Artikel) ----------
   Sitzt zwischen dunklem Artikel-Kopf und hellem Lesebereich und ueberbrueckt beide:
   oben laeuft es in das Navy des Kopfes aus, unten stoesst es an die Creme-Flaeche. */
.article-pic {
  position: relative;
  background: var(--navy-950);
  margin: 0;
}
.article-pic img {
  width: min(var(--container), 100% - 2 * var(--gutter));
  margin-inline: auto;
  height: clamp(220px, 34vw, 420px);
  object-fit: cover;
  border-radius: var(--radius-md);
  display: block;
}
.article-pic::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 50%;
  background: var(--cream);
  z-index: -1;
}

/* ---------- Prosa auf DUNKLER Flaeche (Ratgeber-Pillars) ----------
   Der Rest dieser Datei ist zweigleisig gebaut: die Basis-Regeln sind fuer dunkle
   Flaechen gestylt, `.surface-cream`/`.surface-sand` sind die Hell-Ausnahmen. Drei
   Komponenten fehlten in diesem Schema und waren nur hell gedacht — Tabellen,
   figcaption und die Autoren-Karte setzen `--ink` bzw. `--line-light`. Auf Navy
   ergibt das dunkle Schrift auf dunklem Grund. Hier stehen ihre Dunkel-Varianten.
   Gilt fuer .surface-deep und .surface-navy, damit die Artikelseiten (Creme)
   unveraendert bleiben. */

.surface-deep .article thead th,
.surface-navy .article thead th {
  background: rgba(255, 255, 255, 0.05);
  color: var(--paper-muted);
  border-bottom-color: var(--line-dark);
}
.surface-deep .article tbody td,
.surface-navy .article tbody td {
  color: var(--paper-muted);
  border-bottom-color: var(--line-dark-soft);
}
.surface-deep .article tbody tr:nth-child(even),
.surface-navy .article tbody tr:nth-child(even) { background: rgba(255, 255, 255, 0.022); }
.surface-deep .article table strong,
.surface-navy .article table strong { color: var(--paper); }

.surface-deep .article figcaption,
.surface-navy .article figcaption {
  border-top-color: var(--line-dark-soft);
  /* --paper-faint waere hier zu blass: gemessen 3,66:1 gegen navy-950 und damit unter
     WCAG-AA (4,5:1), figcaption ist mit 0,775rem Kleintext. --paper-muted liefert 7,64:1. */
  color: var(--paper-muted);
}

.surface-deep .author-card,
.surface-navy .author-card { border-bottom-color: var(--line-dark-soft); }
.surface-deep .author-card__name,
.surface-navy .author-card__name { color: var(--paper); }
.surface-deep .author-card__role,
.surface-navy .author-card__role,
.surface-deep .author-card__meta,
.surface-navy .author-card__meta { color: var(--paper-muted); }

/* Der Farbstreifen hinter dem Aufmacherbild greift die Flaeche darunter auf —
   auf Navy waere ein Creme-Balken ein Fremdkoerper. */
.surface-deep + .article-pic::after,
.surface-navy + .article-pic::after { background: var(--navy-900); }
