/* trainerstab.app – Gestaltung wie in der App (docs/DESIGN.md): Neutraltöne mit einem Hauch Grün-Grau, Markengrün nur
   für das Wichtigste, Systemschrift, gleich breite Ziffern. Keine externen Schriften, Bilder oder Skripte. */
:root {
  --bg: #f2f4f3; --surface: #ffffff; --sunk: #e8ecea; --ink: #121815; --muted: #5e6964; --line: #dce1de; --faint: #8d9792;
  --green: #0d6b4b; --green-ink: #ffffff; --green-tx: #0d6b4b; --green-soft: #e3efe9;
  --ok: #17794f; --warn: #94620b; --hot: #ad4e1d; --low: #2d67c0; --crit: #bb372c;
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1110; --surface: #161b19; --sunk: #202623; --ink: #e9eeeb; --muted: #95a19b; --line: #2a312e; --faint: #6c7772;
    --green: #3fbf8a; --green-ink: #0d1110; --green-tx: #6fd3a7; --green-soft: #17322a;
    --ok: #3db57f; --warn: #e0a640; --hot: #ec7d4a; --low: #75a3ec; --crit: #ee6a57;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1.0625rem/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-feature-settings: "kern"; -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--green-tx); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.2; text-wrap: balance; margin: 0; }
h1 { font-size: clamp(2rem, 1.3rem + 3vw, 3.25rem); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: 1.5rem; font-weight: 750; letter-spacing: -0.015em; }
h3 { font-size: 1.125rem; font-weight: 700; }
p { margin: 0; }
.num { font-variant-numeric: tabular-nums; }
.skip { position: absolute; left: -999px; top: 0; }
.skip:focus { left: 16px; top: 12px; background: var(--surface); padding: 8px 12px; z-index: 2; }

/* Rahmen */
.wrap { width: 100%; max-width: 68rem; margin: 0 auto; padding-inline: 20px; }
.narrow { max-width: 46rem; }
header.top { padding-block: 18px; }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand span { font-size: 1.375rem; font-weight: 800; letter-spacing: -0.035em; }
.brand b { color: var(--green-tx); font-weight: 800; }
nav.top a { color: var(--muted); text-decoration: none; font-weight: 600; padding: 6px 2px; }
nav.top a:hover, nav.top a[aria-current="page"] { color: var(--ink); }
nav.top { display: flex; gap: 20px; }
main { padding-block: 8px 72px; overflow-x: hidden; overflow-x: clip; }
footer.bottom { border-top: 1px solid var(--line); padding-block: 28px 40px; color: var(--muted); font-size: 0.9375rem; }
footer.bottom .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 32px; }
footer.bottom nav { display: flex; flex-wrap: wrap; gap: 8px 22px; }
footer.bottom a { color: var(--muted); }
footer.bottom a:hover { color: var(--ink); }

/* Startseite */
.hero { isolation: isolate; display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr); gap: 48px; align-items: center; padding-block: 40px 56px; position: relative; }
.hero .lead { font-size: 1.1875rem; color: var(--muted); margin-top: 18px; max-width: 34rem; }
.hero .status { margin-top: 26px; display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.pill { display: inline-block; background: var(--green-soft); color: var(--green-tx); font-weight: 650; font-size: 0.9375rem; padding: 5px 12px; border-radius: 999px; }
.hero::before { /* Mittelkreis wie auf dem Platz: eine einzige Kreidelinie */
  content: ""; position: absolute; z-index: -1; width: 30rem; height: 30rem; right: -9rem; top: -1.5rem;
  border: 2px solid var(--line); border-radius: 50%; pointer-events: none;
}
.week { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 22px 22px 18px; }
.week .head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.week .head strong { font-size: 1.0625rem; }
.week .head span { color: var(--muted); font-size: 0.875rem; }
.bars { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; align-items: end; height: 170px; margin-top: 18px; }
.bar { position: relative; border-radius: 7px 7px 4px 4px; background: var(--green); opacity: 0.85; }
.bar.rest { background: transparent; border: 1.5px dashed var(--line); opacity: 1; }
.bar.light { background: var(--low); opacity: 0.75; }
.bar.match { background: var(--hot); opacity: 0.9; }
.bars .bar:nth-child(1) { height: 7%; } .bars .bar:nth-child(2) { height: 56%; } .bars .bar:nth-child(3) { height: 69%; }
.bars .bar:nth-child(4) { height: 48%; } .bars .bar:nth-child(5) { height: 20%; } .bars .bar:nth-child(6) { height: 100%; }
.bars .bar:nth-child(7) { height: 12%; }
.bar .au { position: absolute; top: -1.45em; left: 0; right: 0; text-align: center; font-size: 0.75rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; margin-top: 8px; text-align: center; font-size: 0.8125rem; }
.days b { display: block; font-weight: 650; }
.days span { color: var(--muted); font-variant-numeric: tabular-nums; }
.week .foot { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 0.8125rem; color: var(--muted); }
.key { display: inline-flex; align-items: center; gap: 6px; }
.key i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; background: var(--green); }
.key i.light { background: var(--low); } .key i.match { background: var(--hot); }

.section { padding-block: 44px; border-top: 1px solid var(--line); }
.section > h2 { margin-bottom: 24px; }
.cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr)); gap: 36px 48px; }
.cols h3 { margin-bottom: 12px; }
ul.plain { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
ul.plain li { padding-left: 1.4em; position: relative; }
ul.plain li::before { content: ""; position: absolute; left: 0.2em; top: 0.62em; width: 0.5em; height: 0.5em; border-radius: 50%; border: 2px solid var(--green); }
.facts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 28px; }
.facts p { color: var(--muted); font-size: 0.9375rem; margin-top: 6px; }
.facts strong { font-size: 1.0625rem; }
.note { color: var(--muted); font-size: 0.9375rem; max-width: 46rem; }
.more { margin-top: 22px; }

