/* ===================================================================
   SK Engine -- Learn (/learn)
   -------------------------------------------------------------------
   Aufgebaut wie ein Blogartikel: oben Marke, Überschrift und Vorspann,
   darunter links Autor, Datum und Inhaltsverzeichnis, rechts Titelbild
   und Text. Nur diese Seiten laden die Datei; Farben, Karten und Knöpfe
   kommen aus landing.css. Kein Auftritt beim Scrollen: der Text steht
   sofort da.
   =================================================================== */

.l-learn { display: block; }
.l-learn ol { list-style: none; margin: 0; padding: 0; }
.l-learn-n { font-family: var(--l-mono); font-size: 12px; letter-spacing: .06em; color: var(--l-mute); }
.l-learn-min { flex: none; font-family: var(--l-mono); font-size: 12px; color: var(--l-mute); }
.l-learn em { margin-left: 10px; padding: 2px 8px; border: 1px solid rgba(var(--l-acc), .45); border-radius: 999px;
  font-family: var(--l-mono); font-size: 10.5px; font-style: normal; letter-spacing: .06em; text-transform: uppercase;
  color: rgb(var(--l-acc)); vertical-align: 2px; }
.l-learn .l-prose em { margin: 0; padding: 0; border: 0; font: inherit; font-style: italic; letter-spacing: 0;
  text-transform: none; color: inherit; vertical-align: baseline; }

/* -- Kopf: Marke, Überschrift, Vorspann --------------------------------- */
.l-post { width: min(1064px, 100% - 48px); margin: 0 auto; padding: 136px 0 104px; }
.l-post-head { max-width: 680px; }
.l-badge { display: inline-flex; align-items: center; height: 26px; padding: 0 11px; border: 1px solid var(--l-line-2);
  border-radius: 999px; background: rgba(255, 255, 255, .04); font-size: 12px; font-weight: 500; color: var(--l-soft);
  transition: border-color .2s, color .2s; }
a.l-badge:hover { border-color: rgba(255, 255, 255, .4); color: #fff; }
.l-post-h1 { margin-top: 22px; font-size: clamp(34px, 4.4vw, 54px); line-height: 1.08; font-weight: 600;
  letter-spacing: -.04em; text-wrap: balance; }
.l-post-lead { margin-top: 22px; max-width: 580px; font-size: 16.5px; line-height: 1.65; color: var(--l-soft); }

/* -- Zwei Spalten ------------------------------------------------------- */
.l-post-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); align-items: start; gap: 64px;
  margin-top: 60px; }
.l-post-body { min-width: 0; max-width: 760px; }

/* Links: Autor, Datum, Inhaltsverzeichnis; bleibt beim Lesen stehen */
.l-post-side { position: sticky; top: 96px; display: grid; gap: 32px; max-height: calc(100vh - 120px);
  overflow-y: auto; padding-right: 4px; scrollbar-width: thin; }
