/*
Theme Name: AStA Gwyneth
Version: 1.0
Description: AStA Universität Lüneburg child theme for Gwyneth
Template: gwyneth
Author: AStA Universität Lüneburg
Text Domain: asta-gwyneth
*/

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

/* A4: Keep the parent skip links visible with the secondary focus outline. */
.menu-skip-links a:focus-visible {
  background-color: var(--wp--preset--color--contrast) !important;
  color: var(--wp--preset--color--base) !important;
  outline: 2px solid var(--wp--preset--color--secondary);
  outline-offset: 2px;
}

@media (prefers-color-scheme: dark) {
  body {
    --wp--preset--color--base: #1A1A2E;       /* dark main surface (MMM #1A1A2E) */
    --wp--preset--color--base-alt: #F5F3FF;     /* light alt for cards/contrast regions */
    --wp--preset--color--contrast: #FFFFFF;     /* white text on dark (≥4.5:1 vs base) */
    --wp--preset--color--contrast-alt: #0F0D1A; /* near-black for light-alt regions */
    /* Class 4 of the 2026-11-14 audit: `theme.json` binds
       `elements.link.color.text` to this token and nothing remapped it, so every
       anchor the content-link rule does not own kept #2563EB — 3.30:1 on the
       #1A1A2E base, 22 records (the archive post date, the post's own links).
       Blue-400 is the ink the content-link rule already uses for dark and is
       measured at 6.71:1 on that base, so replicating links stop disagreeing with
       it. Restored in the `html.asta-theme-light` block below, because this media
       query also matches a forced-light visitor. */
    --wp--preset--color--link: #60A5FA;
    /* R-47: the parent theme paints quotes from `--wp--custom--quote--color--text`,
       which WordPress emits on `:root` with the preset var already substituted, so
       it arrives at the blockquote as the literal #1A1A1A and no dark remap can
       reach it — measured 1.02:1 on the base. Re-declare the token rather than
       setting `color` on the quote: a colour rule outranks the surface-ink rules,
       which left a `cite` white on a light card (1.10:1) and forced white ink onto
       any light background. Quotes then inherit whatever ink their surface gives
       them, and only the un-surfaced page base follows this token. */
    --wp--custom--quote--color--text: var(--wp--preset--color--contrast);
    /* C-09 companion: `contrast` is white in dark mode, but the background-text
       token the parent binds to it resolves to white too, so a
       `has-contrast-background-color` surface measured 1.00:1 for every child —
       quote, cite and paragraph alike (re-measured 2026-11-14; no published
       content uses the class, so this is latent). Near-black is what `contrast`
       itself is in light mode, so the pair inverts together. */
    --wp--preset--color--contrast--bg-text: var(--wp--preset--color--contrast-alt);
    --wp--preset--color--primary-mixed: #2e1065;
    --wp--preset--color--secondary-mixed: #1e3a8a;
    /* C-10: primary (#6D28D9) on the dark base measures 2.40:1 — below the
       3:1 AA large-text floor. Headings resolve through this token; light
       surfaces keep the default primary. */
    --asta-heading-color: #A78BFA;              /* 6.27:1 vs #1A1A2E */
  }

  /* The dark surface is `base` (#1A1A2E). theme.json binds the body text to
     `contrast-alt` and post-title links resolve to `primary`/`secondary`; on the
     dark surface those measure 1.13:1 and 2.40:1, i.e. body copy is effectively
     invisible. `contrast-alt` has to stay near-black because it is also the
     background of the always-dark regions (header script bar, language bar), so
     the body colour is rebound for this surface instead. `html body` wins on
     specificity over the generated `body` rule. */
  html body {
    color: var(--wp--preset--color--contrast);
  }

  html body .wp-block-post-title a,
  html body .wp-block-post-excerpt__excerpt,
  html body .wp-block-post-excerpt__more-link,
  html body .wp-block-read-more,
  html body .wp-block-post-date {
    color: var(--wp--preset--color--contrast);
  }

  html body .wp-block-post-excerpt__more-link,
  html body .wp-block-read-more,
  html body .wp-block-post-title a {
    text-decoration: underline;
  }

  /* Blocks that paint their own light surface keep dark text, otherwise the
     rebound body colour above would sit white-on-light. `a` is restored to the
     primary accent, which clears 4.5:1 on this surface. */
  html body .has-base-alt-background-color,
  html body .has-base-alt-background-color * {
    color: var(--wp--preset--color--contrast-alt);
  }

  html body .has-base-alt-background-color a {
    color: var(--wp--preset--color--primary);
    text-decoration: underline;
  }

  /* No-JS fallback for the gated rule below: with JS off `dark-mode.js` never
     runs, so <html> carries neither scheme class and the media query is the only
     thing that can give content links dark-mode ink. `:not(.asta-theme-light)`
     is what keeps it out of a forced-light choice — ungated it also matched there
     and repainted the links on the light page (class 1 of the 2026-11-14 audit:
     #60A5FA on #F5F3FF, 2.32:1). */
  html:not(.asta-theme-light) body .wp-block-post-content a:not([class*="-color"]):not(.has-base-alt-background-color a):not(.insta-fallback) {
    color: #60A5FA;
  }

  /* C-22: no-JS dark fallback — cancel the light gradient default below
     unless a manual override already forced light (that class rule must
     still win here too). */
  html:not(.asta-theme-light) .wp-block-cover:not(:has(.wp-block-cover__image-background, video.wp-block-cover__video-background)) > .wp-block-cover__background.has-contrast-alt-background-color {
    background-image: none;
  }
}

/* C-09: the `contrast` overlay token inverts to white in dark mode, so covers
   that bind it end up with auto-white cover text on light grey (measured
   2.52:1). Bind cover overlays that use `contrast` to the scheme-stable
   `contrast-alt` (near-black in both schemes); for image-less covers raise the
   dim to a legibility floor so the 1.25rem subtitle clears 4.5:1 (9.15:1 light,
   17.4:1 dark). The floor also applies to `contrast-alt` covers because the
   generated dim utility resolves through an opacity custom-property that can
   land on the 0.5 default. */
.wp-block-cover__background.has-contrast-background-color {
  background-color: var(--wp--preset--color--contrast-alt) !important;
}

.wp-block-cover:not(:has(.wp-block-cover__image-background, video.wp-block-cover__video-background)) > .wp-block-cover__background.has-contrast-background-color,
.wp-block-cover:not(:has(.wp-block-cover__image-background, video.wp-block-cover__video-background)) > .wp-block-cover__background.has-contrast-alt-background-color {
  opacity: 0.8;
}

/* C-22: the hero's no-image cover fallback bound `contrast-alt`, which is
   #1A1A1A light vs #0F0D1A dark — different hex, same perceived near-black
   in both schemes. Light mode gets the existing Figma-approved "Night Sky"
   gradient instead; dark mode's flat colour stays untouched. This is the
   default (also the no-JS/OS-light fallback, since light needs no explicit
   opt-in elsewhere in this file); the two rules cancelling it back to `none`
   wherever the effective scheme is dark sit next to their respective
   dark-scheme rules below. */
.wp-block-cover:not(:has(.wp-block-cover__image-background, video.wp-block-cover__video-background)) > .wp-block-cover__background.has-contrast-alt-background-color {
  background-image: var(--wp--preset--gradient--night-sky);
}

/* C-10: headings resolve through --asta-heading-color (default = primary, so
  light rendering is unchanged). Headings that carry any colour utility class
  (`has-*-color`, incl. cover white) keep their explicit colour; headings on
  light cards are already re-bound dark by the base-alt rule above. */
:root {
  --asta-heading-color: var(--wp--preset--color--primary);
}

html body :is(h1, h2, h3, h4, h5, h6):not([class*="-color"]):not(.has-text-color) {
  color: var(--asta-heading-color);
}

/* Cover text is white by construction; headings inside a cover must inherit
   that rather than resolve through the heading token (purple on grey fails). */
.wp-block-cover :is(h1, h2, h3, h4, h5, h6):not([class*="-color"]):not(.has-text-color) {
  color: inherit;
}

/* C-11: manual scheme override. The header toggle was a dead `<details>`
   control; dark mode is now JS-selectable (assets/dark-mode.js mirrors the
   effective scheme onto <html>) while the @media block above remains the
   no-JS fallback. Dependent rules are duplicated under the class because a
   media query cannot be entered by attribute; every colour is token-driven,
   so force-light under an OS-dark preference restores the light tokens and
   the media-gated rules resolve to the light palette. */
html.asta-theme-dark body {
  --wp--preset--color--base: #1A1A2E;
  --wp--preset--color--base-alt: #F5F3FF;
  --wp--preset--color--contrast: #FFFFFF;
  --wp--preset--color--contrast-alt: #0F0D1A;
  --wp--preset--color--primary-mixed: #2e1065;
  --wp--preset--color--secondary-mixed: #1e3a8a;
  --asta-heading-color: #A78BFA;
  /* Class 4's manual-override twin; see the media block above. */
  --wp--preset--color--link: #60A5FA;
  /* R-47, the manual-override twin of the token in the media block above. */
  --wp--custom--quote--color--text: var(--wp--preset--color--contrast);
  --wp--preset--color--contrast--bg-text: var(--wp--preset--color--contrast-alt);
}

html.asta-theme-dark body {
  color: var(--wp--preset--color--contrast);
}

html.asta-theme-dark body .wp-block-post-title a,
html.asta-theme-dark body .wp-block-post-excerpt__excerpt,
html.asta-theme-dark body .wp-block-post-excerpt__more-link,
html.asta-theme-dark body .wp-block-read-more,
html.asta-theme-dark body .wp-block-post-date {
  color: var(--wp--preset--color--contrast);
}

html.asta-theme-dark body .wp-block-post-excerpt__more-link,
html.asta-theme-dark body .wp-block-read-more,
html.asta-theme-dark body .wp-block-post-title a {
  text-decoration: underline;
}

html.asta-theme-dark body .has-base-alt-background-color,
html.asta-theme-dark body .has-base-alt-background-color * {
  color: var(--wp--preset--color--contrast-alt);
}

html.asta-theme-dark body .has-base-alt-background-color a {
  color: var(--wp--preset--color--primary);
  text-decoration: underline;
}

/* C-10b: theme.json binds `elements.link` to `--wp--preset--color--link`, and
   #2563EB measures 3.30:1 on the #1A1A2E dark base; content links resolve to
   blue-400 (#60A5FA, 6.71:1 on that base) instead. C-15: links inside a
   `base-alt` card are excluded and keep `primary` through the base-alt rule
   above, because this ink must never land on a light surface — #60A5FA on
   #F5F3FF measures 2.31:1 (2.32:1 re-measured 2026-11-14). */
html.asta-theme-dark body .wp-block-post-content a:not([class*="-color"]):not(.has-base-alt-background-color a):not(.insta-fallback) {
  color: #60A5FA;
}

@media (prefers-color-scheme: dark) {
  /* No-JS fallback for the rule below. Both resolve through `contrast`, which
     the dark blocks remap to #FFFFFF, so the pair cannot drift apart. */
  html:not(.asta-theme-light) body .wp-block-group.has-surface-background-color.has-base-color {
    color: var(--wp--preset--color--contrast) !important;
  }
}

html.asta-theme-dark body .wp-block-group.has-surface-background-color.has-base-color {
  color: var(--wp--preset--color--contrast) !important;
}

/* Class 3 of the 2026-11-14 audit: the parent's `entry-navigation` pattern binds
   its wrapper to `textColor: contrast-alt` and its links to the same token
   (`patterns/site/entry-navigation.php:31`), while the child remaps that token to
   #0F0D1A for dark (`:34`, `:171`) on a surface that is `base` #1A1A2E — 1.13:1
   on every post. The link binding cannot be fixed by un-remapping the token,
   because the surfaces that depend on the remap outnumber this block, so the
   block states its own ink. `contrast` is #FFFFFF in dark through the media block
   and the class block alike, so the no-JS visitor gets the same ink.

   `!important` is required, not defensive: the pattern's own classes are emitted
   as `.has-contrast-alt-color{color:…!important}` and, last of the three,
   `.has-link-color{color:var(--wp--preset--color--link)!important}` — so the
   wrapper resolves to `link` #2563EB (3.30:1 on the dark base) and no ordinary
   declaration of any specificity can reach it. Both blocks of `color` come from
   the same global-styles sheet, so specificity, not source order, decides. */
@media (prefers-color-scheme: dark) {
  html:not(.asta-theme-light) body .is-style-post-navigation,
  html:not(.asta-theme-light) body .is-style-post-navigation a {
    color: var(--wp--preset--color--contrast) !important;
  }
}

html.asta-theme-dark body .is-style-post-navigation,
html.asta-theme-dark body .is-style-post-navigation a {
  color: var(--wp--preset--color--contrast) !important;
}

/* Class 5 of the 2026-11-14 audit: `primary` (#6D28D9) used as *text* on the dark
   base measured 2.40:1 — 38 records, on the 404's `has-primary-color` paragraph and
   on every term list. WordPress resolves an anchor inside a `.has-text-color`
   container with `:where(.has-background, .has-text-color) :is(a, h1…h6) { color:
   inherit }`, so the wrapper's ink reaches the links and the `elements.link`
   binding never applies to them. That is why the term links were violet and the
   archive's dates blue in the same row of cards.

   The palette token is not remapped here: buttons paint `primary` as a surface
   (`theme.json` `elements.button`), so a remap moves them. `--asta-heading-color`
   is the value the theme already chose for "primary, in dark, legible" — #A78BFA,
   6.27:1 on that base — so primary-as-ink means one thing everywhere.

   `!important` matches the declaration it overrides, which global styles ships as
   `.has-primary-color{color:var(--wp--preset--color--primary)!important}`.
   Excluded inside a `base-alt` card, where the same violet measures 6.48:1 on the
   light surface and must not follow the dark ink. */
@media (prefers-color-scheme: dark) {
  html:not(.asta-theme-light) body .has-primary-color:not(.has-base-alt-background-color *) {
    color: var(--asta-heading-color) !important;
  }

  /* `theme.json` binds `elements.link.:hover` to `primary`, so a link that clears
     AA at rest fell to 2.40:1 under the pointer in dark. The resting ink is only
     legible if the hovered one is. */
  /* Excluded inside a `base-alt` card for the same reason the rule above is:
     #A78BFA on the light card measures 2.48:1. */
  html:not(.asta-theme-light) body a:where(:not(.wp-element-button)):not(.has-base-alt-background-color *):hover,
  html:not(.asta-theme-light) body a:where(:not(.wp-element-button)):not(.has-base-alt-background-color *):focus-visible {
    color: var(--asta-heading-color);
  }
}

html.asta-theme-dark body .has-primary-color:not(.has-base-alt-background-color *) {
  color: var(--asta-heading-color) !important;
}

html.asta-theme-dark body a:where(:not(.wp-element-button)):not(.has-base-alt-background-color *):hover,
html.asta-theme-dark body a:where(:not(.wp-element-button)):not(.has-base-alt-background-color *):focus-visible {
  color: var(--asta-heading-color);
}

/* C-22: manual override to dark (regardless of OS) must cancel the light
   gradient the same way as the no-JS fallback above. */
html.asta-theme-dark .wp-block-cover:not(:has(.wp-block-cover__image-background, video.wp-block-cover__video-background)) > .wp-block-cover__background.has-contrast-alt-background-color {
  background-image: none;
}

@media (prefers-color-scheme: dark) {
  /* `initial` restores the light-mode state exactly: the *-mixed tokens have
     no light definition, so force-light must leave them unset, not invent
     values. */
  html.asta-theme-light body {
    --wp--preset--color--base: #F5F3FF;
    --wp--preset--color--base-alt: #FFFFFF;
    --wp--preset--color--contrast: #0F0D1A;
    --wp--preset--color--contrast-alt: #1A1A1A;
    /* R-47: the ink a `contrast` surface paints is derived from those two, so it
       has to be restored with them. Left at its dark-mode value it resolved to
       `contrast-alt` (#1A1A1A) on a #0F0D1A surface — measured 1.10:1 for a
       forced-light choice under an OS dark preference, where the same page's own
       quote stayed legible. Light mode binds this token to white, so restore that. */
    --wp--preset--color--contrast--bg-text: var(--wp--preset--color--white);
    --wp--preset--color--primary-mixed: initial;
    --wp--preset--color--secondary-mixed: initial;
    /* Class 4's other half: the dark media block remaps `link`, so a forced-light
       visitor under a dark OS must get the light token back or every link reads
       blue-400 on the #F5F3FF base — 2.31:1, the same trap the content-link ink
       fell into. */
    --wp--preset--color--link: #2563EB;
    --asta-heading-color: var(--wp--preset--color--primary);
  }
}

/* Manual-toggle control (replaces the dead <details> pattern). */
.asta-dark-toggle__button {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-sizing: border-box;
  min-height: 32px;
  padding: 0.25rem 0.9rem;
  border: 1px solid var(--asta-header-foreground, #fff);
  border-radius: 999px;
  background: transparent;
  color: var(--asta-header-foreground, #fff);
  font: inherit;
  font-size: 0.85rem;
  cursor: pointer;
}

.asta-dark-toggle__button:focus-visible {
  outline: 2px solid var(--wp--preset--color--secondary);
  outline-offset: 2px;
}

/* A2: AStA header row. The header stays on contrast in both schemes. */
.asta-site-header {
  --asta-header-background: #0F0D1A;
  --asta-header-foreground: #FFFFFF;
  --asta-nav-background: var(--wp--preset--color--primary);
  --asta-nav-foreground: #FFFFFF;
  box-sizing: border-box;
  width: 100%;
  min-height: 56px;
  /* pathway-22 §1.2 (D1): the bar is full-bleed but its content keeps a page
     inset, so the logo no longer touches the viewport corner. Measured before:
     the logo box sat at x=0 with no gap at all. */
  padding-inline: clamp(1rem, 2.5vw, 2rem);
  align-items: center;
  column-gap: clamp(0.75rem, 2vw, 1.5rem);
  background-color: var(--asta-header-background) !important;
  color: var(--asta-header-foreground) !important;
}

@media (min-width: 75rem) {
  .asta-site-header {
    flex-wrap: nowrap;
  }
}

.asta-site-header > .asta-header-brand {
  flex: 0 1 auto;
  min-width: 0;
}

/* pathway-22 §1.2 (D1): the header mark is now the vector wordmark
   (assets/img/asta-logo-white.svg, viewBox 2344.2 × 1002), so the old
   "never scale above the source" ceiling no longer applies. The 42 px height
   is kept because it is the measured header rhythm: at that height the
   wordmark renders 98 px wide. */
.asta-site-header .asta-header-logo img {
  display: block;
  width: auto;
  height: 42px;
  max-width: 100%;
}

.asta-site-header .wp-block-site-title,
.asta-site-header .wp-block-site-title a {
  color: var(--asta-header-foreground) !important;
}

.asta-site-header .wp-block-site-title a {
  text-decoration: none;
}

.asta-site-header .wp-block-site-title a:hover,
.asta-site-header .wp-block-site-title a:focus-visible {
  color: var(--wp--preset--color--secondary) !important;
}

.asta-site-header > .asta-dark-toggle {
  flex: 0 0 auto;
  min-width: max-content;
}

.asta-site-header > .asta-dark-toggle > .wp-block-group {
  margin: 0;
}

.asta-site-header .asta-dark-toggle .wp-block-details summary {
  color: var(--asta-header-foreground) !important;
  cursor: pointer;
}

.asta-site-header .asta-dark-toggle .wp-block-details summary::-webkit-details-marker {
  display: none;
}

.asta-site-header > .asta-primary-navigation {
  flex: 1 1 auto;
  min-width: 12rem;
  margin: 0;
}

.asta-header-search-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
}

.asta-header-search-popover {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  width: 280px;
  padding: 8px;
  background: #1a1a2e;
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 10px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.45);
  display: none;
  z-index: 1000;
}

.asta-header-search-wrap.is-open .asta-header-search-popover {
  display: block;
}

.asta-header-search-form {
  display: flex;
  gap: 6px;
  align-items: center;
  margin: 0;
}

