/* Wettbewerbs-Plattform SK-Online – Basis-Design
   Farben kommen pro Mandant über --primaer und --sekundaer. */
:root {
    --primaer: #2E7D32;
    --sekundaer: #616161;
    --text: #1f2328;
    --gedaempft: #6a737d;
    --flaeche: #f6f7f8;
    --rand: #e1e4e8;
    --radius: 12px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    color: var(--text);
    background: var(--flaeche);
    display: flex; flex-direction: column; min-height: 100vh;
}
a { color: var(--primaer); }
.rahmen { width: min(960px, 100% - 2rem); margin-inline: auto; }
main.rahmen { flex: 1; padding-block: 2rem 3rem; }

.kopf { background: #fff; border-bottom: 4px solid var(--primaer); }
.kopf .rahmen { padding-block: .9rem; }
.marke { text-decoration: none; color: var(--text); font-weight: 700; font-size: 1.25rem; }
.marke img { max-height: 48px; display: block; }

.fuss { color: var(--gedaempft); font-size: .85rem; padding-block: 1.5rem; }
.fuss .rahmen { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.fuss a { color: inherit; }

h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1.2; margin: 0 0 .5rem; }
.zeitraum { color: var(--gedaempft); margin-top: 0; }
.einleitung { max-width: 65ch; }
.hinweis {
    background: #fff; border-left: 4px solid var(--primaer);
    padding: 1rem 1.25rem; border-radius: 0 var(--radius) var(--radius) 0;
}

.karten { list-style: none; padding: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.karte a {
    display: flex; flex-direction: column; gap: .25rem; height: 100%;
    background: #fff; border: 1px solid var(--rand); border-radius: var(--radius);
    padding: 1.25rem; text-decoration: none; color: var(--text);
    transition: transform .15s, box-shadow .15s;
}
.karte a:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,.08); }
.karte--vorbei a { opacity: .6; }

.marker {
    align-self: flex-start; font-size: .75rem; font-weight: 600;
    background: var(--primaer); color: #fff; padding: .15rem .6rem; border-radius: 999px;
}
.karte--vorbei .marker, .etappe--vorbei .marker { background: var(--sekundaer); }

.etappen {
    list-style: none; padding: 0; margin-top: 2rem;
    display: grid; gap: .75rem; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
}
.etappe {
    aspect-ratio: 1; background: #fff; border: 2px solid var(--rand); border-radius: var(--radius);
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: .25rem; text-align: center; padding: .5rem;
}
.etappe .nummer { font-size: 2rem; font-weight: 800; color: var(--primaer); line-height: 1; }
.etappe .info { font-size: .8rem; color: var(--gedaempft); }
.etappe--offen { border-color: var(--primaer); box-shadow: 0 0 0 4px color-mix(in srgb, var(--primaer) 20%, transparent); }
.etappe--zu { background: var(--flaeche); }
.etappe--zu .nummer { color: var(--gedaempft); }
.etappe--vorbei { opacity: .65; }

.leer { text-align: center; padding-block: 4rem; }

