/* ============================================================
 * selbststaendig-amtsblatt - Theme-CSS
 * @license GPL-2.0-or-later
 * ============================================================
 * Sektionen:
 *   1. @font-face (lokale Open Sans, DSGVO-konform)
 *   2. Tokens (Custom Properties)
 *   3. Reset
 *   4. Layout-Primitives (.wrap, sections)
 *   5. Komponenten
 *   6. Article-Content (filterbare Boxen, Tabellen, FAQ)
 *   7. Burger (Mobile only)
 *   8. Responsive (1100 / 900 / 600 px)
 *   9. Print
 *  10. Accessibility (focus, motion)
 * ============================================================ */

/* ============================================================ 1. @FONT-FACE */

@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/open-sans/open-sans-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("../fonts/open-sans/open-sans-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02AF, U+0304, U+0308, U+0329, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20CF, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* ============================================================ 2. TOKENS */

:root {
  /* Farben */
  --bg: #ffffff;
  --soft: #f1f5f9;
  --soft-2: #e8edf3;
  --border: #d3dce6;
  --border-strong: #9aa9bc;
  --ink: #1a1a1a;
  --ink-2: #2c3e50;
  --muted: #5e6b7a;
  --primary: #003c71;
  --primary-2: #002a52;
  --primary-soft: #e6edf5;
  --accent: #d50019;
  --accent-2: #a00012;
  --warn: #b07c00;
  --warn-soft: #fff8e6;
  --tip: #00795c;
  --tip-soft: #dff2eb;
  --tip-2: #00564b;

  /* Typografie */
  --ff-base: "Open Sans", system-ui, -apple-system, sans-serif;
  --fs-base: 16px;
  --lh-base: 1.5;

  /* Spacing/Borders */
  --radius-sm: 2px;
  --radius-md: 4px;
  --shadow-card: 0 2px 8px rgba(0, 0, 0, 0.04);

  /* Layout */
  --wrap-max: 1280px;
  --content-max: 760px;
  --rail-w: 280px;

  /* Motion */
  --t-fast: 0.15s ease;
  --t-base: 0.2s ease;

  /* Z-Index-Strategie */
  --z-strip: 10;
  --z-nav: 20;
  --z-burger: 30;
  --z-modal: 100;

  /* Footer */
  --foot-bg: var(--ink);
  --foot-text: #cfd9e7;
  --foot-text-muted: #9aacc4;
  --foot-divider: #2c3e50;

  /* Native Form-Control Accent */
  accent-color: var(--primary);
}

/* ============================================================ 3. RESET */

*,
*::before,
*::after {
  box-sizing: border-box;
  min-width: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--ff-base);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  -webkit-font-smoothing: antialiased;
}

img,
picture,
video,
iframe {
  max-width: 100%;
  height: auto;
}

a {
  color: var(--primary);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  transition: color var(--t-fast);
}

@media (hover: hover) {
  a:hover { color: var(--accent); }
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
  border-radius: var(--radius-sm);
}

/* ============================================================ 4. LAYOUT */

.wrap {
  max-width: var(--wrap-max);
  margin: 0 auto;
  padding: 0 24px;
}

/* ============================================================ 5. KOMPONENTEN */

/* ----- Strip ----- */
.strip {
  background: #fff;
  border-bottom: 1px solid var(--border);
  padding: 22px 0;
  position: relative;
  z-index: var(--z-strip);
}
.strip .wrap { display: flex; justify-content: space-between; align-items: center; }

.brand { display: flex; flex-direction: column; line-height: 1.1; }
.brand-text { display: flex; flex-direction: column; }
.brand-text .l1 {
  font-size: 11px; font-weight: 600; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 4px;
}
.brand-text .l1::before {
  content: ""; display: inline-block; width: 18px; height: 1px;
  background: var(--accent); vertical-align: middle; margin-right: 10px;
}
.brand-text .l2 {
  font-size: 26px; font-weight: 700; color: var(--ink);
  letter-spacing: -0.018em; line-height: 1;
}
.brand-text .l3 {
  font-size: 12px; color: var(--muted); font-weight: 400;
  margin-top: 6px; letter-spacing: 0.04em;
}

.strip-r { display: flex; gap: 8px; align-items: center; }

.search-box {
  display: flex; border: 1px solid var(--border);
  border-radius: var(--radius-sm); overflow: hidden;
}
.search-box input {
  border: none; padding: 8px 12px; font-size: 13px;
  font-family: inherit; width: 240px; outline: none;
}
.search-box button {
  background: var(--primary); color: #fff; border: none; padding: 0 14px;
  font-size: 13px; cursor: pointer; font-family: inherit; font-weight: 600;
  transition: background var(--t-fast);
}
@media (hover: hover) {
  .search-box button:hover { background: var(--primary-2); }
}

