.icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.85rem;
}

.icon-button:hover {
  background: var(--surface-soft);
}

.auth-gate {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  place-items: center;
  padding: 24px;
  background: linear-gradient(135deg, rgba(247, 242, 232, 0.96), rgba(228, 236, 231, 0.96));
}

[data-theme="dark"] .auth-gate {
  background: linear-gradient(135deg, rgba(23, 27, 31, 0.98), rgba(31, 39, 36, 0.98));
}

.auth-card {
  width: min(100%, 420px);
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
}

.auth-kicker {
  margin-bottom: 10px;
  color: var(--accent);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.auth-card h1 {
  margin: 0 0 12px;
  font-family: var(--font-ui);
  font-size: 1.55rem;
  line-height: 1.2;
}

.auth-card p {
  margin: 0 0 20px;
  color: var(--text-muted);
  line-height: 1.65;
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-form label {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 750;
}

.auth-form input {
  width: 100%;
  padding: 12px 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
  color: var(--text);
  font: inherit;
}

.auth-form input:focus {
  outline: 2px solid var(--accent-soft);
  outline-offset: 2px;
}

.auth-submit {
  margin-top: 6px;
  padding: 12px 14px;
  border: 0;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-contrast);
  font-family: var(--font-ui);
  font-weight: 800;
  cursor: pointer;
}

.auth-submit:hover {
  filter: brightness(0.96);
}

.auth-error {
  margin-top: 4px;
  color: var(--danger);
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 700;
}

.auth-note {
  margin-top: 18px !important;
  margin-bottom: 0 !important;
  font-family: var(--font-ui);
  font-size: 0.78rem;
}

.hub-header {
  margin: 22px auto 56px;
  text-align: center;
  max-width: 640px;
}

.hub-header--balanced {
  max-width: 640px;
  margin: 8px auto 34px;
  text-align: center;
}

.hub-header--balanced .hub-title {
  margin-bottom: 0;
  font-size: 1.95rem;
}

.hub-icon--balanced {
  margin-bottom: 10px;
  color: var(--accent);
  font-size: 34px;
}

.tax-hub-header {
  margin: 18px auto 40px;
  text-align: center;
  max-width: 680px;
}

.tax-hub-intro {
  margin: 18px auto 0;
  color: var(--text-muted);
  font-size: 1.06rem;
  line-height: 1.7;
}

.hub-card--quiz .hub-card-icon {
  font-size: 1rem;
  font-weight: 800;
}

.tax-hub-section {
  max-width: 900px;
  margin: 0 auto;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section-heading h2 {
  margin: 0;
  font-family: var(--font-ui);
  font-size: 1.22rem;
  line-height: 1.25;
}

.section-kicker {
  margin-bottom: 5px;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.tax-hub-meta {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 650;
  white-space: nowrap;
}

.text-action {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.text-action:hover {
  color: var(--accent);
}

.hub-kicker,
.content-meta,
.source-list {
  display: block;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.source-list {
  display: none;
}

.hub-icon {
  font-size: 48px;
  margin: 0 auto 16px;
  line-height: 1;
}

.hub-grid,
.chapter-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 16px;
  max-width: 860px;
  margin: 0 auto;
}

.chapter-grid {
  grid-template-columns: repeat(auto-fit, minmax(340px, 1fr));
  max-width: 900px;
}

.tax-chapter-grid {
  max-width: none;
}

.hub-card,
.chapter-card {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  min-height: auto;
  padding: 18px 22px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.hub-card:hover,
.chapter-card:hover {
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow);
}

.hub-card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 34px;
  height: 34px;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
}

.chapter-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  min-width: 42px;
  height: 42px;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.04em;
}

.chapter-number.muted {
  width: 36px;
  min-width: 36px;
  height: 36px;
  background: var(--surface);
  color: var(--text-muted);
  opacity: 0.72;
}

.tax-chapter-card {
  min-height: 150px;
}

.card-body {
  min-width: 0;
  flex: 1 1 auto;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.card-kicker {
  margin-bottom: 4px;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.card-title {
  margin: 0 0 6px;
  font-family: var(--font-ui);
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.3;
}

.learning-label {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 4px 9px;
  border: 1px solid color-mix(in srgb, var(--text-muted) 34%, var(--border));
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-soft) 88%, var(--surface));
  color: color-mix(in srgb, var(--text) 72%, var(--text-muted));
  font-family: var(--font-ui);
  font-size: 0.7rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  line-height: 1.2;
  white-space: normal;
}

.learning-label:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 2px;
}

.card-learning-label {
  flex: 0 0 auto;
  margin-top: 1px;
}

.slide-learning-label {
  flex: 0 0 auto;
  margin-top: 5px;
}

.slide-learning-label.learning-label--important,
.slide-learning-label.label-important {
  border-color: color-mix(in srgb, #c8842d 42%, var(--border));
  background: color-mix(in srgb, #f4d8ae 30%, var(--surface));
  color: color-mix(in srgb, #7a4b14 72%, var(--text));
}

.slide-learning-label.learning-label--practice,
.slide-learning-label.label-practice {
  border-color: color-mix(in srgb, #4f9a73 38%, var(--border));
  background: color-mix(in srgb, #cbe8d8 28%, var(--surface));
  color: color-mix(in srgb, #275f43 70%, var(--text));
}

.slide-learning-label.learning-label--deep,
.slide-learning-label.label-deepening {
  border-color: color-mix(in srgb, #7280ad 36%, var(--border));
  background: color-mix(in srgb, #d7dbec 28%, var(--surface));
  color: color-mix(in srgb, #485171 68%, var(--text));
}

.slide-learning-label.learning-label--overview,
.slide-learning-label.label-overview {
  border-color: color-mix(in srgb, var(--text-muted) 28%, var(--border));
  background: color-mix(in srgb, var(--surface-soft) 70%, var(--surface));
  color: color-mix(in srgb, var(--text-muted) 76%, var(--text));
}

.card-desc {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.55;
}

.card-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 12px;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
}

.card-status::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--border);
}

.card-status.done::before {
  background: var(--success);
}

.card-status.planned::before {
  background: var(--surface-strong);
}

.chapter-card.is-disabled {
  opacity: 0.68;
}

.progress-line {
  height: 8px;
  margin-top: 16px;
  border-radius: 999px;
  background: var(--surface-strong);
  overflow: hidden;
}

.progress-fill {
  width: 0;
  height: 100%;
  background: var(--accent);
}

.hub-actions {
  display: flex;
  justify-content: center;
  margin-top: 14px;
}

.planned-chapters {
  max-width: 900px;
  margin: 28px auto 0;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 78%, var(--surface-soft));
}

.planned-chapters summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 15px 18px;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 750;
  cursor: pointer;
  list-style: none;
}

.planned-chapters summary::-webkit-details-marker {
  display: none;
}

.planned-chapters summary span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--surface-soft);
  color: var(--text-muted);
  font-size: 0.74rem;
}

.planned-list {
  display: grid;
  gap: 8px;
  padding: 0 18px 18px;
}

.planned-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 11px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
  opacity: 0.78;
}

.est-compass {
  max-width: 980px;
  margin: 0 auto 24px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 86%, var(--surface-soft));
  overflow: hidden;
}

.est-compass-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
}

.est-compass-summary::-webkit-details-marker {
  display: none;
}

.est-compass-summary-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.est-compass-summary-copy strong {
  font-family: var(--font-ui);
  font-size: 1.12rem;
  line-height: 1.25;
}

