/* Einschreibung – Gestaltung nach DESIGN.md (SHFM-Anpassungen): Landesblau als einzige Akzentfarbe,
   Archivo für Überschriften, Source Sans 3 für Text, Kopf- und Fußzeile wie auf www.shfm.info. */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo-500-800-wdth100-125.woff2") format("woff2");
  font-weight: 500 800;
  font-stretch: 100% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("fonts/source-sans-3-latin.woff2") format("woff2");
  font-weight: 200 900;
  font-display: swap;
}

:root {
  --landesblau: #003f87;
  --landesblau-tief: #0a4fa3;
  --rot: #c8102e;          /* nur Formularfehler */
  --parchment: #f5f5f7;
  --pearl: #fafafc;
  --tinte: #1d1d1f;
  --tinte-80: #333333;
  --nordsee: #6e6e73;
  --linie: #e0e0e0;
  --feldrand: #d2d2d7;
  --schrift-text: "Source Sans 3", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --schrift-titel: "Archivo", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  color-scheme: light;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--parchment);
  color: var(--tinte);
  font-family: var(--schrift-text);
  font-size: 1.0625rem;      /* 17px */
  line-height: 1.47;
  letter-spacing: -0.022em;
}

main { flex: 1; }
main:focus { outline: none; }

h1, h2, h3, legend {
  font-family: var(--schrift-titel);
  font-weight: 600;
  font-stretch: 112%;
  letter-spacing: -0.015em;
  text-wrap: balance;
}
p, li { text-wrap: pretty; }

a { color: var(--landesblau); text-underline-offset: 4px; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--landesblau-tief);
  outline-offset: 2px;
}

.nur-vorleser {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0);
  white-space: nowrap; border: 0;
}

.sprunglink {
  position: absolute; left: -9999px; top: 12px;
  z-index: 50; background: #fff; padding: 8px 16px;
}
.sprunglink:focus { left: 12px; }

.rahmen { width: 100%; max-width: 980px; margin: 0 auto; padding: 0 20px; }
.rahmen-breit { width: 100%; max-width: 80rem; margin: 0 auto; padding: 0 20px; }
@media (min-width: 640px) {
  .rahmen, .rahmen-breit { padding: 0 32px; }
}

/* --- Kopfzeile: weiß 75 %, Milchglas, 60px, Linie unten ------------------------- */
.kopfzeile {
  position: sticky; top: 0; z-index: 40;
  background: rgba(255, 255, 255, 0.75);
  -webkit-backdrop-filter: saturate(180%) blur(24px);
  backdrop-filter: saturate(180%) blur(24px);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}
.kopfzeile-innen { display: flex; align-items: center; height: 60px; }
.logo-link { display: flex; align-items: center; flex-shrink: 0; }
.logo-link img { height: 31px; width: auto; display: block; }
@media (min-width: 640px) { .logo-link img { height: 36px; } }

.hauptnavigation { display: none; margin-left: 100px; margin-right: auto; }
.hauptnavigation ul { display: flex; gap: 50px; list-style: none; margin: 0; padding: 0; }
.hauptnavigation a, .kopf-zurueck, .kopf-bereich {
  display: inline-flex; align-items: center; min-height: 44px;
  font-size: 0.875rem; color: var(--tinte-80); text-decoration: none; white-space: nowrap;
}
.hauptnavigation a:hover, .kopf-zurueck:hover { color: var(--tinte); }
.kopf-zurueck, .kopf-bereich { margin-left: auto; }
@media (min-width: 1024px) {
  .hauptnavigation { display: block; }
  .kopf-zurueck { display: none; }
}

/* --- Fußzeile: Parchment, 12px ---------------------------------------------- */
.fusszeile { border-top: 1px solid var(--linie); background: var(--parchment); color: var(--tinte-80); }
.fusszeile-innen {
  display: flex; flex-direction: column; gap: 16px;
  padding-top: 64px; padding-bottom: 64px; font-size: 0.75rem;
}
.fusszeile p { margin: 0; }
.fusszeile ul { display: flex; gap: 24px; list-style: none; margin: 0; padding: 0; }
.fusszeile a { color: inherit; text-decoration: none; display: inline-flex; min-height: 44px; align-items: center; }
.fusszeile a:hover { text-decoration: underline; }
@media (min-width: 640px) {
  .fusszeile-innen { flex-direction: row; align-items: center; justify-content: space-between; }
  .fusszeile a { min-height: 0; }
}

