/* Owner: E (the file). Überblick, Suche, Vorgänge, Vorgang, Fristen (with the one deadline row of every page –
   js/ui/termine.js), Chronik, Mails – spec §5.2, §5.4–§5.9, §4.2, §4.4; reference W/design/final/mockup/css/akte.css.
   Layer "pages"; the few print rules of these pages in @media print { @layer print }. Tokens only, no colour values.
   States only via attributes (data-zustand, aria-current, aria-pressed, data-ganz, hidden). Pages react to the width
   of the panel (@container haupt), the frame (C) decides the rest. The page scaffold (.seite, .seitenkopf, .meta,
   .zweispaltig, .seitenspalte) is C's (layout.css). */

@layer pages {
  /* ── Überblick ── */
  .lage { display: grid; gap: 32px; }
  .lage__links, .lage__rechts { display: grid; gap: 32px; min-width: 0; align-content: start; }
  .lage .abschnitt + .abschnitt { margin-top: 0; }
  .lage > * { min-width: 0; }
  @container haupt (min-width: 1000px) {
    .lage { grid-template-columns: minmax(0, 1.6fr) minmax(340px, 1fr); column-gap: 28px; align-items: start; }
  }
  /* One column: the order of spec §3.6 – Fristen, (Ihr Zugang), Neu, Bereiche, Zuletzt geschehen, Neueste Mails, Fragen */
  @container haupt (max-width: 999px) {
    .lage__links, .lage__rechts { display: contents; }
    .lage > * > .abschnitt { order: 5; }
    .lage .abschnitt--fristen { order: 1; }
    .lage .abschnitt--zugang { order: 2; }
    .lage .abschnitt--neu { order: 3; }
    .lage .abschnitt--bereich { order: 4; }
    .lage .abschnitt--unterlagen { order: 3; }
    .lage .abschnitt--zuletzt { order: 6; }
    .lage .abschnitt--neueste { order: 7; }
    .lage .abschnitt--fragen { order: 8; }
  }

  .neu { display: grid; grid-template-columns: 1fr 1fr; }
  .neu__kachel { position: relative; display: grid; gap: 2px; padding: 12px 14px; color: var(--text); text-decoration: none; min-width: 0; }
  .neu__kachel:nth-child(odd) { border-right: 1px solid var(--border); }
  .neu__kachel:nth-child(n+3) { border-top: 1px solid var(--border); }
  .neu__kachel:hover { background: var(--surface-hover); }
  .neu__kachel:focus-visible { outline-offset: -2px; }
  .neu__zahl { font-size: var(--fs-22); line-height: 28px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
  .neu__text { display: flex; align-items: center; gap: 4px; font-size: var(--fs-13); color: var(--text-2); }
  .neu__text .icon { color: var(--text-3); margin-left: auto; width: 14px; height: 14px; }
  /* a tile with 0 is quiet text, no link into an empty list; all four 0: one line instead of four zeros */
  .neu__kachel[data-leer] .neu__zahl, .neu__kachel[data-leer] .neu__text { color: var(--text-3); }
  .neu__kachel[data-leer]:hover { background: none; }
  .neu__nichts { padding: 12px 14px; font-size: var(--fs-13); line-height: 20px; color: var(--text-2); }

  .bereich__kopf { padding: 14px 16px 12px; display: grid; gap: 4px; border-bottom: 1px solid var(--border); }
  .bereich__titelzeile { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
  .bereich__titel { font-size: var(--fs-15); line-height: 22px; font-weight: 600; letter-spacing: -0.01em; min-width: 0; overflow-wrap: anywhere; }
  .bereich__zahlen { margin-left: auto; font-size: var(--fs-13); color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
  .bereich__text { font-size: var(--fs-13); line-height: 20px; color: var(--text-2); max-width: 90ch; }
  .bereich__kopf .pillen { margin-top: 6px; }

  .vzeile { display: grid; grid-template-columns: 76px minmax(0, 1fr) auto; gap: 2px 12px; align-items: start; padding: 10px 16px; }
  .vzeile__pille { line-height: 20px; }
  .vzeile__titel { line-height: 20px; overflow-wrap: anywhere; }
  .vzeile__daten { font-size: var(--fs-13); color: var(--text-3); white-space: nowrap; font-variant-numeric: tabular-nums; line-height: 20px; }
  .vzeile__stand {
    grid-column: 2 / 4; font-size: var(--fs-14); line-height: 21px; color: var(--text-2); max-width: 75ch; overflow-wrap: anywhere;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
  }

  .ereignisse { list-style: none; }
  .ereignis { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 4px 12px; align-items: start; padding: 10px 14px; }
  .ereignis + .ereignis { border-top: 1px solid var(--border); }
  .ereignis__datum { font-size: var(--fs-13); line-height: 20px; color: var(--text-2); font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .ereignis__jahr { display: block; font-size: var(--fs-12); line-height: 16px; color: var(--text-3); font-weight: 400; }
  .ereignis__titel { line-height: 20px; color: var(--text); min-width: 0; overflow-wrap: anywhere; }
  /* the overview keeps its right column short (checklist C4): a title of "Zuletzt geschehen" takes at most two lines
     – the whole text stays in the DOM (screen readers) and in the Chronik */
  .ereignis__titel > .ereignis__text { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
  /* two columns: one line with an ellipsis, as in the reference ("12.11. Schreiben … an die Zentrale #411") */
  @container haupt (min-width: 1000px) { .ereignis__titel > .ereignis__text { -webkit-line-clamp: 1; line-clamp: 1; } }
  .ereignis__titel .fristmarke { margin-top: 6px; display: flex; width: max-content; max-width: 100%; white-space: normal; height: auto; min-height: 20px; }
  .ereignis__refs { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 4px; align-items: center; max-width: 140px; }

  .mzeile { display: grid; grid-template-columns: 62px minmax(0, 1fr) auto; gap: 0 10px; align-items: start; padding: 9px 14px; }
  .mzeile__ref { line-height: 20px; }
  .mzeile__betreff { display: block; line-height: 20px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mzeile__wer { display: block; font-size: var(--fs-13); line-height: 18px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .mzeile__zeit { font-size: var(--fs-13); line-height: 20px; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; text-align: right; }
  .mzeile__zeit .icon { vertical-align: -2px; margin-left: 4px; width: 13px; height: 13px; }
  .mzeile > span:nth-child(2) { min-width: 0; }

  .zugang { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 8px 16px; padding: 14px 16px; font-size: var(--fs-13); }
  .zugang dt { color: var(--text-3); white-space: nowrap; }
  .zugang dd { color: var(--text); min-width: 0; overflow-wrap: anywhere; }

  .fzeile { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; align-items: center; padding: 10px 10px 10px 14px; }
  .fzeile + .fzeile { border-top: 1px solid var(--border); }
  .fzeile__text { grid-column: 1; line-height: 20px; color: var(--text); overflow-wrap: anywhere; }
  .fzeile__zeit { grid-column: 1; font-size: var(--fs-12); line-height: 16px; color: var(--text-3); font-variant-numeric: tabular-nums; }
  .fzeile .knopf { grid-column: 2; grid-row: 1 / span 2; }

  /* ── The deadline row: ONE component for Überblick, Fristen, Vorgang, Mail and Chronik (ui/termine.js) ── */
  .frist {
    position: relative; display: grid; grid-template-columns: 188px minmax(0, 1fr); grid-template-rows: auto 1fr;
    column-gap: 16px; row-gap: 2px; align-items: start; padding: 12px 16px;
  }
  .liste > .frist + .frist, .liste > .frist + .termin, .liste > .termin + .termin { border-top: 1px solid var(--border); }
  .frist__marke { grid-column: 1; grid-row: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
  .frist__marke .fristmarke { max-width: 100%; }
  .frist__datum {
    grid-column: 1; grid-row: 2; font-size: var(--fs-13); line-height: 20px; font-weight: 500;
    font-variant-numeric: tabular-nums; color: var(--text-2); white-space: nowrap;
  }
  .frist__datum--ohne { color: var(--text-3); font-weight: 400; font-variant-numeric: normal; }
  .frist__inhalt { grid-column: 2; grid-row: 1 / span 2; min-width: 0; }
  .frist__titel { display: block; line-height: 24px; font-weight: 500; color: var(--text); overflow-wrap: anywhere; }
  a.frist__titel:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border-input); }
  .frist__notiz { margin-top: 2px; font-size: var(--fs-13); line-height: 20px; color: var(--text-2); max-width: 75ch; overflow-wrap: anywhere; }
  .frist__meta, .termin__meta {
    margin-top: 4px; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; font-size: var(--fs-13); line-height: 20px; color: var(--text-2);
  }
  .frist__meta .meta-teil, .termin__meta .meta-teil, .eintrag__meta .meta-teil { display: inline-flex; align-items: center; gap: 5px; min-width: 0; overflow-wrap: anywhere; }
  .frist__meta .meta-teil .icon, .termin__meta .meta-teil .icon, .eintrag__meta .meta-teil .icon { color: var(--text-3); flex: none; }
  .frist__meta a.meta-teil .icon, .termin__meta a.meta-teil .icon, .eintrag__meta a.meta-teil .icon { color: currentColor; opacity: 0.75; }
  /* Numbered deadlines on #/fristen: the number links the row to its point on the axis */
  .frist--nr { grid-template-columns: 208px minmax(0, 1fr); }
  .frist--nr:has(.fristnr) .frist__datum { padding-left: 28px; }
  .fristnr {
    display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; flex: none;
    border: 2px solid var(--danger-solid); background: var(--surface); color: var(--danger-text);
    font-size: var(--fs-12); line-height: 1; font-weight: 600; font-variant-numeric: tabular-nums;
  }
  .fristnr[data-zustand="ueberfaellig"] { background: var(--danger-solid); color: var(--text-on-solid); }
  .fristnr[data-zustand="laeuft"] { border-color: var(--border-input); color: var(--text-2); }
  /* Narrow places (side column of a Vorgang, panel ≤ 760): mark + date in the first line, the content below */
  .frist--schmal { grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; row-gap: 6px; padding: 10px 12px; }
  .frist--schmal .frist__marke { grid-column: 1; grid-row: 1; }
  .frist--schmal .frist__datum { grid-column: 2; grid-row: 1; align-self: center; text-align: right; padding-left: 0; }
  .frist--schmal .frist__inhalt { grid-column: 1 / -1; grid-row: 2; }
  @container haupt (max-width: 760px) {
    .frist, .frist--nr { grid-template-columns: auto minmax(0, 1fr); column-gap: 10px; row-gap: 6px; padding: 12px 14px; }
    .frist__marke { grid-column: 1; grid-row: 1; }
    .frist__datum, .frist--nr:has(.fristnr) .frist__datum { grid-column: 2; grid-row: 1; align-self: center; text-align: right; padding-left: 0; }
    .frist__inhalt { grid-column: 1 / -1; grid-row: 2; }
  }
  .frist__marke .fristmarke { white-space: normal; height: auto; min-height: 24px; }
  /* Überblick: the one row for the deadlines to clarify (decision D1) – the same grid, a quieter title */
  .frist--sammel .frist__titel { font-weight: 500; }
  .abschnitt--fristen .abschnitt__kopf .etikett { margin-left: 4px; }
  /* targets of the deadline and event rows: links at least 24 px high (WCAG 2.5.8, audit §6.7 BF R23) – also when the
     side column of a Vorgang becomes one column next to the reading pane */
  .frist__meta, .termin__meta, .eintrag__meta { row-gap: 4px; }
  .frist__meta a.meta-teil, .termin__meta a.meta-teil, .eintrag__meta a.meta-teil { min-height: 24px; }

  /* An event of the catalogue in a short list (Vorgang, mail view): weekday + date | title + meta */
  .termin { position: relative; display: grid; grid-template-columns: 108px minmax(0, 1fr); gap: 2px 12px; align-items: start; padding: 10px 12px; }
  .termin__datum { font-size: var(--fs-13); line-height: 20px; color: var(--text-2); font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .termin__inhalt { min-width: 0; }
  .termin__titel { display: block; line-height: 24px; color: var(--text); font-weight: 500; overflow-wrap: anywhere; }
  .termin__meta { margin-top: 2px; }

  /* ── Fristen page: axis (aria-hidden; the list carries the information). Points and Mondays: --x via CSSOM ── */
  .achse { position: relative; padding: 30px 16px 12px; }
  .achse__band { position: relative; height: 40px; margin: 0 10px; }
  .achse__linie { position: absolute; left: 0; right: 0; top: 19px; height: 1px; background: var(--border-strong); }
  .achse__zone {
    position: absolute; top: 12px; height: 15px; left: 33.333%; width: 33.333%; border-radius: 3px;
    background: var(--danger-subtle); box-shadow: inset 0 0 0 1px var(--danger-border);
  }
  .achse__zone-text { position: absolute; top: -2px; left: calc(33.333% + 6px); font-size: var(--fs-12); line-height: 12px; color: var(--danger-text); font-weight: 600; white-space: nowrap; transform: translateY(-100%); }
  .achse__heute { position: absolute; top: 4px; bottom: -2px; left: 33.333%; width: 2px; margin-left: -1px; background: var(--accent-line); border-radius: 1px; }
  .achse__heute-text { position: absolute; top: -2px; right: calc(66.667% + 6px); transform: translateY(-100%); font-size: var(--fs-12); line-height: 12px; font-weight: 600; color: var(--accent-text); white-space: nowrap; }
  .achse__punkt { position: absolute; top: 9px; left: var(--x, 0%); margin-left: -10px; }
  .achse__skala { position: relative; height: 18px; margin: 4px 10px 0; font-size: var(--fs-12); line-height: 16px; color: var(--text-3); font-variant-numeric: tabular-nums; }
  .achse__marke { position: absolute; left: var(--x, 0%); transform: translateX(-50%); white-space: nowrap; }
  @container haupt (max-width: 760px) {
    .achse__marke--neben { display: none; }
    .achse__zone-text { left: auto; right: 0; }
  }
  @container haupt (max-width: 420px) { .achse__zone-text { display: none; } }

  .gruppe-zu { margin-top: 24px; }
  .fristen-seite .abschnitt { scroll-margin-top: calc(var(--kopf-hoehe, 0px) + 16px); }
  .fristen-seite .abschnitt__kopf h2:focus { outline: none; }
  .fristen-seite .abschnitt__kopf h2:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 2px; }
  .gruppe-zu > summary { margin: 0; padding: 4px 0 4px 24px; min-height: 28px; font-size: var(--fs-14); font-weight: 600; color: var(--text); }
  .gruppe-zu > summary > .klappe__pfeil { left: 0; top: 6px; }
  .gruppe-zu > summary:hover { background: none; }
  .gruppe-zu > .klappe__inhalt { padding-top: 8px; }
  .fristen-seite .abschnitt + .abschnitt, .fristen-seite .achse + .abschnitt { margin-top: 32px; }
  /* The page explains its own rules (side column) */
  .fristregeln { display: grid; gap: 12px; padding: 14px 16px 16px; }
  .fristregeln h2 { font-size: var(--fs-14); line-height: 20px; }
  .fristregeln__satz { font-size: var(--fs-13); color: var(--text-2); }
  .fristregeln__liste { display: grid; gap: 10px; }
  .fristregeln__liste dd { margin-top: 4px; font-size: var(--fs-13); line-height: 18px; color: var(--text-2); }
  .fristregeln__fuss { display: flex; gap: 8px; align-items: flex-start; padding-top: 10px; border-top: 1px solid var(--border); font-size: var(--fs-12); line-height: 16px; color: var(--cat-eyebrow); }
  .fristregeln__fuss .icon { flex: none; color: var(--cat-eyebrow); }

  /* ── Chronik ── */
  .chronik-werkzeuge { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 16px; }
  .chronik-werkzeuge > .feld-gruppe { width: 240px; max-width: 100%; }
  .chronik-werkzeuge .rechts { margin-left: auto; }
  .chronik-chips { display: contents; }
  .chronik, .monat__liste { list-style: none; }
  .monat { position: sticky; top: 0; z-index: var(--z-sticky); display: flex; align-items: center; gap: 10px; height: 40px; background: var(--surface); }
  .monat h2 { font-size: var(--fs-13); line-height: 20px; font-weight: 600; letter-spacing: 0; }
  .monat .zahl { font-size: var(--fs-12); color: var(--text-3); font-variant-numeric: tabular-nums; }
  .monat::after { content: ""; flex: 1; height: 1px; background: var(--border); }
  .monat__liste { position: relative; padding-bottom: 8px; }
  .monat__liste::before { content: ""; position: absolute; left: 95px; top: 0; bottom: 0; width: 1px; background: var(--border-strong); }
  .eintrag { position: relative; display: grid; grid-template-columns: 72px 24px minmax(0, 1fr); gap: 0 12px; padding: 10px 0; }
  .eintrag__datum { text-align: right; line-height: 20px; padding-top: 2px; }
  .eintrag__tag { display: block; font-size: var(--fs-14); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text); }
  .eintrag__wtag { display: block; font-size: var(--fs-12); line-height: 16px; color: var(--text-3); }
  .eintrag__knoten {
    position: relative; z-index: 1; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%;
    background: var(--surface); border: 1px solid var(--border-input); color: var(--text-2);
  }
  /* a deadline's node: red only while it is overdue or due soon (spec §2.2.3, §4.2 "verstrichen – nie Rot") */
  .eintrag__knoten--frist { color: var(--text-3); }
  .eintrag__knoten--frist:is([data-zustand="ueberfaellig"], [data-zustand="bald"]) { border-color: var(--danger-border); color: var(--danger-text); background: var(--danger-subtle); }
  .eintrag__inhalt { min-width: 0; padding: 2px 0 0; }
  .eintrag__art { font-size: var(--fs-12); line-height: 16px; color: var(--text-3); font-weight: 500; }
  .eintrag__titel { display: block; margin-top: 1px; font-weight: 500; line-height: 21px; color: var(--text); overflow-wrap: anywhere; }
  a.eintrag__titel:hover { text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--border-input); }
  .eintrag__notiz {
    margin-top: 2px; font-size: var(--fs-13); line-height: 20px; color: var(--text-2); max-width: 75ch; overflow-wrap: anywhere;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
  }
  .eintrag__notiz[data-ganz] { display: block; -webkit-line-clamp: unset; line-clamp: none; overflow: visible; }
  .eintrag__mehr { margin: 2px 0 0 -6px; }
  /* MailRefs always below the title as chips that never break inside; wrapping only between chips (BF R30) */
  .eintrag__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 6px; font-size: var(--fs-13); color: var(--text-2); }
  .eintrag__meta .fristmarke { white-space: normal; height: auto; min-height: 20px; }
  .heute-zeile { list-style: none; }
  .heute-linie { position: relative; display: grid; grid-template-columns: 72px 24px minmax(0, 1fr); gap: 0 12px; align-items: center; height: 32px; }
  .heute-linie__text { grid-column: 1; text-align: right; font-size: var(--fs-12); font-weight: 600; color: var(--accent-text); white-space: nowrap; }
  .heute-linie__punkt { grid-column: 2; justify-self: center; width: 10px; height: 10px; border-radius: 50%; background: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-subtle); }
  .heute-linie__strich { grid-column: 3; height: 2px; background: var(--accent-line); border-radius: 1px; }
  .liste-ende { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 8px 12px; margin-top: 12px; font-size: var(--fs-12); color: var(--text-3); text-align: center; }

  /* ── Chronik: proposals of the language model and the mails after the curated state (vorschlaege_api.md) ── */
  .chronik-oben:not(:empty) { margin-bottom: 16px; }
  /* The curated state: where the hand-kept part ends – drawn in the material of the catalogue (index card, cool, flat) */
  .stand-zeile { list-style: none; }
  .stand-linie { display: grid; grid-template-columns: 72px 24px minmax(0, 1fr); gap: 0 12px; align-items: start; padding: 10px 0; }
  .stand-linie__text { grid-column: 1; text-align: right; padding-top: 6px; font-size: var(--fs-12); line-height: 16px; font-weight: 600; color: var(--cat-eyebrow); white-space: nowrap; }
  .stand-linie__punkt {
    grid-column: 2; position: relative; z-index: 1; display: grid; place-items: center; width: 24px; height: 24px; border-radius: var(--r-xs);
    background: var(--cat-surface); border: 1px solid var(--cat-ring); color: var(--cat-text);
  }
  .stand-linie__inhalt {
    grid-column: 3; min-width: 0; display: grid; gap: 2px; padding: 8px 12px; border-radius: var(--r-sm);
    background: var(--cat-surface); border: 1px solid var(--cat-border); font-size: var(--fs-13); line-height: 20px; color: var(--cat-text);
  }
  .stand-linie__titel { overflow-wrap: anywhere; }
  .stand-linie__titel strong { font-weight: 600; color: var(--text); }
  .stand-linie__satz { color: var(--text-2); max-width: 80ch; overflow-wrap: anywhere; }

  /* An open proposal: framed, the machine sign on the line, the pill above the title – never the look of an entry */
  .eintrag__knoten--vorschlag { background: var(--info-subtle); border-color: var(--info-border); color: var(--info-text); }
  .vorschlag-karte { padding: 10px 12px 12px; margin-top: -2px; border: 1px solid var(--border-strong); border-radius: var(--r-md); background: var(--surface); }
  .eintrag__art--vorschlag { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; margin-bottom: 4px; }
  .eintrag__art--vorschlag .pille { max-width: 100%; height: auto; min-height: 20px; white-space: normal; }
  .eintrag--verworfen .eintrag__titel { color: var(--text-2); }
  .eintrag--verworfen .eintrag__knoten--vorschlag { background: var(--surface); border-color: var(--border-input); color: var(--text-3); }
  .eintrag__frisch { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: var(--fs-13); line-height: 20px; color: var(--text-2); overflow-wrap: anywhere; }
  .eintrag__frisch > span { min-width: 0; }
  /* The verbatim quote of a proposal: a quotation from the mail – serif, neutral rule, never amber (spec §2.2) */
  .vzitat { margin-top: 6px; display: grid; gap: 4px; min-width: 0; }
  .vzitat__quelle { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: var(--fs-12); line-height: 20px; color: var(--text-3); }
  .vzitat__quelle > .icon { flex: none; }
  .vzitat__quelle > span { min-width: 0; overflow-wrap: anywhere; }
  .vzitat__tag { font-variant-numeric: tabular-nums; }
  .vzitat__auch { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; }
  .vzitat__text {
    font-family: var(--font-text); font-weight: var(--text-weight); font-size: var(--fs-15); line-height: 23px; color: var(--paper-text);
    max-width: 75ch; border-left: 2px solid var(--border-strong); padding-left: 10px; hyphens: manual; overflow-wrap: anywhere;
    font-variant-numeric: lining-nums;
  }
  /* The decision of an admin */
  .ventscheid { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--border); }
  .ventscheid__wer { margin-left: auto; font-size: var(--fs-12); line-height: 16px; color: var(--text-3); font-variant-numeric: tabular-nums; }
  .eintrag__meta .ventscheid { margin: 0; padding: 0; border: 0; }
  /* Where a proposal comes from: a quiet line next to the meta (confirmed, discarded) */
  .herkunft { display: inline-flex; align-items: center; gap: 5px; min-width: 0; font-size: var(--fs-12); line-height: 16px; color: var(--text-3); overflow-wrap: anywhere; }
  .herkunft > .icon { flex: none; }

  /* A mail after the curated state: lighter – the mail sign on the line, the subject in regular weight */
  .eintrag__knoten--mail { width: 24px; height: 24px; border-color: var(--border); color: var(--text-3); }
  .eintrag__titel--mail { font-weight: 400; }
  .eintrag__wer { margin-top: 1px; font-size: var(--fs-13); line-height: 20px; color: var(--text-2); overflow-wrap: anywhere; }
  .eintrag__wer .pfeil { padding: 0 4px; }
  .eintrag__weitere { min-width: 0; }
  .eintrag__weitere > summary {
    display: inline-flex; align-items: center; min-height: 24px; list-style: none; cursor: pointer; color: var(--accent-text); border-radius: var(--r-xs);
  }
  .eintrag__weitere > summary::-webkit-details-marker { display: none; }
  .eintrag__weitere > summary:hover { text-decoration: underline; text-underline-offset: 3px; }
  .eintrag__weitere[open] { flex-basis: 100%; }
  .eintrag__weitere-liste { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 4px; }
  .eintrag__weitere-liste a.meta-teil { min-height: 24px; display: inline-flex; align-items: center; gap: 5px; }

  /* Deadlines: an open proposal carries its pill above the title; on #/fristen the quote and the decision below */
  .frist__herkunft { margin-bottom: 4px; }
  .frist__herkunft .pille { max-width: 100%; height: auto; min-height: 20px; white-space: normal; }
  .frist__meta .herkunft { min-height: 24px; }
  .frist__vorschlag { margin-top: 6px; }
  /* the quiet switch of a confirmed deadline proposal (admins): only the button lies above the row link */
  .frist__aktion { display: flex; width: fit-content; max-width: 100%; margin: 4px 0 0 -6px; }
  .frist__vorschlag .ventscheid { margin-top: 8px; padding-top: 8px; }
  .fristregeln__fuss--vorschlag { padding-top: 0; border-top: 0; }
  /* Überblick: the open deadline proposals below the deadlines, with a head of their own */
  .fristvorschlaege--trenner { border-top: 1px solid var(--border); }
  .fristvorschlaege__kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; padding: 10px 16px 0; font-size: var(--fs-12); line-height: 16px; font-weight: 600; color: var(--text-2); }
  .fristvorschlaege__kopf > .icon { color: var(--info-text); flex: none; }
  .fristvorschlaege__kopf > span { min-width: 0; }
  .fristvorschlaege__link { margin-left: auto; font-weight: 500; min-height: 24px; display: inline-flex; align-items: center; }
  .neu__vorschlaege {
    grid-column: 1 / -1; display: flex; align-items: center; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--border);
    font-size: var(--fs-13); line-height: 20px; color: var(--text-2); text-decoration: none;
  }
  .neu__vorschlaege:hover { background: var(--surface-hover); color: var(--text); }
  .neu__vorschlaege:focus-visible { outline-offset: -2px; }
  .neu__vorschlaege > .icon { flex: none; color: var(--info-text); }
  .neu__vorschlaege > .icon:last-child { margin-left: auto; color: var(--text-3); width: 14px; height: 14px; }
  .neu__vorschlaege > span { min-width: 0; }
  .ereignis__herkunft { display: block; margin-bottom: 2px; }
  .ereignis__herkunft .pille { height: auto; min-height: 20px; white-space: normal; max-width: 100%; }

  /* ── Unterlagen (docs/unterlagen.md): files, folders that open in place, entries, the admins' block ── */
  .unterlagen { display: grid; gap: 32px; min-width: 0; }
  .unterlagen > * { min-width: 0; }
  .unterlagen .abschnitt + .abschnitt { margin-top: 0; }
  .unterlagen__erklaerung { max-width: 80ch; font-size: var(--fs-14); line-height: 22px; color: var(--text-2); }
  .knopf__zusatz { font-weight: 400; font-variant-numeric: tabular-nums; white-space: nowrap; }
  .knopf__zusatz::before { content: "·"; margin: 0 6px 0 2px; }
  /* one file: icon, title (opens or downloads), type and size, the download icon */
  .udateien { list-style: none; min-width: 0; }
  .udatei { display: flex; align-items: center; gap: 8px; min-width: 0; }
  .udatei__icon { flex: none; display: inline-grid; place-items: center; color: var(--text-3); }
  .udatei__text { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; min-width: 0; flex: 1 1 auto; }
  .udatei__titel { font-weight: 500; color: var(--accent-text); text-decoration: none; overflow-wrap: anywhere; min-height: 24px; display: inline-flex; align-items: center; }
  .udatei__titel:hover { text-decoration: underline; text-underline-offset: 3px; }
  .udatei__titel[aria-busy="true"] { cursor: progress; }
  .udatei__typ { font-size: var(--fs-12); line-height: 16px; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
  .udatei .ikon { flex: none; }
  .udateien--gross > .udatei { padding: 8px 10px 8px 16px; min-height: var(--row); }
  .udateien--gross > .udatei + .udatei { border-top: 1px solid var(--border); }
  .udateien--gross .udatei__icon .icon { width: 18px; height: 18px; }
  .udatei--start { background: var(--surface-2); }
  .udateien--leiste { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-top: 8px; }
  .udateien--leiste .udatei { gap: 6px; }
  .udateien--leiste .udatei__titel { font-size: var(--fs-13); }
  .udatei--zip { margin-left: auto; }
  .udatei--zip .knopf { flex: none; max-width: none; }
  .udatei--zip .knopf__text { overflow: visible; }
  .udateien--karte { margin-top: 10px; border: 1px solid var(--border); border-radius: var(--r-sm); }
  .udateien--karte > .udatei { padding-left: 12px; }
  /* folders: a card each, the title is the toggle; the open folder shows its entries below its head */
  .uordner-liste { list-style: none; display: grid; gap: 10px; }
  .uordner { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); min-width: 0; }
  .uordner[data-offen] { border-color: var(--border-strong); }
  .uordner__kopf { display: grid; grid-template-columns: 32px minmax(0, 1fr); gap: 4px 14px; padding: 14px 16px; }
  .uordner__nr {
    display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: var(--r-sm); margin-top: 1px;
    background: var(--surface-2); border: 1px solid var(--border-strong); font-size: var(--fs-15); font-weight: 600; color: var(--text);
    font-variant-numeric: tabular-nums;
  }
  .uordner__haupt { min-width: 0; display: grid; gap: 2px; }
  .uordner__titel { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; font-size: var(--fs-15); line-height: 22px; font-weight: 600; }
  .uordner__schalter {
    display: inline-flex; align-items: flex-start; gap: 6px; min-height: 32px; padding: 4px 8px 4px 4px; margin: -4px 0 -4px -4px; border-radius: var(--r-sm);
    font: inherit; color: var(--text); text-align: left; background: none; border: 0; cursor: pointer; min-width: 0; overflow-wrap: anywhere;
  }
  .uordner__schalter:hover { background: var(--surface-hover); }
  .uordner__pfeil { flex: none; margin-top: 3px; color: var(--text-3); transition: transform var(--dur-2) var(--ease-out); }
  .uordner__schalter[aria-expanded="true"] .uordner__pfeil { transform: rotate(90deg); }
  .uordner__text { font-size: var(--fs-13); line-height: 20px; color: var(--text-2); max-width: 90ch; overflow-wrap: anywhere; }
  .uordner__zahlen { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: var(--fs-13); line-height: 20px; color: var(--text-3); font-variant-numeric: tabular-nums; }
  .uordner__art { font-weight: 500; color: var(--text-2); }
  .uordner__inhalt { border-top: 1px solid var(--border); padding: 12px 16px 16px; min-width: 0; }
  .uordner__inhalt[aria-busy="true"] { padding-top: 16px; }
  .uordner__filter { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 8px; }
  .uordner__filter > .feld-gruppe { width: 300px; max-width: 100%; }
  .uordner__treffer { font-size: var(--fs-13); color: var(--text-3); font-variant-numeric: tabular-nums; }
  .uordner__listen { display: grid; gap: 20px; min-width: 0; }
  .uliste__titel, .ubereich__titel {
    display: flex; align-items: center; gap: 8px; padding: 6px 0; font-size: var(--fs-13); line-height: 20px; font-weight: 600; color: var(--text);
  }
  .uliste__titel .icon { color: var(--text-3); width: 14px; height: 14px; }
  .uliste__titel .zahl, .ubereich__titel .zahl { font-weight: 500; color: var(--text-3); font-variant-numeric: tabular-nums; }
  .uliste__leer { padding: 12px 0; font-size: var(--fs-13); color: var(--text-2); }
  .ubereich + .ubereich { margin-top: 12px; }
  .ubereich__titel { border-bottom: 1px solid var(--border); }
  .ubereich__kuerzel {
    display: inline-grid; place-items: center; min-width: 22px; height: 20px; padding: 0 5px; border-radius: var(--r-xs);
    border: 1px solid var(--border-strong); font-family: var(--font-mono); font-size: var(--fs-12); font-weight: 600; color: var(--text-2);
  }
  /* an entry: the Fundstelle (a neutral label, never amber) with the MailRef, then the content and its actions */
  .ueintraege { list-style: none; }
  .ueintrag { display: grid; grid-template-columns: 104px minmax(0, 1fr); gap: 4px 16px; padding: 12px 8px; margin: 0 -8px; border-radius: var(--r-sm); }
  .ueintrag + .ueintrag { border-top: 1px solid var(--border); border-radius: 0; }
  .ueintrag[aria-current="true"] { background: var(--accent-subtle); box-shadow: inset 2px 0 0 var(--accent-line); }
  .ueintrag__marke { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; min-width: 0; }
  .fundstelle {
    display: inline-block; padding: 1px 6px; border-radius: var(--r-xs); border: 1px solid var(--border-strong); background: var(--surface-2);
    font-family: var(--font-mono); font-size: var(--fs-13); line-height: 18px; font-weight: 700; color: var(--text); white-space: nowrap;
  }
  .fundstelle--klein { padding: 0 4px; font-size: var(--fs-12); line-height: 16px; font-weight: 600; white-space: normal; }
  .ueintrag__inhalt { min-width: 0; display: grid; gap: 2px; }
  .ueintrag__kopf { display: flex; flex-wrap: wrap; gap: 2px 12px; font-size: var(--fs-13); line-height: 20px; color: var(--text-2); }
  .ueintrag__richtung { font-weight: 500; color: var(--text); }
  .ueintrag__art { color: var(--text-3); }
  .ueintrag__wer { font-size: var(--fs-13); line-height: 20px; color: var(--text-2); overflow-wrap: anywhere; }
  .ueintrag__betreff { font-weight: 500; line-height: 21px; color: var(--text); overflow-wrap: anywhere; }
  .ueintrag__anfang {
    font-size: var(--fs-13); line-height: 20px; color: var(--text-2); max-width: 90ch; overflow-wrap: anywhere;
    display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
  }
  .ueintrag__anfang--ganz { display: block; -webkit-line-clamp: unset; line-clamp: none; overflow: visible; }
  .ueintrag__hinweis {
    display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 8px; margin: 4px 0 2px; padding: 6px 10px; max-width: 90ch;
    background: var(--surface-2); border-left: 2px solid var(--border-strong); border-radius: 0 var(--r-xs) var(--r-xs) 0;
    font-size: var(--fs-13); line-height: 20px; color: var(--text-2); overflow-wrap: anywhere;
  }
  .ueintrag__hinweis .icon { margin-top: 3px; color: var(--text-3); }
  .ueintrag__verweise { display: flex; flex-wrap: wrap; gap: 2px 14px; font-size: var(--fs-12); line-height: 18px; color: var(--text-3); }
  .ueintrag__verweise .meta-teil { min-width: 0; overflow-wrap: anywhere; }
  .ueintrag__aktionen { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 4px; margin: 4px 0 0 -6px; }
  .ueintrag__anhaenge { margin-top: 2px; }
  .ueintrag__anhaenge > summary { font-size: var(--fs-13); }
  .ueintrag__anhaenge .udatei { padding: 2px 0 2px 32px; }
  .udok--fehlt .ueintrag__betreff { color: var(--text-2); }
  @container haupt (max-width: 640px) {
    .ueintrag { grid-template-columns: minmax(0, 1fr); }
    .ueintrag__marke { flex-direction: row; flex-wrap: wrap; align-items: center; }
    .uordner__kopf { grid-template-columns: 28px minmax(0, 1fr); gap: 4px 10px; padding: 12px; }
    .uordner__nr { width: 28px; height: 28px; font-size: var(--fs-14); }
    .uordner__inhalt { padding: 10px 12px 14px; }
    .uordner__filter > .feld-gruppe { width: 100%; }
    .udateien--gross > .udatei { padding-left: 12px; }
  }
  /* the admins' block: build, readers, warnings – the tone of the administration pages */
  .upflege { display: grid; gap: 0; }
  .upflege > * { padding: 14px 16px; }
  .upflege > * + * { border-top: 1px solid var(--border); }
  .upflege__bau { display: grid; gap: 8px; }
  .upflege__titel { display: flex; align-items: center; gap: 8px; font-size: var(--fs-13); line-height: 20px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
  .upflege__titel .icon { color: var(--text-3); width: 14px; height: 14px; }
  .upflege__ruhig { font-size: var(--fs-13); line-height: 20px; color: var(--text-2); }
  .upflege__liste { display: grid; gap: 0; }
  .upflege__zeile { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 2px 16px; padding: 6px 0; font-size: var(--fs-13); line-height: 20px; }
  .upflege__zeile + .upflege__zeile { border-top: 1px solid var(--border); }
  .upflege__zeile dt { color: var(--text-2); overflow-wrap: anywhere; }
  .upflege__zeile dd { color: var(--text); overflow-wrap: anywhere; }
  .upflege__punkte { list-style: none; display: grid; gap: 8px; }
  .upflege__punkt { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 8px; font-size: var(--fs-13); line-height: 20px; color: var(--text); }
  .upflege__punkt > .icon { margin-top: 3px; color: var(--text-3); }
  .upflege__mails { list-style: none; display: grid; gap: 4px; margin-top: 6px; }
  .upflege__mails li { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; }
  .upflege__mailtext { color: var(--text-2); overflow-wrap: anywhere; min-width: 0; }
  .upflege__fuss { display: grid; grid-template-columns: 14px minmax(0, 1fr); gap: 8px; font-size: var(--fs-12); line-height: 18px; color: var(--text-3); }
  .upflege__fuss .icon { margin-top: 2px; }
  @container haupt (max-width: 640px) { .upflege__zeile { grid-template-columns: minmax(0, 1fr); } }
  /* Überblick: one quiet line that leads to the collection */
  .uzeile { display: flex; align-items: center; gap: 10px; padding: 12px 14px; color: var(--text); text-decoration: none; min-width: 0; }
  .uzeile:hover { background: var(--surface-hover); }
  .uzeile:focus-visible { outline-offset: -2px; }
  .uzeile__text { display: grid; gap: 0; min-width: 0; flex: 1 1 auto; }
  .uzeile__titel { font-weight: 500; line-height: 20px; font-variant-numeric: tabular-nums; }
  .uzeile__zahlen { font-size: var(--fs-13); line-height: 18px; color: var(--text-2); }
  .uzeile > .icon { flex: none; color: var(--text-3); width: 14px; height: 14px; }

  /* ── Suche ── */
  .suchform { margin-bottom: 14px; }
  .suchfeld .feld { height: var(--h-xl); padding: 0 6px 0 14px; gap: 10px; }
  .suchfeld .feld input { font-size: var(--fs-15); }
  .suchfeld .feld > .knopf { margin-right: 0; flex: none; }
  .suchart { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-bottom: 12px; }
  .suchart .segment-gruppe { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
  .suchart .segment-legende { margin-bottom: 0; }
  .suchart__text { font-size: var(--fs-13); line-height: 20px; color: var(--text-2); }
  .suchfilter { margin-bottom: 16px; }
  .suchfilter__rechts { margin-left: auto; display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
  .suchfilter__zurueck { font-size: var(--fs-13); padding: 4px 2px; }
  .suche-ergebnis { display: grid; gap: 12px; }
  .suche-start { max-width: 72ch; }
  .ergebnis { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 17px; font-size: var(--fs-13); line-height: 20px; color: var(--text-2); overflow: clip; overflow-clip-margin: 4px; }
  .ergebnis > * { position: relative; }
  .ergebnis > * + *::before { content: ""; position: absolute; left: -10px; top: 50%; width: 3px; height: 3px; margin-top: -1.5px; border-radius: 50%; background: var(--text-3); }
  .ergebnis b { color: var(--text); font-weight: 600; }
  .suchtreffer { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; align-items: start; padding: 12px 16px; }
  .suchtreffer__kopf { grid-column: 1; grid-row: 1; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 10px; min-width: 0; font-size: var(--fs-13); line-height: 20px; color: var(--text-2); }
  .suchtreffer__datum { font-variant-numeric: tabular-nums; white-space: nowrap; }
  .suchtreffer__wer { min-width: 0; overflow-wrap: anywhere; }
  .suchtreffer__wer .pfeil { padding: 0 4px; }
  .suchtreffer__betreff { flex: 1 1 100%; font-size: var(--fs-14); overflow-wrap: anywhere; }
  .suchtreffer__mehr { grid-column: 2; grid-row: 1; }
  .suchtreffer__mehr[aria-expanded="true"] .icon { transform: rotate(90deg); }
  .suchtreffer .auszug.suchtreffer__auszug { grid-column: 1 / -1; margin-top: 2px; -webkit-line-clamp: 2; line-clamp: 2; }
  /* The hidden lines of a cut excerpt lie geometrically under the next row: an opaque row (the colour of its box)
     keeps contrast checks honest (wish d_an_b.md W2); hover and the chosen row keep their own surfaces. */
  .suchtreffer:not(:hover):not([aria-current]) { background: var(--surface); }
  .suchtreffer__mehr:not(:hover):not(:active) { background-color: inherit; }   /* below the excerpt on the phone */
  .suchtreffer__tags { grid-column: 1 / -1; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; }
  .suchtreffer__tags:empty { display: none; }
  .suchtreffer__mehrfach { font-size: var(--fs-12); color: var(--text-3); }
  .suchtreffer__karte { grid-column: 1 / -1; margin-top: 8px; cursor: auto; }
  .suchtreffer--skelett { display: grid; gap: 8px; }
  .katalogtreffer { margin-top: 12px; }
  .katalogtreffer__karten { display: grid; gap: 12px; align-items: start; list-style: none; }
  @container haupt (min-width: 1000px) { .katalogtreffer__karten { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
  @container haupt (max-width: 640px) {
    .suchfilter .filter-knopf { display: inline-flex; }
    .suchfilter .suchchips { display: none; }
    .suchfilter__rechts { margin-left: 0; }
    /* phone: the first hit starts above y = 400 (audit H10) */
    .suchform { margin-bottom: 10px; }
    .suchart { margin-bottom: 8px; row-gap: 4px; }
    .suchart__text { font-size: var(--fs-12); line-height: 16px; }
    .suchfilter { margin-bottom: 12px; }
    .suche-ergebnis { gap: 10px; }
    .suchtreffer { padding: 12px 14px; }
    /* phone: "Stelle zeigen" below the excerpt, the head gets the whole width */
    .suchtreffer__kopf { grid-column: 1 / -1; }
    .suchtreffer .auszug.suchtreffer__auszug { grid-row: 2; }
    .suchtreffer__tags { grid-row: 3; }
    .suchtreffer__mehr { grid-column: 1 / -1; grid-row: 4; justify-self: start; margin-left: -6px; }
    .suchtreffer__karte { grid-row: 5; }
  }

  /* ── Vorgang ── */
  .stand { margin-bottom: 28px; }
  .vorgang-inhalt .abschnitt__kopf { row-gap: 8px; }
  .reihenfolge { margin-left: auto; }
  .monatsgruppe > summary { list-style: none; }
  .monatskopf {
    position: sticky; top: 0; z-index: var(--z-sticky); display: flex; flex-wrap: wrap; align-items: center; gap: 0 10px;
    min-height: 36px; padding: 0 16px; background: var(--surface-2); border-bottom: 1px solid var(--border);
    font-size: var(--fs-13); font-weight: 600; color: var(--text); cursor: pointer;
  }
  .monatskopf:focus-visible { outline-offset: -2px; }
  .monatskopf .zahl { color: var(--text-3); font-weight: 500; font-variant-numeric: tabular-nums; }
  .monatskopf .klappe__pfeil { color: var(--text-3); transition: transform var(--dur-2) var(--ease-out); }
  .monatsgruppe:not([open]) > .monatskopf { background: var(--surface); border-bottom: 0; }
  .box > .monatsgruppe + .monatsgruppe { border-top: 1px solid var(--border); }
  /* 104 px: "Mo, 02.03.2026" in Inter 13 tabular is ≈ 100 px wide – 92 px (spec §5.6) left ≈ 2 px to the MailRef */
  .vmail { display: grid; grid-template-columns: 104px 64px minmax(0, 1fr); gap: 2px 12px; align-items: start; padding: 10px 16px; }
  .liste > .vmail + .vmail { border-top: 1px solid var(--border); }
  .vmail__datum { font-size: var(--fs-13); line-height: 20px; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
  .vmail__ref { line-height: 20px; }
  .vmail__inhalt { min-width: 0; display: grid; gap: 2px; }
  .vmail__zeile1 { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 8px; min-width: 0; }
  .vmail__zeile1 > .icon { color: var(--text-3); }
  .vmail__zeile1 .tag:first-of-type { margin-left: auto; }
  .vmail__zeile1 .tag { flex: none; }
  .vmail__betreff { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; flex: 1 1 12ch; }
  .vmail__wer { font-size: var(--fs-13); color: var(--text-2); overflow-wrap: anywhere; }
  .vmail__wer .pfeil { padding: 0 4px; }
  /* The quote is the catalogue's selection, not a finding: neutral rule, never amber (the marking follows in the pane) */
  .vmail__zitat {
    font-family: var(--font-text); font-weight: var(--text-weight); font-size: var(--fs-15); line-height: 23px; color: var(--paper-text);
    max-width: 75ch; border-left: 2px solid var(--border-strong); padding-left: 10px; margin-top: 4px; hyphens: manual; overflow-wrap: anywhere;
    font-variant-numeric: lining-nums;
  }
  .seitenspalte .box .liste > li + li { border-top: 1px solid var(--border); }
  .termin--schmal { grid-template-columns: minmax(0, 1fr); padding: 10px 12px; }
  .bezugliste { list-style: none; display: grid; gap: 2px; }
  .bezugliste__link { display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 32px; padding: 6px 10px; border-radius: var(--r-sm); color: var(--text); text-decoration: none; }
  .bezugliste__link:hover { background: var(--surface-hover); }
  .bezugliste__link:focus-visible { outline-offset: -2px; }
  .bezugliste__titel { min-width: 0; overflow-wrap: anywhere; }
  .dokzeilen { display: grid; gap: 8px; }
  .dokzeile { padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r-md); display: grid; gap: 4px; min-width: 0; }
  .dokzeile__titel { font-weight: 500; overflow-wrap: anywhere; }
  .dokzeile__meta { font-size: var(--fs-13); color: var(--text-2); }
  .angaben { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 6px 12px; font-size: var(--fs-13); margin-bottom: 8px; }
  .angaben dt { color: var(--text-3); }
  .angaben dd { min-width: 0; overflow-wrap: anywhere; }
  /* Loading skeleton of a Vorgang in the shape of the result (spec §4.4): breadcrumb, meta line, card, rows, side column */
  .brotkrume--skelett { margin-bottom: 8px; }
  .brotkrume--skelett .skelett { width: 220px; max-width: 60%; height: 12px; }
  .kopf-skelett { display: inline-block; width: 380px; max-width: 70vw; vertical-align: middle; }
  .vmail--skelett { padding: 14px 16px; }
  .box > .vmail--skelett + .vmail--skelett { border-top: 1px solid var(--border); }
  .vmail--skelett .skelettliste { padding: 0; gap: 8px; }
  .seitenspalte__skelettkopf { margin-bottom: 10px; }
  @container haupt (max-width: 640px) {
    .vmail { grid-template-columns: minmax(0, 1fr) auto; padding: 10px 14px; }
    .vmail__datum { grid-column: 2; grid-row: 1; text-align: right; }
    .vmail__ref { grid-column: 1; grid-row: 1; }
    .vmail__inhalt { grid-column: 1 / -1; }
    .vmail__zeile1 .tag:first-of-type { margin-left: 0; }
    .reihenfolge { margin-left: 0; }
  }

  /* ── Vorgänge ── */
  .vorgaenge-werkzeuge { margin-bottom: 16px; }
  .vorgaenge-werkzeuge > .feld-gruppe { width: 240px; max-width: 100%; }
  .vorgaenge-chips { display: contents; }
  .vorgaenge-sort { margin-left: auto; }
  .vorgaenge-liste { display: grid; gap: 24px; }
  .vorgaenge-liste > .abschnitt + .abschnitt { margin-top: 0; }
  .vreihe { display: grid; grid-template-columns: 76px minmax(0, 1fr) 72px 288px; gap: 2px 12px; align-items: start; padding: 10px 16px; }
  .vreihe__pille { line-height: 20px; }
  .vreihe__titel { line-height: 20px; min-width: 0; overflow-wrap: anywhere; }
  .vreihe__mails { text-align: right; font-size: var(--fs-13); line-height: 20px; color: var(--text-2); font-variant-numeric: tabular-nums; white-space: nowrap; }
  .vreihe__zeit { font-size: var(--fs-13); line-height: 20px; color: var(--text-3); font-variant-numeric: tabular-nums; }
  .neu-punkt { display: inline-block; width: 6px; height: 6px; margin-right: 6px; border-radius: 50%; background: var(--accent-line); vertical-align: 2px; }
  /* the single statements: a collapsed group at the end of the Bereich box */
  .vgruppe { border-top: 1px solid var(--border); }
  .vgruppe > summary {
    margin: 0; padding: 8px 16px 8px 40px; min-height: 40px; border-radius: 0; background: var(--surface-2);
    font-size: var(--fs-13); font-weight: 600; color: var(--text);
  }
  .vgruppe > summary > .klappe__pfeil { left: 16px; top: 12px; }
  .vgruppe > summary:hover { background: var(--surface-hover); }
  .vgruppe > .klappe__inhalt { padding: 0; }
  .vgruppe .vreihen { border-top: 1px solid var(--border); }
  .liste > .vreihe + .vreihe { border-top: 1px solid var(--border); }

  /* ── Mails ── */
  .mails-kopfzeile { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 12px; }
  .mails-kopfzeile > .feld-gruppe { width: 300px; max-width: 100%; }
  .filterchips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; }
  .filter-knopf { display: none; }
  .zaehler-klein {
    display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--r-full);
    background: var(--chip); color: var(--text); font-size: var(--fs-12); font-weight: 600; font-variant-numeric: tabular-nums;
  }
  .tabelle--mails { table-layout: fixed; }
  .tabelle--mails th.c-nr { width: 96px; }
  .tabelle--mails th.c-datum { width: 148px; }
  .tabelle--mails th.c-wer { width: 28%; }
  .tabelle--mails th.c-anh { width: 56px; }
  .tabelle--mails th.c-bereich { width: 136px; }
  .tabelle--mails th.c-anh .icon { vertical-align: -3px; }
  .tabelle--mails td:first-child, .tabelle--mails th:first-child { padding-left: 16px; }
  .tabelle--mails td:last-child, .tabelle--mails th:last-child { padding-right: 16px; }
  .tabelle .k-betreff .zeile__link { color: var(--text); font-weight: 500; }
  .tabelle--mails .k-betreff .zeile__link { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }   /* ends at its cell */
  .tabelle .k-betreff .zeile__link.text-2 { color: var(--text-2); font-weight: 400; }
  .tabelle .k-wer, .tabelle .k-datum { color: var(--text-2); }
  .tabelle .k-wer .pfeil { padding: 0 4px; }
  .tabelle .k-bereich .tag + .tag { margin-left: 4px; }
  .tabelle--mails td.k-bereich { overflow: hidden; text-overflow: ellipsis; }
  .tabelle--mails td.k-bereich .tag { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; line-height: 18px; vertical-align: middle; }
  .tabelle--mails td.k-bereich { white-space: nowrap; }
  .tabelle--mails td.k-bereich .tag:has(+ .tag--mehr) { max-width: calc(100% - 40px); }   /* room for "+1" */
  .mails-skelett td { vertical-align: middle; }
  .mails-skelett:hover td { background: none; }
  .anh { display: inline-flex; align-items: center; gap: 3px; color: var(--text-2); font-variant-numeric: tabular-nums; }
  .anh .icon { color: var(--text-3); }
  .schloss { display: inline-flex; vertical-align: -2px; margin-left: 6px; color: var(--text-3); }
  .schloss .icon { width: 13px; height: 13px; }
  @container haupt (max-width: 1099px) { .tabelle--mails .k-bereich { display: none; } }
  /* Below 640 px container: row cards – "#412 · date · clip" / subject / from → to */
  @container haupt (max-width: 640px) {
    .tabelle--karten { table-layout: auto; }
    .tabelle--karten thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
    .tabelle--karten, .tabelle--karten tbody { display: block; }
    .tabelle--karten tr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 2px 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); }
    .tabelle--karten td, .tabelle--karten td:first-child, .tabelle--karten td:last-child { display: block; height: auto; padding: 0; border: 0; white-space: normal; max-width: none; }
    .tabelle--karten .k-nr { grid-column: 1; grid-row: 1; white-space: nowrap; }
    .tabelle--karten .k-datum { grid-column: 2; grid-row: 1; align-self: center; font-size: var(--fs-13); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
    .tabelle--karten .k-anh { grid-column: 3; grid-row: 1; align-self: center; }
    .tabelle--karten .k-betreff { grid-column: 1 / -1; grid-row: 2; color: var(--text); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .tabelle--karten .k-wer { grid-column: 1 / -1; grid-row: 3; font-size: var(--fs-13); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .tabelle--karten td.k-bereich { display: none; }
    .tabelle--karten tbody tr:last-child { border-bottom: 0; }
    .tabelle--karten tr[aria-current="true"] { background: var(--accent-subtle); box-shadow: inset 2px 0 0 var(--accent-line); }
    .tabelle--karten tr[aria-current="true"] td { background: none; box-shadow: none; }
    .mails-kopfzeile > .feld-gruppe { width: auto; flex: 1 1 200px; }
    .filter-knopf { display: inline-flex; }
    .filterchips { display: none; }
  }

  /* Sticky heads stay below the phone header (--kopf-hoehe of layout.css); on low screens nothing sticks (§3.2) */
  @media (max-width: 759px) { .monat, .monatskopf { top: var(--kopf-hoehe, 0px); } }
  @media (max-height: 559px) { .monat, .monatskopf { position: static; } }

  /* ── Container-driven adaptations ── */
  @container haupt (max-width: 760px) {
    .vreihe { grid-template-columns: auto minmax(0, 1fr); padding: 10px 14px; }
    .vreihe__pille { grid-column: 1; grid-row: 1; }
    .vreihe__mails { grid-column: 2; grid-row: 1; text-align: left; }
    .vreihe__titel { grid-column: 1 / -1; grid-row: 2; }
    .vreihe__zeit { grid-column: 1 / -1; grid-row: 3; }
    .vorgaenge-sort { margin-left: 0; }
    .vorgaenge-werkzeuge > .feld-gruppe { width: 100%; }
    .vzeile { grid-template-columns: minmax(0, 1fr) auto; padding: 10px 14px; }
    .vzeile__pille { grid-column: 1; grid-row: 1; }
    .vzeile__daten { grid-column: 2; grid-row: 1; }
    .vzeile__titel { grid-column: 1 / -1; }
    .vzeile__stand { grid-column: 1 / -1; }
    .bereich__zahlen { margin-left: 0; width: 100%; }
  }
  @container haupt (max-width: 640px) {
    .eintrag, .heute-linie, .stand-linie { grid-template-columns: 44px 24px minmax(0, 1fr); gap: 0 10px; }
    .ventscheid__wer { margin-left: 0; flex-basis: 100%; }
    .monat__liste::before { left: 65px; }
    .eintrag__tag { font-size: var(--fs-13); }
    .chronik-werkzeuge > .feld-gruppe { width: 100%; }
    .chronik-werkzeuge .rechts { margin-left: 0; }
    .ereignis__refs { max-width: 96px; }
  }

  @media (forced-colors: active) {
    .fristnr { border: 2px solid CanvasText; }
    .achse__linie, .achse__heute { forced-color-adjust: none; background: CanvasText; }
    .achse__zone { border: 1px dashed CanvasText; }
    .heute-linie__strich, .heute-linie__punkt { forced-color-adjust: none; background: CanvasText; }
    .vorschlag-karte, .stand-linie__inhalt, .stand-linie__punkt { border: 1px solid CanvasText; }
  }
}

/* Print: the month groups of the chronicle may break across pages (an old rule keeps ".chronik > li" whole) */
@media print {
  @layer print {
    .chronik > li.chronik__monat { break-inside: auto; }
    .monat { position: static; }
    .eintrag__notiz { display: block; -webkit-line-clamp: unset; line-clamp: none; overflow: visible; }
    .ereignis__titel > .ereignis__text { display: block; -webkit-line-clamp: unset; line-clamp: none; overflow: visible; }
    /* the decision is no part of the record; the label of a proposal and its quote are */
    .ventscheid, .chronik-oben, .eintrag--frisch, .frist__aktion { display: none; }
    .vorschlag-karte, .stand-linie__inhalt, .stand-zeile { break-inside: avoid; }
  }
}

