/* Bombelli Analytics, Artikel-Vorlage für Blogartikel und Guides, Redesign Oktober 2026.
   Ergänzt system.css, ersetzt nichts. Einbinden je Artikel im Fragment:
   <!-- head-ersatz --><link rel="stylesheet" href="/assets26/artikel.css?v=1"><!-- /head-ersatz -->

   Gerüst (Reihenfolge im <main class="artikel s-...">):
   section.seite-kopf.a-kopf > .wrap
       nav.pfad              Brotkrumen wie live (Home / Blog / Kurztitel), letzter Teil mit aria-current="page"
       h1.a-titel            Artikeltitel, kleiner und enger als .h1, weil Artikeltitel lang sind
       p.lead                Lead wie live
       div.meta-zeile.a-meta Autor mit Foto (a.a-wer > img + Text), Datum, Lesezeit, Themen (span.a-themen, Live-Tags als Text)
   div.wrap.a-leib           Lesebereich: links die Randspalte, rechts der Text
       aside.a-rand          Randspalte links (unter 1100px über dem Text). Enthält:
           figure.a-cover    Titelbild (img/cov-*.jpg, 1800x945), immer ganz gezeigt: die Bilder sind Schriftkarten, ein Zuschnitt schneidet den Satz an
           nav.toc.a-toc     optional, nur bei drei und mehr h2, klebt beim Scrollen. Links auf die h2-IDs, system.js markiert den aktiven
       div.prosa.a-text      Fliesstext (Absätze, h2 mit id, Listen, Zitat, Code, Tabellen aus system.css)
           figure.a-bild     Bild oder Infografik; mit .breit nutzt es die ganze Breite rechts der Randspalte
           p.a-these         (+ .breit) herausgestellter Kernsatz des Artikels, gross gesetzt. Am besten den Satz aus
                             seinem Absatz herauslösen (keine Doppelung). Muss er doppelt stehen, aria-hidden="true". Gelb per .mk.zieh
           figure.a-code     Codeblock mit Dateiname: <figure class="a-code"><p class="a-code-name">llms.txt</p><pre>...</pre><figcaption>
                             Zeilen als <span class="z"> brechen um und rücken die Folgezeile ein (wie live)
           .tabelle-wrap     Tabellen wie live in .tabelle-wrap einpacken; mit .breit nutzt die Tabelle die ganze Breite
           dl.a-fakten       zwei bis vier Zahlen aus dem Text nebeneinander: <div><dt><small>rund</small>60 %</dt><dd>Text</dd></div> (small für «rund», «über»);
                             <div class="du"> setzt die Zahl, die zählt, in Preussischblau (--akzent)
           div.a-gegenueber  zwei Spalten «so / so» (z. B. robots.txt gegen llms.txt), je <div><b>Titel</b><p>Text</p></div>
           aside.a-notiz     Randnotiz in Literata kursiv, für eine Einschränkung oder einen Hinweis des Autors aus dem Text
       div.a-autor           Autorkasten am Textende: img, div > p.a-autor-name, p.a-autor-rolle, p (Bio), p.a-autor-links
   section.band.a-weiter     Verwandte Artikel: h2.h3 plus nav.register (a > b + span + svg), Inhalt wie live
   section.aufruf            Schlussaufruf aus system.css, Text wie live, Knöpfe .btn.hell und .btn.hell-ghost

   Markierung (--gelb, in Variante C heller Preussischblau): höchstens drei Stellen pro Artikel, jede mit Bedeutung (meist .mk.zieh in der These, ein .du in .a-fakten).
   Radien 12/18/999, Abstände im 4er/8er-Raster, keine Eyebrows. */

.artikel { --rand: 15rem; --spalt: clamp(32px, 4.5vw, 72px); }

/* ============ Kopf ============ */
.a-kopf { padding-bottom: clamp(40px, 5vw, 64px); }
.a-kopf .pfad { margin-bottom: 26px; }
.a-kopf .pfad [aria-current] { color: var(--ink); }
.a-titel { font-size: clamp(2.2rem, 1.2rem + 3.4vw, 4.25rem); line-height: 1.02; font-weight: 800; letter-spacing: -.038em; text-wrap: balance; max-width: 17em; }
.a-kopf .lead { max-width: 36em; }
.a-meta { align-items: center; margin-top: 28px; gap: 8px 22px; }
.a-meta > * { display: inline-flex; align-items: center; }
.a-meta .a-wer { gap: 10px; color: var(--ink); font-weight: 600; text-decoration: none; min-height: 44px; }
.a-meta .a-wer img { width: 40px; height: 40px; border-radius: 999px; object-fit: cover; background: var(--paper-2); }
.a-meta .a-wer:hover span { text-decoration: underline; text-underline-offset: .2em; }

