/* Kursseite – ruhig, hell, feine Linien (HML-Stil), Geist */
@font-face { font-family: 'Geist'; src: url('/fonts/Geist-Variable.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }
:root {
  --accent: #1A6B72; --text: #1C1C1A; --muted: #6B6B66; --faint: #9A9A94; --line: #E8E8E5; --bg: #FFFFFF; --soft: #FAFAF9;
  --font: 'Geist', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif; --ease: cubic-bezier(.22, 1, .36, 1);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); font-family: var(--font); font-size: 15px; line-height: 1.6; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button { font: inherit; }
.k { min-height: 100vh; display: flex; flex-direction: column; }
.k-load, .k-msg { display: grid; justify-items: center; gap: 8px; text-align: center; padding: 120px 20px; color: var(--muted); }
.k-load { grid-auto-flow: column; justify-content: center; align-items: center; gap: 10px; }
.k-spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid var(--line); border-top-color: var(--accent); animation: kspin .8s linear infinite; }
@keyframes kspin { to { transform: rotate(360deg); } }
.k-msg { padding: 72px 20px; border: 1px solid var(--line); border-radius: 18px; margin-top: 32px; }
.k-msg strong { font-size: 18px; color: var(--text); }
.k-msg span { max-width: 460px; }
.k-msg .k-btn { margin-top: 10px; }

.k-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 18px max(20px, calc((100vw - 1120px) / 2)); border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .9); -webkit-backdrop-filter: saturate(1.4) blur(10px); backdrop-filter: saturate(1.4) blur(10px); position: sticky; top: 0; z-index: 20; }
.k-brand { display: inline-flex; align-items: center; text-decoration: none; }
.k-brand img { height: 30px; width: auto; display: block; }
.k-mark { display: inline-flex; align-items: center; gap: 8px; font-size: 18px; font-weight: 600; letter-spacing: -.02em; }
.k-mark i { width: 10px; height: 10px; border-radius: 50%; background: var(--accent); }
.k-top-t { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; color: var(--muted); max-width: 55%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.k-wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; flex: 1; align-content: start; }
.k-kicker { display: block; font-size: 11.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--faint); }

