/* zielsy – Styles nach Corporate Design Manual:
   Farben Focus Violet, Lime Signal, Deep Ink, Warm Paper; Arial ohne externe Schriftdateien;
   8-px-Raster, Karten 16 px und Buttons 12 px Radius, dünne Linien, Fläche ca. 70 % hell / 20 % dunkel / 10 % Marke. */

:root {
  --violet: #6246EA;        /* Focus Violet: Hauptaktionen, Auswahl, Markenflächen */
  --violet-dark: #4F35D6;
  --violet-soft: #ECE8FD;
  --lime: #D7F75B;          /* Lime Signal: kleine Akzente, nie als Text auf Papier */
  --lime-soft: #F2FCCE;
  --ink: #171C2C;           /* Deep Ink: Titel, Fliesstext, dunkle Flächen */
  --ink-2: #565D70;         /* Slate: Sekundärtext */
  --paper: #F7F6F2;         /* Warm Paper: Hintergrund */
  --white: #FFFFFF;
  --line: #DCDDE4;
  --row: #F3F2F8;
  --ok: #1F7A45;
  --error: #B42318;
  --radius: 16px;
  --radius-btn: 12px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(23, 28, 44, .05);
  --max: 1120px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: Arial, Helvetica, sans-serif; font-size: 17px; line-height: 1.5;
  color: var(--ink); background: var(--paper);
}
img, svg { max-width: 100%; display: block; }
a { color: var(--violet); text-underline-offset: 2px; }
a:hover { color: var(--violet-dark); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
.muted { color: var(--ink-2); }
.small { font-size: .875rem; }
.container { width: min(100% - 40px, var(--max)); margin-inline: auto; }
.visually-hidden, .sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--ink); color: var(--white); padding: 8px 16px; z-index: 10; }
.skip-link:focus { left: 16px; }
:focus-visible { outline: 3px solid var(--violet); outline-offset: 2px; }

/* Header */
.site-header { background: var(--white); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 5; }
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 8px; text-decoration: none; color: var(--ink); min-width: 140px; }
.brand svg { width: 32px; height: auto; }
.brand span { font-weight: 700; font-size: 1.75rem; letter-spacing: -0.04em; line-height: 1; }
.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav a:not(.btn) { color: var(--ink); text-decoration: none; padding: 10px 12px; border-radius: var(--radius-btn); font-weight: 700; font-size: .94rem; }
.nav a:not(.btn):hover, .nav a[aria-current="page"] { background: var(--violet-soft); color: var(--violet-dark); }
.nav form { margin: 0; }

/* Buttons: höchstens eine dominante Aktion je Karte */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-size: 1rem; font-weight: 700;
  min-height: 44px; padding: 10px 20px; border-radius: var(--radius-btn); border: 1.5px solid transparent; cursor: pointer; text-decoration: none;
  background: var(--violet); color: var(--white); transition: background .15s, transform .15s; line-height: 1.2;
}
.btn:hover { background: var(--violet-dark); color: var(--white); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .6; cursor: default; }
.btn-lg { min-height: 52px; padding: 14px 28px; font-size: 1.06rem; }
.btn-lime { background: var(--lime); color: var(--ink); }
.btn-lime:hover { background: #C8EC3D; color: var(--ink); }
.btn-ghost { background: var(--white); color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { background: var(--white); color: var(--ink); border-color: var(--ink); }
.btn-small { min-height: 44px; padding: 8px 14px; font-size: .92rem; }
.btn-block { width: 100%; }

/* Eyebrow: kurzer violetter Strich und Label in Grossbuchstaben */
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; font-size: .78rem; color: var(--violet); margin: 0 0 8px; }
.eyebrow::before { content: ""; width: 24px; height: 3px; border-radius: 2px; background: var(--violet); }
.on-dark .eyebrow, .eyebrow-lime { color: var(--lime); }
.on-dark .eyebrow::before, .eyebrow-lime::before { background: var(--lime); }

/* Startseite: helle Fläche, Markenfarbe als Akzent */
.hero { padding: clamp(48px, 8vw, 96px) 0 clamp(40px, 6vw, 72px); }
.hero .container { display: grid; gap: 48px; grid-template-columns: 1.15fr 1fr; align-items: center; }
.hero h1 { color: var(--ink); }
.nowrap { white-space: nowrap; }
.hero h1 mark { background: none; color: var(--violet); }
.hero p.lead { font-size: 1.2rem; color: var(--ink-2); max-width: 34rem; }
.hero .actions { display: flex; gap: 16px; flex-wrap: wrap; align-items: center; margin-top: 24px; }
.hero-card { background: var(--white); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: 0 16px 40px rgba(23, 28, 44, .08); }
.hero-card .tag { margin-bottom: 8px; }
.hero-card ul { margin: 8px 0 0; padding: 0; list-style: none; }
.hero-card li { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line); }
.hero-card li::before { content: ""; flex: 0 0 auto; width: 12px; height: 12px; margin-top: 6px; border-radius: 3px; background: var(--lime); }
.hero-card .progress { margin-top: 16px; }

