:root {
    --bg: #f6fafc;
    --card: #ffffff;
    --text: #1f2937;
    --muted: #5b6778;
    --brand: #005594;
    --brand-2: #445594;
    --shadow: 0 10px 20px rgba(0, 0, 0, 0.08);
    --radius: 14px;
    --arrow: var(--brand);
    --arrow-bypass: var(--brand-2);
    --step-gap: 76px;
    /* Abstand zwischen Karten */
}

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

body {
    margin: 0;
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
    color: var(--text);
    background: linear-gradient(180deg, #f6fafc 0%, #eef7fb 100%);
}

.container {
    width: min(900px, 92vw);
    margin: 0 auto;
    vertical-align: middle;
}

/* Spezifisches Header-Layout: links Logo + Marken-Text, rechts Bild */
.site-header .container {
    display: flex;
    align-items: center;
    gap: 18px;
}

.site-header {
    background: linear-gradient(90deg, var(--brand), var(--brand-2));
    color: white;
    padding: 32px 0 28px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: flex;
    align-items: center;
    gap: 24px;
}

.logo {
    object-fit: contain;
    flex-shrink: 0;
    float: left;
    margin-right: 20px;
}

.site-logo {
    width: 100px;
    height: 100px;
}

.site-brand h1 {
    margin: 15px 0 6px 0;
    font-weight: 700;
    font-size: 2.0rem;
    letter-spacing: 0.3px;
}

.subtitle {
    margin: 0;
    opacity: 0.95;
    font-size: 1.1rem;
}

/* Brand-Block: Titel + Untertitel untereinander */
.site-brand {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* Rechtsbündiges Bild, auf Höhe der Header-Inhalte skaliert */
.header-figure {
    margin-left: auto;
    flex-shrink: 0;
    display: flex;
    align-items: center;
}
.header-figure .header-image {
    height: 100px;
    width: auto;
    object-fit: contain;
    display: block;
}

.intro {
    margin: 28px 0 6px;
    color: var(--muted);
}

.note {
    background: #e9f4ff;
    border-left: 4px solid var(--brand);
    padding: 10px 12px;
    border-radius: 6px;
}

.timeline {
    position: relative;
    margin: 28px 0 110px;
    padding: 10px 0 80px;
}

/* Wasserzeichen: sehr große, transparente Jahrgangszahl links */
.grade-indicator {
position: sticky;
top: 12vh;
height: 0;
pointer-events: none;
z-index: 0; /* hinter Karten/Linien */
}
.grade-indicator .grade-number {
position: absolute;
left: -12vw; /* leicht außerhalb des Inhalts */
top: -4vh;
font-size: clamp(140px, 24vw, 280px);
font-weight: 900;
color: var(--brand);
opacity: 0.06;      /* sehr transparent – Wasserzeichen-Effekt */
letter-spacing: 2px;
line-height: 1;
user-select: none;
}

/* Trennlinie der Jahrgangsstufe */
.grade-separator {
position: relative;
width: 100%;
margin: 44px 0;
height: 0;
}
.grade-separator .grade-line {
position: relative;
height: 0;
border-top: 3px dashed rgba(25, 118, 210, 0.22); /* dezent, gut sichtbar */
}

.grade-separator::before {
    content: attr(data-grade) " . Klasse";
    position: absolute;
    left: 0;
    /* top: 2.2rem; */
    font-size: 2rem;
    color: var(--muted);
}

/* Karten/Steps */
.step {
background: var(--card);
border-radius: var(--radius);
box-shadow: var(--shadow);
margin: var(--step-gap) 0;
padding: 0;
width: min(720px, 92vw); /* Fallback – Skript setzt konkrete Breite/Position */
transition: transform 160ms ease-out, box-shadow 160ms ease-out;
will-change: transform;
transform-origin: center center;
outline: none;
position: relative;
z-index: 1; /* über den Linien */
}

/* Optionale Stationen: optisch etwas schmaler (Fallback, wird durch Skript konkretisiert) */
.step.optional {
    width: min(600px, 90vw);
}

/* Zeugnis-/Bericht-Rahmen: doppelte, dezente Kontur */
.step.certificate {
border: 3px solid rgba(0, 162, 168, 0.35);
border-radius: 22px;
position: relative;
}
.step.certificate::before {
content: "";
position: absolute;
inset: -8px;                /* äußerer Ring */
border: 6px solid rgba(25, 118, 210, 0.16);
border-radius: 26px;
pointer-events: none;
z-index: 0;
}

.step.certificate .step-header,
.step.certificate .step-content {
    position: relative;
    z-index: 1;
}

/* Hover/Fokus-Feedback */
.step:focus-within,
.step:hover {
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.1);
}

.step-header {
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    cursor: pointer;
    user-select: none;
    padding: 18px 20px;
}

.step-header::-webkit-details-marker {
    display: none;
}

.step-title {
    font-size: clamp(1.05rem, 1vw + 0.8rem, 1.35rem);
    font-weight: 700;
    margin: 0;
}

.chevron {
    --s: 12px;
    width: var(--s);
    height: var(--s);
    border-right: 3px solid var(--brand);
    border-bottom: 3px solid var(--brand);
    transform: rotate(45deg);
    transition: transform 200ms ease;
}

.step[open] .chevron {
    transform: rotate(-135deg);
}

.step-content {
    padding: 0 20px 18px 20px;
    color: var(--text);
    line-height: 1.55;
    overflow: hidden;
    max-height: 0;
    opacity: 0;
    transition: max-height 280ms ease, opacity 240ms ease;
    border-top: 1px solid #f0f4f8;
}

.step[open] .step-content {
    max-height: 1000px;
    opacity: 1;
}

.step-content p {
    margin: 14px 0;
}

.step-content ul {
    margin: 10px 0 0 18px;
    padding: 0 0 0 6px;
}

.step-content li {
    margin: 6px 0;
}

.step-content .detail-image {
    font-size: 5rem;
    text-align: center;
    margin-right: 20px;
    display: block;
    float: right;
}

.small {
    color: var(--muted);
    font-size: 0.95rem;
}

/* SVG-Overlay: breite Linien ohne Spitzen */
.flow {
position: absolute;
inset: 0;
width: 100%;
height: 100%;
z-index: 0;         /* hinter den Karten */
pointer-events: none;
}
.flow-path {
fill: none;
stroke-linecap: round;
stroke-linejoin: round;
}
.flow-path.main {
stroke: var(--arrow);
stroke-width: 30;   /* deutlich breiter */
opacity: 0.52;
}

.flow-path.bypass {
    stroke: var(--arrow-bypass);
    stroke-width: 26;
    opacity: 0.50;
}

/* Footer */
.site-footer {
    color: #5f6b7a;
    font-size: 0.95rem;
    padding: 24px 0 40px;
    border-top: 1px solid #e6edf3;
    background: #f7fbfe;
}

/* Barrierefreiheit/Focus */
summary.step-header:focus {
    outline: 3px solid rgba(25, 118, 210, 0.35);
    outline-offset: 2px;
}

/* Responsive Feinheiten */
@media (max-width: 560px) {
    .step-header {
        padding: 16px 16px;
    }

    .step-content {
        padding: 0 16px 16px 16px;
    }

        .grade-indicator .grade-number {
            left: -6vw;
            font-size: clamp(120px, 32vw, 220px);
            opacity: 0.07;
        }
}

/* Auf kleineren Bildschirmen das dekorative Header-Bild ausblenden */
@media (max-width: 900px) {
    .header-figure {
        display: none;
    }
}