/* brainpower-austria.at - das komplette Stylesheet
   Idee: ein Nachschlage-Ordner. Jede Kategorie ist ein Register mit eigener
   Farbe (--kat); die Navigation sind die Registerlaschen, jeder Beitrag
   trägt die Lasche seines Fachs. Sonst ruhig: weißes Papier, Tinte, eine Serife
   zum Lesen, eine Grotesk zum Finden. */

@font-face { font-family: "Schibsted Grotesk"; src: url(/fonts/schibsted-grotesk.woff2) format("woff2"); font-weight: 400 900; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url(/fonts/source-serif-4.woff2) format("woff2"); font-weight: 400 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Source Serif 4"; src: url(/fonts/source-serif-4-italic.woff2) format("woff2"); font-weight: 400 700; font-style: italic; font-display: swap; }

:root {
  --papier: #ffffff;
  --flaeche: #eef2f1;
  --tinte: #16262b;
  --grau: #56666b;
  --linie: #d3dcdb;
  --petrol: #0e5a63;
  --rot: #c8102e;
  --kat: var(--petrol);
  --grotesk: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;
  --breite: 1200px;
  --rand: 16px;
}
@media (min-width: 700px) { :root { --rand: 28px; } }
body.schmal { --breite: 920px; }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--papier); color: var(--tinte);
  font: 400 1.0625rem/1.6 var(--grotesk);
  /* Regel 7.11: keine automatische Trennung. "manual" statt "none", damit die
     gepflegten Fugen aus scripts/trennung.py (&shy;) am Handy greifen. */
  hyphens: manual; overflow-wrap: normal;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--kat); outline-offset: 2px; border-radius: 2px;
}
.huelle { max-width: var(--breite); margin: 0 auto; padding: 0 var(--rand); }
.sprung { position: absolute; left: -999px; top: 0; background: var(--tinte); color: #fff; padding: 8px 14px; z-index: 10; }
.sprung:focus { left: 8px; }

/* ---------- Kopf: Wortmarke und Registerlaschen ---------- */
.kopf { border-bottom: 1px solid var(--linie); }
.kopf-zeile { display: flex; align-items: baseline; gap: 10px 28px; flex-wrap: wrap; padding-top: 26px; padding-bottom: 18px; }
.marke { text-decoration: none; display: inline-flex; flex-direction: column; line-height: .9; position: relative; padding-top: 9px; }
.marke::before { content: ""; position: absolute; top: 0; left: 0; width: 38px; height: 4px; background: var(--rot); box-shadow: 0 -0px 0 0 var(--rot); }
.marke-wort { font-weight: 850; font-size: 1.85rem; letter-spacing: -.02em; }
.marke-land { font-weight: 500; font-size: .95rem; letter-spacing: .01em; color: var(--grau); margin-top: 4px; }
.claim { margin: 0; font: 500 1rem/1.35 var(--grotesk); color: var(--grau); max-width: 52ch; }
body.breit .claim { font-size: 1.05rem; }

.register ul {
  list-style: none; margin: 0; padding: 0; display: flex; gap: 4px;
  overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
}
.register ul::-webkit-scrollbar { display: none; }
.register li { flex: 0 0 auto; }
.register a {
  display: block; text-decoration: none; white-space: nowrap;
  font-weight: 600; font-size: .9375rem; color: var(--tinte);
  padding: 9px 14px 8px; background: var(--flaeche);
  border-top: 5px solid var(--kat); border-radius: 7px 7px 0 0;
  margin-top: 6px; transition: margin-top .15s, padding-bottom .15s;
}
.register a:hover { margin-top: 0; padding-bottom: 14px; }
.register a[aria-current="page"] { background: var(--kat); color: #fff; margin-top: 0; padding-bottom: 14px; }
.register-extra a { border-top-color: var(--tinte); background: transparent; }
body.schmal .register a { padding-left: 10px; padding-right: 10px; font-size: .875rem; }
@media (prefers-reduced-motion: reduce) { .register a { transition: none; } }

main { display: block; padding-bottom: 72px; }

/* ---------- Lasche (Kategorie-Etikett) ---------- */
.lasche {
  display: inline-block; text-decoration: none; font: 700 .8125rem/1 var(--grotesk);
  color: #fff; background: var(--kat); padding: 5px 9px 4px; border-radius: 4px 4px 0 0;
}
a.lasche:hover { text-decoration: underline; }

/* ---------- Startseite ---------- */
.abschnitt-titel { font-size: .95rem; font-weight: 700; color: var(--grau); margin: 0 0 14px; }
.neu { padding-top: 34px; }
.neu-raster { display: grid; gap: 28px 40px; }
@media (min-width: 900px) { .neu-raster { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); } }
.aufmacher-bild img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 5px solid var(--kat); }
.aufmacher .lasche { margin-top: 18px; }
.aufmacher h3 { font-size: clamp(1.6rem, 1.1rem + 1.9vw, 2.35rem); line-height: 1.12; letter-spacing: -.015em; font-weight: 800; margin: 10px 0 12px; }
.aufmacher h3 a, .neu-liste h3 a, .karte h3 a, .zeile h2 a, .zeile h3 a { text-decoration: none; }
.aufmacher h3 a:hover, .neu-liste h3 a:hover, .karte h3 a:hover, .zeile h2 a:hover, .zeile h3 a:hover { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--kat); }
.aufmacher p { font: 400 1.125rem/1.55 var(--serif); margin: 0 0 10px; max-width: 62ch; }
time { font-size: .875rem; color: var(--grau); }
.neu-liste { list-style: none; margin: 0; padding: 0; }
.neu-liste li { padding: 16px 0 16px; border-top: 1px solid var(--linie); }
.neu-liste li:first-child { border-top: 0; padding-top: 0; }
.neu-liste h3 { font-size: 1.1875rem; line-height: 1.25; font-weight: 700; margin: 8px 0 4px; }

