:root {
    color-scheme: light;
    --navy: #082f46;
    --blue: #075276;
    --gold: #f3c748;
    --paper: #fffdf8;
    --tint: #f5f1e8;
    --ink: #14232c;
    --muted: #4c5e67;
    --line: #d8d6cd;
    --page: 73rem;
    --header-offset: 5.3rem;
}

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

html { scroll-padding-top: calc(var(--header-offset) + 1.25rem); }
body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
    font-size: 1rem;
    line-height: 1.62;
    overflow-wrap: break-word;
}
h1, h2, h3, p, dl, dd, figure { margin: 0; }
h1, h2, h3 { color: var(--navy); line-height: 1.2; }
h1 { font-size: clamp(1.85rem, 5vw, 3.15rem); letter-spacing: -0.048em; }
h2 { font-size: clamp(1.5rem, 3.1vw, 2.05rem); letter-spacing: -0.034em; }
h3 { font-size: 1.09rem; letter-spacing: -0.017em; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: 0.22em; }
a:hover { text-decoration-thickness: 2px; }
a:focus-visible,
summary:focus-visible {
    outline: 3px solid #a74a00;
    outline-offset: 3px;
}

.wrap { width: min(calc(100% - 2rem), var(--page)); margin-inline: auto; }

.skip-link {
    position: fixed;
    z-index: 100;
    top: 0.75rem;
    left: 0.75rem;
    padding: 0.7rem 1rem;
    background: var(--gold);
    color: var(--navy);
    font-weight: 750;
    opacity: 0;
    pointer-events: none;
}
.skip-link:focus { opacity: 1; pointer-events: auto; }

