/* LQ Test – Gestaltung angelehnt an kinderwachsen (Farben, Schriften) */
@font-face { font-family: 'Outfit'; src: url('/fonts/outfit-latin-wght-normal.woff2') format('woff2'); font-weight: 300 700; font-display: swap; }
@font-face { font-family: 'Source Sans 3'; src: url('/fonts/source-sans-3-latin-wght-normal.woff2') format('woff2'); font-weight: 400 600; font-display: swap; }
@font-face { font-family: 'Source Sans 3'; src: url('/fonts/source-sans-3-latin-wght-italic.woff2') format('woff2'); font-weight: 400 600; font-style: italic; font-display: swap; }

:root {
  --bg: #F2EDE4; --surface: #FFFFFF; --ink: #194550; --muted: #4B5F63; --line: #DCD3C3;
  --action: #C4462F; --action-hover: #A93A26; --on-action: #FFFFFF;
  --sage: #5E8F87; --sage-soft: #DCE7E3; --deep: #0F2A31; --on-deep: #EEE7DA; --on-deep-2: #B4C8C6;
  --display: 'Outfit', 'Avenir Next', 'Segoe UI', system-ui, sans-serif;
  --body: 'Source Sans 3', 'Segoe UI', system-ui, sans-serif;
  --r: 18px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--body); font-size: 18px; line-height: 1.55; }
a { color: var(--action); }
a:hover { color: var(--action-hover); }
h1, h2, h3 { font-family: var(--display); font-weight: 600; line-height: 1.2; margin: 0; }
h1 { font-size: clamp(28px, 6vw, 38px); letter-spacing: -0.6px; }
h2 { font-size: 24px; letter-spacing: -0.3px; }
h3 { font-size: 19px; }
p { margin: 0; }
.wrap { max-width: 720px; margin: 0 auto; padding: 0 20px; }
main.wrap { padding-top: 12px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 20px; outline: none; }
.muted { color: var(--muted); }
.small { font-size: 15px; }
.pre { white-space: pre-line; }
.eyebrow { font-family: var(--display); font-size: 13px; letter-spacing: 1.9px; text-transform: uppercase; color: var(--muted); }
.accent { color: var(--action); }

