/* Kopf-aus — Warm Paper (mitfjodor Marke) */

:root {
  --bg:        #faf5ea;   /* warmes Papier-Creme */
  --bg2:       #f3ecdb;   /* tieferes Creme, für Sections */
  --surf:      #fdfaf1;   /* elevated paper — fast weiß */
  --surf2:     #f8f1e0;   /* card surface, warm */
  --line:      #e8dcc1;   /* subtile Borders */
  --line2:     #d4c39c;   /* stärkere Borders */
  --text:      #1d2a23;   /* tiefe Tinte mit Grünstich */
  --dim:       #4a5850;   /* gedämpfte Tinte */
  --mute:      #677066;   /* stärker gedämpft — auf 4.5:1 AA-Kontrast angepasst */
  --brass:     #8a6d28;   /* mattes Messing */
  --brass-hi:  #886a26;   /* satter Brass für Hover/Links — auf 4.5:1 AA-Kontrast angepasst */
  --brass-lo:  #6d5620;   /* tiefer Brass für Pressed */
  --brass-soft: rgba(138,109,40,0.10);
  --forest:    #2d4a37;   /* Forstgrün — Akzent */
  --forest-hi: #3a6248;

  --sans:  "Mulish", -apple-system, BlinkMacSystemFont, sans-serif;
  --serif: "Lora", Georgia, serif;
  --mono:  "JetBrains Mono", ui-monospace, monospace;

  --maxw: 760px;
  --px:   clamp(18px, 5vw, 40px);
  --radius: 6px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* Grain overlay */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9000;
  opacity: 0.05;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='256' height='256'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

a { color: var(--brass-hi); text-decoration: none; }
a:hover { color: var(--brass); }

.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--px); }

/* ---- Top bar ---- */
.scrollbar {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: var(--brass);
  z-index: 600;
  transition: width .08s linear;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 500;
  background: rgba(250, 245, 234, 0.9);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.topbar .wrap {
  max-width: 960px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-block: 14px;
}
.brand {
  font-family: var(--serif);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}
.brand .dot { color: var(--brass-hi); font-style: italic; }

nav.daynav { display: flex; gap: 6px; flex-wrap: wrap; }
nav.daynav a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  padding: 6px 16px;
  border-radius: 99px;
  border: 1px solid var(--line);
  text-decoration: none;
  color: var(--mute);
  white-space: nowrap;
  transition: color .15s, border-color .15s, background .15s;
}
nav.daynav a:hover { color: var(--brass-hi); border-color: var(--line2); }
nav.daynav a.active { border-color: var(--brass); color: var(--brass-hi); background: var(--brass-soft); }
nav.daynav a.locked { opacity: 0.4; pointer-events: none; }

.skip-link {
  position: absolute;
  top: -60px;
  left: 12px;
  z-index: 999;
  background: var(--brass);
  color: var(--bg);
  font-family: var(--mono);
  font-size: 0.82rem;
  padding: 12px 20px;
  border-radius: var(--radius);
  text-decoration: none;
  transition: top .15s ease;
}
.skip-link:focus { top: 12px; }

main { padding: clamp(40px, 7vw, 72px) 0 96px; }

.hero { padding: clamp(12px, 4vw, 40px) 0 clamp(28px, 5vw, 44px); }
.hero h1 { font-size: clamp(2.6rem, 6vw, 4rem); }
.hero-trust {
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  color: var(--mute);
  margin-top: 24px;
}
.hero-trust::before { content: "✓ "; color: var(--brass); }

/* ---- Typography ---- */
.eyebrow {
  font-family: var(--mono);
  text-transform: uppercase;
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  color: var(--brass);
  margin: 0 0 18px;
}

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.02em; line-height: 1.1; color: var(--text); }

h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); margin: 0 0 20px; }
h1 em, h2 em, h3 em { font-style: italic; font-weight: 400; color: var(--brass-hi); }

h2 {
  font-size: clamp(1.5rem, 3vw, 2rem);
  margin: 56px 0 18px;
  padding-top: 34px;
  border-top: 1px solid var(--line);
}
h2:first-of-type { border-top: none; padding-top: 0; margin-top: 40px; }

h3 { font-size: 1.15rem; margin: 0 0 8px; color: var(--text); }

p { margin: 0 0 16px; color: var(--dim); line-height: 1.75; }

.lede { font-size: 1.2rem; color: var(--text); line-height: 1.6; }
.lede em { font-style: italic; color: var(--brass-hi); }

