/* Trifolo oeffentliches Frontend: nutzt ausschliesslich Brand-Tokens. */
* { box-sizing: border-box; margin: 0; }
html { color-scheme: light dark; }
body { font-family: var(--tf-font); background: var(--tf-paper); color: var(--tf-ink); line-height: 1.55; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--tf-green-700); color: #fff; padding: .6rem 1rem; z-index: 10; }
.skip-link:focus { left: .5rem; top: .5rem; }
header.site { border-bottom: 1px solid var(--tf-line); background: var(--tf-surface); }
.site-inner { max-width: 72rem; margin: 0 auto; padding: .8rem 1rem; display: flex; align-items: center; gap: 1.2rem; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: .5rem; font-weight: 800; font-size: 1.15rem; color: inherit; text-decoration: none; }
.brand svg { width: 30px; height: 30px; color: var(--tf-green-600); }
nav.haupt { display: flex; gap: 1rem; flex-wrap: wrap; }
nav.haupt a { color: var(--tf-green-700); text-decoration: underline; text-underline-offset: 2px; }
nav.haupt a[aria-current="page"] { font-weight: 700; color: var(--tf-ink); text-decoration: none; }
main { max-width: 72rem; margin: 0 auto; padding: 1.2rem 1rem 3rem; }
h1 { font-size: clamp(1.5rem, 4vw, 2.1rem); margin: .4rem 0 .6rem; }
h2 { font-size: 1.25rem; margin: 1.4rem 0 .5rem; }
a { color: var(--tf-green-700); }
.hinweis { color: var(--tf-muted); }
/* Filter (F1) */
form.filter { border: 1px solid var(--tf-line); background: var(--tf-surface); border-radius: var(--tf-radius-lg); padding: 1rem; margin: 1rem 0; }
form.filter fieldset { border: 0; padding: 0; display: flex; gap: 1rem; flex-wrap: wrap; align-items: end; }
form.filter legend { font-weight: 700; margin-bottom: .5rem; }
.feld { display: flex; flex-direction: column; gap: .25rem; min-width: 10rem; }
.feld label { font-size: .9rem; font-weight: 600; }
.feld input, .feld select { padding: .5rem .6rem; border: 1px solid var(--tf-border-input); border-radius: var(--tf-radius); background: var(--tf-surface); color: inherit; font: inherit; min-height: 44px; }
.feld-check { display: flex; align-items: center; gap: .45rem; min-height: 44px; }
button.senden { padding: .6rem 1.4rem; min-height: 44px; border: 0; border-radius: var(--tf-radius); background: var(--tf-green-700); color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
button.senden:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: none; box-shadow: var(--tf-focus); }
/* Kurskarten */
ul.karten { list-style: none; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); }
.karte { border: 1px solid var(--tf-line); border-radius: var(--tf-radius-lg); background: var(--tf-surface); padding: 1rem; display: flex; flex-direction: column; gap: .45rem; }
.karte h3 { font-size: 1.05rem; }
.karte h3 a { color: inherit; text-decoration: none; }
.karte h3 a:hover { text-decoration: underline; }
.badges { display: flex; gap: .4rem; flex-wrap: wrap; }
.badge { font-size: .78rem; padding: .15rem .55rem; border-radius: 999px; background: var(--tf-green-50); color: var(--tf-green-800); border: 1px solid var(--tf-line); }
.badge--thema { background: transparent; }
.ampel { display: inline-flex; align-items: center; gap: .4rem; font-size: .9rem; }
.punkt { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.punkt--green { background: var(--tf-success); }
.punkt--yellow { background: var(--tf-warn); }
.punkt--red { background: var(--tf-error); }
/* Tabellen (F2) */
.scrollbox { overflow-x: auto; }
table.reihen { border-collapse: collapse; width: 100%; min-width: 44rem; }
table.reihen caption { text-align: left; font-weight: 700; padding: .4rem 0; }
table.reihen th, table.reihen td { border: 1px solid var(--tf-line); padding: .45rem .6rem; text-align: left; }
table.reihen thead th { background: var(--tf-green-50); }
/* Kalender-Liste (F3) */
.tagesliste { list-style: none; padding: 0; }
.tagesliste > li { margin-bottom: 1rem; }
.termin { display: flex; gap: .8rem; flex-wrap: wrap; align-items: baseline; padding: .45rem 0; border-bottom: 1px solid var(--tf-line); }
.termin .zeit { font-weight: 700; min-width: 7.5rem; }
/* Monats-Grid (F3, serverseitig) */
.mgrid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--tf-line); border: 1px solid var(--tf-line); border-radius: var(--tf-radius-lg); overflow: hidden; }
.mgrid .kopf, .mgrid .tag { background: var(--tf-surface); padding: .4rem .45rem; min-width: 0; }
.mgrid .kopf { font-size: .75rem; font-weight: 700; text-transform: uppercase; }
.mgrid .tag { min-height: 5.2rem; }
.mgrid .aus { opacity: .45; }
.mgrid .datum { font-size: .8rem; font-weight: 600; }
.mgrid a.slot { display: block; font-size: .75rem; text-decoration: none; border-left: 3px solid var(--tf-success); background: var(--tf-green-50); border-radius: .35rem; padding: .2rem .35rem; margin-top: .25rem; color: inherit; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.mgrid a.slot.voll { border-left-color: var(--tf-error); }
/* Kursdetail (F4) */
dl.eckdaten { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1rem; margin: 1rem 0; }
dl.eckdaten dt { font-weight: 700; }
ul.termine { list-style: none; padding: 0; }
ul.termine li { display: flex; gap: 1rem; flex-wrap: wrap; align-items: center; padding: .55rem 0; border-bottom: 1px solid var(--tf-line); }
.buchen { margin-left: auto; padding: .45rem 1rem; min-height: 40px; display: inline-flex; align-items: center; border-radius: var(--tf-radius); background: var(--tf-green-700); color: #fff; text-decoration: none; font-weight: 700; }
.buchen[aria-disabled="true"] { background: var(--tf-muted); }
/* Partner (F8/F9) */
ul.partnerliste { list-style: none; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
footer.site { border-top: 1px solid var(--tf-line); color: var(--tf-muted); }
footer.site .site-inner { display: flex; gap: 1rem; flex-wrap: wrap; font-size: .9rem; }
