@font-face {
  font-family: "Basisschrift";
  src: url("../fonts/DCH-Basisschrift.ff515673b323.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/SourceSans3-Regular.27ab01c4cb50.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/SourceSans3-Italic.410bdda67c60.woff2") format("woff2");
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("../fonts/SourceSans3-Semibold.9a35cba76eda.woff2") format("woff2");
  font-weight: 600;
  font-display: swap;
}

:root {
  --papier: #FBF8F4;
  --weiss: #FFFFFF;
  --text: #3A2E3B;
  --text-leise: #6E5F6B;
  --pink: #C2477A;
  --pink-dunkel: #9E3462;
  --rose: #F6E3EA;
  --gold: #B8933A;
  --gold-hell: #EFE3C6;
  --tafel: #2F3B36;
  --linie: #E9DFD8;
  --schatten: 0 1px 2px rgba(58, 46, 59, .06), 0 4px 14px rgba(58, 46, 59, .05);
  --hand: "Basisschrift", "Source Sans 3", sans-serif;
  --sans: "Source Sans 3", system-ui, sans-serif;
  --radius: 10px;
  --breite: 1180px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--papier);
  color: var(--text);
  font: 400 1.0625rem/1.6 var(--sans);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
a { color: var(--pink-dunkel); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--pink); }
:focus-visible { outline: 2px solid var(--pink); outline-offset: 2px; border-radius: 3px; }
img { max-width: 100%; height: auto; }
code { font-size: .88em; background: var(--rose); color: var(--pink-dunkel); padding: .05em .35em; border-radius: 4px; }

/* Basisschrift hat kein Fett: Titel leben von Grösse und Farbe. */
h1, h2, h3 { font-family: var(--hand); font-weight: 400; line-height: 1.2; margin: 0 0 .5em; }
h1 { font-size: 2.3rem; color: var(--text); }
h1::after {
  content: ""; display: block; width: 3.2rem; height: 3px; margin-top: .35em;
  background: var(--gold); border-radius: 2px;
}
h2 { font-size: 1.5rem; color: var(--pink-dunkel); }
h3 { font-size: 1.2rem; }

/* Kopfzeile */
.kopf { background: var(--weiss); border-bottom: 1px solid var(--linie); box-shadow: 0 2px 0 var(--rose); }
.kopf-innen {
  max-width: var(--breite); margin: 0 auto; padding: .7rem 1rem;
  display: flex; align-items: center; gap: 1.5rem; flex-wrap: wrap;
}
.logo { display: block; line-height: 0; }
.logo img { width: 188px; height: auto; }
.hauptnav { display: flex; gap: .3rem; flex-wrap: wrap; }
.hauptnav a {
  font-family: var(--hand); font-size: 1.2rem; color: var(--text); text-decoration: none;
  padding: .3rem .75rem; border-radius: 999px;
}
.hauptnav a:hover { background: var(--rose); color: var(--pink-dunkel); }
.hauptnav a[aria-current="page"] { background: var(--pink); color: var(--weiss); }
.suche-kopf { margin-left: auto; }
.suche-kopf input, .filter-suche input, .login input {
  font: inherit; font-size: 1rem; color: var(--text); background: var(--papier);
  border: 1px solid var(--linie); border-radius: 999px; padding: .4rem .9rem; width: 15rem; max-width: 100%;
}
.suche-kopf input:focus, .filter-suche input:focus, .login input:focus { outline: none; border-color: var(--pink); box-shadow: 0 0 0 3px var(--rose); }
.abmelden button {
  font: inherit; font-size: .95rem; color: var(--text-leise); background: none; border: 0; cursor: pointer; padding: .3rem .4rem;
}
.abmelden button:hover { color: var(--pink-dunkel); text-decoration: underline; }

.inhalt { flex: 1; width: 100%; max-width: var(--breite); margin: 0 auto; padding: 2rem 1rem 3rem; }
.inhalt > section { margin-top: 2.5rem; }
.fuss { text-align: center; color: var(--text-leise); font-size: .9rem; padding: 1.5rem 1rem; border-top: 1px solid var(--linie); }
.stern { color: var(--gold); }