.est-compass-summary-copy > span:last-child,
.est-compass-note {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.est-compass-action {
  flex: 0 0 auto;
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text);
  background: var(--surface);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.est-compass[open] .est-compass-action {
  color: var(--text-muted);
}

.est-compass[open] .est-compass-action::after {
  content: " schließen";
}

.est-compass-detail {
  display: grid;
  gap: 18px;
  padding: 4px 20px 20px;
}

.est-compass-phase {
  display: grid;
  gap: 9px;
}

.est-compass-phase h3 {
  margin: 0;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.est-compass-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.compass-step {
  display: flex;
  gap: 10px;
  min-height: 126px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
}

a.compass-step:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.compass-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.75rem;
  font-weight: 800;
}

.compass-step-copy {
  display: flex;
  flex-direction: column;
  gap: 0;
  min-width: 0;
}

.compass-step-head {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin-bottom: 5px;
}

.compass-step-head strong {
  font-family: var(--font-ui);
  font-size: 0.92rem;
}

.compass-step-copy p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.compass-step-state {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 20px;
  margin-top: auto;
  padding: 2px 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 750;
}

.compass-step-state.is-treated {
  border-color: color-mix(in srgb, var(--success) 24%, var(--border));
  background: transparent;
}

.compass-step-state.is-prepared {
  background: transparent;
}

.compass-step-state.is-later {
  opacity: 0.78;
}

.est-compass-note {
  padding-top: 2px;
  border-top: 1px solid var(--border);
  font-size: 0.86rem;
}

.understanding-teaser {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 980px;
  margin: 0 auto 24px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 88%, var(--surface-soft));
}

.understanding-teaser-copy {
  min-width: 0;
}

.understanding-teaser h2,
.understanding-teaser p {
  margin: 0;
}

.understanding-teaser h2 {
  margin-bottom: 5px;
  font-family: var(--font-ui);
  font-size: 1.18rem;
}

.understanding-teaser p {
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.understanding-teaser p + p {
  margin-top: 4px;
}

.understanding-teaser-action {
  flex: 0 0 auto;
  padding: 9px 13px;
  border: 1px solid var(--accent);
  border-radius: 999px;
  background: var(--surface);
  color: var(--accent);
  font-family: var(--font-ui);
  font-size: 0.84rem;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.tax-hub-quiz-teaser {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 980px;
  margin: 0 auto 24px;
  padding: 18px 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 88%, var(--surface-soft));
}

.quiz-page {
  max-width: 980px;
  margin: 0 auto;
}

.written-page {
  max-width: 1040px;
  margin: 0 auto;
}

.training-mode-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}

.training-mode-card {
  display: grid;
  gap: 14px;
  align-content: space-between;
  min-height: 174px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.training-mode-card h2 {
  margin: 4px 0 8px;
  font-family: var(--font-ui);
  font-size: 1.02rem;
  line-height: 1.25;
}

.training-mode-card p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.training-mode-action {
  justify-self: start;
  text-decoration: none;
}

.training-section-heading {
  margin: 26px 0 12px;
}

.training-section-heading h2 {
  margin: 4px 0 6px;
  font-family: var(--font-ui);
  font-size: 1.12rem;
  line-height: 1.3;
}

.training-section-heading p {
  max-width: 72ch;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.training-checklist-summary {
  display: grid;
  grid-template-columns: 1fr;
  align-items: stretch;
  gap: 14px;
  margin: 0 0 18px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.training-checklist-summary h2 {
  margin: 4px 0 6px;
  font-family: var(--font-ui);
  font-size: 1.06rem;
  line-height: 1.3;
}

.training-checklist-summary p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.training-checklist-summary-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(128px, 1fr));
  gap: 8px;
}

.training-checklist-summary-action {
  justify-self: end;
  white-space: nowrap;
  text-decoration: none;
}

.written-toolbar,
.written-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
}

.written-filter {
  min-height: 38px;
  padding: 9px 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.86rem;
  font-weight: 750;
  text-decoration: none;
  cursor: pointer;
}

.written-filter:hover,
.written-filter.active {
  border-color: var(--accent);
  color: var(--accent);
}

.written-stats {
  align-items: stretch;
}

.written-stat {
  min-width: 118px;
  padding: 11px 13px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  font-family: var(--font-ui);
}

.written-stat span {
  display: block;
  margin-bottom: 3px;
  color: var(--text-muted);
  font-size: 0.76rem;
  font-weight: 700;
}

.written-stat strong {
  font-size: 1.18rem;
}

.written-reset {
  align-self: center;
}

.written-case-list {
  display: grid;
  gap: 12px;
}

.written-case {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.written-case.is-source-gap {
  border-style: dashed;
  background: color-mix(in srgb, var(--surface) 88%, var(--surface-soft));
}

.written-case-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-bottom: 8px;
  font-family: var(--font-ui);
  font-size: 0.74rem;
  font-weight: 750;
  color: var(--text-muted);
}

.written-case-meta span,
.written-status-pill {
  padding: 3px 7px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface-soft);
}

.written-status-pill.status-sicher {
  color: var(--accent);
}

.written-status-pill.status-unsicher {
  color: var(--text);
}

.written-case h2 {
  margin: 0 0 6px;
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.3;
}

.written-case p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.written-source-gap {
  margin-top: 10px;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 700;
}

.written-case-actions {
  display: grid;
  gap: 10px;
  justify-items: end;
}

.written-status-group {
  display: flex;
  gap: 6px;
}

.written-status-button {
  min-height: 32px;
  padding: 6px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.76rem;
  font-weight: 750;
  cursor: pointer;
}

.written-status-button:hover,
.written-status-button.active {
  border-color: var(--accent);
  color: var(--accent);
}

.written-open {
  text-decoration: none;
}

.kodex-page {
  max-width: 1360px;
  margin: 0 auto;
}

.kodex-hero {
  max-width: 1040px;
}

.kodex-rules {
  display: grid;
  grid-template-columns: minmax(240px, 1.2fr) repeat(2, minmax(210px, 0.9fr));
  gap: 18px;
  margin-bottom: 30px;
  padding: 20px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  background: var(--surface);
}

.kodex-rules h2,
.kodex-section h2 {
  margin: 4px 0 8px;
  font-family: var(--font-ui);
  font-size: 1.15rem;
  line-height: 1.3;
}

.kodex-rules p,
.kodex-section-heading p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.92rem;
  line-height: 1.5;
}

.kodex-rule-column {
  padding-left: 16px;
  border-left: 1px solid var(--border);
  font-family: var(--font-ui);
  font-size: 0.84rem;
}

.kodex-rule-column strong {
  display: block;
  margin-bottom: 8px;
}

.kodex-rule-column ul {
  margin: 0;
  padding-left: 18px;
  color: var(--text-muted);
  line-height: 1.55;
}

.kodex-rule-column--warning strong {
  color: var(--danger);
}

.kodex-section {
  margin-bottom: 32px;
}

.kodex-register-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.kodex-register-card {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  font-family: var(--font-ui);
}

.kodex-register-card strong,
.kodex-register-card span {
  display: block;
}

.kodex-register-card strong {
  font-size: 0.94rem;
}

.kodex-register-card span:not(.kodex-color-swatch) {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 0.76rem;
}

.kodex-color-swatch {
  width: 8px;
  min-width: 8px;
  height: 34px;
  margin: 0;
  border-radius: 3px;
  background: #8b8f99;
}

.kodex-color-swatch--estg {
  background: #2f8a5b;
}

.kodex-color-swatch--kstg {
  background: #c74c55;
}

.kodex-color-swatch--ustg {
  background: #d6a821;
}

.kodex-color-swatch--bewg {
  background: #d4772c;
}

.kodex-color-swatch--bao {
  background: #3f75b6;
}

.kodex-color-swatch--nebengesetze {
  background: #7b7f88;
}

.kodex-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 16px;
}

.kodex-priority-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(72px, 1fr));
  gap: 6px;
  min-width: 250px;
}

.kodex-priority-summary > div {
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  font-family: var(--font-ui);
}

