/* Hilfe und Verwaltung im Lernhelfer-Stil (skizze.css): Papier mit Punktraster, gezeichnete Kästen, Königsblau, gelber Textmarker */
@font-face { font-family: "Archivo"; src: url("/fonts/Archivo.woff2") format("woff2"); font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; }
:root {
  --papier: #fbfbf9; --bg-2: #f2f2ee; --bg-3: #e6e6e0; --tinte: #121212; --text-2: #4f535a;
  --linie: rgb(18 18 18 / 0.15); --linie-2: rgb(18 18 18 / 0.45); --punkt: rgb(24 32 56 / 0.17);
  --blau: #2446c8; --blau-flaeche: rgb(36 70 200 / 0.08); --gelb: rgb(255 233 58 / 0.3); --ok: #e3f4e8;
  --rahmen: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M1 5.8L37.8 4.5M35.6 1.2L35.1 38.4M38.6 35.4L2.2 35.9M4.4 38.8L5.1 1.6' fill='none' stroke='%23121212' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  --rahmen-2: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M2.2 4.4L38.8 5.6M35.8 1.4L35.3 38.6M37.9 35.7L1.3 34.8M4.8 38.4L4.3 1.2' fill='none' stroke='%23121212' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E");
  --rahmen-blau: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='40' height='40'%3E%3Cpath d='M1 5.8L37.8 4.5M35.6 1.2L35.1 38.4M38.6 35.4L2.2 35.9M4.4 38.8L5.1 1.6' fill='none' stroke='%232446c8' stroke-width='2.1' stroke-linecap='round'/%3E%3C/svg%3E");
  --marker: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 100 20' preserveAspectRatio='none'%3E%3Cpath d='M1.2 3.6C18 2.4 36 3.4 55 2.6S86 3.3 99 2.2L99.6 17.4C82 18.6 63 17.1 44 18S12 17.2.4 18.3Z' fill='%23ffe93a'/%3E%3C/svg%3E");
  --unterstrich: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 14' preserveAspectRatio='none'%3E%3Cpath d='M3 9C48 4 104 12 197 5' fill='none' stroke='%232446c8' stroke-width='2.6' stroke-linecap='round' vector-effect='non-scaling-stroke'/%3E%3C/svg%3E");
  --strich: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='360' height='6' viewBox='0 0 360 6' preserveAspectRatio='none'%3E%3Cpath d='M0 3C60 1.9 120 4.1 180 3.1S300 2.2 360 3' fill='none' stroke='%23121212' stroke-opacity='.45' stroke-width='1.4'/%3E%3C/svg%3E");
  color-scheme: light;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--papier) radial-gradient(circle at 1px 1px, var(--punkt) 1.1px, transparent 1.4px) 0 0 / 22px 22px; color: var(--tinte);
  font: 450 16px/1.6 "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif; }
::selection { background: rgb(255 233 58 / 0.7); }
main { max-width: 820px; margin: 0 auto; padding: 20px 16px 72px; }
h1 { width: fit-content; margin: 18px 0 10px; padding-bottom: 0.24em; background: var(--unterstrich) left bottom / 100% 0.36em no-repeat;
  font-size: clamp(1.9rem, 6vw, 2.5rem); font-weight: 800; font-stretch: 86%; letter-spacing: -0.01em; line-height: 1.15; }
h2 { margin: 44px 0 12px; font-size: 1.375rem; font-weight: 750; font-stretch: 92%; scroll-margin-top: 16px; }
h3 { margin: 26px 0 8px; font-size: 1.0625rem; font-weight: 700; }
a { color: var(--blau); text-underline-offset: 3px; }
code, kbd { padding: 1px 5px; border-radius: 3px 5px 4px 6px / 5px 3px 6px 4px; background: var(--bg-3); font: 600 0.875em ui-monospace, "Cascadia Mono", Consolas, monospace; }
.vor { font-size: 1.125rem; text-wrap: pretty; }
.meta, figcaption { color: var(--text-2); font-size: 0.9rem; }
mark { padding: 0 0.15em; background: var(--marker) center / 100% 100% no-repeat; color: inherit; }
img, svg { display: block; max-width: 100%; height: auto; }
li { margin-bottom: 6px; }

