:root {
  --bg: #f3f7fb;
  --grid: rgba(20, 94, 128, 0.055);
  --surface: #ffffff;
  --surface-soft: #f8fbfd;
  --surface-strong: #e5eef6;
  --ink: #132235;
  --muted: #66758a;
  --line: #dbe5ee;
  --blue: #256f9f;
  --blue-soft: #e7f2fa;
  --green: #2c8f6b;
  --green-soft: #e9f7f1;
  --red: #c9564d;
  --red-soft: #fff0ee;
  --yellow: #f3c85b;
  --amber-soft: #fff7df;
  --teal: #1f8f92;
  --coral: #d06b5f;
  --shadow: 0 18px 42px rgba(19, 34, 53, 0.09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
body[data-theme="dark"] {
  --bg: #0e1623;
  --grid: rgba(148, 163, 184, 0.05);
  --surface: #141f2d;
  --surface-soft: #192637;
  --surface-strong: #26364a;
  --ink: #edf3f8;
  --muted: #a5b3c5;
  --line: #2d4055;
  --blue: #77bde5;
  --blue-soft: rgba(45, 124, 169, 0.18);
  --green: #62d2a4;
  --green-soft: rgba(44, 143, 107, 0.18);
  --red: #ff8a80;
  --red-soft: rgba(201, 86, 77, 0.16);
  --yellow: #e8bd4e;
  --amber-soft: rgba(243, 200, 91, 0.14);
  --teal: #62d6d2;
  --coral: #ff9a8c;
  --shadow: 0 22px 52px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  overflow-x: hidden;
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    var(--bg);
  background-size: 34px 34px;
  color: var(--ink);
  font-size: 14px;
  user-select: text;
}

button,
textarea,
input {
  font: inherit;
}

button {
  cursor: pointer;
  user-select: none;
}

button:disabled,
textarea:disabled {
  cursor: not-allowed;
  opacity: 0.6;
}

.app-shell {
  min-height: 100dvh;
  padding-top: 70px;
}

.training-focus-shell {
  padding-top: 0;
}

.training-focus-shell.menu-open {
  padding-top: 70px;
}

.training-focus-shell .exam-main {
  height: 100dvh;
}

.training-focus-shell.menu-open .exam-main {
  height: calc(100dvh - 70px);
}

.practice-menu-toggle {
  position: fixed;
  top: 14px;
  left: 16px;
  z-index: 80;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  color: var(--blue);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.12);
  backdrop-filter: blur(14px);
  font-size: 20px;
  font-weight: 900;
}

.app-shell.exam-mode-shell {
  --bg: #f4f4f5;
  --grid: rgba(17, 24, 39, 0.045);
  --surface: #ffffff;
  --surface-soft: #f7f7f8;
  --surface-strong: #e5e7eb;
  --ink: #111827;
  --muted: #4b5563;
  --line: #d1d5db;
  --blue: #1f2937;
  --blue-soft: #e5e7eb;
  --green: #374151;
  --green-soft: #f3f4f6;
  --red: #111827;
  --red-soft: #f3f4f6;
  --shadow: 0 14px 30px rgba(17, 24, 39, 0.12);
}

body[data-theme="dark"] .app-shell.exam-mode-shell {
  --bg: #111111;
  --grid: rgba(255, 255, 255, 0.035);
  --surface: #181818;
  --surface-soft: #202020;
  --surface-strong: #2d2d2d;
  --ink: #f5f5f5;
  --muted: #b8b8b8;
  --line: #3f3f46;
  --blue: #f5f5f5;
  --blue-soft: #2a2a2a;
  --green: #e5e5e5;
  --green-soft: #242424;
  --red: #e5e5e5;
  --red-soft: #242424;
  --shadow: 0 18px 42px rgba(0, 0, 0, 0.38);
}

.exam-mode-shell .top-progress span {
  background: var(--ink);
}

.exam-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 50;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  min-height: 70px;
  padding: 8px 20px 10px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: 0 8px 26px rgba(15, 23, 42, 0.05);
  backdrop-filter: blur(18px);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.brand-mark {
  display: grid;
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--ink);
  color: var(--surface);
  font-weight: 900;
}

.brand strong,
.brand small {
  display: block;
}

.brand strong {
  white-space: nowrap;
  font-size: 14px;
}

.brand small {
  color: var(--muted);
  font-size: 11px;
}

.part-nav {
  display: flex;
  min-width: 0;
  gap: 6px;
  overflow: visible;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.part-tab {
  min-width: 104px;
  padding: 6px 9px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  text-align: center;
  transition: background 0.16s ease, color 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.part-tab span,
.part-tab strong,
.part-tab small {
  display: block;
}

.part-tab span {
  font-size: 9px;
  font-weight: 900;
  letter-spacing: 0.05em;
}

.part-tab strong {
  margin-top: 1px;
  color: inherit;
  font-size: 12px;
}

.part-tab small {
  margin-top: 1px;
  font-size: 9px;
}

.part-tab.active {
  border-color: color-mix(in srgb, var(--blue) 38%, var(--line));
  background: var(--surface);
  color: var(--blue);
  box-shadow: var(--shadow);
}

.part-tab.done {
  color: var(--green);
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.timer,
.ghost,
.icon-button,
.primary,
.secondary {
  border-radius: 8px;
  font-weight: 800;
}

.timer {
  min-width: 72px;
  padding: 8px 9px;
  background: var(--blue-soft);
  color: var(--blue);
  text-align: center;
}

.timer.countdown {
  font-variant-numeric: tabular-nums;
}

.ghost,
.icon-button {
  min-height: 34px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.ghost {
  padding: 7px 11px;
  font-size: 13px;
}

.icon-button {
  width: 34px;
}

.primary,
.secondary {
  min-height: 38px;
  padding: 9px 14px;
  border: 1px solid transparent;
  transition: transform 0.16s ease, box-shadow 0.16s ease;
}

.primary {
  background: var(--blue);
  color: white;
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.22);
}

.primary.danger {
  background: var(--red);
  box-shadow: 0 12px 22px rgba(220, 38, 38, 0.22);
}

.primary.wide,
.secondary.wide {
  width: 100%;
}

.secondary {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.primary:hover,
.secondary:hover,
.ghost:hover,
.icon-button:hover,
.model-card:hover,
.answer-choice:hover,
.heading-option:hover {
  transform: translateY(-1px);
}

.top-progress {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 3px;
  background: var(--surface-strong);
}

.top-progress span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--blue), var(--green));
  transition: width 0.25s ease;
}

.dashboard,
.overview,
.results-page,
.start-screen {
  width: min(1220px, calc(100% - 40px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.welcome-panel,
.overview-head,
.start-panel,
.results-panel {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-end;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow);
}

.dashboard {
  display: grid;
  gap: 18px;
}

.welcome-panel {
  align-items: stretch;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--blue) 13%, transparent), transparent 48%),
    color-mix(in srgb, var(--surface) 94%, transparent);
}

.welcome-panel h1 {
  max-width: 760px;
}

.welcome-panel p {
  max-width: 720px;
  margin-bottom: 0;
}

.welcome-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(96px, 1fr));
  gap: 10px;
  min-width: min(420px, 100%);
}

.welcome-stats div,
.dashboard-card-foot {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.welcome-stats div {
  display: grid;
  place-items: center;
  padding: 12px;
  text-align: center;
}

.welcome-stats strong {
  font-size: 22px;
}

.welcome-stats span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.dashboard-card {
  min-height: 168px;
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
}

.dashboard-card > strong {
  font-size: 20px;
}

.dashboard-card small {
  color: var(--muted);
  line-height: 1.45;
}

.dashboard-card-foot {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-self: end;
  margin-top: auto;
  padding: 9px;
}

.dashboard-card-foot span {
  color: var(--blue);
  font-weight: 900;
}

.dashboard-card-foot em {
  color: var(--muted);
  font-size: 11px;
  font-style: normal;
  font-weight: 800;
}

.start-screen {
  display: grid;
  min-height: calc(100dvh - 70px);
  place-items: center;
}

.start-panel {
  display: grid;
  width: min(720px, 100%);
  align-items: stretch;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--blue);
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin: 6px 0 6px;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.12;
  letter-spacing: 0;
}

h2 {
  margin-bottom: 8px;
  font-size: 18px;
}

p {
  color: var(--muted);
  line-height: 1.55;
}

.score-mini {
  min-width: 132px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  text-align: center;
}

.score-mini strong {
  display: block;
  font-size: 22px;
}

.score-mini span {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.model-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.model-card-shell {
  position: relative;
  min-height: 126px;
}

.model-card {
  width: 100%;
  min-height: 126px;
  display: grid;
  gap: 6px;
  align-content: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.06);
}

.status-reset-button {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  color: var(--muted);
  font-size: 14px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.08);
  opacity: 0.82;
}

.status-reset-button:hover,
.status-reset-button:focus-visible {
  color: var(--blue);
  border-color: color-mix(in srgb, var(--blue) 36%, var(--line));
  opacity: 1;
  transform: translateY(-1px);
}

.model-index,
.card-progress {
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
}

.attempt-badge {
  width: fit-content;
  padding: 5px 8px;
  border: 1px solid color-mix(in srgb, var(--green) 34%, var(--line));
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 11px;
  font-weight: 900;
}

.last-completed-stamp {
  width: fit-content;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 7px;
  border: 1px solid color-mix(in srgb, var(--green) 24%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--green-soft) 62%, var(--surface));
  color: color-mix(in srgb, var(--green) 78%, var(--ink));
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.2;
}

.latest-score-badge {
  width: fit-content;
  display: inline-flex;
  align-items: baseline;
  gap: 5px;
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 10.5px;
  font-weight: 800;
  line-height: 1.2;
}

.latest-score-badge small,
.latest-score-badge strong {
  color: inherit;
  font-size: inherit;
}

.latest-score-badge.passed {
  border-color: color-mix(in srgb, #178a4f 38%, var(--line));
  background: #e8f7ef;
  color: #116c3d;
}

.latest-score-badge.failed {
  border-color: color-mix(in srgb, #dd0000 38%, var(--line));
  background: #fff0f0;
  color: #b80000;
}

body[data-theme="dark"] .latest-score-badge.passed {
  border-color: color-mix(in srgb, #53d38a 44%, var(--line));
  background: rgba(83, 211, 138, 0.14);
  color: #79e6a6;
}

body[data-theme="dark"] .latest-score-badge.failed {
  border-color: color-mix(in srgb, #ff5a52 48%, var(--line));
  background: rgba(255, 90, 82, 0.14);
  color: #ff9b95;
}

.model-card strong {
  font-size: 15px;
}

.model-card small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.4;
}

.model-card.begonnen {
  border-color: color-mix(in srgb, var(--blue) 28%, var(--line));
}

.model-card.geprueft {
  border-color: color-mix(in srgb, var(--green) 38%, var(--line));
  background: color-mix(in srgb, var(--green-soft) 45%, var(--surface));
}

.card-progress {
  align-self: end;
  margin-top: auto;
}

.overview-actions,
.result-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 18px;
}

.overview-tools {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 180px 200px auto;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

.overview-tools label {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.overview-tools input,
.overview-tools select {
  min-height: 38px;
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  padding: 8px 10px;
  outline: 0;
}

.overview-tools input:focus,
.overview-tools select:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 14%, transparent);
}

.overview-tools strong {
  display: grid;
  min-height: 38px;
  place-items: center;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--blue);
}

.empty-state {
  grid-column: 1 / -1;
  padding: 22px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  text-align: center;
  font-weight: 800;
}


.exam-main {
  height: calc(100dvh - 70px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.exam-workspace {
  flex: 1 1 auto;
  display: grid;
  min-height: 0;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 470px);
  background: var(--bg);
}

.text-pane,
.answer-pane {
  min-height: 0;
  overflow: auto;
  user-select: text;
}

.text-pane {
  padding: 20px clamp(18px, 3vw, 34px) 92px;
  border-right: 1px solid var(--line);
}

.answer-pane {
  background: var(--surface);
  padding: 16px 16px 92px;
}

.pane-head {
  margin-bottom: 14px;
}

.pane-head h1 {
  font-size: clamp(22px, 2.5vw, 30px);
}

.task-copy {
  margin: 0;
  white-space: pre-wrap;
  color: var(--ink);
  font: 14px/1.68 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  user-select: text;
}

::selection {
  background: color-mix(in srgb, var(--blue) 22%, transparent);
  color: inherit;
}

mark {
  padding: 0 2px;
  border-radius: 3px;
  background: color-mix(in srgb, var(--blue) 14%, transparent);
  color: inherit;
}

.answer-head {
  position: sticky;
  top: -16px;
  z-index: 5;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin: -16px -16px 14px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(16px);
}

.answer-head h2 {
  margin: 3px 0 0;
  font-size: 17px;
}

.answer-head strong {
  display: grid;
  min-width: 48px;
  min-height: 36px;
  place-items: center;
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--blue);
}

.question-row {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.question-row:first-of-type {
  border-top: 0;
}

.question-title {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  color: var(--muted);
  font-size: 12px;
}

.question-title strong {
  color: var(--ink);
}

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

.answer-choice {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
  color: var(--ink);
  text-align: center;
}

.answer-choice.wide {
  grid-column: span 1;
  justify-content: flex-start;
  text-align: left;
}

.answer-choice span,
.heading-option span {
  display: grid;
  width: 26px;
  height: 26px;
  flex: 0 0 26px;
  place-items: center;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 900;
}

.answer-choice strong {
  overflow-wrap: anywhere;
  font-size: 13px;
}

.answer-choice.selected,
.heading-option.selected,
.drop-zone.filled {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
}

.answer-choice.correct,
.passage-card.correct .drop-zone {
  border-color: color-mix(in srgb, var(--green) 45%, var(--line));
  background: var(--green-soft);
  color: var(--green);
}

.answer-choice.wrong,
.passage-card.wrong .drop-zone {
  border-color: color-mix(in srgb, var(--red) 45%, var(--line));
  background: var(--red-soft);
  color: var(--red);
}

.sprachb2-workspace .task-copy {
  white-space: normal;
}

.sprachb2-workspace {
  grid-template-columns: minmax(0, 1fr) minmax(310px, 380px);
}

.sprachb2-text {
  display: grid;
  width: 100%;
  max-width: none;
  gap: 14px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  box-shadow: var(--shadow-soft);
  font-size: 15px;
  line-height: 1.72;
  overflow-wrap: break-word;
  user-select: text;
}

.sprachb2-text-title {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.3;
  letter-spacing: 0;
}

.sprachb2-text p {
  margin: 0;
}

.word-blank {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  margin: 0 3px;
  padding: 4px 9px;
  border: 1px dashed color-mix(in srgb, var(--blue) 38%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 92%, var(--blue-soft));
  color: var(--blue);
  line-height: 1.2;
  cursor: pointer;
  vertical-align: baseline;
}

.word-blank-badge,
.word-bank-option span,
.sprachb2-summary-item span {
  display: grid;
  min-width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 999px;
  background: color-mix(in srgb, var(--blue-soft) 74%, var(--surface));
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.word-blank-value {
  font-size: 13px;
  line-height: 1.2;
}

.word-blank small {
  color: var(--green);
  font-size: 11px;
  font-weight: 800;
}

.word-blank-clear {
  display: grid;
  width: 20px;
  height: 20px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink) 9%, transparent);
  color: inherit;
  font-size: 13px;
  line-height: 1;
  cursor: pointer;
}

.word-blank-clear:hover {
  background: color-mix(in srgb, var(--red) 14%, transparent);
  color: var(--red);
}

.word-blank.filled {
  border-style: solid;
  background: var(--blue-soft);
}

.word-blank.correct {
  border-color: color-mix(in srgb, var(--green) 52%, var(--line));
  background: var(--green-soft);
  color: var(--green);
}

.word-blank.wrong {
  border-color: color-mix(in srgb, var(--red) 52%, var(--line));
  background: var(--red-soft);
  color: var(--red);
}

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

.word-bank-option,
.sprachb2-summary-item {
  display: grid;
  grid-template-columns: 28px 1fr;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.word-bank-option.used {
  opacity: 0.58;
  background: color-mix(in srgb, var(--muted) 8%, var(--surface));
}

.word-bank-option.selected {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 12%, transparent);
  opacity: 1;
}

.word-bank-option[draggable="true"] {
  cursor: grab;
}

.word-bank-option[draggable="true"]:active {
  cursor: grabbing;
}

@media (max-width: 620px) {
  .sprachb2-text {
    padding: 16px;
    font-size: 14px;
  }

  .sprachb2-text-title {
    font-size: 18px;
  }

  .word-bank {
    grid-template-columns: 1fr;
  }
}

.word-bank-option strong,
.sprachb2-summary-item strong {
  overflow-wrap: anywhere;
  font-size: 13px;
  line-height: 1.25;
}

.sprachb2-answer-summary {
  display: grid;
  gap: 8px;
}

.sprachb2-summary-item.filled {
  border-color: color-mix(in srgb, var(--blue) 38%, var(--line));
  background: color-mix(in srgb, var(--blue-soft) 44%, var(--surface));
}

.sprachb2-summary-item.correct {
  border-color: color-mix(in srgb, var(--green) 52%, var(--line));
  background: var(--green-soft);
  color: var(--green);
}

.sprachb2-summary-item.wrong {
  border-color: color-mix(in srgb, var(--red) 52%, var(--line));
  background: var(--red-soft);
  color: var(--red);
}

.exercise-result {
  display: grid;
  gap: 4px;
  margin-bottom: 12px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--green) 35%, var(--line));
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green);
}

.exercise-result span,
.exercise-result small {
  font-size: 11px;
  font-weight: 900;
}

.exercise-result strong {
  font-size: 18px;
}

.text-tool {
  margin-top: 8px;
  min-height: 30px;
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.lesen-teil2-workspace {
  grid-template-columns: minmax(0, 1.05fr) minmax(430px, 560px);
}

.lesen-article-pane .pane-head {
  margin-bottom: 18px;
}

.lesen-article-pane .pane-head h1 {
  font-size: clamp(24px, 2.4vw, 32px);
}

.article-copy {
  max-width: 760px;
  white-space: pre-wrap;
  font-size: 14px;
  line-height: 1.55;
}

.lesen-teil2-workspace .article-copy {
  width: 100%;
  max-width: none;
  white-space: pre-wrap;
  overflow-wrap: normal;
  word-break: normal;
}

.teil2-answer-pane {
  display: grid;
  align-content: start;
  gap: 16px;
  padding-top: 20px;
}

.teil2-question-card {
  padding: 18px 20px;
  border: 1px solid color-mix(in srgb, var(--line) 76%, var(--muted));
  border-radius: 8px;
  background: color-mix(in srgb, var(--blue-soft) 36%, var(--surface));
  user-select: text;
  -webkit-user-select: text;
  -webkit-touch-callout: default;
}

.teil2-question-text {
  margin: 0 0 12px;
  font-size: 15px;
  line-height: 1.35;
  cursor: text;
  user-select: text;
  -webkit-user-select: text;
  -webkit-touch-callout: default;
}

.teil2-choice-list {
  display: grid;
  gap: 8px;
}

.teil2-choice {
  display: grid;
  grid-template-columns: 14px 1fr;
  gap: 9px;
  align-items: start;
  width: 100%;
  padding: 2px 4px;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
  user-select: text;
  -webkit-user-select: text;
  -webkit-touch-callout: default;
}

.teil2-choice span {
  width: 13px;
  height: 13px;
  margin-top: 3px;
  border: 1.5px solid color-mix(in srgb, var(--muted) 65%, var(--line));
  border-radius: 999px;
  background: var(--surface);
  user-select: none;
  -webkit-user-select: none;
}

.teil2-choice strong {
  font-size: 13.5px;
  font-weight: 500;
  line-height: 1.45;
  user-select: text;
  -webkit-user-select: text;
  -webkit-touch-callout: default;
}

.teil2-choice.selected span {
  border-color: var(--blue);
  box-shadow: inset 0 0 0 3px var(--surface);
  background: var(--blue);
}

.teil2-choice.correct strong,
.teil2-choice.correct span {
  color: var(--green);
  border-color: var(--green);
}

.teil2-choice.wrong strong,
.teil2-choice.wrong span {
  color: var(--red);
  border-color: var(--red);
}

.hoeren-layout {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
  padding: 22px 0 96px;
  background: var(--bg);
}

.hoeren-panel {
  display: grid;
  gap: 16px;
  width: min(980px, calc(100% - 40px));
  margin: 0 auto;
}

.audio-card {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--blue-soft) 28%, var(--surface));
}

.audio-card span,
.audio-card small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.audio-card strong {
  display: block;
  margin: 4px 0;
  font-size: 15px;
}

.audio-card audio {
  width: 100%;
}

.audio-missing {
  padding: 12px 14px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.audio-lock-note {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
}

.hoeren-answer-block {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.hoeren-question {
  display: grid;
  gap: 12px;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, var(--muted));
  border-radius: 8px;
  background: var(--surface);
}

.hoeren-question.unanswered {
  border-color: color-mix(in srgb, var(--red) 52%, var(--line));
  background: color-mix(in srgb, var(--red-soft) 42%, var(--surface));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 10%, transparent);
}

.hoeren-question h3 {
  margin: 0;
  font-size: 14px;
  line-height: 1.45;
}

.rf-choice-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.rf-choice {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.hoeren-question .rf-choice {
  cursor: pointer;
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    color 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.hoeren-question .rf-choice:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--blue) 22%, transparent);
  outline-offset: 2px;
}

.rf-choice span {
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border: 1.5px solid color-mix(in srgb, var(--muted) 65%, var(--line));
  border-radius: 999px;
}

.hoeren-question .rf-choice span {
  position: relative;
  display: grid;
  width: 20px;
  height: 20px;
  flex: 0 0 20px;
  place-items: center;
  border: 2px solid color-mix(in srgb, var(--muted) 58%, var(--line));
  background: var(--surface);
  box-shadow: inset 0 0 0 3px var(--surface);
  transition:
    border-color 160ms ease,
    background-color 160ms ease,
    box-shadow 160ms ease,
    color 160ms ease;
}

.hoeren-question .rf-choice span::after {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: transparent;
  opacity: 0;
  transform: scale(0.55);
  transition:
    opacity 160ms ease,
    transform 160ms ease,
    background-color 160ms ease;
}

.rf-choice strong {
  font-size: 13px;
}

.rf-choice.selected {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
}

.rf-choice.selected span {
  border-color: var(--blue);
  box-shadow: inset 0 0 0 3px var(--surface);
  background: var(--blue);
}

.hoeren-question .rf-choice.selected {
  border-color: color-mix(in srgb, var(--blue) 78%, #111827);
  background: color-mix(in srgb, var(--blue-soft) 68%, var(--surface));
  color: color-mix(in srgb, var(--blue) 82%, #111827);
}

.hoeren-question .rf-choice.selected span {
  border-color: color-mix(in srgb, var(--blue) 78%, #111827);
  background: var(--surface);
  box-shadow: inset 0 0 0 3px var(--surface);
}

.hoeren-question .rf-choice.selected span::after {
  background: color-mix(in srgb, var(--blue) 82%, #111827);
  opacity: 1;
  transform: scale(1);
}

.rf-choice.correct {
  border-color: color-mix(in srgb, var(--green) 45%, var(--line));
  background: var(--green-soft);
  color: var(--green);
}

.hoeren-question .rf-choice.correct span {
  border-color: color-mix(in srgb, var(--green) 62%, var(--line));
  background: var(--green-soft);
  box-shadow: inset 0 0 0 2px var(--surface);
  color: var(--green);
}

.hoeren-question .rf-choice.correct span::after {
  content: "✓";
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  color: var(--green);
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  opacity: 1;
  transform: scale(1);
}

.rf-choice.wrong {
  border-color: color-mix(in srgb, var(--red) 45%, var(--line));
  background: var(--red-soft);
  color: var(--red);
}

.hoeren-question .rf-choice.wrong span {
  border-color: color-mix(in srgb, var(--red) 62%, var(--line));
  background: var(--red-soft);
  box-shadow: inset 0 0 0 2px var(--surface);
  color: var(--red);
}

.hoeren-question .rf-choice.wrong span::after {
  content: "×";
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  color: var(--red);
  font-size: 14px;
  font-weight: 800;
  line-height: 1;
  opacity: 1;
  transform: scale(1);
}

.hoeren-unanswered-note {
  width: fit-content;
  padding: 4px 8px;
  border: 1px solid color-mix(in srgb, var(--red) 32%, var(--line));
  border-radius: 999px;
  background: color-mix(in srgb, var(--red-soft) 70%, var(--surface));
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
}

.hoeren-teil3-layout .hoeren-answer-block {
  gap: 14px;
}

.hoeren-teil3-layout .hoeren-question {
  align-items: start;
  min-width: 0;
  overflow: hidden;
}

.hoeren-teil3-layout .hoeren-question h3,
.hoeren-teil3-layout .rf-choice-list,
.hoeren-teil3-layout .hoeren-unanswered-note,
.hoeren-teil3-layout .inline-solution {
  min-width: 0;
}

.hoeren-teil3-layout .rf-choice-list {
  grid-template-columns: repeat(2, minmax(112px, 1fr));
}

.hoeren-teil3-layout .rf-choice {
  width: 100%;
  justify-content: flex-start;
  align-items: center;
  min-width: 0;
  min-height: 44px;
  white-space: normal;
}

.hoeren-teil3-layout .rf-choice strong {
  min-width: 0;
  overflow-wrap: anywhere;
}

.hoeren-teil3-layout .inline-solution {
  width: 100%;
  box-sizing: border-box;
  margin-top: 2px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--green) 30%, var(--line));
  border-radius: 10px;
  background: color-mix(in srgb, var(--green-soft) 68%, var(--surface));
  color: var(--green);
  font-weight: 900;
  line-height: 1.45;
}

@media (max-width: 560px) {
  .hoeren-teil3-layout .rf-choice-list {
    grid-template-columns: minmax(0, 1fr);
  }
}

.teil3-stage-title {
  flex: 0 0 auto;
  margin: 14px 18px 10px;
  padding: 15px 18px;
  border-radius: 8px;
  background: var(--blue);
  color: #ffffff;
  text-align: center;
  box-shadow: var(--shadow);
}

.teil3-stage-title h1 {
  margin: 0;
  font-size: clamp(20px, 2vw, 28px);
  line-height: 1.2;
  letter-spacing: 0;
}

.lesen-teil3-workspace {
  grid-template-columns: minmax(0, 1.05fr) minmax(390px, 0.95fr);
  gap: 18px;
  min-height: 0;
  padding: 0 18px 18px;
  background: color-mix(in srgb, var(--bg) 88%, var(--surface));
  overflow: hidden;
}

.lesen-teil3-text-pane,
.lesen-teil3-answer-pane {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 96%, transparent);
  box-shadow: var(--shadow);
}

.lesen-teil3-text-pane {
  padding: 14px 16px 92px;
}

.lesen-teil3-answer-pane {
  display: grid;
  align-content: start;
  gap: 12px;
  padding: 16px 16px 92px;
}

.teil3-tools {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  margin-bottom: 12px;
}

.lesen-teil3-texts {
  gap: 18px;
}

.teil3-info-card {
  padding: 18px;
  border-width: 1px 1px 1px 4px;
  border-color: var(--line) var(--line) var(--line) var(--blue);
  background: var(--surface);
}

.teil3-info-card.drag-over,
.teil3-info-card.drag-over .teil3-drop-zone {
  border-color: var(--blue);
  background: color-mix(in srgb, var(--blue-soft) 74%, var(--surface));
}

.teil3-info-card .passage-body {
  margin-top: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.teil3-info-card h3 {
  margin: 8px 0 12px;
  font-size: 16px;
  line-height: 1.35;
}

.lesen-teil3-texts .passage-body p {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.5;
  text-align: left;
}

.teil3-drop-zone {
  min-height: 78px;
  margin-bottom: 16px;
  border-style: dashed;
  place-items: center;
  text-align: center;
}

.teil3-drop-zone.filled {
  place-items: stretch;
  text-align: left;
}

.teil3-assignment-list {
  display: grid;
  gap: 8px;
}

.teil3-assignment-chip {
  position: relative;
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 42px;
  padding: 8px 38px 8px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
}

.teil3-assignment-chip > strong {
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
}

.teil3-assignment-chip > span {
  color: var(--ink);
  font-size: 13px;
  font-weight: 650;
  line-height: 1.35;
  text-transform: none;
}

.teil3-assignment-chip.correct {
  border-color: color-mix(in srgb, var(--green) 45%, var(--line));
  background: var(--green-soft);
}

.teil3-assignment-chip.wrong {
  border-color: color-mix(in srgb, var(--red) 45%, var(--line));
  background: var(--red-soft);
}

.teil3-assignment-chip .drop-clear {
  top: 50%;
  right: 8px;
  transform: translateY(-50%);
}

.teil3-no-match-card {
  border-left-color: var(--muted);
}

.teil3-no-match-hint {
  padding: 12px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.teil3-question-list {
  gap: 10px;
}

.teil3-situation-card {
  display: grid;
  grid-template-columns: 20px 34px minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  width: 100%;
  min-height: 48px;
  padding: 11px 13px;
  border: 1px solid color-mix(in srgb, var(--line) 76%, var(--muted));
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-strong) 58%, var(--surface));
  color: var(--ink);
  text-align: left;
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.05);
  cursor: grab;
}

