/* Ergänzende Stile der Gruppe „uni" — nur Klassen mit eigenem Präfix.
   tt- Stundenplan · gr- Noten · at- Anwesenheit · st- Statistik */

:root {
  --tt-sat: 62%; --tt-light: 44%; --tt-axis: 46px;
  --gr-a: #10B981; --gr-b: #0EA5E9; --gr-c: #F59E0B; --gr-d: #F43F5E;
  --at-present: #54B380; --at-partial: #EDAD4D; --at-absent: #E06661; --at-excused: color-mix(in srgb, var(--muted) 45%, transparent);
}
[data-theme="dark"] {
  --tt-sat: 55%; --tt-light: 64%;
  --at-present: #5CC48B; --at-partial: #F0B65C; --at-absent: #EE7570;
}

/* ================= Stundenplan ================= */
.tt-card { overflow: hidden; }
.tt-scroll { overflow-x: auto; overscroll-behavior-x: contain; }
.tt-week { position: relative; }
.tt-head, .tt-banners, .tt-body { display: grid; }
.tt-head { position: sticky; top: 0; z-index: 3; background: var(--surface); border-bottom: 1px solid var(--border); }
.tt-day-head { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 8px 0 7px; border-left: 1px solid var(--hairline); color: var(--muted); }
.tt-dow { font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; }
.tt-dom { font-size: 17px; font-weight: 650; color: var(--fg); width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; letter-spacing: -.01em; }
.tt-day-head.today .tt-dow { color: var(--accent-fg); }
.tt-day-head.today .tt-dom { background: var(--accent); color: var(--on-accent); }

.tt-banners { padding: 4px 0; border-bottom: 1px solid var(--border); row-gap: 3px; background: var(--surface); }
.tt-axis-label { font-size: 10px; color: var(--faint); text-align: right; padding-right: 8px; align-self: center; grid-row: 1; grid-column: 1; line-height: 1.1; }
.tt-banner { --c: var(--accent); margin: 0 3px; padding: 3px 8px; border-radius: 6px; font-size: 12px; font-weight: 600; text-align: left; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  color: color-mix(in srgb, var(--c) 55%, var(--fg)); background: color-mix(in srgb, var(--c) 16%, var(--surface)); border-left: 3px solid var(--c); min-width: 0; }
.tt-banner:hover { background: color-mix(in srgb, var(--c) 24%, var(--surface)); }
.tt-banner.wide { margin: 0; padding: 8px 12px; font-size: 13.5px; }
.tt-banner.exam { border-left-style: double; }

.tt-body { position: relative; }
.tt-axis { position: relative; }
.tt-axis span { position: absolute; right: 8px; transform: translateY(-50%); font-size: 11px; color: var(--faint); font-variant-numeric: tabular-nums; }
.tt-axis span:first-child { transform: translateY(0); }
.tt-col { position: relative; border-left: 1px solid var(--hairline);
  background-image: linear-gradient(to bottom, var(--hairline) 1px, transparent 1px); background-repeat: repeat-y; }
.tt-col.today { background-color: color-mix(in srgb, var(--accent) 4%, transparent); }
.tt-col.weekend { background-color: color-mix(in srgb, var(--fg) 2.5%, transparent); }
.tt-block { --c: var(--accent); position: absolute; display: flex; flex-direction: column; gap: 1px; align-items: flex-start; text-align: left; overflow: hidden;
  padding: 4px 6px 4px 7px; border-radius: 7px; border: 0; border-left: 3px solid var(--c);
  background: color-mix(in srgb, var(--c) 14%, var(--surface)); color: color-mix(in srgb, var(--c) 55%, var(--fg));
  transition: filter .12s, box-shadow .12s; min-width: 0; }
