/*
 * ============================================================
 * GERMAN PLACEMENT TEST PAGE
 * A single-page flow (intro → levels → exam → transition →
 * completion) toggled by js/pages/placement-test.js. Only one
 * `.test-screen` is visible at a time.
 * ============================================================
 */

body.page-placement-test .mouse-grid-bg { opacity: 0.45; }

/* ============================================================
   EXAM MODE — a focused, app-like shell for the actual exam and the
   transition between its sections (toggled on `<body>` by `showScreen()`
   in placement-test.js). Nothing here replaces the site's design system —
   it's the same header, same tokens, same fonts — it just quiets down
   ordinary site navigation and decoration so starting the exam reads as
   "entering a workspace," not "still browsing the marketing site." The
   logo (still a way home) and the theme toggle (a comfort control, not
   navigation) are deliberately left alone.
   ============================================================ */
body.is-exam-mode .mouse-grid-bg { opacity: 0.08; }
body.is-exam-mode .main-nav,
body.is-exam-mode .header-actions .btn-cta,
body.is-exam-mode .header-divider,
body.is-exam-mode .sheet-link,
body.is-exam-mode .sheet-btn {
    display: none;
}

.test-shell {
    width: 100%;
    min-height: 100vh;
    padding: 150px 24px 80px;
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 20;
}

.test-screen {
    width: 100%;
    max-width: 1100px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* ============================================================
   INTRO SCREEN
   ============================================================ */
.test-intro-card {
    width: 100%;
    max-width: 720px;
    padding: 52px 56px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 16px;
    text-align: right;
}

.test-intro-title {
    font-family: var(--font-display-fa);
    font-size: 30px;
    font-weight: 900;
    color: var(--primary-navy);
    margin: 0;
}

.test-intro-desc {
    font-family: var(--font-body);
    font-size: 14.5px;
    line-height: 2;
    color: var(--ink-soft);
    margin: 0;
}

.test-intro-sections {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-top: 8px;
}
.test-intro-section-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 16px;
    background-color: var(--neutral-soft-bg);
    border: 1px solid var(--neutral-border);
    border-radius: var(--radius-sm);
}
.test-intro-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--accent-soft-bg);
    color: var(--accent-gold);
}
[data-theme="dark"] .test-intro-icon { background-color: var(--accent-soft-bg); }
.test-intro-icon svg { width: 18px; height: 18px; }
.test-intro-section-item strong {
    display: block;
    font-family: 'Kalameh', var(--font-mono);
    font-size: 13px;
    font-weight: 600;
    color: var(--primary-navy);
    direction: ltr;
}
.test-intro-section-item span {
    font-family: var(--font-body);
    font-size: 12px;
    color: var(--ink-soft);
}

.test-intro-notes {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
    width: 100%;
}
.test-intro-notes li {
    position: relative;
    padding-right: 20px;
    font-family: var(--font-body);
    font-size: 13px;
    line-height: 1.9;
    color: var(--ink-soft);
}
.test-intro-notes li::before {
    content: '•';
    position: absolute;
    right: 0;
    top: 0;
    color: var(--accent-gold);
    font-weight: 700;
}

.test-start-btn { align-self: center; margin-top: 8px; padding: 14px 44px; font-size: 15px; }

/* ============================================================
   LEVEL SELECTION SCREEN
   ============================================================ */
.test-levels-heading { align-items: center; text-align: center; margin: 0 auto 40px; max-width: 640px; }
.test-levels-heading p { margin: 0 auto; }

.test-level-grid {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}
.test-level-error {
    margin: 16px 0 0;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    background-color: var(--color-error-bg);
    color: var(--color-error);
    font-family: var(--font-body);
    font-size: 13px;
    text-align: center;
}
.test-intro-section-item.is-soon { opacity: 0.6; }