.fach { margin-top: 64px; }
.fach-kopf { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap; border-bottom: 3px solid var(--kat); margin-bottom: 22px; }
.fach-kopf h2 { margin: 0; font-size: 1.375rem; font-weight: 800; letter-spacing: -.01em; }
.fach-kopf h2 a {
  display: inline-block; text-decoration: none; color: #fff; background: var(--kat);
  padding: 9px 16px 7px; border-radius: 8px 8px 0 0;
}
.fach-alle { font-weight: 600; font-size: .9375rem; padding-bottom: 8px; color: var(--kat); text-underline-offset: 3px; }

.karten { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px 28px; }
@media (min-width: 640px) { .karten { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 960px) { .karten { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.karte-bild { display: block; margin-bottom: 12px; }
.karte-bild img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 4px solid var(--kat); }
.karte-ohne { aspect-ratio: 16 / 9; background: var(--flaeche); border-bottom: 4px solid var(--kat); display: flex; align-items: flex-end; padding: 14px; text-decoration: none; }
.karte-ohne span { font-weight: 700; color: var(--kat); }
.karte h3 { font-size: 1.1875rem; line-height: 1.25; font-weight: 700; margin: 0 0 6px; }
.karte p { font: 400 1rem/1.5 var(--serif); color: #2c3c41; margin: 0; }
.titelzeilen { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 0 28px; }
@media (min-width: 640px) { .titelzeilen { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.titelzeilen li { border-top: 1px solid var(--linie); }
.titelzeilen a { display: block; padding: 11px 0; text-decoration: none; font-weight: 600; line-height: 1.3; }
.titelzeilen a:hover { text-decoration: underline; text-decoration-color: var(--kat); }

/* ---------- Übersichten (Kategorie, Archiv) ---------- */
.seitenkopf { padding: 38px 0 8px; border-bottom: 3px solid var(--kat); margin-bottom: 8px; }
.seitenkopf h1 { margin: 0 0 6px; font-size: clamp(2rem, 1.4rem + 2.4vw, 3rem); line-height: 1.05; letter-spacing: -.02em; font-weight: 850; color: var(--kat); }
.seitenkopf p { margin: 0 0 14px; color: var(--grau); }
.zeilen { list-style: none; margin: 0; padding: 0; }
.zeile { display: grid; grid-template-columns: minmax(0, 1fr) 34%; gap: 16px; padding: 22px 0; border-bottom: 1px solid var(--linie); }
@media (min-width: 700px) { .zeile { grid-template-columns: minmax(0, 1fr) 220px; gap: 32px; } }
.zeile:not(:has(.zeile-bild)) { grid-template-columns: minmax(0, 1fr); }
.zeile .lasche { margin-bottom: 8px; }
.zeile h2, .zeile h3 { margin: 0 0 6px; font-size: 1.25rem; line-height: 1.25; font-weight: 700; }
.zeile p { font: 400 1rem/1.5 var(--serif); color: #2c3c41; margin: 0 0 6px; max-width: 70ch; }
.zeile-bild img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 3px solid var(--kat); }
.jahr h2 { font-size: 1.75rem; font-weight: 850; margin: 44px 0 0; padding-bottom: 6px; border-bottom: 2px solid var(--tinte); }

/* ---------- Beitrag ---------- */
.beitrag-kopf { padding: 30px 0 22px; }
.pfad { font-size: .9rem; color: var(--grau); margin-bottom: 14px; }
.pfad a { color: var(--kat); font-weight: 600; text-underline-offset: 3px; }
.beitrag-kopf h1 {
  margin: 0; font-size: clamp(1.875rem, 1.2rem + 2.6vw, 2.875rem); line-height: 1.1;
  letter-spacing: -.02em; font-weight: 850; padding-left: 18px; border-left: 6px solid var(--kat);
}
.beizeile { margin: 14px 0 0; color: var(--grau); font-size: .9375rem; }
.beizeile time { font-size: inherit; }
.titelbild { margin: 0 0 28px; }
.titelbild img { width: 100%; }

.inhalt { font: 400 1.1875rem/1.68 var(--serif); }
@media (max-width: 600px) {
  .inhalt { font-size: 1.0625rem; }
  .inhalt h2 { font-size: 1.3125rem; }
  .inhalt h3 { font-size: 1.125rem; }
}
.inhalt > * { margin-top: 0; margin-bottom: 1.05em; }
.inhalt h2, .inhalt h3, .inhalt h4 { font-family: var(--grotesk); line-height: 1.22; letter-spacing: -.01em; }
.inhalt h2 { font-size: 1.625rem; font-weight: 800; margin: 1.9em 0 .55em; }
.inhalt h3 { font-size: 1.25rem; font-weight: 700; margin: 1.5em 0 .45em; }
.inhalt h4 { font-size: 1.0625rem; font-weight: 700; margin: 1.3em 0 .4em; }
.inhalt a { color: var(--petrol); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.inhalt a:hover { text-decoration-thickness: 2px; }
.inhalt ul, .inhalt ol { padding-left: 1.3em; }
.inhalt li { margin-bottom: .35em; }
.inhalt li::marker { color: var(--kat); }
.inhalt strong { font-weight: 650; }
.inhalt blockquote { margin-left: 0; padding-left: 20px; border-left: 3px solid var(--linie); font-style: italic; }
.inhalt figure { margin: 1.6em 0; }
.inhalt figcaption { font: italic 400 .9375rem/1.45 var(--serif); color: var(--grau); margin-top: 8px; }
.inhalt .bild-left, .inhalt .bild-right { max-width: min(360px, 100%); }
@media (min-width: 700px) {
  .inhalt .bild-left { float: left; margin: .3em 26px 14px 0; }
  .inhalt .bild-right { float: right; margin: .3em 0 14px 26px; }
}
.inhalt .bild-center { margin-left: auto; margin-right: auto; }
.inhalt h2, .inhalt h3, .inhalt .tabelle-rahmen, .inhalt aside { clear: both; }
.inhalt hr { border: 0; border-top: 1px solid var(--linie); margin: 2em 0; }

.hinweis {
  display: block; background: var(--flaeche); border-left: 5px solid var(--kat);
  padding: 16px 20px; margin: 1.5em 0; font-size: 1.0625rem;
}
.hinweis > :first-child { margin-top: 0; }
.hinweis > :last-child { margin-bottom: 0; }

.tabelle-rahmen { overflow-x: auto; margin: 1.5em 0; border: 1px solid var(--linie); }
.inhalt table { border-collapse: collapse; width: 100%; font: 400 .9688rem/1.45 var(--grotesk); font-variant-numeric: tabular-nums; }
.inhalt th, .inhalt td { padding: 10px 12px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--linie); }
.inhalt thead th { background: var(--petrol); color: #fff; font-weight: 650; border-bottom: 0; }
.inhalt tbody tr:nth-child(even) { background: #f6f8f8; }
.inhalt tbody th { font-weight: 650; }
.inhalt tbody tr:last-child td, .inhalt tbody tr:last-child th { border-bottom: 0; }

.video { position: relative; aspect-ratio: 16 / 9; margin: 1.6em 0; background: var(--flaeche); }
.video iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

.weiterlesen { margin-top: 64px; padding-top: 22px; border-top: 3px solid var(--kat); }
.weiterlesen h2 { font-size: 1.25rem; font-weight: 800; margin: 0 0 20px; }
.weiterlesen .karte h3 { font-size: 1.0625rem; }

/* ---------- Fehler ---------- */
.fehler { padding-top: 48px; }
.fehler h1 { font-size: 2.25rem; font-weight: 850; margin: 0 0 12px; }

/* ---------- Fuß ---------- */
.fuss { background: var(--tinte); color: #e3eaea; padding: 44px 0 26px; }
.fuss .marke-land { color: #a9b8ba; }
.fuss-spalten { display: grid; gap: 30px; }
@media (min-width: 800px) { .fuss-spalten { grid-template-columns: 1fr 2fr 1fr; } }
.fuss h2 { font-size: .95rem; font-weight: 700; color: #fff; margin: 4px 0 12px; }
.fuss ul { list-style: none; margin: 0; padding: 0; }
.fuss li { margin-bottom: 7px; }
.fuss a { color: #e3eaea; text-decoration: none; }
.fuss a:hover { text-decoration: underline; }
.fuss-themen { columns: 2; column-gap: 24px; }
.fuss-themen li { padding-left: 12px; border-left: 4px solid var(--kat); break-inside: avoid; }
.fuss-unten { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 36px; padding-top: 16px; border-top: 1px solid #34474c; font-size: .9rem; color: #a9b8ba; }

/* Nackte Adressen als Linktext: nur diese dürfen mitten im Wort umbrechen */
.inhalt .url { overflow-wrap: anywhere; }

/* ---------- Burgermenü (Handy und schmale Tablets) ----------
   Unter 860 px weichen die Registerlaschen einem Menüknopf rechts in der
   Kopfzeile. Ohne JavaScript bleibt die Liste einfach offen sichtbar. */
.menue-knopf, .nav-lang { display: none; }
@media (max-width: 859px) {
  .kopf-zeile { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 8px 16px; padding-top: 18px; padding-bottom: 14px; }
  .claim { grid-column: 1 / -1; grid-row: 2; font-size: .95rem; }
  .js .menue-knopf {
    display: inline-flex; align-items: center; gap: 9px; grid-column: 2; grid-row: 1;
    font: 600 .9375rem/1 var(--grotesk); color: var(--tinte);
    background: var(--flaeche); border: 0; border-radius: 7px; padding: 11px 13px; cursor: pointer;
  }
  .menue-striche, .menue-striche::before, .menue-striche::after {
    display: block; width: 20px; height: 2px; background: var(--tinte); border-radius: 1px;
    transition: transform .2s, background-color .2s;
  }
  .menue-striche { position: relative; }
  .menue-striche::before, .menue-striche::after { content: ""; position: absolute; left: 0; }
  .menue-striche::before { top: -6px; }
  .menue-striche::after { top: 6px; }
  .menue-knopf[aria-expanded="true"] .menue-striche { background: transparent; }
  .menue-knopf[aria-expanded="true"] .menue-striche::before { transform: translateY(6px) rotate(45deg); }
  .menue-knopf[aria-expanded="true"] .menue-striche::after { transform: translateY(-6px) rotate(-45deg); }

  .js .register { display: none; }
  .js .register.offen { display: block; border-top: 1px solid var(--linie); }
  .register ul { flex-direction: column; gap: 0; overflow: visible; padding: 6px 0 14px; }
  .register a, body.schmal .register a, .register a:hover {
    margin: 0; padding: 12px 12px 12px 14px; border-top: 0; border-left: 6px solid var(--kat);
    border-radius: 0; background: transparent; font-size: 1.0625rem;
  }
  .register li + li a { border-top: 1px solid var(--linie); }
  .register a[aria-current="page"] { background: var(--kat); color: #fff; padding-bottom: 12px; }
  .register-extra a { border-left-color: var(--tinte); }
  .nav-kurz { display: none; }
  .nav-lang { display: inline; }
}
@media (prefers-reduced-motion: reduce) {
  .menue-striche, .menue-striche::before, .menue-striche::after { transition: none; }
}

/* ---------- Suche im Kopf ---------- */
.nur-vorlesen { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.suche { position: relative; margin-left: auto; align-self: center; flex: 0 0 300px; }
@media (min-width: 860px) {
  /* Kopfzeile bleibt einzeilig: der Claim bricht in sich um, das Suchfeld bleibt rechts */
  .kopf-zeile { flex-wrap: nowrap; }
  .claim { flex: 1 1 auto; min-width: 0; }
  body.schmal .suche { flex-basis: 260px; }
}
.suche-lupe { position: absolute; left: 12px; top: 50%; width: 17px; height: 17px; transform: translateY(-50%); color: var(--grau); pointer-events: none; }
.suche input {
  width: 100%; font: 400 1rem/1.2 var(--grotesk); color: var(--tinte);
  padding: 11px 12px 11px 38px; background: var(--flaeche); border: 2px solid transparent; border-radius: 8px;
  -webkit-appearance: none; appearance: none;
}
.suche input::placeholder { color: #6f7d81; }
.suche input:focus { outline: none; border-color: var(--tinte); background: var(--papier); }
.suche-liste {
  position: absolute; z-index: 20; top: calc(100% + 6px); right: 0; width: max(100%, 420px);
  list-style: none; margin: 0; padding: 6px 0; background: var(--papier);
  border: 1px solid var(--linie); border-radius: 8px; box-shadow: 0 10px 28px rgba(22, 38, 43, .16);
  max-height: 70vh; overflow-y: auto;
}
.suche-liste a { display: block; padding: 9px 14px; text-decoration: none; color: var(--tinte); line-height: 1.3; }
.suche-treffer a { display: flex; gap: 10px; align-items: baseline; }
.suche-kat { flex: 0 0 auto; font-weight: 700; font-size: .75rem; color: #fff; background: var(--kat); padding: 3px 6px 2px; border-radius: 3px; }
.suche-titel { font-weight: 600; }
.suche-alle { border-top: 1px solid var(--linie); margin-top: 4px; }
.suche-alle a { color: var(--petrol); font-weight: 600; font-size: .9375rem; }
.suche-info { padding: 9px 14px; color: var(--grau); }
.suche-liste [aria-selected="true"] a, .suche-liste a:hover { background: var(--flaeche); }
.suche-knopf { display: none; }

@media (max-width: 859px) {
  .js .suche-knopf {
    display: inline-flex; align-items: center; justify-content: center; grid-column: 2; grid-row: 1;
    width: 44px; height: 42px; padding: 0; border: 0; border-radius: 7px; background: var(--flaeche); color: var(--tinte); cursor: pointer;
  }
  .suche-knopf svg { width: 19px; height: 19px; }
  .suche-knopf[aria-expanded="true"] { background: var(--tinte); color: #fff; }
  .js .menue-knopf { grid-column: 3; }
  .kopf-zeile { grid-template-columns: 1fr auto auto; gap: 8px 8px; }
  .suche { grid-column: 1 / -1; grid-row: 3; width: 100%; margin: 4px 0 0; }
  .js .suche { display: none; }
  .js .suche.offen { display: block; }
  .suche-liste { width: 100%; }
}
