/* Studium-Hub — Designsystem "Studium" (Schwarz technisch, Sicherheitsgelb).
 * Bewusst EIN Thema, wie das System selbst: papier, tinte, stahl, gelb.
 * Gelb ist nur Flaeche — die Marke im Kopf und der Achtung-Kasten. Rechte
 * Winkel, Linien statt Schatten, jedes Feld traegt ein Kennwort. */

:root {
  color-scheme: light;
  --papier: #ffffff;
  --tinte: #0e0f11;
  --stahl: #66717d;
  --stahl-hell: #aab4bf;
  --haarlinie: #c9d0d6;
  --kaestchen: #e3e7eb;
  --gelb: #f2c230;

  --grotesk: "Archivo", "Arial Narrow", Arial, sans-serif;
  --mono: "IBM Plex Mono", Menlo, Consolas, monospace;

  --space-1: 4px;
  --space-2: 8px;
  --space-3: 16px;
  --space-4: 40px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  background: var(--papier);
  color: var(--tinte);
  font: 400 16px/1.5 var(--grotesk);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
a:focus-visible { outline: 2px solid var(--tinte); outline-offset: 2px; }

.rahmen {
  max-width: 72rem;
  margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
@media (min-width: 48rem) { .rahmen { padding-left: var(--space-4); padding-right: var(--space-4); } }

.kennwort {
  font: 500 11px/1.4 var(--mono);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--stahl);
  margin: 0;
}

/* ---- Kopfblock ---------------------------------------------------------- */

.kopf { background: var(--tinte); color: var(--papier); padding-block: var(--space-3) 28px; }
.meta {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  font: 500 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--stahl-hell);
}
.marke { width: 10px; height: 10px; background: var(--gelb); flex: none; }
.meta-rechts { margin-left: auto; }
.kopf h1 {
  margin: 18px 0 0;
  font: 700 clamp(56px, 11vw, 112px)/.86 var(--grotesk);
  font-stretch: 68%;
  text-transform: uppercase;
  letter-spacing: .01em;
}
.lage { margin: 14px 0 0; font: 600 clamp(18px, 2.4vw, 24px)/1.3 var(--grotesk); font-stretch: 85%; max-width: 40ch; text-wrap: balance; }
.lage .leise { display: block; color: var(--stahl-hell); font-weight: 400; }

.zeitleiste { display: flex; gap: 3px; margin-top: 22px; height: 10px; }
.zeitleiste span { flex: 1; background: #2a2d33; }
.zeitleiste span.vorbei { background: var(--stahl-hell); }
.zeitleiste span.jetzt { background: var(--papier); }
.zeitleiste-text { display: flex; justify-content: space-between; margin-top: 6px; font: 500 11px/1.4 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--stahl-hell); }

/* ---- Koerper ------------------------------------------------------------- */

.koerper {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 36px var(--space-4);
  padding-block: 36px 40px;
}
.drei { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px var(--space-4); }
@media (min-width: 60rem) { .drei { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.koerper section > .kennwort { padding-bottom: var(--space-2); border-bottom: 1.5px solid var(--tinte); margin-bottom: 0; }

/* Module: Kacheln auf einem Raster aus Haarlinien */
.module { display: grid; grid-template-columns: minmax(0, 1fr); border-left: 1px solid var(--haarlinie); }
@media (min-width: 60rem) { .module { grid-template-columns: repeat(7, minmax(0, 1fr)); } }
.modul {
  border-right: 1px solid var(--haarlinie); border-bottom: 1px solid var(--haarlinie);
  padding: 14px var(--space-3) 16px; display: grid; gap: 6px; align-content: start; min-width: 0;
}
.modul-name { font: 700 15px/1.15 var(--grotesk); font-stretch: 75%; text-transform: uppercase; letter-spacing: .02em; min-height: 2.3em; hyphens: auto; overflow-wrap: anywhere; }
@media (min-width: 60rem) { .modul-name { font-stretch: 68%; } }
.modul-zahl { display: flex; align-items: baseline; gap: 8px; }
.modul-zahl b { font: 700 56px/.9 var(--grotesk); font-stretch: 68%; font-variant-numeric: tabular-nums; }
.modul-zahl span { font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--stahl); }
.modul-fuss { font: 400 12px/1.4 var(--mono); color: var(--stahl); }
.modul.erledigt .modul-zahl b, .modul.leer .modul-zahl b { color: var(--haarlinie); }
.modul.offen { background: linear-gradient(var(--tinte), var(--tinte)) top / 100% 4px no-repeat; }
.fuss-hinweis { margin: 12px 0 0; font-size: 14px; color: var(--stahl); }

/* Listen */
.liste { list-style: none; margin: 0; padding: 0; }
.liste li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr); gap: 4px 12px; padding: 9px 0; border-bottom: 1px solid var(--haarlinie); font-size: 15px; line-height: 1.35; }
.liste li.ohne-datum { grid-template-columns: minmax(0, 1fr); }
.liste .wann { font: 400 13px/1.5 var(--mono); color: var(--stahl); }
.liste .wann i { display: block; font-style: normal; }
.liste .unter { display: block; font: 400 12px/1.4 var(--mono); color: var(--stahl); margin-top: 2px; }
.liste .leer { color: var(--stahl); grid-template-columns: minmax(0, 1fr); }