.test-level-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    text-align: right;
    padding: 22px 20px;
    background-color: var(--neutral-soft-bg);
    border: 1.5px solid var(--neutral-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease, background-color 0.4s ease;
}
.test-level-card:not(.is-disabled):hover {
    transform: translateY(-4px);
    border-color: var(--accent-gold);
    box-shadow: var(--glass-shadow-hover);
}
.test-level-card.is-disabled { opacity: 0.55; cursor: not-allowed; }

.test-level-code {
    font-family: 'Kalameh', var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--accent-gold);
    direction: ltr;
}
.test-level-label {
    font-family: var(--font-display-fa);
    font-size: 18px;
    font-weight: 800;
    color: var(--primary-navy);
    margin: 0;
}
.test-level-desc {
    font-family: var(--font-body);
    font-size: 12.5px;
    line-height: 1.8;
    color: var(--ink-soft);
    margin: 0;
    min-height: 54px;
}
.test-level-status {
    margin-top: 4px;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 700;
    color: var(--accent-gold);
}
.test-level-card.is-disabled .test-level-status { color: var(--ink-soft); }

/* ============================================================
   EXAM PREPARATION / CONFIRMATION SCREEN
   ============================================================ */
.test-confirm-card {
    width: 100%;
    max-width: 620px;
    padding: 48px 52px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 18px;
}
.test-confirm-card h2 {
    font-family: var(--font-display-fa);
    font-size: 24px;
    font-weight: 800;
    color: var(--primary-navy);
    margin: 0;
}
.test-confirm-card h2 span { color: var(--accent-gold); direction: ltr; display: inline-block; }

.test-confirm-stats { display: flex; gap: 36px; }
.test-confirm-stat { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.test-confirm-stat-num {
    font-family: 'Kalameh', var(--font-mono);
    font-size: 26px;
    font-weight: 800;
    line-height: 1.3;
    color: var(--primary-navy);
}
.test-confirm-stat-label { font-family: var(--font-body); font-size: 12px; color: var(--ink-soft); }

.test-confirm-notes {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin: 4px 0 0;
    padding: 0;
    list-style: none;
    width: 100%;
    text-align: right;
}
.test-confirm-notes li {
    position: relative;
    padding-right: 20px;
    font-family: var(--font-body);
    font-size: 13px;
    line-height: 1.9;
    color: var(--ink-soft);
}
.test-confirm-notes li::before {
    content: '•';
    position: absolute;
    right: 0;
    top: 0;
    color: var(--accent-gold);
    font-weight: 700;
}
.test-confirm-actions { display: flex; align-items: center; gap: 16px; margin-top: 8px; }

/* ============================================================
   EXAM SCREEN
   ============================================================ */
.test-exam-screen { max-width: 1180px; align-items: stretch; gap: 18px; }

.exam-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    padding: 16px 24px;
    background-color: var(--color-surface);
    border: 1px solid var(--neutral-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}
.exam-topbar-info { display: flex; align-items: center; gap: 12px; }
.exam-level-tag {
    font-family: 'Kalameh', var(--font-mono);
    font-size: 12px;
    font-weight: 700;
    padding: 5px 12px;
    border-radius: var(--radius-pill);
    background-color: var(--accent-soft-bg);
    color: var(--accent-gold);
    direction: ltr;
}
[data-theme="dark"] .exam-level-tag { background-color: var(--accent-soft-bg); }
.exam-section-name {
    font-family: var(--font-display-fa);
    font-size: 16px;
    font-weight: 800;
    color: var(--primary-navy);
}
.exam-progress {
    font-family: var(--font-body);
    font-size: 13px;
    font-weight: 600;
    color: var(--ink-soft);
}
.exam-topbar-actions { display: flex; align-items: center; gap: 18px; }
.exam-timer {
    font-family: 'Kalameh', var(--font-mono);
    font-size: 18px;
    font-weight: 600;
    color: var(--primary-navy);
    letter-spacing: 1px;
    direction: ltr;
}
.exam-timer.is-warning { color: var(--color-error); }
.exam-exit-btn { font-size: 12.5px; }

.exam-section-tabs {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
}
/* Status indicators, not navigation — plain `<span>`s in the markup, no
   `cursor: pointer`, no hover/focus affordance. A real exam doesn't let
   you jump to a section you haven't reached, or back into a finished one;
   the only legitimate way this state changes is via `enterSection()`. */
.exam-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    padding: 12px 10px;
    background-color: var(--neutral-soft-bg);
    border: 1.5px solid var(--neutral-border);
    border-radius: var(--radius-sm);
    font-family: inherit;
    transition: border-color 0.3s ease, background-color 0.3s ease, opacity 0.3s ease;
}
.exam-tab-name { font-family: 'Kalameh', var(--font-mono); font-size: 13px; font-weight: 600; color: var(--primary-navy); direction: ltr; }
.exam-tab-sub  { font-family: var(--font-body); font-size: 11.5px; color: var(--ink-soft); }
.exam-tab.is-active { border-color: var(--accent-gold); background-color: var(--color-surface-elevated); }
.exam-tab.is-complete .exam-tab-name::after { content: ' ✓'; color: var(--color-success); }
.exam-tab.is-locked { opacity: 0.5; border-style: dashed; }
/* The active section indicator is a functional "which step am I on" state
   during the exam — Dark Mode's primary (blue) accent, not the secondary
   burgundy the rest of the site's decorative borders still use. */