[data-theme="dark"] .tt-block { background: color-mix(in srgb, var(--c) 24%, var(--surface)); }
.tt-block:hover { filter: brightness(.97); box-shadow: 0 2px 8px rgba(0,0,0,.12); z-index: 2; }
[data-theme="dark"] .tt-block:hover { filter: brightness(1.12); }
.tt-block.past { opacity: .74; }
.tt-block.live { box-shadow: 0 0 0 1.5px var(--c); opacity: 1; }
.tt-block.exam { background-image: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--c) 10%, transparent) 6px 8px); }
.tt-block-title { font-size: 12px; font-weight: 650; line-height: 1.22; letter-spacing: -.005em; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; hyphens: auto; overflow-wrap: anywhere; width: 100%; }
.tt-block.short .tt-block-title { -webkit-line-clamp: 1; }
.tt-block-meta { font-size: 11px; opacity: .8; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; width: 100%; font-weight: 500; }
.tt-now { position: absolute; left: 0; right: 0; height: 0; border-top: 2px solid var(--danger); z-index: 4; pointer-events: none; }
.tt-now i { position: absolute; left: -5px; top: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }

.tt-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.tt-pill { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 0 6px; border-radius: 12px; color: var(--muted); font-size: 11px; font-weight: 650; text-transform: uppercase; letter-spacing: .05em; position: relative; }
.tt-pill b { font-size: 17px; font-weight: 650; color: var(--fg); letter-spacing: -.01em; text-transform: none; }
.tt-pill i { width: 5px; height: 5px; border-radius: 50%; background: transparent; margin-top: 1px; }
.tt-pill i.has { background: var(--faint); }
.tt-pill:hover { background: color-mix(in srgb, var(--fg) 5%, transparent); }
.tt-pill.on { background: var(--accent); color: var(--on-accent); }
.tt-pill.on b { color: var(--on-accent); }
.tt-pill.on i.has { background: var(--on-accent); }
.tt-pill.today:not(.on) b { color: var(--accent-fg); }

.tt-day { display: flex; flex-direction: column; gap: 6px; }
.tt-item { --c: var(--accent); display: flex; align-items: center; gap: var(--s3); text-align: left; width: 100%; padding: 11px var(--s4) 11px var(--s3);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow-card); }
.tt-item:hover { border-color: color-mix(in srgb, var(--c) 40%, var(--border)); }
.tt-item .bar { background: var(--c); align-self: stretch; }
.tt-item.past { opacity: .72; }
.tt-item.live { border-color: var(--c); box-shadow: 0 0 0 1px var(--c), var(--shadow-card); }
.tt-item-time { display: flex; flex-direction: column; align-items: flex-end; width: 44px; flex: none; line-height: 1.25; }
.tt-item-time b { font-size: 14px; font-weight: 650; }
.tt-item-time span { font-size: 12px; color: var(--muted); }
.tt-item-title { font-weight: 600; line-height: 1.3; hyphens: auto; overflow-wrap: anywhere; }
.tt-gap { display: flex; align-items: center; gap: var(--s3); color: var(--faint); font-size: 12px; padding: 0 var(--s3); }
.tt-gap::before, .tt-gap::after { content: ""; flex: 1; border-top: 1px dashed var(--border); }

.tt-facts { display: flex; flex-direction: column; gap: 8px; }
.tt-facts > div { display: flex; align-items: flex-start; gap: var(--s3); }
.tt-facts .icon { color: var(--muted); margin-top: 2px; }
.tt-fact-stat { display: flex; flex-direction: column; background: var(--sunken); border-radius: var(--radius-sm); padding: 9px 11px; }
.tt-fact-stat b { font-size: 20px; letter-spacing: -.02em; }
.tt-fact-stat span { font-size: 11.5px; color: var(--muted); }
.tt-foot { margin: var(--s3) 2px 0; display: flex; gap: 6px; align-items: flex-start; line-height: 1.5; }
.tt-foot .icon { margin-top: 2px; }
@media (max-width: 520px) { .tt-facts + div .grid.c3 { grid-template-columns: repeat(3, 1fr); } .tt-fact-stat b { font-size: 17px; } }