.teil3-situation-card:active {
  cursor: grabbing;
}

.teil3-situation-card:hover,
.teil3-situation-card.selected {
  border-color: var(--blue);
  background: var(--blue-soft);
}

.teil3-situation-card.used {
  opacity: 0.78;
}

.teil3-situation-card.correct {
  border-color: color-mix(in srgb, var(--green) 45%, var(--line));
  background: var(--green-soft);
}

.teil3-situation-card.wrong {
  border-color: color-mix(in srgb, var(--red) 45%, var(--line));
  background: var(--red-soft);
}

.teil3-checkbox {
  display: block;
  width: 17px;
  height: 17px;
  border: 1.5px solid var(--muted);
  border-radius: 4px;
  background: var(--surface);
}

.teil3-situation-card.used .teil3-checkbox {
  border-color: var(--blue);
  background: linear-gradient(135deg, var(--blue) 50%, transparent 50%), var(--surface);
}

.teil3-situation-card > strong {
  font-size: 13px;
  color: var(--muted);
}

.teil3-situation-card p {
  margin: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.45;
  user-select: text;
}

.teil3-situation-card {
  user-select: text;
}

.teil3-assignment-chip .drop-clear,
.teil3-situation-card .drop-clear {
  pointer-events: auto;
}

.teil3-situation-card small {
  grid-column: 3;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.teil3-solution {
  color: var(--red) !important;
}

.exam-mode-shell .teil3-situation-card.correct,
.exam-mode-shell .teil3-situation-card.wrong,
.exam-mode-shell .teil3-assignment-chip.correct,
.exam-mode-shell .teil3-assignment-chip.wrong,
.exam-mode-shell .answer-choice.correct,
.exam-mode-shell .answer-choice.wrong,
.exam-mode-shell .passage-card.correct .drop-zone,
.exam-mode-shell .passage-card.wrong .drop-zone {
  border-color: var(--line);
  background: var(--surface-soft);
  color: var(--ink);
}
.inline-solution {
  margin-top: 12px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--green-soft);
  color: var(--green);
  font-size: 12px;
  font-weight: 800;
}

.text-card-list,
.option-list {
  display: grid;
  gap: 10px;
}

.passage-card {
  padding: 13px;
  border: 2px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.05);
}

.passage-card.drag-over {
  border-color: var(--blue);
}

.drop-zone,
.solution-box,
.passage-body,
.prompt-box,
.hint-box {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.drop-zone,
.solution-box {
  position: relative;
  display: grid;
  gap: 5px;
  min-height: 62px;
  padding: 10px;
}

.drop-clear {
  position: absolute;
  top: 8px;
  right: 8px;
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--red) 38%, var(--line));
  border-radius: 999px;
  background: var(--red-soft);
  color: var(--red);
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
}

.drop-zone span,
.solution-box span,
.passage-number {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.drop-zone small,
.heading-option small {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.solution-box {
  margin-top: 8px;
  border-color: color-mix(in srgb, var(--green) 45%, var(--line));
  background: var(--green-soft);
  color: var(--green);
}

.reading-explanation {
  display: grid;
  gap: 6px;
  margin-top: 8px;
  padding: 9px 10px;
  border: 1px solid color-mix(in srgb, var(--green) 28%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 82%, var(--green-soft));
  color: var(--ink);
  font-size: 12.5px;
  line-height: 1.45;
}

.reading-explanation strong {
  color: color-mix(in srgb, var(--green) 82%, black);
  font-size: 12px;
  font-weight: 900;
}

.reading-explanation p {
  margin: 0;
  color: var(--ink);
}

.reading-explanation ul {
  display: grid;
  gap: 5px;
  margin: 0;
  padding-left: 18px;
}

.reading-explanation li {
  color: color-mix(in srgb, var(--green) 72%, black);
  font-weight: 750;
}

.reading-explanation small {
  color: var(--muted);
  font-weight: 750;
}

.reading-explanation.compact {
  margin-top: 7px;
  text-align: left;
}

.passage-body {
  margin-top: 10px;
  padding: 12px;
  background: var(--surface);
}

.passage-body.situation {
  margin-top: 0;
  margin-bottom: 10px;
}

.passage-body p {
  margin: 6px 0 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.62;
  user-select: text;
}

.heading-option {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 9px;
  align-items: start;
  width: 100%;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  text-align: left;
}

.heading-option small {
  grid-column: 2;
}

.heading-option.used {
  opacity: 0.48;
}

.exam-footer {
  flex: 0 0 68px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  align-items: center;
  padding: 11px 28px;
  border-top: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  backdrop-filter: blur(16px);
}

.footer-center {
  display: grid;
  gap: 2px;
  text-align: center;
}

.footer-center span {
  font-weight: 900;
}

.footer-center small {
  color: var(--muted);
}

.footer-left,
.footer-right {
  display: flex;
  gap: 10px;
  align-items: center;
}

.footer-right {
  justify-content: flex-end;
}

.start-grid,
.result-score,
.breakdown-grid {
  display: grid;
  gap: 12px;
}

.start-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.start-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.notice-box {
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--blue) 35%, var(--line));
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 800;
  line-height: 1.45;
}

.inline-notice {
  width: min(100% - 32px, 1220px);
  margin: 14px auto 0;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--blue) 35%, var(--line));
  border-radius: 8px;
  background: var(--blue-soft);
  color: var(--blue);
  font-size: 13px;
  font-weight: 800;
  line-height: 1.45;
}

.component-fallback {
  width: min(100% - 32px, 980px);
  margin: 22px auto;
  padding: 18px;
  border: 1px solid color-mix(in srgb, var(--blue) 24%, var(--line));
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
  color: var(--ink);
}

.component-fallback.compact {
  margin: 10px auto;
  padding: 12px;
  box-shadow: none;
}

.component-fallback strong,
.component-fallback small {
  display: block;
}

.component-fallback p {
  margin: 8px 0 12px;
  color: var(--muted);
  line-height: 1.5;
}

.component-fallback small {
  margin-bottom: 12px;
  color: var(--muted);
  word-break: break-word;
}

.start-grid div,
.result-score div,
.breakdown-card {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.start-grid strong,
.start-grid span,
.result-score span,
.result-score strong,
.breakdown-card span,
.breakdown-card strong,
.breakdown-card small {
  display: block;
}

.start-grid strong,
.result-score strong,
.breakdown-card strong {
  font-size: 20px;
}

.start-grid span,
.result-score span,
.breakdown-card span,
.breakdown-card small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
}

.result-score {
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  margin-top: 18px;
}

.breakdown-grid {
  grid-template-columns: repeat(6, minmax(0, 1fr));
  margin-bottom: 18px;
}

.writing-prompt ol {
  margin: 8px 0 0;
  padding-left: 22px;
  line-height: 1.7;
}

.prompt-box,
.hint-box {
  margin-bottom: 12px;
  padding: 13px;
}

.prompt-box h2 {
  font-size: 16px;
}

.prompt-box.compact p,
.prompt-box p {
  margin-bottom: 0;
}

.writing-source {
  margin: 8px 0 0;
  white-space: pre-wrap;
  color: var(--ink);
  font: 13px/1.62 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  user-select: text;
}

.writing-editor textarea {
  width: 100%;
  min-height: 290px;
  resize: vertical;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: var(--surface-soft);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.62;
}

.writing-editor textarea:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 4px color-mix(in srgb, var(--blue) 16%, transparent);
}

.muendlich-workspace .muendlich-copy {
  display: grid;
  width: 100%;
  max-width: none;
  gap: 12px;
  white-space: normal;
  overflow-wrap: break-word;
  user-select: text;
}

.muendlich-copy p {
  margin: 0;
}

.muendlich-answer-pane .prompt-box ol {
  margin: 8px 0 0;
  padding-left: 22px;
  line-height: 1.65;
}

.muendlich-notes span {
  display: block;
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.muendlich-notes textarea {
  min-height: 220px;
}

.muendlich-feedback {
  gap: 12px;
}

.muendlich-feedback ul,
.muendlich-feedback ol {
  margin: 0;
  padding-left: 20px;
  line-height: 1.55;
}

.muendlich-feedback .feedback-section pre {
  margin: 0;
  white-space: pre-wrap;
  font: 13px/1.62 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.writing-feedback {
  display: grid;
  gap: 7px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.feedback-total,
.feedback-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.feedback-total {
  padding: 12px;
  border-radius: 8px;
  background: var(--red-soft);
  color: var(--red);
}

.feedback-total.passed {
  background: var(--green-soft);
  color: var(--green);
}

.feedback-total strong {
  font-size: 20px;
}

.feedback-row {
  padding: 9px 0;
  border-top: 1px solid var(--line);
}

.feedback-row small {
  color: var(--muted);
  font-weight: 900;
}

.feedback-row.total-row {
  border-top-style: dashed;
}

.feedback-section {
  display: grid;
  gap: 8px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.feedback-section h3 {
  margin: 0;
  font-size: 13px;
}

.feedback-section pre {
  margin: 0;
  max-height: 280px;
  overflow: auto;
  white-space: pre-wrap;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: 13px/1.55 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.leitpunkt-row,
.error-row {
  display: grid;
  gap: 4px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.leitpunkt-row.fulfilled {
  border-color: color-mix(in srgb, var(--green) 36%, var(--line));
  background: var(--green-soft);
}

.leitpunkt-row.partial {
  border-color: color-mix(in srgb, var(--yellow) 46%, var(--line));
  background: var(--amber-soft);
}

.leitpunkt-row.missing,
.error-row {
  border-color: color-mix(in srgb, var(--red) 30%, var(--line));
}

.leitpunkt-row small,
.error-row small {
  color: var(--muted);
  line-height: 1.45;
}

.formal-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
}

.formal-grid span {
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
}

.formal-grid .ok {
  border-color: color-mix(in srgb, var(--green) 36%, var(--line));
  background: var(--green-soft);
  color: var(--green);
}

.formal-grid .missing {
  border-color: color-mix(in srgb, var(--red) 30%, var(--line));
  background: var(--red-soft);
  color: var(--red);
}

.writing-feedback p {
  margin: 8px 0 0;
}

.mistakes {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.mistake {
  display: grid;
  gap: 4px;
  padding: 14px;
  border: 1px solid color-mix(in srgb, var(--red) 35%, var(--line));
  border-radius: 8px;
  background: var(--red-soft);
}

.mistake.good {
  border-color: color-mix(in srgb, var(--green) 35%, var(--line));
  background: var(--green-soft);
}

.mistake span {
  color: var(--muted);
}

@media (max-width: 1180px) {
  .exam-header {
    grid-template-columns: 1fr;
    gap: 8px;
    position: sticky;
  }

  .app-shell {
    padding-top: 0;
  }

  .header-actions {
    justify-content: space-between;
  }

  .exam-main {
    height: auto;
    min-height: calc(100dvh - 180px);
    overflow: visible;
  }

  .exam-workspace {
    grid-template-columns: 1fr;
  }

  .overview-tools {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .welcome-panel {
    display: grid;
  }

  .text-pane,
  .answer-pane {
    overflow: visible;
  }

  .text-pane {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .answer-pane {
    padding-bottom: 120px;
  }

  .exam-footer {
    position: sticky;
    bottom: 0;
    z-index: 20;
  }
}

@media (max-width: 820px) {
  .dashboard,
  .overview,
  .results-page,
  .start-screen {
    width: min(100% - 24px, 1220px);
  }

  .overview-head,
  .welcome-panel,
  .results-panel {
    display: grid;
  }

  .dashboard-grid,
  .welcome-stats,
  .model-grid,
  .start-grid,
  .start-actions,
  .result-score,
  .breakdown-grid,
  .choice-grid,
  .overview-tools {
    grid-template-columns: 1fr;
  }

  .exam-footer {
    grid-template-columns: 1fr;
    height: auto;
    text-align: center;
  }

  .footer-left,
  .footer-right {
    justify-content: stretch;
  }

  .primary,
  .secondary {
    width: 100%;
  }

  .rf-choice-list {
    grid-template-columns: 1fr;
  }
}

.ghost.mini {
  width: fit-content;
  min-height: 28px;
  padding: 5px 9px;
  font-size: 11px;
}

.dashboard-card,
.model-card,
.overview-head,
.welcome-panel,
.start-panel,
.results-panel {
  transition: transform 0.16s ease, box-shadow 0.16s ease, border-color 0.16s ease;
}

.dashboard-card:hover,
.model-card:hover {
  box-shadow: 0 18px 42px rgba(15, 23, 42, 0.1);
}


.menu-lines {
  display: grid;
  width: 18px;
  gap: 4px;
}

.menu-lines i {
  display: block;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
}

.learning-evidence {
  background: color-mix(in srgb, var(--green-soft) 82%, white);
  color: color-mix(in srgb, var(--green) 82%, black);
  box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--green) 45%, transparent);
}

.learning-confuser {
  background: color-mix(in srgb, var(--yellow) 72%, white);
  box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--red) 35%, transparent);
}

.mistake p {
  margin: 4px 0 0;
  line-height: 1.45;
}

.evidence-list {
  display: grid;
  gap: 5px;
  margin: 6px 0 0;
  padding-left: 18px;
  color: var(--green);
  font-weight: 750;
}

.confuser-note {
  color: var(--red);
  font-weight: 800;
}

/* 2026 interface refresh */
html {
  scroll-behavior: auto;
}

body {
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    linear-gradient(180deg, #f8fbfd 0%, var(--bg) 44%, #eef5f8 100%);
  background-size: 38px 38px, 38px 38px, auto;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
}

body[data-theme="dark"] {
  background:
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    linear-gradient(180deg, #101a28 0%, var(--bg) 48%, #0b1320 100%);
  background-size: 38px 38px, 38px 38px, auto;
}

button,
input,
select,
textarea {
  -webkit-tap-highlight-color: transparent;
}

html,
body,
#app,
.app-shell,
.exam-main,
[data-scroll-id] {
  overflow-anchor: none;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--blue) 22%, transparent);
  outline-offset: 2px;
}

.exam-header {
  min-height: 72px;
  padding: 10px 22px;
  border-bottom-color: color-mix(in srgb, var(--line) 78%, transparent);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: 0 12px 34px rgba(19, 34, 53, 0.07);
}

.brand {
  border-radius: 8px;
  padding: 4px;
}

.brand-mark {
  background: linear-gradient(135deg, var(--blue), var(--teal));
  box-shadow: 0 10px 22px color-mix(in srgb, var(--blue) 22%, transparent);
}

.part-nav {
  gap: 7px;
  border-color: color-mix(in srgb, var(--line) 82%, transparent);
  background: color-mix(in srgb, var(--surface-soft) 82%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.55);
}

.part-tab {
  min-width: 112px;
  border-radius: 8px;
  padding: 8px 10px;
}

.part-tab.active {
  background: var(--surface);
  color: var(--blue);
  box-shadow: 0 10px 24px rgba(19, 34, 53, 0.08);
}

.part-tab.done {
  color: var(--green);
}

.ghost,
.icon-button,
.primary,
.secondary,
.timer {
  border-radius: 8px;
}

.ghost,
.icon-button,
.secondary {
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  border-color: color-mix(in srgb, var(--line) 86%, transparent);
}

.primary {
  background: linear-gradient(135deg, var(--blue), color-mix(in srgb, var(--teal) 74%, var(--blue)));
  box-shadow: 0 14px 30px color-mix(in srgb, var(--blue) 22%, transparent);
}

.secondary:hover,
.ghost:hover,
.icon-button:hover {
  border-color: color-mix(in srgb, var(--blue) 42%, var(--line));
  color: var(--blue);
}

.dashboard,
.overview,
.results-page,
.start-screen {
  width: min(1260px, calc(100% - 44px));
}

.welcome-panel,
.overview-head,
.start-panel,
.results-panel {
  border-color: color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 8px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--blue-soft) 68%, transparent), transparent 56%),
    color-mix(in srgb, var(--surface) 95%, transparent);
  box-shadow: var(--shadow);
}

.welcome-stats div,
.dashboard-card-foot,
.score-mini,
.overview-tools input,
.overview-tools select,
.overview-tools strong {
  border-color: color-mix(in srgb, var(--line) 80%, transparent);
}

.dashboard-grid,
.model-grid {
  gap: 14px;
}

.dashboard-card,
.model-card,
.hoeren-question,
.teil2-question-card,
.passage-card,
.text-card,
.audio-card,
.hoeren-answer-block,
.prompt-box,
.question-row,
.mistake,
.exercise-result {
  border-color: color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(19, 34, 53, 0.06);
}

.dashboard-card {
  position: relative;
  min-height: 178px;
  padding: 18px;
  overflow: hidden;
}

.dashboard-card::after {
  content: "";
  position: absolute;
  right: 14px;
  top: 14px;
  width: 42px;
  height: 42px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--amber-soft) 76%, transparent);
  opacity: 0.7;
  pointer-events: none;
}

.card-icon {
  position: relative;
  z-index: 1;
  display: grid;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--blue) 24%, var(--line));
  border-radius: 8px;
  background: linear-gradient(135deg, var(--blue-soft), color-mix(in srgb, var(--green-soft) 62%, var(--surface)));
  color: var(--blue);
  font-size: 13px;
  font-weight: 900;
}

.dashboard-card > * {
  position: relative;
  z-index: 1;
}

.dashboard-card > strong {
  font-size: 18px;
  line-height: 1.2;
}

.dashboard-card-foot {
  background: color-mix(in srgb, var(--surface-soft) 88%, var(--surface));
}

.model-card {
  min-height: 132px;
  padding: 16px;
}

.model-card.geprueft {
  background: linear-gradient(180deg, color-mix(in srgb, var(--green-soft) 58%, var(--surface)), var(--surface));
}

.attempt-badge {
  border-radius: 999px;
}

.overview-tools {
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  box-shadow: 0 10px 28px rgba(19, 34, 53, 0.05);
}

.exam-workspace {
  gap: 0;
  background: color-mix(in srgb, var(--bg) 86%, var(--surface-soft));
}

.text-pane {
  background: color-mix(in srgb, var(--surface) 42%, transparent);
}

.answer-pane {
  border-left: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
}

.pane-head {
  padding-bottom: 12px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 72%, transparent);
}

.pane-head h1 {
  font-size: 26px;
  line-height: 1.18;
}

.task-copy,
.article-copy,
.passage-body p,
.teil3-info-card p {
  font-size: 15px;
  line-height: 1.62;
}

.answer-head {
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: 0 8px 22px rgba(19, 34, 53, 0.05);
}

.answer-choice,
.heading-option,
.rf-choice,
.teil2-choice,
.drop-zone,
.teil3-drop-zone {
  border-radius: 8px;
  transition: border-color 0.14s ease, background 0.14s ease, color 0.14s ease, box-shadow 0.14s ease;
}

.answer-choice,
.rf-choice {
  background: var(--surface);
}

.answer-choice.selected,
.heading-option.selected,
.rf-choice.selected,
.drop-zone.filled,
.teil3-drop-zone.filled {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 12%, transparent);
}

.answer-choice.correct,
.rf-choice.correct,
.passage-card.correct .drop-zone {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 12%, transparent);
}

.answer-choice.wrong,
.rf-choice.wrong,
.passage-card.wrong .drop-zone {
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--red) 12%, transparent);
}

.audio-card {
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--blue-soft) 82%, transparent), color-mix(in srgb, var(--green-soft) 42%, var(--surface)));
}

.audio-card audio {
  accent-color: var(--blue);
}

.audio-missing {
  background: var(--amber-soft);
}

.exam-footer {
  border-top-color: color-mix(in srgb, var(--line) 84%, transparent);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(18px);
  box-shadow: 0 -14px 34px rgba(19, 34, 53, 0.08);
}

.practice-menu-toggle {
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 90%, transparent);
}

.inline-notice {
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.learning-evidence {
  background: color-mix(in srgb, var(--green-soft) 88%, transparent);
  color: color-mix(in srgb, var(--green) 82%, var(--ink));
}

.learning-confuser {
  background: color-mix(in srgb, var(--amber-soft) 90%, transparent);
  color: color-mix(in srgb, var(--coral) 80%, var(--ink));
}

.exam-mode-shell .dashboard-card,
.exam-mode-shell .model-card,
.exam-mode-shell .answer-choice,
.exam-mode-shell .rf-choice,
.exam-mode-shell .teil2-question-card,
.exam-mode-shell .passage-card {
  box-shadow: none;
}

@media (max-width: 1180px) {
  .exam-header {
    position: sticky;
    top: 0;
  }

  .part-nav {
    padding-bottom: 8px;
  }

  .pane-head h1 {
    font-size: 23px;
  }
}

@media (max-width: 820px) {
  .dashboard,
  .overview,
  .results-page,
  .start-screen {
    width: min(100% - 24px, 1260px);
  }

  .dashboard-card,
  .model-card,
  .welcome-panel,
  .overview-head,
  .start-panel,
  .results-panel {
    padding: 14px;
  }

  .exam-header {
    padding: 10px 12px;
  }

  .part-tab {
    min-width: 96px;
  }

  .header-actions {
    flex-wrap: wrap;
  }

  .task-copy,
  .article-copy,
  .passage-body p,
  .teil3-info-card p {
    font-size: 14px;
  }
}

/* Phase 1 design system refresh: shared shell, dashboard, navigation and one exam surface */
:root {
  --bg: #f4f7fb;
  --grid: rgba(31, 89, 126, 0.045);
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-strong: #edf2f7;
  --ink: #172033;
  --muted: #657287;
  --line: #dce4ee;
  --blue: #2b6f9f;
  --blue-soft: #e8f2fb;
  --green: #2d8a69;
  --green-soft: #eaf7f1;
  --red: #c9534a;
  --red-soft: #fff0ee;
  --yellow: #d9ad43;
  --amber-soft: #fff8e4;
  --teal: #278d8f;
  --coral: #c8695e;
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 8px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --shadow-sm: 0 8px 22px rgba(23, 32, 51, 0.055);
  --shadow: 0 18px 44px rgba(23, 32, 51, 0.085);
  --shadow-lg: 0 24px 64px rgba(23, 32, 51, 0.12);
  --focus-ring: 0 0 0 3px color-mix(in srgb, var(--blue) 20%, transparent);
}

body[data-theme="dark"] {
  --bg: #101826;
  --grid: rgba(170, 187, 205, 0.045);
  --surface: #162235;
  --surface-soft: #1b2a40;
  --surface-strong: #273a55;
  --ink: #edf3f8;
  --muted: #aab7c7;
  --line: #30445f;
  --blue: #8bc6ec;
  --blue-soft: rgba(86, 155, 203, 0.18);
  --green: #77d4a9;
  --green-soft: rgba(77, 166, 126, 0.18);
  --red: #ff9288;
  --red-soft: rgba(201, 83, 74, 0.18);
  --yellow: #e5bf63;
  --amber-soft: rgba(217, 173, 67, 0.16);
  --teal: #72d4d0;
  --coral: #f1a095;
  --shadow-sm: 0 8px 22px rgba(0, 0, 0, 0.2);
  --shadow: 0 18px 48px rgba(0, 0, 0, 0.3);
  --shadow-lg: 0 28px 72px rgba(0, 0, 0, 0.38);
}

body {
  background:
    radial-gradient(circle at 18% 0%, rgba(43, 111, 159, 0.085), transparent 28%),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    linear-gradient(180deg, #fbfdff 0%, var(--bg) 42%, #eef4f8 100%);
  background-size: auto, 36px 36px, 36px 36px, auto;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
}

body[data-theme="dark"] {
  background:
    radial-gradient(circle at 18% 0%, rgba(139, 198, 236, 0.12), transparent 30%),
    linear-gradient(var(--grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid) 1px, transparent 1px),
    linear-gradient(180deg, #121d2c 0%, var(--bg) 48%, #0d1420 100%);
  background-size: auto, 36px 36px, 36px 36px, auto;
}

button,
input,
select,
textarea {
  font: inherit;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.model-card:focus-visible,
.dashboard-card:focus-visible {
  outline: 0;
  box-shadow: var(--focus-ring), var(--shadow-sm);
}

.app-shell {
  background: transparent;
}

.exam-header {
  min-height: 72px;
  padding: 10px 22px;
  border-bottom: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: var(--shadow-sm);
  backdrop-filter: blur(18px);
}

.brand {
  border-radius: var(--radius-md);
  padding: 5px;
}

.brand:hover {
  background: color-mix(in srgb, var(--blue-soft) 60%, transparent);
}

.brand-mark {
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--blue), var(--teal));
  box-shadow: 0 12px 26px color-mix(in srgb, var(--blue) 24%, transparent);
}

.part-nav {
  gap: var(--space-2);
  padding: 6px;
  border: 1px solid color-mix(in srgb, var(--line) 86%, transparent);
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--surface-soft) 90%, transparent);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.part-tab {
  min-width: 112px;
  padding: 8px 10px;
  border-radius: var(--radius-md);
}

.part-tab:hover {
  background: color-mix(in srgb, var(--blue-soft) 64%, transparent);
  color: var(--blue);
}

.part-tab.active {
  background: var(--surface);
  color: var(--blue);
  box-shadow: var(--shadow-sm);
}

.header-actions,
.footer-left,
.footer-right,
.overview-actions,
.result-actions {
  gap: var(--space-3);
}

.ghost,
.icon-button,
.primary,
.secondary,
.timer,
.practice-menu-toggle {
  border-radius: var(--radius-md);
}

.primary,
.secondary,
.ghost,
.icon-button {
  min-height: 38px;
  transition: background 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.primary {
  border-color: color-mix(in srgb, var(--blue) 72%, var(--teal));
  background: linear-gradient(135deg, var(--blue), color-mix(in srgb, var(--teal) 72%, var(--blue)));
  box-shadow: 0 14px 28px color-mix(in srgb, var(--blue) 20%, transparent);
}

.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 38px color-mix(in srgb, var(--blue) 24%, transparent);
}

.secondary,
.ghost,
.icon-button {
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  border-color: color-mix(in srgb, var(--line) 88%, transparent);
}

.secondary:hover,
.ghost:hover,
.icon-button:hover {
  background: color-mix(in srgb, var(--blue-soft) 64%, var(--surface));
  border-color: color-mix(in srgb, var(--blue) 36%, var(--line));
  color: var(--blue);
}

.practice-menu-toggle {
  border-color: color-mix(in srgb, var(--line) 86%, transparent);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  color: var(--blue);
  box-shadow: var(--shadow-sm);
}

.dashboard,
.overview,
.results-page,
.start-screen {
  width: min(1240px, calc(100% - 48px));
}

.welcome-panel,
.overview-head,
.start-panel,
.results-panel {
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--blue-soft) 54%, transparent), transparent 58%),
    color-mix(in srgb, var(--surface) 96%, transparent);
  box-shadow: var(--shadow);
}