/* Gezeichnete Kästen wie die Fächer-Kacheln: ungleicher Strich, leicht überstehend; Karten mit einem Blatt dahinter */
.kasten, figure, .tabelle, .karten > li, .kreis > li, .start, .inhalt, .zeile-box {
  border: 1.5px solid transparent; border-image: var(--rahmen) 10 / 10px / 4px stretch; background-color: var(--papier);
}
:is(.karten, .kreis) > li:nth-child(even), figure:nth-of-type(even) { border-image-source: var(--rahmen-2); }
.karten > li, .kreis > li { box-shadow: 6px -6px 0 -1.5px var(--papier), 6px -6px 0 0 var(--linie-2); }
.kasten { padding: 12px 16px; border-image-source: var(--rahmen-blau); background-color: var(--blau-flaeche); }
figure { margin: 14px 0; padding: 12px 14px; }
figure svg, figure img { margin: 0 auto 8px; }
figcaption { margin: 0; }
.zwei { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.zwei figure { margin: 0; }

/* Kopf: Text links, Insel rechts */
.kopf { display: grid; gap: 8px 24px; align-items: center; }
@media (min-width: 720px) { .kopf { grid-template-columns: 1fr 260px; } }
.kopf img { width: min(260px, 55vw); margin: 0 auto; }
.start { padding: 14px 18px 8px; margin: 18px 0; }
.start h2 { margin: 0 0 6px; font-size: 1.125rem; }
.start ol { margin: 0; padding-left: 1.3em; }
.inhalt { padding: 12px 18px; }
.inhalt ul { columns: 2 200px; gap: 24px; margin: 6px 0 0; padding-left: 1.1em; }

/* Kreislauf als vier Karten mit Pfeilen */
.kreis { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 22px; margin: 14px 0; padding: 6px 0 0; list-style: none; counter-reset: k; }
.kreis > li { position: relative; margin: 0; padding: 12px 14px; counter-increment: k; }
.kreis b { display: flex; align-items: center; gap: 8px; }
.kreis b::before { content: counter(k); display: inline-grid; place-items: center; width: 24px; height: 24px; flex: none; border: 1.5px solid currentColor;
  border-radius: 5px 9px 6px 10px / 9px 5px 10px 6px; font-size: 0.8125rem; }
.kreis > li:last-child b::before { content: "↺"; }
.kreis span { display: block; margin-top: 4px; color: var(--text-2); font-size: 0.9rem; }

/* Cosmetics: acht Kacheln mit Bild, Platz, Beispiel und woher */
.karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 20px 18px; margin: 18px 0; padding: 6px 0 0; list-style: none; }
.karten > li { display: grid; grid-template-rows: auto auto 1fr; gap: 2px; margin: 0; padding: 12px 14px 12px; }
.karten img { width: 100%; height: 120px; object-fit: contain; margin-bottom: 8px; padding: 6px; background: var(--bg-2); }
.karten b { font-size: 1rem; }
.karten span { color: var(--text-2); font-size: 0.875rem; }

/* Tabellen im Rahmen, Zeilen mit gezeichnetem Strich */
.tabelle { margin: 12px 0; padding: 4px 6px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 0.95rem; }
th, td { padding: 9px 10px; text-align: left; vertical-align: top; background: var(--strich) left bottom / 360px 6px repeat-x; }
tr:last-child td { background: none; }
th { color: var(--text-2); font-size: 0.8125rem; font-weight: 650; }

/* Knöpfe und Zeilen (Verwaltung) */
button { min-height: 38px; padding: 6px 14px; border: 1.5px solid transparent; border-image: var(--rahmen) 10 / 8px / 3px stretch; background: var(--papier);
  color: var(--tinte); font: inherit; font-weight: 600; cursor: pointer; }
button.voll { border-image-source: var(--rahmen-blau); font-weight: 650; }
@media (hover: hover) { button:hover { background: var(--gelb); } button.voll:hover { background: var(--marker) center / 100% 100% no-repeat; } }
button:active { transform: scale(0.97); }
input { min-height: 36px; padding: 4px 8px; border: 1.5px solid var(--linie-2); border-radius: 3px 5px 4px 6px / 5px 3px 6px 4px; background: var(--papier); font: inherit; }
.zeile { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; padding: 10px 0; background: var(--strich) left bottom / 360px 6px repeat-x; }
.zeile > span:first-child { flex: 1 1 260px; }
#status { position: sticky; top: 0; padding: 8px 12px; border: 1.5px solid transparent; border-image: var(--rahmen) 10 / 10px / 4px stretch; background: var(--ok); }
#status:empty { display: none; }
@media (prefers-reduced-motion: reduce) { button:active { transform: none; } }