.kodex-priority-summary span {
  display: block;
  color: var(--text-muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.kodex-priority-summary strong {
  display: block;
  margin-top: 2px;
  font-size: 1.12rem;
}

.kodex-toolbar {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
  margin-bottom: 14px;
}

.kodex-filter-group {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.kodex-filter {
  min-height: 36px;
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.kodex-filter:hover,
.kodex-filter.active {
  border-color: var(--accent);
  color: var(--accent);
}

.kodex-search {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  max-width: 620px;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 700;
}

.kodex-search input {
  min-height: 40px;
  width: 100%;
  padding: 9px 12px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 500;
}

.kodex-search input:focus {
  border-color: var(--accent);
  outline: 2px solid color-mix(in srgb, var(--accent) 22%, transparent);
  outline-offset: 1px;
}

.kodex-result-count {
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
}

.kodex-table-scroll {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.kodex-table {
  width: 100%;
  min-width: 1240px;
  border-collapse: collapse;
  font-family: var(--font-ui);
  font-size: 0.79rem;
  line-height: 1.42;
}

.kodex-table th,
.kodex-table td {
  padding: 11px 12px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
}

.kodex-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-soft);
  color: var(--text-muted);
  font-size: 0.7rem;
  text-transform: uppercase;
}

.kodex-table tr:last-child td {
  border-bottom: 0;
}

.kodex-table tbody tr:hover {
  background: color-mix(in srgb, var(--surface-soft) 65%, transparent);
}

.kodex-table td:nth-child(1) {
  width: 48px;
}

.kodex-table td:nth-child(2) {
  width: 74px;
}

.kodex-table td:nth-child(3) {
  width: 180px;
}

.kodex-table td:nth-child(5) {
  width: 185px;
}

.kodex-table td:nth-child(6) {
  width: 68px;
  text-align: center;
}

.kodex-row-number {
  color: var(--text-muted);
  font-weight: 800;
}

.kodex-marker-text {
  display: inline-block;
  max-width: 100%;
  padding: 3px 6px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface-soft);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.76rem;
  font-weight: 750;
  white-space: normal;
}

.kodex-priority {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid var(--border);
  border-radius: 50%;
  font-weight: 800;
}

.kodex-priority--a {
  border-color: #3f75b6;
  color: #2f68aa;
}

.kodex-priority--b {
  border-color: #d6a821;
  color: #9a7310;
}

.kodex-priority--c {
  color: var(--text-muted);
}

.kodex-outside > p {
  max-width: 78ch;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.kodex-outside-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 14px;
}

.kodex-outside-list article {
  min-width: 0;
  padding: 13px 15px;
  border: 1px solid var(--border);
  border-radius: 6px;
  background: var(--surface);
}

.kodex-outside-list h3 {
  margin: 0 0 5px;
  font-family: var(--font-ui);
  font-size: 0.92rem;
}

.kodex-outside-list strong {
  display: block;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.78rem;
}

.kodex-outside-list p {
  margin: 5px 0 0;
  color: var(--text-muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.kodex-shopping {
  padding-top: 22px;
  border-top: 1px solid var(--border);
}

.kodex-shopping ol {
  max-width: 78ch;
  margin: 14px 0;
  padding-left: 22px;
  line-height: 1.65;
}

.kodex-shopping-note {
  max-width: 78ch;
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.quiz-hero,
.quiz-card,
.quiz-question-card,
.quiz-resume-card,
.quiz-abort-confirm,
.quiz-complete-confirm {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.quiz-hero {
  margin-bottom: 22px;
  padding: 24px;
  border-left: 3px solid var(--accent);
  background: color-mix(in srgb, var(--surface) 92%, var(--surface-soft));
}

.quiz-hero h1 {
  margin-bottom: 8px;
}

.quiz-hero-copy,
.quiz-section-copy,
.quiz-result-card span,
.quiz-breakdown-row span,
.quiz-check-row small,
.quiz-choice-card small,
.quiz-meta-row {
  color: var(--text-muted);
}

.quiz-notice {
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
  font-family: var(--font-ui);
  font-size: 0.9rem;
}

.quiz-resume-card,
.quiz-abort-confirm,
.quiz-complete-confirm {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  padding: 18px 20px;
}

.quiz-inline-actions,
.quiz-actions,
.quiz-score-inline,
.quiz-meta-row,
.quiz-rating-group {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quiz-pool-subline {
  margin: 6px 0 14px;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
}

.quiz-config {
  display: block;
}

.quiz-config-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(300px, 0.9fr);
  gap: 22px;
  align-items: start;
}

.quiz-config-main {
  display: grid;
  gap: 18px;
}

.quiz-config-sidebar {
  position: sticky;
  top: 20px;
  align-self: start;
}

.quiz-card {
  padding: 20px;
}

.quiz-card h2,
.quiz-question-card h2,
.quiz-abort-confirm h2,
.quiz-complete-confirm h2,
.quiz-resume-card h2,
.quiz-last-result h2 {
  margin: 0 0 10px;
  font-family: var(--font-ui);
  font-size: 1.12rem;
}

.quiz-card--availability p:last-child,
.quiz-last-result p:last-child,
.quiz-abort-confirm p:last-child,
.quiz-complete-confirm p:last-child,
.quiz-resume-card p:last-child {
  margin-bottom: 0;
}

.quiz-segment-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.quiz-segment-group--compact {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
}

.quiz-choice-chip,
.quiz-check-row {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  cursor: pointer;
}

.quiz-choice-chip {
  min-height: 44px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
  justify-content: center;
}

.quiz-choice-chip input,
.quiz-check-row input {
  margin-top: 3px;
}

.quiz-choice-chip span,
.quiz-check-row span {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.quiz-choice-chip strong,
.quiz-check-row strong {
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.95rem;
}

.quiz-choice-chip small {
  display: none;
}

.quiz-choice-chip span {
  justify-items: center;
}

.quiz-choice-chip strong {
  font-size: 0.9rem;
}

.quiz-tax-groups {
  display: grid;
  gap: 14px;
}

.quiz-tax-group {
  margin: 0;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.quiz-tax-legend {
  width: 100%;
  margin: 0;
  padding: 0;
}

.quiz-tax-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 88px 132px;
  align-items: center;
  gap: 14px;
  min-height: 44px;
}

.quiz-check-row--tax {
  flex: 1 1 auto;
  min-width: 0;
}

.quiz-check-row--tax span {
  min-width: 0;
}

.quiz-check-row--tax strong {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quiz-tax-count {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  min-height: 44px;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.84rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.quiz-tax-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 132px;
  min-height: 44px;
}

.quiz-tax-toggle-icon {
  display: inline-block;
  transition: transform 0.16s ease;
}

.quiz-tax-toggle.is-open .quiz-tax-toggle-icon {
  transform: rotate(180deg);
}

.quiz-tax-status {
  margin-top: 8px;
  min-height: 20px;
  padding-left: 34px;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.quiz-tax-panel {
  margin-top: 14px;
}

.quiz-tax-panel.is-hidden {
  display: none;
}

.quiz-tax-toolbar {
  margin-bottom: 12px;
  padding-top: 2px;
}

.quiz-check-row--quiet strong {
  font-size: 0.9rem;
}

.quiz-check-row--quiet span,
.quiz-check-row--chapter span {
  min-width: 0;
}

.quiz-check-row--chapter small {
  white-space: nowrap;
}

.quiz-chapter-list {
  display: grid;
  gap: 8px;
}

.quiz-check-row--chapter {
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.quiz-check-row--chapter:first-child {
  padding-top: 0;
  border-top: 0;
}

.quiz-check-row--wide {
  align-items: center;
}

.quiz-actions {
  margin-top: 4px;
}

.quiz-actions--sidebar {
  margin-top: 18px;
  flex-direction: column;
}

.quiz-actions--sidebar .understanding-teaser-action,
.quiz-actions--sidebar .secondary-action {
  width: 100%;
  text-align: center;
}

.quiz-start-button[disabled] {
  opacity: 0.55;
  pointer-events: none;
}

.quiz-last-result {
  margin-top: 22px;
  padding: 20px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 92%, var(--surface-soft));
}

.quiz-session-header {
  margin-bottom: 18px;
}

.quiz-progress {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 10px;
}

.quiz-progress .progress-line {
  margin-top: 0;
  flex: 1;
}

.quiz-progress-pct {
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  min-width: 3ch;
  text-align: right;
}

.quiz-question-card {
  padding: 18px 20px;
}

.quiz-question-text {
  margin: 0 0 14px;
  font-family: var(--font-ui);
  font-size: 1.08rem;
  line-height: 1.5;
}

.quiz-answer-shell {
  margin-top: 10px;
}

.quiz-answer-panel {
  margin-top: 10px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
}

.quiz-answer-panel p:last-child {
  margin-bottom: 0;
}

.quiz-card--snapshot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 96%, var(--surface-soft));
}

.quiz-score-inline {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  min-width: 0;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.4;
}

.quiz-score-inline span[aria-hidden="true"] {
  color: color-mix(in srgb, var(--text-muted) 62%, var(--border));
}

.quiz-meta-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.quiz-question-footer {
  margin-bottom: 10px;
}

.quiz-question-footer .source-pills {
  margin-top: 0;
}

.quiz-answer-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.quiz-answer-toggle::after {
  content: "▾";
  font-size: 0.8rem;
  transition: transform 0.15s ease;
}

.quiz-answer-toggle.is-open::after {
  transform: rotate(180deg);
}

.quiz-rate-button {
  min-height: 42px;
}

.quiz-result-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.quiz-result-card {
  display: grid;
  gap: 4px;
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.quiz-result-card strong {
  font-family: var(--font-ui);
  font-size: 1.55rem;
  line-height: 1.1;
}

.quiz-summary-list {
  display: grid;
  gap: 10px;
}

.quiz-summary-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(88px, auto);
  align-items: center;
  gap: 12px;
  min-height: 34px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.quiz-summary-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.quiz-summary-row span {
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 700;
  white-space: nowrap;
}

.quiz-summary-row strong {
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.95rem;
  line-height: 1.4;
  justify-self: end;
  min-width: 88px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.quiz-card--mobile-start {
  display: none;
  margin-top: 18px;
}

.quiz-mobile-start-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.quiz-mobile-start-row strong {
  font-family: var(--font-ui);
  font-size: 0.98rem;
}

.quiz-mobile-start-row span {
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 700;
}

.quiz-summary-list--mobile {
  gap: 8px;
}

.quiz-summary-list--mobile .quiz-summary-row {
  min-height: 32px;
}

.quiz-breakdown-list,
.quiz-problem-list {
  display: grid;
  gap: 10px;
}

.quiz-breakdown-row,
.quiz-problem-item {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface-soft);
}

.quiz-breakdown-row {
  display: grid;
  gap: 4px;
}

.quiz-breakdown-row strong,
.quiz-problem-question {
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.95rem;
  line-height: 1.45;
}

.quiz-problem-question {
  margin: 10px 0 0;
}

.quiz-card--error {
  border-left: 3px solid var(--danger);
}

.understanding-page {
  max-width: 980px;
  margin: 0 auto;
}

.understanding-hero {
  margin-bottom: 22px;
  padding: 24px;
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  background: var(--surface-soft);
}

.understanding-hero h1 {
  margin-bottom: 8px;
}

.understanding-subtitle {
  margin: 0 0 8px;
  color: var(--accent);
  font-family: var(--font-ui);
  font-size: 1.05rem;
  font-weight: 800;
}

.understanding-hero p:last-child {
  margin-bottom: 0;
  color: var(--text-muted);
}

.understanding-jumps {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0 0 28px;
}

.understanding-jumps button {
  padding: 8px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 800;
  cursor: pointer;
}

.understanding-jumps button:hover,
.understanding-jumps button:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
}

.understanding-section {
  margin: 34px 0;
  scroll-margin-top: 90px;
}

.understanding-section > h2 {
  margin-bottom: 12px;
}

.understanding-section > p,
.understanding-lead {
  max-width: 76ch;
  color: var(--text-muted);
  line-height: 1.65;
}

.understanding-path {
  display: block;
  max-width: 760px;
}

.understanding-path-item {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 14px;
  padding: 0 0 20px;
}

.understanding-path-copy {
  min-width: 0;
}

.understanding-path-item span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  margin-bottom: 8px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 800;
}

.understanding-path-item:not(:last-child)::after {
  content: "";
  position: absolute;
  left: 13px;
  top: 34px;
  bottom: 6px;
  width: 1px;
  background: var(--border);
}

.understanding-path-copy strong {
  display: block;
  margin-bottom: 5px;
  font-family: var(--font-ui);
}

.understanding-path-copy p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.understanding-steps {
  display: grid;
  gap: 14px;
  margin-top: 16px;
}

.understanding-step,
.understanding-number-box,
.understanding-office-step {
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.understanding-step {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
}

.understanding-step-body {
  min-width: 0;
}

.understanding-step-mark,
.understanding-office-step span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.74rem;
  font-weight: 850;
}

.understanding-step h3,
.understanding-office-step h3 {
  margin: 0 0 12px;
  font-family: var(--font-ui);
  font-size: 1rem;
}

.understanding-card-part {
  padding: 0;
}

.understanding-card-part + .understanding-card-part {
  margin-top: 9px;
}

.understanding-card-part strong {
  display: block;
  margin-bottom: 3px;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.74rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.understanding-card-part p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.understanding-number-box {
  margin-top: 16px;
  padding: 18px;
  border-left: 3px solid var(--warn);
  background: var(--warn-soft);
}

.understanding-number-kicker {
  margin-bottom: 4px;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.understanding-number-box h3 {
  margin: 0 0 8px;
  font-family: var(--font-ui);
  font-size: 0.98rem;
}

.understanding-number-box p {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 0.9rem;
}

.understanding-number-rows {
  display: grid;
  gap: 6px;
  max-width: 520px;
}

.understanding-number-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  padding: 6px 0;
  border-bottom: 1px solid color-mix(in srgb, var(--border) 62%, transparent);
  font-family: var(--font-ui);
}

.understanding-number-row.is-result {
  margin-top: 4px;
  padding-top: 10px;
  border-top: 2px solid var(--border);
  border-bottom: 0;
  font-weight: 850;
}

.understanding-number-row strong {
  font-variant-numeric: tabular-nums;
}

.understanding-number-note {
  margin-top: 6px;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.understanding-number-insight {
  margin: 12px 0 0;
  padding-top: 12px;
  border-top: 1px solid color-mix(in srgb, var(--border) 72%, transparent);
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.55;
}

.understanding-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}

.understanding-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 680px;
}

.understanding-table th,
.understanding-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  text-align: left;
  vertical-align: top;
  font-size: 0.9rem;
}

.understanding-table thead th {
  background: var(--surface-soft);
  font-family: var(--font-ui);
}

.understanding-table tbody tr:last-child th,
.understanding-table tbody tr:last-child td {
  border-bottom: 0;
}

.understanding-office-flow {
  display: grid;
  gap: 10px;
  max-width: 780px;
}

.understanding-office-step {
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 14px;
  padding: 14px 16px;
}

.understanding-office-copy {
  min-width: 0;
}

.understanding-office-step h3 {
  margin-bottom: 5px;
}

.understanding-office-step p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.5;
}

.mini-schema {
  display: grid;
  gap: 9px;
  max-width: 560px;
  margin: 0 0 20px;
  padding: 0;
  list-style: none;
}

.mini-schema-step {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: start;
  min-width: 0;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 96%, var(--surface-soft));
  font-family: var(--font-ui);
}

.mini-schema-step:not(:last-child)::after {
  content: "↓";
  position: absolute;
  left: 22px;
  top: calc(100% - 1px);
  color: color-mix(in srgb, var(--text-muted) 58%, var(--border));
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1;
}

.mini-schema-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  background: var(--surface);
  font-size: 0.66rem;
  font-weight: 750;
}

.mini-schema-copy {
  display: grid;
  gap: 1px;
  min-width: 0;
}

.mini-schema-title {
  display: block;
  min-width: 0;
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.28;
}

.mini-schema-text {
  display: block;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.84rem;
  line-height: 1.36;
}

.understanding-outlook {
  max-width: 600px;
}

.understanding-outlook h3 {
  margin: 0 0 8px;
  font-family: var(--font-ui);
  font-size: 0.96rem;
}

.understanding-outlook-list {
  display: grid;
  gap: 6px;
}

.understanding-outlook-item {
  display: grid;
  gap: 1px;
  padding: 8px 10px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 94%, var(--surface-soft));
  font-size: 0.88rem;
  line-height: 1.35;
}

.understanding-outlook-item strong {
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.86rem;
}

.understanding-outlook-item span {
  color: var(--text-muted);
}

.understanding-compass-section .est-compass {
  margin: 12px 0 0;
}

.planned-title {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
}

.planned-state {
  margin-top: 3px;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.74rem;
  font-weight: 650;
}

.secondary-action {
  min-height: 34px;
  padding: 7px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.secondary-action:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.chapter-title {
  margin-bottom: 16px;
  padding-bottom: 24px;
  border-bottom: 2px solid var(--border);
  font-family: var(--font-ui);
  font-size: 2.45rem;
  line-height: 1.15;
  letter-spacing: 0;
}

.chapter-intro {
  margin-bottom: 40px;
  padding: 24px;
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  background: var(--surface-soft);
  color: var(--text-muted);
  font-size: 1.1rem;
  line-height: 1.75;
}

.chapter-orientation {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: start;
  margin: -18px 0 34px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 84%, var(--surface-soft));
}

.chapter-orientation-kicker {
  padding: 4px 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 800;
  white-space: nowrap;
}

.chapter-orientation-body strong {
  display: block;
  margin-bottom: 3px;
  font-family: var(--font-ui);
  font-size: 0.95rem;
}

.chapter-orientation-body p {
  margin: 0;
  color: var(--text-muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.slide {
  display: none;
}

.slide.active {
  display: block;
  animation: slideFadeIn 0.22s ease-out;
}

.slide-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.slide-heading h2 {
  margin: 0;
}

.source-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin: 9px 0 0;
}

.source-pills--slide {
  margin: 6px 0 4px;
}

.source-pills--block {
  margin-top: 10px;
}

.source-pill {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 3px 8px;
  border: 1px solid color-mix(in srgb, var(--border) 92%, var(--text-muted));
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-soft) 74%, var(--surface));
  color: color-mix(in srgb, var(--text-muted) 88%, var(--text));
  font-family: var(--font-ui);
  font-size: 0.66rem;
  font-weight: 650;
  line-height: 1.25;
  white-space: normal;
  overflow-wrap: anywhere;
}

