/* Chasch KI? – gemeinsames Stylesheet
   CI: Terminal-Design (JetBrains Mono, «>», Cursor), dunkler Grund,
   Schweizer Rot #E4002B, Signalgelb #FFE14D fürs Stichwort.
   Schriften selbst gehostet (fonts/), keine externen Anfragen. */

@font-face { font-family: "JetBrains Mono"; src: url("fonts/JetBrainsMono-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("fonts/JetBrainsMono-Bold.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-Regular.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Inter"; src: url("fonts/Inter-SemiBold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --grund: #101012;
  --flaeche: #19191c;
  --flaeche-2: #222226;
  --linie: #34343a;
  --text: #f2f0eb;      /* Papier */
  --leise: #b4b1aa;     /* 8.6:1 auf --grund */
  --rot: #e4002b;
  --rot-hell: #ff4d6a;  /* Rot für kleine Schrift auf Dunkel, 5.3:1 */
  --gelb: #ffe14d;
  --mono: "JetBrains Mono", ui-monospace, Consolas, monospace;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mass: 40rem;        /* ca. 68 Zeichen Fliesstext */
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--grund);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1.0625rem;  /* 17 px */
  line-height: 1.65;
  overflow-wrap: break-word;
}
@media (min-width: 48rem) { body { font-size: 1.125rem; } } /* 18 px */