.course-header {
    padding-block: 0.9rem clamp(1.5rem, 4vw, 2.6rem);
    border-bottom: 1px solid var(--line);
    background: linear-gradient(125deg, var(--tint) 24%, #f8edcd);
}
.course-arches { display: none; }
.course-arches path { stroke: #8e7130; stroke-width: 1.4; }
.course-arches path:nth-child(even) { stroke: #087696; stroke-width: 1.2; }
.course-arches circle { fill: #a16d0d; }
.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.2rem 0.6rem;
    margin-bottom: 0.55rem;
    color: var(--muted);
    font-size: 0.81rem;
}
.breadcrumb a { display: inline-flex; min-height: 2rem; align-items: center; }
.intro { max-width: 66ch; margin-top: 0.7rem; color: var(--muted); }
.facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-top: 1.25rem;
    border: 1px solid var(--line);
    border-radius: 0.55rem;
    background: var(--paper);
}
.facts > div { min-width: 0; padding: 0.62rem 0.8rem; }
.facts > div:nth-child(even) { border-left: 1px solid var(--line); }
.facts > div:nth-child(n + 3) { border-top: 1px solid var(--line); }
.facts dt {
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 650;
}
.facts dd {
    color: var(--navy);
    font-size: clamp(0.92rem, 2vw, 1.13rem);
    font-weight: 750;
    line-height: 1.35;
}
.facts small {
    display: block;
    margin-top: 0.12rem;
    color: var(--muted);
    font-size: 0.79rem;
    font-weight: 500;
}
.facts-note {
    margin-top: 0.5rem;
    color: var(--muted);
    font-size: 0.85rem;
}
.facts-note a { color: inherit; }

.course-layout {
    padding-block: clamp(1.35rem, 4vw, 3rem) clamp(2.5rem, 6vw, 4.6rem);
}
.course-layout > * { min-width: 0; }
.contents {
    align-self: start;
    margin-bottom: clamp(1.15rem, 4vw, 3.6rem);
    padding-bottom: 0.6rem;
    border-bottom: 1px solid var(--line);
}
.contents p {
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 750;
    letter-spacing: 0.055em;
    text-transform: uppercase;
}
.contents ul {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0 0.8rem;
    margin: 0.3rem 0 0;
    padding: 0;
    list-style: none;
}
.contents a {
    display: inline-flex;
    min-height: 2.75rem;
    align-items: center;
    color: var(--blue);
    font-size: 0.88rem;
    font-weight: 650;
    line-height: 1.35;
}

.course-body { max-width: 55rem; }
.course-body > section + section {
    margin-top: clamp(1.65rem, 4.6vw, 3.5rem);
    padding-top: clamp(1.55rem, 4.2vw, 3.1rem);
    border-top: 1px solid var(--line);
    content-visibility: auto;
    contain-intrinsic-block-size: auto 22rem;
}
.course-body > section > h2 { margin-bottom: 0.65rem; }
.course-body p { max-width: 71ch; }
.course-body p + p { margin-top: 0.8rem; }
.course-body > section:target > h2 { text-decoration: underline; text-decoration-color: #c59830; text-underline-offset: 0.2em; }

.modules {
    position: relative;
    margin: 1rem 0 0.45rem;
    padding: 0;
    list-style: none;
}
.modules::before {
    position: absolute;
    inset: 1.75rem auto 2rem calc(0.975rem - 1px);
    width: 2px;
    background: linear-gradient(#b9984c, #d7cda9 75%, transparent);
    pointer-events: none;
    content: "";
}
.modules > li {
    display: grid;
    grid-template-columns: 1.95rem minmax(0, 1fr);
    gap: 0.7rem 0.95rem;
    align-items: start;
}
.modules > li,
.info-rows div {
    padding-block: 0.84rem;
    border-top: 1px solid var(--line);
}
.modules > li:last-child,
.info-rows div:last-child { border-bottom: 1px solid var(--line); }
.modules h3 { margin-bottom: 0.22rem; }
.modules p,
.info-rows dd,
.practice__example figcaption,
.faq details > p { color: var(--muted); }
.module-letter {
    position: relative;
    display: grid;
    width: 1.95rem;
    aspect-ratio: 1;
    place-items: center;
    border: 1px solid #cbbc94;
    border-radius: 0.34rem;
    background: #f8edce;
    color: #553c06;
    font-size: 0.82rem;
    font-weight: 800;
}

.module-details { margin-top: 0.25rem; }
.module-details[open] {
    padding-bottom: 0.9rem;
    border-radius: 0.4rem;
    background: var(--tint);
}
.module-details ul {
    margin: 0;
    padding-inline: 2.1rem 0.85rem;
    list-style: disc;
}
.module-details li + li { margin-top: 0.3rem; }
.module-details li::marker { color: var(--blue); }
.text-link {
    display: inline-flex;
    min-height: 2.75rem;
    align-items: center;
    gap: 0.4rem;
    font-weight: 680;
    line-height: 1.35;
}
.text-link span { flex: none; }
.info-rows { margin: 1rem 0 0.35rem; }
.info-rows dt { color: var(--navy); font-weight: 750; }

.practice { display: grid; gap: 1.1rem 1.6rem; }
.practice h3 + p,
.note h3 + p { margin-top: 0.3rem; }
.practice p + h3 { margin-top: 1rem; }
.practice__example { width: min(100%, 19rem); }
.practice__image {
    overflow: clip;
    border-radius: 0.55rem;
    outline: 1px solid #c4a554;
    outline-offset: 3px;
    background: var(--tint);
}
.practice__image img { width: 100%; }
.practice__example figcaption { margin-top: 0.45rem; font-size: 0.82rem; line-height: 1.4; }
.note {
    margin-top: 1.2rem;
    padding: 0.85rem 1rem;
    border-left: 3px solid #a87812;
    background: var(--tint);
}

.steps { margin: 0 0 1rem; padding-left: 1.3rem; }
.steps li { padding-left: 0.2rem; margin-bottom: 0.45rem; }
.steps li::marker { color: var(--blue); font-weight: 750; }
.button {
    display: inline-flex;
    min-height: 2.85rem;
    align-items: center;
    gap: 0.55rem;
    margin-top: 1rem;
    padding: 0.6rem 0.95rem;
    border: 1px solid transparent;
    border-radius: 0.36rem;
    background: var(--navy);
    color: #fff;
    font-weight: 750;
    line-height: 1.35;
    text-decoration: none;
}
.button:hover { background: var(--blue); }

.faq { margin-top: 0.8rem; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
:is(.faq, .module-details) summary {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.65rem;
    min-height: 2.75rem;
    padding: 0.68rem 0.15rem;
    color: var(--navy);
    font-weight: 730;
    line-height: 1.45;
    list-style: none;
    cursor: pointer;
}
.module-details summary {
    grid-template-columns: auto auto;
    justify-content: start;
    padding: 0.45rem 0.85rem;
    color: var(--blue);
    font-size: 0.88rem;
}
:is(.faq, .module-details) summary::-webkit-details-marker { display: none; }
:is(.faq, .module-details) summary::after {
    width: 1.3rem;
    height: 1.3rem;
    border: 1px solid #b7c7cd;
    border-radius: 50%;
    background:
        linear-gradient(var(--blue) 0 0) center / 0.55rem 2px no-repeat,
        linear-gradient(var(--blue) 0 0) center / 2px 0.55rem no-repeat;
    content: "";
}
:is(.faq details, .module-details)[open] summary::after { background-size: 0.55rem 2px, 2px 0; }
.faq details > p { padding: 0 1rem 0.8rem 0.15rem; }
#fragen > .faq-contact {
    max-width: 34rem;
    background: var(--tint);
}
#fragen > .faq-contact a { min-height: 2.75rem; align-items: center; }
#fragen > .faq-contact a:hover > span:last-child { text-decoration: underline; }

@media (min-width: 38rem) {
    .wrap { width: min(calc(100% - 3rem), var(--page)); }
    .facts { grid-template-columns: 0.8fr 1.35fr 0.95fr 0.95fr; }
    .facts > div { padding: 0.78rem 1rem; }
    .facts > div:nth-child(n + 3) { border-top: 0; }
    .facts > div + div { border-left: 1px solid var(--line); }
    .info-rows div { display: grid; grid-template-columns: minmax(9.5rem, 0.55fr) minmax(0, 1fr); gap: 0.85rem; }
}

@media (min-width: 53rem) {
    .course-header {
        position: relative;
        isolation: isolate;
        overflow: clip;
        background: radial-gradient(ellipse at 100% 12%, #f7e7b9, transparent 60%), var(--tint);
    }
    .course-arches {
        display: block;
        position: absolute;
        z-index: -1;
        right: max(0rem, calc((100% - var(--page)) / 2));
        bottom: 4.2rem;
        width: min(82%, 32.5rem);
        height: auto;
        pointer-events: none;
        opacity: 0.7;
    }
    .facts { box-shadow: 0 0.35rem 1.2rem rgb(93 71 18 / 7%); }
    .course-layout {
        display: grid;
        grid-template-columns: minmax(11rem, 0.25fr) minmax(0, 1fr);
        gap: clamp(1.15rem, 4vw, 3.6rem);
    }
    .contents {
        position: sticky;
        top: calc(var(--header-offset) + 1.25rem);
        margin-bottom: 0;
        padding: 0.25rem 0.65rem 0.25rem 1.05rem;
        border: 0;
        border-left: 2px solid var(--line);
    }
    .contents ul { grid-template-columns: minmax(0, 1fr); }
}

@media (min-width: 62rem) {
    .practice { grid-template-columns: minmax(0, 1fr) 15rem; align-items: start; }
}

@media (prefers-reduced-motion: no-preference) {
    :is(.faq, .module-details) summary::after { transition: background-size 180ms ease; }
}

@media (min-width: 53rem) and (prefers-reduced-motion: no-preference) {
    @supports ((animation-timeline: view()) and (animation-range: entry 10% cover 28%)) {
        .modules > li { view-timeline-name: --course-module; }
        .module-letter {
            animation: course-module-arrival ease-out both;
            animation-timeline: --course-module;
            animation-range: entry 8% cover 25%;
        }
        .practice__example { view-timeline-name: --course-practice; }
        .practice__image img {
            animation: course-practice-arrival ease-out both;
            animation-timeline: --course-practice;
            animation-range: entry 5% cover 37%;
        }
    }
    .course-arches path {
        stroke-dasharray: 1;
        animation: course-arch-trace 880ms cubic-bezier(0.22, 1, 0.36, 1) backwards;
    }
    .course-arches path:nth-child(2) { animation-delay: 75ms; }
    .course-arches path:nth-child(3) { animation-delay: 150ms; }
    .course-arches path:nth-child(4) { animation-delay: 225ms; }
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
    .button span { transition: transform 180ms ease; }
    .button:hover span { transform: translate(0.18rem, -0.18rem); }
}

@keyframes course-module-arrival {
    from { opacity: 0.75; transform: scale(0.82); }
    68% { opacity: 1; transform: scale(1.12); }
    to { opacity: 1; transform: scale(1); }
}
@keyframes course-practice-arrival {
    from { opacity: 0.82; transform: translateY(0.32rem) scale(1.12); }
    to { opacity: 1; transform: none; }
}
@keyframes course-arch-trace {
    from { stroke-dashoffset: 1; }
    to { stroke-dashoffset: 0; }
}