.asta-header-search-input {
  flex: 1;
  min-width: 0;
  height: 36px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 6px;
  color: #fff;
  font-size: 14px;
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

html.asta-theme-dark body .asta-header-search-input {
  background-color: rgba(255, 255, 255, 0.1);
  color: var(--wp--preset--color--contrast);
}

.asta-header-search-input:focus {
  border-color: var(--wp--preset--color--secondary, #3b82f6);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.35);
}

.asta-header-search-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border-radius: 6px;
  background: var(--wp--preset--color--primary, #6d28d9);
  border: 1px solid var(--wp--preset--color--primary, #6d28d9);
  color: #fff;
  cursor: pointer;
  transition: background 0.15s ease;
}

html.asta-theme-dark body .asta-header-search-submit {
  background-color: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--contrast);
}

.asta-header-search-submit:hover,
.asta-header-search-submit:focus-visible {
  background: #7c3aed;
  outline: 2px solid var(--wp--preset--color--secondary, #3b82f6);
  outline-offset: 1px;
}

.asta-header-search-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  padding: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: var(--asta-header-foreground);
  cursor: pointer;
  transition: all 0.15s ease;
}

.asta-header-search-btn:hover,
.asta-header-search-btn:focus,
.asta-header-search-btn:focus-visible {
  background: var(--wp--preset--color--primary);
  border-color: var(--wp--preset--color--primary);
  color: #fff;
}

html.asta-theme-dark body .asta-header-search-btn:focus,
html.asta-theme-dark body .asta-header-search-btn:focus-visible,
html.asta-theme-dark body .asta-header-search-btn:hover {
  background-color: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--contrast);
}

.asta-header-search-btn:focus,
.asta-header-search-btn:focus-visible {
  outline: 2px solid var(--wp--preset--color--secondary) !important;
  outline-offset: 2px !important;
}

.asta-site-header > .asta-language-switcher-wrap {
  flex: 0 0 auto;
}

/* Base switcher reset — shared by every consumer (header, footer). Purely
   structural; no visual pill treatment here, so the footer instance
   (.asta-footer-three .asta-language-switcher) is unaffected by the
   header-specific pill styling below. */
.asta-language-switcher {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.asta-language-switcher .lang-item-de {
  order: 1;
}

.asta-language-switcher .lang-item-en {
  order: 2;
}

.asta-language-switcher a {
  display: inline-flex;
  align-items: center;
  color: var(--asta-header-foreground) !important;
  font-size: 0.875rem;
  font-weight: 700;
  text-decoration: none;
}

.asta-language-switcher img {
  display: block;
  height: auto;
}

.asta-language-switcher a:hover,
.asta-language-switcher a:focus-visible,
.asta-language-switcher .current-lang > a {
  color: var(--wp--preset--color--secondary) !important;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Segmented pill — header instance only (.asta-header-language-switcher).
   Mirrors .asta-dark-toggle__button's capsule shape (same min-height /
   border-radius) so the two utility controls read as one matched pair, per
   the confirmed design decision. Overrides the shared base rules above for
   this instance; the footer switcher keeps the original plain-link style. */
/* pathway-22 §1.3 (D1): the block is configured vertical, which stacks "Deutsch"
   over "English" in a 97 × 59 box inside a 66 px header. The header instance is
   laid out as one segment; the footer instance keeps its own layout. */
.asta-header-language-switcher ul {
  flex-direction: row;
  align-items: stretch;
}

.asta-header-language-switcher {
  align-items: stretch;
  gap: 0;
  min-height: 32px;
  border: 1px solid var(--asta-header-foreground, #fff);
  border-radius: 999px;
  overflow: hidden;
}

.asta-header-language-switcher a {
  justify-content: center;
  height: 100%;
  padding: 0.25rem 0.9rem;
  text-decoration: none;
}

.asta-header-language-switcher a:hover,
.asta-header-language-switcher a:focus-visible {
  text-decoration: none;
}

.asta-header-language-switcher .current-lang > a {
  background: var(--asta-header-foreground, #fff);
  color: var(--asta-header-background, #0F0D1A) !important;
  text-decoration: none;
}

.asta-header-language-switcher .current-lang > a:hover,
.asta-header-language-switcher .current-lang > a:focus-visible {
  color: var(--asta-header-background, #0F0D1A) !important;
}

/* A2: Max Mega Menu topbar uses the Night Sky primary role.
   pathway-08: the bar is a rounded pill (radius 8) with 16px of end padding,
   like the design. The radius has to sit on `ul#mega-menu-topbar` as well:
   Max Mega Menu paints that list the same purple over the wrapper's exact
   rectangle, so a radius on the wrapper alone is covered by a square list. */
#mega-menu-wrap-topbar {
  width: auto;
  background: var(--asta-nav-background);
  border-radius: 8px;
}

#mega-menu-wrap-topbar #mega-menu-topbar {
  background: var(--asta-nav-background);
  border-radius: 8px;
  padding: 0 6px;
}

/* 6px list padding + 10px item padding = the design's 16px of end padding. */
#mega-menu-wrap-topbar #mega-menu-topbar > li.mega-menu-item > a.mega-menu-link {
  position: relative;
  z-index: 0;
  border-radius: 8px;
  background: transparent !important;
  color: var(--asta-nav-foreground);
  font-weight: 500;
}

/* Hover, focus, the open panel's own item and the current page paint an inset
   pill (4px, radius 8) rather than a full-height block: a block would run into
   the bar's top and bottom edges and cut the pill's silhouette in two.
   It has to be a pseudo-element because Max Mega Menu zeroes the radius of the
   open item (`li.mega-toggle-on > a.mega-menu-link`, one class more specific
   than any rule this file can write without `!important`), and `display: block`
   is load-bearing: Max Mega Menu's clearfix rule sets `display: none` on
   `a.mega-menu-link::after` and only the declarations listed here override it. */
#mega-menu-wrap-topbar #mega-menu-topbar > li.mega-menu-item > a.mega-menu-link::after {
  content: "";
  display: block;
  position: absolute;
  inset: 4px;
  border-radius: 8px;
  background: var(--asta-header-background);
  opacity: 0;
  z-index: -1;
  pointer-events: none;
}

#mega-menu-wrap-topbar #mega-menu-topbar > li.mega-menu-item > a.mega-menu-link:hover::after,
#mega-menu-wrap-topbar #mega-menu-topbar > li.mega-menu-item > a.mega-menu-link:focus::after,
#mega-menu-wrap-topbar #mega-menu-topbar > li.mega-menu-item.mega-toggle-on > a.mega-menu-link::after,
#mega-menu-wrap-topbar #mega-menu-topbar > li.mega-menu-current-menu-item > a.mega-menu-link::after {
  opacity: 1;
  background: var(--asta-header-background) !important;
}

#mega-menu-wrap-topbar #mega-menu-topbar ul.mega-sub-menu {
  background: var(--wp--preset--color--surface);
  /* pathway-08: the panel is a rounded card now, so a 3px accent rule on every
     nested sub-menu drew a purple line under each group header — the shipped
     panel had one border on the outer panel, not sixteen. */
  border-top: 0;
  box-shadow: 0 8px 24px rgba(15, 13, 26, 0.18);
}

/* Phase 2: Max Mega Menu's own admin-generated stylesheet
   (wp-content/uploads/maxmegamenu/style_<lang>.css) sets the top-level grid
   panel's background to `rgba(34, 34, 34, 0)` (fully transparent) via
   `#mega-menu-wrap-topbar #mega-menu-topbar > li.mega-menu-megamenu > ul.mega-sub-menu`,
   a more specific selector than the rule above, so it wins regardless of
   cascade order and the hero section bleeds through the gaps between grid
   columns. Match that selector's specificity to override it back to opaque. */
#mega-menu-wrap-topbar #mega-menu-topbar > li.mega-menu-megamenu > ul.mega-sub-menu {
  background-color: var(--wp--preset--color--surface);
}

#mega-menu-wrap-topbar #mega-menu-topbar ul.mega-sub-menu li.mega-menu-item > a.mega-menu-link {
  color: var(--asta-nav-foreground);
}

#mega-menu-wrap-topbar #mega-menu-topbar ul.mega-sub-menu li.mega-menu-item > a.mega-menu-link:hover,
#mega-menu-wrap-topbar #mega-menu-topbar ul.mega-sub-menu li.mega-menu-item > a.mega-menu-link:focus {
  color: var(--asta-nav-foreground);
  background: var(--wp--preset--color--primary);
}

#mega-menu-wrap-topbar #mega-menu-topbar ul.mega-sub-menu li.mega-menu-item.mega-current-menu-item > a.mega-menu-link {
  color: var(--asta-nav-foreground);
  font-weight: 600;
}

/* Step 1.5: v11 scan-layer chips use native menu-item classes. */
#mega-menu-wrap-topbar #mega-menu-topbar li.asta-menu-nochip {
  display: none !important;
}

/* 2026-10-20 (owner): the coloured chip pills are gone. The Aktuelles and StuPa
   panels still mark their rows with `asta-menu-chip`, so the hook stays and only
   the paint is removed — these read as plain links now, spaced like a list. */
#mega-menu-wrap-topbar #mega-menu-topbar li.asta-menu-chip > a.mega-menu-link {
  display: inline-flex;
  width: auto;
  margin: 0.2rem 1.5rem 0.2rem 0;
  padding: 0.2rem 0;
  border-radius: 0;
  background: transparent;
  color: var(--asta-panel-ink);
  line-height: 1.35;
  /* Chips are top-level column items, which MMM styles as headings (measured:
     uppercase, 700, 16px) through a longer selector than this one. They are
     ordinary links now, so the heading treatment is cancelled explicitly. */
  font-size: 14px !important;
  font-weight: 400 !important;
  letter-spacing: normal !important;
  text-transform: none !important;
}

#mega-menu-wrap-topbar #mega-menu-topbar li.asta-menu-chip > a.mega-menu-link:hover,
#mega-menu-wrap-topbar #mega-menu-topbar li.asta-menu-chip > a.mega-menu-link:focus {
  background: transparent;
  color: var(--asta-panel-ink);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Step 1.5a: one full-width contextual CTA row per grid panel. */
#mega-menu-wrap-topbar #mega-menu-topbar li.cta-anchor-row {
  box-sizing: border-box;
  clear: both;
  float: none;
  width: 100%;
  margin: 1rem 0 0;
  padding: 0.75rem 0 0;
  border-top: 1px solid var(--wp--preset--color--secondary);
  background: var(--wp--preset--color--surface);
}

#mega-menu-wrap-topbar #mega-menu-topbar li.cta-anchor-row > ul.mega-sub-menu {
  box-sizing: border-box;
  width: 100%;
  margin: 0;
  padding: 0;
  border-top: 0;
  background: transparent;
  box-shadow: none;
  left: auto !important;
  right: auto !important;
}

#mega-menu-wrap-topbar #mega-menu-topbar li.cta-anchor-row ul.mega-sub-menu {
  left: auto !important;
  right: auto !important;
  background: var(--wp--preset--color--surface);
}

/*
 * The two panels whose items are MMM "standard" columns get a real grid.
 *
 * "How to Studieren?" and "StuPa" were authored without a row/column wrapper, so
 * their cells are `float: left` with a percentage width and each row is only as
 * tall as its own tallest cell. Measured at 1440 before this rule: StuPa's last
 * row was 64 / 132 / 200px and How to's second row 64 / 132 / 166px, because the
 * two chip groups wrap to more lines than their neighbours -- the panel bottom
 * came out ragged and the cells read as unaligned columns.
 *
 * Scoped with `:has()` to panels that actually carry standard columns, so
 * Services / AStA / Aktuelles keep their row+column geometry, and to the desktop
 * breakpoint, because below 1025px MMM turns the same markup into an accordion.
 *
 * `padding-left` is deliberately NOT reset: the panel's own 15px cell padding is
 * what puts these panels' text on the same left edge as the row/column panels,
 * whose first link is inset 15px by its own box.
 */
@media (min-width: 1025px) {
  #mega-menu-wrap-topbar #mega-menu-topbar > li.mega-menu-megamenu > ul.mega-sub-menu:has(> li.mega-menu-column-standard) {
    display: grid;
    /* 1fr, not the 33.3333% MMM computes: three of those overflow the 1136px
       content box by one pixel, which clipped the third column. */
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: stretch;
  }

  #mega-menu-wrap-topbar #mega-menu-topbar > li.mega-menu-megamenu > ul.mega-sub-menu:has(> li.mega-menu-column-standard) > li.mega-menu-column-standard {
    float: none;
    width: auto;
  }

  #mega-menu-wrap-topbar #mega-menu-topbar > li.mega-menu-megamenu > ul.mega-sub-menu:has(> li.mega-menu-column-standard) > li.cta-anchor-row {
    grid-column: 1 / -1;
  }
}

#mega-menu-wrap-topbar #mega-menu-topbar li.cta-anchor-row > ul.mega-sub-menu > li.cta-anchor-column {
  box-sizing: border-box;
  float: none;
  width: 100%;
  max-width: 100%;
  margin: 0;
  padding: 0;
}

#mega-menu-wrap-topbar #mega-menu-topbar li.cta-anchor-row li.cta-anchor-link {
  float: none;
  width: 100%;
  margin: 0;
  padding: 0;
}

#mega-menu-wrap-topbar #mega-menu-topbar li.cta-anchor-row li.cta-anchor-link > a.mega-menu-link {
  display: inline-flex;
  box-sizing: border-box;
  max-width: 100%;
  align-items: center;
  color: var(--wp--preset--color--secondary) !important;
  white-space: normal;
  overflow-wrap: anywhere;
}

#mega-menu-wrap-topbar #mega-menu-topbar li.cta-anchor-row li.cta-anchor-link > a.mega-menu-link:hover,
#mega-menu-wrap-topbar #mega-menu-topbar li.cta-anchor-row li.cta-anchor-link > a.mega-menu-link:focus {
  color: var(--wp--preset--color--accent) !important;
}

/*
 * A3 foot (pathway-20 §2.3): the AStA panel's Jobs column sits in its own grid
 * row (see tools/apply-mega-menu-a3.php) and renders as one line — label as
 * type, two white links, CTA last.
 *
 * Max Mega Menu prefixes the item classes it is given (`mega-asta-mm-jobs__label`),
 * so the hooks are matched by substring. The row has no class of its own, which
 * is why it is addressed with :has() — the theme already relies on :has() for
 * the column-standard grid patch above.
 *
 * The selectors carry the panel path (`li.mega-menu-megamenu > ul.mega-sub-menu
 * > li.mega-menu-row`) on purpose: MMM styles every first-level item anchor and
 * every nested sub-menu with `display` at (2,3,3)/(2,3,4) specificity, so a
 * shorter hook silently loses and the foot stacks. The whole block is desktop
 * only, because below 1025px MMM renders the same markup as an accordion, where
 * the Jobs group must keep behaving like any other parent item.
 */
@media (min-width: 1025px) {
  #mega-menu-wrap-topbar #mega-menu-topbar
    > li.mega-menu-megamenu > ul.mega-sub-menu
    > li.mega-menu-row:has(li[class*="asta-mm-jobs__wrap"]) {
    margin-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.16);
  }

  #mega-menu-wrap-topbar #mega-menu-topbar
    > li.mega-menu-megamenu > ul.mega-sub-menu
    > li.mega-menu-row:has(li[class*="asta-mm-jobs__wrap"]) > ul > li {
    display: block;
    float: none;
    width: 100%;
    padding: 0;
    background: transparent;
  }

  /* The group item ("Jobs" / "Jobs") is a column cell, not a foot entry: it
     floats out of the cell by default, so it is normalised first, its own
     title is dropped, and its child list becomes the one-line foot. */
  #mega-menu-wrap-topbar #mega-menu-topbar
    > li.mega-menu-megamenu > ul.mega-sub-menu
    > li.mega-menu-row:has(li[class*="asta-mm-jobs__wrap"])
    > ul > li > ul > li[class*="asta-mm-jobs__wrap"] {
    display: block;
    float: none;
    width: 100%;
    margin: 0;
    padding: 0;
    background: transparent;
  }

  /* The group item ("Jobs" / "Jobs") is a column cell, not a foot entry: its
     own title is dropped and its child list becomes the one-line foot. */
  #mega-menu-wrap-topbar #mega-menu-topbar
    > li.mega-menu-megamenu > ul.mega-sub-menu
    > li.mega-menu-row:has(li[class*="asta-mm-jobs__wrap"])
    > ul > li > ul > li[class*="asta-mm-jobs__wrap"] > a.mega-menu-link {
    display: none;
  }

  #mega-menu-wrap-topbar #mega-menu-topbar
    > li.mega-menu-megamenu > ul.mega-sub-menu
    > li.mega-menu-row:has(li[class*="asta-mm-jobs__wrap"])
    > ul > li > ul > li[class*="asta-mm-jobs__wrap"] > ul.mega-sub-menu {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 16px;
    min-height: 0;
    padding: 14px 0 0;
    background: transparent;
  }

  #mega-menu-wrap-topbar #mega-menu-topbar
    > li.mega-menu-megamenu > ul.mega-sub-menu
    > li.mega-menu-row:has(li[class*="asta-mm-jobs__wrap"])
    > ul > li > ul > li[class*="asta-mm-jobs__wrap"] > ul.mega-sub-menu > li {
    display: block;
    float: none;
    width: auto;
    margin: 0;
    padding: 0;
  }

  #mega-menu-wrap-topbar #mega-menu-topbar
    > li.mega-menu-megamenu > ul.mega-sub-menu
    > li.mega-menu-row:has(li[class*="asta-mm-jobs__wrap"])
    > ul > li > ul > li[class*="asta-mm-jobs__wrap"] > ul.mega-sub-menu > li > a.mega-menu-link {
    display: inline-flex;
    align-items: center;
    min-height: 0;
    margin: 0;
    padding: 6px 4px;
    background: transparent !important;
    color: var(--asta-nav-foreground) !important;
    font-size: 14.5px;
    font-weight: 400;
    line-height: 1.4;
    text-transform: none;
    white-space: normal;
  }

  /* The label is a link that reads as a label: purple type, no surface. */
  #mega-menu-wrap-topbar #mega-menu-topbar
    > li.mega-menu-megamenu > ul.mega-sub-menu
    > li.mega-menu-row:has(li[class*="asta-mm-jobs__wrap"])
    > ul > li > ul > li[class*="asta-mm-jobs__wrap"] > ul.mega-sub-menu > li[class*="asta-mm-jobs__label"] > a.mega-menu-link {
    padding: 6px 0;
    color: #a78bfa !important;
    font-size: 11.5px;
    font-weight: 700;
    letter-spacing: 0.09em;
    text-transform: uppercase;
  }

  #mega-menu-wrap-topbar #mega-menu-topbar
    > li.mega-menu-megamenu > ul.mega-sub-menu
    > li.mega-menu-row:has(li[class*="asta-mm-jobs__wrap"])
    > ul > li > ul > li[class*="asta-mm-jobs__wrap"] > ul.mega-sub-menu > li[class*="asta-mm-jobs__link"] > a.mega-menu-link:hover,
  #mega-menu-wrap-topbar #mega-menu-topbar
    > li.mega-menu-megamenu > ul.mega-sub-menu
    > li.mega-menu-row:has(li[class*="asta-mm-jobs__wrap"])
    > ul > li > ul > li[class*="asta-mm-jobs__wrap"] > ul.mega-sub-menu > li[class*="asta-mm-jobs__link"] > a.mega-menu-link:focus,
  #mega-menu-wrap-topbar #mega-menu-topbar
    > li.mega-menu-megamenu > ul.mega-sub-menu
    > li.mega-menu-row:has(li[class*="asta-mm-jobs__wrap"])
    > ul > li > ul > li[class*="asta-mm-jobs__wrap"] > ul.mega-sub-menu > li[class*="asta-mm-jobs__label"] > a.mega-menu-link:hover,
  #mega-menu-wrap-topbar #mega-menu-topbar
    > li.mega-menu-megamenu > ul.mega-sub-menu
    > li.mega-menu-row:has(li[class*="asta-mm-jobs__wrap"])
    > ul > li > ul > li[class*="asta-mm-jobs__wrap"] > ul.mega-sub-menu > li[class*="asta-mm-jobs__label"] > a.mega-menu-link:focus {
    background: transparent !important;
    text-decoration: underline;
    text-underline-offset: 0.2em;
  }

  /* The CTA keeps the pill the other panels use, 40 px as drawn in pathway-20. */
  #mega-menu-wrap-topbar #mega-menu-topbar
    > li.mega-menu-megamenu > ul.mega-sub-menu
    > li.mega-menu-row:has(li[class*="asta-mm-jobs__wrap"])
    > ul > li > ul > li[class*="asta-mm-jobs__wrap"] > ul.mega-sub-menu > li[class*="asta-mm-jobs__cta"] > a.mega-menu-link {
    height: 40px;
    margin-left: auto;
    padding: 0 18px;
    border-radius: 999px;
    background: var(--wp--preset--color--primary) !important;
    color: var(--asta-nav-foreground) !important;
    font-size: 14px;
    font-weight: 700;
  }

  #mega-menu-wrap-topbar #mega-menu-topbar
    > li.mega-menu-megamenu > ul.mega-sub-menu
    > li.mega-menu-row:has(li[class*="asta-mm-jobs__wrap"])
    > ul > li > ul > li[class*="asta-mm-jobs__wrap"] > ul.mega-sub-menu > li[class*="asta-mm-jobs__cta"] > a.mega-menu-link:hover,
  #mega-menu-wrap-topbar #mega-menu-topbar
    > li.mega-menu-megamenu > ul.mega-sub-menu
    > li.mega-menu-row:has(li[class*="asta-mm-jobs__wrap"])
    > ul > li > ul > li[class*="asta-mm-jobs__wrap"] > ul.mega-sub-menu > li[class*="asta-mm-jobs__cta"] > a.mega-menu-link:focus {
    background: var(--wp--preset--color--primary) !important;
    color: var(--asta-nav-foreground) !important;
    filter: brightness(1.12);
    text-decoration: none;
  }
}

/*
 * pathway-20 §5.1: no icons at all — the plugin's indicator span stays in the
 * markup (aria-hidden), but nothing is drawn. The selector repeats MMM's own
 * `li.mega-menu-item-has-children > a > span.mega-indicator` hook because a
 * shorter one loses on specificity. Desktop only: below 1025px the same span is
 * the accordion's chevron, which is an affordance, not decoration.
 */
@media (min-width: 1025px) {
  #mega-menu-wrap-topbar #mega-menu-topbar li.mega-menu-item-has-children > a.mega-menu-link > span.mega-indicator {
    display: none;
  }
}

/*
 * Topic-column panels (H1, S1): Max Mega Menu offsets the row's inner list to
 * centre the columns, which pushes a three-column panel 250px to the left of its
 * own padding box and clips the first column. The grid panels do not get that
 * offset, so the list is pinned to the panel's content box instead.
 */
@media (min-width: 1025px) {
  #mega-menu-wrap-topbar #mega-menu-topbar
    > li.mega-menu-megamenu > ul.mega-sub-menu:has(> li.mega-menu-row > ul > li.mega-menu-columns-1-of-3)
    > li.mega-menu-row > ul.mega-sub-menu {
    position: static !important;
    left: auto !important;
    width: auto !important;
    margin: 0 !important;
  }

  /* Max Mega Menu shifts every nested list by the panel's own offset (-250px in
     a 1200px panel) so that a hovered column can centre itself. In a flat
     three-column panel that shift lands the column's list outside its column.
     Pinning the lists to their own box is what makes the three columns line up. */
  #mega-menu-wrap-topbar #mega-menu-topbar
    > li.mega-menu-megamenu > ul.mega-sub-menu:has(> li.mega-menu-row > ul > li.mega-menu-columns-1-of-3) ul.mega-sub-menu {
    left: 0 !important;
    transform: none !important;
  }
}

