/* ============================================================
   Athleten-Typ-Test  ·  MKL Training
   Eigenständiges Widget. Keine externen Requests (DSGVO).

   Einbau: Am einfachsten über das Plugin, dort steckt diese
   Datei bereits drin. Auf einer Seite genügt der Shortcode
   [athleten_typ_test].
   Alternativ von Hand in einen HTML-Block einfügen, dann die
   erste Zeile mit dem Seitentitel weglassen.
   ============================================================ */

.att {
  --paper:   #faf9f6;
  --panel:   #ffffff;
  --ink:     #16191c;
  --muted:   #6e7169;
  --rule:    #e2e2db;
  --rule-sr: #f0efe9;
  --signal:  #c8452b;
  --signal-soft: rgba(200, 69, 43, 0.12);
  --blue:    #2f6bc0;
  --blue-soft: rgba(47, 107, 192, 0.12);
  --focus:   #2f6bc0;
  color-scheme: light;

  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  padding: 0 20px 72px;
  min-height: 100vh;
  min-height: 100dvh;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .att {
    --paper:   #111312;
    --panel:   #16181a;
    --ink:     #f4f3ef;
    --muted:   #9a9a92;
    --rule:    #2a2c29;
    --rule-sr: #202220;
    --signal:  #e4694c;
    --signal-soft: rgba(228, 105, 76, 0.16);
    --blue:    #5b93da;
    --blue-soft: rgba(91, 147, 218, 0.16);
    --focus:   #5b93da;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] .att {
  --paper:   #111312;
  --panel:   #16181a;
  --ink:     #f4f3ef;
  --muted:   #9a9a92;
  --rule:    #2a2c29;
  --rule-sr: #202220;
  --signal:  #e4694c;
  --signal-soft: rgba(228, 105, 76, 0.16);
  --blue:    #5b93da;
  --blue-soft: rgba(91, 147, 218, 0.16);
  --focus:   #5b93da;
  color-scheme: dark;
}

.att *, .att *::before, .att *::after { box-sizing: border-box; }
.att h1, .att h2, .att h3, .att p, .att ul, .att ol, .att figure { margin: 0; }
.att ul, .att ol { padding-left: 1.15em; }

/* ---- Progress rail ---- */
.att__rail {
  position: sticky; top: 0; z-index: 20;
  margin: 0 -20px 0; padding: 12px 20px;
  background: var(--paper);
  border-bottom: 1px solid var(--rule);
  display: flex; align-items: center; gap: 14px;
}
.att__rail[hidden] { display: none; }
.att__railbar { flex: 1; height: 4px; background: var(--rule); border-radius: 2px; overflow: hidden; }
.att__railfill { height: 100%; width: 0%; background: var(--signal); transition: width .35s ease; }
.att__railtxt {
  font-size: 12px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap;
}

/* ---- Shell ---- */
.att__wrap { max-width: 680px; margin: 0 auto; }
.att__wrap--wide { max-width: 1040px; }
.att__screen { padding-top: 40px; }
.att__screen[hidden] { display: none; }

.att__eyebrow {
  font-size: 12px; font-weight: 600; letter-spacing: .12em;
  text-transform: uppercase; color: var(--signal); margin-bottom: 10px;
}
.att h1 {
  font-size: clamp(28px, 5vw, 40px); line-height: 1.12; font-weight: 700;
  letter-spacing: -0.022em; text-wrap: balance;
}
.att h2 {
  font-size: clamp(21px, 3.2vw, 26px); line-height: 1.2; font-weight: 650;
  letter-spacing: -0.015em; text-wrap: balance;
}
.att h3 { font-size: 15px; font-weight: 650; letter-spacing: -0.006em; }
.att__lede { font-size: 17px; color: var(--muted); max-width: 60ch; }

.att__stack { display: flex; flex-direction: column; gap: 22px; }
.att__stack--tight { gap: 14px; }
.att__stack--loose { gap: 34px; }

.att__card {
  background: var(--panel); border: 1px solid var(--rule);
  border-radius: 4px; padding: 22px;
}

/* ---- Meta list on intro ---- */
.att__meta { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; }
.att__metarow { background: var(--panel); padding: 13px 18px; display: flex; gap: 16px; align-items: baseline; }
.att__metak {
  font-size: 12px; letter-spacing: .07em; text-transform: uppercase;
  color: var(--muted); min-width: 108px; flex-shrink: 0;
}
.att__metav { font-size: 15px; }

.att__badge {
  display: inline-block; font-size: 10.5px; font-weight: 650; letter-spacing: .07em;
  text-transform: uppercase; padding: 2px 7px; border-radius: 3px;
  border: 1px solid var(--rule); color: var(--muted); margin-left: 9px;
  vertical-align: middle; white-space: nowrap; font-family: inherit;
}
.att__badge--req { color: var(--signal); border-color: var(--signal); }

/* ---- Einzelfrage ---- */
.att__solo { min-height: 40vh; display: flex; flex-direction: column; justify-content: center; }
.att__soloq {
  font-size: clamp(21px, 3.3vw, 27px); line-height: 1.3; font-weight: 620;
  letter-spacing: -0.015em; text-wrap: balance; margin-bottom: 26px; max-width: 34ch;
}
.att__rows { display: flex; flex-direction: column; gap: 8px; max-width: 520px; }
.att__row { position: relative; }
.att__row input { position: absolute; inset: 0; opacity: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.att__rowbox {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px;
  border: 1px solid var(--rule); border-radius: 4px; background: var(--panel);
  font-size: 16px; transition: border-color .12s, background .12s, color .12s;
}
.att__rowdot { width: 19px; height: 19px; border-radius: 50%; border: 1.5px solid var(--rule); flex-shrink: 0; transition: all .12s; }
.att__row input:hover + .att__rowbox { border-color: var(--muted); }
.att__row input:focus-visible + .att__rowbox { outline: 2px solid var(--focus); outline-offset: 2px; }
.att__row input:checked + .att__rowbox { border-color: var(--signal); background: var(--signal-soft); color: var(--signal); }
.att__row input:checked + .att__rowbox .att__rowdot { border-color: var(--signal); background: var(--signal); box-shadow: inset 0 0 0 3.5px var(--panel); }

/* ---- Zielniveau ---- */
.att__levelblock { padding-top: 12px; border-top: 1px solid var(--rule-sr); }
.att__levelblock:first-of-type { border-top: none; padding-top: 2px; }
.att__levelname { font-size: 14px; font-weight: 600; margin-bottom: 8px; }

/* ---- Trainingsverteilung ---- */
.att__mix { display: flex; flex-direction: column; gap: 12px; }
.att__mixrow { display: grid; grid-template-columns: 1fr 108px 86px 52px; gap: 10px; align-items: center; }
@media (max-width: 680px) { .att__mixrow { grid-template-columns: 1fr 86px 52px; } .att__mixrow .att__mixslider { grid-column: 1 / -1; } }
.att__mixrow.is-locked .att__mixlbl { color: var(--muted); }
.att__mixlock { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); cursor: pointer; user-select: none; }
.att__mixlock input { width: 15px; height: 15px; margin: 0; accent-color: var(--signal); cursor: pointer; }
.att__mixrow.is-locked .att__mixlock { color: var(--signal); font-weight: 600; }
.att__mixslider:disabled { opacity: .4; cursor: not-allowed; }
.att__mixnum input:disabled { opacity: .55; background: var(--paper); }
.att__mixlbl { font-size: 14.5px; line-height: 1.35; }
.att__mixslider { width: 100%; accent-color: var(--signal); cursor: ew-resize; }
.att__mixnum { display: flex; align-items: center; gap: 4px; }
.att__mixnum input[type="number"] {
  width: 66px; flex: 0 0 66px; text-align: right; padding: 7px 8px;
  font-variant-numeric: tabular-nums; cursor: ns-resize;
  -moz-appearance: textfield; appearance: textfield;
}
.att__mixnum input::-webkit-outer-spin-button,
.att__mixnum input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.att__mixpct { font-size: 13px; color: var(--muted); }
.att__mixsum {
  display: flex; justify-content: space-between; align-items: baseline;
  border-top: 1px solid var(--rule); padding-top: 12px; margin-top: 4px;
  font-size: 14px; color: var(--muted);
}
.att__mixsumv { font-size: 17px; font-weight: 650; color: var(--ink); font-variant-numeric: tabular-nums; }

/* ---- Chart-Legende ---- */
.att__legend { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.att__legitem { display: flex; align-items: center; gap: 7px; }
.att__legkey { width: 18px; height: 0; border-top-width: 2px; border-top-style: solid; flex-shrink: 0; }

/* ---- Vertiefende Abschnitte ---- */
.att__note--quiet { background: var(--signal-soft); }
.att__k { font-size: 11.5px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase; color: var(--signal); margin-bottom: 5px; }
.att__impuls { font-size: 17px; line-height: 1.4; font-weight: 600; letter-spacing: -.01em; margin: 0; }
.att__tipps { list-style: none; counter-reset: tp; padding: 0; margin: 0; display: flex; flex-direction: column; gap: 15px; }
.att__tipps li { counter-increment: tp; position: relative; padding-left: 36px; }
.att__tipps li::before {
  content: counter(tp); position: absolute; left: 0; top: 1px;
  width: 24px; height: 24px; border-radius: 50%; background: var(--signal); color: #fff;
  font-size: 13px; font-weight: 700; display: flex; align-items: center; justify-content: center;
}
.att__tipps h3 { font-size: 15.5px; font-weight: 650; margin-bottom: 3px; }
.att__tipps p { margin: 0; color: var(--muted); font-size: 15px; }
.att__frage { margin: 0 0 14px; padding: 2px 0 2px 16px; border-left: 2px solid var(--signal); font-size: 15.5px; }
.att__frage:last-child { margin-bottom: 0; }
.att__marker { background: var(--panel); border: 1px solid var(--rule); border-radius: 4px; padding: 14px 17px; font-size: 15px; }
.att__marker strong { display: block; font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }

/* ---- Druckansicht: das Ergebnis als PDF zum Mitnehmen ---- */
@media print {
  @page { size: A4; margin: 13mm; }
  .att {
    background: #fff; padding: 0; min-height: 0; font-size: 10.5pt; line-height: 1.45;
    -webkit-print-color-adjust: exact; print-color-adjust: exact;
  }
  .att__rail, .att__noprint, .att__actions, .att__btn, .att__gate, .att__tbl { display: none !important; }
  .att__screen[hidden] { display: none !important; }
  .att__wrap, .att__wrap--wide { max-width: 100%; }

  /* Muss die Bildschirm-Umbruchregel überstimmen, sonst steht auf
     A4 jedes Diagramm allein auf einer Seite. */
  .att__charts { grid-template-columns: 1fr 1fr !important; gap: 10px; }
  .att__chart { padding: 12px 10px 8px; }
  .att__hero { break-inside: avoid; }
  .att__herotop { padding: 18px 20px 16px; }
  .att__herobody { padding: 16px 20px; gap: 16px; }
  .att__herotop #r-name { font-size: 24pt; }
  .att__motto { font-size: 12pt; margin-top: 8px; }
  .att h2 { font-size: 13pt; break-after: avoid; }
  .att__stack--loose { gap: 18px; }

  .att__chart, .att__gauge, .att__marker, .att__res, .att__note { break-inside: avoid; }
  .att__tipps li, .att__gaprow, .att__frage { break-inside: avoid; }
  .att__frage { margin-bottom: 11px; }
  .att__cta { break-inside: avoid; }
  .att__ctabtn { padding: 7px 13px; font-size: 9.5pt; }
  a[href]::after { content: ""; }
}

/* ---- Ressourcen-Balken ---- */
.att__gauges { display: flex; flex-direction: column; gap: 20px; margin-top: 4px; }
.att__gauges:empty { display: none; }
.att__gauge { background: var(--panel); border: 1px solid var(--rule); border-radius: 4px; padding: 18px 20px 16px; }
.att__gaugehead { display: flex; justify-content: space-between; align-items: baseline; gap: 14px; margin-bottom: 14px; }
.att__gaugetitle { font-size: 14.5px; font-weight: 650; }
.att__gaugeval { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.att__track { position: relative; height: 34px; }
.att__trackbg { position: absolute; left: 0; right: 0; top: 13px; height: 8px; background: var(--rule); border-radius: 4px; }
.att__band { position: absolute; top: 13px; height: 8px; background: var(--blue-soft); border-radius: 4px; border: 1px solid var(--blue); box-sizing: border-box; }
.att__fill { position: absolute; left: 0; top: 13px; height: 8px; background: var(--signal); border-radius: 4px; }
.att__pin { position: absolute; top: 5px; width: 3px; height: 24px; background: var(--signal); border-radius: 2px; }
.att__pin--goal { background: var(--blue); }
.att__scale2 { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); margin-top: 4px; font-variant-numeric: tabular-nums; }
.att__verdict { margin-top: 12px; font-size: 14px; line-height: 1.5; }
.att__verdict--warn { color: var(--signal); }

/* ---- Zielabgleich ---- */
.att__gap { display: flex; flex-direction: column; gap: 12px; }
.att__gaprow { display: grid; grid-template-columns: 1fr 90px; gap: 14px; align-items: center; font-size: 14.5px; }
.att__gapbar { height: 6px; background: var(--rule); border-radius: 3px; overflow: hidden; margin-top: 5px; }
.att__gapfill { height: 100%; background: var(--signal); border-radius: 3px; }
.att__gapv { text-align: right; font-variant-numeric: tabular-nums; font-size: 13.5px; color: var(--muted); white-space: nowrap; }

/* ---- Mehrfach-Bestzeiten ---- */
.att__times { display: flex; flex-direction: column; gap: 10px; }
.att__timerow { display: grid; grid-template-columns: 150px 1fr; gap: 12px; align-items: center; }
@media (max-width: 560px) { .att__timerow { grid-template-columns: 1fr; gap: 5px; } }
.att__timelbl { font-size: 15px; }

/* ---- Fields ---- */
.att__field { display: flex; flex-direction: column; gap: 7px; }
.att__label { font-size: 15px; font-weight: 550; }
.att__hint { font-size: 13px; color: var(--muted); }
.att input[type="text"], .att input[type="number"], .att input[type="email"], .att select {
  font: inherit; font-size: 15px; color: var(--ink); background: var(--panel);
  border: 1px solid var(--rule); border-radius: 4px; padding: 10px 12px; width: 100%;
}
.att input:focus-visible, .att select:focus-visible, .att button:focus-visible {
  outline: 2px solid var(--focus); outline-offset: 2px;
}
.att__grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 560px) { .att__grid2 { grid-template-columns: 1fr; } }

/* ---- Chips (multi/single choice) ---- */
.att__chips { display: flex; flex-wrap: wrap; gap: 8px; }
.att__chip { position: relative; }
.att__chip input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; width: 100%; height: 100%; }
.att__chipbox {
  display: block; padding: 9px 15px; border: 1px solid var(--rule); border-radius: 999px;
  background: var(--panel); font-size: 14.5px; transition: border-color .12s, background .12s;
}
.att__chip input:hover + .att__chipbox { border-color: var(--muted); }
.att__chip input:focus-visible + .att__chipbox { outline: 2px solid var(--focus); outline-offset: 2px; }
.att__chip input:checked + .att__chipbox { border-color: var(--signal); background: var(--signal-soft); color: var(--signal); }

