/* Stilbuch „Tafel“ – gemeinsame Grundlage aller Seiten von aimo-ai.de (Regeln: STILBUCH.md). */

/* Schriften: selbst gehostet, nur woff2, Subsets latin und latin-ext (Herkunft: vendor/README.md). */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/vendor/@fontsource-variable/bricolage-grotesque@5.3.0/files/bricolage-grotesque-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/vendor/@fontsource-variable/bricolage-grotesque@5.3.0/files/bricolage-grotesque-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/vendor/@fontsource-variable/atkinson-hyperlegible-next@5.3.0/files/atkinson-hyperlegible-next-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("/vendor/@fontsource-variable/atkinson-hyperlegible-next@5.3.0/files/atkinson-hyperlegible-next-latin-ext-wght-normal.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  /* Farben */
  --tafel: #2c4537;
  --tafel-tief: #1b2c22;
  --kreide: #f2f1ea;
  --kreide-leise: #d3dbd2;
  --kreidegelb: #f0cf5a;
  --grund: #eef0ec;
  --tinte: #1c2a22;
  --tinte-leise: #46544b;
  --linie: #cfd6cf;

  /* Schrift */
  --schrift-titel: "Bricolage Grotesque", "Atkinson Hyperlegible Next", system-ui, sans-serif;
  --schrift: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --gr-tafel: clamp(2.9rem, 7.4vw, 6.5rem);
  --gr-titel: clamp(2.4rem, 5vw, 4rem);
  --gr-h2: clamp(1.9rem, 3.2vw, 2.6rem);
  --gr-lead: clamp(1.125rem, 1.6vw, 1.3rem);
  --gr-kicker: 1.0625rem;
  --gr-h3: 1.125rem;
  --gr-kachel: 1.1875rem; /* Titel von Kachel und Karte */
  --gr-text: 1rem;
  --gr-klein: .9375rem;
  --gr-wortmarke: 1.375rem;

  /* Raster und Abstände */
  --breite: 1120px;
  --rand: clamp(20px, 5vw, 48px);
  --raum-1: 6px;
  --raum-2: 12px;
  --raum-3: 20px;
  --raum-4: 32px;
  --raum-5: 48px;
  --raum-6: 72px;
  --abschnitt: var(--raum-6);
  --ecke-button: 4px;
  --ecke-kachel: 6px;
  --ziel: 44px;
}

/* Grundlagen */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  color: var(--tinte);
  background: var(--grund);
  font-family: var(--schrift);
  font-size: var(--gr-text);
  line-height: 1.5;
  overflow-wrap: break-word;
}
h1, h2, h3, p, ul { margin: 0; }
h1, h2 { font-family: var(--schrift-titel); font-weight: 800; }
h2 { font-size: var(--gr-h2); line-height: 1.05; }
h3 { font-size: var(--gr-h3); font-weight: 700; line-height: 1.3; }
img { max-width: 100%; height: auto; }
:target { scroll-margin-top: var(--raum-4); }
/* Zwischentitel: Überschrift im h3-Stil, auch wenn die Gliederung ein h2 verlangt */
.themenliste :is(h2, h3), .text h2, .zwischentitel { font-family: var(--schrift); font-size: var(--gr-h3); font-weight: 700; line-height: 1.3; }
a { color: var(--tafel); text-decoration-thickness: max(1px, .0625rem); text-underline-offset: .15em; }
a:hover { text-decoration-thickness: max(3px, .1875rem); }
:focus-visible { outline: 3px solid var(--tafel); outline-offset: 3px; }
.tafel :focus-visible { outline-color: var(--kreidegelb); }
.wrap { width: min(var(--breite), 100% - 2 * var(--rand)); margin-inline: auto; }
.zusammen { white-space: nowrap; }

/* Tafel: Kopf, Bühne und Ablage */
.tafel { color: var(--kreide); background: var(--tafel); }
.tafel a { color: var(--kreide); }
.kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 var(--raum-4); padding-block: var(--raum-3); }
.wortmarke { min-height: var(--ziel); display: inline-flex; align-items: center; font-family: var(--schrift-titel); font-size: var(--gr-wortmarke); font-weight: 800; line-height: 1; text-decoration: none; }
.menue ul { display: flex; flex-wrap: wrap; gap: 0 var(--raum-3); padding: 0; list-style: none; }
.menue a { min-height: var(--ziel); display: inline-flex; align-items: center; font-weight: 600; text-decoration: none; }
.menue a:hover, .wortmarke:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 6px; }
.menue a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--kreidegelb); text-decoration-thickness: 3px; text-underline-offset: 6px; }

