/* Intern-Portal – gleiche Farben wie die Website, schlicht und handytauglich */
:root {
  --feuerrot: #a72920;
  --tiefrot: #6b1712;
  --weiss: #ffffff;
  --beton: #e6e8ea;
  --beton-hell: #f3f4f5;
  --graphit: #23272b;
  --grau: #5d646b;
  --linie: #c9cdd1;
  --gruen: #2e7d32;
  --blau: #1f5fa8;
  --schrift-kopf: "Bahnschrift", "DIN Alternate", "D-DIN", "Roboto Condensed", "Arial Narrow", sans-serif;
  --schrift-text: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --breite: 64rem;
  --rand: clamp(1rem, 4vw, 2rem);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; }
body { margin: 0; background: var(--beton-hell); color: var(--graphit); font: 1rem/1.6 var(--schrift-text); }
img { max-width: 100%; height: auto; }
a { color: var(--feuerrot); text-underline-offset: 0.18em; }
a:hover { color: var(--tiefrot); }
:focus-visible { outline: 3px solid var(--feuerrot); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--schrift-kopf); font-stretch: condensed; line-height: 1.15; margin: 0 0 0.5rem; }
h1 { font-size: clamp(1.7rem, 4.5vw, 2.4rem); }
h2 { font-size: 1.35rem; }
h3 { font-size: 1.1rem; }
[hidden] { display: none !important; }

.sprung { position: absolute; left: -999px; top: 0.5rem; background: var(--weiss); padding: 0.5rem 1rem; z-index: 10; }
.sprung:focus { left: 0.5rem; }
.unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.leise { color: var(--grau); }
.klein { font-size: 0.88rem; }
.laden { padding: 3rem var(--rand); text-align: center; color: var(--grau); }

/* Kopf */
.kopf { background: var(--weiss); border-bottom: 4px solid var(--feuerrot); position: sticky; top: 0; z-index: 5; }
.kopf__innen { max-width: var(--breite); margin: 0 auto; padding: 0.5rem var(--rand); display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; justify-content: space-between; }
.marke { display: flex; align-items: center; gap: 0.6rem; color: var(--graphit); text-decoration: none; }
.marke img { width: 32px; height: 32px; }
.marke span { display: grid; line-height: 1.15; }
.marke__name { font-family: var(--schrift-kopf); font-stretch: condensed; font-size: 1.15rem; }
.marke__zusatz { color: var(--grau); font-size: 0.82rem; }
.nav { display: flex; gap: 0.25rem; overflow-x: auto; }
.nav a { padding: 0.45rem 0.7rem; color: var(--graphit); text-decoration: none; font-weight: 600; border-radius: 2px; white-space: nowrap; }
.nav a:hover { background: var(--beton-hell); }
.nav a[aria-current] { background: var(--feuerrot); color: var(--weiss); }

main { display: block; max-width: var(--breite); margin: 0 auto; padding: 1.25rem var(--rand) 3rem; }
main:focus, main:focus-visible { outline: none; }

/* Bausteine */
.kopfzeile { margin-bottom: 1.25rem; }
.spalten { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); gap: 1.5rem 2rem; align-items: start; }
.abschnitt-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; border-bottom: 2px solid var(--graphit); margin-bottom: 0.5rem; }
.abschnitt-kopf h2 { margin: 0 0 0.3rem; }
.zwischen { margin: 1.5rem 0 0.4rem; font-size: 1.1rem; color: var(--grau); }
.karte { background: var(--weiss); padding: 1.25rem 1.4rem; border-top: 4px solid var(--beton); }
.karte--fehler { border-top-color: var(--feuerrot); }
.leer { color: var(--grau); padding: 1rem 0; }

.knopf {
  display: inline-block; padding: 0.6rem 1.1rem; border: 2px solid var(--feuerrot); background: var(--feuerrot); color: var(--weiss);
  font: 700 1rem var(--schrift-kopf); font-stretch: condensed; border-radius: 2px; cursor: pointer; text-decoration: none;
}
.knopf:hover { background: var(--tiefrot); border-color: var(--tiefrot); color: var(--weiss); }
.knopf:disabled { opacity: 0.6; cursor: wait; }
.knopf--linie { background: transparent; color: var(--graphit); border-color: var(--linie); }
.knopf--linie:hover { background: var(--beton); color: var(--graphit); border-color: var(--beton); }

/* Listen */
.liste { list-style: none; margin: 0; padding: 0; }
.liste > li + li { border-top: 1px solid var(--linie); }
.eintrag { display: grid; gap: 0.15rem; padding: 0.8rem 0.6rem; color: var(--graphit); text-decoration: none; background: var(--weiss); }
.liste > li:first-child .eintrag { border-top: 0; }
.eintrag:hover { background: #fafafa; }
.eintrag:hover .eintrag__titel { color: var(--feuerrot); text-decoration: underline; }
.eintrag--angeheftet { box-shadow: inset 4px 0 0 var(--feuerrot); }
.eintrag__meta { display: flex; flex-wrap: wrap; gap: 0.25rem 0.6rem; align-items: center; font-size: 0.85rem; color: var(--grau); }
.eintrag__meta .bereich { font-weight: 700; color: var(--feuerrot); }
.eintrag__titel { font-weight: 700; font-size: 1.08rem; line-height: 1.3; }
.eintrag__text { color: var(--grau); font-size: 0.95rem; }
.eintrag__anhang { font-size: 0.85rem; color: var(--grau); }
.marke-klein { display: inline-block; font-size: 0.72rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; padding: 0.05rem 0.4rem; border-radius: 2px; background: var(--beton); color: var(--graphit); }
.marke-klein--rot { background: var(--feuerrot); color: var(--weiss); }
.marke-klein--neu { background: var(--blau); color: var(--weiss); }

.kacheln { list-style: none; margin: 0.5rem 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr)); gap: 0.5rem; }
.kacheln a { display: block; padding: 0.7rem 0.8rem; background: var(--weiss); border-left: 4px solid var(--feuerrot); color: var(--graphit); font-weight: 600; text-decoration: none; }
.kacheln a:hover { background: var(--beton); }

