:root {
  --color-bg: #ffffff;
  --color-text: #1a1a1a;
  --color-muted: #5a5a5a;
  --color-border: #e2e2e2;
  --color-primary: #0b5fff;
  --color-primary-dark: #0847c4;
  --color-positive-bg: #eaf7ee;
  --color-positive-border: #34a853;
  --color-negative-bg: #fdecea;
  --color-negative-border: #d93025;
  --color-warnung-bg: #fff8e1;
  --color-warnung-border: #f9a825;
  --radius: 10px;
  --max-width: 960px;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--color-text);
  background: var(--color-bg);
  line-height: 1.55;
}

.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

header.site-header {
  padding: 1.25rem 0 1rem;
  border-bottom: 1px solid var(--color-border);
}

header.site-header .logo {
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0 0 0.2rem;
}

header.site-header .tagline {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.9rem;
}

main {
  padding: 1.5rem 0 3rem;
}

section {
  margin-bottom: 2.5rem;
}

h1 {
  font-size: 1.5rem;
  margin: 0 0 0.75rem;
}

h2 {
  font-size: 1.2rem;
  margin: 2rem 0 0.75rem;
}

h2:first-child {
  margin-top: 0;
}

h3 {
  font-size: 1.05rem;
  margin: 1.25rem 0 0.5rem;
}

p {
  margin: 0 0 1rem;
}

.lead {
  font-size: 1.05rem;
  color: var(--color-muted);
}

code {
  background: #f1f3f6;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.9em;
}

/* Beispiel-Chips */

.beispiele {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  align-items: center;
  margin-bottom: 1.25rem;
}

.beispiele__label {
  font-size: 0.85rem;
  color: var(--color-muted);
  font-weight: 600;
  margin-right: 0.25rem;
}

.btn-chip {
  border: 1px solid var(--color-border);
  background: #f7f9fc;
  border-radius: 999px;
  padding: 0.4rem 0.85rem;
  font-size: 0.82rem;
  cursor: pointer;
  color: var(--color-text);
}

.btn-chip:hover,
.btn-chip:focus {
  border-color: var(--color-primary);
  color: var(--color-primary);
}

/* Szenario-Karten */

.szenario-liste {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}

@media (min-width: 720px) {
  .szenario-liste {
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    align-items: start;
  }
}

.szenario-karte {
  background: #f7f9fc;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.1rem;
  min-width: 0;
}

.szenario-karte__kopf {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0;
  margin-bottom: 0.75rem;
}

.szenario-titel {
  flex: 1;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 0.4rem 0.5rem;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
}

.szenario-titel:hover,
.szenario-titel:focus {
  border-color: var(--color-border);
  background: #fff;
  outline: none;
}

.btn-entfernen {
  border: none;
  background: transparent;
  color: var(--color-muted);
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  padding: 0.2rem 0.5rem;
  border-radius: 6px;
}

.btn-entfernen:hover:not(:disabled) {
  background: var(--color-negative-bg);
  color: var(--color-negative-border);
}

.btn-entfernen:disabled {
  opacity: 0.3;
  cursor: not-allowed;
}

.feld {
  margin-bottom: 0.85rem;
}

.feld label,
.erwerbsform-label {
  display: block;
  font-weight: 600;
  margin-bottom: 0.3rem;
  font-size: 0.88rem;
}

.feld input[type="number"],
.feld input[type="text"],
.feld select {
  width: 100%;
  padding: 0.55rem 0.65rem;
  font-size: 0.95rem;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: #fff;
}

.feld input:focus,
.feld select:focus {
  outline: 2px solid var(--color-primary);
  outline-offset: 1px;
}

.erwerbsform-optionen {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.9rem;
  font-size: 0.85rem;
  font-weight: 400;
}

.erwerbsform-optionen label {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  font-weight: 400;
  margin-bottom: 0;
}

.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin-bottom: 0.85rem;
}

.checkbox-field input {
  margin-top: 0.25rem;
}

.checkbox-field label {
  font-weight: 500;
  font-size: 0.85rem;
  margin-bottom: 0;
}

.feld-gruppe {
  border-top: 1px dashed var(--color-border);
  padding-top: 0.75rem;
  margin-top: 0.75rem;
}

.szenario-form__aktionen {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.5rem;
}

button.btn-primary,
button.btn-secondary {
  padding: 0.75rem 1.1rem;
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 8px;
  cursor: pointer;
  border: none;
}

button.btn-primary {
  color: #fff;
  background: var(--color-primary);
}

button.btn-primary:hover,
button.btn-primary:focus {
  background: var(--color-primary-dark);
}

button.btn-secondary {
  background: #fff;
  color: var(--color-primary);
  border: 1px solid var(--color-primary);
}

button.btn-secondary:disabled {
  opacity: 0.4;
  cursor: not-allowed;
  border-color: var(--color-border);
  color: var(--color-muted);
}

.btn-text {
  background: none;
  border: none;
  color: var(--color-muted);
  text-decoration: underline;
  cursor: pointer;
  font-size: inherit;
  padding: 0;
}

/* Vergleichs-Ergebnis */