.buehne { padding-block: var(--raum-6); }
.buehne-schmal { padding-block: var(--raum-4) var(--raum-5); }
.kicker { margin-bottom: var(--raum-3); color: var(--kreidegelb); font-size: var(--gr-kicker); font-weight: 600; }
.tafel-titel, .seitentitel { line-height: .95; letter-spacing: -.03em; }
.tafel-titel { margin-bottom: var(--raum-4); font-size: var(--gr-tafel); }
.seitentitel { font-size: var(--gr-titel); }
.lead { max-width: 42em; font-size: var(--gr-lead); line-height: 1.45; }
.tafel .lead { color: var(--kreide-leise); }
.seitentitel + .lead { margin-top: var(--raum-3); }
.aktionen { display: flex; flex-wrap: wrap; align-items: center; gap: var(--raum-2) var(--raum-3); margin-top: var(--raum-4); }
.aktionen-hinweis { color: var(--kreide-leise); font-size: var(--gr-klein); }
/* Hinweiszeile auf der Tafel: Häkchen in Kreidegelb, erster Satz in Kreide, dann Fließtext und Link; kein Kasten */
.hinweiszeile { max-width: 42em; display: flex; align-items: flex-start; gap: var(--raum-2); margin-top: var(--raum-4); color: var(--kreide-leise); }
.hinweiszeile svg { width: 1.125em; height: 1.125em; flex: none; margin-top: .1875em; color: var(--kreidegelb); }
.hinweiszeile strong { display: block; color: var(--kreide); font-weight: 600; }

.ablage { height: 16px; background: var(--tafel-tief); }
.ablage .wrap { height: 100%; display: flex; align-items: center; justify-content: flex-end; gap: var(--raum-3); }
.kreide { width: 46px; height: 9px; border-radius: 3px; background: var(--kreide); transform: rotate(-4deg); }
.kreide-gelb { width: 30px; background: var(--kreidegelb); transform: rotate(3deg); }

/* Buttons: ohne Zusatz Zweit-Button, mit .haupt Haupt-Button; ein gedrückter Filter-Button sieht aus wie Haupt */
.button {
  min-height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0 22px;
  border: 2px solid var(--tinte);
  border-radius: var(--ecke-button);
  color: var(--tinte);
  background: transparent;
  font: inherit;
  font-weight: 800;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
}
.button:hover { color: var(--grund); background: var(--tinte); }
.button.haupt, .button[aria-pressed="true"] { border-color: var(--tafel); color: var(--kreide); background: var(--tafel); }
.button.haupt:hover, .button[aria-pressed="true"]:hover { border-color: var(--tafel-tief); background: var(--tafel-tief); }
.tafel .button { border-color: var(--kreide); color: var(--kreide); }
.tafel .button:hover { color: var(--tafel); background: var(--kreide); }
.tafel .button.haupt { border-color: var(--kreidegelb); color: var(--tafel-tief); background: var(--kreidegelb); }
.tafel .button.haupt:hover { border-color: var(--kreide); color: var(--tafel); background: var(--kreide); }

/* Abschnitte unter der Tafel */
.abschnitt { margin-top: var(--abschnitt); }
.abschnitt > h2 { margin-bottom: var(--raum-4); }
.abschnitt > h2:has(+ .abschnitt-text) { margin-bottom: var(--raum-2); }
.abschnitt-text { max-width: 42em; margin-bottom: var(--raum-4); color: var(--tinte-leise); }

/* Themenliste */
.themenliste { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: 24px 40px; padding: 0; list-style: none; }
.themenliste > li { position: relative; padding-left: calc(12px + var(--raum-2)); }
.themenliste > li::before { content: ""; position: absolute; top: calc((var(--gr-h3) * 1.3 - 12px) / 2); left: 0; width: 12px; height: 12px; background: var(--tafel); }
.themenliste :is(h2, h3) { margin-bottom: var(--raum-1); }
.themenliste p { color: var(--tinte-leise); }
.themenliste p + p { margin-top: var(--raum-1); }