/* ================= Noten ================= */
.gr-hero { display: flex; align-items: center; gap: var(--s5); }
.gr-ring { width: 128px; height: 128px; flex: none; }
.gr-ring-bg { fill: none; stroke: var(--border); stroke-width: 11; }
.gr-ring-fg { fill: none; stroke-width: 11; stroke-linecap: round; transition: stroke-dasharray .8s var(--spring); }
.gr-ring-num { font-size: 27px; font-weight: 700; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.gr-ring-cap { font-size: 9.5px; fill: var(--muted); font-weight: 500; }
.gr-dist { display: flex; gap: 2px; height: 10px; border-radius: 6px; overflow: hidden; }
.gr-dist span { min-width: 6px; }
.gr-dotl { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.gr-up { color: var(--gr-a); } .gr-down { color: var(--gr-d); }
.gr-up .icon, .gr-down .icon { vertical-align: -3px; margin-right: 4px; }
.gr-stats { grid-template-columns: repeat(4, minmax(0, 1fr)); }
@media (max-width: 720px) { .gr-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .gr-hero { gap: var(--s4); } .gr-ring { width: 100px; height: 100px; } }
.gr-hls { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: var(--s3); margin-top: var(--s3); }
.gr-hl { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.gr-hl b { font-size: 24px; letter-spacing: -.02em; }
.gr-hl .icon { vertical-align: -3px; }

.gr-chart { width: 100%; height: auto; display: block; overflow: visible; }
.gr-grid { stroke: var(--hairline); stroke-width: 1; }
.gr-axis { font-size: 11px; fill: var(--muted); }
.gr-avg { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 4; }
.gr-line { fill: none; stroke: var(--accent); stroke-width: 2.2; stroke-linejoin: round; stroke-linecap: round; }
.gr-dot { stroke: var(--surface); stroke-width: 2; }
.gr-last { font-size: 12px; font-weight: 700; }

.gr-heat { display: flex; flex-direction: column; gap: 7px; }
.gr-heat-row { display: flex; align-items: center; gap: var(--s3); }
.gr-heat-label { width: 84px; flex: none; font-size: 12px; color: var(--muted); }
.gr-cell { width: 24px; height: 24px; border-radius: 6px; display: inline-block; }
.gr-cell.open { border: 1px dashed var(--border); }
.gr-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11.5px; color: var(--muted); margin-top: 6px; }
.gr-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 5px; vertical-align: -1px; }

.gr-sem { overflow: hidden; }
.gr-sem-head { display: flex; align-items: center; gap: var(--s3); width: 100%; padding: 13px var(--s4); text-align: left; }
.gr-sem-head:hover { background: color-mix(in srgb, var(--fg) 3.5%, transparent); }
.gr-sem-name { font-weight: 650; letter-spacing: -.005em; }
.gr-sem-gpa { font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.gr-mods { border-top: 1px solid var(--hairline); }
.gr-mod + .gr-mod { border-top: 1px solid var(--hairline); }
.gr-mod-row { display: flex; align-items: center; gap: var(--s3); width: 100%; text-align: left; padding: 10px var(--s4); min-height: 52px; }
.gr-mod-row.clickable:hover { background: color-mix(in srgb, var(--fg) 3.5%, transparent); }
.gr-mod-name { font-weight: 500; line-height: 1.3; overflow-wrap: anywhere; hyphens: auto; min-width: 0; }
.gr-mod-side { gap: 6px; flex: none; }
.gr-ind { --c: var(--faint); width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center; font-size: 12.5px; font-weight: 700; letter-spacing: -.01em;
  color: var(--c); background: color-mix(in srgb, var(--c) 13%, var(--surface)); box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--c) 45%, transparent); }
.gr-exams { padding: 0 var(--s4) 12px 66px; display: flex; flex-direction: column; gap: 6px; }
.gr-exam { display: flex; gap: var(--s3); justify-content: space-between; font-size: 13px; color: var(--muted); }
.gr-exam b { color: var(--fg); font-weight: 650; white-space: nowrap; }
.gr-exam .faint { font-size: 12px; white-space: nowrap; }
@media (max-width: 520px) { .gr-mod-side .chip:not(.success):not(.danger):not(:first-child) { display: none; } .gr-exams { padding-left: 16px; } }
.gr-foot { display: flex; gap: 6px; margin: var(--s5) 2px 0; line-height: 1.5; }
.gr-foot .icon { margin-top: 2px; }

