/* Serviceportal – öffentliches Portal
   Leitidee: der Wegweiser im Rathausfoyer. Ruhige, klare Flächen; ein markantes Element (die Themen-Tafel).
   Keine externen Schriften oder Dienste (Datenschutz). BITV 2.0 / WCAG 2.1 AA. */
:root {
  --primary: #0a5c7a;
  --primary-dark: #07445b;
  --ink: #14202a;
  --ink-soft: #2a3944;
  --muted: #4a5a65;
  --line: #d2dce2;
  --mist: #eef3f6;
  --paper: #ffffff;
  --online: #12734f;
  --online-bg: #e6f4ee;
  --focus: #ffbf47;
  --note-bg: #fff6dc;
  --note-line: #e9d597;
  --radius: 4px;
  --measure: 68ch;
  --font: "Segoe UI Variable Text", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  --font-head: "Segoe UI Variable Display", "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }
body { margin: 0; font-family: var(--font); font-size: var(--base-size, 1.0625rem); line-height: 1.6; color: var(--ink); background: var(--paper); }
img, svg { max-width: 100%; }
a { color: var(--primary); text-underline-offset: .2em; text-decoration-thickness: 1px; }
a:hover { color: var(--primary-dark); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 6px var(--ink); border-radius: 2px; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.15; margin: 1.6em 0 .5em; letter-spacing: -.012em; font-weight: 700; }
h1 { font-size: clamp(1.9rem, 1.3rem + 2.4vw, 2.85rem); margin-top: .3em; letter-spacing: -.025em; }
h2 { font-size: 1.45rem; }
h3 { font-size: 1.12rem; }
p, ul, ol { margin: 0 0 1em; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 1rem; top: -4rem; background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 10; }
.skip:focus { top: 1rem; color: #fff; }
.wrap { max-width: 74rem; margin: 0 auto; padding: 0 1.25rem; }

/* Kopf */
.banner { background: var(--note-bg); border-bottom: 1px solid var(--note-line); padding: .65rem 0; font-size: .97rem; }
.banner p:last-child { margin: 0; }
.site-head { background: var(--paper); border-bottom: 1px solid var(--line); }
.site-head .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem 2rem; padding-top: .85rem; padding-bottom: .85rem; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--ink); }
.brand-mark { display: grid; place-items: center; width: 2.6rem; height: 2.6rem; background: var(--primary); color: #fff; font-family: var(--font-head);
  font-weight: 800; font-size: 1.35rem; border-radius: var(--radius); flex: none; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-family: var(--font-head); font-size: 1.22rem; letter-spacing: -.01em; }
.brand-text span { color: var(--muted); font-size: .9rem; }
.brand:hover strong { color: var(--primary); }
.main-nav ul { display: flex; flex-wrap: wrap; gap: .15rem; list-style: none; margin: 0; padding: 0; }
.main-nav a { display: block; padding: .5rem .75rem; text-decoration: none; color: var(--ink); font-weight: 600; border-radius: var(--radius); }
.main-nav a:hover { background: var(--mist); color: var(--ink); }
.main-nav a[aria-current="page"] { color: var(--primary); box-shadow: inset 0 -3px 0 var(--primary); border-radius: 0; }

.crumbs { font-size: .9rem; color: var(--muted); padding: .9rem 0 0; }
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .25rem .5rem; margin: 0; padding: 0; }
.crumbs li + li::before { content: "›"; margin-right: .5rem; color: var(--muted); }
main { display: block; padding-bottom: 3.5rem; }
main:focus { outline: none; }

