:root {
  --color-bg: #07111f;
  --color-bg-deep: #030914;
  --color-surface: #0d1b2a;
  --color-surface-elevated: #13253a;
  --color-surface-glass: rgba(23, 43, 66, .72);
  --color-border: #263b52;
  --color-border-strong: #7690ad;
  --color-text: #f5f8fc;
  --color-text-muted: #a9bacd;
  --color-text-subtle: #8298b0;
  --color-accent: #ff6a3d;
  --color-accent-hover: #ff835e;
  --color-on-accent: #111721;
  --color-info: #59d9ff;
  --color-success: #48e59b;
  --color-warning: #ffd166;
  --color-danger: #ff6b7a;
  --color-focus: #8de8ff;
  --color-overlay: rgba(2, 7, 17, .82);
  --font-display: Manrope, Inter, system-ui, sans-serif;
  --font-sans: Inter, system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "SFMono-Regular", Consolas, monospace;
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-5: 1.25rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --space-10: 2.5rem;
  --space-12: 3rem;
  --space-16: 4rem;
  --space-20: 5rem;
  --radius-sm: .5rem;
  --radius-md: .875rem;
  --radius-lg: 1.375rem;
  --radius-xl: 2rem;
  --radius-pill: 999px;
  --shadow-card: 0 1.125rem 3.75rem rgba(1, 8, 18, .35);
  --shadow-pop: 0 1.75rem 5.625rem rgba(0, 0, 0, .5);
  --shadow-accent: 0 0 0 1px rgba(255, 106, 61, .2), 0 1rem 3rem rgba(255, 106, 61, .16);
  --motion-fast: 140ms;
  --motion-base: 260ms;
  --motion-scene: 520ms;
  --motion-slow: 900ms;
  --ease-out: cubic-bezier(.16, 1, .3, 1);
  color-scheme: dark;
}

[data-theme="light"] {
  --color-bg: #f5f7fb;
  --color-bg-deep: #e8edf4;
  --color-surface: #ffffff;
  --color-surface-elevated: #eef3f8;
  --color-surface-glass: rgba(255, 255, 255, .84);
  --color-border: #c5d0dc;
  --color-border-strong: #62768b;
  --color-text: #142033;
  --color-text-muted: #4c6075;
  --color-text-subtle: #566b80;
  --color-accent: #ff6a3d;
  --color-accent-hover: #e8552b;
  --color-on-accent: #111721;
  --color-info: #59d9ff;
  --color-success: #137a4f;
  --color-warning: #8a5a00;
  --color-danger: #b4233b;
  --color-focus: #087f9e;
  --color-overlay: rgba(20, 32, 51, .58);
  --shadow-card: 0 1.125rem 3.75rem rgba(41, 59, 79, .13);
  --shadow-pop: 0 1.75rem 5.625rem rgba(41, 59, 79, .2);
  --shadow-accent: 0 0 0 1px rgba(255, 106, 61, .24), 0 1rem 3rem rgba(255, 106, 61, .12);
  color-scheme: light;
}

* { box-sizing: border-box; }

html { background: var(--color-bg-deep); scroll-behavior: smooth; }

body {
  margin: 0;
  min-width: 20rem;
  min-height: 100vh;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 50% -10%, rgba(30, 73, 108, .3), transparent 44rem),
    linear-gradient(155deg, var(--color-bg) 0%, var(--color-bg-deep) 78%);
  color: var(--color-text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }
button { color: inherit; }
a { color: inherit; }

:focus-visible {
  outline: .1875rem solid var(--color-focus);
  outline-offset: .1875rem;
}

.skip-link {
  position: fixed;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 100;
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  background: var(--color-text);
  color: var(--color-bg);
  transform: translateY(-200%);
}
.skip-link:focus { transform: translateY(0); }

.ambient { position: fixed; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.ambient__grid {
  position: absolute;
  inset: -20%;
  opacity: .17;
  background-image:
    linear-gradient(rgba(89, 217, 255, .12) 1px, transparent 1px),
    linear-gradient(90deg, rgba(89, 217, 255, .12) 1px, transparent 1px);
  background-size: 5rem 5rem;
  mask-image: radial-gradient(circle at 50% 28%, black, transparent 68%);
  transform: perspective(50rem) rotateX(58deg) translateY(9rem) scale(1.25);
  animation: grid-drift 24s ease-in-out infinite alternate;
}
.ambient__orb { position: absolute; width: 32rem; height: 32rem; border-radius: 50%; filter: blur(7rem); opacity: .1; }
.ambient__orb--orange { top: 4%; right: -15rem; background: var(--color-accent); animation: orb-a 22s ease-in-out infinite alternate; }
.ambient__orb--cyan { bottom: -14rem; left: -12rem; background: var(--color-info); animation: orb-b 27s ease-in-out infinite alternate; }
.signal-axis { position: absolute; top: 5rem; left: 0; width: 35%; height: 1px; background: linear-gradient(90deg, transparent, var(--color-info), transparent); opacity: .4; animation: signal-scan 9s ease-in-out infinite; }

@keyframes grid-drift { to { transform: perspective(50rem) rotateX(58deg) translate(1.4rem, 8rem) scale(1.28); } }
@keyframes orb-a { to { transform: translate(-5rem, 8rem); } }
@keyframes orb-b { to { transform: translate(7rem, -4rem); } }
@keyframes signal-scan { 0%, 100% { transform: translateX(-100%); opacity: 0; } 45%, 55% { opacity: .5; } 60% { transform: translateX(390%); opacity: 0; } }

.app-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  min-height: 4.5rem;
  padding: 0 clamp(1rem, 4vw, 3.5rem);
  border-bottom: 1px solid rgba(58, 82, 109, .5);
  background: rgba(3, 9, 20, .76);
  backdrop-filter: blur(1.2rem);
}
.brand { display: inline-flex; align-items: center; gap: var(--space-3); width: fit-content; padding: 0; border: 0; background: transparent; text-align: left; cursor: pointer; }
.brand__mark { display: grid; grid-template-columns: repeat(3, .3rem); align-items: end; gap: .2rem; width: 1.3rem; height: 1.8rem; transform: skewX(-12deg); }
.brand__mark i { display: block; background: var(--color-accent); border-radius: .15rem; }
.brand__mark i:nth-child(1) { height: 48%; }
.brand__mark i:nth-child(2) { height: 100%; background: var(--color-text); }
.brand__mark i:nth-child(3) { height: 72%; background: var(--color-info); }
.brand strong, .brand small { display: block; font-family: var(--font-display); }
.brand strong { font-size: .98rem; letter-spacing: .16em; }
.brand small { margin-top: .12rem; color: var(--color-text-subtle); font-size: .55rem; letter-spacing: .24em; }
.header-status { display: flex; align-items: center; justify-content: center; gap: var(--space-3); min-width: 12rem; }
.header-mode { color: var(--color-text-muted); font-size: .72rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.mini-progress { width: clamp(5rem, 10vw, 9rem); height: .25rem; overflow: hidden; border-radius: var(--radius-pill); background: var(--color-border); }
.mini-progress i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--color-info), var(--color-accent)); transition: width var(--motion-base) var(--ease-out); }
.header-actions { display: flex; justify-content: flex-end; gap: var(--space-2); }
.theme-toggle{display:inline-flex;align-items:center;gap:var(--space-2);min-height:2.5rem;padding:0 var(--space-3);border:1px solid var(--color-border);border-radius:var(--radius-pill);background:var(--color-surface-glass);color:var(--color-text-muted);cursor:pointer;transition:background var(--motion-fast),color var(--motion-fast),border var(--motion-fast)}.theme-toggle:hover{border-color:var(--color-info);color:var(--color-text)}.theme-toggle svg{width:1rem;height:1rem;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}.theme-toggle__moon{display:none}.theme-toggle__label{font-size:.72rem;font-weight:700;letter-spacing:.08em;text-transform:uppercase}[data-theme="light"] .theme-toggle__sun{display:none}[data-theme="light"] .theme-toggle__moon{display:block}
.icon-button { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 2.5rem; padding: 0 var(--space-3); border: 1px solid transparent; border-radius: var(--radius-pill); background: transparent; color: var(--color-text-muted); cursor: pointer; transition: background var(--motion-fast), color var(--motion-fast), border var(--motion-fast); }
.icon-button:hover { border-color: var(--color-border); background: var(--color-surface); color: var(--color-text); }
.icon-button[aria-pressed="true"] { border-color: var(--color-info); color: var(--color-info); }
.icon-button__label { font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }

#app-main { width: min(100%, 90rem); min-height: calc(100vh - 4.5rem); margin: 0 auto; padding: clamp(2rem, 6vw, 5.5rem) clamp(1rem, 5vw, 4.5rem) 7rem; }
.scene { animation: scene-in var(--motion-scene) var(--ease-out) both; }
@keyframes scene-in { from { opacity: 0; transform: translateY(1.5rem); } }

.eyebrow { display: inline-flex; align-items: center; gap: var(--space-2); margin-bottom: var(--space-4); color: var(--color-info); font-size: .72rem; font-weight: 850; letter-spacing: .18em; text-transform: uppercase; }
.eyebrow::before { content: ""; width: 1.8rem; height: 1px; background: currentColor; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: var(--font-display); }
h1 { max-width: 60rem; margin-bottom: var(--space-5); font-size: clamp(2.5rem, 7vw, 6.5rem); line-height: .94; letter-spacing: -.055em; overflow-wrap: anywhere; word-break: break-word; }
h2 { font-size: clamp(1.7rem, 3vw, 2.6rem); line-height: 1.05; letter-spacing: -.03em; }
h3 { margin-bottom: var(--space-2); font-size: 1.2rem; }
.lead { max-width: 46rem; color: var(--color-text-muted); font-size: clamp(1rem, 1.8vw, 1.25rem); line-height: 1.65; }
.accent-text { color: var(--color-accent); }
.muted { color: var(--color-text-muted); }
.subtle { color: var(--color-text-subtle); }
.mono { font-family: var(--font-mono); }
.sr-only{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}

