/* Ratgeber articles — same world as the home page: cream paper, deep green, Newsreader, the highlighter.
   Layout: editorial head, then sticky contents beside a 68ch prose column (phone: contents on top).
   Signature moment: inside the prose the marker sweeps each .mark once as it scrolls into view (CSS scroll timeline only).
   Final state is the static default: no support, no motion preference or no JS = marks fully highlighted. */

.article { --rg-sticky: calc(72px + 2rem); overflow-x: clip; }

/* ---------- head ---------- */
.article-head { position: relative; isolation: isolate; padding-top: 3rem; padding-bottom: 2.5rem; }
.article-head::after { content: ""; position: absolute; z-index: -1; right: -10%; top: 0; width: min(50rem, 80vw); aspect-ratio: 1; pointer-events: none;
  background: radial-gradient(closest-side, rgb(242 207 58 / .18), rgb(227 230 214 / .3) 55%, transparent); }
.article-head h1 { max-width: 18ch; font-size: clamp(2.5rem, 5.4vw, 4.75rem); margin-bottom: .45em; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin: 0 0 1.75rem; font-size: 1rem; color: var(--muted); }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; color: var(--ink); text-decoration-color: var(--line-strong, var(--line)); }
.crumbs a:hover { text-decoration-color: currentColor; }
.lead { max-width: 60ch; font-family: var(--font-display); font-size: clamp(1.25rem, 1.9vw, 1.5rem); line-height: 1.45; font-weight: 380;
  letter-spacing: -.005em; color: var(--ink); margin-bottom: 1.5rem; }
.meta { display: inline-block; margin: 0; padding-top: 1rem; border-top: 1px solid var(--line); font-size: 1rem; color: var(--muted); }

/* ---------- body: contents + prose ---------- */
.article-body { padding-bottom: 3.5rem; padding-bottom: clamp(3.5rem, 8vw, 6rem); }
.toc { margin: 0 0 3rem; padding: 1.25rem 1.5rem 1rem; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 1px 1px rgb(60 44 20 / .04), 0 14px 30px -20px rgb(60 44 20 / .22); }
.toc-h { margin: 0 0 .5rem; font-family: var(--font-display); font-size: 1.3rem; font-style: italic; font-weight: 380; }
.toc ol { list-style: none; margin: 0; padding: 0; counter-reset: toc; }
.toc li { counter-increment: toc; border-top: 1px solid var(--line); }
.toc li:first-child { border-top: 0; }
.toc a { display: flex; gap: .75rem; align-items: baseline; min-height: 44px; padding: .65rem 0; font-size: 1rem; line-height: 1.35;
  text-decoration: none; color: var(--ink); transition: color 300ms var(--ease-out); }
.toc a::before { content: counter(toc); min-width: 1.1rem; font-family: var(--font-display); font-style: italic; color: var(--green);
  font-variant-numeric: lining-nums; }
.toc a:hover { color: var(--green); text-decoration: underline; text-decoration-color: var(--marker); text-decoration-thickness: 2px; }

@media (min-width: 64rem) {
  .article-body { display: grid; grid-template-columns: minmax(13rem, 16rem) minmax(0, 1fr); gap: clamp(3rem, 6vw, 6.5rem); align-items: start; }
  .toc { position: sticky; top: var(--rg-sticky); margin: .4rem 0 0; max-height: calc(100vh - var(--rg-sticky) - 2rem); overflow-y: auto;
    background: transparent; border: 0; box-shadow: none; padding: 0; }
  .toc-h { padding-bottom: .5rem; border-bottom: 1px solid var(--ink); }
}

/* ---------- prose ---------- */
.prose { max-width: 68ch; font-size: 1.125rem; line-height: 1.72; }
.prose p { max-width: none; margin: 0 0 1.15em; }
.prose h2 { font-size: clamp(1.85rem, 3.4vw, 2.6rem); line-height: 1.1; letter-spacing: -.02em; margin: 2.2em 0 .55em; scroll-margin-top: var(--rg-sticky); }
.prose h2:first-child { margin-top: 0; }

/* the first section lies on the page as a taped paper sheet, like the hero documents */
.prose .summary { position: relative; background: var(--paper); box-shadow: var(--shadow-paper, 0 1px 1px rgb(60 44 20 / .04), 0 18px 36px -24px rgb(60 44 20 / .25));
  border-radius: 6px; padding: clamp(1.5rem, 4vw, 2.5rem); rotate: -.5deg; margin-bottom: 2.5rem; }
