:root {
  --bg: #f7f9fc;
  --surface: rgba(255, 255, 255, 0.88);
  --surface-solid: #ffffff;
  --text: #172033;
  --muted: #647089;
  --line: #e5eaf2;
  --accent: #5b5cf0;
  --accent-dark: #4546d2;
  --accent-soft: #ececff;
  --biology-soft: #e7f7f0;
  --chemistry-soft: #e9f1ff;
  --radius-sm: 14px;
  --radius: 22px;
  --shadow: 0 18px 45px rgba(32, 45, 72, 0.08);
  --max: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: radial-gradient(circle at 8% 5%, rgba(91, 92, 240, 0.10), transparent 26rem), radial-gradient(circle at 92% 35%, rgba(52, 120, 229, 0.08), transparent 25rem), var(--bg);
  font-family: "Avenir Next", Avenir, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
img, svg { display: block; max-width: 100%; }
.skip-link { position: fixed; z-index: 100; top: 12px; left: 12px; padding: 10px 16px; border-radius: 10px; color: white; background: var(--text); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.site-header { position: sticky; z-index: 20; top: 0; border-bottom: 1px solid rgba(229, 234, 242, 0.75); background: rgba(247, 249, 252, 0.82); backdrop-filter: blur(18px); }
.nav { width: min(calc(100% - 40px), var(--max)); min-height: 76px; margin: 0 auto; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; font-family: "Avenir Next", Avenir, system-ui, sans-serif; font-weight: 800; letter-spacing: -0.03em; }
.brand-mark { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; color: white; background: linear-gradient(135deg, #7375ff, #4c4dd8); box-shadow: 0 9px 22px rgba(91, 92, 240, 0.26); }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a { padding: 9px 13px; border-radius: 10px; color: var(--muted); font-size: 0.94rem; font-weight: 600; text-decoration: none; }
.nav-links a:hover { color: var(--text); background: var(--surface-solid); }
.container { width: min(calc(100% - 40px), var(--max)); margin: 0 auto; }
main { min-height: calc(100vh - 230px); }
.hero { padding: clamp(72px, 10vw, 126px) 0 70px; text-align: center; }
.eyebrow { width: fit-content; margin: 0 auto 18px; padding: 7px 12px; border: 1px solid #dcdcff; border-radius: 999px; color: var(--accent-dark); background: rgba(236, 236, 255, 0.72); font-size: 0.82rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
h1, h2, h3 { margin-top: 0; font-family: "Avenir Next", Avenir, system-ui, sans-serif; line-height: 1.15; letter-spacing: -0.045em; }
h1 { max-width: 820px; margin-right: auto; margin-bottom: 22px; margin-left: auto; font-size: clamp(2.7rem, 7vw, 5.4rem); }
h2 { font-size: clamp(1.75rem, 4vw, 2.45rem); }
h3 { margin-bottom: 8px; font-size: 1.22rem; }
.hero-text { max-width: 690px; margin: 0 auto 34px; color: var(--muted); font-size: clamp(1.05rem, 2vw, 1.23rem); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 48px; padding: 0 19px; border-radius: 13px; color: white; background: var(--accent); box-shadow: 0 11px 24px rgba(91, 92, 240, 0.22); font-weight: 700; text-decoration: none; transition: transform 160ms ease, background 160ms ease; }
.button:hover { background: var(--accent-dark); transform: translateY(-2px); }
.button svg, .card-arrow svg { width: 18px; height: 18px; }
.section { padding: 36px 0 86px; }
.section-heading { max-width: 650px; margin-bottom: 30px; }
.section-heading p { margin: 0; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.card { position: relative; min-height: 210px; padding: 28px; overflow: hidden; border: 1px solid rgba(229, 234, 242, 0.9); border-radius: var(--radius); background: var(--surface); box-shadow: 0 3px 0 rgba(32, 45, 72, 0.02); text-decoration: none; transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease; }
.card:hover { transform: translateY(-5px); border-color: #d9dfea; box-shadow: var(--shadow); }
.card p { margin: 0; color: var(--muted); }
.card-number { display: block; margin-bottom: 30px; color: var(--accent); font-family: "Avenir Next", Avenir, system-ui, sans-serif; font-size: 0.82rem; font-weight: 800; letter-spacing: 0.06em; }
.card-icon { width: 54px; height: 54px; margin-bottom: 42px; display: grid; place-items: center; border-radius: 17px; font-family: "Avenir Next", Avenir, system-ui, sans-serif; font-size: 1.35rem; font-weight: 800; }
.card-icon.biology { color: #267b5a; background: var(--biology-soft); }
.card-icon.chemistry { color: #285da9; background: var(--chemistry-soft); }
.card-arrow { position: absolute; right: 24px; bottom: 24px; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); background: var(--bg); }
.steps { margin-top: 22px; padding: 26px 30px; display: flex; align-items: center; justify-content: center; gap: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: rgba(255,255,255,.55); color: var(--muted); font-weight: 600; }
.steps strong { color: var(--text); }
.step-separator { color: #aab3c5; }
.page-hero { padding: 54px 0 36px; }
.page-hero h1 { max-width: 850px; margin: 14px 0 14px; font-size: clamp(2.25rem, 6vw, 4.2rem); }
.page-hero p { max-width: 680px; margin: 0; color: var(--muted); font-size: 1.08rem; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: 7px; color: var(--muted); font-size: 0.89rem; }
.breadcrumbs a { text-underline-offset: 3px; }
.breadcrumbs span[aria-current="page"] { color: var(--text); font-weight: 600; }
.topic-card { min-height: 180px; }
.topic-card .card-number { margin-bottom: 24px; }
.topic-card h2 { max-width: 88%; margin-bottom: 7px; font-size: clamp(1.25rem, 2.5vw, 1.55rem); }
.empty-state, .content-panel { padding: clamp(28px, 5vw, 46px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-solid); box-shadow: 0 2px 0 rgba(32, 45, 72, 0.02); }
.empty-state { text-align: center; }
.empty-icon { width: 52px; height: 52px; margin: 0 auto 18px; display: grid; place-items: center; border-radius: 16px; color: var(--accent); background: var(--accent-soft); font-size: 1.4rem; }
.empty-state p, .content-panel p { color: var(--muted); }
.legal-copy { max-width: 850px; }
.legal-copy h2 { margin-top: 38px; margin-bottom: 12px; font-size: 1.35rem; letter-spacing: -0.025em; }
.legal-copy h2:first-child { margin-top: 0; }
.legal-copy p { margin: 0 0 14px; }
.legal-copy address { color: var(--muted); font-style: normal; }
.legal-copy a { color: var(--accent-dark); text-underline-offset: 3px; overflow-wrap: anywhere; }
.back-link { display: inline-flex; align-items: center; gap: 8px; margin-top: 28px; color: var(--muted); font-weight: 700; text-decoration: none; }
.back-link:hover { color: var(--accent); }
.material-list { display: grid; gap: 12px; margin: 26px 0 0; padding: 0; list-style: none; }
.material-item { padding: 17px 18px; display: flex; align-items: center; justify-content: space-between; gap: 18px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); }
.material-content { display: grid; gap: 26px; margin-top: 26px; }
.material-session { padding: clamp(24px, 4vw, 36px); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-solid); box-shadow: 0 2px 0 rgba(32, 45, 72, 0.02); }
.material-session h2 { font-size: clamp(1.3rem, 3vw, 1.7rem); margin-bottom: 18px; }
.worksheet { margin: 18px 0; padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg); }
.worksheet:first-of-type { margin-top: 0; }
.worksheet-title { margin-bottom: 8px; font-weight: 800; color: var(--accent-dark); font-size: 1.02rem; }
.worksheet-hint { margin: 0 0 12px; color: var(--muted); font-size: 0.88rem; }
.worksheet p, .worksheet ol, .worksheet ul { margin: 0 0 10px; }
.worksheet p:last-child, .worksheet ol:last-child, .worksheet ul:last-child { margin-bottom: 0; }
.worksheet ol, .worksheet ul { padding-left: 22px; }
.worksheet li { margin-bottom: 4px; }
.callout { margin: 12px 0; padding: 12px 16px; border-left: 4px solid var(--accent); border-radius: 10px; background: var(--accent-soft); }
.callout p { margin: 0; }
.callout-basis { border-left-color: #3a7d3a; background: #eaf4ea; }
.callout-erweiterung { border-left-color: #d98c00; background: #fff4e5; }
.callout-hinweis { border-left-color: #b3261e; background: #fbe9e7; }
.solution { margin: 12px 0; padding: 12px 16px; border-left: 4px solid var(--accent); border-radius: 10px; background: var(--accent-soft); font-size: 0.94rem; }
.solution summary { cursor: pointer; font-weight: 700; color: var(--accent-dark); }
.solution[open] summary { margin-bottom: 8px; }
.solution p { margin: 0 0 8px; }
.solution p:last-child { margin-bottom: 0; }
.data-table { width: 100%; margin: 10px 0; border-collapse: collapse; font-size: 0.92rem; }
.data-table th, .data-table td { padding: 8px 10px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.data-table th { background: var(--accent); color: #fff; }
.ampel-legend { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0; }
.ampel-legend span { padding: 5px 12px; border-radius: 999px; font-size: 0.85rem; font-weight: 700; }
.ampel-green { background: #d9ead3; color: #2f5f2f; }
.ampel-yellow { background: #fff2cc; color: #7a5c00; }
.ampel-red { background: #f4cccc; color: #8a2c25; }
.fill-input { display: block; width: 100%; padding: 6px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-solid); font: inherit; color: var(--text); }
.fill-input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(91, 92, 240, 0.15); }
.fill-blank { display: inline-block; min-width: 46px; margin: 0 2px; padding: 2px 6px; border: none; border-bottom: 2px solid var(--accent); background: var(--accent-soft); border-radius: 4px 4px 0 0; font: inherit; color: var(--text); text-align: center; }
.fill-blank:focus { outline: none; background: #fff; }
.ampel-select { width: 100%; padding: 7px 8px; border: 1px solid var(--line); border-radius: 8px; background: var(--surface-solid); font: inherit; color: var(--text); }
.ampel-select:focus { outline: none; border-color: var(--accent); }
.answer-label { display: block; margin: 14px 0 6px; font-size: 0.83rem; font-weight: 700; letter-spacing: 0.01em; color: var(--muted); text-transform: uppercase; }
.answer-field { display: block; width: 100%; margin: 4px 0 0; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--surface-solid); font: inherit; color: var(--text); line-height: 1.5; resize: vertical; overflow: hidden; min-height: 56px; }
.answer-field:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(91, 92, 240, 0.15); }
.export-bar { margin-top: 30px; padding-top: 26px; border-top: 1px solid var(--line); text-align: center; }
.export-hint { margin: 10px 0 0; color: var(--muted); font-size: 0.85rem; }
@media print {
  .site-header, .site-footer, .skip-link, .back-link, .export-bar { display: none !important; }
  body { background: #fff !important; }
  .page-hero { padding: 0 0 14px; }
  .content-panel, .material-session, .worksheet { box-shadow: none !important; border-color: #ccc !important; background: #fff !important; }
  .callout, .solution { box-shadow: none !important; background: #fff !important; }
  .worksheet, .material-session, .callout, .solution, table { page-break-inside: avoid; break-inside: avoid; }
  .material-session h2, .worksheet-title { page-break-after: avoid; break-after: avoid; }
  .fill-input, .fill-blank, .answer-field, .ampel-select { border-color: #999 !important; background: #fff !important; color: #000 !important; }
}
.site-footer { margin-top: 70px; border-top: 1px solid var(--line); }
.footer-inner { min-height: 116px; display: flex; align-items: center; justify-content: space-between; gap: 24px; color: var(--muted); font-size: .9rem; }
.footer-links { display: flex; gap: 18px; }
.footer-links a { text-underline-offset: 3px; }
:focus-visible { outline: 3px solid rgba(91, 92, 240, 0.42); outline-offset: 3px; }
@media (max-width: 760px) {
  .nav { min-height: 68px; }
  .brand-name { display: none; }
  .nav-links a { padding: 8px; }
  .hero { padding-top: 68px; }
  .grid, .grid.three { grid-template-columns: 1fr; }
  .card { min-height: 185px; }
  .steps { align-items: flex-start; flex-direction: column; }
  .step-separator { transform: rotate(90deg); }
  .footer-inner { padding: 30px 0; align-items: flex-start; flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition-duration: .01ms !important; } }
