/* Schriften lokal ausgeliefert (Fontshare / ITF Free Font License) – keine Verbindung zu Dritten. */
@font-face {
  font-family: "General Sans";
  src: url("../fonts/general-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "General Sans";
  src: url("../fonts/general-sans-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "General Sans";
  src: url("../fonts/general-sans-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("../fonts/satoshi-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("../fonts/satoshi-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Satoshi";
  src: url("../fonts/satoshi-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --brand: #2b4c7e;
  --brand-deep: #223e69;
  --brand-soft: #e3edf5;
  --brand-mid: #3e6ca8;
  --accent: #1f6f5f;
  --accent-soft: #e0f0ec;
  --accent-deep: #175346;
  --ink: #182230;
  --ink-soft: #3c4a5e;
  --muted: #57667c;
  --paper: #f4f6fa;
  --paper-2: #e8edf4;
  --surface: #ffffff;
  --ok: #1f6b45;
  --ok-soft: #e6f5ec;
  --warn: #9a4b16;
  --warn-soft: #f8efe6;
  --error: #a12622;
  --error-soft: #fceceb;
  --info: #17496a;
  --info-soft: #e7f0f6;
  --line: rgba(24, 34, 48, 0.14);
  --shadow: 0 18px 48px rgba(21, 36, 54, 0.14);
  --shadow-soft: 0 8px 24px rgba(21, 36, 54, 0.08);
  --radius: 16px;
  --radius-sm: 10px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --header-h: 76px;
  --max: 1160px;
  --touch: 48px;
  --focus: #1f628c;
  --focus-ring: 0 0 0 3px #fff, 0 0 0 6px rgba(31, 98, 140, 0.55);
  --font-display: "General Sans", "Satoshi", "Segoe UI", sans-serif;
  --font-body: "Satoshi", "Manrope", "Segoe UI", sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.55;
  min-height: 100vh;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

body.audiemus-app {
  margin: 0;
}

img,
svg,
video {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

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

button {
  cursor: pointer;
  border: none;
  background: none;
}

:focus {
  outline: none;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  box-shadow: var(--focus-ring);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -100px;
  z-index: 200;
  background: var(--brand-deep);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-sm);
  min-height: var(--touch);
  display: inline-flex;
  align-items: center;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(245, 247, 251, 0.92);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
}

.site-header.is-solid,
.site-header.is-scrolled {
  border-bottom-color: var(--line);
}

.header-inner {
  max-width: var(--max);
  margin: 0 auto;
  min-height: var(--header-h);
  padding: 0.75rem 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  min-height: var(--touch);
  min-width: 0;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.logo-img {
  width: auto;
  height: 50px;
  object-fit: contain;
}

.logo-text {
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--brand-deep);
  line-height: 1.15;
  min-width: 0;
}

.logo-text span {
  display: block;
  font-family: var(--font-body);
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.app-nav-link {
  display: inline-flex;
  align-items: center;
  min-height: var(--touch);
  padding: 0.55rem 0.85rem;
  border-radius: 12px;
  font-weight: 700;
  color: var(--ink-soft);
  white-space: nowrap;
  transition: color 180ms var(--ease), background 180ms var(--ease);
}

.app-nav-link:hover {
  color: var(--brand-deep);
  background: var(--brand-soft);
}

.app-nav-link.is-current {
  color: var(--brand-deep);
  background: var(--brand-soft);
}

.account-menu {
  position: relative;
}

.account-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-height: var(--touch);
  padding: 0.35rem 0.7rem 0.35rem 0.35rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--brand-deep);
  transition: background 180ms var(--ease), border-color 180ms var(--ease), box-shadow 180ms var(--ease);
}

.account-chip:hover,
.account-chip[aria-expanded="true"] {
  background: var(--brand-soft);
  border-color: rgba(43, 76, 126, 0.22);
}

.account-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 999px;
  background: linear-gradient(145deg, var(--brand-mid), var(--brand-deep));
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  flex-shrink: 0;
}

.account-chip-text {
  display: grid;
  line-height: 1.15;
  text-align: left;
  min-width: 0;
}

.account-chip-kicker {
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

.account-chip-name {
  font-size: 0.88rem;
  font-weight: 700;
  max-width: 9.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-chip-caret {
  width: 1rem;
  height: 1rem;
  color: var(--muted);
  flex-shrink: 0;
  transition: transform 180ms var(--ease);
}

.account-chip[aria-expanded="true"] .account-chip-caret {
  transform: rotate(180deg);
}

.account-panel {
  position: absolute;
  top: calc(100% + 0.45rem);
  right: 0;
  z-index: 50;
  width: min(18.5rem, calc(100vw - 2rem));
  padding: 0.55rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
}

.account-panel-meta {
  display: grid;
  gap: 0.1rem;
  padding: 0.65rem 0.75rem 0.75rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid var(--line);
}

.account-panel-meta strong {
  color: var(--ink);
  font-size: 0.95rem;
}

.account-panel-meta span {
  color: var(--muted);
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-panel-item {
  display: grid;
  gap: 0.12rem;
  width: 100%;
  text-align: left;
  min-height: var(--touch);
  padding: 0.7rem 0.75rem;
  border-radius: 12px;
  color: var(--ink);
  font-weight: 700;
}

.account-panel-item:hover,
.account-panel-item:focus-visible {
  background: var(--brand-soft);
}

.account-panel-item-hint {
  font-size: 0.78rem;
  font-weight: 500;
  color: var(--muted);
}

.account-panel-item--muted {
  color: var(--ink-soft);
  font-weight: 600;
}

.app-dialog {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: none;
  place-items: center;
  padding: 1.25rem;
}

.app-dialog.is-open {
  display: grid;
}

.app-dialog-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(24, 34, 48, 0.46);
}

.app-dialog-card {
  position: relative;
  z-index: 1;
  width: min(32rem, 100%);
  max-height: min(90vh, 40rem);
  overflow: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  padding: 1.5rem 1.6rem 1.4rem;
}

.app-dialog-card .lead {
  color: var(--ink-soft);
  margin-bottom: 1.1rem;
}

.app-dialog-card h2 {
  font-family: var(--font-display);
  font-size: 1.55rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 0.4rem;
}

.app-dialog-card h3 {
  font-size: 1rem;
  margin-bottom: 0.35rem;
}

.app-dialog-close {
  position: absolute;
  top: 0.85rem;
  right: 0.85rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  color: var(--ink-soft);
}

.app-dialog-close:hover {
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.app-dialog-close svg {
  width: 1.1rem;
  height: 1.1rem;
}

.training-data-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.85rem;
  margin-bottom: 1.15rem;
  padding: 0.95rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: linear-gradient(180deg, #fff, var(--brand-soft));
  min-height: var(--touch);
}

.training-data-link:hover {
  border-color: rgba(43, 76, 126, 0.28);
}

.training-data-link strong {
  display: block;
  color: var(--brand-deep);
}

.training-data-link span span {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 500;
}

.training-data-link svg {
  width: 1.15rem;
  height: 1.15rem;
  color: var(--brand);
  flex-shrink: 0;
}

.training-data-revoke {
  padding: 1.15rem 0 0.15rem;
  border-top: 1px solid var(--line);
}

.training-data-revoke p {
  color: var(--ink-soft);
  font-size: 0.92rem;
  margin-bottom: 0.9rem;
}

.training-data-revoke a {
  color: var(--brand);
  text-decoration: underline;
  text-underline-offset: 2px;
}

body.app-dialog-open {
  overflow: hidden;
}

.nav-links {
  display: none;
  list-style: none;
  gap: 0.25rem;
  align-items: center;
}

.nav-links a {
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 600;
  min-height: var(--touch);
  padding: 0.65rem 0.85rem;
  display: inline-flex;
  align-items: center;
  border-radius: var(--radius-sm);
  transition: color 180ms var(--ease), background 180ms var(--ease);
}

.nav-links a:hover {
  color: var(--brand-deep);
  background: var(--brand-soft);
}

.nav-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: var(--touch);
  min-height: var(--touch);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--brand-deep);
}

.nav-toggle[aria-expanded="true"] {
  background: var(--brand-soft);
}

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
  padding: 0.75rem 1.25rem 1rem;
}

.mobile-nav.is-open {
  display: grid;
  gap: 0.35rem;
}

.mobile-nav a {
  min-height: var(--touch);
  display: flex;
  align-items: center;
  padding: 0.65rem 0.75rem;
  border-radius: var(--radius-sm);
  font-weight: 600;
  color: var(--ink-soft);
}

.mobile-nav a:hover {
  background: var(--brand-soft);
  color: var(--brand-deep);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: var(--touch);
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: 1px solid transparent;
  transition:
    transform 180ms var(--ease),
    background 180ms var(--ease),
    color 180ms var(--ease),
    border-color 180ms var(--ease),
    box-shadow 180ms var(--ease);
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--brand);
  color: #fff;
  box-shadow: 0 10px 24px rgba(53, 92, 157, 0.24);
}

.btn-primary:hover {
  background: var(--brand-deep);
}

.btn-secondary {
  background: var(--surface);
  color: var(--brand-deep);
  border-color: var(--line);
}

.btn-secondary:hover {
  background: var(--brand-soft);
}

.btn-accent {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 10px 24px rgba(31, 111, 95, 0.24);
}

.btn-accent:hover {
  background: var(--accent-deep);
}

.btn-ghost {
  color: var(--brand-deep);
  padding-inline: 0.85rem;
}

.btn-ghost:hover {
  background: var(--brand-soft);
}

.btn-danger {
  background: var(--error-soft);
  color: var(--error);
  border-color: rgba(161, 38, 34, 0.28);
}

.btn-danger:hover {
  background: var(--error);
  color: #fff;
  border-color: var(--error);
}

.btn-block {
  width: 100%;
}

.btn:disabled,
.btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.section {
  padding: 4.75rem 1.25rem;
}

.section-inner {
  max-width: var(--max);
  margin: 0 auto;
}

.section-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.85rem;
}

.section-kicker::before {
  content: "";
  width: 28px;
  height: 2px;
  border-radius: 999px;
  background: var(--brand);
}

.section-title,
.page-title,
.hero h1 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--ink);
}