.topbar { max-width: 720px; margin: 0 auto; padding: 18px 20px 6px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--display); font-weight: 600; font-size: 20px; }
.brand sup { font-size: 10px; }
.nav { display: flex; gap: 16px; flex-wrap: wrap; font-size: 15px; }
.nav a, .nav button { color: var(--ink); background: none; border: 0; font: inherit; cursor: pointer; padding: 10px 0; text-decoration: underline; text-underline-offset: 3px; }
.foot { padding-top: 16px; padding-bottom: 28px; font-size: 14px; color: var(--muted); display: flex; flex-direction: column; gap: 4px; border-top: 1px solid var(--line); }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; gap: 12px; }
.card.dark { background: var(--ink); color: var(--on-deep); border-color: var(--ink); }
.card.dark .eyebrow, .card.dark .muted { color: var(--on-deep-2); }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 16px; padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.facts b { display: block; font-family: var(--display); font-weight: 600; font-size: 16px; }
.facts span { font-size: 14px; color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 50px; padding: 0 26px; border-radius: 999px; border: 2px solid var(--action); background: var(--action); color: var(--on-action); font-family: var(--display); font-weight: 600; font-size: 16px; letter-spacing: 0.6px; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--action-hover); border-color: var(--action-hover); color: var(--on-action); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn.ghost:hover { background: var(--sage-soft); color: var(--ink); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn.block { width: 100%; }
.linkbtn { background: none; border: 0; padding: 10px 0; color: var(--action); font: inherit; font-size: 16px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; min-height: 44px; }
.danger { color: #9E2A1A; }

label.field { display: flex; flex-direction: column; gap: 6px; font-size: 15px; font-weight: 600; }
input[type=email], input[type=text], input[type=number], textarea { height: 50px; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px; font: inherit; font-size: 17px; color: var(--ink); background: var(--surface); width: 100%; }
textarea { height: auto; min-height: 90px; padding: 12px 14px; }
input:focus-visible, textarea:focus-visible, .btn:focus-visible, a:focus-visible, button:focus-visible, .answer:focus-within { outline: 3px solid var(--sage); outline-offset: 2px; }
.check { display: flex; gap: 12px; align-items: flex-start; font-size: 16px; line-height: 1.5; }
.check input { width: 22px; height: 22px; margin-top: 2px; accent-color: var(--ink); flex-shrink: 0; }
.notice { background: var(--sage-soft); border-radius: 14px; padding: 14px 16px; font-size: 16px; }
.error { background: #F7DED8; color: #7A2416; border-radius: 14px; padding: 14px 16px; font-size: 16px; }

a.resultcard { text-decoration: none; color: var(--ink); }
a.resultcard:hover { border-color: var(--ink); }
.row.between { justify-content: space-between; }
.minis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.minis > div { display: flex; flex-direction: column; }
.minis b { font-family: var(--display); font-size: 20px; }
@media (max-width: 420px) { .minis { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Testablauf */
.progress { display: flex; flex-direction: column; gap: 8px; }
.progress .meta { display: flex; justify-content: space-between; font-size: 14px; color: var(--muted); }
.bar { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.bar > div { height: 100%; background: var(--ink); border-radius: 999px; width: 0; transition: width .3s; }
.question h1 { font-size: clamp(20px, 4.6vw, 24px); letter-spacing: -0.3px; line-height: 1.3; }
.answers { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.answers legend { position: absolute; left: -9999px; }
.answer { display: flex; gap: 12px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; font-size: 16px; line-height: 1.45; cursor: pointer; }
.answer input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--ink); flex-shrink: 0; }
.answer.selected { background: var(--sage-soft); border: 2px solid var(--ink); padding: 13px 15px; }
.answer .extra { margin-top: 10px; }
.actions { display: flex; gap: 12px; }
.actions .btn { flex: 1 1 0; }
.actions .btn.next { flex: 2 1 0; }

/* Ergebnis */
.chart { width: 100%; max-width: 420px; margin: 0 auto; display: block; }
.tiles { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; }
.tile .k { font-size: 14px; color: var(--muted); }
.tile .v { font-family: var(--display); font-weight: 600; font-size: 24px; }
.meter { height: 8px; border-radius: 999px; background: var(--sage-soft); overflow: hidden; }
.meter > div { height: 100%; background: var(--ink); }
details.acc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); }
details.acc > summary { list-style: none; cursor: pointer; padding: 18px; min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-family: var(--display); font-weight: 600; font-size: 18px; }
details.acc > summary::-webkit-details-marker { display: none; }
details.acc > summary::after { content: ''; width: 10px; height: 10px; border-right: 2px solid var(--ink); border-bottom: 2px solid var(--ink); transform: rotate(45deg); margin: -4px 4px 0 8px; flex-shrink: 0; }
details.acc[open] > summary::after { transform: rotate(-135deg); margin-top: 4px; }
details.acc > summary .pct { color: var(--action); margin-left: auto; }
details.acc > .body { padding: 0 18px 18px; display: flex; flex-direction: column; gap: 12px; }
.intro-text { color: var(--muted); font-style: italic; font-size: 16px; }
.tag { font-family: var(--display); font-size: 12px; letter-spacing: 1.6px; text-transform: uppercase; color: var(--sage); }
.blocks { display: flex; flex-direction: column; gap: 10px; }
.blocks h2 { font-size: 21px; margin-top: 6px; }
.blocks h3 { font-size: 17px; margin-top: 4px; }

table.data { width: 100%; border-collapse: collapse; font-size: 15px; }
table.data th, table.data td { text-align: left; padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: top; }
.scroll { overflow-x: auto; }

@media (max-width: 420px) { .facts { grid-template-columns: 1fr 1fr; } body { font-size: 17px; } }

@media print {
  body { background: #fff; font-size: 12pt; }
  .topbar .nav, .foot, .noprint, .actions { display: none !important; }
  .card, details.acc, .tile { border-color: #bbb; }
  .tile, .card.dark, details.acc > summary { break-inside: avoid; break-after: avoid; }
  details.acc > summary::after { display: none; }
  .card.dark { background: #fff; color: var(--ink); }
  .card.dark .eyebrow, .card.dark .muted { color: var(--muted); }
  main.wrap { max-width: none; }
}
