/* pflegereform-rechner.de: ruhiges, barrierearmes Layout. Systemschrift, keine externen Ressourcen.
   Farbverteilung: Weiß (Fläche), Warmgrau (Strukturflächen), Petrol (Aktion). Abstände: 4/8-Raster. Schriftgewichte: 400/500/600. */
:root {
  --petrol: #1F5F6B;
  --petrol-dunkel: #164851;
  --petrol-hell: #E3EFF1;
  --tinte: #1B2A2E;
  --gedaempft: #43565B;
  --weiss: #FFFFFF;
  --warm: #F5F2ED;
  --linie: #C9C3B9;
  --akzent-bg: #FCEBD2;
  --akzent-text: #5B3000;
  --akzent-rand: #B4530A;
  --fehler: #9B1C1C;
  --radius: 8px;
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s6: 24px; --s8: 32px; --s12: 48px; --s16: 64px;
  --lesebreite: 38rem;
  --w-normal: 400; --w-mittel: 500; --w-fett: 600;
}

*, *::before, *::after { box-sizing: border-box; letter-spacing: 0; }

html {
  font-size: 18px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@media (min-width: 768px) { html { font-size: 19px; } }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: var(--w-normal);
  line-height: 1.6;
  color: var(--tinte);
  background: var(--weiss);
  overflow-wrap: break-word;
}

strong, b, th { font-weight: var(--w-fett); }
h1, h2, h3, h4 { line-height: 1.25; color: var(--petrol-dunkel); margin: var(--s8) 0 var(--s2); font-weight: var(--w-fett); }
h1 { font-size: 1.55rem; margin-top: 0; line-height: 1.2; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.2rem; }
h4 { font-size: 1.05rem; }
@media (min-width: 768px) { h1 { font-size: 2.1rem; } h2 { font-size: 1.6rem; } }

p, ul, ol, dl { margin: 0 0 var(--s4); }
ul, ol { padding-left: 1.3em; }
li { margin-bottom: var(--s2); }

a { color: var(--petrol); text-decoration: underline; text-underline-offset: 0.15em; text-decoration-thickness: 0.08em; }
a:hover { color: var(--petrol-dunkel); text-decoration-thickness: 0.14em; }

:focus-visible {
  outline: 3px solid var(--petrol-dunkel);
  outline-offset: 3px;
  box-shadow: 0 0 0 6px var(--weiss);
  border-radius: 4px;
}
[tabindex="-1"]:focus { outline: none; box-shadow: none; }
[tabindex="-1"]:focus-visible { outline: 3px solid var(--petrol-dunkel); outline-offset: 3px; }

.skip {
  position: absolute; left: var(--s2); top: -4rem; z-index: 100;
  background: var(--weiss); color: var(--petrol-dunkel); padding: var(--s3) var(--s4); border: 2px solid var(--petrol-dunkel);
}
.skip:focus { top: var(--s2); }

.wrap { width: 100%; max-width: 62rem; margin: 0 auto; padding: 0 var(--s4); }
.text { max-width: var(--lesebreite); }

/* Kopf */
.site-header { background: var(--weiss); border-bottom: 1px solid var(--linie); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 var(--s4); }
.brand { display: inline-flex; align-items: center; gap: var(--s3); min-height: 48px; font-weight: var(--w-fett); font-size: 1.05rem; color: var(--petrol-dunkel); text-decoration: none; }
.brand img { width: 32px; height: 32px; }
.site-nav { flex: 1 1 100%; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: space-between; }
.site-nav li { margin: 0; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 var(--s2); font-weight: var(--w-mittel); font-size: 0.95rem; }
.site-nav a:first-child { padding-left: 0; }
@media (min-width: 640px) {
  .site-nav { flex: 0 1 auto; }
  .site-nav ul { gap: var(--s2); }
  .site-nav a { min-height: 48px; padding: 0 var(--s3); font-size: 1rem; }
}

