/* botbrix – templates: Startseite, Archive, Glossar, Tool-/Vergleichs-/Ratgeber-Spezifika, Suche, 404 */

.bb-muted { color: var(--fg-3); font-size: 1rem; }

/* Startseiten-Bausteine, die auch in Archiven vorkommen */
.bb-handbooks { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr)); }
.bb-handbook { position: relative; display: flex; flex-direction: column; gap: 0.6rem; padding-top: 1rem; border-top: 3px solid var(--k); }
.bb-handbook__no { display: flex; justify-content: space-between; gap: 1rem; font: 600 0.6875rem/1.2 var(--ff-mono); color: var(--fg-2); }
.bb-handbook__no span { color: var(--fg-3); font-weight: 500; }
.bb-handbook__title { font-size: clamp(1.375rem, 1.2rem + 0.6vw, 1.75rem); font-stretch: 84%; font-weight: 740; line-height: 1.05; }
.bb-handbook__title a { text-decoration: none; }
.bb-handbook__title a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.bb-handbook__text { font-size: 1.0625rem; line-height: 1.45; color: var(--fg-2); }
.bb-handbook__chapters { margin: 0.4rem 0 0; padding: 0; list-style: none; counter-reset: ch; border-top: var(--hl); }
.bb-handbook__chapters li { counter-increment: ch; display: grid; grid-template-columns: 2rem 1fr; padding: 0.45rem 0; border-bottom: var(--hl-soft); font: 500 0.9375rem/1.3 var(--ff-display); }
.bb-handbook__chapters li::before { content: counter(ch, decimal-leading-zero); font: 500 0.6875rem/1.9 var(--ff-mono); color: var(--fg-3); }
.bb-handbook__chapters a { text-decoration: none; }
.bb-handbook__chapters a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.bb-linklist { margin: 0; padding: 0; list-style: none; border-top: var(--hr); }
.bb-linklist li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; border-bottom: var(--hl); }
.bb-linklist a { flex: 1; padding: 0.75rem 0; font: 600 1.125rem/1.25 var(--ff-display); font-stretch: 94%; text-decoration: none; }
.bb-linklist a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.bb-linklist span { font: 500 0.75rem/1 var(--ff-mono); color: var(--fg-3); white-space: nowrap; }
.bb-duels { margin: 0; padding: 0; list-style: none; border-top: var(--hr); }
.bb-duels li { border-bottom: var(--hl); }
.bb-duels a { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto; align-items: center; gap: 0.75rem; padding: 0.75rem 0; text-decoration: none; font: 700 1.125rem/1.2 var(--ff-display); font-stretch: 88%; }
.bb-duels__b { text-align: left; }
.bb-duels .bb-icon { color: var(--fg-3); }
.bb-duels a:hover .bb-icon { color: var(--fg); }
.bb-duels__vs { padding: 0.2rem 0.45rem; border: var(--hr); font: 600 0.6875rem/1 var(--ff-mono); }
.bb-duels a:hover .bb-duels__vs { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.bb-az__list { display: grid; grid-template-columns: repeat(9, 1fr); margin: 0; padding: 0; list-style: none; border-top: var(--hl); border-left: var(--hl); }
.bb-az__list li { border-right: var(--hl); border-bottom: var(--hl); }
.bb-az__list a, .bb-az__list span { display: grid; place-items: center; height: 3.25rem; font: 600 1rem/1 var(--ff-mono); text-decoration: none; }
.bb-az__list a:hover { background: var(--fg); color: var(--bg); }
.bb-az__list span { color: var(--line); }
/* =================== Archive =================== */
.bb-archive { padding-block: clamp(2rem, 4vw, 3rem) 0; }
.bb-archive__cats { margin-bottom: 1.25rem; }
.bb-archive__group + .bb-archive__group { margin-top: clamp(3rem, 6vw, 4.5rem); }
.bb-toolgrid { display: grid; gap: var(--gap); grid-template-columns: repeat(auto-fill, minmax(min(100%, 18.5rem), 1fr)); }
.bb-toolgrid .bb-toolcard[hidden] { display: none; }

/* Ratgeber-Archiv: Handbücher */
.bb-manuals { border-top: var(--hr); }
.bb-manual { display: grid; gap: 1.25rem 3rem; padding: clamp(1.5rem, 3vw, 2.25rem) 0; border-bottom: var(--hl); }
@media (min-width: 56em) { .bb-manual { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); } }
.bb-manual__no { font: 600 0.6875rem/1.2 var(--ff-mono); color: var(--c-ratgeber); margin-bottom: 0.6rem; }
.bb-manual__title { font-size: clamp(1.625rem, 1.3rem + 1.3vw, 2.375rem); font-stretch: 82%; font-weight: 760; line-height: 1.02; }
.bb-manual__title a { text-decoration: none; }
.bb-manual__title a:hover { text-decoration: underline; text-decoration-color: var(--accent); }
.bb-manual__text { margin-top: 0.75rem; font-size: 1.0625rem; line-height: 1.5; color: var(--fg-2); max-width: 32rem; }
.bb-manual__meta { margin-top: 0.9rem; font: 500 0.75rem/1.3 var(--ff-mono); color: var(--fg-3); }

