@font-face {
  font-family: Geist;
  src: url("fonts/geist-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --ink: #f6f3ec;
  --muted: #aaaab3;
  --canvas: #0d0e10;
  --paper: #141518;
  --rule: rgba(255, 255, 255, 0.11);
  --gold: #d4ac65;
  --link: #efcf8c;
}

* { box-sizing: border-box; }
body {
  position: relative;
  isolation: isolate;
  margin: 0;
  min-height: 100vh;
  background: var(--canvas);
  color: var(--ink);
  font: 1rem/1.7 Geist, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
/* Hintergrund und Raster der laufenden LernLocker-Startseite. */
body::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: min(900px, 100%);
  z-index: -1;
  opacity: 0.055;
  pointer-events: none;
  background-image: linear-gradient(rgba(255, 255, 255, 0.7) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.7) 1px, transparent 1px);
  background-size: 64px 64px;
  mask-image: linear-gradient(to bottom, #000 55%, transparent 100%);
}
a { color: var(--link); text-underline-offset: 0.2em; overflow-wrap: anywhere; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.skip { position: absolute; left: 1rem; top: -8rem; background: var(--paper); padding: 0.5rem; }
.skip:focus { top: 0.5rem; z-index: 2; }

.masthead { border-bottom: 1px solid var(--rule); }
.masthead-inner,
main { width: min(100% - 3rem, 54rem); margin-inline: auto; }
.masthead-inner {
  display: flex;
  align-items: center;
  min-height: 4.5rem;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: inherit;
  font-size: 1.1rem;
  font-weight: 750;
  text-decoration: none;
}
.brand img { border-radius: 0.65rem; }
main { padding-bottom: 4rem; }
.intro { padding: clamp(1.9rem, 5vw, 3.7rem) 0 clamp(1.4rem, 4vw, 2.5rem); }
.back { display: inline-block; font-size: 0.86rem; font-weight: 600; margin-bottom: 1.15rem; }
h1 {
  margin: 0;
  max-width: 63rem;
  font-size: clamp(2.15rem, 4.6vw, 3.5rem);
  font-weight: 750;
  line-height: 1.05;
  letter-spacing: -0.055em;
  text-wrap: balance;
  overflow-wrap: anywhere;
}
.lead { max-width: 66ch; color: var(--muted); font-size: clamp(1rem, 2vw, 1.13rem); margin: 0.9rem 0 0; }
.version { color: var(--muted); font-size: 0.83rem; margin: 1.05rem 0 0; }
.version span { padding-inline: 0.25rem; }

.reading { min-width: 0; background: var(--paper); padding: clamp(1.1rem, 4vw, 3.2rem); border: 1px solid var(--rule); border-radius: 1rem; }
.reading section { max-width: 71ch; scroll-margin-top: 1.5rem; }
.reading section + section { margin-top: 1.55rem; padding-top: 1.55rem; border-top: 1px solid var(--rule); }
.reading section:target h2 { color: var(--link); }
.reading h2 { color: var(--gold); font-size: clamp(1.12rem, 1.9vw, 1.38rem); line-height: 1.35; margin: 0 0 0.7rem; }
.reading p { margin: 0.72rem 0 0; color: var(--ink); overflow-wrap: break-word; }
.reading .stand { color: var(--muted); margin-top: 2rem; }
.reading .block { background: var(--canvas); padding-inline: clamp(0.75rem, 3vw, 1.3rem); }
.reading .block .label { color: var(--muted); }

.document-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem;
  list-style: none;
  padding: 0;
  margin: 0;
}
.document-list li {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: var(--paper);
  border: 1px solid var(--rule);
  border-radius: 1rem;
  padding: 1.2rem 1.4rem;
}
.document-list h2 { font-size: 1.12rem; line-height: 1.4; margin: 0; }
.formats { display: flex; flex-wrap: wrap; align-items: center; gap: 0.7rem 1rem; margin-top: 0.8rem; font-size: 0.88rem; }
.formats a:first-child { font-weight: 750; }
.release-link { margin-top: 1.5rem; font-size: 0.92rem; }

@media (max-width: 800px) {
  .masthead-inner, main { width: min(100% - 2rem, 45rem); }
}

@media (max-width: 560px) {
  .masthead-inner { min-height: 3.75rem; }
  .document-list { grid-template-columns: 1fr; }
  h1 {
    font-size: clamp(1.6rem, 8.3vw, 2.15rem);
    text-wrap: wrap;
    overflow-wrap: normal;
  }
}

@media print {
  :root { color-scheme: light; --ink: #151d2e; --muted: #50586a; --canvas: #fff; --paper: #fff; --gold: #151d2e; --link: #41577d; --rule: #dfdfd6; }
  body { background: white; }
  body::before { display: none; }
  main { width: auto; padding: 0; }
  .masthead, .skip, .back { display: none; }
  .reading { border: 0; padding: 0; }
  h2 { break-after: avoid; }
  p { orphans: 3; widows: 3; }
}