/* ================= Anwesenheit ================= */
.at-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s5); align-items: start; }
@media (max-width: 900px) { .at-layout { grid-template-columns: minmax(0, 1fr); } }
.at-live { width: 10px; height: 10px; border-radius: 50%; background: color-mix(in srgb, var(--muted) 40%, transparent); flex: none; }
.at-live.on { background: var(--at-present); box-shadow: 0 0 0 4px color-mix(in srgb, var(--at-present) 22%, transparent); }
.at-rate { display: flex; align-items: center; gap: var(--s5); }
.at-ring { width: 112px; height: 112px; flex: none; }
.at-ring-bg { fill: none; stroke: var(--border); stroke-width: 10; opacity: .7; }
.at-ring-fg { fill: none; stroke: var(--accent); stroke-width: 10; stroke-linecap: round; transition: stroke-dasharray .8s var(--spring); }
.at-ring-num { font-size: 32px; font-weight: 650; letter-spacing: -.02em; fill: var(--fg); font-variant-numeric: tabular-nums; }
.at-ring-pct { font-size: 14px; fill: var(--muted); font-weight: 500; }
.at-count { display: flex; align-items: center; gap: var(--s2); font-size: 14px; }
.at-count b { margin-left: auto; font-variant-numeric: tabular-nums; }
.at-dot { width: 9px; height: 9px; border-radius: 50%; flex: none; background: var(--faint); display: inline-block; }
.at-dot.present { background: var(--at-present); } .at-dot.partial { background: var(--at-partial); }
.at-dot.absent { background: var(--at-absent); } .at-dot.excused { background: var(--at-excused); }
.at-bar { display: flex; gap: 2px; height: 7px; border-radius: 4px; background: var(--sunken); overflow: hidden; }
.at-bar span { min-width: 4px; border-radius: 4px; }
.at-bar .present { background: var(--at-present); } .at-bar .partial { background: var(--at-partial); } .at-bar .absent { background: var(--at-absent); }
.at-unit { font-size: 13px; font-weight: 500; color: var(--muted); }

.at-heat { display: grid; gap: 4px; align-items: center; }
.at-heat-kw { font-size: 10.5px; color: var(--faint); text-align: center; }
.at-heat-day { font-size: 11px; color: var(--muted); }
.at-cell { aspect-ratio: 1; border-radius: 5px; max-height: 30px; width: 100%; }
.at-cell.none { background: transparent; }
.at-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11.5px; color: var(--muted); }
.at-legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; margin-right: 5px; vertical-align: -1px; }

.at-lec { display: flex; align-items: center; gap: var(--s3); width: 100%; text-align: left; padding: 10px var(--s4); min-height: 50px; }
.at-lec:hover { background: color-mix(in srgb, var(--fg) 3.5%, transparent); }
.at-lec-title { font-weight: 500; }
.at-lec-side { font-size: 12.5px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; display: inline-flex; align-items: center; gap: 4px; }
.at-lec-side.manual { color: var(--fg); font-weight: 600; }
.at-visit { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; font-weight: 600; color: var(--muted); background: var(--sunken); font-variant-numeric: tabular-nums; }
.at-visit:hover { background: color-mix(in srgb, var(--accent) 12%, var(--sunken)); color: var(--fg); }
@media (max-width: 520px) { .at-rate { gap: var(--s4); } .at-ring { width: 96px; height: 96px; } }

/* ================= Statistik (und gemeinsame Diagramm-Klassen) ================= */
.st-tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--s3); margin-bottom: var(--s3); }
.st-two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--s3); margin-top: var(--s3); }
.st-card { margin-top: var(--s3); display: flex; flex-direction: column; gap: var(--s3); min-width: 0; }
.st-two > .st-card { margin-top: 0; }
@media (max-width: 900px) { .st-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } .st-two { grid-template-columns: minmax(0, 1fr); } .st-two > .st-card { margin-top: var(--s3); } .st-two > .st-card:first-child { margin-top: 0; } }
.st-tile { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.st-tile > .icon { color: var(--accent-fg); }
.st-tile-v { display: flex; align-items: baseline; gap: 5px; flex-wrap: wrap; }
.st-tile-v b { font-size: 24px; letter-spacing: -.02em; font-weight: 700; }
.st-tile-v span { font-size: 12px; color: var(--muted); }
.st-tile-c { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.st-tile.up .st-tile-c { color: var(--success); font-weight: 600; }
.st-hint { padding: var(--s4) 0; text-align: center; }

.st-focus { display: flex; align-items: center; gap: var(--s4); }
.st-ring { width: 92px; height: 92px; flex: none; }
.st-ring-bg { fill: none; stroke: var(--border); stroke-width: 11; opacity: .8; }
.st-ring-fg { fill: none; stroke: var(--accent); stroke-width: 11; stroke-linecap: round; transition: stroke-dasharray .7s var(--spring); }
.st-ring-num { font-size: 24px; font-weight: 650; fill: var(--fg); letter-spacing: -.02em; }
.st-ring-pct { font-size: 11px; fill: var(--muted); font-weight: 500; }
.st-dots { display: flex; gap: 6px; flex-wrap: wrap; }
.st-dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--border); }
.st-dot.filled { background: var(--accent); border-color: var(--accent); }
.st-dot.grace { background: color-mix(in srgb, var(--accent) 28%, transparent); border-color: color-mix(in srgb, var(--accent) 40%, transparent); }