[data-theme="dark"] .exam-tab.is-active { border-color: var(--accent-blue); }

.exam-finish-section-btn { font-size: 12.5px; padding: 8px 16px; }

.exam-body {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 18px;
    align-items: start;
}

.exam-palette {
    padding: 20px;
    background-color: var(--color-surface);
    border: 1px solid var(--neutral-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}
.exam-palette-title {
    font-family: var(--font-body);
    font-size: 12.5px;
    font-weight: 700;
    color: var(--ink-soft);
    margin: 0 0 14px;
}
.exam-palette-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(34px, 1fr));
    gap: 8px;
}
.exam-palette-item {
    width: 100%;
    min-width: 0;
    aspect-ratio: 1;
    padding: 0;
    line-height: 1;
    border-radius: 50%;
    border: 1.5px solid var(--neutral-border);
    background-color: var(--neutral-soft-bg);
    color: var(--ink);
    font-family: 'Kalameh', var(--font-mono);
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
}
.exam-palette-item.is-current {
    background-color: var(--accent-gold);
    border-color: var(--accent-gold);
    color: #FFFFFF;
}
/* "Which question am I on" — a primary interactive indicator, same
   reasoning as .exam-tab.is-active above. */
[data-theme="dark"] .exam-palette-item.is-current {
    background-color: var(--accent-blue);
    border-color: var(--accent-blue);
}
.exam-palette-item.is-answered {
    background-color: var(--color-success-bg);
    border-color: var(--color-success);
    color: var(--color-success);
}
.exam-palette-legend {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid var(--neutral-border);
}
.exam-palette-legend span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 11.5px;
    color: var(--ink-soft);
}
.legend-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; border: 1.5px solid var(--neutral-border); }
.legend-dot.is-current    { background-color: var(--accent-gold); border-color: var(--accent-gold); }
.legend-dot.is-answered   { background-color: var(--color-success-bg); border-color: var(--color-success); }
/* Kept in sync with .exam-palette-item.is-current's own dark-mode color
   above, so the legend key actually matches what it's describing. */
[data-theme="dark"] .legend-dot.is-current { background-color: var(--accent-blue); border-color: var(--accent-blue); }
.legend-dot.is-unanswered { background-color: var(--neutral-soft-bg); }

