:root {
    --ink: #0f1b2d;
    --ink-2: #33405a;
    --muted: #64708a;
    --line: #e2e7f0;
    --bg: #f3f5f9;
    --surface: #ffffff;

    --primary: #0b3d91;
    --primary-600: #0a347c;
    --primary-50: #eef3fc;
    --primary-100: #dce6f8;


    --success: #138a4a;
    --success-50: #e8f6ee;
    --warning: #9a6200;
    --warning-50: #fff6e3;
    --danger: #c0262d;
    --danger-50: #fdecec;

    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 22px;
    --shadow-sm: 0 1px 2px rgba(15, 27, 45, .06);
    --shadow: 0 1px 2px rgba(15, 27, 45, .05), 0 8px 24px rgba(15, 27, 45, .06);
    --shadow-lg: 0 2px 4px rgba(15, 27, 45, .04), 0 18px 48px rgba(11, 61, 145, .12);

    --font: "Montserrat", "Segoe UI", Roboto, Arial, sans-serif;
    --font-display: "Montserrat", "Segoe UI", Roboto, Arial, sans-serif;
}

html { -webkit-text-size-adjust: 100%; overflow-x: hidden; }
[hidden] { display: none !important; }

body {
    font-family: var(--font);
    font-size: 16px;
    line-height: 1.6;
    color: var(--ink);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

.main-content { flex: 1 0 auto; }

h1, h2, h3, h4, h5 { color: var(--ink); font-family: var(--font); font-weight: 800; letter-spacing: -.01em; }

a { color: var(--primary); }
a:hover, a:focus { color: var(--primary-600); }

:focus-visible { outline: 3px solid rgba(11, 61, 145, .35); outline-offset: 2px; }
:focus:not(:focus-visible) { outline: none !important; }
.btn:focus, .btn:active:focus, .btn.active:focus { box-shadow: none; }
.nav > li > a:focus, .nav > li > a:hover { background-color: transparent; }

.container { max-width: 1180px; width: 100%; padding-left: 20px; padding-right: 20px; }

.btn {
    font-family: var(--font);
    font-weight: 700;
    font-size: 15px;
    border-radius: 999px;
    padding: 10px 22px;
    border: 1px solid transparent;
    text-transform: none;
    letter-spacing: 0;
    transition: background-color .15s, border-color .15s, color .15s, box-shadow .15s, transform .15s;
    box-shadow: none;
}
.btn:active { transform: translateY(1px); box-shadow: none; }

.btn-primary, .btn-success {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}
.btn-primary:hover, .btn-primary:focus, .btn-success:hover, .btn-success:focus,
.btn-success:active, .btn-success.active, .btn-success:active:focus {
    background: var(--primary-600);
    border-color: var(--primary-600);
    color: #fff;
}

.btn-outline {
    background: transparent;
    border-color: var(--line);
    color: var(--ink);
}
.btn-outline:hover, .btn-outline:focus { border-color: var(--primary); color: var(--primary); background: var(--primary-50); }

.btn-danger {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}
.btn-danger:hover, .btn-danger:focus { background: #a31f25; border-color: #a31f25; color: #fff; }

.btn-light {
    background: #fff;
    color: var(--primary);
    border-color: #fff;
}
.btn-light:hover, .btn-light:focus { background: var(--primary-50); color: var(--primary-600); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; }
.btn-lg { padding: 14px 28px; font-size: 16px; }
.btn-block { display: flex; width: 100%; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, .96);
    border-bottom: 1px solid var(--line);
    backdrop-filter: saturate(160%) blur(8px);
}

.site-header__bar {
    display: flex;
    align-items: center;
    gap: 24px;
    min-height: 76px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none !important;
    color: var(--ink);
    flex-shrink: 0;
}
.brand img { width: 48px; height: 48px; object-fit: contain; }
.brand__text { display: flex; flex-direction: column; line-height: 1.2; }
.brand__org { font-size: 11px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.brand__name { font-size: 14px; font-weight: 800; color: var(--ink); }

.site-nav {
    display: flex;
    align-items: center;
    gap: 4px;
    margin: 0 0 0 auto;
    padding: 0;
    list-style: none;
}
.site-nav a {
    display: block;
    padding: 8px 10px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    color: var(--ink-2);
    text-decoration: none;
    white-space: nowrap;
}
.site-nav a:hover, .site-nav a:focus { background: var(--primary-50); color: var(--primary); }
.site-nav a.is-active { background: var(--primary-50); color: var(--primary); }

.site-header__actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.site-header__actions .btn { padding: 9px 20px; font-size: 14px; }

.user-menu { position: relative; }
.user-menu__toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    max-width: 300px;
    padding: 4px 12px 4px 4px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: #fff;
    font-family: var(--font);
    font-size: 14px;
    font-weight: 700;
    color: var(--ink-2);
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s;
}
.user-menu__toggle:hover, .user-menu__toggle:focus-visible, .user-menu__toggle[aria-expanded="true"] { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-50); outline: none; }
.user-menu__avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: var(--primary);
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .02em;
}
.user-menu__avatar--lg { width: 48px; height: 48px; font-size: 17px; }
.user-menu__name { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.user-menu__caret { color: var(--muted); font-size: 16px; transition: transform .2s; }
.user-menu__toggle[aria-expanded="true"] .user-menu__caret { transform: rotate(180deg); }
.user-menu__panel {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    z-index: 60;
    width: 310px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 20px 48px rgba(15, 23, 42, .16);
}
.user-menu__head { display: flex; align-items: center; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line); }
.user-menu__head > div { min-width: 0; }
.user-menu__head b { display: block; font-size: 15px; line-height: 1.35; color: var(--ink); overflow-wrap: anywhere; }
.user-menu__head small { display: block; margin-top: 3px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.user-menu__row { display: flex; align-items: center; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.user-menu__row .fa { width: 18px; text-align: center; color: var(--primary); }
.user-menu__row span { color: var(--muted); }
.user-menu__row b { margin-left: auto; color: var(--ink); }
.site-header__actions .user-menu__logout { width: 100%; margin-top: 14px; padding: 11px 20px; }

.nav-toggle {
    display: none;
    margin-left: auto;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink);
    font-size: 20px;
    line-height: 1;
}

.nav-close { display: none; }

.page-hero {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    padding: 36px 0 30px;
}
.page-hero h1 {
    margin: 0;
    font-size: 30px;
    line-height: 1.2;
}
.page-hero p { margin: 8px 0 0; color: var(--muted); }

.page-section { padding: 40px 0 64px; }

.card {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
.card__body { padding: 32px; }
.card__title { margin: 0 0 6px; font-size: 22px; }
.card__lead { margin: 0; color: var(--muted); }

.hero {
    position: relative;
    overflow: hidden;
    color: #fff;
    background:
        radial-gradient(900px 420px at 85% 10%, rgba(255, 255, 255, .10), transparent 60%),
        linear-gradient(135deg, #0a2f6f 0%, #0b3d91 55%, #0d4aa8 100%);
}
.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image: radial-gradient(rgba(255, 255, 255, .08) 1px, transparent 1px);
    background-size: 22px 22px;
    pointer-events: none;
}
.hero__inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.1fr .9fr;
    align-items: center;
    gap: 40px;
    padding: 64px 0 72px;
}
.hero__inner > *, .exam > *, .result-card__top > * { min-width: 0; }
.hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px 6px 6px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .12);
    border: 1px solid rgba(255, 255, 255, .2);
    font-size: 13px;
    font-weight: 700;
    letter-spacing: .02em;
}
.hero__eyebrow img { width: 28px; height: 28px; border-radius: 50%; background: #fff; padding: 2px; }
.hero h1 {
    margin: 20px 0 16px;
    color: #fff;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 48px;
    line-height: 1.12;
    letter-spacing: -.015em;
}
.hero__lead { margin: 0 0 28px; font-size: 18px; color: rgba(255, 255, 255, .82); max-width: 560px; }

.hero__facts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-bottom: 28px;
}
.fact {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    padding: 16px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .18);
}
.fact .fa {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: #fff;
    color: var(--primary);
    font-size: 17px;
    line-height: 36px;
    text-align: center;
}
.fact__label { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: rgba(255, 255, 255, .7); }
.fact__value { display: block; font-size: 15px; font-weight: 700; line-height: 1.4; color: #fff; }

.hero__cta { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }
.hero__cta--center { justify-content: center; }
.hero__cta--stack { flex-direction: column; align-items: stretch; gap: 16px; }
.hero__cta--stack .btn { align-self: flex-start; }
.hero__cta--stack .countdown { flex-direction: row; align-items: center; justify-content: space-between; gap: 16px; padding: 12px 12px 12px 18px; }
.btn-start { position: relative; padding-left: 34px; padding-right: 30px; box-shadow: 0 10px 24px rgba(0, 0, 0, .18); transition: transform .2s ease, box-shadow .2s ease, background-color .2s, color .2s; }
.btn-start .fa { transition: transform .2s ease; }
.btn-start::after { content: ""; position: absolute; inset: -6px; border-radius: inherit; border: 2px solid rgba(255, 255, 255, .55); opacity: 0; transform: scale(.94); pointer-events: none; }
.btn-start:hover, .btn-start:focus-visible { transform: translateY(-3px); box-shadow: 0 16px 32px rgba(0, 0, 0, .26); }
.btn-start:hover .fa, .btn-start:focus-visible .fa { transform: translateX(5px); }
.btn-start:hover::after { animation: btn-start-ring 1.2s ease-out infinite; }
@keyframes btn-start-ring { 0% { opacity: .9; transform: scale(.94); } 100% { opacity: 0; transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) { .btn-start, .btn-start .fa { transition: none; } .btn-start:hover { transform: none; } .btn-start:hover::after { animation: none; } }

.countdown {
    display: inline-flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 10px 14px 12px;
    border-radius: 16px;
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .2);
    color: rgba(255, 255, 255, .85);
}
.countdown__label { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: rgba(255, 255, 255, .75); }
.countdown__label .fa { font-size: 14px; color: #fff; }
.countdown__units { display: flex; gap: 6px; min-height: 50px; }
.countdown__unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    padding: 6px 4px 5px;
    border-radius: 10px;
    background: rgba(255, 255, 255, .14);
    border: 1px solid rgba(255, 255, 255, .16);
}
.countdown__unit b { font-size: 22px; line-height: 1.1; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.countdown__unit small { margin-top: 2px; font-size: 10px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: rgba(255, 255, 255, .7); }

.hero__art { position: relative; }
.hero__art::before {
    content: "";
    position: absolute;
    inset: 8% 6%;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .22), transparent 70%);
}
.hero__art img { position: relative; width: 100%; height: auto; filter: drop-shadow(0 24px 40px rgba(0, 0, 0, .25)); }