/*
 * The board panel (pathway-22 §2.5 A2 + §4.3): "Aktuelles" is the board, so its
 * panel is plain navigation, not a feed preview.
 *
 *   - five rows, the first one ("Alle Aushänge") carries the board link and is
 *     the only coloured row (styled further up, next to the description policy);
 *   - the Bildungsreihe has no separator: in a board it is one aushang among
 *     others, not a special case (that was A1, superseded by A2);
 *   - "Beitrag einreichen" sits in the same visual row as the Bildungsreihe, as
 *     a pill, with no sentence and no card surface.
 *
 * The grid is what puts those two items on one row: every item spans the full
 * width except the last two, which take the two columns. The guard
 * `:has(> li.mega-menu-row > ul > li.mega-menu-columns-1-of-1)` keeps this to
 * the two one-column board panels; every other panel is 2- or 3-column.
 */
@media (min-width: 1025px) {
  #mega-menu-wrap-topbar #mega-menu-topbar
    > li.mega-menu-megamenu > ul.mega-sub-menu:has(> li.mega-menu-row > ul > li.mega-menu-columns-1-of-1)
    > li.mega-menu-row > ul > li > ul.mega-sub-menu {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    column-gap: 16px;
    row-gap: 0;
  }

  #mega-menu-wrap-topbar #mega-menu-topbar
    > li.mega-menu-megamenu > ul.mega-sub-menu:has(> li.mega-menu-row > ul > li.mega-menu-columns-1-of-1)
    > li.mega-menu-row > ul > li > ul.mega-sub-menu > li {
    grid-column: 1 / -1;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
  }

  /* The Bildungsreihe and the pill share the last row. */
  #mega-menu-wrap-topbar #mega-menu-topbar
    > li.mega-menu-megamenu > ul.mega-sub-menu:has(> li.mega-menu-row > ul > li.mega-menu-columns-1-of-1)
    > li.mega-menu-row > ul > li > ul.mega-sub-menu > li:nth-last-child(2) {
    grid-column: 1;
  }

  #mega-menu-wrap-topbar #mega-menu-topbar
    > li.mega-menu-megamenu > ul.mega-sub-menu:has(> li.mega-menu-row > ul > li.mega-menu-columns-1-of-1)
    > li.mega-menu-row > ul > li > ul.mega-sub-menu > li:last-child {
    grid-column: 2;
    justify-self: end;
  }

  #mega-menu-wrap-topbar #mega-menu-topbar
    > li.mega-menu-megamenu > ul.mega-sub-menu:has(> li.mega-menu-row > ul > li.mega-menu-columns-1-of-1)
    > li.mega-menu-row > ul > li > ul.mega-sub-menu > li > a.mega-menu-link {
    display: block;
    padding: 6px 0;
    color: var(--asta-nav-foreground) !important;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.35;
    text-transform: none;
  }

  #mega-menu-wrap-topbar #mega-menu-topbar
    > li.mega-menu-megamenu > ul.mega-sub-menu:has(> li.mega-menu-row > ul > li.mega-menu-columns-1-of-1)
    > li.mega-menu-row > ul > li > ul.mega-sub-menu > li > a.mega-menu-link .mega-menu-title {
    color: inherit !important;
    font-size: inherit;
    font-weight: inherit;
    text-transform: none;
  }

  #mega-menu-wrap-topbar #mega-menu-topbar
    > li.mega-menu-megamenu > ul.mega-sub-menu:has(> li.mega-menu-row > ul > li.mega-menu-columns-1-of-1)
    > li.mega-menu-row > ul > li > ul.mega-sub-menu > li > a.mega-menu-link:hover,
  #mega-menu-wrap-topbar #mega-menu-topbar
    > li.mega-menu-megamenu > ul.mega-sub-menu:has(> li.mega-menu-row > ul > li.mega-menu-columns-1-of-1)
    > li.mega-menu-row > ul > li > ul.mega-sub-menu > li > a.mega-menu-link:focus {
    text-decoration: underline;
    text-underline-offset: 0.2em;
  }

  /* The pill. Its description is the sentence "Veranstaltung oder
     Newsletter-Beitrag einreichen" — in A2 there is no room for it, so it stays
     in the DOM for screen readers only. */
  #mega-menu-wrap-topbar #mega-menu-topbar
    > li.mega-menu-megamenu > ul.mega-sub-menu:has(> li.mega-menu-row > ul > li.mega-menu-columns-1-of-1)
    > li.mega-menu-row > ul > li > ul.mega-sub-menu > li:last-child > a.mega-menu-link {
    display: inline-flex;
    align-items: center;
    height: 34px;
    padding: 0 16px;
    border-radius: 999px;
    background: var(--wp--preset--color--primary) !important;
    color: var(--asta-nav-foreground) !important;
    font-size: 14px;
    font-weight: 700;
    text-decoration: none;
  }

  #mega-menu-wrap-topbar #mega-menu-topbar
    > li.mega-menu-megamenu > ul.mega-sub-menu:has(> li.mega-menu-row > ul > li.mega-menu-columns-1-of-1)
    > li.mega-menu-row > ul > li > ul.mega-sub-menu > li:last-child > a.mega-menu-link:hover,
  #mega-menu-wrap-topbar #mega-menu-topbar
    > li.mega-menu-megamenu > ul.mega-sub-menu:has(> li.mega-menu-row > ul > li.mega-menu-columns-1-of-1)
    > li.mega-menu-row > ul > li > ul.mega-sub-menu > li:last-child > a.mega-menu-link:focus {
    filter: brightness(1.1);
    text-decoration: none;
  }

  #mega-menu-wrap-topbar #mega-menu-topbar
    > li.mega-menu-megamenu > ul.mega-sub-menu:has(> li.mega-menu-row > ul > li.mega-menu-columns-1-of-1)
    > li.mega-menu-row > ul > li > ul.mega-sub-menu > li:last-child .mega-menu-description {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }
}

/*
 * pathway-20 §5.1: no icons at all — the plugin's indicator span stays in the
 * markup (aria-hidden), but nothing is drawn. The selector repeats MMM's own
 * `li.mega-menu-item-has-children > a > span.mega-indicator` hook because a
 * shorter one loses on specificity. Desktop only: below 1025px the same span is
 * the accordion's chevron, which is an affordance, not decoration.
 */
@media (min-width: 1025px) {
  #mega-menu-wrap-topbar #mega-menu-topbar li.mega-menu-item-has-children > a.mega-menu-link > span.mega-indicator {
    display: none;
  }
}

/*
 * Topic-column panels (H1, S1): Max Mega Menu offsets the row's inner list to
 * centre the columns, which pushes a three-column panel 250px to the left of its
 * own padding box and clips the first column. The grid panels do not get that
 * offset, so the list is pinned to the panel's content box instead.
 */
@media (min-width: 1025px) {
  #mega-menu-wrap-topbar #mega-menu-topbar
    > li.mega-menu-megamenu > ul.mega-sub-menu:has(> li.mega-menu-row > ul > li.mega-menu-columns-1-of-3)
    > li.mega-menu-row > ul.mega-sub-menu {
    position: static !important;
    left: auto !important;
    width: auto !important;
    margin: 0 !important;
  }

  /* Max Mega Menu shifts every nested list by the panel's own offset (-250px in
     a 1200px panel) so that a hovered column can centre itself. In a flat
     three-column panel that shift lands the column's list outside its column.
     Pinning the lists to their own box is what makes the three columns line up. */
  #mega-menu-wrap-topbar #mega-menu-topbar
    > li.mega-menu-megamenu > ul.mega-sub-menu:has(> li.mega-menu-row > ul > li.mega-menu-columns-1-of-3) ul.mega-sub-menu {
    left: 0 !important;
    transform: none !important;
  }
}

/*
 * Aktuelles (pathway-21 §2.3, K2): the panel is one column, so its cells are
 * list rows, not headings. The two entries K2 breaks out are tagged by
 * asta_gwyneth_mega_menu_aktuelles_tags(): the Bildungsreihe is separated from
 * the news links, and “Beitrag einreichen” becomes the callout card above the
 * CTA row, with the sentence as its description and the pill as its title.
 *
 * The `:has(> li.mega-menu-row > ul > li.mega-menu-columns-1-of-1)` guard keeps
 * this to the two flattened panels; every other panel is 2- or 3-column.
 */
@media (min-width: 1025px) {
  /* MMM gives every cell in a grid panel 15px padding and an uppercased title;
     in a one-column list both make a row 66px tall instead of 36px. */
  #mega-menu-wrap-topbar #mega-menu-topbar
    > li.mega-menu-megamenu > ul.mega-sub-menu:has(> li.mega-menu-row > ul > li.mega-menu-columns-1-of-1)
    > li.mega-menu-row > ul > li > ul.mega-sub-menu > li.mega-menu-item {
    padding: 0;
  }

  #mega-menu-wrap-topbar #mega-menu-topbar
    > li.mega-menu-megamenu > ul.mega-sub-menu:has(> li.mega-menu-row > ul > li.mega-menu-columns-1-of-1)
    > li.mega-menu-row > ul > li > ul.mega-sub-menu > li.mega-menu-item .mega-menu-title {
    color: inherit !important;
    font-size: inherit;
    font-weight: inherit;
    text-transform: none;
  }

  #mega-menu-wrap-topbar #mega-menu-topbar
    > li.mega-menu-megamenu > ul.mega-sub-menu:has(> li.mega-menu-row > ul > li.mega-menu-columns-1-of-1)
    > li.mega-menu-row > ul > li > ul.mega-sub-menu > li.mega-menu-item > a.mega-menu-link {
    display: block;
    padding: 7px 0;
    color: var(--asta-nav-foreground) !important;
    font-size: 15px;
    font-weight: 400;
    line-height: 1.45;
    text-transform: none;
  }

  #mega-menu-wrap-topbar #mega-menu-topbar
    > li.mega-menu-megamenu > ul.mega-sub-menu:has(> li.mega-menu-row > ul > li.mega-menu-columns-1-of-1)
    > li.mega-menu-row > ul > li > ul.mega-sub-menu > li.mega-menu-item > a.mega-menu-link:hover,
  #mega-menu-wrap-topbar #mega-menu-topbar
    > li.mega-menu-megamenu > ul.mega-sub-menu:has(> li.mega-menu-row > ul > li.mega-menu-columns-1-of-1)
    > li.mega-menu-row > ul > li > ul.mega-sub-menu > li.mega-menu-item > a.mega-menu-link:focus {
    text-decoration: underline;
    text-underline-offset: 0.2em;
  }

}

/*
 * pathway-22 §2.5 (A2): the first row of the Aktuelles panel is the board entry
 * and is the only coloured row in the menu. #a78bfa on the panel ground
 * (#141227) is 6.9 : 1; the brand purple #6D28D9 would be 2.3 : 1 and fail.
 * The arrow and the weight carry the emphasis too, so colour is not the only cue.
 */
#mega-menu-wrap-topbar #mega-menu-topbar
  > li.mega-menu-megamenu > ul.mega-sub-menu:has(> li.mega-menu-row > ul > li.mega-menu-columns-1-of-1)
  > li.mega-menu-row > ul > li > ul.mega-sub-menu > li.mega-menu-item:first-child > a.mega-menu-link {
  color: #a78bfa !important;
  font-weight: 700;
}

#mega-menu-wrap-topbar #mega-menu-topbar
  > li.mega-menu-megamenu > ul.mega-sub-menu:has(> li.mega-menu-row > ul > li.mega-menu-columns-1-of-1)
  > li.mega-menu-row > ul > li > ul.mega-sub-menu > li.mega-menu-item:first-child > a.mega-menu-link::after {
  content: " \2192";
}

/*
 * pathway-22 §2.5 (A2): the board's newest entry — or a pinned one — is what
 * people came for, so the first card of the Aktuelles archive spans the grid
 * and carries a larger headline and a three-line teaser. The grid itself is
 * unchanged; only the first cell is widened, so nothing else has to be retuned.
 *
 * `:has()` decides the two-column split: 47 of the 126 board entries have no
 * featured image, and empty image cells are rendered as an empty div by the
 * parent theme's entry pattern, which would leave a hole.
 */
.asta-board .wp-block-post-template > li:first-child {
  grid-column: 1 / -1;
}

.asta-board
  .wp-block-post-template
  > li:first-child
  > .wp-block-template-part
  > article
  > div:nth-of-type(1)
  > .wp-block-post-title {
  font-size: clamp(1.5rem, 1.1rem + 1.2vw, 2.125rem) !important;
  line-height: 1.2;
  hyphens: auto;
  overflow-wrap: break-word;
}

/* The date/teaser group is a constrained layout, so on a 1200px-wide card the
   theme centres it inside the content width and it no longer lines up with the
   headline above it. Constrain the group itself, not its children: a child-level
   `margin-inline: 0` loses to the block library's own centring, which is why the
   teaser first stayed 141px to the right. A 1200px line is ~95 characters, so
   68ch also keeps it readable. */
.asta-board
  .wp-block-post-template
  > li:first-child
  > .wp-block-template-part
  > article
  > div:nth-of-type(3) {
  max-width: min(100%, 68ch);
  margin-inline: 0;
  padding-inline: var(--wp--preset--spacing--m, 2rem);
}

/* pathway-22 §B2: compact announcement cards without image placeholders. */
.asta-board .wp-block-post-template > li:not(:first-child) > .wp-block-template-part {
  height: 100%;
  border: 1px solid color-mix(in srgb, currentColor 20%, transparent);
  border-radius: 10px;
}

.asta-board
  .wp-block-post-template
  > li:not(:first-child)
  > .wp-block-template-part
  > article
  > div:nth-of-type(2) {
  display: none;
}

.asta-board
  .wp-block-post-template
  > li
  > .wp-block-template-part
  > article
  > div:nth-of-type(3)
  > .wp-block-post-excerpt
  > .wp-block-post-excerpt__excerpt {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

@media (min-width: 783px) {
  .asta-board
    .wp-block-post-template
    > li:first-child:has(.wp-block-post-featured-image:not(.is-empty))
    > .wp-block-template-part
    > article {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
    column-gap: var(--wp--preset--spacing--l, 2rem);
    align-items: start;
  }

  /* The theme centres `.is-style-wide` with auto inline margins; in a grid that
     silently stops the item from stretching, so the bar would shrink to 53px. */
  .asta-board
    .wp-block-post-template
    > li:first-child
    > .wp-block-template-part
    > article
    > .wp-block-separator {
    grid-column: 1 / -1;
    width: auto;
    margin-inline: 0;
  }

  .asta-board
    .wp-block-post-template
    > li:first-child:has(.wp-block-post-featured-image:not(.is-empty))
    > .wp-block-template-part
    > article
    > div:nth-of-type(1) {
    grid-column: 2;
    grid-row: 2;
  }

  /* Half of 1200px is ~530px: at the full-width size the headline runs to four
     lines and German compounds break mid-word. */
  .asta-board
    .wp-block-post-template
    > li:first-child:has(.wp-block-post-featured-image:not(.is-empty))
    > .wp-block-template-part
    > article
    > div:nth-of-type(1)
    > .wp-block-post-title {
    font-size: clamp(1.25rem, 0.9rem + 0.7vw, 1.75rem) !important;
  }

  .asta-board
    .wp-block-post-template
    > li:first-child:has(.wp-block-post-featured-image:not(.is-empty))
    > .wp-block-template-part
    > article
    > div:nth-of-type(2) {
    grid-column: 1;
    grid-row: 2 / span 2;
  }

  .asta-board
    .wp-block-post-template
    > li:first-child:has(.wp-block-post-featured-image:not(.is-empty))
    > .wp-block-template-part
    > article
    > div:nth-of-type(3) {
    grid-column: 2;
    grid-row: 3;
  }
}

/*
 * The pin marker. The label is rendered by asta_gwyneth_board_pin_badge() so it
 * exists in both site languages; #a78bfa is the same 6.9 : 1 accent the menu
 * uses for the board row.
 */
.asta-board-pin {
  display: inline-flex;
  align-items: center;
  padding: 0.5em 0.9em;
  border-radius: 999px;
  background: rgba(167, 139, 250, 0.16);
  color: #a78bfa;
  font-size: 0.75em;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

html.asta-theme-dark body .asta-board-pin {
  background-color: rgba(167, 139, 250, 0.16);
  color: var(--asta-heading-color);
}

.asta-board .wp-block-post.sticky:after {
  display: none;
}

/*
 * pathway-20 §7.1 step 8: descriptions only in the Referate column. The panel
 * keeps them for the 14 referat entries, where they distinguish the referate;
 * everywhere else they were noise (Über uns 12, How to Study? 11, StuPa 15).
 */
#mega-menu-wrap-topbar #mega-menu-topbar .mega-menu-description {
  display: none;
}

#mega-menu-wrap-topbar #mega-menu-topbar li.asta-col-referate li .mega-menu-description {
  display: inline;
  margin-left: 0.45em;
  font-size: 12px;
  opacity: 0.72;
}

@media (min-width: 768px) {
  #mega-menu-wrap-topbar #mega-menu-topbar > li:nth-last-child(-n + 2) ul.mega-sub-menu ul.mega-sub-menu {
    left: auto !important;
    right: 250px !important;
  }

  #mega-menu-wrap-topbar #mega-menu-topbar > li:nth-last-child(-n + 2) li.cta-anchor-row ul.mega-sub-menu {
    left: auto !important;
    right: auto !important;
  }
}

@media (max-width: 768px) {
  .asta-site-header {
    flex-wrap: nowrap !important;
    height: 56px !important;
    min-height: 56px !important;
    justify-content: space-between !important;
    padding-inline: 10px !important;
    column-gap: 4px !important;
  }

  .asta-site-header > .asta-header-brand {
    flex: 0 1 auto;
    min-width: 0;
    gap: 6px !important;
  }

  .asta-site-header .asta-header-logo img {
    height: 32px !important;
    width: auto !important;
  }

  .asta-site-header .asta-header-site-title {
    font-size: 0.85rem !important;
  }

  .asta-site-header > .asta-header-search-wrap,
  .asta-site-header > .asta-dark-toggle,
  .asta-site-header > .asta-language-switcher-wrap,
  .asta-site-header > .asta-primary-navigation {
    flex: 0 0 auto !important;
    margin: 0 !important;
  }

  /* The desktop min-width keeps the horizontal menu usable; on mobile the
     nav collapses to a 34px toggle, so keeping 12rem reserved the header
     overflows by exactly that remainder at 320px (measured: 346/320). */
  .asta-site-header > .asta-primary-navigation {
    min-width: 0 !important;
  }

  .asta-dark-toggle__label {
    display: inline !important;
    font-size: 0.7rem;
    white-space: nowrap;
  }

  .asta-dark-toggle__button {
    padding: 0.2rem 0.55rem !important;
    width: auto !important;
    height: 32px !important;
    min-height: 32px !important;
    justify-content: center !important;
    gap: 0 !important;
  }

  .asta-header-language-switcher {
    min-height: 32px !important;
  }

  .asta-header-language-switcher a {
    padding: 0.2rem 0.45rem !important;
    font-size: 0.75rem !important;
  }

  .asta-header-search-btn {
    width: 32px !important;
    height: 32px !important;
  }

  #mega-menu-wrap-topbar {
    width: auto !important;
  }

  .mega-menu-toggle {
    width: 34px !important;
    height: 34px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  /* pathway-08 gives the desktop bar 16px of end padding; the mobile drawer
     rows are full-bleed, so the 6px list padding and the 8px corner are reset. */
  #mega-menu-wrap-topbar,
  #mega-menu-wrap-topbar #mega-menu-topbar {
    border-radius: 0;
  }

  #mega-menu-wrap-topbar #mega-menu-topbar {
    padding: 0;
    background: #0F0D1A !important;
  }

  #mega-menu-wrap-topbar #mega-menu-topbar li.asta-menu-chip > a.mega-menu-link {
    display: block;
    margin: 0;
    padding: 0.65rem 1rem;
    border-radius: 0;
    background: transparent;
    color: var(--asta-nav-foreground);
  }
}

/*
 * C-23 (pathway-08 §1–5): the mega-menu's visible text.
 *
 * Measured on the rendered panel 2026-10-20 (Figma capture 30:203): item titles
 * #666666 on #1A1A2E = 2.97:1 and group headers #555555 = 2.29:1 — both below
 * the 4.5:1 floor. The cause was not a missing colour on the link: Max Mega
 * Menu's generated stylesheet paints the *inner* spans
 * (span.mega-menu-title / span.mega-menu-description), while this child theme
 * coloured only a.mega-menu-link. The inner span is what the reader sees, so the
 * white never applied.
 *
 * The generated sheet is per-language and stamped "DO NOT MAKE MANUAL EDITS", so
 * the override belongs here. These tokens mirror the Night Sky library and are
 * deliberately scheme-stable: the panel is dark in both modes, so its ink must
 * not invert. Ratios on #1A1A2E: ink 17.06:1, muted 9.31:1, accent 6.27:1.
 */
#mega-menu-wrap-topbar {
  --asta-panel-ink: #ffffff;
  --asta-panel-ink-muted: rgba(255, 255, 255, 0.72);
  --asta-panel-accent: #a78bfa;
}

/* Item titles and descriptions: the inner spans that actually render the text. */
#mega-menu-wrap-topbar #mega-menu-topbar ul.mega-sub-menu li.mega-menu-item > a.mega-menu-link span.mega-menu-title,
#mega-menu-wrap-topbar #mega-menu-topbar ul.mega-sub-menu li.mega-menu-item > a.mega-menu-link span.mega-menu-description {
  color: var(--asta-panel-ink) !important;
}

/* Items that carry no description have their label as a bare text node inside
   the anchor — no span to colour — so they inherited MMM's #666 and rendered
   grey next to their white neighbours (measured: linkColor rgb(102,102,102) on
   "Formulare / Anträge"). Colouring the link covers both shapes. The CTA links
   are excluded: the other panels' `.cta-anchor-row` CTA is a blue link by design,
   and the AStA CTA brings its own white-on-primary rule. */
#mega-menu-wrap-topbar #mega-menu-topbar ul.mega-sub-menu li.mega-menu-item:not(.cta-anchor-link):not([class*="asta-cta-link"]) > a.mega-menu-link {
  color: var(--asta-panel-ink) !important;
}

#mega-menu-wrap-topbar #mega-menu-topbar ul.mega-sub-menu li.mega-menu-item > a.mega-menu-link span.mega-menu-description {
  font-size: 12px !important;
  line-height: 1.42 !important;
  font-style: normal !important;
  opacity: 0.72;
}

