/* ============================================================
   English For Life — Placement Tests v3
   "Tense Master" design language: dark arena, accent duels,
   pill options, wizard mode (one question per page), rich bg
   ============================================================ */

.placement-test-shell,
.placement-chooser-shell {
    --bg: #070b16;
    --panel: rgba(255, 255, 255, .045);
    --panel-2: rgba(255, 255, 255, .03);
    --line: rgba(255, 255, 255, .09);
    --text: #eef2ff;
    --muted: #94a3c7;
    --a1: #22d3ee;
    --a2: #3b82f6;
    --good: #34d399;
    --bad: #fb7185;
    --radius: 22px;
    --pt-font: 'Outfit', system-ui, -apple-system, 'Segoe UI', sans-serif;

    position: relative;
    overflow: hidden;
    background: var(--bg);
    color: var(--text);
    font-family: var(--pt-font);
    line-height: 1.6;
    padding: 70px 0 110px;
    isolation: isolate;
    -webkit-font-smoothing: antialiased;
}

.placement-test-shell { min-height: 780px; }
.placement-chooser-shell { min-height: 640px; padding-bottom: 130px; }

/* Keep the agreement dialog above the shared footer at compact desktop heights. */
body.placement-start-open .placement-test-shell { position: relative; z-index: 10000; }

