/* ── Self-hosted fonts — mirror aecsnepal.com (Outfit display + Inter body).
   No Google Fonts: keeps the page CSP-clean ('self' font-src) and fast.     ── */
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/outfit-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/outfit-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/outfit-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Outfit"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/outfit-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/inter-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/inter-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/inter-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 700; font-display: swap; src: url("fonts/inter-latin-700-normal.woff2") format("woff2"); }

:root {
    /* Brand palette aligned to site/src/styles/tokens.css. The former teal /
       violet accents are re-pointed at brand blues so every gradient that
       references them re-brands automatically (no per-rule edits needed). */
    --blue: #1A3C8F;            /* Abroad Blue — primary */
    --blue-700: #213F94;
    --blue-50: #EEF2FB;
    --orange: #E87722;          /* Abroad Orange — accent */
    --orange-600: #C9620F;
    --teal: #213F94;            /* re-branded → blue */
    --violet: #2849A2;          /* re-branded → blue */
    --ink: #1A1A1A;
    --muted: #6B7280;
    --line: #E5E5E0;
    --line-strong: rgba(26, 60, 143, .18);
    --bg: #FAFAF7;              /* warm off-white page background */
    --white: #ffffff;
    --glass: #ffffff;           /* solid cards (flat surface, not glassmorphism) */
    --glass-strong: #ffffff;
    --ok: #168257;
    --err: #C2410C;
    --radius: 18px;
    --radius-sm: 12px;
    --shadow: 0 18px 48px rgba(20, 34, 92, .12);
    --shadow-soft: 0 8px 28px rgba(20, 34, 92, .08);
    --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
    --display: "Outfit", var(--font);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: var(--font);
    color: var(--ink);
    background: var(--bg);
    line-height: 1.6;
}
/* Faint architectural grid — echoes the main site's surface texture. */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(26, 60, 143, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(26, 60, 143, .045) 1px, transparent 1px);
    background-size: 48px 48px;
    mask-image: radial-gradient(ellipse 120% 80% at 50% 0, rgba(0,0,0,.5), transparent 75%);
}