/*
 * Group headers ("Über uns", "Jobs", "Referate") are the items whose parent
 * ul's parent is li.mega-menu-column. Measured from the rendered DOM: a header
 * chains SPAN < A < LI.mega-menu-item < UL < LI.mega-menu-column, while an item
 * chains SPAN < A < LI.mega-menu-item < UL < LI.mega-menu-item. `has-children`
 * is NOT the discriminator — items carry it too — so keying on the column is the
 * only rule that colours the three headers and leaves every item link white.
 * Declared after the ink rule and with more classes, so it wins on specificity.
 */
/* The CTA rows are excluded: they are purple pills that carry their own white
   text, and this header rule was painting them #a78bfa — 2.61 : 1 on #6D28D9.
   They are not column headers, so they have no business here. */
#mega-menu-wrap-topbar #mega-menu-topbar li.mega-menu-column > ul.mega-sub-menu > li.mega-menu-item:not(.asta-menu-chip):not(.mega-cta-anchor-link):not(.cta-anchor-link) > a.mega-menu-link,
#mega-menu-wrap-topbar #mega-menu-topbar li.mega-menu-column > ul.mega-sub-menu > li.mega-menu-item:not(.asta-menu-chip):not(.mega-cta-anchor-link):not(.cta-anchor-link) > a.mega-menu-link span.mega-menu-title {
  color: var(--asta-panel-accent) !important;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

#mega-menu-wrap-topbar #mega-menu-topbar .cta-anchor-row a.mega-menu-link,
#mega-menu-wrap-topbar #mega-menu-topbar .mega-cta-anchor-row a.mega-menu-link,
#mega-menu-wrap-topbar #mega-menu-topbar a.mega-cta-anchor-link {
  color: var(--wp--preset--color--secondary, #3b82f6) !important;
  font-weight: 700 !important;
}

/*
 * Descriptions are inline, and only where the label is an abbreviation.
 *
 * 2026-10-20 (owner): a description on its own second line doubled the height of
 * every Referate row. It now sits on the same line, after an en dash, in the same
 * description style (12px, 72% white). Only the seven entries whose label is an
 * abbreviation carry one — the class `asta-desc` is set on those menu items (DE
 * and EN), so the choice lives in the menu, not in a title match here.
 */
#mega-menu-wrap-topbar #mega-menu-topbar ul.mega-sub-menu span.mega-menu-description {
  display: none;
}

#mega-menu-wrap-topbar #mega-menu-topbar li.asta-desc > a.mega-menu-link span.mega-menu-description {
  display: inline;
}

/* MMM wraps title and description in one span; making it a row puts them on the
   same line and lets the smaller text sit on the title's baseline. */
#mega-menu-wrap-topbar #mega-menu-topbar ul.mega-sub-menu span.mega-description-group {
  display: inline-flex;
  align-items: baseline;
  gap: 0.5em;
  max-width: 100%;
}

#mega-menu-wrap-topbar #mega-menu-topbar li.asta-desc > a.mega-menu-link span.mega-menu-description::before {
  content: "– ";
}

/* Panel: a centred 1200px card instead of a full-bleed 1440px band. The shipped
   panel measured 1440x1086 + 66px header = 1152px against a ~900px viewport, so
   its bottom rows were unreachable without scrolling inside the panel; this
   brings it to 1200x635. */
@media (min-width: 768px) {
  /* All five panels are 1200px cards, so they have to centre on the page and not
     on the 534px pill (grid panels) or on their own item (the two flyouts, which
     overflowed the viewport right edge by 526px). Making the wrapper and the
     top-level flyout items static hands the panels' containing block to the
     sticky header, which is the viewport width; `left/right: 0` +
     `margin-inline: auto` then centres them, and `top: 100%` means "below the
     header". Max Mega Menu writes the panel's `left` inline and keeps flyout
     items `position: relative`, hence `!important`. */
  #mega-menu-wrap-topbar,
  #mega-menu-wrap-topbar #mega-menu-topbar,
  #mega-menu-wrap-topbar #mega-menu-topbar > li.mega-menu-flyout {
    position: static !important;
  }
}

#mega-menu-wrap-topbar #mega-menu-topbar > li.mega-menu-megamenu > ul.mega-sub-menu {
  box-sizing: border-box;
  /* pathway-08 §4: 18px below the 66px header (`.mm-wrap` padding-top), i.e. the
     panel starts at y=84. It used to start on the bar's own bottom edge, which
     fused bar and panel into one shape and hid the bar's bottom corners. */
  top: calc(100% + 18px);
  left: 0 !important;
  right: 0 !important;
  max-width: 1200px;
  margin-inline: auto;
  padding: 32px;
  border-top: 0;
  border-radius: 12px;
}

/* pathway-22 §2.2 (M1): 34 px minimum on a 20 px line left 13.7 px of dead space
   per row, over 17 rows — the AStA panel grew to 741 px and was clipped by 58 px
   at 1366 × 768 and by 104 px at 1280 × 720. 26 px is still above the WCAG 2.2
   target size of 24 px and brings that panel to ~613 px. */
#mega-menu-wrap-topbar #mega-menu-topbar ul.mega-sub-menu li.mega-menu-item > a.mega-menu-link {
  min-height: 26px;
  padding: 3px 10px;
  border-radius: 8px;
  font-size: 14.5px;
  line-height: 1.3;
}

/* pathway-22 §2.2 (M1g): at 1024 × 720 a row wraps instead of shrinking and the
   AStA panel grows to 838 px, which no line height fixes. Rather than run off the
   screen it scrolls inside itself. Desktop only — below 769px Max Mega Menu
   renders an accordion whose rows must stay finger-sized. */
@media (min-width: 769px) {
  #mega-menu-wrap-topbar #mega-menu-topbar > li.mega-menu-megamenu > ul.mega-sub-menu {
    max-height: calc(100vh - 6rem);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}

/* The CTA capsule reuses the header language-switcher shape (999px). It is scoped
   to the AStA panel's CTA, which is NOT a .cta-anchor-row — it is
   li.mega-menu-item-asta-cta-link-<id>. The other panels' .cta-anchor-row CTAs
   keep their existing blue-link treatment: restyling them was never part of the
   approved design, and the mobile contract asserts that colour. */
#mega-menu-wrap-topbar #mega-menu-topbar li[class*="asta-cta-link"] > a.mega-menu-link {
  display: inline-flex;
  height: 44px;
  align-items: center;
  padding: 0 20px;
  border-radius: 999px;
  background: var(--wp--preset--color--primary);
  color: var(--asta-panel-ink) !important;
  font-size: 14.5px;
  font-weight: 700;
}

/*
 * The pill's label was blue on violet: 1.93:1 (WCAG 1.4.3 needs 4.5:1).
 *
 * `li.cta-anchor-row li.cta-anchor-link > a.mega-menu-link` declares the blue with
 * `!important` and a higher specificity than the pill rule above (2 ids + three
 * classes versus 2 ids + one attribute), so the white never won. All five panel
 * CTAs carry `mega-menu-item-asta-cta-link-<id>`, which means all five are pills —
 * the blue "link treatment" the older comment describes cannot coexist with a
 * violet background.
 *
 * This selector repeats the blue rule's classes and adds the pill marker, so it
 * outranks it. White on #6D28D9 measures 7.10:1.
 */
#mega-menu-wrap-topbar #mega-menu-topbar li.cta-anchor-row li.cta-anchor-link[class*="asta-cta-link"] > a.mega-menu-link {
  color: #ffffff !important;
}

#mega-menu-wrap-topbar #mega-menu-topbar li.cta-anchor-row li.cta-anchor-link[class*="asta-cta-link"] > a.mega-menu-link:hover,
#mega-menu-wrap-topbar #mega-menu-topbar li.cta-anchor-row li.cta-anchor-link[class*="asta-cta-link"] > a.mega-menu-link:focus {
  color: #ffffff !important;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* Max Mega Menu's generated sheet sets `a.mega-menu-link { display: block }`
   with enough specificity to beat the shared capsule rule above, which left the
   AStA CTA a 1106px-wide pill with no horizontal padding. These declarations are
   !important for the same reason the text-colour overrides are. */
#mega-menu-wrap-topbar #mega-menu-topbar li[class*="asta-cta-link"] > a.mega-menu-link {
  display: inline-flex !important;
  width: auto !important;
  box-sizing: border-box;
  align-items: center;
  height: 44px !important;
  padding: 0 20px !important;
  border-radius: 999px !important;
  background: var(--wp--preset--color--primary) !important;
  color: var(--asta-panel-ink) !important;
  font-size: 14.5px !important;
  font-weight: 700 !important;
}

#mega-menu-wrap-topbar #mega-menu-topbar li[class*="asta-cta-link"] {
  text-align: right;
}

/* A4: Focus indicators (2px outline, offset) */
a:focus-visible,
a.asta-header-search-btn:focus,
a.asta-header-search-btn:focus-visible,
.asta-header-search-btn:focus,
.asta-header-search-btn:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--wp--preset--color--secondary) !important;
  outline-offset: 2px !important;
}

#mega-menu-wrap-topbar.mega-keyboard-navigation a:focus,
#mega-menu-wrap-topbar.mega-keyboard-navigation .mega-menu-toggle:focus,
#mega-menu-wrap-topbar.mega-keyboard-navigation button:focus {
  outline: 2px solid var(--wp--preset--color--secondary) !important;
  outline-offset: 2px !important;
}

/* Fluent Forms and the mobile search panel have more specific focus rules. */
.ff-el-form-control:focus,
.ff-btn-submit:focus,
[data-asta-mobile-search-toggle]:focus {
  outline: 2px solid var(--wp--preset--color--secondary) !important;
  outline-offset: 2px !important;
}

/* C-03: FluentForm submit button — plugin-level override (parent:
   dev-asta-gwyneth/app/public/wp-content/plugins/fluentform/assets/css/
   fluentform-public-default.css lines 13–16: #007bff / #fff fails 2.78:1).
   Child override per F-05/2.6 idiom — minimal, no parent edit. */
.ff-btn.ff-btn-submit,
.ff-default .ff-btn-primary:not(.ff_btn_no_style) {
  background-color: var(--wp--preset--color--primary) !important;
  border-color: var(--wp--preset--color--primary) !important;
  color: var(--wp--preset--color--base-alt) !important;
}

/* A3: Footer zones and social links */
/* pathway-08 §6 (2026-10-20): a token-native dark band.
   The previous version redefined --wp--preset--color--contrast and --base to
   stay dark, which silently re-coloured any nested component that inherited
   them — the same mechanism as the mega-menu contrast bug (C-23). It now binds
   the same scheme-stable pair the header defines on itself (.asta-site-header
   also uses literals), so no preset token changes meaning inside the footer.
   The selector carries .wp-block-group because WordPress' has-global-padding
   sets the group's padding with higher specificity than a bare class. */
.wp-block-group.asta-footer-three {
  --asta-footer-background: #0f0d1a;
  --asta-footer-foreground: #ffffff;
  /* C-14 kept without the token swap: headings resolve through the accent that
     already measures 6.27:1 on this surface (same value as the mega-menu label). */
  --asta-heading-color: #a78bfa;
  position: relative;
  box-sizing: border-box;
  background-color: var(--asta-footer-background);
  color: var(--asta-footer-foreground);
  /* px, not rem: the root font is fluid (17.72px at 1440), so 2.75rem rendered
     48.7px and 1.375rem 24.4px against a design of 44 and 22. */
  padding: 44px var(--wp--preset--spacing--content) 22px;
  padding-bottom: 22px !important;
  font-size: 14px;
  line-height: 1.5;
  /* WordPress spaces the heading and the list by the block gap, which measured
     28.7px here against a designed 12 — it was making the legal column the
     tallest and pushing the copyright below the contact line. */
  --wp--style--block-gap: 12px;
}

.asta-footer-three__columns {
  align-items: flex-start;
  justify-content: space-between;
}

.asta-footer-three__zone {
  min-width: 0;
}

.asta-footer-three__zone--kontakt { flex: 0 1 30rem; }
.asta-footer-three__zone--folgen,
.asta-footer-three__zone--rechtliches { flex: 0 1 21.25rem; }

/* One heading treatment for all three zones. Measured before: Kontakt rendered
   1.25rem against 1rem for the other two, contradicting the DOM where all three
   are <h2>. The uppercase 12px label is the one the approved mega-menu uses. */
.asta-footer-three .asta-footer-three__zone h2 {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.09em;
  line-height: 1.6;
  text-transform: uppercase;
}

.asta-footer-contact p {
  margin: 0 0 4px;
  font-size: 14px;
  line-height: 1.5;
}

.asta-footer-contact p:last-child { margin-bottom: 0; }
.asta-footer-contact__name { font-weight: 700; }
.asta-footer-contact__address,
.asta-footer-contact__hours { opacity: 0.8; }
.asta-footer-contact__email a { color: inherit; }
/* The phone link was the one footer link without an inherit rule, so it kept
   the palette `link` token (#2563EB) on the #0F0D1A footer: 3.72:1, measured on
   every page at 390px in both schemes. The footer surface is scheme-stable, so
   inherit is correct here for the same reason it already was for the email. */
.asta-footer-contact__phone a { color: inherit; }

.asta-footer-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 6px;
  font-size: 14px;
}

/* C-06 keeps its 24px target-size floor. */
.asta-footer-links li a,
.asta-footer-three__zone li a {
  display: inline-block;
  min-height: 24px;
  /* 24px, not the inherited 1.5 line-height: the rows measured 27px and made the
     legal column taller than the contact column. */
  line-height: 24px;
  color: inherit;
  text-decoration: none;
}

.asta-footer-links li a:hover,
.asta-footer-links li a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.asta-footer-three .asta-social-links { gap: 10px; }

.asta-footer-three .asta-social-link {
  align-items: center;
  color: inherit;
  display: inline-flex;
  gap: 10px;
  text-decoration: none;
}

.asta-footer-three .asta-social-link:hover,
.asta-footer-three .asta-social-link:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.asta-footer-three .asta-social-icon {
  display: inline-flex;
  flex: 0 0 auto;
  height: 18px;
  width: 18px;
}

.asta-footer-three .asta-social-icon svg {
  height: 100%;
  width: 100%;
}

/* The copyright shares the contact email's line: absolutely positioned so it
   adds no height of its own, bottom-anchored to the padding edge. The footer's
   height is therefore the tallest column plus 22px, not columns plus a band. */
.asta-footer-three__copyright {
  margin: 10px 0 0;
  font-size: 13px;
  line-height: 1.6;
  opacity: 0.72;
  text-align: center;
}

/* Footer office hours: override parent theme details background; ensure bright text on dark footer */
.asta-footer-three details.asta-footer-hours-details,
details.asta-footer-hours-details {
  background: transparent !important;
  background-color: transparent !important;
  border: none !important;
  padding: 0 !important;
  margin: 0 !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

/* The footer band is dark in both schemes and pins its own foreground literal,
   so its dark twins resolve through that token (identical #ffffff) instead of
   adding another literal. */
html.asta-theme-dark body .asta-footer-three details.asta-footer-hours-details,
html.asta-theme-dark body details.asta-footer-hours-details {
  background-color: transparent !important;
  color: var(--asta-footer-foreground) !important;
}

.asta-footer-three details.asta-footer-hours-details summary {
  color: #ffffff !important;
  background: transparent !important;
}

html.asta-theme-dark body .asta-footer-three details.asta-footer-hours-details summary {
  background-color: transparent !important;
  color: var(--asta-footer-foreground) !important;
}

.asta-footer-three .asta-footer-hours,
.asta-footer-three table.asta-footer-hours {
  background: transparent !important;
  background-color: transparent !important;
  color: #ffffff !important;
  border: none !important;
}

html.asta-theme-dark body .asta-footer-three .asta-footer-hours,
html.asta-theme-dark body .asta-footer-three table.asta-footer-hours {
  background-color: transparent !important;
  color: var(--asta-footer-foreground) !important;
}

.asta-footer-three .asta-footer-hours th,
.asta-footer-three .asta-footer-hours td {
  background: transparent !important;
  background-color: transparent !important;
  color: #ffffff !important;
  border: none !important;
  padding: 2px 10px 2px 0;
}

html.asta-theme-dark body .asta-footer-three .asta-footer-hours th,
html.asta-theme-dark body .asta-footer-three .asta-footer-hours td {
  background-color: transparent !important;
  color: var(--asta-footer-foreground) !important;
}

.asta-footer-three .asta-footer-hours th {
  color: #a78bfa !important;
  font-weight: 700;
}

html.asta-theme-dark body .asta-footer-three .asta-footer-hours th {
  background-color: transparent !important;
  color: var(--asta-heading-color) !important;
}

.asta-footer-three .asta-footer-contact__hours,
.asta-footer-three .asta-footer-contact__hours strong {
  color: #ffffff !important;
}

html.asta-theme-dark body .asta-footer-three .asta-footer-contact__hours,
html.asta-theme-dark body .asta-footer-three .asta-footer-contact__hours strong {
  color: var(--asta-footer-foreground) !important;
}

@media (min-width: 768px) {
  details.asta-footer-hours-details summary {
    display: none !important;
  }
}

@media (max-width: 767px) {
  .wp-block-group.asta-footer-three {
    padding: 24px var(--wp--preset--spacing--content) 16px;
    padding-bottom: 16px !important;
  }

  details.asta-footer-hours-details {
    margin: 6px 0;
  }

  summary.asta-footer-hours-summary {
    cursor: pointer;
    color: var(--asta-panel-accent, #a78bfa);
    font-size: 0.85rem;
    padding: 4px 0;
    list-style: none;
  }

  summary.asta-footer-hours-summary::-webkit-details-marker {
    display: none;
  }

  .asta-footer-three .asta-footer-contact__hours {
    display: none !important;
  }

  .asta-footer-three__columns {
    gap: 1.25rem !important;
  }

  /* Compact social link pills on mobile */
  .asta-footer-three__zone--folgen ul.asta-social-links {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: wrap !important;
    gap: 8px !important;
  }

  .asta-footer-three__zone--folgen a.asta-social-link {
    padding: 6px 12px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    border-radius: 999px !important;
    font-size: 13px !important;
  }

  /* Compact awareness block on mobile */
  .asta-footer-three .asta-footer-awareness {
    margin-top: 10px !important;
    padding: 8px 12px !important;
    border-radius: 8px !important;
    font-size: 13px !important;
  }

  .asta-footer-three .asta-footer-awareness__text {
    margin: 4px 0 0 !important;
    font-size: 12px !important;
  }

  /* Streamlined legal links row: avoid redundant Impressum (already in bottom nav) */
  .asta-footer-three__zone--rechtliches h2 {
    display: none !important;
  }

  .asta-footer-three__zone--rechtliches ul.asta-footer-links {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 8px 14px !important;
    align-items: center !important;
  }

  .asta-footer-three__zone--rechtliches li:has(a[href*="impressum"]),
  .asta-footer-three__zone--rechtliches li:has(a[href*="legal-notice"]) {
    display: none !important;
  }

  .asta-footer-three__zone--rechtliches li a,
  .asta-footer-three__zone--rechtliches li button {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 13px !important;
  }

  html.asta-theme-dark body .asta-footer-three__zone--rechtliches li a,
  html.asta-theme-dark body .asta-footer-three__zone--rechtliches li button {
    background-color: transparent;
    color: rgba(255, 255, 255, 0.8) !important;
  }

  /* Docked cookie button in footer */
  .asta-footer-three .asta-footer-cookie-btn {
    display: inline-block;
    min-height: 24px;
    line-height: 24px;
    padding: 0;
    margin: 0;
    background: transparent !important;
    border: none !important;
    color: inherit !important;
    font: inherit;
    font-size: 13px;
    cursor: pointer;
    text-decoration: none;
  }

  .asta-footer-three .asta-footer-cookie-btn:hover,
  .asta-footer-three .asta-footer-cookie-btn:focus-visible {
    text-decoration: underline;
    text-underline-offset: 0.2em;
    outline: none;
  }

  /* Hide generic floating tab completely on mobile and desktop */
  #cmplz-manage-consent {
    display: none !important;
  }

  /*
   * The parent's accessibility module pads the last group of a
   * .has-mobile-padding-bottom container by 8em (measured: 128px) so content
   * clears a fixed mobile bar. This theme already reserves exactly that space on
   * the body (body { padding-bottom: 72px } against the 72px fixed bottom nav),
   * so the footer was carrying 128px of dead space on top of it. The selector
   * mirrors the parent's specificity plus one class so the override wins.
   */
  body .has-mobile-padding-bottom > .wp-block-group.asta-footer-three {
    padding-bottom: 20px !important;
  }
}

@media (min-width: 768px) {
  .asta-footer-three__copyright {
    position: absolute;
    right: var(--wp--preset--spacing--content);
    /* 22px puts the copyright's bottom exactly on the contact email's bottom
       (the padding edge), which is what "same line" means here. px, not rem:
       1.375rem resolved to 24.4px and sat 2px below the line. */
    bottom: 22px;
    left: var(--wp--preset--spacing--content);
    margin: 0;
  }
}

/* C-06: EN carousel dot target-size fix (module-level; ≥24px touch target,
   WCAG 2.5.8; regression: must not shift mobile bottom nav / MMM panel). */

/* C-02: primary-background button links received the parent auto-contrast text
   token (black on #6D28D9 = 2.96:1, fails WCAG 1.4.3 in both schemes). Bind the
   text to a palette token instead of a literal colour. */
.wp-block-button__link.has-primary-background-color {
  color: var(--wp--preset--color--base-alt) !important;
}

/* Default blue block buttons do not meet text contrast; retain editor-selected colours. */
.wp-block-file .wp-block-file__button:not(.has-background):not(.has-text-color):not([style*="background"]):not([style*="color"]),
.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.is-style-outline):not(.has-background):not(.has-text-color):not([style*="background"]):not([style*="color"]) {
  color: #fff;
  background-color: #5b21b6;
}

/* The dark twin restates the fill through the palette instead of the
   hand-darkened #5b21b6: white on `primary` measures the same 7.1:1. */
