:root {
  color-scheme: light;
  --paper: #f7f8fa;
  --white: #ffffff;
  --ink: #14233b;
  --muted: #5d6878;
  --line: #cfd6df;
  --cobalt: #2457c5;
  --teal: #00a6a6;
  --red: #c7352c;
  --green: #247052;
  --focus: #f3b61f;
  --shadow: 0 18px 50px rgba(20, 35, 59, 0.11);
  font-family: "Aptos", "Segoe UI", system-ui, sans-serif;
  line-height: 1.5;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body { margin: 0; min-height: 100vh; background: var(--paper); }
button, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, select:focus-visible { outline: 4px solid var(--focus); outline-offset: 3px; }
[hidden] { display: none !important; }

.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 100; background: var(--ink); color: white; padding: .75rem 1rem; }
.skip-link:focus { top: 1rem; }

.site-header {
  min-height: 78px;
  padding: 1rem clamp(1rem, 4vw, 4rem);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: white;
  background: var(--ink);
  border-bottom: 5px solid var(--cobalt);
}

.brand { color: inherit; text-decoration: none; display: inline-flex; align-items: center; gap: .8rem; }
.brand-mark { width: 42px; height: 42px; display: grid; place-items: center; color: var(--ink); background: white; font-family: Georgia, serif; font-size: 1.6rem; font-weight: 800; }
.brand strong, .brand small { display: block; }
.brand strong { font-size: 1.05rem; letter-spacing: .01em; }
.brand small { opacity: .76; font-size: .78rem; }
.connection { font-size: .86rem; padding: .4rem .7rem; border: 1px solid rgba(255,255,255,.35); }

.primary-tabs { display: flex; padding: 0 clamp(1rem, 4vw, 4rem); background: var(--white); border-bottom: 1px solid var(--line); overflow-x: auto; }
.tab-button { appearance: none; border: 0; border-bottom: 4px solid transparent; background: transparent; padding: 1rem 1.2rem .8rem; color: var(--muted); cursor: pointer; font-weight: 700; white-space: nowrap; }
.tab-button.is-active { color: var(--ink); border-color: var(--cobalt); }
.tab-link { display: inline-flex; align-items: center; border-bottom: 4px solid transparent; padding: 1rem 1.2rem .8rem; color: var(--muted); font-weight: 700; white-space: nowrap; text-decoration: none; }
.tab-link:hover { color: var(--ink); }

.view-shell { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; padding: clamp(2rem, 5vw, 5rem) 0; }
.view-intro { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(240px, .75fr); gap: 2rem; align-items: end; margin-bottom: 2.2rem; }
.view-intro h1 { margin: .25rem 0 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.2rem, 5vw, 4.7rem); line-height: .98; letter-spacing: -.035em; max-width: 12ch; }
.view-intro > p:last-child { margin: 0; color: var(--muted); max-width: 54ch; font-size: 1.05rem; }
.context-line { margin: 0; color: var(--cobalt); font-weight: 750; }

.day-list { border-top: 2px solid var(--ink); }
.day-row { display: grid; grid-template-columns: 64px minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: 1.05rem .25rem; border-bottom: 1px solid var(--line); }
.day-number { font-family: Georgia, serif; font-size: 1.65rem; color: var(--muted); }
.day-row h2 { margin: 0; font-size: clamp(1rem, 2vw, 1.25rem); }
.day-themes { margin: .2rem 0 0; color: var(--muted); font-size: .88rem; }
.day-open { border: 1px solid var(--ink); background: white; color: var(--ink); padding: .55rem .8rem; cursor: pointer; font-weight: 700; }
.day-open:disabled { cursor: default; border-color: var(--line); color: var(--muted); }

