/* =====================================================================
   Q4 Rathaus — Komponenten (Bürgerseite + Backoffice)
   Setzt tokens.css voraus. Kein Framework, kein Build-Schritt.
   Klassen: Block, Block__Teil, Block--Variante. Zustände über ARIA/is-*.
   ===================================================================== */

/* ---------- 1. Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--head-h) + 16px); }
body {
  margin: 0; background: var(--paper); color: var(--text);
  font: 400 var(--fs-base)/var(--lh-body) var(--font-sans); letter-spacing: var(--tr-body);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img, video, svg, canvas { display: block; max-width: 100%; }
h1, h2, h3, h4, h5 { margin: 0; font-weight: 600; letter-spacing: var(--tr-head); line-height: var(--lh-head); text-wrap: balance; }
p, ul, ol, dl, figure, blockquote { margin: 0; }
p { text-wrap: pretty; }
a { color: inherit; text-decoration-thickness: 1px; text-underline-offset: .22em; }
button, input, select, textarea { font: inherit; color: inherit; }
em, .serif { font-family: var(--font-serif); font-style: italic; font-weight: 400; letter-spacing: -.01em; }
.serif-up { font-family: var(--font-serif); font-style: normal; font-weight: 400; letter-spacing: -.02em; }
::selection { background: var(--accent); color: var(--on-accent); }
:focus { outline: none; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }

.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }
.wrap--text { max-width: calc(var(--wrap-text) + 2 * var(--gut)); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: 16px; top: -80px; z-index: 100; background: var(--text); color: var(--paper); padding: 12px 18px; border-radius: var(--r-sm); text-decoration: none; }
.skip:focus { top: 12px; }

.label { font: 500 var(--fs-2xs)/1.35 var(--font-mono); letter-spacing: var(--tr-mono); text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.lead { font-size: var(--fs-md); color: var(--muted); max-width: 56ch; }
.accent { color: var(--accent-text); }
.ico { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ico--lg { width: 28px; height: 28px; }
.stack { display: flex; flex-direction: column; gap: var(--s-4); }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-3); }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

/* Typo-Rollen */
.t-display { font-size: var(--fs-display); line-height: var(--lh-tight); letter-spacing: var(--tr-display); font-weight: 600; }
.t-1 { font-size: var(--fs-3xl); line-height: var(--lh-tight); letter-spacing: var(--tr-display); }
.t-2 { font-size: var(--fs-2xl); line-height: 1; letter-spacing: -.04em; }
.t-3 { font-size: var(--fs-xl); line-height: 1.1; }
.t-4 { font-size: var(--fs-lg); line-height: var(--lh-snug); letter-spacing: -.025em; }
.t-num { font-family: var(--font-serif); font-weight: 400; font-style: normal; letter-spacing: -.03em; line-height: .85; font-variant-numeric: lining-nums; }

/* Fließtext (News-Artikel, Leistungsbeschreibungen) */
.prose { max-width: var(--wrap-text); font-size: var(--fs-md); line-height: 1.7; }
.prose > * + * { margin-top: 1.1em; }
.prose h2 { font-size: var(--fs-xl); margin-top: 1.8em; }
.prose h3 { font-size: var(--fs-lg); margin-top: 1.6em; }
.prose a { color: var(--accent-text); }
.prose ul, .prose ol { padding-left: 1.2em; }
.prose blockquote { font: italic 400 var(--fs-xl)/1.2 var(--font-serif); letter-spacing: -.015em; padding: .4em 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }

/* ---------- 2. Kopf, Navigation, Fuß ---------- */
.site-head {
  position: sticky; top: 0; z-index: var(--z-head);
  background: color-mix(in oklab, var(--paper) 84%, transparent);
  backdrop-filter: saturate(160%) blur(16px); -webkit-backdrop-filter: saturate(160%) blur(16px);
  border-bottom: 1px solid var(--line);
}
.site-head__in { display: flex; align-items: center; gap: var(--s-5); height: var(--head-h); }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; min-height: var(--tap); }
.brand__mark {
  width: 36px; height: 36px; border-radius: 11px; flex: none; display: grid; place-items: center;
  background: var(--accent); color: var(--on-accent); font: 600 13px/1 var(--font-mono); letter-spacing: .02em;
}
.brand__mark img { width: 100%; height: 100%; object-fit: contain; border-radius: inherit; }
.brand__name { font-weight: 600; font-size: 18px; letter-spacing: -.03em; line-height: 1.05; }
.brand__sub { display: block; font: 500 10.5px/1.2 var(--font-mono); letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin-top: 3px; }
.nav { display: none; gap: 2px; margin-left: auto; }
.nav a {
  display: inline-flex; align-items: center; min-height: 40px; padding: 0 14px; border-radius: var(--r-pill);
  text-decoration: none; font-size: 15px; color: var(--muted); transition: color var(--dur-1), background var(--dur-1);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: var(--paper-2); }
.head-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.nav + .head-actions { margin-left: 0; }
.icon-btn {
  width: var(--tap); height: var(--tap); flex: none; display: grid; place-items: center; cursor: pointer;
  border-radius: var(--r-pill); border: 1px solid var(--line); background: transparent; color: inherit;
  transition: background var(--dur-1), border-color var(--dur-1);
}
.icon-btn:hover { background: var(--paper-2); border-color: var(--line-strong); }
@media (min-width: 1000px) { .nav { display: flex; } .head-burger { display: none; } }

/* Mobile Tab-Leiste (PWA): nur auf Telefonen, unten fixiert */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: var(--z-head);
  display: grid; grid-template-columns: repeat(5, 1fr);
  padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
  background: color-mix(in oklab, var(--paper) 90%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
  border-top: 1px solid var(--line);
}
.tabbar a {
  display: grid; justify-items: center; gap: 3px; min-height: 52px; padding-top: 7px; border-radius: 12px;
  text-decoration: none; font-size: 11px; font-weight: 500; color: var(--muted);
}
.tabbar a[aria-current="page"] { color: var(--text); background: var(--paper-2); }
.tabbar a[aria-current="page"] .ico { color: var(--accent-text); }
.has-tabbar { padding-bottom: 76px; }
@media (min-width: 760px) { .tabbar { display: none; } .has-tabbar { padding-bottom: 0; } }