.meta { color: var(--text-leise); margin: 0 0 .6rem; }
.leer { color: var(--text-leise); font-style: italic; }
.einleitung { color: var(--text-leise); margin-top: -.2rem; }
.pfad { font-size: .95rem; color: var(--text-leise); margin-bottom: 1rem; }

/* Pillen und Status */
.pille {
  display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .02em;
  padding: .08rem .55rem; border-radius: 999px; vertical-align: .1em; white-space: nowrap;
}
.status-idee .anzahl, .pille.status-idee { background: #EFEAF3; color: #5B4A6B; }
.status-entwurf .anzahl, .pille.status-entwurf { background: var(--rose); color: var(--pink-dunkel); }
.status-erprobt .anzahl, .pille.status-erprobt { background: var(--gold-hell); color: #765A17; }
.status-fertig .anzahl, .pille.status-fertig { background: #E2EFE6; color: #2E6142; }
.punkt { display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; margin-right: .45rem; }
.punkt.status-idee { background: #9C88B0; }
.punkt.status-entwurf { background: var(--pink); }
.punkt.status-erprobt { background: var(--gold); }
.punkt.status-fertig { background: #4E9A6B; }

/* Karten */
.karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 1rem; }
.karte {
  background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius);
  padding: 1rem 1.1rem 1.1rem; box-shadow: var(--schatten); position: relative;
  border-top: 3px solid var(--gold);
  transition: transform .12s ease, box-shadow .12s ease;
}
.karte:hover { transform: translateY(-2px); box-shadow: 0 6px 20px rgba(58, 46, 59, .09); }
.karte-kopf { display: flex; justify-content: space-between; align-items: center; gap: .5rem; margin-bottom: .4rem; }
.karte .fach { font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; color: var(--text-leise); font-weight: 600; }
.karte h3 { margin: .2rem 0 .3rem; font-size: 1.3rem; }
.karte h3 a { color: var(--text); text-decoration: none; }
.karte h3 a::after { content: ""; position: absolute; inset: 0; }
.karte h3 a:hover { color: var(--pink-dunkel); }
.karte .meta { font-size: .95rem; margin: 0; }
.schlagwoerter { display: flex; flex-wrap: wrap; gap: .3rem; margin: .6rem 0 0; }
.schlagwoerter span, .schlagwoerter a {
  font-size: .82rem; padding: .05rem .5rem; border-radius: 999px; border: 1px solid var(--linie);
  color: var(--text-leise); background: var(--papier); text-decoration: none; position: relative;
}
.schlagwoerter a:hover, .schlagwoerter a[aria-current] { border-color: var(--pink); color: var(--pink-dunkel); background: var(--rose); }

/* Start */
.willkommen p { color: var(--text-leise); margin-top: -.2rem; }
.raster-start { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 1.5rem; margin-top: 1.5rem; }
.tafel-block, .raster-start > section {
  background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); padding: 1.3rem 1.4rem; box-shadow: var(--schatten);
}
.liste-kompakt { list-style: none; padding: 0; margin: 0 0 1rem; }
.liste-kompakt li { display: flex; justify-content: space-between; gap: .6rem; align-items: baseline; padding: .45rem 0; border-bottom: 1px dashed var(--linie); }

/* Lektionen */
.lektionen { list-style: none; margin: 0; padding: 0; }
.lektionen > li { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 1rem; padding: .75rem 0; border-bottom: 1px solid var(--linie); }
.lektionen > li:last-child { border-bottom: 0; }
.lektionen .tag { font-family: var(--hand); font-size: 1.15rem; color: var(--pink-dunkel); }
.lektionen strong { font-weight: 600; }
.lektionen .fach { font-size: .8rem; color: var(--text-leise); text-transform: uppercase; letter-spacing: .05em; margin-left: .3rem; }
.lektion-material { margin: .3rem 0 0; padding-left: 1.1rem; }
.lektion-material li::marker { content: "✦  "; color: var(--gold); font-size: .8em; }
.notiz { margin: .3rem 0 0; color: var(--text-leise); font-size: .95rem; }
.fehlt { color: #A3332F; }

/* Ablage */
.ablage { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 2rem; align-items: start; }
.filter {
  background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); padding: 1rem 1.1rem;
  position: sticky; top: 1rem;
}
.filter summary { font-family: var(--hand); font-size: 1.35rem; color: var(--pink-dunkel); cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: baseline; }
.filter summary::-webkit-details-marker { display: none; }
.zuruecksetzen { font-family: var(--sans); font-size: .85rem; }
.filter h3 { font-family: var(--sans); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .07em; color: var(--text-leise); margin: 1.1rem 0 .35rem; }
.filter ul { list-style: none; margin: 0; padding: 0; }
.filter li a { display: flex; align-items: center; padding: .22rem .5rem; margin: 0 -.5rem; border-radius: 6px; color: var(--text); text-decoration: none; font-size: .98rem; }
.filter li a:hover { background: var(--papier); }
.filter li a[aria-current] { background: var(--rose); color: var(--pink-dunkel); font-weight: 600; }
.filter .kacheln { display: flex; flex-wrap: wrap; gap: .3rem; }
.filter .kacheln a { margin: 0; justify-content: center; min-width: 2.2rem; border: 1px solid var(--linie); }
.filter-suche { margin-top: .8rem; }
.filter-suche input { width: 100%; }
.aktive-filter { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; color: var(--text-leise); }
.chip { font-size: .85rem; background: var(--rose); color: var(--pink-dunkel); padding: .1rem .6rem; border-radius: 999px; text-decoration: none; }
.chip:hover { background: var(--pink); color: var(--weiss); }

/* Material */
.material-kopf { margin-bottom: 1.5rem; }
.material-raster { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 2rem; align-items: start; }
.text, .arbeitsblatt {
  background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); padding: 1.5rem 1.8rem; box-shadow: var(--schatten);
}
.arbeitsblatt { font-family: var(--hand); font-size: 1.25rem; line-height: 1.75; }
.arbeitsblatt h1::after { display: none; }
.blatt-kopf { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: var(--text-leise); font-size: 1.05rem; border-bottom: 1px solid var(--linie); padding-bottom: .6rem; }
.text table, .arbeitsblatt table { border-collapse: collapse; width: 100%; margin: 1rem 0; }
.text th, .text td, .arbeitsblatt th, .arbeitsblatt td { border: 1px solid var(--linie); padding: .4rem .6rem; text-align: left; }
.text th { background: var(--papier); }
.material-seite section { background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); padding: 1rem 1.1rem; margin-bottom: 1rem; }
.material-seite h2 { font-size: 1.2rem; margin-bottom: .4rem; }
.material-seite ul { margin: 0; padding-left: 1.1rem; }
.dateien { list-style: none; padding: 0 !important; }
.dateien li { padding: .25rem 0; }
.dateien li::before { content: "↓ "; color: var(--gold); }
.dateien small { color: var(--text-leise); }
.knopf {
  font: 600 1rem var(--sans); color: var(--weiss); background: var(--pink); border: 0; border-radius: 999px;
  padding: .5rem 1.2rem; cursor: pointer;
}
.knopf:hover { background: var(--pink-dunkel); }