/* ---- Cards ---- */
.card {
  background: var(--surf2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
  margin-bottom: 20px;
}
.card h3:first-child { margin-top: 0; }

.card.placeholder {
  border-style: dashed;
  border-color: var(--line2);
  background: var(--brass-soft);
}
.card.placeholder .tag {
  display: inline-block;
  font-family: var(--mono);
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brass-hi);
  border: 1px solid var(--line2);
  border-radius: 99px;
  padding: 3px 10px;
  margin-bottom: 12px;
}

/* ---- Schedule ---- */
.schedule { display: grid; gap: 0; }
.schedule .row {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 16px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}
.schedule .row:last-child { border-bottom: none; }
.schedule .row:first-child { padding-top: 0; }
.schedule .time { font-family: var(--mono); color: var(--brass-hi); font-size: 0.82rem; letter-spacing: 0.02em; padding-top: 2px; }
.schedule .what strong { color: var(--text); font-weight: 600; }
.schedule .what span { display: block; color: var(--mute); font-size: 0.92rem; margin-top: 2px; }

/* ---- Day link cards ---- */
.daygrid { display: grid; gap: 10px; }
.daycard {
  display: flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
  background: var(--surf2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px 20px;
  transition: border-color .18s, transform .18s, box-shadow .18s, opacity .18s, background .18s;
}
.daycard:hover {
  border-color: var(--brass);
  transform: translateY(-2px);
  box-shadow: 0 14px 30px -18px rgba(29, 42, 35, 0.35);
}
.daycard .dc-icon {
  display: none;
  flex-shrink: 0;
  align-items: center;
  justify-content: center;
  color: var(--brass);
}
.daycard .dc-body { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.daycard .label {
  font-family: var(--mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--brass);
}
.daycard .title { font-family: var(--serif); color: var(--text); font-size: 1.1rem; font-weight: 500; margin-top: 3px; }
.daycard .status {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--mute);
  letter-spacing: 0.03em;
  flex-shrink: 0;
  white-space: nowrap;
}

.daycard.locked {
  opacity: 0.7;
  background: var(--bg2);
  pointer-events: none;
  cursor: default;
}
.daycard.locked:hover { transform: none; box-shadow: none; border-color: var(--line); }
.daycard.locked .dc-icon { display: flex; }
.daycard.locked .title { color: var(--dim); }

/* ---- Workbook questions ---- */
.question {
  border-left: 2px solid var(--brass);
  padding: 2px 0 2px 18px;
  margin-bottom: 24px;
}
.question .qnum {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--brass);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 4px;
}
.question p { color: var(--text); margin-bottom: 0; }
.question textarea {
  width: 100%;
  margin-top: 12px;
  background: var(--surf);
  border: 1px solid var(--line2);
  border-radius: var(--radius);
  color: var(--text);
  font-family: var(--sans);
  font-size: 0.98rem;
  line-height: 1.6;
  padding: 12px 14px;
  min-height: 76px;
  resize: vertical;
  transition: border-color .15s, box-shadow .15s;
}
.question textarea:focus {
  outline: none;
  border-color: var(--brass);
  box-shadow: 0 0 0 3px var(--brass-soft);
}
.question textarea::placeholder { color: var(--mute); }

.save-badge {
  display: block;
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: var(--brass-hi);
  text-transform: uppercase;
  margin-top: 6px;
  opacity: 0;
  transform: translateY(-2px);
  transition: opacity .25s ease, transform .25s ease;
}
.save-badge::before { content: "✓ "; }
.save-badge.show { opacity: 1; transform: translateY(0); }

/* ---- Media slots ---- */
.mediaslot {
  border: 1px dashed var(--line2);
  border-radius: var(--radius);
  padding: 32px 22px;
  text-align: center;
  color: var(--mute);
  background: var(--surf);
  margin-bottom: 20px;
}
.mediaslot .icon { font-size: 1.5rem; margin-bottom: 8px; color: var(--brass); }
.mediaslot .label {
  font-family: var(--mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--brass);
}
audio { width: 100%; margin-top: 12px; }

/* ---- Atem-Pacer ---- */
.breath-card { text-align: center; padding: 40px 24px 32px; }
.breath-wrap { display: flex; justify-content: center; align-items: center; height: 220px; }
.breath-circle {
  width: 140px;
  height: 140px;
  border-radius: 50%;
  background: var(--forest);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: scale(1);
  box-shadow: 0 0 0 10px rgba(45, 74, 55, 0.08), 0 18px 40px -12px rgba(45, 74, 55, 0.4);
}
.breath-circle span {
  font-family: var(--mono);
  font-weight: 500;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--bg);
}
.breath-controls { display: flex; flex-direction: column; align-items: center; gap: 12px; margin-top: 8px; }
.breath-hint { font-family: var(--mono); font-size: 0.72rem; color: var(--mute); letter-spacing: 0.02em; }

