@font-face {
  font-family: "Fraunces";
  src: url("/static/fonts/Fraunces.woff2") format("woff2");
  font-weight: 300 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/static/fonts/Fraunces-Italic.woff2") format("woff2");
  font-weight: 300 900;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/static/fonts/SourceSans3.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("/static/fonts/SourceSans3-Italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --ink: #172059;
  --ink-soft: #444444;
  --paper: #ffffff;
  --paper-deep: #F7F7F7;
  --card: #F7F7F7;
  --line: #E2E5E8;
  --accent: #E71B21;
  /* Hover, 12 % von #E71B21 nach Schwarz, damit die Schrift auch auf #E2E5E8 AA hält. */
  --accent-deep: #CB181D;
  --accent-soft: #E2E5E8;
  --good: #2f5e46;
  --good-bg: #e6efe9;
  --warn: #8b6630;
  --warn-bg: #f5ecd8;
  /* Dunkler als das Knopfrot #E71B21, damit die Ampel nicht wie ein Kaufknopf wirkt. */
  --bad: #7A1F28;
  --bad-bg: #F7F7F7;
  --muted: #545454;
  --unknown: #545454;
  --measure: 44rem;
}

* { box-sizing: border-box; }

[hidden] { display: none !important; }

html {
  color-scheme: light;
  /* cqi misst die html-Breite ohne Scrollbar, damit volle Bänder nicht seitlich überlaufen. */
  container-type: inline-size;
}

body {
  margin: 0;
  background:
    radial-gradient(70rem 26rem at 50% -10rem, #F7F7F7 0%, transparent 68%),
    var(--paper);
  color: var(--ink);
  font: 18px/1.55 "Source Sans 3", "Liberation Sans", "Segoe UI", sans-serif;
  font-optical-sizing: auto;
  accent-color: var(--accent);
}

h1, h2, h3, .brand-name, .score-number {
  font-family: "Fraunces", "Liberation Serif", Georgia, serif;
  font-optical-sizing: auto;
  font-weight: 520;
  letter-spacing: -0.015em;
  color: var(--ink);
}

h1 { font-size: clamp(2.05rem, 4.5vw, 3.15rem); line-height: 1.12; margin: 0 0 1rem; font-weight: 500; }
h1 em { font-style: italic; font-weight: 450; }
h2 { font-size: 1.45rem; line-height: 1.25; margin: 2.1rem 0 0.55rem; font-weight: 520; }
h3 { font-size: 1.18rem; line-height: 1.3; margin: 0 0 0.35rem; font-weight: 520; }

p { margin: 0 0 0.85rem; }

a {
  color: var(--ink);
  text-decoration-color: var(--accent);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}
a:hover { color: var(--accent-deep); }
a:focus-visible,
button:focus-visible,
input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.preview-banner {
  margin: 0;
  text-align: center;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--paper-deep);
  color: var(--ink-soft);
  padding: 0.5rem 1.1rem;
  border-bottom: 1px solid var(--line);
}

.site-header,
main,
.site-footer {
  width: min(var(--measure), calc(100% - 2.3rem));
  margin-left: auto;
  margin-right: auto;
}

.site-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.85rem 0 0;
}

.brand {
  display: inline-flex;
  align-items: baseline;
  position: relative;
  padding-left: calc(32px + 0.65rem);
  text-decoration: none;
  color: var(--ink);
}

.mark {
  position: absolute;
  left: 0;
  bottom: 0;
  display: block;
  width: 32px;
  height: 32px;
}

.brand-name {
  font-size: 1.2rem;
  line-height: 1;
  font-weight: 500;
  letter-spacing: 0.01em;
  text-box-trim: trim-end;
  text-box-edge: cap alphabetic;
}

.nav {
  display: flex;
  align-items: baseline;
  gap: 1.15rem;
}
.nav a {
  font-size: 0.95rem;
  line-height: 1;
  text-decoration: none;
  border-bottom: 1px solid var(--accent);
  padding-bottom: 0.08rem;
  color: var(--ink-soft);
}
.nav a:hover { color: var(--accent-deep); }

.hero, .result-head, .legal { padding: 2.6rem 0 1rem; }

.eyebrow, .score-label {
  margin: 0 0 0.7rem;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--accent);
  font-family: "Source Sans 3", "Liberation Sans", sans-serif;
}

.lead { font-size: 1.12rem; color: var(--ink-soft); max-width: 38rem; }

.hero-how {
  margin: 0.4rem 0 0.7rem;
  font-size: 1.35rem;
}
.hero-points {
  margin: 0;
  padding: 0 0 0 1.2rem;
  max-width: 38rem;
  font-size: 1.12rem;
  color: var(--ink-soft);
}
.hero-points li { margin: 0 0 0.55rem; }
.hero-points li:last-child { margin-bottom: 0; }


form {
  margin: 2.1rem 0 0;
  padding: 1.25rem 1.25rem 1.1rem;
  background: var(--card);
  border: 1px solid var(--line);
}

.form-row {
  display: flex;
  align-items: flex-end;
  gap: 0.7rem;
}