.section-title {
  font-size: clamp(1.85rem, 4vw, 2.65rem);
  margin-bottom: 0.75rem;
}

.section-lead,
.hero-lead {
  color: var(--ink-soft);
  font-size: 1.08rem;
  max-width: 40rem;
}

.section-lead {
  margin-bottom: 2rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--brand);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 0.9rem;
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 2px;
  border-radius: 999px;
  background: var(--brand);
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2.25rem 1.25rem 2.75rem;
  color: var(--muted);
  font-size: 0.92rem;
  background: #eef2f8;
}

.footer-inner {
  max-width: var(--max);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
}

.footer-inner a {
  color: var(--brand-deep);
  font-weight: 600;
  min-height: var(--touch);
  display: inline-flex;
  align-items: center;
}

.footer-inner a:hover {
  text-decoration: underline;
}

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-rows: auto 1fr;
}

.app-main {
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
  padding: 1.5rem 1.25rem 3rem;
}

.app-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow-soft);
  padding: 1.5rem;
  animation: riseIn 500ms var(--ease) both;
}

.app-panel h1 {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2.2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin-bottom: 0.4rem;
}

.app-panel .lead {
  color: var(--ink-soft);
  margin-bottom: 1.4rem;
}

.form-stack {
  display: grid;
  gap: 0.95rem;
}

