/* Cityprint-Basis: ersetzt Automatic.css 2.8.1 (Plugin seit 03.12.2026 aus, Humberto: »Ja, ersetzen + abschalten«).
   Enthält nur, was auf den Cityprint-Seiten tatsächlich griff: gemessen auf 12 Seiten × 2 Breiten
   (24 ACSS-Regeln) plus die 10 ACSS-Variablen, die Bricks- und eigenes CSS benutzen (alle 93 Sitemap-Adressen
   durchsucht). Werte so übernommen, wie ACSS sie berechnet hat, damit sich nichts verschiebt.
   Eingebunden seitenweit über die Seiteneinstellungen des Fuß-Templates 2601. Diese Datei lädt später im
   <head> als ACSS es tat, deshalb stehen die Regeln in :where() (Spezifität 0): Sie greifen nur dort, wo
   sonst nichts greift, wie vorher ACSS. */

:root {
  --gutter: clamp(2.4rem, calc(0.5736137667vw + 2.2164435946rem), 3rem);
  --space-xs: clamp(1.2003625095rem, calc(0.2868935252vw + 1.1085565814rem), 1.5004531368rem);
  --space-s: clamp(1.6973125884rem, calc(0.4056674446vw + 1.5674990061rem), 2.1216407355rem);
  --space-m: clamp(2.4rem, calc(0.5736137667vw + 2.2164435946rem), 3rem);
  --space-l: clamp(3rem, calc(1.1873804971vw + 2.6200382409rem), 4.242rem);
  --text-xs: 1.1rem;
  --text-m: clamp(1.6rem, calc(0.1912045889vw + 1.5388145315rem), 1.8rem);
  --text-xl: clamp(2.304rem, calc(0.8550671128vw + 2.0303785239rem), 3.1984002rem);
  --grid-2: repeat(2, minmax(0, 1fr));
  --grid-5: repeat(5, minmax(0, 1fr));
  --section-space-m: clamp(7.2rem, calc(4.5889101338vw + 5.7315487572rem), 12rem);
  --section-padding-x: clamp(2.4rem, calc(0.5736137667vw + 2.2164435946rem), 3rem);
  /* Überschriften-Skala (ACSS h1–h6), Zeilenabstand überall 1,2 */
  --h1: clamp(2.7648rem, calc(1.4327604843vw + 2.306316645rem), 4.2634674666rem);
  --h2: clamp(2.304rem, calc(0.8550671128vw + 2.0303785239rem), 3.1984002rem);
  --h3: clamp(1.92rem, calc(0.4583173996vw + 1.7733384321rem), 2.3994rem);
  --h4: clamp(1.6rem, calc(0.1912045889vw + 1.5388145315rem), 1.8rem);
  --h5: 1.2rem;
  --h6: 1.1rem;
  --black: #000;
  --white: #fff;
}