.field { flex: 1; min-width: 0; }

label {
  display: block;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
  margin: 0 0 0.4rem;
  line-height: 1;
}

input[type="text"],
button,
a.pdf {
  height: 3.2rem;
  font: inherit;
  border-radius: 0;
}

input[type="text"] {
  width: 100%;
  color: var(--ink);
  background: #ffffff;
  border: 1px solid var(--line);
  padding: 0 0.9rem;
  line-height: 1.2;
}
input[type="text"]:focus {
  border-color: var(--accent);
  outline: none;
  box-shadow: 0 0 0 1px var(--accent);
}

button,
a.pdf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin: 0;
  padding: 0 1.2rem;
  background: var(--accent);
  color: #ffffff;
  border: 1px solid var(--accent);
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  letter-spacing: 0.02em;
}
button:hover,
a.pdf:hover {
  background: var(--accent-deep);
  color: #ffffff;
  border-color: var(--accent-deep);
  text-decoration: none;
}
button:disabled { opacity: 0.62; cursor: wait; }

.hint { color: var(--muted); font-size: 0.92rem; margin: 0.75rem 0 0; }
.meta, .fine, .section-lead { color: var(--muted); }
.break,
.tasks li,
.tasks li p,
.task-meta,
.task-effort,
.area-text,
.area-text p,
.urls li,
.lead,
.hero-points,
.hero-points li,
.meta,
.count-lead {
  overflow-wrap: anywhere;
}

.error {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  background: var(--bad-bg);
  border-left: 3px solid var(--bad);
  color: var(--bad);
}