/* --- Seitenkopf ------------------------------------------------------------- */
.seite { padding-top: 56px; padding-bottom: 96px; }
@media (min-width: 640px) { .seite { padding-top: 80px; } }

.seitenkopf { max-width: 68ch; margin-bottom: 40px; }
.dachzeile { margin: 0 0 8px; font-size: 1.0625rem; font-weight: 600; color: var(--landesblau); }
.seitenkopf h1 {
  margin: 0;
  font-size: clamp(2.125rem, 5vw, 3.5rem);
  line-height: 1.07;
  font-stretch: 125%;
}
.einleitung { margin: 20px 0 0; font-size: 1.1875rem; line-height: 1.5; color: var(--tinte-80); }
.ausschreibungen { margin: 28px 0 0; }
.ausschreibungen-titel {
  margin: 0 0 12px; font-family: var(--schrift-titel); font-size: 1.0625rem; font-weight: 600; font-stretch: 112%;
}
.ausschreibungen ul {
  display: flex; flex-wrap: wrap; gap: 12px; margin: 0; padding: 0; list-style: none;
}
.ausschreibung-folgt {
  display: inline-flex; align-items: center; min-height: 44px; padding: 11px 22px;
  border: 1px dashed var(--feldrand); border-radius: 9999px;
  color: var(--nordsee); font-size: 0.9375rem;
}
.ausschreibung-folgt strong { color: var(--tinte); font-weight: 600; margin-right: 4px; }