.welcome-panel h1,
.overview-head h1,
.start-panel h1,
.results-panel h1 {
  letter-spacing: 0;
}

.welcome-panel p,
.overview-head p,
.start-panel p,
.results-panel p {
  color: var(--muted);
}

.dashboard-grid,
.model-grid {
  gap: var(--space-4);
}

.dashboard-card,
.model-card {
  border: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
  border-radius: var(--radius-lg);
  background:
    linear-gradient(180deg, color-mix(in srgb, var(--surface) 98%, transparent), color-mix(in srgb, var(--surface-soft) 80%, var(--surface))),
    var(--surface);
  box-shadow: var(--shadow-sm);
}

.dashboard-card {
  min-height: 174px;
  padding: var(--space-5);
}

.dashboard-card::after {
  width: 46px;
  height: 46px;
  background: color-mix(in srgb, var(--blue-soft) 68%, var(--surface));
  opacity: 0.9;
}

.dashboard-card:hover,
.model-card:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--blue) 28%, var(--line));
  box-shadow: var(--shadow);
}

.card-icon {
  width: 40px;
  height: 40px;
  border-color: color-mix(in srgb, var(--blue) 24%, var(--line));
  border-radius: var(--radius-md);
  background: linear-gradient(135deg, var(--blue-soft), color-mix(in srgb, var(--green-soft) 56%, var(--surface)));
}

.dashboard-card > strong,
.model-card strong {
  color: var(--ink);
}

.dashboard-card small,
.model-card small {
  color: var(--muted);
}

.dashboard-card-foot,
.welcome-stats div,
.score-mini,
.overview-tools input,
.overview-tools select,
.overview-tools strong {
  border-color: color-mix(in srgb, var(--line) 82%, transparent);
  background: color-mix(in srgb, var(--surface-soft) 82%, var(--surface));
}

.overview-tools {
  border-radius: var(--radius-lg);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  box-shadow: var(--shadow-sm);
}

.overview-tools input,
.overview-tools select,
.writing-editor textarea {
  border-radius: var(--radius-md);
}

.overview-tools input:focus,
.overview-tools select:focus,
.writing-editor textarea:focus {
  border-color: color-mix(in srgb, var(--blue) 52%, var(--line));
  box-shadow: var(--focus-ring);
}

.exam-main {
  background: transparent;
}

.exam-workspace {
  background: color-mix(in srgb, var(--surface-soft) 86%, transparent);
}

.text-pane,
.answer-pane {
  background: color-mix(in srgb, var(--surface) 94%, transparent);
}

.answer-pane {
  border-left-color: color-mix(in srgb, var(--line) 86%, transparent);
}

.pane-head {
  border-bottom-color: color-mix(in srgb, var(--line) 78%, transparent);
}

.pane-head h1 {
  font-size: 24px;
  line-height: 1.2;
}

.task-copy,
.article-copy,
.passage-body p,
.teil3-info-card p {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.68;
}

.answer-head,
.prompt-box,
.hint-box,
.question-row,
.answer-choice,
.heading-option,
.rf-choice,
.teil2-choice,
.text-card,
.passage-card,
.hoeren-question,
.hoeren-answer-block,
.audio-card,
.writing-feedback {
  border-radius: var(--radius-lg);
}

.prompt-box,
.hint-box,
.question-row,
.text-card,
.passage-card,
.hoeren-question,
.hoeren-answer-block,
.audio-card,
.writing-feedback {
  border-color: color-mix(in srgb, var(--line) 84%, transparent);
  box-shadow: var(--shadow-sm);
}

.answer-choice,
.heading-option,
.rf-choice,
.teil2-choice {
  border-color: color-mix(in srgb, var(--line) 86%, transparent);
}

.answer-choice:hover,
.heading-option:hover,
.rf-choice:hover,
.teil2-choice:hover {
  border-color: color-mix(in srgb, var(--blue) 34%, var(--line));
  background: color-mix(in srgb, var(--blue-soft) 54%, var(--surface));
}

.answer-choice.selected,
.heading-option.selected,
.rf-choice.selected,
.teil2-choice.selected,
.drop-zone.filled,
.teil3-drop-zone.filled {
  box-shadow: var(--focus-ring);
}

.exam-footer {
  border-top-color: color-mix(in srgb, var(--line) 84%, transparent);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: 0 -14px 34px rgba(23, 32, 51, 0.075);
}

.app-shell.exam-mode-shell {
  --bg: #f5f5f5;
  --surface: #ffffff;
  --surface-soft: #f7f7f8;
  --surface-strong: #e5e7eb;
  --ink: #111827;
  --muted: #4b5563;
  --line: #d1d5db;
  --blue: #1f2937;
  --blue-soft: #eceff3;
  --green: #374151;
  --green-soft: #f3f4f6;
  --shadow-sm: none;
  --shadow: none;
  --shadow-lg: none;
}

.exam-mode-shell .dashboard-card,
.exam-mode-shell .model-card,
.exam-mode-shell .prompt-box,
.exam-mode-shell .answer-choice,
.exam-mode-shell .rf-choice,
.exam-mode-shell .passage-card {
  box-shadow: none;
}

@media (max-width: 1180px) {
  .exam-header {
    position: sticky;
    top: 0;
    grid-template-columns: 1fr;
    gap: var(--space-3);
  }

  .app-shell {
    padding-top: 0;
  }

  .part-nav {
    width: 100%;
  }
}

@media (max-width: 820px) {
  body {
    font-size: 13px;
  }

  .dashboard,
  .overview,
  .results-page,
  .start-screen {
    width: min(100% - 24px, 1240px);
  }

  .welcome-panel,
  .overview-head,
  .start-panel,
  .results-panel,
  .dashboard-card,
  .model-card {
    padding: var(--space-4);
  }

  .dashboard-grid,
  .model-grid {
    gap: var(--space-3);
  }

  .part-tab {
    min-width: 98px;
  }

  .pane-head h1 {
    font-size: 21px;
  }

  .task-copy,
  .article-copy,
  .passage-body p,
  .teil3-info-card p {
    font-size: 14px;
  }
}

/* Compact exam header */
.exam-header {
  grid-template-columns: minmax(172px, 190px) minmax(0, 1fr) auto;
  min-height: 76px;
  padding: 8px 16px;
  gap: 10px;
}

.app-shell {
  padding-top: 76px;
}

.training-focus-shell.menu-open {
  padding-top: 76px;
}

.training-focus-shell.menu-open .exam-main {
  height: calc(100dvh - 76px);
}

.brand {
  gap: 8px;
}

.brand-mark {
  width: 34px;
  height: 34px;
  flex-basis: 34px;
  font-size: 13px;
}

.brand strong {
  font-size: 13px;
}

.brand small {
  font-size: 10px;
}

.parts-menu {
  min-width: 0;
}

.parts-toggle-input,
.parts-toggle-label {
  display: none;
}

.part-nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 4px;
  overflow: visible;
  max-height: 58px;
  padding: 4px;
  scrollbar-width: none;
}

.part-nav::-webkit-scrollbar {
  display: none;
}

.part-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: auto;
  min-height: 28px;
  padding: 5px 7px;
  border-radius: 7px;
  white-space: nowrap;
}

.part-tab-label {
  display: inline;
  margin: 0;
  color: inherit;
  font-size: 11px;
  font-weight: 850;
  letter-spacing: 0;
}

.part-tab-points {
  display: inline-grid;
  min-width: 24px;
  place-items: center;
  margin: 0;
  padding: 2px 5px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-strong) 70%, var(--surface));
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
}

.part-tab.active {
  box-shadow: inset 0 -2px 0 var(--blue);
}

.part-tab.active .part-tab-points {
  background: var(--blue-soft);
  color: var(--blue);
}

.header-actions {
  gap: 5px;
}

.header-actions .ghost {
  min-height: 30px;
  padding: 6px 8px;
  font-size: 12px;
}

.header-actions .icon-button {
  width: 30px;
  min-height: 30px;
  font-size: 13px;
}

.timer {
  min-width: 62px;
  padding: 6px 7px;
  font-size: 12px;
}

.top-progress {
  height: 2px;
}

@media (min-width: 1280px) {
  .exam-header {
    min-height: 64px;
  }

  .app-shell {
    padding-top: 64px;
  }

  .training-focus-shell.menu-open {
    padding-top: 64px;
  }

  .training-focus-shell.menu-open .exam-main {
    height: calc(100dvh - 64px);
  }

  .part-nav {
    flex-wrap: nowrap;
    max-height: none;
  }
}

@media (max-width: 1180px) {
  .exam-header {
    grid-template-columns: minmax(160px, 180px) minmax(0, 1fr);
    min-height: 92px;
    align-items: start;
  }

  .header-actions {
    grid-column: 2;
    justify-content: flex-end;
  }

  .part-nav {
    justify-content: flex-start;
  }

  .app-shell {
    padding-top: 0;
  }
}

@media (max-width: 820px) {
  .exam-header {
    grid-template-columns: 1fr;
    min-height: 0;
    padding: 8px 10px;
  }

  .header-left {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
  }

  .parts-menu {
    display: grid;
    gap: 6px;
  }

  .parts-toggle-input {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .parts-toggle-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: var(--shadow-sm);
    color: var(--text);
    font-size: 12px;
    font-weight: 850;
  }

  .parts-toggle-label span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
  }

  .parts-toggle-label strong {
    color: var(--blue);
    font-size: 12px;
  }

  .part-nav {
    position: relative;
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    max-height: none;
    padding: 8px;
    gap: 6px;
  }

  .parts-toggle-input:checked ~ .part-nav {
    display: grid;
  }

  .part-tab {
    justify-content: space-between;
    min-height: 32px;
    padding: 6px 8px;
  }

  .part-tab-label {
    font-size: 12px;
  }

  .header-actions {
    grid-column: auto;
    justify-content: stretch;
  }

  .header-actions .ghost,
  .timer,
  .header-actions .icon-button {
    flex: 1 1 auto;
  }
}

/* Structured header: main skills stay in the header, Teil navigation stays in the page */
.exam-header {
  grid-template-columns: minmax(230px, max-content) minmax(0, 1fr) max-content;
  min-height: 68px;
  padding: 8px 18px;
  gap: 14px;
  align-items: center;
}

.app-shell {
  padding-top: 68px;
}

.training-focus-shell.menu-open {
  padding-top: 68px;
}

.training-focus-shell.menu-open .exam-main {
  height: calc(100dvh - 68px);
}

.header-left,
.main-nav-wrap,
.header-actions {
  min-width: 0;
}

.brand {
  min-width: 220px;
  gap: 10px;
}

.brand-mark {
  width: 36px;
  height: 36px;
  flex-basis: 36px;
  font-size: 13px;
}

.brand strong {
  font-size: 14px;
  line-height: 1.1;
}

.brand small {
  font-size: 11px;
}

.main-nav-wrap {
  display: grid;
  justify-items: center;
}

.main-nav-toggle-input,
.main-nav-toggle-label {
  display: none;
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  gap: 6px;
  padding: 4px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface-soft) 84%, var(--surface));
}

.main-nav-tab {
  min-height: 34px;
  padding: 7px 11px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: 0;
  white-space: nowrap;
  cursor: pointer;
}

.main-nav-tab small {
  display: none;
}

.main-nav-tab:hover {
  color: var(--blue);
  background: color-mix(in srgb, var(--blue-soft) 58%, transparent);
}

.main-nav-tab.active {
  border-color: color-mix(in srgb, var(--blue) 28%, var(--line));
  background: var(--surface);
  color: var(--blue);
  box-shadow: inset 0 -2px 0 color-mix(in srgb, var(--teal) 72%, var(--blue));
}

.header-actions {
  justify-content: flex-end;
  gap: 6px;
}

.header-actions .ghost {
  min-height: 32px;
  padding: 7px 10px;
  font-size: 12px;
}

.header-actions .icon-button {
  width: 32px;
  min-height: 32px;
}

.timer {
  min-width: 68px;
  padding: 7px 8px;
  font-size: 12px;
}

.language-switch {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  min-height: 32px;
  padding: 3px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface-soft) 78%, var(--surface));
  color: var(--muted);
  white-space: nowrap;
}

.language-switch button {
  min-height: 24px;
  padding: 4px 8px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: inherit;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  cursor: pointer;
}

.language-switch button:hover,
.language-switch button:focus-visible {
  background: color-mix(in srgb, var(--blue-soft) 70%, transparent);
  color: var(--blue);
  outline: none;
}

.language-switch button.active {
  background: var(--surface);
  color: var(--blue);
  box-shadow: var(--shadow-sm);
}

.language-switch span {
  font-size: 11px;
  opacity: 0.56;
}

.section-subnav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  width: 100%;
  padding: 8px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: var(--shadow-sm);
}

.section-subtab {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 6px 10px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-soft) 78%, var(--surface));
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.section-subtab small {
  color: inherit;
  font-size: 11px;
  font-weight: 900;
}

.section-subtab:hover,
.section-subtab.active {
  border-color: color-mix(in srgb, var(--blue) 30%, var(--line));
  background: var(--surface);
  color: var(--blue);
}

.section-subtab.active {
  box-shadow: inset 0 -2px 0 var(--teal);
}

.model-subnav {
  width: min(1240px, calc(100% - 48px));
  margin: 12px auto 0;
}

.model-briefing {
  display: grid;
  gap: 12px;
  margin-top: 18px;
}

.briefing-head {
  display: grid;
  gap: 4px;
}

.briefing-head strong {
  color: var(--ink);
  font-size: 17px;
}

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

.briefing-card,
.briefing-note {
  border: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
}

.briefing-card {
  display: grid;
  gap: 5px;
  min-width: 0;
  padding: 12px;
}

.briefing-card span,
.briefing-card small,
.briefing-note span {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.briefing-card strong,
.briefing-note strong {
  color: var(--ink);
  font-size: 14px;
}

.briefing-note {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
}

.model-exam-status {
  display: grid;
  gap: 14px;
  width: min(1240px, calc(100% - 48px));
  margin: 12px auto 0;
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--line) 84%, transparent);
  border-radius: 12px;
  background:
    linear-gradient(135deg, color-mix(in srgb, var(--blue-soft) 48%, transparent), transparent 60%),
    color-mix(in srgb, var(--surface) 96%, transparent);
}

.model-status-main {
  min-width: 0;
}

.model-status-main h2 {
  margin: 4px 0 4px;
  color: var(--ink);
  font-size: clamp(22px, 3vw, 34px);
  letter-spacing: 0;
}

.model-status-main p {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.model-status-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.model-status-metrics div {
  min-width: 0;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 10px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
}

.model-status-metrics span,
.answer-sheet-pill span,
.answer-sheet-pill small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.model-status-metrics strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-size: 20px;
  overflow-wrap: anywhere;
}

.answer-sheet-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.answer-sheet-pill {
  flex: 1 1 104px;
  min-width: 104px;
  min-height: 68px;
  padding: 9px 10px;
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 9px;
  background: color-mix(in srgb, var(--surface-soft) 82%, var(--surface));
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.answer-sheet-pill:hover,
.answer-sheet-pill:focus-visible {
  border-color: color-mix(in srgb, var(--blue) 35%, var(--line));
  background: var(--surface);
}

.answer-sheet-pill.active {
  border-color: color-mix(in srgb, var(--blue) 42%, var(--line));
  box-shadow: inset 0 0 0 2px color-mix(in srgb, var(--teal) 42%, transparent);
}

.answer-sheet-pill.complete {
  background: color-mix(in srgb, var(--green-soft) 72%, var(--surface));
  border-color: color-mix(in srgb, var(--green) 32%, var(--line));
}

.answer-sheet-pill.started {
  background: color-mix(in srgb, var(--blue-soft) 72%, var(--surface));
}

.answer-sheet-pill.unavailable {
  opacity: 0.62;
}

.answer-sheet-pill strong {
  display: block;
  margin: 3px 0;
  font-size: 14px;
  line-height: 1.25;
}

@media (max-width: 768px) {
  .briefing-grid {
    grid-template-columns: 1fr;
  }

  .briefing-note {
    align-items: flex-start;
    flex-direction: column;
  }

  .model-exam-status {
    width: min(100% - 24px, 1240px);
    padding: 12px;
  }

  .model-status-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .answer-sheet-pill {
    flex-basis: calc(50% - 4px);
    min-width: 0;
  }
}

@media (max-width: 390px) {
  .model-status-metrics {
    grid-template-columns: 1fr;
  }

  .answer-sheet-pill {
    flex-basis: 100%;
  }
}

@media (max-width: 1120px) {
  .exam-header {
    grid-template-columns: minmax(214px, max-content) minmax(0, 1fr) max-content;
    gap: 10px;
    padding-inline: 14px;
  }

  .main-nav {
    gap: 4px;
  }

  .main-nav-tab {
    padding-inline: 8px;
    font-size: 12px;
  }

  .header-actions .ghost {
    padding-inline: 8px;
  }
}

@media (max-width: 1180px) {
  .app-shell,
  .training-focus-shell.menu-open {
    padding-top: 0;
  }
}

@media (max-width: 920px) {
  .exam-header {
    grid-template-columns: minmax(210px, max-content) 1fr;
    min-height: 104px;
    align-items: center;
  }

  .main-nav-wrap {
    grid-column: 1 / -1;
    justify-items: stretch;
  }

  .main-nav {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .header-actions {
    grid-column: 2;
  }

  .app-shell,
  .training-focus-shell.menu-open {
    padding-top: 0;
  }
}

@media (max-width: 720px) {
  .exam-header {
    grid-template-columns: 1fr auto;
    min-height: 0;
    padding: 8px 10px;
  }

  .brand {
    min-width: 0;
  }

  .brand small {
    display: none;
  }

  .main-nav-toggle-input {
    inline-size: 1px;
    block-size: 1px;
    margin: -1px;
    opacity: 0;
    pointer-events: none;
  }

  .main-nav-toggle-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    box-shadow: var(--shadow-sm);
    font-size: 12px;
    font-weight: 850;
  }

  .main-nav-toggle-label span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
  }

  .main-nav-toggle-label strong {
    color: var(--blue);
    font-size: 12px;
  }

  .main-nav {
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    padding: 8px;
    margin-top: 6px;
  }

  .main-nav-toggle-input:checked ~ .main-nav {
    display: grid;
  }

  .main-nav-tab {
    justify-content: center;
    min-height: 34px;
    padding: 7px 8px;
  }

  .header-actions {
    gap: 4px;
  }

  .header-actions .ghost {
    padding-inline: 7px;
    font-size: 11px;
  }

  .timer {
    min-width: 58px;
    padding-inline: 6px;
    font-size: 11px;
  }

  .section-subnav,
  .model-subnav {
    width: min(100% - 24px, 1240px);
  }
}

@media (max-width: 430px) {
  .brand strong {
    font-size: 12px;
  }

  .brand-mark {
    width: 32px;
    height: 32px;
    flex-basis: 32px;
  }

  .header-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .header-actions .ghost {
    max-width: none;
  }
}

/* Original public landing page */
.landing-shell {
  min-height: 100dvh;
  color: var(--ink);
}

.landing-header {
  position: sticky;
  top: 0;
  z-index: 60;
  display: grid;
  grid-template-columns: minmax(230px, max-content) minmax(0, 1fr) max-content;
  align-items: center;
  gap: 18px;
  min-height: 70px;
  padding: 10px clamp(18px, 4vw, 54px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 76%, transparent);
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(16px);
}

.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  text-align: left;
}

.landing-brand strong,
.landing-brand small {
  display: block;
}

.landing-brand strong {
  font-size: 14px;
  line-height: 1.1;
}

.landing-brand small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
}

.landing-nav {
  display: flex;
  justify-content: center;
  gap: 8px;
  min-width: 0;
}

.landing-nav button,
.landing-path-actions button {
  min-height: 36px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.landing-nav button:hover,
.landing-path-actions button:hover {
  border-color: color-mix(in srgb, var(--blue) 24%, var(--line));
  background: color-mix(in srgb, var(--blue-soft) 58%, transparent);
  color: var(--blue);
}

.landing-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}

.landing-actions .primary,
.landing-actions .secondary,
.landing-cta .primary,
.landing-cta .secondary {
  min-height: 38px;
  padding: 9px 14px;
  border-radius: 8px;
}

.landing-page {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: clamp(24px, 5vw, 58px) 0 48px;
}

.landing-hero {
  position: relative;
  min-height: clamp(520px, 68vh, 680px);
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: clamp(34px, 7vw, 72px);
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: 14px;
  background:
    radial-gradient(circle at 78% 22%, color-mix(in srgb, var(--teal) 16%, transparent), transparent 34%),
    linear-gradient(135deg, color-mix(in srgb, var(--surface) 92%, var(--blue-soft)), color-mix(in srgb, var(--surface-soft) 90%, var(--surface)));
  box-shadow: var(--shadow);
}

.landing-hero::before {
  content: "";
  position: absolute;
  inset: 22px;
  border-radius: 12px;
  background:
    linear-gradient(90deg, color-mix(in srgb, var(--line) 48%, transparent) 1px, transparent 1px),
    linear-gradient(color-mix(in srgb, var(--line) 48%, transparent) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: 0.42;
  pointer-events: none;
}

.landing-hero-copy {
  position: relative;
  z-index: 2;
  max-width: 650px;
}

.landing-hero h1 {
  margin: 12px 0 16px;
  max-width: 760px;
  font-size: clamp(34px, 5.2vw, 68px);
  line-height: 1.01;
  letter-spacing: 0;
}

.landing-hero p {
  max-width: 610px;
  margin: 0;
  color: var(--muted);
  font-size: clamp(15px, 1.55vw, 19px);
  line-height: 1.65;
}

.landing-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 26px;
}

.landing-trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
}

