/* Gemeinsames Layout der Werkzeug-Seiten (/werkzeuge/). Farben und Schriften wie index.html und die
   Rechtsseiten; die Schriften selbst kommen aus schriften.css, damit sie nicht in jeder Seite einzeln
   eingebettet sind (der Browser lädt sie einmal und nimmt sie dann aus dem Cache). */

:root {
  --ink: #0A0E14;
  --ink-deep: #05070A;
  --surface: #131A24;
  --surface-raised: #1B2432;
  --line: rgba(233, 228, 214, 0.14);
  --line-strong: rgba(233, 228, 214, 0.26);
  --parchment: #E9E4D6;
  --parchment-dim: #98A2B3;
  --parchment-faint: #5C6577;
  --brass: #D4A24C;
  --brass-bright: #E8BE70;
  --terrestrisch: #4CC733;
  --astronomie: #3FB2FF;
  --gezeiten: #E8C23A;

  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "IBM Plex Sans", -apple-system, "Segoe UI", sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Consolas, monospace;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--ink);
  color: var(--parchment);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--brass); color: var(--ink-deep); }

a { color: var(--brass-bright); text-decoration-color: rgba(212,162,76,0.4); text-underline-offset: 3px; }
a:hover { text-decoration-color: var(--brass-bright); }
a:focus-visible, button:focus-visible { outline: 2px solid var(--brass-bright); outline-offset: 3px; }

