/* Shared document blocks and accordions. Theme-neutral: a design sets, on :root or any parent,
   --doc-accent (button and links), --doc-surface (card; text on the filled button), --doc-line, --doc-text. */
.doc-block { color: var(--doc-text, inherit); margin: 2rem 0; min-width: 0; max-width: 100%; scroll-margin-top: var(--doc-scroll-offset, 5rem); }
.doc-block *, .faq-item * { box-sizing: border-box; }

/* card */
.doc-card { display: flex; flex-wrap: wrap; gap: 1rem 1.25rem; align-items: flex-start; padding: 1rem; background: var(--doc-surface, transparent); border: 2px solid var(--doc-line, currentColor); border-radius: .5rem; }
.doc-preview { flex: 0 1 11rem; max-width: 11rem; display: block; color: inherit; }
.doc-preview img { display: block; width: 100%; height: auto; background: #fff; border: 1px solid var(--doc-line, currentColor); }
.doc-info { flex: 1 1 15rem; min-width: 0; max-width: 100%; }
.doc-block .doc-title { margin: 0 0 .25rem; font-size: 1.3em; line-height: 1.25; }
.doc-block .doc-meta { margin: 0 0 .5rem; font-weight: 600; }
.doc-block .doc-desc, .doc-block .doc-todo { margin: 0 0 .5rem; }

/* buttons: selectors heavy enough for a design's own link rules */
.doc-block .doc-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: .9rem 0 0; }
a.doc-btn.doc-btn, .doc-block a.doc-btn { flex: 1 1 10rem; max-width: 22rem; display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: .5rem 1.1rem; border: 2px solid var(--doc-accent, currentColor); border-radius: .4rem; background: transparent; color: var(--doc-accent, inherit); font-weight: 600; text-align: center; text-decoration: none; }
a.doc-btn.doc-btn-primary, .doc-block a.doc-btn.doc-btn-primary { min-height: 52px; border-color: var(--doc-accent, CanvasText); background: var(--doc-accent, CanvasText); color: var(--doc-surface, Canvas); font-size: 1.1em; }
a.doc-btn:hover { text-decoration: underline; }
.doc-block a:focus-visible, .doc-block summary:focus-visible, .faq-item summary:focus-visible, .acc-toggle:focus-visible, .doc-table:focus-visible { outline: 3px solid var(--doc-accent, currentColor); outline-offset: 2px; }