/* Kacheln */
.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); gap: var(--raum-2); padding: 0; list-style: none; }
.kacheln > li { display: flex; }
.kachel {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: var(--raum-1);
  padding: var(--raum-3);
  border-bottom: 6px solid var(--tafel-tief);
  border-radius: var(--ecke-kachel);
  color: var(--kreide);
  background: var(--tafel);
  text-decoration: none;
}
.kachel-titel { font-family: var(--schrift-titel); font-size: var(--gr-kachel); font-weight: 800; line-height: 1.15; }
.kachel-text { color: var(--kreide-leise); font-size: var(--gr-klein); line-height: 1.4; }
.kachel.hervorgehoben .kachel-titel { color: var(--kreidegelb); }
.kachel:hover .kachel-titel { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

/* Filter: Reihe aus Buttons mit aria-pressed. Steht mit hidden im HTML; erst das Skript blendet ihn ein. */
.filter { display: flex; flex-wrap: wrap; gap: var(--raum-2); }
.filter[hidden] { display: none; }

/* Karten: Sammlung als Liste zum Runterscrollen. Je Eintrag links ein kleiner Screenshot (ohne Hintergrund, eigenes Format),
   rechts Kategorie, Titel, Text und Zugangskennzeichen; Einträge durch eine Linie getrennt. */
.karten { display: grid; gap: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--linie); }
.karten > li { display: flex; border-top: 1px solid var(--linie); padding: var(--raum-2) 0; }
.karten > li[hidden] { display: none; }
.karte { width: 100%; display: grid; grid-template-columns: 176px 1fr; column-gap: 24px; row-gap: 2px; align-items: start; color: var(--tinte); text-decoration: none; }
.karte > :not(.karte-vorschau) { grid-column: 2; }
.karte-vorschau { grid-column: 1; grid-row: 1 / span 6; display: block; width: auto; height: auto; max-width: 176px; max-height: 132px; border: 1px solid var(--linie); border-radius: 4px; }
.karte-kategorie, .karte-text { color: var(--tinte-leise); font-size: var(--gr-klein); line-height: 1.4; }
.karte-titel { font-family: var(--schrift-titel); font-size: var(--gr-kachel); font-weight: 800; line-height: 1.2; text-decoration: underline; text-decoration-color: var(--tafel); text-decoration-thickness: 1px; text-underline-offset: .15em; }
.karte:is(:hover, :focus-visible) .karte-titel { text-decoration-thickness: 3px; }
.karte-zugang { display: flex; align-items: center; gap: var(--raum-1); padding-top: var(--raum-1); font-size: var(--gr-klein); font-weight: 600; line-height: 1.3; }
.karte-zugang svg { width: 18px; height: 18px; flex: none; }
@media (max-width: 600px) { .karte { grid-template-columns: 112px 1fr; column-gap: 14px; } .karte-vorschau { max-width: 112px; max-height: 84px; } }

/* Fließtext-Seiten (Impressum, Datenschutz) */
.text { max-width: 760px; }
.text h2 { margin: var(--raum-4) 0 var(--raum-1); }
.text h2:first-child { margin-top: 0; }
.text p + p { margin-top: var(--raum-2); }
.hinweis { padding-left: var(--raum-3); border-left: 3px solid var(--tafel); }

/* Fuß */
.fuss { margin-top: var(--abschnitt); padding-bottom: var(--raum-5); }
.fuss-kontakt { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--raum-3) var(--raum-4); padding-bottom: var(--raum-3); }
.fuss-kontakt p { color: var(--tinte-leise); }
.fuss-name { color: var(--tinte); font-weight: 700; }
.fuss-wege { padding: 0; list-style: none; }
.fuss-wege a, .fuss-recht a { min-height: var(--ziel); display: inline-flex; align-items: center; }
.fuss-recht { display: flex; flex-wrap: wrap; align-items: center; gap: 0 var(--raum-3); padding-top: var(--raum-2); border-top: 1px solid var(--linie); color: var(--tinte-leise); font-size: var(--gr-klein); }

@media (max-width: 680px) {
  :root { --abschnitt: var(--raum-5); }
  .buehne { padding-block: var(--raum-4) var(--raum-5); }
  .kicker { margin-bottom: var(--raum-2); }
  .tafel-titel { margin-bottom: var(--raum-3); }
  .aktionen, .hinweiszeile { margin-top: var(--raum-3); }
  .fuss-wege { display: flex; flex-wrap: wrap; gap: 0 var(--raum-3); }
  .buehne-schmal { padding-block: var(--raum-3) var(--raum-4); }
  .kopf { padding-block: var(--raum-2); }
  p, li { hyphens: auto; -webkit-hyphens: auto; }
}
