/* Blog: Übersicht, Themenseiten und Artikel. Baut auf base.css auf (Farben, Karten, Knöpfe, FAQ). */

/* ---------- Kopf der Übersicht ---------- */
.blog-hero { padding: clamp(36px, 6vw, 72px) 0 clamp(20px, 3vw, 32px); text-align: center; }
.blog-hero .wrap > * { max-width: 720px; margin-left: auto; margin-right: auto; }
.blog-hero h1 em { font-style: italic; font-weight: 450; color: var(--brand); }
.blog-hero .lead { margin-bottom: 28px; }
.topic-eyebrow { color: var(--c); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px; font-size: .9rem; color: var(--muted); margin-bottom: 18px; }
.crumbs a { color: var(--muted); text-decoration: none; padding: 6px 4px; }
.crumbs a:hover { color: var(--brand-ink); text-decoration: underline; }
.crumbs .icon { width: 14px; height: 14px; transform: rotate(-90deg); opacity: .6; }

.blog-search { position: relative; max-width: 560px; }
.blog-search input { -webkit-appearance: none; appearance: none; width: 100%; min-height: 56px; padding: 14px 20px 14px 52px; border: 1.5px solid var(--line-2); border-radius: 99px;
  font: inherit; font-size: 1.02rem; color: var(--ink); background: #fff; box-shadow: var(--shadow-1); transition: border-color .15s, box-shadow .15s; }
.blog-search input:hover { border-color: #c9b9a9; }
.blog-search input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.blog-search input::-webkit-search-cancel-button { cursor: pointer; }
.blog-search input::placeholder { color: #9a8f99; }
.blog-search-icon { position: absolute; left: 20px; top: 50%; transform: translateY(-50%); width: 22px; height: 22px; color: var(--muted); pointer-events: none; }
.blog-search-icon svg { width: 100%; height: 100%; display: block; }

/* Themen als Chips: auf dem Handy waagrecht wischbar, auf grossen Bildschirmen umbrechend */
.topic-chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; padding: 6px var(--gutter) 10px; margin: 0 calc(-1 * var(--gutter)) 20px; scroll-snap-type: x proximity; }
.topic-chips::-webkit-scrollbar { display: none; }
@media (min-width: 760px) { .topic-chips { flex-wrap: wrap; justify-content: center; overflow: visible; margin-left: 0; margin-right: 0; padding-left: 0; padding-right: 0; } }
.topic-chips a { --c: var(--ink-2); flex: none; scroll-snap-align: start; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 16px;
  border-radius: 99px; background: var(--surface); border: 1px solid var(--line); color: var(--ink); text-decoration: none; font-weight: 600; font-size: .95rem; white-space: nowrap;
  transition: background .2s, border-color .2s, transform .15s var(--ease); }
.topic-chips a .icon { color: var(--c); width: 18px; height: 18px; }
.topic-chips a span { font-size: .8rem; font-weight: 650; color: var(--muted); background: var(--sand); border-radius: 99px; padding: 1px 8px; }
.topic-chips a:hover { border-color: var(--line-2); background: #fffdfb; color: var(--ink); transform: translateY(-1px); }
.topic-chips a[aria-current] { background: var(--ink); border-color: var(--ink); color: #fff; }
.topic-chips a[aria-current] .icon { color: #fff; }
.topic-chips a[aria-current] span { background: rgba(255,255,255,.16); color: #fff; }

/* ---------- Artikelkarten ---------- */
.post-grid { display: grid; gap: 20px; }
@media (min-width: 640px) { .post-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 980px) {
  /* Sechs Spalten: normale Karten nehmen zwei, eine unvollständige letzte Zeile mit zwei Karten füllt die Breite (blog.js setzt .post-card-half) */
  .post-grid { grid-template-columns: repeat(6, 1fr); }
  .post-grid > .post-card { grid-column: span 2; }
  .post-grid > .post-card.post-card-half { grid-column: span 3; }
  .post-card-half .post-img { aspect-ratio: 2 / 1; }
}
.post-card { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); overflow: hidden;
  text-decoration: none; color: var(--ink); box-shadow: var(--shadow-1); transition: transform .25s var(--ease), box-shadow .25s; }
.post-card:hover { color: var(--ink); transform: translateY(-3px); box-shadow: var(--shadow-2); }
.post-img { display: block; overflow: hidden; aspect-ratio: 16 / 10; background: var(--sand); }
.post-img .illo { width: 100%; height: 100%; object-fit: cover; border-radius: 0; transition: transform .6s var(--ease-out); }
.post-card:hover .post-img .illo { transform: scale(1.035); }
.post-body { display: flex; flex-direction: column; gap: 8px; padding: 20px 22px 22px; flex: 1; }
.post-topic { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c); }
.post-topic .icon { width: 16px; height: 16px; }
.post-title { font-family: var(--font-display); font-weight: 560; font-size: 1.28rem; line-height: 1.2; letter-spacing: -.01em; font-variation-settings: 'opsz' 36; text-wrap: balance; }
.post-text { color: var(--ink-2); font-size: .97rem; line-height: 1.5; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.post-meta { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 6px; color: var(--muted); font-size: .86rem; }
.post-meta .icon { width: 16px; height: 16px; }
/* Erste Karte gross und quer */
@media (min-width: 980px) {
  .post-grid > .post-card-big { grid-column: 1 / -1; flex-direction: row; }
  .post-card-big .post-img { flex: 0 0 56%; aspect-ratio: auto; min-height: 380px; }
  .post-card-big .post-body { justify-content: center; padding: 40px 44px; gap: 12px; }
  .post-card-big .post-title { font-size: 2rem; }
  .post-card-big .post-text { font-size: 1.06rem; -webkit-line-clamp: 4; }
  .post-card-big .post-meta { margin-top: 8px; }
}
.post-card[hidden] { display: none; }

.search-status:empty { display: none; }
.search-status { margin: -4px 0 16px; text-align: center; }
.search-empty { text-align: center; max-width: 640px; margin: 8px auto 0; }
.search-empty h2 { font-size: 1.4rem; }
.search-empty-links { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
.search-empty-links .pill { text-decoration: none; min-height: 40px; }

.all-questions { margin-top: clamp(48px, 7vw, 80px); }
.all-questions h2 { text-align: center; margin-bottom: 28px; }
.all-questions-grid { display: grid; gap: 28px 40px; }
@media (min-width: 720px) { .all-questions-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1000px) { .all-questions-grid { grid-template-columns: repeat(3, 1fr); } }
.all-questions h3 { font-size: 1.05rem; margin-bottom: 8px; }
.all-questions h3 a { color: var(--ink); text-decoration: none; }
.all-questions ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 2px; }
.all-questions li a { display: block; padding: 6px 0; color: var(--ink-2); text-decoration: none; line-height: 1.4; }
.all-questions li a:hover { color: var(--brand-ink); text-decoration: underline; }

/* ---------- Artikel ---------- */
.read-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 40; pointer-events: none; }
.read-progress span { display: block; height: 100%; width: 100%; background: var(--brand); transform-origin: 0 50%; transform: scaleX(0); }

.article-head { padding-top: clamp(28px, 5vw, 56px); text-align: center; }
.article-head .wrap:first-child > * { max-width: 780px; margin-left: auto; margin-right: auto; }
.article-head h1 { font-size: clamp(2rem, 5vw, 3.1rem); }
.article-head .lead { margin-bottom: 18px; }
.article-meta { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 20px; color: var(--muted); font-size: .92rem; margin: 0; }
.article-meta span { display: inline-flex; align-items: center; gap: 6px; }
.article-meta .icon { width: 17px; height: 17px; }
.article-figure { margin-top: clamp(24px, 4vw, 40px); }
.article-img { width: 100%; max-width: 1040px; margin: 0 auto; aspect-ratio: 16 / 8; object-fit: cover; border-radius: var(--r-xl); }
@media (max-width: 640px) { .article-img { aspect-ratio: 4 / 3; border-radius: var(--r-lg); } }

.article-layout { display: grid; gap: 8px; padding-top: clamp(24px, 4vw, 48px); padding-bottom: 8px; }
@media (min-width: 1000px) {
  .article-layout { grid-template-columns: 250px minmax(0, 700px); justify-content: center; gap: 64px; }
  .article-side { position: sticky; top: 96px; align-self: start; max-height: calc(100vh - 120px); overflow-y: auto; }
}
.article-main { min-width: 0; }

.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
.toc summary { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; min-height: 52px; cursor: pointer; list-style: none;
  font-weight: 700; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.toc summary::-webkit-details-marker { display: none; }
.toc summary .icon { transition: transform .25s var(--ease); }
.toc[open] summary .icon { transform: rotate(180deg); }
.toc ol { list-style: none; margin: 0; padding: 0 10px 12px; counter-reset: toc; }
.toc li { counter-increment: toc; }
.toc a { display: flex; gap: 10px; padding: 8px 10px; border-radius: 10px; color: var(--ink-2); text-decoration: none; font-size: .94rem; line-height: 1.35; transition: background .15s, color .15s; }
.toc a::before { content: counter(toc); flex: none; width: 20px; color: var(--muted); font-variant-numeric: tabular-nums; font-size: .85rem; padding-top: 1px; }
.toc a:hover { background: var(--sand); color: var(--ink); }
.toc a.on { background: var(--brand-soft); color: var(--brand-ink); font-weight: 600; }
.toc a.on::before { color: var(--brand); }
@media (min-width: 1000px) { .toc { background: none; border: 0; } .toc summary { padding: 0 10px 10px; min-height: 0; pointer-events: none; } .toc summary .icon { display: none; } .toc ol { padding: 0; } }
.side-test { display: none; }
@media (min-width: 1000px) {
  .side-test { display: block; margin-top: 24px; padding: 18px; background: var(--sand); border-radius: var(--r); font-size: .92rem; }
  .side-test p { margin-bottom: 12px; color: var(--ink-2); }
}

.short-answer { background: var(--sage-soft); border-radius: var(--r-lg); padding: clamp(20px, 3vw, 28px); margin: 8px 0 clamp(28px, 4vw, 40px); color: var(--ink); font-size: 1.08rem; line-height: 1.65; }
.short-answer p:last-child { margin-bottom: 0; }
.box-label { display: flex; align-items: center; gap: 8px; font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--sage-ink); margin-bottom: 10px; }
.box-label .icon { width: 18px; height: 18px; }

.article-body { font-size: 1.1rem; line-height: 1.75; color: var(--ink-2); }
.article-body > p, .article-body li { text-wrap: pretty; }
.article-body strong { color: var(--ink); }
.article-body h2 { font-size: clamp(1.5rem, 3vw, 1.95rem); color: var(--ink); margin: 2.1em 0 .6em; }
.article-body h2:first-child { margin-top: 0; }
.article-body h3 { font-size: 1.25rem; color: var(--ink); margin: 1.7em 0 .45em; }
.article-body ul, .article-body ol { padding-left: 0; margin: 0 0 1.2em; list-style: none; }
.article-body li { position: relative; padding-left: 30px; margin-bottom: .55em; }
.article-body ul > li::before { content: ""; position: absolute; left: 8px; top: .72em; width: 7px; height: 7px; border-radius: 50%; background: var(--brand); }
.article-body ol { counter-reset: li; }
.article-body ol > li { counter-increment: li; }
.article-body ol > li::before { content: counter(li); position: absolute; left: 0; top: .28em; width: 22px; height: 22px; border-radius: 50%; background: var(--brand-soft); color: var(--brand-ink);
  font-size: .8rem; font-weight: 700; display: grid; place-items: center; line-height: 1; }
.article-body blockquote { font-size: 1.2rem; margin: 1.6em 0; }
.article-body a:not(.btn):not(.inline-article) { color: var(--brand-ink); }

.table-wrap { overflow-x: auto; margin: 1.4em 0 1.8em; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface); }
.article-body table { width: 100%; border-collapse: collapse; font-size: .97rem; line-height: 1.5; min-width: 520px; }
.article-body th, .article-body td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
.article-body th { background: var(--sand); color: var(--ink); font-weight: 650; font-size: .9rem; }
.article-body tr:last-child td { border-bottom: 0; }
.article-body td:first-child { color: var(--ink); font-weight: 600; white-space: nowrap; }
@media (max-width: 640px) {
  .table-wrap { border: 0; background: none; overflow: visible; }
  .article-body table { min-width: 0; }
  .article-body thead { display: none; }
  .article-body tbody, .article-body tr, .article-body td { display: block; }
  .article-body tr { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; margin-bottom: 10px; }
  .article-body td { border: 0; padding: 3px 0; }
  .article-body td:first-child { font-family: var(--font-display); font-size: 1.12rem; white-space: normal; padding-bottom: 6px; }
  .article-body td:not(:first-child)::before { content: attr(data-label) ": "; color: var(--muted); font-size: .88rem; }
  .article-body td[data-label=""]::before { content: none; }
}

.box { border-radius: var(--r-lg); padding: clamp(18px, 3vw, 24px) clamp(20px, 3vw, 28px); margin: 1.6em 0; font-size: 1.03rem; line-height: 1.65; color: var(--ink); }
.box > :last-child { margin-bottom: 0; }
.box ul, .box ol { margin-bottom: .6em; }
.box-sage { background: var(--sage-soft); } .box-sage .box-label { color: var(--sage-ink); }
.box-sky { background: var(--sky-soft); } .box-sky .box-label { color: var(--sky); }
.box-brand { background: var(--brand-soft); } .box-brand .box-label { color: var(--brand-ink); }
.box-sun { background: var(--sun-soft); } .box-sun .box-label { color: var(--sun-ink); }
.box-plum { background: var(--plum-soft); } .box-plum .box-label { color: var(--plum); }

.test-hint { display: flex; flex-direction: column; gap: 16px; align-items: flex-start; margin: 2em 0; padding: clamp(20px, 3vw, 26px) clamp(20px, 3vw, 28px);
  border: 1.5px solid var(--line-2); border-radius: var(--r-lg); background: var(--surface); box-shadow: var(--shadow-1); }
.test-hint p { margin: 0; font-size: 1rem; }
.test-hint-title { font-family: var(--font-display); font-size: 1.25rem !important; color: var(--ink); font-weight: 560; margin-bottom: 4px !important; }
@media (min-width: 640px) { .test-hint { flex-direction: row; align-items: center; justify-content: space-between; } .test-hint .btn { flex: none; } }

.inline-article { display: flex; align-items: center; gap: 4px 14px; flex-wrap: wrap; margin: 1.6em 0; padding: 16px 20px; border-left: 3px solid var(--sage);
  background: var(--surface); border-radius: 0 var(--r) var(--r) 0; text-decoration: none; color: var(--ink); box-shadow: var(--shadow-1); }
.inline-article .eyebrow { margin: 0; width: 100%; font-size: .72rem; }
.inline-article strong { flex: 1; font-family: var(--font-display); font-weight: 560; font-size: 1.12rem; line-height: 1.3; }
.inline-article .icon { color: var(--sage); transition: transform .2s var(--ease); }
.inline-article:hover { color: var(--ink); }
.inline-article:hover .icon { transform: translateX(3px); }

.article-faq { margin-top: clamp(40px, 6vw, 64px); }
.article-faq h2 { font-size: clamp(1.5rem, 3vw, 1.95rem); }
.article-foot { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); }
.share { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; }
.share .btn .icon { width: 18px; height: 18px; }

.related-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 8px 20px; margin-bottom: 24px; }
.related-head h2 { margin: 0; }

.blog .arrow-link { display: inline-flex; align-items: center; gap: 6px; font-weight: 650; color: var(--brand-ink); text-decoration: none; min-height: 44px; }
.blog .arrow-link:hover { color: var(--brand); }
.blog .arrow-link .icon { transition: transform .2s var(--ease); }
.blog .arrow-link:hover .icon { transform: translateX(3px); }
.blog .sources { margin-top: 12px; }
.blog .sources summary { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; color: var(--muted); font-size: .92rem; list-style: none; padding: 10px 0; min-height: 44px; }
.blog .sources summary::-webkit-details-marker { display: none; }
.blog .sources summary .icon { transition: transform .25s var(--ease); }
.blog .sources[open] summary .icon { transform: rotate(180deg); }
.blog .sources ul { margin: 6px 0 16px; padding-left: 18px; color: var(--muted); font-size: .86rem; line-height: 1.5; }
.blog .sources li { margin-bottom: 6px; }

/* Startseite und Stilseiten: kleiner Blog-Abschnitt */
.blog-teaser { padding-bottom: 0; }   /* der nächste Abschnitt bringt seinen eigenen Abstand mit */
.blog-teaser .related-head { margin-bottom: 28px; }