html.asta-theme-dark body .wp-block-file .wp-block-file__button:not(.has-background):not(.has-text-color):not([style*="background"]):not([style*="color"]),
html.asta-theme-dark body .wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.is-style-outline):not(.has-background):not(.has-text-color):not([style*="background"]):not([style*="color"]) {
  background-color: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--contrast);
}

.wp-block-file .wp-block-file__button:not(.has-background):not(.has-text-color):not([style*="background"]):not([style*="color"]):hover,
.wp-block-button:not(.is-style-outline) .wp-block-button__link:not(.is-style-outline):not(.has-background):not(.has-text-color):not([style*="background"]):not([style*="color"]):hover {
  background-color: #4c1d95;
  opacity: 1;
}

/* C-08: the parent global.css `details` rule paints every details surface with
   --wp--custom--details--color--background (a light tint) and white text. Inside
   the always-dark header the toggle must sit on the header surface; keep the
   existing white summary colour and drop the tinted panel (was 1.1:1). */
.asta-site-header .asta-dark-toggle .wp-block-details {
  background-color: transparent !important;
}

/* C-19: WCAG 2.5.8 minimum target size, mobile only. These inline links measured
   15-21px tall at mobile widths; `inline-block` plus a 24px minimum makes them
   clickable without shifting the desktop layout.

   The `.asta-language-bar` rules that used to live above this block were removed
   on 2026-10-23: the Polylang block replaced that bar, so neither the markup nor
   the class appeared in any rendered page (0 hits across 7 page types, 0 source
   references). */
@media (max-width: 767px) {
  .asta-header-site-title a,
  .asta-footer-three a,
  .wp-block-post-content a,
  .wp-block-read-more,
  .wp-block-post-excerpt__more-link,
  .wp-block-post-title a,
  .wp-block-post-template .wp-block-heading a,
  .taxonomy-category a,
  .wp-block-post-date a,
  .cmplz-link {
    display: inline-block;
    min-height: 24px;
    padding-block: 2px;
  }
}

/*
 * pathway-06: the bento and the Telegram card share the row, 3fr to 1fr
 * (draft line 64). Below 900px it collapses to one column and the card sits under
 * the tiles.
 *
 * The row and the section heading use the theme's *wide* size (1200), not its
 * content size (960). WordPress constrains every child of a `constrained` group
 * to `contentSize`, which left the bento at 687px once the card took its quarter
 * -- 165px tiles and a headline that needed ten lines. The Schnellzugriff strip
 * directly above is already 1200, so this also lines the two sections up.
 */
.asta-aktuelles > .asta-aktuelles__layout,
.asta-aktuelles > h2 {
  max-width: var(--wp--style--global--wide-size, 1200px);
  margin-inline: auto;
}

.asta-aktuelles__layout {
  display: grid;
  grid-template-columns: 3fr 1fr;
  align-items: stretch;
  gap: 1rem;
}

/*
 * pathway-06 geometry: three tracks with the feature spanning both rows, so the
 * five tiles fill 3 x 2 exactly and leave no hole.
 *
 * The previous two-track layout put the feature across the full first row and the
 * other four in a 2 x 2 below it. That has no grid hole, but a tile whose
 * neighbour carries a 16:9 image gets stretched to the same height and shows a
 * few hundred pixels of empty card — the gap this replaces.
 */
/*
 * pathway-06 geometry, adapted for white cards.
 *
 * The draft (lines 64-70) is `grid-template-columns: 2fr 1fr 1fr` with the
 * emphasis tile spanning two ROWS in the first column -- a tall feature, not a
 * wide banner. Five tiles fill that grid exactly: feature in column 1 across both
 * rows, four tiles in columns 2-3. With the draft's four tiles the bottom-right
 * cell would stay empty.
 *
 * `align-items: start` stops a tile from being stretched to a taller neighbour,
 * which is what once produced a several-hundred-pixel empty card in the corner.
 */
.asta-news-bento {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  align-items: stretch;
  gap: 0.75rem;
}

.asta-news-bento__tile {
  min-width: 0;
  height: 100%;
  box-sizing: border-box;
  padding: 1.25rem;
  border: 1px solid var(--wp--preset--color--contrast);
  border-radius: 0.5rem;
  background-color: var(--wp--preset--color--base);
  color: var(--wp--preset--color--contrast);
}

.asta-news-bento__tile {
  display: flex;
  flex-direction: column;
  /*
   * Content sits together at the top instead of being pinned to both ends.
   * `space-between` pushed the date to the top and the title to the bottom, which
   * in a row whose height is set by a taller neighbour (an image tile) left a
   * large empty hole in the middle of every short tile. Rows keep their tidy
   * equal height; only the internal distribution changed.
   */
  justify-content: flex-start;
  gap: 0.35rem;
}

/* Phase 2, task 7: the hero's third action is a link rather than a third button,
   so the hero fits the first screen at 390px. A link still needs a usable target
   (WCAG 2.5.8), hence the padding and the explicit minimum height, and it must
   stay legible on the cover's dark overlay in both schemes. */