/* Textseiten */
.page-head { padding-block: 28px 8px; }
.page-head p { color: var(--muted); margin-top: 10px; }
.doc { padding-block: 8px 24px; }
.doc h2 { margin-top: 44px; margin-bottom: 12px; scroll-margin-top: 16px; }
.doc h3 { margin-top: 28px; margin-bottom: 8px; }
.doc p, .doc ul, .doc ol { margin-block: 0 14px; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin-block: 4px; }
.doc li > ul { margin-top: 4px; }
.doc hr { border: 0; border-top: 1px solid var(--line); margin-block: 40px; }
.doc blockquote { margin: 0 0 14px; padding: 12px 16px; background: var(--surface); border-left: 3px solid var(--green); border-radius: 0 8px 8px 0; }
.doc code { font-size: 0.9em; background: var(--sunk); padding: 1px 5px; border-radius: 5px; }
.table { overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.table table { border-collapse: collapse; width: 100%; font-size: 0.9375rem; line-height: 1.5; }
.table th, .table td { text-align: left; vertical-align: top; padding: 9px 12px; border-bottom: 1px solid var(--line); min-width: 9rem; overflow-wrap: anywhere; }
.table td:first-child, .table th:first-child { min-width: 9.5rem; overflow-wrap: normal; hyphens: auto; }
.table th { font-weight: 700; background: var(--sunk); }
.table tr:last-child td { border-bottom: 0; }
.toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin-block: 18px 8px; }
.toc summary { cursor: pointer; font-weight: 700; }
.toc ul { list-style: none; margin: 12px 0 0; padding: 0; columns: 2 16rem; column-gap: 32px; }
.toc li { margin-block: 3px; break-inside: avoid; }
.address { font-style: normal; line-height: 1.7; }
.facts-list { display: grid; gap: 4px 24px; grid-template-columns: max-content minmax(0, 1fr); margin: 0; }
.facts-list dt { color: var(--muted); }
.facts-list dd { margin: 0; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 14px; }
.steps > li { counter-increment: s; position: relative; padding-left: 2.6em; min-height: 1.9em; }
.steps > li::before { content: counter(s); position: absolute; left: 0; top: -0.05em; width: 1.9em; height: 1.9em; border-radius: 50%; display: grid; place-items: center; background: var(--green-soft); color: var(--green-tx); font-weight: 750; font-variant-numeric: tabular-nums; }
.faq details { border-bottom: 1px solid var(--line); padding-block: 14px; }
.faq details:first-of-type { border-top: 1px solid var(--line); }
.faq summary { cursor: pointer; font-weight: 650; list-style-position: outside; }
.faq details > div { margin-top: 10px; color: var(--ink); }
.faq details > div p + p { margin-top: 10px; }

/* Einladung, Bestätigung, Passwort */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: 18px; padding: 26px; margin-top: 22px; }
.code { font-size: clamp(2rem, 1.4rem + 3vw, 2.75rem); font-weight: 800; letter-spacing: 0.08em; font-variant-numeric: tabular-nums; margin: 6px 0 4px; word-break: break-all; }
.label { color: var(--muted); font-size: 0.9375rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 20px; align-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 12px 22px; border-radius: 12px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; border: 1.5px solid transparent; }
.btn.primary { background: var(--green); color: var(--green-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--faint); }
.btn[disabled] { opacity: 0.55; cursor: default; }
.hint { color: var(--muted); font-size: 0.9375rem; margin-top: 12px; }
.msg { margin-top: 16px; padding: 12px 14px; border-radius: 10px; background: var(--sunk); }
.msg.ok { background: var(--green-soft); color: var(--green-tx); font-weight: 600; }
.msg.err { border-left: 3px solid var(--crit); }
form.pw { display: grid; gap: 14px; margin-top: 18px; max-width: 26rem; }
form.pw label { display: grid; gap: 6px; font-weight: 600; }
form.pw input { font: inherit; padding: 12px 14px; border-radius: 10px; border: 1.5px solid var(--line); background: var(--bg); color: var(--ink); min-height: 48px; }
form.pw input:focus-visible { outline-offset: 1px; }
.install { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-top: 12px; }
.install a, .install div { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; color: var(--ink); background: var(--bg); }
.install strong { display: block; }
.install span { color: var(--muted); font-size: 0.9375rem; }
[hidden] { display: none !important; }
noscript p { margin-top: 12px; }

@media (max-width: 860px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 34px; padding-top: 20px; }
  .hero::before { width: 22rem; height: 22rem; right: -11rem; top: 1rem; }
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .wrap { padding-inline: 16px; }
  .install { grid-template-columns: minmax(0, 1fr); }
  .facts { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .bars { height: 140px; gap: 6px; }
  .days { gap: 6px; font-size: 0.75rem; }
  .days span { font-size: 0.6875rem; letter-spacing: -0.02em; white-space: nowrap; }
  .week { padding: 18px 14px 14px; }
  .panel { padding: 20px; }
  .facts-list { grid-template-columns: minmax(0, 1fr); }
  .facts-list dd { margin-bottom: 8px; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; } }
@media print { header.top nav, footer.bottom nav, .toc { display: none; } body { background: #fff; color: #000; } }