/* ---- Buttons ---- */
.att__actions { display: flex; gap: 12px; align-items: center; padding-top: 8px; flex-wrap: wrap; }
.att button { font: inherit; cursor: pointer; border-radius: 4px; transition: opacity .12s, background .12s; }
.att__btn {
  background: var(--signal); color: #fff; border: 1px solid var(--signal);
  padding: 12px 26px; font-size: 15px; font-weight: 600;
}
.att__btn:hover { opacity: .88; }
.att__btn[disabled] { opacity: .4; cursor: not-allowed; }
.att__btn--ghost { background: transparent; color: var(--muted); border-color: var(--rule); font-weight: 500; }
.att__btn--ghost:hover { color: var(--ink); border-color: var(--muted); opacity: 1; }
.att__btn--link {
  background: none; border: none; color: var(--muted); padding: 4px 0;
  font-size: 13.5px; text-decoration: underline; text-underline-offset: 3px;
}
.att__btn--link:hover { color: var(--ink); }
.att__warn { font-size: 13.5px; color: var(--signal); }
.att__warn[hidden] { display: none; }

/* ---- Result: archetype hero ---- */
.att__hero { border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; background: var(--panel); }
.att__herotop { padding: 30px 28px 26px; border-bottom: 1px solid var(--rule); }
.att__herotop #r-name {
  font-size: clamp(28px, 5vw, 40px); line-height: 1.12; font-weight: 700;
  letter-spacing: -0.022em; text-wrap: balance;
}
.att__motto {
  font-size: clamp(17px, 2.4vw, 20px); font-style: italic; color: var(--muted);
  margin-top: 14px; max-width: 46ch;
}
.att__herobody { padding: 24px 28px; display: grid; gap: 22px; grid-template-columns: 1.4fr 1fr; }
@media (max-width: 720px) { .att__herobody { grid-template-columns: 1fr; } }
.att__traits { display: flex; flex-direction: column; gap: 16px; }
.att__traith {
  font-size: 11.5px; font-weight: 650; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); margin-bottom: 7px;
}
.att__traitlist { display: flex; flex-wrap: wrap; gap: 7px; }
.att__trait { font-size: 14px; padding: 4px 11px; border: 1px solid var(--rule); border-radius: 999px; }
.att__trait--risk { color: var(--muted); }