.hero { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(18rem, .75fr); gap: clamp(2rem, 7vw, 7rem); align-items: end; padding-top: clamp(1rem, 5vh, 4rem); }
.hero__copy { position: relative; }
.hero__copy::after { content: ""; position: absolute; top: -2rem; left: -2rem; width: 8rem; height: .12rem; background: linear-gradient(90deg, var(--color-accent), transparent); }
.hero__meta { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); margin-top: var(--space-8); }
.metric { padding: var(--space-4); border-top: 1px solid var(--color-border); }
.metric strong { display: block; margin-bottom: var(--space-1); font-family: var(--font-mono); font-size: 1.35rem; }
.metric span { color: var(--color-text-subtle); font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; }
.last-result { display: inline-flex; align-items: baseline; gap: var(--space-3); margin: var(--space-5) 0 0; padding: var(--space-3) var(--space-4); border: 1px solid var(--color-border); border-radius: var(--radius-pill); background: rgba(13,27,42,.6); }
.last-result span, .last-result small { color: var(--color-text-subtle); font-size: .65rem; letter-spacing: .1em; }
.last-result strong { color: var(--color-success); font-family: var(--font-mono); }
.mode-grid { display: grid; gap: var(--space-4); }
.mode-card { position: relative; overflow: hidden; display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-5); align-items: center; width: 100%; min-height: 9.5rem; padding: var(--space-6); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: linear-gradient(135deg, rgba(19,37,58,.92), rgba(9,20,34,.88)); box-shadow: var(--shadow-card); text-align: left; cursor: pointer; transition: transform var(--motion-base) var(--ease-out), border var(--motion-fast), box-shadow var(--motion-base); }
.mode-card::before { content: ""; position: absolute; inset: auto -20% -80% 20%; height: 120%; background: radial-gradient(circle, rgba(89,217,255,.18), transparent 62%); transition: transform var(--motion-scene) var(--ease-out); }
.mode-card--exam::before { background: radial-gradient(circle, rgba(255,106,61,.2), transparent 62%); }
.mode-card--mistakes::before { background: radial-gradient(circle, rgba(255,209,102,.18), transparent 62%); }
.mode-card--catalog::before { background: radial-gradient(circle, rgba(141,232,255,.16), transparent 62%); }
.mode-card:hover { transform: translateY(-.35rem); border-color: var(--color-border-strong); box-shadow: var(--shadow-accent); }
.mode-card:hover::before { transform: translateY(-18%); }
.mode-card__number { align-self: start; color: var(--color-text-subtle); font-family: var(--font-mono); font-size: .72rem; }
.mode-card__copy { position: relative; z-index: 1; }
.mode-card__copy strong { display: block; margin-bottom: var(--space-2); font-family: var(--font-display); font-size: 1.55rem; }
.mode-card__copy span { color: var(--color-text-muted); line-height: 1.5; }
.arrow { position: relative; z-index: 1; display: grid; place-items: center; width: 2.75rem; height: 2.75rem; border-radius: 50%; background: var(--color-info); color: var(--color-on-accent); font-size: 1.4rem; transition: transform var(--motion-base) var(--ease-out); }
.mode-card--exam .arrow { background: var(--color-accent); }
.exam-lock-icon { width: 1.25rem; height: 1.25rem; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.role-admin-list{display:grid;gap:.65rem}.role-admin-row{display:grid;grid-template-columns:minmax(0,1fr) 12rem auto;align-items:center;gap:1rem;padding:1rem;border:1px solid var(--color-border);border-radius:12px;background:rgba(8,19,35,.72)}.role-admin-row>div{display:grid;gap:.25rem}.role-admin-row span{color:var(--color-text-muted);font-size:.78rem}.role-admin-row select{width:100%;padding:.7rem;border:1px solid var(--color-border-strong);border-radius:9px;background:var(--color-bg-deep);color:var(--color-text)}.role-admin-row select:disabled{opacity:.65}.role-matrix td:not(:first-child),.role-matrix th:not(:first-child){text-align:center}.status-pill--review{border-color:rgba(167,139,250,.45);background:rgba(167,139,250,.1);color:#c4b5fd}@media(max-width:720px){.role-admin-row{grid-template-columns:1fr}.role-admin-row .button{width:100%}}
.admin-section-stack{display:grid;gap:clamp(1.25rem,2.5vw,2rem)}.scene.studio>.catalog-panel+.catalog-panel{margin-top:clamp(1.25rem,2.5vw,2rem)}.role-lock-hint{grid-column:2/-1;color:var(--color-text-muted);font-size:.72rem}.account-notification{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem;border:1px solid rgba(89,217,255,.35);border-radius:12px;background:rgba(89,217,255,.08)}.account-notification>div{display:grid;gap:.25rem}.account-notification span{color:var(--color-text-muted);font-size:.82rem}@media(max-width:720px){.role-lock-hint{grid-column:auto}.admin-section-stack{gap:1rem}}
.user-admin-toolbar{display:grid;grid-template-columns:minmax(0,1fr) minmax(16rem,24rem);gap:1rem;align-items:center;margin-bottom:.75rem}.user-role-tabs{display:flex;gap:.45rem;overflow-x:auto;padding:.2rem}.user-role-tab{display:inline-flex;align-items:center;gap:.45rem;flex:0 0 auto;padding:.62rem .78rem;border:1px solid var(--color-border);border-radius:999px;background:rgba(8,19,35,.72);color:var(--color-text-muted);font:inherit;font-size:.75rem;font-weight:800;cursor:pointer}.user-role-tab span{display:grid;place-items:center;min-width:1.45rem;height:1.45rem;padding:0 .35rem;border-radius:999px;background:rgba(255,255,255,.07);font-family:var(--font-mono);font-size:.65rem}.user-role-tab:hover,.user-role-tab.is-active{border-color:var(--color-info);color:var(--color-text)}.user-role-tab.is-active{background:rgba(89,217,255,.12)}.user-admin-search{position:relative;display:block}.user-admin-search input{width:100%;padding:.78rem 2.5rem .78rem 1rem;border:1px solid var(--color-border-strong);border-radius:999px;background:var(--color-bg-deep);color:var(--color-text);font:inherit}.user-admin-search>span:last-child{position:absolute;top:50%;right:1rem;color:var(--color-info);font-size:1.2rem;transform:translateY(-50%);pointer-events:none}.user-filter-result{margin:0 0 .8rem;color:var(--color-text-muted);font-size:.75rem}@media(max-width:900px){.user-admin-toolbar{grid-template-columns:1fr}}@media(max-width:720px){.user-role-tabs{margin-inline:-.35rem}.user-admin-search input{border-radius:12px}}
.admin-tabs .user-role-tab.tab--alert{border-color:var(--color-accent);background:var(--color-accent);color:var(--color-on-accent)}
.admin-tabs .user-role-tab.tab--alert span{background:rgba(255,255,255,.48);color:var(--color-on-accent)}
.mode-card--mistakes .arrow { background: var(--color-warning); }
.mode-card--catalog .arrow { background: var(--color-text); }
.mode-card:hover .arrow { transform: translateX(.25rem); }
.mode-card:disabled { opacity: .5; cursor: default; box-shadow: none; }
.mode-card:disabled:hover { transform: none; border-color: var(--color-border); }
.mode-card:disabled .arrow { background: var(--color-border-strong); color: var(--color-text-muted); }
.disclaimer { margin-top: var(--space-6); padding: var(--space-4); border-left: .2rem solid var(--color-warning); background: rgba(255,209,102,.06); color: var(--color-text-muted); font-size: .8rem; line-height: 1.55; }

.section-head { display: flex; justify-content: space-between; gap: var(--space-8); align-items: end; margin-bottom: var(--space-10); }
.section-head h1 { margin-bottom: 0; font-size: clamp(2.5rem, 6vw, 5rem); }
.section-head__aside { max-width: 26rem; color: var(--color-text-muted); line-height: 1.6; }
.recommendation { display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-4); align-items: center; width: 100%; margin-bottom: var(--space-6); padding: var(--space-5) var(--space-6); border: 1px solid rgba(255,209,102,.35); border-radius: var(--radius-lg); background: linear-gradient(110deg, rgba(255,209,102,.1), rgba(13,27,42,.68)); color: var(--color-text); text-align: left; cursor: pointer; transition: transform var(--motion-base) var(--ease-out), border var(--motion-fast); }
.recommendation:hover { transform: translateY(-.2rem); border-color: var(--color-warning); }
.recommendation__pulse { width: .75rem; height: .75rem; border-radius: 50%; background: var(--color-warning); box-shadow: 0 0 0 .45rem rgba(255,209,102,.08); animation: recommendation-pulse 2.8s ease-in-out infinite; }
@keyframes recommendation-pulse { 50% { box-shadow: 0 0 0 .8rem rgba(255,209,102,0); } }
.recommendation small, .recommendation strong { display: block; }
.recommendation small { margin-bottom: var(--space-1); color: var(--color-warning); font-size: .65rem; font-weight: 800; letter-spacing: .14em; }
.recommendation strong { font-family: var(--font-display); font-size: 1.1rem; }
.chapter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); counter-reset: chapter; }
.chapter-card { position: relative; overflow: hidden; display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-5); align-items: center; min-height: 9rem; padding: var(--space-6); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: rgba(13,27,42,.76); text-align: left; cursor: pointer; animation: card-in var(--motion-scene) var(--ease-out) both; animation-delay: calc(var(--index) * 45ms); transition: transform var(--motion-base) var(--ease-out), background var(--motion-fast), border var(--motion-fast); }
@keyframes card-in { from { opacity: 0; transform: translateY(1.2rem); } }
.chapter-card:hover { transform: translateY(-.25rem); border-color: var(--color-info); background: var(--color-surface-elevated); }
.chapter-card__code { display: grid; place-items: center; width: 3.25rem; height: 3.25rem; border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); color: var(--color-info); font-family: var(--font-mono); font-weight: 800; }
.chapter-card__copy strong { display: block; margin-bottom: var(--space-2); font-family: var(--font-display); font-size: 1.14rem; }
.chapter-card__copy span { color: var(--color-text-subtle); font-size: .82rem; }
.chapter-card__progress { position: relative; display: grid; place-items: center; width: 3rem; height: 3rem; border-radius: 50%; background: conic-gradient(var(--color-success) var(--progress), var(--color-border) 0); }
.chapter-card__progress::after { content: ""; width: 2.2rem; height: 2.2rem; border-radius: 50%; background: var(--color-surface); }
.chapter-card__progress span { position: absolute; z-index: 1; font-family: var(--font-mono); font-size: .63rem; }

