/* Farben und Schriften wie auf pronahgeno.at */
@font-face { font-family: "Open Sans"; font-weight: 300; font-display: swap; src: url(fonts/OpenSans-300.ttf) format("truetype"); }
@font-face { font-family: "Open Sans"; font-weight: 400; font-display: swap; src: url(fonts/OpenSans-400.ttf) format("truetype"); }
@font-face { font-family: "Open Sans"; font-weight: 600; font-display: swap; src: url(fonts/OpenSans-600.ttf) format("truetype"); }
@font-face { font-family: "Open Sans"; font-weight: 700; font-display: swap; src: url(fonts/OpenSans-700.ttf) format("truetype"); }
@font-face { font-family: "Oswald"; font-weight: 300; font-display: swap; src: url(fonts/Oswald-300.ttf) format("truetype"); }
@font-face { font-family: "Oswald"; font-weight: 400; font-display: swap; src: url(fonts/Oswald-400.ttf) format("truetype"); }

:root {
  --braun: #56180b;
  --olive: #8a9a40;
  --gruen: #65bc7b;
  --gruen-hell: #eef7f0;
  --limette: #c5dc72;
  --text: #2b2b2b;
  --grau: #6f6f6f;
  --linie: #e2e2e2;
  --flaeche: #f7f7f5;
  --titel: Oswald, Arial, sans-serif;
  --radius: 14px;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: #fff;
  color: var(--text);
  font: 400 15px/1.6 "Open Sans", Arial, sans-serif;
}

/* Kopf */
.kopf { text-align: center; padding: 40px 16px 8px; }
.marke { margin: 0 0 18px; font: 300 1.5rem/1 var(--titel); letter-spacing: .04em; color: var(--braun); }
.kopf h1 { margin: 0; font: 400 1.9rem/1.2 var(--titel); text-transform: uppercase; letter-spacing: .04em; color: var(--braun); }
.untertitel { margin: 6px 0 0; color: var(--grau); }
.leer { margin: 10px 0 0; font-size: .85rem; color: var(--grau); }

main { max-width: 640px; margin: 0 auto; padding: 0 16px 120px; }