.prose .summary::before { content: ""; position: absolute; inset: -.55rem 1.25rem auto auto; width: 3.5rem; height: 1.2rem; rotate: 8deg;
  background: rgb(227 230 214 / .85); }
.prose .summary > :last-child { margin-bottom: 0; }
.prose .summary .table-wrap { margin: 1.25rem 0; box-shadow: none; }
.prose h3 { font-size: clamp(1.35rem, 2vw, 1.55rem); margin: 1.9em 0 .45em; }
.prose h2 + h3 { margin-top: .8em; }
.prose strong { font-weight: 600; }
.prose a:not(.btn) { color: var(--green); text-decoration-color: rgb(31 74 55 / .45); text-decoration-thickness: 1px; transition: text-decoration-color 300ms var(--ease-out); }
.prose a:not(.btn):hover { text-decoration-color: currentColor; }
.prose a[href^="tel:"] { white-space: nowrap; }
.prose ul, .prose ol { margin: 0 0 1.4em; padding-left: 1.4em; }
.prose li { margin-bottom: .6em; padding-left: .35em; }
.prose li::marker { color: var(--green); }
.prose ol > li::marker { font-family: var(--font-display); font-style: italic; font-size: 1.1em; }

/* signature: the highlighter checks each key phrase once on the way in */
@media (prefers-reduced-motion: no-preference) {
  @supports (animation-timeline: view()) {
    .prose .mark { animation: rg-sweep var(--ease-out) both; animation-timeline: view(); animation-range: entry 0% entry 100%; }
  }
}
@keyframes rg-sweep { from { background-size: 0% 100%; } }