.vergleich-ergebnis {
  margin-top: 1.75rem;
  padding: 1.1rem;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  background: #fff;
}

.tabellen-wrapper {
  overflow-x: auto;
}

table.vergleichstabelle {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

table.vergleichstabelle th,
table.vergleichstabelle td {
  padding: 0.55rem 0.7rem;
  text-align: right;
  border-bottom: 1px solid var(--color-border);
  white-space: nowrap;
}

table.vergleichstabelle th[scope="row"] {
  text-align: left;
  font-weight: 500;
  color: var(--color-muted);
  white-space: normal;
}

table.vergleichstabelle thead th {
  text-align: right;
  font-weight: 700;
  color: var(--color-text);
  border-bottom: 2px solid var(--color-border);
}

table.vergleichstabelle thead th:first-child {
  text-align: left;
}

tr.zeile-detail th,
tr.zeile-detail td {
  color: var(--color-muted);
  font-size: 0.85rem;
  border-bottom: 1px dashed var(--color-border);
}

tr.zeile-brutto td,
tr.zeile-brutto th {
  font-weight: 600;
}

tr.zeile-netto td,
tr.zeile-netto th {
  font-weight: 700;
  font-size: 1.05rem;
  background: var(--color-positive-bg);
}

tr.zeile-differenz td,
tr.zeile-differenz th {
  font-style: italic;
  color: var(--color-muted);
}

.ergebnis__disclaimer,
.hinweis-genauigkeit {
  font-size: 0.8rem;
  color: var(--color-muted);
}

.hinweis-genauigkeit {
  border-top: 1px solid var(--color-border);
  padding-top: 1rem;
  margin-top: 1.5rem;
}

/* SEO-Inhalt */

.seo-text ul {
  padding-left: 1.2rem;
}

.seo-text li {
  margin-bottom: 0.4rem;
}

.quellen {
  font-size: 0.78rem;
  color: var(--color-muted);
}

/* Ad-Slots */

.ad-slot {
  margin: 1.5rem 0;
  padding: 0.75rem;
  border: 1px dashed var(--color-border);
  border-radius: 8px;
  text-align: center;
  color: var(--color-muted);
  font-size: 0.75rem;
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.ad-slot__label {
  position: absolute;
  margin-top: -2.4rem;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Affiliate-Box */

.affiliate-box {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 1.1rem;
  background: #f7f9fc;
}

.affiliate-liste {
  list-style: none;
  padding: 0;
  margin: 0;
}

.affiliate-liste li {
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--color-border);
}

.affiliate-liste li:last-child {
  border-bottom: none;
}

.affiliate-liste a {
  color: var(--color-primary);
  font-weight: 600;
  text-decoration: none;
}

.affiliate-liste a:hover {
  text-decoration: underline;
}

.tag-werbung {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--color-muted);
  border: 1px solid var(--color-border);
  border-radius: 4px;
  padding: 0.05rem 0.35rem;
  margin-left: 0.3rem;
  text-transform: uppercase;
}

.affiliate-disclaimer {
  font-size: 0.78rem;
  color: var(--color-muted);
  margin-top: 0.75rem;
  margin-bottom: 0;
}

footer.site-footer {
  border-top: 1px solid var(--color-border);
  padding: 1.5rem 0 2.5rem;
  font-size: 0.85rem;
  color: var(--color-muted);
}

footer.site-footer a,
footer.site-footer .btn-text {
  color: var(--color-muted);
}

footer.site-footer nav {
  margin-bottom: 0.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

/* Consent-Banner */

#consent-banner {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  justify-content: center;
  padding: 1rem;
}

#consent-banner[hidden] {
  display: none;
}

#consent-banner .consent-banner__box {
  max-width: 640px;
  width: 100%;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  box-shadow: 0 4px 24px rgba(0, 0, 0, 0.12);
  padding: 1.25rem;
}

.consent-banner__box h2 {
  margin-top: 0;
  font-size: 1.05rem;
}

.consent-banner__box p {
  font-size: 0.88rem;
  color: var(--color-muted);
}

.consent-banner__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1rem;
}

.consent-banner__option {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid var(--color-border);
  cursor: default;
}

.consent-banner__option--toggleable {
  cursor: pointer;
}

.consent-banner__checkbox {
  position: absolute;
  opacity: 0;
}

.consent-banner__toggle {
  width: 34px;
  height: 20px;
  border-radius: 999px;
  background: var(--color-border);
  position: relative;
  flex-shrink: 0;
  margin-top: 0.15rem;
}

.consent-banner__toggle::after {
  content: "";
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  transition: transform 0.15s ease;
}

.consent-banner__checkbox:checked + .consent-banner__toggle {
  background: var(--color-primary);
}

.consent-banner__checkbox:checked + .consent-banner__toggle::after {
  transform: translateX(14px);
}

.consent-banner__toggle--fixed {
  background: var(--color-primary);
  opacity: 0.5;
}

.consent-banner__option-title {
  font-weight: 600;
  font-size: 0.88rem;
  margin: 0;
}

.consent-banner__option-desc {
  font-size: 0.8rem;
  color: var(--color-muted);
  margin: 0.15rem 0 0;
}