/* Fortschritt */
.schritte { display: flex; list-style: none; margin: 32px 0 36px; padding: 0; counter-reset: schritt; }
.schritte li { flex: 1; position: relative; text-align: center; }
.schritte li::before {
  content: ""; position: absolute; top: 16px; left: -50%; right: 50%;
  height: 2px; background: var(--linie);
}
.schritte li:first-child::before { display: none; }
.schritte li.erledigt::before, .schritte li.aktiv::before { background: var(--gruen); }
.schritte button {
  position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%;
  padding: 0; border: 0; background: none; cursor: pointer;
  font: 600 .8rem/1.2 "Open Sans", Arial, sans-serif; color: var(--grau);
}
.schritte .nr {
  display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%;
  border: 2px solid var(--linie); background: #fff; font-size: .85rem;
  transition: background .2s, border-color .2s, color .2s;
}
.schritte .aktiv button { color: var(--text); }
.schritte .aktiv .nr { background: var(--braun); border-color: var(--braun); color: #fff; }
.schritte .erledigt .nr { background: var(--gruen); border-color: var(--gruen); color: #fff; }
.schritte button:focus-visible .nr { outline: 2px solid var(--gruen); outline-offset: 2px; }

/* Schritte */
.schritt { animation: rein .25s ease-out; }
@keyframes rein { from { opacity: 0; transform: translateY(6px); } }
.schritt h2 {
  margin: 0; text-align: center; outline: none;
  font: 400 1.35rem/1.3 var(--titel); text-transform: uppercase; letter-spacing: .04em; color: var(--braun);
}
.schritt h3 { margin: 32px 0 12px; font: 400 1.05rem/1.3 var(--titel); text-transform: uppercase; letter-spacing: .04em; color: var(--braun); }
.hinweis { margin: 4px 0 28px; text-align: center; color: var(--grau); font-size: .9rem; }

/* Felder */
.raster { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.raster .breit { grid-column: span 2; }
.raster .ganz { grid-column: 1 / -1; }

label { display: block; font-size: .8rem; font-weight: 600; color: var(--grau); }
input:not([type=radio]):not([type=range]) {
  display: block; width: 100%; margin-top: 6px; padding: 12px 14px;
  border: 1px solid var(--linie); border-radius: 10px; background: #fff;
  font: 400 1rem/1.3 "Open Sans", Arial, sans-serif; color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
input:not([type=radio]):not([type=range]):hover { border-color: #c9c9c9; }
input:not([type=radio]):not([type=range]):focus { outline: none; border-color: var(--gruen); box-shadow: 0 0 0 3px #65bc7b33; }

/* Anteil */
.anteil { display: flex; align-items: center; justify-content: center; gap: 28px; }
.anteil-wert { min-width: 4.5ch; text-align: center; font: 400 3.4rem/1 var(--titel); color: var(--braun); }
.rund {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--linie); background: #fff;
  font-size: 1.4rem; line-height: 1; color: var(--text); cursor: pointer;
}
.rund:hover { border-color: var(--braun); }
.regler { display: block; width: 100%; margin: 24px 0 4px; accent-color: var(--braun); }
.regler-skala { display: flex; justify-content: space-between; font-size: .75rem; color: var(--grau); }

.tabelle-link { margin: 14px 0 0; text-align: center; font-size: .88rem; }

.betraege { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 28px 0; }
.betraege div { padding: 16px 18px; border: 1px solid var(--linie); border-radius: var(--radius); }
.betraege .gross { grid-column: 1 / -1; background: var(--flaeche); border-color: transparent; }
.betraege .breit { grid-column: 1 / -1; }
.betraege dt { font-size: .78rem; color: var(--grau); }
.betraege dd { margin: 2px 0 0; font: 400 1.25rem/1.3 var(--titel); color: var(--text); white-space: nowrap; }
.betraege .gross dd { font-size: 1.8rem; color: var(--braun); }

h2 + .rechtstext { margin-top: 20px !important; }
.rechtstext, .rechtstext p { margin: 0 0 10px; font-size: .8rem; line-height: 1.6; color: var(--grau); }

/* Erklärungen */
.optionen { display: grid; gap: 10px; margin-top: 20px; }
.option {
  display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px;
  border: 1px solid var(--linie); border-radius: var(--radius);
  font-size: .95rem; font-weight: 400; color: var(--text); cursor: pointer;
  transition: border-color .15s, background .15s;
}
.option:hover { border-color: #c9c9c9; }
.option:has(input:checked) { border-color: var(--gruen); background: var(--gruen-hell); }
.option input { width: 20px; height: 20px; flex: none; margin: 1px 0 0; accent-color: var(--gruen); }

/* Übersicht */
.uebersicht section { border: 1px solid var(--linie); border-radius: var(--radius); padding: 16px 18px; margin-bottom: 12px; }
.uebersicht header { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; }
.uebersicht h3 { margin: 0; }
.uebersicht dl { margin: 0; display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: 4px 16px; font-size: .88rem; }
.uebersicht dt { color: var(--grau); }
.uebersicht dd { margin: 0; overflow-wrap: anywhere; }
.uebersicht .fehlt { color: #b26b00; }

.status { min-height: 1.6em; margin: 16px 0 0; text-align: center; font-weight: 600; }
.status.fehler { color: #a31313; }

/* Berechnungstabelle */
body:has(dialog[open]) { overflow: hidden; }
dialog.tabelle {
  width: min(860px, calc(100% - 32px)); max-height: calc(100% - 48px); padding: 0;
  border: 0; border-radius: var(--radius); box-shadow: 0 20px 60px #0003; color: var(--text);
}
dialog.tabelle[open] { display: flex; animation: rein .2s ease-out; }
dialog.tabelle::backdrop { background: #2b1a1466; }
.tabelle-innen { display: flex; flex-direction: column; min-height: 0; width: 100%; padding: 20px 24px; }
.tabelle-kopf { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.tabelle-kopf h2 { margin: 0; font: 400 1.3rem/1.3 var(--titel); text-transform: uppercase; letter-spacing: .04em; color: var(--braun); }
.tabelle-hinweis { margin: 6px 0 12px; font-size: .8rem; color: var(--grau); }
.tabelle-hinweis:last-child { margin: 12px 0 0; }
.tabelle-scroll { overflow: auto; min-height: 0; border: 1px solid var(--linie); border-radius: 10px; }
.tabelle table { width: 100%; border-collapse: collapse; font-size: .85rem; font-variant-numeric: tabular-nums; }
.tabelle th, .tabelle td { padding: 8px 12px; text-align: right; white-space: nowrap; border-bottom: 1px solid var(--linie); }
.tabelle th { position: sticky; top: 0; z-index: 1; background: var(--flaeche); font-weight: 600; font-size: .75rem; color: var(--grau); }
.tabelle th:first-child, .tabelle td:first-child { position: sticky; left: 0; text-align: left; background: #fff; }
.tabelle th:first-child { z-index: 2; background: var(--flaeche); }
.tabelle td:nth-child(n+6) { color: var(--grau); }
.tabelle tbody tr { cursor: pointer; }
.tabelle tbody tr:hover td { background: var(--flaeche); }
.tabelle tbody tr.gewaehlt td { background: var(--gruen-hell); font-weight: 600; }
.tabelle td button { padding: 0; border: 0; background: none; font: inherit; font-weight: 600; color: var(--braun); cursor: pointer; }

/* Knöpfe */
button { font-family: inherit; }
.weiter, .zurueck {
  padding: 13px 30px; border-radius: 999px; cursor: pointer;
  font: 400 .95rem/1 var(--titel); letter-spacing: .08em; text-transform: uppercase;
  transition: background .15s, color .15s, border-color .15s;
}
.weiter { border: 2px solid var(--braun); background: var(--braun); color: #fff; }
.weiter:hover { background: var(--olive); border-color: var(--olive); }
.zurueck { border: 2px solid var(--linie); background: #fff; color: var(--text); }
.zurueck:hover { border-color: var(--braun); }
.weiter:focus-visible, .zurueck:focus-visible, .rund:focus-visible { outline: 2px solid var(--gruen); outline-offset: 2px; }
button:disabled { opacity: .6; cursor: progress; }
.link {
  padding: 0; border: 0; background: none; cursor: pointer;
  font: inherit; font-weight: 600; color: var(--braun); text-decoration: underline; text-underline-offset: 2px;
}
.link:hover { color: var(--olive); }

/* Leiste unten */
.leiste { position: fixed; left: 0; right: 0; bottom: 0; z-index: 5; background: #fff; border-top: 1px solid var(--linie); }
.leiste-innen { max-width: 640px; margin: 0 auto; padding: 14px 16px; display: flex; align-items: center; gap: 16px; }
.auswahl { flex: 1; margin: 0; font-size: .85rem; color: var(--grau); }
.auswahl strong { color: var(--text); }

footer { margin-top: 48px; text-align: center; font-size: .8rem; color: var(--grau); }
footer a { color: inherit; }

@media (max-width: 560px) {
  dialog.tabelle { width: 100%; max-width: 100%; height: 100%; max-height: 100%; border-radius: 0; }
  .tabelle-innen { padding: 16px; }
  .kopf { padding-top: 28px; }
  .kopf h1 { font-size: 1.5rem; }
  .schritte { margin: 24px -8px 28px; }
  .schritte button { font-size: .68rem; }
  .schritte .nr { width: 30px; height: 30px; }
  .schritte li::before { top: 14px; }
  .raster, .betraege { grid-template-columns: 1fr; }
  .raster .breit { grid-column: auto; }
  .uebersicht dl { grid-template-columns: 1fr; gap: 0; }
  .uebersicht dd { margin-bottom: 6px; }
  .auswahl { font-size: .78rem; }
  .weiter, .zurueck { padding: 12px 20px; }
}
