/* ===========================================================================
   Anleitung zum Mittagessen-Portal
   Dieselben Farben, Formen und Schriften wie die Anwendung selbst – eine
   Anleitung, die anders aussieht als das Programm, muss erst übersetzt werden.

   Die Schriften liegen in diesem Ordner (schriften/), nicht im public/-Ordner
   der Anwendung. Dadurch stimmt derselbe Pfad auf beiden Wegen: geöffnet von
   der Festplatte und ausgeliefert unter /anleitung/. Und der Ordner lässt sich
   als Ganzes weitergeben – kein externer Aufruf, nichts fehlt.
   =========================================================================== */

@font-face {
  font-family: 'Baar Antropos';
  src: url('schriften/antropos.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Alegreya Sans';
  src: url('schriften/alegreya-sans-400-latin.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Alegreya Sans';
  src: url('schriften/alegreya-sans-500-latin.woff2') format('woff2');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Alegreya Sans';
  src: url('schriften/alegreya-sans-700-latin.woff2') format('woff2');
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: 'Alegreya';
  src: url('schriften/alegreya-400-latin.woff2') format('woff2');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Alegreya';
  src: url('schriften/alegreya-400i-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  --green-800: #1f5238;
  --green-700: #2e6b4c;
  --green-100: #dfeee2;
  --green-050: #eef6ee;
  --ochre-800: #7d5a12;
  --ochre-100: #f8ecce;
  --ochre-200: #e8cd92;
  --terra-800: #8e3a2b;
  --terra-100: #f8e2d9;
  --terra-200: #e0aa9c;
  --lapis-100: #e3eaf2;
  --lapis-200: #b8c8db;
  --lapis-700: #3a5878;
  --paper-050: #f6f3ec;
  --paper-100: #faf7f1;
  --paper-200: #ece6d9;
  --paper-300: #ded8ca;
  --white: #fffdf9;
  --white-pure: #ffffff;
  --ink-800: #2f2a24;
  --ink-600: #6f6759;
  --ink-500: #8b8375;

  --font-display: "Baar Antropos", "Alegreya", "Palatino Linotype", Georgia, serif;
  --font-ui: "Alegreya Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-serif: "Alegreya", Georgia, serif;

  /* Eigene Größen, nicht die der Anwendung: eine Anleitung wird gelesen, nicht
     bedient. Sie darf großzügiger setzen – dieselben Farben, anderer Abstand
     zum Auge. Zusammengelegt wurden 0.9 / 0.92 / 0.98rem, die nebeneinander
     dasselbe sagten. */
  --text-titel: 2rem;
  --text-marke: 1.5rem;
  --text-kapitel: 1.45rem;
  --text-vorspann: 1.2rem;
  --text-zwischen: 1.15rem;
  --text-flies: 1.05rem;
  --text-klein: 0.95rem;
  --druck-grund: 10.5pt;

  /* Formen wie im Haus – 6, 12 und 14px standen hier nebeneinander. */
  --radius-xs: 8px;
  --radius-md: 16px;
  --radius-pill: 999px;

  /* Warm-brauner Schatten, dieselben zwei Stufen wie im Haus. Sie standen
     hier als ausgeschriebene rgba-Ketten – richtig abgeschrieben, aber eine
     Abschrift merkt nicht, wenn sich das Original ändert. */
  --elevation-1: 0 1px 2px rgba(47, 42, 36, .06), 0 1px 3px 1px rgba(47, 42, 36, .05);
  --elevation-2: 0 1px 2px rgba(47, 42, 36, .07), 0 2px 6px 2px rgba(47, 42, 36, .06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper-050);
  color: var(--ink-800);
  font-family: var(--font-ui);
  font-size: var(--text-flies);
  line-height: 1.6;
}

/* --- Kopf mit den Rollen --- */
.kopf {
  background: var(--green-700);
  color: var(--white);
  padding: 0.9rem 1.2rem;
  box-shadow: var(--elevation-2);
}
.kopf-innen {
  max-width: 62rem;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  align-items: baseline;
}
.kopf .marke {
  font-family: var(--font-display);
  font-size: var(--text-marke);
  color: var(--white);
  text-decoration: none;
}
.kopf nav { display: flex; flex-wrap: wrap; gap: 1rem; }
.kopf nav a { color: var(--green-050); text-decoration: none; }
.kopf nav a:hover { text-decoration: underline; }
.kopf nav a[aria-current='page'] { font-weight: 700; text-decoration: underline; }

main { max-width: 62rem; margin: 0 auto; padding: 1.4rem 1.2rem 4rem; }

/* Text bleibt lesbar schmal, Bilder dürfen breiter werden */
main > p, main > ul, main > ol, main > h2, main > h3, main > .hinweis, main > .schritte {
  max-width: 46rem;
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.2;
  color: var(--green-800);
}
h1 { font-size: var(--text-titel); margin: 1.2rem 0 0.3rem; text-wrap: balance; }
h2 {
  font-size: var(--text-kapitel);
  margin: 2.6rem 0 0.6rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--paper-300);
}
h3 { font-size: var(--text-zwischen); margin: 1.6rem 0 0.4rem; font-weight: 700; font-family: var(--font-ui); }
.vorspann {
  font-family: var(--font-serif);
  font-size: var(--text-vorspann);
  line-height: 1.5;
  color: var(--ink-600);
  max-width: 42rem;
  margin: 0 0 1.6rem;
}

a { color: var(--green-700); }
strong { font-weight: 700; }
code {
  font-family: ui-monospace, monospace;
  font-size: 0.92em;
  background: var(--paper-200);
  padding: 0.05em 0.35em;
  border-radius: var(--radius-xs);
}

/* --- Schritte: die eigentliche Anleitung --- */
ol.schritte { counter-reset: schritt; list-style: none; padding: 0; margin: 1rem 0; }
ol.schritte > li {
  counter-increment: schritt;
  position: relative;
  padding-left: 2.6rem;
  margin: 0 0 1rem;
}
ol.schritte > li::before {
  content: counter(schritt);
  position: absolute;
  left: 0;
  top: 0.05em;
  width: 1.9rem;
  height: 1.9rem;
  border-radius: var(--radius-pill);
  background: var(--green-100);
  color: var(--green-800);
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  display: grid;
  place-items: center;
}

/* --- Bilder --- */
figure {
  margin: 1.2rem 0 1.6rem;
  break-inside: avoid;
}
figure img {
  display: block;
  max-width: 100%;
  height: auto;
  border: 1px solid var(--paper-300);
  border-radius: var(--radius-md);
  background: var(--white);
}
figcaption {
  font-size: var(--text-klein);
  color: var(--ink-600);
  margin-top: 0.45rem;
  max-width: 46rem;
}
figcaption b { color: var(--ink-800); }

/* Schreibtisch und Telefon nebeneinander */
.paar {
  display: grid;
  gap: 1.2rem;
  grid-template-columns: 1fr;
  margin: 1.2rem 0 1.6rem;
}
@media (min-width: 900px) {
  .paar { grid-template-columns: 2fr 1fr; align-items: start; }
}
.paar figure { margin: 0; }
.telefon img { max-width: 320px; }

/* --- Hinweiskästen --- */
.hinweis {
  border: 1px solid var(--lapis-200);
  background: var(--lapis-100);
  border-left-width: 5px;
  border-radius: var(--radius-md);
  padding: 0.8rem 1rem;
  margin: 1.2rem 0;
}
.hinweis.regel { border-color: var(--terra-200); background: var(--terra-100); }
.hinweis.merken { border-color: var(--ochre-200); background: var(--ochre-100); }
.hinweis p:first-child { margin-top: 0; }
.hinweis p:last-child { margin-bottom: 0; }
/* Der Titel trägt den dunklen Ton seiner Fläche – dieselbe Regel wie im Haus
   (--status-*-fg). Drei Kastenarten sahen vorher bis auf den Grund gleich aus:
   Die dunklen Töne standen im Block und kamen in keiner Regel vor. */
.hinweis .titel { font-weight: 700; color: var(--lapis-700); }
.hinweis.regel .titel { color: var(--terra-800); }
.hinweis.merken .titel { color: var(--ochre-800); }

/* --- Rollenkarten auf der Startseite --- */
.rollen { display: grid; gap: 1rem; grid-template-columns: 1fr; margin: 1.4rem 0; }
@media (min-width: 720px) { .rollen { grid-template-columns: 1fr 1fr; } }
.rolle {
  background: var(--white);
  border: 1px solid var(--paper-300);
  border-radius: var(--radius-md);
  padding: 1rem 1.1rem;
  box-shadow: var(--elevation-1);
}
.rolle h3 { margin-top: 0; font-family: var(--font-display); font-weight: 400; font-size: var(--text-vorspann); color: var(--green-800); }
.rolle p { margin: 0.3rem 0 0.6rem; color: var(--ink-600); font-size: var(--text-klein); }
.rolle a.weiter { font-weight: 700; }

/* --- Tabellen (Zugänge, Übersichten) --- */
table {
  border-collapse: collapse;
  width: 100%;
  margin: 1rem 0 1.6rem;
  background: var(--white);
  border: 1px solid var(--paper-300);
  border-radius: var(--radius-md);
  overflow: hidden;
  font-size: var(--text-klein);
}
th, td { text-align: left; padding: 0.55rem 0.8rem; border-bottom: 1px solid var(--paper-200); vertical-align: top; }
th { background: var(--paper-100); font-weight: 700; }
tr:last-child td { border-bottom: none; }
.tabellenrahmen { overflow-x: auto; }

.fuss {
  max-width: 46rem;
  margin-top: 3rem;
  padding-top: 1rem;
  border-top: 1px solid var(--paper-300);
  color: var(--ink-500);
  font-size: var(--text-klein);
}

/* --- Druck: eine Rolle, ein Heft --- */
@media print {
  body { background: var(--white-pure); font-size: var(--druck-grund); }
  .kopf { background: none; color: var(--ink-800); box-shadow: none; border-bottom: 1px solid var(--ink-500); padding: 0 0 0.4rem; }
  .kopf .marke { color: var(--green-800); }
  .kopf nav { display: none; }
  main { padding: 0; max-width: none; }
  a { color: var(--ink-800); text-decoration: none; }
  /* Überschriften bleiben bei ihrem Text – aber sie erzwingen keine neue Seite.
     Vorher begann jeder Abschnitt oben, und das Heft war doppelt so dick wie
     sein Inhalt. */
  h1, h2, h3 { break-after: avoid; }
  h2 { break-before: auto; }
  p, li { orphans: 2; widows: 2; }
  figure img { border-color: var(--ink-500); }
  /* Notbremse gegen abgeschnittene Bilder: Ein Bildschirmfoto, das höher wäre
     als eine Seite, wird verkleinert statt zerschnitten – width: auto hält die
     Proportion. Die Höhe ist so gewählt, dass Überschrift und Bildunterschrift
     mit auf die Seite passen. (Die zwei sehr langen Ansichten – Startseite und
     Einstellungen – sind zusätzlich in zwei Bilder geteilt, weil Verkleinern
     dort die Schrift unlesbar machen würde.) */
  figure img { max-height: 20cm; width: auto; }
  .telefon img { max-height: 14cm; }
  .telefon img { max-width: 240px; }
  .nicht-drucken { display: none; }
}