/* Kopf eines Pakets */
.k-hero { position: relative; margin: 24px max(20px, calc((100vw - 1120px) / 2)) 0; border-radius: 24px; overflow: hidden; color: #fff; background: radial-gradient(120% 140% at 85% 0%, color-mix(in oklab, var(--accent) 70%, #fff 0%) 0%, color-mix(in oklab, var(--accent) 55%, #061012) 45%, #0B1415 100%); }
.k-hero.has-cover { background: linear-gradient(90deg, rgba(8, 14, 15, .86) 0%, rgba(8, 14, 15, .55) 55%, rgba(8, 14, 15, .2) 100%), var(--cover) center / cover no-repeat; }
.k-hero::after { content: ''; position: absolute; inset: 0; border-radius: inherit; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .07); pointer-events: none; }
.k-hero-in { position: relative; z-index: 1; padding: 56px 56px 48px; max-width: 760px; }
.k-hero .k-kicker { color: rgba(255, 255, 255, .6); }
.k-hero h1 { margin: 10px 0 0; font-size: clamp(30px, 4.4vw, 46px); line-height: 1.08; font-weight: 600; letter-spacing: -.035em; }
.k-hero p { margin: 12px 0 0; font-size: 17px; color: rgba(255, 255, 255, .8); max-width: 560px; }
.k-hero-act { display: flex; align-items: center; flex-wrap: wrap; gap: 18px 22px; margin-top: 28px; }
.k-hero-prog { display: grid; gap: 6px; min-width: 180px; }
.k-hero-prog small { font-size: 12.5px; color: rgba(255, 255, 255, .7); }
.k-hero .k-bar { background: rgba(255, 255, 255, .18); }
.k-hero .k-bar i { background: #fff; }
.k-hero.is-home .k-hero-in { padding: 48px 56px 44px; }

.k-btn { display: inline-flex; align-items: center; gap: 8px; height: 46px; padding: 0 20px; border-radius: 12px; background: #fff; color: var(--text); text-decoration: none; font-size: 14.5px; font-weight: 600; box-shadow: 0 10px 30px -14px rgba(0, 0, 0, .5); transition: transform .15s var(--ease); }
.k-btn:hover { transform: translateY(-1px); }
.k-btn svg { color: var(--accent); }
.k-btn.is-ghost { background: var(--soft); box-shadow: inset 0 0 0 1px var(--line); height: 40px; font-size: 13.5px; }
.k-bar { height: 6px; border-radius: 99px; background: #EFEFEC; overflow: hidden; }
.k-bar i { display: block; height: 100%; border-radius: inherit; background: var(--accent); transition: width .4s var(--ease); }

/* Übersicht */
.k-ov { display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; padding-top: 40px; padding-bottom: 56px; }
.k-ov > * { max-width: 780px; }
.k-desc { font-size: 16px; }
.k-list { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; }
.k-list li + li { border-top: 1px solid var(--line); }
.k-list a { display: flex; align-items: center; gap: 16px; padding: 18px 20px; text-decoration: none; transition: background-color .15s ease; }
.k-list a:hover { background: var(--soft); }
.k-num { flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 600; color: var(--muted); box-shadow: inset 0 0 0 1px var(--line); background: #fff; }
.is-done > .k-num { background: var(--accent); color: #fff; box-shadow: none; }
.k-list-t { flex: 1; min-width: 0; display: grid; gap: 2px; }
.k-list-t strong { font-size: 15.5px; font-weight: 600; letter-spacing: -.01em; }
.k-list-t small { font-size: 13.5px; color: var(--muted); }
.k-go { color: var(--faint); transition: transform .15s var(--ease), color .15s ease; }
.k-list a:hover .k-go { transform: translateX(3px); color: var(--accent); }

/* Startseite */
.k-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 18px; padding: 32px 0 56px; }
.k-pcard { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 18px; overflow: hidden; text-decoration: none; background: #fff; transition: box-shadow .2s ease, transform .2s var(--ease); }
.k-pcard:hover { box-shadow: 0 20px 40px -26px rgba(0, 0, 0, .35); transform: translateY(-2px); }
.k-pcover { aspect-ratio: 16 / 8; display: grid; place-items: center; font-size: 48px; font-weight: 600; color: rgba(255, 255, 255, .9); background: radial-gradient(120% 140% at 85% 0%, color-mix(in oklab, var(--accent) 70%, #fff 0%), #0B1415); background-size: cover; background-position: center; }
.k-pcard-b { display: grid; gap: 4px; padding: 16px 18px 18px; }
.k-pcard-b strong { font-size: 17px; letter-spacing: -.015em; }
.k-pcard-b small { font-size: 13.5px; color: var(--muted); }
.k-pcard-b em { font-style: normal; display: inline-flex; align-items: center; gap: 4px; margin-top: 8px; font-size: 13px; font-weight: 500; color: var(--accent); }

/* Lektion */
.k-les { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: 56px; padding-top: 36px; padding-bottom: 64px; align-items: start; }
.k-side { position: sticky; top: 88px; }
.k-side-d { display: grid; gap: 10px; }
.k-side-m { display: none; }
.k-side-t { display: inline-flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; text-decoration: none; color: var(--text); margin-bottom: 4px; }
.k-side-t:hover { color: var(--accent); }
.k-side-p { font-size: 12px; color: var(--faint); }
.k-side-l { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 2px; }
.k-side-l a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; text-decoration: none; font-size: 13.5px; color: var(--muted); line-height: 1.35; }
.k-side-l a:hover { background: var(--soft); color: var(--text); }
.k-side-l a.is-on { background: var(--soft); color: var(--text); font-weight: 600; box-shadow: inset 0 0 0 1px var(--line); }
.k-side-l .k-num { width: 24px; height: 24px; font-size: 11.5px; }
.k-main { min-width: 0; max-width: 740px; }
.k-main h1 { margin: 8px 0 0; font-size: clamp(28px, 3.6vw, 38px); line-height: 1.12; letter-spacing: -.03em; font-weight: 600; }
.k-lead { margin: 12px 0 0; font-size: 17px; color: var(--muted); }
.k-toc { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 22px 0 0; padding: 12px 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--soft); font-size: 13px; }
.k-toc span { color: var(--faint); margin-right: 4px; }
.k-toc a { padding: 3px 10px; border-radius: 99px; background: #fff; box-shadow: inset 0 0 0 1px var(--line); text-decoration: none; }
.k-toc a:hover { color: var(--accent); }
.k-main .kr { margin-top: 30px; }
.k-foot { margin-top: 44px; padding-top: 26px; border-top: 1px solid var(--line); display: grid; gap: 18px; }
.k-done { justify-self: start; display: inline-flex; align-items: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--line); background: #fff; color: var(--text); font-size: 13.5px; font-weight: 500; cursor: pointer; transition: background-color .15s ease, color .15s ease, border-color .15s ease; }
.k-done:hover { border-color: color-mix(in oklab, var(--accent) 45%, var(--line)); }
.k-done.is-on { background: var(--accent); border-color: var(--accent); color: #fff; }
.k-pn { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.k-pn-a { display: grid; gap: 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 14px; text-decoration: none; transition: border-color .15s ease, box-shadow .15s ease; }
.k-pn-a:hover { border-color: color-mix(in oklab, var(--accent) 40%, var(--line)); box-shadow: 0 12px 28px -20px rgba(0, 0, 0, .35); }
.k-pn-a small { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--faint); }
.k-pn-a strong { font-size: 14.5px; font-weight: 600; }
.k-pn-a.is-next { text-align: right; justify-items: end; background: var(--soft); }
.k-pn-a.is-end small { color: var(--accent); }

.k-footer { display: flex; justify-content: space-between; gap: 12px; padding: 22px max(20px, calc((100vw - 1120px) / 2)); border-top: 1px solid var(--line); font-size: 12.5px; color: var(--faint); }

@media (max-width: 900px) {
  .k-les { grid-template-columns: minmax(0, 1fr); gap: 22px; padding-top: 18px; }
  .k-side { position: static; }
  .k-side-d { display: none; }
  .k-side-m { display: block; border: 1px solid var(--line); border-radius: 14px; padding: 4px 14px; background: var(--soft); }
  .k-side-m summary { display: flex; align-items: center; justify-content: space-between; padding: 10px 0; font-size: 13.5px; font-weight: 600; cursor: pointer; list-style: none; }
  .k-side-m summary::-webkit-details-marker { display: none; }
  .k-side-m[open] summary svg { transform: rotate(180deg); }
  .k-side-m[open] { padding-bottom: 12px; }
  .k-side-m .k-side-t { margin: 4px 0 8px; }
}
@media (max-width: 640px) {
  .k-top { padding: 14px 16px; }
  .k-hero { margin: 14px 12px 0; border-radius: 20px; }
  .k-hero-in, .k-hero.is-home .k-hero-in { padding: 34px 22px 30px; }
  .k-hero p { font-size: 15.5px; }
  .k-wrap { padding: 0 16px; }
  .k-list a { padding: 15px 14px; gap: 12px; }
  .k-pn { grid-template-columns: 1fr; }
  .k-footer { padding: 18px 16px; flex-direction: column; }
}