.landing-trust-row span {
  display: inline-flex;
  min-height: 30px;
  align-items: center;
  padding: 6px 10px;
  border: 1px solid color-mix(in srgb, var(--line) 80%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 78%, transparent);
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.landing-preview {
  position: absolute;
  right: clamp(22px, 5vw, 76px);
  bottom: clamp(22px, 6vw, 74px);
  z-index: 1;
  width: min(360px, 36%);
  padding: 16px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  box-shadow: 0 28px 64px rgba(19, 34, 53, 0.14);
  transform: rotate(-1.5deg);
}

.preview-topline,
.preview-result {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.preview-topline strong,
.preview-result strong {
  color: var(--blue);
}

.preview-paper {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.preview-paper div {
  display: grid;
  gap: 5px;
  padding: 12px;
  border: 1px solid color-mix(in srgb, var(--line) 78%, transparent);
  border-radius: 8px;
  background: var(--surface);
}

.preview-paper small {
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
}

.preview-paper strong {
  font-size: 13px;
}

.preview-paper span {
  display: block;
  height: 6px;
  width: 72%;
  border-radius: 999px;
  background: color-mix(in srgb, var(--teal) 38%, var(--blue-soft));
}

.landing-feature-band {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 18px;
}

.landing-feature-band article,
.landing-path {
  border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
  border-radius: 12px;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: var(--shadow-sm);
}

.landing-feature-band article {
  display: grid;
  gap: 10px;
  padding: 18px;
}

.landing-feature-band article span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 8px;
  background: color-mix(in srgb, var(--blue-soft) 72%, var(--surface));
  color: var(--blue);
  font-weight: 950;
}

.landing-feature-band strong {
  font-size: 16px;
}

.landing-feature-band p {
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.landing-path {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 18px;
  padding: 22px;
}

.landing-path h2 {
  margin: 6px 0 0;
  font-size: clamp(22px, 3vw, 34px);
  line-height: 1.12;
}

.landing-path-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.landing-path-actions button {
  border-color: color-mix(in srgb, var(--line) 82%, transparent);
  background: var(--surface);
}

@media (max-width: 920px) {
  .landing-header {
    grid-template-columns: 1fr auto;
  }

  .landing-nav {
    grid-column: 1 / -1;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .landing-hero {
    min-height: auto;
    padding: 34px;
  }

  .landing-preview {
    position: relative;
    right: auto;
    bottom: auto;
    width: min(100%, 420px);
    margin-top: 28px;
    transform: none;
  }

  .landing-feature-band {
    grid-template-columns: 1fr;
  }

  .landing-path {
    display: grid;
  }

  .landing-path-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 520px) {
  .landing-page {
    width: min(100% - 24px, 1180px);
    padding-top: 18px;
  }

  .landing-header {
    gap: 8px;
    padding: 8px 12px;
  }

  .landing-brand small,
  .landing-nav {
    display: none;
  }

  .landing-actions {
    gap: 6px;
  }

  .landing-actions .secondary {
    display: none;
  }

  .landing-actions .primary {
    min-height: 34px;
    padding: 7px 10px;
    font-size: 12px;
  }

  .landing-hero {
    padding: 26px 18px;
    border-radius: 12px;
  }

  .landing-hero h1 {
    font-size: 34px;
  }

  .landing-cta {
    display: grid;
  }

  .landing-trust-row span {
    width: 100%;
  }
}

html[dir="rtl"] body {
  font-family: "Segoe UI", Tahoma, Arial, system-ui, sans-serif;
  line-height: 1.65;
}

html[dir="rtl"] .landing-shell,
html[dir="rtl"] .app-shell,
html[dir="rtl"] .dashboard,
html[dir="rtl"] .overview,
html[dir="rtl"] .results-page {
  direction: rtl;
}

html[dir="rtl"] .landing-brand,
html[dir="rtl"] .brand,
html[dir="rtl"] .welcome-panel,
html[dir="rtl"] .overview-head,
html[dir="rtl"] .dashboard-card,
html[dir="rtl"] .model-card,
html[dir="rtl"] .start-panel,
html[dir="rtl"] .results-panel,
html[dir="rtl"] .breakdown-card,
html[dir="rtl"] .writing-feedback,
html[dir="rtl"] .answer-head,
html[dir="rtl"] .footer-center {
  text-align: right;
}

html[dir="rtl"] .landing-actions,
html[dir="rtl"] .header-actions,
html[dir="rtl"] .landing-path-actions,
html[dir="rtl"] .footer-right {
  justify-content: flex-start;
}

html[dir="rtl"] .footer-left {
  justify-content: flex-end;
}

html[dir="rtl"] .main-nav,
html[dir="rtl"] .section-subnav,
html[dir="rtl"] .landing-nav,
html[dir="rtl"] .start-actions,
html[dir="rtl"] .result-actions,
html[dir="rtl"] .overview-actions {
  direction: rtl;
}

html[dir="rtl"] .timer,
html[dir="rtl"] .score-mini,
html[dir="rtl"] .start-grid,
html[dir="rtl"] .welcome-stats,
html[dir="rtl"] .preview-topline,
html[dir="rtl"] .preview-result,
html[dir="rtl"] .result-score,
html[dir="rtl"] .dashboard-card-foot,
html[dir="rtl"] .card-progress,
html[dir="rtl"] .attempt-badge,
html[dir="rtl"] .last-completed-stamp {
  direction: ltr;
  unicode-bidi: plaintext;
}

html[dir="rtl"] .text-pane,
html[dir="rtl"] .lesen-teil3-text-pane,
html[dir="rtl"] .passage-card,
html[dir="rtl"] .audio-card,
html[dir="rtl"] .audio-card audio,
html[dir="rtl"] .question-card,
html[dir="rtl"] .choice-option,
html[dir="rtl"] .answer-choice,
html[dir="rtl"] .writing-source,
html[dir="rtl"] .prompt-box p,
html[dir="rtl"] .prompt-box li,
html[dir="rtl"] textarea[data-writing-text] {
  direction: ltr;
  text-align: left;
}

html[dir="rtl"] .prompt-box h2,
html[dir="rtl"] .prompt-box strong,
html[dir="rtl"] .writing-editor .answer-head {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] input,
html[dir="rtl"] select {
  text-align: right;
}

html[dir="rtl"] input[type="search"] {
  direction: rtl;
}

html[dir="rtl"] .language-switch {
  direction: ltr;
}

html[dir="rtl"] .top-progress,
html[dir="rtl"] .preview-paper span {
  direction: ltr;
}

@media (max-width: 720px) {
  html[dir="rtl"] .header-actions {
    justify-content: flex-start;
  }

  html[dir="rtl"] .main-nav {
    direction: rtl;
  }
}

/* Mobile usability patch for shared preview links and small phones */
@media (max-width: 640px) {
  html,
  body,
  #app {
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
  }

  body {
    font-size: 13px;
    background-size: 28px 28px;
  }

  .app-shell,
  .training-focus-shell,
  .training-focus-shell.menu-open {
    width: 100%;
    min-width: 0;
    padding-top: 0;
  }

  .exam-header {
    position: sticky;
    top: 0;
    width: 100%;
    min-width: 0;
    padding: 8px 10px;
    gap: 8px;
  }

  .brand,
  .header-left,
  .main-nav-wrap,
  .header-actions {
    min-width: 0;
  }

  .brand strong {
    max-width: 170px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .main-nav,
  .section-subnav,
  .model-subnav,
  .header-actions {
    max-width: 100%;
  }

  .section-subnav,
  .model-subnav {
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  .section-subnav::-webkit-scrollbar,
  .model-subnav::-webkit-scrollbar {
    display: none;
  }

  .exam-main,
  .training-focus-shell .exam-main,
  .training-focus-shell.menu-open .exam-main {
    height: auto;
    min-height: 100dvh;
    overflow: visible;
  }

  .exam-workspace,
  .lesen-teil2-workspace,
  .sprachb2-workspace,
  .lesen-teil3-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1fr) !important;
    width: 100%;
    min-width: 0;
    overflow: visible;
  }

  .lesen-teil3-workspace {
    gap: 12px;
    padding: 0 10px 88px;
  }

  .text-pane,
  .answer-pane,
  .lesen-article-pane,
  .teil2-answer-pane,
  .lesen-teil3-text-pane,
  .lesen-teil3-answer-pane {
    width: 100%;
    min-width: 0;
    max-width: 100%;
    overflow: visible;
  }

  .text-pane,
  .answer-pane {
    padding: 14px 12px 82px;
  }

  .lesen-teil3-text-pane,
  .lesen-teil3-answer-pane {
    padding: 12px 12px 82px;
  }

  .pane-head h1,
  .teil3-stage-title h1 {
    font-size: 20px;
    line-height: 1.25;
  }

  .task-copy,
  .article-copy,
  .sprachb2-text,
  .teil3-info-card,
  .teil3-question-item,
  .question-card,
  .hoeren-question,
  .audio-card,
  .prompt-box,
  .writing-source,
  .muendlich-card,
  .muendlich-topic-card {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: normal;
    user-select: text;
    -webkit-user-select: text;
    -webkit-touch-callout: default;
  }

  .article-copy,
  .task-copy,
  .sprachb2-text {
    font-size: 14px;
    line-height: 1.62;
  }

  .choice-grid,
  .rf-choice-list,
  .word-bank,
  .writing-layout,
  .formal-grid,
  .breakdown-grid,
  .start-grid,
  .dashboard-grid,
  .model-grid,
  .welcome-stats {
    grid-template-columns: minmax(0, 1fr) !important;
  }

  .answer-choice,
  .rf-choice,
  .teil2-choice,
  .word-option,
  .word-blank {
    min-width: 0;
    max-width: 100%;
  }

  .answer-choice {
    justify-content: flex-start;
    text-align: left;
  }

  .answer-head {
    position: static;
    margin: 0 0 12px;
    padding: 0 0 12px;
    flex-wrap: wrap;
    background: transparent;
    backdrop-filter: none;
  }

  .teil2-question-card,
  .hoeren-question,
  .audio-card,
  .sprachb2-text,
  .passage-card,
  .teil3-info-card {
    padding: 14px;
    border-radius: 10px;
  }

  .exam-footer {
    position: sticky;
    bottom: 0;
    width: 100%;
    min-width: 0;
    padding: 8px 10px;
    gap: 8px;
  }

  .footer-left,
  .footer-right {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    width: 100%;
  }

  .primary,
  .secondary,
  .ghost {
    min-width: 0;
    max-width: 100%;
  }
}

@media (max-width: 390px) {
  .brand strong {
    max-width: 138px;
  }

  .header-actions .ghost,
  .header-actions .icon-button,
  .language-switch button {
    min-height: 34px;
  }

  .text-pane,
  .answer-pane,
  .lesen-teil3-text-pane,
  .lesen-teil3-answer-pane {
    padding-inline: 10px;
  }
}

/* Dashboard visual cards inspired by modern learning communities, using project-owned images */
.dashboard-page {
  width: min(calc(100% - 48px), 1560px);
  background:
    radial-gradient(circle at top left, rgba(27, 126, 168, 0.06), transparent 35%),
    linear-gradient(180deg, #f7f8fa 0%, #eef2f5 100%);
  border-radius: 22px;
  padding: 24px;
}

.dashboard-page .welcome-panel {
  align-items: center;
  margin-bottom: 2px;
  padding: 16px 18px;
  border-color: #dfe5ea;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);
}

.dashboard-page .welcome-panel h1 {
  font-size: clamp(23px, 2vw, 31px);
  line-height: 1.12;
}

.dashboard-page .welcome-panel p {
  max-width: 720px;
  margin-top: 6px;
  color: #64748b;
  font-size: 14px;
  line-height: 1.5;
}

.dashboard-cockpit {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(300px, 0.75fr);
  gap: 22px;
  align-items: stretch;
}

.cockpit-copy {
  min-width: 0;
  align-self: center;
}

.dashboard-page .cockpit-copy h1 {
  max-width: 780px;
  font-size: clamp(28px, 3.4vw, 52px);
  line-height: 1.02;
}

.cockpit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.cockpit-actions button {
  min-height: 44px;
  padding-inline: 18px;
}

.cockpit-progress {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.continue-box {
  display: grid;
  gap: 8px;
  min-width: 0;
  padding: 14px;
  border: 1px solid rgba(37, 111, 159, 0.18);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.74);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.07);
  backdrop-filter: blur(5px);
}

.continue-box strong {
  color: #111827;
  font-size: 18px;
  line-height: 1.24;
  overflow-wrap: anywhere;
}

.continue-box small {
  display: -webkit-box;
  overflow: hidden;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.continue-box button {
  justify-self: start;
  min-height: 36px;
  padding: 6px 12px;
  border: 1px solid rgba(37, 111, 159, 0.22);
  border-radius: 999px;
  background: #eef7fb;
  color: #256f9f;
  font-weight: 900;
  cursor: pointer;
}

.dashboard-action-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 16px 0 18px;
}

.dashboard-action-chip {
  display: grid;
  gap: 5px;
  min-width: 0;
  min-height: 72px;
  padding: 14px 16px;
  border: 1px solid #dfe5ea;
  border-radius: 14px;
  background: #ffffff;
  color: #111827;
  text-align: start;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.05);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.dashboard-action-chip:hover,
.dashboard-action-chip:focus-visible {
  transform: translateY(-2px);
  border-color: rgba(15, 140, 190, 0.35);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.1);
}

.dashboard-action-chip span {
  color: #64748b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.dashboard-action-chip strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 16px;
  line-height: 1.22;
}

.dashboard-action-chip.primary-chip {
  border-color: rgba(37, 111, 159, 0.28);
  background: linear-gradient(135deg, #e8f4fa, #ffffff);
}

.dashboard-section-head {
  display: flex;
  gap: 18px;
  align-items: end;
  justify-content: space-between;
  margin: 4px 0 16px;
}

.dashboard-section-head h2 {
  margin: 4px 0 0;
  color: #111827;
  font-size: clamp(20px, 2.1vw, 30px);
  line-height: 1.1;
}

.dashboard-section-head p {
  max-width: 520px;
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
  text-align: end;
}

.dashboard-page .welcome-stats {
  grid-template-columns: repeat(3, minmax(72px, 1fr));
  gap: 8px;
  min-width: min(320px, 100%);
}

.dashboard-page .welcome-stats div {
  padding: 8px 10px;
  border-color: #dfe5ea;
  border-radius: 12px;
  background: #f7f8fa;
}

.dashboard-page .welcome-stats strong {
  font-size: 18px;
}

.dashboard-page .welcome-stats span {
  font-size: 10px;
}

.dashboard-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 34px;
}

.dashboard-card {
  position: relative;
  min-width: 0;
  display: grid;
  grid-template-rows: auto auto auto minmax(42px, auto) auto;
  align-content: start;
  gap: 8px;
  height: 100%;
  min-height: 0;
  padding: 0;
  overflow: hidden;
  border: 1px solid #dfe5ea;
  border-radius: 16px;
  background: #ffffff;
  color: #111827;
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.07);
  text-align: start;
  transition:
    transform 200ms ease,
    box-shadow 200ms ease,
    border-color 200ms ease;
}

.dashboard-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0) 42%);
}

.dashboard-card::after {
  display: none;
}

.dashboard-cover {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: #f4f6f8;
  box-shadow: none;
}

.dashboard-cover::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(16, 35, 58, 0.02), rgba(16, 35, 58, 0.14));
  pointer-events: none;
}

.dashboard-card-image,
.dashboard-cover img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center;
  transform: scale(1.01);
  transition: transform 0.22s ease;
}

.dashboard-card:hover {
  transform: translateY(-4px);
  border-color: rgba(15, 140, 190, 0.35);
  box-shadow: 0 14px 32px rgba(15, 23, 42, 0.12);
}

.dashboard-card:hover .dashboard-cover img {
  transform: scale(1.035);
}

.dashboard-card:focus-visible,
.dashboard-action-chip:focus-visible,
.continue-box button:focus-visible,
.cockpit-actions button:focus-visible {
  outline: 3px solid rgba(37, 111, 159, 0.28);
  outline-offset: 3px;
}

.dashboard-card-badge {
  position: absolute;
  z-index: 2;
  top: 12px;
  right: 12px;
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  border: 1px solid rgba(255, 255, 255, 0.68);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.88);
  color: #10233a;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  backdrop-filter: blur(8px);
}

.dashboard-card-badge.recommended {
  background: rgba(255, 247, 219, 0.92);
  color: #7a5618;
}

.dashboard-card-badge.done {
  background: rgba(233, 247, 241, 0.94);
  color: #1f7a56;
}

.dashboard-card-badge.started {
  background: rgba(232, 244, 250, 0.94);
  color: #256f9f;
}

.dashboard-card-badge.open {
  background: rgba(248, 250, 252, 0.92);
  color: #64748b;
}

.dashboard-card-badge.exam {
  background: rgba(16, 35, 58, 0.9);
  color: #ffffff;
}

.dashboard-card-badge.vocab {
  background: rgba(232, 244, 250, 0.94);
  color: #256f9f;
}

.dashboard-card > .eyebrow,
.dashboard-card > strong,
.dashboard-card > small,
.dashboard-card-progress,
.dashboard-card-foot {
  position: relative;
  z-index: 2;
}

.dashboard-card > .eyebrow {
  margin: 8px 14px 0;
  color: #1686b3;
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.dashboard-card > strong {
  display: -webkit-box;
  overflow: hidden;
  margin-inline: 14px;
  color: #111827;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
  font-size: 16px;
  line-height: 1.22;
}

.dashboard-card > small {
  display: -webkit-box;
  overflow: hidden;
  margin-inline: 14px;
  min-height: 18px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 1;
}

.dashboard-page .dashboard-card > small,
.dashboard-page .dashboard-card-foot {
  display: none;
}

.dashboard-card-progress {
  display: grid;
  grid-template-columns: auto minmax(54px, 1fr) auto;
  align-items: center;
  gap: 9px;
  margin: 2px 14px 14px;
  min-width: 0;
}

.dashboard-progress-percent,
.dashboard-progress-total {
  color: #64748b;
  font-size: 12px;
  font-weight: 850;
  line-height: 1;
  white-space: nowrap;
}

.dashboard-progress-percent {
  color: #111827;
  min-width: 34px;
}

.dashboard-progress-total {
  overflow: hidden;
  max-width: 92px;
  text-overflow: ellipsis;
}

.progress-track {
  width: 100%;
  height: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #e5e7eb;
}

.progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #34a853;
  transition: width 250ms ease;
}

.dashboard-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin: auto 14px 14px;
  padding: 8px 10px;
  min-width: 0;
  border-color: #dfe5ea;
  background: #f7f8fa;
}

.dashboard-card-foot em {
  color: #64748b;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.dashboard-card-arrow {
  display: inline-grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid #dfe5ea;
  border-radius: 999px;
  background: #ffffff;
  color: #1686b3 !important;
  font-size: 16px;
  line-height: 1;
}

html[dir="rtl"] .dashboard-card-arrow {
  transform: scaleX(-1);
}

html[dir="rtl"] .dashboard-card-badge {
  right: auto;
  left: 12px;
}

.dashboard-cover-empty {
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle at top left, rgba(22, 134, 179, 0.16), transparent 36%),
    linear-gradient(135deg, #101827 0%, #1f2937 100%);
}

.dashboard-cover-placeholder {
  max-width: 70%;
  color: #ffffff;
  font-size: clamp(18px, 2.1vw, 26px);
  font-weight: 900;
  line-height: 1.15;
  text-align: center;
}

.dashboard-card-lesen .dashboard-cover {
  background: #f4f6f8;
}

.dashboard-card-sprachbausteine .dashboard-cover {
  background: #f4f6f8;
}

.dashboard-card-hoeren .dashboard-cover {
  background: #f4f6f8;
}

.dashboard-card-schreiben .dashboard-cover {
  background: #f4f6f8;
}

.dashboard-card-muendlich .dashboard-cover {
  background: #f4f6f8;
}

.dashboard-card-modelltest .dashboard-cover {
  background: #f4f6f8;
}

@keyframes dashboard-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dashboard {
  animation: dashboard-enter 220ms ease-out both;
}

@media (prefers-reduced-motion: reduce) {
  .dashboard {
    animation: none;
  }

  .dashboard-card,
  .dashboard-cover img {
    transition: none;
  }
}

@media (max-width: 1000px) {
  .dashboard-cockpit {
    grid-template-columns: 1fr;
  }

  .dashboard-action-strip {
    grid-template-columns: 1fr;
  }

  .dashboard-section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .dashboard-section-head p {
    max-width: none;
    text-align: start;
  }

  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 24px;
  }

  .dashboard-card {
    min-height: 0;
  }
}

@media (max-width: 600px) {
  .dashboard-page {
    width: min(100% - 20px, 1220px);
    padding: 14px;
  }

  .dashboard-page .welcome-panel {
    display: grid;
    gap: 12px;
    padding: 14px;
  }

  .dashboard-page .cockpit-copy h1 {
    font-size: clamp(27px, 9vw, 38px);
  }

  .cockpit-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .cockpit-actions button,
  .dashboard-action-chip {
    width: 100%;
  }

  .continue-box {
    padding: 12px;
  }

  .dashboard-page .welcome-stats {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .dashboard-grid {
    grid-template-columns: 1fr !important;
    gap: 18px;
  }

  .dashboard-card {
    min-height: 0;
    padding: 10px;
  }

  .dashboard-card-badge {
    top: 10px;
    right: 10px;
    min-height: 26px;
    padding: 5px 9px;
    font-size: 10px;
  }

  .dashboard-cover {
    aspect-ratio: 16 / 9;
  }

  .dashboard-card > small {
    min-height: 0;
  }
}

/* ZIEL B2 identity refresh: logo, warm background, and dashboard palette */
body {
  background: #fdfbf7;
}

.exam-header,
.landing-header {
  border-bottom-color: #e6e0d6;
  background: color-mix(in srgb, #fdfbf7 92%, transparent);
}

.exam-header {
  border-bottom-color: rgba(16, 35, 58, 0.08);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(253, 251, 247, 0.9)),
    color-mix(in srgb, #fdfbf7 88%, transparent);
  box-shadow: 0 10px 32px rgba(16, 35, 58, 0.07);
}

.main-nav {
  border-color: rgba(16, 35, 58, 0.09);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.68);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.72);
}

.main-nav-tab {
  border-radius: 11px;
  color: rgba(16, 35, 58, 0.66);
}

.main-nav-tab:hover {
  background: rgba(232, 244, 250, 0.78);
  color: #075e6b;
}

.main-nav-tab.active {
  border-color: rgba(7, 94, 107, 0.2);
  background: #ffffff;
  color: #075e6b;
  box-shadow:
    inset 0 -2px 0 #1f8f92,
    0 8px 18px rgba(16, 35, 58, 0.08);
}

.header-actions .ghost {
  border-color: rgba(7, 94, 107, 0.14);
  background: rgba(255, 255, 255, 0.74);
  color: #10233a;
}

.header-actions .ghost:hover {
  border-color: rgba(7, 94, 107, 0.28);
  background: #ffffff;
  color: #075e6b;
}

.timer {
  border: 1px solid rgba(37, 111, 159, 0.08);
  border-radius: 12px;
  background: #eaf5fb;
  color: #256f9f;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.74);
}

.primary,
.secondary {
  border-radius: 12px;
}

.primary {
  background: linear-gradient(135deg, #256f9f, #1f8f92);
  box-shadow: 0 14px 26px rgba(31, 143, 146, 0.24);
}

.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 18px 32px rgba(31, 143, 146, 0.28);
}

