:root {
  color-scheme: dark;
  --background: #0d0b12;
  --surface: #17141f;
  --surface-hover: #211b2d;
  --border: #342c43;
  --text: #f7f5fa;
  --muted: #b7afc3;
  --accent: #9868ff;
  --accent-strong: #b492ff;
  --youtube: #ff3b48;
  --youtube-hover: #ff5964;
  --focus: #ffd166;
  --radius: 14px;
  --shadow: 0 18px 50px rgb(0 0 0 / 28%);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(circle at 15% -10%, rgb(127 73 255 / 24%), transparent 34rem),
    var(--background);
}

.page-header {
  border-bottom: 1px solid var(--border);
  background: rgb(13 11 18 / 82%);
}

.page-header__content,
.training,
.noscript-message {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.page-header__content {
  padding: 46px 0 38px;
}

.eyebrow {
  margin: 0 0 6px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 5vw, 3.4rem);
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.training {
  display: grid;
  gap: 28px;
  padding: 38px 0 64px;
}

.contents {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgb(34 27 47 / 96%), rgb(20 17 27 / 96%));
  box-shadow: var(--shadow);
}

.contents__title {
  margin: 0;
  padding: 20px 24px;
  border-bottom: 1px solid var(--border);
  font-size: clamp(1.25rem, 2.8vw, 1.65rem);
}

.contents__list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin: 0;
  padding: 10px 24px 18px 58px;
}

.contents__item {
  position: relative;
  padding: 7px 24px 7px 2px;
  color: var(--accent-strong);
  font-weight: 750;
}

.contents__item::before {
  position: absolute;
  inset: 5px auto 5px -34px;
  width: 5px;
  background: #2563eb;
  content: "";
}

.contents__item:nth-child(2)::before {
  background: #86efac;
}

.contents__item:nth-child(3)::before {
  background: #fff;
}

.contents__item:nth-child(4)::before {
  background: #15803d;
}

.contents__item:nth-child(5)::before {
  background: #facc15;
}

.contents__item:nth-child(6)::before {
  background: #f97316;
}

.contents__item:nth-child(7)::before {
  background: #22d3ee;
}

.contents__item:nth-child(8)::before {
  background: #d179f2;
}

.contents__item:nth-child(9)::before {
  background: #fca5a5;
}

.contents__item:nth-child(10)::before {
  background: #bfff00;
}

.contents__link {
  display: flex;
  gap: 16px;
  align-items: baseline;
  justify-content: space-between;
  color: var(--text);
  font-weight: 600;
  text-decoration: none;
  text-decoration-color: transparent;
  text-underline-offset: 4px;
  transition: color 160ms ease, text-decoration-color 160ms ease;
}

.contents__link > span {
  min-width: 0;
}

.contents__duration,
.chapter__duration {
  flex: 0 0 auto;
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--accent-strong);
  font-size: 0.78rem;
  font-variant-numeric: tabular-nums;
  font-weight: 750;
  white-space: nowrap;
}

.contents__link:hover {
  color: var(--accent-strong);
  text-decoration: underline;
  text-decoration-color: currentColor;
}

.contents__link:focus-visible {
  border-radius: 4px;
  outline: 3px solid var(--focus);
  outline-offset: 4px;
}

.chapter {
  scroll-margin-top: 20px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(145deg, rgb(30 25 40 / 94%), rgb(20 17 27 / 94%));
  box-shadow: var(--shadow);
}

.chapter__title {
  position: relative;
  display: flex;
  gap: 18px;
  align-items: center;
  justify-content: space-between;
  margin: 0;
  padding: 20px 24px 20px 30px;
  border-bottom: 1px solid var(--border);
  font-size: clamp(1.05rem, 2.4vw, 1.35rem);
  line-height: 1.35;
}

.chapter__title > span {
  min-width: 0;
}

.chapter__title::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 5px;
  background: #2563eb;
  content: "";
}

#kapitel-2 .chapter__title::before {
  background: #86efac;
}

#kapitel-3 .chapter__title::before {
  background: #fff;
}

#kapitel-4 .chapter__title::before {
  background: #15803d;
}

#kapitel-5 .chapter__title::before {
  background: #facc15;
}

#kapitel-6 .chapter__title::before {
  background: #f97316;
}

#kapitel-7 .chapter__title::before {
  background: #22d3ee;
}

#kapitel-8 .chapter__title::before {
  background: #d179f2;
}

#kapitel-9 .chapter__title::before {
  background: #fca5a5;
}

#kapitel-10 .chapter__title::before {
  background: #bfff00;
}

.chapter__empty {
  margin: 0;
  padding: 22px 24px;
  color: var(--muted);
}

.video-list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.video-row {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto auto;
  gap: 16px;
  align-items: center;
  min-height: 72px;
  padding: 12px 18px;
  border-bottom: 1px solid var(--border);
  transition: background-color 160ms ease;
}

.video-row:last-child {
  border-bottom: 0;
}

.video-row:hover {
  background: var(--surface-hover);
}

.video-row__number {
  color: var(--accent-strong);
  font-size: 0.86rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.08em;
}

.video-row__title {
  min-width: 0;
  font-weight: 650;
}

.video-row__duration {
  min-width: 64px;
  padding: 5px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.82rem;
  font-variant-numeric: tabular-nums;
  text-align: center;
}

.video-row__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 9px;
  color: #fff;
  background: var(--youtube);
  font-size: 0.86rem;
  font-weight: 750;
  text-decoration: none;
  transition: background-color 160ms ease, transform 160ms ease;
}

.video-row__link:hover {
  background: var(--youtube-hover);
  transform: translateY(-1px);
}

.video-row__link:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

.video-row__link--disabled {
  color: var(--muted);
  background: #302a38;
  cursor: default;
}

.video-row__link--disabled:hover {
  background: #302a38;
  transform: none;
}

.status-message,
.error-message,
.noscript-message {
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
  background: var(--surface);
}

.error-message strong {
  color: var(--text);
}

@media (max-width: 720px) {
  .page-header__content {
    padding-block: 34px 28px;
  }

  .training {
    padding-block: 24px 48px;
  }

  .contents__title {
    padding: 18px;
  }

  .contents__list {
    grid-template-columns: 1fr;
    padding: 10px 18px 18px 48px;
  }

  .contents__item {
    padding-right: 0;
  }

  .chapter__title {
    padding: 18px 18px 18px 24px;
  }

  .video-row {
    grid-template-columns: 36px minmax(0, 1fr) auto;
    gap: 10px;
    padding: 14px;
  }

  .video-row__duration {
    min-width: 58px;
  }

  .video-row__link {
    grid-column: 2 / -1;
    justify-self: start;
  }
}

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