/* Fortschritt: builds on style.css (tokens, fonts, topbar, karte, knopf,
   eingabe, marke, balken). Only the page layout and the charts live here. */

.stats-seite .zurueck-app { margin-left: auto; }
.stats-seite .zurueck-app svg { width: 18px; height: 18px; }

.s-main { display: grid; gap: 18px; }
.s-kopf { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 1rem 2rem; margin-bottom: .4rem; }
.s-kopf h1 { margin: 0 0 .3rem; font-size: clamp(2rem, 4vw, 2.8rem); }
.ex-pick { min-width: min(320px, 100%); font-size: .9rem; color: var(--ink-2); }

.leer { display: grid; justify-items: center; gap: .6rem; padding: 2.2rem 1.4rem; text-align: center; }
.leer h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 1.9rem); }
.leer p { max-width: 34em; margin: 0 0 .6rem; color: var(--ink-2); }
.ohne-daten [data-daten] { display: none; }
.ohne-daten .s-reihe.drei { grid-template-columns: 1fr 1fr; }

.s-reihe { display: grid; gap: 18px; }
.s-reihe.drei { grid-template-columns: 1.7fr 1fr 1.2fr; }
.s-reihe.zwei-eins { grid-template-columns: 2fr 1fr; }
.s-reihe.zwei { grid-template-columns: 1fr 1fr; }

.s-karte { min-width: 0; }
.s-karte h2 { margin: 0 0 .7rem; font: 700 .8rem/1.2 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); }
.s-karte-kopf { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: .6rem 1rem; margin-bottom: .8rem; }
.s-karte-kopf h2 { margin: 0; }
.s-karte p { margin: .3rem 0 0; }
.gross { font: 800 2.6rem/1.05 var(--serif); color: var(--ink); font-variant-numeric: tabular-nums; }
.klein { font-size: .85rem; }

/* Heute üben */
.vorschlag { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--red) 45%, transparent), var(--schatten); }
.sugg-main { font: 700 1.35rem/1.25 var(--serif); }
.sugg-main small { margin-left: .5em; font: 700 .9rem/1 var(--sans); color: var(--red); white-space: nowrap; }
.sugg-reason { color: var(--ink-2); margin: .35rem 0 .8rem; }
.sugg-more { display: flex; flex-wrap: wrap; gap: 6px; }

/* Tagesziel */
.ziel-balken { height: 10px; margin-top: .4rem; }
.ziel-einstellung { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.2rem; margin-top: 1rem; font-size: .9rem; color: var(--ink-2); }
.ziel-einstellung label { display: flex; align-items: center; gap: .45rem; }
.ziel-einstellung input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--sea); }
.ziel-einstellung .eingabe { width: 4.6em; min-height: 40px; padding: .35em .6em; text-align: center; }
#goal-card.off #goal-body { display: none; }

/* Verlauf */
.legende { display: flex; align-items: center; gap: .4rem; font-size: .85rem; color: var(--ink-2); }
.legende i { display: inline-block; width: 16px; height: 4px; margin-left: .7rem; border-radius: 2px; }
.lg-bpm { background: var(--sea); }
.lg-acc { background: rgb(var(--gruen-rgb)); }
.kurve { display: block; width: 100%; height: 250px; }
.rolle { display: block; width: 100%; height: 200px; border-radius: 16px; }

/* Aufnahme */
.aufnahme-steuerung { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.aufnahme-steuerung .eingabe { width: auto; min-width: 15em; min-height: 40px; padding-block: .35em; font-size: .92rem; }

/* Timing-Raster */
.hm-wrap { overflow-x: auto; }
.hm { display: grid; grid-template-columns: 84px repeat(8, minmax(38px, 1fr)); gap: 5px; align-items: stretch; margin-bottom: .5rem; }
.hm .hd { text-align: center; font: 700 .85rem/1.4 var(--sans); color: var(--ink-3); }
.hm .hd.beat { color: var(--ink); }
.hm .lbl { display: flex; align-items: center; font-size: .85rem; color: var(--ink-2); }
.hm .cell { min-height: 56px; padding: .45rem .15rem; border-radius: 12px; text-align: center; box-shadow: inset 0 0 0 1px var(--haar); font-variant-numeric: tabular-nums; }
.hm .cell b { display: block; font-size: .9rem; color: var(--ink); }
.hm .cell span { font-size: .75rem; color: var(--ink-2); }
.hm .cell.empty { opacity: .4; }

/* Swing */
.swing-skala { position: relative; height: 8px; margin: 1.3rem 0 .5rem; border-radius: 99px; background: linear-gradient(90deg, var(--sea-soft), color-mix(in srgb, var(--sea) 55%, transparent)); }
.swing-skala .tick { position: absolute; top: -6px; width: 2px; height: 20px; margin-left: -1px; border-radius: 1px; background: var(--ink-3); }
.swing-skala .punkt { position: absolute; top: -5px; width: 18px; height: 18px; margin-left: -9px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 4px color-mix(in srgb, var(--red) 22%, transparent); }
.swing-labels { display: flex; justify-content: space-between; font-size: .8rem; color: var(--ink-3); }

/* Tabellen */
.stats-seite table { width: 100%; border-collapse: collapse; font-size: .95rem; font-variant-numeric: tabular-nums; }
.stats-seite th, .stats-seite td { padding: .5rem .7rem; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--haar); }
.stats-seite th { position: sticky; top: 0; font: 700 .75rem/1.2 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); background: var(--card); }
.stats-seite td.num, .stats-seite th.num { text-align: right; }
.stats-seite tr:hover td { background: var(--glas); }
.tabelle { max-height: 440px; overflow: auto; margin-inline: -.4rem; }
.acc-bar { display: inline-block; height: 6px; margin-left: .6rem; border-radius: 3px; background: rgb(var(--gruen-rgb)); vertical-align: middle; }

/* Meilensteine */
.meilensteine { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; }
.meilensteine li { display: flex; align-items: center; gap: .7rem; padding: .5rem .8rem; border-radius: 14px; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--haar); }
.meilensteine li.done { color: var(--ink); background: rgba(var(--gruen-rgb), .12); box-shadow: inset 0 0 0 1px rgba(var(--gruen-rgb), .4); }
.meilensteine li.next { box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--red) 55%, transparent); }
.meilensteine .badge { display: grid; place-items: center; flex: none; width: 24px; height: 24px; border-radius: 50%; font-size: .8rem; font-weight: 700; box-shadow: inset 0 0 0 1.5px var(--haar-2); }
.meilensteine li.done .badge { color: #fff; background: rgb(var(--gruen-rgb)); box-shadow: none; }
.meilensteine .when { margin-left: auto; font-size: .8rem; color: var(--ink-3); }

@media (max-width: 900px) {
  .s-reihe.drei, .s-reihe.zwei-eins, .s-reihe.zwei, .ohne-daten .s-reihe.drei { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .stats-seite .brand > span { display: none; }
  .ex-pick { width: 100%; }
  .aufnahme-steuerung { width: 100%; }
  .aufnahme-steuerung .eingabe { flex: 1 1 100%; min-width: 0; }
  .aufnahme-steuerung .knopf { flex: 1 1 0; padding-inline: .6em; }
  .hm { grid-template-columns: 50px repeat(8, minmax(0, 1fr)); gap: 3px; }
  .hm .lbl { font-size: .75rem; line-height: 1.15; }
  .hm .cell { min-height: 50px; padding: .4rem 0; border-radius: 9px; }
  .hm .cell b { font-size: .78rem; }
  .hm .cell span { font-size: .62rem; }
  .kurve { height: 210px; }
  .gross { font-size: 2.2rem; }
}