label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--ink-soft);
}

input:not([type='checkbox']):not([type='radio']),
select,
textarea {
  width: 100%;
  min-height: var(--touch);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 0.75rem 0.95rem;
  background: #fff;
  color: var(--ink);
  transition: border-color 160ms var(--ease), box-shadow 160ms var(--ease);
}

textarea {
  min-height: 110px;
  resize: vertical;
}

input[type='checkbox'],
input[type='radio'] {
  width: 1.05rem;
  height: 1.05rem;
  min-height: 0;
  margin: 0;
  padding: 0;
  border-radius: 0.2rem;
  accent-color: var(--brand);
  flex: 0 0 auto;
}

input:not([type='checkbox']):not([type='radio']):focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: none;
  border-color: rgba(53, 92, 157, 0.65);
  box-shadow: 0 0 0 4px rgba(53, 92, 157, 0.16);
}

.form-hint,
.form-error,
.form-ok {
  font-size: 0.88rem;
}

.form-hint {
  color: var(--muted);
}

.form-error {
  color: var(--error);
}

.form-ok {
  color: var(--ok);
}

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1.25rem;
  background:
    radial-gradient(ellipse 60% 40% at 18% 18%, rgba(43, 76, 126, 0.12), transparent 55%),
    radial-gradient(ellipse 50% 40% at 90% 82%, rgba(31, 98, 140, 0.1), transparent 50%),
    linear-gradient(180deg, #eef2f8, var(--paper));
}

.auth-card {
  width: min(100%, 440px);
}

.auth-card--wide {
  width: min(100%, 560px);
}

.checkbox-label--legal {
  align-items: flex-start;
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.45;
  color: var(--ink-soft);
}

.consent-copy {
  margin: 0 0 1.25rem;
  font-size: 0.92rem;
  line-height: 1.5;
  color: var(--ink-soft);
}

.consent-copy p,
.consent-copy ul {
  margin: 0 0 0.85rem;
}

.consent-copy ul {
  padding-left: 1.15rem;
}

.password-label-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.password-generate {
  appearance: none;
  border: 0;
  background: none;
  padding: 0;
  margin: 0;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--brand);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.password-generate:hover {
  color: var(--brand-deep, #2b4c7e);
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  width: 100%;
  padding-right: 2.85rem;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 0.35rem;
  transform: translateY(-50%);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.25rem;
  height: 2.25rem;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
}

.password-toggle:hover,
.password-toggle[aria-pressed='true'] {
  color: var(--ink-soft);
}

.password-toggle:focus-visible {
  outline: 2px solid rgba(53, 92, 157, 0.55);
  outline-offset: 1px;
}

.password-reqs {
  list-style: none;
  margin: 0.15rem 0 0;
  padding: 0;
  display: grid;
  gap: 0.2rem;
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--muted);
}

.password-reqs li {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.password-reqs li::before {
  content: '';
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.45;
  flex: 0 0 auto;
}

.password-reqs li.is-met {
  color: var(--ok);
}

.password-reqs li.is-met::before {
  content: '✓';
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  opacity: 1;
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
}

.password-reqs li.is-missing {
  color: var(--muted);
}

.password-client-error:not([hidden]) {
  margin: 0.15rem 0 0;
}

.checkbox-label {
  grid-template-columns: 22px minmax(0, 1fr);
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
}

.checkbox-label input {
  width: 20px;
  min-height: 20px;
  margin: 0;
}

.training-prep {
  display: grid;
  gap: 1.15rem;
  margin-bottom: 1.5rem;
  padding: 1.25rem;
  border: 1px solid rgba(31, 98, 140, 0.2);
  border-radius: 16px;
  background: var(--info-soft);
}

.prep-heading {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.prep-heading .eyebrow {
  margin-bottom: 0.2rem;
}

.prep-heading h2 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  color: var(--ink);
}

.prep-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 13px;
  background: #fff;
  color: var(--brand-deep);
}

.prep-icon svg {
  width: 25px;
  height: 25px;
}

.prep-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.8rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.prep-list li {
  display: grid;
  gap: 0.25rem;
  padding: 0.85rem;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.72);
}

.prep-list strong {
  color: var(--ink);
  font-size: 0.9rem;
}

.prep-list span,
.phase-note {
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.phase-note {
  margin: 0;
}

.module-list {
  display: grid;
  gap: 0.75rem;
}

.module-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 0.9rem;
  align-items: center;
  min-height: var(--touch);
  padding: 1rem 1.05rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: #fbfcfe;
  transition: transform 160ms var(--ease), border-color 160ms var(--ease), background 160ms var(--ease);
}

a.module-item:hover {
  transform: translateY(-1px);
  border-color: rgba(53, 92, 157, 0.35);
  background: var(--brand-soft);
}

.module-item.is-locked {
  opacity: 0.55;
}

.module-item.is-locked:hover {
  transform: none;
  background: #fbfcfe;
}

.module-card {
  grid-template-columns: auto minmax(0, 1fr) auto;
}

.module-content {
  min-width: 0;
}

.module-phase {
  margin-bottom: 0.25rem;
  color: var(--brand-deep) !important;
  font-size: 0.72rem !important;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.module-actions {
  grid-column: 2 / -1;
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--line);
}

.module-actions .btn {
  min-height: 42px;
}

.module-index {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-weight: 700;
}

.module-item h3 {
  font-size: 1rem;
  margin-bottom: 0.15rem;
  color: var(--ink);
}