.stage-wrap { max-width: 62rem; margin: 0 auto; }
.stage-top { display: grid; grid-template-columns: 1fr auto; gap: var(--space-8); align-items: start; margin-bottom: var(--space-8); }
.stage-meta { display: flex; flex-wrap: wrap; gap: var(--space-3); align-items: center; color: var(--color-text-subtle); font-size: .75rem; font-weight: 750; text-transform: uppercase; letter-spacing: .1em; }
.stage-meta__chapter { color: var(--color-info); }
.progress-line { width: 100%; height: .35rem; margin-top: var(--space-4); overflow: hidden; border-radius: var(--radius-pill); background: var(--color-border); }
.progress-line i { display: block; width: var(--progress); height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--color-info), var(--color-accent)); transition: width var(--motion-scene) var(--ease-out); }
.timer { display: grid; grid-template-columns: 2.8rem auto; gap: var(--space-3); align-items: center; min-width: 8.5rem; }
.timer-ring { --remaining: 100%; display: grid; place-items: center; width: 2.8rem; height: 2.8rem; border-radius: 50%; background: conic-gradient(var(--timer-color, var(--color-info)) var(--remaining), var(--color-border) 0); }
.timer-ring::after { content: ""; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--color-bg-deep); }
.timer time { font-family: var(--font-mono); font-size: 1.25rem; font-weight: 750; }
.timer small { display: block; color: var(--color-text-subtle); font-size: .62rem; letter-spacing: .1em; }
.question-card { position: relative; padding: clamp(1.3rem, 4vw, 3rem); border: 1px solid var(--color-border); border-radius: var(--radius-xl); background: linear-gradient(145deg, rgba(19,37,58,.94), rgba(7,17,31,.96)); box-shadow: var(--shadow-card); }
.question-card::before { content: ""; position: absolute; inset: 0; box-sizing: border-box; padding: 3px; border-radius: inherit; pointer-events: none; background: linear-gradient(var(--color-info), var(--color-accent));
  -webkit-mask-image: linear-gradient(90deg, #000 0, transparent 45%), linear-gradient(#000 0 0), linear-gradient(#000 0 0); -webkit-mask-clip: border-box, content-box, border-box; -webkit-mask-composite: source-in, xor;
  mask-image: linear-gradient(90deg, #000 0, transparent 45%), linear-gradient(#000 0 0), linear-gradient(#000 0 0); mask-clip: border-box, content-box, border-box; mask-composite: intersect, exclude; }
.question-card h1 { max-width: 50rem; margin: 0 0 var(--space-8); font-size: clamp(1.55rem, 3.2vw, 2.5rem); line-height: 1.2; letter-spacing: -.025em; }
.question-kind { display: inline-flex; margin-bottom: var(--space-4); padding: .38rem .65rem; border: 1px solid var(--color-border); border-radius: var(--radius-pill); color: var(--color-text-muted); font-size: .65rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.answers { display: grid; gap: var(--space-3); margin: 0; padding: 0; border: 0; }
.answer { position: relative; display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-4); align-items: center; min-height: 4rem; padding: var(--space-4) var(--space-5); overflow: hidden; border: 1px solid var(--color-border); border-radius: var(--radius-md); background: rgba(3,9,20,.46); cursor: pointer; transition: transform var(--motion-fast), border var(--motion-fast), background var(--motion-fast); }
.answer:hover { transform: translateX(.22rem); border-color: var(--color-border-strong); background: rgba(19,37,58,.8); }
.answer input { position: absolute; opacity: 0; pointer-events: none; }
.answer__marker { display: grid; place-items: center; width: 1.35rem; height: 1.35rem; border: 2px solid var(--color-border-strong); border-radius: 50%; transition: border var(--motion-fast), background var(--motion-fast), box-shadow var(--motion-fast); }
.answer--multi .answer__marker { border-radius: .3rem; }
.answer input:checked + .answer__marker { border-color: var(--color-info); background: var(--color-info); box-shadow: inset 0 0 0 .25rem var(--color-surface); }
.answer--multi input:checked + .answer__marker { box-shadow: inset 0 0 0 .2rem var(--color-surface); }
.answer:has(input:focus-visible) { outline: .1875rem solid var(--color-focus); outline-offset: .1875rem; }
.answer.is-correct { border-color: var(--color-success); background: rgba(72,229,155,.09); }
.answer.is-wrong { border-color: var(--color-danger); background: rgba(255,107,122,.09); animation: answer-no var(--motion-base) var(--ease-out); }
@keyframes answer-no { 35% { transform: translateX(-.25rem); } 70% { transform: translateX(.2rem); } }
.answer__result { color: var(--color-success); font-weight: 800; }
.answer.is-wrong .answer__result { color: var(--color-danger); }
.validation { margin-top: var(--space-4); padding: var(--space-3) var(--space-4); border-left: .2rem solid var(--color-danger); background: rgba(255,107,122,.08); color: var(--color-danger); font-weight: 700; animation: panel-in var(--motion-base) var(--ease-out); }
.feedback { position: relative; margin-top: var(--space-5); padding: var(--space-5); border: 1px solid var(--feedback-color, var(--color-info)); border-radius: var(--radius-md); background: color-mix(in srgb, var(--feedback-color, var(--color-info)) 8%, transparent); animation: panel-in var(--motion-scene) var(--ease-out); }
@keyframes panel-in { from { opacity: 0; transform: translateY(-.6rem); } }
.feedback--correct { --feedback-color: var(--color-success); }
.feedback--wrong { --feedback-color: var(--color-danger); }
.feedback__title { display: flex; align-items: center; gap: var(--space-3); margin-bottom: var(--space-3); font-family: var(--font-display); font-size: 1.15rem; font-weight: 800; }
.feedback p { margin-bottom: var(--space-3); color: var(--color-text-muted); line-height: 1.6; }
.feedback__source { color: var(--color-text-subtle); font-size: .75rem; }
.stage-actions { display: flex; justify-content: space-between; gap: var(--space-4); align-items: center; margin-top: var(--space-6); }

.button { display: inline-flex; justify-content: center; align-items: center; gap: var(--space-3); min-height: 3.25rem; padding: 0 var(--space-6); border: 1px solid transparent; border-radius: var(--radius-pill); background: var(--color-accent); color: var(--color-on-accent); font-weight: 850; cursor: pointer; transition: transform var(--motion-fast), background var(--motion-fast), border var(--motion-fast); }
.button:hover { transform: translateY(-.12rem); background: var(--color-accent-hover); }
.button:active { transform: translateY(.06rem); }
.button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.button--secondary { background: var(--color-info); }
.button--ghost { border-color: var(--color-border); background: transparent; color: var(--color-text); }
.button--ghost:hover { background: var(--color-surface-elevated); }
.button--danger { background: var(--color-danger); color: var(--color-bg-deep); }
.button--wide { width: 100%; }

.gate { display: grid; grid-template-columns: minmax(0, 1fr) minmax(18rem, .8fr); gap: clamp(2rem, 7vw, 6rem); align-items: center; max-width: 70rem; margin: 0 auto; }
.gate h1 { font-size: clamp(3rem, 7vw, 6rem); }
.rule-list { display: grid; gap: var(--space-3); margin: var(--space-8) 0; padding: 0; list-style: none; }
.rule-list li { display: grid; grid-template-columns: 2.5rem 1fr; gap: var(--space-4); align-items: center; padding: var(--space-4) 0; border-bottom: 1px solid var(--color-border); }
.rule-list strong { font-family: var(--font-mono); color: var(--color-info); }
.gate-panel { padding: var(--space-8); border: 1px solid var(--color-border); border-radius: var(--radius-xl); background: rgba(13,27,42,.84); box-shadow: var(--shadow-pop); }
.gate-panel__ring { display: grid; place-items: center; width: 9rem; height: 9rem; margin: 0 auto var(--space-6); border-radius: 50%; background: conic-gradient(var(--color-accent) 80%, var(--color-border) 0); }
.gate-panel__ring::after { content: "80%"; display: grid; place-items: center; width: 7rem; height: 7rem; border-radius: 50%; background: var(--color-surface); font-family: var(--font-mono); font-size: 1.8rem; font-weight: 800; }
.gate-panel p { color: var(--color-text-muted); line-height: 1.6; text-align: center; }

.result-grid { display: grid; grid-template-columns: minmax(18rem, .65fr) minmax(0, 1.35fr); gap: clamp(2rem, 6vw, 5rem); align-items: start; }
.result-hero { position: sticky; top: 7rem; text-align: center; }
.result-ring { --score: 0%; display: grid; place-items: center; width: min(17rem, 70vw); aspect-ratio: 1; margin: 0 auto var(--space-6); border-radius: 50%; background: conic-gradient(var(--ring-color, var(--color-success)) var(--score), var(--color-border) 0); box-shadow: 0 0 5rem color-mix(in srgb, var(--ring-color, var(--color-success)) 18%, transparent); animation: result-pop var(--motion-slow) var(--ease-out) both; }
.result-ring::after { content: ""; position: absolute; width: min(13.5rem, 56vw); aspect-ratio: 1; border-radius: 50%; background: var(--color-bg-deep); }
.result-ring__value { position: relative; z-index: 1; font-family: var(--font-mono); font-size: clamp(2.5rem, 7vw, 4rem); font-weight: 850; }
@keyframes result-pop { from { opacity: 0; transform: scale(.8) rotate(-20deg); } }
.result-hero h1 { margin-bottom: var(--space-3); font-size: clamp(2.2rem, 5vw, 4rem); }
.result-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-3); margin: var(--space-8) 0; }
.result-summary .metric { border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.result-panel { padding: clamp(1.2rem, 4vw, 2.5rem); border: 1px solid var(--color-border); border-radius: var(--radius-xl); background: rgba(13,27,42,.75); }
.result-panel h2 { margin-bottom: var(--space-6); }
.chapter-bars { display: grid; gap: var(--space-5); }
.chapter-bar__label { display: flex; justify-content: space-between; gap: var(--space-4); margin-bottom: var(--space-2); color: var(--color-text-muted); font-size: .82rem; }
.chapter-bar__track { height: .5rem; border-radius: var(--radius-pill); background: var(--color-border); overflow: hidden; }
.chapter-bar__track i { display: block; width: var(--bar); height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--color-info), var(--color-success)); animation: bar-grow var(--motion-slow) var(--ease-out) both; }
@keyframes bar-grow { from { width: 0; } }
.result-actions { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-8); }

