/* ========================================================================== */
/* Schulschach NRW – zentrale Styles                                          */
/* ========================================================================== */
/*
 * Aufbau der Datei:
 *  1. Design-Tokens und Basis
 *  2. Wiederverwendbare Komponenten
 *  3. Kopfzeile und Navigation
 *  4. Startseite und Inhaltsseiten
 *  5. Formulare
 *  6. Fußzeile, Fehlerseiten und responsive Regeln
 *
 * Durch CSS Custom Properties lässt sich die komplette Markenwirkung später
 * ändern, ohne in jeder Komponente einzelne Farbwerte suchen zu müssen.
 */

:root {
    /*
     * SJN NRW arbeitet prägnant mit Rot, Weiß und neutralem Dunkelgrau. Das
     * Portal übernimmt diese DNA, nutzt aber tiefes Weinrot und warmes Gelb
     * für mehr Tiefe, bessere Kontraste und eine eigenständige Markenwirkung.
     */
    --color-forest-950: #100608;
    --color-forest-900: #310811;
    --color-forest-800: #6f0b1a;
    --color-bordeaux-900: #6f0b1a;
    --color-bordeaux-800: #a10f1f;
    --color-bordeaux-700: #d5071b;
    --color-bordeaux-600: #ed1830;
    --color-highlight: #ddff5c;
    --color-highlight-dark: #c7ed35;
    --color-signal: #1bd88f;
    --color-cream: #f2f3ef;
    --color-paper: #fffefd;
    --color-white: #ffffff;
    --color-ink: #292425;
    --color-muted: #6c6264;
    --color-line: #dfd5d6;
    /* Rahmen von Eingabefeldern: eigener, dunklerer Ton als --color-line.
       Muss >= 3:1 gegen Weiß und gegen Creme halten (WCAG 2.2 SC 1.4.11),
       sonst verschwindet die Feldkante – sie ist das einzige Merkmal, das
       ein Eingabefeld als Eingabefeld ausweist. Gerechnet: 3,57:1 auf
       #fffefd, 3,23:1 auf #f2f3ef. */
    --color-field-border: #82897f;
    --color-error: #b30d1c;
    --color-info: #215d78;

    --font-sans: "Segoe UI Variable", Aptos, Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    --font-display: "Segoe UI Variable Display", Aptos Display, Inter, ui-sans-serif, sans-serif;
    --container: 1240px;
    --radius-sm: 11px;
    --radius-md: 18px;
    --radius-lg: 28px;
    --shadow-card: 0 22px 65px rgba(36, 5, 11, 0.12);
    --transition: 210ms cubic-bezier(.2,.8,.2,1);
}

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

/*
 * Mehrere Komponenten (Wertungssuche, Schulsuche, Mannschaftskarten) blenden
 * Elemente per JavaScript über das native hidden-Attribut ein/aus, setzen
 * aber gleichzeitig eine eigene display-Regel (grid/flex) für den
 * sichtbaren Zustand. Ohne diese Zeile gewinnt die spezifischere
 * Klassenregel gegen die UA-Regel [hidden]{display:none} und das Element
 * bleibt trotz hidden sichtbar.
 */
[hidden] { display: none !important; }

html {
    scroll-behavior: smooth;
    color-scheme: light;
    /* Der Seitenkopf klebt beim Scrollen oben (.site-header, position:
       sticky). Ohne diesen Abstand landet das Sprungziel von „Direkt zum
       Inhalt“ und von jedem Ankerlink unter dem Kopf. Der Wert entspricht
       der Kopfhöhe (92px Hauptzeile plus Navigationsleiste) plus Luft. */
    scroll-padding-top: 150px;
}

body {
    margin: 0;
    background: var(--color-cream);
    color: var(--color-ink);
    font-family: var(--font-sans);
    font-size: 1rem;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
}

body.menu-is-open { overflow: hidden; }

img, picture, video { display: block; max-width: 100%; }

button, input, select, textarea { font: inherit; }

button, a { -webkit-tap-highlight-color: transparent; }

a { color: inherit; }

/* overflow-wrap greift nur als Notbremse gegen echten Überlauf (z. B. lange
   URLs); hyphens sorgt dafür, dass lange zusammengesetzte Wörter wie
   "Schulschachturniere" vorher an einer Silbengrenze mit Trennstrich
   umbrechen, statt mitten im Wort abgeschnitten zu werden. */
h1, h2, h3, p { overflow-wrap: break-word; hyphens: auto; }

h1, h2, h3 {
    margin-top: 0;
    color: inherit;
    font-family: var(--font-display);
    font-weight: 700;
    letter-spacing: -0.025em;
    line-height: 1.08;
}

h1 { font-size: clamp(2.7rem, 6vw, 5.6rem); }
h2 { font-size: clamp(2rem, 3.5vw, 3.4rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.65rem); }

p { margin-top: 0; }

/*
 * Doppelter Fokusrahmen: innen Limette, außen ein dunkler Gegenring.
 * Die Limette allein steht auf hellem Grund bei 1,0:1 (#ddff5c gegen
 * #f2f3ef) und ist dort praktisch unsichtbar; der dunkle Ring steht dort
 * bei 16,1:1. Auf dunklem Grund ist es umgekehrt – dort trägt die Limette
 * mit 17,6:1. So ist immer genau einer der beiden Ringe deutlich sichtbar,
 * ohne dass jede dunkle Fläche einzeln aufgezählt werden muss.
 * Der box-shadow liegt bewusst weiter außen (8px) als die outline
 * (offset 3px + 3px Breite = 6px), damit beide Ringe nebeneinander stehen.
 */
:focus-visible {
    outline: 3px solid var(--color-highlight);
    outline-offset: 2px;
    box-shadow: 0 0 0 7px var(--color-forest-900);
}

.container {
    width: min(calc(100% - 40px), var(--container));
    margin-inline: auto;
}

.narrow { max-width: 820px; }

.skip-link {
    position: fixed;
    z-index: 1000;
    top: 12px;
    left: 12px;
    padding: 10px 16px;
    transform: translateY(-160%);
    background: var(--color-highlight);
    color: var(--color-forest-950);
    font-weight: 800;
    text-decoration: none;
}

.skip-link:focus { transform: translateY(0); }

/* Nur für Screenreader: visuell unsichtbar, aber im Accessibility-Baum
   vorhanden (z. B. Live-Regionen, Ergebniszähler der Schulsuche). */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* -------------------------------------------------------------------------- */
/* Wiederverwendbare Elemente                                                  */
/* -------------------------------------------------------------------------- */

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 14px;
    color: var(--color-bordeaux-700);
    font-size: 0.76rem;
    font-weight: 900;
    letter-spacing: 0.13em;
    line-height: 1.3;
    text-transform: uppercase;
}

.eyebrow::before {
    width: 23px;
    height: 3px;
    content: "";
    background: currentColor;
}

.eyebrow--light { color: var(--color-highlight); }

.button {
    display: inline-flex;
    min-height: 48px;
    align-items: center;
    justify-content: center;
    border: 2px solid transparent;
    border-radius: var(--radius-sm);
    padding: 10px 20px;
    cursor: pointer;
    font-size: 0.93rem;
    font-weight: 850;
    line-height: 1.2;
    text-align: center;
    text-decoration: none;
    transition: background var(--transition), color var(--transition), transform var(--transition), border-color var(--transition);
}

.button:hover { transform: translateY(-2px); }

.button--primary {
    background: var(--color-forest-900);
    color: var(--color-white);
}

.button--primary:hover { background: var(--color-forest-800); }

.button--highlight {
    background: var(--color-highlight);
    color: var(--color-forest-950);
}

.button--highlight:hover { background: var(--color-highlight-dark); }

.button--outline-light {
    border-color: rgba(255,255,255,0.55);
    background: transparent;
    color: var(--color-white);
}

.button--outline-light:hover { border-color: var(--color-white); }

.button--full { width: 100%; }

.text-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--color-bordeaux-700);
    font-weight: 850;
    text-decoration: none;
}

.text-link span { transition: transform var(--transition); }
.text-link:hover span { transform: translateX(5px); }
.text-link--light { color: var(--color-white); }

.status {
    display: inline-flex;
    width: fit-content;
    align-items: center;
    border-radius: 99px;
    padding: 5px 10px;
    background: #e8e8df;
    color: #4c534f;
    font-size: 0.7rem;
    font-weight: 900;
    letter-spacing: 0.06em;
    line-height: 1.2;
    text-transform: uppercase;
}