.theme-register { display: grid; grid-template-columns: repeat(7, minmax(120px, 1fr)); border: 2px solid var(--ink); background: white; overflow-x: auto; }
.theme-tab { min-height: 360px; text-decoration: none; padding: 1rem .85rem; display: flex; flex-direction: column; justify-content: space-between; border: 0; border-right: 1px solid var(--line); border-top: 10px solid var(--theme-color); background: white; color: var(--ink); text-align: left; cursor: pointer; }
.theme-tab:last-child { border-right: 0; }
.theme-tab:hover { background: #f0f3f7; }
.theme-number { color: var(--theme-color); font-family: Georgia, serif; font-size: 2.4rem; }
.theme-tab strong { display: block; font-size: 1.12rem; line-height: 1.18; }
.theme-tab span:last-child { color: var(--muted); font-size: .82rem; }

.module-header { padding: 1.5rem; color: white; background: var(--ink); border-left: 12px solid var(--red); }
.module-header .back-button { display: inline-block; color: white; background: transparent; border-color: rgba(255,255,255,.5); margin-bottom: 1rem; text-decoration: none; }
.module-header h1 { margin: .2rem 0; font-family: Georgia, serif; font-size: clamp(2rem, 5vw, 4rem); line-height: 1; }
.module-header p { max-width: 68ch; margin-bottom: 0; }
.learning-goals { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 1px; margin: 0; padding: 1px; background: var(--line); list-style: none; }
.learning-goals li { padding: 1rem; background: white; }
.lesson-list { margin-top: 2rem; display: grid; gap: 1rem; }
.lesson { display: grid; grid-template-columns: minmax(220px, .8fr) minmax(0, 1.2fr); border-top: 2px solid var(--ink); padding: 1.2rem 0; gap: 2rem; }
.lesson h2 { margin: 0; }
.definition { margin: .5rem 0 0; font-family: Georgia, serif; font-size: clamp(1.35rem, 3vw, 2.05rem); line-height: 1.22; color: var(--ink); }
.lesson-detail p { margin-top: 0; }
.lesson-detail ul { padding-left: 1.1rem; }
.example { padding-left: 1rem; border-left: 4px solid var(--teal); color: var(--muted); }
.activities { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 5px solid var(--red); }
.activity-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 1rem; }
.activity-card { border: 1px solid var(--line); background: white; color: inherit; padding: 1.2rem; text-align: left; text-decoration: none; cursor: pointer; }
.activity-card:hover { border-color: var(--ink); }
.mode-label { color: var(--cobalt); font-weight: 700; }

.button-primary, .control-actions button, .back-button { border: 1px solid var(--ink); background: white; color: var(--ink); padding: .7rem .9rem; cursor: pointer; font-weight: 750; }
.button-primary { background: var(--cobalt) !important; color: white !important; border-color: var(--cobalt) !important; }
.button-primary:disabled, .control-actions button:disabled { opacity: .45; cursor: default; }
.text-link { color: var(--cobalt); font-weight: 700; }