/* Startseite */
.hero { background: var(--primary); color: #fff; padding: clamp(2.2rem, 5vw, 4.2rem) 0 clamp(2.4rem, 5vw, 3.8rem); }
.hero h1 { color: #fff; margin: 0 0 1rem; font-size: clamp(2.1rem, 1.3rem + 3.4vw, 3.6rem); max-width: 16ch; }
.hero .intro { max-width: 54ch; font-size: 1.12rem; color: #e7f1f5; }
.hero .intro p:last-child { margin-bottom: 0; }
.search { position: relative; display: flex; max-width: 46rem; margin-top: 1.4rem; background: #fff; border-radius: var(--radius); box-shadow: 0 0 0 5px rgba(255,255,255,.16); }
.search input { flex: 1; min-width: 0; font: inherit; font-size: 1.2rem; padding: 1rem 1.1rem; border: 0; border-radius: var(--radius) 0 0 var(--radius); color: var(--ink); background: transparent; }
.search input::placeholder { color: #6b7a84; }
.search button { display: flex; align-items: center; gap: .5rem; font: inherit; font-weight: 700; border: 0; padding: 0 1.5rem; background: var(--ink); color: #fff; border-radius: 0 var(--radius) var(--radius) 0; cursor: pointer; }
.search button:hover { background: #000; }
.search-inline { box-shadow: none; border: 2px solid var(--ink); margin: 1rem 0 1.5rem; }
.suggest { position: absolute; top: 100%; left: 0; right: 0; margin: .3rem 0 0; padding: .3rem 0; list-style: none; background: #fff; color: var(--ink);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 28px rgba(10,30,40,.2); z-index: 5; }
.suggest a { display: block; padding: .55rem 1.1rem; text-decoration: none; color: var(--ink); }
.suggest a:hover, .suggest [aria-selected="true"] a { background: var(--mist); }
.chips { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; padding: 0; margin: 1.2rem 0 0; }
.chips a { display: inline-block; padding: .3rem .8rem; border: 1px solid rgba(255,255,255,.55); border-radius: 999px; color: #fff; text-decoration: none; font-size: .95rem; }
.chips a:hover { background: #fff; color: var(--primary-dark); }
.chips-label { font-size: .95rem; color: #d6e7ee; margin: 1.3rem 0 0; }

.home-grid { display: grid; gap: 2.5rem; grid-template-columns: 1fr; padding-top: 2.75rem; }
@media (min-width: 60rem) { .home-grid { grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); align-items: start; } }
.home-grid h2 { margin-top: 0; }

/* Die Wegweiser-Tafel (Themen) */
.board { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 1.4rem 1.5rem 1rem; }
.board h2 { color: #fff; font-size: 1.05rem; letter-spacing: .02em; font-weight: 600; margin: 0 0 .6rem; color: #b9c9d2; }
.board ul { list-style: none; margin: 0; padding: 0; columns: 1; column-gap: 2rem; }
@media (min-width: 40rem) { .board ul { columns: 2; } }
.board li { break-inside: avoid; border-top: 1px solid rgba(255,255,255,.14); }
.board a { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .62rem 0; color: #fff; text-decoration: none; font-weight: 600; font-size: 1.08rem; }
.board a:hover { color: var(--focus); }
.board a:hover .count { color: var(--focus); }
.board .count { font-variant-numeric: tabular-nums; color: #9fb4bf; font-weight: 500; font-size: .95rem; }
.board .more { display: inline-block; margin: .8rem 0 .2rem; color: #d6e5ec; }

.online-list { list-style: none; margin: 0; padding: 0; }
.online-list li { border-bottom: 1px solid var(--line); }
.online-list a { display: flex; gap: .7rem; align-items: baseline; padding: .7rem 0; text-decoration: none; color: var(--ink); font-weight: 600; }
.online-list a::before { content: ""; flex: none; width: .55rem; height: .55rem; border-radius: 50%; background: var(--online); transform: translateY(-.1em); }
.online-list a:hover { color: var(--primary); }
.contact-card { margin-top: 2rem; padding: 1.2rem 1.3rem; background: var(--mist); border-radius: var(--radius); }
.contact-card h2 { font-size: 1.1rem; margin: 0 0 .5rem; }
.contact-card address { font-style: normal; }

.section { padding: 2.5rem 0 0; }
.lead-in { max-width: var(--measure); color: var(--ink-soft); font-size: 1.1rem; }

/* Listen */
.topics { list-style: none; padding: 0; margin: 0; columns: 1; column-gap: 2.5rem; }
@media (min-width: 40rem) { .topics { columns: 2; } }
@media (min-width: 64rem) { .topics { columns: 3; } }
.topics li { break-inside: avoid; border-top: 1px solid var(--line); }
.topics a { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: .8rem 0; text-decoration: none; font-weight: 600; font-size: 1.08rem; color: var(--ink); }
.topics a:hover { color: var(--primary); }
.topics .count { color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }
.results { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.results > li { padding: 1.05rem 0; border-bottom: 1px solid var(--line); }
.results h3 { margin: 0 0 .3rem; font-size: 1.15rem; }
.results h3 a { text-decoration: none; }
.results h3 a:hover { text-decoration: underline; }
.results p { margin: 0; color: var(--muted); max-width: var(--measure); }
.results .meta { font-size: .9rem; margin-top: .35rem; }
.badge-online { display: inline-block; font-size: .78rem; font-weight: 700; color: var(--online); background: var(--online-bg); border-radius: 999px; padding: .05rem .6rem; margin-left: .5rem; vertical-align: .12em; }
.result-count { color: var(--muted); }

.az { display: flex; flex-wrap: wrap; gap: .3rem; list-style: none; padding: 0; margin: 1rem 0 2rem; }
.az a { display: inline-flex; align-items: center; justify-content: center; min-width: 2.5rem; height: 2.5rem; padding: 0 .5rem; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; font-weight: 700; color: var(--ink); }
.az a:hover { border-color: var(--ink); }
.az a[aria-current="page"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.az-group { display: grid; grid-template-columns: 1fr; gap: 0 2rem; padding: 1rem 0; border-top: 1px solid var(--line); }
@media (min-width: 48rem) { .az-group { grid-template-columns: 4rem 1fr; } }
.az-group h2 { font-size: 2rem; margin: 0; color: var(--primary); line-height: 1; }
.az-group ul { list-style: none; padding: 0; margin: 0; columns: 1; }
@media (min-width: 48rem) { .az-group ul { columns: 2; column-gap: 2.5rem; } }
.az-group li { padding: .28rem 0; break-inside: avoid; }

/* Leistungsseite */
.service-head { padding: .6rem 0 0; }
.service-head .alt { color: var(--muted); margin-top: -.3rem; font-size: 1.1rem; }
.service-head .lead { font-size: 1.2rem; max-width: 62ch; color: var(--ink-soft); }
.service-head .lead p:last-child { margin-bottom: 0; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0; margin: 1.6rem 0 1.4rem; border-top: 3px solid var(--ink); border-bottom: 1px solid var(--line); }
.facts div { padding: .8rem 1rem .9rem 0; }
.facts dt { font-size: .88rem; color: var(--muted); margin-bottom: .15rem; }
.facts dd { margin: 0; font-weight: 600; line-height: 1.35; }
.facts .yes { color: var(--online); }
.service-body { display: grid; gap: 2.75rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 62rem) { .service-body { grid-template-columns: minmax(0, 1fr) 22rem; } }
.toc { margin: 0 0 1.5rem; font-size: .95rem; }
.toc ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .4rem; }
.toc a { display: inline-block; padding: .25rem .7rem; border: 1px solid var(--line); border-radius: 999px; text-decoration: none; color: var(--ink); }
.toc a:hover { border-color: var(--ink); }
.module { max-width: var(--measure); }
.module + .module { border-top: 1px solid var(--line); }
.module > h2 { margin-top: 1.4em; }
.module table { border-collapse: collapse; width: 100%; margin: 0 0 1em; font-size: .97rem; }
.module th, .module td { border: 1px solid var(--line); padding: .45rem .65rem; text-align: left; vertical-align: top; }
.module th { background: var(--mist); }
.module.checklist ul, .acc.checklist .acc-body > ul { list-style: none; padding: 0; }
.module.checklist li, .acc.checklist .acc-body > ul > li { position: relative; padding-left: 2rem; margin: .45rem 0; }
.module.checklist li::before, .acc.checklist .acc-body > ul > li::before { content: ""; position: absolute; left: 0; top: .2em; width: 1.15rem; height: 1.15rem; border: 2px solid var(--ink); border-radius: 3px; }
.tools { display: flex; gap: 1rem; flex-wrap: wrap; margin: 2rem 0 0; font-size: .95rem; }
.linkbutton { font: inherit; background: none; border: 0; padding: 0; color: var(--primary); text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.aside { position: sticky; top: 1rem; display: grid; gap: 1.25rem; }
.box { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.15rem 1.25rem; background: var(--paper); }
.box h2 { font-size: 1.05rem; margin: 0 0 .7rem; }
.box h3 { font-size: .98rem; margin: 1rem 0 .3rem; }
.box p { margin: 0 0 .5rem; }
.box dl { margin: .5rem 0 0; display: grid; grid-template-columns: auto 1fr; gap: .2rem .8rem; }
.box dt { color: var(--muted); }
.box dd { margin: 0; overflow-wrap: anywhere; }
.box-online { border: 0; background: var(--online-bg); }
.box-online h2 { color: var(--online); }
.btn { display: inline-block; font: inherit; font-weight: 700; padding: .75rem 1.15rem; border-radius: var(--radius); background: var(--primary); color: #fff; text-decoration: none; border: 0; cursor: pointer; }
.btn:hover { background: var(--primary-dark); color: #fff; }
.btn-online { background: var(--online); display: block; text-align: center; }
.btn-online:hover { background: color-mix(in srgb, var(--online) 80%, #000); }
.btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--ink); display: block; text-align: center; }
.btn-ghost:hover { background: var(--ink); color: #fff; }
.box .btn + .btn, .box p + p .btn { margin-top: .5rem; }
.ou-role { font-size: .88rem; color: var(--muted); margin: 0 0 .2rem; }
.contacts { list-style: none; padding: 0; margin: 0; }
.contacts li + li { margin-top: .9rem; padding-top: .9rem; border-top: 1px solid var(--line); }
.doclist { list-style: none; padding: 0; margin: 0 0 1em; }
.doclist li { padding: .6rem 0; border-bottom: 1px solid var(--line); }
.doclist .type { color: var(--muted); font-size: .9rem; }
.preview-note { background: var(--note-bg); border: 1px solid var(--note-line); padding: .75rem 1rem; border-radius: var(--radius); margin: 1rem 0; }
.stand { color: var(--muted); font-size: .9rem; margin-top: 2rem; }

.units { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--line); }
.units li { padding: .45rem 0; border-bottom: 1px solid var(--line); }
.units .d1 { padding-left: 1.4rem; } .units .d2 { padding-left: 2.8rem; } .units .d3 { padding-left: 4.2rem; } .units .d4 { padding-left: 5.6rem; }
@media (max-width: 30rem) { .units .d1 { padding-left: .8rem; } .units .d2 { padding-left: 1.6rem; } .units .d3 { padding-left: 2.4rem; } .units .d4 { padding-left: 3.2rem; } }
.units .d0 > a, .units .d1 > a { font-weight: 700; }
.units .kurz { display: inline-block; min-width: 3rem; color: var(--muted); font-variant-numeric: tabular-nums; }

.pager { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: 1.5rem; list-style: none; padding: 0; align-items: center; }
.pager a, .pager span { padding: .45rem .85rem; border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; }
.pager [aria-current] { border-color: transparent; color: var(--muted); }
.empty { padding: 1.4rem 1.5rem; background: var(--mist); border-radius: var(--radius); }
.empty p:last-child { margin: 0; }

/* Fuß */
.site-foot { background: var(--ink); color: #d5e0e6; margin-top: 3rem; padding: 2.5rem 0 2rem; font-size: .95rem; }
.site-foot a { color: #fff; }
.site-foot .wrap { display: grid; gap: 1.5rem 3rem; grid-template-columns: 1fr; }
@media (min-width: 48rem) { .site-foot .wrap { grid-template-columns: 2fr 1fr; } }
.site-foot strong { color: #fff; font-size: 1.05rem; }
.site-foot ul { list-style: none; padding: 0; margin: 0; }
.site-foot li { margin: .25rem 0; }
.site-foot address { font-style: normal; margin-top: .4rem; }

@media print {
  .site-head nav, .search, .site-foot, .skip, .toc, .banner, .tools, .crumbs { display: none !important; }
  .service-body { grid-template-columns: 1fr; }
  a { color: inherit; }
  .aside { position: static; }
  .box { break-inside: avoid; }
  .facts { border-top-width: 1px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } }
@media (forced-colors: active) { .btn, .badge-online, .brand-mark { border: 1px solid; } .board { border: 1px solid; } }

/* Hauptnavigation auf kleinen Bildschirmen: alle Einträge sichtbar im Raster (kein verstecktes Wischen) */
@media (max-width: 47.99rem) {
  .main-nav { width: 100%; }
  .main-nav ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .15rem; }
  .main-nav a { padding: .55rem .3rem; font-size: .9rem; text-align: center; line-height: 1.25; border-radius: var(--radius); }
  .main-nav a[aria-current="page"] { background: var(--mist); box-shadow: inset 0 -3px 0 var(--primary); border-radius: var(--radius) var(--radius) 0 0; }
}
@media (max-width: 21rem) { .main-nav ul { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---- Icons (Sprite aus /icons.svg; Set und Stil in der Redaktion unter „Darstellung“) ---- */
.i { width: 1.15em; height: 1.15em; flex: none; vertical-align: -.2em; fill: currentColor; }
.with-i { display: flex; align-items: center; gap: .5em; }
span.with-i { display: inline-flex; }
h1.with-cat { display: flex; align-items: center; gap: .6rem; }
h1.with-cat .i-cat { width: 1.1em; height: 1.1em; color: var(--primary); }
.ilist { display: grid; gap: .45rem; }
.ilist > span { display: flex; gap: .6rem; align-items: flex-start; }
.ilist > span > .i { margin-top: .22em; color: var(--primary); }
.site-foot .i { opacity: .8; }
.search button .i { width: 1.25em; height: 1.25em; }
.board a .label, .topics a .label { flex: 1; }
.board a .i-cat { width: 1.45rem; height: 1.45rem; color: color-mix(in srgb, var(--primary) 30%, #fff); }
.board a:hover .i-cat { color: var(--focus); }
.topics a .i-cat { box-sizing: content-box; width: 1.4rem; height: 1.4rem; padding: .45rem; border-radius: var(--radius); background: var(--mist); color: var(--primary); }
.topics a:hover .i-cat { background: var(--primary); color: #fff; }
.online-list a:has(> .i)::before { display: none; }
.online-list a > .i { color: var(--online); transform: translateY(.18em); }
.badge-online .i { width: 1em; height: 1em; margin-right: .25em; vertical-align: -.15em; }
.meta.with-i { gap: .4em; }
.meta.with-i .i { color: var(--muted); }
.facts div:has(> .i) { display: grid; grid-template-columns: auto 1fr; column-gap: .65rem; align-content: start; }
.facts div > .i { grid-row: span 2; width: 1.6rem; height: 1.6rem; margin-top: .1rem; color: var(--primary); }
.facts div:has(.yes) > .i { color: var(--online); }
.doclist li:has(> .i) { position: relative; padding-left: 1.9rem; }
.doclist li > .i { position: absolute; left: 0; top: .85rem; color: var(--primary); }
.box h2.with-i .i { width: 1.3em; height: 1.3em; }
.btn .i { width: 1.2em; height: 1.2em; }
.btn-online:has(> .i), .btn-ghost:has(> .i) { display: flex; align-items: center; justify-content: center; gap: .5rem; }
.linkbutton:has(> .i) { display: inline-flex; align-items: center; gap: .4em; }
h2.with-i .i, h3.with-i .i { color: var(--primary); }
.contacts .with-i .i { color: var(--muted); }

/* ---- Logo ---- */
.brand-logo { display: block; height: 2.8rem; width: auto; max-width: 11rem; object-fit: contain; }
.logo-only .brand-logo { height: 3.3rem; max-width: 16rem; }
.logo-only .brand-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
@media print { .i { display: none; } }

/* ================= Layouts (Redaktion → Darstellung) ================= */
.action-items { display: grid; gap: .6rem; }
.action-note { margin-top: .4rem; font-size: .95rem; }
.action-note p { margin: 0; }
.sec-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: .3rem 1rem; margin-bottom: 1rem; }
.sec-head h2 { margin: 0; }

/* --- Startseite „Kacheln“ --- */
.hero-center { text-align: center; }
.hero-center h1, .hero-center .intro { margin-left: auto; margin-right: auto; }
.hero-center h1 { max-width: 22ch; }
.hero-center .search { margin-left: auto; margin-right: auto; text-align: left; }
.hero-center .chips { justify-content: center; }
.home-sections { display: grid; gap: 2.8rem; padding-top: 2.6rem; }
.tiles { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14.5rem), 1fr)); }
.tile { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .9rem; align-items: center; height: 100%; box-sizing: border-box;
  padding: 1rem 1.1rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.tile:hover { border-color: var(--primary); box-shadow: 0 4px 14px rgba(0,0,0,.07); }
.tile-ic { grid-row: span 2; display: grid; place-items: center; width: 3.1rem; height: 3.1rem; border-radius: var(--radius); background: var(--mist); color: var(--primary); }
.tile-ic .i-cat { width: 1.7rem; height: 1.7rem; }
.tile:hover .tile-ic { background: var(--primary); color: #fff; }
.tile-name { font-weight: 700; line-height: 1.25; align-self: end; }
.tile-count { font-size: .9rem; color: var(--muted); align-self: start; }
.tile:not(:has(.i-cat)) { grid-template-columns: 1fr; } .tile-ic:empty { display: none; }
.pills { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.pills a { display: inline-flex; align-items: center; gap: .45rem; padding: .45rem .9rem; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 600; }
.pills a:hover { border-color: var(--primary); color: var(--primary); }
.pills .i-cat { width: 1.15rem; height: 1.15rem; color: var(--primary); }
.ocards { list-style: none; margin: 0; padding: 0; display: grid; gap: .9rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr)); }
.ocard { display: flex; flex-direction: column; gap: .5rem; height: 100%; box-sizing: border-box; padding: 1rem 1.1rem; border-radius: var(--radius); background: var(--online-bg); color: var(--ink); text-decoration: none; border: 1px solid transparent; }
.ocard > .i { width: 1.6rem; height: 1.6rem; color: var(--online); }
.ocard-name { font-weight: 700; line-height: 1.3; flex: 1; }
.ocard-go { display: inline-flex; align-items: center; gap: .35rem; color: var(--online); font-weight: 700; font-size: .95rem; }
.ocard:hover { border-color: var(--online); }
.contact-band { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 2rem; padding: 1.1rem 1.3rem; background: var(--mist); border-radius: var(--radius); }
.contact-band h2 { margin: 0; font-size: 1.15rem; }
.contact-band address { display: flex; flex-wrap: wrap; gap: .4rem 1.6rem; font-style: normal; }
.contact-band .i { color: var(--primary); }

/* --- Startseite „Verzeichnis“ --- */
.search-hero { background: var(--mist); border-bottom: 1px solid var(--line); padding: clamp(2rem, 5vw, 3.6rem) 0 clamp(1.6rem, 4vw, 2.6rem); }
.search-hero h1 { margin: 0 0 .6rem; font-size: clamp(1.9rem, 1.3rem + 2.4vw, 3rem); }
.search-hero .intro { max-width: 60ch; color: var(--ink-soft); }
.search-hero .intro p:last-child { margin-bottom: 0; }
.search-hero .search { max-width: none; box-shadow: 0 0 0 2px var(--ink); }
.search-hero .search button { background: var(--primary); }
.search-hero .search button:hover { background: var(--primary-dark); }
.az-compact { margin: 1.2rem 0 0; gap: .25rem; }
.az-compact a { min-width: 2.1rem; height: 2.1rem; background: var(--paper); }
.dir-grid { display: grid; gap: 2.2rem; grid-template-columns: 1fr; padding-top: 2.4rem; }
@media (min-width: 56rem) { .dir-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.dir-grid h2 { margin-top: 0; font-size: 1.25rem; padding-bottom: .5rem; border-bottom: 3px solid var(--ink); }
.linklist { list-style: none; margin: 0 0 1rem; padding: 0; }
.linklist li { border-bottom: 1px solid var(--line); }
.linklist a { display: flex; align-items: flex-start; gap: .55rem; padding: .55rem 0; color: var(--primary); font-weight: 600; text-decoration: none; }
.linklist a:hover span:not(.count) { text-decoration: underline; }
.linklist a > .i { margin-top: .2em; color: var(--muted); }
.linklist a > span:first-of-type { flex: 1; }
.linklist .count { color: var(--muted); font-weight: 400; font-size: .9rem; }
.dir-grid .contact-card { margin-top: 1.5rem; }

/* --- Leistungsseite „Schritt für Schritt“ --- */
.guided .module, .guided .infocards, .guided .steps-sec { max-width: 52rem; }
.action-band { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.6rem; margin: 0 0 1.6rem; padding: 1.1rem 1.3rem; background: var(--online-bg); border-left: 5px solid var(--online); border-radius: var(--radius); }
.action-band h2 { margin: 0; font-size: 1.2rem; color: var(--online); }
.action-band .action-items { flex: 1; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), max-content)); }
.action-band .btn-online { display: inline-flex; }
.steps-title { margin: 2rem 0 .4rem; }
.steps { list-style: none; counter-reset: step; margin: 0; padding: 0; }
.steps > li { counter-increment: step; position: relative; padding: 0 0 .4rem 3.6rem; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: 1.15rem; display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 50%; background: var(--primary); color: #fff; font-weight: 800; font-size: 1.1rem; }
.steps > li:not(:last-child)::after { content: ""; position: absolute; left: 1.15rem; top: 3.8rem; bottom: -.6rem; width: 2px; background: var(--line); }
.steps .module { border-top: 0 !important; }
.steps .module > h2 { font-size: 1.3rem; margin-top: 1.25rem; }
.infocards { display: grid; gap: .9rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); margin: 1.8rem 0 .6rem; }
.infocard { padding: 1rem 1.15rem; background: var(--mist); border-radius: var(--radius); }
.infocard h2 { margin: 0 0 .4rem; font-size: 1.05rem; }
.infocard > div > :last-child { margin-bottom: 0; }
.contact-row { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19rem), 1fr)); margin: 2.4rem 0 1rem; }

/* --- Leistungsseite „Kompakt“ --- */
.compact { max-width: 50rem; }
.compact .facts { grid-template-columns: repeat(auto-fit, minmax(min(100%, 13rem), 1fr)); gap: .6rem; border: 0; }
.compact .facts div { padding: .8rem .9rem; background: var(--mist); border-radius: var(--radius); }
.acc { border-top: 1px solid var(--line); }
.acc:last-of-type { border-bottom: 1px solid var(--line); }
.acc > summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .95rem .2rem; cursor: pointer; list-style: none; }
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary h2 { margin: 0; font-size: 1.2rem; }
.acc > summary::after { content: ""; flex: none; width: .65rem; height: .65rem; border-right: 2.5px solid var(--primary); border-bottom: 2.5px solid var(--primary); transform: rotate(45deg) translate(-2px, -2px); transition: transform .15s; }
.acc[open] > summary::after { transform: rotate(-135deg) translate(-2px, -2px); }
.acc > summary:hover h2 { color: var(--primary); }
.acc > summary:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.acc-body { padding: 0 .2rem 1rem; }
.acc-body > :first-child { margin-top: 0; }
.compact .contact-row { margin-top: 2rem; }
@media print {
  .acc > summary::after, .action-band .btn { display: none; }
  .steps > li::before { background: none; color: #000; border: 2px solid #000; }
}

/* ================= Robustheit (gilt für alle Seiten und Layouts) =================
   1. Lange Wörter (Komposita, Dateinamen, URLs) dürfen umbrechen – mit Silbentrennung, wo der Browser
      sie für Deutsch kennt (lang="de"), sonst als Notumbruch.
   2. Raster- und Flex-Zellen dürfen schmaler werden als ihr längstes Wort (Standard „min-width: auto“
      würde die ganze Spalte bzw. Seite verbreitern). */
html { overflow-wrap: break-word; }
/* Silbentrennung: auf breiten Bildschirmen nur, wo der Platz knapp ist (Seitenleiste, Kacheln); auf schmalen
   Bildschirmen im Fließtext – mit Mindestlängen, damit keine Zwei-Buchstaben-Trennungen („Be-urkundung“) entstehen. */
.aside, .box, .tile, .ocard, .contact-card { -webkit-hyphens: auto; hyphens: auto; hyphenate-limit-chars: 12 5 5; -webkit-hyphenate-limit-before: 5; -webkit-hyphenate-limit-after: 5; }
@media (max-width: 40rem) {
  h1, h2, h3, h4, p, li, dd, td, th, blockquote, summary, label, .lead { -webkit-hyphens: auto; hyphens: auto; hyphenate-limit-chars: 10 4 4; -webkit-hyphenate-limit-before: 4; -webkit-hyphenate-limit-after: 4; }
}
/* Adressen, Telefonnummern, Codes werden nie getrennt; lange E-Mail-/Web-Adressen umbrechen an <wbr> */
a[href^="mailto:"], a[href^="tel:"], a[href^="http"].url, .nohy, code { -webkit-hyphens: none !important; hyphens: none !important; }
.nowrap { white-space: nowrap; }
main a, .facts dd, .results h3, .units a { overflow-wrap: break-word; }
a[href^="mailto:"], a.url { overflow-wrap: anywhere; }
:is(.site-head .wrap, .brand, .brand-text, .crumbs ol, .search, .chips, .home-grid, .board a, .online-list a, .topics a, .az-group,
    .facts, .facts div, .service-body, .toc ul, .tools, .aside, .box dl, .pager, .site-foot .wrap, .with-i, h1.with-cat, .ilist, .ilist > span,
    .action-items, .sec-head, .home-sections, .tiles, .tile, .pills, .pills a, .ocards, .ocard, .contact-band, .contact-band address,
    .dir-grid, .linklist a, .action-band, .infocards, .contact-row, .acc > summary) > * { min-width: 0; }
img, video, iframe, table { max-width: 100%; }
.module table, .acc-body table { display: block; overflow-x: auto; }
@media (max-width: 30rem) {
  .steps > li { padding-left: 2.6rem; }
  .steps > li::before { width: 1.9rem; height: 1.9rem; font-size: .95rem; top: 1.25rem; }
  .steps > li:not(:last-child)::after { left: .9rem; top: 3.4rem; }
  .module ul ul, .acc-body ul ul, .module ol ol { padding-left: 1.1rem; }
  .module.checklist li, .acc.checklist .acc-body > ul > li { padding-left: 1.6rem; }
  .module.checklist li::before, .acc.checklist .acc-body > ul > li::before { width: 1rem; height: 1rem; }
  .module.checklist li li { padding-left: 1.2rem; }
}

/* ===== Ausbau: Barrierefreie Angebote, Öffnungszeiten, Gebühren, Rückmeldung, Formulare, Assistent ===== */
.a11y-nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .95rem; }
.a11y-nav a { color: inherit; }
.lang-links { list-style: none; padding: 0; margin: .9rem 0 0; display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; }
.lang-links a { display: inline-flex; align-items: center; gap: .4em; font-weight: 600; }
.ask-link { margin: .8rem 0 0; }
.ask-link a { display: inline-flex; align-items: center; gap: .4em; color: inherit; font-weight: 600; }
.search-hero .ask-link a { color: var(--primary); }

.open-state { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 .35em; margin: .2rem 0 .5rem; }
.open-state strong { display: inline-flex; align-items: center; gap: .4em; color: var(--muted); }
.open-state strong::before { content: ""; width: .65em; height: .65em; border-radius: 50%; background: #8a979f; flex: none; }
.open-state.is-open strong { color: var(--online); }
.open-state.is-open strong::before { background: var(--online); }
.open-note { color: var(--muted); font-size: .92em; }
table.hours { border-collapse: collapse; width: 100%; font-size: .95rem; margin: .2rem 0 .6rem; }
table.hours th, table.hours td { text-align: left; vertical-align: top; padding: .2rem .5rem .2rem 0; border-bottom: 1px solid var(--line); font-weight: 400; }
table.hours th { white-space: nowrap; color: var(--muted); width: 1%; padding-right: 1rem; }
table.hours tr.today th, table.hours tr.today td { font-weight: 700; color: var(--ink); }
.open-exception { background: var(--note-bg); border-left: 3px solid var(--note-line); padding: .3rem .6rem; font-size: .95rem; }

.fees .fee-table { border-collapse: collapse; width: 100%; max-width: 40rem; }
.fee-table th, .fee-table td { padding: .5rem .6rem .5rem 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.fee-table thead th { font-size: .9rem; color: var(--muted); font-weight: 600; }
.fee-table tbody th { font-weight: 400; }
.fee-table .num { text-align: right; white-space: nowrap; }
.fee-table input { width: 4.5rem; font: inherit; padding: .3rem .4rem; border: 1px solid var(--muted); border-radius: var(--radius); text-align: right; }
.fee-table tfoot th, .fee-table tfoot td { font-weight: 700; border-bottom: 0; border-top: 2px solid var(--ink); }
.fee-unit, .fee-note, .fee-hint { color: var(--muted); font-size: .92em; }

.checklist li.check-item, .module.checklist li.check-item, .acc.checklist .acc-body > ul > li.check-item { list-style: none; padding-left: 0; }
.checklist li.check-item::before, .module.checklist li.check-item::before, .acc.checklist .acc-body > ul > li.check-item::before { display: none; }
.checklist ol > li.check-item { margin-left: -1.4rem; }
.checklist li.check-item label { display: flex; gap: .6rem; align-items: flex-start; cursor: pointer; }
.checklist li.check-item input { width: 1.2rem; height: 1.2rem; margin-top: .25rem; flex: none; accent-color: var(--online); }
.checklist li.check-item input:checked + span { color: var(--muted); text-decoration: line-through; }
.check-tools { display: flex; flex-wrap: wrap; gap: .4rem 1.2rem; align-items: center; margin: .4rem 0 0; font-size: .95rem; }
.check-progress { color: var(--muted); }

.feedback { margin: 2.4rem 0 1rem; padding: 1.2rem 1.4rem; background: var(--mist); border-radius: var(--radius); max-width: var(--measure); }
.feedback h2 { margin: 0 0 .7rem; font-size: 1.15rem; }
.fb-choice { display: flex; flex-wrap: wrap; gap: .6rem; }
.fb-choice .btn { display: inline-flex; align-items: center; gap: .4em; min-width: 6.5rem; justify-content: center; background: var(--paper); }
.fb-choice .btn:hover { background: var(--ink); }
.fb-more { margin-top: .9rem; }
.fb-more summary { cursor: pointer; color: var(--primary); text-decoration: underline; text-underline-offset: .2em; width: fit-content; }
.fb-more label { display: block; margin: .7rem 0 .3rem; font-weight: 600; }
.fb-more .hint { font-weight: 400; }
.fb-more textarea, .pfield input, .pfield textarea { display: block; width: 100%; font: inherit; padding: .6rem .7rem; border: 1px solid var(--muted); border-radius: var(--radius); background: var(--paper); color: var(--ink); }
.fb-more .btn { margin-top: .6rem; }
.fb-thanks { display: flex; align-items: center; gap: .5em; margin: 0; font-weight: 600; color: var(--online); }
.fb-barrier { margin: .9rem 0 0; font-size: .95rem; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }

.narrow { max-width: 48rem; }
.pform { margin: 1.4rem 0 2rem; }
.pfield { margin: 0 0 1.2rem; }
.pfield label { display: block; font-weight: 600; margin-bottom: .3rem; }
.hint { color: var(--muted); font-size: .93rem; }
.pfield .hint { margin: .3rem 0 0; }
label .hint, label .req { font-weight: 400; }
.btn-primary { display: inline-flex; align-items: center; gap: .45em; }
.notice { padding: 1rem 1.2rem; border-radius: var(--radius); margin: 1rem 0 1.4rem; border-left: 4px solid; }
.notice p { margin: 0 0 .5rem; } .notice p:last-child { margin: 0; }
.notice-ok { background: var(--online-bg); border-color: var(--online); }
.notice-ok p:first-child { display: flex; gap: .5em; align-items: center; flex-wrap: wrap; }
.notice-error { background: #fdecea; border-color: #b3261e; color: #5c1410; }

.assistant-result { margin-top: 1.6rem; }
.assistant-answer { font-size: 1.1rem; background: var(--mist); padding: 1rem 1.3rem; border-radius: var(--radius); border-left: 4px solid var(--primary); }
.assistant-answer p:last-child { margin-bottom: 0; }
.sources { padding-left: 1.4rem; }
.sources > li { margin: 0 0 1.2rem; }
.sources h3 { margin: 0 0 .2rem; font-size: 1.08rem; }
.sources p { margin: 0 0 .3rem; }
.source-facts { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: .2rem 1.1rem; font-size: .93rem; color: var(--muted); }
.source-facts li { display: inline-flex; align-items: center; gap: .35em; }
.sources > li:target { outline: 3px solid var(--focus); outline-offset: .4rem; }

.easy { max-width: 52rem; font-size: 1.2rem; line-height: 1.75; }
.easy-label { display: inline-flex; align-items: center; gap: .4em; margin: 0; font-weight: 700; color: var(--primary); }
.easy-text p, .easy-text li { max-width: 50ch; }
.easy-text h2 { font-size: 1.5rem; }
.easy .box { margin: 1.4rem 0; font-size: 1.1rem; }
@media print { .feedback, .check-tools, .lang-links, .ask-link, .a11y-nav { display: none !important; } .fee-qty-col { display: none !important; } }
.check-print-title { display: none; }
@media print {
  body.print-checklist * { visibility: hidden; }
  body.print-checklist .checklist.printing, body.print-checklist .checklist.printing * { visibility: visible; }
  body.print-checklist .checklist.printing { position: absolute; left: 0; top: 0; width: 100%; }
  body.print-checklist .check-print-title { display: block; font-weight: 700; font-size: 1.3rem; }
  .checklist li.check-item input { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}


/* ===== Feinschliff: lange Texte, Aktionsflächen, Gebührenrechner ===== */
/* Eckdaten: ruhigere Werte, höchstens drei Zeilen (vollständige Angaben stehen im jeweiligen Abschnitt) */
.facts dd { font-weight: 600; font-size: 1rem; line-height: 1.4; }
.facts dd:not(.yes) { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden; }
.facts { grid-template-columns: repeat(auto-fill, minmax(min(100%, 13.5rem), 1fr)); column-gap: 1.2rem; }
.compact .facts { grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr)); }
@media (max-width: 40rem) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: .9rem; }
  .facts div { padding-right: 0; }
  .facts dd { font-size: .95rem; }
}
@media (max-width: 22rem) { .facts { grid-template-columns: minmax(0, 1fr); } }

/* Online-Dienste: linksbündig lesbar statt zentriertem Textblock, Pfeil immer rechts oben */
.btn-online, .btn-online:has(> .i) { display: flex; align-items: flex-start; justify-content: space-between; gap: .8rem; text-align: left; font-size: 1rem; line-height: 1.35; padding: .85rem 1rem; }
.btn-online > span { min-width: 0; }
.btn-online > .i { flex: none; margin-top: .1rem; }
.btn-ghost:has(> .i) { justify-content: flex-start; text-align: left; }
.action-band .action-items { grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.action-band .btn-online { display: flex; }
.only-narrow { display: none; }
@media (max-width: 63.99rem) {
  .only-narrow { display: block; margin: 0 0 1.4rem; }
  .only-wide { display: none; }
}

/* Brotkrümel: aktuelle Seite höchstens eine Zeile */
.crumbs li:last-child { min-width: 0; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 40rem) { .crumbs li:last-child { display: none; } }

/* Kacheln mit langen Leistungsnamen */
.ocard-name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 5; line-clamp: 5; overflow: hidden; flex: 1 0 auto; }
.ocard { min-height: 9rem; }

/* Überschriften: ausgeglichene Zeilen statt einzelner Wörter in der letzten Zeile */
h1, h2, h3, .tile-name, .ocard-name, .results h3 { text-wrap: balance; }
.lead, .module p { text-wrap: pretty; }

/* Gebührenrechner als ruhige Liste */
.fees .fee-table { display: table; width: 100%; max-width: 44rem; border: 1px solid var(--line); border-radius: var(--radius); border-collapse: separate; border-spacing: 0; overflow: hidden; background: var(--paper); }
.fee-table th, .fee-table td { background: transparent; border: 0; border-bottom: 1px solid var(--line); padding: .7rem .9rem; }
.fee-table thead th { background: var(--mist); }
.fee-table tbody th { font-weight: 600; }
.fee-table .fee-unit, .fee-table .fee-note { font-weight: 400; }
.fee-table tfoot th, .fee-table tfoot td { border-top: 2px solid var(--ink); border-bottom: 0; background: var(--mist); }
.fee-table input { width: 4.2rem; min-height: 2.5rem; }
@media (max-width: 40rem) {
  .fee-table, .fee-table tbody, .fee-table tfoot { display: block; }
  .fee-table thead { display: none; } /* Spaltenköpfe entfallen; Mengenfelder haben eigene Beschriftungen */
  .fee-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: .8rem; border-bottom: 1px solid var(--line); padding: .7rem .9rem; }
  .fee-table tbody th { grid-column: 1 / -1; padding: 0 0 .4rem; border: 0; }
  .fee-table td { padding: 0; border: 0; }
  .fee-table td.fee-qty-col:not([hidden]) { display: block; }
  .fee-table tfoot tr { border: 0; border-top: 2px solid var(--ink); }
  .fee-table tfoot th { padding: 0; border: 0; grid-column: auto; }
  .fee-table tfoot td { padding: 0; border: 0; }
}
.facts dd { -webkit-hyphens: manual; hyphens: manual; }
@media (min-width: 40.01rem) { .facts:has(> div:nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 40rem) {
  .facts div:has(> .i) { display: block; }
  .facts div > .i { float: left; width: 1.1rem; height: 1.1rem; margin: .05rem .35rem 0 0; }
}
@media (max-width: 40rem) { .fee-table tfoot tr { background: var(--mist); } .fee-table tfoot th, .fee-table tfoot td { background: transparent; } }
@media (max-width: 30rem) {
  /* Suchfeld behält Platz für den Suchbegriff; die Schaltfläche zeigt nur das Symbol (Name bleibt für Screenreader) */
  .search button { padding: 0 1rem; }
  .search button > span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  /* Kontaktangaben: Bezeichnung über dem Wert, damit lange Adressen die volle Breite nutzen */
  .box dl { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .box dd + dt { margin-top: .45rem; }
  .box dt { font-size: .88rem; }
}
/* Sehr lange amtliche Leistungsbezeichnungen etwas kleiner setzen */
.service-head h1.long { font-size: clamp(1.55rem, 1.15rem + 1.5vw, 2.15rem); letter-spacing: -.015em; }
.btn-online > span { overflow-wrap: anywhere; -webkit-hyphens: auto; hyphens: auto; hyphenate-limit-chars: 10 4 4; }
.action-band .action-items, .action-band .action-item { min-width: 0; }
/* Aktionsleiste: Schaltflächen erhalten eine Mindestbreite und rutschen sonst unter die Überschrift */
.action-band .action-items { flex: 1 1 16rem; }
.main-nav a { -webkit-hyphens: manual; hyphens: manual; overflow-wrap: normal; }
@media (max-width: 47.99rem) { .main-nav a { font-size: .86rem; padding: .5rem .15rem; } }
@media (max-width: 40rem) { .facts dd { -webkit-hyphens: auto; hyphens: auto; hyphenate-limit-chars: 10 4 4; } }
/* Suchvorschläge liegen immer über den folgenden Inhalten (Kacheln, Karten, Tafel) */
.search:focus-within { position: relative; z-index: 20; }