.achtung { background: var(--gelb); padding: 14px var(--space-3) 16px; }
.achtung .kennwort { color: var(--tinte); border-bottom: 1.5px solid var(--tinte); padding-bottom: 6px; }
.achtung ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); gap: 0 var(--space-4); }
.achtung li { padding: 8px 0 0; font: 600 16px/1.35 var(--grotesk); font-stretch: 85%; }
.achtung li .wann { display: block; font: 500 12px/1.4 var(--mono); letter-spacing: .04em; }

/* Tabelle */
.tabelle-rahmen { overflow-x: auto; }
.tabelle { width: 100%; border-collapse: collapse; font-size: 15px; }
.tabelle th { text-align: left; font: 500 11px/1.4 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--stahl); padding: 10px 12px 8px 0; border-bottom: 1px solid var(--haarlinie); }
.tabelle td { padding: 9px 12px 9px 0; border-bottom: 1px solid var(--haarlinie); vertical-align: top; }
.tabelle td:first-child { font-weight: 600; font-stretch: 85%; }
.tabelle .zahl { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; width: 4rem; }
.tabelle tfoot td { border-top: 1.5px solid var(--tinte); border-bottom: 0; font-family: var(--mono); font-size: 13px; font-weight: 400; color: var(--stahl); }
.tabelle tfoot td:first-child { font-weight: 500; }

/* Links */
.links { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 10.5rem), 1fr)); border-left: 1px solid var(--haarlinie); }
.links a {
  display: grid; gap: 4px; padding: 12px var(--space-3) 14px; text-decoration: none;
  border-right: 1px solid var(--haarlinie); border-bottom: 1px solid var(--haarlinie);
  font: 700 22px/1.1 var(--grotesk); font-stretch: 75%; text-transform: uppercase;
}
.links a:hover { background: var(--tinte); color: var(--papier); }
.links a:hover .kennwort { color: var(--stahl-hell); }

/* Schriftfeld */
.schriftfeld { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 11rem), 1fr)); border-top: 1.5px solid var(--tinte); margin-bottom: 32px; }
.schriftfeld > div { display: grid; gap: 2px; padding: 8px 12px 10px; border-right: .5px solid var(--tinte); border-bottom: .5px solid var(--tinte); }
.schriftfeld > div:first-child { padding-left: 0; }
.schriftfeld .kennwort { font-size: 10px; }
.feld { font: 400 13px/1.4 var(--mono); }


/* Unter 60rem werden die Kacheln zu Zeilen: Name links, Zahl rechts. */
@media (max-width: 59.99rem) {
  .modul { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name zahl" "fuss zahl"; align-items: center; gap: 2px 12px; padding: 10px var(--space-3); }
  .modul.offen { background: linear-gradient(var(--tinte), var(--tinte)) left / 4px 100% no-repeat; }
  .modul-name { grid-area: name; min-height: 0; }
  .modul-zahl { grid-area: zahl; }
  .modul-fuss { grid-area: fuss; }
  .modul-zahl b { font-size: 40px; }
}
@media (max-width: 40rem) {
  .liste li { grid-template-columns: 6.5rem minmax(0, 1fr); }
  .schriftfeld > div:first-child { padding-left: 12px; }
}
