:root {
    --navy: #0d1730;
    --navy-2: #17233f;
    --ink: #172033;
    --muted: #5c6b80;
    --line: #e2e8f4;
    --paper: #f4f6fb;
    --white: #ffffff;
    --saffron: #7c3aed;
    --saffron-soft: #f3e8ff;
    --blue: #4f46e5;
    --green: #157a45;
    --green-soft: #e7f6ee;
    --red: #b42318;
    --red-soft: #fdecea;
    --purple: #7c3aed;
    --purple-soft: #f3e8ff;
    --grad: linear-gradient(135deg, #a78bfa 0%, #7c3aed 46%, #3b82f6 100%);
    --shadow: 0 10px 30px rgba(13, 23, 48, 0.08);
    --shadow-lg: 0 18px 40px rgba(13, 23, 48, 0.16);
    --radius: 16px;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
main { animation: page-in 0.4s var(--ease); }
@keyframes page-in {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: none; }
}
body {
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(1100px 420px at 8% -10%, rgba(124, 58, 237, 0.14), transparent 55%),
        radial-gradient(900px 380px at 96% 0%, rgba(59, 130, 246, 0.14), transparent 52%),
        var(--paper);
    font-family: "Nirmala UI", "Noto Sans Devanagari", "Kohinoor Devanagari", "Mangal", "Segoe UI", sans-serif;
    line-height: 1.55;
}
img { max-width: 100%; }
a { color: var(--blue); }
.container { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.narrow { width: min(760px, calc(100% - 32px)); }
.skip-link {
    position: absolute; left: 12px; top: -40px; background: var(--navy); color: white; padding: 8px 12px; z-index: 20;
}
.skip-link:focus { top: 12px; }

/* Content stays visible if JS is off. Motion only when html.has-motion is set. */
.reveal {
    opacity: 1;
    transform: none;
}
html.has-motion .reveal {
    opacity: 0;
    transform: translateY(18px);
    transition: opacity 0.55s var(--ease), transform 0.55s var(--ease);
    transition-delay: var(--reveal-delay, 0ms);
}
html.has-motion .reveal.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.site-header {
    background: linear-gradient(180deg, #10182e 0%, #0d1730 100%);
    color: white;
    position: sticky;
    top: 0;
    z-index: 30;
    box-shadow: 0 10px 28px rgba(13, 23, 48, 0.28);
}
.header-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 76px; }
.brand { display: flex; align-items: center; gap: 12px; color: white; text-decoration: none; transition: transform 0.25s var(--ease); }
.brand:hover { transform: translateY(-1px); }
.brand-mark {
    width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center;
    background: var(--grad); color: white; font-weight: 800;
    box-shadow: 0 8px 16px rgba(91, 63, 214, 0.4);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text small { color: #c9d6e6; font-size: 12px; }
.site-nav { display: flex; gap: 8px; flex-wrap: wrap; }
.site-nav a {
    color: #e7eef6; text-decoration: none; padding: 8px 10px; border-radius: 999px; font-size: 15px;
    transition: background 0.2s var(--ease), color 0.2s var(--ease), transform 0.2s var(--ease);
}
.site-nav a:hover { background: rgba(255,255,255,0.1); color: white; transform: translateY(-1px); }
.site-nav a.is-active {
    background: var(--grad);
    color: white;
    box-shadow: 0 8px 16px rgba(91, 63, 214, 0.35);
}
.nav-toggle { display: none; background: transparent; color: white; border: 1px solid rgba(255,255,255,0.35); border-radius: 8px; padding: 8px 12px; }

.hero {
    background:
        linear-gradient(135deg, rgba(234, 241, 248, 0.95) 0%, rgba(244, 247, 251, 0.7) 55%, transparent 100%);
    padding: 56px 0 24px;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: "";
    position: absolute;
    width: 280px; height: 280px; border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.22), transparent 70%);
    right: -40px; top: -60px;
    animation: float-soft 8s ease-in-out infinite;
    pointer-events: none;
}
.hero-grid { display: grid; grid-template-columns: 1.4fr 0.8fr; gap: 28px; align-items: center; position: relative; }
.eyebrow { color: var(--saffron); font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; font-size: 13px; margin-bottom: 8px; }
h1 { font-size: clamp(32px, 5vw, 52px); line-height: 1.12; margin: 0 0 12px; color: var(--navy); }
h2 { color: var(--navy); margin-top: 0; }
.lead { font-size: 18px; color: var(--muted); }
.hero-actions, .modal-actions, .exam-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero-panel, .test-card, .instruction-box, .stack-form, .score-hero, .modal-card, .contact-form, .contact-aside-card {
    background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
}
.hero-panel { padding: 22px; transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease); }
.hero-panel:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.hero-panel ul { margin: 0; padding-left: 18px; }
.panel-kicker { margin: 0 0 8px; color: var(--navy); font-weight: 700; }

.button, button.button {
    display: inline-flex; align-items: center; justify-content: center; border: 0; cursor: pointer;
    background: var(--grad); color: white; text-decoration: none;
    border-radius: 999px; padding: 12px 18px; font-weight: 700;
    transition: transform 0.22s var(--ease), box-shadow 0.22s var(--ease), filter 0.22s var(--ease);
    box-shadow: 0 10px 20px rgba(91, 63, 214, 0.32);
}
.button-secondary { background: white; color: var(--navy); border: 1px solid var(--line); box-shadow: none; }
.exam-actions .button,
.modal-actions .button,
.exam-top .button { color: #fff; }
.button-danger { background: var(--red); box-shadow: none; }
.button-wide { width: 100%; }
.button-footer {
    background: var(--grad);
    color: white;
    box-shadow: 0 10px 20px rgba(91, 63, 214, 0.32);
}
.button:hover { filter: brightness(1.06); transform: translateY(-2px); }
.button:active { transform: translateY(0); }

.section { padding: 42px 0; }
.section-alt { background: rgba(255, 255, 255, 0.72); }
.section-head { margin-bottom: 20px; max-width: 680px; }
.card-grid, .steps { display: grid; gap: 16px; }
.card-grid { grid-template-columns: repeat(2, 1fr); }
.test-card-soon {
    border-style: dashed;
    background:
        linear-gradient(160deg, rgba(124, 58, 237, 0.08), transparent 55%),
        white;
}
.soon-badge {
    display: inline-flex;
    align-items: center;
    margin: 0;
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--saffron-soft);
    color: var(--saffron);
    font-weight: 800;
    font-size: 12px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    width: fit-content;
}
.button-soon {
    background: #9aa8b8;
    box-shadow: none;
    cursor: not-allowed;
    filter: none !important;
    transform: none !important;
}
.home-popup {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 16px;
    background: rgba(11, 31, 58, 0.55);
    animation: notice-in 0.3s var(--ease);
}
.home-popup[hidden] { display: none; }
.home-popup-card {
    width: min(440px, 100%);
    background: white;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    padding: 24px;
    position: relative;
    overflow: hidden;
}
.home-popup-card::before {
    content: "";
    position: absolute;
    inset: 0 auto auto 0;
    width: 100%;
    height: 4px;
    background: var(--grad);
}
.home-popup-card h2 { margin: 0 0 10px; font-size: 26px; }
.home-popup-card p { color: var(--muted); }
.home-popup-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 18px; }
.test-card {
    padding: 22px; display: flex; flex-direction: column; gap: 8px;
    transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease), border-color 0.35s var(--ease);
}
.test-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: rgba(124, 58, 237, 0.4);
}
.card-label { margin: 0; color: var(--blue); font-weight: 700; font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; }
.test-card h3 { margin: 0; font-size: 24px; }
.meta-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 8px 0; }
.meta-list div { background: var(--paper); border-radius: 12px; padding: 10px; }
.meta-list dt { color: var(--muted); font-size: 12px; }
.meta-list dd { margin: 2px 0 0; font-weight: 700; }
.card-note { color: var(--muted); font-size: 14px; }
.steps { grid-template-columns: repeat(4, 1fr); list-style: none; padding: 0; margin: 0; }
.steps li {
    background: var(--paper); border-radius: var(--radius); padding: 16px; border: 1px solid transparent;
    transition: transform 0.3s var(--ease), border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.steps li:hover { transform: translateY(-4px); border-color: rgba(124, 58, 237, 0.35); background: white; }
.steps span {
    display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%;
    background: var(--saffron-soft); color: var(--saffron); font-weight: 800;
}

.info-grid, .result-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 16px 0; }
.info-grid div, .result-grid div { background: white; border: 1px solid var(--line); border-radius: 12px; padding: 12px; }
.info-grid span, .result-grid dt { display: block; color: var(--muted); font-size: 13px; }
.instruction-box, .stack-form { padding: 18px; }
.stack-form { display: grid; gap: 14px; margin-top: 16px; }
.field { display: grid; gap: 6px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.field-consent { margin-top: 4px; }
.consent-label {
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: 10px;
    align-items: start;
    font-size: 14px;
    line-height: 1.45;
    color: var(--ink);
    cursor: pointer;
}
.consent-label input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: var(--navy);
}
.consent-label a { color: var(--navy); font-weight: 600; }
label { font-weight: 700; }
input, textarea {
    width: 100%; border: 1px solid var(--line); border-radius: 10px; padding: 12px; font: inherit; background: white;
    transition: border-color 0.2s var(--ease), box-shadow 0.2s var(--ease), transform 0.2s var(--ease);
}
input:focus, textarea:focus {
    outline: none; border-color: var(--blue);
    box-shadow: 0 0 0 4px rgba(29, 111, 191, 0.18);
    transform: translateY(-1px);
}
.field-error, .form-error { color: var(--red); margin: 0; }
.field-hint { margin: 0; color: var(--muted); font-size: 13px; }
.ca-grid { grid-template-columns: repeat(3, 1fr); }
.ca-promo-card {
    background:
        linear-gradient(160deg, rgba(29, 111, 191, 0.08), transparent 55%),
        white;
}
.notice { background: var(--green-soft); color: #0f5132; padding: 12px 14px; border-radius: 12px; }
.notice-pop { animation: notice-in 0.45s var(--ease); }
.hp-field { position: absolute; left: -9999px; }

/* Contact */
.contact-hero {
    padding: 48px 0 18px;
    background:
        linear-gradient(120deg, rgba(11, 31, 58, 0.04), transparent 45%),
        linear-gradient(180deg, #eaf1f8 0%, transparent 100%);
}
.contact-hero-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 24px;
    align-items: start;
}
.contact-highlights {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}
.contact-highlights li {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    background: white;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px;
    box-shadow: var(--shadow);
    transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.contact-highlights li:hover {
    transform: translateX(4px);
    box-shadow: var(--shadow-lg);
}
.contact-highlights p { margin: 4px 0 0; color: var(--muted); font-size: 14px; }
.contact-icon {
    width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center;
    background: linear-gradient(160deg, var(--navy-2), var(--navy)); color: white; font-weight: 800; flex-shrink: 0;
}
.contact-section { padding-top: 12px; }
.contact-layout {
    display: grid;
    grid-template-columns: 0.85fr 1.15fr;
    gap: 20px;
    align-items: start;
}
.contact-aside-card { padding: 22px; position: sticky; top: 96px; }
.contact-aside-card h2 { font-size: 22px; margin-bottom: 8px; }
.contact-meta { margin: 18px 0 0; display: grid; gap: 12px; }
.contact-meta div {
    background: var(--paper);
    border-radius: 12px;
    padding: 12px;
}
.contact-meta dt { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; }
.contact-meta dd { margin: 4px 0 0; font-weight: 700; color: var(--navy); }
.contact-form { margin-top: 0; padding: 26px; }
.contact-form-wrap { min-width: 0; }
.contact-email-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 10px 16px;
    border-radius: 999px;
    background: #fff;
    color: var(--navy);
    font-weight: 800;
    text-decoration: none;
    border: 1px solid var(--line);
    box-shadow: var(--shadow);
}
.contact-email-chip:hover { color: var(--saffron); }
.contact-mail-card {
    background:
        linear-gradient(165deg, rgba(124, 58, 237, 0.14), transparent 42%),
        #fff;
}
.contact-mail-card h2 { word-break: break-word; font-size: 22px; }
.contact-form-head { margin-bottom: 4px; }
.contact-form-head h2 { margin: 0 0 4px; font-size: 26px; }
.contact-form-head p { margin: 0; color: var(--muted); }
.footer-mail {
    display: inline-block;
    margin-top: 10px;
    color: #c4b5fd;
    font-weight: 700;
    text-decoration: none;
}
.footer-mail:hover { color: #fff; }
.footer-copy a { color: #c4b5fd; text-decoration: none; }
.footer-copy a:hover { color: #fff; }

/* Footer */
.site-footer {
    background: linear-gradient(180deg, #0e2748 0%, var(--navy) 55%, #071526 100%);
    color: #d5e0ec;
    padding: 48px 0 18px;
    margin-top: 36px;
    position: relative;
    overflow: hidden;
}
.footer-glow {
    position: absolute;
    inset: auto auto -80px 10%;
    width: 320px; height: 320px; border-radius: 50%;
    background: radial-gradient(circle, rgba(124, 58, 237, 0.32), transparent 70%);
    pointer-events: none;
    animation: float-soft 10s ease-in-out infinite;
}
.footer-top {
    display: grid;
    grid-template-columns: 1.4fr 0.8fr 0.8fr 1fr;
    gap: 28px;
    position: relative;
    padding-bottom: 8px;
}
.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: white;
    text-decoration: none;
    margin-bottom: 12px;
}
.footer-logo span { display: flex; flex-direction: column; line-height: 1.2; }
.footer-logo small { color: #9fb2c7; font-size: 13px; }
.footer-brand p, .footer-cta p { margin: 0; color: #b7c6d6; }
.footer-col h2 {
    color: white;
    font-size: 15px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin: 0 0 12px;
}
.footer-col nav { display: grid; gap: 8px; }
.site-footer a {
    color: #e7eef6;
    text-decoration: none;
    transition: color 0.2s var(--ease), transform 0.2s var(--ease);
}
.footer-col a:hover { color: #c4b5fd; transform: translateX(3px); }
.footer-cta .button-footer { margin-top: 14px; }
.footer-copy {
    border-top: 1px solid rgba(255,255,255,0.12);
    margin-top: 28px;
    padding-top: 14px;
    font-size: 14px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    position: relative;
}
.footer-copy p { margin: 0; }
.footer-domain { color: #9fb2c7; }

.prose h2 { margin-top: 28px; }

/* The running test keeps the original screen. Theme changes stop at the exam page. */
body.exam-lock {
    --navy: #0b1f3a;
    --navy-2: #14325c;
    --saffron: #d97706;
    --saffron-soft: #fff4e5;
    --blue: #1d6fbf;
    --purple: #6d28d9;
    --purple-soft: #f3e8ff;
    --paper: #f4f7fb;
    background:
        radial-gradient(1200px 420px at 10% -10%, rgba(29, 111, 191, 0.08), transparent 55%),
        var(--paper);
}
body.exam-lock .site-header { background: linear-gradient(180deg, #0b1f3a 0%, #0e2748 100%); box-shadow: 0 8px 24px rgba(11, 31, 58, 0.18); }
body.exam-lock .brand-mark { background: linear-gradient(160deg, #d97706, #f2c14e); color: #0b1f3a; box-shadow: 0 6px 14px rgba(217, 119, 6, 0.35); }
body.exam-lock .site-nav a.is-active { background: rgba(255,255,255,0.12); box-shadow: none; }
body.exam-lock .button,
body.exam-lock button.button,
body.exam-lock button.button-secondary,
body.exam-lock button.button-danger {
    background: linear-gradient(180deg, #14325c, #0b1f3a);
    border-radius: 12px;
    box-shadow: 0 8px 18px rgba(11, 31, 58, 0.18);
    color: #fff;
}
body.exam-lock button.button-danger { background: #b42318; box-shadow: none; color: #fff; }
body.exam-lock main { animation: none; }

.exam-top { background: white; border-bottom: 1px solid var(--line); }
.exam-top-bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 14px 0; }
.exam-top h1 { font-size: 22px; margin: 0; }
.candidate-line { margin: 4px 0 0; color: var(--muted); }
.timer-box { background: var(--navy); color: white; border-radius: 14px; padding: 8px 14px; min-width: 140px; text-align: center; }
.timer-box span { display: block; font-size: 12px; color: #c9d6e6; }
.timer-box strong { font-variant-numeric: tabular-nums; font-size: 28px; }
.timer-box.is-warning { background: var(--red); }
.palette-toggle { display: none; }
.exam-layout { display: grid; grid-template-columns: 1fr 300px; gap: 16px; padding: 16px 0 32px; align-items: start; }
.question-panel, .palette { background: white; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.question-text { font-size: 20px; white-space: pre-wrap; margin: 8px 0 16px; }
.options { display: grid; gap: 8px; }
.option {
    display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: 12px; padding: 12px; cursor: pointer; background: white;
    transition: border-color 0.2s var(--ease), background 0.2s var(--ease), transform 0.2s var(--ease);
}
.option:hover { transform: translateX(2px); border-color: rgba(29, 111, 191, 0.4); }
.option.is-selected { border-color: var(--blue); background: #eef6ff; }
.option input { width: auto; margin-top: 4px; }
.save-status { min-height: 1.2em; color: var(--muted); font-size: 14px; }
.palette-head { display: flex; justify-content: space-between; align-items: center; }
.palette-head h2 { font-size: 18px; margin: 0; }
.text-button { background: none; border: 0; color: var(--blue); cursor: pointer; display: none; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 12px; padding: 0; list-style: none; color: var(--muted); font-size: 13px; }
.swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; margin-right: 4px; border: 1px solid var(--line); }
.swatch.answered { background: var(--green); }
.swatch.review { background: var(--purple); }
.swatch.pending { background: white; }
.palette-grid { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.palette-grid button {
    height: 38px; border-radius: 8px; border: 1px solid var(--line); background: white; cursor: pointer; font-weight: 700;
    transition: transform 0.15s var(--ease), background 0.15s var(--ease);
}
.palette-grid button:hover { transform: scale(1.05); }
.palette-grid button.is-current { outline: 2px solid var(--navy); }
.palette-grid button.is-answered { background: var(--green-soft); color: var(--green); border-color: #b7e4c7; }
.palette-grid button.is-review { background: var(--purple-soft); color: var(--purple); border-color: #ddd6fe; }
.palette-grid button.is-answered.is-review { box-shadow: inset 0 -3px 0 var(--green); }

.modal { position: fixed; inset: 0; background: rgba(11, 31, 58, 0.55); display: grid; place-items: center; padding: 16px; z-index: 40; }
.modal[hidden] { display: none; }
.modal-card { padding: 20px; width: min(460px, 100%); animation: notice-in 0.3s var(--ease); }
.feedback-modal { z-index: 50; }
.feedback-card { width: min(480px, 100%); background: #fff; border-radius: 16px; border: 1px solid var(--line); box-shadow: 0 18px 48px rgba(11, 31, 58, 0.22); }
.feedback-lead { color: var(--muted); margin: 0 0 16px; }
.feedback-actions { margin-top: 4px; }
.feedback-skip {
    display: inline-block;
    margin-top: 14px;
    border: 0;
    background: transparent;
    color: var(--muted);
    text-decoration: underline;
    cursor: pointer;
    font: inherit;
}
.feedback-thanks { font-size: 17px; color: var(--navy); margin: 8px 0 18px; line-height: 1.45; }
.feedback-card .stack-form { margin-top: 8px; }
.feedback-card .hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.feedback-card .form-error { color: #b42318; margin: 0 0 8px; }
.faq-list { display: grid; gap: 10px; }
.faq-list details {
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 14px;
    padding: 14px 16px;
}
.faq-list summary {
    cursor: pointer;
    font-weight: 700;
    color: var(--navy);
}
.faq-list details p { margin: 10px 0 0; color: var(--muted); }
.party-pop { position: fixed; inset: 0; width: 100%; height: 100%; max-width: 100%; pointer-events: none; z-index: 25; display: block; }
#railway-tests .lang-intro { text-align: center; max-width: 720px; margin: 0 auto; }
#railway-tests .lang-intro h2 { font-size: clamp(32px, 4vw, 44px); letter-spacing: -0.03em; }
#railway-tests .lang-intro p { margin: 0 auto; max-width: 560px; font-size: 18px; }
#railway-tests .lang-switch-wrap { display: flex; justify-content: center; margin: 22px 0 32px; }
#railway-tests .lang-switch {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: min(360px, 100%);
    padding: 6px;
    border-radius: 999px;
    background: #0d1730;
    box-shadow: 0 16px 36px rgba(13, 23, 48, 0.22);
}
#railway-tests .lang-switch-thumb {
    position: absolute;
    z-index: 0;
    top: 6px;
    left: 6px;
    width: calc(50% - 6px);
    height: calc(100% - 12px);
    border-radius: 999px;
    background: linear-gradient(135deg, #a78bfa 0%, #7c3aed 42%, #3b82f6 100%);
    box-shadow: 0 8px 18px rgba(91, 63, 214, 0.45);
    transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1);
}
#railway-tests .lang-switch.is-en .lang-switch-thumb { transform: translateX(100%); }
#railway-tests .lang-switch-btn {
    position: relative;
    z-index: 1;
    appearance: none;
    -webkit-appearance: none;
    border: 0;
    background: transparent;
    color: #c5d0de;
    margin: 0;
    padding: 14px 12px;
    border-radius: 999px;
    font-family: "Kohinoor Devanagari", "Nirmala UI", "Noto Sans Devanagari", "Devanagari Sangam MN", "Segoe UI", sans-serif;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 0.01em;
    line-height: 1.2;
    cursor: pointer;
    transition: color 0.3s ease, transform 0.3s ease;
}
#railway-tests .lang-switch-btn.is-active { color: #fff; }
#railway-tests .lang-switch-btn:hover { color: #fff; }
#railway-tests .lang-switch-btn:active { transform: scale(0.98); }
#railway-tests .lang-panel[hidden] { display: none; }
#railway-tests .lang-panel.is-in { animation: lang-rise 0.45s cubic-bezier(0.22, 1, 0.36, 1); }
@keyframes lang-rise {
    from { opacity: 0; transform: translateY(16px); }
    to { opacity: 1; transform: none; }
}
@media (max-width: 720px) {
    #railway-tests .lang-switch { width: min(360px, 100%); }
    #railway-tests .lang-switch-btn { font-size: 18px; }
}
@media (prefers-reduced-motion: reduce) {
    #railway-tests .lang-switch-thumb,
    #railway-tests .lang-switch-btn,
    #railway-tests .lang-panel.is-in { transition: none; animation: none; }
}
.score-hero { text-align: center; padding: 20px; margin: 12px 0; }
.score-hero p { margin: 0; color: var(--muted); }
.score-hero strong { display: block; font-size: 42px; color: var(--navy); }
.score-rule { color: var(--muted); }
.review-list { padding: 0; list-style: none; display: grid; gap: 12px; }
.review-item { background: white; border: 1px solid var(--line); border-radius: 14px; padding: 14px; }
.review-item.is-correct { border-color: #b7e4c7; }
.review-item.is-incorrect { border-color: #f5c2c0; }
.review-kicker { margin: 0; color: var(--muted); font-size: 13px; }
.review-options { margin: 8px 0; }
.review-options .is-key { background: var(--green-soft); }
.review-options .is-picked { font-weight: 700; }
.review-options em { margin-left: 8px; font-style: normal; color: var(--navy); font-size: 13px; }

@keyframes float-soft {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(14px); }
}
@keyframes notice-in {
    from { opacity: 0; transform: translateY(8px) scale(0.98); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

@media (max-width: 1100px) {
    .ca-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 900px) {
    .hero-grid, .card-grid, .steps, .info-grid, .contact-hero-grid, .contact-layout, .footer-top, .ca-grid { grid-template-columns: 1fr; }
    .result-grid { grid-template-columns: 1fr 1fr; }
    .nav-toggle { display: inline-flex; }
    .site-nav { display: none; position: absolute; top: 76px; left: 0; right: 0; background: var(--navy-2); padding: 12px 16px 16px; flex-direction: column; }
    .site-nav.is-open { display: flex; }
    .exam-layout { grid-template-columns: 1fr; }
    .palette-toggle { display: inline-flex; }
    .palette { display: none; }
    .palette.is-open { display: block; position: fixed; inset: auto 12px 12px 12px; z-index: 25; max-height: 70vh; overflow: auto; }
    .text-button { display: inline; }
    .exam-top-bar { flex-wrap: wrap; }
    .contact-aside-card { position: static; }
    .field-row { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
    .meta-list, .result-grid { grid-template-columns: 1fr; }
    .question-text { font-size: 18px; }
    .timer-box strong { font-size: 22px; }
    .footer-copy { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    main, .reveal, .hero::before, .footer-glow, .notice-pop, .modal-card,
    .button, .test-card, .steps li, .option, .hero-panel, .contact-highlights li {
        animation: none !important;
        transition: none !important;
    }
    .reveal { opacity: 1; transform: none; }
}