.primary.danger {
  background: linear-gradient(135deg, #c9564d, #a94740);
  box-shadow: 0 14px 26px rgba(201, 86, 77, 0.22);
}

.secondary {
  border-color: rgba(16, 35, 58, 0.12);
  background: rgba(255, 255, 255, 0.82);
  color: #10233a;
}

.secondary:hover {
  border-color: rgba(37, 111, 159, 0.24);
  background: #ffffff;
  color: #256f9f;
}

.brand-mark,
.landing-brand .brand-mark {
  width: 48px;
  height: 48px;
  flex: 0 0 48px;
  overflow: hidden;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: transparent;
}

.brand-logo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.brand strong,
.landing-brand strong {
  color: #10233a;
}

.brand small,
.landing-brand small {
  color: #075e6b;
}

.dashboard-page {
  background:
    radial-gradient(circle at top left, rgba(198, 162, 74, 0.09), transparent 34%),
    linear-gradient(180deg, #fdfbf7 0%, #f7f4ee 100%);
}

.dashboard-page .welcome-panel,
.dashboard-page .dashboard-card {
  border-color: #e6e0d6;
  background: #ffffff;
  color: #10233a;
}

.dashboard-page .welcome-panel p,
.dashboard-progress-total {
  color: color-mix(in srgb, #10233a 68%, #ffffff);
}

.dashboard-page .eyebrow,
.dashboard-card > .eyebrow {
  color: #075e6b;
}

.dashboard-card:hover {
  border-color: color-mix(in srgb, #c6a24a 58%, #e6e0d6);
}

.progress-fill {
  background: #34a853;
}

.start-panel,
.model-exam-status,
.briefing-card,
.briefing-note {
  border-color: rgba(16, 35, 58, 0.1);
  box-shadow: 0 12px 30px rgba(16, 35, 58, 0.06);
}

.model-exam-status {
  background:
    linear-gradient(135deg, rgba(232, 244, 250, 0.82), rgba(255, 255, 255, 0.9) 54%),
    #ffffff;
}

.answer-sheet-pill {
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.78);
}

.answer-sheet-pill.active {
  background: #ffffff;
  box-shadow:
    inset 0 0 0 2px rgba(31, 143, 146, 0.34),
    0 8px 18px rgba(16, 35, 58, 0.08);
}

.briefing-card,
.briefing-note {
  background: rgba(255, 255, 255, 0.76);
}

/* Mobile-only layout polish for dashboard, header, and Hören screens */
@media (max-width: 768px) {
  .exam-header,
  .header-left,
  .main-nav-wrap,
  .main-nav,
  .header-actions,
  .dashboard-page,
  .dashboard-page .welcome-panel,
  .dashboard-page .welcome-stats,
  .dashboard-card,
  .dashboard-card-progress,
  .hoeren-layout,
  .hoeren-panel,
  .hoeren-answer-block,
  .hoeren-question,
  .audio-card,
  .prompt-box {
    min-width: 0;
    max-width: 100%;
  }

  .exam-header {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    width: 100%;
    padding: 8px 10px;
  }

  .header-left {
    display: flex;
    align-items: center;
  }

  .brand {
    width: 100%;
    min-width: 0;
    gap: 8px;
    padding: 4px;
  }

  .brand-mark {
    width: 38px;
    height: 38px;
    flex-basis: 38px;
  }

  .brand strong {
    max-width: min(58vw, 230px);
    overflow: hidden;
    font-size: 13px;
    line-height: 1.12;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .brand small {
    display: none;
  }

  .main-nav-wrap {
    grid-column: auto;
    justify-items: stretch;
    width: 100%;
  }

  .main-nav-toggle-input {
    inline-size: 1px;
    block-size: 1px;
    margin: -1px;
    opacity: 0;
    pointer-events: none;
  }

  .main-nav-toggle-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    min-height: 38px;
    padding: 8px 10px;
    border: 1px solid color-mix(in srgb, var(--line) 82%, transparent);
    border-radius: 8px;
    background: var(--surface);
    color: var(--ink);
    box-shadow: var(--shadow-sm);
    font-size: 12px;
    font-weight: 850;
  }

  .main-nav-toggle-label span,
  .main-nav-toggle-label strong {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .main-nav-toggle-label span {
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
  }

  .main-nav-toggle-label strong {
    color: var(--blue);
    font-size: 12px;
  }

  .main-nav {
    display: none;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
    width: 100%;
    padding: 8px;
    margin-top: 6px;
  }

  .main-nav-toggle-input:checked ~ .main-nav {
    display: grid;
  }

  .main-nav-tab {
    justify-content: center;
    min-width: 0;
    min-height: 36px;
    padding: 7px 8px;
    overflow: hidden;
    font-size: 12px;
    text-overflow: ellipsis;
  }

  .header-actions {
    grid-column: auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    width: 100%;
    gap: 6px;
  }

  .language-switch {
    flex: 0 1 auto;
    min-width: 0;
    max-width: 100%;
  }

  .header-actions .ghost {
    flex: 1 1 104px;
    min-height: 32px;
    padding: 6px 8px;
    overflow: hidden;
    font-size: 11px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .timer {
    flex: 0 0 auto;
    min-width: 62px;
    min-height: 32px;
    padding: 6px 7px;
    font-size: 11px;
  }

  .header-actions .icon-button {
    flex: 0 0 32px;
    width: 32px;
    min-height: 32px;
  }

  .dashboard-page {
    width: min(100% - 24px, 1560px);
    padding: 16px;
    border-radius: 16px;
  }

  .dashboard-page .welcome-panel {
    gap: 12px;
    padding: 14px;
  }

  .dashboard-page .welcome-panel h1,
  .dashboard-page .welcome-panel p,
  .dashboard-card > strong,
  .dashboard-card > small,
  .dashboard-progress-total,
  .dashboard-page .welcome-stats span {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .dashboard-page .welcome-stats {
    min-width: 0;
    gap: 8px;
  }

  .dashboard-page .welcome-stats div {
    min-width: 0;
  }

  .dashboard-grid {
    gap: 18px;
  }

  .dashboard-card {
    padding: 8px;
    border-radius: 14px;
    gap: 7px;
  }

  .dashboard-cover {
    aspect-ratio: 16 / 9;
    max-height: 170px;
  }

  .dashboard-cover img,
  .dashboard-card-image {
    object-fit: cover;
    object-position: center;
  }

  .dashboard-card > .eyebrow {
    margin: 6px 10px 0;
  }

  .dashboard-card > strong {
    margin-inline: 10px;
    font-size: 15px;
    line-height: 1.22;
  }

  .dashboard-card-progress {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 7px;
    margin: 0 10px 10px;
  }

  .dashboard-progress-total {
    max-width: 84px;
  }

  .hoeren-layout {
    overflow: visible;
    padding: 14px 0 86px;
  }

  .hoeren-panel {
    width: min(100% - 20px, 980px);
    gap: 12px;
  }

  .hoeren-answer-block,
  .hoeren-question,
  .audio-card,
  .prompt-box {
    padding: 14px;
  }

  .hoeren-question h3,
  .audio-card strong,
  .prompt-box p {
    overflow-wrap: anywhere;
  }

  .hoeren-question .rf-choice {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
  }
}

@media (max-width: 480px) {
  .exam-header {
    padding: 8px;
  }

  .brand-mark {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }

  .brand strong {
    max-width: 62vw;
    font-size: 12px;
  }

  .header-actions {
    gap: 5px;
  }

  .language-switch button {
    min-height: 32px;
    padding-inline: 7px;
  }

  .header-actions .ghost {
    flex-basis: 96px;
    min-height: 32px;
  }

  .timer {
    min-width: 58px;
  }

  .dashboard-page {
    width: min(100% - 16px, 1560px);
    padding: 10px;
    border-radius: 14px;
  }

  .dashboard-page .welcome-panel {
    padding: 12px;
  }

  .dashboard-grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 14px;
  }

  .dashboard-card {
    padding: 8px;
  }

  .dashboard-cover {
    max-height: 152px;
  }

  .dashboard-card > strong {
    font-size: 14px;
  }

  .dashboard-card-progress {
    margin-bottom: 8px;
  }

  .hoeren-panel {
    width: min(100% - 16px, 980px);
  }

  .hoeren-answer-block,
  .hoeren-question,
  .audio-card,
  .prompt-box {
    padding: 12px;
  }
}

@media (max-width: 390px) {
  .brand strong {
    max-width: 138px;
  }

  .header-actions .ghost,
  .header-actions .icon-button,
  .language-switch button,
  .timer {
    min-height: 34px;
  }

  .dashboard-page .welcome-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  .dashboard-page .welcome-stats div:nth-child(3) {
    grid-column: 1 / -1;
  }

  .dashboard-page .welcome-stats span {
    font-size: 9.5px;
    line-height: 1.2;
  }

  .dashboard-cover {
    max-height: 140px;
  }

  .dashboard-progress-percent,
  .dashboard-progress-total {
    font-size: 11px;
  }
}

/* Subtle decorative image inside primary title cards only */
.dashboard-page .welcome-panel,
.overview-head {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background-color: #ffffff;
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.78) 0%, rgba(255, 255, 255, 0.68) 46%, rgba(255, 255, 255, 0.46) 100%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.20), rgba(255, 255, 255, 0.52)),
    url("../assets/decor/mountain-sun-card-bg.jpg?v=20260717190000");
  background-repeat: no-repeat;
  background-position: center, center, center 42%;
  background-size: cover, cover, cover;
}

.dashboard-page .welcome-panel::before,
.dashboard-page .welcome-panel::after,
.overview-head::before,
.overview-head::after {
  content: none;
  display: none;
}

.dashboard-page .welcome-panel > *,
.overview-head > * {
  position: relative;
  z-index: 1;
}

.private-vocab-shell {
  min-height: 100dvh;
  padding: 34px 18px 52px;
  background:
    radial-gradient(circle at top left, rgba(37, 111, 159, 0.12), transparent 34%),
    linear-gradient(135deg, #f7fbfd, #eef5f7);
}

.private-vocab-page {
  width: min(100%, 1180px);
  margin: 0 auto;
}

.private-vocab-hero {
  position: relative;
  overflow: hidden;
  min-height: 230px;
  padding: 30px;
  border: 1px solid rgba(37, 111, 159, 0.18);
  border-radius: 18px;
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.58)),
    url("../assets/decor/mountain-sun-card-bg.jpg?v=20260717190000");
  background-position: center, center 58%;
  background-size: cover, cover;
  box-shadow: var(--shadow);
}

.private-vocab-hero h1 {
  max-width: 680px;
  margin: 14px 0 10px;
  font-size: clamp(34px, 6vw, 68px);
  line-height: 0.95;
  letter-spacing: 0;
}

.private-vocab-hero p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 18px;
}

.private-vocab-back {
  position: absolute;
  top: 18px;
  right: 18px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.82);
  color: var(--ink);
  font-weight: 800;
}

.private-vocab-actions {
  position: absolute;
  top: 18px;
  right: 18px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
  z-index: 2;
}

.private-vocab-actions .private-vocab-back {
  position: static;
}

.private-vocab-quiz-button {
  border-color: rgba(37, 111, 159, 0.28);
  background: var(--blue);
  color: #ffffff;
}

.private-vocab-summary,
.private-vocab-group {
  margin-top: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 14px 36px rgba(19, 34, 53, 0.08);
}

.private-vocab-summary {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
}

.private-vocab-summary strong {
  font-size: 30px;
  color: var(--blue);
}

.private-vocab-summary span {
  color: var(--muted);
  font-weight: 800;
}

.private-vocab-group {
  padding: 18px;
}

.private-vocab-group-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.private-vocab-group-head strong {
  color: var(--muted);
}

.private-vocab-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
  gap: 16px;
}

.private-word-card {
  overflow: hidden;
  border: 1px solid rgba(37, 111, 159, 0.18);
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 12px 30px rgba(19, 34, 53, 0.08);
}

.private-word-media {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-soft);
}

.private-word-media img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.private-word-zoom {
  display: block;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.private-word-zoom:focus-visible {
  outline: 4px solid color-mix(in srgb, var(--blue) 35%, transparent);
  outline-offset: -4px;
}

.private-word-zoom-hint {
  position: absolute;
  left: 12px;
  bottom: 12px;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.86);
  color: var(--blue);
  font-size: 22px;
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(19, 34, 53, 0.16);
}

.private-word-sound {
  position: absolute;
  right: 12px;
  bottom: 12px;
  display: grid;
  width: 50px;
  height: 50px;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.88);
  border-radius: 999px;
  background: rgba(37, 111, 159, 0.94);
  color: #fff;
  box-shadow: 0 12px 30px rgba(19, 34, 53, 0.22);
  transition: transform 160ms ease, background-color 160ms ease;
}

.private-word-sound:hover,
.private-word-sound:focus-visible {
  transform: translateY(-1px) scale(1.03);
  background: var(--teal);
}

.private-word-sound.is-playing {
  background: var(--green);
}

.private-word-copy {
  display: grid;
  gap: 6px;
  padding: 14px;
}

.private-word-copy > span {
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: 0;
}

.private-word-copy strong {
  color: var(--ink);
  font-size: 20px;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.private-translation-wrap {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.private-translation-toggle {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 34px;
  padding: 6px 11px;
  border: 1px solid rgba(37, 111, 159, 0.24);
  border-radius: 999px;
  background: rgba(37, 111, 159, 0.08);
  color: var(--blue);
  font-weight: 900;
  line-height: 1;
  box-shadow: 0 8px 18px rgba(19, 34, 53, 0.06);
  transition: transform 160ms ease, border-color 160ms ease, background-color 160ms ease, color 160ms ease;
}

.private-translation-toggle:hover,
.private-translation-toggle:focus-visible {
  transform: translateY(-1px);
  border-color: rgba(42, 139, 122, 0.38);
  background: rgba(42, 139, 122, 0.12);
  color: var(--teal);
}

.private-translation-toggle.is-open {
  border-color: rgba(42, 139, 122, 0.36);
  background: rgba(42, 139, 122, 0.12);
  color: var(--teal);
}

.private-translation-text {
  margin: 0;
  padding: 10px 12px;
  border: 1px solid rgba(42, 139, 122, 0.18);
  border-radius: 12px;
  background: rgba(248, 252, 250, 0.96);
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.65;
  text-align: right;
  overflow-wrap: anywhere;
}

.private-translation-text[hidden] {
  display: none;
}

.has-private-image-modal {
  overflow: hidden;
}

.private-image-modal {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(9, 18, 32, 0.78);
}

.private-image-modal-card {
  position: relative;
  display: grid;
  gap: 12px;
  width: min(1120px, 96vw);
  max-height: 92dvh;
  padding: 14px;
  border-radius: 16px;
  background: #ffffff;
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.35);
}

.private-image-modal-card strong {
  padding-right: 54px;
  color: var(--ink);
  font-size: 18px;
}

.private-image-modal-card img {
  width: 100%;
  max-height: 78dvh;
  display: block;
  object-fit: contain;
  border-radius: 12px;
  background: var(--surface-soft);
}

.private-image-close {
  position: absolute;
  top: 10px;
  right: 10px;
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #ffffff;
  color: var(--ink);
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.private-image-close:focus-visible,
.private-image-close:hover {
  outline: 3px solid color-mix(in srgb, var(--blue) 28%, transparent);
  background: var(--blue-soft);
}

.private-quiz-panel {
  display: grid;
  gap: 18px;
  margin-top: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.94);
  box-shadow: 0 14px 36px rgba(19, 34, 53, 0.08);
}

.private-quiz-score {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.private-quiz-score span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 34px;
  padding: 6px 11px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 900;
}

.private-quiz-score strong {
  color: var(--blue);
}

.private-quiz-image-frame {
  margin: 0;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border: 1px solid rgba(37, 111, 159, 0.18);
  border-radius: 16px;
  background: color-mix(in srgb, var(--surface) 82%, #eef5f9);
}

.private-quiz-image-frame.is-text-hidden {
  position: relative;
  isolation: isolate;
}

.private-quiz-image-frame img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

.private-quiz-image-frame.is-text-hidden::before,
.private-quiz-image-frame.is-text-hidden::after {
  content: "";
  position: absolute;
  left: 0;
  z-index: 1;
  width: 100%;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(248, 251, 253, 0.98), rgba(248, 251, 253, 0.9)),
    repeating-linear-gradient(135deg, rgba(37, 111, 159, 0.08) 0 10px, rgba(37, 111, 159, 0.02) 10px 20px);
}

.private-quiz-image-frame.is-text-hidden::before {
  top: 0;
  height: var(--quiz-mask-top, 21%);
}

.private-quiz-image-frame.is-text-hidden::after {
  bottom: 0;
  height: var(--quiz-mask-bottom, 25%);
}

.private-quiz-word-mask {
  position: absolute;
  left: 50%;
  top: 62%;
  z-index: 2;
  width: min(34%, 300px);
  height: clamp(30px, 8%, 58px);
  transform: translate(-50%, -50%);
  pointer-events: none;
  border-radius: 14px;
  background:
    linear-gradient(90deg, rgba(248, 251, 253, 0.98), rgba(248, 251, 253, 0.9)),
    repeating-linear-gradient(135deg, rgba(37, 111, 159, 0.08) 0 10px, rgba(37, 111, 159, 0.02) 10px 20px);
  box-shadow: 0 8px 18px rgba(15, 23, 42, 0.12);
}

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

.private-quiz-form label {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
}

.private-quiz-form input {
  min-height: 48px;
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
}

.private-quiz-form input:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--blue) 24%, transparent);
  border-color: var(--blue);
}

.private-quiz-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.private-quiz-buttons button {
  min-height: 42px;
  padding: 0 15px;
  border-radius: 999px;
  font-weight: 900;
}

.private-quiz-result {
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 17px;
  font-weight: 900;
}

.private-quiz-panel.is-correct .private-quiz-result {
  border: 1px solid color-mix(in srgb, var(--green) 34%, var(--line));
  background: var(--green-soft);
  color: var(--green);
}

.private-quiz-panel.is-wrong .private-quiz-result {
  border: 1px solid color-mix(in srgb, var(--red) 34%, var(--line));
  background: var(--red-soft);
  color: var(--red);
}

@media (max-width: 768px) {
  .private-vocab-shell {
    padding: 14px 10px 34px;
  }

  .private-vocab-hero {
    min-height: 190px;
    padding: 22px 16px;
    border-radius: 14px;
  }

  .private-vocab-back {
    position: static;
    width: max-content;
    margin-bottom: 18px;
  }

  .private-vocab-actions {
    position: static;
    justify-content: flex-start;
    margin-bottom: 18px;
  }

  .private-vocab-actions .private-vocab-back {
    margin-bottom: 0;
  }

  .private-vocab-hero p {
    font-size: 15px;
  }

  .private-vocab-grid {
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
  }
}

@media (max-width: 480px) {
  .private-vocab-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .private-vocab-group {
    padding: 12px;
    border-radius: 14px;
  }

  .private-word-sound {
    width: 48px;
    height: 48px;
  }

  .private-image-modal {
    padding: 10px;
  }

  .private-image-modal-card {
    width: 100%;
    max-height: 94dvh;
    padding: 10px;
    border-radius: 12px;
  }

  .private-image-modal-card img {
    max-height: 80dvh;
  }

  .private-quiz-panel {
    padding: 12px;
  }

  .private-quiz-image-frame {
    aspect-ratio: 4 / 3;
  }

  .private-quiz-buttons button {
    flex: 1 1 150px;
  }
}

/* German flag trial theme: conservative color layer, easy to remove if needed. */
:root {
  --bg: #f6f4ef;
  --grid: rgba(17, 17, 17, 0.045);
  --surface-soft: #fbfaf6;
  --surface-strong: #ece8de;
  --ink: #111111;
  --muted: #6a6258;
  --line: #ddd5c8;
  --blue: #111111;
  --blue-soft: #f1eee7;
  --green: #dd0000;
  --green-soft: #fff0f0;
  --red: #dd0000;
  --red-soft: #fff0f0;
  --yellow: #ffce00;
  --amber-soft: #fff7d2;
  --teal: #ffce00;
  --coral: #dd0000;
}

body[data-theme="dark"] {
  --bg: #101010;
  --grid: rgba(255, 206, 0, 0.055);
  --surface: #171717;
  --surface-soft: #202020;
  --surface-strong: #2b2b2b;
  --ink: #f7f3e8;
  --muted: #c9c0b2;
  --line: #3a342c;
  --blue: #f7f3e8;
  --blue-soft: rgba(255, 206, 0, 0.12);
  --green: #ffce00;
  --green-soft: rgba(255, 206, 0, 0.14);
  --red: #ff5a52;
  --red-soft: rgba(221, 0, 0, 0.18);
  --yellow: #ffce00;
  --amber-soft: rgba(255, 206, 0, 0.16);
  --teal: #ffce00;
  --coral: #ff5a52;
}