/* Einstieg: Weiß, ruhig. Petrol nur für Aktionen. */
.hero { background: var(--weiss); padding: var(--s4) 0 var(--s2); }
.hero h1 { max-width: 40rem; }
.hero .lead { max-width: var(--lesebreite); }
.hero .notice { max-width: var(--lesebreite); }
.hero .klein { margin: 0; display: none; }
@media (min-width: 640px) { .hero .klein { display: block; } }
.hero .lead { font-size: 1rem; }
@media (min-width: 640px) { .hero .lead { font-size: 1.12rem; } }
@media (min-width: 768px) { .hero { padding: var(--s12) 0 var(--s8); } }

/* Rechner-Bereich */
.rechner-sektion { background: var(--warm); padding: var(--s6) 0 var(--s12); border-top: 1px solid var(--linie); border-bottom: 1px solid var(--linie); scroll-margin-top: var(--s4); }
@media (min-width: 768px) { .rechner-sektion { padding: var(--s12) 0 var(--s16); } }

/* Bereiche */
main { display: block; }
.section { padding: var(--s8) 0; }
@media (min-width: 768px) { .section { padding: var(--s12) 0; } }
.section-warm { background: var(--warm); border-top: 1px solid var(--linie); border-bottom: 1px solid var(--linie); }
.crumbs { font-size: 0.9rem; padding: var(--s3) 0 0; color: var(--gedaempft); }
.crumbs ol { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: var(--s1) var(--s2); }
.crumbs li { margin: 0; }
.crumbs li + li::before { content: "\203A"; margin-right: var(--s2); }
.crumbs a { display: inline-block; padding: var(--s2) 0; }

.notice {
  background: var(--akzent-bg); color: var(--akzent-text); border-left: 4px solid var(--akzent-rand);
  padding: var(--s3) var(--s4); border-radius: 0 var(--radius) var(--radius) 0; margin: 0 0 var(--s4); font-size: 0.95rem;
}
.beruhigung { background: var(--petrol-hell); color: var(--petrol-dunkel); border-left: 4px solid var(--petrol); padding: var(--s3) var(--s4); border-radius: 0 var(--radius) var(--radius) 0; font-weight: var(--w-fett); max-width: var(--lesebreite); }
.klein { font-size: 0.9rem; color: var(--gedaempft); }
.lead { font-size: 1.12rem; }