.status--anmeldung-offen { background: var(--color-highlight); color: var(--color-forest-950); }
.status--termin-bestaetigt { background: #d9ebe5; color: #16503f; }
.status--vormerken { background: #f7dfb7; color: #6d4707; }
.status--planung { background: #dedfe8; color: #3b405c; }
.status--abgeschlossen { background: #e4e2dd; color: #66635c; }
.status--meldeschluss { background: #f1d9dc; color: #7a1a27; } /* R05: Status offen, Frist aber vorbei */
.status--extern { background: #e6eef7; color: #1f3d66; } /* R11: extern organisiert */

.section { padding-block: clamp(48px, 6vw, 84px); background: var(--color-paper); } /* R07: verdichtet (vorher 70-120px) */
.section--cream { background: var(--color-cream); }
.section--dark { background: var(--color-forest-950); color: var(--color-white); }

.section-heading { margin-bottom: 24px; }
.section-heading h2 { margin-bottom: 0; }

.section-heading--split {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 30px;
}

.section-heading--split > p {
    max-width: 350px;
    margin-bottom: 5px;
    color: var(--color-muted);
}

.section-heading--light h2 { color: var(--color-white); }

/* Diese Klasse trägt auf der Startseite die beiden Links, die von der
   Startseite in die Tiefe führen („Alle offenen Turniere“, „Alle
   Meldungen“). Voriger Wert #afbeb7 stand auf Creme bei 1,7:1. Jetzt
   getrennt nach Untergrund: 7,2:1 auf Creme, 14,0:1 auf dunkel. */
.section-heading__note {
    color: var(--color-bordeaux-800);
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
}
.section-heading--light .section-heading__note { color: #cddbd4; }

.content-card {
    border: 1px solid var(--color-line);
    border-radius: var(--radius-lg);
    padding: clamp(26px, 5vw, 60px);
    background: var(--color-white);
    box-shadow: var(--shadow-card);
}

/* Klickbare Kachelvariante von .content-card, z. B. auf "/meisterschaften". */
.meisterschaften-quicklinks { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.meisterschaften-quicklinks .content-card { display: flex; flex-direction: column; gap: 8px; padding: 24px; text-decoration: none; }
.meisterschaften-quicklinks .content-card strong { color: var(--color-ink); font-family: var(--font-display); font-size: 1.15rem; }
.meisterschaften-quicklinks .content-card span { color: var(--color-muted); font-size: 0.86rem; }
.meisterschaften-quicklinks .content-card:hover { border-color: var(--color-bordeaux-700); box-shadow: 0 14px 32px rgba(13,41,34,.1); transform: translateY(-2px); }

.organization-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.organization-card { display: flex; flex-direction: column; gap: 14px; }
.organization-card h2 { margin: 0; font-size: 1.3rem; }
.organization-card p { flex-grow: 1; margin: 0; color: var(--color-muted); font-size: 0.9rem; }

.prose > *:last-child { margin-bottom: 0; }
.prose h1 { font-size: clamp(2.3rem, 5vw, 4.4rem); }
.prose h2 { margin: 48px 0 16px; font-size: clamp(1.6rem, 3vw, 2.35rem); }
.prose h2:first-of-type { margin-top: 0; }
.prose p, .prose li { color: #3f4742; }
.prose a { font-weight: 750; }
.prose a:not(.button) { color: var(--color-bordeaux-700); }

.muted { color: var(--color-muted); }

/* -------------------------------------------------------------------------- */
/* Kopfzeile, Hauptnavigation und großes Regionsmenü                          */
/* -------------------------------------------------------------------------- */

.site-header {
    position: relative;
    z-index: 100;
    background: linear-gradient(118deg, var(--color-forest-950) 0%, var(--color-forest-900) 56%, #8f111c 100%);
    color: var(--color-white);
}

.site-header__main {
    display: flex;
    min-height: 92px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.site-header__right { display: flex; align-items: center; gap: 18px; }

/* Persistente Kopf-Buttons (Desktop) - auf jeder Unterseite erreichbar, ohne
   erst zur Startseite zurückzumüssen. Auf Mobilgeräten ausgeblendet (siehe
   @media max-width: 840px unten): dort übernehmen die inhaltsgleichen
   .mobile-cta-Links im aufklappbaren Hauptmenü dieselbe Aufgabe. */
.site-header__cta { display: flex; align-items: center; gap: 10px; }
.site-header__cta .button { min-height: 40px; padding: 0 16px; font-size: 0.82rem; white-space: nowrap; }

.brand {
    display: inline-flex;
    align-items: center;
    gap: 13px;
    color: var(--color-white);
    text-decoration: none;
}

.brand__logo {
    width: 52px;
    height: 52px;
    flex: 0 0 52px;
    border: 2px solid rgba(255,255,255,.68);
    border-radius: 15px;
    object-fit: cover;
    box-shadow: 0 10px 30px rgba(0,0,0,.24);
}

.brand__text { display: flex; flex-direction: column; line-height: 1.05; }
.brand__text strong { font-family: var(--font-display); font-size: 1.4rem; letter-spacing: -0.02em; }
.brand__text span { margin-top: 5px; color: #f0c9ce; font-size: 0.68rem; font-weight: 800; letter-spacing: 0.1em; text-transform: uppercase; }

.site-header__nav-shell { border-top: 1px solid rgba(255,255,255,0.13); }

.main-nav {
    display: flex;
    min-height: 55px;
    align-items: stretch;
    gap: 4px;
}

.main-nav__link {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    border: 0;
    border-bottom: 3px solid transparent;
    padding: 0 16px;
    background: transparent;
    color: #dce7e2;
    cursor: pointer;
    font-size: 0.88rem;
    font-weight: 800;
    text-decoration: none;
    position: relative;
    transition: background var(--transition), color var(--transition), border-color var(--transition), transform var(--transition);
}

.main-nav__link:hover, .main-nav__link.is-active {
    border-bottom-color: var(--color-highlight);
    background: rgba(255,255,255,0.06);
    color: var(--color-white);
}

.main-nav__link:hover { transform: translateY(-2px); }

/* Der leuchtende Balken fährt beim Hover von der Mitte nach außen. */
.main-nav__link::after {
    position: absolute;
    right: 16px;
    bottom: 7px;
    left: 16px;
    height: 2px;
    transform: scaleX(0);
    transform-origin: center;
    background: var(--color-highlight);
    content: "";
    transition: transform var(--transition);
}
.main-nav__link:hover::after,
.main-nav__link.is-active::after { transform: scaleX(1); }

.nav-dropdown {
    position: static;
    display: flex;
    align-items: stretch;
}

/* Der Dropdown-Schalter liegt in einem zusätzlichen <div>. Ohne diese Höhe
 * wird er – anders als die direkten Navigationslinks – am oberen Rand
 * ausgerichtet. Die feste Mindesthöhe bringt alle Beschriftungen auf eine Linie. */
.nav-dropdown__toggle { min-height: 55px; }

.nav-dropdown__panel {
    position: absolute;
    z-index: 120;
    top: 100%;
    left: 0;
    display: none;
    min-width: 260px;
    border-top: 5px solid var(--color-highlight);
    padding: 10px;
    background: var(--color-white);
    color: var(--color-ink);
    box-shadow: 0 28px 65px rgba(5, 19, 15, 0.28);
}

.nav-dropdown.is-open .nav-dropdown__panel { display: block; }

.nav-dropdown__panel ul { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.nav-dropdown__panel a {
    display: block;
    border-radius: var(--radius-sm);
    padding: 11px 14px;
    color: var(--color-ink);
    font-size: 0.86rem;
    font-weight: 700;
    text-decoration: none;
}
.nav-dropdown__panel a:hover { background: var(--color-cream); color: var(--color-bordeaux-700); }

/* Wiederverwendet auf der Seite "/meisterschaften": derselbe nach
 * Regierungsbezirk gruppierte Aufbau wie das frühere Nav-Regionsmenü, aber
 * als normaler Seiteninhalt statt als abgesetztes Dropdown. */
.region-directory { display: block; }

.region-menu__topline {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 25px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--color-line);
}

.region-menu__topline .eyebrow { margin-bottom: 6px; }
.region-menu__topline h2 { margin: 0; font-size: 1.8rem; }
.region-menu__topline > a { color: var(--color-bordeaux-700); font-size: 0.86rem; font-weight: 850; text-decoration: none; }

.region-menu__grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 24px;
}

.region-menu__district h3 {
    margin-bottom: 10px;
    color: var(--color-forest-900);
    font-family: var(--font-sans);
    font-size: 0.75rem;
    font-weight: 950;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.region-menu__district ul { display: grid; gap: 3px; margin: 0; padding: 0; list-style: none; }
.region-menu__district a { display: block; padding: 4px 0; color: #424a45; font-size: 0.76rem; line-height: 1.35; text-decoration: none; }
.region-menu__district a:hover { color: var(--color-bordeaux-700); text-decoration: underline; text-underline-offset: 3px; }

.menu-toggle, .mobile-cta { display: none; }

/* -------------------------------------------------------------------------- */
/* Startseite                                                                  */
/* -------------------------------------------------------------------------- */

.stats-strip { border-bottom: 1px solid var(--color-line); background: var(--color-white); }
.stats-strip__grid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stats-strip__grid > * { display: flex; min-height: 115px; flex-direction: column; justify-content: center; border-right: 1px solid var(--color-line); padding: 20px 27px; text-decoration: none; }
.stats-strip__grid > *:first-child { border-left: 1px solid var(--color-line); }
.stats-strip__grid strong { color: var(--color-forest-900); font-family: var(--font-display); font-size: 2rem; line-height: 1.1; }
.stats-strip__grid span { margin-top: 5px; color: var(--color-muted); font-size: 0.77rem; font-weight: 750; }
.stats-strip__grid a { background: var(--color-highlight); }
.stats-strip__grid a span { color: var(--color-forest-950); }

.quick-grid { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--color-line); border-left: 1px solid var(--color-line); }

.quick-card {
    position: relative;
    display: flex;
    min-height: 240px;
    flex-direction: column;
    align-items: flex-start;
    border: 0;
    border-right: 1px solid var(--color-line);
    border-bottom: 1px solid var(--color-line);
    padding: 24px;
    background: var(--color-white);
    color: var(--color-ink);
    cursor: pointer;
    text-align: left;
    text-decoration: none;
    transition: background var(--transition), color var(--transition), transform var(--transition);
}

.quick-card:hover { z-index: 2; background: var(--color-forest-900); color: var(--color-white); transform: translateY(-6px); }
.quick-card__number { align-self: flex-end; color: var(--color-muted); font-size: 0.7rem; font-weight: 900; }
.quick-card__icon { display: grid; width: 58px; height: 58px; place-items: center; margin: 15px 0 auto; border-radius: 50%; background: var(--color-highlight); color: var(--color-forest-950); font-family: var(--font-display); font-size: 1.6rem; }
.quick-card strong { margin-top: 22px; font-family: var(--font-display); font-size: 1.35rem; line-height: 1.15; }
.quick-card > span:last-child { margin-top: 6px; color: var(--color-muted); font-size: 0.78rem; }
.quick-card:hover > span:last-child, .quick-card:hover .quick-card__number { color: #c8d7d1; }

.tournament-list { display: grid; gap: 14px; }

.tournament-card {
    display: grid;
    grid-template-columns: 110px 1fr;
    overflow: hidden;
    border: 1px solid var(--color-line);
    border-radius: var(--radius-md);
    background: var(--color-white);
    transition: box-shadow var(--transition), border-color var(--transition), transform var(--transition);
}

.tournament-card:hover { border-color: #a9b0aa; box-shadow: var(--shadow-card); transform: translateY(-2px); }
.tournament-card__date { display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--color-forest-900); color: var(--color-white); }
.tournament-card__date span { font-family: var(--font-display); font-size: 2.35rem; line-height: 1; }
.tournament-card__date strong { margin-top: 7px; color: var(--color-highlight); font-size: 0.69rem; letter-spacing: 0.12em; }
.tournament-card__body { padding: 22px 25px 18px; }
.tournament-card__meta { display: flex; align-items: center; gap: 12px; color: var(--color-muted); font-size: 0.72rem; font-weight: 750; }
.tournament-card h3 { margin: 12px 0 8px; font-size: clamp(1.25rem, 2.2vw, 1.65rem); }
.tournament-card h3 a { text-decoration: none; }
.tournament-card h3 a:hover { color: var(--color-bordeaux-700); }
.tournament-card p { max-width: 820px; margin-bottom: 15px; color: var(--color-muted); font-size: 0.88rem; }
.tournament-card__footer { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid #ecece5; padding-top: 13px; color: var(--color-muted); font-size: 0.76rem; }
.tournament-card__footer a { font-weight: 850; text-decoration: none; }
.tournament-card__footer a:not(.button) { color: var(--color-bordeaux-700); }
.tournament-card__footer a:only-child { margin-left: auto; }

.news-grid { display: grid; grid-template-columns: 1.25fr 0.75fr; gap: 18px; }
.news-card { display: grid; grid-template-columns: 0.75fr 1fr; overflow: hidden; background: var(--color-white); color: var(--color-ink); }
.news-card--large { grid-row: span 2; grid-template-columns: 1fr; }
.news-card__visual { position: relative; display: grid; min-height: 210px; place-items: center; overflow: hidden; background: var(--color-bordeaux-700); }
.news-card--large .news-card__visual { min-height: 320px; }
.news-card__visual::before { position: absolute; inset: 0; content: ""; background-size: 76px 76px; opacity: 0.28; }
.visual-pattern--1::before { background-image: linear-gradient(45deg, #fff 25%, transparent 25% 75%, #fff 75%), linear-gradient(45deg, #fff 25%, transparent 25% 75%, #fff 75%); background-position: 0 0, 38px 38px; }
.visual-pattern--2 { background: #bd7727; }
.visual-pattern--2::before { background-image: radial-gradient(circle, #fff 0 5px, transparent 6px); }
.visual-pattern--3 { background: #315f78; }
.visual-pattern--3::before { background-image: repeating-linear-gradient(135deg, #fff 0 10px, transparent 10px 35px); }
.news-card__visual > span { position: relative; z-index: 1; color: var(--color-white); font-family: var(--font-display); font-size: clamp(6rem, 12vw, 10rem); text-shadow: 9px 11px rgba(13,41,34,0.25); }
.news-card__visual > img { width: 100%; height: 100%; object-fit: cover; }
.news-card__body { padding: 26px; }
.news-card__meta { display: flex; justify-content: space-between; gap: 15px; color: var(--color-muted); font-size: 0.69rem; font-weight: 800; text-transform: uppercase; }
.news-card__meta span { color: var(--color-bordeaux-700); }
.news-card h3 { margin: 18px 0 13px; font-size: clamp(1.25rem, 2.1vw, 1.8rem); }
.news-card p { color: var(--color-muted); font-size: 0.84rem; }
.news-card a { font-size: 0.78rem; font-weight: 900; text-decoration: none; }
.news-card a:not(.button) { color: var(--color-bordeaux-700); }

/* Kompakte Startseiten-Variante: gleich große Karten, keine große Erstkarte. */
.news-grid--compact { grid-template-columns: repeat(3, 1fr); }
.news-grid--compact .news-card { grid-template-columns: 1fr; }
.news-grid--compact .news-card__visual { min-height: 120px; }
.news-card__visual--plain { background: linear-gradient(145deg, var(--color-bordeaux-700), var(--color-forest-900)); }
.pin-badge { margin-right: auto; color: var(--color-bordeaux-700); font-weight: 900; }
.news-card__meta { align-items: center; }

/* Offene-Turniere-Teaser auf der Startseite. */
.open-tournament-teaser-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.open-tournament-teaser { display: flex; flex-direction: column; gap: 6px; border: 1px solid var(--color-line); border-radius: var(--radius-md); padding: 20px; background: var(--color-white); text-decoration: none; transition: box-shadow var(--transition), transform var(--transition); }
.open-tournament-teaser:hover { box-shadow: var(--shadow-card); transform: translateY(-2px); }
.open-tournament-teaser__date { color: var(--color-bordeaux-700); font-size: 0.72rem; font-weight: 900; letter-spacing: 0.06em; text-transform: uppercase; }
.open-tournament-teaser strong { color: var(--color-ink); font-size: 1.05rem; }
.open-tournament-teaser__city { color: var(--color-muted); font-size: 0.82rem; }
.open-tournament-teaser .text-link { margin-top: 8px; }

.section-intro { max-width: 640px; margin: -10px 0 22px; color: var(--color-muted); }

.intro-panel { display: grid; grid-template-columns: 1.3fr 0.7fr; align-items: end; gap: clamp(40px, 8vw, 100px); border-left: 7px solid var(--color-bordeaux-700); padding: clamp(25px, 5vw, 54px); background: var(--color-white); box-shadow: var(--shadow-card); }
.intro-panel h2 { margin-bottom: 15px; }
.intro-panel p { max-width: 700px; margin-bottom: 0; color: var(--color-muted); font-size: 1.04rem; }
.intro-panel__actions { display: flex; flex-direction: column; align-items: flex-start; gap: 20px; }

/* -------------------------------------------------------------------------- */
/* Inhaltsseiten                                                               */
/* -------------------------------------------------------------------------- */

.page-hero { background: var(--color-forest-900); color: var(--color-white); }
.page-hero__inner { display: grid; min-height: 240px; grid-template-columns: 1.3fr 0.7fr; align-items: end; gap: clamp(28px, 6vw, 80px); padding-block: 44px; } /* R07: verdichtet (vorher 360px/75px) */
.page-hero--form .page-hero__inner { min-height: 200px; padding-block: 36px; }
.page-hero--form h1 { font-size: clamp(2rem, 4vw, 3.4rem); }
.page-hero h1 { margin-bottom: 0; color: var(--color-white); font-size: clamp(2.7rem, 5vw, 4.8rem); }
.page-hero__inner > p { margin-bottom: 7px; color: #c9d8d2; font-size: 1.06rem; }
.page-hero--small .page-hero__inner { min-height: 260px; grid-template-columns: 1fr; }

.filter-panel {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    align-items: end;
    gap: 14px;
    margin-top: -118px;
    margin-bottom: 58px;
    border-top: 5px solid var(--color-highlight);
    padding: 25px;
    background: var(--color-white);
    box-shadow: var(--shadow-card);
}

.filter-panel .button { min-height: 52px; }
.filter-panel > .button { grid-column: 4; }
.results-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 25px; margin-bottom: 28px; }
.results-heading h2 { margin: 0; font-size: clamp(1.8rem, 3vw, 2.7rem); }
.results-heading > a { color: var(--color-bordeaux-700); font-size: 0.83rem; font-weight: 800; }

.empty-state { border: 1px dashed #aeb4af; padding: clamp(35px, 7vw, 80px); background: var(--color-white); text-align: center; }
.empty-state > span { color: var(--color-bordeaux-700); font-family: var(--font-display); font-size: 4rem; }
.empty-state h2 { margin: 13px 0 10px; font-size: 2rem; }
.empty-state p { color: var(--color-muted); }
.empty-state--left { text-align: left; }

.page-hero--detail { position: relative; overflow: hidden; }
.page-hero--detail::after { position: absolute; right: -90px; bottom: -230px; width: 470px; height: 470px; border: 1px solid rgba(216,243,90,0.25); border-radius: 50%; content: ""; }
.detail-hero { position: relative; z-index: 2; display: grid; min-height: 300px; grid-template-columns: 1fr auto; align-items: end; gap: 40px; padding-block: 44px; } /* R07: verdichtet (vorher 440px/75px) */
.detail-hero h1 { max-width: 850px; margin: 14px 0; font-size: clamp(2.2rem, 4.2vw, 4rem); hyphens: none; }
.detail-hero__facts { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 12px 0 0; font-size: .92rem; color: #c9d8d2; }
.detail-hero__facts strong { color: var(--color-white); font-weight: 800; margin-right: 4px; }
.detail-hero__actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 16px 0 0; }
.page-hero--photo .detail-hero__facts { color: #eadfe2; }
.detail-hero p { max-width: 750px; margin-bottom: 0; color: #cad8d3; font-size: 1.05rem; }

/* Rückblick-Modus: abgeschlossene Turniere zeigen das erste Turnierfoto als
   Hero-Hintergrund (dasselbe Bild wie og:image) statt einer Farbfläche. Ein
   echtes <img> statt eines CSS-background-image, weil style-src 'self' ohne
   unsafe-inline (siehe app/Support/SecurityHeaders.php) jedes style="..."-
   Attribut verwirft - ein inline gesetztes background-image würde die CSP
   lautlos verletzen und einfach nicht angezeigt. */
.page-hero__photo { position: absolute; inset: 0; z-index: 0; width: 100%; height: 100%; object-fit: cover; }
.page-hero--photo > picture { display: contents; }
picture { display: contents; } /* R07: <picture> ist nur Hülle, Layout bestimmt das <img> */
.page-hero--photo::before { position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgba(16,6,8,.25) 0%, rgba(16,6,8,.65) 55%, rgba(16,6,8,.93) 100%); content: ""; }
.page-hero--photo::after { display: none; }
.kennzahlen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; max-width: 560px; margin-top: 26px; }
.kennzahl { padding: 14px 16px; border: 1px solid rgba(216,243,90,0.3); border-radius: 12px; background: rgba(255,255,255,0.08); }
.kennzahl strong { display: block; color: var(--color-highlight); font-family: var(--font-display); font-size: 1.9rem; line-height: 1; }
.kennzahl span { color: #cad8d3; font-size: 0.74rem; letter-spacing: 0.03em; text-transform: uppercase; }

.breadcrumb { display: flex; gap: 8px; margin-bottom: 24px; color: #b7c9c2; font-size: 0.76rem; }
.breadcrumb a { color: var(--color-highlight); }
.date-block { display: flex; width: 180px; height: 180px; flex-direction: column; align-items: center; justify-content: center; background: var(--color-highlight); color: var(--color-forest-950); }
.date-block span { font-family: var(--font-display); font-size: 2.5rem; font-weight: 750; line-height: 1; }
.date-block strong { margin-top: 8px; font-size: 0.86rem; letter-spacing: 0.16em; }

.detail-layout, .editorial-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; align-items: start; gap: 30px; }
.facts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0; margin: 20px 0 32px; border-top: 1px solid var(--color-line); border-left: 1px solid var(--color-line); }
.facts-grid > div { min-height: 140px; border-right: 1px solid var(--color-line); border-bottom: 1px solid var(--color-line); padding: 22px; }
.facts-grid dt { margin-bottom: 8px; color: var(--color-bordeaux-700); font-size: 0.7rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.facts-grid dd { margin: 0; color: var(--color-ink); font-weight: 720; }

.action-card { position: relative; overflow: hidden; padding: 32px; background: var(--color-forest-900); color: var(--color-white); }
.action-card::before { position: absolute; top: -65px; right: -65px; width: 160px; height: 160px; border: 1px solid rgba(216,243,90,0.35); border-radius: 50%; content: ""; }
.action-card__piece { display: block; margin-bottom: 65px; color: var(--color-highlight); font-family: var(--font-display); font-size: 1.15rem; font-weight: 950; letter-spacing: .16em; line-height: 1; }
.action-card h2 { margin-bottom: 14px; color: var(--color-white); font-size: 2rem; }
.action-card p { color: #c5d5cf; font-size: 0.9rem; }
.action-card .button { margin: 12px 0 20px; }
.action-card__divider { height: 1px; margin: 20px 0; border: 0; background: rgba(255,255,255,0.18); }
.action-card--sticky { position: sticky; top: 20px; }

.region-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: start; gap: 38px; }
.region-info-card { border-top: 5px solid var(--color-bordeaux-700); padding: 27px; background: var(--color-white); box-shadow: var(--shadow-card); }
.region-info-card__label { display: block; margin-top: 14px; color: var(--color-muted); font-size: 0.68rem; font-weight: 850; letter-spacing: 0.08em; text-transform: uppercase; }
.region-info-card__label:first-child { margin-top: 0; }
.region-info-card > strong { color: var(--color-forest-900); font-family: var(--font-display); font-size: 1.25rem; }
.region-info-card hr { margin: 26px 0; border: 0; border-top: 1px solid var(--color-line); }
.region-info-card h2 { font-size: 1.65rem; }
.region-info-card p { color: var(--color-muted); font-size: 0.84rem; }

.region-contact-list { display: grid; gap: 18px; margin: 0; padding: 0; list-style: none; }
.region-contact-list li { display: grid; gap: 2px; }
.region-contact-list strong { color: var(--color-forest-900); font-size: 0.92rem; }
.region-contact-list a { font-size: 0.82rem; overflow-wrap: anywhere; }

.process-list { display: grid; gap: 0; margin: 25px 0 45px; padding: 0; list-style: none; }
.process-list li { display: grid; grid-template-columns: 65px 1fr; gap: 18px; border-top: 1px solid var(--color-line); padding: 24px 0; }
.process-list li:last-child { border-bottom: 1px solid var(--color-line); }
.process-list li > span { color: var(--color-bordeaux-700); font-family: var(--font-display); font-size: 1.5rem; }
.process-list strong { display: block; margin-bottom: 5px; color: var(--color-ink); }
.process-list p { margin: 0; }
.process-list--registration { margin-bottom: 28px; }
.guide-note { margin-top: 28px; border-left: 5px solid var(--color-highlight); padding: 20px 22px; background: var(--color-forest-900); color: var(--color-white); }
.guide-note strong { display: block; margin-bottom: 7px; color: var(--color-highlight); }
.guide-note p { margin: 0; color: #d9e3df; }
.guide-note a { color: var(--color-highlight); }

.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) 330px; align-items: start; gap: 30px; }

/* -------------------------------------------------------------------------- */
/* Formulare                                                                   */
/* -------------------------------------------------------------------------- */

.form-layout { display: grid; grid-template-columns: minmax(0, 1fr) 310px; align-items: start; gap: 30px; }

.registration-form {
    overflow: hidden;
    border-top: 6px solid var(--color-highlight);
    padding: clamp(23px, 5vw, 50px);
    background: var(--color-white);
    box-shadow: var(--shadow-card);
}

.form-section { margin: 0; border: 0; padding: 0 0 45px; }
.form-section + .form-section { border-top: 1px solid var(--color-line); padding-top: 40px; }
.form-section > legend { display: flex; align-items: center; gap: 13px; margin-bottom: 26px; padding: 0; color: var(--color-forest-900); font-family: var(--font-display); font-size: 1.6rem; font-weight: 750; }
.form-section > legend > span { display: grid; width: 37px; height: 37px; place-items: center; border-radius: 50%; background: var(--color-forest-900); color: var(--color-highlight); font-family: var(--font-sans); font-size: 0.7rem; }

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.form-field { display: flex; min-width: 0; flex-direction: column; }
.form-field--wide { grid-column: span 1; }
.form-field--full { grid-column: 1 / -1; }
/* P25: feststehendes Turnier im Anmeldeformular (statt Auswahlfeld): Datum, Titel, Ort, Meldeschluss. */
.form-fixed-tournament { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; }
.form-fixed-tournament__date { color: var(--text-body, inherit); font-size: 1rem; font-weight: 700; }
.form-fixed-tournament strong { font-family: var(--font-display); font-size: clamp(1.4rem, 1.1rem + 1.3vw, 1.9rem); font-weight: 800; line-height: 1.2; overflow-wrap: anywhere; hyphens: auto; color: var(--text, inherit); }
.form-fixed-tournament strong:focus-visible { outline: 2px solid currentColor; outline-offset: 4px; }
.form-fixed-tournament [data-tournament-fixed-place] { margin-top: 4px; font-size: 1.05rem; overflow-wrap: anywhere; }
.form-fixed-tournament__meta { color: var(--text-muted, inherit); font-size: .95rem; }
.form-fixed-tournament span:empty { display: none; }

.form-field label { margin-bottom: 7px; color: #303631; font-size: 0.78rem; font-weight: 850; }
.optional { color: var(--color-muted); font-size: 0.7rem; font-weight: 500; }

.form-field input, .form-field select, .form-field textarea {
    width: 100%;
    min-height: 50px;
    border: 1px solid var(--color-field-border);
    border-radius: var(--radius-sm);
    padding: 11px 13px;
    background: var(--color-white);
    color: var(--color-ink);
    transition: border-color var(--transition), box-shadow var(--transition);
}

.form-field textarea { min-height: 130px; resize: vertical; }
/* Der vorige Fokuszustand war ein Limettenschimmer auf weißem Grund
   (rgba(216,243,90,.55) gegen #fff: unter 1,2:1) bei gleichzeitig
   abgeschalteter outline. Jetzt derselbe Doppelring wie global,
   zusätzlich zum dunklen Rahmen. */
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
    border-color: var(--color-forest-900);
    outline: 3px solid var(--color-highlight);
    outline-offset: 1px;
    box-shadow: 0 0 0 6px var(--color-forest-900);
}
.form-field--error input, .form-field--error select, .form-field--error textarea { border-color: var(--color-error); background: #fff8f8; }
.field-error { margin: 6px 0 0; color: var(--color-error); font-size: 0.75rem; font-weight: 700; }
.category-legend { margin: 6px 0 0; display: flex; flex-wrap: wrap; gap: 4px 12px; color: var(--color-muted); font-size: 0.7rem; }
.category-legend strong { color: var(--color-ink); }

/* Erklärt Abkürzungen wie DSB/DWZ/FIDE/Elo/TWZ per Hover/Fokus-Tooltip. */
abbr[title] { text-decoration: underline dotted; text-underline-offset: 2px; cursor: help; }
.character-count { align-self: flex-end; margin-top: 4px; color: var(--color-muted); font-size: 0.68rem; }

.filter-panel .form-field input, .filter-panel .form-field select { min-height: 52px; }

.form-consent { margin-bottom: 35px; border: 1px solid var(--color-line); padding: 18px; background: var(--color-cream); }
.form-consent label { display: flex; align-items: flex-start; gap: 12px; cursor: pointer; font-size: 0.8rem; }
.form-consent input { width: 19px; height: 19px; flex: 0 0 19px; margin-top: 3px; accent-color: var(--color-forest-900); }
.form-consent a { font-weight: 800; }
.form-consent a:not(.button) { color: var(--color-bordeaux-700); }

.form-submit { display: flex; align-items: center; justify-content: space-between; gap: 25px; border-top: 1px solid var(--color-line); padding-top: 30px; }
.form-submit p { margin: 0; color: var(--color-muted); font-size: 0.72rem; }
.form-submit .button[disabled] { cursor: wait; opacity: 0.7; transform: none; }
.form-submit__actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: flex-end; }
/* R02: Entwurf auf diesem Gerät */
.draft-panel { margin-bottom: 26px; border: 1px dashed var(--color-line); border-radius: 10px; padding: 14px 18px; background: var(--color-white); }
.draft-panel__controls { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px; }
.draft-panel__status { margin: 0; font-size: .75rem; color: var(--color-muted); }
.draft-panel__status--error { color: var(--color-error); font-weight: 700; }
.draft-resume { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-bottom: 12px; border-left: 5px solid var(--color-info); padding: 12px 16px; background: #edf7fb; font-size: .82rem; }
.draft-resume p { margin: 0; color: var(--color-ink); }
.draft-resume__actions { display: flex; flex-wrap: wrap; gap: 8px; }
.draft-resume .button { padding: 9px 14px; font-size: .75rem; }

.form-sidebar { position: sticky; top: 20px; padding: 30px; background: var(--color-forest-900); color: var(--color-white); }
.form-sidebar__piece { color: var(--color-highlight); font-family: var(--font-display); font-size: 1rem; font-weight: 950; letter-spacing: .16em; line-height: 1; text-align: right; }
.form-sidebar h2 { margin-bottom: 28px; color: var(--color-white); font-size: 2rem; }
.form-sidebar ol { display: grid; gap: 20px; margin: 0; padding: 0; list-style: none; }
.form-sidebar li { display: grid; grid-template-columns: 32px 1fr; gap: 12px; }
.form-sidebar li > span { display: grid; width: 29px; height: 29px; place-items: center; border-radius: 50%; background: var(--color-highlight); color: var(--color-forest-950); font-size: 0.68rem; font-weight: 900; }
.form-sidebar li p { margin: 0; color: #c8d5d0; font-size: 0.78rem; }
.form-sidebar li strong { display: block; color: var(--color-white); }
.form-sidebar__note { margin-top: 28px; border-top: 1px solid rgba(255,255,255,0.18); padding-top: 22px; }
.form-sidebar hr { margin: 22px 0; border: 0; border-top: 1px solid rgba(255,255,255,0.18); }
.form-sidebar p { margin: 0 0 14px; color: #c8d5d0; font-size: 0.85rem; }
.form-sidebar__note strong { color: var(--color-highlight); font-size: 0.78rem; text-transform: uppercase; }
.form-sidebar__note p { margin: 6px 0 0; color: #c8d5d0; font-size: 0.78rem; }

.alert { display: flex; flex-direction: column; gap: 3px; margin-bottom: 30px; border-left: 5px solid currentColor; padding: 16px 18px; font-size: 0.82rem; }
.alert--error { background: #fff0f1; color: var(--color-error); }
.alert--info { background: #edf7fb; color: var(--color-info); }
.alert--warning { background: #fff3d8; color: #6f4807; } /* R05: Nachmeldung nach Meldeschluss */
.late-registration-warning { margin-top: 14px; }
.alert--success { background: #edf8f1; color: #165d35; }
.alert span { color: #4b514d; }

.error-summary {
    margin-bottom: 30px;
    border-left: 5px solid var(--color-error);
    border-radius: 4px;
    background: #fff0f1;
    padding: 16px 18px;
    color: var(--color-error);
}
.error-summary:focus { outline: 3px solid var(--color-bordeaux-700); outline-offset: 2px; }
.error-summary strong { display: block; margin-bottom: 8px; }
.error-summary ul { margin: 0; padding-left: 20px; }
.error-summary a { color: var(--color-error); font-weight: 700; text-decoration: underline; }

/* -------------------------------------------------------------------------- */
/* Gästebuch und datensparsamer Aufrufzähler                                  */
/* -------------------------------------------------------------------------- */

.guestbook-layout { display: grid; align-items: start; grid-template-columns: minmax(0, 1.35fr) minmax(320px, .65fr); gap: clamp(28px, 5vw, 65px); }
.section-heading--compact h2 { font-size: clamp(1.8rem, 3.6vw, 2.8rem); }
.guestbook-cards { display: grid; gap: 17px; }
.guestbook-card { position: relative; overflow: hidden; border: 1px solid rgba(82, 11, 19, .12); border-radius: 15px; padding: clamp(24px, 4vw, 34px); background: #fff; box-shadow: 0 10px 32px rgba(50, 10, 15, .06); }
.guestbook-card__mark { position: absolute; top: -16px; right: 18px; color: rgba(82, 11, 19, .07); font-family: Georgia, serif; font-size: 8rem; line-height: 1; }
.guestbook-card > p { position: relative; margin: 0; color: #343936; font-size: clamp(1rem, 1.5vw, 1.12rem); line-height: 1.75; }
.guestbook-card footer { display: flex; justify-content: space-between; gap: 20px; align-items: end; margin-top: 24px; border-top: 1px solid #ece7e2; padding-top: 16px; }
.guestbook-card footer div { display: grid; gap: 2px; }
.guestbook-card footer strong { color: var(--color-bordeaux-800); }
.guestbook-card footer span,
.guestbook-card footer small { color: var(--color-muted); font-size: .76rem; }
.guestbook-empty { border: 1px dashed #ccbfc0; border-radius: 14px; padding: 50px 25px; text-align: center; background: rgba(255,255,255,.55); }
.guestbook-empty > span { color: var(--color-bordeaux-700); font-size: 3rem; }
.guestbook-empty h3 { margin: 8px 0; }
.guestbook-empty p { margin: 0; color: var(--color-muted); }
.guestbook-form-card { position: sticky; top: 30px; border-top: 5px solid var(--color-highlight); border-radius: 15px; padding: clamp(25px, 4vw, 36px); background: var(--color-bordeaux-900); color: #fff; box-shadow: 0 18px 45px rgba(50, 10, 15, .18); }
.guestbook-form-card h2 { margin: 8px 0 10px; color: #fff; }
.guestbook-form-card > p { margin: 0 0 23px; color: rgba(255,255,255,.78); font-size: .86rem; line-height: 1.6; }
.guestbook-form { display: grid; gap: 16px; }
.guestbook-form .form-field label { color: #fff; }
.guestbook-form .form-field input,
.guestbook-form .form-field textarea { border-color: rgba(255,255,255,.28); background: #fff; color: var(--color-ink); }
.guestbook-form .optional { color: rgba(255,255,255,.6); }
.guestbook-form .field-error { color: #ffd9de; }
.guestbook-consent { display: flex; align-items: flex-start; gap: 10px; color: rgba(255,255,255,.82); font-size: .77rem; line-height: 1.45; cursor: pointer; }
.guestbook-consent input { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 1px; accent-color: var(--color-highlight); }
.honeypot-field { position: absolute !important; left: -10000px !important; width: 1px !important; height: 1px !important; overflow: hidden !important; }
.site-view-counter { display: inline-flex; align-items: center; gap: 7px; border: 1px solid rgba(255,255,255,.18); border-radius: 999px; padding: 6px 10px; color: rgba(255,255,255,.78); font-size: .72rem; }
.site-view-counter strong { color: #fff; font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
    .guestbook-layout { grid-template-columns: 1fr; }
    .guestbook-form-card { position: static; }
}

@media (max-width: 560px) {
    .guestbook-card footer { align-items: flex-start; flex-direction: column; gap: 8px; }
}

/* -------------------------------------------------------------------------- */
/* Mannschaftskarten (mehrere Mannschaften je Anmeldung, UR-TEAM)             */
/* -------------------------------------------------------------------------- */

.team-section__intro { max-width: 720px; margin: 0 0 20px; color: var(--color-muted); font-size: .82rem; }
.team-list { display: grid; gap: 22px; margin-bottom: 16px; }
.team-count { margin: 10px 0 0; color: var(--color-muted); font-size: .875rem; font-weight: 700; }
.team-card {
    border: 1px solid #ded3d4;
    border-radius: 14px;
    background: #fffdfd;
    box-shadow: 0 8px 24px rgba(80, 8, 17, .045);
    overflow: hidden;
}
.team-card__heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px 18px;
    background: linear-gradient(100deg, #8a0512, var(--color-bordeaux-700));
    color: var(--color-white);
    font-size: .8rem;
    font-weight: 800;
}
.team-remove-button {
    border: 1px solid rgba(255,255,255,.5);
    border-radius: 7px;
    padding: 6px 11px;
    background: transparent;
    color: var(--color-white);
    font-size: .7rem;
    font-weight: 800;
    cursor: pointer;
    transition: background var(--transition);
}
.team-remove-button:hover { background: rgba(255,255,255,.16); }
.team-card__options {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    gap: 18px;
    padding: 18px;
    border-bottom: 1px solid #eee4e5;
}
.team-card__options .form-field { min-width: 220px; }
.team-card__checkbox { display: flex; align-items: center; gap: 8px; padding-bottom: 11px; font-size: .78rem; font-weight: 700; color: var(--color-ink); cursor: pointer; }
.team-card__checkbox input { width: 17px; height: 17px; }
.player-remove-button {
    justify-self: start;
    margin: 0 18px 16px;
    border: 1px solid #d7b8bc;
    border-radius: 7px;
    padding: 8px 12px;
    background: #fff6f7;
    color: #941726;
    font-size: .72rem;
    font-weight: 800;
    cursor: pointer;
    transition: background var(--transition), border-color var(--transition);
}
.player-remove-button:hover { background: #fbe6e9; border-color: #a51425; }
/* R01: optionaler Betreuungsblock als natives <details>, standardmäßig zu. */
.team-card__contact { margin: 0; padding: 0 18px 4px; border-top: 1px solid #eee4e5; }
.team-card__contact-summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; padding: 12px 0; font-size: .78rem; font-weight: 800; color: var(--color-ink); cursor: pointer; list-style: none; }
.team-card__contact-summary::-webkit-details-marker { display: none; }
.team-card__contact-summary::before { content: "▸"; display: inline-block; width: 1em; color: var(--color-bordeaux-700); transition: transform var(--transition); }
.team-card__contact[open] .team-card__contact-summary::before { transform: rotate(90deg); }
.team-card__contact-summary:focus-visible { outline: 3px solid var(--color-bordeaux-700); outline-offset: 2px; border-radius: 6px; }
.team-card__contact-hint { flex-basis: 100%; padding-left: 1.3em; font-size: .75rem; font-weight: 500; color: var(--color-muted); }
.team-card__contact[open] .team-card__contact-hint { display: none; }
.team-card__contact .optional { font-weight: 500; color: var(--color-muted); }
.team-card__contact-fields { border: 0; margin: 0; padding: 4px 0 14px; }
.team-card > [data-add-substitute] { margin: 0 18px 18px; }
.team-card .player-list { padding: 18px 18px 0; gap: 17px; }
.team-card .player-card { margin-bottom: 1px; }

/* -------------------------------------------------------------------------- */
/* Teilnehmerliste und Wertungszahl-Abgleich                                  */
/* -------------------------------------------------------------------------- */

.player-section__intro {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 25px;
}
.player-section__intro h2 { margin-bottom: 8px; font-size: 1.45rem; }
.player-section__intro p { max-width: 720px; margin: 0; color: var(--color-muted); font-size: .82rem; }
.player-count-badge { display: inline-flex; align-items: baseline; gap: 5px; border-radius: 99px; padding: 8px 13px; background: #ffe8e9; color: var(--color-bordeaux-700); font-size: .72rem; font-weight: 800; white-space: nowrap; }
.player-count-badge strong { font-size: 1rem; }

.player-list { display: grid; gap: 17px; }
.player-card {
    overflow: hidden;
    border: 1px solid #ded3d4;
    border-radius: 12px;
    background: #fffdfd;
    box-shadow: 0 8px 24px rgba(80, 8, 17, .045);
    transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.player-card:focus-within { border-color: var(--color-bordeaux-600); box-shadow: 0 12px 30px rgba(80,8,17,.11); transform: translateY(-1px); }
.player-card__heading { display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 18px; background: linear-gradient(100deg, var(--color-forest-950), var(--color-forest-900)); color: var(--color-white); font-size: .74rem; font-weight: 800; }
.player-card__heading > span:first-child { letter-spacing: .08em; text-transform: uppercase; }
.player-rating-state { color: #ffd9dc; font-size: .68rem; font-weight: 700; }
.player-rating-state a { color: var(--color-highlight); text-decoration: none; }
.player-rating-state a:hover { text-decoration: underline; }

.player-fields { display: grid; grid-template-columns: 1fr 1fr .7fr .8fr .9fr; gap: 14px; padding: 20px 18px; }
.player-rating-tools { display: flex; align-items: center; justify-content: space-between; gap: 20px; border-top: 1px solid #eee4e5; padding: 14px 18px; background: #faf6f6; }
.player-rating-tools strong { display: block; color: var(--color-forest-900); font-size: .78rem; }
.player-rating-tools p { margin: 2px 0 0; color: var(--color-muted); font-size: .68rem; }
.rating-lookup-button { flex: 0 0 auto; border: 1px solid var(--color-bordeaux-700); border-radius: 7px; padding: 8px 12px; cursor: pointer; background: transparent; color: var(--color-bordeaux-700); font-size: .72rem; font-weight: 850; transition: background var(--transition), color var(--transition), transform var(--transition); }
.rating-lookup-button:hover { background: var(--color-bordeaux-700); color: var(--color-white); transform: translateY(-1px); }
.rating-lookup-button:disabled { cursor: wait; opacity: .6; transform: none; }

.rating-results { display: grid; gap: 8px; border-top: 1px solid #eee4e5; padding: 15px 18px; background: #fff8e3; color: #594a28; font-size: .74rem; }
.rating-result { display: flex; align-items: center; justify-content: space-between; gap: 15px; border: 1px solid #eadcae; border-radius: 7px; padding: 9px 11px; cursor: pointer; background: var(--color-white); color: var(--color-ink); text-align: left; transition: border-color var(--transition), transform var(--transition); }
.rating-result:hover, .rating-result.is-highlighted { border-color: var(--color-bordeaux-700); transform: translateX(3px); }
.rating-result.is-highlighted { background: #fbf3ee; }
.rating-result span { color: var(--color-muted); font-size: .68rem; }
.player-rating-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 180px)); gap: 14px; border-top: 1px dashed #ded3d4; padding: 15px 18px 18px; background: #faf6f6; }
.player-rating-fields input[readonly] { background: #ede5e5; color: var(--color-muted); cursor: not-allowed; }
.player-rating-note { margin: 6px 18px 0; color: var(--color-muted); font-size: .7rem; }
.rating-source-note { margin: 18px 0 0; color: var(--color-muted); font-size: .7rem; }
.rating-source-note a { font-weight: 800; }
.rating-source-note a:not(.button) { color: var(--color-bordeaux-700); }

/* Schulsuche (Autocomplete) im Anmeldeformular und auf /schule-melden. */
.school-search { display: grid; gap: 10px; }
.school-search__results { display: grid; gap: 8px; }
.rating-results__empty { margin: 0; padding: 9px 11px; color: var(--color-muted); font-size: .74rem; }
.school-selected {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--color-forest-900);
    border-radius: 9px;
    padding: 12px 14px;
    background: #eef4ef;
    color: var(--color-forest-950);
    font-size: .82rem;
}
.school-selected span { color: var(--color-muted); font-size: .74rem; }
.school-not-found-toggle {
    justify-self: start;
    border: none;
    background: none;
    padding: 2px 0;
    color: var(--color-bordeaux-700);
    font-size: .76rem;
    font-weight: 800;
    text-decoration: underline;
    cursor: pointer;
}
.school-manual-fields {
    display: grid;
    gap: 14px;
    border: 1px dashed #ded3d4;
    border-radius: 10px;
    padding: 16px;
    background: #faf6f6;
}

/* Weitere bewegte Linkzustände: sichtbar, aber nicht verspielt. */
.tournament-card h3 a,
.tournament-card__footer a,
.prose a,
.site-footer a { transition: color var(--transition), transform var(--transition), text-decoration-color var(--transition); }
.tournament-card__footer a:not(.button):hover { color: var(--color-bordeaux-600); transform: translateX(4px); }
.prose a:not(.button):hover { color: var(--color-bordeaux-600); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.site-footer a:hover { color: var(--color-highlight); transform: translateX(3px); }

.success-section { min-height: 70vh; display: grid; place-items: center; }
.success-card { max-width: 750px; border-top: 7px solid var(--color-highlight); padding: clamp(35px, 7vw, 75px); background: var(--color-white); box-shadow: var(--shadow-card); text-align: center; }
.success-card__icon { display: grid; width: 80px; height: 80px; place-items: center; margin: 0 auto 25px; border-radius: 50%; background: var(--color-forest-900); color: var(--color-highlight); font-size: 2.1rem; font-weight: 900; }
.success-card h1 { margin-bottom: 22px; font-size: clamp(2.7rem, 6vw, 4.6rem); }
.success-card > p { color: var(--color-muted); }
.confirmation-code { display: inline-flex; flex-direction: column; margin: 22px 0; border: 2px dashed var(--color-forest-900); padding: 15px 28px; background: var(--color-cream); }
.confirmation-code span { color: var(--color-muted); font-size: 0.67rem; font-weight: 850; letter-spacing: 0.08em; text-transform: uppercase; }
.confirmation-code strong { color: var(--color-forest-900); font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: 1.6rem; letter-spacing: 0.08em; }
/* Fünf Einträge passen nicht in eine Zeile der Karte: sauber umbrechen statt
   die Beschriftungen mehrzeilig zu quetschen (V04-Fund 2026-10-03). */
.success-card__actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px 25px; margin-top: 30px; }
.success-card__actions .button, .success-card__actions .text-link { white-space: nowrap; }

/* -------------------------------------------------------------------------- */
/* Footer und Fehlerseiten                                                     */
/* -------------------------------------------------------------------------- */

.site-footer { background: #210509; color: #d7bcc0; }
.site-footer__grid { display: grid; grid-template-columns: 1.4fr 0.75fr 0.75fr 0.65fr; gap: 40px; padding-block: 65px 45px; }
.brand--footer .brand__mark { width: 42px; height: 42px; flex-basis: 42px; font-size: 1.5rem; }
.brand--footer .brand__text strong { color: var(--color-white); }
.site-footer__intro { max-width: 520px; margin: 24px 0 0; font-size: 0.82rem; }
.site-footer h2 { margin-bottom: 14px; color: var(--color-highlight); font-family: var(--font-sans); font-size: 0.72rem; font-weight: 900; letter-spacing: 0.09em; text-transform: uppercase; }
.site-footer ul { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; }
.site-footer li, .site-footer a { font-size: 0.78rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--color-white); }
.site-footer__bottom { display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid rgba(255,255,255,0.12); padding-block: 20px; font-size: 0.68rem; }

.error-page { min-height: 65vh; display: grid; place-items: center; }
.error-card { position: relative; max-width: 720px; padding: 55px; background: var(--color-white); box-shadow: var(--shadow-card); text-align: center; }
.error-card__code { position: absolute; top: 18px; left: 22px; color: var(--color-bordeaux-700); font-size: 0.72rem; font-weight: 950; letter-spacing: 0.12em; }
.error-card__piece { display: grid; width: 72px; height: 72px; place-items: center; margin: 0 auto; border-radius: 22px; background: var(--color-forest-900); color: var(--color-highlight); font-family: var(--font-display); font-size: 2.4rem; font-weight: 950; line-height: 1; }
.error-card h1 { margin: 22px 0 16px; font-size: clamp(2rem, 5vw, 3.5rem); }
.error-card p { color: var(--color-muted); }
.error-details { margin: 25px 0; text-align: left; }
.error-details pre { overflow: auto; max-width: 100%; border: 1px solid var(--color-line); padding: 12px; background: #f6f6f2; white-space: pre-wrap; }

/* -------------------------------------------------------------------------- */
/* Responsive Anpassungen                                                      */
/* -------------------------------------------------------------------------- */

@media (max-width: 1050px) {
    .main-nav__link { padding-inline: 11px; }
    .region-menu__grid { grid-template-columns: repeat(3, 1fr); }
    .quick-grid { grid-template-columns: repeat(2, 1fr); }
    .player-fields { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .stats-strip__grid { grid-template-columns: repeat(2, 1fr); }
    .stats-strip__grid > *:nth-child(3) { border-left: 1px solid var(--color-line); }
    .news-card { grid-template-columns: 1fr; }
    .news-grid--compact { grid-template-columns: repeat(2, 1fr); }
    .open-tournament-teaser-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 840px) {
    /* Ab hier klappt die Hauptnavigation zusammen, der Kopf wird flacher. */
    html { scroll-padding-top: 110px; }

    .container { width: min(calc(100% - 28px), var(--container)); }
    .menu-toggle { display: inline-flex; align-items: center; gap: 9px; border: 1px solid rgba(255,255,255,0.35); border-radius: var(--radius-sm); padding: 9px 12px; background: transparent; color: var(--color-white); cursor: pointer; font-size: 0.8rem; font-weight: 800; }
    .menu-toggle__bars, .menu-toggle__bars::before, .menu-toggle__bars::after { display: block; width: 18px; height: 2px; background: currentColor; content: ""; }
    .menu-toggle__bars { position: relative; }
    .menu-toggle__bars::before { position: absolute; top: -6px; }
    .menu-toggle__bars::after { position: absolute; top: 6px; }

    /* Die persistenten Desktop-Kopf-Buttons weichen im Mobilmenü den
       inhaltsgleichen .mobile-cta-Links (siehe .mobile-cta unten) -
       sonst erschienen beide Varianten doppelt. */
    .site-header__cta { display: none; }
    .site-header__nav-shell { border-top: 0; }
    .main-nav { position: absolute; top: 100%; left: 0; display: none; width: 100%; max-height: calc(100vh - 110px); overflow-y: auto; flex-direction: column; align-items: stretch; gap: 0; padding: 10px 14px 24px; background: var(--color-forest-950); }
    .main-nav.is-open { display: flex; }
    .main-nav__link { min-height: 52px; justify-content: space-between; border: 0; border-bottom: 1px solid rgba(255,255,255,0.13); padding: 0 9px; }
    .nav-dropdown { display: block; }
    .nav-dropdown__toggle { width: 100%; min-height: 52px; }
    .main-nav__link:hover, .main-nav__link.is-active { border-bottom-color: rgba(255,255,255,0.13); background: transparent; color: var(--color-highlight); }
    .mobile-cta { display: inline-flex; margin-top: 15px; }

    .nav-dropdown__panel { position: static; width: 100%; min-width: 0; border: 0; padding: 4px 9px 12px; background: rgba(255,255,255,0.05); color: var(--color-white); box-shadow: none; }
    .nav-dropdown__panel a { color: #d1ddd8; }
    .nav-dropdown__panel a:hover { background: rgba(255,255,255,0.08); color: var(--color-highlight); }

    .page-hero__inner { min-height: 320px; grid-template-columns: 1fr; align-content: end; gap: 20px; }
    .filter-panel { grid-template-columns: 1fr 1fr; margin-top: -70px; }
    .form-field--search { grid-column: 1 / -1; }
    .filter-panel .button { grid-column: 1 / -1; }
    .detail-hero { grid-template-columns: 1fr; }
    .kennzahlen { grid-template-columns: repeat(3, 1fr); max-width: none; }
    .date-block { display: none; }
    .detail-layout, .editorial-layout, .region-layout, .form-layout, .contact-grid { grid-template-columns: minmax(0, 1fr); }
    .detail-layout > *, .editorial-layout > *, .region-layout > *, .form-layout > * { min-width: 0; }
    .form-sidebar { position: static; }
    /* relative statt static: die Karte bleibt Bezugsrahmen für ihren Zierkreis (::before). */
    .action-card--sticky { position: relative; top: auto; }
    .region-info-card { max-width: none; }
    .news-grid { grid-template-columns: 1fr; }
    .news-card--large { grid-row: auto; }
    .news-grid--compact { grid-template-columns: 1fr; }
    .intro-panel { grid-template-columns: 1fr; }
    .site-footer__grid { grid-template-columns: 1fr 1fr; gap: 28px; }
    .open-tournament-teaser-grid { grid-template-columns: 1fr; }
    .meisterschaften-quicklinks { grid-template-columns: 1fr; }
    .organization-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
    h1 { font-size: clamp(2.5rem, 13vw, 4.2rem); }
    .site-header__main { min-height: 78px; }
    .brand__logo { width: 43px; height: 43px; flex-basis: 43px; border-radius: 12px; }
    .brand__text strong { font-size: 1.15rem; }
    .brand__text span { font-size: 0.55rem; }
    .menu-toggle span:last-child { display: none; }
    .region-menu__grid { grid-template-columns: 1fr; }
    .region-menu__topline { flex-direction: column; }
    .stats-strip__grid { grid-template-columns: 1fr 1fr; }
    .stats-strip__grid > * { min-height: 100px; padding: 16px; }
    .stats-strip__grid strong { font-size: 1.65rem; }
    .kennzahlen { grid-template-columns: 1fr 1fr; }
    .kennzahl strong { font-size: 1.5rem; }
    .quick-grid { grid-template-columns: 1fr; }
    .player-section__intro,
    .player-rating-tools { align-items: stretch; flex-direction: column; }
    .player-count-badge { align-self: flex-start; }
    .player-fields,
    .player-rating-fields { grid-template-columns: 1fr; }
    .player-card__heading { align-items: flex-start; flex-direction: column; gap: 4px; }
    .rating-result { align-items: flex-start; flex-direction: column; }
    .quick-card { min-height: 215px; }
    .section-heading--split, .results-heading { align-items: flex-start; flex-direction: column; }
    .tournament-card { grid-template-columns: 72px 1fr; }
    .tournament-card__date span { font-size: 1.65rem; }
    .tournament-card__body { padding: 18px 16px; }
    .tournament-card__meta { align-items: flex-start; flex-direction: column; gap: 7px; }
    .tournament-card__footer { align-items: flex-start; flex-direction: column; gap: 6px; }
    .news-card { grid-template-columns: 1fr; }
    .page-hero__inner { min-height: 290px; padding-block: 55px; }
    .filter-panel { grid-template-columns: 1fr; padding: 18px; }
    .form-field--search, .filter-panel .button { grid-column: auto; }
    .facts-grid { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .form-field--full, .form-field--wide { grid-column: auto; }
    .form-submit { align-items: stretch; flex-direction: column; }
    .success-card__actions { flex-direction: column; }
    .site-footer__grid { grid-template-columns: 1fr; }
    .site-footer__bottom { flex-direction: column; }
    .error-card { padding: 45px 22px; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    *, *::before, *::after { scroll-behavior: auto !important; transition-duration: 0.01ms !important; }
}

@media print {
    .site-header, .site-footer, .button, .form-sidebar { display: none !important; }
    body, .section, .section--cream { background: #fff; }
    .content-card, .registration-form { border: 1px solid #999; box-shadow: none; }
}

/* ========================================================================== */
/* News, Partner, Turnierarten und Abmeldung (Version 0.3)                    */
/* ========================================================================== */

.scope-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 24px;
}

/* Zwei getrennte Filterreihen halten räumlichen Bezug und Artikelart lesbar. */
.news-filter-panel {
    margin-bottom: 24px;
    border: 1px solid rgba(82, 11, 19, .11);
    border-radius: 18px;
    padding: 22px 24px 8px;
    background: rgba(255,255,255,.72);
}
.news-filter-panel > h2 { margin: 0 0 18px; font-size: 1.2rem; }
.news-filter-group { display: grid; grid-template-columns: 92px 1fr; align-items: start; gap: 14px; }
.news-filter-group > span { padding-top: 9px; color: var(--color-muted); font-size: .72rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.news-filter-group .scope-tabs { margin-bottom: 14px; }

.scope-tabs a {
    border: 1px solid rgba(82, 11, 19, .18);
    border-radius: 999px;
    color: var(--color-forest-900);
    font-weight: 800;
    padding: 9px 16px;
    text-decoration: none;
    transition: background .2s ease, color .2s ease, transform .2s ease;
}

.scope-tabs a:hover,
.scope-tabs a.is-active {
    background: var(--color-forest-900);
    color: #fff;
    transform: translateY(-2px);
}

.editorial-note,
.resource-callout {
    background: #fff;
    border: 1px solid rgba(82, 11, 19, .12);
    border-left: 5px solid var(--color-bordeaux-600);
    border-radius: 14px;
    box-shadow: 0 12px 32px rgba(50, 10, 15, .06);
    margin-bottom: 28px;
    padding: 20px 24px;
}

.resource-callout {
    align-items: center;
    display: flex;
    gap: 24px;
    justify-content: space-between;
    margin-top: 32px;
}

.resource-callout h2 { margin: 4px 0 6px; }
.resource-callout p { margin: 0; max-width: 720px; }

.news-list { display: grid; gap: 16px; }

.news-list-card {
    background: #fff;
    border: 1px solid rgba(82, 11, 19, .1);
    border-radius: 16px;
    display: grid;
    gap: 24px;
    grid-template-columns: 150px 1fr;
    padding: 25px;
    transition: box-shadow .2s ease, transform .2s ease;
}

.news-list-card:hover { box-shadow: 0 18px 44px rgba(50, 10, 15, .1); transform: translateY(-3px); }
.news-list-card__image { grid-column: 1 / -1; width: 100%; height: 200px; border-radius: 12px; object-fit: cover; }
.news-list-card h2 { font-size: clamp(1.25rem, 2vw, 1.65rem); margin: 5px 0 8px; }
.news-list-card p { margin: 0 0 12px; }
.news-list-card a { font-weight: 800; }
.news-list-card a:not(.button) { color: var(--color-bordeaux-600); }
.news-list-card__date { border-right: 1px solid rgba(82, 11, 19, .12); display: flex; flex-direction: column; gap: 7px; padding-right: 20px; }
.news-list-card__date time { color: var(--color-forest-900); font-weight: 900; }
.news-list-card__date span { color: var(--color-muted); font-size: .73rem; font-weight: 900; letter-spacing: .12em; }
.news-list-card__labels { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; }
.news-list-card__labels .eyebrow { margin: 0; }

.tournament-kind {
    background: rgba(82, 11, 19, .08);
    border-radius: 999px;
    color: var(--color-forest-900);
    font-size: .73rem;
    font-weight: 900;
    padding: 5px 9px;
    text-transform: uppercase;
}

.tournament-kind--cup { background: #fff0c9; color: #704b00; }
.tournament-kind--privat { background: #e7efff; color: #1e427c; }
.tournament-kind--sonstig { background: #e9f5ed; color: #275a39; }

.partner-section { background: #f7f2ed; border-top: 1px solid rgba(82, 11, 19, .08); padding: 44px 0; }
.partner-section__heading { align-items: end; display: flex; gap: 28px; justify-content: space-between; margin-bottom: 22px; }
.partner-section__heading h2 { margin: 4px 0 0; }
.partner-section__heading p { color: var(--color-muted); margin: 0; max-width: 600px; text-align: right; }
.partner-grid { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); }

/* Rückblick-Modus: Reichweiten-Pitch vor und Sponsoring-CTA nach der
   Partner-Logoreihe einer abgeschlossenen Turnierseite. */
.sponsor-pitch { margin: 0 0 22px; padding: 16px 20px; border-radius: var(--radius-lg); background: var(--color-cream); color: var(--color-ink); font-size: 0.92rem; }
.sponsor-cta { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px; margin-top: 24px; padding: 24px 26px; border-radius: var(--radius-lg); background: var(--color-forest-900); color: var(--color-white); }
.sponsor-cta strong { display: block; margin-bottom: 4px; font-family: var(--font-display); font-size: 1.15rem; }
.sponsor-cta p { margin: 0; max-width: 420px; color: #c9d8d2; font-size: 0.88rem; }

.partner-logo {
    align-items: center;
    background: #fff;
    border: 1px solid rgba(82, 11, 19, .1);
    border-radius: 14px;
    color: #202020;
    display: flex;
    font-size: 1.15rem;
    gap: 12px;
    justify-content: center;
    min-height: 92px;
    padding: 18px;
    text-decoration: none;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.partner-logo:hover { border-color: var(--color-bordeaux-600); box-shadow: 0 14px 30px rgba(50, 10, 15, .1); transform: translateY(-4px); }
.partner-logo__icon { font-size: 2.1rem; }
/*
 * Echte Partnerlogos behalten ihr Seitenverhältnis. Die feste Höhe sorgt
 * dafür, dass unterschiedlich große Quelldateien in den Karten ruhig wirken.
 */
.partner-logo__image {
    display: block;
    flex: 0 0 auto;
    height: 56px;
    max-width: 72px;
    object-fit: contain;
    width: auto;
}
.partner-logo--lichess { font-family: Georgia, serif; }
.partner-logo__db { border: 3px solid #ec0016; border-radius: 4px; color: #ec0016; font: 900 1.35rem/1 Arial, sans-serif; padding: 5px 7px; }
.partner-logo--niggemann { color: #5f151c; }

.withdrawal-shell { display: grid; justify-content: center; }
.form-card { background: #fff; border: 1px solid rgba(82, 11, 19, .1); border-radius: 18px; box-shadow: 0 18px 50px rgba(50, 10, 15, .08); }
.button--outline { background: transparent; border: 1px solid var(--color-forest-900); color: var(--color-forest-900); }
.button--outline:hover { background: var(--color-forest-900); color: #fff; }
.withdrawal-form { max-width: 680px; padding: clamp(24px, 4vw, 42px); width: min(680px, 100%); }
.form-help-links { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 18px; }
.form-help-links a { font-size: .82rem; font-weight: 800; text-underline-offset: 4px; }
.form-help-links a:not(.button) { color: var(--color-bordeaux-700); }
.form-help-links a:not(.button):hover { color: var(--color-bordeaux-600); text-decoration-thickness: 2px; }
.withdrawal-form h2 { margin: 6px 0 22px; }
.withdrawal-form .form-field { margin-bottom: 18px; }
.withdrawal-form hr { margin: 22px 0; border: 0; border-top: 1px solid var(--color-line); }
.withdrawal-form legend { font-weight: 800; margin-bottom: 8px; padding: 0; }

/* ========================================================================== */
/* Turniercockpit und Mannschaftsselbstverwaltung (Version 0.5)               */
/* ========================================================================== */

.detail-status-row {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 18px;
}

.detail-status-row > span:last-child {
    color: #f4ccd1;
    font-size: .78rem;
    font-weight: 850;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.verified-note {
    display: block;
    margin-top: 18px;
    color: #e8c8cc;
    font-weight: 750;
}

.cockpit-nav {
    position: sticky;
    z-index: 80;
    top: 0;
    border-bottom: 1px solid rgba(82, 11, 19, .12);
    background: rgba(255, 250, 250, .96);
    box-shadow: 0 8px 24px rgba(50, 10, 15, .06);
    backdrop-filter: blur(12px);
}

.cockpit-nav .container {
    display: flex;
    min-height: 54px;
    align-items: center;
    gap: 8px;
    overflow-x: auto;
    scrollbar-width: thin;
}

.cockpit-nav a {
    flex: 0 0 auto;
    border-radius: 999px;
    padding: 8px 13px;
    color: var(--color-forest-900);
    font-size: .82rem;
    font-weight: 850;
    text-decoration: none;
}

.cockpit-nav a:hover,
.cockpit-nav a:focus-visible { background: rgba(82, 11, 19, .08); }

.tournament-cockpit {
    display: grid;
    gap: 24px;
    min-width: 0;
}
.tournament-cockpit .content-card { min-width: 0; }

/* scroll-margin-top hier entfernt: der Abstand kommt jetzt global aus
   scroll-padding-top am html-Element (siehe oben). Beides zusammen hätte
   das Sprungziel 228px unter den Kopf geschoben. */
.tournament-cockpit h3 { margin: 30px 0 8px; font-size: 1.2rem; }

/* Die öffentliche Meldeliste wirkt wie eine Ranglistentafel, sortiert die
   Schulen aber bewusst neutral alphabetisch statt nach Spielstärke. */
.public-registration-card { overflow: hidden; }
.section-heading--compact { align-items: end; margin-bottom: 20px; }
.section-heading--compact h2 { margin-bottom: 0; }
.public-registration-count {
    flex: 0 0 auto;
    border: 1px solid rgba(82, 11, 19, .12);
    border-radius: 999px;
    padding: 7px 11px;
    background: var(--color-paper);
    color: var(--color-bordeaux-700);
    font-size: .76rem;
    font-weight: 900;
}
.public-registration-table-wrap { overflow-x: auto; border: 1px solid var(--color-line); border-radius: 14px; }
.public-registration-table { width: 100%; border-collapse: collapse; }
.public-registration-table th,
.public-registration-table td { padding: 15px 18px; text-align: left; }
.public-registration-table thead { background: var(--color-forest-900); color: #fff; }
.public-registration-table th { font-size: .72rem; letter-spacing: .09em; text-transform: uppercase; }
.public-registration-table th:last-child,
.public-registration-table td:last-child { width: 120px; text-align: right; }
.public-registration-table tbody tr + tr { border-top: 1px solid var(--color-line); }
.public-registration-table tbody tr { transition: background var(--transition); }
.public-registration-table tbody tr:hover { background: #fff8ed; }
.public-registration-table th:first-child,
.public-registration-table td:first-child { width: 56px; color: var(--color-muted); font-weight: 700; }
.public-registration-table td:nth-child(2) { color: var(--color-ink); font-weight: 800; }

.public-registration-groups { display: grid; gap: 14px; }
.public-registration-group { border: 1px solid var(--color-line); border-radius: 14px; overflow: hidden; }
.public-registration-group summary {
    display: flex;
    align-items: baseline;
    gap: 10px;
    padding: 15px 18px;
    cursor: pointer;
    list-style: none;
    background: var(--color-paper);
}
.public-registration-group summary::-webkit-details-marker { display: none; }
.public-registration-group summary:hover { background: #fff8ed; }
.public-registration-group summary strong { font-family: var(--font-display); font-size: 1.15rem; color: var(--color-forest-900); }
.public-registration-group summary span { color: var(--color-muted); font-weight: 700; font-size: .86rem; }
.public-registration-group[open] summary { border-bottom: 1px solid var(--color-line); }
.public-registration-group .public-registration-table-wrap { border: 0; border-radius: 0; }
.public-registration-table td:last-child strong {
    display: inline-grid;
    min-width: 62px;
    place-items: center;
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(82, 11, 19, .08);
    color: var(--color-bordeaux-700);
}
.public-registration-note { margin: 16px 0 0; color: var(--color-muted); font-size: .82rem; line-height: 1.65; }
.public-registration-empty { border: 1px dashed rgba(82, 11, 19, .2); border-radius: 14px; padding: 22px; background: var(--color-paper); }
.public-registration-empty p { margin: 5px 0 0; color: var(--color-muted); }

.action-card--sticky {
    position: sticky;
    top: 78px;
    align-self: start;
}

.cockpit-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
    margin-top: 30px;
}

/* Turnier-Downloads nutzen dieselbe Button-Optik wie das Ergebnisarchiv
   (.result-link-grid), nur mit einer zusätzlichen Kategoriezeile, weil hier
   mehrere unterschiedliche Ressourcenarten gemischt auftreten. */
.result-link-grid a > span { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.result-link-grid a > span > small { color: inherit; opacity: .68; font-size: .68rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }

.tournament-report { border-top: 1px solid var(--color-line); padding-top: 22px; margin-top: 22px; }
.tournament-report:first-of-type { border-top: 0; padding-top: 0; margin-top: 18px; }
.tournament-report__image { width: 100%; height: 220px; margin-bottom: 16px; border-radius: 12px; object-fit: cover; }
.tournament-report__date { display: block; margin-bottom: 6px; color: var(--color-muted); font-size: .78rem; font-weight: 800; }
.tournament-report h3 { margin: 0 0 8px; }
.tournament-report > p { margin: 0 0 16px; }

.photo-gallery { display: grid; gap: 14px; grid-auto-flow: dense; grid-auto-rows: minmax(160px, auto); grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); }
.photo-gallery figure { margin: 0; }
.photo-gallery img { width: 100%; height: 160px; border-radius: 12px; object-fit: cover; }
.photo-gallery figcaption { margin-top: 7px; color: var(--color-muted); font-size: .78rem; }
/* Das erste Foto (niedrigster sort_order) wirkt als Aufmacher größer -
   grid-auto-rows/dense sorgen dafür, dass der Zeilenspan zu den Nachbarn
   passt (siehe Stellungnahme zum Foto-Requirements-Dokument). */
.photo-gallery figure:first-child { position: relative; grid-column: span 2; grid-row: span 2; }
.photo-gallery figure:first-child img { height: 100%; min-height: 334px; }
/* Der Aufmacher hat keine eigene Zeile für seine Bildunterschrift übrig (er
   füllt die volle Höhe des 2x2-Zeilenspans) - die Unterschrift läge sonst,
   je nach Länge, unter den nächsten Kacheln verdeckt. Als Scrim-Overlay
   über dem Foto braucht sie keinen zusätzlichen Platz im Grid. */
.photo-gallery figure:first-child figcaption { position: absolute; z-index: 1; right: 0; bottom: 0; left: 0; margin: 0; padding: 34px 16px 14px; background: linear-gradient(180deg, transparent, rgba(16,6,8,.82)); color: var(--color-white); font-size: .82rem; }
.edit-registration-facts { margin-bottom: 0; }

@media (max-width: 780px) {
    .resource-callout,
    .partner-section__heading { align-items: flex-start; flex-direction: column; }
    .partner-section__heading p { text-align: left; }
    .partner-grid { grid-template-columns: 1fr; }
    .news-list-card { grid-template-columns: 1fr; }
    .news-list-card__date { border-bottom: 1px solid rgba(82, 11, 19, .12); border-right: 0; padding: 0 0 12px; }
    .news-filter-group { grid-template-columns: 1fr; gap: 2px; }
    .cockpit-nav .container { width: 100%; padding-inline: 20px; }
    .action-card--sticky { position: relative; top: auto; }
    .section-heading--compact { align-items: flex-start; flex-direction: column; }
    .public-registration-table th,
    .public-registration-table td { padding: 13px 14px; }
    .cockpit-actions { align-items: stretch; flex-direction: column; }
}

/* ========================================================================== */
/* Signal-Design, externer Kalender und Ergebnisarchiv (Version 0.7)          */
/* ========================================================================== */
/*
 * Die neue Optik verzichtet bewusst auf dekorative Schachbretter. Ein feines
 * Linienraster, klare Statusfarben und grosse Typografie wirken technisch und
 * modern, ohne die Lesbarkeit fuer Schulen und Turnierleitungen zu opfern.
 */
.site-header {
    position: sticky;
    top: 0;
    background: linear-gradient(120deg, rgba(16,6,8,.98), rgba(67,5,17,.97));
    box-shadow: 0 12px 38px rgba(16,6,8,.2);
    backdrop-filter: blur(18px);
}
.site-header__main { min-height: 84px; }
.site-header__nav-shell { background: rgba(255,255,255,.025); }
.main-nav { min-height: 53px; }
.main-nav__link { padding-inline: 14px; font-size: .82rem; letter-spacing: .01em; }
.brand__text strong { font-weight: 820; }
.brand__text span { color: rgba(255,255,255,.64); }

.stats-strip__grid > *,
.quick-card,
.tournament-card,
.news-card,
.content-card { transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition), background var(--transition); }
.quick-grid { overflow: hidden; border: 0; border-radius: var(--radius-lg); box-shadow: var(--shadow-card); }
.quick-card { min-height: 230px; border-color: #e4e2de; }
.quick-card:hover { background: linear-gradient(145deg, #24080e, #650817); box-shadow: 0 24px 55px rgba(36,5,11,.2); }
.quick-card__icon { border-radius: 16px; background: linear-gradient(135deg, var(--color-highlight), var(--color-signal)); font-size: 1rem; font-weight: 950; }
.tournament-card { border-color: rgba(49,8,17,.11); }
.tournament-card__date { background: linear-gradient(160deg, #17070a, #650817); }

.news-card { border: 1px solid rgba(255,255,255,.12); border-radius: 22px; }
.news-card:hover { transform: translateY(-5px); box-shadow: 0 28px 60px rgba(0,0,0,.28); }
.news-card__visual { background: linear-gradient(145deg, #d5071b, #510713); }
.news-card__visual::before { opacity: .48; background-image: linear-gradient(rgba(255,255,255,.12) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.12) 1px, transparent 1px); background-size: 31px 31px; }
.visual-pattern--1::before { background-image: radial-gradient(circle at center, rgba(221,255,92,.72) 0 3px, transparent 4px); background-size: 30px 30px; }
.visual-pattern--2 { background: linear-gradient(145deg, #0f6a52, #083d34); }
.visual-pattern--2::before { background-image: linear-gradient(135deg, rgba(255,255,255,.15) 12.5%, transparent 12.5% 50%, rgba(255,255,255,.15) 50% 62.5%, transparent 62.5%); background-size: 42px 42px; }
.visual-pattern--3 { background: linear-gradient(145deg, #223d70, #171b3b); }
.visual-pattern--3::before { background-image: radial-gradient(circle, rgba(255,255,255,.2) 0 2px, transparent 2.5px); background-size: 24px 24px; }
.news-card__visual > span { font-size: clamp(3.4rem, 8vw, 6rem); font-weight: 900; letter-spacing: -.08em; text-shadow: none; }

.page-hero,
.article-hero {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(circle at 82% 30%, rgba(27,216,143,.15), transparent 28%),
        linear-gradient(125deg, #130609, #570916 70%, #24070d);
    color: #fff;
}
.page-hero::after,
.article-hero::after { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 42px 42px; content: ""; pointer-events: none; }
.page-hero__inner,
.article-hero__inner { position: relative; z-index: 1; }
.page-hero--calendar { background: linear-gradient(125deg, #081b17, #0a5b47 66%, #10211d); }
.page-hero--results { background: linear-gradient(125deg, #14070a, #750c1c 66%, #26080e); }

.scope-tabs a { border-color: rgba(49,8,17,.16); background: rgba(255,255,255,.7); }
.scope-tabs a:hover,
.scope-tabs a.is-active { background: #1b080c; box-shadow: 0 9px 22px rgba(36,5,11,.16); }

/* Externer Kalender --------------------------------------------------------- */
.external-calendar-notice { display: flex; align-items: center; gap: 20px; margin-bottom: 28px; border: 1px solid rgba(12,94,72,.16); border-radius: 18px; padding: 20px 24px; background: #eaf8f3; }
.external-calendar-notice > span { flex: 0 0 auto; border-radius: 999px; padding: 7px 10px; background: #0d634c; color: #fff; font-size: .65rem; font-weight: 950; letter-spacing: .12em; }
.external-calendar-notice p { margin: 3px 0 0; color: #47615a; font-size: .82rem; }
.external-event-list { display: grid; gap: 15px; }
.external-event-card { display: grid; grid-template-columns: 130px minmax(0,1fr) 230px; align-items: stretch; overflow: hidden; border: 1px solid rgba(49,8,17,.1); border-radius: 22px; background: #fff; box-shadow: 0 12px 36px rgba(36,5,11,.055); transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition); }
.external-event-card:hover { transform: translateY(-4px); border-color: rgba(13,99,76,.4); box-shadow: 0 24px 56px rgba(36,5,11,.1); }
/* Ohne Datum entfällt die erste Spalte; Karte, Aktion rutschen zusammen. */
.external-event-card--no-date { grid-template-columns: minmax(0,1fr) 230px; }
.external-event-card__date { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; padding: 22px 16px; background: linear-gradient(155deg, #09241d, #0d634c); color: #fff; text-align: center; }
.external-event-card__date time { display: grid; }
.external-event-card__date strong { font-size: 2.7rem; line-height: 1; }
.external-event-card__date span { color: var(--color-highlight); font-size: .72rem; font-weight: 900; letter-spacing: .14em; }
.external-event-card__date small { color: rgba(255,255,255,.7); font-size: .65rem; }
.external-event-card__body { padding: 24px 27px; }
.external-event-card__meta { display: flex; flex-wrap: wrap; gap: 8px; }
.external-event-card__meta span { border-radius: 999px; padding: 4px 8px; background: #eff3f0; color: #36554c; font-size: .67rem; font-weight: 850; }
.external-event-card h2 { margin: 13px 0 8px; font-size: clamp(1.25rem,2vw,1.65rem); }
.external-event-card__body > p { margin-bottom: 16px; color: var(--color-muted); font-size: .84rem; }
.external-event-card dl { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0; }
.external-event-card dl div { min-width: 0; }
.external-event-card dt { color: var(--color-muted); font-size: .63rem; font-weight: 900; letter-spacing: .07em; text-transform: uppercase; }
.external-event-card dd { margin: 2px 0 0; font-size: .74rem; font-weight: 700; }
.external-event-card__actions { display: flex; flex-direction: column; justify-content: center; gap: 10px; border-left: 1px solid #ece9e6; padding: 22px; background: #fafaf7; }
.external-event-card__actions > a:not(.button) { color: var(--color-bordeaux-700); font-size: .72rem; font-weight: 800; }
.external-event-card__actions small { color: var(--color-muted); font-size: .65rem; }
.calendar-source-heading { margin-top: 65px; }
.calendar-source-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.calendar-source-grid a { display: flex; min-height: 220px; flex-direction: column; border: 1px solid rgba(49,8,17,.11); border-radius: 20px; padding: 23px; background: #fff; text-decoration: none; transition: transform var(--transition), box-shadow var(--transition), background var(--transition), color var(--transition); }
.calendar-source-grid a:hover { transform: translateY(-5px); background: #19080c; color: #fff; box-shadow: 0 24px 50px rgba(36,5,11,.18); }
.calendar-source-grid span { color: var(--color-bordeaux-700); font-size: .65rem; font-weight: 950; letter-spacing: .12em; text-transform: uppercase; }
.calendar-source-grid strong { margin: 12px 0; font-size: 1.12rem; }
.calendar-source-grid p { color: var(--color-muted); font-size: .78rem; }
.calendar-source-grid a:hover p { color: rgba(255,255,255,.68); }
.calendar-source-grid small { margin-top: auto; color: var(--color-bordeaux-700); font-weight: 850; }

/* Ergebnisarchiv ------------------------------------------------------------ */
.result-archive { display: grid; gap: 25px; }
.result-year-card { overflow: hidden; border: 1px solid rgba(49,8,17,.11); border-radius: 25px; background: #fff; box-shadow: var(--shadow-card); }
.result-year-card > header { display: grid; grid-template-columns: minmax(0,1fr) 170px; gap: 30px; padding: clamp(25px,4vw,42px); background: linear-gradient(130deg, #fff, #f8f6f4); }
.result-year-card h2 { margin: 5px 0 10px; font-size: clamp(1.65rem,3vw,2.6rem); }
.result-year-card header p { max-width: 760px; margin: 0; color: var(--color-muted); }
.result-year-card__meta { display: grid; align-content: center; border-left: 1px solid #e6e1de; padding-left: 30px; }
.result-year-card__meta strong { color: var(--color-bordeaux-700); font-size: 3rem; line-height: 1; }
.result-year-card__meta span { font-size: .72rem; font-weight: 900; text-transform: uppercase; }
.result-year-card__meta small { margin-top: 10px; color: var(--color-muted); font-size: .66rem; }
/*
 * Jede Ergebnisliste ist eine eigenständige Aktionsfläche. Abstand,
 * Rahmen und Schatten machen deutlicher, dass die Karten anklickbar sind.
 */
.result-link-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    padding: 20px;
    background: #f4f0ed;
}
.result-link-grid a {
    position: relative;
    display: flex;
    min-height: 96px;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    border: 2px solid rgba(82, 11, 19, .16);
    border-radius: 16px;
    padding: 20px 18px 20px 22px;
    background: linear-gradient(145deg, #fff, #fbf8f5);
    box-shadow: 0 7px 18px rgba(36, 5, 11, .08);
    color: var(--color-ink);
    text-decoration: none;
    transition: background var(--transition), border-color var(--transition), box-shadow var(--transition), color var(--transition), transform var(--transition);
}
/* Der Pfeil ist nur ein visueller Hinweis; der Linktext bleibt die WK-Bezeichnung. */
.result-link-grid a::after {
    content: "↗";
    display: grid;
    flex: 0 0 40px;
    width: 40px;
    height: 40px;
    place-items: center;
    border-radius: 12px;
    background: var(--color-signal);
    color: #fff;
    font-size: 1.05rem;
    font-weight: 900;
    transition: background var(--transition), color var(--transition), transform var(--transition);
}
.result-link-grid a:hover { border-color: var(--color-bordeaux-700); background: #1b080c; box-shadow: 0 14px 28px rgba(36, 5, 11, .2); color: #fff; transform: translateY(-3px); }
.result-link-grid a:hover::after { background: var(--color-highlight); color: var(--color-forest-950); transform: translate(2px, -2px); }
.result-link-grid a:focus-visible { outline-offset: 4px; }
.result-link-grid strong { font-size: 1rem; line-height: 1.3; }
.result-year-card > footer { padding: 16px 24px; background: #f8f7f4; }
.result-year-card > footer a { font-size: .76rem; font-weight: 850; }
.result-year-card > footer a:not(.button) { color: var(--color-bordeaux-700); }

/* Interne News-Detailseite -------------------------------------------------- */
.article-hero__inner { max-width: 940px; padding-block: clamp(70px,9vw,120px); }
.article-hero__inner > a { color: var(--color-highlight); font-size: .78rem; font-weight: 850; text-decoration: none; }
.article-hero__meta { display: flex; gap: 15px; margin: 45px 0 15px; color: rgba(255,255,255,.7); font-size: .72rem; font-weight: 850; text-transform: uppercase; }
.article-hero__meta span { color: var(--color-highlight); }
.article-hero h1 { margin-bottom: 24px; color: #fff; font-size: clamp(2.5rem,6vw,5.4rem); }
.article-hero p { max-width: 810px; margin: 0; color: rgba(255,255,255,.76); font-size: clamp(1.05rem,2vw,1.28rem); }
.article-layout { display: grid; grid-template-columns: minmax(0,760px) 300px; justify-content: space-between; gap: 60px; padding-block: clamp(60px,8vw,105px); }
.article-image { width: 100%; height: clamp(220px, 32vw, 420px); margin-bottom: 30px; border-radius: 16px; object-fit: cover; }
.article-body p { color: #363333; font-size: clamp(1.04rem,1.4vw,1.16rem); line-height: 1.85; }
.article-body p + p { margin-top: 27px; }
.article-source { position: sticky; top: 165px; align-self: start; border-top: 4px solid var(--color-signal); border-radius: 0 0 16px 16px; padding: 22px; background: #fff; box-shadow: 0 16px 40px rgba(36,5,11,.09); }
.article-source > span { color: #0d634c; font-size: .66rem; font-weight: 950; letter-spacing: .1em; text-transform: uppercase; }
.article-source p { margin: 10px 0 15px; color: var(--color-muted); font-size: .78rem; }
.article-source a { font-size: .74rem; font-weight: 850; }
.article-source a:not(.button) { color: var(--color-bordeaux-700); }

.partner-logo__icon { display: grid; width: 48px; height: 48px; place-items: center; border-radius: 14px; background: #16080b; color: #fff; font: 900 .85rem/1 var(--font-sans); }
.site-footer { background: #0f0608; }
.brand--footer .brand__logo { width: 44px; height: 44px; flex-basis: 44px; border-radius: 12px; }

@media (max-width: 1060px) {
    .main-nav__link { padding-inline: 9px; font-size: .76rem; }
    .external-event-card { grid-template-columns: 105px minmax(0,1fr); }
    .external-event-card__actions { grid-column: 2; border-top: 1px solid #ece9e6; border-left: 0; }
    .external-event-card--no-date { grid-template-columns: 1fr; }
    .external-event-card--no-date .external-event-card__actions { grid-column: 1; }
    .calendar-source-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 840px) {
    .site-header { position: relative; }
    .external-event-card { grid-template-columns: 92px minmax(0,1fr); }
    .external-event-card--no-date { grid-template-columns: 1fr; }
    .article-layout { grid-template-columns: 1fr; }
    .article-source { position: static; }
}

@media (max-width: 620px) {
    .external-calendar-notice { align-items: flex-start; flex-direction: column; }
    .external-event-card { grid-template-columns: 1fr; }
    .external-event-card__date { align-items: center; flex-direction: row; justify-content: space-between; padding: 15px 20px; }
    .external-event-card__date time { display: flex; align-items: baseline; gap: 8px; }
    .external-event-card__date strong { font-size: 2rem; }
    .external-event-card__actions { grid-column: 1; }
    .external-event-card dl { grid-template-columns: 1fr; }
    .calendar-source-grid,
    .result-link-grid { grid-template-columns: 1fr; }
    .photo-gallery { grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); }
    .photo-gallery figure:first-child { grid-column: auto; grid-row: auto; min-height: 0; }
    .result-year-card > header { grid-template-columns: 1fr; }
    .result-year-card__meta { border-top: 1px solid #e6e1de; border-left: 0; padding-top: 20px; padding-left: 0; }
}

/* ============================================================================
   Statistiksektion (/statistik) - siehe app/Controllers/StatisticsController.
   Eigener, klar abgegrenzter Block, damit spätere Änderungen an dieser
   Sektion nicht in den bestehenden Regeln oben suchen müssen.
   ============================================================================ */
.stat-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 28px 0 40px; }
.stat-tile { padding: 18px 20px; border: 1px solid var(--color-line); border-radius: var(--radius-md); background: var(--color-white); box-shadow: var(--shadow-card); }
.stat-tile strong { display: block; color: var(--color-forest-900); font-family: var(--font-display); font-size: 2.1rem; line-height: 1.1; }
.stat-tile span { display: block; margin-top: 6px; color: var(--color-muted); font-size: 0.82rem; font-weight: 750; }

.stat-panel { margin-bottom: 46px; }
.stat-panel__note { color: var(--color-muted); font-size: 0.88rem; margin-top: -18px; margin-bottom: 22px; max-width: 62ch; }

.stat-bar-chart { display: flex; align-items: flex-end; gap: clamp(6px, 1.4vw, 16px); height: 230px; padding: 24px 6px 0; border-bottom: 1px solid var(--color-line); overflow-x: auto; }
.stat-bar-chart__col { flex: 1 0 auto; min-width: 34px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; }
.stat-bar-chart__bar-stack { width: 100%; max-width: 46px; display: flex; flex-direction: column-reverse; justify-content: flex-start; flex: 1; }
.stat-bar-chart__bar { width: 100%; background: var(--color-forest-900); border-radius: 6px 6px 0 0; min-height: 3px; }
/* Feste 5%-Schritte statt style="height: ...%" - Balkenhöhe darf wegen der
   CSP (style-src 'self') nicht per Inline-Style gesetzt werden, siehe
   stat_bar_height_class() in app/Support/helpers.php. */
.stat-bar-chart__bar--h0 { height: 0%; }
.stat-bar-chart__bar--h5 { height: 5%; }
.stat-bar-chart__bar--h10 { height: 10%; }
.stat-bar-chart__bar--h15 { height: 15%; }
.stat-bar-chart__bar--h20 { height: 20%; }
.stat-bar-chart__bar--h25 { height: 25%; }
.stat-bar-chart__bar--h30 { height: 30%; }
.stat-bar-chart__bar--h35 { height: 35%; }
.stat-bar-chart__bar--h40 { height: 40%; }
.stat-bar-chart__bar--h45 { height: 45%; }
.stat-bar-chart__bar--h50 { height: 50%; }
.stat-bar-chart__bar--h55 { height: 55%; }
.stat-bar-chart__bar--h60 { height: 60%; }
.stat-bar-chart__bar--h65 { height: 65%; }
.stat-bar-chart__bar--h70 { height: 70%; }
.stat-bar-chart__bar--h75 { height: 75%; }
.stat-bar-chart__bar--h80 { height: 80%; }
.stat-bar-chart__bar--h85 { height: 85%; }
.stat-bar-chart__bar--h90 { height: 90%; }
.stat-bar-chart__bar--h95 { height: 95%; }
.stat-bar-chart__bar--h100 { height: 100%; }
.stat-bar-chart__bar--secondary { background: var(--color-bordeaux-700); border-radius: 0; }
.stat-bar-chart__bar--secondary:first-child { border-radius: 6px 6px 0 0; }
.stat-bar-chart__value { font-weight: 800; font-size: 0.78rem; color: var(--color-ink); margin-bottom: 4px; white-space: nowrap; }
.stat-bar-chart__label { margin-top: 10px; font-size: 0.74rem; color: var(--color-muted); font-weight: 700; }
.stat-bar-chart__legend { display: flex; gap: 18px; margin-top: 14px; font-size: 0.8rem; color: var(--color-muted); font-weight: 700; }
.stat-bar-chart__legend span { display: inline-flex; align-items: center; gap: 7px; }
.stat-bar-chart__swatch { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.stat-bar-chart__swatch--primary { background: var(--color-forest-900); }
.stat-bar-chart__swatch--secondary { background: var(--color-bordeaux-700); }

.stat-wk-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.stat-wk-tabs .button { min-height: 40px; padding: 8px 18px; }
.stat-table-wrap { overflow-x: auto; border: 1px solid var(--color-line); border-radius: var(--radius-md); background: var(--color-white); }
.stat-table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.stat-table th, .stat-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--color-line); }
.stat-table th { color: var(--color-muted); font-size: 0.76rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 800; }
.stat-table tbody tr:last-child td { border-bottom: none; }
.stat-table tbody tr:hover { background: var(--color-cream); }
.stat-table td a { color: var(--color-forest-900); font-weight: 700; text-decoration: none; }
.stat-table td a:hover { text-decoration: underline; }
.stat-table__rank { color: var(--color-muted); font-weight: 800; width: 2.4em; }

.stat-history-list { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.stat-history-list li { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; padding: 14px 18px; border: 1px solid var(--color-line); border-radius: var(--radius-sm); background: var(--color-white); }
.stat-history-list strong { font-family: var(--font-display); font-size: 1.15rem; color: var(--color-forest-900); }
.stat-history-list span { color: var(--color-muted); font-size: 0.85rem; font-weight: 650; }

.stat-roster-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); }
.stat-roster-card { border: 1px solid var(--color-line); border-radius: var(--radius-md); background: var(--color-white); box-shadow: var(--shadow-card); overflow: hidden; }
.stat-roster-card > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 18px; background: var(--color-cream); }
.stat-roster-card table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.stat-roster-card th, .stat-roster-card td { padding: 8px 14px; text-align: left; border-top: 1px solid var(--color-line); }
.stat-roster-card th { color: var(--color-muted); font-weight: 800; font-size: 0.72rem; text-transform: uppercase; }

.stat-toggle-hint { border: 1px dashed rgba(49,8,17,.25); border-radius: var(--radius-md); padding: 20px 24px; background: var(--color-white); color: var(--color-muted); font-size: 0.9rem; }

/* Mehrfachmannschaften (2./3. Mannschaft derselben Schule im selben
   Wettbewerb) auf der Schulseite - siehe App\Support\Statistics\
   TeamEntryGrouping. */
.stat-history-list__teams { list-style: none; margin: 8px 0 0; padding: 0; width: 100%; display: grid; gap: 6px; }
.stat-history-list__teams li { display: flex; flex-wrap: wrap; gap: 10px; padding: 8px 14px; background: var(--color-cream); border-radius: var(--radius-sm); font-size: 0.85rem; color: var(--color-ink); }
.stat-history-list__teams li span:first-child { font-weight: 700; }

/* Lieblings-/Angstgegner (templates/partials/stat-h2h-table.php). */
.stat-rival-callouts { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 22px; }
.stat-rival-callout { padding: 16px 20px; border-radius: var(--radius-md); background: var(--color-white); border: 1px solid var(--color-line); box-shadow: var(--shadow-card); }
.stat-rival-callout strong { display: block; font-family: var(--font-display); font-size: 1.2rem; color: var(--color-forest-900); margin: 4px 0; }
.stat-rival-callout strong a { color: inherit; text-decoration: none; }
.stat-rival-callout strong a:hover { text-decoration: underline; }
.stat-rival-callout span { color: var(--color-muted); font-size: 0.85rem; font-weight: 650; }
.stat-rival-callout--favorite { border-left: 4px solid var(--color-forest-900); }
.stat-rival-callout--nemesis { border-left: 4px solid var(--color-bordeaux-700); }

/* Durchsuchbare Schulen-Übersicht (/statistik/schulen). */
.stat-school-index__search { margin-bottom: 24px; display: flex; flex-direction: column; gap: 6px; max-width: 480px; }
.stat-school-index__search label { font-weight: 750; font-size: 0.85rem; color: var(--color-muted); }
.stat-school-index__search input { padding: 10px 14px; border: 1px solid var(--color-line); border-radius: var(--radius-sm); font-size: 0.95rem; font-family: inherit; }
.stat-school-index__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.stat-school-index__item { border: 1px solid var(--color-line); border-radius: var(--radius-sm); background: var(--color-white); }
.stat-school-index__item a { display: flex; flex-wrap: wrap; align-items: baseline; gap: 10px; padding: 12px 16px; text-decoration: none; color: var(--color-ink); }
.stat-school-index__item strong { color: var(--color-forest-900); }
.stat-school-index__item span { color: var(--color-muted); font-size: 0.85rem; }

@media (max-width: 620px) {
    .stat-bar-chart { height: 190px; }
    .stat-tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

/* ========================================================================== */
/* R10/R11: Kreisseiten-Rückblick und externe Kreismeisterschaften            */
/* ========================================================================== */
.region-archive__heading { margin-top: 44px; }
.region-archive__empty, .region-archive__note { color: var(--color-muted); font-size: .9rem; }
.region-archive__year { margin-top: 18px; }
.region-archive__year h3 { margin: 0 0 10px; padding-bottom: 6px; border-bottom: 2px solid var(--color-line); font-size: 1.25rem; }
.region-archive__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.region-archive__item { border: 1px solid var(--color-line); border-radius: 12px; padding: 14px 16px; background: var(--color-white); }
.region-archive__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-bottom: 6px; color: var(--color-muted); font-size: .8rem; }
.region-archive__badge { border-radius: 999px; padding: 2px 10px; background: #eee6e7; color: var(--color-ink); font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.region-archive__item--extern .region-archive__badge { background: #e6eef7; color: #1f3d66; }
.region-archive__item--bericht .region-archive__badge { background: #f1e6c8; color: #6d4707; }
.region-archive__title { display: block; font-size: 1.02rem; }
.region-archive__links { list-style: none; display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 8px 0 0; padding: 0; font-size: .88rem; }
.region-archive__links a { font-weight: 700; }
.region-archive__links a:not(.button) { color: var(--color-bordeaux-700); }
.tournament-card__footer--actions { flex-wrap: wrap; gap: 8px 16px; align-items: center; }
.tournament-card__hint { margin: 0 0 8px; color: var(--color-muted); font-size: .85rem; }
.training-card__running { border-radius: 999px; padding: 2px 9px; background: var(--color-highlight); color: var(--color-forest-950); font-weight: 800; }