/* accordions: FAQ, Statuten, Kyu tables, and the page images */
.faq-item, .doc-pages, .doc-reading-fold { min-width: 0; max-width: 100%; scroll-margin-top: var(--doc-scroll-offset, 5rem); }
.faq-item { border-top: 1px solid var(--doc-line, currentColor); }
.faq-item:last-child, .faq-item:not(:has(+ .faq-item)) { border-bottom: 1px solid var(--doc-line, currentColor); }
.faq-item > summary, .doc-pages > summary, .doc-reading-fold > summary { position: relative; display: block; min-height: 44px; padding: .65rem 2.25rem .65rem .25rem; font-weight: 600; line-height: 1.4; cursor: pointer; list-style: none; }
.faq-item > summary::-webkit-details-marker, .doc-pages > summary::-webkit-details-marker, .doc-reading-fold > summary::-webkit-details-marker { display: none; }
.faq-item > summary::after, .doc-pages > summary::after, .doc-reading-fold > summary::after { content: ""; position: absolute; right: .7rem; top: 1.05rem; width: .55rem; height: .55rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.faq-item[open] > summary::after, .doc-pages[open] > summary::after, .doc-reading-fold[open] > summary::after { top: 1.3rem; transform: rotate(-135deg); }
.faq-item > :not(summary) { margin-left: .25rem; margin-right: .25rem; }
.faq-item > :last-child:not(summary) { margin-bottom: 1rem; }
.doc-pages, .doc-reading-fold { margin-top: .75rem; border: 1px solid var(--doc-line, currentColor); border-radius: .4rem; background: var(--doc-surface, transparent); }
.doc-pages > summary, .doc-reading-fold > summary { padding-left: 1rem; }
.acc-tools { margin: 1rem 0 .5rem; }
.acc-toggle { min-height: 44px; padding: .4rem 1rem; border: 2px solid var(--doc-accent, currentColor); border-radius: .4rem; background: transparent; color: var(--doc-accent, inherit); font: inherit; font-weight: 600; cursor: pointer; }
.acc-toggle:hover { text-decoration: underline; }
@media (prefers-reduced-motion: no-preference) {
  .faq-item > summary::after, .doc-pages > summary::after, .doc-reading-fold > summary::after { transition: transform .15s ease; }
}

/* page images */
.doc-page-list { display: grid; grid-template-columns: minmax(0, 1fr); gap: .75rem; list-style: none; margin: 0; padding: .25rem .75rem .75rem; }
.doc-page-list li { margin: 0; padding: 0; }
.doc-page-list img { display: block; width: 100%; max-width: 50rem; height: auto; margin: 0 auto; background: #fff; border: 1px solid var(--doc-line, currentColor); }

/* reading versions */
.doc-reading { margin-top: 1.25rem; min-width: 0; max-width: 100%; }
.doc-reading-fold > .doc-reading { margin-top: .25rem; padding: 0 1rem 1rem; }
.doc-block .doc-note { margin: 0 0 .75rem; padding: .5rem .75rem; border-left: 4px solid var(--doc-accent, currentColor); font-weight: 600; }
.doc-block .doc-reading-title { margin: 0 0 1rem; font-size: 1.05em; }
.doc-letters { list-style: none; padding-left: 0; }
.doc-letters li { padding-left: 1.6em; text-indent: -1.6em; margin: .2em 0; }
.doc-block .doc-table-title { margin: 1rem 0 .4rem; font-size: 1em; }

/* tables scroll inside their own box */
.doc-table { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.doc-table table { width: 100%; min-width: 30rem; border-collapse: collapse; margin: 0; }
.doc-table-small table { min-width: 18rem; }
.doc-table th, .doc-table td { padding: .35rem .6rem; border: 1px solid var(--doc-line, currentColor); text-align: left; vertical-align: top; font-weight: normal; }
.doc-table thead th, .doc-table tbody th { font-weight: 700; }
.doc-table ruby { ruby-position: over; ruby-align: center; }
.doc-table rt { font-size: .62em; }

/* Designed pages: Beitritt (.join-*), Kosten (.fee-*), Aktuelles (.news-board, .nb-*). Same tokens as above. Every design may restyle these; the class names stay. */
.join-steps *, .fee-cards *, .news-board * { box-sizing: border-box; }
.join-lead, .fee-lead { margin: 1rem 0 1.5rem; padding: .85rem 1rem; border-left: 4px solid var(--doc-accent, currentColor); background: var(--doc-surface, transparent); font-size: 1.1em; }
.join-lead-label { display: block; margin-bottom: .15rem; }

/* Beitritt: numbered path */
.join-steps { list-style: none; counter-reset: join; margin: 1.25rem 0 2rem; padding: 0; min-width: 0; }
.join-step { position: relative; counter-increment: join; min-width: 0; margin: 0; padding: 0 0 1.75rem 3.1rem; scroll-margin-top: var(--doc-scroll-offset, 5rem); }
.join-step::before { content: counter(join); position: absolute; left: 0; top: 0; display: flex; align-items: center; justify-content: center; width: 2.25rem; height: 2.25rem; border-radius: 50%; background: var(--doc-accent, CanvasText); color: var(--doc-surface, Canvas); font-weight: 700; }
.join-step::after { content: ""; position: absolute; left: calc(1.125rem - 1px); top: 2.5rem; bottom: .25rem; border-left: 2px solid var(--doc-line, currentColor); }
.join-step:last-child { padding-bottom: 0; }
.join-step:last-child::after { display: none; }
.join-steps .join-label { margin: .2rem 0 .4rem; font-size: 1.2em; line-height: 1.3; }
.join-step > p { margin: 0 0 .6rem; }
.join-step .doc-block { margin: 1rem 0 0; }
.join-bank, .fee-bank { display: block; max-width: 26rem; margin: .75rem 0 0; padding: .75rem 1rem; background: var(--doc-surface, transparent); border: 1px solid var(--doc-line, currentColor); border-radius: .4rem; line-height: 1.6; font-variant-numeric: tabular-nums; }

/* Kosten: fee cards, one column on phones, three on desktop */
.fee-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; list-style: none; margin: 1rem 0 2rem; padding: 0; }
.fee-card { display: flex; flex-direction: column; gap: .35rem; min-width: 0; margin: 0; padding: 1.1rem; background: var(--doc-surface, transparent); border: 2px solid var(--doc-line, currentColor); border-radius: .5rem; color: var(--doc-text, inherit); }
.fee-cards .fee-name { margin: 0 0 .25rem; font-size: 1.05em; line-height: 1.3; }
.fee-cards .fee-card p { margin: 0; }
.fee-cards .fee-card .fee-price { color: var(--doc-accent, inherit); font-size: 2rem; font-weight: 700; line-height: 1.15; }
.fee-cards .fee-card .fee-reduced { font-weight: 600; }
.fee-cards .fee-card .fee-note { margin-top: .35rem; }
.fee-section { margin: 1.75rem 0; padding-top: 1.25rem; border-top: 1px solid var(--doc-line, currentColor); scroll-margin-top: var(--doc-scroll-offset, 5rem); }
.fee-section h2 { margin-top: 0; }
@media (min-width: 56rem) { .fee-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }

/* Aktuelles: newest item, next trainings, timeline by year */
.news-board { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; min-width: 0; color: var(--doc-text, inherit); }
.news-board [hidden] { display: none !important; }
.nb-feature, .nb-next { min-width: 0; padding: 1.1rem; background: var(--doc-surface, transparent); border: 2px solid var(--doc-line, currentColor); border-radius: .5rem; scroll-margin-top: var(--doc-scroll-offset, 5rem); }
.nb-feature { border-color: var(--doc-accent, currentColor); }
.nb-timeline { grid-column: 1 / -1; min-width: 0; }
.news-board p { margin: 0 0 .5rem; }
.nb-eyebrow { font-weight: 700; color: var(--doc-accent, inherit); }
.news-board .nb-feature-title { margin: 0 0 .35rem; font-size: 1.5em; line-height: 1.25; }
.nb-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem .6rem; }
.nb-date, .nb-age { font-weight: 600; }
.nb-kind { display: inline-block; padding: .05rem .5rem; border: 1px solid var(--doc-line, currentColor); border-radius: .3rem; font-size: .9em; }
.nb-kind-entfall { border: 2px solid var(--doc-accent, currentColor); font-weight: 600; }
.nb-feature-title a, .nb-title a, a.nb-all { display: inline-flex; align-items: center; min-height: 44px; }
.nb-body { min-width: 0; overflow-wrap: anywhere; }
.nb-body pre { white-space: pre-wrap; font: inherit; margin: 0 0 .5rem; }
.nb-body ul { margin: .25rem 0 .5rem; padding-left: 1.25rem; }
.news-board .nb-next-title, .news-board .nb-timeline-title { margin: 0 0 .5rem; font-size: 1.2em; line-height: 1.3; }
.nb-sessions { list-style: none; margin: 0 0 .6rem; padding: 0; }
.nb-session { margin: 0; padding: .5rem 0; border-top: 1px solid var(--doc-line, currentColor); }
.nb-when, .nb-type, .nb-where { display: block; }
.nb-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 .5rem; }
.nb-chip { min-height: 44px; padding: .4rem .9rem; border: 2px solid var(--doc-accent, currentColor); border-radius: 999px; background: transparent; color: var(--doc-accent, inherit); font: inherit; font-weight: 600; cursor: pointer; }
.nb-chip[aria-pressed="true"] { background: var(--doc-accent, CanvasText); color: var(--doc-surface, Canvas); }
.nb-chip:hover { text-decoration: underline; }
.nb-status:empty { display: none; }
.nb-year { min-width: 0; border-top: 1px solid var(--doc-line, currentColor); }
.nb-year:last-child { border-bottom: 1px solid var(--doc-line, currentColor); }
.nb-year > summary { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: .1rem .75rem; min-height: 44px; padding: .5rem 2.25rem .5rem .25rem; cursor: pointer; list-style: none; }
.nb-year > summary::-webkit-details-marker { display: none; }
.nb-year > summary::after { content: ""; position: absolute; right: .7rem; top: 1rem; width: .55rem; height: .55rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.nb-year[open] > summary::after { top: 1.25rem; transform: rotate(-135deg); }
.nb-year-label { font-size: 1.2em; font-weight: 700; }
.nb-list { list-style: none; margin: 0 0 .75rem; padding: 0; }
.nb-item { position: relative; margin: 0; padding: .6rem 0 .6rem 1.1rem; border-left: 2px solid var(--doc-line, currentColor); scroll-margin-top: var(--doc-scroll-offset, 5rem); }
.nb-item::before { content: ""; position: absolute; left: -.4rem; top: 1.05rem; width: .7rem; height: .7rem; border-radius: 50%; background: var(--doc-accent, currentColor); }
.news-board .nb-title { margin: 0; font-size: 1.05em; line-height: 1.3; }
.nb-feature-title a:focus-visible, .nb-title a:focus-visible, a.nb-all:focus-visible, .nb-chip:focus-visible, .nb-year > summary:focus-visible, .nb-body a:focus-visible, .fee-section a:focus-visible { outline: 3px solid var(--doc-accent, currentColor); outline-offset: 2px; }
@media (min-width: 56rem) { .news-board { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; } }

/* Benefits on the Mitgliedschaft section: a real list instead of typed bullets */
.benefit-list{list-style:none;margin:1rem 0;padding:0;display:grid;gap:.6rem;grid-template-columns:minmax(0,1fr)}
.benefit-list li{margin:0;padding:.7rem .9rem;border:1px solid var(--doc-line,currentColor);border-radius:6px;background:var(--doc-surface,transparent)}
@media (min-width:48rem){.benefit-list{grid-template-columns:repeat(2,minmax(0,1fr))}}

/* Zeiten & Orte: the overview at the top (lib.php schedule_overview), one link per session */
.sched-overview { list-style: none; margin: 1rem 0 1.5rem; padding: 0; border-top: 1px solid var(--doc-line, currentColor); color: var(--doc-text, inherit); }
.so-item { margin: 0; padding: 0; border-bottom: 1px solid var(--doc-line, currentColor); }
a.so-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0 .9rem; min-height: 44px; padding: .45rem .25rem; color: inherit; text-decoration: none; font-variant-numeric: tabular-nums; }
.so-when { flex: 1 0 100%; color: var(--doc-accent, inherit); text-decoration: underline; text-underline-offset: .15em; }
.so-where { font-weight: 600; }
a.so-row:focus-visible { outline: 3px solid var(--doc-accent, currentColor); outline-offset: 2px; }
.sl-session { scroll-margin-top: var(--doc-scroll-offset, 5rem); }
@media (min-width: 40rem) { a.so-row { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 11rem) minmax(0, 1fr); } .so-when { flex: none; } }

/* Contact form: errors and the anchor it posts to */
.sl-form-wrap, .sl-form-errors { scroll-margin-top: var(--doc-scroll-offset, 5rem); }
.sl-form-errors { margin: 0 0 1rem; padding: .75rem 1rem; border-left: 4px solid var(--doc-accent, currentColor); }
.sl-form-errors p { margin: 0 0 .25rem; }
.sl-form-errors ul { margin: 0; padding: 0 0 0 1.25rem; }
.sl-form-errors a { display: inline-flex; align-items: center; min-height: 44px; }
.sl-form-errors:focus { outline: 3px solid var(--doc-accent, currentColor); outline-offset: 2px; }
.sl-field-err { display: block; margin-top: .25rem; font-weight: 600; }
.sl-form [aria-invalid="true"] { border: 2px solid currentColor; }

/* One line for every IBAN; a little smaller on the narrowest phones, so it never widens the page */
.iban { white-space: nowrap; font-size: min(1em, 4.3vw); }

/* Kontakt: address and bank columns stack on phones */
@media (max-width: 40rem) { .contact-info table, .contact-info tbody, .contact-info tr, .contact-info td { display: block; width: auto; } .contact-info td + td { margin-top: 1rem; } }