/* ---- Technik-Check ---- */
.techstep { padding: 18px 0; border-top: 1px solid var(--line); }
.techstep:first-child { border-top: none; padding-top: 4px; }
.techstep h3 { margin-bottom: 6px; }
.techstep p { font-size: 0.94rem; margin-bottom: 12px; }
#camPreview {
  width: 100%;
  max-width: 280px;
  border-radius: var(--radius);
  border: 1px solid var(--line2);
  display: block;
  margin-top: 12px;
}
.miclevel {
  max-width: 280px;
  height: 8px;
  border-radius: 99px;
  background: var(--bg2);
  border: 1px solid var(--line);
  overflow: hidden;
  margin-top: 10px;
}
.miclevel-bar { height: 100%; width: 0%; background: var(--brass); transition: width .08s linear; }
.techstatus { font-size: 0.85rem; color: var(--brass-hi); margin-top: 10px; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 13px 24px;
  border-radius: var(--radius);
  border: none;
  cursor: pointer;
  background: var(--brass);
  color: var(--bg);
  transition: all .18s cubic-bezier(.4, 0, .2, 1);
}
.btn:hover {
  background: var(--brass-hi);
  color: var(--bg);
  transform: translateY(-2px);
  box-shadow: 0 12px 28px -12px rgba(138, 109, 40, 0.5);
}
.btn:active { background: var(--brass-lo); transform: translateY(0); }
.btn.ghost {
  background: transparent;
  border: 1px solid var(--line2);
  color: var(--dim);
}
.btn.ghost:hover { border-color: var(--brass); color: var(--brass-hi); background: var(--brass-soft); box-shadow: none; }

.btn-disabled,
.btn-disabled.ghost {
  background: var(--bg2);
  border: 1px dashed var(--line2);
  color: var(--mute);
  cursor: default;
  pointer-events: none;
}
.btn-disabled:hover { transform: none; box-shadow: none; background: var(--bg2); }
.btn-disabled::after { content: none; }
.btn.btn-sm { min-height: 40px; padding: 8px 15px; font-size: 0.7rem; }
.ics-btn { margin-top: 8px; }

/* ---- Recipe cards ---- */
.recipe {
  background: var(--surf2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px 26px;
  margin-bottom: 20px;
}
.recipe .meta {
  display: flex;
  gap: 16px;
  font-family: var(--mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brass);
  margin-bottom: 12px;
}
.recipe h3 { margin-top: 22px; font-family: var(--serif); }
.recipe h3:first-of-type { margin-top: 0; }
.recipe .listlabel {
  font-family: var(--mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brass-hi);
  margin: 14px 0 6px;
}
.recipe ul { color: var(--dim); margin: 0 0 8px; padding-left: 20px; }
.recipe li { margin: 3px 0; }

/* ---- Notfallkarte ---- */
.notfallkarte { border: 2px solid var(--brass); background: var(--surf); }
.notfallkarte ol { margin: 0 0 18px; padding-left: 22px; }
.notfallkarte li { margin-bottom: 14px; color: var(--dim); }
.notfallkarte li strong { color: var(--text); font-weight: 600; }

/* ---- Checkliste ---- */
.checklist { list-style: none; margin: 0; padding: 0; }
.checklist li {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}
.checklist li:last-child { border-bottom: none; }
.checklist input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--brass); flex-shrink: 0; }
.checklist label { color: var(--dim); font-size: 0.98rem; }
.checklist input:checked + label { text-decoration: line-through; color: var(--mute); }
.checklist-progress {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--brass);
  margin-bottom: 14px;
  text-transform: uppercase;
}

/* ---- Footer ---- */
footer {
  border-top: 1px solid var(--line);
  padding: 28px 0 64px;
  color: var(--mute);
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.03em;
}

@media (max-width: 480px) {
  .topbar .wrap { flex-direction: column; align-items: flex-start; gap: 12px; }
  .schedule .row { grid-template-columns: 76px 1fr; gap: 12px; }
  .daycard { flex-wrap: wrap; }
  .daycard .status { margin-left: 29px; }
}

/* ---- Print: Notfallkarte ---- */
@media print {
  body.print-notfallkarte-only .topbar,
  body.print-notfallkarte-only footer,
  body.print-notfallkarte-only main > *:not(.notfallkarte-print) { display: none !important; }
  body.print-notfallkarte-only { background: #fff; color: #000; }
  body.print-notfallkarte-only::after { display: none; }
  body.print-notfallkarte-only .notfallkarte { border: 2px solid #000; background: #fff; }
  body.print-notfallkarte-only .notfallkarte li,
  body.print-notfallkarte-only .notfallkarte li strong,
  body.print-notfallkarte-only .notfallkarte-print h2,
  body.print-notfallkarte-only .notfallkarte-print p { color: #000; }
}