/* Chips: nur Status, kein Schmuck */
.chip { display: inline-block; font-size: 0.85rem; font-weight: var(--w-fett); line-height: 1.3; padding: var(--s1) var(--s3); border-radius: var(--radius); border: 1px solid transparent; white-space: normal; }
.chip-geltend { background: var(--petrol-hell); color: var(--petrol-dunkel); border-color: var(--petrol); }
.chip-entwurf { background: var(--akzent-bg); color: var(--akzent-text); border-color: var(--akzent-rand); }
.chip-offen { background: #ECEAE5; color: #2E3A3D; border-color: #6B7479; }

/* Formular */
.rechner-karte { background: var(--weiss); color: var(--tinte); border: 1px solid var(--linie); border-radius: 12px; padding: var(--s6) var(--s4); max-width: 46rem; }
@media (max-width: 639px) { .rechner-karte { margin: 0 calc(-1 * var(--s4)); border-left: 0; border-right: 0; border-radius: 0; } }
@media (min-width: 640px) { .rechner-karte { padding: var(--s8); } }
.rechner-karte h2 { margin-top: 0; }
.field { margin: 0 0 var(--s6); border: 0; padding: 0; min-width: 0; }
.field[hidden] { display: none; }
label, legend { display: block; font-weight: var(--w-fett); margin-bottom: var(--s2); padding: 0; color: var(--tinte); }
.hint { font-size: 0.9rem; color: var(--gedaempft); margin: 0 0 var(--s2); }
.error { color: var(--fehler); font-weight: var(--w-fett); margin: var(--s2) 0 0; }
.error[hidden] { display: none; }
.error-summe { background: #FBE9E9; color: var(--fehler); border: 2px solid var(--fehler); padding: var(--s3) var(--s4); border-radius: var(--radius); margin: 0 0 var(--s6); }
.error-summe[hidden] { display: none; }
.error-summe p { margin: 0 0 var(--s2); font-weight: var(--w-fett); }
.error-summe ul { margin: 0; padding-left: 1.2em; }
.error-summe li { margin: 0 0 var(--s1); }
.error-summe a { color: var(--fehler); font-weight: var(--w-mittel); }
select, input[type="number"] {
  width: 100%; max-width: 28rem; min-height: 52px; padding: var(--s2) var(--s3); font: inherit; color: var(--tinte);
  background: var(--weiss); border: 2px solid #5E6D71; border-radius: var(--radius);
}
select { font-size: 1rem; }
.eingabe { position: relative; max-width: 14rem; }
.eingabe input[type="number"] { max-width: none; padding-right: 2.6rem; font-variant-numeric: tabular-nums; }
.einheit { position: absolute; right: var(--s4); top: 50%; transform: translateY(-50%); color: var(--gedaempft); font-weight: var(--w-fett); pointer-events: none; }
[aria-invalid="true"] { border-color: var(--fehler); }
.choices { display: grid; gap: var(--s2); }
@media (min-width: 560px) { .choices { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); } }
.choice { display: flex; align-items: center; gap: var(--s3); min-height: 52px; padding: var(--s2) var(--s4); border: 2px solid #5E6D71; border-radius: var(--radius); font-weight: var(--w-normal); cursor: pointer; background: var(--weiss); margin: 0; }
.choice:has(input:checked) { border-color: var(--petrol); background: var(--petrol-hell); font-weight: var(--w-mittel); }
.choice input { width: 24px; height: 24px; flex: 0 0 auto; margin: 0; accent-color: var(--petrol); }
.choice:focus-within { outline: 3px solid var(--petrol-dunkel); outline-offset: 2px; }
.privacy { background: var(--petrol-hell); color: var(--petrol-dunkel); border-radius: var(--radius); padding: var(--s3) var(--s4); font-size: 0.95rem; margin: 0 0 var(--s6); }
.actions { display: flex; flex-direction: column; gap: var(--s3); }
@media (min-width: 560px) { .actions { flex-direction: row; flex-wrap: wrap; } }

.btn {
  display: inline-flex; align-items: center; justify-content: center; text-align: center; min-height: 52px; padding: var(--s3) var(--s6);
  font: inherit; font-weight: var(--w-fett); color: var(--weiss); background: var(--petrol); border: 2px solid var(--petrol);
  border-radius: var(--radius); text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--petrol-dunkel); border-color: var(--petrol-dunkel); color: var(--weiss); }
.btn-sek { background: var(--weiss); color: var(--petrol-dunkel); border-color: var(--petrol); }
.btn-sek:hover { background: var(--petrol-hell); color: var(--petrol-dunkel); }

/* Ergebnis: auf der warmen Fläche, ohne Karte in der Karte */
.ergebnis { margin-top: var(--s8); max-width: 46rem; }
.ergebnis:empty { display: none; }
.ergebnis-inhalt > h2 { margin-top: 0; }
.ergebnis-inhalt > p { max-width: var(--lesebreite); }
.erg-block { margin: var(--s8) 0; }
.erg-block h3 { margin-top: 0; }
.erg-block > p, .schritte { max-width: var(--lesebreite); }

.blick { background: var(--weiss); border: 1px solid var(--linie); border-radius: 12px; padding: var(--s4); margin: var(--s6) 0; scroll-margin-top: var(--s4); }
.blick h3 { margin: 0 0 var(--s3); font-size: 1.05rem; color: var(--gedaempft); font-weight: var(--w-fett); }
.blick-liste { list-style: none; margin: 0 0 var(--s3); padding: 0; }
.blick-liste li { display: flex; flex-direction: column; gap: 0; margin: 0; padding: var(--s3) 0; border-top: 1px solid var(--linie); }
.blick-liste li:first-child { border-top: 0; padding-top: 0; }
.blick-titel { font-weight: var(--w-mittel); }
.blick-betrag { font-size: 1.5rem; font-weight: var(--w-fett); color: var(--petrol-dunkel); line-height: 1.25; font-variant-numeric: tabular-nums; }
.blick-sprung { margin: 0; padding-top: var(--s3); border-top: 1px solid var(--linie); font-size: 0.95rem; }
.blick-sprung a { display: inline-block; padding: var(--s2) var(--s3) var(--s2) 0; }
@media (min-width: 640px) {
  .blick-liste li { flex-direction: row; align-items: baseline; justify-content: space-between; gap: var(--s4); }
}

.karte { background: var(--weiss); border: 1px solid var(--linie); border-left: 4px solid var(--petrol); border-radius: var(--radius); padding: var(--s4); margin: 0 0 var(--s4); }
.karte-entwurf { border-left-color: var(--akzent-rand); }
.karte-offen { border-left-color: #6B7479; }
.karte-kopf { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: var(--s2) var(--s3); margin-bottom: var(--s2); }
.karte-titel { margin: 0; font-size: 1.1rem; }
.karte > p { max-width: var(--lesebreite); }
.karte > p:last-child { margin-bottom: 0; }
.betrag { font-size: 1.6rem; font-weight: var(--w-fett); color: var(--petrol-dunkel); line-height: 1.25; margin: 0 0 var(--s2); font-variant-numeric: tabular-nums; }
.frist { margin: 0 0 var(--s3); }
.frist strong { font-weight: var(--w-fett); }
.unsicher { background: var(--warm); border-radius: var(--radius); padding: var(--s3) var(--s4); font-size: 0.95rem; }

.vergleich { list-style: none; padding: 0; margin: 0 0 var(--s4); }
.vl { background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); padding: var(--s4); margin: 0 0 var(--s3); }
.vl > p:last-child { margin-bottom: 0; }
.vl-werte { display: grid; gap: var(--s2); margin: 0 0 var(--s3); }
@media (min-width: 640px) { .vl-werte { grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); } }
.vl-paar { background: var(--warm); border-radius: var(--radius); padding: var(--s2) var(--s3); }
.vl-paar dt { font-size: 0.875rem; font-weight: var(--w-fett); color: var(--gedaempft); }
.vl-paar dd { margin: 0; font-weight: var(--w-fett); font-variant-numeric: tabular-nums; }
.schritte { padding-left: 1.4em; }
.schritte li { margin-bottom: var(--s4); }