/* Dunkle Kampagnenfläche (Deep Ink mit Lime-Akzent) */
.band { background: var(--ink); color: var(--white); padding: clamp(40px, 7vw, 72px) 0; }
.band h2 { color: var(--white); max-width: 22ch; }
.band h2 mark { background: none; color: var(--lime); }
.band p { color: #C9CCDA; max-width: 40rem; }
.band .btn-ghost { background: transparent; color: var(--white); border-color: rgba(255, 255, 255, .5); }
.band .btn-ghost:hover { border-color: var(--white); }

/* Sections */
.section { padding: clamp(48px, 7vw, 80px) 0; }
.section-alt { background: var(--white); border-block: 1px solid var(--line); }
.section-head { max-width: 40rem; margin-bottom: 32px; }
.grid { display: grid; gap: 24px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.section-alt .card { background: var(--paper); box-shadow: none; }
.step-num { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--lime); color: var(--ink); font-weight: 700; margin-bottom: 16px; }
.tag { display: inline-block; font-size: .8rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; background: var(--violet-soft); color: var(--violet-dark); }
.tag-lime { background: var(--lime); color: var(--ink); }
.tag-grey { background: #ECECF0; color: var(--ink-2); }

/* Callouts: Lime-Box mit fettem Titel oder violett-zarte Box */
.callout { background: var(--lime-soft); border: 1px solid #DDEFA0; border-left: 6px solid var(--lime); border-radius: var(--radius); padding: 16px 20px; }
.callout-violet { background: var(--violet-soft); border-color: #D9D1FB; border-left-color: var(--violet); }
.callout strong:first-child { display: block; margin-bottom: 4px; }

/* Pricing */
.plan { display: flex; flex-direction: column; }
.plan ul { padding-left: 1.1rem; margin: 0 0 1.2rem; }
.plan li { margin-bottom: .35rem; }
.plan .btn { margin-top: auto; }
.plan-premium { border: 2px solid var(--violet); }

/* Progress */
.progress { height: 8px; background: #E9E9EF; border-radius: 999px; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--violet); border-radius: inherit; }

/* Forms */
.form-page { padding: clamp(32px, 6vw, 64px) 0; }
.form-card { max-width: 30rem; margin-inline: auto; }
.form-card.wide { max-width: 42rem; }
label { display: block; font-weight: 700; font-size: .94rem; margin-bottom: 6px; }
.field { margin-bottom: 24px; }
.field .hint { font-size: .875rem; color: var(--ink-2); margin-top: 6px; }
input[type="text"], input[type="email"], input[type="password"], input[type="date"], input[type="search"], select, textarea {
  width: 100%; min-height: 44px; font: inherit; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--white); color: var(--ink);
}
input:focus, select:focus, textarea:focus { border-color: var(--violet); outline: none; box-shadow: 0 0 0 3px var(--violet-soft); }
.checkbox { display: flex; gap: 10px; align-items: flex-start; font-weight: 400; }
.checkbox input { margin-top: 5px; width: 18px; height: 18px; accent-color: var(--violet); flex: none; }
/* Meldungen: Farbe nie allein, immer mit Zeichen und Text */
.alert { position: relative; padding: 12px 16px 12px 46px; border-radius: var(--radius-sm); margin-bottom: 24px; }
.alert::before { position: absolute; left: 14px; top: 13px; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; font-weight: 700; font-size: .8rem; line-height: 1; }
.alert-error { background: #FDECEA; color: var(--error); border: 1px solid #F5C2BC; }
.alert-error::before { content: "!"; background: var(--error); color: var(--white); }
.alert-ok { background: #E8F5EE; color: var(--ok); border: 1px solid #BFE3CD; }
.alert-ok::before { content: "✓"; background: var(--ok); color: var(--white); }
.alert-info { background: var(--violet-soft); color: var(--violet-dark); }
.alert-info::before { content: "i"; background: var(--violet); color: var(--white); }
.alert ul { margin: .3rem 0 0; padding-left: 1.1rem; }


/* Dashboard */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; }
.empty { text-align: center; padding: 3rem 1.5rem; }
.empty .mark { width: 56px; margin: 0 auto 1rem; }
.exam-list { display: grid; gap: 1rem; }
.exam { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center; }
.exam .meta { display: flex; gap: .5rem; flex-wrap: wrap; font-size: .9rem; color: var(--ink-2); }

/* Demo quiz */
.quiz { display: grid; gap: 1.25rem; }
.question fieldset { border: 0; padding: 0; margin: 0; }
.question legend { font-weight: 600; margin-bottom: .6rem; }
.option { display: flex; gap: .6rem; align-items: flex-start; min-height: 44px; padding: .65rem .8rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); margin-bottom: .5rem; cursor: pointer; font-weight: 400; background: var(--white); }
.option:hover { border-color: var(--violet); }
.option input { margin-top: .3rem; }
.option.correct { border-color: var(--ok); background: #EEF8F2; }
.option.wrong { border-color: var(--error); background: #FCEFEE; }
.feedback { display: none; margin-top: .6rem; padding: .75rem .9rem; border-radius: var(--radius-sm); background: var(--paper); font-size: .95rem; }
.feedback.show { display: block; }
.objectives { counter-reset: obj; list-style: none; padding: 0; margin: 0; }
.objectives li { counter-increment: obj; display: flex; gap: .7rem; padding: .55rem 0; border-top: 1px solid var(--line); }
.objectives li::before { content: counter(obj); flex: 0 0 1.7rem; height: 1.7rem; display: grid; place-items: center; border-radius: 6px; background: var(--violet-soft); color: var(--violet-dark); font-weight: 700; font-size: .85rem; }

/* Legal / prose */
.prose { max-width: 46rem; }
.prose h2 { font-size: 1.4rem; margin-top: 2rem; }

/* Footer */
.site-footer { background: var(--ink); color: #C9CCDA; padding: 2.5rem 0; margin-top: 0; }
.site-footer .container { display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; align-items: center; }
.site-footer a { color: #E7E9F2; text-decoration: none; margin-right: 1.1rem; }
.site-footer a:hover { color: var(--lime); }
.site-footer .brand span { color: var(--white); font-size: 1.3rem; }

@media (max-width: 860px) {
  .hero .container, .grid-3, .grid-2 { grid-template-columns: 1fr; }
  .site-header .container { flex-wrap: wrap; padding-block: .5rem; }
  .exam { grid-template-columns: 1fr; }
}

/* Hilfsklassen (statt Inline-Styles, wegen Content-Security-Policy) */
.m-0 { margin: 0; }
.mb-0 { margin-bottom: 0; }
.mb-sm { margin-bottom: .4rem; }
.mt-sm { margin-top: .6rem; }
.mt-md { margin-top: 1.4rem; }
.mt-lg { margin-top: 1.5rem; }
.center { text-align: center; }
.items-start { align-items: start; }
.items-center { align-items: center; }
.maxw-text { max-width: 40rem; }
.h2-sm { font-size: 1.3rem; }
.w-0 { width: 0; }
.w-60 { width: 60%; }
.sticky { position: sticky; top: 84px; }
@media (max-width: 860px) { .sticky { position: static; } }

/* Neue Prüfung */
.form-row { display: grid; grid-template-columns: 1.4fr 1fr auto; gap: 1rem; align-items: end; }
.form-row .field { margin-bottom: 0; }
.suggestion { display: grid; grid-template-columns: 1fr auto; gap: 1rem; align-items: center; }
.meta { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.preview-list { margin: .5rem 0 0; padding-left: 1.1rem; }
.exam-link { color: var(--ink); text-decoration: none; transition: border-color .15s; }
.exam-link:hover { color: var(--ink); border-color: var(--violet); }
.inline-form { display: flex; gap: .6rem; flex-wrap: wrap; }
.inline-form input { flex: 1 1 10rem; width: auto; }
.inline-form select { flex: 0 1 14rem; width: auto; }
.request { padding: .7rem 0; border-top: 1px solid var(--line); display: grid; gap: .3rem; }
.request:first-of-type { border-top: 0; padding-top: 0; }
.countdown { font-size: 1.15rem; }
input[type="file"] { width: 100%; font: inherit; padding: .55rem; border: 1.5px dashed var(--line); border-radius: var(--radius-sm); background: var(--paper); }
details summary { cursor: pointer; color: var(--violet); font-weight: 600; }
[aria-disabled="true"] { opacity: .6; cursor: default; }
@media (max-width: 860px) {
  .form-row, .suggestion { grid-template-columns: 1fr; }
}

/* Verwaltung */
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 1rem; }
.stat { display: grid; gap: .1rem; padding: 1rem 1.2rem; }
.stat-num { font-size: 1.8rem; font-weight: 700; letter-spacing: -0.03em; }
.table-wrap { padding: 0; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: .75rem 1rem; border-top: 1px solid var(--line); vertical-align: top; }
.table thead th { border-top: 0; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; background: var(--ink); color: var(--white); }
.table tbody tr:nth-child(even) { background: var(--row); }
.urgent { color: var(--error); font-weight: 600; }
textarea.code { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: .85rem; line-height: 1.45; }
input[type="number"] { font: inherit; padding: .65rem .8rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--white); width: 100%; }
.pre { white-space: pre-line; }
.file-list { margin: .2rem 0 .4rem; padding-left: 1.1rem; }
@media (max-width: 860px) { .stats { grid-template-columns: repeat(2, 1fr); } }

/* ---------- Lernbereich ---------- */
.tag-warn { background: #FDF0DA; color: #8A5300; }
.pre-line { white-space: pre-line; }
.stack { display: grid; gap: .6rem; }
progress.bar { appearance: none; -webkit-appearance: none; display: block; width: 100%; height: .55rem; border: 0; border-radius: 999px; background: #ECEBE6; overflow: hidden; color: var(--violet); }
progress.bar::-webkit-progress-bar { background: #ECEBE6; border-radius: 999px; }
progress.bar::-webkit-progress-value { background: var(--violet); border-radius: 999px; transition: width .3s ease; }
progress.bar::-moz-progress-bar { background: var(--violet); border-radius: 999px; }
.obj-list { list-style: none; padding: 0; margin: 0; }
.obj-list li { border-top: 1px solid var(--line); }
.obj-list li:first-child { border-top: 0; }
.obj-link { display: flex; gap: .8rem; padding: .8rem .4rem; color: var(--ink); text-decoration: none; border-radius: var(--radius-sm); }
.obj-link:hover { background: var(--paper); color: var(--ink); }
.obj-num { flex: 0 0 1.9rem; height: 1.9rem; display: grid; place-items: center; border-radius: 6px; background: var(--violet-soft); color: var(--violet-dark); font-weight: 700; font-size: .88rem; }
.obj-body { display: grid; gap: .3rem; }
.obj-text { font-weight: 600; }
.explanation { background: var(--paper); border-radius: var(--radius-sm); padding: 1rem 1.1rem; line-height: 1.6; }
.task-prompt { font-weight: 600; margin: 0 0 .6rem; }
.option-list { list-style: none; padding: 0; margin: 0; }
.option-list .option { cursor: default; justify-content: space-between; }
.option-list .option:hover { border-color: var(--line); }
.option-list .option.correct:hover { border-color: var(--ok); }
.option-list .option.wrong:hover { border-color: var(--error); }
.choice-mark { white-space: nowrap; }
.task-actions { display: flex; gap: .8rem; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; margin-top: .8rem; }
.report summary { cursor: pointer; color: var(--ink-2); }
.report[open] { flex: 1 1 100%; }
.obj-nav { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: space-between; }
.task .btn-small { margin-top: .3rem; }

/* ---------- Mitteilungen ---------- */
.badge { display: inline-grid; place-items: center; min-width: 1.25rem; height: 1.25rem; padding: 0 .3rem; border-radius: 999px; background: var(--violet); color: var(--white); font-size: .72rem; font-weight: 700; vertical-align: .1em; }
.notice-list { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; }
.notice { display: grid; gap: .35rem; padding: 1rem 1.2rem; }
.notice-new { border-color: var(--violet); }
.notice-title { font-size: 1.05rem; margin: 0; }
.notice-title a { color: var(--ink); }
.notice-title a:hover { color: var(--violet-dark); }
.consent { background: var(--paper); border-radius: var(--radius-sm); padding: .9rem 1rem; }
fieldset.consent { border: 0; margin: 1.2rem 0; }
fieldset.consent legend { float: left; width: 100%; margin: 0; padding: 0; font-weight: 700; }
fieldset.consent legend + * { clear: both; }

/* ---------- Premium ---------- */
.price { font-size: 1.5rem; font-weight: 700; letter-spacing: -0.02em; margin-bottom: .8rem !important; }
.faq { margin: 0; }
.faq dt { font-weight: 700; margin-top: .9rem; }
.faq dt:first-child { margin-top: 0; }
.faq dd { margin: .2rem 0 0; color: var(--ink-2); }
.plan form .btn { margin-top: 0; }

/* ---------- Werbung ---------- */
.ad { position: relative; margin-top: 1.5rem; padding: .9rem 1.1rem 1rem; border: 1px dashed var(--line); border-radius: var(--radius); background: var(--white); }
.grid > .ad { margin-top: 0; }
.ad-label { display: block; font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-2); margin-bottom: .4rem; }
.ad-house { display: grid; gap: .15rem; color: var(--ink); text-decoration: none; }
.ad-house:hover strong { color: var(--violet-dark); text-decoration: underline; }
.ad-ins { display: block; min-height: 90px; }
.ad-banner { padding: .6rem 1rem .7rem; }
.ad-banner .ad-house { grid-template-columns: auto 1fr; column-gap: .8rem; align-items: baseline; }
.ad-banner .ad-house .small:last-child { grid-column: 1 / -1; }
.ad[hidden] { display: none; }
.card > .ad-banner { margin-top: 1rem; }
.ad-house img { display: block; max-width: 100%; height: auto; max-height: 120px; object-fit: contain; grid-column: 1 / -1; }
.ad-preview { display: block; width: 100%; max-height: 220px; border-radius: 8px; background: #000; }

/* Vollbild-Video eines Sponsors */
.video-ad { position: fixed; inset: 0; z-index: 1000; display: flex; flex-direction: column; background: #0d0f18; color: #fff; }
.video-ad[hidden] { display: none; }
.video-ad-open, .video-ad-open body { overflow: hidden; }
.video-ad-bar, .video-ad-foot { display: flex; align-items: center; gap: .75rem; padding: .75rem 1rem; flex-wrap: wrap; }
.video-ad-bar .ad-label { margin: 0; color: #D7F75B; }
.video-ad-sponsor { font-weight: 700; flex: 1; }
.video-ad-sound, .video-ad-close { font: inherit; font-weight: 700; color: #fff; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.3); border-radius: 999px; padding: .4rem .9rem; cursor: pointer; }
.video-ad-close:disabled { cursor: default; opacity: .75; }
.video-ad-sound:focus-visible, .video-ad-close:focus-visible, .video-ad-foot a:focus-visible { outline: 3px solid #D7F75B; outline-offset: 2px; }
.video-ad-stage { position: relative; flex: 1; min-height: 0; background: #000; }
.video-ad-video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; }
.video-ad-ima { position: absolute; inset: 0; }
.video-ad-foot { justify-content: center; text-align: center; }
.video-ad-foot span { color: rgba(255,255,255,.8); }

/* Interaktive Lernmodule: Grafiken und Aufgabentypen */
[hidden] { display: none !important; }
.widget { margin: 1rem 0; padding: .9rem 1rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--white); }
.widget-title { font-weight: 700; margin-bottom: .5rem; }
.widget-note { margin: .6rem 0 0; }
.widget-fallback { margin: 0; padding-left: 1.1rem; }
.widget-fallback code { font-size: .9em; }
.widget-table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.widget-table th, .widget-table td { padding: .35rem .5rem; border-top: 1px solid var(--line); text-align: right; }
.widget-table th:first-child { text-align: left; }
.widget svg { width: 100%; height: auto; touch-action: pan-y; user-select: none; }
.plot-grid line { stroke: var(--line); stroke-width: 1; }
.axis { stroke: var(--ink-2); stroke-width: 1.3; }
.tick { font-size: 11px; fill: var(--ink-2); }
.axis-label { font-size: 12px; font-weight: 600; fill: var(--ink); }
.curve { stroke-width: 2.6; stroke-linejoin: round; stroke-linecap: round; }
.plot-point { fill: var(--ink); }
.point-label { font-size: 12px; font-weight: 700; fill: var(--ink); }
.plot-cursor { stroke: var(--ink-2); stroke-dasharray: 4 3; }
.plot-overlay { fill: transparent; cursor: crosshair; }
.plot-readout { margin: .3rem 0 0; min-height: 1.4em; font-variant-numeric: tabular-nums; }
.chart-mark { cursor: pointer; }
.chart-mark:focus { outline: none; stroke: var(--ink); stroke-width: 2; }
.chart-table { margin-top: .5rem; }
.legend { list-style: none; padding: 0; margin: .4rem 0 0; display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .88rem; }
.legend li { display: flex; align-items: center; gap: .4rem; }
.swatch { width: 14px; height: 4px; border-radius: 2px; display: inline-block; background: #6246EA; }
.swatch-1 { background: #D9730D; } .swatch-2 { background: #1F8A4C; } .swatch-3 { background: #C2352B; }
.sliders { display: grid; gap: .6rem; margin-top: .7rem; }
.slider label { display: flex; justify-content: space-between; gap: 1rem; font-weight: 600; font-size: .92rem; margin-bottom: .1rem; }
.slider-value { font-variant-numeric: tabular-nums; color: var(--violet-dark); }
.slider input[type="range"] { width: 100%; accent-color: var(--violet); margin: 0; }
.slider-bound { padding: .5rem .6rem; border-radius: var(--radius-sm); background: var(--lime-soft); }
.sim-outputs { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: .6rem; margin: .9rem 0 0; }
.sim-outputs div { padding: .55rem .7rem; border-radius: var(--radius-sm); background: var(--violet-soft); }
.sim-outputs dt { font-size: .82rem; color: var(--ink-2); }
.sim-outputs dd { margin: 0; }
.sim-value { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.sim-bars { display: grid; gap: .45rem; margin-top: .9rem; }
.sim-bar { display: grid; grid-template-columns: minmax(5rem, 9rem) 1fr minmax(4.5rem, auto); gap: .6rem; align-items: center; }
.bar-track { height: 14px; border-radius: 7px; background: var(--paper); overflow: hidden; }
.bar-fill { display: block; height: 100%; width: 0; background: var(--violet); border-radius: 7px; transition: width .15s; }
.bar-fill.bar-over { background: var(--error); }
.bar-value { text-align: right; font-variant-numeric: tabular-nums; }
.widget-steps-list { margin: 0; padding-left: 1.3rem; display: grid; gap: .45rem; }
.widget-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: .7rem; }
.flashcard { position: relative; display: grid; place-items: center; width: 100%; min-height: 9rem; padding: 1.2rem; border: 1.5px solid var(--violet); border-radius: var(--radius); background: var(--violet-soft); font: inherit; font-size: 1.1rem; font-weight: 700; text-align: center; color: var(--ink); cursor: pointer; }
.flashcard .flash-back { display: none; font-weight: 400; font-size: 1rem; }
.flashcard.is-flipped { background: var(--lime-soft); border-color: var(--ok); }
.flashcard.is-flipped .flash-front { display: none; }
.flashcard.is-flipped .flash-back { display: block; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 1rem; border-left: 3px solid var(--violet-soft); display: grid; gap: .6rem; }
.timeline-date { font-weight: 700; color: var(--violet-dark); font-variant-numeric: tabular-nums; }
.timeline-track { display: flex; gap: .3rem; overflow-x: auto; padding: .2rem 0 .5rem; background: linear-gradient(var(--violet-soft), var(--violet-soft)) 0 1.05rem / 100% 3px no-repeat; }
.timeline-stop { flex: 1 0 5.5rem; display: grid; justify-items: center; gap: .15rem; padding: .3rem .2rem; border: 0; border-radius: var(--radius-sm); background: transparent; font: inherit; color: var(--ink); cursor: pointer; text-align: center; }
.timeline-dot { width: 14px; height: 14px; border-radius: 50%; background: var(--white); border: 3px solid var(--violet); margin-bottom: .2rem; }
.timeline-stop[aria-pressed="true"] .timeline-dot { background: var(--violet); }
.timeline-stop[aria-pressed="true"] { background: var(--violet-soft); }
.timeline-label { line-height: 1.25; }
.timeline-detail { margin-top: .5rem; padding: .7rem .8rem; border-radius: var(--radius-sm); background: var(--paper); }
.answer-number { display: flex; align-items: center; gap: .6rem; flex-wrap: wrap; margin-bottom: .4rem; }
.answer-number label { margin: 0; }
.answer-number input { width: 10rem; }
.order-list { list-style: none; padding: 0; margin: 0 0 .6rem; display: grid; gap: .4rem; }
.order-item { display: flex; align-items: center; gap: .5rem; padding: .45rem .6rem; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--white); }
.order-item select { width: 4.5rem; flex: none; }
.order-btn { flex: none; width: 2rem; height: 2rem; border: 1.5px solid var(--line); border-radius: 6px; background: var(--paper); font: inherit; font-weight: 700; cursor: pointer; color: var(--ink); }
.order-btn:hover:not(:disabled) { border-color: var(--violet); }
.order-btn:disabled { opacity: .35; cursor: default; }
.match-list { display: grid; gap: .5rem; margin-bottom: .6rem; }
.match-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); gap: .6rem; align-items: center; }
.match-left { margin: 0; }
@media (max-width: 560px) { .match-row { grid-template-columns: 1fr; gap: .2rem; } }
.cloze { line-height: 2.3; margin: 0 0 .6rem; }
.cloze select, .cloze input.gap { width: auto; display: inline-block; padding: .2rem .4rem; margin: 0 .15rem; }
.cloze input.gap { width: 9rem; }
.gap-ok, .gap-wrong { padding: .1rem .35rem; border-radius: 5px; }
.gap-ok { background: #EEF8F2; color: var(--ok); font-weight: 600; }
.gap-wrong { background: #FCEFEE; color: var(--ink); }
.gap-wrong del { color: var(--error); }
.grid-sol { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: .8rem; }
.sol-order .option { margin-bottom: .35rem; }
.bar-value.bar-negative { color: var(--error); font-weight: 600; }
@media (max-width: 560px) {
  .sim-bar { grid-template-columns: 1fr auto; row-gap: .2rem; }
  .sim-bar .bar-track { grid-column: 1 / -1; grid-row: 2; }
}

/* ---------- Profil: Schulwahl ---------- */
.school-filter { display: grid; grid-template-columns: minmax(9rem, 1fr) 2fr; gap: 8px; margin-bottom: 8px; }
@media (max-width: 560px) { .school-filter { grid-template-columns: 1fr; } }
.subject-grid { border: 0; padding: 0; margin: 16px 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(14rem, 1fr)); gap: 8px 16px; }
.subject-grid .checkbox { font-size: .94rem; }

/* ---------- Mathe-Eingaben ---------- */
.answer-math .answer-number input { width: min(100%, 22rem); font-size: 1.1rem; }
.math-bar, .math-pad { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.math-pad { display: grid; grid-template-columns: repeat(4, minmax(44px, 64px)); max-width: 19rem; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--paper); }
.math-pad[hidden] { display: none; }
.math-key, .math-toggle {
  min-width: 44px; min-height: 44px; padding: 6px 10px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--white);
  font: inherit; font-size: 1.05rem; font-weight: 700; color: var(--ink); cursor: pointer; touch-action: manipulation;
}
.math-key:hover, .math-toggle:hover { border-color: var(--violet); color: var(--violet-dark); }
.math-key:active { background: var(--violet-soft); }
.math-toggle { font-size: .88rem; color: var(--ink-2); }
.math-toggle[aria-expanded="true"] { border-color: var(--violet); background: var(--violet-soft); color: var(--violet-dark); }
.math-preview { min-height: 1.5em; margin: 4px 0; font-size: 1.15rem; font-family: "Cambria Math", "Times New Roman", serif; color: var(--violet-dark); }
.math-preview-error { font-family: inherit; font-size: .875rem; color: var(--error); }
.math { font-family: "Cambria Math", "Times New Roman", serif; font-size: 1.08em; }

/* ---------- Notizblatt ---------- */
.scratch { margin-top: 16px; border-top: 1px solid var(--line); padding-top: 12px; }
.scratch summary { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; }
.scratch summary::before { content: "✎"; font-size: 1.1rem; }
.scratch-body { display: grid; gap: 8px; margin-top: 8px; }
.scratch-tools { display: flex; flex-wrap: wrap; gap: 6px; }
.scratch-tool { min-height: 44px; padding: 6px 12px; border: 1.5px solid var(--line); border-radius: 10px; background: var(--white); font: inherit; font-size: .9rem; font-weight: 700; color: var(--ink); cursor: pointer; }
.scratch-tool[aria-pressed="true"] { border-color: var(--violet); background: var(--violet-soft); color: var(--violet-dark); }
.scratch-canvas {
  display: block; width: 100%; height: 280px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); touch-action: none; cursor: crosshair;
  background-color: var(--white);
  background-image: linear-gradient(var(--row) 1px, transparent 1px), linear-gradient(90deg, var(--row) 1px, transparent 1px);
  background-size: 24px 24px;
}
@media (pointer: coarse) { .scratch-canvas { height: 360px; } }
@media (max-width: 860px) { .site-header { position: static; } }

/* ---------- zielsy Plus ---------- */
.mb-md { margin-bottom: 1.2rem; }
.h3-sm { font-size: 1rem; margin: 0 0 .5rem; }
.items-stretch { align-items: stretch; }
.plain-list { list-style: none; padding: 0; margin: 0; }
.plain-list li + li { margin-top: .35rem; }
.stats-3 { grid-template-columns: repeat(3, 1fr); }
.stats-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 860px) { .stats-3, .stats-4 { grid-template-columns: repeat(2, 1fr); } }
.code-box { font-family: "Courier New", monospace; font-size: 1.6rem; font-weight: 700; letter-spacing: .18em; background: var(--lime-soft); border: 1px dashed #C6E26A; border-radius: var(--radius-sm); padding: .6rem 1rem; text-align: center; }
.member-row { display: flex; justify-content: space-between; align-items: center; gap: .8rem; flex-wrap: wrap; padding: .5rem 0; border-top: 1px solid var(--line); }
.member-row:first-child { border-top: 0; }
.review-banner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding: 1rem 1.2rem; }

/* Lernplan */
.plan-days { list-style: none; padding: 0; margin: 0 0 .8rem; }
.plan-day { display: grid; grid-template-columns: 6.5rem 1fr; gap: .6rem; padding: .55rem 0; border-top: 1px solid var(--line); }
.plan-day:first-child { border-top: 0; }
.plan-date { font-weight: 700; font-size: .9rem; color: var(--ink-2); }
.plan-today .plan-date { color: var(--violet); }
.plan-today { background: var(--violet-soft); border-radius: var(--radius-sm); padding-inline: .6rem; border-top-color: transparent; }
.plan-items { list-style: none; padding: 0; margin: 0; }
.plan-items li + li { margin-top: .2rem; }

/* Probeprüfung */
.timer { font-size: 1.3rem; font-weight: 700; font-variant-numeric: tabular-nums; margin: .4rem 0 .6rem; }
.task[data-result="saved"] { border-left: 6px solid var(--lime); }
.task[data-result="missed"] { border-left: 6px solid #E8B04B; }

/* Notenrechner */
.grade-rows { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem .8rem; margin-bottom: .6rem; }
.grade-rows input { min-height: 44px; }

/* Lernblatt: Druck */
.sheet-objective { margin-bottom: 1rem; }
.sheet-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.sheet-section h2, .sheet-tips h2 { margin-top: 0; }
.sheet-points { margin: 0; padding-left: 1.1rem; }
.sheet-points li { margin: .25rem 0; }
.sheet-tips { margin-bottom: 1rem; border-left: 4px solid var(--violet); }
.sheet-check { list-style: none; margin: 0; padding: 0; }
.sheet-check li { display: flex; gap: .5rem; align-items: flex-start; margin: .3rem 0; }
.sheet-box { flex: 0 0 auto; width: 14px; height: 14px; margin-top: .25rem; border: 1.5px solid var(--ink-2); border-radius: 3px; }
.maxw-btn { max-width: 16rem; }
.plan-min { display: block; font-size: .8rem; font-weight: 400; color: var(--ink-2); }
.sheet-objective .task { box-shadow: none; }
@media print {
  .site-header, .site-footer, .no-print, .ad, .video-ad, .skip-link, .task-actions, .scratch { display: none !important; }
  body { background: #fff; }
  .section { padding: 0; }
  .card { box-shadow: none; border-color: #bbb; break-inside: avoid; }
  .sheet-objective { break-inside: auto; }
  .sheet-grid { grid-template-columns: 1fr 1fr; gap: .5rem; }
  .sheet-section, .sheet-tips { padding: .6rem .8rem; font-size: 10.5pt; }
  .sheet-tips { border-left-color: #888; }
  .sheet-objective .task { break-inside: avoid; }
  a { color: inherit; text-decoration: none; }
}

/* ---------- Verwaltung: Statistik ---------- */
.stats-toc { margin: .5rem 0 0; }
.chart { margin: 0; }
.chart-svg { display: block; width: 100%; height: auto; overflow: visible; }
.chart-bar { fill: var(--violet); }
.chart-col:hover .chart-bar { fill: var(--violet-dark); }
.chart-hit { fill: transparent; }
.chart-col:hover .chart-hit { fill: var(--row); }
.chart-grid { stroke: var(--line); stroke-width: 1; }
.chart-base { stroke: var(--ink-2); stroke-width: 1; }
.chart-axis { fill: var(--ink-2); font-size: 13px; }
.chart-value { fill: var(--ink); font-size: 13px; font-weight: 700; }
.chart figcaption { margin-top: .3rem; }
.chart-area { fill: var(--violet-soft); }
.chart-line { fill: none; stroke: var(--violet); stroke-width: 2; stroke-linejoin: round; }
.chart-dot { fill: transparent; }
.chart-pt:hover .chart-dot { fill: var(--violet); stroke: var(--white); stroke-width: 2; }

/* Rückmeldung nach der Prüfung */
.feedback-box { border-top: 1px solid var(--line); padding-top: 1rem; }
.input-short { max-width: 8rem; }
.feedback-item { border-left: 3px solid var(--line); padding-left: .7rem; margin: .6rem 0; }

/* ---------- Persönliche Lernstatistik ---------- */
.stats-head { display: flex; flex-wrap: wrap; gap: .6rem 1rem; align-items: baseline; justify-content: space-between; margin-bottom: .8rem; }
.seg-tabs { display: flex; gap: 1.2rem; }
.seg-tabs a { color: var(--ink-2); text-decoration: none; font-size: 1.05rem; padding-bottom: .15rem; border-bottom: 2px solid transparent; }
.seg-tabs a:hover { color: var(--ink); }
.seg-tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.heatmap-scroll { overflow-x: auto; }
.heatmap-svg { display: block; max-width: none; }
.heat-axis { font-size: 11px; }
.heat { stroke: var(--white); stroke-width: 0; }
.heat:hover { stroke: var(--ink); stroke-width: 1.5; }
.heat-0 { fill: #EEEDF3; background: #EEEDF3; }
.heat-1 { fill: #D9D2FB; background: #D9D2FB; }
.heat-2 { fill: #AC9DF4; background: #AC9DF4; }
.heat-3 { fill: #7E67EE; background: #7E67EE; }
.heat-4 { fill: #3E27B8; background: #3E27B8; }
.heat-today { stroke: var(--ink); stroke-width: 1.5; }
.heat-legend { display: flex; flex-wrap: wrap; align-items: center; gap: .3rem; margin-top: .5rem; }
.heat-key { display: inline-block; width: 12px; height: 12px; border-radius: 3px; }
.heat-note { margin-left: auto; }
.chart details { margin-top: .3rem; }
.table-compact th, .table-compact td { padding: .4rem .6rem; }
.table .num, .table-compact .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dist td { border-top: 1px solid var(--line); }
.dist tbody tr:nth-child(even) { background: transparent; }
.dist-bar { width: 32%; }
.dist-bar svg { display: block; width: 100%; height: 8px; margin-top: .45rem; }
.dist-track { fill: var(--row); }
.stat .small:last-child:not(.muted) { color: var(--ink-2); }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: .95em; letter-spacing: .04em; }

/* Kontotypen, Klassenräume, Eltern */
.account-types { display: grid; gap: .45rem; border: 0; padding: 0; margin: 0 0 1.2rem; }
.account-types legend { font-weight: 600; margin-bottom: .4rem; padding: 0; }
.choice { display: flex; gap: .6rem; align-items: flex-start; font-weight: 400; padding: .55rem .75rem; border: 1px solid var(--line, #E3E3EA); border-radius: 10px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--violet); background: var(--violet-soft); }
.choice input { margin-top: .25rem; width: auto; }
.choice > span { display: grid; gap: .1rem; }
.new-entry { margin-top: .6rem; }
.new-entry[open] { padding: .8rem 1rem; border: 1px dashed var(--line, #D6D6E0); border-radius: 10px; }
.new-entry .field { margin-bottom: .6rem; }
.room-list { display: grid; gap: .75rem; margin-bottom: 1.2rem; }
.room-card { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.room-card .meta { font-size: .9rem; color: var(--ink-2); }
.h3 { font-size: 1.05rem; margin-bottom: .4rem; }
.room-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(16rem, 1fr); gap: 1.2rem; align-items: start; }
@media (max-width: 860px) { .room-layout { grid-template-columns: 1fr; } }
.room-exams li { display: flex; justify-content: space-between; gap: .8rem; align-items: center; padding: .55rem 0; border-top: 1px solid var(--row, #F0F0F4); }
.room-exams li + li { margin-top: 0; }
.room-exam-actions { display: flex; gap: .5rem; align-items: center; flex-shrink: 0; }
.code-big { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.6rem; font-weight: 700; letter-spacing: .12em; margin: .2rem 0 .5rem; user-select: all; }
.link-btn { background: none; border: 0; padding: 0; color: var(--violet); cursor: pointer; text-decoration: underline; font: inherit; }
.link-btn.small { font-size: .85rem; }
.tag-violet { background: var(--violet-soft); color: var(--violet); }
.member-list li { display: flex; justify-content: space-between; align-items: center; gap: .5rem; }
.member-tools { display: flex; gap: .5rem; align-items: center; }
.posts { display: grid; gap: .9rem; margin-top: 1.2rem; }
.thread { border-top: 1px solid var(--row, #F0F0F4); padding-top: .9rem; }
.post-head { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: .25rem; }
.post-body { white-space: pre-wrap; overflow-wrap: anywhere; }
.post-reply { margin: .6rem 0 0 1.2rem; padding-left: .8rem; border-left: 3px solid var(--violet-soft); }
.post-actions { display: flex; gap: 1rem; align-items: baseline; margin-top: .3rem; }
.post-actions form { margin: 0; line-height: 1.5; }
.post-actions summary { line-height: 1.5; }
.inline-details summary { font-weight: 400; }
.reply-box { margin-top: .5rem; }
.reply-box summary { font-weight: 400; }
.post-form-foot { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: .5rem; }
.child-card + .child-card { margin-top: 1rem; }
.nowrap { white-space: nowrap; }
.code-input { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.5rem; letter-spacing: .3em; text-align: center; max-width: 12rem; }

/* Registrierung: Hinweis erscheint, sobald «Lehrperson» gewählt ist */
.teacher-note { display: none; margin: -.4rem 0 1.2rem; }
form:has(input[name="account_type"][value="lehrer"]:checked) .teacher-note { display: block; }