.site-foot { padding: var(--s-9) 0 var(--s-7); font-size: var(--fs-sm); }
.site-foot__grid { display: grid; gap: var(--s-6); grid-template-columns: 1fr; }
.site-foot h3 { font-size: var(--fs-sm); font-weight: 500; letter-spacing: 0; color: var(--muted); margin-bottom: var(--s-3); }
.site-foot ul { list-style: none; padding: 0; display: grid; gap: 8px; }
.site-foot a { text-decoration: none; }
.site-foot a:hover { text-decoration: underline; }
.site-foot__big { font-size: var(--fs-2xl); letter-spacing: -.045em; line-height: .95; font-weight: 600; }
.site-foot__base { display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; margin-top: var(--s-8); padding-top: var(--s-5); border-top: 1px solid var(--line); color: var(--muted); }
@media (min-width: 860px) { .site-foot__grid { grid-template-columns: 1.6fr repeat(3, 1fr); } }

/* ---------- 3. Buttons, Chips, Badges ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: var(--tap); padding: 0 22px;
  border-radius: var(--r-pill); border: 1px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap;
  font: 500 15px/1 var(--font-sans); letter-spacing: -.01em;
  transition: background var(--dur-2) var(--ease-out), border-color var(--dur-2), color var(--dur-2), transform var(--dur-1);
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn .arr { transition: transform var(--dur-2) var(--ease-out); }
.btn:hover .arr { transform: translateX(4px); }
.btn--primary { background: var(--accent); color: var(--on-accent); }
.btn--primary:hover { background: color-mix(in oklab, var(--accent) 86%, #000); }
.btn--ink { background: var(--text); color: var(--paper); }
.btn--ink:hover { background: color-mix(in oklab, var(--text) 82%, var(--paper)); }
.btn--line { border-color: var(--line-strong); color: var(--text); background: transparent; }
.btn--line:hover { border-color: var(--text); }
.btn--ghost { background: transparent; color: var(--text); }
.btn--ghost:hover { background: var(--paper-2); }
.btn--danger { background: var(--err); color: #fff; }
.btn--lg { min-height: 58px; padding: 0 30px; font-size: 17px; }
.btn--sm { min-height: 36px; padding: 0 14px; font-size: 14px; gap: 8px; }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }

.tag {
  display: inline-flex; align-items: center; gap: 6px; padding: 5px 9px; border-radius: var(--r-xs);
  font: 500 var(--fs-2xs)/1.1 var(--font-mono); letter-spacing: var(--tr-mono); text-transform: uppercase;
  background: var(--paper-2); color: var(--muted);
}
.tag--accent { background: var(--accent-soft); color: var(--accent-text); }

.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 16px; border-radius: var(--r-pill);
  border: 1px solid var(--line-strong); background: transparent; color: var(--text); font-size: 14.5px; cursor: pointer; text-decoration: none;
  transition: background var(--dur-1), color var(--dur-1), border-color var(--dur-1);
}
.chip:hover { border-color: var(--text); }
.chip[aria-pressed="true"], .chip[aria-current="true"], .chip.is-on { background: var(--text); color: var(--paper); border-color: var(--text); }
.chip__count { font: 500 12px/1 var(--font-mono); opacity: .7; }

/* Status eines Vorgangs — Werte = DB-Status (received, in_progress, waiting, done, rejected) */
.badge {
  display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px 5px 9px; border-radius: var(--r-pill);
  font-size: 13px; font-weight: 500; line-height: 1.2; background: var(--paper-2); color: var(--text); white-space: nowrap;
}
.badge::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex: none; }
.badge--received { background: var(--paper-2); color: var(--text); }
.badge--in_progress { background: var(--accent-soft); color: var(--accent-text); }
.badge--waiting { background: var(--warn-soft); color: var(--warn); }
.badge--done { background: var(--ok-soft); color: var(--ok); }
.badge--rejected { background: var(--err-soft); color: var(--err); }
.badge--live::before { animation: q-ping 2s var(--ease-out) infinite; box-shadow: 0 0 0 0 currentColor; }

/* ---------- 4. Flächen, Karten, Sektionen ---------- */
.sec { padding-block: var(--sec); }
.sec--tight { padding-block: calc(var(--sec) * .55); }
.sec-head { display: grid; gap: var(--s-4); margin-bottom: var(--s-7); align-items: end; }
.sec-head__title { font-size: var(--fs-2xl); letter-spacing: -.045em; line-height: .98; max-width: 16ch; }
.sec-head__more { justify-self: start; }
@media (min-width: 860px) { .sec-head { grid-template-columns: 1fr auto; } .sec-head .label { grid-column: 1 / -1; } .sec-head__more { justify-self: end; } }

.card {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  overflow: hidden; transition: transform var(--dur-3) var(--ease-out), box-shadow var(--dur-3) var(--ease-out), border-color var(--dur-2);
}
.card__body { padding: var(--s-5); display: grid; gap: var(--s-3); }
.card__media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--paper-2); }
.card__media > * { width: 100%; height: 100%; object-fit: cover; transition: transform var(--dur-5) var(--ease-out); }
.card__title { font-size: var(--fs-lg); line-height: 1.18; letter-spacing: -.028em; }
.card__link { text-decoration: none; }
.card__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; } /* ganze Karte klickbar */
.card__link:focus-visible { outline: none; }
.card:has(.card__link:focus-visible) { outline: 2px solid var(--focus); outline-offset: 3px; }
.card--hover:hover { transform: translateY(-4px); box-shadow: var(--sh-3); border-color: var(--line-strong); }
.card--hover:hover .card__media > * { transform: scale(1.045); }
.card--flat { background: transparent; border: 0; border-radius: 0; overflow: visible; }

.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-5); }

/* Medien-Platzhalter, bis echte Fotos/Videos der Gemeinde vorliegen */
.ph {
  position: relative; display: grid; place-items: end start; padding: 14px; min-height: 120px; color: var(--muted);
  background:
    repeating-linear-gradient(135deg, transparent 0 14px, color-mix(in oklab, var(--text) 5%, transparent) 14px 15px),
    var(--paper-2);
}
.ph--accent { color: var(--on-accent); background: repeating-linear-gradient(135deg, transparent 0 14px, rgba(255,255,255,.1) 14px 15px), var(--accent); }
.ph--ink { color: var(--on-ink-muted); background: repeating-linear-gradient(135deg, transparent 0 14px, rgba(255,255,255,.05) 14px 15px), var(--ink-2); }
.ph__label { font: 500 var(--fs-2xs)/1.3 var(--font-mono); letter-spacing: var(--tr-mono); text-transform: uppercase; }