/* ---- Charts ---- */
.att__charts { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
@media (max-width: 880px) { .att__charts { grid-template-columns: 1fr; } }
.att__chart { background: var(--panel); border: 1px solid var(--rule); border-radius: 4px; padding: 20px 18px 16px; }
.att__charthead { margin-bottom: 4px; }
.att__chartsub { font-size: 13.5px; color: var(--muted); margin-top: 6px; }
.att__svgwrap { position: relative; margin: 4px -6px 0; }
.att__chart svg { display: block; width: 100%; height: auto; overflow: visible; }
.att__tip {
  position: absolute; pointer-events: none; opacity: 0; transition: opacity .1s;
  background: var(--ink); color: var(--paper); font-size: 12.5px; line-height: 1.35;
  padding: 7px 10px; border-radius: 4px; max-width: 210px; z-index: 5;
  transform: translate(-50%, -100%);
}
.att__tip strong { display: block; font-size: 13px; margin-bottom: 2px; }
.att__tbl { width: 100%; border-collapse: collapse; font-size: 14px; margin-top: 14px; }
.att__tbl[hidden] { display: none; }
.att__tbl th, .att__tbl td { text-align: left; padding: 7px 8px; border-bottom: 1px solid var(--rule-sr); }
.att__tbl th { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.att__tbl td:last-child { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.att__na { color: var(--muted); font-size: 13px; }

/* ---- Diagnostik note ---- */
.att__note {
  border-left: 3px solid var(--signal); background: var(--signal-soft);
  padding: 14px 16px; border-radius: 0 4px 4px 0; font-size: 14.5px;
}

/* ---- Resource summary ---- */
.att__res { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); border-radius: 4px; overflow: hidden; }
@media (max-width: 640px) { .att__res { grid-template-columns: 1fr; } }
.att__rescell { background: var(--panel); padding: 16px 18px; }
.att__resk { font-size: 11.5px; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.att__resv { font-size: 22px; font-weight: 650; font-variant-numeric: tabular-nums; }
.att__resu { font-size: 13px; color: var(--muted); font-weight: 400; }

/* ---- Consent / gate ---- */
.att__gate { background: var(--panel); border: 1px solid var(--rule); border-radius: 4px; padding: 26px 28px; }
.att__check { display: flex; gap: 11px; align-items: flex-start; font-size: 14px; line-height: 1.45; }
.att__check input { margin: 3px 0 0; flex-shrink: 0; width: 17px; height: 17px; accent-color: var(--signal); }
.att__legal { font-size: 12.5px; color: var(--muted); }
.att__cta { display: flex; flex-wrap: wrap; gap: 10px; }
.att__ctabtn {
  display: inline-block; padding: 11px 20px; border: 1px solid var(--signal); color: var(--signal);
  background: transparent; border-radius: 4px; font-size: 14.5px; font-weight: 600; text-decoration: none;
}
.att__ctabtn:hover { background: var(--signal-soft); }
.att__ctabtn--quiet { border-color: var(--rule); color: var(--muted); font-weight: 500; }
.att__ctabtn--quiet:hover { border-color: var(--muted); color: var(--ink); background: transparent; }

.att__foot { font-size: 12.5px; color: var(--muted); text-align: center; padding-top: 8px; }
@media (prefers-reduced-motion: reduce) {
  .att *, .att *::before, .att *::after { transition: none !important; animation: none !important; }
}