.st-chart { width: 100%; height: auto; display: block; overflow: visible; }
.st-grid { stroke: var(--hairline); stroke-width: 1; }
.st-axis { font-size: 11px; fill: var(--muted); }
.st-axis-now { fill: var(--accent-fg); font-weight: 700; }
.st-axis-r { fill: var(--faint); }
.st-val { font-size: 10.5px; fill: var(--fg); font-weight: 600; }
.st-bar { fill: color-mix(in srgb, var(--accent) 38%, var(--surface)); transition: fill .12s; }
rect.st-bar:hover { fill: color-mix(in srgb, var(--accent) 62%, var(--surface)); }
.st-bar.now { fill: var(--accent); }
.st-bar.fast { fill: color-mix(in srgb, var(--success) 70%, var(--surface)); }
.st-bar.slow { fill: color-mix(in srgb, var(--warn) 75%, var(--surface)); }
.st-avg { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 4 4; }
.st-line { fill: none; stroke: var(--fg); stroke-opacity: .72; stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; }
.st-pt { fill: var(--surface); stroke: var(--fg); stroke-opacity: .8; stroke-width: 1.8; }
.st-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 11.5px; color: var(--muted); align-items: center; }
.st-legend i { display: inline-block; vertical-align: -1px; margin-right: 5px; }
i.st-bar { width: 10px; height: 10px; border-radius: 3px; background: color-mix(in srgb, var(--accent) 38%, var(--surface)); fill: none; }
.st-lg-line { width: 14px; height: 0; border-top: 2px solid color-mix(in srgb, var(--fg) 72%, transparent); }
.st-sw { width: 10px; height: 10px; border-radius: 3px; display: inline-block; flex: none; background: color-mix(in srgb, var(--accent) 60%, var(--surface)); }
.st-sw.fast { background: color-mix(in srgb, var(--success) 70%, var(--surface)); } .st-sw.slow { background: color-mix(in srgb, var(--warn) 75%, var(--surface)); }

.st-heat-wrap { overflow-x: auto; padding-bottom: 2px; }
.st-heat-wrap + .st-legend { margin-top: 2px; }
.st-heat { max-width: none; height: auto; display: block; }
.st-cell { fill: var(--sunken); stroke: var(--hairline); stroke-width: 1; }
.st-cell.future { fill: transparent; stroke-dasharray: 2 2; stroke: var(--hairline); }
.st-cell.today { stroke: var(--accent); stroke-width: 1.6; }
.st-row { display: grid; grid-template-columns: minmax(70px, 150px) 1fr auto; gap: var(--s3); align-items: center; }
.st-row.prio { grid-template-columns: 84px 1fr auto; }
.st-row b { white-space: nowrap; }
.st-track { display: flex; height: 8px; background: var(--sunken); border-radius: 5px; overflow: hidden; min-width: 0; }
.st-track span { display: block; height: 100%; min-width: 0; }
.st-track span:first-child { border-radius: 5px 0 0 5px; }
.st-soon { color: var(--warn); font-weight: 600; }
@media (max-width: 520px) { .st-focus { gap: var(--s3); } .st-row { grid-template-columns: minmax(60px, 100px) 1fr auto; } }

.at-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--s3); }
@media (max-width: 520px) { .at-tiles .card.pad { padding: var(--s3); } .at-tiles .stat b { font-size: 20px; } }