a { color: var(--text); text-decoration: underline; text-decoration-color: var(--gelb); text-decoration-thickness: 2px; text-underline-offset: 3px; }
a:hover { color: var(--gelb); }
:focus-visible { outline: 3px solid var(--gelb); outline-offset: 3px; border-radius: 2px; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 1rem; top: 1rem; background: var(--gelb); color: #111; padding: .5rem 1rem; z-index: 10; }

.wrap { max-width: var(--mass); margin: 0 auto; padding: 0 1.25rem; }
.wrap-breit { max-width: 64rem; margin: 0 auto; padding: 0 1.25rem; }

/* Kopf */
.kopf { border-bottom: 1px solid var(--linie); }
.kopf .wrap-breit { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 4rem; }
.logo { display: inline-flex; align-items: center; gap: .6rem; font-family: var(--mono); font-weight: 700; font-size: 1.125rem; text-decoration: none; color: var(--text); white-space: nowrap; }
.logo:hover { color: var(--text); }
.logo .prompt { color: var(--rot-hell); }
.kreuz { width: 1.5rem; height: 1.5rem; flex: none; display: block; }
.kopf nav a { font-family: var(--mono); font-size: .875rem; text-decoration: none; color: var(--leise); }
.kopf nav a:hover { color: var(--gelb); }

/* Titel mit Prompt und Cursor */
h1, h2, h3 { font-family: var(--mono); font-weight: 700; line-height: 1.2; letter-spacing: -.01em; }
h1 { font-size: clamp(1.75rem, 6vw, 2.75rem); margin: 2.5rem 0 1rem; }
h1 .prompt { color: var(--rot); margin-right: .35em; }
.cursor { display: inline-block; width: .55em; height: 1em; background: var(--rot); vertical-align: -.12em; margin-left: .12em; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .cursor { animation: none; } }
h2 { font-size: 1.3rem; margin: 2.75rem 0 .75rem; padding-top: .25rem; }
h2::before { content: "// "; color: var(--rot-hell); }
h3 { font-size: 1.05rem; margin: 1.75rem 0 .5rem; }
p { margin: 0 0 1rem; }
.lead { font-size: 1.15em; color: var(--text); }
.kicker { font-family: var(--mono); font-size: .875rem; color: var(--leise); margin: 2rem 0 0; letter-spacing: .02em; }
.stichwort { font-family: var(--mono); font-weight: 700; background: var(--gelb); color: #111; padding: .05em .4em; border-radius: 3px; white-space: nowrap; }

ol, ul { padding-left: 1.4rem; margin: 0 0 1.25rem; }
li { margin-bottom: .6rem; }
ol.schritte { list-style: none; counter-reset: s; padding-left: 0; }
ol.schritte > li { counter-increment: s; position: relative; padding-left: 2.6rem; margin-bottom: 1rem; }
ol.schritte > li::before { content: counter(s, decimal-leading-zero); position: absolute; left: 0; top: .05rem; font-family: var(--mono); font-weight: 700; font-size: .9rem; color: var(--gelb); }

strong { font-weight: 600; }
.ui { font-family: var(--mono); font-size: .92em; background: var(--flaeche-2); padding: .05em .35em; border-radius: 3px; }

/* Steckbrief */
.steckbrief { display: grid; grid-template-columns: 1fr; gap: 0; border: 1px solid var(--linie); border-radius: 6px; margin: 1.5rem 0 2rem; background: var(--flaeche); }
.steckbrief div { padding: .75rem 1rem; border-bottom: 1px solid var(--linie); }
.steckbrief div:last-child { border-bottom: 0; }
.steckbrief dt { font-family: var(--mono); font-size: .8rem; color: var(--leise); text-transform: uppercase; letter-spacing: .06em; }
.steckbrief dd { margin: .15rem 0 0; }
@media (min-width: 40rem) {
  .steckbrief { grid-template-columns: 1fr 1fr; }
  .steckbrief div:nth-child(odd) { border-right: 1px solid var(--linie); }
  .steckbrief div:nth-last-child(-n+2) { border-bottom: 0; }
}

/* Hinweis-Kästen */
.hinweis { border-left: 4px solid var(--gelb); background: var(--flaeche); padding: .9rem 1rem; margin: 1.25rem 0 1.5rem; border-radius: 0 6px 6px 0; }
.hinweis.achtung { border-left-color: var(--rot); }
.hinweis p:last-child, .hinweis ul:last-child { margin-bottom: 0; }

/* Befehle mit Kopier-Knopf */
.befehl { position: relative; margin: .75rem 0 1.25rem; }
.befehl pre { margin: 0; background: #0a0a0b; border: 1px solid var(--linie); border-radius: 6px; padding: .9rem 1rem; padding-right: 5.5rem; overflow-x: auto; font-family: var(--mono); font-size: .875rem; line-height: 1.55; color: var(--text); white-space: pre-wrap; word-break: break-word; }
.befehl pre::before { content: "> "; color: var(--rot-hell); }
.befehl.text pre::before { content: none; }
.kopieren { position: absolute; top: .5rem; right: .5rem; font-family: var(--mono); font-size: .8rem; background: var(--flaeche-2); color: var(--text); border: 1px solid var(--linie); border-radius: 4px; padding: .3rem .6rem; cursor: pointer; min-height: 2rem; }
.kopieren:hover { border-color: var(--gelb); }
.kopieren.ok { background: var(--gelb); color: #111; border-color: var(--gelb); }

/* Karten auf der Startseite */
.karten { list-style: none; padding: 0; margin: 1.5rem 0 2rem; display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 44rem) { .karten { grid-template-columns: 1fr 1fr; } }
@media (min-width: 64rem) { .karten { grid-template-columns: 1fr 1fr 1fr; } }
.karte { margin: 0; }
.karte a { display: flex; flex-direction: column; gap: .5rem; height: 100%; padding: 1.1rem 1.1rem 1.2rem; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 8px; text-decoration: none; color: var(--text); transition: border-color .15s; }
.karte a:hover { border-color: var(--gelb); color: var(--text); }
.karte .titel { font-family: var(--mono); font-weight: 700; font-size: 1.05rem; line-height: 1.3; }
.karte .titel::before { content: "> "; color: var(--rot-hell); }
.karte .kurz { color: var(--leise); font-size: .95rem; line-height: 1.5; }
.karte .stichwort { align-self: flex-start; font-size: .8rem; }

/* Profile */
.profile { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: .6rem; }
.profile a { display: inline-block; font-family: var(--mono); font-size: .9rem; border: 1px solid var(--linie); border-radius: 4px; padding: .45rem .8rem; text-decoration: none; }
.profile a:hover { border-color: var(--gelb); }

/* Newsletter (Platzhalter, noch ohne Ziel) */
.newsletter { margin: 3rem 0 2rem; padding: 1.25rem; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 8px; }
.newsletter h2 { margin-top: 0; }
.newsletter label { display: block; font-family: var(--mono); font-size: .875rem; color: var(--leise); margin-bottom: .35rem; }
.newsletter .zeile { display: flex; flex-wrap: wrap; gap: .6rem; }
.newsletter input[type=email] { flex: 1 1 14rem; min-width: 0; font: inherit; font-size: 1rem; padding: .65rem .8rem; background: #0a0a0b; color: var(--text); border: 1px solid var(--linie); border-radius: 4px; }
.newsletter button { font-family: var(--mono); font-weight: 700; font-size: .95rem; padding: .65rem 1rem; background: var(--rot); color: #fff; border: 0; border-radius: 4px; cursor: pointer; }
.newsletter button:disabled, .newsletter input:disabled { opacity: .55; cursor: not-allowed; }
.newsletter .klein { font-size: .875rem; color: var(--leise); margin-top: .75rem; }

/* Quellen und Stand */
.quellen { font-size: .9rem; color: var(--leise); }
.quellen a { color: var(--leise); }
.stand { font-family: var(--mono); font-size: .85rem; color: var(--leise); margin-top: 2.5rem; }

/* Fuss */
.fuss { border-top: 1px solid var(--linie); margin-top: 4rem; padding: 2rem 0 3rem; font-size: .9rem; color: var(--leise); }
.fuss .wrap-breit { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: space-between; align-items: center; }
.fuss nav { display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; }
.fuss a { color: var(--leise); }
.fuss a:hover { color: var(--gelb); }

.platzhalter { background: var(--gelb); color: #111; font-family: var(--mono); font-size: .92em; padding: .05em .35em; border-radius: 3px; }
.nw { white-space: nowrap; }