/* Grundlagen */
html { font-size: 62.5% !important; }
:where(*, ::before, ::after) { box-sizing: border-box; }
:where(body) { min-block-size: 100vh; color: #000; background-color: #fff; font-size: var(--text-m); line-height: 1.5; }
/* Fokusrahmen beim Tabben: 2 px in Textfarbe, wie bisher */
:where(body.bricks-is-frontend :focus-visible) { outline-style: solid; outline-color: currentcolor; outline-width: .2rem; outline-offset: .25em; }
:where(input, button, textarea, select) { font: inherit; }
:where(dd) { margin-inline-start: 0; }

/* Links erben Farbe, Gewicht und Unterstreichung (ACSS: Variablen ohne Wert, also »erben«) */
:where(body a) { color: inherit; font-weight: inherit; text-decoration: inherit; text-underline-offset: 0; }

/* Textblöcke ohne Außenabstand, Abstände kommen aus Bricks */
:where(body :is(p, h1, h2, h3, h4, h5, h6, ul, ol, li)) { margin: 0; }

/* Überschriften */
/* Farbe: ACSS verwies auf eine undefinierte Variable, Überschriften erbten daher die Farbe ihrer Umgebung */
:where(h1, h2, h3, h4, h5, h6) { text-wrap: balance; color: inherit; line-height: 1.2; }
:where(h1) { font-size: var(--h1); }
:where(h2) { font-size: var(--h2); }
:where(h3) { font-size: var(--h3); }
:where(h4) { font-size: var(--h4); }
:where(h5) { font-size: var(--h5); }
:where(h6) { font-size: var(--h6); }
:where(h1 a, h2 a, h3 a, h4 a, h5 a, h6 a) { font-weight: inherit; text-decoration: inherit; color: currentcolor; text-underline-offset: 0; }

/* Äußere Sektionen: Innenabstand wie bisher */
:where(section:not(section section)) { padding-block: var(--section-space-m); padding-inline: var(--section-padding-x); }

/* Fließtext (Rich Text / Beitragsinhalt) */
:where(body .brxe-text, body .brxe-post-content:not([data-source="bricks"])) * + :where(p) { margin-block-start: 1em; }
:where(body .brxe-text, body .brxe-post-content:not([data-source="bricks"])) * + :where(li) { margin-block-start: .5em; }
:where(body .brxe-text, body .brxe-post-content:not([data-source="bricks"])) * + :where(h1, h2, h3, h4, h5, h6) { margin-block-start: 1.5em; }
:where(body .brxe-text, body .brxe-post-content:not([data-source="bricks"])) * + :where(ul, ol) { margin-block-start: 1em; }

/* »Zum Inhalt springen«: unsichtbar, beim Tabben Magenta-Knopf oben links
   (ACSS verwies hier auf eine undefinierte Farbe, der Link war beim Fokus durchsichtig) */
.skip-link {
  position: absolute; z-index: 100000;
  inset-block-start: 1rem; inset-inline-start: 1rem;
  transform: translateY(-250%);
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 0 20px;
  background: #e6007e; color: #fff;
  font-size: 16px; font-weight: 700; line-height: 1.2; text-decoration: none;
  border-radius: 0;
}
.skip-link:focus, .skip-link:focus-visible { transform: none; outline: 2px solid #1d1d1b; outline-offset: 2px; }

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

/* ---------- Produktraster: nie eine Kachel allein in der letzten Reihe (03.12.2026) ----------
   Humberto: »finde eine lösung, so dass am ende nicht eine kachel alleine steht« (Fotogeschenke: 10 Kacheln).
   Gilt für die Kategorieseiten (Vorlage 846, e77e91) und Produkte (brzwja, Entwurf 87aa38), alle 3/2/1 Spalten.
   Bleibt rechnerisch eine Kachel übrig, wird die erste Kachel doppelt breit (Bild im Querformat, gleiche Höhe).
   03.12. Fix: auch das img selbst auf 2,9 : 1, sonst bleibt es 4 : 3 und ragt über die nächste Reihe (/produkte/). */
@media (min-width: 992px) {
  :is(#brxe-e77e91, #brxe-brzwja, #brxe-87aa38):has(> .cp-andruck:last-child:nth-child(3n+1)) > .cp-andruck:first-child { grid-column: span 2; }
  :is(#brxe-e77e91, #brxe-brzwja, #brxe-87aa38):has(> .cp-andruck:last-child:nth-child(3n+1)) > .cp-andruck:first-child .cp-andruck-bild { aspect-ratio: 2.9 / 1 !important; }
  :is(#brxe-e77e91, #brxe-brzwja, #brxe-87aa38):has(> .cp-andruck:last-child:nth-child(3n+1)) > .cp-andruck:first-child .cp-andruck-bild img { aspect-ratio: 2.9 / 1 !important; height: auto !important; }
}
@media (min-width: 768px) and (max-width: 991px) {
  :is(#brxe-e77e91, #brxe-brzwja, #brxe-87aa38):has(> .cp-andruck:last-child:nth-child(odd)) > .cp-andruck:first-child { grid-column: 1 / -1; }
  :is(#brxe-e77e91, #brxe-brzwja, #brxe-87aa38):has(> .cp-andruck:last-child:nth-child(odd)) > .cp-andruck:first-child .cp-andruck-bild { aspect-ratio: 2.9 / 1 !important; }
  :is(#brxe-e77e91, #brxe-brzwja, #brxe-87aa38):has(> .cp-andruck:last-child:nth-child(odd)) > .cp-andruck:first-child .cp-andruck-bild img { aspect-ratio: 2.9 / 1 !important; height: auto !important; }
}
/* Nur eine Kachel in der Kategorie (Merchandise, Scans, Werbetechnik): volle Breite, Bild links, Titel rechts */
@media (min-width: 768px) {
  :is(#brxe-e77e91, #brxe-brzwja, #brxe-87aa38):has(> .cp-andruck:only-child:last-child:nth-child(1)) > .cp-andruck:only-child:first-child {
    grid-column: 1 / -1; flex-direction: row !important; align-items: center; gap: clamp(24px, 3vw, 48px); padding: 16px !important;
  }
  :is(#brxe-e77e91, #brxe-brzwja, #brxe-87aa38):has(> .cp-andruck:only-child:last-child:nth-child(1)) > .cp-andruck:only-child:first-child .cp-andruck-bild {
    flex: 0 0 58%; width: 58% !important; aspect-ratio: 4 / 3 !important; margin: 0 !important;
  }
  :is(#brxe-e77e91, #brxe-brzwja, #brxe-87aa38) > .cp-andruck:only-child :is(h2, h3) { margin: 0 !important; font-size: var(--cp-t-kopf, clamp(28px, 2.6vw, 40px)) !important; line-height: 1.1 !important; }
}