/* Formulare (Installer, später Teilnahme und Admin) */
.formular { background: #fff; border: 1px solid var(--rand); border-radius: var(--radius); padding: 1.5rem; max-width: 640px; }
.formular fieldset { border: 0; padding: 0; margin: 0 0 1.5rem; }
.formular legend { font-weight: 700; margin-bottom: .5rem; }
.formular label { display: block; font-weight: 600; margin: .75rem 0 .25rem; }
.formular input {
    width: 100%; font: inherit; padding: .6rem .75rem;
    border: 1px solid var(--rand); border-radius: 8px;
}
.formular input:focus { outline: 2px solid var(--primaer); border-color: transparent; }
.formular small { color: var(--gedaempft); }
.knopf {
    font: inherit; font-weight: 600; background: var(--primaer); color: #fff;
    border: 0; border-radius: 8px; padding: .7rem 1.4rem; cursor: pointer;
}
.knopf:disabled { opacity: .5; cursor: not-allowed; }
.pruefliste { list-style: none; padding: 0; }
.pruefliste li { padding: .3rem 0; }
.pruefliste .ok::before { content: "✓ "; color: var(--primaer); font-weight: 700; }
.pruefliste .nok::before { content: "✗ "; color: #c62828; font-weight: 700; }
.meldung-fehler { background: #fdecea; border-left: 4px solid #c62828; padding: .75rem 1rem; border-radius: 0 8px 8px 0; }
.meldung-ok { background: #e8f5e9; border-left: 4px solid #2E7D32; padding: .75rem 1rem; border-radius: 0 8px 8px 0; }

/* Vorschau-Leiste */
.vorschau-leiste {
    background: #fff8e1; border-bottom: 1px solid #f0d77a; font-size: .9rem;
}
.vorschau-leiste .rahmen { display: flex; gap: .75rem 1.25rem; align-items: center; flex-wrap: wrap; padding-block: .6rem; }
.vorschau-leiste form { display: flex; gap: .5rem; align-items: center; flex-wrap: wrap; margin: 0; }
.vorschau-leiste input { font: inherit; padding: .3rem .5rem; border: 1px solid #e0c870; border-radius: 6px; }
.vorschau-leiste button { font: inherit; padding: .3rem .8rem; border: 0; border-radius: 6px; background: #8d6e00; color: #fff; cursor: pointer; }

/* ===== Teilnahme ===== */
.meldung-info { background: #e3f2fd; border-left: 4px solid #1565c0; padding: .75rem 1rem; border-radius: 0 8px 8px 0; margin-bottom: 1rem; }
main .meldung-ok, main .meldung-fehler { margin-bottom: 1rem; }
.inline { display: inline; margin: 0; }
.link-knopf { background: none; border: 0; padding: 0; font: inherit; color: var(--primaer); cursor: pointer; text-decoration: underline; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.leise { color: var(--gedaempft); font-size: .9rem; }
.zurueck { margin: 0 0 1rem; }
.zurueck a { text-decoration: none; }

.teilnehmer-leiste { display: flex; justify-content: space-between; gap: .5rem 1rem; flex-wrap: wrap;
    background: #fff; border: 1px solid var(--rand); border-radius: var(--radius); padding: .6rem 1rem; margin: 1rem 0; font-size: .9rem; }
.teilnehmer-leiste--leise { background: none; border: 0; padding: 0; color: var(--gedaempft); justify-content: flex-start; }
.fortschritt { font-weight: 600; color: var(--primaer); }
.kleingedrucktes { margin-top: 2.5rem; font-size: .85rem; color: var(--gedaempft); }
.kleingedrucktes a { color: inherit; }

/* Kacheln als Links */
.etappe > a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .25rem;
    width: 100%; height: 100%; text-decoration: none; color: inherit; border-radius: calc(var(--radius) - 2px); }
.etappe--offen > a:hover, .etappe--vorbei > a:hover { background: color-mix(in srgb, var(--primaer) 6%, #fff); }
.etappe--erledigt { border-color: var(--primaer); background: color-mix(in srgb, var(--primaer) 8%, #fff); opacity: 1; }
.etappe--erledigt .marker { background: var(--primaer); }
.etappe--erledigt .marker::before { content: "✓ "; }
.etappe .marker { font-size: .7rem; }

/* Etappenseite */
.etappe-seite { background: #fff; border: 1px solid var(--rand); border-radius: var(--radius); padding: clamp(1.25rem, 4vw, 2.5rem); max-width: 720px; }
.ueberzeile { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 700; color: var(--primaer); margin: 0 0 .25rem; }
.etappe-bild { display: block; max-width: 100%; height: auto; border-radius: var(--radius); margin: 1rem 0; }
.etappe-inhalt { margin: 1rem 0; }
.frage { font-size: 1.3rem; line-height: 1.35; margin: 1.5rem 0 1rem; }
.antwort-formular { padding: 0; border: 0; max-width: none; }
.optionen { border: 0; padding: 0; margin: 0 0 1rem; display: grid; gap: .6rem; }
.option-karte { display: flex !important; align-items: center; gap: .75rem; margin: 0 !important; font-weight: 500 !important;
    border: 2px solid var(--rand); border-radius: 10px; padding: .8rem 1rem; cursor: pointer; transition: border-color .15s, background .15s; }
.option-karte:hover { border-color: color-mix(in srgb, var(--primaer) 50%, var(--rand)); }
.option-karte:has(input:checked) { border-color: var(--primaer); background: color-mix(in srgb, var(--primaer) 7%, #fff); }
.option-karte input { width: 1.2rem !important; height: 1.2rem; accent-color: var(--primaer); flex: none; }
.anmeldung { margin-top: 1.5rem !important; padding-top: 1rem !important; border-top: 1px solid var(--rand) !important; }
.raster-2 { display: grid; gap: 0 1rem; grid-template-columns: 1fr 1fr; }
.raster-2--plz { grid-template-columns: 1fr 2fr; }
@media (max-width: 480px) { .raster-2 { grid-template-columns: 1fr; } }
.check { display: flex; align-items: flex-start; gap: .6rem; font-weight: 500 !important; margin-top: 1rem !important; }
.check input { width: auto !important; margin-top: .3rem; accent-color: var(--primaer); }
.honig { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.knopf--gross { width: 100%; padding: .9rem 1.4rem; font-size: 1.05rem; margin-top: 1.25rem; }
.ergebnis, .loesung { background: var(--flaeche); border-radius: 10px; padding: 1rem 1.25rem; margin: 1rem 0; }
.ergebnis p, .loesung p { margin: .3rem 0; }
.richtig { color: #1b5e20; font-weight: 700; }
.falsch { color: #b71c1c; font-weight: 600; }
.blaettern { display: flex; justify-content: space-between; margin-top: 2rem; padding-top: 1rem; border-top: 1px solid var(--rand); }
.blaettern a { text-decoration: none; font-weight: 600; }
.schmal-spalte { max-width: 560px; }
.bedingungen { background: #fff; border: 1px solid var(--rand); border-radius: var(--radius); padding: 1.25rem 1.5rem; }
.leer .knopf { display: inline-block; text-decoration: none; }
.gefunden { text-align: center; padding: 1rem 0; }
.haken { display: inline-grid; place-items: center; width: 4rem; height: 4rem; border-radius: 50%; background: var(--primaer); color: #fff; font-size: 2rem; }

/* Feinschliff Kacheln */
.etappe .marker { align-self: center; }
@media (max-width: 560px) {
    .etappen { grid-template-columns: repeat(3, 1fr); gap: .5rem; }
    .etappe .nummer { font-size: 1.6rem; }
    .etappe .info { font-size: .7rem; }
    .etappe .marker { font-size: .62rem; padding: .1rem .45rem; }
}
.anmeldung legend { margin-bottom: 0; }