.asta-hero-tertiary a {
  display: inline-block;
  min-height: 44px;
  padding: 0.5rem 0.25rem;
  color: var(--wp--preset--color--base-alt);
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.asta-hero-tertiary a:focus-visible {
  outline: 2px solid var(--wp--preset--color--secondary);
  outline-offset: 2px;
}

/* Phase 2, task 5: the Schnellzugriff cards were six across in a 1200px row,
   which leaves 185px per card. Raising the card titles above the body size (the
   agreed typography fix) cannot fit a German compound noun in 185px, so the grid
   widens instead of the type shrinking back below body: three across on desktop,
   two on tablet, one on mobile. Hyphenation is kept as a safety net for any
   future long label. */
/*
 * pathway-06: six tracks, centred cards.
 *
 * The section shipped as the WordPress columns default -- three tracks of 388px
 * -- so each card held one icon and one short line inside a 388x257 box that read
 * as empty. The draft puts all six in one row, centred, with the icon in a 40px
 * violet tile. Six tracks at 1200 gives 190px cards, which is what makes the row
 * read as a quick-access strip rather than six panels.
 */
.asta-service-icon-grid .wp-block-columns {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 0.7rem;
}

.asta-service-icon-grid .wp-block-column {
  margin: 0;
}

.asta-service-icon-grid .asta-service-card {
  /* `height: 100%` so all six share the tallest card's height. Without it the
     row ends ragged, which on a strip of six reads as a mistake rather than as
     content of different length. */
  position: relative;
  display: flex !important;
  flex-direction: column !important;
  align-items: center !important;
  justify-content: center !important;
  text-align: center !important;
  height: 100%;
  padding: 1.25rem 0.65rem !important;
  border-radius: 12px !important;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
  background-color: var(--wp--preset--color--base-alt, #ffffff) !important;
  border: 1px solid rgba(109, 40, 217, 0.08) !important;
  box-shadow: 0 4px 12px rgba(109, 40, 217, 0.04);
}

.asta-service-icon-grid .asta-service-card h3 {
  width: 100%;
  text-align: center !important;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2lh;
  margin-top: 0;
  margin-bottom: 0.35rem;
}

.asta-service-icon-grid .asta-service-card h3 a {
  text-align: center !important;
  text-decoration: none;
}

.asta-service-icon-grid .asta-service-card h3 a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 12px;
  z-index: 2;
}

.asta-service-icon-grid .asta-service-card:has(h3 a:focus-visible) {
  outline: 2px solid var(--wp--preset--color--secondary) !important;
  outline-offset: 2px !important;
}

.asta-service-icon-grid .asta-service-card:hover {
  transform: translateY(-2px);
  border-color: var(--wp--preset--color--primary, #6d28d9) !important;
  box-shadow: 0 8px 20px rgba(109, 40, 217, 0.12);
}

html.asta-theme-dark .asta-service-icon-grid .asta-service-description {
  color: #ded9f2;
}

html.asta-theme-dark .asta-service-icon-grid .asta-service-card {
  background-color: #242038 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

html.asta-theme-dark .asta-service-icon-grid .asta-service-card:hover {
  background-color: #2D2845 !important;
  border-color: rgba(167, 139, 250, 0.5) !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
}

/*
 * The icon tile is solid violet with a white glyph, per the draft. It is
 * decorative, so the label below it carries the meaning.
 */
.asta-service-icon-grid .asta-service-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  margin: 0 auto 0.6rem;
  border-radius: 10px;
  background: var(--wp--preset--color--primary, #6d28d9);
  /* White glyph ink on the violet tile, as the comment above says. A second
     `color: var(--wp--preset--color--primary)` used to follow and win, making ink
     and fill the same colour — invisible, and only harmless because the `svg`
     rule below pins `stroke: #fff`. Tokenising that stroke would have exposed it,
     so the declaration is gone rather than left as a trap. The literal stays: a
     hard-coded violet tile needs an absolute white in every scheme, and
     `base-alt` is #F5F3FF once the theme flips the palette for dark mode. */
  color: #fff;
}

.asta-service-icon-grid .asta-service-icon svg {
  display: block;
  width: 1.375rem;
  height: 1.375rem;
  /* A presentation attribute, `stroke="currentColor"` on the <svg>, loses to any
     colour rule on the paragraph -- and one does set violet here, which painted
     a violet glyph on a violet tile. Setting the stroke on the element itself is
     the one place nothing else competes. */
  stroke: #fff;
}

@media (prefers-color-scheme: dark) {
  /* The tile keeps its violet fill in dark mode; only the surrounding card
     changes, and white on #6D28D9 measures 7.1:1 either way. Gated on the class
     for the same reason as the consent banner: unguarded, a forced-light choice
     under an OS dark preference painted #0F0D1A on this #7C3AED fill — 3.37:1
     instead of 5.70:1. Forced light now resolves the tile exactly as light mode
     does. */
  html:not(.asta-theme-light) .asta-service-icon-grid .asta-service-icon {
    background: #7c3aed;
    color: var(--wp--preset--color--contrast);
  }
}

/* The manual toggle never enters the media query, so the tile carries its own
   dark rule. It resolves through the primary token rather than the media
   block's #7c3aed: same 7.1:1 tile, one palette colour instead of a literal. */
html.asta-theme-dark body .asta-service-icon-grid .asta-service-icon {
  background-color: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--contrast);
}

.asta-service-icon-grid .asta-service-description {
  /* The card's background flips to #242038 in dark mode while the paragraph
     inherited #000000 from the wrapping group: 1.33:1. axe flagged all six
     service descriptions on both pathway pages. Colour is now explicit per
     scheme instead of inherited. */
  color: #3f3a52;
  width: 100%;
  text-align: center !important;
  hyphens: none !important;
  -webkit-hyphens: none !important;
  overflow-wrap: normal !important;
  word-break: normal !important;
  text-wrap: balance;
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.4;
}

/*
 * Reserve two lines for the label.
 *
 * "Beratung & Hilfe" is the one label that wraps six-across, so its heading
 * measured 53px against 27px in the other five and pushed its description 26px
 * lower -- the row read as misaligned although every card was the same height.
 * Reserving exactly two line-heights puts all six descriptions on one baseline.
 */
.asta-service-icon-grid .asta-service-card h3 {
  min-height: 2lh;
}

.asta-service-icon-grid h3,
.asta-service-icon-grid h4 {
  /* The parent sets `break-word` on headings, which split "Semesterticket" as
     "Semeste / rticket" once the type grew. Hyphenation breaks it correctly. */
  overflow-wrap: normal;
  hyphens: auto;
  -webkit-hyphens: auto;
}

/* Six 190px cards need the full 1200. Below it the row drops to three, then two,
   then one, so a label never has to hyphenate to fit. */
@media (max-width: 1180px) {
  .asta-service-icon-grid .wp-block-columns {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 780px) {
  .asta-service-icon-grid .wp-block-columns {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 460px) {
  .asta-service-icon-grid .wp-block-columns {
    grid-template-columns: minmax(0, 1fr);
  }
}

/*
 * The emphasis tile is the tall one in the draft: two rows, one column.
 * `align-self: stretch` is what makes it fill both rows -- the grid's
 * `align-items: start` sizes the other tiles to their own content, which is what
 * they need, but a spanning tile would otherwise stay one cell tall.
 */
.asta-news-bento__tile--feature {
  grid-row: span 2;
  grid-column: auto;
  align-self: stretch;
}

/*
 * R-40: no picture anywhere in the five tiles. The two `1fr` rows otherwise split
 * the Telegram card's height, which measured 680 px per row with ~120 px of
 * content in each. Text-only, the rows take their content height and the grid
 * packs from the top; the feature still spans both rows, so the column bottoms
 * stay flush.
 */
.asta-news-bento--text-only {
  /*
   * Without an image the 2fr/1fr/1fr split gave the text columns 201 px each,
   * and a job-ad title wrapped to six or seven lines (measured: a 680 px tile
   * holding a 240 px title). Equal thirds keep the five tiles compact.
   */
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-template-rows: min-content min-content;
  align-content: start;
  align-items: start;
}

/* `height: 100%` on the tile is what stretched each row to the Telegram card's
   height; without an image there is no fixed-ratio child to justify it. */
.asta-news-bento--text-only .asta-news-bento__tile {
  height: auto;
}

.asta-news-bento__image {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  margin-bottom: 0.75rem;
  border-radius: 0.375rem;
}

.asta-news-bento__category {
  align-self: flex-start;
  display: inline-block;
  margin-bottom: 0.5rem;
  padding: 0.15rem 0.6rem;
  border-radius: 999px;
  background-color: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--base-alt);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: uppercase;
}

.asta-news-bento__date {
  font-size: 0.875rem;
}

.asta-news-bento__title {
  margin: 0;
}

/*
 * The parent theme's global.css carries
 * `h3:not(:first-child) { margin-block-start: var(--wp--custom--spacing--heading) }`.
 * Specificity 0,1,1 beats the single-class reset above (0,1,0), so every tile
 * title inherited a 53px top margin and the tile looked like it had a hole in the
 * middle — that gap was the real cause, not the flex distribution. Two classes
 * outrank it.
 */
.asta-news-bento__tile .asta-news-bento__title {
  margin-block-start: 0;
}

.asta-news-bento__title {
  font-size: clamp(1.125rem, 1.6vw, 1.5rem);
  line-height: 1.3;
}

.asta-news-bento__tile--feature .asta-news-bento__title {
  font-size: clamp(1.375rem, 2.2vw, 2rem);
}

.asta-news-bento__link {
  display: block;
  min-height: 44px;
  color: var(--wp--preset--color--contrast);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/*
 * WCAG 1.4.10 (Reflow): nothing may scroll sideways at 320px.
 *
 * Two offenders measured on the accessibility statement at that width:
 *
 *   - the page-header cover image is absolutely positioned and keeps its natural
 *     400px width, so it pushed the document 22px wide even though it is clipped;
 *   - `schlichtungsstelle@ms.niedersachsen.de` is a single 299px token with no
 *     break opportunity, inside a 320px viewport.
 *
 * `overflow-wrap: anywhere` is used rather than `break-all`: it only breaks when
 * the word genuinely does not fit, so normal prose is unaffected.
 */
.wp-block-cover__image-background {
  max-width: 100%;
}

/*
 * Reading measure (typography, not WCAG).
 *
 * Measured before this rule on the referat page: the content column is 960px at a
 * 22px body size, so paragraphs ran 88 / 94 / 99 characters per line. The
 * comfortable range is roughly 45-75; 960px is simply too wide for this type
 * scale. The value is relative to the wrapper's own font size (18.8px here, not
 * the 22px of a paragraph), so `39em` resolves to ~733px — measured 62-72
 * characters per line — and scales with the clamp at every viewport.
 *
 * Applied to the content wrapper rather than to `p` alone: narrowing the text but
 * leaving headings, lists and media at full width produces a ragged column, and
 * centring one but not the other reads as a mistake.
 *
 * `body:not(.home)` matters: the front page is a page too, so its sections live
 * inside `.wp-block-post-content` and the measure narrowed the whole Aktuelles
 * bento from 1200px to 748px (caught by the bento test).
 */
body:not(.home) .wp-block-post-content {
  max-width: 39em;
  margin-inline: auto;
}


.wp-block-post-content a[href^="mailto:"],
.asta-footer-three a[href^="mailto:"] {
  overflow-wrap: anywhere;
}

.asta-news-bento__link:focus-visible {
  outline: 3px solid var(--wp--preset--color--secondary);
  outline-offset: 3px;
}

/* The side-by-side split needs the full 1200. Below it the card goes under the
   tiles: at 1024 the split measured 678px of bento and 163px tiles. */
@media (max-width: 1099px) {
  .asta-aktuelles__layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .asta-aktuelles__layout > .asta-telegram {
    /* Stacked, the card is no longer competing for the row height, so it can be
       its natural height again. */
    max-height: none;
  }
}

/* Tablet: two tracks of ~340px instead of three of 170px, with the feature still
   tall on the left and the tiles wrapping beside and below it. */
@media (max-width: 900px) and (min-width: 601px) {
  .asta-news-bento {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 600px) {
  .asta-news-bento {
    grid-template-columns: minmax(0, 1fr);
    grid-auto-rows: minmax(9rem, auto);
  }

  .asta-news-bento__tile--feature {
    grid-row: auto;
    /* A column span would create an implicit second track in a 1-column grid,
       which is how the first version of this rule broke mobile: tiles rendered
       33px and 310px wide instead of 359px. */
    grid-column: auto;
  }
}

/* Unified Brand Hero Band (V10 Gradient System).
   Applies the signature AStA V10 gradient band across all service, department
   and homepage hero headers, eliminating the parent theme's fallback demo images (img-1 / img-2). */
.is-style-page-header .is-blur-wrapper {
  display: none !important;
}

/*
 * Only the cover's own background image, i.e. the demo fallback. The bare
 * `img` selector this replaces also matched `figure.wp-block-post-featured-image
 * img`, the department logo the intro pattern prints in the second column, so
 * every department page lost its logo: measured 2026-11-09, display:none on
 * 20 of 21 routes, and the column collapsed to 0 px height.
 */
.is-style-page-header .wp-block-cover.has-fallback-image > img,
.is-style-page-header .wp-block-cover.has-fallback-image .wp-block-cover__image-background {
  display: none !important;
}

header.is-style-page-header,
.is-style-page-header .wp-block-cover,
.is-style-page-header .wp-block-cover__background,
.is-style-page-header .wp-block-group.has-primary-background-color,
.is-style-page-header .wp-block-cover.has-fallback-image {
  background-color: var(--wp--preset--color--surface) !important;
  background-image: linear-gradient(115deg, #1a1a2e 0%, #241046 52%, #3b0764 100%) !important;
  color: #ffffff;
}

/* The band is deliberately dark in both schemes. The dark twin restates the
   fill through the surface token and leaves the gradient in place, so the
   manual toggle produces the same pixels from the palette instead of a
   literal. */
html.asta-theme-dark body header.is-style-page-header,
html.asta-theme-dark body .is-style-page-header .wp-block-cover,
html.asta-theme-dark body .is-style-page-header .wp-block-cover__background,
html.asta-theme-dark body .is-style-page-header .wp-block-group.has-primary-background-color,
html.asta-theme-dark body .is-style-page-header .wp-block-cover.has-fallback-image {
  background-color: var(--wp--preset--color--surface) !important;
  color: var(--wp--preset--color--contrast);
}

header.is-style-page-header .wp-block-query-title,
header.is-style-page-header h1 {
  color: #ffffff !important;
}

html.asta-theme-dark body header.is-style-page-header .wp-block-query-title,
html.asta-theme-dark body header.is-style-page-header h1 {
  color: var(--wp--preset--color--contrast) !important;
}

/*
 * Heading sections word-wrap & hyphenation protection.
 * Prevents mid-word splitting on compound words and gendered asterisks
 * (e.g., 'Sprecher*innenkollektiv 2025/2026') across all page headers,
 * covers, and hero sections.
 */
.is-style-page-header h1,
.is-style-page-header h2,
.is-style-page-header .wp-block-post-title,
.is-style-page-header .wp-block-query-title,
header.is-style-page-header h1,
header.is-style-page-header h2,
header.is-style-page-header .wp-block-query-title,
.asta-hero-heading,
.wp-block-cover .asta-hero-heading,
.entry-header h1,
.entry-header .wp-block-post-title,
.page-header h1,
.asta-page-header h1 {
  hyphens: none !important;
  -webkit-hyphens: none !important;
  word-break: normal !important;
  overflow-wrap: normal !important;
  text-wrap: balance !important;
}

.is-style-page-header .wp-block-post-title,
.is-style-page-header h1 {
  font-size: clamp(1.85rem, 3.2vw, 3.15rem) !important;
  line-height: 1.18 !important;
}

.is-style-page-header .wp-block-cover {
  min-height: 240px;
}

body.asta-logo-header .is-style-page-header figure.wp-block-post-featured-image {
  margin: 0;
}

/* The band is the V10 gradient, identical in both colour schemes, so the mark
   stands on it without a plate. Measured under the figure the gradient runs
   from #1D1736 to #231144 — a flat dark band at ~16:1 for the white cut that
   inc/branding.php selects here. The white plate that ran between 2026-11-07
   and 2026-11-08 existed because the band was saturated purple; with the
   gradient it only boxed the mark in.

   The block emits width/height/object-fit as inline styles, so the override
   has to win on !important — there is no attribute-level hook. */
body.asta-logo-header .is-style-page-header figure.wp-block-post-featured-image {
  width: fit-content;
  max-width: min(100%, 26rem);
  margin: 0 auto;
  padding: 0 !important;
  background: transparent !important;
  border-radius: 0;
}

body.asta-logo-header .is-style-page-header figure.wp-block-post-featured-image img {
  display: block;
  width: auto !important;
  height: auto !important;
  max-width: min(100%, 21rem);
  max-height: 16rem;
  margin-inline: auto;
  object-fit: contain !important;
}

.asta-referate-section h2 {
  margin-bottom: 1.5rem;
  text-align: center;
}

.referate-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.ref-tile {
  min-width: 0;
}

.sq-box {
  position: relative;
  display: flex;
  width: 100%;
  aspect-ratio: 1 / 1;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border-radius: 10px;
  /* Option A2 (approved 2026-11-08): no container at all. Every department
     logo ships a scheme-appropriate artwork through the <picture> that
     inc/branding.php builds, so the tile has nothing to put behind it — it was
     already invisible, because `base` equals the page background in both
     schemes (#FFFFFF / #1A1A2E). The mark stands on the page. */
  background-color: transparent;
  color: inherit;
  text-decoration: none;
}

/* A <picture> or <span> wrapper must not become a layout box: the <img> stays the flex
   item it was before the wrapper existed. */
.asta-logo-picture {
  display: contents;
}

/* Department logo scheme switching (F-02).
   Light cut shows by default. Under dark mode (either OS prefers-color-scheme or
   the manual html.asta-theme-dark override), the dark cut displays instead. */
.asta-logo-picture .logo-img--dark {
  display: none;
}
.asta-logo-picture .logo-img--light {
  display: block;
}

@media (prefers-color-scheme: dark) {
  html:not(.asta-theme-light) .asta-logo-picture .logo-img--light {
    display: none;
  }
  html:not(.asta-theme-light) .asta-logo-picture .logo-img--dark {
    display: block;
  }
}

html.asta-theme-dark .asta-logo-picture .logo-img--light {
  display: none !important;
}
html.asta-theme-dark .asta-logo-picture .logo-img--dark {
  display: block !important;
}

html.asta-theme-light .asta-logo-picture .logo-img--dark {
  display: none !important;
}
html.asta-theme-light .asta-logo-picture .logo-img--light {
  display: block !important;
}

.sq-box:focus-visible {
  outline: 3px solid var(--asta-heading-color);
  outline-offset: 3px;
}

.sq-box img.logo-img {
  display: block;
  max-width: 84%;
  max-height: 84%;
  object-fit: contain;
}

.insta-fallback {
  display: flex;
  width: 100%;
  height: 100%;
  min-height: 44px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  color: var(--asta-heading-color);
  text-decoration: none;
}

.insta-fallback:focus-visible {
  box-shadow: inset 0 0 0 3px var(--asta-heading-color);
}

.insta-mark {
  display: grid;
  width: 34%;
  max-width: 3.5rem;
  place-items: center;
}

.insta-mark svg {
  display: block;
  width: 100%;
  height: auto;
}

.insta-handle {
  font-size: 0.72rem;
  font-weight: 700;
}

.name-fallback {
  display: flex;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-content: center;
  padding: 0.9rem;
  text-align: center;
}

.name-fallback span {
  color: var(--asta-heading-color);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.3;
}

.time-pill {
  position: absolute;
  right: 0.5rem;
  bottom: 0.5rem;
  display: inline-flex;
  min-height: 32px;
  align-items: center;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  background-color: var(--wp--preset--color--primary);
  box-shadow: 0 2px 6px rgba(15, 13, 26, 0.25);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

html.asta-theme-dark body .time-pill {
  background-color: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--contrast);
}

/* Metadata: Last updated timestamp badge (05 / C-12).
   Renders as a polite, muted metadata badge instead of inheriting large body size.
   The previous #6b7280 measured 3.98:1 on the pill's own painted surface
   (rgb(236,230,253)) — below the AA floor of 4.5:1 (R-50). `contrast` is the
   surface-aware ink token: near-black here (15.8:1) and white under
   prefers-color-scheme: dark, so the line stays legible in both paint paths.
   The dark rule below keeps its own mid-grey. */
p.post-modified-info {
  display: inline-flex;
  align-items: center;
  font-size: 0.8125rem !important;
  line-height: 1.4 !important;
  color: var(--wp--preset--color--contrast);
  margin-top: 0.25rem !important;
  margin-bottom: 1.5rem !important;
  padding: 0.2rem 0.6rem;
  border-radius: 6px;
  background: rgba(109, 40, 217, 0.06);
}

html.asta-theme-dark p.post-modified-info {
  background: rgba(255, 255, 255, 0.06);
  color: #9ca3af;
}

@media (max-width: 900px) {
  .referate-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .referate-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
  }
}

/* Phase 9.5: Events timeline. Mirrors the .asta-news-bento__tile card
   surface (background: base, border: contrast, 0.5rem radius) for visual
   consistency with the section above it; .asta-event-row's border-bottom is
   suppressed on the last list item so the divider lines sit only between
   rows, not after the final one. */
.asta-events-timeline {
  max-width: 720px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid var(--wp--preset--color--contrast);
  border-radius: 0.5rem;
  background-color: var(--wp--preset--color--base);
}

.asta-events-timeline .wp-block-post-template {
  margin: 0;
  padding: 0;
}

.asta-event-row {
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--wp--preset--color--contrast);
  color: var(--wp--preset--color--contrast);
}

.asta-events-timeline .wp-block-post-template > li:last-child .asta-event-row {
  border-bottom: none;
}

.date-badge {
  display: inline-flex;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  min-width: 4.5rem;
  padding: 0.3rem 0.65rem;
  border-radius: 999px;
  background-color: var(--wp--preset--color--primary);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  text-align: center;
  white-space: nowrap;
}

html.asta-theme-dark body .date-badge {
  background-color: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--contrast);
}

/* Flex items default to a min-width floor of their own content's unwrapped
   size, which pushes long titles past the row/container edge instead of
   wrapping. min-width: 0 lifts that floor so the title wraps within the
   space left by the fixed-width date badge, at any viewport width. */
.asta-event-row .wp-block-post-title {
  flex: 1 1 auto;
  min-width: 0;
}

.asta-event-row .wp-block-post-title a {
  display: inline-block;
  padding: 0.25rem 0;
  color: var(--wp--preset--color--contrast);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.asta-event-row .wp-block-post-title a:focus-visible {
  outline: 3px solid var(--wp--preset--color--secondary);
  outline-offset: 3px;
}

/*
 * Chip groups. Once the chips became children of a group (Wahlen / StuPa /
 * Beschlüsse) each rendered as a block, which is correct: MMM positions sub-menu
 * items with its own column geometry, and forcing the list to flex pushed the
 * chips off-canvas (measured x = -324). They stay stacked.
 */





/*
 * WCAG 1.4.3 on the social rows.
 *
 * Instagram's brand pink (#f00075) carries white labels at 4.23:1, below the
 * 4.5:1 AA floor for 15.6px text. The service colour is darkened to #d6006a,
 * which keeps the hue recognisable and measures 5.17:1 against white.
 */
.wp-block-social-links.has-visible-labels .wp-social-link-instagram {
  background-color: #d6006a !important;
  color: #fff !important;
}

/* Dark keeps the chip pink but takes the palette's pink, and flips the label to
   near-black: #0F0D1A on #F9A8D4 measures 9.9:1, where the brand hue had to be
   hand-darkened to reach AA on a light page. */
html.asta-theme-dark body .wp-block-social-links.has-visible-labels .wp-social-link-instagram {
  background-color: var(--wp--preset--color--accent) !important;
  color: var(--wp--preset--color--contrast-alt) !important;
}

html body .wp-block-post-content ul.wp-block-social-links.has-visible-labels li.wp-social-link a.wp-block-social-link-anchor:not([class*="-color"]):not(.has-text-color):not([style*="color"]) {
  color: inherit;
}

.wp-block-social-links.has-visible-labels .wp-block-social-link-label {
  line-height: 1.4;
}

:where(.asta-legacy-font-black) {
  color: var(--wp--preset--color--contrast);
}

/* Legacy content that still carries `asta-legacy-font-black`. The rule above is
   a zero-specificity reset on purpose, so its dark twin has to be explicit —
   black on the dark base is the 1:1 surface axe reports as `incomplete`. */
html.asta-theme-dark body :where(.asta-legacy-font-black) {
  color: var(--wp--preset--color--contrast);
}

@media (prefers-color-scheme: dark) {
  html:not(.asta-theme-light) body {
    --asta-light-surface-link: #5b21b6;
  }
}

html.asta-theme-dark body {
  --asta-light-surface-link: #5b21b6;
}

html body .wp-block-post-content details.wp-block-details:not(.has-background):not([class*="-background-color"]):not([style*="background"]) > p.wp-block-paragraph:not(.has-background):not([class*="-background-color"]):not([style*="background"]) > a:not([class*="-color"]):not(.has-text-color):not([style*="color"]),
html body .wp-block-post-content details.wp-block-details:not(.has-background):not([class*="-background-color"]):not([style*="background"]) > .wp-block-file:not(.has-background):not([style*="background"]) > a:not(.wp-block-file__button):not([class*="-color"]):not(.has-text-color):not([style*="color"]),
html body .wp-block-post-content .wp-block-cover__inner-container > p.has-white-background-color.has-background:not(.has-text-color):not([style*="color"]) > strong > a:not([class*="-color"]):not(.has-text-color):not([style*="color"]),
html body .wp-block-post-content details:not([class]):not([style]) > figure:not([class]):not([style]) > p:not([class]):not([style]) > .asta-legacy-font-black > a:not([class*="-color"]):not(.has-text-color):not([style*="color"]) {
  color: var(--asta-light-surface-link, inherit);
}

html body .wp-block-post-content p.has-white-color.has-pale-pink-background-color.has-text-color.has-background:not([style*="color"]) {
  color: #1a1a1a !important;
}

/* The paragraph paints its own pale-pink block background, so its ink stays
   dark in both schemes. `contrast-alt` is the palette's near-black (#0F0D1A),
   the token equivalent of the light rule's #1a1a1a. */
html.asta-theme-dark body .wp-block-post-content p.has-white-color.has-pale-pink-background-color.has-text-color.has-background:not([style*="color"]) {
  color: var(--wp--preset--color--contrast-alt) !important;
}

html body .wp-block-post-content p.has-white-color.has-pale-pink-background-color.has-text-color.has-background:not([style*="color"]) a:not([class*="-color"]):not(.has-text-color):not([style*="color"]) {
  color: inherit;
}

html body .wp-block-post-content .has-white-color.has-vivid-red-background-color.has-text-color.has-background a:not([class*="-color"]):not(.has-text-color):not([style*="color"]) {
  color: inherit;
}

html body #cmplz-cookies-overview .cookies-per-purpose {
  --asta-heading-color: var(--wp--preset--color--primary);
}

.pdfemb-viewer .pdfemb-loadingmsg {
  color: #1a1a1a;
  background-color: #fff;
}

.pdfemb-viewer .pdfemb-errormsg {
  color: #1a1a1a;
  background-color: #faa;
}

.asta-ticket-ui .asta-gift-input {
  color: #1a1a1a;
  background-color: #fff;
}

.asta-ticket-ui .asta-gift-btn {
  color: #1a1a1a;
}

html.asta-theme-dark body .asta-ticket-ui .asta-gift-input {
  background-color: var(--wp--preset--color--surface);
  color: var(--wp--preset--color--contrast);
}

html.asta-theme-dark body .asta-ticket-ui .asta-gift-btn {
  color: var(--wp--preset--color--contrast);
}

/*
 * WCAG 1.4.3 on Complianz' blocked-embed notice.
 *
 * The plugin ships a white-on-#808080 banner (3.94:1) that only appears when a
 * third-party embed is blocked, so it never shows up in a plain page scan. The
 * grey is darkened to reach 5.41:1 and nothing else changes.
 */
.cmplz-blocked-content-notice,
.cmplz-blocked-content-container .cmplz-blocked-content-notice {
  background-color: #6b6b6b !important;
}

/*
 * Audit D1 — one wordmark.
 *
 * The header ships the AStA lockup as an image whose alt text is already
 * "AStA Universität Lüneburg", and `parts/header.html` prints the site title
 * next to it as the home link. Visually the wordmark appeared twice (measured at
 * 1440 px: logo 0–160, title 177–462; at 390 px the two came within 10 px).
 *
 * The logo stays as the visible wordmark; the site-title link stays in the DOM —
 * it is the header's only link home — and is hidden the way a skip link is,
 * revealed on focus so 2.4.7 still holds.
 */
.asta-site-header .asta-header-site-title {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.asta-site-header .asta-header-site-title a:focus-visible {
  position: fixed;
  top: 8px;
  left: 8px;
  box-sizing: border-box;
  width: auto;
  height: auto;
  margin: 0;
  padding: 8px 14px;
  overflow: visible;
  clip-path: none;
  background: var(--wp--preset--color--contrast);
  color: var(--wp--preset--color--base-alt);
  border-radius: 8px;
  z-index: 1200;
}

/*
 * Audit D3 — one filled action in the hero.
 *
 * `.is-style-outline` is the block library's own variant, but the global
 * `:root :where(.wp-block-button__link.is-style-outline)` preset styles it with
 * the theme's link colour, which disappears on the cover gradient. Bind the
 * outline to the cover's foreground instead.
 *
 * Harmonized 48px height, 8px radius and balanced padding across primary and
 * secondary hero buttons (Landing Page Improvement 1).
 */
.wp-block-cover .wp-block-buttons .wp-block-button__link {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  min-height: 48px !important;
  height: 48px !important;
  padding: 0 1.6rem !important;
  font-size: 0.95rem !important;
  font-weight: 700 !important;
  border-radius: 8px !important;
  line-height: 1.25 !important;
  text-transform: uppercase !important;
  letter-spacing: 0.05em !important;
  box-sizing: border-box !important;
}

.wp-block-cover .wp-block-button:not(.is-style-outline) .wp-block-button__link {
  background-color: var(--wp--preset--color--primary) !important;
  border: 2px solid transparent !important;
  color: var(--wp--preset--color--base-alt) !important;
}

.wp-block-cover .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover,
.wp-block-cover .wp-block-button:not(.is-style-outline) .wp-block-button__link:focus {
  filter: brightness(1.1);
}

.wp-block-cover .wp-block-button__link.is-style-outline.asta-hero-secondary {
  background: transparent !important;
  color: var(--wp--preset--color--base-alt) !important;
  border: 2px solid currentColor !important;
}

.wp-block-cover .wp-block-button__link.is-style-outline.asta-hero-secondary:hover,
.wp-block-cover .wp-block-button__link.is-style-outline.asta-hero-secondary:focus {
  background: var(--wp--preset--color--base-alt) !important;
  color: var(--wp--preset--color--contrast) !important;
}

/*
 * Landing Page Improvements 2–4:
 * 2. Sektions-Rhythmus: Breathing room between sections (clamp(3.5rem, 5.5vw, 5rem)).
 * 3. Spotlight feed width flush to 1200px wide grid & hidden input reset.
 * 4. Kapitel-Tönung (Aktuelles): Soft pale lavender (#F5F3FF) chapter surface with crisp
 *    white bento tiles in light mode; #161326 night surface with elevated #242038 tiles in dark mode.
 */
.home .entry-content > .asta-service-icon-grid,
.home .entry-content > .asta-aktuelles,
.home .entry-content > .asta-referate-section,
.home .entry-content > .spotlight-instagram-feed,
.home .entry-content > .asta-social {
  margin-block-start: clamp(3.5rem, 5.5vw, 5rem) !important;
  margin-block-end: 0 !important;
}

.home .entry-content > .spotlight-instagram-feed,
.spotlight-instagram-feed {
  max-width: var(--wp--style--global--wide-size, 1200px) !important;
  width: 100% !important;
  margin-inline: auto !important;
}

.entry-content input[type="hidden"],
input[type="hidden"] {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  height: 0 !important;
  width: 0 !important;
}

.home .entry-content > .asta-aktuelles {
  background-color: #F5F3FF !important;
  border: 1px solid rgba(109, 40, 217, 0.08) !important;
  border-radius: 16px !important;
  padding: clamp(2rem, 3.5vw, 3rem) clamp(1rem, 2.5vw, 2rem) !important;
  box-sizing: border-box !important;
}

.home .entry-content > .asta-aktuelles .asta-news-bento__tile {
  background-color: #ffffff !important;
  border: 1px solid rgba(15, 13, 26, 0.1) !important;
  box-shadow: 0 4px 12px rgba(109, 40, 217, 0.04);
}

.home .entry-content > .asta-aktuelles .asta-telegram {
  background-color: #ffffff !important;
  border: 1px solid rgba(34, 158, 217, 0.25) !important;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(34, 158, 217, 0.04);
}

html.asta-theme-dark .home .entry-content > .asta-aktuelles {
  background-color: #161326 !important;
  border: 1px solid rgba(255, 255, 255, 0.08) !important;
}

html.asta-theme-dark .home .entry-content > .asta-aktuelles .asta-news-bento__tile {
  background-color: #242038 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

html.asta-theme-dark .home .entry-content > .asta-aktuelles .asta-news-bento__link {
  color: var(--wp--preset--color--contrast) !important;
}

html.asta-theme-dark .home .entry-content > .asta-aktuelles .asta-news-bento__date {
  color: #9ca3af !important;
}

html.asta-theme-dark .home .entry-content > .asta-aktuelles .asta-telegram {
  background-color: #242038 !important;
  border: 1px solid rgba(34, 158, 217, 0.3) !important;
  color: #e5e7eb !important;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
}

/*
 * Audit D5 — links must not read as group headers.
 *
 * The HowTo and StuPa panels use Max Mega Menu's auto-flow layout, where every
 * top-level item is painted like a column header (uppercase, 700, accent). An
 * item that is a plain link — "Sitzungen", "Ausschüsse" — therefore looked like
 * a section title. Styling follows the subtree, not the depth: a first-level item
 * is a header only when it has children.
 */
#mega-menu-wrap-topbar #mega-menu-topbar > li.mega-menu-megamenu > ul.mega-sub-menu > li.mega-menu-item:not(:has(> ul)) > a.mega-menu-link span.mega-menu-title {
  font-size: 14px;
  font-weight: 400;
  letter-spacing: normal;
  text-transform: none;
  color: var(--asta-panel-ink);
}

/*
 * Audit D8 — hover weight in dark scheme.
 *
 * The panel row hovered to the same solid violet (#6D28D9) as a primary button,
 * so a hovered menu row carried as much weight as the page's main action. The
 * accent at 14 % keeps the state visible without competing.
 */
@media (prefers-color-scheme: dark) {
  #mega-menu-wrap-topbar #mega-menu-topbar ul.mega-sub-menu li.mega-menu-item > a.mega-menu-link:hover,
  #mega-menu-wrap-topbar #mega-menu-topbar ul.mega-sub-menu li.mega-menu-item > a.mega-menu-link:focus {
    background: rgba(167, 139, 250, 0.14);
  }
}

/*
 * Audit U3 — recovery paths on the 404 page.
 *
 * The five entries are links, not buttons: they are alternative routes, not
 * competing primary actions. They wrap, so the row degrades to two lines at
 * 390 px without a horizontal scrollbar.
 */
.asta-404-paths {
  gap: 0.5rem;
  margin-top: 1.5rem;
}

.asta-404-path {
  margin: 0;
}

.asta-404-path a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 1rem;
  border: 1px solid var(--wp--preset--color--primary);
  border-radius: 999px;
  color: var(--wp--preset--color--primary);
  font-weight: 600;
  text-decoration: none;
}

.asta-404-path a:hover,
.asta-404-path a:focus {
  background: var(--wp--preset--color--primary);
  color: #fff;
}

/* Measured 2026-11-14: `primary` ink on the dark base is 2.40:1, so the chips
   need their own dark ink as well as their hover twin. `accent` is the
   palette's light-on-dark colour and measures 9.4:1 on `surface`. */
html.asta-theme-dark body .asta-404-path a {
  border-color: var(--wp--preset--color--accent);
  color: var(--wp--preset--color--accent);
}

html.asta-theme-dark body .asta-404-path a:focus,
html.asta-theme-dark body .asta-404-path a:hover {
  background-color: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--contrast);
}

/*
 * Audit D3/U3 — search buttons follow the single primary treatment.
 *
 * The block library paints `.wp-block-search__button` with the palette's
 * `secondary` fill (#3B82F6), which carries its white label at 3.67:1 — below
 * the 4.5:1 floor — and made search the fourth component to use "secondary blue"
 * for something primary. Violet measures 7.10:1.
 */
.wp-block-search .wp-block-search__button,
.wp-block-search__button.wp-block-search__button {
  background: var(--wp--preset--color--primary) !important;
  color: #fff !important;
  border-color: var(--wp--preset--color--primary) !important;
}

html.asta-theme-dark body .wp-block-search .wp-block-search__button,
html.asta-theme-dark body .wp-block-search__button.wp-block-search__button {
  background-color: var(--wp--preset--color--primary) !important;
  border-color: var(--wp--preset--color--primary) !important;
  color: var(--wp--preset--color--contrast) !important;
}

.wp-block-search .wp-block-search__button:hover,
.wp-block-search .wp-block-search__button:focus {
  filter: brightness(1.12);
}

.wp-block-query-pagination :is(.wp-block-query-pagination-next, .wp-block-query-pagination-previous) {
  background-color: var(--wp--preset--color--primary);
  color: #fff;
}

html.asta-theme-dark body .wp-block-query-pagination :is(.wp-block-query-pagination-next, .wp-block-query-pagination-previous) {
  background-color: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--contrast);
}

/*
 * Dark scheme: headings inherit the ink of a block that sets its own.
 *
 * Measured on /erklaerung-zur-barrierefreiheit/ in dark scheme: two `<h2>`s sat
 * inside a group with `has-base-alt-background-color` (light, #f5f3ff) and
 * `has-contrast-alt-color` (near-black ink), but the global heading rule painted
 * them with the dark-scheme accent (#a78bfa) at 2.48:1. A container that
 * declares both a background and a text colour owns the ink of its children;
 * containers that only set a background keep the accent headings.
 */
html body [class*="has-text-color"][class*="-background-color"] :is(h1, h2, h3, h4, h5, h6):not([class*="-color"]):not(.has-text-color) {
  color: inherit;
}

/*
 * Audit U5 — visible breadcrumb trail.
 *
 * Mirrors the BreadcrumbList that already shipped as JSON-LD. Kept quiet: small,
 * muted, and above the body copy, so it is a position cue rather than another
 * navigation bar competing with the mega-menu.
 */
.asta-breadcrumbs {
  margin: 0 0 1.25rem;
}

.asta-breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 0.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.875rem;
}

.asta-breadcrumbs__item {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--wp--preset--color--primary);
}

.asta-breadcrumbs__item + .asta-breadcrumbs__item::before {
  content: "/";
  color: var(--asta-breadcrumbs-separator, currentColor);
  opacity: 0.55;
}