.module-item p {
  font-size: 0.88rem;
  color: var(--muted);
}

.status-tag {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0.25rem 0.7rem;
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  background: var(--paper-2);
  color: var(--ink-soft);
}

.status-tag.is-ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.status-tag.is-active {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.status-tag.has-tooltip {
  cursor: help;
  border-bottom: 1px dotted currentColor;
}

.status-tag.has-tooltip:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.status-tooltip {
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: calc(100% + 0.45rem);
  width: max-content;
  max-width: min(16rem, 70vw);
  padding: 0.55rem 0.7rem;
  border-radius: 8px;
  background: var(--ink);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0;
  line-height: 1.35;
  text-align: left;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.18);
  transform: translateX(-50%) translateY(4px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 140ms var(--ease), transform 140ms var(--ease), visibility 140ms;
}

.status-tooltip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  margin-left: -5px;
  border: 5px solid transparent;
  border-top-color: var(--ink);
}

.status-tag.has-tooltip:hover .status-tooltip,
.status-tag.has-tooltip:focus-visible .status-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.test-shortcut-note {
  color: var(--accent-deep) !important;
}

.test-shortcut-actions {
  margin-top: 0.15rem;
}

.test-mode-badge {
  background: var(--accent);
  color: #fff;
}

.progress-mini {
  display: grid;
  gap: 0.55rem;
}

.progress-mini strong {
  font-size: 0.92rem;
}

.progress-track {
  height: 10px;
  border-radius: 999px;
  background: var(--paper-2);
  overflow: hidden;
}

.progress-fill {
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-deep), var(--brand-mid));
  transition: width 400ms var(--ease);
}

.player-box {
  background:
    radial-gradient(circle at 85% 20%, rgba(108, 198, 177, 0.14), transparent 42%),
    linear-gradient(160deg, #152436, #1c3350 55%, #27476f);
  color: #fff;
  border-radius: 18px;
  padding: 1.2rem;
  margin-bottom: 1.25rem;
}

.player-box h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin-bottom: 0.35rem;
}

.player-box p {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.95rem;
  margin-bottom: 1rem;
}

.player-box video,
.player-box audio {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  background: transparent;
}

.player-media {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.28);
}

.player-media video {
  position: absolute;
  inset: 0;
  display: block;
  object-fit: contain;
}

#answerForm {
  min-height: 11.5rem;
}

/* Info- und Abschlussschritte haben kein Formular: reservierte Höhe entfällt */
#answerForm:empty {
  min-height: 0;
}

#feedback:not([hidden]) {
  min-height: 4.5rem;
}

.choice-grid {
  display: grid;
  gap: 0.65rem;
}

.choice-grid-compact {
  grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr));
}

.multi-item-list {
  display: grid;
  gap: 1rem;
}

.multi-item-choice {
  display: grid;
  gap: 0.55rem;
  padding: 0.85rem 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.65);
}

.multi-item-label {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--ink);
}

#feedback {
  white-space: pre-wrap;
}

.choice {
  text-align: left;
  min-height: var(--touch);
  padding: 0.95rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  transition: border-color 160ms var(--ease), background 160ms var(--ease), box-shadow 160ms var(--ease);
}

.choice:hover:not(:disabled) {
  border-color: rgba(53, 92, 157, 0.4);
  background: var(--brand-soft);
}

.choice.is-selected {
  border-color: var(--brand);
  background: var(--brand-soft);
  box-shadow: inset 0 0 0 1px rgba(53, 92, 157, 0.22);
}

.choice.is-correct {
  border-color: var(--ok);
  background: var(--ok-soft);
  color: var(--ok);
}

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

.choice:disabled {
  cursor: default;
}

.time-inputs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

.prompt-panel {
  margin: 0 0 1rem;
}

.morse-ref {
  margin: 0 0 0.35rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.72);
}

.morse-ref summary {
  cursor: pointer;
  padding: 0.85rem 1.05rem;
  color: var(--brand-deep);
  font-weight: 700;
}

.morse-ref[open] summary {
  border-bottom: 1px solid var(--line);
}

.morse-ref-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(148px, 1fr));
  gap: 0.55rem 0.75rem;
  padding: 0.9rem 1.05rem 1.05rem;
}

.morse-ref-item {
  display: grid;
  grid-template-columns: 1.7rem minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 0.45rem;
  align-items: baseline;
}

.morse-ref-item strong {
  grid-row: 1 / span 2;
  color: var(--brand-deep);
  font-size: 1.05rem;
}

.morse-ref-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.morse-ref-words {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.3;
}

.cloze-template {
  margin: 0 0 0.75rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font: inherit;
  font-size: 0.95rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-x: auto;
}

.cloze-exercise {
  display: grid;
  gap: 0.9rem;
}

.cloze-time-inputs {
  margin-bottom: 0.15rem;
}

.cloze-text {
  margin: 0;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.72);
  color: var(--ink);
  font: inherit;
  font-size: 0.98rem;
  line-height: 2.05;
  white-space: pre-wrap;
  overflow-x: auto;
}