/* ---------- facts table: scrolls inside its frame on phones, never the page ---------- */
.table-wrap { margin: 2rem 0 2.25rem; padding: .375rem; overflow-x: auto; overscroll-behavior-x: contain; -webkit-overflow-scrolling: touch;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 1px 1px rgb(60 44 20 / .04), 0 18px 36px -24px rgb(60 44 20 / .25);
  scrollbar-color: var(--line-strong, #cbbfa9) var(--paper); }
.table-wrap:focus-visible { outline-offset: 4px; }
.facts-table { width: 100%; min-width: 40rem; border-collapse: collapse; font-size: 1rem; line-height: 1.5;
  font-variant-numeric: tabular-nums lining-nums; }
.facts-table caption { caption-side: top; text-align: left; padding: 1.1rem 1.25rem .9rem; font-family: var(--font-display); font-style: italic;
  font-size: 1.15rem; color: var(--ink); border-bottom: 1px solid var(--line); }
.facts-table th, .facts-table td { padding: .9rem 1.25rem; text-align: left; vertical-align: top; }
.facts-table thead th { font-size: 1rem; font-weight: 600; color: var(--muted); background: rgb(227 230 214 / .45); border-bottom: 1px solid var(--line-strong, var(--line)); white-space: nowrap; }
.facts-table tbody tr + tr > * { border-top: 1px solid var(--line); }
.facts-table tbody th { font-weight: 600; min-width: 9rem; }
.facts-table td:nth-child(2) { white-space: nowrap; }
.facts-table a { display: inline-block; padding-block: .1rem; color: var(--green); }

/* ---------- callout: a paper slip in a soft tray ---------- */
.callout { position: relative; margin: 2.25rem 0 2.5rem; padding: 1.5rem 1.75rem; background: var(--paper); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: 0 0 0 6px rgb(227 230 214 / .55), 0 20px 40px -26px rgb(60 44 20 / .3); }
.callout p { margin: 0; max-width: none; font-family: var(--font-display); font-style: italic; font-size: clamp(1.2rem, 1.7vw, 1.35rem);
  line-height: 1.45; font-weight: 380; color: var(--ink); }
.callout p + p { margin-top: .75em; }
.callout a:not(.btn) { color: var(--green); }
@media (min-width: 48rem) { .callout { rotate: -.35deg; } }

/* ---------- CTA band: deep green, marker button ---------- */
.cta-band { background: var(--green-deep); color: var(--on-green); padding: 3.75rem .75rem; }
.cta-band .wrap { display: grid; gap: 1.75rem; align-items: center; }
.cta-band p { margin: 0; }
.cta-band p:first-child { max-width: 34ch; font-family: var(--font-display); font-size: clamp(1.5rem, 2.8vw, 2.15rem); line-height: 1.3; letter-spacing: -.015em; font-weight: 360; }
.cta-band p:last-child { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.75rem; }
.cta-band a:not(.btn) { display: inline-flex; align-items: center; min-height: 44px; color: var(--on-green); text-decoration-color: rgb(246 241 231 / .5); }
.cta-band a:not(.btn):hover { text-decoration-color: var(--marker); }
.cta-band .btn-primary { background: var(--marker); border-color: var(--marker); color: var(--ink); box-shadow: 0 14px 30px -14px rgb(0 0 0 / .45); }
.cta-band .btn-primary .btn-ic { background: rgb(29 26 21 / .1); }
@media (hover: hover) and (pointer: fine) {
  .cta-band .btn-primary:hover { background: #f6da62; border-color: #f6da62; color: var(--ink); }
}
@media (min-width: 56rem) { .cta-band .wrap { grid-template-columns: minmax(0, 1.2fr) auto; gap: 3rem; } }

/* ---------- FAQ, sources, related ---------- */
.article-faq { padding-top: 4rem; padding-bottom: 2rem; }
.article-faq h2, .sources h2, .related h2 { font-size: clamp(1.85rem, 3.4vw, 2.6rem); }
.article-faq .faq { max-width: 52rem; }

.sources { padding-top: 2.75rem; padding-bottom: 2.75rem; border-top: 1px solid var(--line); }
.sources ol { max-width: 52rem; margin: 0; padding-left: 1.4em; font-size: 1rem; line-height: 1.55; color: var(--muted); }
.sources li { margin-bottom: .55rem; padding-left: .3em; overflow-wrap: anywhere; }
.sources li::marker { color: var(--muted); font-variant-numeric: tabular-nums; }
.sources a { color: var(--ink); text-decoration-color: var(--line-strong, var(--line)); }
.sources a:hover { text-decoration-color: currentColor; }

.related { padding-top: 2.75rem; padding-bottom: 6rem; border-top: 1px solid var(--line); }
.related ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0 clamp(2rem, 5vw, 4rem); }
.related a { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; min-height: 64px; padding: 1.1rem 0; border-bottom: 1px solid var(--line-strong, var(--line));
  font-family: var(--font-display); font-size: clamp(1.2rem, 1.8vw, 1.4rem); line-height: 1.25; letter-spacing: -.01em; text-decoration: none; color: var(--ink); }
.related a::after { content: ""; flex: none; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: rgb(29 26 21 / .06)
  url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231f4a37' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12h14M13 6l6 6-6 6'/%3E%3C/svg%3E") center / 1.1rem no-repeat;
  transition: transform 500ms var(--ease-spring, var(--ease-out)), background-color 300ms var(--ease-out); }
@media (hover: hover) and (pointer: fine) {
  .related a:hover::after { transform: translateX(4px); background-color: var(--marker); }
}
@media (min-width: 48rem) { .related ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* section rhythm grows with the viewport (plain steps, no clamp) */
@media (min-width: 48rem) {
  .article-head { padding-top: 5rem; padding-bottom: 3.5rem; }
  .cta-band { padding-top: 5.5rem; padding-bottom: 5.5rem; }
  .article-faq { padding-top: 6rem; padding-bottom: 3rem; }
  .sources, .related { padding-top: 3.75rem; }
  .sources { padding-bottom: 3.75rem; }
  .related { padding-bottom: 8rem; }
}

/* phones: a touch more air at the edges of the prose, no rotation */
@media (max-width: 47.99rem) {
  .prose { font-size: 1.0625rem; }
  .prose .summary { rotate: 0deg; }
  .callout { padding: 1.25rem 1.25rem; }
  .facts-table th, .facts-table td { padding: .8rem 1rem; }
}

/* long German compounds: never widen the page (soft hyphens in the H1 source + safety net) */
.article-head h1 { overflow-wrap: break-word; hyphens: manual; }

/* ---------- sales strip: partner button + terms line (all pages) ---------- */
.sell { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin: 1.5rem 0 2rem; }
.sell .sell-terms { font-weight: 550; }
.sell .ad-note { flex-basis: 100%; }
.cta-band .sell-terms, .cta-band .ad-note, .band-calc .ad-note { color: var(--on-green); }
.cta-band .ad-note { flex-basis: 100%; }
.section-cta .ad-note, .calc-cta .ad-note { display: block; margin-top: .6rem; }