.reiter { display: flex; gap: 0.35rem; flex-wrap: wrap; margin: 0.75rem 0 0; }
.reiter a { padding: 0.35rem 0.75rem; border: 1px solid var(--linie); background: var(--weiss); color: var(--graphit); text-decoration: none; border-radius: 999px; font-size: 0.92rem; }
.reiter a[aria-current] { background: var(--graphit); border-color: var(--graphit); color: var(--weiss); }

.schlagworte { display: flex; flex-wrap: wrap; gap: 0.3rem; margin: 0.4rem 0 0; }
.schlagwort { display: inline-block; font-size: 0.8rem; padding: 0.05rem 0.5rem; border-radius: 999px; background: var(--beton); color: var(--graphit); text-decoration: none; }
a.schlagwort:hover { background: var(--linie); }
.schlagwort--aktiv { background: var(--feuerrot); color: var(--weiss); }
.schlagwort small { opacity: 0.7; }
.umschalter { margin-top: 1.5rem; }

/* Suche */
.suche { display: flex; gap: 0.5rem; margin: 0.75rem 0 0; max-width: 40rem; }
.suche input { flex: 1; min-width: 0; }

/* Formulare */
input[type="email"], input[type="password"], input[type="search"], input[inputmode] {
  width: 100%; font: inherit; padding: 0.6rem 0.7rem; border: 1px solid var(--linie); border-radius: 2px; background: var(--weiss); color: var(--graphit);
}
input:focus { outline: 3px solid var(--feuerrot); outline-offset: 0; border-color: var(--feuerrot); }
.formular { display: grid; gap: 0.85rem; margin: 1rem 0; }
.formular label { display: grid; gap: 0.25rem; font-weight: 600; }
.schalter { display: flex; gap: 0.6rem; align-items: center; font-weight: 600; cursor: pointer; }
.schalter input { width: 1.2rem; height: 1.2rem; accent-color: var(--feuerrot); }
.meldung { padding: 0.6rem 0.8rem; border-left: 4px solid var(--grau); background: var(--beton-hell); margin: 0; }
.meldung--fehler { border-left-color: var(--feuerrot); background: #fbebeb; }
.meldung--ok { border-left-color: var(--gruen); background: #e5f4e4; }

.hinweis-karte { max-width: 40rem; margin: 1rem auto; border-top-color: var(--feuerrot); }
.hinweis-karte ul { padding-left: 1.2rem; }
.hinweis-karte li + li { margin-top: 0.35rem; }
.knoepfe { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0; }
.anmelden { max-width: 26rem; margin: 2rem auto; background: var(--weiss); padding: 2rem 1.6rem; border-top: 6px solid var(--feuerrot); }
.anmelden__logo { display: block; margin-bottom: 0.75rem; }

/* Artikel */
.artikel { background: var(--weiss); padding: clamp(1.1rem, 3vw, 2rem); max-width: 48rem; }
.artikel h1 { margin-top: 0.3rem; }
.zurueck { margin: 0 0 0.75rem; font-size: 0.92rem; }
.zurueck a { text-decoration: none; }
.vorspann { font-size: 1.1rem; color: var(--grau); }
.text { margin: 1rem 0; overflow-wrap: anywhere; }
.text h2 { margin-top: 1.6rem; }
.text h3 { margin-top: 1.3rem; }
.text blockquote { margin: 1rem 0; padding: 0.8rem 1.1rem; background: var(--beton-hell); border-left: 4px solid var(--feuerrot); }
.text img { display: block; margin: 1rem 0; }
.text .tabelle { overflow-x: auto; margin: 1rem 0; }
.text table { border-collapse: collapse; min-width: 100%; font-size: 0.95rem; }
.text th, .text td { border: 1px solid var(--linie); padding: 0.4rem 0.6rem; text-align: left; vertical-align: top; }
.text th { background: var(--beton-hell); }
.text pre, .text code { font-family: ui-monospace, Consolas, monospace; font-size: 0.92em; background: var(--beton-hell); }
.text pre { padding: 0.8rem; overflow-x: auto; }
.anhaenge { margin: 1.5rem 0; padding: 1rem 1.2rem; background: var(--beton-hell); }
.anhaenge h2 { font-size: 1.1rem; }
.anhaenge ul { margin: 0; padding-left: 1.2rem; }
.anhaenge li + li { margin-top: 0.35rem; }

@media (max-width: 40rem) {
  .kopf__innen { padding-top: 0.4rem; padding-bottom: 0.3rem; }
  .nav { width: 100%; justify-content: space-between; }
  .nav a { flex: 1; text-align: center; padding: 0.45rem 0.3rem; }
  .suche { flex-wrap: wrap; }
  .suche input { flex: 1 1 100%; }
  .suche .knopf { flex: 1; }
}

@media print {
  .kopf, .suche, .reiter, .zurueck, .umschalter { display: none; }
  body, .artikel { background: #fff; }
}