/* Werkstatt: vier Spalten wie Tafelflügel */
.werkstatt { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; align-items: start; }
.spalte { background: #F4EEE8; border-radius: var(--radius); padding: .9rem; min-height: 12rem; }
.spalte h2 { font-size: 1.3rem; display: flex; justify-content: space-between; align-items: center; color: var(--text); }
.spalte .anzahl { font-family: var(--sans); font-size: .85rem; font-weight: 600; border-radius: 999px; padding: 0 .55rem; }
.spalte .karte { margin-bottom: .7rem; }
.spalte .karte .karte-kopf .pille { display: none; }

/* Planung */
.quartale { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1rem; margin: 1.5rem 0; }
.quartal { background: var(--weiss); border: 1px solid var(--linie); border-top: 3px solid var(--pink); border-radius: var(--radius); padding: 1rem 1.1rem; }
.quartal h2 { margin-bottom: .1rem; }
.bloecke { list-style: none; padding: 0; margin: .5rem 0 0; }
.bloecke li { padding: .35rem 0; border-bottom: 1px dashed var(--linie); }
.bloecke .fach, .wochen .fach { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-leise); margin-right: .3rem; }
.bloecke small { color: #765A17; white-space: nowrap; }
.wochen { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: .5rem; }
.wochen a { display: block; background: var(--weiss); border: 1px solid var(--linie); border-radius: 8px; padding: .5rem .8rem; text-decoration: none; color: var(--text); }
.wochen a:hover { border-color: var(--pink); }
.wochen .laufend a { border-color: var(--gold); box-shadow: 0 0 0 2px var(--gold-hell); }
.wochen strong { font-family: var(--hand); font-weight: 400; color: var(--pink-dunkel); font-size: 1.1rem; margin-right: .3rem; }
.blaettern { display: flex; justify-content: space-between; margin-top: 1.5rem; font-family: var(--hand); font-size: 1.2rem; }
.inhalt > .lektionen { background: var(--weiss); border: 1px solid var(--linie); border-radius: var(--radius); padding: .3rem 1.4rem; margin-bottom: 1.5rem; }

/* Hinweis für Admins */
.hinweis-fehler { background: #FDF0E9; border-bottom: 1px solid #F0C9B5; color: #7A3B1C; font-size: .95rem; }
.hinweis-fehler details { max-width: var(--breite); margin: 0 auto; padding: .5rem 1rem; }
.hinweis-fehler summary { cursor: pointer; }
.hinweis-fehler code { background: none; color: inherit; }

/* Anmelden */
.seite-login { background: var(--papier); }
.login { max-width: 24rem; margin: 3rem auto; background: var(--weiss); border: 1px solid var(--linie); border-radius: 14px; padding: 2rem; box-shadow: var(--schatten); }
.login .logo { display: flex; justify-content: center; margin-bottom: 1.2rem; }
.login .logo img { width: 230px; }
.login h1 { text-align: center; font-size: 1.8rem; }
.login h1::after { margin: .35em auto 0; }
.login label { display: block; margin-bottom: 1rem; font-weight: 600; font-size: .95rem; }
.login input { display: block; width: 100%; margin-top: .3rem; border-radius: 8px; padding: .55rem .8rem; }
.login .knopf { width: 100%; margin-top: .4rem; padding: .65rem; }
.fehler { background: #FCE8E6; color: #8A2620; padding: .5rem .8rem; border-radius: 8px; }

@media (max-width: 900px) {
  .raster-start, .material-raster { grid-template-columns: minmax(0, 1fr); }
  .werkstatt { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 800px) {
  .ablage { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .filter { position: static; }
  .suche-kopf { margin-left: 0; order: 3; width: 100%; }
  .suche-kopf input { width: 100%; }
  .kopf-innen { gap: .6rem 1rem; }
  .abmelden { margin-left: auto; }
}
@media (max-width: 560px) {
  h1 { font-size: 1.9rem; }
  .logo img { width: 160px; }
  .werkstatt { grid-template-columns: minmax(0, 1fr); }
  .lektionen > li { grid-template-columns: minmax(0, 1fr); gap: .1rem; }
  .text, .arbeitsblatt { padding: 1.1rem; }
  .hauptnav a { font-size: 1.05rem; padding: .25rem .6rem; }
}

/* Schreiblinien und Hervorhebung auf Arbeitsblättern (Basisschrift hat kein Fett) */
.linie { display: inline-block; min-width: 9em; border-bottom: 1.5px solid currentColor; height: 1.1em; vertical-align: baseline; }
p > .linie:only-child { display: block; width: 100%; margin: 1.4em 0 .4em; }
.arbeitsblatt strong, .arbeitsblatt b { font-weight: 400; color: var(--pink-dunkel); }
.arbeitsblatt th { font-weight: 400; background: var(--papier); }