.bento { display: grid; gap: var(--grid-gap); grid-template-columns: repeat(2, minmax(0, 1fr)); }
.bento > .span-2 { grid-column: span 2; }
@media (min-width: 900px) {
  .bento { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .bento > .span-3 { grid-column: span 3; } .bento > .row-2 { grid-row: span 2; }
}

/* ---------- 5. Startseite: Hero, Hinweise, Schnellzugriffe ---------- */
.hero {
  position: relative; isolation: isolate; overflow: hidden; color: #fff;
  margin: var(--s-3) var(--s-3) 0; border-radius: var(--r-xl);
  min-height: min(88svh, 880px); display: grid; align-content: end;
  background: var(--ink);
}
.hero__media { position: absolute; inset: 0; z-index: -1; }
.hero__media > video, .hero__media > img { width: 100%; height: 100%; object-fit: cover; }
.hero__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to top, color-mix(in oklab, var(--ink) 80%, transparent) 0%, color-mix(in oklab, var(--ink) 25%, transparent) 55%, color-mix(in oklab, var(--ink) 10%, transparent) 100%); }
.hero__in { padding: var(--s-7) var(--gut) var(--s-6); display: grid; gap: var(--s-5); }
.hero__title { font-size: var(--fs-display); line-height: .88; letter-spacing: var(--tr-display); font-weight: 600; max-width: 11ch; }
.hero__title em { font-size: 1.04em; }
.hero__sub { font-size: var(--fs-md); color: rgba(255,255,255,.82); max-width: 44ch; }
.hero__bar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; }
.hero .label { color: rgba(255,255,255,.78); }
.hero .icon-btn { border-color: rgba(255,255,255,.3); color: #fff; }
.hero .icon-btn:hover { background: rgba(255,255,255,.12); }

/* Heller Hero (Farbwelt „frisch“): Himmel → Wiese, dunkle Schrift. Ohne data-surface="ink" verwenden. */
.hero--pastel {
  color: var(--text);
  background: linear-gradient(170deg, var(--pastel-sky) 0%, var(--pastel-mint) 62%, color-mix(in oklab, var(--accent) 38%, var(--pastel-mint)) 100%);
}
.hero--pastel .hero__media::after { background: linear-gradient(to top, color-mix(in oklab, var(--paper) 70%, transparent) 0%, transparent 55%); }
.hero--pastel .hero__title em { color: var(--accent-text); }
.hero--pastel .hero__sub, .hero--pastel .label { color: var(--muted); }
.hero--pastel .icon-btn { border-color: var(--line-strong); color: var(--text); }
.hero--pastel .icon-btn:hover { background: color-mix(in oklab, var(--surface) 60%, transparent); }
.hero--pastel .chip { background: color-mix(in oklab, var(--surface) 55%, transparent); }

/* Pastell-Hero mit Foto/Video als großes abgerundetes Bild: Desktop rechts, mobil darunter.
   <section class="hero hero--pastel hero--split"> … .hero__in > Texte + <figure class="hero__figure"> */
.hero--split { align-content: center; min-height: 0; }
.hero--split .hero__in { padding-top: var(--s-8); padding-bottom: var(--s-7); }
.hero--split .hero__title { font-size: clamp(52px, 11vw, 132px); }
.hero__figure {
  margin: var(--s-3) 0 0; border-radius: var(--r-xl); overflow: hidden; aspect-ratio: 4 / 3;
  background: var(--paper-2); box-shadow: var(--sh-3); isolation: isolate;
}
.hero__figure > img, .hero__figure > video { width: 100%; height: 100%; object-fit: cover; animation: q-drift 30s var(--ease-in-out) infinite alternate; }
@media (min-width: 1000px) {
  .hero--split { min-height: min(84svh, 820px); }
  .hero--split .hero__in { grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); column-gap: var(--s-8); align-items: center; }
  .hero--split .hero__in > :not(.hero__figure) { grid-column: 1; }
  .hero--split .hero__title { font-size: clamp(56px, 7.4vw, 124px); }
  .hero__figure { grid-column: 2; grid-row: 1 / span 5; align-self: stretch; aspect-ratio: auto; min-height: 520px; margin: 0; }
}

/* Suchfeld „Was möchten Sie erledigen?“ */
.search {
  display: flex; align-items: center; gap: 10px; width: 100%; max-width: 620px; min-height: 60px; padding: 6px 6px 6px 20px;
  background: var(--surface); color: var(--text); border-radius: var(--r-pill); border: 1px solid var(--line); box-shadow: var(--sh-2);
}
.search input { flex: 1; min-width: 0; border: 0; background: transparent; font-size: 17px; padding: 10px 0; }
.search input::placeholder { color: var(--muted); }
.search:focus-within { outline: 2px solid var(--focus); outline-offset: 3px; }
.search input:focus-visible { outline: none; }

/* Wichtige Hinweise: Laufband, pausiert bei Hover/Fokus und über den Bewegungs-Schalter */
.notice { display: flex; align-items: stretch; min-height: 52px; border-bottom: 1px solid var(--line); background: var(--paper); overflow: hidden; }
.notice__label {
  flex: none; display: flex; align-items: center; gap: 8px; padding: 0 var(--s-4) 0 var(--gut);
  font: 500 var(--fs-2xs)/1 var(--font-mono); letter-spacing: var(--tr-mono); text-transform: uppercase; color: var(--warn);
  background: var(--paper); position: relative; z-index: 1; box-shadow: 16px 0 16px -8px var(--paper);
}
.notice__label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; animation: q-ping 2s var(--ease-out) infinite; }
.notice__viewport { flex: 1; min-width: 0; overflow: hidden; display: flex; align-items: center; }
.notice__track { display: flex; gap: var(--s-7); width: max-content; padding-left: var(--s-4); animation: q-marquee 46s linear infinite; }
.notice:hover .notice__track, .notice:focus-within .notice__track { animation-play-state: paused; }
.notice__item { display: inline-flex; align-items: center; gap: 12px; white-space: nowrap; font-size: 15px; text-decoration: none; }
.notice__item b { font-weight: 600; }
.notice__item .tag { flex: none; }
.notice__item:hover { text-decoration: underline; }
.notice__all { flex: none; display: flex; align-items: center; padding: 0 var(--gut) 0 var(--s-4); font-size: 14px; font-weight: 500; text-decoration: none; background: var(--paper); box-shadow: -16px 0 16px -8px var(--paper); position: relative; }