.exam-question-panel {
    padding: 32px 36px;
    min-height: 360px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.exam-question-instructions {
    font-family: var(--font-body);
    font-size: 12.5px;
    font-weight: 600;
    color: var(--ink-soft);
    padding-bottom: 12px;
    border-bottom: 1px dashed var(--neutral-border);
}
.exam-passage {
    padding: 16px 20px;
    background-color: var(--neutral-soft-bg);
    border-right: 3px solid var(--accent-gold);
    border-radius: var(--radius-sm);
    font-family: 'Kalameh', var(--font-mono);
    font-size: 14px;
    line-height: 1.9;
    color: var(--ink);
    direction: ltr;
    text-align: left;
}
.exam-passage-transcript { margin-top: -2px; }
.exam-passage-label {
    display: block;
    margin-bottom: 8px;
    font-family: var(--font-body);
    font-size: 11px;
    font-weight: 700;
    color: var(--ink-soft);
    direction: rtl;
    text-align: right;
}
.exam-question-prompt {
    font-family: var(--font-display-fa);
    font-size: 17px;
    font-weight: 700;
    color: var(--primary-navy);
    margin: 0;
    line-height: 1.8;
}
.exam-answer-textarea { min-height: 160px; }

.exam-options { display: flex; flex-direction: column; gap: 10px; }
.exam-option {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background-color: var(--color-input-bg);
    border: 1.5px solid var(--color-input-border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font-body);
    font-size: 14px;
    color: var(--ink);
    transition: border-color 0.25s ease, background-color 0.25s ease;
}
.exam-option:hover { border-color: var(--accent-gold); }
.exam-option input { accent-color: var(--accent-gold); width: 17px; height: 17px; flex-shrink: 0; }
.exam-option.is-selected {
    border-color: var(--accent-gold);
    background-color: rgba(93, 13, 24, 0.05);
}
/* The user's actual selected answer — a primary interactive state, blue
   rather than the secondary burgundy the rest of this section's hover
   borders still use. */
[data-theme="dark"] .exam-option.is-selected {
    border-color: var(--accent-blue);
    background-color: rgba(76, 141, 255, 0.12);
}

/* Richtig/Falsch (true/false) — two large, equal-weight buttons rather
   than reusing the generic 4-option radio list, so the task reads as its
   own distinct format instead of "a multiple-choice question with only
   two options." */
.exam-truefalse { display: flex; gap: 14px; }
.exam-truefalse-btn {
    flex: 1;
    padding: 18px;
    background-color: var(--color-input-bg);
    border: 1.5px solid var(--color-input-border);
    border-radius: var(--radius-sm);
    font-family: var(--font-display-fa);
    font-size: 16px;
    font-weight: 800;
    color: var(--ink);
    cursor: pointer;
    transition: border-color 0.25s ease, background-color 0.25s ease, transform 0.2s ease;
}
.exam-truefalse-btn:hover { border-color: var(--accent-gold); transform: translateY(-2px); }
.exam-truefalse-btn.is-selected {
    border-color: var(--accent-gold);
    background-color: rgba(93, 13, 24, 0.05);
    color: var(--accent-gold);
}
/* Same reasoning as .exam-option.is-selected above — the user's actual
   answer choice, blue rather than the secondary burgundy accent. */
[data-theme="dark"] .exam-truefalse-btn.is-selected {
    border-color: var(--accent-blue);
    background-color: rgba(76, 141, 255, 0.12);
    color: var(--accent-blue);
}

/* Zuordnung (matching) — each short item gets its own dropdown into the
   shared pool of options, a genuinely different interaction pattern from
   both the choice list and the true/false pair above. */
.exam-matching { display: flex; flex-direction: column; gap: 12px; }
.exam-matching-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 16px;
    background-color: var(--neutral-soft-bg);
    border: 1px solid var(--neutral-border);
    border-radius: var(--radius-sm);
}
.exam-matching-item {
    flex: 1;
    font-family: 'Kalameh', var(--font-mono);
    font-size: 13.5px;
    line-height: 1.7;
    color: var(--ink);
    text-align: left;
}
.exam-matching-select { flex: 0 0 180px; width: 180px; padding: 10px 14px; font-size: 13px; }