a { color: var(--blue); }
.wrap { width: min(1120px, calc(100% - 40px)); margin: 0 auto; }
.section-pad { padding: 74px 0; }
.hidden { display: none !important; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 20;
    background: rgba(255,255,255,.92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(18px);
    box-shadow: 0 8px 24px rgba(20, 34, 92, .04);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 22px; padding: 14px 0; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand-logo { height: 40px; width: auto; display: block; filter: drop-shadow(0 8px 14px rgba(22, 59, 143, .12)); }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand-text strong { font-family: var(--display); font-size: 1rem; font-weight: 700; color: var(--ink); white-space: nowrap; letter-spacing: -.01em; }
.brand-tag { font-size: .74rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.site-nav, .admin-nav { display: flex; gap: 8px; align-items: center; }
.site-nav a, .admin-nav a {
    color: #344054;
    text-decoration: none;
    font-size: .88rem;
    font-weight: 700;
    padding: 9px 11px;
    border-radius: 999px;
    transition: background .2s, color .2s, transform .2s;
}
.site-nav a:hover, .admin-nav a:hover { background: rgba(22, 59, 143, .08); color: var(--blue); transform: translateY(-1px); }
.header-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: .78rem;
    font-weight: 600;
    color: #fff;
    background: var(--blue);
    padding: 9px 14px;
    border-radius: 999px;
    box-shadow: var(--shadow-soft);
    transition: background .2s, transform .2s, box-shadow .2s;
}
.header-badge:hover { background: var(--blue-700); transform: translateY(-1px); box-shadow: var(--shadow); }
/* Dual header CTA cluster (mirrors the main site: Book Mock Test + Free English Test). */
.header-cta { display: inline-flex; align-items: center; gap: 8px; }
.header-badge--accent { background: var(--orange); box-shadow: 0 10px 22px rgba(232,119,34,.22); }
.header-badge--accent:hover { background: var(--orange-600); }

/* Mobile nav toggle (hamburger) — hidden on desktop, shown ≤880px. */
.nav-toggle { display: none; flex-direction: column; align-items: center; justify-content: center; gap: 5px; width: 44px; height: 44px; padding: 0; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.7); cursor: pointer; }
.nav-toggle-bar { width: 20px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .25s ease, opacity .2s ease; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.site-nav-cta { display: none; }

/* Dark footer — matches the main site's #0a1428 base + cross-links back. */
.site-footer { margin-top: 56px; background: #0a1428; color: rgba(255,255,255,.66); }
.footer-inner { display: flex; justify-content: space-between; gap: 40px; padding: 48px 0 26px; }
.footer-brand-col { max-width: 44ch; }
.footer-brand { margin-bottom: 8px; }
.site-footer .brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.site-footer .brand-text strong { font-family: var(--display); font-size: 1.05rem; font-weight: 700; color: #fff; }
.site-footer .brand-tag { font-size: .8rem; color: rgba(255,255,255,.55); }
.footer-note { max-width: 52ch; margin: 14px 0 0; font-size: .88rem; color: rgba(255,255,255,.6); }
.footer-links { display: flex; flex-direction: column; align-items: flex-start; gap: 11px; font-size: .9rem; font-weight: 600; }
.footer-links a { text-decoration: none; color: rgba(255,255,255,.78); transition: color .2s; }
.footer-links a:hover { color: #fff; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; padding: 18px 0 30px; margin-top: 14px; border-top: 1px solid rgba(255,255,255,.12); font-size: .82rem; color: rgba(255,255,255,.5); }
.footer-bottom a { color: rgba(255,255,255,.72); text-decoration: none; }
.footer-bottom a:hover { color: #fff; }

.eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 14px;
    color: var(--orange-600);
    font-size: .76rem;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: currentColor; box-shadow: 0 0 0 6px rgba(232,119,34,.12); }
h1, h2, h3 { font-family: var(--display); letter-spacing: 0; line-height: 1.08; }

.hero { position: relative; overflow: hidden; min-height: 600px; display: grid; align-items: center; }
.hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 170px;
    background: linear-gradient(to bottom, transparent, rgba(255,255,255,.74));
    pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(360px, .86fr); align-items: center; gap: clamp(34px, 6vw, 76px); position: relative; z-index: 1; }
.hero h1 { max-width: 14ch; margin: 0; font-size: clamp(2.6rem, 1.8rem + 3.4vw, 4.6rem); font-weight: 700; letter-spacing: -.02em; }
.hero h1::first-line { color: var(--blue); }
.hero-sub { max-width: 62ch; margin: 24px 0 0; color: #475467; font-size: clamp(1.02rem, 1.5vw, 1.22rem); }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 32px; }
.hero-disclaimer { margin: 18px 0 0; color: var(--muted); font-size: .88rem; }
.hero-visual { position: relative; display: flex; align-items: center; justify-content: center; }
/* Hero "Built for your exam" card — mirrors the main site /exam-booking/ Available-Mock-Tests card. */
.eb-card {
    width: min(440px, 100%);
    background: #fff;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: clamp(1.4rem, 1rem + 1.5vw, 2.25rem);
}
.eb-card-title {
    margin: 0 0 1.25rem;
    font-size: 1.32rem;
    font-weight: 700;
    color: var(--blue);
    letter-spacing: -.01em;
    position: relative;
    padding-bottom: .7rem;
}
.eb-card-title::after { content: ""; position: absolute; left: 0; bottom: 0; width: 2.75rem; height: 3px; border-radius: 999px; background: var(--blue); }
.eb-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.mock-tile {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: .6rem; padding: 1.1rem .5rem;
    background: var(--bg);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
.mock-tile:hover { border-color: rgba(26, 60, 143, .3); box-shadow: var(--shadow-soft); transform: translateY(-2px); }
.mock-tile-logo { display: grid; place-items: center; height: 2.4rem; width: 100%; }
.mock-tile-logo img { max-height: 2.4rem; max-width: 100%; width: auto; height: auto; object-fit: contain; }
.mock-tile-label { font-size: .86rem; font-weight: 600; color: var(--ink); }
.eb-card-sub { margin: 1.6rem 0 1.1rem; font-size: 1.05rem; font-weight: 700; color: var(--blue); letter-spacing: -.01em; }
.eb-includes { display: grid; grid-template-columns: repeat(3, 1fr); gap: .75rem; }
.include-item { display: flex; flex-direction: column; align-items: center; gap: .55rem; text-align: center; }
.include-icon { display: grid; place-items: center; height: 3rem; width: 3rem; border-radius: 999px; background: var(--blue-50); color: var(--blue); }
.include-icon svg { width: 1.35rem; height: 1.35rem; }
.include-label { font-size: .84rem; font-weight: 600; line-height: 1.3; color: #2D2D2D; }

/* Hero "sample result preview" card — mirrors the real result page (CEFR level + section bars). */
.dx-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 20px; }
.dx-free { display: inline-flex; align-items: center; gap: 8px; font-size: .74rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--orange-600); }
.dx-free::before { content: ""; width: 8px; height: 8px; border-radius: 999px; background: currentColor; box-shadow: 0 0 0 5px rgba(232,119,34,.12); }
.dx-time { font-size: .78rem; font-weight: 700; color: var(--blue); background: var(--blue-50); padding: 6px 12px; border-radius: 999px; }
.dx-level { display: flex; align-items: center; gap: 15px; margin-bottom: 18px; }
.dx-badge { display: grid; place-items: center; flex-shrink: 0; width: 66px; height: 66px; border-radius: 18px; background: linear-gradient(135deg, var(--blue), var(--blue-700)); color: #fff; font-family: var(--display); font-weight: 700; font-size: 2rem; line-height: 1; box-shadow: 0 12px 26px rgba(22,59,143,.22); }
.dx-level-meta { display: flex; flex-direction: column; gap: 3px; }
.dx-level-meta strong { font-family: var(--display); font-size: 1.12rem; color: var(--ink); }
.dx-level-meta span { font-size: .84rem; color: var(--muted); }
.dx-scale { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin-bottom: 24px; }
.dx-scale span { text-align: center; font-size: .74rem; font-weight: 700; color: var(--muted); padding: 7px 0; border-radius: 9px; background: var(--bg); border: 1px solid var(--line); }
.dx-scale span.is-active { color: #fff; background: var(--blue); border-color: var(--blue); box-shadow: 0 6px 14px rgba(22,59,143,.25); }
.dx-section-title { margin: 0 0 12px; font-family: var(--display); font-size: .96rem; font-weight: 700; color: var(--blue); }
.dx-sections { display: flex; flex-direction: column; gap: 13px; }
.dx-row { display: grid; grid-template-columns: 82px 1fr 38px; align-items: center; gap: 12px; }
.dx-row-name { font-size: .84rem; font-weight: 600; color: var(--ink); }
.dx-track { height: 9px; border-radius: 999px; background: rgba(22,59,143,.1); overflow: hidden; }
.dx-bar { display: block; height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--blue), var(--blue-700)); }
.dx-row-val { font-size: .8rem; font-weight: 600; color: var(--muted); text-align: right; }
.dx-note { margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: .76rem; color: var(--muted); text-align: center; }

.process-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding-top: 24px; }
.process-card, .card, .ring-card, .breakdown, .question, .audio-block, .passage, .stat, .table-wrap {
    border: 1px solid rgba(255,255,255,.74);
    background: var(--glass);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
}
.process-card { border-radius: var(--radius); padding: 26px; transition: transform .25s, box-shadow .25s, border-color .25s; }
.process-card:hover, .card:hover, .stat:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: rgba(22,59,143,.22); }
.process-card span { color: var(--orange-600); font-weight: 700; }
.process-card h2 { margin: 28px 0 8px; font-size: 1.35rem; }
.process-card p { margin: 0; color: var(--muted); }

.faq-section { display: grid; grid-template-columns: .9fr 1.1fr; gap: clamp(36px, 5vw, 72px); align-items: start; }
.faq-copy { position: sticky; top: 96px; }
.faq-copy h2 { margin: 0; font-size: clamp(1.7rem, 1rem + 2.2vw, 2.7rem); }
.faq-lede { margin: 16px 0 26px; color: var(--muted); font-size: 1.04rem; max-width: 40ch; }
.faq-list { border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--line); padding: 20px 0; }
.faq-list summary { list-style: none; cursor: pointer; color: var(--ink); font-family: var(--display); font-size: 1.08rem; font-weight: 600; }
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; float: right; color: var(--orange-600); font-family: var(--font); }
.faq-list details[open] summary::after { content: "-"; }
.faq-list p { margin: 12px 0 0; color: var(--muted); max-width: 62ch; animation: fadeUp .22s ease both; }

.btn {
    position: relative;
    overflow: hidden;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 42px;
    border: 1px solid transparent;
    border-radius: 999px;
    padding: 11px 18px;
    font-family: var(--font);
    font-weight: 700;
    font-size: .94rem;
    text-decoration: none;
    cursor: pointer;
    transition: transform .2s, box-shadow .2s, background .2s, border-color .2s;
}
.btn::after { content: ""; position: absolute; inset: 0; background: radial-gradient(circle at var(--x, 50%) var(--y, 50%), rgba(255,255,255,.38), transparent 34%); opacity: 0; transition: opacity .2s; }
.btn:hover::after { opacity: 1; }
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn-primary { color: #fff; background: var(--blue); box-shadow: var(--shadow-soft); }
.btn-primary:hover { background: var(--blue-700); }
.btn-accent { color: #fff; background: var(--orange); box-shadow: 0 12px 28px rgba(232,119,34,.24); }
.btn-accent:hover { background: var(--orange-600); }
.btn-ghost { color: var(--blue); background: #fff; border-color: rgba(26,59,143,.18); }
.btn-lg { min-height: 50px; padding: 13px 22px; font-size: 1rem; }
.btn-block { width: 100%; }
.btn:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, button:focus-visible, .tab:focus-visible {
    outline: 3px solid rgba(22, 59, 143, .28);
    outline-offset: 3px;
}

.card { border-radius: var(--radius); padding: clamp(22px, 4vw, 36px); margin-top: 28px; }
.card-head h2 { margin: 0 0 6px; font-size: clamp(1.4rem, 3vw, 2.1rem); }
.card-head p { margin: 0 0 22px; color: var(--muted); }
.form-card { scroll-margin-top: 92px; }
.register-modal {
    position: fixed;
    inset: 0;
    z-index: 48;
    display: grid;
    place-items: center;
    padding: 22px;
}
.register-modal[hidden] { display: none; }
.register-backdrop { position: absolute; inset: 0; background: rgba(9,18,39,.42); backdrop-filter: blur(16px); }
.register-dialog {
    position: relative;
    width: min(780px, 100%);
    max-height: min(92vh, 860px);
    overflow: auto;
    margin: 0;
    animation: modalIn .28s ease both;
}
.register-dialog .card-head h2 { font-size: clamp(1.55rem, 4vw, 2.45rem); }
.form { display: flex; flex-direction: column; gap: 18px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { position: relative; display: flex; flex-direction: column; gap: 7px; }
/* `.field { display:flex }` would otherwise beat the [hidden] attribute (same
   specificity, author rule wins), so section-specific fields stayed visible —
   re-assert display:none for a hidden field. */
.field[hidden] { display: none; }
.field label, .consent span { color: #344054; font-size: .86rem; font-weight: 600; }
input[type=text], input[type=tel], input[type=email], input[type=password], select, textarea {
    width: 100%;
    min-height: 46px;
    border: 1px solid rgba(22,59,143,.16);
    border-radius: var(--radius-sm);
    padding: 11px 13px;
    background: rgba(255,255,255,.78);
    color: var(--ink);
    font-family: var(--font);
    font-size: .96rem;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.9);
    transition: border-color .2s, box-shadow .2s, background .2s;
}
input:focus, select:focus, textarea:focus { border-color: rgba(22,59,143,.55); background: #fff; box-shadow: 0 0 0 4px rgba(22,59,143,.09); }
.consent { display: flex; flex-direction: column; gap: 7px; border: 1px solid rgba(22,59,143,.12); border-radius: var(--radius-sm); padding: 15px; background: rgba(238,244,255,.76); }
.consent label { display: flex; gap: 11px; align-items: flex-start; font-size: .86rem; }
.consent input { margin-top: 4px; accent-color: var(--blue); }
.err { color: var(--err); font-size: .82rem; font-weight: 700; }
.alert { border-radius: var(--radius-sm); padding: 12px 14px; margin-bottom: 16px; font-size: .9rem; font-weight: 700; }
.alert-error { color: var(--err); background: #fff0ed; border: 1px solid #ffd1c8; }
.alert-ok { color: var(--ok); background: #eaf8f1; border: 1px solid #bfe9d2; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }

.test-shell { padding-top: 48px; }
.test-intro { max-width: 780px; margin-bottom: 24px; }
.test-intro h1 { margin: 0 0 10px; font-size: clamp(2rem, 5vw, 4.2rem); }
.test-intro p:last-child { margin: 0; color: var(--muted); font-size: 1.04rem; }
.test-topbar { position: sticky; top: 73px; z-index: 9; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; padding: 12px; border: 1px solid rgba(255,255,255,.72); border-radius: 18px; background: rgba(255,255,255,.76); backdrop-filter: blur(18px); box-shadow: var(--shadow-soft); }
.test-progress { flex: 1; color: var(--muted); font-weight: 600; font-size: .88rem; }
.bar { height: 9px; margin-top: 8px; overflow: hidden; border-radius: 999px; background: rgba(22,59,143,.1); }
.bar-fill { height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--orange), var(--teal)); transition: width .35s ease; }
.test-timer { min-width: 86px; padding: 9px 13px; border-radius: 999px; color: #fff; background: linear-gradient(135deg, var(--blue), var(--teal)); font-family: var(--display); font-weight: 600; text-align: center; box-shadow: 0 12px 26px rgba(22,59,143,.2); }
.test-timer.low { background: linear-gradient(135deg, var(--err), var(--orange)); }
.tabs { display: flex; gap: 8px; flex-wrap: wrap; margin: 18px 0 20px; }
.tab { display: inline-flex; align-items: center; gap: 8px; border: 1px solid transparent; border-radius: 999px; padding: 10px 14px; background: rgba(255,255,255,.62); color: #475467; font-family: var(--font); font-weight: 700; cursor: pointer; transition: transform .2s, background .2s, color .2s; }
.tab::before { content: ""; width: 9px; height: 9px; border-radius: 999px; background: linear-gradient(135deg, var(--blue), var(--violet)); box-shadow: 0 0 0 5px rgba(22,59,143,.08); }
.tab:hover, .tab.active { transform: translateY(-1px); background: #fff; color: var(--blue); border-color: rgba(22,59,143,.16); box-shadow: var(--shadow-soft); }
.tab-count { font-size: .72rem; padding: 2px 7px; border-radius: 999px; background: rgba(22,59,143,.08); color: var(--muted); }
.tab.done .tab-count { background: #eaf8f1; color: var(--ok); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeUp .26s ease both; }
.panel-note { margin: 0 0 16px; color: var(--muted); }
.passage, .audio-block, .question { border-radius: var(--radius); padding: 20px; margin-bottom: 16px; }
.passage { border-left: 4px solid var(--blue); }
.passage h3 { margin: 0 0 8px; color: var(--blue); }
.passage p { margin: 0; }
.audio-label { color: var(--muted); font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; }
.audio-block { display: flex; flex-direction: column; gap: 9px; }
.audio-block audio { width: 100%; }
.question { transition: transform .2s, border-color .2s, box-shadow .2s; }
.question:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.question legend { padding: 0; margin-bottom: 13px; font-weight: 700; font-size: 1rem; }
.q-num { color: var(--orange-600); margin-right: 4px; }
.options { display: grid; gap: 9px; }
.option { display: flex; align-items: center; gap: 10px; min-height: 46px; border: 1px solid rgba(22,59,143,.13); border-radius: var(--radius-sm); padding: 10px 13px; background: rgba(255,255,255,.56); cursor: pointer; transition: border-color .2s, background .2s, transform .2s; }
.option:hover { border-color: rgba(22,59,143,.36); background: #fff; transform: translateX(3px); }
.option input { accent-color: var(--blue); flex-shrink: 0; }
/* Selected-answer state — highlight the whole row, not just the native radio. */
.option:has(input:checked) {
    border-color: var(--blue);
    background: var(--blue-50);
    box-shadow: inset 0 0 0 1px var(--blue);
}
.option:has(input:checked) span { color: var(--blue); font-weight: 600; }
.question.answered { border-color: rgba(22,130,87,.28); }
.panel-actions { display: flex; justify-content: space-between; align-items: center; gap: 14px; margin-top: 22px; }

.result-hero { max-width: 780px; margin-bottom: 0; }
.result-hero h1 { margin: 0 0 12px; font-size: clamp(2.2rem, 6vw, 5rem); }
.result-hero p:last-child { color: var(--muted); font-size: 1.08rem; margin: 0; }
.result-grid { display: grid; grid-template-columns: 320px 1fr; gap: 22px; align-items: stretch; }
.ring-card, .breakdown { border-radius: var(--radius); padding: 24px; }
.ring-card { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; }
.breakdown { display: flex; flex-direction: column; justify-content: center; }
.ring { width: 205px; height: 205px; filter: drop-shadow(0 15px 24px rgba(22,59,143,.12)); }
.ring-bg { fill: none; stroke: rgba(22,59,143,.11); stroke-width: 12; }
.ring-fg { fill: none; stroke: var(--orange); stroke-width: 12; stroke-linecap: round; transition: stroke-dasharray .8s ease; }
.ring-pct { font-family: var(--display); font-size: 22px; font-weight: 700; fill: var(--blue); text-anchor: middle; }
.ring-cefr { font-size: 12px; fill: var(--muted); text-anchor: middle; letter-spacing: .08em; }
.ring-meta { display: flex; flex-direction: column; gap: 4px; }
.cefr-label { color: var(--blue); font-family: var(--display); font-weight: 700; font-size: 1.08rem; }
.estimate { color: var(--orange-600); font-weight: 700; }
.raw { color: var(--muted); font-size: .88rem; }
.breakdown h2, .result-cta h2 { margin: 0 0 18px; font-size: 1.45rem; }
.break-row { display: grid; grid-template-columns: 112px 1fr 52px; align-items: center; gap: 14px; margin-bottom: 15px; }
.break-name { font-weight: 700; font-size: .9rem; }
.break-bar { height: 11px; background: rgba(22,59,143,.09); border-radius: 999px; overflow: hidden; }
.break-fill { height: 100%; border-radius: 999px; background: linear-gradient(90deg, var(--blue), var(--teal)); }
.break-val { color: var(--muted); text-align: right; font-size: .84rem; font-weight: 600; }
.result-cta p { color: var(--muted); margin: 0 0 8px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 18px; }
.result-disclaimer { max-width: 76ch; color: var(--muted); font-size: .86rem; }

.admin-body {
    background:
        radial-gradient(circle at 0 0, rgba(22,59,143,.14), transparent 32rem),
        radial-gradient(circle at 100% 0, rgba(232,119,34,.10), transparent 30rem),
        #f4f6fb;
}

/* ---- Admin top bar (white, sticky) ---------------------------------- */
.admin-topbar {
    position: sticky; top: 0; z-index: 50;
    background: rgba(255,255,255,.92);
    backdrop-filter: saturate(1.4) blur(10px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 2px 16px rgba(20,34,92,.06);
}
.admin-topbar-inner {
    max-width: 1200px; margin: 0 auto;
    display: flex; align-items: center; gap: 18px;
    padding: 12px clamp(16px, 4vw, 32px);
}
.admin-brand { display: inline-flex; align-items: center; gap: 11px; text-decoration: none; }
.admin-brand-logo { width: 40px; height: 44px; object-fit: contain; }
.admin-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.admin-brand-text strong { color: var(--ink); font-family: var(--display); font-size: 1rem; font-weight: 700; }
.admin-brand-text span { color: var(--muted); font-size: .74rem; font-weight: 600; letter-spacing: .04em; }
.admin-nav { display: flex; align-items: center; gap: 4px; margin-left: auto; }
.admin-topbar .admin-nav-link {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 8px 13px; border-radius: 999px;
    color: #475467; font-size: .88rem; font-weight: 700; text-decoration: none;
    background: none; border: 1px solid transparent;
    transition: background .18s, color .18s, border-color .18s, transform .18s;
}
.admin-topbar .admin-nav-link svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.admin-topbar .admin-nav-link:hover { background: var(--blue-50); color: var(--blue); transform: translateY(-1px); }
.admin-topbar .admin-nav-link.is-active { background: var(--blue); color: #fff; }
.admin-user { display: flex; align-items: center; gap: 8px; padding-left: 6px; margin-left: 4px; border-left: 1px solid var(--line); }
.admin-user-badge { display: inline-flex; align-items: center; padding: 6px 11px; border-radius: 999px; background: var(--blue-50); color: var(--blue); font-size: .8rem; font-weight: 700; }
.admin-logout { margin: 0; }
.admin-logout button {
    font: inherit; font-size: .85rem; font-weight: 700; color: #667085;
    background: none; border: 1px solid var(--line); padding: 7px 12px;
    border-radius: 999px; cursor: pointer; transition: background .18s, color .18s, border-color .18s;
}
.admin-logout button:hover { background: #fff0ed; color: var(--err); border-color: #ffd1c8; }

.admin-main { padding-bottom: 48px; }
.admin-main-inner { max-width: 1200px; margin: 0 auto; padding: 30px clamp(16px, 4vw, 32px) 0; }

.admin-hero { display: flex; justify-content: space-between; align-items: center; gap: 22px; margin-bottom: 22px; padding: 28px; border-radius: 24px; background: linear-gradient(135deg, rgba(16,43,105,.97), rgba(22,59,143,.85)); color: #fff; box-shadow: var(--shadow); overflow: hidden; }
.admin-hero .eyebrow { color: #ffbd7f; }
.admin-hero h1 { margin: 0 0 8px; font-size: clamp(1.8rem, 4vw, 2.9rem); }
.admin-hero p { margin: 0; max-width: 62ch; color: rgba(255,255,255,.82); }
.admin-hero .btn-primary { background: #fff; color: var(--blue); white-space: nowrap; }
.admin-hero .btn-primary:hover { background: #fff; transform: translateY(-2px); }

/* ---- Stat cards ----------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin: 22px 0; }
.stat { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; transition: transform .2s, box-shadow .2s, border-color .2s; }
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-soft); border-color: rgba(22,59,143,.22); }
.stat-k { color: var(--blue); font-family: var(--display); font-size: 2rem; font-weight: 700; line-height: 1; }
.stat-v { margin-top: 7px; color: var(--muted); font-size: .82rem; font-weight: 600; }

/* ---- Analytics charts ---------------------------------------------- */
.analytics { margin: 22px 0 8px; }
.chart-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 16px; }
.chart-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px 22px; }
.chart-card--wide { grid-column: 1 / -1; }
.chart-head h2 { margin: 0 0 2px; font-size: 1.05rem; }
.chart-head p { margin: 0 0 16px; color: var(--muted); font-size: .82rem; }
.chart-empty { color: var(--muted); font-size: .9rem; margin: 8px 0 0; }

.donut-wrap { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.donut { width: 148px; height: 148px; flex: 0 0 auto; }
.donut-big { font-family: var(--display); font-size: 26px; font-weight: 700; fill: var(--ink); }
.donut-small { font-size: 11px; font-weight: 600; fill: var(--muted); letter-spacing: .04em; }
.chart-legend { list-style: none; margin: 0; padding: 0; flex: 1 1 180px; display: flex; flex-direction: column; gap: 8px; }
.chart-legend li { display: flex; align-items: center; gap: 9px; font-size: .84rem; }
.chart-legend .dot { width: 11px; height: 11px; border-radius: 3px; flex: 0 0 auto; }
.chart-legend .lg-label { color: var(--ink); font-weight: 600; }
.chart-legend .lg-val { margin-left: auto; color: var(--muted); font-weight: 700; font-variant-numeric: tabular-nums; }

.bar-chart { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 74px 1fr 46px; align-items: center; gap: 12px; }
.bar-label { color: #475467; font-size: .82rem; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 12px; border-radius: 999px; background: #eef1f6; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 999px; min-width: 3px; transition: width .5s cubic-bezier(.16,1,.3,1); }
.bar-val { text-align: right; color: var(--ink); font-size: .82rem; font-weight: 700; font-variant-numeric: tabular-nums; }

/* ---- Section tabs (questions bank) --------------------------------- */
.section-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin: 20px 0 4px; }
.section-tab {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 9px 15px; border-radius: 999px; text-decoration: none;
    background: #fff; border: 1px solid var(--line); color: #475467;
    font-size: .88rem; font-weight: 700; transition: background .18s, color .18s, border-color .18s, transform .18s;
}
.section-tab:hover { border-color: rgba(22,59,143,.3); color: var(--blue); transform: translateY(-1px); }
.section-tab.is-active { background: var(--blue); color: #fff; border-color: var(--blue); }
.section-tab .tab-count { display: inline-flex; align-items: center; justify-content: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: rgba(22,59,143,.1); color: var(--blue); font-size: .72rem; }
.section-tab.is-active .tab-count { background: rgba(255,255,255,.24); color: #fff; }

/* ---- Question form helpers ----------------------------------------- */
.field-opt { color: var(--muted); font-weight: 500; font-size: .82em; }
.field-note { margin: 6px 0 0; color: var(--muted); font-size: .8rem; }
.field-note code { background: var(--blue-50); padding: 1px 5px; border-radius: 5px; font-size: .92em; }
.sec-tag { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 999px; font-size: .74rem; font-weight: 700; background: var(--blue-50); color: var(--blue); }
.sec-listening { background: #f0edff; color: #5c47b0; }
.sec-reading { background: #e9f2ff; color: var(--blue); }
.sec-vocabulary { background: #fff1e5; color: var(--orange-600); }
.sec-grammar { background: #e8f7ef; color: var(--ok); }
.row-meta { color: var(--muted); font-size: .74rem; }

.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin: 18px 0; }
.toolbar form { display: flex; gap: 9px; flex-wrap: wrap; }
.toolbar input, .toolbar select { min-height: 42px; }
.toolbar-meta { color: var(--muted); font-size: .88rem; font-weight: 600; }
.table-wrap { overflow-x: auto; border-radius: var(--radius); }
table.data { width: 100%; min-width: 780px; border-collapse: collapse; font-size: .88rem; }
table.data th, table.data td { text-align: left; padding: 13px 15px; border-bottom: 1px solid rgba(16,24,40,.08); white-space: nowrap; }
table.data th { position: sticky; top: 0; z-index: 1; color: #475467; background: rgba(244,247,252,.94); font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
table.data tr { transition: background .18s; }
table.data tr:hover td { background: rgba(238,244,255,.68); }
.pill { display: inline-flex; align-items: center; min-height: 24px; border-radius: 999px; padding: 3px 9px; font-size: .73rem; font-weight: 700; }
.pill-New { background: #eef4ff; color: var(--blue); }
.pill-Contacted { background: #fff1e5; color: var(--orange-600); }
.pill-Counselling { background: #f0edff; color: #5c47b0; }
.pill-FollowUp { background: #fff8d8; color: #80670c; }
.pill-Enrolled { background: #e8f7ef; color: var(--ok); }
.pill-NotInterested { background: #eef0f4; color: #667085; }
.pill-CompletedTest { background: #e9f8f7; color: #087f7a; }
.row-actions a { margin-right: 10px; font-weight: 700; text-decoration: none; }
.danger { color: var(--err); }
.pager { display: flex; gap: 7px; flex-wrap: wrap; margin: 18px 0; }
.pager a, .pager span { border: 1px solid rgba(22,59,143,.14); border-radius: 999px; padding: 7px 12px; background: rgba(255,255,255,.72); text-decoration: none; font-size: .86rem; font-weight: 700; }
.pager .current { background: var(--blue); color: #fff; border-color: var(--blue); }
.detail-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px 24px; }
.dt { color: var(--muted); font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.dd { margin: 2px 0 8px; font-size: .98rem; }
.back-link { display: inline-flex; margin: 4px 0 14px; font-weight: 700; text-decoration: none; }
.login-wrap { max-width: 420px; margin: min(9vh, 72px) auto; padding: 0 18px; }
.login-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(26px, 5vw, 40px); box-shadow: var(--shadow-soft); }
.login-brand { text-align: center; margin-bottom: 22px; }
.login-logo { width: 72px; height: 79px; object-fit: contain; margin: 0 auto 12px; }
.login-brand h1 { margin: 0 0 4px; font-size: 1.5rem; }
.login-brand p { margin: 0; color: var(--muted); font-size: .84rem; }
.login-form { margin-top: 4px; }
.login-note { margin: 16px 0 0; text-align: center; color: var(--muted); font-size: .76rem; line-height: 1.5; }

.reveal { opacity: 0; transform: translateY(18px); filter: blur(8px); transition: opacity .65s ease, transform .65s ease, filter .65s ease; }
.reveal.visible { opacity: 1; transform: translateY(0); filter: blur(0); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: translateY(0); } }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes meter { from { transform: scaleX(.2); transform-origin: left; opacity: .4; } to { transform: scaleX(1); opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(18px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* ------------------------------------------------------------------ *
 * Registration persistence note + spin-and-win prize wheel
 * ------------------------------------------------------------------ */
.form-persist-note {
    margin-top: 12px; padding: 10px 12px; border-radius: 12px;
    background: var(--blue-50); color: var(--blue-700);
    font-size: .82rem; line-height: 1.5;
}

/* Landing promo strip teasing the spin. */
.spin-promo {
    display: flex; align-items: center; gap: 20px; flex-wrap: wrap;
    padding: 22px 26px; border-radius: 20px; position: relative; overflow: hidden;
    background: linear-gradient(120deg, var(--blue), var(--blue-700));
    color: #fff; box-shadow: 0 20px 44px rgba(20,34,92,.22);
}
.spin-promo::before { content: ""; position: absolute; right: -46px; top: -46px; width: 210px; height: 210px; border-radius: 999px; background: radial-gradient(circle, rgba(232,119,34,.5), transparent 70%); }
.spin-promo-emoji { font-size: 2.6rem; line-height: 1; position: relative; }
.spin-promo-copy { position: relative; flex: 1 1 260px; }
.spin-promo-copy strong { display: block; font-family: var(--display); font-size: 1.15rem; font-weight: 700; }
.spin-promo-copy span { display: block; margin-top: 3px; font-size: .92rem; color: rgba(255,255,255,.82); }

/* Result-page spin panel. */
.spin-panel { margin: 34px 0; padding: clamp(24px, 3vw, 40px); border-radius: 26px; background: #0a1428; color: #fff; text-align: center; position: relative; overflow: hidden; }
.spin-panel::before { content: ""; position: absolute; inset: 0; background: radial-gradient(120% 90% at 50% -10%, rgba(232,119,34,.24), transparent 60%); pointer-events: none; }
.spin-head { position: relative; }
.spin-panel .eyebrow { justify-content: center; color: var(--orange); }
.spin-head h2 { margin: 6px 0 0; font-family: var(--display); font-size: clamp(1.6rem, 1.1rem + 2vw, 2.4rem); font-weight: 700; color: #fff; }
.spin-lede { max-width: 46ch; margin: 12px auto 0; color: rgba(255,255,255,.72); font-size: 1rem; }

.wheel-stage { position: relative; display: flex; flex-direction: column; align-items: center; gap: 26px; margin-top: 30px; }
.wheel-wrap { position: relative; width: min(340px, 82vw); aspect-ratio: 1; }
.wheel {
    position: absolute; inset: 0; border-radius: 999px; box-sizing: border-box;
    border: 8px solid #fff; transform: rotate(0deg); will-change: transform;
    box-shadow: 0 0 0 6px rgba(255,255,255,.12), 0 30px 60px rgba(0,0,0,.4);
}
.wheel-labels { position: absolute; inset: 0; }
.wheel-label { position: absolute; left: 50%; top: 0; width: 0; height: 50%; transform-origin: bottom center; }
.wheel-label span {
    position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
    width: 92px; text-align: center; text-transform: uppercase;
    font-family: var(--display); font-weight: 700; font-size: .6rem; line-height: 1.15;
    color: #fff; text-shadow: 0 1px 3px rgba(0,0,0,.45);
}
.wheel-label--jackpot span { color: #1a1a1a; text-shadow: 0 1px 2px rgba(255,255,255,.45); }
.wheel-cap { position: absolute; top: 50%; left: 50%; width: 92px; height: 92px; transform: translate(-50%,-50%); border-radius: 999px; background: #fff; box-shadow: 0 6px 16px rgba(0,0,0,.35); }
.wheel-pointer {
    position: absolute; top: -6px; left: 50%; transform: translateX(-50%); z-index: 3;
    width: 0; height: 0; border-left: 15px solid transparent; border-right: 15px solid transparent;
    border-top: 26px solid var(--orange); filter: drop-shadow(0 4px 6px rgba(0,0,0,.4));
}
.wheel-spin-btn {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%,-50%); z-index: 4;
    width: 74px; height: 74px; border-radius: 999px; border: none; cursor: pointer;
    background: radial-gradient(circle at 32% 28%, #fff, #eef2fb);
    color: var(--blue); font-family: var(--display); font-weight: 800; font-size: .92rem; text-transform: uppercase;
    box-shadow: 0 8px 20px rgba(0,0,0,.4), inset 0 0 0 3px var(--blue);
    transition: transform .16s ease;
}
.wheel-spin-btn:hover:not(:disabled) { transform: translate(-50%,-50%) scale(1.06); }
.wheel-spin-btn:active:not(:disabled) { transform: translate(-50%,-50%) scale(.95); }
.wheel-spin-btn:disabled { cursor: default; opacity: .82; }
.spin-panel.is-spinning .wheel-spin-btn-text::after { content: "…"; }

.spin-result-kicker { margin: 0; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase; color: var(--orange); font-weight: 700; }
.spin-result-prize { margin: 6px 0 0; font-family: var(--display); font-size: clamp(1.5rem, 1rem + 2.4vw, 2.2rem); font-weight: 800; color: #fff; }
.spin-result-note { margin: 10px auto 0; max-width: 42ch; color: rgba(255,255,255,.7); font-size: .92rem; }

@media (max-width: 880px) {
    .nav-toggle { display: inline-flex; }
    .header-cta { display: none; }
    .site-nav {
        position: absolute;
        top: calc(100% + 1px);
        left: 0;
        right: 0;
        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        margin: 0;
        padding: 12px;
        background: rgba(255,255,255,.98);
        backdrop-filter: blur(18px);
        border-bottom: 1px solid var(--line);
        box-shadow: 0 18px 32px rgba(20, 34, 92, .12);
    }
    .site-nav.is-open { display: flex; }
    .site-nav a { padding: 13px 14px; border-radius: 12px; }
    .site-nav a.site-nav-cta { display: block; margin-top: 4px; text-align: center; color: #fff; background: var(--blue); }
    .site-nav a.site-nav-cta:hover { background: var(--blue-700); color: #fff; transform: none; }
    .site-nav a.site-nav-cta--accent { background: var(--orange); }
    .site-nav a.site-nav-cta--accent:hover { background: var(--orange-600); }
    .hero { min-height: auto; }
    .hero-grid, .result-grid { grid-template-columns: 1fr; }
    .hero h1 { max-width: 12ch; }
    .process-grid, .faq-section { grid-template-columns: 1fr 1fr; }
    .chart-grid { grid-template-columns: 1fr; }
    .footer-inner, .admin-hero { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 640px) {
    .wrap { width: min(100% - 28px, 1120px); }
    .section-pad { padding: 48px 0; }
    .header-inner { gap: 10px; }
    .brand-logo { height: 34px; }
    .brand-text strong { font-size: .88rem; }
    .brand-tag { max-width: 138px; }
    .header-badge { padding: 8px 10px; font-size: .72rem; }
    .hero h1 { font-size: clamp(2.65rem, 14vw, 4.2rem); }
    .hero-actions, .panel-actions { align-items: stretch; flex-direction: column; }
    .hero-actions .btn, .panel-actions .btn { width: 100%; }
    .process-grid, .grid-2, .detail-grid, .faq-section { grid-template-columns: 1fr; }
    .faq-copy { position: static; }
    .test-topbar { top: 63px; align-items: stretch; flex-direction: column; }
    .break-row { grid-template-columns: 1fr; gap: 7px; }
    .break-val { text-align: left; }
    .toolbar form, .toolbar form > * { width: 100%; }
    /* Admin top bar: wrap to two rows, brand on top, nav icon-only below */
    .admin-topbar-inner { flex-wrap: wrap; gap: 10px 12px; }
    .admin-brand-text span { display: none; }
    .admin-nav { margin-left: auto; gap: 3px; }
    .admin-topbar .admin-nav-link { padding: 8px 10px; }
    .admin-topbar .admin-nav-link span { display: none; }
    .admin-user { padding-left: 8px; }
    .admin-user-badge { max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
    .bar-row { grid-template-columns: 66px 1fr 42px; gap: 9px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
    .reveal { opacity: 1; transform: none; filter: none; }
}