.notice {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    padding: 20px 24px;
    border-radius: var(--radius);
    border: 1px solid #f1d9a6;
    background: var(--warning-50);
    color: #5c3d00;
}
.notice .fa { font-size: 22px; color: var(--warning); margin-top: 2px; }
.notice__title { display: block; margin-bottom: 2px; font-weight: 800; color: #5c3d00; }
.notice--info { border-color: var(--primary-100); background: var(--primary-50); color: var(--ink-2); }
.notice--info .fa { color: var(--primary); }
.notice--info .notice__title { color: var(--primary); }
.notice--success { border-color: #bfe5cf; background: var(--success-50); color: #0d4f2c; }
.notice--success .fa, .notice--success .notice__title { color: var(--success); }
.notice--danger { border-color: #f3c3c5; background: var(--danger-50); color: #7a1418; }
.notice--danger .fa, .notice--danger .notice__title { color: var(--danger); }

.home-notice { margin-top: -36px; position: relative; z-index: 2; }
.home-notice .notice { box-shadow: var(--shadow); background: #fffaf0; }

.section { padding: 64px 0; }
.section__head { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.section__head h2 { margin: 0 0 8px; font-size: 32px; font-family: var(--font-display); font-weight: 700; }
.section__head p { margin: 0; color: var(--muted); }

.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.feature {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 28px;
    border-radius: var(--radius-lg);
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    color: var(--ink);
    text-decoration: none !important;
    transition: border-color .2s, box-shadow .2s, transform .2s;
}
a.feature:hover, a.feature:focus { border-color: var(--primary-100); box-shadow: var(--shadow-lg); transform: translateY(-2px); color: var(--ink); }
.feature__icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--primary-50);
    color: var(--primary);
    font-size: 22px;
    line-height: 52px;
    text-align: center;
}
.feature h3 { margin: 6px 0 0; font-size: 19px; }
.feature p { margin: 0; color: var(--muted); font-size: 15px; }
.feature__more { margin-top: auto; padding-top: 8px; font-size: 14px; font-weight: 800; color: var(--primary); }

.result-card { overflow: hidden; }
.result-card__top {
    display: grid;
    grid-template-columns: 220px 1fr;
    gap: 36px;
    align-items: center;
    padding: 36px;
    background: linear-gradient(180deg, var(--primary-50), #fff);
    border-bottom: 1px solid var(--line);
}
.score-ring { position: relative; width: 220px; height: 220px; }
.score-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.score-ring__track { stroke: var(--primary-100); }
.score-ring__value { stroke: var(--success); transition: stroke-dasharray 1s ease; }
.score-ring__label {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}
.score-ring__num { font-size: 44px; font-weight: 800; line-height: 1; font-variant-numeric: tabular-nums; }
.score-ring__of { margin-top: 6px; font-size: 14px; font-weight: 700; color: var(--muted); }

.result-card__who { margin: 0 0 4px; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.result-card__name { margin: 0 0 20px; font-size: 26px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.stat {
    padding: 16px 18px;
    border-radius: var(--radius);
    background: #fff;
    border: 1px solid var(--line);
}
.stat__label { display: block; font-size: 13px; font-weight: 700; color: var(--muted); }
.stat__value { display: block; font-size: 24px; font-weight: 800; font-variant-numeric: tabular-nums; }

.result-card__foot { padding: 20px 36px; color: var(--muted); font-size: 14px; }

#intro, .intro {
    background: none !important;
    padding: 56px 0 80px;
}
.intro .row { margin: 0; }
.intro .col-md-6.col-md-offset-3 {
    float: none;
    width: 100%;
    max-width: 460px;
    margin: 0 auto;
    padding: 0;
}
.intro .block {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 36px 32px 28px;
}
.intro .block::before {
    content: "";
    display: block;
    width: 64px;
    height: 64px;
    margin: 0 auto 14px;
    background: url(../img/gerb.png) center / contain no-repeat;
}
.intro .block > h3 {
    margin: 0 0 24px;
    text-align: center;
    font-size: 24px;
}
.intro .block .body { padding: 0; }
.intro .btn-block { margin-top: 8px; padding: 13px 22px; }
.intro .block .body > form > a.btn,
.intro .block .body a.btn:not(.btn-success) {
    display: block;
    margin-top: 10px;
    padding: 8px;
    font-weight: 700;
    color: var(--primary);
    background: none;
}
.intro .help-text, .intro .block p { color: var(--muted); }

.form-group { margin-bottom: 18px; }
.control-label, label { font-size: 14px; font-weight: 700; color: var(--ink-2); margin-bottom: 6px; }
.form-control {
    height: 48px;
    padding: 10px 14px;
    border-radius: 12px;
    border: 1px solid #cfd6e3;
    background: #fff;
    font-size: 16px;
    color: var(--ink);
    box-shadow: none;
    transition: border-color .15s, box-shadow .15s;
}
textarea.form-control { height: auto; min-height: 160px; line-height: 1.6; resize: vertical; }
.form-control:focus { border-color: var(--primary); box-shadow: 0 0 0 4px rgba(11, 61, 145, .12); }
.has-error .form-control { border-color: var(--danger); }
.has-error .form-control:focus { box-shadow: 0 0 0 4px rgba(192, 38, 45, .12); }
.has-error .help-block, .help-block-error { color: var(--danger); font-size: 13px; font-weight: 600; }
.has-success .form-control { border-color: #cfd6e3; }
.has-success .control-label, .has-error .control-label { color: var(--ink-2); }
.required > label::after, .required > .control-label::after { content: " *"; color: var(--danger); }

.exam {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 24px;
    align-items: start;
    padding: 32px 0 64px;
}

.exam__main { min-width: 0; }

.exam__side {
    position: sticky;
    top: 96px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.panel-box {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 20px;
}
.panel-box__title { margin: 0 0 12px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }

.timer-box { display: flex; align-items: center; gap: 12px; }
.timer-box .fa { width: 40px; height: 40px; border-radius: 12px; background: var(--primary-50); color: var(--primary); font-size: 18px; line-height: 40px; text-align: center; }
#clock_count b { display: block; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
#clock_count { font-size: 26px; font-weight: 800; color: var(--ink); line-height: 1.1; font-variant-numeric: tabular-nums; }

.test_questions.nav {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
}
.test_questions.nav::before, .test_questions.nav::after { display: none; }
.test_questions.nav > li { float: none; margin: 0; }
.test_questions.nav > li > a {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 42px;
    padding: 0;
    border-radius: 10px;
    border: 1px solid var(--line);
    background: #fff;
    color: var(--ink-2);
    font-size: 14px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    transition: background-color .15s, border-color .15s, color .15s;
}
.test_questions.nav > li > a:hover, .test_questions.nav > li > a:focus { background: var(--primary-50); border-color: var(--primary-100); color: var(--primary); }
.test_questions.nav > li.selected > a { background: var(--success-50); border-color: #a9dcbf; color: var(--success); }
.test_questions.nav > li.active > a,
.test_questions.nav > li.active > a:hover,
.test_questions.nav > li.active > a:focus { background: var(--primary); border-color: var(--primary); color: #fff; }

.legend { display: flex; flex-wrap: nowrap; justify-content: space-between; gap: 8px; margin-top: 14px; font-size: 12px; color: var(--muted); white-space: nowrap; }
.legend span::before { content: ""; display: inline-block; width: 12px; height: 12px; margin-right: 6px; border-radius: 4px; vertical-align: -1px; border: 1px solid var(--line); background: #fff; }
.legend .is-current::before { background: var(--primary); border-color: var(--primary); }
.legend .is-done::before { background: var(--success-50); border-color: #a9dcbf; }

.test-test {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
    padding: 32px;
}
.test_question { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 24px; }
.test_question > span {
    flex-shrink: 0;
    min-width: 44px;
    height: 44px;
    padding: 0 10px;
    border-radius: 12px;
    background: var(--primary);
    color: #fff;
    font-size: 18px;
    font-weight: 800;
    line-height: 44px;
    text-align: center;
    font-variant-numeric: tabular-nums;
}
.test_question > div { font-size: 19px; font-weight: 700; line-height: 1.5; color: var(--ink); padding-top: 8px; }
.test_question > div p:last-child { margin-bottom: 0; }

.test_answers { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.test_answers li { margin: 0; }
.test_answers li a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: var(--radius);
    border: 1.5px solid var(--line);
    background: #fff;
    color: var(--ink);
    text-decoration: none;
    cursor: pointer;
    transition: border-color .15s, background-color .15s, box-shadow .15s;
}
.test_answers li a:hover { border-color: #b9c8e6; background: #fafcff; }
.test_answers li a > div {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: var(--bg);
    color: var(--ink-2);
    font-weight: 800;
    line-height: 36px;
    text-align: center;
    transition: background-color .15s, color .15s;
}
.test_answers li a > span { font-size: 16px; line-height: 1.5; }
.test_answers li#active a { border-color: var(--primary); background: var(--primary-50); box-shadow: 0 0 0 3px rgba(11, 61, 145, .1); }
.test_answers li#active a > div { background: var(--primary); color: #fff; }

.test-page .tab-content > .tab-pane { animation: fadeUp .2s ease; }
@keyframes fadeUp { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.exam__nav {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
}
.exam__nav .btn { min-width: 140px; }

.exam__finish .btn { width: 100%; padding: 13px 22px; white-space: normal; line-height: 1.35; text-align: center; }
.exam__finish p { margin: 10px 0 0; font-size: 13px; color: var(--muted); text-align: center; }

.essay__prompt {
    margin: 0 0 20px;
    padding: 18px 20px;
    border-radius: var(--radius);
    background: var(--primary-50);
    border-left: 4px solid var(--primary);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.55;
    color: var(--ink);
}
.essay__meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: 13px; color: var(--muted); }
.essay__count { font-weight: 800; font-variant-numeric: tabular-nums; }
.essay__count.is-over { color: var(--danger); }

.prose {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 40px;
    font-size: 17px;
    line-height: 1.75;
    color: var(--ink-2);
    overflow-wrap: anywhere;
}
.prose h1, .prose h2, .prose h3, .prose h4 { color: var(--ink); margin: 1.4em 0 .5em; line-height: 1.3; }
.prose > :first-child { margin-top: 0; }
.prose img { max-width: 100%; height: auto; border-radius: var(--radius); }
.prose table { width: 100%; margin: 1em 0; border-collapse: collapse; font-size: 15px; }
.prose table td, .prose table th { padding: 10px 12px; border: 1px solid var(--line); }
.prose table tr:nth-child(even) td { background: #fafbfd; }
.prose a { font-weight: 700; text-decoration: underline; text-underline-offset: 3px; }

.table-wrap {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow-x: auto;
}
.table-wrap .grid-view { padding: 8px 8px 0; }
.table-wrap .summary { padding: 12px 12px 4px; font-size: 14px; color: var(--muted); }
.table-wrap .table { margin: 0; font-size: 15px; }
.table-wrap .table > thead > tr > th {
    border-bottom: 1px solid var(--line);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: var(--muted);
    white-space: nowrap;
}
.table-wrap .table > tbody > tr > td { border-top: 1px solid var(--line); vertical-align: middle; }
.table-wrap .table-striped > tbody > tr:nth-of-type(odd) { background: #fafbfd; }
.table-wrap .filters .form-control { height: 38px; font-size: 14px; }
.pagination > li > a, .pagination > li > span { border-radius: 10px !important; margin: 0 3px; border-color: var(--line); color: var(--ink-2); font-weight: 700; }
.pagination > .active > a, .pagination > .active > span { background: var(--primary); border-color: var(--primary); }

.state {
    max-width: 640px;
    margin: 56px auto 80px;
    text-align: center;
}
.state__icon {
    width: 76px;
    height: 76px;
    margin: 0 auto 20px;
    border-radius: 24px;
    font-size: 34px;
    line-height: 76px;
    background: var(--primary-50);
    color: var(--primary);
}
.state--success .state__icon { background: var(--success-50); color: var(--success); }
.state--danger .state__icon { background: var(--danger-50); color: var(--danger); }
.state h1 { margin: 0 0 10px; font-size: 28px; }
.state p { color: var(--muted); font-size: 17px; }
.state .card__body { padding: 40px 36px; }
.state__rows { margin: 24px 0 0; text-align: left; border-top: 1px solid var(--line); }
.state__row { display: flex; justify-content: space-between; gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); font-size: 15px; }
.state__row span { color: var(--muted); display: inline-flex; align-items: center; gap: 10px; }
.state__row span .fa { width: 30px; height: 30px; border-radius: 8px; background: var(--primary-50); color: var(--primary); font-size: 14px; line-height: 30px; text-align: center; flex-shrink: 0; }
.state__row { align-items: center; }
.state__row b { color: var(--ink); text-align: right; }
.state__actions { margin-top: 28px; display: flex; justify-content: center; flex-wrap: wrap; gap: 10px; }

.site-footer {
    flex-shrink: 0;
    background: #0a1f45;
    color: rgba(255, 255, 255, .72);
    font-size: 14px;
}
.site-footer__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 28px 0;
}
.site-footer__copy { color: rgba(255, 255, 255, .8); }

.social-icons { display: flex; gap: 8px; margin: 0; padding: 0; list-style: none; }
.social-icons a {
    display: block;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .08);
    color: #fff;
    font-size: 16px;
    line-height: 38px;
    text-align: center;
    transition: background-color .15s;
}
.social-icons a:hover, .social-icons a:focus { background: var(--primary); color: #fff; }

.alert { border-radius: var(--radius); }
.breadcrumb { display: none; }

.btn-ghost { background: transparent; color: #fff; border-color: rgba(255, 255, 255, .45); }
.btn-ghost:hover, .btn-ghost:focus { background: rgba(255, 255, 255, .12); color: #fff; border-color: #fff; }

.flash-stack { padding-top: 20px; display: grid; gap: 10px; }

.reg { padding: 40px 0 72px; }
.reg__grid { display: grid; grid-template-columns: 340px 1fr; gap: 28px; align-items: start; }
.reg__grid > * { min-width: 0; }

.reg-aside {
    position: sticky;
    top: 100px;
    padding: 28px;
    border-radius: var(--radius-lg);
    color: #fff;
    background:
        radial-gradient(500px 260px at 100% 0%, rgba(255, 255, 255, .10), transparent 60%),
        linear-gradient(160deg, #0a2f6f, #0b3d91);
    box-shadow: var(--shadow-lg);
}
.reg-aside h1 { color: #fff; margin: 12px 0 8px; font-family: var(--font-display); font-weight: 700; font-size: 28px; line-height: 1.2; }
.reg-aside > p { margin: 0 0 22px; color: rgba(255, 255, 255, .78); font-size: 15px; }
.reg-aside img { width: 52px; height: 52px; }

.steps { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 14px; }
.steps li { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; color: rgba(255, 255, 255, .78); }
.steps li b { display: block; color: #fff; }
.steps__n {
    flex-shrink: 0;
    width: 30px; height: 30px; border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, .5);
    color: #fff; font-weight: 800; font-size: 14px; line-height: 27px; text-align: center;
}
.steps li.is-current .steps__n { background: #fff; color: var(--primary); border-color: #fff; }
.steps li.is-done .steps__n { background: #fff; border-color: #fff; color: var(--primary); }

.reg-aside__meta { display: grid; gap: 10px; padding-top: 18px; border-top: 1px solid rgba(255, 255, 255, .18); font-size: 14px; }
.reg-aside__meta div { display: flex; gap: 10px; align-items: flex-start; color: rgba(255, 255, 255, .85); }
.reg-aside__meta .fa { width: 18px; margin-top: 3px; color: rgba(255, 255, 255, .7); }

.reg-form { padding: 8px 32px 32px; }
.reg-section { padding: 26px 0 8px; border-bottom: 1px solid var(--line); }
.reg-section:last-of-type { border-bottom: 0; }
.reg-section__title { display: flex; align-items: center; gap: 10px; margin: 0 0 18px; font-size: 17px; }
.reg-section__title span {
    width: 28px; height: 28px; border-radius: 8px;
    background: var(--primary-50); color: var(--primary);
    font-size: 13px; font-weight: 800; line-height: 28px; text-align: center;
}
.reg-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.reg-row--3 { grid-template-columns: 1.2fr .8fr 1fr; }
.reg-row > * { min-width: 0; }
.hint { display: block; margin-top: 6px; font-size: 13px; color: var(--muted); }

.input-prefix { display: flex; align-items: stretch; }
.input-prefix > span {
    display: flex; align-items: center;
    padding: 0 14px;
    border: 1px solid #cfd6e3; border-right: 0;
    border-radius: 12px 0 0 12px;
    background: var(--bg);
    font-weight: 700; color: var(--ink-2);
}
.input-prefix .form-control { border-radius: 0 12px 12px 0; }

.input-eye { position: relative; }
.input-eye .form-control { padding-right: 48px; }
.input-eye button {
    position: absolute; top: 4px; right: 4px;
    width: 40px; height: 40px;
    border: 0; border-radius: 10px; background: transparent;
    color: var(--muted); font-size: 17px;
}
.input-eye button:hover { background: var(--bg); color: var(--ink); }

.choice { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 8px; }
.choice label {
    position: relative;
    display: flex; align-items: center; gap: 10px;
    margin: 0; padding: 12px 14px;
    border: 1.5px solid var(--line); border-radius: 12px;
    background: #fff; cursor: pointer;
    font-size: 15px; font-weight: 700; color: var(--ink-2);
    transition: border-color .15s, background-color .15s;
}
.choice label:hover { border-color: #b9c8e6; }
.choice input { position: absolute; opacity: 0; pointer-events: none; }
.choice label::before {
    content: ""; flex-shrink: 0;
    width: 18px; height: 18px; border-radius: 50%;
    border: 2px solid #b7c1d3; background: #fff;
    transition: border-color .15s, box-shadow .15s;
}
.choice label.is-checked { border-color: var(--primary); background: var(--primary-50); color: var(--primary); }
.choice label.is-checked::before { border-color: var(--primary); box-shadow: inset 0 0 0 4px #fff; background: var(--primary); }
.choice input:focus-visible + span { outline: 3px solid rgba(11, 61, 145, .35); outline-offset: 4px; border-radius: 4px; }
.choice small { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.choice--cards label { align-items: flex-start; }
.choice--cards label::before { margin-top: 2px; }

.agree { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; background: var(--bg); }
.agree input { width: 18px; height: 18px; margin: 2px 0 0; flex-shrink: 0; accent-color: var(--primary); }
.agree label { margin: 0; font-weight: 500; font-size: 14px; color: var(--ink-2); }

.reg-submit { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding-top: 22px; }
.reg-submit p { margin: 0; color: var(--muted); font-size: 14px; }
.reg-submit .btn { min-width: 240px; }

.otp-input {
    height: 64px !important;
    text-align: center;
    font-size: 30px !important;
    font-weight: 800;
    letter-spacing: .5em;
    padding-left: .5em !important;
    font-variant-numeric: tabular-nums;
}
.resend { display: flex; justify-content: center; align-items: center; gap: 6px; margin-top: 14px; font-size: 14px; color: var(--muted); }
.resend form { display: inline; }
.resend button { padding: 0; border: 0; background: none; font-weight: 800; color: var(--primary); }
.resend button[disabled] { color: var(--muted); cursor: default; }

@media (max-width: 991px) {
    .reg__grid { grid-template-columns: 1fr; }
    .reg-aside { position: static; }
}
@media (max-width: 640px) {
    .reg { padding: 20px 0 48px; }
    .reg-form { padding: 4px 18px 24px; }
    .reg-row { grid-template-columns: 1fr; }
    .reg-row--3 { grid-template-columns: 1fr 1fr; }
    .reg-row--3 > :first-child { grid-column: 1 / -1; }
    .reg-aside { padding: 22px; }
    .reg-aside h1 { font-size: 24px; }
    .reg-submit .btn { width: 100%; min-width: 0; }
    .choice { grid-template-columns: 1fr; }
    .choice--inline { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 1439px) {
    .user-menu__name { display: none; }
    .user-menu__toggle { padding-right: 10px; }
}

@media (max-width: 1240px) {
    .brand__text { display: none; }
}

@media (max-width: 991px) {
    .hero__inner { grid-template-columns: 1fr; padding: 48px 0 64px; }
    .hero__art { max-width: 420px; margin: 0 auto; order: -1; }
    .hero h1 { font-size: 38px; }
    .feature-grid { grid-template-columns: 1fr; }

    .exam { grid-template-columns: 1fr; gap: 16px; }
    .exam__side { display: contents; }
    .exam__side > .test-information, .exam__side > .test-control { order: -2; }
    .exam__side > .panel-box:not(.test-information):not(.test-control) { order: -1; }
    .exam__main { order: 0; }
    .exam__finish { order: 1; }
    .test_questions.nav { grid-template-columns: repeat(10, 1fr); }

    .result-card__top { grid-template-columns: 1fr; justify-items: center; text-align: center; }
    .stats { width: 100%; }

    .site-header { backdrop-filter: none; -webkit-backdrop-filter: none; background: #fff; }
    .nav-toggle { display: block; margin-left: 0; }
    .site-nav {
        position: fixed;
        inset: 0 0 0 auto;
        z-index: 60;
        width: min(320px, 86vw);
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        margin: 0;
        padding: 80px 16px 24px;
        background: #fff;
        box-shadow: -12px 0 40px rgba(15, 27, 45, .18);
        transform: translateX(100%);
        transition: transform .25s ease;
    }
    .site-nav.active { transform: none; }
    .site-nav a { padding: 12px 16px; font-size: 16px; border-radius: 12px; }
    .nav-close {
        display: block;
        position: absolute;
        top: 16px;
        right: 16px;
    }
    .nav-close button {
        width: 44px;
        height: 44px;
        border-radius: 12px;
        border: 1px solid var(--line);
        background: #fff;
        font-size: 20px;
    }
    .site-header__actions { margin-left: auto; }
}

@media (max-width: 640px) {
    .container { padding-left: 16px; padding-right: 16px; }
    .site-header__bar { gap: 12px; min-height: 64px; }
    .brand img { width: 40px; height: 40px; }
    .user-menu__panel { position: fixed; top: 72px; left: 16px; right: 16px; width: auto; }

    .hero h1 { font-size: 30px; }
    .hero__art { max-width: 300px; }
    .hero__lead { font-size: 16px; }
    .hero__facts { grid-template-columns: 1fr; }
    .hero__cta .btn { width: 100%; }
    .countdown, .hero__cta--stack .countdown { width: 100%; flex-direction: column; align-items: center; gap: 8px; padding: 10px 14px 12px; }
    .hero__cta--stack .btn { align-self: stretch; }
    .countdown__units { width: 100%; justify-content: center; }
    .countdown__unit { flex: 1; max-width: 72px; min-width: 0; }

    .section { padding: 48px 0; }
    .section__head h2 { font-size: 26px; }

    .page-hero { padding: 24px 0 20px; }
    .page-hero h1 { font-size: 24px; }
    .page-section { padding: 24px 0 48px; }

    .card__body, .test-test, .prose { padding: 22px 18px; }
    .test_question > div { font-size: 17px; }
    .test_questions.nav { grid-template-columns: repeat(5, 1fr); }
    .exam__nav .btn { min-width: 0; flex: 1; }

    .result-card__top { padding: 28px 18px; }
    .score-ring { width: 180px; height: 180px; }
    .stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
    .stat { padding: 12px 10px; }
    .stat__label { font-size: 11px; line-height: 1.3; }
    .stat__value { font-size: 20px; }
    .result-card__foot { padding: 18px; }

    .intro .block { padding: 28px 20px 22px; }
    .state { margin: 32px auto 56px; }
    .state .card__body { padding: 28px 20px; }

    .site-footer__inner { flex-direction: column; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation: none !important; transition: none !important; }
}

@media print {
    .site-header, .site-footer, .exam__side, .exam__nav { display: none !important; }
    body { background: #fff; }
}

.reg-simple { max-width: 720px; margin: 0 auto; }
.reg-simple .card__body { padding: 32px 36px; }
.reg-simple__title { margin: 0 0 22px; font-size: 24px; text-align: center; }
.reg-simple .btn-block { margin-top: 6px; }
.reg-simple__login { margin: 16px 0 0; text-align: center; font-size: 14px; color: var(--muted); }
.reg-simple__login a { font-weight: 700; }
@media (max-width: 640px) {
    .reg-simple .card__body { padding: 22px 18px; }
    .reg-row.reg-row--pair { grid-template-columns: 1fr 1fr; gap: 0 12px; }
    .hero__art { display: none; }
    .hero__inner { padding: 32px 0 40px; }
    .hero__facts { grid-template-columns: 1fr 1fr; gap: 8px; }
    .fact { padding: 12px; gap: 10px; }
    .fact .fa { width: 30px; height: 30px; line-height: 30px; font-size: 14px; }
    .fact__label { font-size: 11px; }
    .fact__value { font-size: 14px; }
}

.ratings .table td b { display: block; font-weight: 700; color: var(--ink); }
.ratings .only-mobile { display: none; color: var(--muted); font-size: 12px; margin-top: 2px; }
.ratings .col-rank { color: var(--muted); font-weight: 700; width: 48px; }
.ratings .col-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
@media (max-width: 640px) {
    .ratings .hide-mobile, .ratings .filters { display: none; }
    .ratings .only-mobile { display: block; }
    .ratings .table > thead > tr > th, .ratings .table > tbody > tr > td { padding: 10px 8px; }
}

.page-home .main-content { position: relative; }
.page-home .main-content > * { position: relative; z-index: 1; }
.page-home .main-content::before,
.page-home .main-content::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    z-index: 0;
    width: max(0px, calc((100% - 1180px) / 2 + 40px));
    background: url(../img/naqsh.svg) repeat;
    background-size: 96px 96px;
    opacity: .07;
    pointer-events: none;
}
.page-home .main-content::before {
    left: 0;
    -webkit-mask-image: linear-gradient(to right, #000 30%, transparent);
    mask-image: linear-gradient(to right, #000 30%, transparent);
}
.page-home .main-content::after {
    right: 0;
    background-position: right top;
    -webkit-mask-image: linear-gradient(to left, #000 30%, transparent);
    mask-image: linear-gradient(to left, #000 30%, transparent);
}
@media (max-width: 1279px) {
    .page-home .main-content::before,
    .page-home .main-content::after { display: none; }
}

body.nav-open { overflow: hidden; }
body.nav-open::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 45;
    background: rgba(15, 27, 45, .45);
}

.exam-protect .main-content { -webkit-user-select: none; user-select: none; -webkit-touch-callout: none; }
.exam-protect textarea { -webkit-user-select: text; user-select: text; }
.exam-shield { display: none; }
body.exam-hidden .exam-shield {
    display: flex; position: fixed; inset: 0; z-index: 100;
    align-items: center; justify-content: center; text-align: center; padding: 24px;
    background: rgba(10, 31, 69, .92); color: #fff;
}
.exam-shield b { display: block; font-size: 22px; margin-bottom: 8px; }
.exam-shield span { font-size: 15px; opacity: .8; }
body.exam-hidden .exam { filter: blur(14px); }
@media print {
    .exam-protect .main-content { display: none !important; }
}

.test_answers li a > span,
.test_answers li a > span * { font-weight: 500 !important; }
.test_answers li a > span h1, .test_answers li a > span h2, .test_answers li a > span h3,
.test_answers li a > span h4, .test_answers li a > span p { font-size: inherit !important; margin: 0 !important; line-height: inherit; }

.result-card__foot { display: grid; gap: 8px; }
.result-card__time { color: var(--ink-2); }
.result-card__note { line-height: 1.6; }

.exam-timeup {
    position: fixed; inset: 0; z-index: 120;
    display: flex; align-items: center; justify-content: center; padding: 24px;
    background: rgba(10, 31, 69, .6);
    animation: fadeUp .2s ease;
}
.exam-timeup__card {
    width: 100%; max-width: 420px; padding: 32px 28px; border-radius: var(--radius-lg);
    background: #fff; text-align: center; box-shadow: 0 30px 80px rgba(0, 0, 0, .3);
}
.exam-timeup__icon {
    width: 64px; height: 64px; margin: 0 auto 16px; border-radius: 20px;
    background: var(--danger-50); color: var(--danger);
    display: flex; align-items: center; justify-content: center; font-size: 28px;
}
.exam-timeup__card h2 { margin: 0 0 8px; font-size: 22px; }
.exam-timeup__card p { margin: 0 0 18px; color: var(--muted); }
.exam-timeup__spin {
    width: 28px; height: 28px; margin: 0 auto; border-radius: 50%;
    border: 3px solid var(--primary-100); border-top-color: var(--primary);
    animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
