:root {
  --bg: #0d1117; --surface: #161b22; --border: #30363d;
  --text: #e6edf3; --muted: #8b949e; --accent: #58a6ff;
  --green: #3fb950; --orange: #d29922;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'SF Pro', system-ui, sans-serif;
  background: var(--bg); color: var(--text); min-height: 100vh; line-height: 1.7;
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.lang-switch {
  position: fixed; top: 1rem; right: 1.5rem; z-index: 100;
  display: flex; gap: 0.25rem; background: var(--surface); border: 1px solid var(--border);
  border-radius: 8px; padding: 0.2rem;
}
.lang-btn {
  padding: 0.3rem 0.6rem; border-radius: 6px; border: none;
  background: transparent; color: var(--muted); cursor: pointer;
  font-size: 0.8rem; font-weight: 600; transition: all 0.2s;
}
.lang-btn.active { background: var(--accent); color: var(--bg); }
.lang-btn:hover:not(.active) { color: var(--text); }
[lang="de"] .en, [lang="en"] .de { display: none; }
.container { max-width: 720px; margin: 0 auto; padding: 5rem 2rem 2rem; }
h1 { font-size: 2rem; font-weight: 800; margin-bottom: 0.5rem; }
h2 { font-size: 1.3rem; font-weight: 800; margin: 2.5rem 0 0.75rem; color: var(--accent); }
.subtitle { color: var(--muted); margin-bottom: 2rem; }
.step {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 1.5rem; margin-bottom: 1.5rem;
}
.step-header { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 1rem; }
.step-num {
  width: 32px; height: 32px; background: var(--accent); color: var(--bg);
  border-radius: 8px; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 0.9rem; flex-shrink: 0;
}
.step-title { font-weight: 700; font-size: 1.05rem; }
.step ol, .step ul { padding-left: 1.5rem; }
.step li { margin-bottom: 0.4rem; }
.checkpoint {
  background: rgba(63,185,80,0.1); border: 1px solid rgba(63,185,80,0.3);
  border-radius: 8px; padding: 0.75rem 1rem; margin-top: 1rem;
  font-size: 0.9rem; color: var(--green);
}
.tip {
  background: rgba(88,166,255,0.08); border: 1px solid rgba(88,166,255,0.2);
  border-radius: 8px; padding: 0.75rem 1rem; margin: 1rem 0;
  font-size: 0.9rem; color: var(--accent);
}
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 1.5rem; margin-bottom: 1rem; transition: transform 0.2s;
}
.card:hover { transform: translateY(-2px); }
.glossary {
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 1.5rem; margin: 2rem 0;
}
.glossary dt { font-weight: 700; color: var(--accent); margin-top: 0.75rem; }
.glossary dt:first-child { margin-top: 0; }
.glossary dd { color: var(--muted); font-size: 0.9rem; margin-left: 0; }
.celebration {
  text-align: center; padding: 2rem; background: var(--surface);
  border: 1px solid var(--green); border-radius: 12px; margin: 2rem 0;
}
.celebration h2 { color: var(--green); margin-bottom: 0.5rem; }
.btn {
  display: inline-block; background: var(--accent); color: var(--bg); padding: 0.75rem 2rem;
  border-radius: 8px; font-weight: 700; font-size: 1rem; border: none; cursor: pointer;
  text-decoration: none;
}
.btn:hover { opacity: 0.9; text-decoration: none; }
.back-link { display: inline-block; margin-bottom: 2rem; color: var(--muted); font-size: 0.9rem; }
.nav-footer { display: flex; justify-content: space-between; margin: 2rem 0; flex-wrap: wrap; gap: 1rem; }
footer {
  text-align: center; padding: 2rem; color: var(--muted); font-size: 0.8rem;
  border-top: 1px solid var(--border); max-width: 720px; margin: 2rem auto 0;
}
/* Focus styles for keyboard navigation */
a:focus-visible, button:focus-visible, .btn:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}
/* Skip link */
.skip-link {
  position: absolute; top: -100px; left: 1rem; z-index: 200;
  background: var(--accent); color: var(--bg); padding: 0.5rem 1rem;
  border-radius: 0 0 8px 8px; font-weight: 700; text-decoration: none;
  transition: top 0.2s;
}
.skip-link:focus { top: 0; }
/* Progress bar (behavioral) */
.progress-bar {
  position: fixed; top: 0; left: 0; width: 100%; height: 4px; z-index: 99;
  background: var(--border);
}
.progress-fill {
  height: 100%; background: var(--accent); transition: width 0.3s;
  border-radius: 0 2px 2px 0;
}
/* Source Citation */
.source { font-size: 0.78rem; color: var(--muted); background: var(--surface); border-radius: 6px; padding: 0.5rem 0.75rem; margin: 0.75rem 0; border-left: 2px solid #a78bfa; }
.source a { color: #a78bfa; }

/* Comparison Cards */
.comparison { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin: 1.5rem 0; }
.compare-card { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1.25rem; }
.compare-card.bad { border-color: rgba(248,81,73,0.4); }
.compare-card.good { border-color: rgba(63,185,80,0.4); }
.compare-card h4 { font-size: 0.9rem; margin-bottom: 0.5rem; }
.compare-card p, .compare-card ul { font-size: 0.85rem; color: var(--muted); margin: 0; }
.compare-card ul { padding-left: 1.25rem; }

/* Troubleshooting */
.troubleshooting { background: rgba(210,153,34,0.08); border: 1px solid rgba(210,153,34,0.2); border-radius: 8px; padding: 1rem 1.25rem; margin: 1rem 0; font-size: 0.85rem; }
.troubleshooting strong { color: var(--orange); }
.troubleshooting p { color: var(--muted); margin: 0.3rem 0; }

/* Glossary Widget */
.glossary-toggle { position: fixed; bottom: 1.5rem; right: 1.5rem; background: var(--surface); border: 1px solid var(--border); color: var(--text); padding: 0.6rem 1rem; border-radius: 20px; cursor: pointer; font-size: 0.8rem; font-weight: 700; z-index: 100; transition: all 0.2s; }
.glossary-toggle:hover { border-color: var(--accent); color: var(--accent); }
.glossary-panel { display: none; position: fixed; bottom: 4rem; right: 1.5rem; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 1.25rem; width: 280px; max-height: 400px; overflow-y: auto; z-index: 100; box-shadow: 0 8px 32px rgba(0,0,0,0.4); }
.glossary-panel.open { display: block; }
.glossary-panel h3 { font-size: 0.9rem; margin: 0 0 0.75rem; color: var(--accent); }
.glossary-panel dt { font-weight: 700; font-size: 0.85rem; color: var(--text); margin-top: 0.5rem; }
.glossary-panel dd { font-size: 0.8rem; color: var(--muted); margin: 0.15rem 0 0.5rem 0; line-height: 1.4; }

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

@media (max-width: 600px) {
  .container { padding: 4rem 1.25rem 1.5rem; }
  h1 { font-size: 1.6rem; }
  .comparison { grid-template-columns: 1fr; }
  .glossary-panel { width: calc(100vw - 3rem); right: 1.5rem; }
}