.review-list { display: grid; gap: var(--space-3); max-width: 62rem; margin: 0 auto; }
.review-item { border: 1px solid var(--color-border); border-radius: var(--radius-md); background: rgba(13,27,42,.72); overflow: hidden; }
.review-item summary { display: grid; grid-template-columns: auto 1fr auto; gap: var(--space-4); align-items: center; min-height: 4.5rem; padding: var(--space-4) var(--space-5); cursor: pointer; list-style: none; }
.review-item summary::-webkit-details-marker { display: none; }
.review-state { display: grid; place-items: center; width: 1.8rem; height: 1.8rem; border-radius: 50%; background: var(--color-success); color: var(--color-bg-deep); font-weight: 900; }
.review-state--wrong { background: var(--color-danger); }
.review-state--empty { background: var(--color-warning); }
.review-item summary strong { font-size: .92rem; line-height: 1.45; }
.review-item summary span:last-child { color: var(--color-text-subtle); }
.review-body { padding: 0 var(--space-5) var(--space-5) 4.8rem; animation: panel-in var(--motion-base) var(--ease-out); }
.review-body p { color: var(--color-text-muted); line-height: 1.6; }
.review-answer { padding: var(--space-3); border-left: .2rem solid var(--color-info); background: rgba(89,217,255,.06); }

.certificate { max-width: 55rem; margin: 0 auto; }
.certificate-card { position: relative; overflow: hidden; padding: clamp(2rem, 7vw, 5rem); border: 1px solid var(--color-border-strong); border-radius: var(--radius-xl); background: linear-gradient(145deg, var(--color-surface-elevated), var(--color-bg-deep)); box-shadow: var(--shadow-pop); }
.certificate-card::before, .certificate-card::after { content: ""; position: absolute; width: 12rem; height: .18rem; background: linear-gradient(90deg, var(--color-accent), var(--color-info)); transform: rotate(-45deg); }
.certificate-card::before { top: 2rem; right: -4rem; }
.certificate-card::after { bottom: 2rem; left: -4rem; }
.certificate-form { display: grid; gap: var(--space-5); margin-top: var(--space-8); }
.field { display: grid; gap: var(--space-2); }
.field label { color: var(--color-text-muted); font-size: .78rem; font-weight: 750; letter-spacing: .08em; text-transform: uppercase; }
.field input { min-height: 3.5rem; padding: 0 var(--space-4); border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); background: rgba(3,9,20,.62); color: var(--color-text); }
.certificate-output { text-align: center; }
.certificate-output__score { margin: var(--space-8) 0; font-family: var(--font-mono); font-size: 4rem; font-weight: 850; color: var(--color-success); }
.certificate-output__name { margin: var(--space-8) 0 var(--space-2); font-size: clamp(2rem, 5vw, 3.5rem); }
.certificate-output__org { color: var(--color-text-muted); font-size: 1.2rem; }
.certificate-output__legal { margin-top: var(--space-10); padding-top: var(--space-4); border-top: 1px solid var(--color-border); color: var(--color-warning); font-size: .72rem; letter-spacing: .08em; text-transform: uppercase; }