/* Schnellzugriffe: Kachel füllt sich beim Hover von unten mit der Akzentfarbe */
.quick { display: grid; gap: var(--grid-gap); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 900px) { .quick { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.quick__tile {
  position: relative; isolation: isolate; overflow: hidden; display: grid; align-content: space-between; gap: var(--s-6);
  min-height: 168px; padding: var(--s-5); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line);
  text-decoration: none; color: var(--text); transition: color var(--dur-3) var(--ease-out), border-color var(--dur-3);
}
.quick__tile::before {
  content: ""; position: absolute; inset: 0; z-index: -1; background: var(--accent);
  transform: scaleY(0); transform-origin: bottom; transition: transform var(--dur-3) var(--ease-out);
}
.quick__tile:hover, .quick__tile:focus-visible { color: var(--on-accent); border-color: var(--accent); }
.quick__tile:hover::before, .quick__tile:focus-visible::before { transform: scaleY(1); }
.quick__tile .ico { width: 28px; height: 28px; }
.quick__title { font-size: var(--fs-lg); font-weight: 600; letter-spacing: -.03em; line-height: 1.1; }
.quick__meta { font-size: 13.5px; opacity: .78; margin-top: 4px; }
.quick__top { display: flex; justify-content: space-between; align-items: start; }
.quick__tile--feature { background: var(--ink); color: var(--on-ink); border-color: var(--ink); }
.quick__tile--feature .quick__meta { opacity: .75; }

/* Pastell-Töne für Kacheln, Platzhalter, Tags (Farbwelt „frisch“) — Schrift bleibt --text */
.tone-mint { background-color: var(--pastel-mint); border-color: transparent; }
.tone-sky { background-color: var(--pastel-sky); border-color: transparent; }
.tone-sun { background-color: var(--pastel-sun); border-color: transparent; }
.tone-peach { background-color: var(--pastel-peach); border-color: transparent; }
.tone-sage { background-color: var(--pastel-sage); border-color: transparent; }
.tag[class*="tone-"] { color: var(--text); }

/* ---------- 6. News ---------- */
.news { display: grid; gap: var(--grid-gap); grid-template-columns: 1fr; }
@media (min-width: 900px) { .news { grid-template-columns: 1.35fr 1fr 1fr; } .news > :first-child { grid-row: span 2; } .news > :first-child .card__media { aspect-ratio: 4 / 4.2; } }
.news__meta { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; color: var(--muted); font-size: 13.5px; }
.article-head { padding-block: var(--s-8) var(--s-6); display: grid; gap: var(--s-5); }
.article-head h1 { font-size: var(--fs-3xl); line-height: .95; letter-spacing: var(--tr-display); max-width: 18ch; }
.article-media { border-radius: var(--r-xl); overflow: hidden; aspect-ratio: 16 / 8; }
.article-media > * { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 7. Termine & Kalender ---------- */
.events { list-style: none; padding: 0; border-top: 1px solid var(--line); }
.event {
  position: relative; display: grid; grid-template-columns: 76px 1fr; gap: var(--s-4); align-items: center;
  padding: var(--s-5) 0; border-bottom: 1px solid var(--line);
}
.event::after { content: ""; position: absolute; left: 0; bottom: -1px; height: 1px; width: 100%; background: var(--text); transform: scaleX(0); transform-origin: left; transition: transform var(--dur-4) var(--ease-out); }
.event:hover::after, .event:focus-within::after { transform: scaleX(1); }
.event__date { display: grid; justify-items: start; }
.event__day { font: 400 58px/.82 var(--font-serif); letter-spacing: -.03em; }
.event__mon { font: 500 var(--fs-2xs)/1 var(--font-mono); letter-spacing: var(--tr-mono); text-transform: uppercase; color: var(--muted); margin-top: 6px; }
.event__title { font-size: var(--fs-lg); letter-spacing: -.025em; line-height: 1.15; }
.event__title a { text-decoration: none; }
.event__title a::after { content: ""; position: absolute; inset: 0; }
.event__meta { display: flex; flex-wrap: wrap; gap: 4px 14px; color: var(--muted); font-size: 14px; margin-top: 6px; }
.event__aside { display: none; }
@media (min-width: 760px) { .event { grid-template-columns: 110px 1fr auto; } .event__aside { display: flex; gap: 8px; align-items: center; } .event__day { font-size: 72px; } }

.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal__dow { font: 500 var(--fs-2xs)/1 var(--font-mono); letter-spacing: var(--tr-mono); text-transform: uppercase; color: var(--muted); text-align: center; padding: 8px 0; }
.cal__day {
  position: relative; aspect-ratio: 1; min-height: 40px; display: grid; place-items: center; border-radius: 12px; border: 0;
  background: transparent; color: var(--text); font-size: 15px; font-variant-numeric: tabular-nums; cursor: pointer;
  transition: background var(--dur-1);
}
.cal__day:hover { background: var(--paper-2); }
.cal__day.is-out { color: var(--muted); opacity: .55; }
.cal__day.is-today { box-shadow: inset 0 0 0 1px var(--text); }
.cal__day[aria-pressed="true"] { background: var(--text); color: var(--paper); }
.cal__day.has-ev::after { content: ""; position: absolute; bottom: 7px; width: 5px; height: 5px; border-radius: 50%; background: var(--accent); }
.cal__day[aria-pressed="true"].has-ev::after { background: var(--paper); }

/* ---------- 8. Abfall ---------- */
.waste { display: grid; gap: var(--s-5); padding: var(--s-6); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.waste__count { font: 400 clamp(64px, 9vw, 120px)/.82 var(--font-serif); letter-spacing: -.035em; }
.waste__list { list-style: none; padding: 0; display: grid; }
.waste__list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); font-size: 15px; }
.bin { display: inline-flex; align-items: center; gap: 10px; font-weight: 500; }
.bin::before { content: ""; width: 14px; height: 14px; border-radius: 4px; background: var(--bin, var(--bin-rest)); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); flex: none; }
.bin--rest { --bin: var(--bin-rest); } .bin--bio { --bin: var(--bin-bio); } .bin--papier { --bin: var(--bin-papier); }
.bin--gelb { --bin: var(--bin-gelb); } .bin--glas { --bin: var(--bin-glas); }
.bin-strip { display: flex; height: 8px; border-radius: 99px; overflow: hidden; gap: 3px; }
.bin-strip > i { flex: 1; background: var(--bin); }