/* ---------- Kopf ---------- */
header { border-bottom: 1px solid var(--line); padding: 18px 24px; }
header .wrap { max-width: 860px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.brandlink { font-family: var(--font-display); font-weight: 600; font-size: 19px; color: var(--parchment); text-decoration: none; display: inline-flex; align-items: center; gap: 10px; }
.brandlink img { width: 30px; height: 30px; display: block; }
.brandlink:hover { color: var(--brass-bright); }
.header-right { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.navlink { font-size: 14px; color: var(--parchment-dim); text-decoration: none; }
.navlink:hover, .navlink[aria-current="page"] { color: var(--brass-bright); }

/* ---------- Inhalt ---------- */
main.doc { max-width: 860px; margin: 0 auto; padding: 40px 24px 80px; }

.breadcrumb { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.04em; color: var(--parchment-faint); margin: 0 0 18px; }
.breadcrumb a { color: var(--parchment-dim); text-decoration: none; }
.breadcrumb a:hover { color: var(--brass-bright); }

.eyebrow { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; margin: 0 0 8px; }
.eyebrow.terrestrisch { color: var(--terrestrisch); }
.eyebrow.astronomie { color: var(--astronomie); }
.eyebrow.gezeiten { color: var(--gezeiten); }

h1 { font-family: var(--font-display); font-weight: 600; font-size: clamp(28px, 4vw, 38px); line-height: 1.2; color: var(--parchment); margin: 0 0 14px; text-wrap: balance; }
.lead { font-size: 18px; color: var(--parchment); margin: 0 0 28px; max-width: 68ch; }

h2 {
  font-family: var(--font-display); font-weight: 600; font-size: 22px;
  color: var(--brass-bright); margin: 44px 0 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
h3 { font-family: var(--font-body); font-weight: 600; font-size: 17px; color: var(--parchment); margin: 26px 0 8px; }

p { margin: 0 0 14px; max-width: 72ch; }
ul, ol { margin: 0 0 14px; padding-left: 22px; max-width: 72ch; }
li { margin: 5px 0; }
strong { color: var(--parchment); }
code, .mono { font-family: var(--font-mono); font-size: 0.92em; color: var(--brass-bright); }

/* Hinweiskasten, z. B. "Nicht für die Navigation" */
.hinweis { border-left: 3px solid var(--brass); background: var(--surface); padding: 12px 16px; border-radius: 0 8px 8px 0; color: var(--parchment-dim); font-size: 15px; margin: 18px 0; max-width: 72ch; }
.hinweis strong { color: var(--parchment); }

/* Eckdaten-Liste unter dem Titel */
.eckdaten { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 30px; padding: 0; list-style: none; }
.eckdaten li { margin: 0; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.03em; color: var(--parchment-dim); border: 1px solid var(--line-strong); border-radius: 999px; padding: 4px 12px; }

/* Schritt-für-Schritt-Anleitung */
ol.schritte { list-style: none; padding: 0; counter-reset: schritt; max-width: none; }
ol.schritte > li { counter-increment: schritt; position: relative; padding: 0 0 8px 50px; margin: 0 0 22px; }
ol.schritte > li::before {
  content: counter(schritt); position: absolute; left: 0; top: 0;
  width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--brass);
  color: var(--brass-bright); font-family: var(--font-mono); font-weight: 600; font-size: 15px;
  display: flex; align-items: center; justify-content: center;
}
ol.schritte > li > h3 { margin-top: 4px; }

.pfad { font-family: var(--font-mono); font-size: 13.5px; color: var(--parchment-dim); background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 2px 8px; white-space: nowrap; }

/* Beispielrechnung */
.beispiel { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 16px 20px; margin: 18px 0; max-width: 72ch; }
.beispiel .frage { margin: 0 0 10px; }
.beispiel .ergebnis { font-family: var(--font-mono); font-size: 14px; color: var(--parchment); border-top: 1px solid var(--line); padding-top: 10px; margin: 0; }

/* ---------- Screenshots ----------
   Einheitliches Format 1080 x 1350 px (4:5 hochkant wie die Handy-Ansicht und Instagram, Stream-Deck-Tasten
   Fenster45 + Skaliere1080x1350). Auf der Seite höchstens 420 px breit, ein Klick zeigt die volle Höhe. */
figure.shot { margin: 18px 0 26px; max-width: 420px; }
figure.shot button { all: unset; display: block; width: 100%; cursor: zoom-in; border: 1px solid var(--brass); border-radius: 8px; overflow: hidden; background: var(--surface); }
figure.shot button:focus-visible { outline: 2px solid var(--brass-bright); outline-offset: 3px; }
figure.shot img { display: block; width: 100%; height: auto; aspect-ratio: 4 / 5; }
figure.shot figcaption { font-size: 13.5px; color: var(--parchment-dim); margin-top: 8px; }

/* Platzhalter, solange die Bilddatei noch fehlt (Entwurf) */
figure.shot.fehlt button { cursor: default; border-style: dashed; border-color: var(--line-strong); aspect-ratio: 4 / 5; display: flex; align-items: center; justify-content: center; text-align: center; padding: 20px; }
figure.shot.fehlt img { display: none; }
figure.shot.fehlt button::after { content: "Screenshot folgt · " attr(data-datei); font-family: var(--font-mono); font-size: 12.5px; color: var(--parchment-faint); }

.lightbox { position: fixed; inset: 0; background: rgba(5, 7, 10, 0.92); display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 50; cursor: zoom-out; }
.lightbox img { max-width: min(1080px, 96vw); max-height: 92vh; width: auto; height: auto; border: 1px solid var(--brass); border-radius: 10px; }

/* ---------- Werkzeug-Übersicht ---------- */
.gruppe { margin: 40px 0 0; }
.gruppe h2 { display: flex; align-items: baseline; gap: 12px; }
.gruppe h2 .zahl { font-family: var(--font-mono); font-size: 13px; color: var(--parchment-faint); font-weight: 400; }
.gruppe.terrestrisch h2 { color: var(--terrestrisch); }
.gruppe.astronomie h2 { color: var(--astronomie); }
.gruppe.gezeiten h2 { color: var(--gezeiten); }

.karten { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin: 16px 0 0; padding: 0; list-style: none; }
.karten li { margin: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 14px 16px; }
.karten li h3 { margin: 0 0 6px; font-size: 16px; }
.karten li p { margin: 0; font-size: 14px; color: var(--parchment-dim); }
.karten li a.mehr { display: inline-block; margin-top: 8px; font-size: 13.5px; }
.karten li.ausfuehrlich { border-color: rgba(212,162,76,0.45); }

/* ---------- Store-Aufruf ---------- */
.cta { margin: 48px 0 0; padding: 22px 24px; border: 1px solid var(--brass); border-radius: 12px; background: var(--surface); }
.cta p { margin: 0 0 12px; }
.cta a.knopf { display: inline-block; background: var(--brass); color: var(--ink-deep); font-weight: 600; text-decoration: none; padding: 10px 18px; border-radius: 8px; }
.cta a.knopf:hover { background: var(--brass-bright); }

/* ---------- Fuß ---------- */
footer { border-top: 1px solid var(--line); padding: 24px; margin-top: 40px; }
footer .wrap { max-width: 860px; margin: 0 auto; font-size: 13px; color: var(--parchment-faint); display: flex; gap: 18px; flex-wrap: wrap; }
footer a { color: var(--parchment-dim); }
footer a:hover { color: var(--brass-bright); }

@media (max-width: 560px) {
  main.doc { padding: 28px 16px 60px; }
  header { padding: 14px 16px; }
  ol.schritte > li { padding-left: 44px; }
}