@media (max-width: 720px) {
  .source-pills {
    gap: 4px;
    margin-top: 8px;
  }

  .source-pill {
    padding: 3px 7px;
    font-size: 0.63rem;
    line-height: 1.2;
  }
}

@keyframes slideFadeIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.content-block {
  margin: 32px 0;
  padding: 18px 24px;
  border: 0;
  border-left: 3px solid var(--border);
  border-radius: 6px;
  background: var(--surface-soft);
  overflow-wrap: normal;
  word-break: normal;
}

.content-block.hero-card {
  padding: 18px 24px;
  border-left-color: var(--accent);
  background: var(--surface-soft);
  box-shadow: none;
}

.content-block.hero-card .block-title {
  font-size: 1.2rem;
}

.content-block.law-reference {
  border-left-color: var(--law);
  background: var(--law-soft);
}

.content-block.ai-help {
  border-left-color: var(--accent);
  border-left-width: 4px;
  background: rgba(76, 114, 176, 0.08);
  box-shadow: inset 0 0 0 1px rgba(76, 114, 176, 0.14);
}

.content-block.kodex-marking,
.content-block.kodexHint {
  border-left-color: var(--warn);
  background: var(--warn-soft);
}

.content-block.merker,
.content-block.summary {
  border-left-color: var(--success);
  background: var(--success-soft);
}