.cloze-blank {
  display: inline-block;
  width: 8ch;
  max-width: 100%;
  margin: 0 0.12rem;
  padding: 0.12rem 0.35rem;
  border: 0;
  border-bottom: 2px solid var(--ink-soft, #5c6570);
  border-radius: 4px 4px 0 0;
  background: rgba(20, 40, 60, 0.05);
  color: inherit;
  font: inherit;
  font-weight: 500;
  line-height: 1.3;
  vertical-align: baseline;
  text-overflow: clip;
}

/* Off-screen ruler that measures the typed word for the input width. */
.cloze-ruler {
  position: absolute;
  top: -9999px;
  left: -9999px;
  visibility: hidden;
  white-space: pre;
  pointer-events: none;
}

.cloze-blank:focus {
  outline: none;
  border-bottom-color: var(--accent, #1f6b5a);
  background: rgba(31, 107, 90, 0.08);
}

.cloze-blank:disabled {
  opacity: 1;
  cursor: default;
}

.cloze-blank.is-correct {
  border-bottom-color: #1f7a45;
  background: rgba(31, 122, 69, 0.12);
}

.cloze-blank.is-wrong {
  border-bottom-color: #b42318;
  background: rgba(180, 35, 24, 0.1);
}

.text-answer label,
.qa-item {
  display: grid;
  gap: 0.45rem;
}

.qa-list {
  display: grid;
  gap: 0.9rem;
}

.qa-item span {
  font-weight: 600;
}

.feedback {
  margin-top: 1rem;
  padding: 1rem 1.1rem;
  border-radius: 14px;
  background: var(--ok-soft);
  color: var(--ok);
  border: 1px solid rgba(31, 107, 69, 0.18);
  animation: riseIn 320ms var(--ease) both;
}

.feedback.is-wrong {
  background: var(--error-soft);
  color: var(--error);
  border-color: rgba(161, 38, 34, 0.18);
}

.feedback.is-soft {
  background: var(--info-soft);
  color: var(--info);
  border-color: rgba(31, 98, 140, 0.2);
}

.feedback strong {
  display: block;
  margin-bottom: 0.25rem;
  font-size: 1rem;
}

.toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1rem;
}

.progress-card {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
  padding: 1rem 1.15rem;
  border-radius: 16px;
  background: #f2f5f9;
}

.progress-ring {
  width: 68px;
  height: 68px;
  display: grid;
  place-items: center;
  position: relative;
  border-radius: 50%;
  background: conic-gradient(
    var(--info) 0 calc(var(--progress, 0) * 1%),
    #d3e0ea calc(var(--progress, 0) * 1%) 100%
  );
}

.progress-ring::after {
  content: "";
  position: absolute;
  inset: 6px;
  border-radius: inherit;
  background: var(--surface);
}

.progress-ring span {
  position: relative;
  z-index: 1;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 700;
}

.progress-card > div:last-child {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.progress-card p {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.progress-card strong {
  color: var(--ink);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.25;
}

.progress-card > div:last-child span {
  color: var(--muted);
  font-size: 0.84rem;
}

/* Landing-mock styles kept for the marketing preview only. */
.next-card {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr) 42px;
  gap: 0.9rem;
  align-items: center;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(24, 34, 48, 0.2);
  border-radius: 16px;
  background: var(--surface);
}

.next-card p {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.next-card strong {
  color: var(--ink);
  font-size: 0.98rem;
  font-weight: 700;
}

.next-card > div:nth-child(2) {
  display: grid;
  gap: 0.12rem;
  min-width: 0;
}

.next-card > div:nth-child(2) span {
  color: var(--muted);
  font-size: 0.84rem;
}

.audio-symbol {
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border-radius: 13px;
  background: var(--brand-deep);
}

.audio-symbol i {
  width: 2.5px;
  border-radius: 999px;
  background: #fff;
}

.audio-symbol i:nth-child(1),
.audio-symbol i:nth-child(5) {
  height: 10px;
}

.audio-symbol i:nth-child(2),
.audio-symbol i:nth-child(4) {
  height: 19px;
}

.audio-symbol i:nth-child(3) {
  height: 28px;
}

.next-arrow {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--info);
}

.next-arrow svg {
  width: 18px;
  height: 18px;
}

.player-box.is-empty h2,
.player-box.is-empty > p {
  visibility: hidden;
}

.player-box.is-empty .player-media {
  background: rgba(0, 0, 0, 0.18);
}

@media (max-width: 520px) {
  .progress-card {
    grid-template-columns: 60px minmax(0, 1fr);
    gap: 0.8rem;
    padding: 0.9rem 1rem;
  }

  .progress-ring {
    width: 58px;
    height: 58px;
  }

  .progress-ring span {
    font-size: 0.78rem;
  }
}

.module-context {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  margin-bottom: 1rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(31, 98, 140, 0.18);
  border-radius: 14px;
  background: var(--info-soft);
}

.module-context p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.phase-badge {
  flex: 0 0 auto;
  padding: 0.4rem 0.65rem;
  border-radius: 999px;
  background: #fff;
  color: var(--brand-deep);
  font-size: 0.75rem;
  font-weight: 700;
}

.completion-panel {
  border-color: rgba(31, 107, 69, 0.2);
  background:
    radial-gradient(circle at 95% 0%, rgba(31, 107, 69, 0.1), transparent 36%),
    #fff;
}

.step-meta {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.table th,
.table td {
  text-align: left;
  padding: 0.85rem 0.4rem;
  border-bottom: 1px solid var(--line);
  min-height: var(--touch);
}

.table th {
  color: var(--muted);
  font-weight: 700;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.result-sheet {
  background: #fff;
  border-radius: 18px;
  border: 1px solid var(--line);
  padding: 1.5rem;
}

.result-sheet h2 {
  font-family: var(--font-display);
  color: var(--brand-deep);
  margin: 1.25rem 0 0.5rem;
}

.result-sheet ul {
  padding-left: 1.1rem;
  color: var(--ink-soft);
}

.result-sheet li + li {
  margin-top: 0.35rem;
}

.result-attempt {
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--line);
}

.result-attempt-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.2rem;
  margin-bottom: 1rem;
}

.result-attempt-header .eyebrow {
  margin-bottom: 0.35rem;
}

.result-attempt-header h2 {
  margin: 0 0 0.25rem;
}

.result-score {
  min-width: 155px;
  display: grid;
  gap: 0.1rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background: var(--brand-soft);
  text-align: center;
}

.result-score strong {
  color: var(--brand-deep);
  font-family: var(--font-display);
  font-size: 1.55rem;
  line-height: 1.1;
}

.result-score span {
  color: var(--ink-soft);
  font-size: 0.72rem;
}

.result-answer-list {
  display: grid;
  gap: 0.7rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.result-answer {
  margin: 0 !important;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-left: 4px solid var(--info);
  border-radius: 12px;
  background: #fff;
}

.result-answer.is-correct {
  border-left-color: var(--ok);
  background: var(--ok-soft);
}

.result-answer.is-incorrect {
  border-left-color: var(--error);
  background: var(--error-soft);
}

.result-answer-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.result-answer-heading > strong {
  color: var(--ink);
}

.result-answer p {
  margin: 0.4rem 0 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.result-status {
  flex: 0 0 auto;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.8);
  color: var(--ink);
  font-size: 0.74rem;
  font-weight: 700;
}

.result-empty,
.result-repeat-note {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.25rem;
  padding: 1.15rem;
  border-radius: 14px;
  background: var(--paper-2);
}

.result-empty h2,
.result-empty p,
.result-repeat-note p {
  margin: 0;
}

.result-empty .btn,
.result-repeat-note .btn {
  justify-self: start;
}

.result-repeat-note {
  border: 1px solid rgba(31, 98, 140, 0.18);
  background: var(--info-soft);
}

.completion-banner {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
  padding: 1.25rem 1.35rem;
  border: 1px solid rgba(31, 111, 95, 0.22);
  border-radius: 16px;
  background: var(--accent-soft);
}

.completion-banner[hidden] {
  display: none;
}

.completion-banner h2 {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--accent-deep);
}

.completion-banner .lead {
  margin: 0;
}

.completion-banner .action-row {
  margin-top: 0.35rem;
}

.result-compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.result-compare-card {
  display: grid;
  gap: 0.2rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: inherit;
  text-decoration: none;
  min-width: 0;
  min-height: 108px;
  overflow: hidden;
}

.result-compare-card:hover,
.result-compare-card:focus-visible,
.result-compare-card.is-active {
  border-color: var(--brand-mid);
}

.result-compare-card.is-active {
  box-shadow: 0 0 0 1px var(--brand-mid);
}

.result-compare-index {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--muted);
}

.result-compare-card strong {
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.3;
  min-width: 0;
  overflow-wrap: break-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.result-compare-card em {
  font-style: normal;
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 700;
  color: var(--brand-deep);
  line-height: 1.1;
}

.result-compare-trend {
  color: var(--muted);
  font-size: 0.78rem;
}

.result-compare-delta {
  color: var(--muted);
  font-size: 0.72rem;
}

.result-compare-legend {
  color: var(--muted);
  font-size: 0.82rem;
  margin: -0.65rem 0 1.5rem;
}

.result-attempt-compare {
  margin: 0;
  padding: 0.75rem 0.9rem;
  border-radius: 12px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-size: 0.9rem;
}

.result-compare-card.is-up em,
.result-compare-card.is-up .result-compare-trend {
  color: var(--ok);
}

.result-compare-card.is-down em,
.result-compare-card.is-down .result-compare-trend {
  color: var(--error);
}

.result-compare-card.is-empty em {
  color: var(--muted);
}

.result-module-list {
  display: grid;
  gap: 0.75rem;
}

.result-module {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: #fff;
  overflow: hidden;
}

.result-module-summary {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.95rem 1.1rem;
  cursor: pointer;
  list-style: none;
  min-height: var(--touch);
}

.result-module-summary::-webkit-details-marker {
  display: none;
}

.result-module-summary > div {
  display: grid;
  gap: 0.15rem;
  min-width: 0;
}

.result-module-summary strong {
  color: var(--brand-deep);
  overflow-wrap: break-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.result-module[open] .result-module-summary {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
}

.result-module-body {
  display: grid;
  gap: 1rem;
  padding: 1rem 1.1rem 1.2rem;
}

.result-attempt-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.result-attempt-tab {
  min-height: 40px;
  padding: 0.4rem 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink-soft);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.result-attempt-tab.is-active {
  background: var(--brand-soft);
  border-color: transparent;
  color: var(--brand-deep);
}

.result-attempt-limit {
  margin: 0;
}

.result-module .result-attempt {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

/* Header CTAs live in the mobile menu below desktop widths to avoid overflow. */
@media (max-width: 1023px) {
  .nav > .header-cta,
  .nav > .btn-ghost.header-cta,
  .nav > .btn-primary.header-cta {
    display: none;
  }
}

@media (max-width: 767px) {
  .app-shell .nav > .form-hint,
  .account-chip-text {
    display: none;
  }

  .account-chip {
    padding: 0.3rem;
  }

  .account-chip-caret {
    display: none;
  }

  .app-nav-link {
    padding-inline: 0.65rem;
  }

  .logo-text {
    font-size: 1.05rem;
  }

  .logo-img {
    height: 36px;
  }

  .prep-list {
    grid-template-columns: minmax(0, 1fr);
  }

  .module-card {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .module-card > .status-tag {
    grid-column: 2;
    justify-self: start;
  }

  .module-actions {
    grid-column: 1 / -1;
  }

  .module-actions .btn {
    width: 100%;
  }

  .result-compare-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .completion-banner .action-row .btn {
    width: 100%;
  }

  .module-context,
  .result-attempt-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .result-score {
    width: 100%;
    text-align: left;
  }

  .result-answer-heading {
    flex-direction: column;
    gap: 0.5rem;
  }
}

@media (max-width: 520px) {
  .app-shell .header-inner {
    flex-wrap: wrap;
    gap: 0.45rem;
    padding: 0.65rem 0.75rem;
  }

  .app-shell .logo-img {
    height: 34px;
  }

  .app-shell .logo-text {
    font-size: 1rem;
  }

  .app-shell .nav {
    width: 100%;
    justify-content: flex-end;
    gap: 0.35rem;
    padding-top: 0.45rem;
    border-top: 1px solid var(--line);
  }

  .app-shell .nav .btn {
    min-height: 42px;
    padding: 0.6rem 0.8rem;
    font-size: 0.82rem;
  }
}

@media (min-width: 768px) {
  .nav-links {
    display: flex;
  }

  .app-panel {
    padding: 2rem;
  }

  .result-compare-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (min-width: 1024px) {
  .nav-toggle {
    display: none;
  }

  .mobile-nav,
  .mobile-nav.is-open {
    display: none;
  }

  .header-inner,
  .section-inner,
  .footer-inner {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
  }
}

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

@media print {
  .site-header,
  .no-print,
  .skip-link {
    display: none !important;
  }

  body {
    background: #fff;
  }

  .result-sheet {
    border: none;
    box-shadow: none;
  }
}

/* ------------------------------------------------------------------ */
/* Auth screens: secondary links below the card form.                  */
/* ------------------------------------------------------------------ */

.auth-links {
  margin: 1rem 0 0;
  font-size: 0.92rem;
}

.auth-links--muted {
  margin-top: 0.4rem;
  color: var(--muted);
}

.auth-links a {
  color: var(--brand);
  font-weight: 600;
  text-underline-offset: 3px;
}

.auth-links a:hover,
.auth-links a:focus-visible {
  color: var(--brand-deep);
  text-decoration: underline;
}

/* ------------------------------------------------------------------ */
/* Trainee UI: header, next step, module cards, result screen.         */
/* ------------------------------------------------------------------ */

.app-nav-logout {
  color: var(--brand-deep);
  text-decoration: underline;
  text-underline-offset: 4px;
}

.next-step {
  display: grid;
  gap: 0.65rem;
  margin-bottom: 1.5rem;
  padding: 1.25rem 1.35rem;
  border: 2px solid rgba(43, 76, 126, 0.24);
  border-radius: 16px;
  background: var(--brand-soft);
}

.next-step .eyebrow {
  margin-bottom: 0;
}

.next-step-text {
  color: var(--ink);
  font-size: 1.08rem;
  font-weight: 600;
}

.next-step.is-done {
  border-color: rgba(31, 111, 95, 0.26);
  background: var(--accent-soft);
}

.next-step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn-cta {
  min-height: 56px;
  padding: 0.9rem 1.5rem;
  font-size: 1.1rem;
  text-align: center;
}

.module-card {
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
}

.module-card h3 {
  font-size: 1.15rem;
  overflow-wrap: break-word;
  hyphens: auto;
  -webkit-hyphens: auto;
}

.module-card .module-content > p:last-child {
  font-size: 0.95rem;
}

.module-card.is-locked {
  opacity: 1;
  background: var(--paper);
}

.module-card.is-locked .module-index,
.module-card.is-locked h3 {
  opacity: 0.7;
}

.module-card.is-focus {
  border: 2px solid var(--brand);
  background: var(--surface);
  box-shadow: var(--shadow-soft);
}

.module-card .module-status {
  justify-content: flex-start;
  width: fit-content;
  max-width: 100%;
  min-height: 0;
  margin: 0.45rem 0 0.4rem;
  padding: 0.35rem 0.75rem;
  font-size: 0.95rem;
  line-height: 1.35;
  letter-spacing: 0;
  text-align: left;
  white-space: normal;
  background: var(--paper-2);
  color: var(--ink-soft);
}

.module-card .module-status.is-ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.module-card .module-status.is-active {
  background: var(--accent-soft);
  color: var(--accent-deep);
}

.module-card .module-status.is-warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.module-card .module-status.is-locked {
  background: var(--paper-2);
  color: var(--ink);
}

.module-card .module-hint {
  margin-bottom: 0.35rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
  font-weight: 600;
}

.module-card .module-actions {
  align-items: center;
}

.module-card .module-actions .btn {
  min-height: var(--touch);
}

.module-links,
.completion-links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem 1.35rem;
}

.completion-links {
  margin-top: 1rem;
}

.module-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.25rem 0.1rem;
  color: var(--brand-deep);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.module-link:hover,
.module-link:focus-visible {
  color: var(--brand);
}

.module-card .module-error,
.module-actions .form-error {
  flex: 1 1 100%;
  font-size: 0.95rem;
}

.inline-confirm {
  display: grid;
  flex: 1 1 100%;
  gap: 0.75rem;
  width: 100%;
  margin-top: 0.75rem;
  padding: 1rem 1.1rem;
  border: 2px solid rgba(154, 75, 22, 0.35);
  border-radius: 14px;
  background: var(--warn-soft);
}

.inline-confirm .inline-confirm-text {
  color: var(--ink);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.45;
}

.inline-confirm-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.inline-confirm .form-error {
  font-size: 0.95rem;
}

.completion-score {
  margin: 0.5rem 0 0.6rem;
  color: var(--ink);
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 4vw, 1.9rem);
  font-weight: 600;
  line-height: 1.2;
}

.completion-verdict {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  margin-bottom: 1rem;
  padding: 0.4rem 0.85rem;
  border-radius: 10px;
  font-size: 1.05rem;
  font-weight: 700;
}

.completion-verdict.is-ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.completion-verdict.is-warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.completion-panel .lead {
  margin-bottom: 0.5rem;
}

.completion-panel h1:focus {
  outline: none;
}

.completion-actions {
  margin-top: 1.1rem;
}

.progress-card .module-progress-title {
  color: var(--brand-deep);
  font-size: 0.95rem;
  letter-spacing: 0;
  text-transform: none;
}

.player-box .media-error {
  margin: 0.85rem 0 0;
  padding: 0.75rem 1rem;
  border-radius: 10px;
  background: var(--error-soft);
  color: var(--error);
  font-size: 1rem;
  font-weight: 700;
}

.cloze-user-answer {
  margin: 0 0.35rem 0 0.15rem;
  color: var(--error);
  font-size: 0.9em;
  font-weight: 600;
}

.pass-badge {
  display: inline-flex;
  justify-self: start;
  align-items: center;
  width: fit-content;
  padding: 0.2rem 0.6rem;
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 700;
  font-style: normal;
}

.pass-badge.is-ok {
  background: var(--ok-soft);
  color: var(--ok);
}

.pass-badge.is-warn {
  background: var(--warn-soft);
  color: var(--warn);
}

.result-module-summary .pass-badge {
  flex-shrink: 0;
  margin-left: auto;
}

.results-pdf-row {
  margin-top: 0.85rem;
}

/* Account details fold into the avatar before the header runs out of room. */
@media (max-width: 1023px) {
  .app-nav .account-chip-text,
  .app-nav .account-chip-caret {
    display: none;
  }

  .app-nav .account-chip {
    padding: 0.3rem;
  }
}

@media (max-width: 767px) {
  .module-card .module-actions .btn,
  .btn-cta,
  .inline-confirm-actions .btn {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .app-shell .app-nav {
    flex-wrap: wrap;
  }

  .app-nav .app-nav-link {
    padding-inline: 0.5rem;
  }
}

.password-tip {
  margin: 0.35rem 0 0;
  font-size: 0.88rem;
  color: var(--muted);
}

/* --------------------------------------------------------------------------
   Zwei-Faktor-Anmeldung (Login-Schritt und Kontoseite)
   -------------------------------------------------------------------------- */
.tf-setup {
  display: grid;
  grid-template-columns: 168px 1fr;
  gap: 1.25rem;
  align-items: center;
  margin: 1rem 0;
}
.tf-qr {
  width: 168px;
  aspect-ratio: 1;
  border: 1px solid var(--line, #d9e1ea);
  border-radius: 12px;
  background: #fff;
  padding: 6px;
}
.tf-qr--missing {
  aspect-ratio: auto;
  font-size: 0.85rem;
  line-height: 1.4;
  padding: 0.75rem;
  color: var(--ink-soft, #3c4a5e);
}
.tf-qr svg {
  display: block;
  width: 100%;
  height: 100%;
}
.tf-steps {
  margin: 0;
  padding-left: 1.2rem;
  display: grid;
  gap: 0.5rem;
  font-size: 0.95rem;
}
.tf-manual {
  margin: 0.25rem 0 1rem;
  font-size: 0.92rem;
}
.tf-manual summary {
  cursor: pointer;
  color: var(--brand, #2b4c7e);
  font-weight: 500;
}
.tf-manual p {
  margin: 0.5rem 0;
}
.tf-secret {
  display: inline-block;
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 1.05rem;
  letter-spacing: 0.06em;
  padding: 0.4rem 0.6rem;
  border-radius: 8px;
  background: var(--brand-soft, #e3edf5);
  word-break: break-all;
}
.tf-code-input {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 1.35rem;
  letter-spacing: 0.18em;
  max-width: 14rem;
}
.tf-codes {
  border: 1px solid var(--line, #d9e1ea);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin: 1rem 0;
  background: var(--surface-soft, #f7f9fb);
}
.tf-codes-title {
  margin: 0 0 0.6rem;
}
.tf-code-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.35rem 1.25rem;
}
.tf-code-list code {
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 1.02rem;
  letter-spacing: 0.04em;
}
.tf-code-actions {
  display: flex;
  gap: 0.5rem;
  margin: 0.9rem 0 0.4rem;
}
.tf-hint {
  margin: 0.4rem 0 0;
  font-size: 0.9rem;
  color: var(--ink-soft, #3c4a5e);
}
.tf-cancel {
  margin-top: 0.75rem;
  text-align: center;
}
@media (max-width: 520px) {
  .tf-setup {
    grid-template-columns: 1fr;
    justify-items: center;
  }
  .tf-code-list {
    grid-template-columns: 1fr;
  }
}
@media print {
  body.tf-print-codes * {
    visibility: hidden;
  }
  body.tf-print-codes [data-tf-codes],
  body.tf-print-codes [data-tf-codes] * {
    visibility: visible;
  }
  body.tf-print-codes [data-tf-codes] {
    position: absolute;
    inset: 0 auto auto 0;
    border: 0;
  }
  body.tf-print-codes .tf-code-actions {
    display: none;
  }
}

.form-note {
  margin: 0 0 1rem;
  padding: 0.7rem 0.9rem;
  border-radius: 10px;
  background: var(--brand-soft, #e3edf5);
  font-size: 0.95rem;
  line-height: 1.45;
}

/* Impressum / Datenschutzerklärung on every app screen (public pages have their own footer). */
.app-legal-footer {
  padding: 1.1rem 1rem 1.4rem;
  font-size: 0.85rem;
  text-align: center;
}

.app-legal-footer nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.35rem 1.25rem;
}

.app-legal-footer a {
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.app-legal-footer a:hover {
  color: var(--ink);
}

@media print {
  .app-legal-footer {
    display: none;
  }
}