/* ---------- 9. Rathaus erreichen, Telefonzentrale ---------- */
.reach { display: grid; gap: var(--grid-gap); grid-template-columns: 1fr; }
@media (min-width: 960px) { .reach { grid-template-columns: 1.25fr 1fr; } }
.callcard {
  position: relative; overflow: hidden; isolation: isolate; display: grid; gap: var(--s-5); align-content: space-between;
  min-height: 360px; padding: var(--s-6); border-radius: var(--r-lg); background: var(--ink); color: var(--on-ink);
}
.callcard__num { font-size: clamp(34px, 5vw, 64px); font-weight: 600; letter-spacing: -.04em; line-height: 1; text-decoration: none; font-variant-numeric: tabular-nums; }
.callcard__live { display: inline-flex; align-items: center; gap: 10px; font: 500 var(--fs-2xs)/1 var(--font-mono); letter-spacing: var(--tr-mono); text-transform: uppercase; color: var(--on-ink-muted); }
.live-dot { color: #3ddc84; width: 9px; height: 9px; border-radius: 50%; background: #3ddc84; box-shadow: 0 0 0 0 rgba(61,220,132,.6); animation: q-ping 2s var(--ease-out) infinite; flex: none; }
.wave { position: absolute; inset: auto 0 0 0; z-index: -1; height: 46%; display: flex; align-items: flex-end; gap: 3px; padding: 0 3px; opacity: .55; pointer-events: none; }
.wave > i { flex: 1; height: 18%; border-radius: 2px 2px 0 0; background: linear-gradient(to top, var(--accent-glow), transparent); animation: q-bar 1.5s var(--ease-in-out) infinite alternate; animation-delay: calc(var(--i, 0) * -110ms); }
.wave > i:nth-child(3n) { --h: 72%; } .wave > i:nth-child(3n+1) { --h: 44%; } .wave > i:nth-child(4n) { --h: 90%; } .wave > i:nth-child(5n) { --h: 58%; }
.hours { display: grid; grid-template-columns: auto 1fr; gap: 6px 20px; font-size: 15px; font-variant-numeric: tabular-nums; }
.hours dt { color: var(--muted); }
.hours dd { margin: 0; }
.open-now { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 500; color: var(--ok); }
.open-now::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

/* ---------- 10. Verzeichnisse: Rathaus A–Z, Ämter, Vereine ---------- */
.az { display: flex; flex-wrap: wrap; gap: 4px; }
.az a, .az span { display: grid; place-items: center; min-width: 40px; height: 40px; border-radius: 10px; text-decoration: none; font: 500 15px/1 var(--font-mono); }
.az a:hover { background: var(--paper-2); }
.az a[aria-current="true"] { background: var(--text); color: var(--paper); }
.az span { color: var(--muted); opacity: .45; }
.az-group { display: grid; gap: var(--s-3); padding-block: var(--s-6); border-top: 1px solid var(--line); }
@media (min-width: 860px) { .az-group { grid-template-columns: 160px 1fr; } }
.az-group__letter { font: 400 96px/.8 var(--font-serif); letter-spacing: -.03em; }
.links { list-style: none; padding: 0; }
.row-link {
  display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; align-items: center; padding: 16px 4px; min-height: var(--tap);
  border-bottom: 1px solid var(--line); text-decoration: none; transition: padding var(--dur-3) var(--ease-out), background var(--dur-2);
}
.row-link:hover { padding-left: 14px; background: var(--paper-2); }
.row-link__title { font-size: var(--fs-md); font-weight: 500; letter-spacing: -.015em; }
.row-link__meta { grid-column: 1; color: var(--muted); font-size: 14px; }
.row-link .ico { grid-row: 1 / span 2; grid-column: 2; transition: transform var(--dur-2) var(--ease-out); }
.row-link:hover .ico { transform: translateX(4px); }

.person { display: grid; grid-template-columns: 56px 1fr; gap: var(--s-4); align-items: start; padding: var(--s-5); border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); }
.avatar { width: 56px; height: 56px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-text); font: 600 16px/1 var(--font-mono); overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.person__name { font-weight: 600; letter-spacing: -.02em; font-size: 17px; }
.person__role { color: var(--muted); font-size: 14px; }
.person__links { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 14.5px; }
.person__links a { color: var(--accent-text); text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.person__links a:hover { text-decoration: underline; }

.club { display: grid; gap: var(--s-4); padding: var(--s-5); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); text-decoration: none; transition: transform var(--dur-3) var(--ease-out), box-shadow var(--dur-3); }
.club:hover { transform: translateY(-4px); box-shadow: var(--sh-3); }
.club__logo { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; font: 600 17px/1 var(--font-mono); background: var(--paper-2); }
.club__name { font-size: var(--fs-lg); font-weight: 600; letter-spacing: -.03em; line-height: 1.12; }

/* ---------- 11. Formulare ---------- */
.form { display: grid; gap: var(--s-5); }
.field { display: grid; gap: 8px; }
.field__label { font-size: 15px; font-weight: 500; }
.field__label .req { color: var(--err); margin-left: 2px; }
.field__hint { font-size: 13.5px; color: var(--muted); }
.field__error { font-size: 13.5px; color: var(--err); display: flex; gap: 6px; align-items: center; }
.input, .select, .textarea {
  width: 100%; min-height: 54px; padding: 14px 16px; font-size: 16px; /* 16px: kein iOS-Zoom */
  border-radius: var(--r-md); border: 1px solid var(--line-strong); background: var(--surface); color: var(--text);
  transition: border-color var(--dur-1), box-shadow var(--dur-2);
}
.textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 44px; background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%); background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%; background-size: 6px 6px; background-repeat: no-repeat; }
.input:hover, .select:hover, .textarea:hover { border-color: var(--text); }
.input:focus-visible, .select:focus-visible, .textarea:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-line); }
.input[aria-invalid="true"], .textarea[aria-invalid="true"] { border-color: var(--err); }
.input::placeholder, .textarea::placeholder { color: var(--muted); opacity: .8; }

.choices { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); }
.choice { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: var(--r-md); border: 1px solid var(--line-strong); background: var(--surface); cursor: pointer; transition: border-color var(--dur-1), background var(--dur-1); }
.choice input { margin: 3px 0 0; accent-color: var(--accent); width: 18px; height: 18px; flex: none; }
.choice:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); box-shadow: inset 0 0 0 1px var(--accent); }
.choice:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 3px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; cursor: pointer; }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--accent); flex: none; }