/* ============ Lesebereich ============ */
.a-leib { display: grid; grid-template-columns: var(--rand) minmax(0, 1fr); gap: var(--spalt); align-items: start; padding-top: clamp(40px, 5vw, 64px); padding-bottom: clamp(72px, 9vw, 120px); border-top: 1px solid var(--rule); }
.a-rand { align-self: stretch; display: flex; flex-direction: column; gap: 28px; }
.a-text { max-width: none; }
.a-text > * { max-width: 39rem; }
.a-text > .breit { max-width: none; }
.a-text > .a-these.breit { max-width: 24em; }
.a-cover img { width: 100%; height: auto; aspect-ratio: 40 / 21; object-fit: contain; border-radius: 12px; border: 1px solid var(--rule); }
.a-toc { position: sticky; top: 100px; border-top: 2px solid var(--ink); padding-top: 14px; }
.a-toc p { font-size: .95rem; }
.a-toc a { padding: 7px 0; min-height: 36px; }
.a-toc a.aktiv { color: var(--ink); }
.a-text h2 { scroll-margin-top: 96px; }
.a-text > :first-child { margin-top: 0; }

/* Bilder und Infografiken */
.a-bild { margin: 2.2em 0; }
.a-bild img { width: 100%; height: auto; border-radius: 12px; border: 1px solid var(--rule); }
.a-bild figcaption { font-size: .9rem; color: var(--ink-3); margin-top: 10px; line-height: 1.45; }
.a-text > .a-bild:first-child { margin-top: 0; }

/* Herausgestellter Kernsatz */
.a-these { font-size: clamp(1.45rem, 1.05rem + 1.5vw, 2.3rem); line-height: 1.16; font-weight: 800; letter-spacing: -.03em; color: var(--ink) !important; margin: 1.6em 0 !important; text-wrap: balance; max-width: 20em; }
.a-these + * { margin-top: 0; }

/* Code mit Dateiname */
.a-code { margin: 2em 0; }
.a-code-name { display: inline-block; font-weight: 700; font-size: .92rem; padding: 6px 14px; background: var(--ink); color: #fff !important; border-radius: 12px 12px 0 0; }
.a-code pre { margin: 0; border-top-left-radius: 0; }
.prosa pre code .z { display: block; padding-left: 2ch; text-indent: -2ch; white-space: pre-wrap; overflow-wrap: anywhere; }
.a-code figcaption, .a-text figure > figcaption { font-size: .9rem; color: var(--ink-3); margin-top: 10px; }

/* Zahlen aus dem Text */
.a-fakten { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); gap: 20px var(--gap); border-top: 2px solid var(--ink); padding-top: 22px; margin: 2em 0 !important; }
.a-fakten dt { font-size: clamp(2.2rem, 1.6rem + 2vw, 3.4rem); font-weight: 800; letter-spacing: -.045em; line-height: 1; font-variant-numeric: tabular-nums; width: fit-content; white-space: nowrap; }
.a-fakten:has(> div:nth-child(4)) dt { font-size: clamp(2rem, 1.5rem + 1.4vw, 2.75rem); }
.a-fakten dt small { font-size: .36em; font-weight: 700; letter-spacing: 0; margin-right: .3em; color: var(--ink-2); }
.a-fakten dd { margin: 10px 0 0; font-size: .95rem; line-height: 1.45; color: var(--ink-2); }
.a-fakten .du dt { color: var(--akzent, var(--ink)); }

/* Gegenüberstellung */
.a-gegenueber { display: grid; grid-template-columns: 1fr 1fr; gap: 0; border-top: 2px solid var(--ink); margin: 2em 0 !important; }
.a-gegenueber > div { padding: 18px 0 4px; }
.a-gegenueber > div + div { border-left: 1px solid var(--rule); padding-left: 24px; }
.a-gegenueber > div:first-child { padding-right: 24px; }
.a-gegenueber b { display: block; font-size: 1.1rem; letter-spacing: -.02em; }
.a-gegenueber p { margin-top: 6px; font-size: .98rem; color: var(--ink-2); }

/* Randnotiz */
.a-notiz { font-family: var(--notiz); font-style: italic; font-size: 1.1rem; line-height: 1.5; color: var(--ink-2); padding: 4px 0 4px 20px; position: relative; }
.a-notiz::before { content: ''; position: absolute; left: 0; top: .5em; width: 10px; height: 2px; background: var(--ink); }

/* Tabellen */
.a-text .tabelle-wrap { margin: 2em 0; }
.a-text .tabelle-wrap table { min-width: 520px; }

/* Autorkasten */
.a-autor { display: grid; grid-template-columns: 88px minmax(0, 1fr); gap: 22px; margin-top: 3.2em !important; padding-top: 28px; border-top: 2px solid var(--ink); }
.a-autor img { width: 88px; height: 88px; border-radius: 999px; object-fit: cover; border: 0 !important; background: var(--paper-2); }
.a-autor p { margin: 0; }
.a-autor .a-autor-name { font-weight: 800; font-size: 1.2rem; letter-spacing: -.02em; color: var(--ink); }
.a-autor .a-autor-rolle { font-size: .95rem; color: var(--ink-3); margin-top: 2px; }
.a-autor .a-autor-name + .a-autor-rolle + p { margin-top: 12px; font-size: 1rem; line-height: 1.6; color: var(--ink-2); }
.a-autor .a-autor-links { display: flex; flex-wrap: wrap; gap: 4px 22px; margin-top: 10px; font-weight: 600; font-size: .98rem; }
.a-autor .a-autor-links a { display: inline-flex; align-items: center; min-height: 44px; }

