/* Tagesblatt auf „Pensum“: Überblick über den Kartentag (Stapel, Fälle, Skript), Vertiefung je Fall, Karten nach
   Teilgebiet. Grundbausteine (Karte, Aufgaben, deckt, chips) in app.css. */

/* Fall im Tagesblatt; die Spalte der Art so breit wie „hemmer“, damit die Titel untereinander stehen */
.aufgaben .aufgabe-art { min-width: 62px; }
.aufgabe-text .deckt { margin-top: 6px; }
.tb-knoepfe { margin-top: 8px; }
.aufgabe.fertig .deckt, .aufgabe.fertig .tb-knoepfe { display: none; }

/* Stapel der neuen Karten an der Anki-Zeile: Namen leise, Zahlen in Textfarbe */
.tb-stapelzeile b { font-weight: 600; color: var(--text); font-variant-numeric: tabular-nums; }
.aufgabe.fertig .tb-stapelzeile b { color: inherit; }

/* Vertiefung je Fall und Skriptpapier: Kurzbeschreibung offen, die Hinweise in zugeklappten Gruppen */
.tb-vertiefung { margin-top: 20px; }
.tb-teil { margin-top: 10px; padding-bottom: 6px; }
.tb-teil + .tb-teil { margin-top: 20px; }
.tb-teil h3 { margin: 0 0 4px; font-size: var(--t-text); font-weight: 600; text-wrap: balance; }
.tb-teil > p { margin: 0 0 8px; line-height: 1.45; color: var(--text-2); text-wrap: pretty; }
.tb-hinweise { list-style: none; margin: 0 0 10px; padding: 0; display: grid; gap: 10px; }
.tb-hinweise li { display: grid; gap: 2px; font-size: var(--t-neben); line-height: 1.45; text-wrap: pretty; }
.tb-hinweise li b { font-weight: 600; }
.tb-hinweise li span { color: var(--text-2); }

/* Karten des Tages nach Teilgebiet; dieselbe Klappzeile tragen die Gruppen der Vertiefung */
.tb-gebiete { margin-top: 4px; }
.tb-gebiet, .tb-gruppe { border-top: 1px solid var(--linie); }
.tb-gebiet summary, .tb-gruppe summary {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px; padding: 9px 0;
  font-size: var(--t-text); font-weight: 600; cursor: pointer; list-style: none;
}
.tb-gruppe summary { font-size: var(--t-neben); font-weight: 500; padding: 7px 0; }
.tb-gebiet summary::-webkit-details-marker, .tb-gruppe summary::-webkit-details-marker { display: none; }
.tb-gebiet summary > span:first-child::after, .tb-gruppe summary > span:first-child::after { content: " ›"; color: var(--text-3); font-weight: 400; }
.tb-gebiet[open] summary > span:first-child::after, .tb-gruppe[open] summary > span:first-child::after { content: " ⌄"; }
.tb-gruppe summary:focus-visible { outline: 2px solid var(--studium); outline-offset: 2px; border-radius: var(--r-punkt); }
.tb-stapel { padding: 2px 0 8px 12px; border-left: 2px solid var(--studium-weich); margin-bottom: 8px; }
.tb-stapel-kopf { display: flex; justify-content: space-between; gap: 12px; font-size: var(--t-neben); }
.tb-stapel p { margin: 4px 0 0; line-height: 1.4; }

/* ---------- Lage: Countdown und Fahrplan über der Tagesleiste ---------- */

.st-lage { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: end; gap: 40px; margin: 0 0 24px; }
.st-lage-unter { font-size: var(--t-text); margin-top: 6px; }
.st-fahrplan { min-width: 0; display: grid; gap: 14px; }
.st-phasen { position: relative; display: flex; gap: 2px; }
.st-phase { flex: 1 0 0; min-width: 0; display: grid; gap: 6px; }
.st-phase b {
  display: flex; align-items: center; height: 40px; padding: 0 8px; background: var(--flaeche);
  font-size: var(--t-neben); font-weight: 600; white-space: nowrap; overflow: hidden;
}
.st-phase:first-of-type b { border-radius: var(--r-feld) 0 0 var(--r-feld); }
.st-phase:last-of-type b { border-radius: 0 var(--r-feld) var(--r-feld) 0; }
.st-phase.jetzt b { background: var(--studium-weich); color: var(--studium); }
.st-phase.examen b { background: var(--studium); color: #fff; }
.st-phase span { min-height: 1.3em; padding-left: 2px; font-size: var(--t-klein); color: var(--text-3); white-space: nowrap; overflow: hidden; }
.st-zeiger { position: absolute; top: -9px; width: 0; height: 0; margin-left: -5px; border: 5px solid transparent; border-top: 7px solid var(--text); border-bottom: 0; }
@media (max-width: 900px) { .st-lage { grid-template-columns: minmax(0, 1fr); gap: 20px; } }
.eingebettet .st-lage { margin-top: 6px; }

/* ---------- Tagesleiste: die Woche über dem Tagesblatt ---------- */

.st-leiste { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px; margin: -8px -8px 16px; }
.st-tage { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.st-tag {
  display: grid; justify-items: center; gap: 2px; padding: 10px 4px 8px; border-radius: var(--r-kachel);
  font-size: var(--t-klein); color: var(--text-2); transition: background 150ms var(--ease);
}
.st-tag b { width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; font-size: var(--t-text); font-weight: 600; color: var(--text); }
.st-tag i { font-style: normal; min-height: 1.4em; display: grid; place-items: center; white-space: nowrap; }
.st-tag i svg { width: 12px; height: 12px; color: var(--studium); }
.st-tag.offen i { font-weight: 600; color: var(--studium); }
.st-tag.heute b { background: var(--studium); color: #fff; }
.st-tag[aria-current] { background: var(--studium-weich); }
.st-tag.frei, .st-tag.frei b, .st-tag.ohne, .st-tag.ohne b { color: var(--text-3); }
a.st-tag:focus-visible, .st-blatt:focus-visible { outline: 2px solid var(--studium); outline-offset: 2px; }
.st-blatt { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; color: var(--studium); }
.st-blatt svg { width: 18px; height: 18px; }
.st-sonst { margin: -8px 0 16px; }
.st-sonst a { font-weight: 600; }

/* Ein anderer Tag als heute: sein Blatt links, das von heute rechts, gleich breit */
.raster.st-zwei { grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (max-width: 1100px) { .raster.st-zwei { grid-template-columns: 1fr; } }
@media (max-width: 520px) {
  .st-leiste { grid-template-columns: minmax(0, 1fr); margin: 0 0 16px; }
  .st-blatt { display: none; }
  .st-tag { padding: 8px 0 6px; }
}