.upload { display: grid; place-items: center; gap: 8px; text-align: center; padding: var(--s-6); border: 1.5px dashed var(--line-strong); border-radius: var(--r-md); color: var(--muted); font-size: 14.5px; transition: border-color var(--dur-1), background var(--dur-1); }
.upload:hover, .upload.is-drag { border-color: var(--accent); background: var(--accent-soft); color: var(--text); }

/* Formular-Schritte */
.steps { display: flex; gap: 6px; list-style: none; padding: 0; counter-reset: st; }
.steps li { flex: 1; display: grid; gap: 8px; counter-increment: st; font-size: 13px; color: var(--muted); }
.steps li::before { content: ""; height: 4px; border-radius: 99px; background: var(--line-strong); }
.steps li.is-done::before, .steps li[aria-current="step"]::before { background: var(--accent); }
.steps li[aria-current="step"] { color: var(--text); font-weight: 500; }

/* ---------- 12. Vorgang: Fortschritt + Gesprächsverlauf (Kern) ---------- */
.track { --p: 0; position: relative; display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); list-style: none; padding: 0; }
.track::before, .track::after { content: ""; position: absolute; top: 13px; left: calc(50% / var(--n, 5)); right: calc(50% / var(--n, 5)); height: 3px; border-radius: 99px; background: var(--line-strong); }
.track::after { right: auto; width: calc((100% - 100% / var(--n, 5)) * var(--p)); background: var(--accent); transform-origin: left; animation: q-grow var(--dur-5) var(--ease-out) both .2s; }
.track__step { position: relative; z-index: 1; display: grid; justify-items: center; gap: 10px; text-align: center; font-size: 13px; color: var(--muted); padding: 0 4px; }
.track__dot { width: 29px; height: 29px; border-radius: 50%; display: grid; place-items: center; background: var(--paper); border: 2px solid var(--line-strong); }
.track__dot .ico { width: 15px; height: 15px; stroke-width: 2.2; }
.track__step.is-done { color: var(--text); }
.track__step.is-done .track__dot { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.track__step[aria-current="step"] { color: var(--text); font-weight: 600; }
.track__step[aria-current="step"] .track__dot { border-color: var(--accent); box-shadow: 0 0 0 0 var(--accent-glow); animation: q-ring 2.2s var(--ease-out) infinite; }
.track__step[aria-current="step"] .track__dot::after { content: ""; width: 11px; height: 11px; border-radius: 50%; background: var(--accent); }
.track__when { display: block; font: 500 11px/1.3 var(--font-mono); letter-spacing: .02em; color: var(--muted); font-weight: 500; }

.promise { display: flex; gap: var(--s-4); align-items: center; padding: var(--s-4) var(--s-5); border-radius: var(--r-md); background: var(--accent-soft); color: var(--text); }
.promise b { color: var(--accent-text); }

.thread { display: grid; gap: var(--s-4); list-style: none; padding: 0; }
.msg { display: grid; gap: 6px; max-width: min(620px, 88%); animation: q-rise var(--dur-4) var(--ease-out) both; animation-delay: calc(var(--i, 0) * 120ms); }
.msg__bubble { padding: 14px 18px; border-radius: 22px; font-size: 16px; line-height: 1.55; background: var(--surface); border: 1px solid var(--line); }
.msg__who { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--muted); }
.msg__who b { color: var(--text); font-weight: 600; }
.msg__who .avatar { width: 28px; height: 28px; font-size: 11px; }
.msg__meta { font: 500 11.5px/1 var(--font-mono); letter-spacing: .02em; color: var(--muted); display: flex; gap: 10px; align-items: center; }
.msg--amt .msg__bubble { border-bottom-left-radius: 6px; }
.msg--me { justify-self: end; justify-items: end; }
.msg--me .msg__bubble { background: var(--accent); color: var(--on-accent); border-color: transparent; border-bottom-right-radius: 6px; }
.msg--sys { justify-self: center; max-width: 100%; display: flex; gap: 10px; align-items: center; font: 500 12px/1.4 var(--font-mono); letter-spacing: .02em; color: var(--muted); padding: 8px 14px; border: 1px dashed var(--line-strong); border-radius: var(--r-pill); text-align: center; }
.msg__file { display: flex; gap: 10px; align-items: center; padding: 10px 14px; border-radius: 14px; background: var(--paper-2); font-size: 14px; text-decoration: none; }
.msg--call .msg__bubble { background: var(--ink); color: var(--on-ink); border-color: transparent; }

.composer { display: grid; gap: 10px; padding: 12px; border-radius: 26px; background: var(--surface); border: 1px solid var(--line-strong); box-shadow: var(--sh-2); }
.composer:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-line), var(--sh-2); }
.composer textarea { width: 100%; min-height: 64px; border: 0; background: transparent; resize: none; padding: 8px 10px; font-size: 16px; line-height: 1.5; }
.composer textarea:focus-visible { outline: none; }
.composer__bar { display: flex; align-items: center; gap: 8px; justify-content: space-between; }

/* ---------- 13. Mängelmelder: Karte ---------- */
.map { position: relative; overflow: hidden; border-radius: var(--r-lg); background: var(--paper-2); min-height: 420px; isolation: isolate; }
.map > svg { position: absolute; inset: 0; width: 100%; height: 100%; }
.pin { position: absolute; transform: translate(-50%, -100%); display: grid; justify-items: center; }
.pin__head { width: 34px; height: 34px; border-radius: 50% 50% 50% 4px; transform: rotate(-45deg); display: grid; place-items: center; background: var(--text); color: var(--paper); box-shadow: var(--sh-2); }
.pin__head > * { transform: rotate(45deg); }
.pin--accent .pin__head { background: var(--accent); color: var(--on-accent); }
.pin--done .pin__head { background: var(--ok); color: #fff; }
.pin--new { animation: q-drop 900ms var(--ease-spring) both; }
.pin--new::after { content: ""; position: absolute; bottom: -6px; width: 30px; height: 10px; border-radius: 50%; background: var(--accent-glow); animation: q-ping 2s var(--ease-out) infinite; z-index: -1; }
.map__ui { position: absolute; z-index: 2; display: flex; flex-direction: column; gap: 6px; }

/* ---------- 14. Hinweise, Meldungen ---------- */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: var(--r-md); background: var(--paper-2); font-size: 15px; }
.alert--ok { background: var(--ok-soft); } .alert--ok .ico { color: var(--ok); }
.alert--warn { background: var(--warn-soft); } .alert--warn .ico { color: var(--warn); }
.alert--err { background: var(--err-soft); } .alert--err .ico { color: var(--err); }
.alert--info { background: var(--accent-soft); } .alert--info .ico { color: var(--accent-text); }