.notes {
  display: grid;
  gap: 0;
  margin: 3.2rem 0 2rem;
  border-top: 1px solid var(--line);
}
.note {
  padding: 1.35rem 0;
  border-bottom: 1px solid var(--line);
}
.note h2 { margin-top: 0; font-size: 1.22rem; }
.note p { margin-bottom: 0; color: var(--ink-soft); }
.note-preis {
  position: relative;
  z-index: 0;
  background: transparent;
  color: #ffffff;
  border-bottom-color: #ffffff;
}
/* Farbe bis zum Fensterrand, ohne max-width. Der Text bleibt in der Spalte von main. */
.note-preis::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: -1px;
  left: 50%;
  width: 100cqi;
  max-width: none;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #E71B21 0%, #172059 100%);
  pointer-events: none;
}
.note-preis h2,
.note-preis p { color: #ffffff; }
.note-preis form {
  background: transparent;
  border-color: transparent;
}
.note-preis button { border-color: #ffffff; }
.note-preis button:hover { border-color: #ffffff; }
.note-preis button:focus-visible { outline-color: #ffffff; }
.kauf-form {
  margin: 0.9rem 0 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.kauf-form .field { margin-top: 0.85rem; }
.note-preis label { color: #ffffff; }
.kauf-check {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  margin: 0.9rem 0 0.35rem;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 400;
  font-size: 0.98rem;
  line-height: 1.45;
  color: #ffffff;
}
.kauf-check input { margin-top: 0.28rem; flex: 0 0 auto; }
.note p.kauf-link { margin: 0.35rem 0 2.4rem; }
.note-preis a { color: #ffffff; }
.kauf-form button {
  white-space: normal;
  height: auto;
  min-height: 3.2rem;
  padding: 0.55rem 1.2rem;
  line-height: 1.3;
}
.kauf-form button:disabled { cursor: not-allowed; }
.confirm {
  margin: 0.4rem 0 1.6rem;
  padding-top: 0.2rem;
}
.confirm p { color: var(--ink-soft); }
.faq-list h2 { font-size: 1.15rem; margin: 1.7rem 0 0.45rem; }
.faq-list ul {
  margin: 0 0 0.85rem;
  padding: 0 0 0 1.2rem;
}
.faq-list li { margin: 0 0 0.3rem; }
.faq-list li:last-child { margin-bottom: 0; }
.zahlung-form { margin-top: 1.2rem; }

/* Ladezustand */
.ladezustand { padding: 3.4rem 0 4rem; min-height: 22rem; }
.ladezustand h2 {
  font-size: clamp(2.05rem, 4.5vw, 3.15rem);
  line-height: 1.12;
  margin: 0 0 1rem;
  font-weight: 500;
}
.pulse-line {
  margin-top: 2.2rem;
  height: 2px;
  background: var(--paper-deep);
  overflow: hidden;
  position: relative;
}
.pulse-line span {
  display: block;
  height: 100%;
  width: 36%;
  background: var(--accent);
  animation: glide 1.85s ease-in-out infinite;
}
@keyframes glide {
  0% { transform: translateX(-110%); }
  100% { transform: translateX(320%); }
}

.score-block {
  display: flex;
  align-items: flex-end;
  gap: 1.5rem;
  margin: 2.1rem 0 1.15rem;
  padding: 0 0 1.7rem;
  border-bottom: 1px solid var(--line);
}
.score-number {
  margin: 0;
  font-size: clamp(4.6rem, 14vw, 7rem);
  line-height: 0.8;
  font-weight: 500;
  letter-spacing: -0.04em;
  font-variant-numeric: lining-nums;
}
.score-copy { padding-bottom: 0.12rem; max-width: 22rem; }
.score-label { margin-bottom: 0.4rem; }
.score-note { margin: 0; font-size: 0.95rem; color: var(--muted); }

.count-lead { font-size: 1.08rem; color: var(--ink-soft); }

.actions {
  display: flex;
  align-items: flex-end;
  gap: 1.35rem;
  margin: 1.4rem 0 0;
}
.text-link {
  line-height: 1;
  padding-bottom: 0.2rem;
}

.ampel, .tasks, .words, .urls { list-style: none; padding: 0; margin: 0; }
.tasks { list-style: decimal; padding-left: 1.4rem; }

.ampel li {
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  padding: 1.05rem 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
}

.lamp {
  width: 0.7rem;
  height: 0.7rem;
  border-radius: 50%;
  margin-top: 0.42rem;
  flex-shrink: 0;
}

.area-text { flex: 1; min-width: 0; }
.area-text p { margin: 0.28rem 0 0; color: var(--ink-soft); }
.area-top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.8rem;
}
.area-top strong {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 520;
  font-size: 1.12rem;
  line-height: 1;
  text-box-trim: trim-end;
  text-box-edge: cap alphabetic;
}

.level {
  border-radius: 0;
  padding: 0.12rem 0.5rem;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  line-height: 1;
  font-family: "Source Sans 3", "Liberation Sans", sans-serif;
  text-box-trim: trim-both;
  text-box-edge: cap alphabetic;
}

.ampel-green .lamp, .ampel-green .level, .task-green .level { background: var(--good); color: #ffffff; }
.ampel-yellow .lamp, .ampel-yellow .level, .task-yellow .level { background: var(--warn); color: #ffffff; }
.ampel-red .lamp, .ampel-red .level, .task-red .level { background: var(--bad); color: #ffffff; }
.ampel-unknown .lamp, .ampel-unknown .level, .task-unknown .level { background: var(--unknown); color: #ffffff; }

.tasks-block { margin-top: 2.4rem; }
.tasks li {
  padding: 1.15rem 0 1.2rem 0.3rem;
  border-bottom: 1px solid var(--line);
  background: transparent;
}
.task-meta {
  margin: 0 0 0.65rem;
  color: var(--muted);
  font-size: 0.92rem;
  display: flex;
  align-items: flex-end;
  gap: 0.45rem;
}
.task-effort {
  line-height: 1;
  text-box-trim: trim-end;
  text-box-edge: cap alphabetic;
}
.task-effort::before {
  content: "· ";
}

.words {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0.7rem 0 1.6rem;
}
.words li {
  background: var(--accent-soft);
  color: var(--ink);
  padding: 0.22rem 0.7rem;
  font-size: 0.95rem;
}
.urls li { overflow-wrap: anywhere; margin: 0.22rem 0; color: var(--ink-soft); font-size: 0.95rem; }

.extra {
  position: relative;
  z-index: 0;
  display: flow-root;
  margin: 2.6rem 0 0;
  padding: 0.4rem 0 3rem;
  border-top: 1px solid var(--line);
  color: #ffffff;
}
.extra::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 100cqi;
  max-width: none;
  transform: translateX(-50%);
  background: linear-gradient(90deg, #E71B21 0%, #172059 100%);
  pointer-events: none;
}
.extra h2,
.extra p,
.extra li,
.extra .fine,
.extra .urls li,
.extra a {
  color: #ffffff;
}
.extra a { text-decoration-color: #ffffff; }
.extra .words li {
  background: var(--accent-soft);
  color: var(--ink);
}
.extra .fine { margin-top: 1.2rem; font-size: 0.92rem; }

.legal { padding-bottom: 3rem; }
.draft-mark {
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  padding: 0.85rem 1rem;
  margin: 0 0 1.6rem;
  color: var(--ink);
}
.open-fields { margin: 1.4rem 0; }
.open-fields dt {
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--muted);
  margin: 1rem 0 0.2rem;
}
.open-fields dd { margin: 0; color: var(--ink-soft); }

.site-footer {
  padding: 1.6rem 0 2.6rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
}
.site-footer p { margin: 0 0 0.35rem; }
.footer-links { margin: 0; }

@media (max-width: 640px) {
  body { font-size: 17px; }
  .site-header { padding-top: 1.3rem; }
  .hero, .result-head, .legal { padding-top: 1.8rem; }
  .form-row {
    flex-direction: column;
    align-items: stretch;
  }
  .form-row button,
  .kauf-form button {
    width: 100%;
    margin-top: 0.15rem;
  }
  .score-block {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
  }
  .score-copy { padding-bottom: 0; }
  .area-top { flex-wrap: wrap; align-items: flex-end; }
  .actions { flex-wrap: wrap; }
  .nav { gap: 0.85rem; }
}

@media (prefers-reduced-motion: reduce) {
  .pulse-line span { animation: none; width: 100%; }
}