.placement-test-shell ::selection,
.placement-chooser-shell ::selection { background: rgba(99, 102, 241, .45); color: #fff; }

/* section accent palettes */
.section-grammar    { --a1: #22d3ee; --a2: #3b82f6; }
.section-vocabulary { --a1: #c084fc; --a2: #f472b6; }
.section-reading    { --a1: #fbbf24; --a2: #fb923c; }
.section-listening  { --a1: #34d399; --a2: #10b981; }

/* ============ BACKGROUND ============ */
.placement-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
}

/* Promote the decorative layers so their motion is rendered consistently in
   Chromium and desktop Safari as well as mobile Safari. */
.placement-bg-blob,
.placement-bg-stars,
.placement-bg-stars:after,
.placement-bg-beam,
.placement-bg-shoot,
.placement-bg-ring,
.placement-float {
    -webkit-animation-play-state: running;
    animation-play-state: running;
    will-change: transform, opacity;
}

.placement-bg-grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(140, 180, 255, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(140, 180, 255, .045) 1px, transparent 1px);
    background-size: 54px 54px;
    -webkit-mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 78%);
    mask-image: radial-gradient(ellipse 90% 70% at 50% 0%, #000 30%, transparent 78%);
}

.placement-bg-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(95px);
    opacity: .33;
    animation: pt-drift 24s ease-in-out infinite alternate;
}

.placement-bg-blob.bl1 { width: 540px; height: 540px; background: #1d4ed8; top: -160px; left: -140px; }
.placement-bg-blob.bl2 { width: 480px; height: 480px; background: #7c3aed; top: 28%; right: -180px; animation-delay: -8s; }
.placement-bg-blob.bl3 { width: 540px; height: 540px; background: #0e7490; bottom: -200px; left: 18%; animation-delay: -15s; }
.placement-bg-blob.bl4 { width: 380px; height: 380px; background: #be185d; bottom: 6%; right: 14%; opacity: .18; animation-delay: -4s; }

@keyframes pt-drift { to { transform: translate(70px, 50px) scale(1.14); } }

/* twinkling stars (two layers) */
.placement-bg-stars,
.placement-bg-stars:after {
    position: absolute;
    inset: 0;
    content: '';
    background-image:
        radial-gradient(1.5px 1.5px at 8% 22%, rgba(255,255,255,.7), transparent 100%),
        radial-gradient(1px 1px at 27% 64%, rgba(163,255,229,.6), transparent 100%),
        radial-gradient(1.5px 1.5px at 41% 12%, rgba(255,255,255,.5), transparent 100%),
        radial-gradient(1px 1px at 58% 41%, rgba(186,171,255,.65), transparent 100%),
        radial-gradient(1.5px 1.5px at 71% 77%, rgba(255,255,255,.45), transparent 100%),
        radial-gradient(1px 1px at 84% 18%, rgba(129,222,255,.6), transparent 100%),
        radial-gradient(1.5px 1.5px at 93% 55%, rgba(255,255,255,.5), transparent 100%),
        radial-gradient(1px 1px at 17% 88%, rgba(255,200,120,.5), transparent 100%),
        radial-gradient(1px 1px at 48% 92%, rgba(244,114,182,.5), transparent 100%),
        radial-gradient(1.5px 1.5px at 65% 8%, rgba(255,255,255,.55), transparent 100%);
    animation: pt-twinkle 5.5s ease-in-out infinite;
}

.placement-bg-stars:after { transform: translate(34px, 48px) scale(1.18); animation-delay: -2.6s; }

@keyframes pt-twinkle { 0%, 100% { opacity: .25; } 50% { opacity: .95; } }

/* falling light beams */
.placement-bg-beam {
    position: absolute;
    width: 2px;
    height: 42vh;
    top: -10vh;
    background: linear-gradient(180deg, transparent, currentColor 45%, transparent);
    opacity: .3;
    filter: blur(1px);
    animation: pt-beam-fall 9s linear infinite;
}

.placement-bg-beam.b1 { left: 12%; color: #22d3ee; animation-delay: 0s; }
.placement-bg-beam.b2 { left: 46%; color: #a78bfa; animation-delay: -3.2s; animation-duration: 11s; }
.placement-bg-beam.b3 { left: 78%; color: #f472b6; animation-delay: -6s; animation-duration: 8s; }

@keyframes pt-beam-fall {
    0%   { transform: translateY(-45vh); opacity: 0; }
    18%  { opacity: .32; }
    82%  { opacity: .32; }
    100% { transform: translateY(150vh); opacity: 0; }
}

/* shooting stars */
.placement-bg-shoot {
    position: absolute;
    width: 130px;
    height: 2px;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(255,255,255,.9), transparent);
    transform: rotate(-32deg);
    opacity: 0;
    animation: pt-shoot 7s linear infinite;
}

.placement-bg-shoot.s1 { top: 12%; left: 68%; animation-delay: 1.2s; }
.placement-bg-shoot.s2 { top: 32%; left: 22%; animation-delay: 3.8s; animation-duration: 8.5s; }
.placement-bg-shoot.s3 { top: 6%;  left: 35%; animation-delay: 6.1s; animation-duration: 9.5s; }

@keyframes pt-shoot {
    0%, 88% { opacity: 0; transform: translate(0, 0) rotate(-32deg); }
    90%     { opacity: .9; }
    100%    { opacity: 0; transform: translate(-260px, 165px) rotate(-32deg); }
}

/* rotating neon rings */
.placement-bg-ring {
    position: absolute;
    border-radius: 50%;
    border: 1.5px dashed rgba(139, 123, 255, .18);
    animation: pt-ring-spin 40s linear infinite;
}

.placement-bg-ring.r1 { width: 420px; height: 420px; top: -140px; right: 6%; }
.placement-bg-ring.r2 { width: 260px; height: 260px; bottom: 4%; left: -80px; border-color: rgba(34, 211, 238, .16); animation-duration: 28s; animation-direction: reverse; }

@keyframes pt-ring-spin { to { transform: rotate(360deg); } }

/* floating emojis */
.placement-float {
    position: absolute;
    font-size: 1.8rem;
    opacity: .4;
    animation: pt-floaty 6s ease-in-out infinite;
    user-select: none;
}

.placement-float.f1 { top: 8%;  left: 3%;  animation-delay: 0s; }
.placement-float.f2 { top: 16%; right: 5%; animation-delay: -1.6s; }
.placement-float.f3 { bottom: 20%; left: 5%; animation-delay: -3.2s; }
.placement-float.f4 { bottom: 9%; right: 7%; animation-delay: -4.5s; }

@keyframes pt-floaty {
    0%, 100% { transform: translateY(0) rotate(-4deg); }
    50%      { transform: translateY(-18px) rotate(5deg); }
}

.placement-test-shell .container,
.placement-chooser-shell .container { position: relative; z-index: 2; }

/* ============ FIXED TOP PROGRESS ============ */
.placement-topbar-progress {
    position: fixed;
    top: 0;
    left: 0;
    height: 4px;
    width: 0%;
    z-index: 120;
    background: linear-gradient(90deg, #22d3ee, #a78bfa, #fb7185, #fbbf24);
    border-radius: 0 4px 4px 0;
    transition: width .5s ease;
    box-shadow: 0 0 12px rgba(167, 139, 250, .7);
}

.placement-timer {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    margin: 0 0 24px auto;
    padding: 10px 16px;
    border: 1px solid rgba(34, 211, 238, .35);
    border-radius: 999px;
    color: #b9c9df;
    background: rgba(7, 18, 40, .72);
    box-shadow: 0 0 22px rgba(34, 211, 238, .1);
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .04em;
}

.placement-timer .pt-icon { width: 18px; height: 18px; color: #67e8f9; }
.placement-timer strong { color: #fff; font-size: 1.1rem; letter-spacing: .08em; font-variant-numeric: tabular-nums; }
.placement-timer.is-warning { border-color: rgba(251, 191, 36, .65); box-shadow: 0 0 24px rgba(251, 191, 36, .16); }
.placement-timer.is-warning strong { color: #fde68a; }
.placement-timer.is-expired { border-color: rgba(251, 113, 133, .7); background: rgba(127, 29, 50, .35); }
.placement-timer.is-expired strong { color: #fda4af; }

/* ============ START AGREEMENT ============ */
body.placement-start-open { overflow: hidden; }

.placement-start-backdrop {
    position: fixed;
    inset: 0;
    z-index: 2147483000;
    display: grid;
    place-items: center;
    padding: 22px;
    background: rgba(2, 6, 23, .82);
    -webkit-backdrop-filter: blur(14px) saturate(135%);
    backdrop-filter: blur(14px) saturate(135%);
}

.placement-start-modal {
    width: min(100%, 650px);
    max-height: min(760px, calc(100vh - 44px));
    overflow-y: auto;
    padding: 34px;
    border: 1px solid rgba(103, 232, 249, .28);
    border-radius: 26px;
    background: linear-gradient(145deg, rgba(15, 30, 62, .96), rgba(8, 15, 34, .96));
    box-shadow: 0 26px 100px rgba(0, 0, 0, .55), 0 0 70px rgba(34, 211, 238, .14);
    color: var(--text);
}

.placement-start-icon {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    margin-bottom: 18px;
    border: 1px solid rgba(103, 232, 249, .35);
    border-radius: 18px;
    background: linear-gradient(135deg, rgba(34, 211, 238, .22), rgba(167, 139, 250, .24));
    color: #67e8f9;
    box-shadow: 0 0 30px rgba(34, 211, 238, .17);
}

.placement-start-icon .pt-icon { width: 26px; height: 26px; }
.placement-start-kicker { color: #67e8f9; font-size: .72rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase; }
.placement-start-modal h2 { margin: 7px 0 10px; color: #fff; font-size: clamp(1.55rem, 4vw, 2.1rem); line-height: 1.15; }
.placement-start-modal p { margin: 0; color: #c3d2e8; font-size: .93rem; line-height: 1.7; }
.placement-start-lead { color: #edf6ff !important; font-size: 1rem !important; }

.placement-start-facts {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    margin: 22px 0;
}

.placement-start-facts div {
    min-width: 0;
    padding: 14px 12px;
    border: 1px solid rgba(255, 255, 255, .1);
    border-radius: 15px;
    background: rgba(255, 255, 255, .05);
    text-align: center;
}

.placement-start-facts strong { display: block; overflow-wrap: anywhere; color: #fff; font-size: 1.28rem; line-height: 1.2; }
.placement-start-facts span { display: block; margin-top: 5px; color: #9fb1cf; font-size: .7rem; line-height: 1.35; }

.placement-start-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; margin-top: 24px; }
.placement-start-agree {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 50px;
    padding: 12px 18px;
    border: 0;
    border-radius: 999px;
    background: linear-gradient(110deg, #22d3ee, #818cf8 75%);
    color: #07101f;
    font: inherit;
    font-size: .82rem;
    font-weight: 900;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(34, 211, 238, .25);
    transition: transform .2s, box-shadow .2s, filter .2s;
}

.placement-start-agree:hover { transform: translateY(-2px); filter: brightness(1.08); box-shadow: 0 14px 34px rgba(34, 211, 238, .35); }
.placement-start-agree:disabled { cursor: wait; opacity: .8; transform: none; }
.placement-start-agree .pt-icon { width: 17px; height: 17px; }
.placement-start-back { color: #b8c8e0; font-size: .78rem; font-weight: 700; text-decoration: none; }
.placement-start-back:hover { color: #67e8f9; text-decoration: none; }
.placement-start-note { display: block; margin-top: 16px; color: #8497b8; font-size: .72rem; }
.placement-start-spinner { width: 15px; height: 15px; border: 2px solid rgba(7, 16, 31, .35); border-top-color: #07101f; border-radius: 50%; animation: pt-spin .7s linear infinite; }
@keyframes pt-spin { to { transform: rotate(360deg); } }

/* ============ ICONS + FLAGS ============ */
.pt-icon {
    width: 1.2em;
    height: 1.2em;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    vertical-align: -.22em;
    flex: 0 0 auto;
}

.pt-flag {
    display: block;
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .45), 0 0 0 1px rgba(255, 255, 255, .14);
}

/* ============ KICKER / HERO ============ */
.placement-test-kicker,
.placement-aside-kicker {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 18px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: #a5f3fc;
    border: 1px solid rgba(34, 211, 238, .35);
    background: rgba(34, 211, 238, .08);
}

.placement-test-hero {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 28px;
    margin-bottom: 38px;
}

.placement-test-hero h2.placement-hero-title,
.placement-chooser-header h2 {
    font-size: clamp(2.1rem, 5vw, 3.6rem);
    font-weight: 900;
    line-height: 1.06;
    letter-spacing: -.02em;
    margin: 18px 0 14px;
    background: linear-gradient(90deg, #22d3ee, #a78bfa, #fb7185, #fbbf24, #22d3ee);
    background-size: 300% 100%;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #fff;
    animation: pt-hue 9s linear infinite;
}

@keyframes pt-hue { to { background-position: 300% 0; } }

.placement-test-hero p {
    font-size: clamp(1rem, 2vw, 1.15rem);
    color: var(--muted);
    max-width: 640px;
    margin: 0;
}

.placement-language-switcher {
    align-items: center;
    background: rgba(34, 211, 238, .12);
    border: 1px solid rgba(103, 232, 249, .42);
    border-radius: 999px;
    color: #dffaff;
    display: inline-flex;
    font-size: 13px;
    font-weight: 700;
    gap: 8px;
    margin-top: 12px;
    padding: 9px 14px;
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.placement-language-switcher:hover,
.placement-language-switcher:focus {
    background: rgba(34, 211, 238, .24);
    border-color: rgba(165, 243, 252, .8);
    color: #fff;
    text-decoration: none;
    transform: translateY(-1px);
}

.placement-utility-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.placement-utility-actions .placement-language-switcher { margin-top: 0; }

.placement-sound-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 8px 13px;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 999px;
    background: rgba(255, 255, 255, .06);
    color: #dbeafe;
    cursor: pointer;
    font: 700 12px/1.2 var(--pt-font);
    transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s ease;
}

.placement-sound-toggle:hover,
.placement-sound-toggle:focus-visible {
    border-color: rgba(103, 232, 249, .7);
    background: rgba(34, 211, 238, .16);
    color: #fff;
    outline: none;
    transform: translateY(-1px);
}

.placement-sound-toggle.is-muted {
    border-color: rgba(251, 191, 36, .35);
    color: #fde68a;
}

.placement-sound-icon {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: rgba(34, 211, 238, .18);
    color: #67e8f9;
    font-size: 15px;
    line-height: 1;
}

.placement-sound-toggle.is-muted .placement-sound-icon {
    background: rgba(251, 191, 36, .15);
    color: #fbbf24;
}

.placement-chooser-controls {
    display: flex;
    justify-content: center;
    margin-top: 20px;
}

.placement-test-hero-icon {
    position: relative;
    display: grid;
    place-items: center;
    padding: 20px;
    border-radius: 26px;
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: 0 0 44px rgba(34, 211, 238, .16);
    flex: 0 0 auto;
    animation: pt-hero-float 5s ease-in-out infinite;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

@keyframes pt-hero-float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%      { transform: translateY(-9px) rotate(2deg); }
}

/* ============ GLASS PANELS ============ */
.placement-test-intro,
.placement-student-card,
.placement-question-section,
.placement-level-card,
.placement-contact-card,
.placement-wizard-nav,
.placement-milestone {
    position: relative;
    border: 1px solid var(--line);
    background: var(--panel);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    border-radius: var(--radius);
}

.placement-test-intro { display: flex; gap: 18px; padding: 26px; margin-bottom: 22px; }

.placement-test-intro-icon,
.placement-section-icon {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    color: #fff;
    background: linear-gradient(135deg, var(--a1), var(--a2));
    box-shadow: 0 8px 24px color-mix(in srgb, var(--a2) 40%, transparent);
    flex: 0 0 auto;
}

.placement-test-intro-icon .pt-icon,
.placement-section-icon .pt-icon { width: 22px; height: 22px; }

.placement-test-intro h2,
.placement-student-card h2,
.placement-section-heading h2,
.placement-level-card h2 {
    font-size: 1.3rem;
    font-weight: 800;
    line-height: 1.25;
    color: #fff;
    margin: 0 0 6px;
    letter-spacing: -.01em;
}

.placement-test-intro p,
.placement-student-card p,
.placement-level-card p { color: var(--muted); font-size: .92rem; margin: 0; }

.placement-test-facts { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 15px; }

.placement-test-facts span {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: var(--muted);
    font-size: .82rem;
    font-weight: 600;
    padding: 7px 14px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--panel-2);
}

.placement-test-facts span b { color: #fff; }
.placement-test-facts .pt-icon { width: 15px; height: 15px; color: var(--a1); }

/* ============ STUDENT CARD ============ */
.placement-student-card { padding: 26px; margin-bottom: 22px; }
.placement-card-heading { display: flex; gap: 15px; align-items: center; margin-bottom: 20px; }

.placement-step {
    color: #fff;
    background: linear-gradient(135deg, #22d3ee, #6366f1);
    border-radius: 12px;
    font-size: .85rem;
    font-weight: 900;
    padding: 10px 12px;
    box-shadow: 0 8px 24px rgba(79, 107, 246, .4);
}

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

.placement-fields label {
    display: flex;
    flex-direction: column;
    gap: 8px;
    color: #b9cbe4;
    font-size: .78rem;
    font-weight: 700;
    letter-spacing: .02em;
}

.placement-fields label > span { display: inline-flex; align-items: center; gap: 6px; }
.placement-fields label .pt-icon { width: 14px; height: 14px; color: #67e8f9; }

.placement-fields input,
.placement-text-answer {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgba(255, 255, 255, .04);
    color: #fff;
    padding: 13px 15px;
    outline: none;
    font-size: .95rem;
    font-family: inherit;
    transition: border-color .2s, box-shadow .2s, background .2s;
}

.placement-fields input::placeholder,
.placement-text-answer::placeholder { color: #64799c; }

.placement-fields input:focus,
.placement-text-answer:focus {
    border-color: #22d3ee;
    background: rgba(255, 255, 255, .06);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, .14), 0 0 24px rgba(34, 211, 238, .12);
}

/* ============ QUESTION SECTIONS ============ */
.placement-question-section { padding: 26px; margin-bottom: 22px; }

.placement-section-heading {
    display: flex;
    align-items: center;
    gap: 14px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 17px;
    margin-bottom: 4px;
}

.placement-section-label {
    display: inline-block;
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--a1);
}

.placement-question { padding: 22px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); }
.placement-question:last-child { border-bottom: 0; padding-bottom: 4px; }

.placement-question-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 9px;
}

.placement-question-number {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--a1);
    font-size: .8rem;
    font-weight: 800;
    letter-spacing: .1em;
}

.placement-question-number .pt-q-check {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    border: 1.5px solid color-mix(in srgb, var(--a1) 55%, transparent);
    color: transparent;
    transition: all .25s;
}

.placement-question.is-answered .placement-question-number .pt-q-check {
    background: linear-gradient(135deg, var(--a1), var(--a2));
    border-color: var(--a1);
    color: #fff;
    box-shadow: 0 0 12px color-mix(in srgb, var(--a1) 60%, transparent);
}

.placement-question-number .pt-q-check .pt-icon { width: 10px; height: 10px; stroke-width: 3.4; }

.placement-question-points {
    color: var(--muted);
    font-size: .72rem;
    font-weight: 700;
    padding: 4px 11px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--panel-2);
}

.placement-question h3 {
    font-size: 1.12rem;
    line-height: 1.5;
    font-weight: 700;
    color: #f6f9ff;
    margin: 0 0 16px;
    letter-spacing: 0;
}

.placement-question-skip {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    margin-top: 15px;
    padding: 7px 11px;
    border: 1px solid rgba(148, 163, 199, .28);
    border-radius: 999px;
    background: rgba(255, 255, 255, .025);
    color: #9fb1cf;
    font: inherit;
    font-size: .72rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color .2s, background .2s, color .2s, transform .2s;
}

.placement-question-skip:hover { border-color: rgba(103, 232, 249, .6); background: rgba(103, 232, 249, .08); color: #c7f9ff; transform: translateX(2px); }
.placement-question-skip .pt-icon { width: 14px; height: 14px; }
.placement-question.is-skipped .placement-question-number .pt-q-check { border-style: dashed; border-color: #fbbf24; color: #fbbf24; }
.placement-question.is-skipped .placement-question-number { color: #fbbf24; }

/* option pills */
.placement-options { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }

.placement-option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    padding: 12px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: rgba(255, 255, 255, .03);
    color: var(--text);
    font-size: .96rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color .18s, background .18s, transform .18s, box-shadow .18s;
}

.placement-option:hover {
    transform: translateX(6px);
    border-color: var(--a1);
    background: rgba(255, 255, 255, .07);
}

.placement-option input { position: absolute; opacity: 0; }

.placement-option-marker {
    width: 28px;
    height: 28px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, .25);
    color: var(--muted);
    font-size: .72rem;
    font-weight: 800;
    flex: 0 0 auto;
    transition: all .2s;
}

.is-multiple .placement-option-marker { border-radius: 9px; }

.placement-option input:checked ~ .placement-option-marker {
    background: linear-gradient(135deg, var(--a1), var(--a2));
    border-color: var(--a1);
    color: #fff;
    box-shadow: 0 0 16px color-mix(in srgb, var(--a1) 55%, transparent);
    transform: scale(1.1);
}

.placement-option:has(input:checked) {
    border-color: var(--a1);
    background: color-mix(in srgb, var(--a1) 12%, transparent);
    color: #fff;
    box-shadow: 0 0 20px color-mix(in srgb, var(--a1) 18%, transparent);
}

.placement-text-answer { max-width: 520px; }

/* audio */
.placement-audio-wrap {
    display: flex;
    align-items: center;
    gap: 13px;
    border: 1px solid color-mix(in srgb, var(--a1) 35%, transparent);
    background: color-mix(in srgb, var(--a1) 8%, transparent);
    border-radius: 14px;
    padding: 12px 15px;
    margin: 0 0 15px;
    color: var(--text);
}

.placement-audio-wrap > .pt-icon { width: 22px; height: 22px; color: var(--a1); }
.placement-audio-wrap > div { flex: 1; min-width: 0; }
.placement-audio-wrap strong { display: block; color: #fff; font-size: .78rem; margin-bottom: 6px; letter-spacing: .04em; }
.placement-audio-wrap audio { width: 100%; height: 34px; }

.placement-audio-note {
    display: flex;
    align-items: center;
    gap: 8px;
    color: var(--muted);
    font-size: .8rem;
    background: rgba(139, 92, 246, .1);
    border: 1px solid rgba(139, 92, 246, .25);
    border-radius: 11px;
    padding: 11px 13px;
    margin-bottom: 14px;
}

.placement-audio-note .pt-icon { color: #c4b5fd; width: 16px; height: 16px; }

/* ============ WIZARD MODE ============ */
.placement-test-form.pt-wizard .placement-student-card,
.placement-test-form.pt-wizard .placement-question-section,
.placement-test-form.pt-wizard .placement-question,
.placement-test-form.pt-wizard .placement-final-step { display: none; }

.placement-test-form.pt-wizard .placement-student-card.pt-active,
.placement-test-form.pt-wizard .placement-question-section.pt-active,
.placement-test-form.pt-wizard .placement-question.pt-active,
.placement-test-form.pt-wizard .placement-final-step.pt-active { display: block; }

.placement-test-form.pt-wizard .placement-question.pt-active {
    animation: pt-step-in .38s cubic-bezier(.2, 1, .4, 1);
}

.placement-test-form.pt-wizard .placement-student-card.pt-active,
.placement-test-form.pt-wizard .placement-final-step.pt-active {
    animation: pt-step-in .38s cubic-bezier(.2, 1, .4, 1);
}

@keyframes pt-step-in {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* wizard nav */
.placement-wizard-nav {
    display: none;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 14px 18px;
    margin-bottom: 22px;
    border-radius: 999px;
}

.placement-test-form.pt-wizard ~ .placement-wizard-nav,
.placement-wizard-nav.pt-on { display: flex; }

.placement-wizard-count {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: .85rem;
    font-weight: 800;
    color: #fde68a;
    padding: 7px 16px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(251, 191, 36, .18), rgba(249, 115, 22, .18));
    border: 1px solid rgba(251, 191, 36, .4);
    white-space: nowrap;
}

.placement-wizard-count.pulse { animation: pt-xp-pulse .45s ease; }

@keyframes pt-xp-pulse { 0% { transform: scale(1); } 40% { transform: scale(1.18); } 100% { transform: scale(1); } }

.placement-wizard-dots { display: flex; gap: 5px; flex: 1; min-width: 0; }

.placement-wizard-dots i {
    flex: 1;
    height: 5px;
    border-radius: 4px;
    background: rgba(255, 255, 255, .1);
    transition: background .3s;
}

.placement-wizard-dots i.done { background: linear-gradient(90deg, #22d3ee, #a78bfa); }
.placement-wizard-dots i.cur { background: rgba(255, 255, 255, .4); }

.pt-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 12px 26px;
    border-radius: 999px;
    border: none;
    font-family: inherit;
    font-weight: 800;
    font-size: .95rem;
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    transition: transform .2s, box-shadow .2s, opacity .2s;
    background: linear-gradient(135deg, #22d3ee, #6366f1);
    box-shadow: 0 10px 28px rgba(79, 107, 246, .4);
    white-space: nowrap;
}

.pt-btn:hover { transform: translateY(-2px) scale(1.02); color: #fff; text-decoration: none; }
.pt-btn:disabled { opacity: .38; cursor: not-allowed; transform: none; box-shadow: none; }

.pt-btn.ghost {
    background: rgba(255, 255, 255, .05);
    border: 1px solid var(--line);
    box-shadow: none;
}

.pt-btn.ghost:hover { background: rgba(255, 255, 255, .1); }

/* milestone (every 10 questions) */
.placement-milestone {
    display: none;
    text-align: center;
    padding: 46px 30px;
    margin-bottom: 22px;
}

.placement-milestone.pt-active { display: block; animation: pt-step-in .4s cubic-bezier(.2, 1, .4, 1); }

.placement-milestone-emoji {
    font-size: 3.4rem;
    line-height: 1;
    display: block;
    margin-bottom: 12px;
    animation: pt-pop-in .5s cubic-bezier(.2, 1.6, .4, 1);
}

@keyframes pt-pop-in { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }

.placement-milestone h3 {
    font-size: clamp(1.4rem, 3.4vw, 2rem);
    font-weight: 900;
    letter-spacing: -.01em;
    margin: 0 0 8px;
    background: linear-gradient(90deg, #fde047, #fb923c, #f472b6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #fff;
}

.placement-milestone p { color: var(--muted); margin: 0 auto 22px; max-width: 460px; font-size: .98rem; }

.placement-milestone-stats { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-bottom: 24px; }

.placement-milestone-stats span {
    font-size: .84rem;
    font-weight: 600;
    color: var(--muted);
    padding: 8px 16px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--panel-2);
}

.placement-milestone-stats b { color: #fff; }

/* final step */
.placement-final-step { margin-bottom: 22px; }

.placement-final-card {
    position: relative;
    border-radius: 26px;
    padding: 2px;
    background: linear-gradient(120deg, #fde047, #f97316, #ec4899, #8b5cf6, #22d3ee, #fde047);
    background-size: 400% 400%;
    animation: pt-borderflow 8s linear infinite;
}

@keyframes pt-borderflow { 0% { background-position: 0% 50%; } 100% { background-position: 400% 50%; } }

.placement-final-inner {
    background: rgba(8, 11, 22, .96);
    border-radius: 24px;
    padding: 34px 28px;
    text-align: center;
}

.placement-final-inner h3 {
    font-size: clamp(1.5rem, 4vw, 2.3rem);
    font-weight: 900;
    letter-spacing: .02em;
    margin: 0 0 8px;
    background: linear-gradient(90deg, #fde047, #fb923c, #f472b6);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: #fff;
}

.placement-final-inner > p { color: var(--muted); margin: 0 0 20px; }

.placement-writing-section {
    margin: 24px auto 20px;
    max-width: 860px;
    padding: 18px;
    text-align: left;
    border: 1px solid rgba(103, 232, 249, .24);
    border-radius: 18px;
    background: rgba(17, 31, 67, .72);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .06), 0 16px 36px rgba(0, 0, 0, .18);
}

.placement-writing-heading,
.placement-writing-result-heading {
    display: flex;
    align-items: center;
    gap: 13px;
}

.placement-writing-heading .placement-step {
    display: grid;
    place-items: center;
    min-width: 42px;
    height: 42px;
    padding: 0;
    background: linear-gradient(135deg, #f472b6, #8b5cf6);
}

.placement-writing-heading h3,
.placement-writing-result-heading h2 {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 800;
    line-height: 1.25;
    margin: 0 0 4px;
}

.placement-writing-heading p,
.placement-writing-instructions {
    color: #c6d3e7;
    font-size: .86rem;
    line-height: 1.55;
    margin: 0;
}

.placement-writing-instructions {
    margin: 14px 0;
    padding: 11px 13px;
    border-left: 3px solid #f472b6;
    background: rgba(244, 114, 182, .07);
}

.placement-writing-answer {
    display: block;
    min-height: 170px;
    resize: vertical;
    width: 100%;
    border: 1px solid rgba(103, 232, 249, .28);
    border-radius: 13px;
    background: rgba(4, 10, 25, .66);
    color: #fff;
    padding: 14px 15px;
    outline: none;
    font: 400 .95rem/1.65 var(--pt-font);
    transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}

.placement-writing-answer::placeholder { color: #7186a7; }
.placement-writing-answer:focus {
    border-color: #67e8f9;
    background: rgba(4, 10, 25, .82);
    box-shadow: 0 0 0 4px rgba(34, 211, 238, .12), 0 0 24px rgba(34, 211, 238, .1);
}

.placement-writing-meta {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    gap: 8px 16px;
    margin-top: 9px;
    color: #90a4c2;
    font-size: .74rem;
}

.placement-writing-meta b { color: #a5f3fc; }

/* consent + errors + submit */
.placement-consent {
    display: flex;
    gap: 11px;
    align-items: flex-start;
    text-align: left;
    color: #b6c6de;
    font-size: .82rem;
    line-height: 1.6;
    margin: 20px auto;
    max-width: 560px;
    cursor: pointer;
}

.placement-consent input { accent-color: #22d3ee; margin-top: 3px; width: 15px; height: 15px; flex: 0 0 auto; }

.placement-validation-errors {
    display: flex;
    align-items: center;
    gap: 9px;
    text-align: left;
    border: 1px solid rgba(251, 113, 133, .5);
    color: #fecdd3;
    background: rgba(251, 113, 133, .1);
    border-radius: 13px;
    padding: 13px 15px;
    margin: 0 auto 15px;
    max-width: 560px;
    font-size: .85rem;
}

.placement-validation-errors .pt-icon { color: var(--bad); width: 17px; height: 17px; }

.placement-submit-button {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: 0;
    border-radius: 999px;
    font-family: inherit;
    font-weight: 900;
    font-size: 1.02rem;
    color: #fff;
    cursor: pointer;
    padding: 16px 38px;
    overflow: hidden;
    background: linear-gradient(135deg, #22d3ee, #6366f1);
    box-shadow: 0 12px 34px rgba(79, 107, 246, .4);
    transition: transform .22s, box-shadow .22s;
}

.placement-submit-button:after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .45) 50%, transparent 70%);
    transform: translateX(-120%);
    animation: pt-btn-shine 3.4s ease-in-out infinite;
}

@keyframes pt-btn-shine { 12%, 100% { transform: translateX(120%); } }

.placement-submit-button:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 16px 44px rgba(79, 107, 246, .55); }

.pt-shake { animation: pt-shake .4s; }

@keyframes pt-shake {
    20% { transform: translateX(-7px); }
    40% { transform: translateX(7px); }
    60% { transform: translateX(-4px); }
    80% { transform: translateX(3px); }
}

/* ============ ASIDE ============ */
.placement-test-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 26px;
    align-items: start;
}

.placement-test-main { min-width: 0; }
.placement-test-aside { position: sticky; top: 24px; }
.placement-level-card, .placement-contact-card { padding: 25px; }
.placement-level-card h2 { font-size: 1.35rem; margin-top: 14px; }
.placement-level-card p { margin-bottom: 19px; }
.placement-level-list { display: grid; gap: 9px; }

.placement-level-row {
    display: grid;
    grid-template-columns: 44px minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    border: 1px solid rgba(255, 255, 255, .07);
    border-radius: 12px;
    background: var(--panel-2);
    padding: 9px 11px;
    transition: border-color .2s, transform .2s;
}

.placement-level-row:hover { border-color: rgba(34, 211, 238, .45); transform: translateX(4px); }

.placement-level-row span {
    display: grid;
    place-items: center;
    color: #071528;
    background: var(--level-color);
    border-radius: 8px;
    min-height: 28px;
    font-size: .72rem;
    font-weight: 800;
    box-shadow: 0 0 14px color-mix(in srgb, var(--level-color) 45%, transparent);
}

.placement-level-row strong { font-size: .8rem; color: #cbdaec; }
.placement-level-row small { font-size: .66rem; color: var(--muted); }

.placement-contact-card {
    margin-top: 18px;
    background: linear-gradient(135deg, rgba(34, 211, 238, .09), rgba(139, 92, 246, .12));
    text-align: center;
}

.placement-contact-card > .pt-icon { width: 34px; height: 34px; color: #67e8f9; stroke-width: 1.7; margin: 0 auto; }
.placement-contact-card h3 { font-size: 1.08rem; font-weight: 800; color: #fff; margin: 13px 0 8px; }
.placement-contact-card p { font-size: .8rem; line-height: 1.65; color: var(--muted); margin: 0 0 16px; }

.placement-contact-card a {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    color: #a5f3fc;
    font-size: .8rem;
    font-weight: 800;
    text-decoration: none;
    padding: 9px 18px;
    border-radius: 999px;
    border: 1px solid rgba(34, 211, 238, .4);
    background: rgba(34, 211, 238, .08);
    transition: background .2s, box-shadow .2s;
}

.placement-contact-card a:hover { background: rgba(34, 211, 238, .16); box-shadow: 0 0 20px rgba(34, 211, 238, .25); color: #a5f3fc; }

/* ============ RESULT CARD + RING ============ */
.placement-result-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 22px;
    padding: 26px 28px;
    margin-bottom: 26px;
    border: 1px solid rgba(52, 211, 153, .4);
    border-radius: var(--radius);
    background: linear-gradient(115deg, rgba(6, 60, 48, .8), rgba(10, 25, 55, .88) 60%, rgba(30, 27, 78, .85));
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: 0 22px 70px rgba(52, 211, 153, .13);
    overflow: hidden;
}

.placement-result-card:before {
    content: '';
    position: absolute;
    inset: -60% auto auto -20%;
    width: 65%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(52, 211, 153, .2), transparent 65%);
    pointer-events: none;
}

.placement-result-card.is-achieved { border-color: #34d399; }

.placement-level-gauge-shell {
    position: relative;
    margin: 0 0 26px;
    padding: 24px 28px 22px;
    border: 1px solid rgba(103, 232, 249, .24);
    border-radius: var(--radius);
    background: linear-gradient(120deg, rgba(8, 24, 54, .82), rgba(17, 31, 67, .68));
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    box-shadow: 0 18px 55px rgba(34, 211, 238, .08);
    overflow: hidden;
}

.placement-level-gauge-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.placement-level-gauge-heading h2 {
    color: #fff;
    font-size: 1.25rem;
    font-weight: 900;
    line-height: 1.2;
    margin: 6px 0 0;
}

.placement-level-gauge-status {
    color: #a5f3fc;
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .06em;
    text-transform: uppercase;
    white-space: nowrap;
}

.placement-level-gauge {
    margin: 22px auto 0;
    max-width: 720px;
}

.placement-level-gauge-dial {
    position: relative;
    aspect-ratio: 2 / 1;
    margin: 0 3%;
    overflow: hidden;
}

.placement-level-gauge-lottie {
    position: absolute;
    inset: 0;
    z-index: 1;
    opacity: 0;
    transform: scale(1.04);
    filter: saturate(1.55) brightness(1.2) drop-shadow(0 0 16px rgba(92, 255, 222, .2));
    transition: opacity .35s ease;
}

.placement-level-gauge-lottie svg {
    display: block;
    width: 100%;
    height: 100%;
}

.placement-level-gauge-shell.lottie-ready .placement-level-gauge-lottie { opacity: 1; }
.placement-level-gauge-shell.lottie-ready .placement-level-gauge-arc { opacity: 1; }
.placement-level-gauge-shell.lottie-ready .placement-level-gauge-needle,
.placement-level-gauge-shell.lottie-ready .placement-level-gauge-hub { opacity: 1; }

.placement-level-gauge-arc {
    position: absolute;
    left: 1%;
    top: 0;
    width: 98%;
    aspect-ratio: 1;
    border-radius: 50%;
    z-index: 2;
    background: conic-gradient(
        from 270deg at 50% 50%,
        #16d979 0deg 28deg,
        rgba(8, 24, 54, .96) 28deg 30deg,
        #a3e635 30deg 58deg,
        rgba(8, 24, 54, .96) 58deg 60deg,
        #facc15 60deg 88deg,
        rgba(8, 24, 54, .96) 88deg 90deg,
        #fb6b18 90deg 118deg,
        rgba(8, 24, 54, .96) 118deg 120deg,
        #fb7185 120deg 148deg,
        rgba(8, 24, 54, .96) 148deg 150deg,
        #ef1d25 150deg 178deg,
        rgba(8, 24, 54, .96) 178deg 180deg,
        rgba(8, 24, 54, 0) 180deg 360deg
    );
    filter: drop-shadow(0 14px 20px rgba(0, 0, 0, .24));
}

.placement-level-gauge-arc:after {
    content: '';
    position: absolute;
    left: 10%;
    top: 10%;
    width: 80%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: #0b1c3b;
    box-shadow: inset 0 3px 10px rgba(0, 0, 0, .22);
}

.placement-level-gauge-labels {
    position: absolute;
    inset: 0;
    z-index: 2;
}

.placement-level-gauge-label {
    position: absolute;
    z-index: 3;
    color: #fff !important;
    font-size: clamp(1.1rem, 2.6vw, 1.55rem);
    font-weight: 900;
    letter-spacing: .05em;
    line-height: 1;
    text-shadow: 0 1px 0 #020817, 0 2px 6px rgba(0, 0, 0, .8), 0 0 12px currentColor;
}

.placement-level-gauge-label.level-label-1 { left: 3%; top: 53%; color: #7dff9b; }
.placement-level-gauge-label.level-label-2 { left: 17%; top: 19%; color: #c4ff45; }
.placement-level-gauge-label.level-label-3 { left: 37%; top: 0; color: #fff45c; }
.placement-level-gauge[data-score-percentage] .placement-level-gauge-label.level-label-2 { left: 50%; top: 0; color: #c4ff45; transform: translateX(-50%); }
.placement-level-gauge[data-score-percentage] .placement-level-gauge-label.level-label-3 { left: auto; right: 3%; top: 53%; color: #ffbd66; }
.placement-level-gauge-label.level-label-4 { left: 57%; top: 0; color: #ffbd66; }
.placement-level-gauge-label.level-label-5 { left: 78%; top: 19%; color: #ff8faf; }
.placement-level-gauge-label.level-label-6 { right: 3%; top: 53%; color: #ff7178; }

.placement-level-gauge-needle {
    position: absolute;
    z-index: 4;
    left: calc(50% - 5px);
    bottom: 1%;
    width: 10px;
    height: 54%;
    border: 1px solid rgba(255, 255, 255, .7);
    border-radius: 999px 999px 3px 3px;
    background: linear-gradient(90deg, #020617 0%, #111827 18%, #ffffff 42%, #ffffff 58%, #111827 82%, #020617 100%);
    box-shadow: 0 0 0 1px rgba(2, 6, 23, .75), 0 0 14px rgba(255, 255, 255, .55), 0 0 24px rgba(34, 211, 238, .28);
    transform-origin: 50% 100%;
    transform: rotate(-78deg);
}

.placement-level-gauge-needle:after {
    content: '';
    position: absolute;
    left: 50%;
    top: -17px;
    width: 0;
    height: 0;
    border-left: 13px solid transparent;
    border-right: 13px solid transparent;
    border-bottom: 26px solid #020617;
    filter: drop-shadow(0 0 4px rgba(255, 255, 255, .75));
    transform: translateX(-50%);
}

.placement-level-gauge-hub {
    position: absolute;
    z-index: 5;
    left: 50%;
    bottom: -1%;
    width: 39px;
    height: 39px;
    border: 8px solid #050b18;
    border-radius: 50%;
    background: #f8fafc;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, .25), 0 0 22px rgba(34, 211, 238, .5);
    transform: translateX(-50%);
}

.placement-level-gauge-hub i {
    display: block;
    width: 10px;
    height: 10px;
    margin: 6px auto;
    border-radius: 50%;
    background: #111827;
}

.placement-level-gauge-result {
    margin: 20px 0 0;
    color: #c6d9e7;
    font-size: .92rem;
    text-align: center;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity .35s ease, transform .35s ease, visibility 0s linear .35s;
}

.placement-level-gauge-result strong { color: #6ee7b7; font-weight: 900; }
.placement-level-gauge-result.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(-1px);
    transition-delay: 0s;
}

@keyframes placement-gauge-sweep {
    0% { transform: rotate(-78deg); }
    20% { transform: rotate(78deg); }
    40% { transform: rotate(-78deg); }
    60% { transform: rotate(78deg); }
    100% { transform: rotate(var(--target-angle)); }
}

.placement-level-gauge-shell.is-animating .placement-level-gauge-needle {
    animation: placement-gauge-sweep 3.4s cubic-bezier(.2, .75, .25, 1) forwards;
}

.placement-level-gauge-shell.is-settled .placement-level-gauge-needle { transform: rotate(var(--target-angle)); }

.placement-score-ring { position: relative; width: 118px; height: 118px; flex: 0 0 auto; }
.placement-score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.placement-score-ring .ring-bg { fill: none; stroke: rgba(255, 255, 255, .08); stroke-width: 9; }

.placement-score-ring .ring-val {
    fill: none;
    stroke: url(#pt-ring-gradient);
    stroke-width: 9;
    stroke-linecap: round;
    stroke-dasharray: 326.7;
    stroke-dashoffset: 326.7;
    transition: stroke-dashoffset 1.4s cubic-bezier(.3, .8, .3, 1) .3s;
    filter: drop-shadow(0 0 6px rgba(52, 211, 153, .6));
}

.placement-score-ring-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; }
.placement-score-ring-label strong { font-size: 1.65rem; font-weight: 900; color: #fff; line-height: 1; }
.placement-score-ring-label small { font-size: .64rem; color: #6ee7b7; font-weight: 800; letter-spacing: .1em; }

.placement-result-copy { min-width: 0; position: relative; z-index: 1; }

.placement-result-label {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    font-size: .66rem;
    text-transform: uppercase;
    letter-spacing: .18em;
    color: #6ee7b7;
    font-weight: 800;
}

.placement-result-label .pt-icon { width: 14px; height: 14px; }
.placement-result-copy h2 { color: #fff; font-size: 1.6rem; font-weight: 900; margin: 6px 0 7px; line-height: 1.2; }
.placement-result-copy p { font-size: .88rem; color: #c6dade; margin: 0; }

.placement-score-line {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 13px;
    margin-top: 14px;
    color: #c3d6e7;
    font-size: .8rem;
}

.placement-score-line strong { color: #34d399; font-size: 1.15rem; font-weight: 900; }

.placement-score-line b {
    font-weight: 700;
    color: #fff;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .14);
    border-radius: 999px;
    padding: 5px 13px;
}

.placement-result-warning, .placement-result-success { display: block; margin-top: 11px; font-size: .74rem; }
.placement-result-warning { color: #fde68a; }
.placement-result-success { color: #6ee7b7; }

.placement-writing-result {
    position: relative;
    margin: 0 0 26px;
    padding: 22px 24px;
    border: 1px solid rgba(244, 114, 182, .32);
    border-radius: var(--radius);
    background: linear-gradient(120deg, rgba(58, 25, 67, .78), rgba(17, 31, 67, .82));
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
}

.placement-writing-result-heading { align-items: flex-start; }
.placement-writing-result-heading .section-writing-icon { background: linear-gradient(135deg, #ec4899, #8b5cf6); }
.placement-writing-result-heading h2 { font-size: 1.2rem; }
.placement-writing-result-score { margin-left: auto; color: #f9a8d4; font-size: .9rem; white-space: nowrap; }
.placement-writing-summary,
.placement-writing-success,
.placement-writing-warning { color: #d5dff0; font-size: .86rem; line-height: 1.6; margin: 16px 0 0; }
.placement-writing-success { color: #86efac; }
.placement-writing-warning { color: #fde68a; }
.placement-writing-errors { margin-top: 18px; }
.placement-writing-errors h3 { color: #fff; font-size: .92rem; margin: 0 0 9px; }
.placement-writing-error { margin-top: 8px; padding: 10px 12px; border: 1px solid rgba(251, 113, 133, .2); border-radius: 10px; background: rgba(251, 113, 133, .06); }
.placement-writing-error p { color: #fecdd3; font-size: .82rem; line-height: 1.5; margin: 0; }
.placement-writing-error p span { color: #f9a8d4; padding: 0 4px; }
.placement-writing-error p strong { color: #bbf7d0; }
.placement-writing-error small { display: block; color: #b7c6dc; font-size: .75rem; line-height: 1.5; margin-top: 4px; }
.placement-writing-corrected { margin-top: 17px; border-top: 1px solid rgba(255, 255, 255, .1); padding-top: 12px; }
.placement-writing-corrected summary { color: #a5f3fc; cursor: pointer; font-size: .8rem; font-weight: 800; }
.placement-writing-corrected p { color: #d5dff0; font-size: .84rem; line-height: 1.6; margin: 10px 0 0; white-space: pre-wrap; }

.placement-result-details {
    margin: 0 0 26px;
    border: 1px solid rgba(255, 255, 255, .12);
    border-radius: var(--radius);
    background: rgba(8, 18, 39, .72);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    overflow: hidden;
}

.placement-result-details summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 17px 22px;
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    list-style: none;
}

.placement-result-details summary::-webkit-details-marker { display: none; }
.placement-result-details summary:after { content: '+'; color: #67e8f9; font-size: 1.3rem; }
.placement-result-details[open] summary:after { content: '−'; }
.placement-result-details summary small { margin-left: auto; color: var(--muted); font-size: .76rem; font-weight: 500; }
.placement-result-detail-list { display: grid; gap: 8px; padding: 0 14px 14px; }
.placement-result-detail { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 13px; border: 1px solid rgba(255, 255, 255, .08); border-radius: 13px; background: rgba(255, 255, 255, .035); }
.placement-result-detail.is-correct { border-color: rgba(52, 211, 153, .32); }
.placement-result-detail.is-incorrect { border-color: rgba(251, 113, 133, .32); }
.placement-result-detail-status { width: 28px; height: 28px; display: grid; place-items: center; border-radius: 50%; font-size: 1.1rem; font-weight: 900; }
.is-correct .placement-result-detail-status { color: #6ee7b7; background: rgba(52, 211, 153, .15); }
.is-incorrect .placement-result-detail-status { color: #fda4af; background: rgba(251, 113, 133, .15); }
.placement-result-detail-copy strong { color: #fff; font-size: .82rem; }
.placement-result-detail-copy p { margin: 4px 0; color: #d4deed; font-size: .84rem; line-height: 1.55; }
.placement-result-detail-copy small { color: var(--muted); font-size: .73rem; line-height: 1.5; }
.placement-result-detail-copy small b { color: #f8fafc; font-weight: 700; }
.placement-result-detail-points { color: #fde68a; font-size: .75rem; font-weight: 800; white-space: nowrap; }

.placement-retry-button {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-left: auto;
    flex: 0 0 auto;
    padding: 12px 20px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .18);
    color: #fff;
    font-size: .8rem;
    font-weight: 800;
    text-decoration: none;
    z-index: 1;
    transition: background .2s, transform .2s;
}

.placement-retry-button:hover { background: rgba(255, 255, 255, .16); color: #fff; transform: translateY(-2px); text-decoration: none; }

.placement-honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px !important;
    height: 1px !important;
    opacity: 0 !important;
}

.placement-confetti-canvas { position: fixed; inset: 0; z-index: 2147482000; width: 100vw; height: 100vh; pointer-events: none; }

/* Placement pages use the same dark arena all the way through the footer. */
main.placement-test-shell ~ .footer-area,
main.placement-chooser-shell ~ .footer-area {
    --footer-background-color: #080d1b !important;
    background: #080d1b !important;
    color: #d8e4f2 !important;
}

main.placement-test-shell ~ .footer-area .footer-top,
main.placement-chooser-shell ~ .footer-area .footer-top {
    background: #080d1b !important;
}

main.placement-test-shell ~ .footer-area .footer-top::after,
main.placement-chooser-shell ~ .footer-area .footer-top::after {
    -webkit-mask-image: none !important;
    mask-image: none !important;
    background: #080d1b !important;
}

main.placement-test-shell ~ .footer-area .footer-top::before,
main.placement-chooser-shell ~ .footer-area .footer-top::before {
    opacity: .12;
}

main.placement-test-shell ~ .footer-area .footer-widget,
main.placement-chooser-shell ~ .footer-area .footer-widget {
    border-color: rgba(148, 163, 184, .24) !important;
    background: rgba(255, 255, 255, .055) !important;
    box-shadow: 0 18px 42px rgba(0, 0, 0, .2) !important;
}

main.placement-test-shell ~ .footer-area .footer-widget .widget-title,
main.placement-test-shell ~ .footer-area .footer-widget > .image-widget-title,
main.placement-test-shell ~ .footer-area .footer-widget .newsletter-widget > .widget-title,
main.placement-chooser-shell ~ .footer-area .footer-widget .widget-title,
main.placement-chooser-shell ~ .footer-area .footer-widget > .image-widget-title,
main.placement-chooser-shell ~ .footer-area .footer-widget .newsletter-widget > .widget-title {
    color: #f5f9ff !important;
}

main.placement-test-shell ~ .footer-area .footer-widget p,
main.placement-test-shell ~ .footer-area .footer-widget .widget-description,
main.placement-test-shell ~ .footer-area .footer-widget .paragraph,
main.placement-test-shell ~ .footer-area .footer-widget .custom-html-widget,
main.placement-test-shell ~ .footer-area .footer-widget a,
main.placement-test-shell ~ .footer-area .footer-widget li,
main.placement-test-shell ~ .footer-area .footer-widget span,
main.placement-chooser-shell ~ .footer-area .footer-widget p,
main.placement-chooser-shell ~ .footer-area .footer-widget .widget-description,
main.placement-chooser-shell ~ .footer-area .footer-widget .paragraph,
main.placement-chooser-shell ~ .footer-area .footer-widget .custom-html-widget,
main.placement-chooser-shell ~ .footer-area .footer-widget a,
main.placement-chooser-shell ~ .footer-area .footer-widget li,
main.placement-chooser-shell ~ .footer-area .footer-widget span {
    color: #c4d1e1 !important;
}

main.placement-test-shell ~ .footer-area .footer-widget a:hover,
main.placement-chooser-shell ~ .footer-area .footer-widget a:hover {
    color: #67e8f9 !important;
}

main.placement-test-shell ~ .footer-area .copyright-area,
main.placement-chooser-shell ~ .footer-area .copyright-area {
    background: #050914 !important;
    color: #d7e3f1 !important;
    border-top-color: rgba(148, 163, 184, .24) !important;
}

main.placement-test-shell ~ .footer-area .copyright-area-inner,
main.placement-chooser-shell ~ .footer-area .copyright-area-inner {
    color: #d7e3f1 !important;
}

/* reveal */
.pt-reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.pt-reveal.is-visible { opacity: 1; transform: none; }

/* ============ CHOOSER ============ */
.placement-chooser-header { max-width: 760px; margin: 0 auto 48px; text-align: center; }
.placement-chooser-header .placement-test-kicker { margin: 0 auto; }
.placement-chooser-header p { color: var(--muted); margin: 0; font-size: clamp(.95rem, 2vw, 1.12rem); }

.placement-chooser-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 26px;
    max-width: 980px;
    margin: auto;
}

.placement-chooser-card {
    --a1: #22d3ee;
    --a2: #3b82f6;
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 20px;
    min-height: 260px;
    padding: 30px;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--panel);
    -webkit-backdrop-filter: blur(14px);
    backdrop-filter: blur(14px);
    color: #fff;
    text-decoration: none;
    overflow: hidden;
    transition: transform .3s cubic-bezier(.2, 1, .4, 1), border-color .3s, box-shadow .3s;
}

.placement-chooser-card.german { --a1: #fbbf24; --a2: #f43f5e; }

.placement-chooser-card:after {
    content: '';
    position: absolute;
    width: 250px;
    height: 250px;
    border-radius: 50%;
    right: -90px;
    bottom: -110px;
    background: radial-gradient(circle, color-mix(in srgb, var(--a1) 20%, transparent), transparent 65%);
    transition: transform .4s;
}

.placement-chooser-card:hover {
    color: #fff;
    text-decoration: none;
    transform: translateY(-7px);
    border-color: color-mix(in srgb, var(--a1) 60%, transparent);
    box-shadow: 0 24px 60px color-mix(in srgb, var(--a1) 18%, transparent);
}

.placement-chooser-card:hover:after { transform: scale(1.35); }

.placement-chooser-top { display: flex; align-items: center; gap: 18px; position: relative; z-index: 1; }

.placement-chooser-icon {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    padding: 12px;
    border-radius: 20px;
    background: var(--panel);
    border: 1px solid var(--line);
    box-shadow: 0 0 30px color-mix(in srgb, var(--a1) 22%, transparent);
    transition: transform .3s;
}

.placement-chooser-card:hover .placement-chooser-icon { transform: scale(1.07) rotate(-3deg); }

.placement-chooser-copy { position: relative; z-index: 1; min-width: 0; flex: 1; }
.placement-chooser-copy h3 { color: #fff; font-size: 1.3rem; font-weight: 800; line-height: 1.3; margin: 0 0 8px; letter-spacing: -.01em; }
.placement-chooser-copy p { color: var(--muted); font-size: .85rem; margin: 0; }

.placement-chooser-tags { display: flex; flex-wrap: wrap; gap: 8px; position: relative; z-index: 1; }

.placement-chooser-tags span {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: .74rem;
    font-weight: 600;
    color: var(--muted);
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: var(--panel-2);
}

.placement-chooser-tags .pt-icon { width: 13px; height: 13px; color: var(--a1); }

.placement-chooser-link {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-top: auto;
    color: #fff;
    font-size: .9rem;
    font-weight: 800;
    padding: 13px 26px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--a1), var(--a2));
    box-shadow: 0 10px 28px color-mix(in srgb, var(--a2) 40%, transparent);
    width: fit-content;
    transition: transform .2s, box-shadow .2s;
}

.placement-chooser-card:hover .placement-chooser-link {
    transform: translateX(4px) scale(1.02);
    box-shadow: 0 14px 34px color-mix(in srgb, var(--a2) 55%, transparent);
}

/* ============ RESPONSIVE ============ */
@media (max-width: 991px) {
    .placement-test-grid { grid-template-columns: 1fr; }
    .placement-test-aside { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
    .placement-contact-card { margin-top: 0; }
    .placement-result-card { align-items: flex-start; flex-wrap: wrap; }
    .placement-retry-button { margin-left: 0; }
}

@media (max-width: 767px) {
    .placement-test-shell, .placement-chooser-shell { padding: 44px 0 72px; }
    .placement-start-backdrop { padding: 12px; }
    .placement-start-modal { max-height: calc(100vh - 24px); padding: 24px 20px; border-radius: 20px; }
    .placement-start-facts { gap: 7px; margin: 18px 0; }
    .placement-start-facts div { padding: 11px 7px; }
    .placement-start-facts strong { font-size: 1.05rem; }
    .placement-start-facts span { font-size: .64rem; }
    .placement-start-actions { align-items: stretch; flex-direction: column; }
    .placement-start-agree { width: 100%; }
    .placement-start-back { text-align: center; }
    .placement-utility-actions { align-items: stretch; flex-direction: column; }
    .placement-utility-actions .placement-language-switcher,
    .placement-utility-actions .placement-sound-toggle { width: 100%; }
    .placement-sound-toggle { min-height: 42px; }
    .placement-test-hero { align-items: flex-start; gap: 16px; }
    .placement-test-hero-icon { padding: 12px; border-radius: 18px; }
    .placement-test-hero-icon .pt-flag { width: 52px; height: auto; }
    .placement-test-intro, .placement-student-card, .placement-question-section, .placement-level-card, .placement-contact-card { border-radius: 16px; padding: 18px; }
    .placement-writing-section { padding: 15px; border-radius: 15px; }
    .placement-writing-heading { align-items: flex-start; }
    .placement-writing-heading h3 { font-size: 1rem; }
    .placement-writing-answer { min-height: 190px; font-size: .9rem; }
    .placement-writing-result { padding: 18px; }
    .placement-writing-result-heading { flex-wrap: wrap; }
    .placement-writing-result-score { margin-left: 0; flex-basis: 100%; }
    .placement-fields { grid-template-columns: 1fr; }
    .placement-options { grid-template-columns: 1fr; }
    .placement-question { padding: 18px 0; }
    .placement-question h3 { font-size: 1rem; }
    .placement-test-aside { grid-template-columns: 1fr; }
    .placement-result-card { padding: 19px; gap: 16px; }
    .placement-level-gauge-shell { padding: 20px 18px 19px; }
    .placement-level-gauge-heading { display: block; }
    .placement-level-gauge-status { display: block; margin-top: 11px; white-space: normal; }
    .placement-level-gauge { margin-right: 5px; margin-left: 5px; }
    .placement-level-gauge-labels span { font-size: 1.05rem; }
    .placement-level-gauge-needle { left: calc(50% - 4px); width: 8px; height: 52%; }
    .placement-level-gauge-needle:after { top: -14px; border-left-width: 11px; border-right-width: 11px; border-bottom-width: 22px; }
    .placement-level-gauge-hub { width: 34px; height: 34px; border-width: 7px; }
    .placement-score-ring { width: 94px; height: 94px; }
    .placement-score-ring-label strong { font-size: 1.3rem; }
    .placement-result-copy { flex: 1; }
    .placement-result-copy h2 { font-size: 1.25rem; }
    .placement-result-details summary { align-items: flex-start; }
    .placement-result-details summary small { display: none; }
    .placement-result-detail { grid-template-columns: 30px minmax(0, 1fr); }
    .placement-result-detail-points { grid-column: 2; }
    .placement-retry-button { width: 100%; justify-content: center; margin: 6px 0 0; }
    .placement-wizard-nav { flex-wrap: wrap; border-radius: 20px; }
    .placement-wizard-dots { order: 3; flex-basis: 100%; }
    .placement-milestone { padding: 34px 18px; }
    .placement-timer { margin: 0 auto 20px; width: fit-content; max-width: 100%; }
    .placement-chooser-grid { grid-template-columns: 1fr; }
    .placement-chooser-card { min-height: 0; padding: 22px; }
    .placement-chooser-icon .pt-flag { width: 52px; height: auto; }
    .placement-float { font-size: 1.4rem; }
}

@media (prefers-reduced-motion: reduce) {
    .placement-level-gauge-shell.is-animating .placement-level-gauge-needle { animation: none; }
    .placement-level-gauge-shell.is-animating .placement-level-gauge-needle,
    .placement-level-gauge-shell.is-settled .placement-level-gauge-needle { transform: rotate(var(--target-angle)); }
}

/* ============ REDUCED MOTION ============ */
@media (prefers-reduced-motion: reduce) {
    .placement-test-hero-icon,
    .placement-submit-button:after, .placement-final-card,
    .placement-test-hero h2.placement-hero-title, .placement-chooser-header h2 { animation: none !important; }
    .pt-reveal { opacity: 1; transform: none; transition: none; }
}