/* ---------- 15. Backoffice ---------- */
.app { display: flex; flex-wrap: wrap; min-height: 100vh; background: var(--paper); }
.app__side { flex: 1 1 100%; display: flex; flex-direction: column; gap: var(--s-5); padding: var(--s-4); background: var(--paper-2); border-bottom: 1px solid var(--line); }
.app__main { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; }
@media (min-width: 1000px) {
  .app { flex-wrap: nowrap; }
  .app__side { flex: 0 0 256px; border-bottom: 0; border-right: 1px solid var(--line); position: sticky; top: 0; height: 100vh; overflow-y: auto; }
}
.side__group { display: grid; gap: 2px; }
.side__label { padding: 8px 10px 6px; }
.side__link {
  display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 10px; border-radius: 10px;
  text-decoration: none; font-size: 14.5px; color: var(--muted); transition: background var(--dur-1), color var(--dur-1);
}
.side__link:hover { background: color-mix(in oklab, var(--text) 6%, transparent); color: var(--text); }
.side__link[aria-current="page"] { background: var(--surface); color: var(--text); font-weight: 500; box-shadow: var(--sh-1); }
.side__link[aria-current="page"] .ico { color: var(--accent-text); }
.side__count { margin-left: auto; font: 500 11.5px/1 var(--font-mono); padding: 4px 7px; border-radius: 99px; background: var(--paper); color: var(--text); }
.side__count--hot { background: var(--accent); color: var(--on-accent); }
.app__top { display: flex; align-items: center; gap: var(--s-4); min-height: var(--head-h); padding: 0 var(--gut); border-bottom: 1px solid var(--line); background: var(--paper); flex-wrap: wrap; }
.app__body { padding: var(--s-6) var(--gut) var(--s-8); display: grid; gap: var(--s-5); align-content: start; }
.page-head { display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: end; justify-content: space-between; }
.page-head h1 { font-size: var(--fs-2xl); letter-spacing: -.04em; }
.crumbs { display: flex; gap: 8px; font-size: 13.5px; color: var(--muted); flex-wrap: wrap; }
.crumbs a { text-decoration: none; } .crumbs a:hover { color: var(--text); }

.kpis { display: grid; gap: var(--grid-gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); }
.kpi { padding: var(--s-4) var(--s-5); border-radius: var(--r-md); background: var(--surface); border: 1px solid var(--line); display: grid; gap: 6px; }
.kpi__value { font-size: 34px; font-weight: 500; letter-spacing: -.04em; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi__delta { font-size: 13px; color: var(--muted); }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: left; font: 500 var(--fs-2xs)/1.2 var(--font-mono); letter-spacing: var(--tr-mono); text-transform: uppercase; color: var(--muted); padding: 12px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; background: var(--paper); }
.table td { padding: 14px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr { transition: background var(--dur-1); }
.table tbody tr:hover { background: color-mix(in oklab, var(--accent) 4%, var(--surface)); }
.table tbody tr[aria-selected="true"] { background: var(--accent-soft); }
.table .num { font-variant-numeric: tabular-nums; font-family: var(--font-mono); font-size: 13px; }
.table a { text-decoration: none; font-weight: 500; }
.table a:hover { text-decoration: underline; }

/* Fristen-Anzeige */
.sla { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sla__bar { width: 46px; height: 5px; border-radius: 99px; background: var(--line-strong); overflow: hidden; }
.sla__bar > i { display: block; height: 100%; width: var(--p, 50%); background: var(--ok); border-radius: inherit; }
.sla--soon { color: var(--warn); } .sla--soon .sla__bar > i { background: var(--warn); }
.sla--over { color: var(--err); font-weight: 600; } .sla--over .sla__bar > i { background: var(--err); width: 100%; }

.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.toolbar .input { min-height: 40px; padding: 8px 14px; border-radius: var(--r-pill); width: auto; flex: 1 1 220px; }
.seg { display: inline-flex; padding: 3px; border-radius: var(--r-pill); background: var(--paper-2); gap: 2px; }
.seg button, .seg a { min-height: 34px; padding: 0 14px; border: 0; border-radius: var(--r-pill); background: transparent; color: var(--muted); font-size: 14px; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; }
.seg [aria-pressed="true"], .seg [aria-current="page"] { background: var(--surface); color: var(--text); box-shadow: var(--sh-1); font-weight: 500; }

.split { display: grid; gap: var(--grid-gap); grid-template-columns: 1fr; align-items: start; }
@media (min-width: 1200px) { .split { grid-template-columns: minmax(360px, 420px) 1fr; } }
.inbox { display: grid; border: 1px solid var(--line); border-radius: var(--r-md); background: var(--surface); overflow: hidden; }
.inbox__item { display: grid; gap: 6px; padding: 14px 16px; border-bottom: 1px solid var(--line); text-decoration: none; transition: background var(--dur-1); }
.inbox__item:last-child { border-bottom: 0; }
.inbox__item:hover { background: var(--paper); }
.inbox__item[aria-current="true"] { background: var(--accent-soft); }
.inbox__item.is-unread .inbox__title { font-weight: 600; }
.inbox__item.is-unread .inbox__title::before { content: ""; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); margin-right: 8px; vertical-align: middle; }
.inbox__top { display: flex; justify-content: space-between; gap: 10px; font-size: 12.5px; color: var(--muted); font-family: var(--font-mono); }
.inbox__title { font-size: 15px; letter-spacing: -.01em; }
.inbox__row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

.switch { position: relative; display: inline-flex; align-items: center; gap: 12px; cursor: pointer; font-size: 14.5px; }
.switch input { appearance: none; width: 44px; height: 26px; border-radius: 99px; background: var(--line-strong); position: relative; cursor: pointer; transition: background var(--dur-2) var(--ease-out); flex: none; margin: 0; }
.switch input::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: var(--sh-1); transition: transform var(--dur-2) var(--ease-spring); }
.switch input:checked { background: var(--accent); }
.switch input:checked::after { transform: translateX(18px); }
.switch input:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.tabs a, .tabs button { padding: 12px 14px; border: 0; background: none; font-size: 14.5px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; cursor: pointer; white-space: nowrap; }
.tabs [aria-selected="true"], .tabs [aria-current="page"] { color: var(--text); border-bottom-color: var(--text); font-weight: 500; }