/* Anzeige: klar gekennzeichnet, ruhig gestaltet */
.ad { background: var(--warm); border: 1px solid #8A8377; border-radius: var(--radius); padding: var(--s4); margin: var(--s6) 0; max-width: var(--lesebreite); }
.ad-kopf { margin: 0 0 var(--s2); color: var(--gedaempft); font-size: 0.9rem; }
.ad-label { display: inline-block; background: var(--weiss); color: var(--tinte); border: 1px solid var(--tinte); font-weight: var(--w-fett); font-size: 0.875rem; line-height: 1.3; padding: 0 var(--s2); border-radius: 4px; margin-right: var(--s1); }
.ad-titel { margin: 0 0 var(--s2); font-size: 1.1rem; }
.ad .btn { margin-top: var(--s1); }
@media (max-width: 559px) { .ad .btn { width: 100%; } }

/* Karten-Raster (Startseite) */
.raster { display: grid; gap: var(--s4); grid-template-columns: 1fr; padding: 0; list-style: none; margin: var(--s4) 0 0; }
@media (min-width: 640px) { .raster { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 960px) { .raster { grid-template-columns: repeat(3, 1fr); } }
.raster li { margin: 0; }
.raster a.kachel { display: block; height: 100%; min-height: 48px; background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); padding: var(--s4); text-decoration: none; color: var(--tinte); }
.raster a.kachel:hover { border-color: var(--petrol); background: var(--petrol-hell); }
.kachel strong { display: block; color: var(--petrol-dunkel); font-size: 1.05rem; font-weight: var(--w-fett); margin-bottom: var(--s2); text-decoration: underline; text-underline-offset: 0.15em; }

/* Tabellen */
.tabelle-wrap { overflow-x: auto; margin: 0 0 var(--s6); }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; background: var(--weiss); }
caption { text-align: left; font-weight: var(--w-fett); padding: 0 0 var(--s2); color: var(--petrol-dunkel); }
th, td { border: 1px solid var(--linie); padding: var(--s2) var(--s3); text-align: left; vertical-align: top; }
thead th { background: var(--petrol-hell); color: var(--petrol-dunkel); font-weight: var(--w-fett); }
tbody th { background: var(--warm); font-weight: var(--w-fett); }