.exam-audio-player {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 18px;
    background-color: var(--neutral-soft-bg);
    border: 1px solid var(--neutral-border);
    border-radius: var(--radius-sm);
}
.exam-audio-play-btn {
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--accent-gold);
    color: #FFFFFF;
    border: none;
    opacity: 0.5;
    cursor: not-allowed;
}
.exam-audio-play-btn svg { width: 16px; height: 16px; }
.exam-audio-track {
    flex: 1;
    height: 6px;
    border-radius: var(--radius-pill);
    background-color: var(--neutral-border);
    overflow: hidden;
}
.exam-audio-progress { display: block; width: 0; height: 100%; background-color: var(--accent-gold); }
.exam-audio-note {
    flex-shrink: 0;
    font-family: var(--font-body);
    font-size: 11.5px;
    color: var(--ink-soft);
    white-space: nowrap;
}

.exam-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.exam-nav-btn { display: inline-flex; align-items: center; gap: 8px; }
.exam-nav-btn svg { width: 16px; height: 16px; }
.exam-nav-btn:disabled { opacity: 0.4; cursor: not-allowed; transform: none !important; }

/* ============================================================
   TRANSITION SCREEN
   ============================================================ */
.test-transition-card,
.test-complete-card {
    width: 100%;
    max-width: 560px;
    padding: 48px 46px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 14px;
}
.test-transition-card h2,
.test-complete-card h2 {
    font-family: var(--font-display-fa);
    font-size: 22px;
    font-weight: 800;
    color: var(--primary-navy);
    margin: 0;
}
.test-transition-card p { font-family: var(--font-body); color: var(--ink-soft); margin: 0; }
.transition-icon { background-color: var(--accent-soft-bg); color: var(--accent-gold); }
[data-theme="dark"] .transition-icon { background-color: var(--accent-soft-bg); }

/* ============================================================
   COMPLETION SCREEN
   ============================================================ */
.test-complete-card { max-width: 620px; }
.test-complete-card > p:not(.test-complete-note) { font-family: var(--font-body); color: var(--ink-soft); margin: 0; }

.test-complete-summary { width: 100%; display: flex; flex-direction: column; gap: 14px; margin: 8px 0; }
.test-complete-row {
    text-align: right;
    padding: 16px 20px;
    background-color: var(--neutral-soft-bg);
    border: 1px solid var(--neutral-border);
    border-radius: var(--radius-sm);
}
.test-complete-row-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 8px;
    font-family: var(--font-display-fa);
    color: var(--primary-navy);
}
.test-complete-row-head span { font-family: var(--font-body); font-size: 12px; color: var(--ink-soft); }
.test-complete-row-bar {
    height: 6px;
    border-radius: var(--radius-pill);
    background-color: var(--neutral-border);
    overflow: hidden;
    margin-bottom: 8px;
}
.test-complete-row-fill { display: block; height: 100%; background: linear-gradient(90deg, var(--grad-btn-start), var(--grad-btn-end)); }
.test-complete-row-stat { font-family: var(--font-body); font-size: 12px; color: var(--ink-soft); }

.test-complete-note {
    font-family: var(--font-body);
    font-size: 12.5px;
    line-height: 1.9;
    color: var(--ink-soft);
    margin: 0;
}
.test-complete-actions { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; justify-content: center; margin-top: 8px; }

/* ============================================================
   BANK CONTENT (German) — passages, options, writing task
   Real reading texts (up to ~200 words at C1) read far better in a
   proportional face than the mono sample style used before.
   ============================================================ */