/* Verwandte Artikel */
.a-weiter { padding-top: clamp(56px, 7vw, 96px); }
.a-weiter .h3 { margin-bottom: 22px; }
.a-weiter .register a { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr) 24px; padding: 18px 0; }
.a-weiter .register b { font-size: 1.1rem; }

/* ============ Responsiv ============ */
@media (max-width: 1100px) {
  .a-leib { grid-template-columns: minmax(0, 1fr); }
  .a-rand { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: start; gap: 28px; max-width: 39rem; }
  .a-toc { position: static; }
  .a-rand:not(:has(.a-toc)) { grid-template-columns: minmax(0, 1fr); }
  .a-rand:not(:has(.a-toc)) .a-cover { max-width: 26rem; }
}
@media (max-width: 640px) {
  .a-kopf .pfad { margin-bottom: 18px; }
  .a-meta { gap: 4px 16px; font-size: .9rem; }
  .a-rand, .a-rand:not(:has(.a-toc)) { grid-template-columns: minmax(0, 1fr); }
  .a-gegenueber { grid-template-columns: 1fr; }
  .a-gegenueber > div + div { border-left: 0; padding-left: 0; border-top: 1px solid var(--rule); }
  .a-gegenueber > div:first-child { padding-right: 0; }
  .a-autor { grid-template-columns: 64px minmax(0, 1fr); gap: 16px; }
  .a-autor img { width: 64px; height: 64px; }
  .a-weiter .register a { grid-template-columns: 1fr; gap: 4px; }
}

/* ============ Handy-Feinschliff 18.10.2026 (nur unter 760px, Desktop unverändert) ============ */
@media (max-width: 760px) {
  /* Inhaltsverzeichnis: ein Inline-Skript im Artikel packt die Liste am Handy in <details class="a-toc-klapp"> */
  .a-toc { padding-top: 0; }
  .a-toc-klapp summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 52px; font-weight: 700; cursor: pointer; list-style: none; }
  .a-toc-klapp summary::-webkit-details-marker { display: none; }
  .a-toc-klapp summary::after { content: ''; width: 9px; height: 9px; margin-right: 4px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: translateY(-3px) rotate(45deg); }
  .a-toc-klapp[open] summary::after { transform: translateY(2px) rotate(-135deg); }
  .a-toc-klapp ol { padding-bottom: 8px; }
  .a-toc-klapp a { display: flex; align-items: center; min-height: 44px; padding: 8px 0; }
  .a-toc { border-bottom: 1px solid var(--rule); }
  /* Infografiken: ein Inline-Skript verlinkt sie am Handy auf das Bild in voller Grösse (zum Zoomen) */
  .a-bild-gross { display: block; text-decoration: none !important; background: none !important; }
}
@media (max-width: 640px) {
  .a-titel { font-size: clamp(1.75rem, 1.2rem + 3vw, 2.2rem); line-height: 1.06; letter-spacing: -.032em; }
  .a-kopf { padding-bottom: 32px; }
  .a-meta { margin-top: 20px; }
  .a-leib { padding-top: 28px; padding-bottom: 64px; }
  .a-rand { gap: 20px; margin-bottom: 8px; }
  /* Titelbild ganz zeigen statt anschneiden (Motiv und Beschriftung bleiben lesbar) */
  .a-rand:not(:has(.a-toc)) .a-cover { max-width: none; }
  .a-text > :first-child { margin-top: 0 !important; }
  /* Fliesstext 17px, ruhigere Zeilenhöhe */
  .a-text { font-size: 1.0625rem; line-height: 1.6; }
  .a-text h2 { scroll-margin-top: 80px; }
  /* Code: nicht unter 13px */
  .a-text pre { font-size: 13px; padding: 16px; }
  .a-text pre code { font-size: 1em; }
  /* Tabellen bis an den Bildschirmrand wischbar, damit der Anschnitt klar als Fortsetzung lesbar ist */
  .a-text .tabelle-wrap { margin-inline: -20px; padding-inline: 20px; scroll-padding-inline: 20px; }
  .a-text .tabelle-wrap table { font-size: .9375rem; }
  .a-fakten { gap: 24px 20px; }
  .a-fakten dt small { font-size: 13px; }
  .a-these { margin: 1.4em 0 !important; }
  .a-autor { margin-top: 2.6em !important; }
  .a-text :not(pre) > code { overflow-wrap: anywhere; }
}
@media (max-width: 360px) {
  .a-titel { font-size: 1.625rem; }
}