.content-block.cards,
.content-block.matrix,
.content-block.process {
  padding: 0;
  border: 0;
  background: transparent;
}

.content-block.achtung {
  border-left-color: var(--danger);
  background: var(--danger-soft);
}

.block-label {
  margin: 0 0 8px;
  color: var(--text-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.block-title {
  margin: 0 0 8px;
  font-family: var(--font-ui);
  font-size: 1.05rem;
}

.ai-help-disclaimer {
  margin: 0 0 10px;
  color: var(--text-muted);
  font-size: 0.74rem;
  line-height: 1.4;
}

.ai-help-content > :first-child,
.ai-help-shell .expand-panel > :first-child {
  margin-top: 0;
}

.ai-help-list {
  margin: 12px 0 0;
  padding-left: 20px;
}

.ai-help-list li {
  margin: 6px 0;
}

.ai-help-content p,
.ai-help-list li {
  max-width: 62ch;
}

.ai-help-shell {
  margin-top: 0;
}

.ai-help-shell .expand-panel {
  padding-top: 2px;
}

.source-list {
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

.law-pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 8px;
}

.law-pill {
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.law-pill:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.expandable {
  margin-top: 14px;
}

.expand-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
}

.expand-toggle:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.expand-panel {
  margin-top: 12px;
}

.solution-block,
.self-check-explanation {
  margin-top: 10px;
}

.solution-label,
.example-stem-label {
  margin-bottom: 6px;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.example-stem {
  margin-top: 12px;
}

.example-stem:first-child {
  margin-top: 0;
}

.example-facts-list {
  margin: 0;
  padding-left: 18px;
}

.example-facts-list li {
  margin: 4px 0;
}

.example-case-list {
  display: grid;
  gap: 18px;
}

.example-case {
  padding-top: 6px;
  border-top: 1px solid var(--border);
}

.example-case:first-child {
  padding-top: 0;
  border-top: 0;
}

.example-case-title {
  margin: 0 0 10px;
  font-family: var(--font-ui);
  font-size: 1rem;
}

.self-check-intro {
  margin-bottom: 14px;
}

.self-check-list {
  display: grid;
  gap: 12px;
}

.self-check-item {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
}

.self-check-item.extra-check {
  border-style: dashed;
}

.self-check-question {
  margin-bottom: 10px;
  font-family: var(--font-ui);
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.45;
}

.answer-shell .expand-toggle,
.solution-shell .expand-toggle {
  margin-top: 0;
}

.answer-shell .expand-panel,
.solution-shell .expand-panel {
  padding-top: 4px;
}

.answer-shell p,
.solution-shell p {
  margin-top: 0;
}

.answer-lernhinweis {
  margin-top: 12px;
  padding: 10px 12px;
  border-left: 3px solid var(--accent);
  background: var(--accent-soft);
  border-radius: 4px;
}

.answer-lernhinweis-label {
  display: block;
  margin-bottom: 4px;
  color: var(--accent-strong);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.answer-lernhinweis p {
  margin: 0;
}

.answer-lernhinweis p + p {
  margin-top: 6px;
}

.answer-list {
  margin: 8px 0 0;
  padding-left: 20px;
  list-style-position: outside;
}

.answer-list li + li {
  margin-top: 4px;
}

ol.answer-list {
  list-style-type: decimal;
}

ol.answer-list--alpha {
  list-style-type: lower-alpha;
}

.rechenweg-list {
  margin: 0;
  padding-left: 20px;
  list-style-position: outside;
  list-style-type: decimal;
}

 .law-inline-link {
   display: inline;
   padding: 0;
   border: 0;
   background: none;
   color: var(--law);
   font: inherit;
   text-decoration: none;
   cursor: pointer;
    overflow-wrap: anywhere;
   }

 .law-inline-link:hover,
 .law-inline-link:focus-visible {
   text-decoration: underline;
 }

 .law-inline-link:focus-visible {
   outline: 2px solid var(--law);
   outline-offset: 2px;
   border-radius: 2px;
 }

 .law-inline-link--missing {
   color: var(--text-muted);
   text-decoration: underline dashed;
   text-underline-offset: 2px;
 }

 .law-explorer {
   position: fixed;
   inset: 0;
   z-index: 90;
   display: none;
   pointer-events: none;
 }

 .law-explorer.visible {
   display: block;
 }

 .law-explorer-panel {
   position: absolute;
   top: 0;
   right: 0;
   bottom: 0;
   width: 440px;
   max-width: 100vw;
   display: flex;
   flex-direction: column;
   border-left: 1px solid var(--border);
   background: var(--surface);
   box-shadow: var(--shadow);
   overflow: hidden;
   pointer-events: auto;
 }

 .law-explorer-header {
   display: flex;
   align-items: flex-start;
   gap: 10px;
   padding: 14px 16px 12px;
   border-bottom: 1px solid var(--border);
   background: var(--surface);
 }

 .law-explorer-nav {
   display: flex;
   gap: 4px;
   flex: 0 0 auto;
 }

 .law-explorer-heading {
   flex: 1;
   min-width: 0;
 }

 .law-explorer-kicker {
   margin-bottom: 4px;
   color: var(--text-muted);
   font-family: var(--font-ui);
   font-size: 0.7rem;
   font-weight: 700;
   letter-spacing: 0.08em;
   text-transform: uppercase;
 }

 .law-explorer-header h2 {
   margin: 0;
   font-family: var(--font-ui);
   font-size: 1rem;
   line-height: 1.25;
 }

 .law-explorer-section {
   margin-top: 3px;
   color: var(--accent);
   font-family: var(--font-ui);
   font-size: 0.88rem;
   font-weight: 750;
 }

 .law-explorer-close {
   flex: 0 0 auto;
   margin-top: 2px;
 }

 .law-explorer-body {
   flex: 1;
   min-height: 0;
   padding: 16px;
   overflow-y: auto;
   outline: none;
 }

 .law-explorer-source {
   margin-bottom: 10px;
   color: var(--text-muted);
   font-family: var(--font-ui);
   font-size: 0.72rem;
   font-weight: 700;
   letter-spacing: 0.04em;
   text-transform: uppercase;
 }

 .law-explorer-note {
   margin: -4px 0 10px;
   color: var(--text-muted);
   font-family: var(--font-ui);
   font-size: 0.82rem;
   line-height: 1.45;
 }

.law-explorer-scroll {
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
}

.law-text-hierarchy {
  padding: 12px 16px 0;
}

.law-text-hierarchy-line {
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.8rem;
  line-height: 1.45;
}

.law-text-hierarchy-line + .law-text-hierarchy-line {
  margin-top: 2px;
}

.law-explorer-scroll .law-text-line {
  margin: 0;
  max-width: 72ch;
   padding: 14px 16px;
   white-space: pre-wrap;
   word-break: normal;
   overflow-wrap: break-word;
   font-family: var(--font-body);
   font-size: 0.92rem;
   line-height: 1.75;
 }

 .law-explorer-scroll .law-text-line--blank {
   padding: 0;
   min-height: 0.5em;
 }

 .law-explorer-scroll .law-text-line:not(:last-child) {
    border-bottom: 1px solid var(--border);
  }

  .law-explorer-scroll .law-text-line.law-abs-highlight {
     background: var(--accent-soft);
   }

  /* ------------------------------------------------------------------
   * Strukturierte Gesetzestext-Blöcke (Variante B)
   * Marker in eigener schmaler Spalte, Text fluchtet unter sich selbst,
   * Kinder über geschachtelte Grids eingerückt. Marker sind echter
   * DOM-Text (kein ::before) für korrektes Copy/Paste und Screenreader.
   * ------------------------------------------------------------------ */
  .law-blocks {
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .law-block {
    display: grid;
    grid-template-columns: var(--law-marker-w, 2.75rem) 1fr;
    column-gap: 0.5rem;
    align-items: start;
  }

  .law-block--lead,
  .law-block--note {
    display: block;
  }

  .law-block--absatz { --law-marker-w: 2.75rem; }
  .law-block--ziffer { --law-marker-w: 2.25rem; }
  .law-block--litera { --law-marker-w: 1.9rem; }
  .law-block--subitem { --law-marker-w: 1.4rem; }

  .law-marker {
    grid-column: 1;
    color: var(--text-muted);
    font-family: var(--font-body);
    font-size: 0.92rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    line-height: 1.75;
    user-select: text;
  }

  .law-block-content {
    grid-column: 2;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .law-block--lead .law-block-content,
  .law-block--note .law-block-content {
    grid-column: 1 / -1;
  }

  .law-block-text {
    max-width: 72ch;
    font-family: var(--font-body);
    font-size: 0.92rem;
    line-height: 1.75;
    overflow-wrap: break-word;
  }

  .law-block--lead > .law-block-content > .law-block-text {
    font-weight: 600;
  }

  .law-block-children {
    display: flex;
    flex-direction: column;
    gap: 4px;
  }

  .law-block-children--flat {
    margin-top: 2px;
    padding-left: 0.75rem;
  }

  .law-block--note {
    margin-top: 4px;
    padding: 8px 12px;
    border-left: 3px solid var(--border);
    background: var(--surface-soft);
    border-radius: 4px;
  }

  .law-block--note > .law-block-content > .law-block-text {
    font-family: var(--font-ui);
    font-size: 0.85rem;
    line-height: 1.55;
    color: var(--text-muted);
    font-style: italic;
  }

  .law-block.law-target-highlight,
  .law-explorer-scroll .law-text-line.law-target-highlight {
    background: var(--accent-soft);
    border-radius: 6px;
    box-shadow: 0 0 0 2px var(--accent-soft);
  }

  .law-blocks .law-inline-link {
    white-space: normal;
  }

   .law-explorer-placeholder {
   padding: 16px;
   border: 1px solid var(--border);
   border-radius: 8px;
   background: var(--surface-soft);
   color: var(--text-muted);
   font-family: var(--font-ui);
   font-size: 0.92rem;
   line-height: 1.55;
 }

 .law-explorer-resize-handle {
   position: absolute;
   top: 0;
   left: 0;
   bottom: 0;
   width: 6px;
   cursor: col-resize;
   z-index: 2;
 }

 .law-explorer-resize-handle:hover {
   background: var(--border);
 }

.learning-card-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(300px, 1fr));
  gap: 16px;
  margin: 24px 0;
}

.learning-card {
  min-height: 118px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  padding: 24px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  font-family: var(--font-ui);
  line-height: 1.3;
  overflow-wrap: normal;
  word-break: normal;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.learning-card.no-icon {
  gap: 0;
}

.learning-card:hover {
  transform: translateY(-1px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
}

.learning-card-icon {
  display: block;
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  color: var(--accent);
  font-size: 28px;
  font-weight: 700;
  white-space: nowrap;
}

.learning-card strong {
  display: block;
  margin-bottom: 5px;
  font-size: 0.98rem;
}

.learning-card p {
  margin: 0;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 400;
}

.learning-card-sections {
  display: grid;
  gap: 8px;
}

.learning-card-section {
  padding-top: 8px;
  border-top: 1px solid var(--border);
}

.learning-card-section:first-child {
  padding-top: 0;
  border-top: 0;
}

.learning-card-section-title {
  margin-bottom: 3px;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.76rem;
  font-weight: 800;
}

.matrix-wrap {
  margin: 18px 0 0;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--surface);
}

.matrix-table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  line-height: 1.4;
}

.matrix-table th,
.matrix-table td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--border);
  border-right: 1px solid var(--border);
  vertical-align: top;
  text-align: left;
}

.matrix-table th:last-child,
.matrix-table td:last-child {
  border-right: 0;
}

.matrix-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--surface-soft);
  color: var(--text);
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.matrix-table tbody th {
  width: 28%;
  color: var(--text);
  font-weight: 800;
}

.matrix-table tbody td {
  color: var(--text-muted);
}

.matrix-table tbody tr:last-child th,
.matrix-table tbody tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 760px) {
  .matrix-wrap {
    overflow-x: visible;
    border: 0;
    background: transparent;
  }

  .matrix-table {
    min-width: 0;
    border-collapse: separate;
    border-spacing: 0 12px;
  }

  .matrix-table thead {
    display: none;
  }

  .matrix-table,
  .matrix-table tbody,
  .matrix-table tr,
  .matrix-table th,
  .matrix-table td {
    display: block;
    width: 100%;
  }

  .matrix-table tr {
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--surface);
  }

  .matrix-table th,
  .matrix-table td {
    padding: 8px 0;
    border: 0;
  }

  .matrix-table th::before,
  .matrix-table td::before {
    content: attr(data-label);
    display: block;
    margin-bottom: 3px;
    color: var(--text-muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }
}