.l-post-facts { display: grid; gap: 22px; }
.l-post-label { margin-bottom: 10px; font-size: 12.5px; font-weight: 600; letter-spacing: -.005em; color: #fff; }
.l-post-label a { transition: color .2s; }
.l-post-label a:hover { color: var(--l-soft); }
.l-post-value { display: flex; align-items: center; gap: 10px; font-size: 13.5px; line-height: 1.45; color: var(--l-mute); }
.l-post-value > svg { flex: none; width: 17px; height: 17px; stroke-width: 1.5; color: var(--l-soft); }
.l-post-value small { display: block; margin-top: 2px; font-size: 12.5px; color: #5c5c61; }
.l-post-value > svg:first-child { align-self: flex-start; margin-top: 1px; }
.l-post-avatar { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  border: 1px solid var(--l-line-2); background: #141416; font-size: 10.5px; font-weight: 600; color: #fff; }
.l-post-avatar svg { width: 16px; height: 16px; }

.l-post-toc ol, .l-post-course ol { border-left: 1px solid var(--l-line-2); }
.l-post-toc a, .l-post-toc .soon, .l-post-course li a {
  display: block; margin-left: -1px; padding: 8px 12px; border-left: 2px solid transparent;
  font-size: 13px; line-height: 1.4; color: var(--l-mute); transition: color .2s, background .2s, border-color .2s; }
.l-post-toc a:hover, .l-post-course li a:hover { color: #fff; }
.l-post-toc a.on, .l-post-course a[aria-current] {
  color: #fff; border-left-color: rgb(var(--l-acc));
  background: linear-gradient(90deg, rgba(var(--l-acc), .16), rgba(var(--l-acc), .03)); }
.l-post-toc .soon { color: #5c5c61; }
/* Kursseite: die Lektionen eines Kapitels eingerückt darunter */
.l-post-toc .l-post-toc-sub { margin: 2px 0 6px 12px; border-left: 1px solid var(--l-line); }
.l-post-toc .l-post-toc-sub a { display: flex; gap: 8px; padding: 6px 10px; font-size: 12.5px; }
.l-post-toc-n { flex: none; font-family: var(--l-mono); font-size: 11px; line-height: 1.6; color: #5c5c61; }
.l-post-empty { font-size: 13px; line-height: 1.5; color: #5c5c61; }
.l-post-back { display: inline-block; margin-top: 14px; font-size: 13px; color: var(--l-mute); transition: color .2s; }
.l-post-back:hover { color: #fff; }

/* Rechts oben: Titelbild, nur wenn ``bild:`` gesetzt ist */
.l-post-hero { position: relative; overflow: hidden; aspect-ratio: 1200 / 630; margin: 0 0 44px;
  border: 1px solid var(--l-line-2); border-radius: 14px; background: var(--l-bg-2); }
.l-post-hero img { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Kapitel auf der Kursseite */
.l-post-chapter { padding-top: 28px; border-top: 1px solid var(--l-line); scroll-margin-top: 96px; }
.l-post-chapter + .l-post-chapter, .l-prose + .l-post-chapter { margin-top: 44px; }
.l-post-body > .l-post-chapter:first-child { padding-top: 0; border-top: 0; }
.l-post-num { font-family: var(--l-mono); font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--l-mute); }
.l-post-chapter h2 { margin-top: 8px; font-size: 24px; line-height: 1.25; letter-spacing: -.03em; }
.l-post-chapter h2 a { transition: color .2s; }
.l-post-chapter h2 a:hover { color: var(--l-soft); }
.l-post-chapter > p:not(.l-post-num):not(.l-learn-soon) { margin-top: 8px; font-size: 15.5px; line-height: 1.65; color: var(--l-mute); }
.l-post-soon { padding: 22px 24px; border: 1px dashed var(--l-line-2); border-radius: 12px; font-size: 15px; color: var(--l-mute); }
.l-learn-soon { margin-top: 12px; font-family: var(--l-mono); font-size: 11.5px; letter-spacing: .1em;
  text-transform: uppercase; color: #5c5c61; }
.l-learn-lessons { margin-top: 18px !important; border-top: 1px solid var(--l-line); }
.l-learn-lessons a { display: flex; align-items: baseline; gap: 12px; padding: 12px 0;
  border-bottom: 1px solid var(--l-line); font-size: 15.5px; color: var(--l-soft); transition: color .2s; }
.l-learn-lessons a > span:first-child { flex: 1; min-width: 0; }
.l-learn-lessons a:hover { color: #fff; }

/* Lektionen eines Kapitels */
.l-learn-list { display: grid; gap: 12px; margin-top: 8px !important; }
.l-learn-list a { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; align-items: baseline; gap: 4px 12px;
  padding: 20px 22px; transition: border-color .25s, translate .35s var(--l-ease); }
.l-learn-lesson { display: grid; gap: 4px; }
.l-learn-lesson strong { font-size: 17px; font-weight: 600; letter-spacing: -.02em; line-height: 1.35; }
.l-learn-lesson small { font-size: 14.5px; line-height: 1.55; color: var(--l-mute); }
.l-prose + .l-learn-list { margin-top: 36px !important; }

.l-learn-draft { margin-bottom: 24px; padding: 12px 16px; border: 1px solid rgba(var(--l-acc), .4); border-radius: 10px;
  background: rgba(var(--l-acc), .06); font-size: 14px; line-height: 1.5; color: var(--l-soft); }
.l-learn-draft code { font-family: var(--l-mono); font-size: 13px; color: #fff; }

/* Weiter: vorherige und nächste Seite */
.l-learn-pager { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 64px; }
.l-learn-pager a { display: grid; gap: 4px; padding: 18px 20px; border: 1px solid var(--l-line-2); border-radius: 12px;
  transition: border-color .2s; }
.l-learn-pager a:hover { border-color: rgba(255, 255, 255, .4); }
.l-learn-pager small { font-family: var(--l-mono); font-size: 11.5px; letter-spacing: .06em; color: var(--l-mute); }
.l-learn-pager span { font-size: 15.5px; font-weight: 600; letter-spacing: -.015em; line-height: 1.4; }
.l-learn-prev small::before { content: "← "; }
.l-learn-next { text-align: right; }
.l-learn-next small::after { content: " →"; }

/* -- Der Text ----------------------------------------------------------- */
.l-prose { font-size: 16.5px; line-height: 1.75; color: var(--l-soft); }
.l-prose > :first-child { margin-top: 0; }
.l-prose p, .l-prose ul, .l-prose ol, .l-prose blockquote, .l-prose pre, .l-prose table,
.l-prose figure, .l-prose dl { margin: 0 0 22px; }
.l-prose h2 { margin: 56px 0 14px; font-size: 25px; line-height: 1.25; letter-spacing: -.03em; color: #fff; }
.l-prose h3 { margin: 36px 0 10px; font-size: 19px; line-height: 1.35; letter-spacing: -.02em; color: #fff; }
.l-prose h4 { margin: 28px 0 8px; font-size: 16px; color: #fff; }
.l-prose h2, .l-prose h3, .l-prose h4 { scroll-margin-top: 96px; }
.l-prose strong { color: #fff; font-weight: 600; }
.l-prose a { color: #fff; text-decoration: underline; text-underline-offset: 3px;
  text-decoration-color: var(--l-line-2); transition: text-decoration-color .2s; }
.l-prose a:hover { text-decoration-color: #fff; }
.l-learn .l-prose ul { list-style: disc; padding-left: 22px; }
.l-learn .l-prose ol { list-style: decimal; padding-left: 22px; }
.l-prose li + li { margin-top: 6px; }
.l-prose li > ul, .l-prose li > ol { margin: 6px 0 0; }
.l-prose li::marker { color: var(--l-mute); }
.l-prose blockquote { padding: 16px 20px; border-left: 2px solid rgb(var(--l-acc)); border-radius: 0 10px 10px 0;
  background: rgba(var(--l-acc), .05); color: #fff; }
.l-prose blockquote > :last-child { margin-bottom: 0; }
.l-prose img { display: block; max-width: 100%; height: auto; margin: 32px 0; border: 1px solid var(--l-line-2);
  border-radius: 12px; }
.l-prose figure img { margin: 0; }
.l-prose figcaption { margin-top: 10px; font-size: 13.5px; color: var(--l-mute); }
.l-prose hr { margin: 48px 0; border: 0; border-top: 1px solid var(--l-line); }
.l-prose code { padding: 1px 6px; border-radius: 5px; background: rgba(255, 255, 255, .07);
  font-family: var(--l-mono); font-size: .86em; color: #fff; }
.l-prose pre { overflow-x: auto; padding: 18px 20px; border: 1px solid var(--l-line); border-radius: 12px;
  background: var(--l-bg-2); font-size: 14px; line-height: 1.6; }
.l-prose pre code { padding: 0; background: none; font-size: inherit; }
.l-prose table { display: block; overflow-x: auto; width: 100%; border-collapse: collapse; font-size: 15px; }
.l-prose th, .l-prose td { padding: 10px 14px; border-bottom: 1px solid var(--l-line); text-align: left; vertical-align: top; }
.l-prose th { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--l-mute); }
.l-prose td { font-variant-numeric: tabular-nums; }
.l-prose dt { color: #fff; font-weight: 600; }
.l-prose dd { margin: 2px 0 12px; }
.l-prose .footnote { margin-top: 48px; font-size: 14px; color: var(--l-mute); }

/* -- Schmal: eine Spalte; Autor und Datum nebeneinander, das Verzeichnis
      als Kasten über dem Text, die Kapitelliste ganz unten ----------------- */
@media (max-width: 960px) {
  .l-post { padding-top: 112px; }
  .l-post-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; margin-top: 36px; }
  .l-post-side { display: contents; }
  .l-post-facts { order: 1; display: flex; flex-wrap: wrap; gap: 18px 40px; }
  .l-post-toc { order: 2; padding: 18px 18px 12px; border: 1px solid var(--l-line); border-radius: 12px; }
  .l-post-body { order: 3; max-width: none; }
  .l-post-course { order: 4; padding-top: 32px; border-top: 1px solid var(--l-line); }
  .l-post-side > .l-post-back { order: 4; margin-top: 0; }
}
@media (max-width: 720px) {
  .l-post { width: calc(100% - 32px); padding-bottom: 80px; }
  .l-post-hero { margin-bottom: 32px; border-radius: 12px; }
  .l-learn-list a { grid-template-columns: minmax(0, 1fr) auto; padding: 18px; }
  .l-learn-list .l-learn-n { display: none; }
  .l-prose h2 { margin-top: 44px; font-size: 23px; }
  .l-learn-pager { grid-template-columns: 1fr; }
  .l-learn-pager > span:empty { display: none; }
}
