:root {
  --bg: #f3fbf2;
  --ink: #1f2a2e;
  --muted: #4f6b5c;
  --accent: #2f9e44;
  --accent-2: #1c7c7c;
  --accent-3: #ffd43b;
  --card: #ffffff;
  --line: #d9ecd9;
  --shadow: 0 10px 30px rgba(31, 42, 46, 0.10);
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  color: var(--ink);
  background:
    radial-gradient(900px 450px at 10% -10%, rgba(47, 158, 68, 0.16), transparent 62%),
    radial-gradient(800px 420px at 95% 0%, rgba(255, 212, 59, 0.18), transparent 60%),
    radial-gradient(700px 520px at 80% 110%, rgba(28, 124, 124, 0.10), transparent 55%),
    var(--bg);
  font-family: "Space Grotesk", "IBM Plex Sans", "Avenir Next", "Segoe UI", sans-serif;
  line-height: 1.5;
}

a { color: inherit; text-decoration: none; }

header {
  position: sticky;
  top: 0;
  z-index: 20;
  backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--line);
}

.wrap {
  max-width: 1100px;
  margin: 0 auto;
  padding: 24px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 70%, var(--accent-2)));
  color: white;
  border-radius: 999px;
  font-size: 12px;
  letter-spacing: 0.3px;
  text-transform: uppercase;
  box-shadow: 0 10px 20px rgba(47, 158, 68, 0.18);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 10px;
  background: #effaf0;
  border-radius: 999px;
  font-size: 12px;
  color: var(--muted);
  border: 1px solid color-mix(in srgb, var(--line) 70%, #ffffff);
}

nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  padding: 10px 0 8px;
}

nav a {
  font-size: 14px;
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

nav a:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--accent) 70%, var(--accent-2));
  box-shadow: 0 10px 20px rgba(31, 42, 46, 0.06);
}

nav a[aria-current="page"] {
  border-color: var(--accent-2);
  background: #e8f7f2;
}

main.wrap { padding-top: 18px; }

section {
  padding: 22px 0;
  scroll-margin-top: 110px;
  animation: fadeUp 420ms ease both;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 24px;
  align-items: center;
  padding: 6px 0 18px;
}

.hero h1 {
  margin: 0 0 10px;
  font-size: clamp(28px, 4vw, 44px);
  line-height: 1.1;
}

.hero p { margin: 0 0 16px; color: var(--muted); }

.hero-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 18px;
  display: grid;
  gap: 10px;
}

.grid { display: grid; gap: 18px; }
.cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }

.section-title {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 8px;
}

.section-title span {
  font-size: 13px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.2em;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.card h3 { margin: 0 0 8px; }
.card p { margin: 0 0 10px; color: var(--muted); }

.note {
  background: #eefaf6;
  border: 1px solid #cfeee2;
  padding: 12px;
  border-radius: 12px;
  color: #224b3f;
  font-size: 14px;
}

.phase {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 14px;
  background: #fffaf0;
  border: 1px dashed color-mix(in srgb, var(--accent-3) 65%, var(--line));
}

.phase strong { font-size: 16px; }

.inputs { display: grid; gap: 12px; }

textarea, input[type="text"], input[type="number"], select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 14px;
  font-family: inherit;
  background: #fff;
}

textarea { min-height: 90px; resize: vertical; }

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.table {
  width: 100%;
  border-collapse: collapse;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--line);
}

.table th, .table td {
  border-bottom: 1px solid var(--line);
  padding: 8px;
  text-align: left;
  font-size: 14px;
  vertical-align: top;
}

.table th { background: #f5fbf2; }

.scale { display: grid; gap: 8px; }
input[type="range"] { width: 100%; }

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0 12px;
}

.tag {
  border: 1px solid var(--line);
  padding: 6px 10px;
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
  font-size: 14px;
  user-select: none;
  transition: transform 140ms ease, border-color 140ms ease, background 140ms ease;
}

.tag:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--accent) 55%, var(--line)); }
.tag.selected { background: #e8f7f2; border-color: var(--accent-2); }

.mcq {
  display: grid;
  gap: 8px;
}

.mcq button {
  text-align: left;
  border: 1px solid var(--line);
  background: #fff;
  padding: 10px 12px;
  border-radius: 12px;
  cursor: pointer;
  transition: border-color 160ms ease, transform 160ms ease, background 160ms ease;
}

.mcq button:hover { border-color: var(--accent-2); transform: translateY(-1px); background: #f7fffb; }
.mcq button.correct { border-color: #2f9e44; background: #e8f8ee; }
.mcq button.wrong { border-color: #e03131; background: #ffe8e8; }

.actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.btn {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 12px;
  padding: 8px 12px;
  cursor: pointer;
  font-size: 14px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  transition: transform 160ms ease, border-color 160ms ease, box-shadow 160ms ease;
}

.btn:hover { transform: translateY(-1px); border-color: color-mix(in srgb, var(--accent) 65%, var(--line)); box-shadow: 0 10px 18px rgba(31, 42, 46, 0.06); }

.btn.primary {
  background: linear-gradient(135deg, var(--accent-2), color-mix(in srgb, var(--accent-2) 70%, var(--accent)));
  color: #fff;
  border-color: transparent;
}

details {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fff;
  padding: 10px 12px;
}

details + details { margin-top: 10px; }

summary {
  cursor: pointer;
  font-weight: 700;
  list-style: none;
}

summary::-webkit-details-marker { display: none; }
details[open] { border-color: var(--accent-2); background: #fbfffd; }

.module-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.module {
  display: grid;
  gap: 10px;
  padding: 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: var(--card);
  box-shadow: var(--shadow);
  transition: transform 200ms ease, border-color 200ms ease, box-shadow 200ms ease;
}

.module:hover {
  transform: translateY(-2px);
  border-color: var(--accent-2);
  box-shadow: 0 12px 34px rgba(31, 42, 46, 0.12);
}

.module .meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 13px;
}

.module h3 { margin: 0; }
.module p { margin: 0; color: var(--muted); }

.total {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
}

.total strong { font-size: 18px; }
.total .value { font-variant-numeric: tabular-nums; }

.footer {
  border-top: 1px solid var(--line);
  padding: 20px 0 40px;
  color: var(--muted);
  font-size: 13px;
}

/* Page-specific tweaks */
body.page-abschluss textarea { min-height: 120px; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; }
  .cards-3 { grid-template-columns: 1fr; }
  .cards-2 { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .module-grid { grid-template-columns: 1fr; }
}