.process-list {
  display: grid;
  gap: 10px;
  margin: 12px 0 0;
  padding: 0;
  list-style: none;
  counter-reset: process;
}

.process-list li {
  counter-increment: process;
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
  font-family: var(--font-ui);
  overflow-wrap: normal;
  word-break: normal;
}

.process-text {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: normal;
}

.process-list li::before {
  content: counter(process);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: var(--accent);
  color: var(--color-text-inverse, #fff);
  font-weight: 800;
}

.slide-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 10px 48px;
  background: var(--surface);
}

.slide-nav > button[data-dir] {
  min-width: 88px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 7px;
  background: var(--surface-soft);
  color: var(--text);
}

.slide-nav > button[data-dir]:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.slide-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: nowrap;
  gap: 8px;
  min-width: 0;
  flex: 1 1 auto;
  overflow-x: auto;
  overflow-y: visible;
  padding: 12px 6px;
  scrollbar-width: thin;
}

.slide-dots.is-overflowing {
  justify-content: flex-start;
}

.slide-dots.is-compact {
  gap: 6px;
}

.slide-dots.is-dense {
  gap: 4px;
}

.slide-dot {
  width: 8px;
  height: 8px;
  min-width: 8px;
  max-width: 8px;
  flex: 0 0 8px;
  border: 0;
  border-radius: 50%;
  background: var(--border);
  position: relative;
  padding: 0;
  appearance: none;
  -webkit-appearance: none;
  transition: background-color 0.18s ease, box-shadow 0.18s ease;
}

