/* Shared Exercise Styles — franke-lab.de */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

*, *::before, *::after { box-sizing: border-box; }

:root {
  --bg: #ffffff;
  --fg: #0a0a0a;
  --border: #e2e8f0;
  --secondary: #f1f5f9;
  --muted: #64748b;
  --primary: #2563eb;
  --primary-light: #eff6ff;
  --accent: #f59e0b;
  --radius: 0.5rem;
  --shadow: 0 1px 3px rgba(0,0,0,0.07), 0 1px 2px rgba(0,0,0,0.04);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.05), 0 2px 4px rgba(0,0,0,0.04);
  --code-bg: #1e293b;
  --code-header-bg: #0f172a;
  --code-text: #e2e8f0;
  --code-border: #334155;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
  background: var(--bg);
  color: var(--fg);
  margin: 0;
  padding: 2rem 1.5rem 4rem;
  line-height: 1.7;
  font-size: 15px;
  max-width: 820px;
  margin-left: auto;
  margin-right: auto;
}

/* ── Header ── */
#header {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0 0 1.25rem;
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

#header img {
  width: 180px;
  height: auto;
  flex-shrink: 0;
}

#header div { flex: 1; text-align: right; }

#header h1 {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0;
  color: var(--fg);
  letter-spacing: -0.01em;
}

#header span {
  font-size: 0.75rem;
  color: var(--muted);
  display: block;
  margin-bottom: 0.125rem;
}

hr { display: none; }

/* ── Überschriften ── */
h1 { font-size: 1.25rem; font-weight: 700; color: var(--fg); letter-spacing: -0.02em; margin: 1.5rem 0 0.75rem; }
h2 { font-size: 1.125rem; font-weight: 600; color: var(--fg); letter-spacing: -0.01em; margin: 1.75rem 0 0.625rem; padding-top: 0.5rem; border-top: 1px solid var(--border); }
h3 { font-size: 1rem; font-weight: 600; color: #334155; margin: 1.25rem 0 0.5rem; }
h2:first-of-type { border-top: none; padding-top: 0; }

/* ── Text ── */
p { margin: 0.5rem 0; }
ul, ol { margin: 0.5rem 0 0.5rem 1.5rem; }
li { margin-bottom: 0.375rem; }

/* ── Links ── */
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
a:visited { color: #6d28d9; }

/* ── Inline Code ── */
code {
  color: var(--accent);
  background: var(--secondary);
  padding: 0.125rem 0.375rem;
  border-radius: 3px;
  font-size: 0.875em;
  font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', Consolas, monospace;
}

/* ── Code Container (Terminal-Style) ── */
.code-container {
  position: relative;
  margin: 1rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--code-border);
  box-shadow: var(--shadow-md);
  background: var(--code-bg);
}

.code-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: var(--code-header-bg);
  padding: 0.5rem 0.875rem;
  border-bottom: 1px solid var(--code-border);
}

.code-header span {
  color: #94a3b8;
  font-weight: 500;
  font-size: 0.6875rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.code-container p {
  color: var(--code-text);
  padding: 0 0.875rem;
  font-size: 0.8125rem;
  opacity: 0.7;
  margin: 0.25rem 0 0.5rem;
}

/* Pre/Code inside container */
.code-container pre {
  margin: 0;
  padding: 0.875rem;
  background: transparent;
  border-radius: 0;
}

.code-container pre code {
  background: transparent;
  padding: 0;
  color: var(--code-text);
  font-size: 0.875rem;
  font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', Consolas, monospace;
  line-height: 1.6;
}

/* Standalone pre (not in container) */
pre {
  margin: 0.75rem 0;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--code-bg);
  padding: 0.875rem;
  border: 1px solid var(--code-border);
}

pre code {
  background: transparent;
  padding: 0;
  color: var(--code-text);
  font-family: 'SF Mono', 'Cascadia Code', 'Fira Code', Consolas, monospace;
}

/* ── Language Label ── */
.language-label {
  display: inline-flex;
  align-items: center;
  background: var(--code-border);
  padding: 0.125rem 0.5rem;
  font-size: 0.625rem;
  border-radius: 3px;
  color: #94a3b8;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

/* ── Buttons ── */
button {
  background: none;
  border: 1px solid var(--border);
  color: var(--muted);
  cursor: pointer;
  font-size: 0.75rem;
  font-family: inherit;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  padding: 0.25rem 0.625rem;
  border-radius: 4px;
  transition: all 0.15s;
}

button:hover {
  background: var(--secondary);
  color: var(--fg);
}

/* Copy Button (inside dark container) */
.copy-btn {
  background: transparent;
  border: 1px solid var(--code-border);
  color: #94a3b8;
  font-size: 0.6875rem;
  padding: 0.1875rem 0.5rem;
  border-radius: 4px;
  font-family: inherit;
  transition: all 0.15s;
}

.copy-btn:hover {
  background: var(--code-border);
  color: #e2e8f0;
}

.next-button {
  background: var(--primary);
  color: #fff;
  border: none;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.8125rem;
}

.next-button:hover {
  background: #1d4ed8;
  color: #fff;
}

/* ── Icons ── */
.icon.copy-icon::before { content: '\1F4CB'; font-size: 0.75rem; }
.icon.check-icon::before { content: '\2714'; font-size: 0.75rem; }

/* ── Images ── */
img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
}

#image-placeholder {
  margin: 1rem 0;
  text-align: center;
}

#image-placeholder p {
  font-size: 0.6875rem;
  color: var(--muted);
}

/* ── Weiter-Link ── */
.link_weiter {
  text-align: right;
  margin-top: 1.5rem;
}

.link_weiter a {
  color: var(--primary);
  font-weight: 500;
}

/* ── Steps ── */
.steps-list li {
  list-style-type: decimal;
  margin-bottom: 0.625rem;
}

/* ── Blockquote ── */
blockquote {
  border-left: 3px solid var(--primary);
  margin: 1rem 0;
  padding: 0.75rem 1rem;
  background: var(--primary-light);
  border-radius: 0 var(--radius) var(--radius) 0;
  color: var(--fg);
  font-size: 0.9375rem;
}

/* ── Tables ── */
table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0;
  font-size: 0.875rem;
}

th, td {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border);
  text-align: left;
}

th {
  background: var(--secondary);
  font-weight: 600;
}

/* ── Responsive ── */
@media (max-width: 520px) {
  body { padding: 1rem; font-size: 14px; }
  #header img { width: 120px; }
}