.catalog { max-width: 78rem; margin: 0 auto; }
.catalog-metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: var(--space-3); margin-bottom: var(--space-8); }
.catalog-metrics .metric { border: 1px solid var(--color-border); border-radius: var(--radius-md); background: rgba(13,27,42,.58); }
.catalog-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); }
.catalog-panel { position: relative; min-height: 18rem; padding: var(--space-8); overflow: hidden; border: 1px solid var(--color-border); border-radius: var(--radius-xl); background: linear-gradient(145deg, rgba(19,37,58,.88), rgba(7,17,31,.88)); box-shadow: var(--shadow-card); }
.catalog-panel::after { content: ""; pointer-events: none; position: absolute; right: -5rem; bottom: -7rem; width: 15rem; height: 15rem; border: 1px solid rgba(89,217,255,.12); border-radius: 50%; box-shadow: 0 0 0 2rem rgba(89,217,255,.025), 0 0 0 4rem rgba(89,217,255,.018); }
.catalog-panel h2 { margin-top: var(--space-5); }
.catalog-panel p { max-width: 34rem; color: var(--color-text-muted); line-height: 1.6; }
.catalog-step { display: inline-flex; align-items: center; justify-content: center; width: 2.4rem; height: 2.4rem; border: 1px solid var(--color-info); border-radius: 50%; color: var(--color-info); font-family: var(--font-mono); font-size: .72rem; }
.catalog-actions { position: relative; z-index: 1; display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-6); }
.file-drop { position: relative; z-index: 1; display: grid; place-items: center; min-height: 8.5rem; margin-top: var(--space-6); border: 1px dashed var(--color-border-strong); border-radius: var(--radius-lg); background: rgba(3,9,20,.36); cursor: pointer; transition: border var(--motion-fast), background var(--motion-fast), transform var(--motion-base); }
.file-drop:hover { transform: translateY(-.2rem); border-color: var(--color-info); background: rgba(89,217,255,.05); }
.file-drop > span { color: var(--color-info); font-size: 1.8rem; }
.file-drop strong, .file-drop small { display: block; text-align: center; }
.file-drop small { color: var(--color-text-subtle); }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.import-preview { margin-top: var(--space-6); padding: clamp(1.2rem, 4vw, 2.5rem); border: 1px solid var(--color-border); border-radius: var(--radius-xl); background: rgba(13,27,42,.78); box-shadow: var(--shadow-card); animation: panel-in var(--motion-scene) var(--ease-out); }
.import-preview__head { display: flex; justify-content: space-between; align-items: start; gap: var(--space-6); }
.import-preview__head h2 { margin-bottom: var(--space-5); }
.import-badges { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: var(--space-2); }
.badge { padding: .45rem .7rem; border: 1px solid var(--color-border); border-radius: var(--radius-pill); font-family: var(--font-mono); font-size: .68rem; }
.badge--success { border-color: rgba(72,229,155,.4); color: var(--color-success); }
.badge--danger { border-color: rgba(255,107,122,.4); color: var(--color-danger); }
.badge--warning { border-color: rgba(255,209,102,.4); color: var(--color-warning); }
.import-messages { margin-bottom: var(--space-4); padding: var(--space-4); border-left: .2rem solid var(--color-info); background: rgba(89,217,255,.05); }
.import-messages strong { display: block; margin-bottom: var(--space-2); }
.import-messages p { margin: var(--space-1) 0; color: var(--color-text-muted); font-size: .82rem; line-height: 1.45; }
.import-messages--error { border-color: var(--color-danger); background: rgba(255,107,122,.06); }
.import-messages--error strong { color: var(--color-danger); }
.import-messages--ok { border-color: var(--color-success); background: rgba(72,229,155,.06); }
.import-messages--ok strong { color: var(--color-success); }
.import-messages--warning { border-color: var(--color-warning); background: rgba(255,209,102,.05); }
.table-scroll { overflow-x: auto; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.catalog-table { width: 100%; border-collapse: collapse; min-width: 48rem; }
.catalog-table th, .catalog-table td { padding: var(--space-3) var(--space-4); border-bottom: 1px solid var(--color-border); text-align: left; vertical-align: top; }
.catalog-table th { color: var(--color-text-subtle); background: rgba(3,9,20,.55); font-size: .65rem; letter-spacing: .1em; text-transform: uppercase; }
.catalog-table td { color: var(--color-text-muted); font-size: .78rem; line-height: 1.45; }
.catalog-table td:nth-child(4) { min-width: 19rem; color: var(--color-text); }
.catalog-table tr:last-child td { border-bottom: 0; }
.import-apply { display: flex; justify-content: flex-end; align-items: center; gap: var(--space-3); margin-top: var(--space-5); }
.import-apply label { color: var(--color-text-subtle); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.import-apply select { min-height: 3rem; padding: 0 var(--space-4); border: 1px solid var(--color-border-strong); border-radius: var(--radius-pill); background: var(--color-bg-deep); color: var(--color-text); }

.toast-region { position: fixed; right: var(--space-5); bottom: var(--space-5); z-index: 60; display: grid; gap: var(--space-2); }
.toast { max-width: 22rem; padding: var(--space-4) var(--space-5); border: 1px solid var(--color-border-strong); border-radius: var(--radius-md); background: var(--color-surface-elevated); box-shadow: var(--shadow-pop); animation: toast-in var(--motion-base) var(--ease-out) both; }
@keyframes toast-in { from { opacity: 0; transform: translateX(2rem); } }
.confirm-dialog { max-width: 31rem; padding: 0; border: 1px solid var(--color-border-strong); border-radius: var(--radius-xl); background: var(--color-surface); color: var(--color-text); box-shadow: var(--shadow-pop); }
.confirm-dialog::backdrop { background: var(--color-overlay); backdrop-filter: blur(.4rem); }
.confirm-dialog form { padding: var(--space-8); }
.confirm-dialog p { color: var(--color-text-muted); line-height: 1.6; }
.dialog-actions { display: flex; justify-content: flex-end; gap: var(--space-3); margin-top: var(--space-6); }

body.exam-active .ambient__grid,
body.exam-active .ambient__orb,
body.exam-active .signal-axis { animation-play-state: paused; }

@media (max-width: 56rem) {
  .hero, .gate, .result-grid { grid-template-columns: 1fr; }
  .hero { align-items: start; }
  .mode-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mode-card { grid-template-columns: 1fr; align-content: space-between; min-height: 13rem; }
  .arrow { justify-self: end; }
  .result-hero { position: static; }
  .chapter-grid { grid-template-columns: 1fr; }
  .catalog-grid { grid-template-columns: 1fr; }
  .catalog-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 42rem) {
  .app-header { grid-template-columns: 1fr auto; min-height: 3.75rem; padding-inline: var(--space-4); }
  .header-status { position: fixed; top: 3.75rem; left: 0; width: 100%; min-height: 2rem; padding: 0 var(--space-4); background: rgba(3,9,20,.88); }
  .icon-button__label { display: none; }
  #app-main { min-height: calc(100vh - 3.75rem); padding-top: 4rem; }
  .hero__meta, .result-summary { grid-template-columns: 1fr; }
  .mode-grid { grid-template-columns: 1fr; }
  .mode-card { min-height: 9rem; grid-template-columns: auto 1fr auto; }
  .section-head { display: block; }
  .section-head__aside { margin-top: var(--space-4); }
  .chapter-card { grid-template-columns: auto 1fr; }
  .chapter-card__progress { display: none; }
  .question-card { border-radius: var(--radius-lg); }
  .stage-top { grid-template-columns: 1fr; gap: var(--space-4); }
  .timer { grid-row: 1; }
  .stage-actions { position: sticky; bottom: 0; z-index: 10; margin: var(--space-6) calc(var(--space-4) * -1) calc(var(--space-16) * -1); padding: var(--space-4); border-top: 1px solid var(--color-border); background: rgba(3,9,20,.94); backdrop-filter: blur(1rem); }
  .stage-actions .button { flex: 1; }
  .review-body { padding-left: var(--space-5); }
  .dialog-actions { flex-direction: column; }
  .catalog-metrics { grid-template-columns: 1fr; }
  .import-preview__head, .import-apply { align-items: stretch; flex-direction: column; }
  .import-badges { justify-content: flex-start; }
}

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

body.reduce-motion *, body.reduce-motion *::before, body.reduce-motion *::after { animation-duration: 1ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }

@media print {
  body { background: white; color: #111; }
  .app-header, .ambient, .certificate > .section-head, .certificate-form, .result-actions, .toast-region { display: none !important; }
  #app-main { width: 100%; padding: 0; }
  .certificate-card { min-height: 95vh; display: grid; place-items: center; border: .12rem solid #111; border-radius: 0; background: white; color: #111; box-shadow: none; }
  .certificate-output__org, .certificate-output__legal { color: #333; }
}

/* Version 4: Lernsystem-Editor */
.mode-card--studio{--card-accent:#a78bfa}.studio,.studio-editor{max-width:1440px}.studio-toolbar,.editor-head{display:flex;align-items:center;justify-content:space-between;gap:1.25rem;margin:1.5rem 0 2rem}.studio-toolbar>div{display:grid;gap:.3rem}.studio-toolbar span{color:var(--color-text-muted);font-size:.85rem}.course-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:1rem}.course-card{position:relative;display:flex;flex-direction:column;min-height:320px;padding:1.4rem;border:1px solid var(--color-border);border-radius:var(--radius-lg);background:linear-gradient(145deg,rgba(17,30,49,.96),rgba(8,18,32,.94));overflow:hidden}.course-card:before{content:"";position:absolute;inset:0 auto 0 0;width:4px;background:var(--course-accent)}.course-card.is-active{box-shadow:0 0 0 1px var(--course-accent),0 24px 60px rgba(0,0,0,.28)}.course-card__top,.course-card__actions,.course-card__stats{display:flex;align-items:center;gap:.65rem}.course-card__top{justify-content:space-between}.course-card h2{font-size:1.35rem;margin:1.2rem 0 .55rem}.course-card p{color:var(--color-text-muted);line-height:1.55}.course-card__stats{margin:auto 0 1rem;flex-wrap:wrap}.course-card__stats span{padding:.45rem .6rem;border:1px solid var(--color-border);border-radius:999px;font-size:.75rem;color:var(--color-text-muted)}.course-card__stats strong{color:var(--color-text)}.course-card__actions{border-top:1px solid var(--color-border);padding-top:1rem}.status-pill{display:inline-flex;align-items:center;width:max-content;padding:.3rem .55rem;border-radius:999px;font-size:.68rem;font-weight:800;letter-spacing:.07em;text-transform:uppercase;background:rgba(148,163,184,.14);color:#cbd5e1}.status-pill--published{background:rgba(52,211,153,.14);color:#6ee7b7}.status-pill--testing{background:rgba(34,211,238,.14);color:#67e8f9}.status-pill--archived{opacity:.6}.course-warning,.course-ready{font-size:.78rem!important;margin:.1rem 0 .9rem!important}.course-warning{color:#fbbf24!important}.course-ready{color:#6ee7b7!important}.button--small{min-height:38px;padding:.55rem .8rem;font-size:.78rem}.editor-head{align-items:flex-end}.editor-head h1{margin:.45rem 0 0;font-size:clamp(1.7rem,3.4vw,2.6rem);line-height:1.08;max-width:100%;overflow-wrap:anywhere;word-break:break-word}.editor-head__actions{display:flex;gap:.7rem}.back-link{border:0;background:transparent;color:var(--color-info);padding:0;margin-bottom:.8rem;cursor:pointer}.editor-layout{display:grid;grid-template-columns:minmax(0,1fr) 350px;gap:1.25rem;align-items:start}.editor-main{display:grid;gap:1.25rem}.editor-sidebar{display:grid;gap:1.25rem;position:sticky;top:100px}.editor-panel{padding:1.35rem;border:1px solid var(--color-border);border-radius:var(--radius-lg);background:rgba(9,20,35,.92)}.panel-title{display:flex;align-items:center;gap:.9rem;margin-bottom:1.2rem}.panel-title h2,.panel-title p{margin:0}.panel-title p{color:var(--color-text-muted);font-size:.82rem;margin-top:.2rem}.panel-title--split{justify-content:space-between}.panel-title--split>.panel-title{margin:0}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}.field{display:grid;gap:.42rem}.field--wide{grid-column:1/-1}.field>span{font-size:.73rem;font-weight:750;letter-spacing:.06em;text-transform:uppercase;color:var(--color-text-muted)}.field input,.field textarea,.field select,.inline-form input{width:100%;border:1px solid var(--color-border);border-radius:10px;background:#081323;color:var(--color-text);padding:.8rem .9rem;font:inherit}.field textarea{resize:vertical}.field input:focus,.field textarea:focus,.field select:focus,.inline-form input:focus{outline:2px solid var(--color-info);outline-offset:1px}.field small{color:var(--color-text-muted)}.form-actions{display:flex;justify-content:flex-end;gap:.7rem;margin-top:.3rem}.toggle-field{display:flex;gap:.65rem;align-items:center;margin:.8rem 0;color:var(--color-text-muted);font-size:.88rem}.editor-sidebar h3{font-size:.85rem;text-transform:uppercase;letter-spacing:.08em;margin:1.35rem 0 .75rem}.chapter-editor-list,.question-editor-list{display:grid;gap:.55rem}.chapter-editor-row{display:grid;grid-template-columns:48px 1fr auto 40px;align-items:center;gap:.8rem;padding:.75rem;border:1px solid var(--color-border);border-radius:12px}.chapter-editor-row div{display:grid}.chapter-editor-row small{color:var(--color-text-muted);margin-top:.25rem}.chapter-code{display:grid;place-items:center;aspect-ratio:1;border-radius:9px;background:rgba(34,211,238,.1);font-weight:800;color:var(--color-info)}.inline-form{display:grid;grid-template-columns:100px 1fr 1.4fr auto;gap:.6rem;margin-top:1rem}.question-editor-row{display:grid;grid-template-columns:68px minmax(0,1fr) auto 20px;align-items:center;gap:.8rem;width:100%;padding:.85rem;border:1px solid var(--color-border);border-radius:12px;background:rgba(5,15,27,.65);color:var(--color-text);text-align:left;cursor:pointer}.question-editor-row:hover{border-color:var(--color-info);transform:translateX(3px)}.question-editor-row>span:nth-child(2){display:grid;gap:.25rem}.question-editor-row small{color:var(--color-text-muted)}.readiness-panel{padding:1rem 1.2rem;margin-bottom:1.2rem;border:1px solid rgba(251,191,36,.35);border-radius:12px;background:rgba(251,191,36,.07);color:#fde68a}.readiness-panel ul{margin:.5rem 0 0;padding-left:1.2rem}.danger-zone{display:grid;gap:.65rem}.empty-state{text-align:center;padding:2.5rem;color:var(--color-text-muted)}.question-form{max-width:980px;margin:auto}.question-form .form-actions{margin-top:1.2rem}
@media(max-width:1100px){.course-grid{grid-template-columns:repeat(2,minmax(0,1fr))}.editor-layout{grid-template-columns:1fr}.editor-sidebar{position:static;grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:720px){.course-grid{grid-template-columns:1fr}.studio-toolbar,.editor-head{align-items:stretch;flex-direction:column}.editor-head__actions{display:grid}.form-grid{grid-template-columns:1fr}.field--wide{grid-column:auto}.editor-sidebar{grid-template-columns:1fr}.inline-form{grid-template-columns:1fr}.chapter-editor-row{grid-template-columns:42px 1fr 36px}.chapter-editor-row>span:nth-child(3){display:none}.question-editor-row{grid-template-columns:55px minmax(0,1fr) 20px}.question-editor-row .status-pill{display:none}}

.studio-toolbar__actions{display:flex!important;flex-direction:row;gap:.65rem}.course-import{display:flex;align-items:center;justify-content:space-between;gap:1rem;margin:-.7rem 0 1.5rem;padding:1rem 1.2rem;border:1px solid rgba(52,211,153,.35);border-radius:12px;background:rgba(52,211,153,.07)}.course-import>div{display:flex;align-items:center;gap:.7rem}.course-import span{display:block;margin-top:.25rem;color:var(--color-text-muted);font-size:.8rem}.course-import--error{border-color:rgba(255,107,122,.4);background:rgba(255,107,122,.07)}.version-list{display:grid;gap:.55rem}.version-list>div{display:flex;align-items:center;justify-content:space-between;gap:.6rem;padding:.65rem;border:1px solid var(--color-border);border-radius:10px}.version-list span{display:grid;gap:.15rem}.version-list small{color:var(--color-text-muted)}
@media(max-width:720px){.studio-toolbar__actions,.course-import,.course-import>div{align-items:stretch;flex-direction:column}.studio-toolbar__actions .button{text-align:center}}
.danger-hint{color:var(--color-text-muted);font-size:.72rem;line-height:1.45}
.account-button{display:flex;align-items:center;gap:.5rem;min-height:38px;padding:.45rem .75rem;border:1px solid var(--color-border);border-radius:999px;background:rgba(8,19,35,.75);color:var(--color-text-muted);cursor:pointer}.account-button__dot{width:8px;height:8px;border-radius:50%;background:#64748b;box-shadow:0 0 0 4px rgba(100,116,139,.12)}.account-button.is-online{color:var(--color-text)}.account-button.is-online .account-button__dot{background:#34d399;box-shadow:0 0 0 4px rgba(52,211,153,.12)}.account-button__label{max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.75rem;font-weight:750}.auth-scene{display:grid;place-items:center;min-height:calc(100vh - 160px)}.auth-panel{display:grid;grid-template-columns:minmax(0,1fr);gap:1rem;width:min(100%,520px);min-width:0;padding:2rem;overflow:hidden;border:1px solid var(--color-border);border-radius:var(--radius-lg);background:rgba(9,20,35,.96);box-shadow:0 30px 80px rgba(0,0,0,.32)}.auth-panel>*{min-width:0;max-width:100%}.auth-panel h1,.auth-panel p{margin:0}.auth-panel h1{font-size:clamp(2.3rem,8vw,4.4rem);overflow-wrap:anywhere}.auth-panel p{color:var(--color-text-muted);line-height:1.6}.auth-panel code{color:var(--color-info)}.auth-panel .field,.auth-panel .field input,.auth-panel .button--wide{width:100%;min-width:0}.auth-actions{display:grid;gap:.75rem}.auth-actions .button{width:100%}.auth-register{text-align:center;font-size:.86rem}.auth-register button{padding:.15rem;border:0;border-bottom:1px solid currentColor;background:transparent;color:var(--color-info);font:inherit;font-weight:800;cursor:pointer}.auth-register button:hover{color:var(--color-text)}.auth-tabs{display:grid;grid-template-columns:1fr 1fr;gap:.35rem;padding:.3rem;border:1px solid var(--color-border);border-radius:12px;background:rgba(2,8,18,.6)}.auth-tab{padding:.7rem;border:0;border-radius:8px;background:transparent;color:var(--color-text-muted);font:inherit;font-size:.82rem;font-weight:800;cursor:pointer}.auth-tab.is-active{background:var(--color-accent);color:#07111f}.auth-error,.auth-notice{padding:.8rem 1rem;border-radius:10px;font-size:.85rem}.auth-error{border:1px solid rgba(255,107,122,.4);background:rgba(255,107,122,.08);color:#fecdd3}.auth-notice{border:1px solid rgba(52,211,153,.4);background:rgba(52,211,153,.08);color:#a7f3d0}.hero-login{margin-top:1rem}.account-button:not(.is-online){border-color:rgba(255,106,42,.55);background:rgba(255,106,42,.12);color:var(--color-text)}@media(max-width:720px){.account-button__label{display:inline}.account-button{padding:.55rem .7rem}.auth-actions{display:grid}.auth-panel{padding:1.25rem}.auth-panel h1{font-size:clamp(2rem,12vw,3.4rem)}}
.registration-qr{display:grid;justify-items:center;gap:.65rem;padding:1rem;border:1px solid var(--color-border);border-radius:var(--radius-md);background:#fff;color:#07111f}.registration-qr img{display:block;width:min(100%,280px);height:auto}.registration-qr small{font-weight:800}
.help-link{display:inline-flex;align-items:center;min-height:38px;padding:.45rem .8rem;border:1px solid var(--color-border);border-radius:999px;color:var(--color-text-muted);font-size:.72rem;font-weight:800;letter-spacing:.06em;text-decoration:none;text-transform:uppercase}.help-link:hover{border-color:var(--color-info);color:var(--color-text)}.help-header>a:last-child{justify-self:end}.help-page{width:min(100%,90rem);margin:0 auto;padding:clamp(2rem,6vw,5.5rem) clamp(1rem,5vw,4.5rem) 7rem}.help-hero{max-width:68rem;padding:clamp(2rem,6vh,5rem) 0}.help-hero h1{font-size:clamp(3rem,8vw,7rem)}.help-nav{position:sticky;top:5.4rem;z-index:20;display:flex;gap:.5rem;margin-bottom:4rem;padding:.65rem;overflow-x:auto;border:1px solid var(--color-border);border-radius:999px;background:rgba(3,9,20,.86);backdrop-filter:blur(16px)}.help-nav a{flex:0 0 auto;padding:.65rem 1rem;border-radius:999px;color:var(--color-text-muted);font-size:.76rem;font-weight:800;text-decoration:none}.help-nav a:hover{background:var(--color-surface-elevated);color:var(--color-text)}.help-section{display:grid;grid-template-columns:5rem minmax(0,1fr);gap:clamp(1.5rem,5vw,5rem);padding:clamp(2.5rem,7vw,6rem) 0;border-top:1px solid var(--color-border)}.help-section>div{max-width:66rem}.help-section h2{margin-bottom:1.5rem;font-size:clamp(2rem,5vw,4.2rem)}.help-section p{color:var(--color-text-muted);font-size:1rem;line-height:1.75}.help-number{color:var(--color-info);font-family:var(--font-mono);font-size:.8rem}.process-list{display:grid;gap:.75rem;margin:2rem 0;padding:0;counter-reset:help-step;list-style:none}.process-list li{counter-increment:help-step;display:grid;grid-template-columns:2.5rem minmax(0,1fr);gap:.2rem 1rem;padding:1rem;border:1px solid var(--color-border);border-radius:var(--radius-md);background:rgba(13,27,42,.6)}.process-list li:before{content:counter(help-step,decimal-leading-zero);grid-row:1/3;color:var(--color-info);font-family:var(--font-mono)}.process-list span{color:var(--color-text-muted);line-height:1.55}.help-callout{padding:1.25rem;border-left:3px solid var(--color-info);background:rgba(89,217,255,.07);color:var(--color-text-muted);line-height:1.6}.help-card-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:1rem}.help-card-grid article{padding:1.4rem;border:1px solid var(--color-border);border-radius:var(--radius-lg);background:rgba(13,27,42,.64)}.help-card-grid article p{margin:0;font-size:.92rem}.help-section details{margin:.75rem 0;border:1px solid var(--color-border);border-radius:var(--radius-md);background:rgba(9,20,35,.78)}.help-section summary{padding:1.1rem 1.2rem;font-weight:800;cursor:pointer}.help-section details p{margin:0;padding:0 1.2rem 1.2rem}.role-table{display:grid;gap:.65rem}.role-table>div{display:grid;grid-template-columns:10rem minmax(0,1fr);gap:1rem;padding:1rem 1.2rem;border-bottom:1px solid var(--color-border)}.role-table span,.help-list{color:var(--color-text-muted);line-height:1.65}.help-list{display:grid;gap:.6rem}.faq-list{display:grid;gap:.5rem}.help-footer{display:flex;align-items:end;justify-content:space-between;gap:2rem;padding:4rem 0 0;border-top:1px solid var(--color-border)}.help-footer h2{margin-bottom:.6rem}.help-footer p{margin:0;color:var(--color-text-muted)}@media(max-width:720px){.help-link{padding:.5rem;font-size:0}.help-link:after{content:"?";font-size:.9rem}.help-header .header-mode{display:none}.help-section{grid-template-columns:1fr;gap:1rem}.help-number{display:none}.help-card-grid{grid-template-columns:1fr}.role-table>div{grid-template-columns:1fr;gap:.35rem}.help-footer{align-items:stretch;flex-direction:column}.help-footer .button{width:100%}.help-nav{top:4.9rem;border-radius:14px}}
.consent-row{display:flex;align-items:flex-start;gap:.7rem;color:var(--color-text-muted);font-size:.82rem;line-height:1.45}.consent-row input{margin-top:.2rem}.qr-result{align-content:start}.qr-result img{width:min(100%,280px);height:auto;padding:12px;border-radius:14px;background:#fff}.request-list{display:grid;gap:.75rem}.request-card{display:flex;align-items:center;justify-content:space-between;gap:1rem;padding:1rem;border:1px solid var(--color-border);border-radius:12px;background:rgba(8,19,35,.72)}.request-card>div:first-child{display:grid;gap:.25rem}.request-card span,.request-card small{color:var(--color-text-muted)}.request-actions{display:flex;gap:.5rem;flex-wrap:wrap}.empty-state{color:var(--color-text-muted)}@media(max-width:720px){.request-card{align-items:stretch;flex-direction:column}}

.sequence-list,.matching-list{display:grid;gap:.7rem}.sequence-item{display:grid;grid-template-columns:42px 1fr auto;align-items:center;gap:.8rem;padding:.8rem;border:1px solid var(--color-border);border-radius:12px;background:rgba(5,15,27,.72)}.sequence-item>span{display:grid;place-items:center;width:34px;height:34px;border-radius:50%;background:rgba(34,211,238,.1);color:var(--color-info);font-family:var(--font-mono);font-weight:800}.sequence-item>div{display:flex;gap:.35rem}.sequence-item .icon-button:disabled{opacity:.25}.matching-list label{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.2fr);align-items:center;gap:1rem;padding:.8rem;border:1px solid var(--color-border);border-radius:12px;background:rgba(5,15,27,.72)}.matching-list label>span{font-weight:750}.matching-list select{width:100%;padding:.75rem;border:1px solid var(--color-border-strong);border-radius:9px;background:var(--color-bg-deep);color:var(--color-text)}.editor-hint{padding:.8rem 1rem;border-left:3px solid var(--color-info);background:rgba(34,211,238,.06)}.editor-hint span{font-size:.82rem!important;line-height:1.5;text-transform:none!important;letter-spacing:0!important}.editor-hint strong{color:var(--color-info)}
@media(max-width:720px){.matching-list label{grid-template-columns:1fr}.sequence-item{grid-template-columns:34px 1fr auto}}

.media-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.75rem}.media-card{position:relative;overflow:hidden;border:1px solid var(--color-border);border-radius:12px;background:rgba(5,15,27,.72)}.media-card img{display:block;width:100%;aspect-ratio:16/10;object-fit:cover}.media-card>div{display:grid;gap:.2rem;padding:.7rem}.media-card small{overflow:hidden;color:var(--color-text-muted);text-overflow:ellipsis}.media-card>.icon-button{position:absolute;top:.4rem;right:.4rem;background:rgba(3,9,20,.84)}.image-choice-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:.8rem}.image-choice{position:relative;display:grid;overflow:hidden;border:2px solid var(--color-border);border-radius:14px;background:rgba(5,15,27,.75);cursor:pointer}.image-choice:has(input:checked){border-color:var(--color-info);box-shadow:0 0 0 3px rgba(34,211,238,.12)}.image-choice input{position:absolute;top:.7rem;left:.7rem;z-index:2;width:1.2rem;height:1.2rem}.image-choice img{display:block;width:100%;aspect-ratio:16/10;object-fit:cover}.image-choice>span{padding:.75rem;font-weight:750}.image-choice.is-correct{border-color:var(--color-success)}.image-choice.is-wrong{border-color:var(--color-danger)}
@media(max-width:720px){.media-grid,.image-choice-grid{grid-template-columns:1fr}}

.hotspot-stage,.hotspot-editor-stage{position:relative;display:block;width:100%;padding:0;overflow:hidden;border:2px solid var(--color-border);border-radius:14px;background:#030914;cursor:crosshair}.hotspot-stage img,.hotspot-editor-stage img{display:block;width:100%;height:auto;max-height:34rem;object-fit:contain}.hotspot-marker{position:absolute;width:22px;height:22px;border:3px solid white;border-radius:50%;background:var(--color-accent);box-shadow:0 0 0 5px rgba(255,106,42,.25);transform:translate(-50%,-50%)}.hotspot-solution{position:absolute;border:3px solid var(--color-success);border-radius:50%;background:rgba(52,211,153,.15);transform:translate(-50%,-50%)}.hotspot-editor-fields{padding:1rem;border:1px solid var(--color-border);border-radius:12px;background:rgba(34,211,238,.04)}.hotspot-editor-fields>label{display:grid;gap:.4rem}.hotspot-editor-fields select,.hotspot-values input{width:100%;padding:.75rem;border:1px solid var(--color-border-strong);border-radius:9px;background:var(--color-bg-deep);color:var(--color-text)}.hotspot-values{display:grid;grid-template-columns:repeat(3,1fr);gap:.7rem}.hotspot-values label{display:grid;gap:.35rem}.hotspot-values span{color:var(--color-text-muted);font-size:.72rem}.hotspot-editor-stage{--hotspot-x:50%;--hotspot-y:50%;--hotspot-radius:10%}.hotspot-editor-stage>span{position:absolute;left:var(--hotspot-x);top:var(--hotspot-y);width:calc(var(--hotspot-radius) * 2);aspect-ratio:1;border:3px solid var(--color-accent);border-radius:50%;background:rgba(255,106,42,.18);transform:translate(-50%,-50%)}
@media(max-width:720px){.hotspot-values{grid-template-columns:1fr}}

.media-thumb,.cropped-image,.crop-preview{position:relative;display:block;overflow:hidden;background:#020611}.media-thumb--landscape,.image-choice--landscape .cropped-image,.hotspot-stage--landscape,.crop-preview--landscape{aspect-ratio:16/9}.media-thumb--portrait,.image-choice--portrait .cropped-image,.hotspot-stage--portrait,.crop-preview--portrait{aspect-ratio:4/5}.media-thumb img,.cropped-image img,.crop-preview img{position:absolute;inset:0;width:100%!important;height:100%!important;max-height:none!important;object-fit:cover!important;object-position:var(--x,50%) var(--y,50%);transform:scale(var(--zoom,1));transform-origin:var(--x,50%) var(--y,50%)}.media-card>.media-thumb{border-radius:0}.media-card__buttons{position:absolute;top:.4rem;right:.4rem;display:flex;gap:.3rem}.media-card__buttons .icon-button{background:rgba(3,9,20,.84)}.media-editor{max-width:1200px}.media-editor-layout{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:1.25rem;align-items:start}.crop-workspace{display:grid;place-items:center;padding:1.2rem;border:1px solid var(--color-border);border-radius:var(--radius-lg);background:rgba(5,15,27,.72)}.crop-preview{width:min(100%,760px);--x:var(--crop-x);--y:var(--crop-y);--zoom:var(--crop-zoom);box-shadow:0 24px 60px rgba(0,0,0,.35)}.crop-grid{position:absolute;inset:0;background:linear-gradient(90deg,transparent 33.1%,rgba(255,255,255,.35) 33.3%,transparent 33.5%,transparent 66.4%,rgba(255,255,255,.35) 66.6%,transparent 66.8%),linear-gradient(0deg,transparent 33.1%,rgba(255,255,255,.35) 33.3%,transparent 33.5%,transparent 66.4%,rgba(255,255,255,.35) 66.6%,transparent 66.8%);pointer-events:none}.crop-workspace p{color:var(--color-text-muted);font-size:.82rem}.crop-controls{display:grid;gap:1.15rem;position:sticky;top:100px}.range-field{display:grid;gap:.55rem}.range-field>span{display:flex;justify-content:space-between;color:var(--color-text-muted);font-size:.78rem}.range-field output{color:var(--color-info);font-family:var(--font-mono)}.range-field input{width:100%;accent-color:var(--color-accent)}
@media(max-width:860px){.media-editor-layout{grid-template-columns:1fr}.crop-controls{position:static}}
/* V10.8: Kopfzeile auf schmalen Smartphones ohne horizontales Scrollen */
@media(max-width:480px){.app-header{grid-template-columns:minmax(0,1fr) auto}.brand{gap:.5rem;min-width:0}.brand small{letter-spacing:.14em}.header-actions{gap:.3rem;min-width:0}.account-button{padding:.5rem .6rem}.account-button__label{max-width:92px}.icon-button{min-width:34px;padding-inline:.4rem}}

/* V10.13: Helles Farbschema. Markenfarben bleiben als Akzente erhalten;
   dunklere Ink-Töne sichern auf hellen Flächen die Textkontraste. */
[data-theme="light"] body{background:radial-gradient(circle at 50% -10%,rgba(89,217,255,.16),transparent 44rem),linear-gradient(155deg,var(--color-bg) 0%,var(--color-bg-deep) 100%)}
[data-theme="light"] .ambient__grid{opacity:.28;background-image:linear-gradient(rgba(0,107,133,.11) 1px,transparent 1px),linear-gradient(90deg,rgba(0,107,133,.11) 1px,transparent 1px)}
[data-theme="light"] .app-header{border-color:rgba(143,163,184,.55);background:rgba(255,255,255,.82)}
[data-theme="light"] .accent-text{color:#c43f18}
[data-theme="light"] .eyebrow,[data-theme="light"] .back-link,[data-theme="light"] .help-number,[data-theme="light"] .range-field output,[data-theme="light"] .editor-hint strong,[data-theme="light"] .chapter-card__code,[data-theme="light"] .stage-meta__chapter,[data-theme="light"] .rule-list strong,[data-theme="light"] .catalog-step,[data-theme="light"] .file-drop>span,[data-theme="light"] .chapter-code,[data-theme="light"] .sequence-item>span,[data-theme="light"] .auth-panel code,[data-theme="light"] .auth-register button,[data-theme="light"] .user-admin-search>span:last-child,[data-theme="light"] .process-list li:before{color:#006b85}
[data-theme="light"] .icon-button[aria-pressed="true"]{color:#006b85}
[data-theme="light"] .mode-card{background:linear-gradient(135deg,rgba(255,255,255,.98),rgba(238,243,248,.96))}
[data-theme="light"] .mode-card--catalog .arrow{background:var(--color-info);color:var(--color-on-accent)}
[data-theme="light"] .recommendation,[data-theme="light"] .chapter-card,[data-theme="light"] .catalog-panel,[data-theme="light"] .question-card,[data-theme="light"] .result-card,[data-theme="light"] .review-card,[data-theme="light"] .certificate-card{background:rgba(255,255,255,.88)}
[data-theme="light"] .editor-panel,[data-theme="light"] .auth-panel,[data-theme="light"] .confirm-dialog form{background:rgba(255,255,255,.97)}
[data-theme="light"] .course-card{background:linear-gradient(145deg,rgba(255,255,255,.98),rgba(232,237,244,.94))}
[data-theme="light"] .role-admin-row,[data-theme="light"] .request-card,[data-theme="light"] .sequence-item,[data-theme="light"] .matching-list label,[data-theme="light"] .media-card,[data-theme="light"] .image-choice,[data-theme="light"] .crop-workspace,[data-theme="light"] .question-editor-row{background:rgba(255,255,255,.78)}
[data-theme="light"] .account-button,[data-theme="light"] .user-role-tab,[data-theme="light"] .auth-tabs,[data-theme="light"] .help-nav{background:rgba(255,255,255,.76)}
[data-theme="light"] .field input,[data-theme="light"] .field textarea,[data-theme="light"] .field select,[data-theme="light"] .inline-form input,[data-theme="light"] .role-admin-row select,[data-theme="light"] .user-admin-search input,[data-theme="light"] .matching-list select,[data-theme="light"] .hotspot-editor-fields select,[data-theme="light"] .hotspot-values input{background:#fff;color:var(--color-text)}
[data-theme="light"] .status-pill{color:#34495e}[data-theme="light"] .status-pill--published,[data-theme="light"] .course-ready{color:#0f7047!important}[data-theme="light"] .status-pill--testing{color:#006b85}[data-theme="light"] .status-pill--review{color:#6941a5}
[data-theme="light"] .auth-error{color:#8f1830}[data-theme="light"] .auth-notice{color:#0f7047}[data-theme="light"] .readiness-panel{color:#704800}
[data-theme="light"] .button--ghost{background:rgba(255,255,255,.5)}
[data-theme="light"] .account-notification,[data-theme="light"] .editor-hint,[data-theme="light"] .help-callout{background:rgba(89,217,255,.12)}
[data-theme="light"] .help-card-grid article,[data-theme="light"] .help-section details,[data-theme="light"] .process-list li{background:rgba(255,255,255,.72)}
[data-theme="light"] .toast{background:#fff;color:var(--color-text);box-shadow:var(--shadow-card)}

/* V10.13.1: Komponenten mit fest codierten Dark-Flächen explizit aufhellen. */
[data-theme="light"] .catalog-metrics .metric{background:rgba(255,255,255,.9)}
[data-theme="light"] .file-drop{background:#f5f8fb}
[data-theme="light"] .file-drop:hover{background:rgba(89,217,255,.13)}
[data-theme="light"] .import-preview,[data-theme="light"] .result-panel,[data-theme="light"] .gate-panel,[data-theme="light"] .review-item{background:rgba(255,255,255,.9)}
[data-theme="light"] .catalog-table th{background:#e7edf4;color:#435970}
[data-theme="light"] .catalog-table td{background:rgba(255,255,255,.72)}
[data-theme="light"] .user-role-tab span{background:rgba(20,32,51,.08)}
[data-theme="light"] .admin-tabs .user-role-tab{background:#fff}
[data-theme="light"] .admin-tabs .user-role-tab.is-active:not(.tab--alert){background:#fff;border-color:var(--color-info)}
[data-theme="light"] .admin-tabs .user-role-tab.tab--alert{border-color:var(--color-accent);background:var(--color-accent);color:var(--color-on-accent)}
[data-theme="light"] .admin-tabs .user-role-tab.tab--alert span{background:rgba(255,255,255,.48);color:var(--color-on-accent)}
[data-theme="light"] .last-result,[data-theme="light"] .answer{background:rgba(255,255,255,.76)}
[data-theme="light"] .answer:hover{background:#eef3f8}
@media(max-width:720px){.theme-toggle__label{display:none}.theme-toggle{padding-inline:.7rem}}

.header-path{text-transform:uppercase;letter-spacing:.06em;max-width:22rem;overflow:hidden;color:var(--color-info);font-size:.78rem;font-weight:700;text-overflow:ellipsis;white-space:nowrap}
@media(max-width:720px){.header-path{max-width:50vw}}

.course-card__actions--danger{margin-top:var(--space-2);padding-top:var(--space-3);border-top:1px solid var(--color-border)}

.course-group{margin-top:var(--space-8)}.course-group:first-of-type{margin-top:var(--space-4)}
.course-group__title{display:flex;align-items:center;gap:.7rem;margin:0 0 1rem;color:var(--color-text-muted);font-size:.78rem;font-weight:800;letter-spacing:.16em;text-transform:uppercase}
.course-group__title span{padding:.1rem .55rem;border:1px solid var(--color-border);border-radius:999px;font-size:.7rem;letter-spacing:.04em}
.course-group--archived{margin-top:var(--space-10,3rem);padding-top:var(--space-8);border-top:1px solid var(--color-border)}
.course-group--archived .course-card{opacity:.72}

/* V10.14.15: "← Alle Kurse" und Eyebrow (z. B. KURS-EDITOR) stehen auf einer Linie */
.editor-head > div:first-child { display: flex; flex-wrap: wrap; align-items: center; column-gap: 1.25rem; }
.editor-head > div:first-child .back-link { margin-bottom: 0; line-height: 1; }
.editor-head > div:first-child .eyebrow { margin-bottom: 0; line-height: 1; }
.editor-head > div:first-child h1 { flex: 0 0 100%; margin-top: 1rem; }

/* V10.14.16 Barrierefreiheit: Ränder von Bedienelementen >= 3:1, Mindestschriftgröße, Touch-Ziele */
.answer, .button--ghost, .icon-button, .account-button, .help-link, .theme-toggle { border-color: var(--color-border-strong); }
.last-result span, .last-result small, .recommendation small, .chapter-card__progress span, .timer small, .catalog-table th { font-size: .75rem; }
.brand small, .header-mode, .question-kind, .badge, .eyebrow, .status-pill { font-size: .75rem; }
.account-button, .help-link, .icon-button, .theme-toggle { min-height: 44px; }
[data-theme="light"] .accent-text { color: #c2410c; }

/* V10.14.16 Startseite: klare Hauptaktion */
.mode-card--primary { border-color: var(--color-info); box-shadow: 0 0 0 1px rgba(89,217,255,.35), var(--shadow-card); }
.mode-card__tag { display: inline-block; margin-left: .5rem; padding: .12rem .55rem; border: 1px solid currentColor; border-radius: 999px; color: var(--color-info); font-size: .75rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; vertical-align: middle; }
[data-theme="light"] .mode-card__tag { color: #006b85; }
.chapter-card--next { border-color: var(--color-info); }

.hotspot-hint { margin: .75rem 0 0; color: var(--color-text-muted); font-size: .85rem; line-height: 1.5; }
.hotspot-stage:focus-visible { outline: .1875rem solid var(--color-focus); outline-offset: .25rem; }

/* V10.14.20 Fußzeile, Cookie-Dialog, Rechtliches */
.site-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-4) var(--space-8); width: min(100%, 90rem); margin: 0 auto; padding: var(--space-8) clamp(1rem, 5vw, 4.5rem) var(--space-12); border-top: 1px solid var(--color-border); color: var(--color-text-muted); font-size: .9rem; }
.site-footer ul { display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); margin: 0; padding: 0; list-style: none; }
.site-footer a, .site-footer__button { display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none; color: var(--color-text-muted); font: inherit; text-decoration: underline; text-underline-offset: .2em; cursor: pointer; }
.site-footer a:hover, .site-footer__button:hover, .site-footer a[aria-current="page"] { color: var(--color-text); }
.site-footer__note { margin: 0; font-size: .8rem; }
.cookie-dialog h2 { margin-top: 0; }
.cookie-dialog h3 { margin: var(--space-6) 0 var(--space-2); font-size: 1rem; }
.cookie-list { margin: 0 0 var(--space-4); padding-left: 1.2rem; color: var(--color-text-muted); line-height: 1.6; }
.cookie-dialog a { color: var(--color-info); }
[data-theme="light"] .cookie-dialog a { color: #006b85; }
.legal-page h3 { margin: var(--space-6) 0 var(--space-2); }
body.exam-active .site-footer { display: none; }
@media print { .site-footer { display: none !important; } }

/* Vorschau-Modus für Redaktion und Fachprüfung */
.preview-banner{display:flex;flex-wrap:wrap;align-items:center;justify-content:space-between;gap:.75rem 1rem;margin:0 0 var(--space-5,1.5rem);padding:.85rem 1.1rem;border:1px solid var(--color-border-strong);border-left:4px solid #f5b83d;border-radius:14px;background:color-mix(in srgb,#f5b83d 12%,var(--color-surface,transparent))}
.preview-banner>div{display:flex;flex-wrap:wrap;align-items:baseline;gap:.35rem .8rem;min-width:0}
.preview-banner strong{font-size:.78rem;font-weight:800;letter-spacing:.16em;text-transform:uppercase}
.preview-banner span{font-size:.875rem;color:var(--color-text-muted)}

.form-feedback{grid-column:1/-1;margin:.25rem 0 0;padding:.8rem 1rem;border-radius:12px;border:1px solid var(--color-border-strong);font-size:.9rem;line-height:1.5}
.form-feedback--error{border-color:#e5736a;background:color-mix(in srgb,#e5736a 14%,transparent)}
.form-feedback--success{border-color:#5cc08a;background:color-mix(in srgb,#5cc08a 14%,transparent)}

.sequence-hint{margin:0 0 .75rem;color:var(--color-text-muted);font-size:.875rem}
.sequence-item:focus-visible{outline:3px solid var(--color-focus,#7cc7ff);outline-offset:2px}


/* A11: eingebetteter, interaktiver Lernbaustein vor der TRM-Spannungstrichterfrage. */
.lesson-animation {
  margin: 0 0 1.5rem;
  padding: 1.25rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-card);
}
.lesson-animation__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}
.lesson-animation__header h2 {
  margin: .35rem 0 .4rem;
  font-size: clamp(1.25rem, 2.4vw, 1.8rem);
  line-height: 1.2;
}
.lesson-animation__header p {
  margin: 0;
  color: var(--color-text-muted);
  line-height: 1.5;
  font-size: .9rem;
}
.lesson-animation__duration {
  flex: 0 0 auto;
  padding: .45rem .7rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--color-border);
  font-size: .75rem;
  color: var(--color-text-muted);
}
.lesson-animation__frame {
  display: block;
  width: 100%;
  height: 660px;
  border: 0;
  border-radius: var(--radius-md);
  background: #081522;
}
@media (max-width: 850px) {
  .lesson-animation__header { flex-direction: column; }
  .lesson-animation__frame { height: 940px; }
}
@media (max-width: 500px) {
  .lesson-animation { padding: .7rem; }
  .lesson-animation__frame { height: 990px; }
}

.registration-alt{margin:.25rem 0 0;color:var(--color-text-muted);font-size:.9rem;text-align:center}
.registration-alt a{color:var(--color-info,#59d9ff);font-weight:700}
.registration-other-device{margin:.5rem 0;padding:.9rem 1rem;border:1px solid var(--color-border);border-radius:var(--radius-md,14px)}
.registration-other-device summary{cursor:pointer;min-height:44px;display:flex;align-items:center;font-weight:700}
.registration-other-device[open] summary{margin-bottom:.5rem}
.registration-other-device .button{margin-top:.75rem}

/* V10.9: Mein Weg */
.mode-card--path::before { background: radial-gradient(circle, rgba(72,229,155,.16), transparent 62%); }
.mode-card--path .arrow { background: var(--color-success); }
.path-hint { margin-bottom: var(--space-6); }
.path-grid { display: grid; gap: var(--space-6); grid-template-columns: repeat(auto-fit, minmax(min(100%, 26rem), 1fr)); }
.path-course { padding: var(--space-6); border: 1px solid var(--color-border); border-radius: var(--radius-lg); background: var(--color-surface-glass); }
.path-course h2 { margin: 0 0 var(--space-2); font-size: 1.5rem; }
.path-course header p { margin: 0 0 var(--space-4); color: var(--color-text-muted); line-height: 1.5; }
.path-course h3 { margin: var(--space-6) 0 var(--space-2); font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--color-text-subtle); }
.path-bar { height: .6rem; overflow: hidden; border-radius: var(--radius-pill); background: var(--color-border); }
.path-bar span { display: block; height: 100%; border-radius: inherit; background: var(--color-success); }
.path-chapters, .path-exams { margin: var(--space-4) 0 0; padding: 0; list-style: none; }
.path-chapter { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr) 4rem 4rem; gap: var(--space-3); align-items: center; padding: var(--space-3) 0; border-top: 1px solid var(--color-border); }
.path-chapter--head { border-top: 0; padding-top: 0; color: var(--color-text-subtle); font-size: .72rem; text-transform: uppercase; letter-spacing: .12em; }
.path-chapter__status { color: var(--color-text-subtle); font-weight: 800; }
.path-chapter.is-done .path-chapter__status { color: var(--color-success); }
.path-chapter__count, .path-chapter__accuracy { font-family: var(--font-mono); text-align: right; }
.path-exams li { display: flex; gap: var(--space-3); align-items: baseline; padding: var(--space-2) 0; border-top: 1px solid var(--color-border); }
.path-exams small { margin-left: auto; color: var(--color-text-subtle); }
@media (max-width: 520px) { .path-chapter { grid-template-columns: 1.25rem minmax(0, 1fr) 3rem 3rem; gap: var(--space-2); } .path-course { padding: var(--space-4); } }
.role-admin-row .button--ghost { white-space: nowrap; }
@media (min-width: 721px) { .role-admin-row { grid-template-columns: minmax(0, 1fr) 12rem auto auto; } }