.exam-de { font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif; direction: ltr; text-align: left; }
.exam-passage.exam-de { font-size: 15px; line-height: 1.75; }
.exam-passage.exam-de p { margin: 0; }
.exam-passage.exam-de p + p { margin-top: 0.8em; }
.exam-question-prompt.exam-de { font-size: 16px; font-weight: 600; line-height: 1.6; }
.exam-writing-task { padding: 14px 18px; border-radius: var(--radius-sm); background-color: var(--neutral-soft-bg); font-weight: 500 !important; }
.exam-options[dir="ltr"] .exam-option { font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif; font-size: 14.5px; }
.exam-option-key {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    border-radius: 50%;
    background-color: var(--neutral-soft-bg);
    border: 1px solid var(--neutral-border);
    font-size: 12px;
    font-weight: 700;
}
.exam-option.is-selected .exam-option-key { background-color: var(--accent-gold); border-color: var(--accent-gold); color: #fff; }
[data-theme="dark"] .exam-option.is-selected .exam-option-key { background-color: var(--accent-blue); border-color: var(--accent-blue); }
.exam-answer-textarea[dir="ltr"] { font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif; font-size: 15px; line-height: 1.7; min-height: 220px; }
.exam-writing-meta { display: flex; justify-content: space-between; gap: 12px; font-family: var(--font-body); font-size: 12px; color: var(--ink-soft); }

/* Hören — not built yet */
.exam-tab.is-soon .exam-tab-sub { color: var(--accent-gold); }
.exam-soon { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 12px; padding: 32px 12px; }
.exam-soon-icon { display: flex; align-items: center; justify-content: center; width: 60px; height: 60px; border-radius: 50%; background-color: var(--accent-soft-bg); color: var(--accent-gold); }
.exam-soon-icon svg { width: 28px; height: 28px; }
.exam-soon h3 { margin: 0; font-family: var(--font-display-fa); font-size: 19px; font-weight: 800; color: var(--primary-navy); }
.exam-soon p { margin: 0; max-width: 460px; font-family: var(--font-body); font-size: 14px; line-height: 1.9; color: var(--ink-soft); }

/* ============================================================
   RESULT CARDS
   ============================================================ */
.pt-loading, .pt-error { padding: 24px; font-family: var(--font-body); color: var(--ink-soft); }
.pt-error { display: flex; flex-direction: column; align-items: center; gap: 12px; color: var(--color-error); }
.pt-card {
    text-align: right;
    padding: 20px 22px;
    background-color: var(--neutral-soft-bg);
    border: 1px solid var(--neutral-border);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.pt-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.pt-card-head div { display: flex; align-items: baseline; gap: 8px; }
.pt-card-head strong { font-family: 'Inter', sans-serif; font-size: 17px; color: var(--primary-navy); }
.pt-card-head span { font-family: var(--font-body); font-size: 12.5px; color: var(--ink-soft); }
.pt-band {
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    font-family: var(--font-body);
    font-size: 12px !important;
    font-weight: 700;
    white-space: nowrap;
}
.pt-band--strong, .pt-band--supported { background-color: var(--color-success-bg); color: var(--color-success) !important; }
.pt-band--emerging { background-color: rgba(198, 139, 20, 0.13); color: #A26A00 !important; }
[data-theme="dark"] .pt-band--emerging { color: #E6B450 !important; }
.pt-band--weak { background-color: var(--color-error-bg); color: var(--color-error) !important; }
.pt-band--manual, .pt-band--soon { background-color: var(--accent-soft-bg); color: var(--accent-gold) !important; }
.pt-score { display: flex; align-items: baseline; gap: 8px; font-family: var(--font-body); color: var(--ink-soft); font-size: 13px; }
.pt-score-num { font-family: var(--font-display-fa); font-size: 34px; font-weight: 800; line-height: 1; color: var(--primary-navy); }
.pt-score-pct { margin-inline-start: auto; font-weight: 700; color: var(--primary-navy); font-size: 15px; }
.pt-bar { height: 7px; border-radius: var(--radius-pill); background-color: var(--neutral-border); overflow: hidden; }
.pt-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--grad-btn-start), var(--grad-btn-end)); }
.pt-stage { margin: 2px 0 0; font-family: var(--font-body); font-size: 12.5px; font-weight: 700; color: var(--primary-navy); }
.pt-line { margin: 0; font-family: var(--font-body); font-size: 13.5px; line-height: 1.95; color: var(--ink); }
.pt-line strong { color: var(--primary-navy); }
.pt-exam { padding: 12px 14px; border-radius: var(--radius-sm); background-color: var(--color-input-bg); border: 1px dashed var(--neutral-border); }
.pt-exam strong { display: block; margin-bottom: 4px; font-family: var(--font-body); font-size: 12.5px; color: var(--primary-navy); }
.pt-exam p { margin: 0; font-family: var(--font-body); font-size: 13px; line-height: 1.9; color: var(--ink-soft); }
.pt-exam b { color: var(--primary-navy); }
.pt-card--soon { opacity: 0.75; }
.pt-phone-form { display: flex; flex-direction: column; gap: 8px; }
.pt-phone-form label,
.pt-form-intro { margin: 0; font-family: var(--font-body); font-size: 13px; font-weight: 700; color: var(--primary-navy); }
.pt-review-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pt-field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.pt-field label { font-size: 12.5px; color: var(--ink-soft); }
.pt-field .form-input { width: 100%; min-width: 0; }
.pt-phone-input { text-align: left; }
.pt-review-submit { align-self: flex-start; }
.pt-form-msg { margin: 0; font-family: var(--font-body); font-size: 12.5px; line-height: 1.9; color: var(--ink-soft); }
.pt-form-msg.is-error { color: var(--color-error); }
.pt-form-msg.is-success { padding: 12px 14px; border-radius: var(--radius-sm); background-color: var(--color-success-bg); color: var(--color-success); font-size: 13.5px; }
.pt-disclaimer { margin: 4px 0 0; font-family: var(--font-body); font-size: 12px; color: var(--ink-soft); text-align: center; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1200px) {
    .test-level-grid { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 991px) {
    .test-shell { padding: 120px 18px 60px; }
    .test-intro-card { padding: 36px 28px; }
    .test-intro-sections { grid-template-columns: 1fr; }
    .exam-body { grid-template-columns: 1fr; }
    .exam-palette { order: 2; }
    .exam-question-panel { order: 1; padding: 24px; min-height: auto; }
}

@media (max-width: 640px) {
    .test-level-grid { grid-template-columns: repeat(2, 1fr); }
    .pt-review-fields { grid-template-columns: 1fr; }
    .pt-review-submit { align-self: stretch; }
    .pt-card { padding: 16px; }
    .exam-section-tabs { grid-template-columns: 1fr; }
    .exam-topbar { flex-direction: column; align-items: stretch; text-align: center; }
    .exam-topbar-info, .exam-topbar-actions { justify-content: center; flex-wrap: wrap; }
    .test-complete-actions { flex-direction: column; width: 100%; }
    .test-complete-actions .btn-cta,
    .test-complete-actions .btn-outline { width: 100%; }
    .test-confirm-card { padding: 34px 24px; }
    .test-confirm-stats { gap: 24px; }
    .test-confirm-actions { flex-direction: column; width: 100%; }
    .test-confirm-actions .btn-cta { width: 100%; }
    .exam-matching-row { flex-direction: column; align-items: stretch; gap: 8px; }
    .exam-matching-select { flex: 1 1 auto; width: 100%; }
}

/* Every German run, wherever the page puts one (headings, result labels, hints), is set in the
   same Latin face as the questions and isolated from the surrounding Persian; a Latin letter
   inside a Persian sentence (A, B, C) gets that face too. */
[lang="de"] { font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif; unicode-bidi: isolate; }
bdi.latin { font-family: 'Inter', -apple-system, 'Segoe UI', Roboto, sans-serif; font-weight: 700; }
.exam-writing-meta bdi[lang="de"] { font-weight: 600; }