/* ----- Hauptnav ----- */
nav.main {
  background: var(--primary); border-top: 3px solid var(--accent);
  position: relative; z-index: var(--z-nav);
}
nav.main .wrap { display: flex; }
nav.main a {
  color: #fff; text-decoration: none; padding: 14px 22px; font-size: 14px;
  font-weight: 600; letter-spacing: 0.01em; display: inline-flex;
  align-items: center; gap: 6px;
  border-right: 1px solid rgba(255, 255, 255, 0.1);
  transition: background var(--t-fast);
}
nav.main a:first-child { border-left: 1px solid rgba(255, 255, 255, 0.1); }
@media (hover: hover) {
  nav.main a:hover, nav.main a.on { background: var(--primary-2); color: #fff; }
}

/* ----- Brotkrumen ----- */
.crumbs {
  background: var(--soft); border-bottom: 1px solid var(--border);
  padding: 10px 0; font-size: 13px; color: var(--muted);
}
.crumbs-inner { display: flex; align-items: center; flex-wrap: wrap; }
.crumbs a { color: var(--muted); text-decoration: none; }
@media (hover: hover) {
  .crumbs a:hover { color: var(--primary); text-decoration: underline; }
}
.crumbs .sep { margin: 0 8px; color: var(--border-strong); }
.crumbs > .crumbs-inner > span:not(.sep) {
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  max-width: 60vw; display: inline-block; vertical-align: bottom;
}

/* ----- Hero ----- */
.hero { padding: 36px 0; background: #fff; }
.hero-grid {
  display: grid; grid-template-columns: 1.5fr 1fr;
  gap: 36px; align-items: start;
}
.hero-card {
  border: 1px solid var(--border); background: #fff; padding: 0;
  overflow: hidden; border-radius: var(--radius-sm);
}
.hero-card .ribbon {
  background: var(--primary); color: #fff; font-size: 11px;
  letter-spacing: 0.18em; text-transform: uppercase;
  font-weight: 700; padding: 6px 14px; display: inline-block;
}
.hero-card .body { padding: 24px 28px 28px; }
.hero-card .body h1 {
  font-size: 32px; line-height: 1.2; letter-spacing: -0.015em;
  font-weight: 700; margin: 14px 0 12px; color: var(--ink);
}
.hero-card .body p { font-size: 16px; color: var(--ink-2); margin: 0 0 16px; line-height: 1.55; }
.hero-card .meta-row {
  display: flex; justify-content: space-between; align-items: center;
  font-size: 13px; color: var(--muted);
  padding-top: 14px; border-top: 1px solid var(--soft-2);
}
.hero-card .meta-row .stand {
  background: var(--soft); padding: 3px 8px; border-radius: var(--radius-sm);
  font-weight: 600; color: var(--ink-2);
}
.hero-card-link { color: inherit; text-decoration: none; }
@media (hover: hover) { .hero-card-link:hover { color: var(--primary); } }

.hero-side h3 {
  font-size: 13px; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--primary); font-weight: 700; margin: 0 0 14px;
  padding-bottom: 10px; border-bottom: 2px solid var(--primary);
}
.hero-side .item {
  padding: 14px 0; border-bottom: 1px solid var(--border);
  display: grid; grid-template-columns: auto 1fr; gap: 12px;
}
.hero-side .item:last-child { border-bottom: none; }
.hero-side .item .num {
  background: var(--primary-soft); color: var(--primary);
  font-weight: 700; font-size: 13px; width: 28px; height: 28px;
  display: grid; place-items: center; border-radius: var(--radius-sm);
}
.hero-side .item h4 {
  margin: 0 0 3px; font-size: 15px; font-weight: 600;
  line-height: 1.35; color: var(--ink);
}
.hero-side .item h4 a { color: var(--ink); text-decoration: none; }
@media (hover: hover) {
  .hero-side .item h4 a:hover { color: var(--primary); text-decoration: underline; }
}
.hero-side .item span { font-size: 12px; color: var(--muted); }

/* ----- Services ----- */
.services {
  padding: 48px 0; background: var(--soft);
  border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.services h2 { font-size: 24px; font-weight: 700; margin: 0 0 6px; letter-spacing: -0.005em; }
.services .desc { font-size: 15px; color: var(--muted); margin: 0 0 24px; max-width: 720px; }
.tile-grid {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 0;
  border-top: 2px solid var(--ink); border-bottom: 1px solid var(--border);
}
.stile {
  background: transparent; border-right: 1px solid var(--border);
  padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 6px;
  text-decoration: none; color: var(--ink); transition: background var(--t-fast);
}
.stile:last-child { border-right: none; }
@media (hover: hover) { .stile:hover { background: #fff; } }
.stile .num {
  font-size: 11px; font-weight: 600; color: var(--accent);
  letter-spacing: 0.18em; text-transform: uppercase; margin-bottom: 6px;
}
.stile .num::after {
  content: ""; display: block; width: 24px; height: 1px;
  background: var(--accent); margin-top: 8px;
}
.stile h4 {
  margin: 0; font-size: 17px; font-weight: 700; color: var(--ink);
  letter-spacing: -0.008em; line-height: 1.25;
}
.stile p { margin: 0; font-size: 13px; color: var(--muted); line-height: 1.5; }
.stile .more {
  margin-top: auto; padding-top: 10px; font-size: 12px;
  color: var(--primary); font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.04em;
}

/* ----- Aktuelles + News-Cards ----- */
.aktuell { padding: 48px 0; }
.ah {
  display: flex; justify-content: space-between; align-items: end;
  border-bottom: 2px solid var(--primary); padding-bottom: 10px; margin-bottom: 24px;
}
.ah h2 { font-size: 24px; font-weight: 700; margin: 0; letter-spacing: -0.005em; }
.ah a {
  font-size: 13px; font-weight: 600; color: var(--primary);
  text-transform: uppercase; letter-spacing: 0.04em; text-decoration: none;
}
@media (hover: hover) { .ah a:hover { text-decoration: underline; } }

.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }

.news-grid > .wp-block-post-template,
.news-grid > ul.wp-block-post-template,
.news-grid > ol.wp-block-post-template {
  display: contents; list-style: none; padding: 0; margin: 0;
}

.news {
  background: #fff; border: 1px solid var(--border); padding: 0;
  display: flex; flex-direction: column; border-top: 2px solid var(--ink);
  transition: box-shadow var(--t-base);
  height: 100%; /* Grid-Cell ausfüllen für gleiche Höhe */
}
.news .body { flex: 1; display: flex; flex-direction: column; }
@media (hover: hover) { .news:hover { box-shadow: var(--shadow-card); } }

.news .wp-block-post-featured-image,
.news .thumb,
.news a.wp-block-post-featured-image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: linear-gradient(135deg, var(--soft) 0%, var(--soft-2) 100%);
  margin: 0;
}
.news .wp-block-post-featured-image img,
.news .wp-post-image,
.news .thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  aspect-ratio: 16 / 9;
  transition: transform var(--t-base);
}
@media (hover: hover) {
  .news:hover .wp-block-post-featured-image img,
  .news:hover .wp-post-image { transform: scale(1.03); }
}

.news .body { padding: 20px 22px; }
.news .cat,
.news .cat a {
  font-size: 11px; text-transform: uppercase; letter-spacing: 0.18em;
  color: var(--accent); font-weight: 700; text-decoration: none;
}
.news .cat { margin-bottom: 8px; display: block; }
.news .cat::before { content: "·"; margin-right: 8px; color: var(--accent); }
@media (hover: hover) {
  .news .cat a:hover { text-decoration: underline; }
}
.news.foerder .cat, .news.foerder .cat a { color: #0072b9; }
.news.recht .cat,   .news.recht .cat a   { color: #5d3c99; }
.news h3 {
  margin: 0 0 10px; font-size: 18px; font-weight: 700; color: var(--ink);
  line-height: 1.3; letter-spacing: -0.005em;
}
.news h3 a { color: var(--ink); text-decoration: none; }
@media (hover: hover) {
  .news h3 a:hover { color: var(--primary); text-decoration: underline; }
}
.news p { margin: 0 0 12px; font-size: 14px; color: var(--ink-2); line-height: 1.5; }
.news .meta {
  font-size: 12px; color: var(--muted);
  padding-top: 10px; border-top: 1px solid var(--soft-2);
  display: flex; justify-content: space-between;
}

/* ----- A-Z Glossar ----- */
.az { padding: 48px 0; background: var(--soft); border-top: 1px solid var(--border); }
.az h2 { font-size: 24px; font-weight: 700; margin: 0 0 4px; letter-spacing: -0.005em; }
.az .desc { font-size: 14px; color: var(--muted); margin: 0 0 20px; }
.az-list {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px;
  background: #fff; border: 1px solid var(--border); padding: 24px;
}
.az-col h4 {
  font-size: 13px; font-weight: 700; color: var(--primary);
  margin: 0 0 10px; letter-spacing: 0.04em;
  border-bottom: 1px solid var(--border); padding-bottom: 6px;
}
.az-col ul { list-style: none; padding: 0; margin: 0; }
.az-col li { padding: 4px 0; font-size: 14px; }
.az-col li a { color: var(--ink); text-decoration: none; }
@media (hover: hover) {
  .az-col li a:hover { color: var(--primary); text-decoration: underline; }
}

/* ============================================================ 6. ARTICLE-CONTENT */

.article {
  padding: 0 0 48px; background: var(--bg);
  border-top: 1px solid var(--border);
}
.article-inner {
  display: grid; grid-template-columns: 1fr var(--rail-w);
  gap: 36px; padding-top: 36px;
}

/* TOC */
.toc {
  background: #fff; border: 1px solid var(--border);
  padding: 18px 20px; margin-bottom: 18px; border-radius: var(--radius-sm);
}
.toc h4 {
  font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--primary); font-weight: 700; margin: 0 0 12px;
  border-bottom: 2px solid var(--primary); padding-bottom: 8px;
}
.toc ol { list-style: none; padding: 0; margin: 0; font-size: 14px; counter-reset: toc; }
.toc li { padding: 6px 0; counter-increment: toc; line-height: 1.4; }
.toc li::before {
  content: counter(toc, decimal-leading-zero) ". ";
  color: var(--accent); font-weight: 700; margin-right: 4px; font-size: 12px;
}
.toc li a { color: var(--ink-2); text-decoration: none; }
@media (hover: hover) {
  .toc li a:hover { color: var(--primary); text-decoration: underline; }
}
.toc li.active a { color: var(--primary); font-weight: 700; }

/* Article Body */
.a-body {
  max-width: none;
  overflow-wrap: break-word;
  hyphens: none;
}
.a-body img { max-width: 100%; height: auto; }
.a-body iframe, .a-body video { max-width: 100%; }
.a-body div, .a-body section, .a-body aside { max-width: 100%; box-sizing: border-box; }

.a-head {
  margin-bottom: 32px; border-bottom: 1px solid var(--border); padding-bottom: 24px;
}
.kicker-link { display: inline-block; text-decoration: none; color: inherit; margin-bottom: 14px; }
@media (hover: hover) { .kicker-link:hover { opacity: 0.85; } }
.kicker {
  display: inline-block; background: var(--primary); color: #fff;
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  font-weight: 700; padding: 5px 12px; border-radius: 0;
}
.a-head h1 {
  font-size: 36px; line-height: 1.18; letter-spacing: -0.015em;
  margin: 6px 0 14px; font-weight: 700; color: var(--ink);
}
.a-head p.lead { font-size: 18px; color: var(--ink-2); margin: 0 0 18px; line-height: 1.5; }
.a-meta {
  display: flex; gap: 0; font-size: 12px; color: var(--muted);
  border-top: 1px solid var(--border); padding-top: 14px; flex-wrap: wrap;
}
.a-meta span { padding: 0 18px; border-right: 1px solid var(--border); }
.a-meta span:first-child { padding-left: 0; }
.a-meta span:last-child { border-right: none; }
.a-meta strong {
  color: var(--ink-2); font-weight: 700; text-transform: uppercase;
  letter-spacing: 0.04em; font-size: 11px; display: block;
}

.a-body h2 {
  font-size: 24px; line-height: 1.25; letter-spacing: -0.005em;
  margin: 36px 0 12px; font-weight: 700; color: var(--ink);
  padding-bottom: 8px; border-bottom: 1px solid var(--border);
}
.a-body h2 .num { color: var(--accent); font-weight: 700; margin-right: 8px; }
.a-body h3 { font-size: 19px; margin: 24px 0 8px; font-weight: 700; letter-spacing: -0.005em; }
.a-body p { margin: 0 0 14px; font-size: 16px; line-height: 1.65; color: var(--ink-2); }
.a-body strong { color: var(--ink); }
.a-body a { color: var(--primary); text-decoration: underline; }

/* Tables */
.a-body table {
  width: 100%;
  border-collapse: collapse;
  table-layout: auto;
  margin: 24px 0;
}
.a-body table th,
.a-body table td {
  overflow-wrap: normal;
  word-break: keep-all;
}

/* Boxes */
.box {
  margin: 24px 0; border: 1px solid var(--border); background: #fff;
  font-size: 15px; line-height: 1.55; border-radius: var(--radius-sm); overflow: hidden;
}
.box .head {
  padding: 10px 16px; font-size: 11px; letter-spacing: 0.16em;
  text-transform: uppercase; font-weight: 700;
  border-bottom: 1px solid var(--border);
  display: flex; justify-content: space-between; align-items: center;
  flex-wrap: wrap; gap: 8px;
}
.box .head .ref {
  color: var(--muted); font-weight: 500; text-transform: none;
  letter-spacing: 0; font-size: 12px;
}
.box .body { padding: 16px 18px; }
.box.info { border-left: 4px solid var(--primary); }
.box.info .head { background: var(--primary-soft); color: var(--primary); }
.box.tip { border-left: 4px solid var(--tip); }
.box.tip .head { background: var(--tip-soft); color: var(--tip-2); }
.box.warn { border-left: 4px solid var(--warn); }
.box.warn .head { background: var(--warn-soft); color: #7a5800; }
.box.legal { border-left: 4px solid var(--accent); }
.box.legal .head { background: #fce7eb; color: var(--accent-2); }
/* Listen-Defaults siehe weiter unten ("BOX-INHALT (head/body OPTIONAL)") */

/* Amtsblatt-Tabelle */
table.t-amt {
  width: 100%; border-collapse: collapse; margin: 24px 0;
  font-size: 14px; border: 1px solid var(--border-strong);
}
table.t-amt thead th {
  background: var(--primary); color: #fff; text-align: left;
  padding: 10px 14px; font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; font-weight: 700;
  border-right: 1px solid rgba(255, 255, 255, 0.2);
}
table.t-amt tbody td {
  padding: 10px 14px; border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
}
table.t-amt tbody tr:nth-child(even) td { background: var(--soft); }
table.t-amt tbody td.num {
  font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums;
}

/* FAQ */
.faq { margin-top: 32px; border-top: 2px solid var(--primary); padding-top: 24px; }
.faq h2 { padding-bottom: 0; border: none; margin-top: 0; color: var(--primary); }
.faq details {
  padding: 14px 16px; background: var(--soft);
  border: 1px solid var(--border); border-bottom: none;
  border-left: 4px solid transparent;
  transition: background var(--t-fast), border-color var(--t-fast);
}
.faq details:last-child { border-bottom: 1px solid var(--border); }
.faq details[open] { background: #fff; border-left-color: var(--accent); }
.faq summary {
  cursor: pointer; font-weight: 700; font-size: 15px;
  list-style: none; display: flex; justify-content: space-between;
  align-items: center; color: var(--ink); letter-spacing: -0.005em; gap: 14px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "▼"; font-size: 10px; color: var(--primary); font-weight: 400;
  transition: transform var(--t-fast); flex-shrink: 0;
}
.faq details[open] summary::after { transform: rotate(180deg); }
.faq details p { margin-top: 10px; color: var(--ink-2); font-size: 14px; line-height: 1.55; }

/* Sidebar (Rail) */
.rail { align-self: start; }
.rail .panel {
  background: #fff; border: 1px solid var(--border);
  padding: 18px 20px; margin-bottom: 18px; border-radius: var(--radius-sm);
}
.rail .panel.alt { background: var(--primary); color: #fff; border-color: var(--primary); }
.rail h4 {
  font-size: 12px; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--primary); font-weight: 700; margin: 0 0 10px;
  border-bottom: 2px solid var(--accent); padding-bottom: 6px;
}
.rail .panel.alt h4 { color: #fff; border-color: var(--accent); }
.rail .panel ul { list-style: none; padding: 0; margin: 0; }
.rail .panel li {
  padding: 8px 0; border-bottom: 1px solid var(--border); font-size: 14px;
}
.rail .panel li:last-child { border-bottom: none; }
.rail .panel li a {
  color: var(--ink-2); text-decoration: none; display: flex;
  justify-content: space-between; align-items: start; gap: 8px;
}
@media (hover: hover) {
  .rail .panel li a:hover { color: var(--primary); text-decoration: underline; }
}
.rail .panel li a::before {
  content: "→"; color: var(--accent); font-weight: 700; flex-shrink: 0;
}
.rail .panel.alt p { font-size: 14px; color: #cfd9e7; margin: 0 0 12px; line-height: 1.5; }

.rail-cta {
  background: #fff; color: var(--primary); padding: 9px 14px;
  font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em;
  font-size: 13px; text-decoration: none; display: block; text-align: center;
  border-radius: var(--radius-sm); transition: background var(--t-fast);
}
@media (hover: hover) {
  .rail-cta:hover { background: var(--soft); color: var(--primary-2); }
}

/* ----- 404 ----- */
.err404 { padding: 64px 0; }
.err404-inner { max-width: 640px; margin: 0 auto; text-align: center; }
.err404-kicker {
  font-size: 14px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent); font-weight: 700; margin-bottom: 16px;
}
.err404-title {
  font-size: 42px; font-weight: 700; letter-spacing: -0.02em;
  margin: 0 0 14px; line-height: 1.15;
}
.err404-lead { color: var(--ink-2); font-size: 18px; margin: 0 0 24px; line-height: 1.5; }

/* ----- Pages ohne Sidebar ----- */
.page-no-rail .page-body {
  max-width: var(--content-max); margin: 0 auto; padding: 36px 0 48px;
}
.page-no-rail .a-head {
  margin-bottom: 24px; border-bottom: 1px solid var(--border); padding-bottom: 18px;
}
.page-no-rail h1 {
  font-size: 32px; line-height: 1.2; letter-spacing: -0.015em;
  margin: 0; font-weight: 700;
}
.page-no-rail h2 { font-size: 22px; line-height: 1.3; margin: 28px 0 10px; font-weight: 700; }
.page-no-rail h3 { font-size: 18px; margin: 22px 0 8px; font-weight: 700; }
.page-no-rail p, .page-no-rail li { font-size: 16px; line-height: 1.65; color: var(--ink-2); }
.page-no-rail strong { color: var(--ink); }

/* ----- Footer ----- */
footer.site {
  background: var(--foot-bg); color: var(--foot-text);
  padding: 48px 0 24px; margin-top: 0;
}
.foot-grid {
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr 1fr; gap: 36px;
  padding-bottom: 36px; border-bottom: 1px solid var(--foot-divider);
}
.foot-grid h5 {
  font-size: 11px; letter-spacing: 0.16em; text-transform: uppercase;
  color: #fff; font-weight: 700; margin: 0 0 14px;
  border-bottom: 2px solid var(--accent); padding-bottom: 6px; width: fit-content;
}
.foot-grid ul { list-style: none; padding: 0; margin: 0; }
.foot-grid li { padding: 5px 0; font-size: 14px; }
.foot-grid li a { color: var(--foot-text); text-decoration: none; }
@media (hover: hover) {
  .foot-grid li a:hover { color: #fff; text-decoration: underline; }
}
.foot-brand { display: flex; flex-direction: column; margin-bottom: 14px; line-height: 1.1; }
.foot-brand .label { display: flex; flex-direction: column; }
.foot-brand .l1 {
  font-size: 11px; letter-spacing: 0.22em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 6px; font-weight: 600;
}
.foot-brand .l1::before {
  content: ""; display: inline-block; width: 18px; height: 1px;
  background: var(--accent); vertical-align: middle; margin-right: 10px;
}
.foot-brand .l2 { font-size: 22px; font-weight: 700; color: #fff; letter-spacing: -0.018em; }
.foot-claim { font-size: 13px; line-height: 1.55; max-width: 320px; }
.foot-bot {
  padding-top: 18px; display: flex; justify-content: space-between;
  font-size: 12px; color: var(--foot-text-muted);
}


/* ============================================================ HERO-CARD MIT FEATURED-IMAGE */

.hero-card-img {
  position: relative;
  display: block;
  overflow: hidden;
  aspect-ratio: 16 / 9;
}
.hero-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--t-base);
}
@media (hover: hover) {
  .hero-card-img:hover img { transform: scale(1.03); }
}
.hero-card-img .ribbon {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 2;
}

.ribbon-link { text-decoration: none; }

.hero-lead {
  font-size: 17px !important;
  line-height: 1.6 !important;
  margin-bottom: 18px !important;
}

.meta-byline strong {
  color: var(--ink);
  font-weight: 700;
}

/* Wochen-Items mit Cat-Mini-Badge */
.hero-side .item-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.hero-side .cat-mini {
  font-size: 10px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
  display: inline-block;
}
.hero-side .item.foerder .cat-mini { color: #0072b9; }
.hero-side .item.recht   .cat-mini { color: #5d3c99; }
.hero-side .item.finanz  .cat-mini { color: var(--tip); }
.hero-side .item.foerder .num { background: rgba(0,114,185,0.12); color: #0072b9; }
.hero-side .item.recht   .num { background: rgba(93,60,153,0.12); color: #5d3c99; }
.hero-side .item.finanz  .num { background: var(--tip-soft); color: var(--tip-2); }
.hero-side .item .age {
  font-size: 11px;
  color: var(--muted);
}


/* ============================================================ HERO-VERBESSERUNGEN */

/* Top-Story Card stärker akzentuiert */
.hero-card {
  border: 1px solid var(--border);
  border-top: 3px solid var(--ink);
  background: #fff;
  border-radius: var(--radius-sm);
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  transition: box-shadow var(--t-base);
}
.hero-card.foerder { border-top-color: #0072b9; }
.hero-card.recht   { border-top-color: #5d3c99; }
.hero-card.finanz  { border-top-color: var(--tip); }
@media (hover: hover) {
  .hero-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); }
}

/* Decorative Header (kein Featured-Image) */
.hero-card-deco {
  position: relative;
  aspect-ratio: 16 / 9;
  background: linear-gradient(135deg, var(--primary) 0%, var(--primary-2) 100%);
  display: grid;
  place-items: center;
  overflow: hidden;
}
.hero-card.foerder .hero-card-deco { background: linear-gradient(135deg, #0072b9 0%, #004a78 100%); }
.hero-card.recht   .hero-card-deco { background: linear-gradient(135deg, #5d3c99 0%, #3d2773 100%); }
.hero-card.finanz  .hero-card-deco { background: linear-gradient(135deg, var(--tip) 0%, var(--tip-2) 100%); }

.hero-card-deco-letter {
  font-size: 200px;
  font-weight: 800;
  color: rgba(255,255,255,0.12);
  line-height: 0.85;
  letter-spacing: -0.05em;
  position: absolute;
  z-index: 1;
}
.hero-card-deco-bars {
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(45deg,
      transparent 0,
      transparent 40px,
      rgba(255,255,255,0.04) 40px,
      rgba(255,255,255,0.04) 41px);
  z-index: 2;
}
.hero-card-deco .ribbon {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
}

/* Body prominenter */
.hero-card .body {
  padding: 28px 32px 28px;
}
.hero-card .cat-tag {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 8px;
}
.hero-card .cat-tag a {
  color: inherit;
  text-decoration: none;
}
.hero-card.foerder .cat-tag { color: #0072b9; }
.hero-card.recht   .cat-tag { color: #5d3c99; }
.hero-card.finanz  .cat-tag { color: var(--tip); }
@media (hover: hover) {
  .hero-card .cat-tag a:hover { text-decoration: underline; }
}

.hero-card .body h1 {
  font-size: 38px;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 14px;
}
.hero-card .hero-lead {
  font-size: 17px !important;
  line-height: 1.55 !important;
  color: var(--ink-2);
  margin: 0 0 18px !important;
}

.hero-card .meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--muted);
  padding-top: 14px;
  border-top: 1px solid var(--soft-2);
  gap: 14px;
}
.hero-card .meta-byline {
  letter-spacing: 0.02em;
}
.hero-card .meta-row .stand {
  background: transparent;
  padding: 0;
  font-weight: 500;
  color: var(--muted);
  border-radius: 0;
  font-size: 11px;
  letter-spacing: 0.04em;
}
.hero-card .meta-row .stand::before {
  content: "↻ ";
  color: var(--accent);
  font-weight: 700;
}

/* Wochen-Liste reicher */
.hero-side {
  background: var(--soft);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  padding: 20px 24px;
  border-radius: var(--radius-sm);
}
.hero-side h3 {
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--ink);
  font-size: 12px;
  letter-spacing: 0.2em;
  font-weight: 800;
}
.hero-side .item {
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  align-items: start;
  transition: padding-left var(--t-fast);
}
.hero-side .item:last-child { border-bottom: none; }
@media (hover: hover) {
  .hero-side .item:hover {
    padding-left: 6px;
  }
  .hero-side .item:hover h4 { color: var(--primary); }
}
.hero-side .item .num {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  font-size: 13px;
  font-weight: 700;
  background: var(--primary-soft);
  color: var(--primary);
}
.hero-side .item-body {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}
.hero-side .cat-mini {
  font-size: 10px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--accent);
}
.hero-side .item h4 {
  margin: 0;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--ink);
  transition: color var(--t-fast);
}
.hero-side .item .age {
  font-size: 11px;
  color: var(--muted);
}

/* Mobile-Anpassungen */
@media (max-width: 600px) {
  .hero-card .body { padding: 22px 22px 20px; }
  .hero-card .body h1 { font-size: 26px; line-height: 1.2; }
  .hero-card-deco-letter { font-size: 140px; }
  .hero-side { padding: 16px 18px; }
  .hero-side .item { padding: 12px 0; }
  .hero-side .item h4 { font-size: 14px; }
}



/* ============================================================ TOPICS-GRID (4er Kategorie-Navigator) */

.topics {
  padding: 36px 0 48px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.topics .ah {
  border-bottom: 2px solid var(--ink);
  padding-bottom: 10px;
  margin-bottom: 24px;
}
.topics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 20px;
}

.topic {
  background: #fff;
  border: 1px solid var(--border);
  border-top: 3px solid var(--primary);
  padding: 20px 22px 22px;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: box-shadow var(--t-base);
}
.topic.foerder { border-top-color: #0072b9; }
.topic.recht   { border-top-color: #5d3c99; }
.topic.finanz  { border-top-color: var(--tip); }
@media (hover: hover) {
  .topic:hover { box-shadow: var(--shadow-card); }
}

.topic-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  border-bottom: 1px solid var(--border);
  padding-bottom: 12px;
  margin-bottom: 14px;
}
.topic-head h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.topic-count {
  font-size: 11px;
  letter-spacing: 0.04em;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.topic-list {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  flex: 1;
}
.topic-list li {
  font-size: 14px;
  line-height: 1.4;
  padding: 6px 0;
  border-bottom: 1px solid var(--soft-2);
}
.topic-list li:last-child { border-bottom: none; }
.topic-list li a {
  color: var(--ink-2);
  text-decoration: none;
  display: block;
}
@media (hover: hover) {
  .topic-list li a:hover { color: var(--primary); text-decoration: underline; }
}

.topic-more {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--primary);
  text-decoration: none;
  border-top: 2px solid var(--primary);
  padding-top: 10px;
  margin-top: auto;
}
.topic.foerder .topic-more { color: #0072b9; border-top-color: #0072b9; }
.topic.recht   .topic-more { color: #5d3c99; border-top-color: #5d3c99; }
.topic.finanz  .topic-more { color: var(--tip); border-top-color: var(--tip); }
@media (hover: hover) {
  .topic-more:hover { text-decoration: underline; }
}

/* Responsive */
@media (max-width: 1100px) {
  .topics-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
}
@media (max-width: 600px) {
  .topics-grid { grid-template-columns: 1fr; gap: 14px; }
  .topics { padding: 28px 0 32px; }
  .topic { padding: 18px 20px 20px; }
  .topic-head h3 { font-size: 17px; }
}


/* ============================================================ EDITOR'S PICKS */

.picks {
  padding: 36px 0 48px;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}
.picks .ah {
  border-bottom: 2px solid var(--ink);
  padding-bottom: 10px;
  margin-bottom: 24px;
}
.picks-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.pick {
  background: #fff;
  border: 1px solid var(--border);
  border-top: 2px solid var(--ink);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transition: box-shadow var(--t-base);
  height: 100%;
}
@media (hover: hover) {
  .pick:hover { box-shadow: var(--shadow-card); }
}
.pick.foerder { border-top-color: #0072b9; }
.pick.recht   { border-top-color: #5d3c99; }
.pick.finanz  { border-top-color: var(--tip); }

.pick-img {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.pick-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform var(--t-base);
}
@media (hover: hover) {
  .pick-img:hover img { transform: scale(1.04); }
}

.pick-body { padding: 18px 20px; flex: 1; display: flex; flex-direction: column; }
.pick .cat,
.pick .cat a {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}
.pick .cat { margin-bottom: 8px; display: block; }
@media (hover: hover) {
  .pick .cat a:hover { text-decoration: underline; }
}
.pick.foerder .cat { color: #0072b9; }
.pick.recht   .cat { color: #5d3c99; }
.pick.finanz  .cat { color: var(--tip); }
.pick h3 {
  margin: 0 0 8px;
  font-size: 17px;
  font-weight: 700;
  line-height: 1.3;
  letter-spacing: -0.005em;
}
.pick h3 a { color: var(--ink); text-decoration: none; }
@media (hover: hover) {
  .pick h3 a:hover { color: var(--primary); text-decoration: underline; }
}
.pick p {
  margin: 0 0 12px;
  font-size: 13px;
  color: var(--ink-2);
  line-height: 1.5;
  flex: 1;
}
.pick-meta {
  font-size: 11px;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  padding-top: 10px;
  border-top: 1px solid var(--soft-2);
}

/* Picks Responsive */
@media (max-width: 900px) {
  .picks-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }
  .picks { padding: 28px 0 36px; }
}
@media (max-width: 600px) {
  .picks-grid { grid-template-columns: 1fr; gap: 14px; }
  .pick-body { padding: 16px 18px; }
  .pick h3 { font-size: 16px; }
}



/* ============================================================ BOX-INHALT (head/body OPTIONAL) */

/* Pseudo-Head wenn h4 direkt in .box (migrierte Live-Boxes ohne wrapper) */
.box > h4 {
  background: var(--primary-soft);
  color: var(--primary);
  font-size: 11px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 10px 16px;
  margin: 0;
  border-bottom: 1px solid var(--border);
}
.box.tip   > h4 { background: var(--tip-soft);   color: var(--tip-2); }
.box.warn  > h4 { background: var(--warn-soft);  color: #7a5800; }
.box.legal > h4 { background: #fce7eb;           color: var(--accent-2); }

/* Default-Padding für direct-children (ohne .body Wrapper) */
/* Listen allgemein (greift in Pattern-Box mit .body-Wrapper) */
.box ul,
.box ol {
  list-style-position: outside;
  margin: 8px 0 0;
  padding-left: 1.4em;
}
.box li {
  margin-bottom: 6px;
  line-height: 1.55;
}
.box li::marker {
  color: var(--primary);
}
.box.tip   li::marker { color: var(--tip); }
.box.warn  li::marker { color: var(--warn); }
.box.legal li::marker { color: var(--accent); }

/* Direct-Children (migrierte Box ohne body-Wrapper) - MUSS NACH .box ul kommen, weil gleiche Spezifität, spätere gewinnt */
.box > p {
  padding: 0 24px;
  margin-top: 14px;
  margin-bottom: 0;
}
.box > ul,
.box > ol {
  padding-left: 44px;        /* 24 (Box-Inhalts-Pad) + 20 (ul-internes für Bullets) */
  padding-right: 24px;
  margin-top: 14px;
  margin-bottom: 0;
}
.box > p:first-child,
.box > ul:first-child,
.box > ol:first-child { margin-top: 16px; }
.box > p:last-child,
.box > ul:last-child,
.box > ol:last-child { padding-bottom: 18px; }
.box > h4 + p,
.box > h4 + ul,
.box > h4 + ol { margin-top: 16px; }

/* Pattern-Box .body Override: Items bei 18 (body padding) + 18 (ul padding) = 36 vom Border (Mockup-Wert) */
.box .body ul,
.box .body ol { padding-left: 18px; }


/* ============================================================ 7. BURGER */

.burger-mobile { display: none; }



/* ============================================================ WORDPRESS LAYOUT-FLOW MARGIN-OVERRIDE */
/* WP Core fügt :where(.is-layout-flow) > * { margin-block-start: 24px } ein.
   Das zerstört Grid-Card-Höhen. Override für unsere Grid-Container: */

.news-grid > .wp-block-post-template > *,
.news-grid > .wp-block-post-template,
.picks-grid > *,
.tile-grid > *,
.az-list > *,
.topics-grid > * {
  margin-block-start: 0;
}
.topics-grid > * { min-width: 0; }

/* ============================================================ KATEGORIE-ARCHIVE: Cat-Badge weg (redundant mit Page-Title) */

body.category .news .cat,
body.category .pick .cat,
body.tag .news .cat,
body.tag .pick .cat {
  display: none;
}

/* Border-Top als visueller Indikator stärker, da die Badge fehlt */
body.category .news,
body.tag .news {
  border-top-width: 3px;
}

/* ============================================================ 8. RESPONSIVE */

@media (max-width: 1100px) {
  .article-inner { grid-template-columns: 1fr 260px; gap: 28px; }
  .foot-grid { grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; }
}

@media (max-width: 900px) {
  .wrap { padding: 0 18px; }

  .strip .wrap {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-areas: "brand burger" "search search";
    gap: 14px; align-items: center;
  }
  .brand { grid-area: brand; }
  .burger-mobile { grid-area: burger; }
  .strip-r { grid-area: search; }

  .burger-mobile {
    display: flex; align-items: center; justify-content: center;
    background: var(--primary); color: #fff;
    width: 40px; height: 40px; cursor: pointer;
    border-radius: var(--radius-sm); flex-shrink: 0;
    z-index: var(--z-burger);
  }
  .burger-mobile .burger-icon {
    display: inline-block; width: 20px; height: 14px;
    background:
      linear-gradient(#fff, #fff) top    / 100% 2px no-repeat,
      linear-gradient(#fff, #fff) center / 100% 2px no-repeat,
      linear-gradient(#fff, #fff) bottom / 100% 2px no-repeat;
  }
  #burger-toggle:checked ~ .strip .burger-mobile .burger-icon {
    background: linear-gradient(#fff, #fff) center / 100% 2px no-repeat;
  }

  .strip-r {
    width: 100%; background: var(--primary);
    padding: 14px 16px; border-radius: var(--radius-sm);
  }
  .search-box { width: 100%; }
  .search-box input { flex: 1; width: auto; }

  nav.main { border-top: none; background: transparent; }
  nav.main .wrap {
    display: none; flex-direction: column; padding: 0;
    background: var(--primary); border-top: 3px solid var(--accent);
  }
  nav.main .wrap a {
    border-right: none; border-left: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 14px 22px; font-size: 14px; width: 100%;
  }
  #burger-toggle:checked ~ nav.main .wrap { display: flex; }

  .hero { padding: 28px 0; }
  .hero-grid { grid-template-columns: 1fr; gap: 24px; }
  .hero-card .body h1 { font-size: 26px; }

  .services { padding: 36px 0; }
  .tile-grid { grid-template-columns: repeat(2, 1fr); }
  .stile { border-bottom: 1px solid var(--border); }
  .stile:nth-child(2) { border-right: none; }
  .stile:nth-last-child(-n+2) { border-bottom: none; }

  .aktuell { padding: 36px 0; }
  .news-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; }

  .az { padding: 36px 0; }
  .az-list { grid-template-columns: repeat(2, 1fr); gap: 24px; padding: 20px; }

  .article-inner { grid-template-columns: 1fr; gap: 24px; }
  .a-head h1 { font-size: 28px; }
  .rail { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
  .toc { margin-bottom: 0; }

  .foot-grid { grid-template-columns: repeat(3, 1fr); gap: 24px; }
}

@media (max-width: 600px) {
  .wrap { padding: 0 14px; }

  .strip { padding: 16px 0; }
  .brand-text .l1 { font-size: 10px; letter-spacing: 0.18em; }
  .brand-text .l2 { font-size: 20px; }
  .brand-text .l3 { display: none; }

  .crumbs { font-size: 12px; padding: 8px 0; }
  .crumbs .sep { margin: 0 5px; }

  .hero { padding: 20px 0; }
  .hero-card .ribbon { font-size: 10px; padding: 5px 12px; }
  .hero-card .body { padding: 18px 20px 20px; }
  .hero-card-img { aspect-ratio: 4 / 3; }
  .hero-lead { font-size: 15px !important; line-height: 1.55 !important; }
  .meta-byline { font-size: 12px; }
  .hero-card .body h1 { font-size: 22px; line-height: 1.25; margin: 10px 0; }
  .hero-card .body p { font-size: 15px; }
  .hero-card .meta-row {
    flex-direction: column; align-items: flex-start; gap: 6px; font-size: 12px;
  }

  .hero-side h3 { font-size: 12px; margin: 0 0 10px; }
  .hero-side .item { padding: 12px 0; }
  .hero-side .item h4 { font-size: 14px; }

  .services { padding: 28px 0; }
  .services h2, .az h2, .ah h2 { font-size: 20px; }
  .services .desc { font-size: 14px; }
  .tile-grid { grid-template-columns: 1fr; border-bottom: none; }
  .stile { border-right: none; padding: 18px; }
  .stile:not(:last-child) { border-bottom: 1px solid var(--border); }

  .aktuell { padding: 28px 0; }
  .ah {
    flex-direction: column; align-items: flex-start;
    gap: 6px; padding-bottom: 8px; margin-bottom: 18px;
  }
  .news-grid { grid-template-columns: 1fr; gap: 14px; }
  .news .body { padding: 16px 18px; }
  .news h3 { font-size: 17px; }

  .az { padding: 28px 0; }
  .az-list { grid-template-columns: 1fr; padding: 16px; gap: 14px; }

  .article { padding-bottom: 32px; }
  .article-inner { padding-top: 24px; gap: 18px; }
  .a-head { margin-bottom: 24px; padding-bottom: 18px; }
  .kicker { font-size: 10px; padding: 4px 10px; }
  .a-head h1 { font-size: 24px; margin: 8px 0 12px; }
  .a-head p.lead { font-size: 16px; }
  .a-meta { padding-top: 12px; }
  .a-meta span {
    padding: 0 10px 6px 0; border-right: none; flex: 0 0 50%; font-size: 11px;
  }
  .a-meta strong { font-size: 10px; }

  .a-body h2 { font-size: 20px; margin: 28px 0 10px; }
  .a-body h3 { font-size: 17px; margin: 18px 0 6px; }
  .a-body p { font-size: 15px; line-height: 1.6; }

  .box { margin: 18px 0; }
  .box .head { padding: 8px 14px; font-size: 10px; }
  .box .body { padding: 14px 16px; }
  .box > h4 { padding: 8px 14px; font-size: 10px; }
  .box > p { padding: 0 16px; }
  .box > ul, .box > ol { padding-left: 36px; padding-right: 16px; }

  /* Mobile-Tabellen: horizontal scrollbar mit nowrap-Cells */
  .a-body table,
  table.t-amt {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 100%;
  }
  .a-body table th,
  .a-body table td,
  table.t-amt th,
  table.t-amt td { white-space: nowrap; }

  .faq { margin-top: 24px; padding-top: 18px; }
  .faq details { padding: 12px 14px; }
  .faq summary { font-size: 14px; }

  .rail { grid-template-columns: 1fr; gap: 14px; }
  .rail .panel { padding: 16px 18px; }
  .toc { padding: 16px 18px; }

  .err404 { padding: 36px 0; }
  .err404-title { font-size: 28px; }
  .err404-lead { font-size: 16px; }

  .page-no-rail h1 { font-size: 26px; }
  .page-no-rail h2 { font-size: 20px; }
  .page-no-rail .page-body { padding: 24px 0 32px; }

  .foot-brand .l2 { font-size: 18px; }
  footer.site { padding: 32px 0 16px; }
  .foot-grid {
    grid-template-columns: 1fr 1fr; gap: 18px 14px; padding-bottom: 24px;
  }
  .foot-grid > div:first-child { grid-column: 1 / -1; }
  .foot-grid h5 { font-size: 10px; }
  .foot-grid li { font-size: 13px; padding: 4px 0; }
  .foot-bot {
    flex-direction: column; gap: 8px; align-items: flex-start;
    font-size: 11px; padding-top: 14px;
  }
}

/* ============================================================ 9. PRINT */

@media print {
  .strip,
  nav.main,
  .crumbs,
  .rail,
  .toc,
  .burger-mobile,
  footer.site,
  .err404,
  .services,
  .az,
  .aktuell,
  .hero-side,
  .faq summary::after {
    display: none !important;
  }
  .article-inner { display: block; padding: 0; }
  .a-body { color: #000; }
  .a-body h2, .a-body h3 { page-break-after: avoid; }
  .a-body p, .a-body li { color: #000; line-height: 1.4; orphans: 3; widows: 3; }
  .box { border: 1px solid #999; page-break-inside: avoid; }
  table { page-break-inside: avoid; }
  a { color: #000; text-decoration: underline; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 0.85em; }
}

/* ============================================================ 10. ACCESSIBILITY */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