.slide-dots.is-compact .slide-dot {
  width: 7px;
  height: 7px;
  min-width: 7px;
  max-width: 7px;
  flex: 0 0 7px;
}

.slide-dots.is-dense .slide-dot {
  width: 6px;
  height: 6px;
  min-width: 6px;
  max-width: 6px;
  flex: 0 0 6px;
}

.slide-dot.visited {
  background: var(--text-muted);
  opacity: 0.45;
}

.slide-dot.active {
  width: 11px;
  height: 11px;
  min-width: 11px;
  max-width: 11px;
  flex: 0 0 11px;
  background: var(--accent);
  opacity: 1;
  box-shadow: 0 0 0 4px var(--accent-soft);
}

.slide-dots.is-compact .slide-dot.active {
  width: 10px;
  height: 10px;
  min-width: 10px;
  max-width: 10px;
  flex: 0 0 10px;
}

.slide-dots.is-dense .slide-dot.active {
  width: 9px;
  height: 9px;
  min-width: 9px;
  max-width: 9px;
  flex: 0 0 9px;
}

.slide-dot:hover {
  background: var(--accent);
}

.slide-tooltip {
  position: fixed;
  z-index: 300;
  width: max-content;
  max-width: min(360px, calc(100vw - 24px));
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  box-shadow: var(--shadow);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  line-height: 1.45;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: normal;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.14s ease, transform 0.14s ease;
}

.slide-tooltip.visible {
  opacity: 1;
  transform: translateY(0);
}

.spur-shell {
  width: 100%;
  padding: 6px 10px 22px;
}

.spur-header {
  display: none;
  margin: 0 10px 14px;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.spur-list {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 4px 0 0;
}

.spur-list::before {
  content: "";
  position: absolute;
  top: 20px;
  bottom: 20px;
  left: 50%;
  width: 1px;
  transform: translateX(-50%);
  background: var(--border);
}

.spur-item {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.spur-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 8px;
  min-width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--border);
}

.spur-copy {
  display: none;
}

.spur-item:hover {
  box-shadow: 0 0 0 4px var(--surface-soft);
}

.spur-item:hover .spur-mark {
  background: var(--accent);
}

.spur-item.active {
  background: transparent;
  color: var(--text);
  box-shadow: 0 0 0 5px var(--accent-soft);
}

.spur-item.active .spur-mark {
  width: 10px;
  min-width: 10px;
  height: 10px;
  background: var(--accent);
}

.spur-item.completed {
  color: var(--success);
}

.spur-item.completed .spur-mark {
  background: var(--success);
}

.spur-item.disabled {
  opacity: 0.4;
}

.app-shell.spur-expanded .spur-shell,
.app-shell.spur-mobile-open .spur-shell {
  padding-left: 12px;
  padding-right: 12px;
}

.app-shell.spur-expanded .spur-header,
.app-shell.spur-mobile-open .spur-header {
  display: block;
}

.app-shell.spur-expanded .spur-list,
.app-shell.spur-mobile-open .spur-list {
  align-items: stretch;
  gap: 8px;
}

.app-shell.spur-expanded .spur-list::before,
.app-shell.spur-mobile-open .spur-list::before {
  display: none;
}

.app-shell.spur-expanded .spur-item,
.app-shell.spur-mobile-open .spur-item {
  width: 100%;
  height: auto;
  min-height: 52px;
  justify-content: flex-start;
  gap: 12px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
}

.app-shell.spur-expanded .spur-item:hover,
.app-shell.spur-mobile-open .spur-item:hover {
  background: var(--surface);
}

.app-shell.spur-expanded .spur-item.active,
.app-shell.spur-mobile-open .spur-item.active {
  background: var(--accent-soft);
  color: var(--text);
  box-shadow: none;
}

.app-shell.spur-expanded .spur-item.active .spur-mark,
.app-shell.spur-mobile-open .spur-item.active .spur-mark {
  width: 10px;
  min-width: 10px;
  height: 10px;
  background: var(--accent);
}

.app-shell.spur-expanded .spur-item.completed .spur-mark,
.app-shell.spur-mobile-open .spur-item.completed .spur-mark {
  background: var(--success);
}

.app-shell.spur-expanded .spur-copy,
.app-shell.spur-mobile-open .spur-copy {
  display: flex;
  min-width: 0;
  flex: 1 1 auto;
  flex-direction: column;
  gap: 3px;
}

.spur-title {
  display: -webkit-box;
  overflow: hidden;
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.35;
  text-wrap: balance;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.spur-state {
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.74rem;
  font-weight: 600;
  line-height: 1.2;
}

.error-box {
  padding: 18px;
  border: 1px solid var(--danger);
  border-radius: var(--radius);
  background: var(--danger-soft);
}

/* ── Choice Questions ── */

.choice-question {
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}

.quiz-question-card .choice-question {
  padding: 0;
  border: none;
  background: transparent;
}

.choice-question-text {
  margin-bottom: 12px;
  font-family: var(--font-ui);
  font-size: 0.96rem;
  font-weight: 700;
  line-height: 1.45;
}

.choice-options {
  margin: 0 0 14px;
  padding: 0;
  border: 0;
  display: grid;
  gap: 7px;
}

.choice-options-legend {
  margin-bottom: 6px;
  padding: 0;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
}

.choice-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}