.live-stage { min-width: 0; min-height: calc(100vh - 160px); padding: clamp(1.2rem, 5vw, 4rem); display: grid; place-items: center; background: var(--paper); }
.live-card { width: min(920px, 100%); min-width: 0; background: white; border: 2px solid var(--ink); box-shadow: var(--shadow); }
.live-card-header { padding: 1rem 1.3rem; color: white; background: var(--ink); display: flex; justify-content: space-between; gap: 1rem; }
.live-card-body { min-width: 0; padding: clamp(1.2rem, 5vw, 3.5rem); }
.live-card h1 { margin: 0 0 .8rem; font-family: Georgia, serif; font-size: clamp(2rem, 5vw, 4rem); line-height: 1.05; overflow-wrap: anywhere; }
.prompt { font-size: clamp(1.15rem, 2.5vw, 1.55rem); font-weight: 700; }
.option-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .7rem; margin-top: 1.2rem; }
.option-button { min-height: 74px; border: 2px solid var(--line); background: white; color: var(--ink); padding: 1rem; display: grid; grid-template-columns: 44px 1fr; align-items: center; gap: .7rem; text-align: left; cursor: pointer; }
.option-button span:last-child { min-width: 0; overflow-wrap: anywhere; }
.option-button:hover { border-color: var(--cobalt); }
.option-letter { width: 38px; height: 38px; display: grid; place-items: center; color: white; background: var(--cobalt); font-weight: 800; }
.group-picker { display: flex; gap: .7rem; align-items: center; margin: 1rem 0; }
.group-picker select { padding: .6rem; }
.answer-confirmation { padding: 1.2rem; border-left: 6px solid var(--green); background: #edf7f2; }
.resolution { margin-top: 1rem; padding: 1.2rem; border-top: 5px solid var(--red); background: #fff7f5; }
.exam-anchor { font-weight: 750; }

.site-footer { padding: 1.2rem clamp(1rem, 4vw, 4rem); display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.site-footer a { color: var(--muted); }
.footer-links { flex: none; display: flex; flex-wrap: wrap; gap: .4rem 1.1rem; }
.site-footer p { margin: 0; }
.director-footer { height: 44px; padding-top: 0; padding-bottom: 0; align-items: center; background: white; }

.answer-dialog { width: min(720px, calc(100% - 2rem)); max-height: calc(100vh - 2rem); border: 2px solid var(--ink); padding: 0; box-shadow: var(--shadow); }
.answer-dialog::backdrop { background: rgba(20, 35, 59, .72); }
.answer-dialog form { padding: 1.5rem; }
.dialog-close { float: right; border: 0; background: transparent; font-size: 2rem; cursor: pointer; }

.director-body { overflow: hidden; }
.director-header { height: 70px; min-height: 70px; }
.director-status { display: flex; gap: .6rem; align-items: center; font-size: .84rem; }
.director-status span { padding: .35rem .55rem; border: 1px solid rgba(255,255,255,.32); }
.director-grid { height: calc(100vh - 70px - 44px); display: grid; grid-template-columns: minmax(230px, 280px) minmax(440px, 1fr) minmax(280px, 370px); }
.control-rail, .results-panel { overflow: auto; padding: 1.2rem; background: white; }
.control-rail { border-right: 1px solid var(--line); }
.control-rail h1 { margin-top: 0; font-family: Georgia, serif; font-size: 1.8rem; }
.control-rail label { display: block; margin: 1rem 0 .3rem; font-weight: 750; }
.control-rail select { width: 100%; padding: .7rem; border: 1px solid var(--line); background: white; }
.control-actions { display: grid; gap: .6rem; margin-top: 1.2rem; }
.shortcut-note { font-size: .78rem; color: var(--muted); }
.freigabe-zone { margin-top: .6rem; padding: .7rem .8rem; border: 1px solid var(--line); background: #f7f8fa; display: grid; gap: .5rem; }
.freigabe-zone button { border: 1px solid var(--ink); background: white; color: var(--ink); padding: .55rem .8rem; cursor: pointer; font-weight: 750; }
.freigabe-stand { margin: 0; font-size: .84rem; font-weight: 700; color: var(--muted); }
.freigabe-stand.is-open { color: var(--green); }
.director-stage { overflow: auto; padding: clamp(1.2rem, 3vw, 3rem); background: #e9edf2; }
.activity-preview { min-height: 100%; display: grid; align-content: center; }
.empty-guidance { max-width: 36ch; margin: auto; font-family: Georgia, serif; font-size: 1.6rem; text-align: center; color: var(--muted); }
.preview-sheet { background: white; border-top: 10px solid var(--cobalt); box-shadow: var(--shadow); padding: clamp(1.4rem, 4vw, 3rem); }
.preview-sheet h2 { margin: 0 0 1rem; font-family: Georgia, serif; font-size: clamp(2rem, 4vw, 3.6rem); line-height: 1.05; }
.preview-options { display: grid; gap: .55rem; margin-top: 1.2rem; }
.preview-option { display: grid; grid-template-columns: 40px 1fr; gap: .7rem; padding: .75rem; border: 1px solid var(--line); }
.preview-option.is-correct { border-color: var(--green); background: #edf7f2; }
.results-panel { border-left: 1px solid var(--line); }
.results-heading { display: flex; justify-content: space-between; gap: 1rem; align-items: start; border-bottom: 2px solid var(--ink); padding-bottom: .8rem; }
.results-heading h2 { margin: 0; font-size: 1.25rem; }
.result-total { font-family: Georgia, serif; font-size: 3rem; line-height: 1; }
.result-bars { display: grid; gap: .8rem; margin: 1.2rem 0; }
.result-row { display: grid; grid-template-columns: 28px 1fr 28px; gap: .5rem; align-items: center; }
.bar-track { height: 16px; background: #e4e8ee; }
.bar-fill { display: block; height: 100%; width: var(--bar-width); background: var(--cobalt); }
.response-list { display: grid; gap: .4rem; border-top: 1px solid var(--line); padding-top: 1rem; }
.response-item { display: flex; justify-content: space-between; gap: .6rem; padding: .5rem; background: #f0f3f7; font-size: .88rem; }

@media (max-width: 980px) {
  .theme-register { grid-template-columns: repeat(7, 180px); }
  .director-body { overflow: auto; }
  .director-grid { height: auto; grid-template-columns: 240px minmax(0, 1fr); }
  .results-panel { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); }
}

@media (max-width: 700px) {
  .site-header { align-items: flex-start; }
  .connection { display: none; }
  .view-intro { grid-template-columns: 1fr; gap: 1rem; }
  .day-row { grid-template-columns: 48px 1fr; }
  .day-open { grid-column: 2; width: max-content; }
  .lesson { grid-template-columns: 1fr; gap: .8rem; }
  .option-grid { grid-template-columns: 1fr; }
  .live-stage { padding: .75rem; place-items: start center; }
  .live-card-header { padding: .75rem; flex-wrap: wrap; }
  .live-card-body { padding: 1rem; }
  .live-card h1 { font-size: clamp(2rem, 12vw, 3rem); }
  .group-picker { align-items: stretch; flex-direction: column; }
  .site-footer { display: block; }
  .director-header { height: auto; }
  .director-status { flex-wrap: wrap; }
  .director-grid { display: block; }
  .control-rail, .results-panel { border: 0; border-bottom: 1px solid var(--line); }
  .director-stage { min-height: 520px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; }
}


/* ---------- Kurscockpit und Lernbegleiter ---------- */
.button-secondary { display: inline-block; border: 1px solid var(--ink); background: white; color: var(--ink); padding: .65rem .9rem; cursor: pointer; font-weight: 750; text-decoration: none; }
.button-secondary:hover { background: #f0f3f7; }
.button-danger { border: 1px solid var(--red); background: var(--red); color: white; padding: .65rem .9rem; cursor: pointer; font-weight: 750; }
.text-button { border: 0; background: transparent; color: var(--muted); text-decoration: underline; cursor: pointer; padding: .3rem 0; font-weight: 600; }
.text-button:hover { color: var(--ink); }
a.button-primary { display: inline-block; text-decoration: none; }
.soft-note { margin: .4rem 0 0; color: var(--muted); font-size: .9rem; }
.empty-note { margin: 0; padding: 1rem 1.2rem; border-left: 4px solid var(--line); background: white; color: var(--muted); }
.live-hint { margin: .4rem 0; color: var(--muted); }

.resume-card { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 1.6rem; padding: 1.2rem 1.4rem; background: white; border: 2px solid var(--ink); border-left-width: 12px; }
.resume-card h2 { margin: .2rem 0 .3rem; font-size: 1.3rem; }
.resume-card p:last-child { margin: 0; color: var(--muted); }

.day-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; }
.day-card { display: flex; flex-direction: column; gap: .35rem; padding: 1.1rem 1.2rem 1rem; background: white; border: 1px solid var(--line); border-top: 6px solid var(--cobalt); }
.day-card--soft { border-top-color: var(--line); background: #fbfcfd; }
.day-card--soft h2, .day-card--soft .day-claim { color: var(--muted); }
.day-card-head { display: flex; justify-content: space-between; align-items: baseline; }
.day-card .day-number { font-size: 1.9rem; color: var(--ink); }
.day-date { color: var(--muted); font-weight: 700; font-size: .9rem; }
.day-card h2 { margin: 0; font-size: 1.12rem; line-height: 1.25; }
.day-claim { margin: .1rem 0 .4rem; font-size: .95rem; line-height: 1.45; flex: 1; }
.day-card-foot { display: flex; justify-content: space-between; align-items: center; gap: .6rem; flex-wrap: wrap; margin-top: auto; }
.day-open { text-decoration: none; }
.status-chip { display: inline-block; padding: .3rem .55rem; border: 1px solid var(--green); color: var(--green); font-size: .8rem; font-weight: 700; }
.status-chip--soft { border-color: var(--line); color: var(--muted); }

.live-invite { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; margin-top: 2.4rem; padding: 1.4rem; background: var(--ink); color: white; }
.live-invite .context-line { color: #9fc0ff; }
.live-invite h2 { margin: .2rem 0 .3rem; font-family: Georgia, serif; font-size: 1.6rem; }
.live-invite p { margin: .2rem 0; color: #d6deea; max-width: 60ch; }
.live-invite .live-hint { color: #d6deea; }
.live-invite .button-secondary { border-color: white; }
.device-note { margin-top: 1.6rem; display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; color: var(--muted); font-size: .9rem; }
.device-note p { margin: 0; max-width: 64ch; }

.day-header { padding: 1.6rem 1.6rem 1.2rem; color: white; background: var(--ink); border-left: 12px solid var(--cobalt); }
.day-header--soft { border-left-color: var(--line); }
.day-header .back-button { display: inline-block; color: white; background: transparent; border-color: rgba(255,255,255,.5); margin-bottom: 1rem; text-decoration: none; }
.day-header .context-line { color: #9fc0ff; }
.day-header h1 { margin: .2rem 0 .4rem; font-family: Georgia, serif; font-size: clamp(1.7rem, 4.5vw, 3.4rem); line-height: 1.05; letter-spacing: -.02em; overflow-wrap: anywhere; hyphens: auto; }
.day-header > p:not(.context-line) { max-width: 70ch; margin: 0 0 1rem; color: #d6deea; }
.section-nav { display: flex; gap: .5rem; flex-wrap: wrap; }
.section-nav a { padding: .55rem .85rem; border: 1px solid rgba(255,255,255,.55); color: white; text-decoration: none; font-weight: 700; font-size: .92rem; }
.section-nav a.is-active, .section-nav a:hover { background: white; color: var(--ink); }

.day-section { margin-top: 2rem; padding-top: 1.4rem; border-top: 5px solid var(--cobalt); }
.day-section + .day-section { border-top-color: var(--red); }
.day-section + .day-section + .day-section { border-top-color: var(--green); }
.section-head h2 { margin: .2rem 0 .4rem; font-family: Georgia, serif; font-size: clamp(1.6rem, 3.4vw, 2.4rem); line-height: 1.1; }
.section-head p:last-child { margin: 0 0 1.2rem; color: var(--muted); max-width: 70ch; }
.day-section h3 { margin: 1.6rem 0 .6rem; font-size: 1.05rem; }
.units { margin: 0 0 1rem; }
.units summary { cursor: pointer; font-weight: 700; color: var(--cobalt); }
.unit-list { margin: .6rem 0 0; padding: 0; list-style: none; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.unit-list li { display: grid; grid-template-columns: 64px 1fr auto; gap: .8rem; align-items: center; padding: .6rem .8rem; background: white; }
.unit-number { font-weight: 800; color: var(--cobalt); }
.unit-kind { color: var(--muted); font-size: .82rem; }

.anchor-list { margin: 0; padding: 0; list-style: none; display: grid; gap: .5rem; }
.anchor { background: white; border: 1px solid var(--line); border-left: 6px solid var(--line); padding: .8rem 1rem; }
.anchor.is-selected { border-left-color: var(--cobalt); background: #f4f7fd; }
.anchor label { display: grid; grid-template-columns: 24px 1fr; gap: .8rem; align-items: start; cursor: pointer; }
.anchor input { width: 20px; height: 20px; margin-top: .2rem; accent-color: var(--cobalt); }
.anchor-list--plain .anchor { border-left-color: var(--cobalt); }
.fact-table { width: 100%; border-collapse: collapse; background: white; }
.fact-table th, .fact-table td { padding: .55rem .7rem; border: 1px solid var(--line); text-align: left; vertical-align: top; font-size: .95rem; }
.fact-table th { width: 32%; font-weight: 750; background: #f4f6f9; }
.fact-table--calc th { width: 28%; }
.fact-table .result { font-weight: 750; white-space: nowrap; }
.calc-note { margin: .6rem 0 0; padding: .7rem 1rem; border-left: 4px solid var(--teal); background: white; }
.plain-list { margin: 0; padding-left: 1.2rem; display: grid; gap: .35rem; }
.trap-list { margin: 0; padding-left: 1.3rem; display: grid; gap: .35rem; }
.source-links { margin: 1.4rem 0 0; color: var(--muted); }
.source-links a { color: var(--cobalt); font-weight: 700; }

.unit-group + .unit-group { margin-top: 1.4rem; }
.unit-group h3 { margin: 0 0 .6rem; }
.exercise-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: .8rem; }
.exercise-card { display: flex; flex-direction: column; gap: .4rem; padding: 1rem 1.1rem; background: white; border: 1px solid var(--line); }
.exercise-card h4 { margin: 0; font-size: 1.05rem; }
.exercise-card p { margin: 0; font-size: .95rem; }
.exercise-meta { display: flex; justify-content: space-between; gap: .5rem; align-items: center; }
.origin-chip { font-size: .78rem; color: var(--muted); }
.exercise-card .button-secondary { align-self: flex-start; margin-top: .3rem; }
.after-exercise { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin-top: .5rem; padding-top: .6rem; border-top: 1px dashed var(--line); font-size: .88rem; color: var(--muted); }

.chip-row { display: flex; flex-wrap: wrap; gap: .45rem; }
.chip-button { border: 1px solid var(--line); background: white; color: var(--ink); padding: .5rem .75rem; cursor: pointer; font-size: .9rem; font-weight: 650; text-align: left; }
.chip-button:hover { border-color: var(--ink); }
.chip-button.is-active { background: var(--ink); color: white; border-color: var(--ink); }
.chip-button:disabled { cursor: default; opacity: .7; }

.path-card { margin-bottom: 1.4rem; padding: 1.2rem 1.3rem; background: white; border: 2px solid var(--ink); border-left-width: 12px; }
.path-card h3 { margin: .2rem 0 .4rem; font-family: Georgia, serif; font-size: 1.5rem; }
.path-card p { margin: 0 0 .5rem; }
.goal-list { margin: 0; padding: 0; list-style: none; display: grid; gap: .6rem; }
.goal { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: center; padding: .9rem 1rem; background: white; border: 1px solid var(--line); border-left: 6px solid var(--line); }
.goal--sicher { border-left-color: var(--green); }
.goal--noch-ueben { border-left-color: var(--cobalt); }
.goal--noch-unklar { border-left-color: var(--red); }
.goal-label { display: flex; gap: .7rem; align-items: baseline; }
.goal-unit { flex: none; color: var(--cobalt); font-weight: 800; font-size: .85rem; min-width: 2.6rem; }
.goal-choices { display: flex; flex-wrap: wrap; gap: .4rem; justify-content: flex-end; }
.steps-box { margin-top: 1.4rem; padding: 1.1rem 1.3rem; background: white; border-top: 5px solid var(--green); }
.steps-box h3 { margin: 0 0 .5rem; }
.steps-list { margin: 0; padding-left: 1.3rem; display: grid; gap: .45rem; font-weight: 650; }
.steps-list a { color: var(--ink); }
.note-field { display: block; margin-top: 1.4rem; }
.note-field span { display: block; margin-bottom: .4rem; font-weight: 700; }
.note-field textarea { width: 100%; padding: .7rem; border: 1px solid var(--line); font: inherit; resize: vertical; background: white; }
.step-actions { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; margin-top: 1.4rem; }
.reset-zone { margin-top: 1.2rem; }
.reset-confirm { padding: 1rem 1.2rem; background: #fff7f5; border-left: 5px solid var(--red); }
.reset-confirm p { margin: 0 0 .7rem; }
.reset-confirm div { display: flex; flex-wrap: wrap; gap: .6rem; }

.path-progress { display: flex; gap: .4rem; margin: .4rem 0 0; padding: 0; list-style: none; }
.path-progress button { width: 36px; height: 36px; border: 1px solid rgba(255,255,255,.55); background: transparent; color: white; font-weight: 800; cursor: pointer; }
.path-progress .is-done button { background: rgba(255,255,255,.25); }
.path-progress .is-current button { background: white; color: var(--ink); }
.path-progress button:disabled { opacity: .45; cursor: default; }
.path-section { border-top-color: var(--cobalt); }
.case-card { margin-bottom: 1rem; padding: 1.1rem 1.2rem; background: white; border: 1px solid var(--line); }
.case-card h3 { margin: 0 0 .4rem; }
.case-card .prompt { margin: .2rem 0 .4rem; font-size: 1.08rem; }
.case-card .option-grid { margin-top: .8rem; }
.option-button.is-chosen { border-color: var(--ink); background: #f0f3f7; }
.option-button:disabled { cursor: default; }
.decision-block { margin-top: 1.2rem; padding: 1rem 1.2rem; background: white; border: 1px solid var(--line); }
.decision-block h3 { margin: 0 0 .5rem; }
.decision-block p { margin: 0 0 .6rem; }
.resolution--wide h3 { margin: 1rem 0 .3rem; font-size: 1rem; }
.check-list { margin: 0; padding: 0; list-style: none; display: grid; gap: .5rem; }
.check-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .8rem; align-items: center; }
.check-list label { display: grid; grid-template-columns: 22px 1fr; gap: .6rem; align-items: start; cursor: pointer; }
.check-list input { width: 20px; height: 20px; accent-color: var(--cobalt); }
.published-results { margin-top: 1rem; padding: 1rem 1.2rem; background: #f4f7fd; border-top: 4px solid var(--cobalt); display: grid; gap: .5rem; }
.live-shell { width: min(920px, 100%); display: grid; gap: 1rem; }
.live-shell .back-button { justify-self: start; text-decoration: none; }

/* ---------- Das Blatt, Wiederfinden, Rechtliches ---------- */
.address-note { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(240px, 1fr); gap: 1.2rem 2rem; align-items: center; margin-bottom: 1.6rem; padding: 1.2rem 1.4rem; background: white; border: 2px solid var(--ink); border-left-width: 12px; }
.address-note h2 { margin: .2rem 0 .3rem; font-size: 1.3rem; }
.address-note p { margin: 0 0 .3rem; }
.address-line { font-family: Georgia, serif; font-size: clamp(1rem, 4.6vw, 1.6rem); font-weight: 700; letter-spacing: .01em; }
.nowrap { white-space: nowrap; }
.address-steps { margin: 0; padding: 0; list-style: none; display: grid; gap: .5rem; font-size: .95rem; }
.address-steps li { padding: .6rem .8rem; border: 1px solid var(--line); background: #f7f8fa; }

.blatt-card { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; flex-wrap: wrap; margin-top: 1.4rem; padding: 1.2rem 1.4rem; background: white; border: 2px solid var(--ink); border-left: 12px solid var(--red); }
.blatt-card h2 { margin: .2rem 0 .3rem; font-family: Georgia, serif; font-size: 1.5rem; line-height: 1.15; }
.blatt-card p { margin: 0; }
.blatt-card p:last-child { color: var(--muted); }
.blatt-card--soft { border-color: var(--line); border-left-color: var(--line); background: #fbfcfd; }
.blatt-card--soft h2 { color: var(--muted); }

.legal-header { border-left-color: var(--cobalt); }
.legal-header .section-nav { margin-top: 1rem; }
.legal-section .section-head p:last-child { margin-bottom: .6rem; }
.legal-block { padding: 1rem 1.2rem; background: white; border: 1px solid var(--line); }
.legal-block + .legal-block { margin-top: .8rem; }
.legal-block h3 { margin: 0 0 .5rem; }
.legal-block p { margin: 0 0 .6rem; max-width: 72ch; }
.legal-block p:last-child { margin-bottom: 0; }
.legal-list { margin: .2rem 0 .8rem; max-width: 72ch; }
.legal-block .source-links { margin-top: .4rem; }
.legal-facts { margin: 0; display: grid; gap: 1px; background: var(--line); border: 1px solid var(--line); }
.legal-facts > div { display: grid; grid-template-columns: minmax(160px, .4fr) minmax(0, 1fr); gap: 1rem; padding: .8rem 1rem; background: white; }
.legal-facts dt { font-weight: 750; }
.legal-facts dd { margin: 0; overflow-wrap: anywhere; }
.missing { color: var(--red); font-weight: 750; }
.legal-plain { margin: 0; max-width: 72ch; }

.notice-dialog { width: min(640px, calc(100% - 2rem)); max-height: calc(100vh - 2rem); margin: auto; border: 2px solid var(--ink); border-left-width: 12px; padding: 0; background: white; color: var(--ink); box-shadow: var(--shadow); }
.notice-dialog::backdrop { background: rgba(20, 35, 59, .72); }
.notice-form { padding: clamp(1.2rem, 4vw, 2rem); }
.notice-form h2 { margin: .2rem 0 .6rem; font-family: Georgia, serif; font-size: clamp(1.5rem, 4vw, 2.1rem); line-height: 1.1; }
.notice-form p { margin: 0 0 .7rem; max-width: 60ch; }
.notice-form .soft-note a { color: var(--cobalt); font-weight: 700; }
.notice-form .button-primary { margin-top: .6rem; }

/* ---------- Druckansicht ---------- */
.print-toolbar { display: flex; flex-wrap: wrap; gap: .8rem; align-items: center; margin-bottom: 1.2rem; }
.print-toolbar .back-button { text-decoration: none; }
.print-sheet { margin: 0 auto; background: white; color: #111; box-shadow: var(--shadow); }
.print-page { width: 210mm; max-width: 100%; min-height: 297mm; padding: 12mm 12mm; box-sizing: border-box; font-size: 9.6pt; line-height: 1.28; }
.print-page--second { border-top: 1px dashed var(--line); page-break-before: always; break-before: page; }
.print-head { border-bottom: 2px solid #111; padding-bottom: 3mm; margin-bottom: 4mm; }
.print-head h1 { margin: 0; font-family: Georgia, serif; font-size: 15.5pt; line-height: 1.1; }
.print-head p { margin: 1.5mm 0 0; color: #444; font-size: 9.5pt; }
.print-page h2 { margin: 3mm 0 1.2mm; font-size: 10.8pt; text-transform: none; border-bottom: 1px solid #999; padding-bottom: .8mm; }
.print-list { margin: 0; padding-left: 4.5mm; display: grid; gap: .8mm; }
.print-list li { break-inside: avoid; }
.print-table { width: 100%; border-collapse: collapse; font-size: 9pt; }
.print-table th, .print-table td { padding: .7mm 1.4mm; border: 1px solid #999; text-align: left; vertical-align: top; }
.print-table th { font-weight: 700; width: 34%; }
.print-table--calc th { width: 30%; }
.print-table .result { font-weight: 700; white-space: nowrap; }
.print-note { margin: 1.2mm 0 0; font-size: 9pt; }
.print-page p { margin: 0 0 1.2mm; }
.blank-line { border-bottom: 1px solid #999; height: 6mm; margin: 0 0 1mm !important; }

@media print {
  @page { size: A4; margin: 12mm; }
  body { background: white; }
  .site-header, .primary-tabs, .site-footer, .print-toolbar, .skip-link, #mode-group, .notice-dialog { display: none !important; }
  #course-view, #day-view, #theme-view, #live-view, #legal-view { display: none !important; }
  #print-view { display: block !important; width: auto; margin: 0; padding: 0; }
  .print-sheet { box-shadow: none; }
  .print-page { width: auto; min-height: 0; padding: 0; }
  .print-page--second { border-top: 0; }
  a { color: inherit; text-decoration: none; }
}

@media (max-width: 700px) {
  .primary-tabs { padding: 0 .5rem; flex-wrap: wrap; }
  .tab-button, .tab-link { padding: .9rem .7rem .7rem; font-size: .95rem; }
  .day-grid { grid-template-columns: 1fr; }
  .goal { grid-template-columns: 1fr; }
  .goal-choices { justify-content: flex-start; }
  .unit-list li { grid-template-columns: 48px 1fr; }
  .unit-kind { grid-column: 2; }
  .check-list li { grid-template-columns: 1fr; }
  .resume-card, .live-invite { flex-direction: column; align-items: flex-start; }
  .address-note { grid-template-columns: 1fr; }
  .blatt-card { flex-direction: column; align-items: flex-start; }
  .legal-facts > div { grid-template-columns: 1fr; gap: .2rem; }
  .director-footer { height: auto; padding: .8rem 1rem; }
  .print-page { padding: 10mm 6mm; min-height: 0; }
  .fact-table th { width: 40%; }
}