/* Kapitelliste (Pillar, Archiv) */
.bb-chapters { margin: 0; padding: 0; list-style: none; counter-reset: chap; border-top: var(--hr); }
.bb-chapters li { counter-increment: chap; border-bottom: var(--hl); }
.bb-chapters a, .bb-chapters__current { display: grid; grid-template-columns: 2.75rem minmax(0, 1fr); gap: 0.15rem 0; padding: 0.8rem 0; text-decoration: none; }
.bb-chapters a::before, .bb-chapters__current::before { content: counter(chap, decimal-leading-zero); grid-row: span 2; font: 600 0.875rem/1.5 var(--ff-mono); color: var(--fg-3); }
.bb-chapters__t { font: 650 1.125rem/1.3 var(--ff-display); font-stretch: 94%; }
.bb-chapters__d { font-size: 0.9375rem; line-height: 1.45; color: var(--fg-2); }
.bb-chapters a:hover .bb-chapters__t { text-decoration: underline; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.bb-chapters__current { background: var(--bg-sunk); box-shadow: inset 4px 0 0 var(--accent); padding-left: 0.75rem; grid-template-columns: 2rem minmax(0, 1fr); }
.bb-chapters__current .bb-chapters__t::after { content: " · Du bist hier"; font: 500 0.6875rem/1 var(--ff-mono); color: var(--fg-3); }
.bb-chapters--compact .bb-chapters__d { display: none; }

.bb-handbook-nav { padding: 1rem 1.2rem; border: var(--hl); border-left: 4px solid var(--c-ratgeber); font-size: 1rem; }
.bb-handbook-nav__label { display: block; font: 600 0.6875rem/1.3 var(--ff-mono); color: var(--fg-3); margin-bottom: 0.3rem; }
.bb-handbook-nav a { font: 650 1.0625rem/1.3 var(--ff-display); }
.bb-prevnext { display: grid; gap: 1px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); border-top: var(--hr); }
.bb-prevnext a { display: grid; gap: 0.3rem; padding: 1rem 0; text-decoration: none; }
.bb-prevnext a:last-child:not(:first-child) { text-align: right; }
.bb-prevnext span { font: 600 0.6875rem/1.2 var(--ff-mono); color: var(--fg-3); }
.bb-prevnext b { font: 650 1.125rem/1.25 var(--ff-display); }
.bb-prevnext a:hover b { text-decoration: underline; text-decoration-color: var(--accent); }

/* =================== News =================== */
.bb-prose + .bb-news-hero, .bb-news-hero { margin-top: 0; }
.bb-news-hero img { width: 100%; border: var(--hl); }
.bb-newslist { display: grid; gap: 0 3rem; }
@media (min-width: 56em) { .bb-newslist--top { grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); } }
.bb-newslist--top > div:first-child { display: flex; } .bb-newslist--top > div:first-child > .bb-card { flex: 1; }
.bb-catnav { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 1.5rem; padding: 0; list-style: none; }
.bb-catnav a[aria-current] { background: var(--fg); color: var(--bg); border-color: var(--fg); }

/* =================== Thema =================== */
.bb-thema__nav { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 1.5rem; }

/* =================== Suche / 404 =================== */
.bb-searchform-lg { display: flex; max-width: 44rem; border: 2px solid var(--rule); background: var(--bg-raised); border-radius: var(--radius); margin-top: 1.5rem; }
.bb-searchform-lg input { flex: 1; min-width: 0; border: 0; background: none; padding: 0.8rem 1rem; font: 450 1.25rem/1.2 var(--ff-display); }
.bb-searchform-lg input:focus-visible { outline: none; }
.bb-searchform-lg:focus-within { outline: 2px solid var(--focus); outline-offset: 3px; }
.bb-searchform-lg .bb-btn { border-radius: 0; margin: -2px -2px -2px 0; }
.bb-results { margin: 0; padding: 0; list-style: none; border-top: var(--hr); max-width: 52rem; }
.bb-results .bb-card { border-top-color: var(--line); }
.bb-results li:first-child .bb-card { border-top: 0; }
.bb-404__code { font: 600 clamp(5rem, 3rem + 10vw, 11rem)/0.85 var(--ff-mono); letter-spacing: -0.06em; color: var(--fg); }
.bb-404__code span { color: var(--accent); }
.bb-entries { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); margin: 0; padding: 0; list-style: none; border-top: var(--hr); border-left: var(--hl); }
.bb-entries li { border-right: var(--hl); border-bottom: var(--hl); }
.bb-entries a { position: relative; display: grid; gap: 0.35rem; padding: 1rem 1.1rem 1.2rem; text-decoration: none; min-height: 7.5rem; }
.bb-entries a::before { content: ""; position: absolute; left: -1px; top: -1px; width: 2.25rem; height: 3px; background: var(--k); }
.bb-entries b { font: 720 1.375rem/1.1 var(--ff-display); font-stretch: 86%; }
.bb-entries span { font-size: 0.9375rem; line-height: 1.4; color: var(--fg-2); }
.bb-entries a:hover { background: var(--bg-raised); }
.bb-entries a:hover b { text-decoration: underline; text-decoration-color: var(--accent); }

.bb-mt-xl { margin-top: clamp(3rem, 6vw, 4.5rem); }