.asta-breadcrumbs__item a {
  text-decoration: none;
  border-bottom: 1px solid transparent;
}

.asta-breadcrumbs__item a:hover,
.asta-breadcrumbs__item a:focus {
  border-bottom-color: currentColor;
}

/* The current crumb. Two inks were tried here before this one and both were
   invalid or wrong on a page: `--asta-panel-ink` is declared only inside the
   mega-menu panel (`#mega-menu-wrap-topbar`), so the declaration was invalid and
   the span fell back to the item's `primary`; and the raw
   `@media (prefers-color-scheme: dark)` that added `base-alt` could not follow
   the visitor's stored choice, so it painted white onto the #F5F3FF base for a
   forced-light visitor under a dark OS (1.10:1) and left `primary` on the
   #1A1A2E base for a forced-dark visitor under a light OS (2.40:1) — class 2 of
   the 2026-11-14 readability audit, 28 records.

   `contrast` is the palette token that inverts with the scheme (near-black in
   light, white in dark), and it does so through the `@media` block and the
   scheme class alike, so one declaration covers all four states and no override
   is needed. Measured on /arbeiten/ at 1280x800 and 390x844: 17.52:1 light,
   17.06:1 dark, and 11.86:1 / 12.54:1 once the 0.85 opacity below is
   composited. `contrast-alt` is not a substitute: it stays near-black in dark
   (#0F0D1A) and measures 1.13:1 on the dark base. */
.asta-breadcrumbs__item span[aria-current] {
  color: var(--wp--preset--color--contrast);
  opacity: 0.85;
}

/*
 * Audit U4/U6 — result count under an archive or search title.
 */
.asta-result-count {
  margin: 0.5rem 0 0;
  font-size: 0.9375rem;
  opacity: 0.8;
}

/* A file that cannot be served says so instead of offering a 0-byte download. */
.asta-file-unavailable {
  color: var(--wp--preset--color--primary);
  font-size: 0.875em;
  font-weight: 600;
  white-space: nowrap;
}

/*
 * Footer hours table and Awareness block (information-loss audit §8, 2026-10-22).
 *
 * The footer used to print one hour pair copied from an unrelated service's
 * widget; it now carries the office's real weekly hours plus the lecture-free
 * set. A table is the honest structure for that — two columns that line up —
 * and `th[scope=row]` gives a screen reader the weekday before the time.
 */
/*
 * The two-column hours list, used by the footer and by the contact card.
 *
 * The parent theme draws a 2px white border on every `table` (measured), which
 * turned these small hour lists into boxed chips; and the class is shared so the
 * contact card does not need a second copy of the same reset.
 */
.asta-footer-hours {
  width: 100%;
  max-width: 15rem;
  margin: 0.25rem 0 0.75rem;
  border-collapse: collapse;
  border: 0 !important;
  font-size: 0.875rem;
  line-height: 1.6;
}

.asta-footer-hours th,
.asta-footer-hours td {
  padding: 0;
  border: 0;
  font-weight: 400;
  text-align: left;
  vertical-align: baseline;
}

.asta-footer-hours td {
  text-align: right;
  white-space: nowrap;
  /* Keep the time on the same baseline as the weekday without a flex wrapper. */
  padding-inline-start: 1rem;
}

/*
 * Inside the contact card the hours list has room to be as wide as its content,
 * and the "Vorlesungsfreie Zeit" label must not wrap into two lines.
 */
.asta-contact-card__hours {
  width: auto;
  max-width: 100%;
  /* Something centres the table with `margin-inline: auto` (measured: 173.16px
     each side — exactly (676-330)/2), and it outranks a plain class selector, so
     the reset has to be emphatic. */
  margin: 0 0 0.25rem !important;
  margin-inline: 0 !important;
}

.asta-contact-card__hours th {
  padding-inline-end: 1rem;
  white-space: nowrap;
}

/* Below 400px the two-column list must wrap rather than push the page sideways —
   `nowrap` on both cells made the table 8px wider than its card at 320px. */
@media (max-width: 420px) {
  .asta-contact-card__hours th {
    padding-inline-end: 0.5rem;
    white-space: normal;
  }

  .asta-contact-card__hours td {
    white-space: normal;
  }
}

.asta-footer-three .asta-footer-contact__hours {
  margin: 0.75rem 0 0;
  font-size: 0.875rem;
}

.asta-footer-three .asta-footer-contact__hours--break {
  margin-top: 0.25rem;
}

.asta-footer-three .asta-footer-contact__phone a,
.asta-footer-three .asta-footer-contact__email a {
  /* The phone is now dialable: a 44px target on touch devices. */
  display: inline-block;
  min-height: 24px;
}

/* Awareness sits inside the legal zone but reads as its own offer: one quiet
   panel, a shield icon and a sentence instead of a sixth link. The complete card is a link. */
.asta-footer-three .asta-footer-awareness {
  display: block;
  margin-top: 1rem;
  padding: 0.75rem 0.875rem;
  border-radius: 8px;
  background: rgba(167, 139, 250, 0.12);
  text-decoration: none !important;
  color: inherit !important;
  transition: background 0.15s ease, transform 0.15s ease;
  cursor: pointer;
}

.asta-footer-three a.asta-footer-awareness:hover {
  background: rgba(167, 139, 250, 0.22);
  text-decoration: none !important;
}

