/* Black Mountains Athletics: Kurs-Anmeldung. Mobil zuerst, Marke wie die Website.
   Dunkel ist Standard (wie die Website), hell folgt der Systemeinstellung.
   Keine Inline-Styles und keine externen Quellen: Die Content-Security-Policy erlaubt nur 'self'. */

@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter-latin-wght-normal.260c81a4759b.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: "Inter Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("../fonts/inter-latin-ext-wght-normal.1ad231aac0a8.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Oswald Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 700;
  src: url("../fonts/oswald-latin-wght-normal.22c3b00d2e65.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122;
}
@font-face {
  font-family: "Oswald Variable";
  font-style: normal;
  font-display: swap;
  font-weight: 200 700;
  src: url("../fonts/oswald-latin-ext-wght-normal.192877db9c16.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  color-scheme: dark light;
  --bg: #0b0b0c;
  --bg-alt: #121214;
  --surface: #17171a;
  --line: #2a2a2f;
  --text: #f2f2f2;
  --muted: #a3a3ab;
  --accent: #e8552b;          /* Akzent für Text und Linien auf dunklem Grund */
  --accent-strong: #c8421a;   /* Knopf-Hintergrund: weißer Text erreicht hier 4,9:1 */
  --accent-hover: #de4c22;
  --ok: #4cc38a;
  --warn: #f0b429;
  --danger: #ff6b6b;
  --font-body: "Inter Variable", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-head: "Oswald Variable", "Arial Narrow", Impact, sans-serif;
  --radius: 14px;
  --tabs-h: 64px;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f6f5f2;
    --bg-alt: #ffffff;
    --surface: #ffffff;
    --line: #dddbd5;
    --text: #17171a;
    --muted: #5a5a63;
    --accent: #c8421a;
    --accent-strong: #c8421a;
    --accent-hover: #b03914;
    --ok: #1b7f55;
    --warn: #8a5a00;
    --danger: #c0262d;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
h1, h2, h3 {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: .01em;
  line-height: 1.1;
  margin: 0 0 .5em;
  font-weight: 700;
}
h1 { font-size: clamp(2rem, 8vw, 2.75rem); margin-top: .75rem; }
h2 { font-size: 1.5rem; margin-top: 1.75rem; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1em; }
small { color: var(--muted); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.huelle { width: min(720px, 100% - 2rem); margin-inline: auto; }
.skip-link { position: absolute; left: 1rem; top: -4rem; background: var(--accent-strong); color: #fff; padding: .6rem 1rem; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: .75rem; }

/* Kopf */
.kopf { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--line); padding-top: env(safe-area-inset-top); }
.kopf-innen { display: flex; align-items: center; min-height: 56px; }
.logo { display: inline-flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--muted); font-family: var(--font-head); text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; line-height: 1.1; }
.logo strong { color: var(--text); font-size: 1.05rem; display: block; }
.logo img { border-radius: 8px; }
.verwaltungsnav { border-top: 1px solid var(--line); background: var(--bg-alt); }
.verwaltungsnav-innen { display: flex; gap: .25rem; overflow-x: auto; padding-block: .35rem; scrollbar-width: none; }
.verwaltungsnav a { flex: none; text-decoration: none; padding: .55rem .65rem; border-radius: 999px; color: var(--muted); font-weight: 600; font-size: .9rem; min-height: 44px; display: inline-flex; align-items: center; }
.verwaltungsnav a:hover { background: var(--surface); color: var(--text); }

/* Inhalt */
main { padding-block: .5rem 2.5rem; }
main.mit-tabs { padding-bottom: calc(var(--tabs-h) + env(safe-area-inset-bottom) + 1.5rem); }

/* Tab-Leiste unten, mit dem Daumen erreichbar */
.tabs { position: fixed; inset: auto 0 0 0; z-index: 30; display: grid; grid-template-columns: repeat(3, 1fr); background: color-mix(in srgb, var(--bg) 92%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-top: 1px solid var(--line); padding-bottom: env(safe-area-inset-bottom); }
.tabs a { display: flex; align-items: center; justify-content: center; min-height: var(--tabs-h); text-align: center; text-decoration: none; color: var(--muted); font-family: var(--font-head); text-transform: uppercase; letter-spacing: .04em; font-size: .88rem; padding-inline: .25rem; white-space: nowrap; }
.tabs a:hover, .tabs a:focus-visible { color: var(--text); }

/* Karten und Listen */
article, .karte { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; margin-block: .85rem; }
article h2, article h3 { margin-top: 0; font-size: 1.2rem; line-height: 1.2; }
article p { margin-bottom: .45rem; }
ul.liste { list-style: none; margin: 0; padding: 0; }
ul.liste > li, main > ul > li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .85rem 1.1rem; margin-block: .6rem; }
main > ul > li > form { margin-top: .6rem; }

/* Plakette und Plätze */
.plakette { display: inline-block; padding: .1rem .6rem; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--bg-alt); border: 1px solid var(--line); color: var(--muted); margin-right: .25rem; }
progress { appearance: none; -webkit-appearance: none; width: 100%; height: 8px; border: 0; border-radius: 999px; background: var(--line); overflow: hidden; display: block; margin: .25rem 0 .6rem; }
progress::-webkit-progress-bar { background: var(--line); }
progress::-webkit-progress-value { background: var(--accent); border-radius: 999px; }
progress::-moz-progress-bar { background: var(--accent); border-radius: 999px; }
progress.voll::-webkit-progress-value { background: var(--muted); }
progress.voll::-moz-progress-bar { background: var(--muted); }
.preis { font-family: var(--font-head); font-size: 1.35rem; letter-spacing: .02em; }

/* Meldungen */
.meldungen { list-style: none; margin: .75rem 0 0; padding: 0; }
.meldung { padding: .8rem 1rem; border-radius: 12px; border: 1px solid var(--line); border-left-width: 5px; background: var(--surface); margin-bottom: .5rem; }
.meldung.success { border-left-color: var(--ok); }
.meldung.error { border-left-color: var(--danger); }
.meldung.warning { border-left-color: var(--warn); }
.meldung.info { border-left-color: var(--muted); }

/* Formulare */
form { margin-block: .75rem; }
form > div { margin-bottom: 1rem; }
label { display: block; font-weight: 600; margin-bottom: .3rem; }
input:not([type="checkbox"], [type="radio"], [type="hidden"]), select, textarea {
  width: 100%; min-height: 48px; padding: .6rem .85rem; font: inherit; font-size: 1rem; color: var(--text);
  background: var(--bg-alt); border: 1px solid var(--line); border-radius: 12px;
}
input:focus, select:focus, textarea:focus { border-color: var(--accent); }
input[type="checkbox"], input[type="radio"] { width: 1.4rem; height: 1.4rem; accent-color: var(--accent-strong); margin-right: .55rem; vertical-align: -.3rem; }
.helptext, form small { display: block; color: var(--muted); font-size: .9rem; margin-top: .25rem; }
.errorlist { list-style: none; margin: 0 0 .4rem; padding: 0; color: var(--danger); font-weight: 600; font-size: .95rem; }
fieldset { border: 0; padding: 0; margin: 0; }
fieldset legend { font-weight: 600; margin-bottom: .3rem; }
fieldset div { display: block; }
.zustimmung { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .75rem 1rem; margin-bottom: .6rem; }
.zustimmung label { font-weight: 500; }
.zustimmung a { display: inline-block; margin-top: .25rem; font-size: .95rem; }

/* Knöpfe */
button, .knopf {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 1.3rem;
  border: 1px solid transparent; border-radius: 999px; background: var(--accent-strong); color: #fff;
  font: inherit; font-weight: 700; font-size: 1rem; cursor: pointer; text-decoration: none; touch-action: manipulation;
}
button:hover, .knopf:hover { background: var(--accent-hover); color: #fff; }
button.sekundaer, .knopf.sekundaer { background: transparent; color: var(--text); border-color: var(--line); }
button.sekundaer:hover, .knopf.sekundaer:hover { background: var(--surface); color: var(--text); }
button.gefahr, .knopf.gefahr { background: transparent; color: var(--danger); border-color: var(--danger); }
button.gefahr:hover, .knopf.gefahr:hover { background: var(--danger); color: #fff; }
article form, li form { display: inline-block; margin: .35rem .35rem 0 0; }
article button, li button { min-height: 44px; }
.knopfreihe { display: flex; flex-wrap: wrap; gap: .5rem; }
article form.breit button, .breit { width: 100%; }

@media (prefers-reduced-motion: no-preference) {
  button, .knopf, a { transition: background .15s, color .15s, border-color .15s; }
}

/* Zusätze für Termin-Karten und Status */
.ort { color: var(--muted); margin-bottom: .25rem; }
.hinweis { color: var(--muted); font-size: .95rem; }
.plakette.ok { color: var(--ok); border-color: var(--ok); }
.plakette.warn { color: var(--warn); border-color: var(--warn); }
article .preis { margin-bottom: .6rem; }

/* Aufklappbare Zusatzaktionen und Knopfreihen */
details { margin-top: .6rem; border-top: 1px solid var(--line); padding-top: .5rem; }
summary { cursor: pointer; font-weight: 600; color: var(--muted); min-height: 44px; display: flex; align-items: center; }
summary:hover { color: var(--text); }
details[open] > summary { margin-bottom: .5rem; }
.knopfreihe > form { margin: 0; }
article a.knopf { margin-right: .25rem; }

/* Monatsnavigation in der Abrechnung */
.monatsnavigation { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .5rem; margin-block: .75rem; }
.monatsnavigation h2 { margin: 0; text-align: center; font-size: 1.2rem; }
.monatsnavigation .knopf { min-height: 44px; padding-inline: .8rem; font-size: .9rem; white-space: nowrap; }
.monatsnavigation .knopf:first-child { justify-self: start; }
.monatsnavigation .knopf:last-child { justify-self: end; }

/* Kursname als kleine Überzeile über dem Termin */
.kurs { margin: 0 0 .15rem; font-family: var(--font-head); text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; color: var(--muted); }
