:root {
  --bg: #0f172a;
  --panel: #111827;
  --panel-soft: #1f2937;
  --text: #f8fafc;
  --muted: #cbd5e1;
  --accent: #38bdf8;
  --accent-strong: #0ea5e9;
  --border: rgba(148, 163, 184, 0.25);
  --shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background:
    radial-gradient(circle at top, rgba(56, 189, 248, 0.2), transparent 28%),
    linear-gradient(180deg, #020617, #0f172a 55%, #111827);
  color: var(--text);
  line-height: 1.6;
}

img {
  max-width: 100%;
}

.hero {
  padding: 4rem 1.25rem 3rem;
}

.hero__content {
  max-width: 960px;
  margin: 0 auto;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--accent);
  font-weight: 700;
  font-size: 0.8rem;
}

.hero h1 {
  margin: 0.5rem 0 1rem;
  font-size: clamp(2.1rem, 4vw, 2.8rem);
  line-height: 1.1;
}

.hero p {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.05rem;
}

.hero__subtitle {
  margin: 0.25rem 0 0;
  font-size: 1.1rem;
  color: var(--muted);
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.button {
  text-decoration: none;
  border-radius: 999px;
  padding: 0.85rem 1.15rem;
  font-weight: 700;
  border: 1px solid transparent;
  transition: transform 140ms ease, background 140ms ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button--primary {
  background: var(--accent);
  color: #082f49;
}

.button--secondary {
  color: var(--text);
  border-color: var(--border);
  background: rgba(15, 23, 42, 0.45);
}

main {
  width: min(1100px, calc(100% - 2rem));
  margin: 0 auto;
  padding-bottom: 3rem;
}

.intro,
.tips,
.chapter,
.footer {
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.75);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.intro {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1.5rem;
  padding: 1.4rem;
  margin-bottom: 1.5rem;
}

.intro h2,
.chapters h2,
.tips h2,
.resource-overview h2 {
  margin-top: 0;
}

.intro p,
.chapter p,
.tips li,
.footer p,
.resource-overview p {
  color: var(--muted);
}

.stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
}

.resource-overview {
  margin: 0 0 1.5rem;
  padding: 1.4rem;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.75);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.resource-overview__heading {
  margin-bottom: 1rem;
}

.resource-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.resource-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1rem;
}

.resource-card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.resource-card p {
  margin-top: 0;
  margin-bottom: 1rem;
}

.resource-card a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.start-here {
  margin: 0 0 1.5rem;
  padding: 1.4rem;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.75);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.start-here__heading {
  margin-bottom: 1rem;
}

.start-guide {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.start-guide__item {
  display: flex;
  gap: 0.9rem;
  align-items: flex-start;
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1rem;
}

.start-guide__item span {
  min-width: 2rem;
  height: 2rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.18);
  color: var(--accent);
  font-weight: 800;
}

.start-guide__item h3 {
  margin: 0 0 0.35rem;
}

.start-guide__item p {
  margin: 0;
  color: var(--muted);
}

.how-to {
  margin: 0 0 1.5rem;
  padding: 1.4rem;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.75);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.how-to__heading {
  margin-bottom: 1rem;
}

.how-to__steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.how-to__item {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1rem;
}

.how-to__item h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.how-to__item p {
  margin: 0;
  color: var(--muted);
}

.command-reference {
  margin: 0 0 1.5rem;
  padding: 1.4rem;
  border: 1px solid var(--border);
  background: rgba(15, 23, 42, 0.75);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.command-reference__heading {
  margin-bottom: 1rem;
}

.command-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.command-card {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1rem;
}

.command-card h3 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.command-card p {
  margin: 0;
  color: var(--muted);
}

.stats div {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1rem;
  text-align: center;
}

.stats strong {
  display: block;
  font-size: 1.2rem;
  margin-bottom: 0.2rem;
}

.stats span {
  color: var(--muted);
  font-size: 0.95rem;
}

.chapters {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

#vorarbeiten {
  margin-top: 2.5rem;
}

.chapter {
  padding: 1.2rem 1.2rem 1.4rem;
}

.chapter h3 {
  margin: 0 0 0.4rem;
}

.chapter--extra {
  background: linear-gradient(180deg, rgba(14, 165, 233, 0.12), rgba(15, 23, 42, 0.78));
}

pre {
  margin: 1rem 0 0;
  padding: 1rem;
  background: rgba(15, 23, 42, 0.95);
  border-radius: 18px;
  overflow-x: auto;
  border: 1px solid rgba(56, 189, 248, 0.2);
}

code {
  font-family: "SFMono-Regular", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  color: #bae6fd;
}

.example-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.example-grid h4 {
  margin: 0 0 0.5rem;
}

.tips {
  margin-top: 1.5rem;
  padding: 1.2rem;
}

.tips ul {
  padding-left: 1.1rem;
  margin-bottom: 0;
}

.footer {
  width: min(1100px, calc(100% - 2rem));
  margin: 1rem auto 2rem;
  padding: 1rem 1.2rem;
  text-align: center;
}

/* Übungsaufgaben */
.exercises {
  margin-top: 1.25rem;
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 16px;
  background: rgba(56, 189, 248, 0.05);
  overflow: hidden;
}

.exercises summary {
  cursor: pointer;
  padding: 0.85rem 1.1rem;
  font-weight: 700;
  color: var(--accent);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  user-select: none;
}

.exercises summary::before {
  content: "▶";
  font-size: 0.75rem;
  transition: transform 200ms ease;
  display: inline-block;
}

.exercises[open] summary::before {
  transform: rotate(90deg);
}

.exercises ol {
  margin: 0;
  padding: 0.5rem 1.1rem 1rem 1.5rem;
  color: var(--muted);
  list-style: none;
}

.exercises li {
  margin-bottom: 0.6rem;
  line-height: 1.5;
}

.exercise-checkbox {
  vertical-align: middle;
  margin-right: 0.35rem;
  position: relative;
  top: -1px;
  cursor: pointer;
  accent-color: var(--accent);
}

.exercise--done .exercise-text {
  text-decoration: line-through;
  opacity: 0.45;
}

.weiterfuehrender-link {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--muted);
}

.weiterfuehrender-link a {
  color: var(--accent);
  text-decoration: none;
}

.weiterfuehrender-link a:hover {
  text-decoration: underline;
}

@media (max-width: 800px) {
  .intro {
    grid-template-columns: 1fr;
  }

  .stats,
  .example-grid {
    grid-template-columns: 1fr;
  }
}

/* Table of Contents */
.toc-container {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

.toc-container h3 {
  margin-top: 0;
  margin-bottom: 1rem;
  font-size: 1.25rem;
  color: var(--accent);
  letter-spacing: 0.05em;
}

.toc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 0.75rem;
}

.toc-item {
  display: flex;
  align-items: center;
  background: rgba(15, 23, 42, 0.4);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 0.75rem 1rem;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 0.95rem;
  transition: background 150ms ease, border-color 150ms ease, transform 150ms ease;
}

.toc-item:hover {
  background: rgba(56, 189, 248, 0.08);
  border-color: var(--accent);
  transform: translateY(-2px);
  color: var(--accent);
}



/* Language Switch */
.lang-switch {
  display: flex;
  gap: 0.4rem;
  margin-top: 1.25rem;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 0.85rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--muted);
  text-decoration: none;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  transition: border-color 140ms ease, color 140ms ease, background 140ms ease;
}

.lang-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.lang-btn--active {
  border-color: var(--accent);
  color: var(--accent);
  background: rgba(56, 189, 248, 0.1);
}

