/* Recall Routine — Stylesheet
   Handgeschrieben, keine Frameworks, keine externen Requests.

   Die drei Farbbloecke unten werden von scripts/neues_projekt.py aus
   der config.json gefuellt. Alles darunter ist Struktur und darf pro
   Projekt umgebaut werden -- siehe SKILL.md, Abschnitt "Fussspur". */

:root {
  --paper:       #f4f6f8;
  --paper-2:     #e9edf2;
  --ink:         #11161c;
  --ink-soft:    #475262;
  --ink-faint:   #78848f;
  --rule:        #d4dbe3;
  --ember:       #1f5f8b;
  --ember-soft:  #5a93b8;
  --moss:        #0f4c5c;
  --shadow:      0 1px 2px rgba(17, 22, 28, .07), 0 10px 28px rgba(17, 22, 28, .06);
  --wide:        70rem;
  --prose:       37rem;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper:       #10141a;
    --paper-2:     #171d25;
    --ink:         #e6eaef;
    --ink-soft:    #aab4c0;
    --ink-faint:   #7c8793;
    --rule:        #262f3a;
    --ember:       #7fb8dd;
    --ember-soft:  #5a93b8;
    --moss:        #74b4c4;
    --shadow:      0 1px 2px rgba(0, 0, 0, .45), 0 10px 28px rgba(0, 0, 0, .35);
  }
}

:root[data-theme="dark"] {
    --paper:       #10141a;
    --paper-2:     #171d25;
    --ink:         #e6eaef;
    --ink-soft:    #aab4c0;
    --ink-faint:   #7c8793;
    --rule:        #262f3a;
    --ember:       #7fb8dd;
    --ember-soft:  #5a93b8;
    --moss:        #74b4c4;
    --shadow:      0 1px 2px rgba(0, 0, 0, .45), 0 10px 28px rgba(0, 0, 0, .35);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0938rem/1.72 ui-serif, Georgia, "Iowan Old Style",
        "Times New Roman", serif;
  font-feature-settings: "kern" 1;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4, .nameplate {
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI",
        Roboto, "Helvetica Neue", Arial, sans-serif;
  font-weight: 650;
  line-height: 1.17;
  letter-spacing: -.021em;
  color: var(--ink);
}

a { color: var(--ember); text-decoration-thickness: 1px; text-underline-offset: .18em; }
a:hover { color: var(--ink); }

img, svg { max-width: 100%; height: auto; display: block; }

.frame { width: 100%; max-width: var(--wide); margin-inline: auto; padding-inline: 16px; }
.column { max-width: var(--prose); margin-inline: auto; }

/* ---------- Kopf ---------- */

.topline {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  position: sticky; top: 0; z-index: 20;
}
.topline .frame {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 64px;
}
.nameplate {
  display: inline-flex; align-items: center; gap: .55rem;
  font-size: 1.0625rem; letter-spacing: .01em;
  color: var(--ink); text-decoration: none;
}
.nameplate .mark { width: 22px; height: 22px; flex: none; color: var(--moss); }
.nameplate b { font-weight: 600; }
.nameplate span { color: var(--ink-faint); font-weight: 400; }

.nav { display: flex; gap: 1.35rem; font-size: .875rem; }
.nav a { color: var(--ink-soft); text-decoration: none; }
.nav a:hover { color: var(--ember); }
@media (max-width: 620px) { .nav { display: none; } }

/* ---------- Aufmacher ---------- */

.opener { padding: clamp(3rem, 9vw, 6rem) 0 clamp(2.5rem, 6vw, 4rem); }
.eyebrow {
  font-size: .75rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-faint); margin: 0 0 1.1rem;
}
.opener h1 {
  font-size: clamp(2.1rem, 6.2vw, 3.6rem);
  margin: 0 0 1.1rem; max-width: 20ch;
}
.opener .intro {
  font-size: clamp(1.0625rem, 2.2vw, 1.25rem);
  color: var(--ink-soft); max-width: 46ch; margin: 0;
}

/* ---------- Themenkacheln ---------- */

.strip { padding: clamp(2.5rem, 6vw, 4rem) 0; border-top: 1px solid var(--rule); }
.strip-head { margin: 0 0 1.75rem; }
.strip-head h2 { font-size: clamp(1.5rem, 3.4vw, 2rem); margin: 0 0 .5rem; }
.strip-head p { color: var(--ink-soft); margin: 0; max-width: 52ch; }

.topicgrid {
  display: grid; gap: 1px; background: var(--rule);
  border: 1px solid var(--rule); border-radius: 10px; overflow: hidden;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}
.topiccard {
  background: var(--paper); padding: 1.5rem 1.35rem;
  display: flex; flex-direction: column; gap: .5rem;
  text-decoration: none; color: inherit;
  transition: background .15s ease;
}
.topiccard:hover { background: var(--paper-2); }
.topiccard h3 { font-size: 1.0625rem; margin: 0; }
.topiccard p { font-size: .9375rem; color: var(--ink-soft); margin: 0; }
.topiccard .onward { font-size: .8125rem; color: var(--ember); margin-top: auto; padding-top: .6rem; }