.choice-option:hover {
  border-color: var(--accent);
}

.choice-option input[type="checkbox"],
.choice-option input[type="radio"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.choice-option input:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.choice-option-text {
  flex: 1;
  font-family: var(--font-body);
  font-size: 0.9rem;
  line-height: 1.4;
}

.choice-option-marker {
  flex-shrink: 0;
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1;
}

.choice-option-status {
  flex-shrink: 0;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.choice-option.is-selected {
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* Locked result states */
.choice-option.is-correct-chosen {
  border-color: var(--success);
  background: var(--success-soft);
}

.choice-option.is-correct-chosen .choice-option-marker {
  color: var(--success);
}

.choice-option.is-wrong-chosen {
  border-color: var(--danger);
  background: var(--danger-soft);
}

.choice-option.is-wrong-chosen .choice-option-marker {
  color: var(--danger);
}

.choice-option.is-correct-missed {
  border-color: var(--warn);
  border-style: dashed;
  background: var(--warn-soft);
}

.choice-option.is-correct-missed .choice-option-marker {
  color: var(--warn);
}

.choice-option.is-neutral {
  opacity: 0.6;
}

.choice-option input:disabled {
  cursor: default;
}

.choice-option:has(input:disabled) {
  cursor: default;
}

/* Actions */
.choice-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.choice-footer-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px 14px;
  margin-top: 12px;
}

.choice-footer-row--static {
  justify-content: flex-start;
}

.choice-source-line {
  margin: 0;
  min-width: 0;
  font-family: var(--font-ui);
  font-size: 0.76rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.choice-source-line--empty {
  display: none;
}

.choice-source-pills-wrap {
  margin-top: 2px;
}

.choice-source-pills-wrap .source-pills {
  margin-top: 0;
}

.choice-submit-button:disabled,
.choice-retry-button:disabled {
  background: var(--surface-strong);
  color: var(--text-muted);
  border-color: var(--border);
  cursor: default;
}

.choice-submit-button:disabled:hover,
.choice-retry-button:disabled:hover {
  border-color: var(--border);
  color: var(--text-muted);
}

/* Result box */
.choice-result {
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
}

.choice-result--correct {
  border-color: var(--success);
  background: var(--success-soft);
}

.choice-result--partial {
  border-color: var(--warn);
  background: var(--warn-soft);
}

.choice-result--false {
  border-color: var(--danger);
  background: var(--danger-soft);
}

.choice-result-head {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.choice-result-symbol {
  font-family: var(--font-ui);
  font-size: 1.2rem;
  font-weight: 700;
}

.choice-result--correct .choice-result-symbol { color: var(--success); }
.choice-result--partial .choice-result-symbol { color: var(--warn); }
.choice-result--false .choice-result-symbol { color: var(--danger); }

.choice-result-status {
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 700;
}

.choice-result-score {
  margin-left: auto;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 700;
  color: var(--text-muted);
}

.choice-result-calc {
  font-family: var(--font-ui);
  font-size: 0.82rem;
  color: var(--text-muted);
  line-height: 1.4;
}

.choice-result-explanation {
  margin-top: 8px;
  font-size: 0.9rem;
  line-height: 1.45;
}

.choice-result-explanation p:first-child { margin-top: 0; }
.choice-result-explanation p:last-child { margin-bottom: 0; }

/* Chapter slot spacing */
[data-choice-slot] {
  margin-top: 12px;
}

/* Quiz session choice */
.quiz-choice-shell {
  margin-top: 10px;
}

/* Quiz session snapshot nav */
.quiz-snapshot-nav {
  display: grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  gap: 10px;
  margin-top: 0;
  margin-left: auto;
}

.quiz-nav-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: 7px 14px;
  border-radius: 999px;
  font-family: var(--font-ui);
  font-size: 0.84rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}

.quiz-nav-button--secondary {
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
}

.quiz-nav-button--secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.quiz-nav-button--action {
  border: 1px solid var(--accent);
  background: var(--surface);
  color: var(--accent);
  font-weight: 800;
}

.quiz-nav-button--action:hover {
  background: var(--accent);
  color: var(--surface);
}

.quiz-nav-button--muted {
  border-color: var(--border);
  background: var(--surface);
  color: var(--text-muted);
  font-weight: 700;
}

.quiz-nav-button--muted:hover {
  border-color: var(--accent);
  background: var(--surface);
  color: var(--accent);
}

.quiz-nav-abort {
  background: none;
  border: none;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: 8px;
}

.quiz-nav-abort:hover {
  color: var(--accent);
  background: var(--surface-soft);
}

/* Quiz result choice */
.quiz-choice-average {
  font-family: var(--font-ui);
  font-size: 0.9rem;
  color: var(--text-muted);
}

.quiz-result-grid--choice {
  margin-top: 0;
}

.quiz-choice-detail {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface-soft);
}

.quiz-choice-detail-score {
  font-family: var(--font-ui);
  font-size: 0.95rem;
  font-weight: 700;
}

.quiz-choice-detail-line {
  margin-top: 6px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.quiz-choice-detail-ok {
  color: var(--success);
  font-weight: 600;
}

.quiz-choice-detail-list {
  list-style: none;
  margin: 4px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.quiz-choice-detail-list li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 0.88rem;
  line-height: 1.4;
}

.quiz-choice-detail-mark {
  flex: 0 0 auto;
  font-weight: 700;
}

.quiz-choice-detail-list--wrong .quiz-choice-detail-mark {
  color: var(--danger);
}

.quiz-choice-detail-list--missed .quiz-choice-detail-mark {
  color: var(--success);
}

.quiz-choice-detail-text {
  min-width: 0;
  word-break: break-word;
  overflow-wrap: anywhere;
}

/* Skip feature */
.quiz-skip-badge {
  background: var(--surface-soft);
  font-style: italic;
}

/* Learning Help (Einfach erklärt · KI-Lernhilfe) */
.learning-help-shell {
  margin-top: 18px;
}

.learning-help-shell .expand-toggle {
  background: var(--surface-soft);
}

.learning-help-shell .expand-panel {
  padding: 4px 0 0;
}

.learning-help-disclaimer {
  margin: 0 0 14px;
  padding: 8px 12px;
  border-left: 3px solid var(--border);
  color: var(--text-muted);
  font-size: 0.72rem;
  line-height: 1.5;
}

.learning-help-section {
  margin-top: 14px;
}

.learning-help-section:first-child {
  margin-top: 0;
}

.learning-help-heading {
  margin: 0 0 6px;
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.learning-help-section p {
  max-width: 62ch;
  margin: 6px 0;
  line-height: 1.55;
}

.learning-help-example-part {
  margin: 8px 0;
  max-width: 62ch;
  line-height: 1.55;
}

.learning-help-example-part strong {
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 700;
}

.learning-help-example.is-multiple + .learning-help-example.is-multiple {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* ------------------------------------------------------------------ */
/* Falltraining (Case-Question)                                        */
/* ------------------------------------------------------------------ */
.case-question {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.case-section-label {
  color: var(--text-muted);
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.case-case-text {
  max-width: 72ch;
  line-height: 1.6;
}

.case-tasks-list {
  margin: 0;
  padding-left: 1.25rem;
  max-width: 72ch;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.case-tasks-list li,
.case-answer-panel .rechenweg-list li {
  line-height: 1.55;
}

.case-answer-panel {
  margin-top: 6px;
}

.case-answer-panel .solution-block + .solution-block {
  margin-top: 10px;
}

.case-question--static .case-tasks-list {
  margin-bottom: 4px;
}
