/* Single post (single.php). Source: docs/design/referenz/02-artikel.html.
   Mobile first, one column; from 900px reading column 680px + sticky sidebar 300px.
   The Themenwelt colour --c is set on .page by header.php. */

/* ---------- Hero ---------- */
.a-hero { background: color-mix(in srgb, var(--c) 42%, var(--bg)); padding-block: 20px 24px; }
.a-hero .wrap { display: grid; gap: 20px; }
.a-hero .txt { display: grid; gap: 12px; }
.a-badges { display: flex; gap: 8px; flex-wrap: wrap; }
.a-hero h1 { font-size: 32px; font-weight: 800; letter-spacing: -.02em; }
.a-lead { font-size: 17px; color: var(--ink); line-height: 1.5; }
.a-meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--ink); }
.a-meta b { font-weight: 600; color: var(--ink); }
.a-img { border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 4 / 3; max-width: 100%; }
.a-img img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Content (grid and TOC: components.css) ---------- */
.intro { font-size: 19px; line-height: 1.6; color: var(--ink); }
.intro p + p { margin-top: 14px; }
.intro > p:first-child::first-letter { font-family: var(--f-display); font-weight: 900; float: left; font-size: 3.4em; line-height: .82; margin: .06em .1em 0 0; color: var(--ink); }

/* Overview „In diesem Artikel“ (single/produkt_uebersicht): the article's products as jump links to their boxes,
   each with a small merchant button. A signpost, not a product box: no image, price or teaser; open on mobile. */
.pov { margin-top: 24px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 14px 16px 6px; }
.pov-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.pov-h { font-size: 13px; font-family: var(--f-body); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.pov-ad { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.pov-list { list-style: none; margin: 8px 0 0; padding: 0; }
.pov-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-top: 1px solid var(--line); }
.pov-txt { flex: 1; min-width: 0; display: grid; gap: 4px; justify-items: start; }
.pov .badge-s.role { background: var(--sunk); border-color: var(--line); color: var(--ink); }
.pov-name { font-size: 15px; font-weight: 600; line-height: 1.35; text-decoration: none; }
.pov-name:hover { text-decoration: underline; text-decoration-color: var(--c); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.pov-name span { color: var(--ink-3); font-weight: 400; }
.pov-buy { flex: none; }

/* ---------- Sources ---------- */
/* Method note (single/methodik), directly before the sources. */
.method { margin-top: 40px; background: var(--sunk); border-radius: var(--r-lg); padding: 16px; display: grid; gap: 8px; justify-items: start; scroll-margin-top: 80px; }
.method h2 { font-size: 18px; font-weight: 800; }
.method p:not(.eyebrow) { font-size: 15px; color: var(--ink-2); }
.method + .sources { margin-top: 24px; }
.sources { border-top: 1px solid var(--line); padding-top: 16px; margin-top: 40px; }
.sources h3 { font-size: 13px; font-family: var(--f-body); font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 8px; }
.sources ol { margin: 0; padding-left: 18px; font-size: 13px; color: var(--ink-2); display: grid; gap: 4px; }
.sources a { color: inherit; text-underline-offset: 2px; }

/* ---------- Related posts ---------- */
.related { background: var(--sunk); padding-block: 36px; }
.related h2 { font-size: 22px; font-weight: 800; margin-bottom: 16px; }
.related .rail { --w: 72%; }

/* ---------- Desktop ---------- */
@container page (min-width: 900px) {
  .method { padding: 20px 24px; }
  .a-hero { padding-block: 40px 48px; }
  .a-hero .wrap { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); column-gap: 48px; row-gap: 18px; align-items: center; }
  .a-hero .txt { gap: 18px; }
  .a-hero h1 { font-size: 48px; }
  .a-lead { font-size: 20px; max-width: 32em; }


  .a-main .start, .side-cta.pt-inline, .side-ad.sp-inline { display: none; }
  /* Split sidebar (single.php): the TOC sticks all the way; each half below it is half the article high and its
     sticky block (ad, then „Start hier“ with the Rechner teaser) stops only inside it, right under the TOC
     (--toc-h from toc.js). The ads share the first half in equal slots: each sticks in its slot, then scrolls away
     under the TOC and the next one takes its place. */
  /* Clipped at its top edge only, so the cover above the TOC never reaches into the ad note or the hero. */
  .a-side.split { display: grid; grid-template-rows: auto 1fr 1fr; gap: 24px; clip-path: inset(0 -100vmax -100vmax); }
  .a-side.split:not(:has(> .side-toc)) { grid-template-rows: 1fr 1fr; }
  .a-side.split .side-toc { position: sticky; top: 96px; z-index: 2; background: var(--bg); }
  /* Covers the strip between header and TOC, so the ad scrolling away is not seen above the TOC. */
  .a-side.split .side-toc::before { content: ""; position: absolute; left: 0; right: 0; bottom: 100%; height: 96px; background: var(--bg); }
  .a-side.split .side-half { display: grid; gap: 24px; align-content: start; }
  .a-side.split .side-half .side-sticky { top: calc(96px + var(--toc-h, 0px)); }
  .a-side.split .side-ads { grid-auto-rows: 1fr; align-content: stretch; }
  /* Second half: „Start hier“ stops under the TOC, the teaser under „Start hier“ (--start-h from toc.js). Too little
     height for both (.tight): „Start hier“ scrolls by and the teaser stops right under the TOC. */
  .a-side.split .side-start { position: sticky; top: calc(96px + var(--toc-h, 0px)); }
  .a-side.split .side-bottom .side-sticky { top: calc(96px + var(--toc-h, 0px) + var(--start-h, 0px)); }
  .a-side.split.tight .side-start { position: static; }
  .a-side.split.tight .side-bottom .side-sticky { top: calc(96px + var(--toc-h, 0px)); }
  .a-side .start { margin-top: 0; padding: 18px; }
  .a-side .start ol { display: grid; grid-auto-flow: row; overflow: visible; margin-inline: 0; padding-inline: 0; gap: 6px; }
  .a-side .start li { flex-direction: row; align-items: center; gap: 12px; padding: 8px 10px; }
  .a-side .start li::before { font-size: 18px; width: 18px; }
  .a-side .start li small { display: none; }

  .intro { font-size: 21px; }

  .related { padding-block: 56px; }
  .related h2 { font-size: 30px; margin-bottom: 24px; }
  .related .rail { grid-auto-flow: row; grid-template-columns: repeat(3, minmax(0, 1fr)); overflow: visible; margin-inline: 0; padding-inline: 0; gap: 24px; }
}