.brand-mark,
.landing-brand .brand-mark {
  background: linear-gradient(180deg, #111111 0 33%, #dd0000 33% 66%, #ffce00 66% 100%);
  color: #ffffff;
  box-shadow: 0 12px 24px rgba(17, 17, 17, 0.18);
}

.primary,
button.primary,
.landing-actions .primary,
.landing-cta .primary,
.dashboard-action-chip.primary-chip,
.private-vocab-quiz-button {
  border-color: color-mix(in srgb, #dd0000 72%, #111111);
  background: linear-gradient(135deg, #dd0000 0%, #b80000 58%, #111111 100%);
  color: #ffffff;
  box-shadow: 0 14px 28px rgba(221, 0, 0, 0.18);
}

.primary:hover,
button.primary:hover,
.landing-actions .primary:hover,
.landing-cta .primary:hover {
  background: linear-gradient(135deg, #f00000 0%, #c50000 58%, #111111 100%);
}

.top-progress span,
.progress-fill {
  background: linear-gradient(90deg, #111111 0 32%, #dd0000 32% 66%, #ffce00 66% 100%);
}

.dashboard-card-badge,
.eyebrow,
.card-progress,
.dashboard-progress-percent {
  color: #111111;
}

.dashboard-card-badge.recommended,
.dashboard-card-badge.started,
.dashboard-card-badge.vocab,
.hint-box {
  border-color: color-mix(in srgb, #ffce00 52%, var(--line));
  background: color-mix(in srgb, #fff7d2 74%, var(--surface));
}

.dashboard-card-badge.done,
.private-quiz-panel.is-correct .private-quiz-result {
  border-color: color-mix(in srgb, #ffce00 42%, var(--line));
  background: color-mix(in srgb, #fff7d2 72%, var(--surface));
  color: #111111;
}

.dashboard-card-badge.exam,
.private-quiz-panel.is-wrong .private-quiz-result,
.feedback-total.failed {
  border-color: color-mix(in srgb, #dd0000 42%, var(--line));
  background: color-mix(in srgb, #fff0f0 76%, var(--surface));
  color: #b80000;
}

.private-vocab-hero,
.landing-hero,
.dashboard-hero {
  background:
    linear-gradient(90deg, rgba(17, 17, 17, 0.08), rgba(221, 0, 0, 0.05), rgba(255, 206, 0, 0.14)),
    var(--surface);
}

/* Keep solved counters green even when the German flag trial theme is active. */
.attempt-badge {
  border-color: color-mix(in srgb, #178a4f 44%, var(--line));
  background: #e8f7ef;
  color: #178a4f;
}

.last-completed-stamp {
  border-color: color-mix(in srgb, #178a4f 30%, var(--line));
  background: color-mix(in srgb, #e8f7ef 76%, var(--surface));
  color: #116c3d;
}

body[data-theme="dark"] .attempt-badge {
  border-color: color-mix(in srgb, #53d38a 44%, var(--line));
  background: rgba(83, 211, 138, 0.14);
  color: #79e6a6;
}

body[data-theme="dark"] .last-completed-stamp {
  border-color: color-mix(in srgb, #53d38a 34%, var(--line));
  background: rgba(83, 211, 138, 0.12);
  color: #9ff0bd;
}

/* Restore correction colors: right answers green, wrong answers red. */
.answer-choice.correct,
.rf-choice.correct,
.teil2-choice.correct,
.teil3-assignment-chip.correct,
.teil3-situation-card.correct,
.sprachb2-summary-item.correct,
.word-blank.correct,
.passage-card.correct .drop-zone,
.private-quiz-panel.is-correct .private-quiz-result,
.feedback-total.passed {
  border-color: color-mix(in srgb, #178a4f 52%, var(--line));
  background: color-mix(in srgb, #e8f7ef 82%, var(--surface));
  color: #146b3d;
}

.answer-choice.wrong,
.rf-choice.wrong,
.teil2-choice.wrong,
.teil3-assignment-chip.wrong,
.teil3-situation-card.wrong,
.sprachb2-summary-item.wrong,
.word-blank.wrong,
.passage-card.wrong .drop-zone,
.private-quiz-panel.is-wrong .private-quiz-result,
.feedback-total.failed {
  border-color: color-mix(in srgb, #dd0000 50%, var(--line));
  background: color-mix(in srgb, #fff0f0 82%, var(--surface));
  color: #b80000;
}

.answer-choice.correct strong,
.answer-choice.correct span,
.rf-choice.correct span,
.teil2-choice.correct strong,
.teil2-choice.correct span {
  color: #146b3d;
}

.answer-choice.wrong strong,
.answer-choice.wrong span,
.rf-choice.wrong span,
.teil2-choice.wrong strong,
.teil2-choice.wrong span {
  color: #b80000;
}

/* Simple first-visit landing page approved in the visual mockup. */
.landing-shell {
  position: relative;
  height: 100dvh;
  overflow: hidden;
  background: #ffffff;
}

.landing-shell::before,
.landing-shell::after {
  content: "";
  position: fixed;
  left: 0;
  right: 0;
  pointer-events: none;
  z-index: 0;
}

.landing-shell::before {
  top: 0;
  height: 5px;
  background: linear-gradient(90deg, #111111 0 33.3%, #dd0000 33.3% 66.6%, #ffce00 66.6% 100%);
}

.landing-shell::after {
  bottom: 0;
  height: 18px;
  background: linear-gradient(90deg, #111111 0 32%, #dd0000 32% 66%, #ffce00 66% 100%);
}

.landing-header {
  position: relative;
  z-index: 2;
  grid-template-columns: max-content max-content;
  justify-content: space-between;
  min-height: 92px;
  border-bottom: 1px solid rgba(17, 17, 17, 0.08);
  background: #ffffff;
  box-shadow: 0 8px 30px rgba(17, 17, 17, 0.04);
}

.landing-header::after {
  content: "";
  position: absolute;
  top: -20px;
  right: -18px;
  width: min(300px, 32vw);
  height: 86px;
  border-bottom-left-radius: 100% 70px;
  background:
    linear-gradient(155deg, transparent 0 25%, #111111 25% 43%, #dd0000 43% 61%, #ffce00 61% 78%, transparent 78%);
  box-shadow: none;
  pointer-events: none;
}

.landing-brand {
  cursor: pointer;
}

.landing-wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 12px;
  color: #111111;
  font-size: clamp(30px, 3.4vw, 48px);
  font-weight: 950;
  line-height: 1;
  letter-spacing: 0;
}

.landing-wordmark b {
  color: #dd0000;
}

.landing-nav,
.landing-preview,
.landing-feature-band,
.landing-path,
.landing-trust-row {
  display: none;
}

.landing-actions {
  display: none;
  align-items: center;
}

.landing-actions .language-switch {
  min-width: 0;
}

.landing-login-button,
.landing-outline-button {
  min-height: 40px;
  padding: 9px 16px;
  border-radius: 999px;
  border: 1px solid rgba(17, 17, 17, 0.14);
  background: #ffffff;
  color: #111111;
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 10px 22px rgba(17, 17, 17, 0.08);
}

.landing-outline-button {
  border-color: rgba(255, 206, 0, 0.95);
  background: #fff9df;
}

.landing-login-button:hover,
.landing-outline-button:hover,
.landing-section-card:hover {
  transform: translateY(-1px);
  border-color: rgba(221, 0, 0, 0.34);
}

.landing-login-button:focus-visible,
.landing-outline-button:focus-visible,
.landing-section-card:focus-visible {
  outline: 3px solid rgba(255, 206, 0, 0.85);
  outline-offset: 3px;
}

.landing-page {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(1360px, calc(100% - 32px));
  min-height: calc(100dvh - 112px);
  place-items: center;
  padding: clamp(20px, 4vh, 42px) 0 34px;
}

.landing-hero {
  width: 100%;
  min-height: auto;
  padding: clamp(16px, 3vh, 34px) clamp(18px, 5vw, 54px);
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.landing-hero::before {
  display: none;
}

.landing-hero-copy {
  display: grid;
  justify-items: center;
  width: min(920px, 100%);
  max-width: none;
  margin: 0 auto;
  text-align: center;
}

.landing-hero h1 {
  max-width: 960px;
  margin: 0;
  color: #111111;
  font-size: clamp(40px, 4.7vw, 64px);
  line-height: 1.05;
  letter-spacing: 0;
  font-weight: 950;
}

.landing-hero p {
  max-width: 700px;
  margin: 14px auto 0;
  color: #343434;
  font-size: clamp(18px, 1.7vw, 24px);
  line-height: 1.65;
}

.landing-cta {
  justify-content: center;
  gap: 18px;
  margin-top: 24px;
}

.landing-cta .primary,
.landing-cta .secondary,
.landing-cta .landing-outline-button {
  min-width: 210px;
  min-height: 54px;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: clamp(17px, 1.45vw, 22px);
  box-shadow: 0 12px 20px rgba(17, 17, 17, 0.14);
}

.landing-cta .primary {
  background: linear-gradient(135deg, #f3182c 0%, #dd0000 62%, #ad0000 100%);
  border-color: #d10000;
  color: #ffffff;
}

.landing-cta .secondary {
  border: 1px solid #111111;
  background: #ffffff;
  color: #111111;
}

.landing-cta .landing-outline-button {
  border: 1px solid #ffbf00;
  background: #ffffff;
  color: #e2a900;
}

.landing-section-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(112px, 1fr));
  gap: 24px;
  width: min(1020px, 100%);
  margin-top: 42px;
}

.landing-section-card {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 14px;
  min-height: 158px;
  padding: 18px 14px;
  border: 1px solid rgba(17, 17, 17, 0.06);
  border-bottom: 4px solid #ffce00;
  border-radius: 12px;
  background: #ffffff;
  color: #111111;
  box-shadow: 0 24px 48px rgba(17, 17, 17, 0.1);
}

.landing-section-card:nth-child(2),
.landing-section-card:nth-child(4) {
  border-bottom-color: #dd0000;
}

.landing-section-icon {
  display: grid;
  width: 60px;
  height: 60px;
  place-items: center;
  color: #111111;
  background: transparent;
}

.landing-section-icon svg {
  width: 60px;
  height: 60px;
  fill: none;
  stroke: currentColor;
  stroke-width: 3.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.landing-section-icon .accent {
  stroke: #dd0000;
}

.landing-section-card:nth-child(1) .landing-section-icon .accent,
.landing-section-card:nth-child(3) .landing-section-icon .accent,
.landing-section-card:nth-child(5) .landing-section-icon .accent {
  stroke: #ffce00;
}

.landing-section-icon text {
  fill: #111111;
  stroke: none;
  font-family: Arial, sans-serif;
  font-size: 13px;
  font-weight: 900;
}

.landing-section-card strong {
  font-size: clamp(17px, 1.5vw, 22px);
  font-weight: 950;
  letter-spacing: 0;
}

.landing-simple-note {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  max-width: 720px;
  margin-top: 28px;
  color: #252525;
  font-size: clamp(16px, 1.25vw, 20px);
  font-weight: 650;
}

.landing-simple-note::after {
  content: "✓";
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 2px solid #ffce00;
  border-radius: 50%;
  color: #ffb700;
  font-weight: 950;
}

html[dir="rtl"] .landing-hero-copy,
html[dir="rtl"] .landing-brand {
  text-align: center;
}

@media (max-width: 820px) {
  .landing-header {
    grid-template-columns: minmax(140px, 1fr) max-content;
    gap: 10px;
    min-height: 84px;
  }

  .landing-header::after {
    width: 220px;
    height: 78px;
  }

  .landing-section-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .landing-page {
    width: min(100% - 22px, 1120px);
    min-height: calc(100dvh - 54px);
    padding: 8px 0 22px;
  }

  .landing-header {
    min-height: 52px;
    padding: 8px 12px;
  }

  .landing-header::after {
    display: none;
  }

  .landing-wordmark {
    font-size: 24px;
  }

  .landing-actions {
    gap: 6px;
  }

  .landing-login-button {
    min-height: 34px;
    padding: 7px 11px;
    font-size: 12px;
  }

  .landing-hero {
    padding: 8px 0;
  }

  .landing-hero h1 {
    font-size: 28px;
  }

  .landing-hero p {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.45;
  }

  .landing-cta {
    display: flex;
    width: 100%;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px;
    margin-top: 12px;
  }

  .landing-cta .primary,
  .landing-cta .secondary,
  .landing-cta .landing-outline-button {
    width: auto;
    min-width: 112px;
    min-height: 38px;
    padding: 8px 10px;
    font-size: 13px;
  }

  .landing-section-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 6px;
    margin-top: 14px;
  }

  .landing-section-card {
    min-height: 82px;
    gap: 6px;
    padding: 8px 4px;
    border-radius: 8px;
  }

  .landing-section-icon,
  .landing-section-icon svg {
    width: 32px;
    height: 32px;
  }

  .landing-section-card strong {
    font-size: 11px;
  }

  .landing-simple-note {
    gap: 6px;
    margin-top: 14px;
    font-size: 12px;
  }

  .landing-simple-note::after {
    width: 22px;
    height: 22px;
  }
}

body[data-theme="dark"] .answer-choice.correct,
body[data-theme="dark"] .rf-choice.correct,
body[data-theme="dark"] .teil2-choice.correct,
body[data-theme="dark"] .teil3-assignment-chip.correct,
body[data-theme="dark"] .teil3-situation-card.correct,
body[data-theme="dark"] .sprachb2-summary-item.correct,
body[data-theme="dark"] .word-blank.correct,
body[data-theme="dark"] .passage-card.correct .drop-zone,
body[data-theme="dark"] .private-quiz-panel.is-correct .private-quiz-result,
body[data-theme="dark"] .feedback-total.passed {
  border-color: color-mix(in srgb, #53d38a 48%, var(--line));
  background: rgba(83, 211, 138, 0.15);
  color: #86ecae;
}

body[data-theme="dark"] .answer-choice.wrong,
body[data-theme="dark"] .rf-choice.wrong,
body[data-theme="dark"] .teil2-choice.wrong,
body[data-theme="dark"] .teil3-assignment-chip.wrong,
body[data-theme="dark"] .teil3-situation-card.wrong,
body[data-theme="dark"] .sprachb2-summary-item.wrong,
body[data-theme="dark"] .word-blank.wrong,
body[data-theme="dark"] .passage-card.wrong .drop-zone,
body[data-theme="dark"] .private-quiz-panel.is-wrong .private-quiz-result,
body[data-theme="dark"] .feedback-total.failed {
  border-color: color-mix(in srgb, #ff5a52 52%, var(--line));
  background: rgba(255, 90, 82, 0.14);
  color: #ff9b95;
}

/* Correction mark: the right-answer circle must show a green check, never a red X. */
.hoeren-question .rf-choice.correct span,
.rf-choice.correct span {
  border-color: #178a4f;
  background: #e8f7ef;
  color: #178a4f;
  box-shadow: inset 0 0 0 2px var(--surface);
}

.hoeren-question .rf-choice.correct span::after,
.rf-choice.correct span::after {
  content: "\2713";
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  color: #178a4f;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  opacity: 1;
  transform: scale(1);
}

.hoeren-question .rf-choice.wrong span,
.rf-choice.wrong span {
  border-color: #dd0000;
  background: #fff0f0;
  color: #b80000;
  box-shadow: inset 0 0 0 2px var(--surface);
}

.hoeren-question .rf-choice.wrong span::after,
.rf-choice.wrong span::after {
  content: "\00d7";
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  color: #b80000;
  font-size: 14px;
  font-weight: 900;
  line-height: 1;
  opacity: 1;
  transform: scale(1);
}

body[data-theme="dark"] .hoeren-question .rf-choice.correct span,
body[data-theme="dark"] .rf-choice.correct span {
  border-color: #53d38a;
  background: rgba(83, 211, 138, 0.14);
  color: #79e6a6;
}

body[data-theme="dark"] .hoeren-question .rf-choice.correct span::after,
body[data-theme="dark"] .rf-choice.correct span::after {
  color: #79e6a6;
}

/* Exercise result status: half score or more is green, below half stays red. */
.exercise-result.passed {
  border-color: color-mix(in srgb, #178a4f 42%, var(--line));
  background: color-mix(in srgb, #e8f7ef 82%, var(--surface));
  color: #146b3d;
}

.exercise-result.failed {
  border-color: color-mix(in srgb, #dd0000 42%, var(--line));
  background: color-mix(in srgb, #fff0f0 82%, var(--surface));
  color: #b80000;
}

.exercise-result.passed span,
.exercise-result.passed strong,
.exercise-result.passed small {
  color: #146b3d;
}

.exercise-result.failed span,
.exercise-result.failed strong,
.exercise-result.failed small {
  color: #b80000;
}

body[data-theme="dark"] .exercise-result.passed {
  border-color: color-mix(in srgb, #53d38a 44%, var(--line));
  background: rgba(83, 211, 138, 0.14);
  color: #79e6a6;
}

body[data-theme="dark"] .exercise-result.passed span,
body[data-theme="dark"] .exercise-result.passed strong,
body[data-theme="dark"] .exercise-result.passed small {
  color: #79e6a6;
}

/* Final local landing/dashboard polish. Static content and exercises stay untouched. */
.landing-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.landing-actions .language-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid rgba(17, 17, 17, 0.14);
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(17, 17, 17, 0.08);
}

.landing-actions .language-switch button {
  min-height: 34px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.landing-actions .language-switch button.active,
.landing-actions .language-switch button.is-active,
.landing-actions .language-switch button[aria-pressed="true"] {
  border-color: #dd0000;
  background: #111111;
  color: #ffffff;
}

.landing-header {
  min-height: 96px;
  padding: 18px clamp(20px, 5vw, 88px);
}

.landing-hero-copy h1 bdi,
.ziel-hero-copy h1 bdi {
  unicode-bidi: isolate;
}

.landing-hero-copy[dir="rtl"] h1,
.landing-hero-copy[dir="rtl"] p,
.landing-hero-copy[dir="rtl"] .landing-simple-note {
  direction: rtl;
}

.ziel-dashboard {
  width: min(1440px, calc(100% - 32px));
  margin: 28px auto 54px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.ziel-dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: 28px;
  align-items: stretch;
  min-height: 330px;
  padding: clamp(28px, 4vw, 58px);
  border-radius: 18px;
  border: 1px solid rgba(17, 17, 17, 0.08);
  background:
    linear-gradient(90deg, rgba(255, 255, 255, 0.94), rgba(255, 255, 255, 0.72)),
    url("../assets/decor/mountain-sun-card-bg.jpg"),
    linear-gradient(135deg, #fffdf8, #f3f0e9);
  background-size: cover;
  background-position: center;
  box-shadow: 0 22px 54px rgba(17, 17, 17, 0.12);
}

.ziel-hero-copy {
  display: grid;
  align-content: center;
  justify-items: start;
}

.ziel-dashboard[dir="rtl"] .ziel-hero-copy {
  justify-items: end;
  text-align: right;
}

.ziel-hero-copy h1 {
  max-width: 760px;
  margin: 8px 0 0;
  color: #111827;
  font-size: clamp(38px, 5vw, 72px);
  line-height: 1.03;
  letter-spacing: 0;
  font-weight: 950;
}

.ziel-hero-copy p {
  max-width: 680px;
  margin: 18px 0 0;
  color: #343434;
  font-size: clamp(17px, 1.55vw, 23px);
  line-height: 1.65;
}

.ziel-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 28px;
}

.ziel-hero-actions .primary,
.ziel-hero-actions .secondary {
  min-height: 54px;
  padding: 12px 24px;
  border-radius: 10px;
  font-size: 17px;
  font-weight: 950;
}

.ziel-continue-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-content: center;
  align-self: center;
  min-height: 230px;
  padding: 24px;
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.88);
  box-shadow: 0 18px 40px rgba(17, 17, 17, 0.12);
  backdrop-filter: blur(12px);
}

.ziel-progress-ring {
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  border-radius: 50%;
  background:
    radial-gradient(circle, #ffffff 57%, transparent 58%),
    conic-gradient(#dd0000 calc(var(--value) * 1%), #ffce00 0 72%, #111111 0);
  color: #111827;
}

.ziel-progress-ring strong {
  font-size: 24px;
  line-height: 1;
}

.ziel-progress-ring span {
  margin-top: -18px;
  font-size: 10px;
  font-weight: 900;
  color: #5f6673;
}

.ziel-continue-card strong {
  display: block;
  margin-top: 8px;
  color: #111827;
  font-size: 24px;
  line-height: 1.25;
}

.ziel-continue-card small {
  display: block;
  margin-top: 8px;
  color: #5f6673;
  font-size: 14px;
  line-height: 1.45;
}

.ziel-continue-card button {
  grid-column: 1 / -1;
  min-height: 46px;
  border-radius: 10px;
  border: 1px solid rgba(221, 0, 0, 0.28);
  background: linear-gradient(135deg, #dd0000, #9f0000);
  color: #ffffff;
  font-weight: 950;
}

.ziel-dashboard-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 22px;
}

.ziel-dashboard-strip div,
.ziel-section-card,
.ziel-info-card {
  border: 1px solid rgba(17, 17, 17, 0.1);
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 16px 34px rgba(17, 17, 17, 0.08);
}

.ziel-dashboard-strip div {
  display: grid;
  place-items: center;
  min-height: 96px;
  padding: 16px;
}

.ziel-dashboard-strip strong {
  color: #111827;
  font-size: 30px;
  line-height: 1;
}

.ziel-dashboard-strip span {
  margin-top: 7px;
  color: #5f6673;
  font-size: 13px;
  font-weight: 900;
}

.ziel-section-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.ziel-section-card {
  display: grid;
  justify-items: center;
  align-content: center;
  min-height: 188px;
  padding: 22px 16px;
  border-bottom-width: 5px;
  cursor: pointer;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.ziel-section-card.gold {
  border-bottom-color: #ffce00;
}

.ziel-section-card.red {
  border-bottom-color: #dd0000;
}

.ziel-section-card:hover,
.ziel-info-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 46px rgba(17, 17, 17, 0.12);
}

.ziel-section-card .landing-section-icon {
  width: 76px;
  height: 76px;
  margin: 0;
}

.ziel-section-card strong {
  margin-top: 16px;
  color: #111827;
  font-size: 24px;
  line-height: 1.1;
}

.ziel-section-card small {
  margin-top: 8px;
  color: #5f6673;
  font-size: 13px;
  line-height: 1.35;
  text-align: center;
}

.ziel-dashboard-lower {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.ziel-info-card {
  display: grid;
  align-content: center;
  min-height: 112px;
  padding: 22px 24px;
  text-align: inherit;
}

.ziel-info-card strong {
  margin-top: 8px;
  color: #111827;
  font-size: 20px;
  line-height: 1.35;
}

.ziel-red-card {
  border-color: rgba(221, 0, 0, 0.65);
  background: linear-gradient(135deg, #dd0000, #790000);
}

.ziel-red-card .eyebrow,
.ziel-red-card strong {
  color: #ffffff;
}

@media (max-width: 980px) {
  .ziel-dashboard-hero,
  .ziel-dashboard-lower {
    grid-template-columns: 1fr;
  }

  .ziel-section-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ziel-section-card:last-child {
    grid-column: 1 / -1;
  }
}

@media (max-width: 680px) {
  .landing-header {
    min-height: 72px;
    padding: 12px 16px;
  }

  .landing-actions .landing-login-button {
    display: none;
  }

  .ziel-dashboard {
    width: min(100% - 18px, 1440px);
    margin-top: 14px;
  }

  .ziel-dashboard-hero {
    min-height: 0;
    padding: 20px;
    border-radius: 16px;
  }

  .ziel-hero-copy h1 {
    font-size: clamp(31px, 10vw, 44px);
  }

  .ziel-hero-actions {
    width: 100%;
  }

  .ziel-hero-actions .primary,
  .ziel-hero-actions .secondary {
    width: 100%;
  }

  .ziel-continue-card {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }

  .ziel-dashboard-strip {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
  }

  .ziel-dashboard-strip div {
    min-height: 82px;
    padding: 10px 6px;
  }

  .ziel-dashboard-strip strong {
    font-size: 22px;
  }

  .ziel-dashboard-strip span {
    font-size: 10px;
  }

  .ziel-section-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .ziel-section-card,
  .ziel-section-card:last-child {
    grid-column: auto;
    min-height: 128px;
  }

  .ziel-section-card .landing-section-icon {
    width: 54px;
    height: 54px;
  }
}

/* Student dashboard: matches the approved Arabic reference layout. */
.student-dashboard-shell {
  min-height: 100dvh;
  padding-top: 0;
  background: #ffffff;
}

.student-dashboard-topbar {
  position: sticky;
  top: 0;
  z-index: 80;
  display: grid;
  grid-template-columns: minmax(190px, 250px) minmax(0, 1fr) max-content;
  align-items: center;
  gap: clamp(16px, 3vw, 42px);
  min-height: 112px;
  padding: 16px clamp(24px, 3vw, 44px) 20px;
  border-bottom: 1px solid #eeeeee;
  background: rgba(255, 255, 255, 0.98);
  box-shadow: 0 8px 28px rgba(17, 24, 39, 0.04);
}

.student-flag-strip {
  position: absolute;
  inset: auto 0 0;
  height: 14px;
  background: linear-gradient(180deg, #111111 0 33%, #dd0000 33% 66%, #ffce00 66% 100%);
}

.student-brand {
  display: grid;
  justify-items: start;
  gap: 4px;
  border: 0;
  background: transparent;
  color: #111111;
  text-align: left;
}

.student-brand-title {
  font-size: clamp(34px, 3.2vw, 48px);
  line-height: 1;
  font-weight: 950;
  letter-spacing: 0;
}

.student-brand-title b {
  color: #dd0000;
}

.student-brand-sub {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #111111;
  font-size: 14px;
  font-weight: 700;
}

.student-brand-sub i {
  width: 34px;
  height: 10px;
  border: 1px solid rgba(17, 17, 17, 0.12);
  background: linear-gradient(180deg, #111111 0 33%, #dd0000 33% 66%, #ffce00 66% 100%);
}

.student-dashboard-nav {
  display: flex;
  justify-content: center;
  gap: clamp(16px, 2.3vw, 42px);
  min-width: 0;
}

.student-dashboard-nav button {
  display: inline-flex;
  position: relative;
  align-items: center;
  gap: 10px;
  min-height: 56px;
  padding: 8px 8px 18px;
  border: 0;
  background: transparent;
  color: #111111;
  font-size: 18px;
  font-weight: 850;
  white-space: nowrap;
}

.student-dashboard-nav button.active {
  color: #dd0000;
}

.student-dashboard-nav button.active::after {
  content: "";
  position: absolute;
  right: 4px;
  bottom: 0;
  left: 4px;
  height: 4px;
  border-radius: 999px;
  background: #dd0000;
}

.student-dashboard-nav svg,
.student-dashboard-actions svg {
  width: 30px;
  height: 30px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.student-dashboard-nav button.active svg {
  fill: #dd0000;
  stroke: #dd0000;
}

.student-dashboard-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.student-dashboard-actions .language-switch {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  border: 1px solid #e8e8e8;
  border-radius: 999px;
  background: #ffffff;
}

.student-dashboard-actions .language-switch button {
  min-height: 34px;
  padding: 7px 11px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

.student-dashboard-actions .language-switch button.active,
.student-dashboard-actions .language-switch button[aria-pressed="true"] {
  background: #111111;
  color: #ffffff;
}

.student-notification {
  position: relative;
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border: 0;
  border-inline-start: 1px solid #d9d9d9;
  background: transparent;
  color: #111111;
}

.student-notification span {
  position: absolute;
  top: 4px;
  right: 5px;
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  background: #dd0000;
  color: #ffffff;
  font-size: 13px;
  font-weight: 950;
}

.student-profile {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  min-height: 64px;
  padding: 8px 12px 8px 18px;
  border: 1px solid #e8e8e8;
  border-radius: 999px;
  background: #ffffff;
  color: #111111;
  box-shadow: 0 12px 26px rgba(17, 24, 39, 0.06);
}

.student-profile-text {
  display: grid;
  text-align: end;
}

.student-profile-text strong {
  font-size: 16px;
  line-height: 1.2;
}

.student-profile-text small {
  color: #5f6673;
  font-size: 13px;
  font-weight: 750;
}

.student-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 34%, #747b86 0 19%, transparent 20%),
    radial-gradient(circle at 50% 88%, #cfd3d9 0 45%, transparent 46%),
    #edf0f4;
}

.student-chevron {
  font-size: 28px;
  line-height: 1;
}

.student-dashboard-page {
  width: min(1540px, calc(100% - 64px));
  margin: 0 auto;
  padding: 40px 0 44px;
  background: #ffffff;
  color: #111111;
}

.student-dashboard-title {
  margin: 0 0 28px;
  color: #111111;
  font-size: clamp(34px, 3.5vw, 56px);
  line-height: 1.12;
  font-weight: 950;
  text-align: center;
  letter-spacing: 0;
}

.student-dashboard-title bdi {
  unicode-bidi: isolate;
}

.student-dashboard-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(420px, 0.6fr);
  gap: 44px;
  align-items: start;
}

.student-main-column,
.student-side-column {
  display: grid;
  gap: 22px;
}

.student-continue-panel,
.student-side-card,
.student-skill-card,
.student-gift-card,
.student-tip-card {
  border: 1px solid #e2e5ea;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.08);
}

.student-continue-panel {
  display: grid;
  grid-template-columns: 170px minmax(0, 1fr) 210px;
  gap: 24px;
  align-items: center;
  padding: 30px 34px 24px;
}

.student-ring {
  display: grid;
  place-items: center;
  width: 136px;
  height: 136px;
  border-radius: 50%;
  background:
    radial-gradient(circle, #ffffff 57%, transparent 58%),
    conic-gradient(#f8bd00 calc(var(--value) * 1%), #eceef2 0);
}

.student-ring strong {
  color: #111111;
  font-size: 36px;
  line-height: 1;
  font-weight: 950;
}

.student-continue-copy h2,
.student-side-card h2 {
  margin: 0;
  color: #111111;
  font-size: 28px;
  font-weight: 950;
  line-height: 1.15;
}

.student-continue-copy > strong {
  display: block;
  margin-top: 14px;
  color: #111111;
  font-size: 20px;
  line-height: 1.2;
}

.student-progress-line,
.student-mini-progress {
  display: block;
  overflow: hidden;
  height: 7px;
  border-radius: 999px;
  background: #e6e8ec;
}

.student-progress-line {
  width: min(100%, 360px);
  margin-top: 16px;
}

.student-progress-line i,
.student-mini-progress i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #f8bd00;
}

.student-continue-copy small {
  display: block;
  margin-top: 15px;
  color: #667085;
  font-size: 15px;
  font-weight: 750;
}

.student-headphones {
  display: grid;
  place-items: center;
  color: #111111;
}

.student-headphones svg {
  width: 140px;
  height: 140px;
  fill: none;
  stroke: #111111;
  stroke-width: 4;
}

.student-headphones rect,
.student-headphones path:nth-child(2),
.student-headphones path:nth-child(3) {
  fill: #ffce00;
}

.student-continue-actions {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 34px;
  margin-top: 8px;
}

.student-outline-action,
.student-red-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 56px;
  border-radius: 8px;
  font-size: 20px;
  font-weight: 900;
}

.student-outline-action {
  border: 1px solid #7d8591;
  background: #ffffff;
  color: #111111;
}

.student-outline-action svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
}

.student-red-action {
  border: 0;
  background: linear-gradient(135deg, #f10b0b, #c90000);
  color: #ffffff;
  box-shadow: 0 10px 20px rgba(221, 0, 0, 0.22);
}

.student-red-action span {
  font-size: 34px;
  line-height: 0;
}

.student-skill-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 18px;
}

.student-skill-card {
  display: grid;
  justify-items: center;
  min-height: 228px;
  padding: 22px 18px 16px;
  color: #111111;
  text-align: center;
  border-bottom-width: 0;
}

.student-skill-icon {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  background: #fff4bd;
}

.student-skill-card.red .student-skill-icon {
  background: #ffe1e1;
}

.student-skill-icon svg {
  width: 48px;
  height: 48px;
  fill: none;
  stroke: #111111;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.student-skill-icon svg .accent {
  stroke: #dd0000;
}

.student-skill-card.gold .student-skill-icon svg .accent {
  stroke: #f8bd00;
}

.student-skill-card strong {
  margin-top: 14px;
  font-size: 24px;
  line-height: 1.1;
}

.student-skill-card small {
  min-height: 42px;
  margin-top: 8px;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.4;
}

.student-mini-progress {
  width: 86px;
  height: 6px;
  margin-top: 12px;
}

.student-skill-card.red .student-mini-progress i {
  background: #dd0000;
}

.student-skill-card em {
  margin-top: -12px;
  justify-self: end;
  color: #4b5563;
  font-style: normal;
  font-size: 15px;
  font-weight: 800;
}

.student-skill-card b {
  justify-self: stretch;
  margin-top: 12px;
  padding-top: 11px;
  border-top: 1px solid #e5e7eb;
  color: #dd0000;
  font-size: 17px;
  font-weight: 950;
}

.student-bottom-row {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 18px;
}

.student-gift-card,
.student-tip-card {
  display: grid;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  align-items: center;
  min-height: 118px;
  padding: 18px 20px;
  text-align: inherit;
}

.student-tip-card {
  grid-template-columns: 88px minmax(0, 1fr);
  background: linear-gradient(135deg, #fff7d9, #edf6ff);
}

.student-gift-card {
  border-color: #ffd966;
  background: linear-gradient(135deg, #fff8d6, #fffef8);
}

.student-gift-icon svg,
.student-tip-icon svg {
  width: 72px;
  height: 72px;
  fill: none;
  stroke: #f8bd00;
  stroke-width: 4;
}

.student-gift-icon svg path {
  fill: #ffce00;
  stroke: #f1a900;
}

.student-tip-icon svg {
  stroke: #f8bd00;
}

.student-gift-card strong,
.student-tip-card strong {
  display: block;
  color: #111111;
  font-size: 22px;
  font-weight: 950;
}

.student-gift-card small,
.student-tip-card small {
  display: block;
  margin-top: 6px;
  color: #111111;
  font-size: 15px;
  line-height: 1.5;
}

.student-gift-card em {
  display: inline-flex;
  align-items: center;
  min-height: 46px;
  padding: 0 18px;
  border-radius: 8px;
  background: #ffce00;
  color: #111111;
  font-style: normal;
  font-size: 17px;
  font-weight: 950;
}

.student-side-column {
  gap: 22px;
}

.student-side-card {
  display: grid;
  min-height: 190px;
  padding: 28px 30px;
  color: #111111;
  text-align: inherit;
}

.student-side-card header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.student-side-card header svg {
  width: 34px;
  height: 34px;
  fill: none;
  stroke: #111111;
  stroke-width: 2.2;
}

.student-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  margin-top: 28px;
}

.student-metrics div {
  display: grid;
  place-items: center;
  gap: 8px;
  min-height: 76px;
  padding: 4px 16px;
  border-inline-start: 1px solid #e5e7eb;
}

.student-metrics div:first-child {
  border-inline-start: 0;
}

.student-metrics strong {
  color: #111111;
  font-size: 38px;
  line-height: 1;
}

.student-metrics div:first-child strong {
  color: #dd0000;
}

.student-metrics span {
  color: #111111;
  font-size: 15px;
  font-weight: 750;
  text-align: center;
}

.student-check {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 3px solid #111111;
  border-radius: 50%;
  color: #111111;
  font-size: 24px;
  font-weight: 950;
}

.student-chart {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 24px;
  align-items: end;
  margin-top: 22px;
}

.student-chart strong {
  color: #111111;
  font-size: 44px;
  line-height: 1;
}

.student-chart > span {
  grid-column: 1;
  color: #111111;
  font-size: 15px;
}

.student-bars {
  grid-column: 2;
  grid-row: 1 / span 2;
  display: flex;
  align-items: end;
  gap: 22px;
  height: 110px;
  border-bottom: 2px solid #e5e7eb;
}

.student-bars i {
  width: 18px;
  border-radius: 5px 5px 0 0;
  background: #c6c6c6;
}

.student-bars i:nth-child(1) { height: 50px; }
.student-bars i:nth-child(2) { height: 28px; }
.student-bars i:nth-child(3) { height: 72px; background: #f8bd00; }
.student-bars i:nth-child(4) { height: 62px; background: #f8bd00; }
.student-bars i:nth-child(5) { height: 92px; background: #f8bd00; }
.student-bars i:nth-child(6) { height: 68px; background: #f8bd00; }
.student-bars i:nth-child(7) { height: 44px; }

.student-last-card {
  grid-template-columns: minmax(0, 1fr) 92px;
  align-items: center;
  border: 1px solid #e2e5ea;
}

.student-last-card span {
  display: grid;
  gap: 10px;
}

.student-last-card strong {
  color: #111111;
  font-size: 28px;
}

.student-last-card b {
  color: #111111;
  font-size: 20px;
}

.student-last-card small {
  color: #6b7280;
  font-size: 15px;
}

.student-last-card em {
  display: grid;
  place-items: center;
  width: 86px;
  height: 86px;
  border-radius: 10px;
  background: #fff4bd;
  color: #111111;
  font-style: normal;
}

.student-last-card svg {
  width: 54px;
  height: 54px;
  fill: none;
  stroke: #111111;
  stroke-width: 3;
}

@media (max-width: 1180px) {
  .student-dashboard-topbar {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .student-dashboard-nav,
  .student-dashboard-actions {
    justify-content: center;
    flex-wrap: wrap;
  }

  .student-dashboard-layout {
    grid-template-columns: 1fr;
  }

  .student-side-column {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .student-last-card {
    grid-column: 1 / -1;
  }
}

@media (max-width: 860px) {
  .student-dashboard-page {
    width: min(100% - 24px, 1540px);
    padding-top: 24px;
  }

  .student-dashboard-nav {
    overflow-x: auto;
    justify-content: flex-start;
    padding-bottom: 4px;
  }

  .student-profile-text {
    display: none;
  }

  .student-continue-panel,
  .student-skill-grid,
  .student-bottom-row,
  .student-side-column {
    grid-template-columns: 1fr;
  }

  .student-headphones {
    display: none;
  }

  .student-continue-actions {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .student-skill-card {
    min-height: 168px;
  }
}

@media (max-width: 520px) {
  .student-dashboard-topbar {
    min-height: 92px;
    padding: 10px 12px 18px;
  }

  .student-brand-title {
    font-size: 30px;
  }

  .student-dashboard-nav button {
    min-height: 46px;
    font-size: 14px;
  }

  .student-dashboard-actions {
    gap: 8px;
  }

  .student-notification,
  .student-profile {
    min-height: 46px;
  }

  .student-profile {
    padding: 5px 8px;
  }

  .student-avatar {
    width: 38px;
    height: 38px;
  }

  .student-dashboard-title {
    font-size: 28px;
  }

  .student-continue-panel,
  .student-side-card,
  .student-gift-card,
  .student-tip-card {
    padding: 18px;
  }

  .student-ring {
    width: 112px;
    height: 112px;
  }

  .student-metrics {
    grid-template-columns: 1fr;
  }

  .student-metrics div {
    border-inline-start: 0;
    border-top: 1px solid #e5e7eb;
  }

  .student-metrics div:first-child {
    border-top: 0;
  }

  .student-chart {
    grid-template-columns: 1fr;
  }

  .student-bars {
    grid-column: 1;
    grid-row: auto;
    gap: 14px;
  }
}

/* Keep the approved dashboard visible in one desktop viewport as much as possible. */
@media (min-width: 1181px) {
  .student-dashboard-shell {
    overflow-x: hidden;
  }

  .student-dashboard-topbar {
    min-height: 82px;
    padding: 9px clamp(22px, 2.7vw, 40px) 16px;
  }

  .student-flag-strip {
    height: 10px;
  }

  .student-brand-title {
    font-size: clamp(30px, 2.5vw, 40px);
  }

  .student-brand-sub {
    font-size: 12px;
  }

  .student-dashboard-nav button {
    min-height: 44px;
    padding: 6px 6px 12px;
    font-size: 16px;
  }

  .student-dashboard-nav svg,
  .student-dashboard-actions svg {
    width: 25px;
    height: 25px;
  }

  .student-notification {
    width: 46px;
    height: 46px;
  }

  .student-profile {
    min-height: 52px;
    padding: 6px 10px 6px 14px;
  }

  .student-avatar {
    width: 40px;
    height: 40px;
  }

  .student-dashboard-page {
    width: min(1540px, calc(100% - 56px));
    padding: 20px 0 18px;
  }

  .student-dashboard-title {
    margin-bottom: 16px;
    font-size: clamp(32px, 2.8vw, 46px);
  }

  .student-dashboard-layout {
    gap: 30px;
  }

  .student-main-column,
  .student-side-column {
    gap: 16px;
  }

  .student-continue-panel {
    grid-template-columns: 132px minmax(0, 1fr) 150px;
    gap: 18px;
    padding: 18px 24px;
  }

  .student-ring {
    width: 108px;
    height: 108px;
  }

  .student-ring strong {
    font-size: 30px;
  }

  .student-continue-copy h2,
  .student-side-card h2 {
    font-size: 24px;
  }

  .student-continue-copy > strong {
    margin-top: 8px;
    font-size: 18px;
  }

  .student-progress-line {
    margin-top: 10px;
  }

  .student-continue-copy small {
    margin-top: 10px;
    font-size: 13px;
  }

  .student-headphones svg {
    width: 102px;
    height: 102px;
  }

  .student-continue-actions {
    gap: 22px;
    margin-top: 4px;
  }

  .student-outline-action,
  .student-red-action {
    min-height: 48px;
    font-size: 17px;
  }

  .student-skill-grid {
    gap: 14px;
  }

  .student-skill-card {
    min-height: 172px;
    padding: 16px 14px 12px;
  }

  .student-skill-icon {
    width: 58px;
    height: 58px;
  }

  .student-skill-icon svg {
    width: 36px;
    height: 36px;
  }

  .student-skill-card strong {
    margin-top: 10px;
    font-size: 20px;
  }

  .student-skill-card small {
    min-height: 32px;
    margin-top: 5px;
    font-size: 12px;
    line-height: 1.25;
  }

  .student-mini-progress {
    margin-top: 8px;
  }

  .student-skill-card b {
    margin-top: 8px;
    padding-top: 7px;
    font-size: 15px;
  }

  .student-bottom-row {
    gap: 14px;
  }

  .student-gift-card,
  .student-tip-card {
    grid-template-columns: 64px minmax(0, 1fr) auto;
    min-height: 86px;
    padding: 12px 16px;
  }

  .student-tip-card {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .student-gift-icon svg,
  .student-tip-icon svg {
    width: 54px;
    height: 54px;
  }

  .student-gift-card strong,
  .student-tip-card strong {
    font-size: 18px;
  }

  .student-gift-card small,
  .student-tip-card small {
    margin-top: 3px;
    font-size: 13px;
    line-height: 1.35;
  }

  .student-gift-card em {
    min-height: 38px;
    padding: 0 14px;
    font-size: 14px;
  }

  .student-side-card {
    min-height: 148px;
    padding: 18px 22px;
  }

  .student-metrics {
    margin-top: 16px;
  }

  .student-metrics div {
    min-height: 56px;
    padding: 2px 10px;
  }

  .student-metrics strong {
    font-size: 30px;
  }

  .student-metrics span {
    font-size: 13px;
  }

  .student-check {
    width: 34px;
    height: 34px;
    font-size: 19px;
  }

  .student-chart {
    grid-template-columns: 90px minmax(0, 1fr);
    gap: 18px;
    margin-top: 12px;
  }

  .student-chart strong {
    font-size: 36px;
  }

  .student-bars {
    height: 78px;
    gap: 16px;
  }

  .student-bars i {
    width: 15px;
  }

  .student-bars i:nth-child(1) { height: 36px; }
  .student-bars i:nth-child(2) { height: 22px; }
  .student-bars i:nth-child(3) { height: 52px; }
  .student-bars i:nth-child(4) { height: 46px; }
  .student-bars i:nth-child(5) { height: 68px; }
  .student-bars i:nth-child(6) { height: 50px; }
  .student-bars i:nth-child(7) { height: 32px; }

  .student-last-card {
    grid-template-columns: minmax(0, 1fr) 70px;
    min-height: 126px;
  }

  .student-last-card strong {
    font-size: 23px;
  }

  .student-last-card b {
    font-size: 17px;
  }

  .student-last-card small {
    font-size: 13px;
  }

  .student-last-card em {
    width: 66px;
    height: 66px;
  }

  .student-last-card svg {
    width: 42px;
    height: 42px;
  }
}
/* Approved student dashboard */
.approved-dashboard-shell {
  min-height: 100dvh;
  padding-top: 0;
  background: #fbfaf7;
  color: #0b2746;
  overflow-x: hidden;
}

.approved-dashboard-header {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  padding: 0 42px;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid rgba(13, 43, 73, 0.1);
  position: sticky;
  top: 0;
  z-index: 30;
}

.approved-brand {
  border: 0;
  background: transparent;
  color: #0b2746;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 30px;
  letter-spacing: 0;
  cursor: pointer;
}

.approved-brand b {
  color: #d70b12;
  font-family: inherit;
}

.approved-header-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.approved-header-actions .language-switch {
  border: 0;
  background: transparent;
  box-shadow: none;
  padding: 0;
}

.approved-notification,
.approved-user-menu {
  border: 0;
  background: transparent;
  color: #0b2746;
  cursor: pointer;
}

.approved-notification {
  width: 36px;
  height: 36px;
  position: relative;
  display: grid;
  place-items: center;
}

.approved-notification svg,
.approved-user-menu svg,
.approved-sidebar svg,
.approved-mobile-nav svg,
.approved-dashboard-page svg {
  width: 22px;
  height: 22px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.approved-notification span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #ef4e2a;
  position: absolute;
  top: 7px;
  right: 6px;
}

.approved-user-menu {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 178px;
  text-align: left;
}

.approved-avatar {
  width: 42px;
  height: 42px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #f5e9dd;
  color: #0b2746;
  font-weight: 800;
}

.approved-user-copy {
  display: grid;
  gap: 2px;
  line-height: 1.1;
}

.approved-user-copy strong {
  font-size: 14px;
}

.approved-user-copy small {
  color: #66748a;
  font-size: 12px;
}

.approved-chevron {
  color: #66748a;
}

.approved-dashboard-body {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: calc(100dvh - 72px);
}

.approved-sidebar {
  padding: 34px 18px 28px;
  border-right: 1px solid rgba(13, 43, 73, 0.1);
  background: rgba(255, 255, 255, 0.72);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 28px;
}

.approved-sidebar-nav {
  display: grid;
  gap: 12px;
}

.approved-sidebar-nav button,
.approved-support {
  min-height: 48px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #0b2746;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 16px;
  font-weight: 800;
  cursor: pointer;
  text-align: left;
}

.approved-sidebar-nav button.active,
.approved-sidebar-nav button:hover,
.approved-support {
  background: #f4f1ed;
}

.approved-support {
  border: 1px solid rgba(13, 43, 73, 0.08);
  min-height: 68px;
}

.approved-support span {
  display: grid;
  gap: 2px;
  flex: 1;
}

.approved-support small {
  color: #66748a;
  font-weight: 700;
}

.approved-dashboard-page {
  width: min(1260px, 100%);
  margin: 0 auto;
  padding: 30px 44px 28px;
}

.approved-welcome {
  margin-bottom: 16px;
}

.approved-welcome h1 {
  margin: 0;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.1;
  font-family: Georgia, "Times New Roman", serif;
  letter-spacing: 0;
}

.approved-welcome p {
  margin: 8px 0 0;
  color: #52627a;
  font-size: 15px;
}

.approved-top-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1.55fr) minmax(250px, 1fr) minmax(250px, 1fr);
  gap: 18px;
  margin-bottom: 18px;
}

.approved-card {
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(13, 43, 73, 0.1);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(13, 43, 73, 0.06);
}

.approved-card h2,
.approved-area h3 {
  margin: 0;
  letter-spacing: 0;
}

.approved-progress-card,
.approved-continue-card,
.approved-model-card {
  min-height: 192px;
  padding: 20px;
}

.approved-progress-content {
  display: grid;
  grid-template-columns: 150px 1fr;
  align-items: center;
  gap: 24px;
  margin-top: 12px;
}

.approved-ring {
  --value: 0;
  width: 136px;
  aspect-ratio: 1;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: conic-gradient(#0b2746 calc(var(--value) * 1%), #e7ede3 0);
  position: relative;
}

.approved-ring::before {
  content: "";
  position: absolute;
  inset: 14px;
  border-radius: inherit;
  background: #fff;
}

.approved-ring strong,
.approved-ring span {
  position: relative;
  z-index: 1;
}

.approved-ring strong {
  font-size: 32px;
}

.approved-ring span {
  font-size: 12px;
  color: #66748a;
  margin-top: 36px;
  position: absolute;
}

.approved-progress-details {
  display: grid;
  gap: 6px;
}

.approved-progress-details span,
.approved-area span,
.approved-meta-row,
.approved-activity small {
  color: #66748a;
  font-size: 13px;
}

.approved-line {
  height: 6px;
  border-radius: 999px;
  background: #e3e7eb;
  overflow: hidden;
}

.approved-line i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #0b2746;
}

.approved-secondary-button,
.approved-primary-button,
.approved-area-button {
  min-height: 42px;
  border-radius: 6px;
  border: 1px solid rgba(13, 43, 73, 0.38);
  background: #fff;
  color: #0b2746;
  font-weight: 900;
  cursor: pointer;
}

.approved-progress-card .approved-secondary-button {
  width: 100%;
  margin-top: 12px;
  min-height: 34px;
}

.approved-primary-button {
  width: 100%;
  border: 0;
  margin-top: 18px;
  background: linear-gradient(135deg, #f36a2d, #e53b18);
  color: #fff;
}

.approved-secondary-button {
  width: 100%;
}

.approved-continue-card,
.approved-model-card {
  display: flex;
  flex-direction: column;
}

.approved-continue-card {
  background: linear-gradient(#f4faee 0 30%, #fff 30%);
}

.approved-model-card {
  background: linear-gradient(#eef7fb 0 30%, #fff 30%);
}

.approved-eyebrow {
  display: block;
  text-transform: uppercase;
  color: #0d456a;
  font-size: 13px;
  font-weight: 900;
  margin-bottom: 8px;
}

.approved-activity {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-top: 24px;
}

.approved-activity span:last-child {
  display: grid;
  gap: 4px;
}

.approved-activity-icon,
.approved-area-icon {
  width: 58px;
  height: 58px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: #edf6ee;
  color: #0b2746;
}

.approved-activity-icon.blue {
  background: #e7f3f7;
}

.approved-meta-row {
  display: flex;
  gap: 20px;
  align-items: center;
  margin-top: auto;
  padding-top: 16px;
}

.approved-meta-row span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.approved-areas-card {
  padding: 18px;
  margin-bottom: 18px;
}

.approved-area-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 14px;
  margin-top: 14px;
}

.approved-area {
  border: 1px solid rgba(13, 43, 73, 0.09);
  border-radius: 8px;
  padding: 16px 14px;
  display: grid;
  gap: 12px;
}

.approved-area-icon {
  width: 48px;
  height: 48px;
  background: #f7eadf;
}

.approved-area.green .approved-area-icon {
  background: #eaf3e6;
}

.approved-area.navy .approved-area-icon {
  background: #e9f4f8;
}

.approved-area.orange .approved-area-icon {
  background: #f9e6d6;
}

.approved-area span {
  display: flex;
  justify-content: space-between;
}

.approved-area.green .approved-line i {
  background: #5b946d;
}

.approved-area.orange .approved-line i {
  background: #f36a2d;
}

.approved-area-button {
  min-height: 36px;
  margin-top: 2px;
}

.approved-bottom-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}

.approved-list-card {
  padding: 18px;
}

.approved-list-card h2 {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  text-transform: uppercase;
  color: #52627a;
  margin-bottom: 12px;
}

.approved-last-row {
  display: grid;
  grid-template-columns: 54px 1fr auto;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.approved-last-row span:nth-child(2) {
  display: grid;
  gap: 3px;
}

.approved-last-row em {
  background: #edf6e8;
  color: #487b58;
  border-radius: 6px;
  font-style: normal;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 900;
}

.approved-plan-list {
  list-style: none;
  padding: 0;
  margin: 0 0 13px;
  display: grid;
  gap: 8px;
}

.approved-plan-list li {
  display: grid;
  grid-template-columns: 22px 1fr auto;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.approved-plan-list li > span {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid #9aa6b6;
  display: grid;
  place-items: center;
}

.approved-plan-list li > span.done {
  border-color: #5b946d;
  background: #5b946d;
  color: #fff;
}

.approved-plan-list svg {
  width: 13px;
  height: 13px;
}

.approved-plan-list em {
  color: #66748a;
  font-style: normal;
  font-size: 12px;
}

.approved-mobile-nav {
  display: none;
}

body[data-theme="dark"] .approved-dashboard-shell {
  background: #08111c;
  color: #eef6ff;
}

body[data-theme="dark"] .approved-dashboard-header,
body[data-theme="dark"] .approved-sidebar,
body[data-theme="dark"] .approved-card,
body[data-theme="dark"] .approved-area,
body[data-theme="dark"] .approved-support {
  background: #101b2a;
  border-color: rgba(255, 255, 255, 0.12);
  color: #eef6ff;
}

body[data-theme="dark"] .approved-brand,
body[data-theme="dark"] .approved-sidebar-nav button,
body[data-theme="dark"] .approved-notification,
body[data-theme="dark"] .approved-user-menu {
  color: #eef6ff;
}

body[data-theme="dark"] .approved-sidebar-nav button.active,
body[data-theme="dark"] .approved-sidebar-nav button:hover {
  background: rgba(255, 255, 255, 0.08);
}

body[data-theme="dark"] .approved-ring::before,
body[data-theme="dark"] .approved-secondary-button,
body[data-theme="dark"] .approved-area-button {
  background: #101b2a;
  color: #eef6ff;
}

@media (max-width: 1180px) {
  .approved-dashboard-body {
    grid-template-columns: 220px minmax(0, 1fr);
  }

  .approved-dashboard-page {
    padding: 24px;
  }

  .approved-top-grid {
    grid-template-columns: 1fr;
  }

  .approved-area-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .approved-bottom-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .approved-dashboard-header {
    height: 64px;
    padding: 0 16px;
  }

  .approved-brand {
    font-size: 24px;
  }

  .approved-user-copy,
  .approved-chevron {
    display: none;
  }

  .approved-header-actions {
    gap: 8px;
  }

  .approved-dashboard-body {
    display: block;
  }

  .approved-sidebar {
    display: none;
  }

  .approved-dashboard-page {
    padding: 22px 14px 86px;
  }

  .approved-welcome h1 {
    font-size: 28px;
  }

  .approved-progress-content,
  .approved-last-row {
    grid-template-columns: 1fr;
  }

  .approved-ring {
    margin: 0 auto;
  }

  .approved-area-grid {
    grid-template-columns: 1fr 1fr;
  }

  .approved-mobile-nav {
    position: fixed;
    left: 10px;
    right: 10px;
    bottom: 10px;
    z-index: 40;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    padding: 8px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.96);
    border: 1px solid rgba(13, 43, 73, 0.12);
    box-shadow: 0 16px 35px rgba(13, 43, 73, 0.16);
  }

  .approved-mobile-nav button {
    border: 0;
    background: transparent;
    color: #66748a;
    display: grid;
    place-items: center;
    gap: 3px;
    min-height: 48px;
    font-size: 11px;
    font-weight: 900;
  }

  .approved-mobile-nav button.active {
    color: #d70b12;
  }

  body[data-theme="dark"] .approved-mobile-nav {
    background: #101b2a;
    border-color: rgba(255, 255, 255, 0.14);
  }
}

@media (max-width: 390px) {
  .approved-area-grid {
    grid-template-columns: 1fr;
  }

  .approved-progress-card,
  .approved-continue-card,
  .approved-model-card,
  .approved-areas-card,
  .approved-list-card {
    padding: 16px;
  }
}

/* Landing Page Polish Only */
.landing-shell {
  height: 100dvh;
  overflow: hidden;
  background: #f8f7f3;
  color: #10243e;
}

.landing-shell::before {
  height: 3px;
  background: linear-gradient(90deg, #111 0 33.3%, #dd0000 33.3% 66.6%, #ffce00 66.6% 100%);
}

.landing-shell::after {
  height: 8px;
  background: linear-gradient(90deg, #111 0 33.3%, #dd0000 33.3% 66.6%, #ffce00 66.6% 100%);
}

.landing-header {
  min-height: 76px;
  padding: 10px clamp(18px, 4vw, 52px);
  display: grid;
  grid-template-columns: max-content max-content;
  align-items: center;
  justify-content: space-between;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid #dfe5ea;
  box-shadow: 0 8px 24px rgba(16, 36, 62, 0.04);
}

.landing-header::after {
  width: min(210px, 20vw);
  height: 58px;
  top: -16px;
  right: -22px;
  opacity: 0.9;
}

.landing-brand {
  min-height: 56px;
  display: inline-flex;
  align-items: center;
}

.landing-brand img {
  max-height: 56px;
  width: auto;
  object-fit: contain;
}

.landing-wordmark {
  font-size: clamp(30px, 3vw, 42px);
  color: #10243e;
  line-height: 1;
}

.landing-wordmark b {
  color: #d71920;
}

.landing-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
}

.landing-actions .language-switch {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  border: 1px solid #dfe5ea;
  background: #fff;
  border-radius: 999px;
  box-shadow: none;
}

.landing-actions .language-switch button {
  color: #10243e;
}

.landing-actions .language-switch button.active {
  background: #10243e;
  color: #fff;
}

.landing-actions .landing-login-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border-radius: 999px;
  border-color: #10243e;
  color: #10243e;
  box-shadow: none;
}

.landing-page {
  width: min(1180px, calc(100% - 36px));
  min-height: calc(100dvh - 84px);
  padding: clamp(34px, 6vh, 62px) 0 28px;
  place-items: start center;
}

.landing-hero {
  padding: 0;
}

.landing-hero-copy {
  width: min(980px, 100%);
}

.landing-hero h1 {
  max-width: 860px;
  color: #10243e;
  font-size: clamp(38px, 4.2vw, 56px);
  line-height: 1.12;
  font-weight: 920;
}

.landing-hero p {
  max-width: 620px;
  margin-top: 12px;
  color: #667085;
  font-size: clamp(17px, 1.5vw, 21px);
  line-height: 1.5;
}

.landing-cta {
  gap: 14px;
  margin-top: 24px;
}

.landing-cta .primary,
.landing-cta .secondary,
.landing-cta .landing-outline-button {
  min-width: 190px;
  min-height: 48px;
  padding: 11px 22px;
  border-radius: 8px;
  font-size: clamp(15px, 1.2vw, 18px);
  box-shadow: none;
}

.landing-cta .primary {
  background: #f05a28;
  border-color: #f05a28;
  color: #fff;
  box-shadow: 0 12px 24px rgba(240, 90, 40, 0.2);
}

.landing-cta .primary:hover {
  background: #d94b1e;
  border-color: #d94b1e;
}

.landing-cta .secondary {
  border: 1px solid #10243e;
  background: #fff;
  color: #10243e;
}

.landing-cta .landing-outline-button {
  border: 1px solid transparent;
  background: transparent;
  color: #10243e;
  text-decoration: underline;
  text-underline-offset: 5px;
}

.landing-section-grid {
  width: min(960px, 100%);
  grid-template-columns: repeat(5, minmax(116px, 1fr));
  gap: 18px;
  margin-top: 34px;
}

.landing-section-card {
  min-height: 136px;
  gap: 9px;
  padding: 16px 12px;
  border: 1px solid #dfe5ea;
  border-bottom: 1px solid #dfe5ea;
  border-radius: 8px;
  background: #fff;
  color: #10243e;
  box-shadow: 0 14px 34px rgba(16, 36, 62, 0.07);
  transition: transform 0.16s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.landing-section-card:nth-child(2),
.landing-section-card:nth-child(4) {
  border-bottom-color: #dfe5ea;
}

.landing-section-card:hover {
  transform: translateY(-2px);
  border-color: rgba(16, 36, 62, 0.24);
  box-shadow: 0 18px 40px rgba(16, 36, 62, 0.1);
}

.landing-section-icon,
.landing-section-icon svg {
  width: 48px;
  height: 48px;
}

.landing-section-icon {
  color: #10243e;
}

.landing-section-icon .accent,
.landing-section-card:nth-child(1) .landing-section-icon .accent,
.landing-section-card:nth-child(3) .landing-section-icon .accent,
.landing-section-card:nth-child(5) .landing-section-icon .accent {
  stroke: #f0b90b;
}

.landing-section-card:nth-child(2) .landing-section-icon .accent,
.landing-section-card:nth-child(4) .landing-section-icon .accent {
  stroke: #d71920;
}

.landing-section-card strong {
  color: #10243e;
  font-size: clamp(16px, 1.25vw, 19px);
  line-height: 1.1;
}

.landing-section-card small {
  color: #667085;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.25;
}

.landing-simple-note {
  margin-top: 24px;
  color: #667085;
  font-size: clamp(14px, 1.1vw, 17px);
  font-weight: 650;
}

.landing-simple-note::after {
  width: 24px;
  height: 24px;
  border-color: #f0b90b;
  color: #d9a300;
}

body[data-theme="dark"] .landing-shell {
  background: #08111c;
  color: #edf4fb;
}

body[data-theme="dark"] .landing-header,
body[data-theme="dark"] .landing-section-card {
  background: #101b2a;
  border-color: rgba(223, 229, 234, 0.16);
  color: #edf4fb;
}

body[data-theme="dark"] .landing-wordmark,
body[data-theme="dark"] .landing-hero h1,
body[data-theme="dark"] .landing-section-card strong,
body[data-theme="dark"] .landing-section-icon,
body[data-theme="dark"] .landing-cta .secondary,
body[data-theme="dark"] .landing-cta .landing-outline-button,
body[data-theme="dark"] .landing-actions .landing-login-button {
  color: #edf4fb;
}

body[data-theme="dark"] .landing-hero p,
body[data-theme="dark"] .landing-section-card small,
body[data-theme="dark"] .landing-simple-note {
  color: #a9b6c7;
}

body[data-theme="dark"] .landing-actions .language-switch,
body[data-theme="dark"] .landing-actions .landing-login-button,
body[data-theme="dark"] .landing-cta .secondary {
  background: #101b2a;
  border-color: rgba(223, 229, 234, 0.24);
}

body[data-theme="dark"] .landing-actions .language-switch button {
  color: #edf4fb;
}

body[data-theme="dark"] .landing-actions .language-switch button.active {
  background: #edf4fb;
  color: #10243e;
}

@media (max-width: 820px) {
  .landing-header {
    min-height: 68px;
    padding: 9px 18px;
  }

  .landing-header::after {
    width: 160px;
    height: 48px;
  }

  .landing-page {
    width: min(100% - 28px, 760px);
    padding-top: 42px;
  }

  .landing-section-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .landing-header {
    min-height: 58px;
    grid-template-columns: max-content minmax(0, max-content);
    padding: 7px 12px;
  }

  .landing-brand {
    min-height: 40px;
  }

  .landing-brand img {
    max-height: 40px;
  }

  .landing-wordmark {
    font-size: 25px;
    gap: 6px;
  }

  .landing-actions {
    gap: 5px;
  }

  .landing-actions .language-switch {
    min-height: 32px;
    font-size: 11px;
  }

  .landing-actions .landing-login-button {
    min-height: 32px;
    padding: 6px 9px;
    font-size: 11px;
  }

  .landing-page {
    width: min(100% - 20px, 430px);
    min-height: calc(100dvh - 66px);
    padding: 34px 0 18px;
  }

  .landing-hero h1 {
    font-size: clamp(29px, 8vw, 36px);
    line-height: 1.14;
  }

  .landing-hero p {
    margin-top: 8px;
    font-size: 14px;
    line-height: 1.45;
  }

  .landing-cta {
    display: grid;
    width: min(100%, 280px);
    gap: 8px;
    margin-top: 16px;
  }

  .landing-cta .primary,
  .landing-cta .secondary,
  .landing-cta .landing-outline-button {
    width: 100%;
    min-height: 44px;
    min-width: 0;
    padding: 9px 12px;
    font-size: 14px;
  }

  .landing-section-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-top: 16px;
  }

  .landing-section-card {
    min-height: 78px;
    gap: 4px;
    padding: 8px 6px;
    box-shadow: 0 8px 20px rgba(16, 36, 62, 0.06);
  }

  .landing-section-icon,
  .landing-section-icon svg {
    width: 30px;
    height: 30px;
  }

  .landing-section-card strong {
    font-size: 12px;
  }

  .landing-section-card small {
    font-size: 10px;
  }

  .landing-simple-note {
    gap: 6px;
    margin-top: 12px;
    font-size: 12px;
  }

  .landing-simple-note::after {
    width: 20px;
    height: 20px;
  }
}

/* Dashboard RTL, overflow and alignment fix */
.approved-dashboard-shell {
  overflow-x: clip;
}

html[dir="rtl"] .approved-dashboard-shell {
  direction: ltr;
}

.approved-dashboard-shell,
.approved-dashboard-shell :where(
  .approved-dashboard-header,
  .approved-dashboard-page,
  .approved-card,
  .approved-progress-card,
  .approved-continue-card,
  .approved-model-card,
  .approved-area,
  .approved-activity,
  .approved-meta-row,
  .approved-list-card,
  .approved-last-row,
  .approved-plan-list,
  .approved-user-copy
) {
  direction: ltr;
  unicode-bidi: isolate;
  text-align: left;
}

.approved-dashboard-body {
  grid-template-columns: 270px minmax(0, 1fr);
}

.approved-sidebar {
  min-width: 0;
}

html[dir="rtl"] .approved-dashboard-shell.is-arabic-ui .approved-dashboard-body {
  grid-template-columns: minmax(0, 1fr) 270px;
}

html[dir="rtl"] .approved-dashboard-shell.is-arabic-ui .approved-sidebar {
  grid-column: 2;
  grid-row: 1;
  border-right: 0;
  border-left: 1px solid rgba(11, 39, 70, 0.08);
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .approved-dashboard-shell.is-arabic-ui .approved-sidebar-nav button,
html[dir="rtl"] .approved-dashboard-shell.is-arabic-ui .approved-support {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .approved-dashboard-shell.is-arabic-ui .approved-dashboard-page {
  grid-column: 1;
  grid-row: 1;
}

.approved-dashboard-page {
  max-width: calc(100vw - 270px);
  padding: 28px 34px 28px;
}

.approved-welcome h1 {
  max-width: 100%;
  font-size: clamp(34px, 2.65vw, 46px);
  line-height: 1.12;
  overflow-wrap: normal;
}

.approved-welcome p,
.approved-card h2,
.approved-activity strong,
.approved-activity small,
.approved-meta-row span,
.approved-last-row strong,
.approved-last-row small,
.approved-plan-list span,
.approved-plan-list small,
.approved-user-copy strong,
.approved-user-copy small {
  direction: ltr;
  unicode-bidi: isolate;
  text-align: left;
}

.approved-top-grid {
  grid-template-columns: minmax(300px, 1.3fr) minmax(235px, 1fr) minmax(235px, 1fr);
  gap: 18px;
}

.approved-card,
.approved-progress-card,
.approved-continue-card,
.approved-model-card,
.approved-area,
.approved-activity,
.approved-activity > span:last-child {
  min-width: 0;
}

.approved-progress-card,
.approved-continue-card,
.approved-model-card {
  min-height: 184px;
  padding: 18px;
}

.approved-card h2 {
  font-size: clamp(17px, 1.2vw, 21px);
  line-height: 1.24;
  overflow-wrap: normal;
}

.approved-progress-content {
  min-width: 0;
}

.approved-progress-details {
  min-width: 0;
}

.approved-area-grid {
  grid-template-columns: repeat(6, minmax(126px, 1fr));
}

.approved-area {
  overflow: hidden;
  align-content: start;
}

.approved-area h3 {
  max-width: 100%;
  min-width: 0;
  font-size: clamp(14px, 0.95vw, 17px);
  line-height: 1.16;
  hyphens: auto;
  overflow-wrap: break-word;
  word-break: normal;
}

.approved-area-progress-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  width: 100%;
  direction: ltr;
  unicode-bidi: isolate;
  text-align: left;
  white-space: nowrap;
}

.approved-area-progress-row span {
  display: inline;
  min-width: 0;
}

.approved-area-progress-row b {
  flex: 0 0 auto;
}

.approved-area .approved-line {
  width: 100%;
}

@media (max-width: 1366px) {
  .approved-dashboard-page {
    padding: 24px 28px 26px;
  }

  .approved-top-grid {
    gap: 16px;
  }
}

@media (max-width: 1180px) {
  .approved-dashboard-body {
    grid-template-columns: 240px minmax(0, 1fr);
  }

  html[dir="rtl"] .approved-dashboard-shell.is-arabic-ui .approved-dashboard-body {
    grid-template-columns: minmax(0, 1fr) 240px;
  }

  .approved-dashboard-page {
    max-width: calc(100vw - 240px);
  }

  .approved-welcome h1 {
    font-size: clamp(32px, 4vw, 38px);
  }
}

@media (max-width: 760px) {
  .approved-dashboard-body {
    display: block;
  }

  html[dir="rtl"] .approved-dashboard-shell.is-arabic-ui .approved-dashboard-page,
  html[dir="rtl"] .approved-dashboard-shell.is-arabic-ui .approved-sidebar {
    grid-column: auto;
    grid-row: auto;
  }

  .approved-dashboard-page {
    max-width: 100%;
  }

  .approved-welcome h1 {
    font-size: clamp(26px, 7vw, 32px);
    line-height: 1.16;
  }

  .approved-card h2 {
    font-size: 18px;
  }
}

/* B1 PDF library: isolated from the existing B2 training UI. */
.level-switch {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.level-switch button {
  min-width: 42px;
  min-height: 32px;
  padding: 5px 10px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}

.level-switch button.active {
  background: #151515;
  color: #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, 0.16);
}

.level-switch button:first-child.active {
  background: #d51420;
}

.level-switch button:focus-visible,
.b1-shell button:focus-visible,
.b1-shell a:focus-visible {
  outline: 3px solid #f7c600;
  outline-offset: 3px;
}

.b1-shell {
  min-height: 100vh;
  background: #f5f6f8;
  color: #151922;
}

.b1-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 12px clamp(18px, 4vw, 64px);
  border-bottom: 1px solid #dde1e7;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
}

.b1-brand {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  padding: 4px;
  border: 0;
  background: transparent;
  color: #111;
  font-size: 26px;
  font-weight: 900;
  letter-spacing: 0;
}

.b1-brand b {
  color: #d51420;
}

.b1-header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.b1-page,
.b1-reader-page {
  width: min(1440px, calc(100% - 32px));
  margin: 0 auto;
}

.b1-page {
  padding: 34px 0 56px;
}

.b1-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 26px 30px;
  border: 1px solid #e0e3e8;
  border-left: 6px solid #d51420;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 12px 28px rgba(17, 24, 39, 0.07);
}

html[dir="rtl"] .b1-hero {
  border-right: 6px solid #d51420;
  border-left-width: 1px;
}

.b1-hero h1 {
  margin: 5px 0 7px;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
}

.b1-hero p {
  margin: 0;
  color: #5f6672;
  font-size: 16px;
}

.b1-hero > strong {
  flex: 0 0 auto;
  padding: 13px 18px;
  border-radius: 7px;
  background: #f7c600;
  color: #161616;
  font-size: 18px;
}

.b1-category-tabs {
  display: flex;
  gap: 8px;
  margin: 24px 0 18px;
  padding-bottom: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.b1-category-tabs button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid #d8dde5;
  border-radius: 7px;
  background: #fff;
  color: #343b47;
  font-weight: 750;
}

.b1-category-tabs button small {
  display: grid;
  place-items: center;
  min-width: 24px;
  height: 24px;
  border-radius: 50%;
  background: #eceff3;
  color: #4d5664;
}

.b1-category-tabs button.active {
  border-color: #151515;
  background: #151515;
  color: #fff;
}

.b1-category-tabs button.active small {
  background: #f7c600;
  color: #151515;
}

.b1-topic-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.b1-topic-card {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) auto;
  align-items: center;
  gap: 13px;
  min-width: 0;
  padding: 16px;
  border: 1px solid #dde1e7;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(17, 24, 39, 0.05);
}

.b1-topic-number {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border: 2px solid #151515;
  border-radius: 50%;
  color: #d51420;
  font-size: 16px;
  font-weight: 900;
}

.b1-topic-copy {
  min-width: 0;
}

.b1-topic-copy small,
.b1-reader-toolbar small {
  color: #7a5300;
  font-weight: 800;
}

.b1-topic-copy h2 {
  margin: 4px 0;
  overflow: hidden;
  color: #172033;
  font-size: 16px;
  line-height: 1.25;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.b1-topic-copy span {
  color: #7b8491;
  font-size: 12px;
}

.b1-topic-card .primary {
  padding: 9px 13px;
  border-radius: 7px;
}

.b1-empty {
  grid-column: 1 / -1;
  padding: 32px;
  text-align: center;
}

.b1-reader-page {
  padding: 18px 0 30px;
}

.b1-reader-toolbar {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid #dde1e7;
  border-radius: 8px;
  background: #fff;
}

.b1-reader-toolbar h1 {
  margin: 2px 0 0;
  overflow: hidden;
  font-size: 21px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.b1-open-pdf {
  color: #9e1018;
  font-weight: 800;
  text-decoration: none;
}

.b1-pdf-viewer {
  display: block;
  width: 100%;
  height: calc(100vh - 174px);
  min-height: 620px;
  border: 1px solid #cfd5dd;
  border-radius: 8px;
  background: #fff;
}

@media (max-width: 1100px) {
  .b1-topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .b1-header {
    align-items: flex-start;
    padding: 10px 14px;
  }

  .b1-header-actions {
    align-items: flex-end;
    flex-direction: column;
    gap: 6px;
  }

  .b1-page,
  .b1-reader-page {
    width: min(100% - 20px, 1440px);
  }

  .b1-page {
    padding-top: 18px;
  }

  .b1-hero {
    align-items: flex-start;
    flex-direction: column;
    gap: 16px;
    padding: 20px;
  }

  .b1-hero h1 {
    font-size: 28px;
  }

  .b1-topic-grid {
    grid-template-columns: 1fr;
  }

  .b1-topic-card {
    grid-template-columns: 44px minmax(0, 1fr) auto;
    padding: 13px;
  }

  .b1-topic-number {
    width: 44px;
    height: 44px;
  }

  .b1-reader-toolbar {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .b1-reader-toolbar .b1-open-pdf {
    grid-column: 1 / -1;
  }

  .b1-pdf-viewer {
    height: calc(100vh - 222px);
    min-height: 520px;
  }

  .landing-actions {
    flex-wrap: wrap;
  }
}

/* B1 interactive exercises. All selectors remain isolated from B2. */
.b1-answer-counter {
  display: grid;
  place-items: center;
  min-width: 64px;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid #d9dee6;
  border-radius: 7px;
  background: #f7c600;
  color: #171717;
  font-weight: 900;
}

.b1-task-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 14px;
  padding: 14px 18px;
  border: 1px solid #dde1e7;
  border-left: 5px solid #d51420;
  border-radius: 8px;
  background: #fff;
  direction: ltr;
  text-align: left;
  unicode-bidi: isolate;
}

.b1-task-intro p {
  margin: 0;
  color: #3f4754;
  font-weight: 700;
}

.b1-result {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding: 9px 13px;
  border: 1px solid;
  border-radius: 7px;
}

.b1-result strong {
  font-size: 20px;
}

.b1-result.is-passed {
  border-color: #15803d;
  background: #ecfdf3;
  color: #166534;
}

.b1-result.is-failed {
  border-color: #dc2626;
  background: #fff1f2;
  color: #b91c1c;
}

.b1-exercise-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  direction: ltr;
  text-align: left;
  unicode-bidi: isolate;
}

.b1-exercise-layout.has-passage {
  grid-template-columns: minmax(320px, 0.92fr) minmax(420px, 1.08fr);
}

.b1-passage-pane,
.b1-questions-pane {
  min-width: 0;
  border: 1px solid #d8dde5;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 10px 26px rgba(17, 24, 39, 0.06);
}

.b1-passage-pane {
  position: sticky;
  top: 88px;
  max-height: calc(100vh - 108px);
  overflow-y: auto;
}

.b1-pane-heading {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 12px 16px;
  border-bottom: 1px solid #e1e5eb;
  background: #f7f8fa;
  color: #182236;
  font-weight: 900;
}

.b1-pane-heading span {
  display: inline-block;
  padding-left: 10px;
  border-left: 4px solid #d51420;
}

.b1-passage-copy {
  padding: 20px 22px;
  color: #222a37;
  font-size: 16px;
  line-height: 1.75;
}

.b1-passage-copy p {
  margin: 0 0 1.1em;
}

.b1-gap-marker {
  padding: 2px 7px;
  border-radius: 4px;
  background: #fff1a8;
  color: #9b1c1c;
  font-weight: 900;
}

.b1-question-list {
  display: grid;
  gap: 12px;
  padding: 14px;
}

.b1-question-card {
  min-width: 0;
  padding: 16px;
  border: 1px solid #dfe3e9;
  border-radius: 8px;
  background: #fff;
}

.b1-question-card.is-correct {
  border-color: #22a653;
  box-shadow: inset 4px 0 #22a653;
}

.b1-question-card.is-wrong,
.b1-question-card.is-unanswered {
  border-color: #e44646;
  box-shadow: inset 4px 0 #e44646;
}

.b1-question-card h2 {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0 0 13px;
  color: #1d2635;
  font-size: 16px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.b1-question-card h2 > span {
  display: grid;
  place-items: center;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: #151515;
  color: #fff;
  font-size: 13px;
}

.b1-question-group {
  display: block;
  margin-bottom: 7px;
  color: #a30f18;
  font-weight: 900;
}

.b1-answer-options {
  display: grid;
  gap: 8px;
}

.b1-answer-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #d9dee5;
  border-radius: 7px;
  background: #fafbfc;
  cursor: pointer;
  line-height: 1.45;
}

.b1-answer-option:hover {
  border-color: #aeb6c1;
  background: #fff;
}

.b1-answer-option:has(input:checked) {
  border-color: #151515;
  background: #fff8dc;
}

.b1-answer-option.is-correct {
  border-color: #15803d;
  background: #ecfdf3;
  color: #166534;
}

.b1-answer-option.is-wrong {
  border-color: #dc2626;
  background: #fff1f2;
  color: #b91c1c;
}

.b1-answer-option input {
  flex: 0 0 auto;
  margin-top: 4px;
  accent-color: #d51420;
}

.b1-answer-select {
  width: 100%;
  min-height: 46px;
  padding: 9px 36px 9px 12px;
  border: 1px solid #cfd5dd;
  border-radius: 7px;
  background: #fff;
  color: #1f2937;
  font: inherit;
}

.b1-answer-select.is-correct {
  border-color: #15803d;
  background: #ecfdf3;
  color: #166534;
}

.b1-answer-select.is-wrong,
.b1-answer-select.is-unanswered {
  border-color: #dc2626;
  background: #fff1f2;
  color: #991b1b;
}

.b1-correction {
  margin: 10px 0 0;
  padding: 9px 11px;
  border-radius: 6px;
  font-weight: 800;
}

.b1-correction.is-correct {
  background: #dcfce7;
  color: #166534;
}

.b1-correction.is-wrong {
  background: #fee2e2;
  color: #991b1b;
}

.b1-exercise-actions {
  position: sticky;
  bottom: 0;
  z-index: 8;
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid #d8dde5;
  border-radius: 8px 8px 0 0;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 -8px 24px rgba(17, 24, 39, 0.08);
  backdrop-filter: blur(12px);
}

.b1-exercise-actions button {
  min-width: 130px;
}

@media (max-width: 980px) {
  .b1-exercise-layout.has-passage {
    grid-template-columns: 1fr;
  }

  .b1-passage-pane {
    position: static;
    max-height: none;
  }
}

@media (max-width: 620px) {
  .b1-reader-toolbar {
    grid-template-columns: auto minmax(0, 1fr) auto;
    gap: 8px;
    padding: 10px;
  }

  .b1-reader-toolbar h1 {
    font-size: 16px;
  }

  .b1-answer-counter {
    min-width: 50px;
    min-height: 38px;
    padding: 6px 8px;
  }

  .b1-task-intro {
    align-items: stretch;
    flex-direction: column;
    gap: 10px;
  }

  .b1-result {
    justify-content: center;
  }

  .b1-passage-copy {
    padding: 16px;
    font-size: 15px;
  }

  .b1-question-list {
    padding: 9px;
  }

  .b1-question-card {
    padding: 13px;
  }

  .b1-exercise-actions {
    overflow-x: auto;
  }

  .b1-exercise-actions button {
    flex: 0 0 auto;
    min-width: 112px;
    padding-inline: 10px;
  }
}

/* B1 reuses the established B2 component system; only B1 data/state differ. */
.b1-shell {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
}

.b1-shell .b1-header {
  position: fixed;
  inset: 0 0 auto;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr) auto;
  gap: 12px;
  min-height: 70px;
  padding: 8px 20px 10px;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
}

.b1-shell .b1-brand {
  gap: 12px;
  padding: 0;
  color: var(--ink);
  font-size: inherit;
  letter-spacing: 0;
}

.b1-shell .b1-brand .brand-mark {
  color: var(--surface);
}

.b1-shell .b1-header-actions {
  align-items: center;
  flex-direction: row;
  gap: 8px;
}

.b1-overview {
  width: min(1220px, calc(100% - 40px));
  padding: 28px 0 48px;
}

.b1-shell .b1-hero {
  align-items: flex-end;
  gap: 24px;
  margin-bottom: 18px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 94%, transparent);
  box-shadow: var(--shadow);
}

html[dir="rtl"] .b1-shell .b1-hero {
  border: 1px solid var(--line);
}

.b1-shell .b1-hero h1 {
  margin: 6px 0;
  font-size: clamp(24px, 3vw, 34px);
}

.b1-shell .b1-hero p {
  color: var(--muted);
}

.b1-shell .b1-category-tabs {
  margin: 0 0 14px;
  padding: 8px;
  overflow-x: auto;
}

.b1-shell .b1-category-tabs .section-subtab {
  min-height: 32px;
  padding: 6px 10px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface-soft) 78%, var(--surface));
  color: var(--muted);
}

.b1-shell .b1-category-tabs .section-subtab.active {
  border-color: color-mix(in srgb, var(--blue) 30%, var(--line));
  background: var(--surface);
  color: var(--blue);
}

.b1-shell .b1-topic-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.b1-exam-workspace {
  grid-template-columns: minmax(0, 1fr) minmax(380px, 470px);
  direction: ltr;
}

.b1-shell .b1-passage-pane,
.b1-shell .b1-questions-pane {
  min-width: 0;
  min-height: 0;
  border: 0;
  border-radius: 0;
  background: var(--surface);
  box-shadow: none;
}

.b1-shell .b1-passage-pane {
  position: static;
  max-height: none;
  border-right: 1px solid var(--line);
  background: var(--bg);
}

.b1-shell .b1-passage-copy {
  padding: 0;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.68;
}

.b1-shell .b1-passage-copy p {
  margin: 0 0 1.1em;
}

.b1-shell .b1-question-list {
  display: grid;
  gap: 16px;
  padding: 0;
}

.b1-shell .b1-question-card {
  min-width: 0;
  padding: 18px 20px;
  border: 1px solid color-mix(in srgb, var(--line) 76%, var(--muted));
  border-radius: 8px;
  background: color-mix(in srgb, var(--blue-soft) 36%, var(--surface));
  box-shadow: none;
}

.b1-shell .b1-question-card.is-correct {
  border-color: color-mix(in srgb, var(--green) 45%, var(--line));
  box-shadow: none;
}

.b1-shell .b1-question-card.is-wrong,
.b1-shell .b1-question-card.is-unanswered {
  border-color: color-mix(in srgb, var(--red) 45%, var(--line));
  box-shadow: none;
}

.b1-shell .b1-question-card .teil2-question-text {
  display: block;
  margin: 0 0 12px;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.35;
}

.b1-shell .b1-question-card .teil2-question-text > span {
  display: inline;
  width: auto;
  height: auto;
  margin: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-size: inherit;
}

.b1-shell .b1-answer-options {
  display: grid;
  gap: 8px;
}

.b1-shell .b1-answer-option {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr);
  gap: 9px;
  align-items: start;
  width: 100%;
  padding: 2px 4px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  line-height: normal;
  text-align: left;
}

.b1-shell .b1-answer-option:hover {
  border-color: transparent;
  background: transparent;
  color: var(--blue);
}

.b1-shell .b1-answer-option.selected {
  border-color: transparent;
  background: transparent;
  color: var(--ink);
}

.b1-shell .b1-answer-option.correct {
  border-color: transparent;
  background: transparent;
  color: var(--green);
}

.b1-shell .b1-answer-option.wrong {
  border-color: transparent;
  background: transparent;
  color: var(--red);
}

.b1-shell .b1-correction {
  margin: 10px 0 0;
  border-radius: 8px;
}

.b1-shell .b1-exercise-actions {
  position: static;
  z-index: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 16px;
  margin: 0;
  padding: 11px 28px;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  box-shadow: none;
  backdrop-filter: blur(16px);
}

.b1-shell .b1-exercise-actions button {
  min-width: 0;
}

@media (max-width: 1100px) {
  .b1-shell .b1-topic-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 920px) {
  .b1-shell {
    padding-top: 0;
  }

  .b1-shell .b1-header {
    position: sticky;
    grid-template-columns: minmax(210px, max-content) 1fr;
    min-height: 104px;
  }

  .b1-shell .main-nav-wrap {
    grid-column: 1 / -1;
    justify-items: stretch;
  }

  .b1-shell .main-nav {
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .b1-shell .b1-header-actions {
    grid-column: 2;
    justify-content: flex-end;
  }
}

@media (max-width: 900px) {
  .b1-shell .b1-topic-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .b1-exam-workspace {
    grid-template-columns: 1fr;
  }

  .b1-shell .b1-passage-pane {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }
}

@media (max-width: 720px) {
  .b1-shell .b1-header {
    position: sticky;
    grid-template-columns: 1fr auto;
    min-height: 0;
    align-items: center;
    padding: 8px 12px 10px;
  }

  .b1-shell .main-nav-wrap {
    grid-column: 1 / -1;
  }

  .b1-shell .b1-header-actions {
    grid-column: 2;
    align-items: center;
    flex-direction: row;
  }

  .b1-overview {
    width: min(100% - 20px, 1220px);
  }

  .b1-shell .b1-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .b1-shell .b1-topic-grid {
    grid-template-columns: 1fr;
  }

  .b1-shell .b1-exercise-actions {
    grid-template-columns: 1fr;
    gap: 8px;
    overflow-x: visible;
    padding: 10px 12px;
  }

  .b1-shell .b1-exercise-actions .footer-left,
  .b1-shell .b1-exercise-actions .footer-right {
    justify-content: center;
  }

  .b1-shell .b1-exercise-actions button {
    flex: 1 1 auto;
    min-width: 0;
  }
}

@media (max-width: 430px) {
  .b1-shell .b1-header-actions {
    grid-column: 1 / -1;
    justify-content: flex-start;
    flex-wrap: wrap;
  }
}

/* B1 exercise parity: use the same visual grammar as the corresponding B2 Teil. */
.b1-reader-shell .exam-workspace,
.b1-reader-shell .lesen-teil3-workspace,
.b1-reader-shell .sprachb2-workspace {
  direction: ltr;
}

.b1-reader-shell .text-pane,
.b1-reader-shell .answer-pane,
.b1-reader-shell .task-copy,
.b1-reader-shell .passage-card,
.b1-reader-shell .teil2-question-card,
.b1-reader-shell .question-row,
.b1-reader-shell .heading-option,
.b1-reader-shell .teil3-situation-card,
.b1-reader-shell .word-bank-option,
.b1-reader-shell .sprachb2-summary-item {
  direction: ltr;
  unicode-bidi: isolate;
  text-align: left;
}

.b1-reader-shell [data-b1-select-question] {
  cursor: pointer;
}

.b1-reader-shell .passage-card.b1-active-match {
  border-color: color-mix(in srgb, var(--blue) 56%, var(--line));
  box-shadow: var(--focus-ring);
}

.b1-reader-shell .b1-active-match .drop-zone,
.b1-reader-shell .word-blank.b1-active-gap,
.b1-reader-shell .sprachb2-summary-item.b1-active-gap {
  border-color: var(--blue);
  background: var(--blue-soft);
  color: var(--blue);
  box-shadow: var(--focus-ring);
}

.b1-reader-shell button.word-blank {
  appearance: none;
  font: inherit;
  vertical-align: middle;
}

.b1-reader-shell .teil3-situation-card {
  grid-template-columns: auto auto minmax(0, 1fr);
}

.b1-reader-shell .teil3-situation-card > strong {
  align-self: start;
}

.b1-reader-shell .solution-box strong,
.b1-reader-shell .drop-zone strong,
.b1-reader-shell .heading-option strong {
  overflow-wrap: anywhere;
}

@media (max-width: 900px) {
  .b1-reader-shell .exam-main {
    height: auto;
    min-height: calc(100dvh - 70px);
    overflow: visible;
  }

  .b1-reader-shell .text-pane,
  .b1-reader-shell .answer-pane {
    overflow: visible;
  }
}