/* ---------- Langtext ---------- */

.longread { padding: clamp(2.5rem, 6vw, 4rem) 0; border-top: 1px solid var(--rule); }
.longread h1 { font-size: clamp(1.8rem, 4.4vw, 2.6rem); margin: 0 0 1.25rem; }
.longread h2 {
  font-size: clamp(1.3rem, 2.8vw, 1.6rem);
  margin: 2.75rem 0 .85rem; padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}
.longread h3 { font-size: 1.125rem; margin: 1.9rem 0 .6rem; }
.longread p { margin: 0 0 1.1rem; }
.longread ul, .longread ol { margin: 0 0 1.25rem; padding-left: 1.3rem; }
.longread li { margin-bottom: .5rem; }
.longread li::marker { color: var(--ember-soft); }
.longread strong { font-weight: 600; }

.openline {
  font-size: 1.1875rem; color: var(--ink-soft);
  border-left: 2px solid var(--ember-soft); padding-left: 1.1rem; margin: 0 0 2rem;
}

.sidenote {
  background: var(--paper-2); border: 1px solid var(--rule);
  border-radius: 8px; padding: 1.1rem 1.25rem; margin: 1.75rem 0;
  font-size: .9375rem; color: var(--ink-soft);
}
.sidenote b { color: var(--ink); }

/* ---------- Checkliste ---------- */

.listgrid {
  display: grid; gap: 1rem; margin: 1.5rem 0 0;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.listbox {
  background: var(--paper-2); border: 1px solid var(--rule);
  border-radius: 10px; padding: 1.25rem 1.3rem;
}
.listbox h4 { font-size: .9375rem; margin: 0 0 .75rem; letter-spacing: .01em; }
.listbox ul { list-style: none; margin: 0; padding: 0; font-size: .9375rem; }
.listbox li { position: relative; padding-left: 1.4rem; margin-bottom: .55rem; color: var(--ink-soft); }
.listbox li::before {
  content: ""; position: absolute; left: 0; top: .52em;
  width: .5rem; height: .5rem; border-radius: 2px;
  border: 1.5px solid var(--ember-soft);
}

/* ---------- Fragen ---------- */

.questions { border-top: 1px solid var(--rule); }
.questions details { border-bottom: 1px solid var(--rule); }
.questions summary {
  cursor: pointer; list-style: none; padding: 1.1rem 2rem 1.1rem 0;
  font-family: ui-sans-serif, system-ui, sans-serif;
  font-size: 1.0625rem; font-weight: 600; position: relative;
}
.questions summary::-webkit-details-marker { display: none; }
.questions summary::after {
  content: "+"; position: absolute; right: .25rem; top: 50%;
  transform: translateY(-50%); color: var(--ember); font-size: 1.25rem;
  font-family: ui-sans-serif, system-ui, sans-serif;
}
.questions details[open] summary::after { content: "–"; }
.questions details p { margin: 0 0 1.1rem; color: var(--ink-soft); font-size: .9688rem; }

/* ---------- Fuss ---------- */

.colophon {
  border-top: 1px solid var(--rule); background: var(--paper-2);
  padding: 2.5rem 0 3rem; margin-top: 3rem;
  font-size: .875rem; color: var(--ink-soft);
}
.colophon .columns { display: grid; gap: 1.75rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.colophon h4 { font-size: .8125rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-faint); margin: 0 0 .7rem; font-family: inherit; font-weight: 600; }
.colophon ul { list-style: none; margin: 0; padding: 0; }
.colophon li { margin-bottom: .45rem; }
.colophon a { color: var(--ink-soft); text-decoration: none; }
.colophon a:hover { color: var(--ember); text-decoration: underline; }
.finenote {
  border-top: 1px solid var(--rule); margin-top: 2rem; padding-top: 1.5rem;
  font-size: .8125rem; color: var(--ink-faint);
}
.finenote p { margin: 0 0 .6rem; max-width: 62ch; }

.jump {
  position: absolute; left: -9999px;
  background: var(--ink); color: var(--paper); padding: .6rem 1rem; border-radius: 0 0 6px 0;
}
.jump:focus { left: 0; top: 0; z-index: 50; }

.colophon .oneline { margin: 0 0 1.1rem; max-width: 34ch; }
.colophon .publisher {
  margin: 0; font-size: .8125rem; line-height: 1.75; color: var(--ink-faint);
}
.colophon .publisher a { color: var(--ink-soft); }

/* Noch nicht eingetragene Betreiberangaben sichtbar lassen, nicht verstecken. */
.ph {
  color: var(--ember);
  border-bottom: 1px dashed var(--ember-soft);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