.review { display: grid; gap: var(--s-3); padding: var(--s-4) var(--s-5); border-radius: var(--r-md); background: var(--warn-soft); }

/* ---------- 16. Bewegung ---------- */
@keyframes q-rise { from { opacity: 0; transform: translateY(var(--reveal-y, 24px)); } to { opacity: 1; transform: none; } }
@keyframes q-word { from { opacity: 0; transform: translateY(.38em); clip-path: inset(0 0 100% 0); } to { opacity: 1; transform: none; clip-path: inset(-20% -5% -20% -5%); } }
@keyframes q-marquee { to { transform: translateX(-50%); } }
@keyframes q-ping { 0% { box-shadow: 0 0 0 0 currentColor; } 80%, 100% { box-shadow: 0 0 0 9px transparent; } }
@keyframes q-ring { 0% { box-shadow: 0 0 0 0 var(--accent-glow); } 80%, 100% { box-shadow: 0 0 0 12px transparent; } }
@keyframes q-bar { to { height: var(--h, 60%); } }
@keyframes q-grow { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes q-drift { from { transform: scale(1.02) translate3d(0, 0, 0); } to { transform: scale(1.12) translate3d(-2%, -1.5%, 0); } }
@keyframes q-draw { from { stroke-dashoffset: var(--len, 1200); } to { stroke-dashoffset: 0; } }
@keyframes q-drop { 0% { opacity: 0; transform: translate(-50%, -160%); } 100% { opacity: 1; transform: translate(-50%, -100%); } }

/* Beim Laden: .rise (Element) bzw. .words > span (Wort für Wort), Versatz über --i */
.rise { animation: q-rise var(--dur-4) var(--ease-out) both; animation-delay: calc(var(--i, 0) * var(--stagger)); }
.words > span { display: inline-block; animation: q-word 1s var(--ease-out) both; animation-delay: calc(120ms + var(--i, 0) * 85ms); }
.drift { animation: q-drift 24s var(--ease-in-out) infinite alternate; }
.draw { stroke-dasharray: var(--len, 1200); animation: q-draw 2.6s var(--ease-in-out) both .3s; }

/* Beim Scrollen: .rv — CSS-only, wo der Browser Scroll-Timelines kann, sonst motion.js */
@supports (animation-timeline: view()) {
  .rv { animation: q-rise linear both; animation-timeline: view(); animation-range: entry 0% entry 55%; }
}
@supports not (animation-timeline: view()) {
  .js .rv { opacity: 0; transform: translateY(var(--reveal-y)); transition: opacity var(--dur-4) var(--ease-out), transform var(--dur-4) var(--ease-out); transition-delay: calc(var(--i, 0) * var(--stagger)); }
  .js .rv.is-in { opacity: 1; transform: none; }
}

/* Bewegungs-Schalter (WCAG 2.2.2): <html data-motion="paused"> hält alles an */
[data-motion="paused"] *, [data-motion="paused"] *::before, [data-motion="paused"] *::after { animation-play-state: paused !important; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
  .rv, .js .rv { animation: none !important; opacity: 1 !important; transform: none !important; }
  .notice__track, .drift, .wave > i { animation: none !important; }
  .notice__viewport { overflow-x: auto; }
}

/* ---------- 17. Kompatibilität mit vorhandenen Views (Übergang) ----------
   Die Views unter modules/ nutzen diese Klassen schon. Wird das Layout
   umgestellt, sehen sie damit sofort passend aus. Neue Views: Klassen oben. */
.tiles { display: grid; gap: var(--grid-gap); grid-template-columns: repeat(auto-fill, minmax(min(100%, 230px), 1fr)); }
.tile { display: grid; gap: 4px; padding: var(--s-5); border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); text-decoration: none; transition: border-color var(--dur-2), transform var(--dur-3) var(--ease-out); }
.tile:hover { border-color: var(--text); transform: translateY(-2px); }
.tile strong { font-size: 17px; letter-spacing: -.02em; } .tile span { color: var(--muted); font-size: 14px; }
.note { padding: 14px 18px; border-radius: var(--r-md); background: var(--warn-soft); margin: var(--s-4) 0; }
.note--ok { background: var(--ok-soft); } .note--err { background: var(--err-soft); }
.alert--error { background: var(--err-soft); } .alert--success { background: var(--ok-soft); }
.req { color: var(--err); } .err { color: var(--err); font-size: 13.5px; }
.hp { position: absolute; left: -9999px; }
.timeline { list-style: none; padding: 0; } .timeline li { border-left: 2px solid var(--line-strong); padding: 0 0 var(--s-4) var(--s-4); } .timeline time { color: var(--muted); font-size: 13.5px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 14.5px; } .tbl th, .tbl td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.tbl th { font: 500 var(--fs-2xs)/1.2 var(--font-mono); letter-spacing: var(--tr-mono); text-transform: uppercase; color: var(--muted); }
.fl { display: block; font-size: 14px; font-weight: 500; margin: var(--s-3) 0 6px; }
.fi { width: 100%; min-height: 42px; padding: 9px 12px; font-size: 15px; border: 1px solid var(--line-strong); border-radius: var(--r-sm); background: var(--surface); color: var(--text); }
.fi:focus-visible { outline: none; border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-line); }
.hint { font-size: 13px; color: var(--muted); margin-top: 6px; }
.nav-chip { display: inline-flex; align-items: center; min-height: 34px; padding: 0 14px; border-radius: var(--r-pill); border: 1px solid var(--line-strong); text-decoration: none; font-size: 14px; }
.nav-chip.is-on { background: var(--text); color: var(--paper); border-color: var(--text); }
.page-title { font-size: var(--fs-xl); margin-bottom: var(--s-4); }
.grid2 { display: grid; gap: var(--grid-gap); grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); align-items: start; }
.pre { white-space: pre-wrap; font: 13px/1.5 var(--font-mono); background: var(--paper-2); padding: var(--s-3); border-radius: var(--r-sm); max-height: 32rem; overflow: auto; }
.lnk { background: none; border: 0; color: var(--accent-text); cursor: pointer; font-size: 13.5px; padding: 0 4px; }