.asta-footer-three a.asta-footer-awareness:focus-visible {
  outline: 2px solid var(--wp--preset--color--secondary, #3b82f6);
  outline-offset: 2px;
}

.asta-footer-three .asta-footer-awareness__label {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  margin: 0 0 0.25rem;
  font-size: 0.875rem;
  color: var(--asta-panel-ink, #ffffff);
}

.asta-footer-three .asta-footer-awareness__icon {
  display: inline-flex;
  color: var(--asta-panel-accent, #a78bfa);
  flex: 0 0 auto;
}

.asta-footer-three .asta-footer-awareness__text {
  margin: 0;
  font-size: 0.8125rem;
  line-height: 1.45;
  color: var(--asta-panel-ink, #ffffff);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.asta-footer-three a.asta-footer-awareness:hover .asta-footer-awareness__text {
  color: var(--asta-panel-accent, #a78bfa);
}

/*
 * Referat identity card (pathway-15, variant B).
 *
 * Rendered from post meta under the first paragraph on the 16 referat pages.
 * Icon convention matches the footer: 24 × 24 viewBox, 18 px, stroke 1.5,
 * currentColor, aria-hidden. Icons are decorative — every row carries a text
 * label, so the card is readable without them.
 */
.asta-referat-meta {
  margin: 1.25rem 0 1.75rem;
  padding: 1rem 1.125rem;
  border: 1px solid var(--wp--preset--color--base-alt);
  border-radius: 10px;
  background: var(--wp--preset--color--surface);
  color: var(--asta-panel-ink);
}

.asta-referat-meta__row {
  display: flex;
  gap: 0.625rem;
  align-items: flex-start;
  margin: 0 0 0.75rem;
}

.asta-referat-meta__row:last-child {
  margin-bottom: 0;
}

.asta-referat-meta .ic {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  margin-top: 0.15rem;
  color: var(--asta-panel-accent);
}

.asta-referat-meta .ic--sm {
  width: 15px;
  height: 15px;
  margin-top: 0;
}

.asta-referat-meta__label {
  display: block;
  font-size: 0.6875rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: var(--asta-panel-accent);
  line-height: 1.3;
}

.asta-referat-meta__value {
  display: block;
  font-size: 0.9375rem;
  line-height: 1.5;
  /* The meeting text can be long ("Bühnengruppe Mi 18–20 Uhr, Aula Campus Rotes
     Feld / Improvisationsgruppe Do 19:30–21:30 Uhr, C14.102"). */
  overflow-wrap: anywhere;
}

.asta-referat-meta__channels {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1rem;
}

.asta-referat-meta__channels a {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 24px;
  color: var(--asta-panel-accent);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.asta-referat-meta__channels a:hover,
.asta-referat-meta__channels a:focus {
  color: var(--asta-panel-ink);
}

@media (prefers-color-scheme: light) {
  /* In light scheme the card keeps the dark surface, so its ink stays white —
     the same contract the mega-menu panels use. */
  .asta-referat-meta {
    background: #1A1A2E;
    color: var(--wp--preset--color--base-alt);
  }
}

html.asta-theme-dark body .asta-referat-meta {
  background-color: var(--wp--preset--color--surface);
  color: var(--wp--preset--color--contrast);
}

/*
 * Instagram grid (pathway-17 C) and Telegram card (pathway-18).
 *
 * Both render content that lives on this site: the grid's images are WordPress
 * attachments, the Telegram card is plain text stored by the webhook. No iframe,
 * no third-party script, no cookie before consent.
 */
/* -------------------------------------------------------------------------
   "Kontakt & Zeiten" card (pattern asta-gwyneth/service-contact).
   Requested by the BAföG advisor after the Hueman widget sidebar disappeared
   in the relaunch: the person, their hours and their room need one place that
   looks the same on all 16 service pages instead of a hand-written paragraph
   per page. Colours come from the theme's tokens so the card follows the dark
   scheme; only the layout lives here.
   ------------------------------------------------------------------------- */
.asta-contactcard {
  font-size: 0.95rem;
}

aside.asta-contactcard {
  margin: 1.25rem 0 1.75rem;
  padding: 1rem 1.125rem;
  border: 1px solid var(--wp--preset--color--base-alt, #e5e7eb);
  border-radius: 10px;
  background: var(--wp--preset--color--base, #ffffff);
  color: var(--wp--preset--color--contrast, #1f2937);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

@media (prefers-color-scheme: dark) {
  /* Gated on the class for the same reason as the banner: `#242038` is a dark
     literal surface and `contrast` is restored to #0F0D1A for a forced-light
     choice, which would paint near-black on near-black. The light twin further
     down already gives forced-light its own card. */
  html:not(.asta-theme-light) aside.asta-contactcard {
    background: #242038;
    color: var(--wp--preset--color--contrast);
    border-color: rgba(255, 255, 255, 0.12);
  }

  html:not(.asta-theme-light) .asta-contactcard__details dt {
    color: #a78bfa !important;
  }
}

html.asta-theme-dark aside.asta-contactcard {
  background: #242038;
  color: var(--wp--preset--color--contrast);
  border-color: rgba(255, 255, 255, 0.12);
}

html.asta-theme-dark .asta-contactcard__details dt {
  color: #a78bfa !important;
}

html.asta-theme-light aside.asta-contactcard {
  background: #ffffff;
  color: #1f2937;
  border-color: var(--wp--preset--color--base-alt, #e5e7eb);
}

html.asta-theme-light .asta-contactcard__details dt {
  color: var(--wp--preset--color--primary) !important;
}

.asta-contactcard__heading {
  margin: 0 0 0.75rem;
  font-weight: 700;
}

.asta-contactcard__details {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  margin: 0;
}

.asta-contactcard__details dt {
  color: var(--wp--preset--color--primary, #6d28d9);
  font-size: 0.75rem;
  font-weight: 700;
}

/*
 * Muted empty thumbnail placeholder on archives: replace bright purple #6D28D9
 * with subtle tinted surface to avoid glaring color inconsistency.
 */
.asta-board .has-primary-background-color.is-empty,
.archive .has-primary-background-color.is-empty {
  background-color: var(--wp--preset--color--base-alt, #F5F3FF) !important;
  border: 1px solid rgba(109, 40, 217, 0.12);
}

html.asta-theme-dark .asta-board .has-primary-background-color.is-empty,
html.asta-theme-dark .archive .has-primary-background-color.is-empty {
  background-color: #242038 !important;
  border-color: rgba(255, 255, 255, 0.08);
}

.asta-contactcard__details dd {
  margin: 0;
  overflow-wrap: anywhere;
}




.asta-contactcard > p {
  line-height: 1.45;
}

.asta-contactcard__role strong {
  font-size: 1rem;
}

/* The label is the small line above each value; without this the four blocks
   read as one run of text at the card's width. */
.asta-contactcard__hours,
.asta-contactcard__room,
.asta-contactcard__mail {
  border-top: 1px solid var(--wp--preset--color--base-alt, rgba(15, 13, 26, 0.12));
  padding-top: 0.5rem;
}

.asta-contactcard a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.asta-contactcard a:hover,
.asta-contactcard a:focus-visible {
  text-decoration-thickness: 2px;
}


/* Spotlight Instagram Feed — Dark Mode & AStA Theme Styling */
html.asta-theme-dark .spotlight-instagram-feed,
html.asta-theme-dark .FeedGridLayout__root {
  background-color: transparent !important;
}

html.asta-theme-dark .FeedLayout__wrapper {
  background-color: #242038 !important;
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  border-radius: 14px !important;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35) !important;
}

/*
 * The plugin colours `.FeedHeader__username` white but leaves the anchor and its
 * span inheriting #000000, so the handle sat black-on-#242038 (1.33:1) inside the
 * dark panel. Every text-bearing child gets the colour explicitly.
 */
html.asta-theme-dark .FeedHeader__username a,
html.asta-theme-dark .FeedHeader__username span,
html.asta-theme-dark .FeedHeader__title a,
html.asta-theme-dark .FeedHeader__normal-style a {
  color: var(--wp--preset--color--contrast) !important;
}

/*
 * The feed renders client-side, so there are class names the server HTML never
 * shows — the post's handle line is one of them, and it sat black on the
 * #242038 panel (1.33:1). Rather than chase every generated class, the panel
 * hands its colour down and every anchor inside it inherits.
 *
 * The follow button keeps its own white text but its background #29a7d2 only
 * reaches 2.78:1; #0e7490 reaches 5.36:1 with the same white. The "load more"
 * label was #238fb5 on #252e47 (3.63:1) and now inherits the panel colour.
 */
html.asta-theme-dark .spotlight-instagram-feed,
html.asta-theme-dark .spotlight-instagram-feed a,
html.asta-theme-dark .spotlight-instagram-feed a span,
html.asta-theme-dark .spotlight-instagram-feed .LoadMoreButton,
html.asta-theme-dark .spotlight-instagram-feed .LoadMoreButton span {
  color: var(--wp--preset--color--contrast) !important;
}

html.asta-theme-dark .spotlight-instagram-feed .DesignedButton__button {
  background-color: #0e7490 !important;
  border-color: #0e7490 !important;
  color: var(--wp--preset--color--contrast) !important;
}

/*
 * Scheme-independent fixes for the same feed. The panel is light (#f5f3ff) in
 * light mode but the post tiles overlay photos with a dark scrim, and the plugin
 * puts the follow button's background in an inline style — so these three need
 * to apply in both schemes, not only under the dark class.
 *
 *   .DesignedButton__button  white on #29a7d2 = 2.78:1  ->  #0e7490 = 5.36:1
 *   .LoadMoreButton span     #238fb5 on the dark panel = 3.63:1, on the light
 *                            panel 3.0:1 -> #0e7490 = 5.2:1 on light
 *   tile handle span         black on the #242038 scrim = 1.33:1 -> white
 */
.spotlight-instagram-feed a[rel="nofollow noreferrer noopener"] span {
  color: #ffffff !important;
}

@media (prefers-color-scheme: dark) {
  html:not(.asta-theme-light) .spotlight-instagram-feed,
  html:not(.asta-theme-light) .FeedGridLayout__root {
    background-color: transparent !important;
  }

  html:not(.asta-theme-light) .FeedLayout__wrapper {
    background-color: #242038 !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    border-radius: 14px !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35) !important;
  }

  html:not(.asta-theme-light) .FeedHeader__username a,
  html:not(.asta-theme-light) .FeedHeader__username span,
  html:not(.asta-theme-light) .FeedHeader__title a,
  html:not(.asta-theme-light) .FeedHeader__normal-style a {
    color: var(--wp--preset--color--contrast) !important;
  }

  html:not(.asta-theme-light) .spotlight-instagram-feed,
  html:not(.asta-theme-light) .spotlight-instagram-feed a,
  html:not(.asta-theme-light) .spotlight-instagram-feed a span,
  html:not(.asta-theme-light) .spotlight-instagram-feed .LoadMoreButton,
  html:not(.asta-theme-light) .spotlight-instagram-feed .LoadMoreButton span {
    color: var(--wp--preset--color--contrast) !important;
  }

  html:not(.asta-theme-light) .spotlight-instagram-feed .DesignedButton__button {
    background-color: #0e7490 !important;
    border-color: #0e7490 !important;
    color: var(--wp--preset--color--contrast) !important;
  }

  html:not(.asta-theme-light) .FeedHeader__root,
  html:not(.asta-theme-light) .FeedHeader__username,
  html:not(.asta-theme-light) .FeedHeader__title,
  html:not(.asta-theme-light) .FeedHeader__normal-style {
    color: var(--wp--preset--color--contrast) !important;
  }

  html:not(.asta-theme-light) .FeedHeader__bio,
  html:not(.asta-theme-light) .MediaTileCaption__text,
  html:not(.asta-theme-light) .MediaTileCaption__preview {
    color: #9ca3af !important;
  }

  html:not(.asta-theme-light) .FollowButton,
  html:not(.asta-theme-light) .DesignedButton__button.FollowButton,
  html:not(.asta-theme-light) .FeedFollowButton__root {
    background: linear-gradient(45deg, #F58529, #DD2A7B 55%, #8134AF) !important;
    color: var(--wp--preset--color--contrast) !important;
    border: none !important;
    border-radius: 999px !important;
  }

  html:not(.asta-theme-light) .LoadMoreButton,
  html:not(.asta-theme-light) .DesignedButton__button.LoadMoreButton,
  html:not(.asta-theme-light) .FeedLoadMoreButton__btn {
    background-color: #242038 !important;
    color: #c4b5fd !important;
    border: 1px solid rgba(167, 139, 250, 0.3) !important;
    border-radius: 8px !important;
  }
}

html.asta-theme-dark .FeedHeader__root,
html.asta-theme-dark .FeedHeader__username,
html.asta-theme-dark .FeedHeader__title,
html.asta-theme-dark .FeedHeader__normal-style {
  color: var(--wp--preset--color--contrast) !important;
}

html.asta-theme-dark .FeedHeader__bio,
html.asta-theme-dark .MediaTileCaption__text,
html.asta-theme-dark .MediaTileCaption__preview {
  color: #9ca3af !important;
}

html.asta-theme-dark .FollowButton,
html.asta-theme-dark .DesignedButton__button.FollowButton,
html.asta-theme-dark .FeedFollowButton__root,
html.asta-theme-dark .FeedFollowButton__btn,
html.asta-theme-dark .FollowButton__root {
  background: linear-gradient(45deg, #F58529, #DD2A7B 55%, #8134AF) !important;
  color: var(--wp--preset--color--contrast) !important;
  border: none !important;
  border-radius: 999px !important;
}

html.asta-theme-dark .LoadMoreButton,
html.asta-theme-dark .DesignedButton__button.LoadMoreButton,
html.asta-theme-dark .FeedLoadMoreButton__btn,
html.asta-theme-dark .LoadMoreButton__root {
  background-color: #242038 !important;
  color: #c4b5fd !important;
  border: 1px solid rgba(167, 139, 250, 0.3) !important;
  border-radius: 8px !important;
}

html.asta-theme-dark .MediaTile__root {
  background-color: #242038 !important;
}

html.asta-theme-dark .MediaPopupBox__container {
  background: rgba(15, 13, 26, 0.9) !important;
  backdrop-filter: blur(8px);
}

html.asta-theme-dark .MediaPopupBox__sidebar,
html.asta-theme-dark .MediaPopupBox__box {
  background: #1a1a2e !important;
  color: #e5e7eb !important;
}

html.asta-theme-dark .MediaPopupBox__caption {
  color: #d1d5db !important;
}

html.asta-theme-dark .MediaPopupBox__cta-btn {
  background: var(--wp--preset--color--primary, #6d28d9) !important;
  color: var(--wp--preset--color--contrast) !important;
}

@media (max-width: 781px) {

}










/* Telegram card — a short list, not a second feed. */
.asta-telegram {
  margin: 2rem 0;
  padding: 1rem 1.125rem;
  border: 1px solid rgba(34, 158, 217, 0.35);
  border-radius: 10px;
  background: rgba(34, 158, 217, 0.06);
}

/*
 * Inside the Aktuelles row the card is a grid item that must not decide the row
 * height: the bento does. It stretches to the bento's height and the scroll box
 * takes whatever is left.
 */
.asta-aktuelles__layout > .asta-telegram {
  display: flex;
  flex-direction: column;
  min-height: 0;
  margin: 0;
  padding: 1rem;
}

.asta-aktuelles__layout > .asta-telegram .asta-telegram__title {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
  line-height: 1.3;
}

.asta-aktuelles__layout > .asta-telegram .asta-telegram__scroll {
  flex: 1 1 auto;
  min-height: 5rem;
  /* A capped box is what keeps the card from setting the row height. `min-height:
     0` on the card is not enough: an `auto` grid row is sized by the item's
     max-content contribution, so uncapped posts took the whole row to 3795px and
     dragged the bento with them. */
  max-height: 34rem;
  margin-bottom: 0.75rem;
}

.asta-aktuelles__layout > .asta-telegram .asta-telegram__action {
  /* The CTA sits on the card's bottom edge even when the box is shorter than the
     bento beside it. */
  margin: auto 0 0;
}

/* The scroll box is a wrapper so the <ul> keeps its list semantics. */
.asta-telegram__scroll {
  /* Three full newsletter posts run to several thousand characters, so the box
     scrolls instead of pushing the page down by a metre. `overscroll-behavior`
     stops the page scrolling when the box hits its end. */
  max-height: min(28rem, 60vh);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(34, 158, 217, 0.55) transparent;
  padding-right: 0.5rem;
  margin: 0 0 1rem;
}

.asta-telegram__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.asta-telegram__scroll:focus-visible {
  outline: 2px solid var(--wp--preset--color--primary);
  outline-offset: 3px;
  border-radius: 6px;
}

.asta-telegram__scroll::-webkit-scrollbar {
  width: 8px;
}

.asta-telegram__scroll::-webkit-scrollbar-thumb {
  background: rgba(34, 158, 217, 0.55);
  border-radius: 999px;
}

/* A hint that there is more below, only while the box can still scroll. */
.asta-telegram__text a {
  color: var(--wp--preset--color--primary);
  text-decoration: underline;
  text-underline-offset: 0.18em;
  /* Anchors are inline-block for tap targets, and `break-word` does not
     lower intrinsic width, so a pasted URL set its own 372px floor and
     overflowed the card (and the page at 320px). `anywhere` does. */
  overflow-wrap: anywhere;
}

.asta-telegram__text strong {
  font-weight: 700;
}

.asta-telegram__text code {
  font-size: 0.9em;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  background: rgba(15, 13, 26, 0.08);
}

.asta-telegram__meta a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.asta-telegram__item {
  margin: 0;
  padding: 0.5rem 0;
  border-top: 1px solid rgba(34, 158, 217, 0.2);
}

.asta-telegram__item:first-child {
  border-top: 0;
}

.asta-telegram__text {
  margin: 0;
  font-size: 0.9375rem;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.asta-telegram__meta {
  margin: 0.15rem 0 0;
  font-size: 0.8125rem;
  opacity: 0.75;
}

/* ==========================================================================
   Complianz Consent Banner & Modal — Phoenix Design System Harmonization
   ========================================================================== */

/* Hide generic floating tab in favor of native footer legal link */
#cmplz-manage-consent,
.cmplz-manage-consent-container {
  display: none !important;
}

/* Banner container card */
.cmplz-cookiebanner {
  border-radius: 12px !important;
  font-family: inherit !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.25) !important;
}

/* Light mode banner */
.cmplz-cookiebanner {
  background: #ffffff !important;
  color: #1f2937 !important;
  border: 1px solid rgba(0, 0, 0, 0.08) !important;
}

.cmplz-cookiebanner .cmplz-title,
.cmplz-cookiebanner .cmplz-header {
  color: #111827 !important;
  font-family: inherit !important;
  font-weight: 700 !important;
}

.cmplz-cookiebanner .cmplz-message {
  color: #4b5563 !important;
  font-family: inherit !important;
  font-size: 14px !important;
  line-height: 1.5 !important;
}

/* Dark mode banner. Gated on the class as well as the media query, like the
   Spotlight rules: the media query alone also matches a forced-light choice under
   an OS dark preference, where `html.asta-theme-light body` has already restored
   `--wp--preset--color--contrast` to #0F0D1A while this block still painted the
   #1A1A2E surface — measured 1.13:1 for the banner, title and message on
   2026-11-14. Forced light keeps the light banner now (14.68:1). */
@media (prefers-color-scheme: dark) {
  html:not(.asta-theme-light) .cmplz-cookiebanner {
    background: #1a1a2e !important;
    color: var(--wp--preset--color--contrast) !important;
    border: 1px solid rgba(255, 255, 255, 0.16) !important;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5) !important;
  }

  html:not(.asta-theme-light) .cmplz-cookiebanner .cmplz-title,
  html:not(.asta-theme-light) .cmplz-cookiebanner .cmplz-header,
  html:not(.asta-theme-light) .cmplz-cookiebanner .cmplz-message {
    color: var(--wp--preset--color--contrast) !important;
  }
}

html.asta-theme-dark .cmplz-cookiebanner {
  background: #1a1a2e !important;
  color: var(--wp--preset--color--contrast) !important;
  border: 1px solid rgba(255, 255, 255, 0.16) !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5) !important;
}

html.asta-theme-dark .cmplz-cookiebanner .cmplz-title,
html.asta-theme-dark .cmplz-cookiebanner .cmplz-header,
html.asta-theme-dark .cmplz-cookiebanner .cmplz-message {
  color: var(--wp--preset--color--contrast) !important;
}

/* Buttons inside the banner */
.cmplz-cookiebanner .cmplz-btn {
  font-family: inherit !important;
  font-size: 14px !important;
  font-weight: 600 !important;
  border-radius: 6px !important;
  padding: 8px 16px !important;
  cursor: pointer !important;
  transition: all 0.15s ease !important;
}

.cmplz-cookiebanner .cmplz-btn:focus-visible {
  outline: 2px solid var(--wp--preset--color--secondary, #3b82f6) !important;
  outline-offset: 2px !important;
}

/* Primary accept button */
.cmplz-cookiebanner .cmplz-btn.cmplz-accept {
  background: var(--wp--preset--color--primary, #6d28d9) !important;
  border: 1px solid var(--wp--preset--color--primary, #6d28d9) !important;
  color: #ffffff !important;
}

.cmplz-cookiebanner .cmplz-btn.cmplz-accept:hover {
  background: #7c3aed !important;
  border-color: #7c3aed !important;
}

/*
 * Deny / essential button. `--wp--preset--color--secondary` is #3b82f6, which is
 * 3.68:1 on white and 3.4:1 on the dark banner — below the 4.5:1 that 14px text
 * needs. The banner is the first thing a visitor sees, so it uses the darker
 * blue on light and the lighter one on dark instead of the raw preset.
 */
.cmplz-cookiebanner .cmplz-btn.cmplz-deny {
  background: transparent !important;
  border: 1px solid #1d4ed8 !important;
  color: #1d4ed8 !important;
}

.cmplz-cookiebanner .cmplz-btn.cmplz-deny:hover {
  background: rgba(29, 78, 216, 0.08) !important;
}

/* The three legal links in the banner use the same blue. */
.cmplz-cookiebanner .cmplz-links .cmplz-link,
.cmplz-cookiebanner .cmplz-link.cookie-statement,
.cmplz-cookiebanner .cmplz-link.privacy-statement,
.cmplz-cookiebanner .cmplz-link.impressum {
  color: #1d4ed8 !important;
}

@media (prefers-color-scheme: dark) {
  /* Gated on the class like the container above: the pale blue is chosen for the
     #1A1A2E banner, and a forced-light choice paints that container #FFFFFF, where
     it measured 1.80:1 against 9.46:1 on dark. Forced light keeps the #1d4ed8 the
     light banner uses (6.70:1 on white). */
  html:not(.asta-theme-light) .cmplz-cookiebanner .cmplz-btn.cmplz-deny {
    border-color: #93c5fd !important;
    color: #93c5fd !important;
  }

  html:not(.asta-theme-light) .cmplz-cookiebanner .cmplz-btn.cmplz-deny:hover {
    background: rgba(147, 197, 253, 0.12) !important;
  }

  html:not(.asta-theme-light) .cmplz-cookiebanner .cmplz-links .cmplz-link,
  html:not(.asta-theme-light) .cmplz-cookiebanner .cmplz-link.cookie-statement,
  html:not(.asta-theme-light) .cmplz-cookiebanner .cmplz-link.privacy-statement,
  html:not(.asta-theme-light) .cmplz-cookiebanner .cmplz-link.impressum {
    color: #93c5fd !important;
  }
}

html.asta-theme-dark .cmplz-cookiebanner .cmplz-btn.cmplz-deny {
  border-color: #93c5fd !important;
  color: #93c5fd !important;
}

html.asta-theme-dark .cmplz-cookiebanner .cmplz-links .cmplz-link,
html.asta-theme-dark .cmplz-cookiebanner .cmplz-link.cookie-statement,
html.asta-theme-dark .cmplz-cookiebanner .cmplz-link.privacy-statement,
html.asta-theme-dark .cmplz-cookiebanner .cmplz-link.impressum {
  color: #93c5fd !important;
}

/* View preferences & save preferences buttons */
.cmplz-cookiebanner .cmplz-btn.cmplz-view-preferences,
.cmplz-cookiebanner .cmplz-btn.cmplz-save-preferences {
  background: transparent !important;
  border: 1px solid rgba(150, 150, 150, 0.4) !important;
  color: inherit !important;
}

.cmplz-cookiebanner .cmplz-btn.cmplz-view-preferences:hover,
.cmplz-cookiebanner .cmplz-btn.cmplz-save-preferences:hover {
  background: rgba(150, 150, 150, 0.15) !important;
}

/* ==========================================================================
   Print
   ==========================================================================

   Measured 2026-10-23: the theme shipped no `@media print` rule at all, so the
   browser default applied and the interactive chrome printed as-is. On /service/
   that consumed 571px of the first printed page before any copy appeared:

     header.is-style-site-header    60px   logo + navigation
     #mega-menu-wrap-topbar         40px   the top bar
     .menu-skip-links               65px   hidden on screen by a transform, which
                                           the print box discards, so the skip-link
                                           list printed as visible text
     .cmplz-cookiebanner           186px   an overlay, so it also covered copy
     footer.is-style-site-footer   285px   address, hours, legal links

   An AStA page gets printed for meetings, notice boards and paper files, so the
   result is not cosmetic: the reader was handed a page whose first screen was
   navigation, a cookie prompt and a footer. */

@media print {
	/* Paper gets true ink, not the palette's near-black: #000 here is the
	   deliberate choice the block exists to make ("force the page to ink on white
	   so a dark-scheme visitor does not print white-on-white"). Each guarded
	   literal below carries its own one-line exemption; a block-level
	   stylelint-disable would hide any future literal in this media query, which
	   is the blind spot the palette guard exists to close. */
	/* Chrome. Interactive affordances have no meaning on paper. */
	header.is-style-site-header,
	#mega-menu-wrap-topbar,
	.menu-skip-links,
	.cmplz-cookiebanner,
	[id^="cmplz-cookiebanner"],
	.cmplz-manage-consent,
	.asta-hero-tertiary,
	.wp-block-navigation,
	.wp-block-search {
		display: none !important;
	}

	/* The footer stays: it carries the postal address, office hours and phone
	   number, which is the most useful block on a printed AStA page. Only its
	   menus go -- a printed URL list is dead weight, and the legal pages are
	   reachable from the address block. */
	footer.is-style-site-footer nav,
	footer.is-style-site-footer .asta-footer-links,
	footer.is-style-site-footer .asta-footer-social,
	footer.is-style-site-footer .wp-block-social-links,
	footer.is-style-site-footer form,
	footer.is-style-site-footer .wp-block-column:not(:first-child) {
		display: none !important;
	}

	/* Paper has no colour scheme toggle and no coloured bands: force the page to
	   ink on white so a dark-scheme visitor does not print white-on-white. */
	:root,
	html.asta-theme-dark {
		background: #fff !important;
		/* stylelint-disable-next-line scale-unlimited/declaration-strict-value -- paper ink */
		color: #000 !important;
	}

	body {
		background: #fff !important;
		/* stylelint-disable-next-line scale-unlimited/declaration-strict-value -- paper ink */
		color: #000 !important;
		font-size: 11pt;
		line-height: 1.5;
	}

	/* The reading measure is a screen concern; on paper the printable width is
	   already the measure, and a nested cap would leave a narrow column. */
	body:not(.home) .wp-block-post-content {
		max-width: none !important;
	}

	a,
	.asta-breadcrumbs,
	.asta-breadcrumbs a,
	.asta-breadcrumbs span {
		/* stylelint-disable-next-line scale-unlimited/declaration-strict-value -- paper ink */
		color: #000 !important;
		text-decoration: underline;
	}

	.asta-breadcrumbs span,
	.asta-breadcrumbs__current {
		text-decoration: none;
		font-weight: 600;
	}

	/* Decorative rules and coloured separators are a screen accent; on paper they
	   are only a colour cartridge. */
	hr.wp-block-separator,
	.wp-block-separator {
		background: #000 !important;
		/* stylelint-disable-next-line scale-unlimited/declaration-strict-value -- paper ink */
		border-color: #000 !important;
	}

	/* A printed link is otherwise unaddressable, so the destination is spelled
	   out -- but only for destinations that leave the printed document: an
	   address you can type, or a mailbox. Internal navigation is deliberately
	   silent: every bullet in a service list links somewhere on this site, and
	   printing four root-relative paths per paragraph turned readable prose into
	   a wall of brackets. */
	a[href^="http"]::after,
	a[href^="mailto:"]::after {
		content: " (" attr(href) ")";
		font-size: 0.85em;
		word-break: break-all;
	}

	a[href="#"]::after,
	a[href^="#"]::after,
	a[href^="tel:"]::after,
	.asta-breadcrumbs a::after,
	.wp-block-button__link::after,
	.asta-service-card a::after,
	.asta-referat-card a::after,
	.asta-news-card a::after {
		content: "";
	}

	/* Cards, tiles and tables should not be cut in half by a page break. */

	h1,
	h2,
	h3,
	h4 {
		break-after: avoid;
		page-break-after: avoid;
		/* stylelint-disable-next-line scale-unlimited/declaration-strict-value -- paper ink */
		color: #000 !important;
	}

	img {
		max-width: 100% !important;
	}

	/* A scroll box prints only its visible part, which would silently drop the
	   rest of the Telegram feed. Paper has no scrollbar, so let it expand. */
	.asta-telegram__scroll {
		max-height: none !important;
		overflow: visible !important;
	}

	/* A cover is a photo with the heading on top. On paper the photo is a dark
	   rectangle that swallows the black heading (measured: "Service" on the
	   /service/ hero was unreadable), and it costs a full block of toner. The
	   background layer is already hidden, so the image has to go as well and the
	   heading prints on white. */
	.wp-block-cover__image-background,
	.wp-block-cover__video-background,
	.wp-block-cover__background,
	.asta-hero__overlay,
	.asta-hero__image {
		display: none !important;
	}

	.wp-block-cover,
	.asta-hero {
		background: #fff !important;
		/* stylelint-disable-next-line scale-unlimited/declaration-strict-value -- paper ink */
		color: #000 !important;
		min-height: 0 !important;
	}

	.wp-block-cover h1,
	.wp-block-cover h2,
	.wp-block-cover p,
	.asta-hero h1,
	.asta-hero p {
		/* stylelint-disable-next-line scale-unlimited/declaration-strict-value -- paper ink */
		color: #000 !important;
	}
}

/*
 * pathway-22 K1: the board's invitation, inside the Aktuelles section. One line
 * on a wide screen, wrapping into two rows on a narrow one, and the link carries
 * the accent colour rather than a full button so it does not compete with the
 * hero's two CTAs three screens above.
 */
.asta-submit-callout {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  margin-block-start: var(--wp--preset--spacing--l, 2rem);
  padding-block: 1rem;
  padding-inline: 1.25rem;
  /* currentColor-based, so the box reads on the light section and in dark mode
     without a second rule. The first draft used white tints and vanished on the
     light background — the screenshot showed an unstyled paragraph. */
  border: 1px solid color-mix(in srgb, currentColor 22%, transparent);
  border-radius: var(--wp--preset--border-radius--m, 0.75rem);
  background: color-mix(in srgb, currentColor 6%, transparent);
}

.asta-submit-callout__text {
  margin: 0;
  max-width: 62ch;
  font-size: 0.95em;
  flex: 1 1 24ch !important;
}

.asta-submit-callout__cta {
  margin: 0;
  /* The block's own `is-layout-flex` rules give every child `flex: 1 1 0`, which
     is what pushed the link onto its own row. */
  flex: 0 0 auto !important;
  font-weight: 700;
}

.asta-submit-callout__cta a {
  /* Brand purple, not the #a78bfa menu accent: on the light section that one is
     2.2 : 1. #6D28D9 is 7 : 1 on white and still legible when the theme flips. */
  color: var(--wp--preset--color--primary, #6d28d9);
}

.asta-submit-callout__cta a:hover,
.asta-submit-callout__cta a:focus-visible {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/*
 * The CTA row inside a menu panel.
 *
 * "AStA als Arbeitgeber" rendered in the brand purple #6D28D9 on the panel ground
 * #1A1A2E: 2.3 : 1, i.e. effectively invisible. axe never said so — its contrast
 * rule returns `incomplete` on this markup, which the gate cannot fail on, so the
 * defect survived every green run and was found by measuring the pair by hand.
 *
 * #a78bfa is the same accent the board's first row uses: 6.9 : 1 on the panel —
 * but only on a *transparent* row. These CTAs are purple pills (`background:
 * --wp--preset--color--primary`), so #a78bfa on #6D28D9 is 2.61 : 1: the accent
 * and the pill had drifted apart. The pill keeps the colour it was drawn with,
 * `--asta-nav-foreground` (#FFFFFF, 7.1 : 1 on the primary), and the accent stays
 * for the flat variant.
 */
#mega-menu-wrap-topbar #mega-menu-topbar .mega-sub-menu li.mega-cta-anchor-row > a.mega-menu-link,
#mega-menu-wrap-topbar #mega-menu-topbar .mega-sub-menu li.mega-cta-anchor-row > a.mega-menu-link:hover,
#mega-menu-wrap-topbar #mega-menu-topbar .mega-sub-menu li.mega-cta-anchor-row > a.mega-menu-link:focus {
  color: var(--asta-nav-foreground, #ffffff) !important;
  font-weight: 700;
}

#mega-menu-wrap-topbar #mega-menu-topbar .mega-sub-menu li.mega-cta-anchor-row > a.mega-menu-link:hover,
#mega-menu-wrap-topbar #mega-menu-topbar .mega-sub-menu li.mega-cta-anchor-row > a.mega-menu-link:focus {
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

/* PDF download control (see inc/content-fixes.php). The embed has no download
   button of its own in the free build, so the theme supplies one that matches
   the design system instead of living inside a viewer toolbar. */
.asta-pdf-download {
  margin: 0.75rem 0 0;
}

.asta-pdf-download > a {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1.1rem;
  border: 1px solid var(--wp--preset--color--primary, #6d28d9);
  border-radius: 999px;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
  color: var(--wp--preset--color--primary, #6d28d9);
}

.asta-pdf-download > a:hover,
.asta-pdf-download > a:focus-visible {
  background: var(--wp--preset--color--primary, #6d28d9);
  color: #fff;
}

html.asta-theme-dark body .asta-pdf-download > a:focus-visible,
html.asta-theme-dark body .asta-pdf-download > a:hover {
  background-color: var(--wp--preset--color--primary);
  color: var(--wp--preset--color--contrast);
}

/*
 * Spotlight's two buttons: one design, every scheme.
 *
 * Dark mode had real styling — an Instagram-gradient "Follow" pill and a `#242038`
 * "Load More" with `#C4B5FD` ink — while light mode only ever got the generic teal
 * block above, and the class-scoped dark state (`html.asta-theme-dark` under a light
 * OS) got neither, because those rules lived inside the `prefers-color-scheme` query
 * alone. Owner instruction 2026-11-14: the dark design applies in light mode too.
 *
 * These declarations are single-sourced here rather than repeated per scope, and
 * both scopes are named in the list: `html:not(.asta-theme-dark)` for a light
 * visitor and for the no-JS visitor who carries neither class, `html.asta-theme-dark`
 * for dark. Every selector counts at least three classes and two elements, which
 * outranks the older `html.asta-theme-dark` (three classes, one element) and
 * `html:not(.asta-theme-light)` rules, so it wins in all four states and the two
 * buttons cannot drift apart again.
 *
 * Naming the dark scope is what makes the coupling legible; it is not what proves
 * these two buttons. `workflow/tests/dark-mode-coverage.test.mjs` classifies any
 * block whose selector names `asta-theme-dark` as a dark rule and never reads its
 * declarations, so with the dark half spelled out that ratchet stops asking about
 * this block — it does not pair the two halves. (A rule written as
 * `html:not(.asta-theme-dark)` on its own is not exempt: the analyser reads the
 * negation and scans it like any other light rule, which is pinned by the
 * `a negated scope is not a dark counterpart` fixture there.) What actually
 * enforces the buttons is `workflow/tests/spotlight-instagram.test.mjs`: four
 * scheme states, seven properties compared against OS light in each, a 4.5:1 floor
 * on Load More, and white ink plus a gradient on Follow. Both scopes are named
 * because the design is identical in both — `html body …` matched a dark visitor
 * too, so this rule already covered every state, and leaving dark unnamed let it
 * read as one that had forgotten the other scheme.
 *
 * The gradient is a measured a11y fix, not decoration: white on its first stop
 * #F58529 is 2.54:1, so the brand gradient had been failing AA wherever it applied.
 * A 35 % ink scrim over the same three stops keeps every hue and takes the worst
 * stop to 5.12:1. `#C4B5FD` on `#242038` measures 8.5:1.
 */
html:not(.asta-theme-dark) body .spotlight-instagram-feed .DesignedButton__button.FollowButton,
html:not(.asta-theme-dark) body .spotlight-instagram-feed .DesignedButton__button.DesignedButton__link,
html:not(.asta-theme-dark) body .spotlight-instagram-feed .FeedFollowButton__root,
html.asta-theme-dark body .spotlight-instagram-feed .DesignedButton__button.FollowButton,
html.asta-theme-dark body .spotlight-instagram-feed .DesignedButton__button.DesignedButton__link,
html.asta-theme-dark body .spotlight-instagram-feed .FeedFollowButton__root {
  background-color: transparent !important;
  /* The brand gradient, pre-darkened once rather than blended at render time: these
     are the three Instagram stops with a 35 % ink scrim applied, which is
     deterministic and measurable where `background-blend-mode` is neither. White on
     the darkest-first stop is 5.12:1; the undarkened #F58529 was 2.54:1. */
  background-image: linear-gradient(45deg, #a45b24, #952059 55%, #59267b) !important;
  color: #ffffff !important;
  border: none !important;
  border-radius: 999px !important;
}

html:not(.asta-theme-dark) body .spotlight-instagram-feed .DesignedButton__button.LoadMoreButton,
html:not(.asta-theme-dark) body .spotlight-instagram-feed .FeedLoadMoreButton__btn,
html.asta-theme-dark body .spotlight-instagram-feed .DesignedButton__button.LoadMoreButton,
html.asta-theme-dark body .spotlight-instagram-feed .FeedLoadMoreButton__btn {
  background-color: #242038 !important;
  color: #c4b5fd !important;
  border: 1px solid rgba(167, 139, 250, 0.3) !important;
  border-radius: 8px !important;
}

html body .spotlight-instagram-feed .DesignedButton__button.LoadMoreButton span {
  color: inherit !important;
}

/* The pointer state keeps the design and adds an outline, so a hover can never
   introduce a pair the resting state was fixed to avoid. */
html body .spotlight-instagram-feed .DesignedButton__button:hover,
html body .spotlight-instagram-feed .DesignedButton__button:focus-visible {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}