/* --- Knöpfe: Pille in Landesblau, sekundär weiß mit blauer Schrift ------------- */
.knopf {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 11px 22px;
  border: 1px solid transparent; border-radius: 9999px;
  font: inherit; font-size: 1.0625rem; line-height: 1;
  text-decoration: none; cursor: pointer;
  transition: background-color 0.15s, transform 0.1s;
}
.knopf:hover { text-decoration: none; }
.knopf:active { transform: scale(0.97); }
.knopf-primaer { background: var(--landesblau); color: #fff; }
.knopf-primaer:hover { background: var(--landesblau-tief); }
.knopf-sekundaer { background: #fff; color: var(--landesblau); border-color: var(--feldrand); }
.knopf-sekundaer:hover { border-color: var(--landesblau); }
.knopf-gross { min-height: 48px; padding: 14px 28px; font-size: 1.125rem; font-weight: 300; }
.knopf-text { background: none; color: var(--landesblau); padding: 8px 10px; min-height: 44px; border-radius: 8px; }
.knopf-text:hover { background: var(--parchment); }
.knopf-gefahr { color: var(--rot); font-size: 0.9375rem; }
@media (prefers-reduced-motion: reduce) { .knopf:active { transform: none; } }

/* --- Karte (store-utility-card): weiß, 18px Radius, feine Linie --------------- */
.karte {
  background: #fff;
  border: 1px solid var(--linie);
  border-radius: 18px;
  padding: 24px;
}
@media (min-width: 640px) { .karte { padding: 40px; } }

/* --- Formular --------------------------------------------------------------- */
.formular fieldset { border: 0; margin: 0 0 40px; padding: 0; min-width: 0; }
.formular legend {
  display: flex; align-items: center; gap: 12px;
  margin: 0 0 20px; padding: 0;
  font-size: 1.3125rem; line-height: 1.19;
}
.schritt {
  display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; border-radius: 9999px;
  background: var(--parchment); color: var(--landesblau);
  font-size: 0.9375rem; font-stretch: 100%;
}

.raster { display: grid; gap: 20px; }
@media (min-width: 640px) {
  .raster-2 { grid-template-columns: 1fr 1fr; }
  .raster-adresse { grid-template-columns: 1fr 1fr; }
  .raster-adresse .feld:first-child { grid-column: 1 / -1; }
}
@media (min-width: 860px) {
  .raster-adresse { grid-template-columns: 2fr 0.8fr 1.4fr; }
  .raster-adresse .feld:first-child { grid-column: auto; }
}

.feld { display: grid; gap: 8px; align-content: start; }
.feld label { font-size: 0.875rem; font-weight: 600; color: var(--tinte); }

input[type="text"], input[type="email"], input[type="tel"], input[type="date"],
input[type="search"], select {
  width: 100%; min-width: 0; height: 44px;
  padding: 0 12px;
  border: 1px solid var(--feldrand); border-radius: 11px;
  background: #fff; color: var(--tinte);
  font: inherit; font-size: 1.0625rem; letter-spacing: normal;
}
select {
  appearance: none;
  padding-right: 40px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23333333' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
}
select:disabled { color: #7a7a7a; background-color: var(--pearl); cursor: not-allowed; }
input:focus-visible, select:focus-visible {
  outline: none;
  border-color: var(--landesblau-tief);
  box-shadow: 0 0 0 3px rgba(10, 79, 163, 0.25);
}
[aria-invalid="true"] { border-color: var(--rot) !important; }
[aria-invalid="true"]:focus-visible { box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.2); }
.feld-fehler { margin: 0; font-size: 0.875rem; color: var(--rot); }

.sport-ausschreibung { margin: 16px 0 0; font-size: 0.9375rem; }

.falle { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.einwilligung {
  display: grid; grid-template-columns: auto 1fr; gap: 4px 12px;
  padding: 20px; border-radius: 11px; background: var(--pearl);
  border: 1px solid var(--linie);
  font-size: 0.9375rem; line-height: 1.43; color: var(--tinte-80);
}
.einwilligung input { width: 22px; height: 22px; margin: 1px 0 0; accent-color: var(--landesblau); }
.einwilligung .feld-fehler { grid-column: 2; }
.einwilligung.hat-fehler { border-color: var(--rot); }

.absenden { margin-top: 32px; }

.fehlerliste {
  margin: 0 0 32px; padding: 20px;
  border: 1px solid rgba(200, 16, 46, 0.4); border-radius: 11px;
  background: rgba(200, 16, 46, 0.04);
}
.fehlerliste:focus { outline: none; }
.fehlerliste h2 { margin: 0 0 8px; font-size: 1.0625rem; font-stretch: 100%; }
.fehlerliste p { margin: 0; }
.fehlerliste ul { margin: 0; padding-left: 20px; }
.fehlerliste a { color: var(--rot); }

.bestaetigung h2 { margin: 0 0 12px; font-size: 1.75rem; line-height: 1.15; }
.bestaetigung p { margin: 0 0 12px; }
.bestaetigung:focus { outline: none; }
.leise { color: var(--nordsee); font-size: 0.9375rem; }

/* --- Verwaltung ------------------------------------------------------------- */
.admin { padding-top: 40px; }
.admin-kopf {
  display: flex; flex-wrap: wrap; gap: 16px;
  align-items: flex-end; justify-content: space-between;
  margin-bottom: 24px;
}
.admin-kopf h1 { margin: 0; font-size: clamp(1.75rem, 3.5vw, 2.5rem); line-height: 1.1; }
.admin-kopf .leise { margin: 8px 0 0; }

.kennzahlen { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 24px; }
.kennzahl {
  display: flex; flex-direction: column; gap: 2px;
  padding: 14px 20px; border-radius: 18px;
  background: #fff; border: 1px solid var(--linie);
}
.kennzahl span { font-size: 0.875rem; color: var(--nordsee); }
.kennzahl strong {
  font-family: var(--schrift-titel); font-stretch: 112%;
  font-size: 1.3125rem; line-height: 1.19; font-variant-numeric: tabular-nums;
}

.filter { display: grid; gap: 16px; align-items: end; margin-bottom: 16px; padding: 20px; }
@media (min-width: 760px) {
  .filter { grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.6fr) auto; }
}
.filter-knoepfe { display: flex; gap: 8px; }
.treffer { margin: 0 0 12px; }

.tabelle-rahmen {
  overflow-x: auto;
  background: #fff; border: 1px solid var(--linie); border-radius: 18px;
}
.tabelle { width: 100%; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.4; }
.tabelle th {
  position: sticky; top: 0;
  background: var(--landesblau); color: #fff;
  font-weight: 600; text-align: left; white-space: nowrap;
  padding: 10px 14px;
}
.tabelle td { padding: 12px 14px; border-top: 1px solid #ececef; vertical-align: top; }
.tabelle tbody tr:nth-child(even) td { background: var(--pearl); }
.tabelle tr.ist-bezahlt td { background: rgba(0, 63, 135, 0.05); }
.tabelle td.zahl { white-space: nowrap; font-variant-numeric: tabular-nums; }
.tabelle td.leer { text-align: center; color: var(--nordsee); padding: 40px 14px; }
.tabelle a { word-break: break-word; }

.haken { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; cursor: pointer; }
.haken input { width: 22px; height: 22px; accent-color: var(--landesblau); cursor: pointer; }
.haken-datum { font-size: 0.8125rem; color: var(--nordsee); white-space: nowrap; }
.bezahlt-form, .loeschen-form { margin: 0; }