/* Tabellen auf schmalen Bildschirmen als Karten */
@media (max-width: 639px) {
  .tabelle-stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  .tabelle-stack, .tabelle-stack tbody, .tabelle-stack tr, .tabelle-stack th, .tabelle-stack td { display: block; width: 100%; }
  .tabelle-stack tr { border: 1px solid var(--linie); border-radius: var(--radius); margin: 0 0 var(--s3); overflow: hidden; background: var(--weiss); }
  .tabelle-stack th, .tabelle-stack td { border: 0; border-bottom: 1px solid var(--linie); }
  .tabelle-stack tr > :last-child { border-bottom: 0; }
  .tabelle-stack td::before, .tabelle-stack tbody th::before { content: attr(data-label); display: block; font-size: 0.875rem; font-weight: var(--w-fett); color: var(--gedaempft); }
  .tabelle-stack tbody th { background: var(--petrol-hell); color: var(--petrol-dunkel); }
  .tabelle-stack caption { display: block; }
}

/* FAQ */
details { border: 1px solid var(--linie); border-radius: var(--radius); background: var(--weiss); margin: 0 0 var(--s3); }
summary { cursor: pointer; font-weight: var(--w-fett); color: var(--petrol-dunkel); padding: var(--s3) var(--s4); min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: var(--s4); list-style: none; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 1.5rem; line-height: 1; flex: 0 0 auto; color: var(--petrol); }
details[open] summary::after { content: "\2013"; }
details[open] summary { border-bottom: 1px solid var(--linie); }
details > div { padding: var(--s3) var(--s4) var(--s1); }

.quellen li { overflow-wrap: anywhere; margin: 0; }
.quellen a { display: inline-block; padding: var(--s3) 0; }

.merke { border: 1px solid var(--petrol); border-left-width: 4px; border-radius: var(--radius); padding: var(--s4) var(--s4) var(--s2); margin: 0 0 var(--s6); background: var(--petrol-hell); }
.merke h2 { margin-top: 0; font-size: 1.15rem; }

.cta-rechner { background: var(--petrol-hell); border: 1px solid var(--petrol); border-radius: var(--radius); padding: var(--s4); margin: var(--s8) 0; }
.cta-rechner p { margin-bottom: var(--s3); }
@media (max-width: 559px) { .cta-rechner .btn { width: 100%; } }

/* Fuß */
.site-footer { background: var(--tinte); color: #F1EFEA; padding: var(--s8) 0; margin-top: var(--s8); font-size: 0.95rem; }
.site-footer a { color: #FFFFFF; }
.site-footer ul { list-style: none; padding: 0; margin: 0 0 var(--s4); display: flex; flex-wrap: wrap; gap: 0 var(--s6); }
.site-footer li { margin: 0; }
.site-footer li a { display: inline-flex; align-items: center; min-height: 44px; }
.site-footer :focus-visible { outline-color: #FFFFFF; box-shadow: 0 0 0 6px var(--tinte); }
.site-footer p { max-width: 50rem; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
@media print { .site-header nav, .btn, .ad { display: none; } }
