:root {
    --bg: #f4f6fb;
    --surface: #ffffff;
    --surface-alt: #f7f8fc;
    --surface-soft: #eef2fb;
    --text: #142149;
    --muted: #5f6b8f;
    --line: #d9e0ef;
    --line-strong: #c8d1e5;
    --primary: #5467f3;
    --primary-dark: #3946b7;
    --violet: #6a59e7;
    --navy: #172448;
    --navy-soft: #273666;
    --gold: #d4ae53;
    --gold-soft: #f0e0ad;
    --danger: #b64f63;
    --success: #198754;
    --shadow: 0 18px 40px rgba(19, 31, 70, 0.08);
    --shadow-soft: 0 10px 24px rgba(19, 31, 70, 0.05);
    --radius: 24px;
    --radius-sm: 16px;
    --container: min(1200px, calc(100% - 32px));
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    margin: 0;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: linear-gradient(180deg, #f7f8fc 0%, #f2f5fb 100%);
    color: var(--text);
    text-rendering: optimizeLegibility;
}
a {
    color: var(--primary-dark);
    text-decoration: none;
}
a:hover { color: var(--primary); }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }

.container {
    width: var(--container);
    margin: 0 auto;
}

.page-shell {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
main { flex: 1; }

.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(201, 209, 228, 0.9);
}
.site-header::before {
    content: "";
    display: block;
    height: 4px;
    background: linear-gradient(90deg, var(--gold) 0%, var(--primary) 48%, var(--violet) 100%);
}
.nav {
    min-height: 84px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}
.brand {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    color: var(--text);
}
.brand-logos {
    display: flex;
    align-items: center;
    gap: 10px;
}
.brand:hover { color: var(--text); }
.brand-logo {
    width: 58px;
    height: 58px;
    object-fit: contain;
    flex: 0 0 auto;
}
.brand-logo-secondary {
    width: 44px;
    height: 44px;
    opacity: 0.96;
}
.brand-copy {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.brand-copy strong {
    font-size: 1.05rem;
    line-height: 1.15;
    letter-spacing: -0.01em;
}
.brand-copy span {
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--primary-dark);
    font-weight: 800;
}

.nav-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 24px;
}
.nav-links a,
.nav-button {
    position: relative;
    padding: 8px 0;
    border: 0;
    background: transparent;
    color: var(--text);
    font-weight: 700;
    font-size: 0.98rem;
    cursor: pointer;
}
.nav-links a::after,
.nav-button::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, var(--gold), var(--primary));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.18s ease;
}
.nav-links a:hover::after,
.nav-button:hover::after { transform: scaleX(1); }
.inline-form { margin: 0; }

.messages {
    padding-top: 18px;
}
.message {
    padding: 14px 16px;
    border-radius: 14px;
    background: var(--surface);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-soft);
    margin-bottom: 10px;
}
.message.success { border-left: 4px solid var(--success); }
.message.error { border-left: 4px solid var(--danger); }

.section {
    padding: 48px 0;
}
.section.narrow .container,
.narrow .container {
    max-width: 860px;
}
.page-intro,
.panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 24px;
}
.kicker,
.page-label {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(84, 103, 243, 0.09);
    color: var(--primary-dark);
    font-size: 0.76rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    font-weight: 800;
}
.page-title,
.hero-title,
.section-title {
    margin: 14px 0 0;
    line-height: 0.98;
    letter-spacing: -0.04em;
    color: var(--text);
}
.hero-title {
    font-size: clamp(42px, 5.6vw, 72px);
    max-width: 8ch;
    text-wrap: balance;
}
.page-title {
    font-size: clamp(34px, 5vw, 54px);
    max-width: 12ch;
}
.section-title {
    font-size: clamp(28px, 4vw, 40px);
}
.lead,
.page-intro p,
.section-subtitle,
.text-muted {
    margin: 18px 0 0;
    max-width: 64ch;
    line-height: 1.72;
    color: var(--muted);
    font-size: 1.03rem;
}

.hero-partners {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 18px;
    padding: 10px 14px;
    border-radius: 999px;
    background: var(--surface-alt);
    border: 1px solid var(--line);
}
.hero-partner-logo {
    display: block;
    object-fit: contain;
}
.hero-partner-logo-apt {
    width: 54px;
    height: 54px;
}
.hero-partner-logo-prof {
    width: 40px;
    height: 40px;
}
.hero-partner-separator {
    width: 1px;
    height: 28px;
    background: var(--line-strong);
}

.hero {
    padding: 34px 0 28px;
}
.hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(360px, 430px);
    gap: 24px;
    align-items: stretch;
}
.hero-copy,
.hero-side,
.card {
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface);
    box-shadow: var(--shadow-soft);
}
.hero-copy {
    position: relative;
    padding: 42px;
    overflow: hidden;
}
.hero-copy::before,
.card-accent::before,
.chart-card::before,
.table-card::before,
.form-card::before,
.summary-card::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 6px;
    border-radius: var(--radius) var(--radius) 0 0;
    background: linear-gradient(90deg, var(--gold) 0%, var(--primary) 50%, var(--violet) 100%);
}
.hero-copy > * { position: relative; }
.hero-actions,
.button-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 30px;
}
.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}
.meta-pill,
.progress-badge,
.hero-badges span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 42px;
    padding: 10px 16px;
    border-radius: 999px;
    border: 1px solid var(--line-strong);
    background: var(--surface-alt);
    color: var(--text);
    font-weight: 700;
}

.hero-side {
    background: linear-gradient(180deg, var(--navy) 0%, #202f60 100%);
    color: #fff;
    padding: 28px;
    box-shadow: 0 18px 40px rgba(23, 36, 72, 0.18);
    overflow: hidden;
}
.hero-side .kicker {
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
}
.hero-side-head {
    display: flex;
    gap: 14px;
    align-items: center;
}
.hero-side-copy {
    min-width: 0;
}
.hero-side-logos {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 0 0 auto;
}
.hero-side-logo {
    width: 58px;
    height: 58px;
    object-fit: contain;
    flex: 0 0 auto;
}
.hero-side-logo-prof {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 14px;
    padding: 4px;
}
.hero-side-title {
    margin: 10px 0 0;
    font-size: clamp(1.7rem, 2.8vw, 2.2rem);
    line-height: 1.05;
    letter-spacing: -0.03em;
    color: #fff;
    max-width: 11ch;
    text-wrap: balance;
}
.hero-side-subtitle {
    margin: 12px 0 0;
    line-height: 1.6;
    color: rgba(255, 255, 255, 0.82);
}
.fact-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 24px;
}
.fact-card {
    border-radius: 18px;
    padding: 16px;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.12);
}
.fact-value {
    font-size: 2rem;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.04em;
    color: #fff;
}
.fact-label {
    margin-top: 8px;
    color: rgba(255, 255, 255, 0.78);
    line-height: 1.4;
}
.hero-note {
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.84);
}

.section-tight {
    padding-top: 10px;
    padding-bottom: 26px;
}
.event-banner-card {
    padding: 18px;
    border-radius: 28px;
    border: 1px solid var(--line);
    background: linear-gradient(180deg, #fff 0%, #f8f9fd 100%);
    box-shadow: var(--shadow-soft);
}
.event-banner-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
}
.event-banner-title {
    margin: 10px 0 0;
    font-size: clamp(1.6rem, 2.5vw, 2.25rem);
    line-height: 1.08;
    letter-spacing: -0.03em;
}
.event-badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    background: var(--surface-alt);
    border: 1px solid var(--line);
    font-weight: 800;
    color: var(--navy);
    white-space: nowrap;
}
.event-badge img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}
.event-banner-image {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    border-radius: 20px;
    border: 1px solid var(--line);
    background: #fff;
}

.grid-2,
.grid-3,
.grid-4,
.card-grid {
    display: grid;
    gap: 20px;
}
.grid-2,
.card-grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3,
.card-grid.three,
.feature-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

.card {
    position: relative;
    padding: 24px;
}
.card h2,
.card h3,
.card p {
    position: relative;
}
.card h2,
.card h3 {
    margin: 0 0 12px;
}
.card p {
    margin: 0;
    line-height: 1.68;
    color: var(--muted);
}
.card-accent,
.chart-card,
.table-card,
.form-card,
.summary-card { overflow: hidden; }

.step-card-number,
.feature-icon,
.question-number {
    width: 46px;
    height: 46px;
    border-radius: 14px;
    display: grid;
    place-items: center;
    font-weight: 900;
    background: var(--surface-soft);
    color: var(--primary-dark);
    border: 1px solid var(--line);
    margin-bottom: 16px;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    padding: 0 18px;
    border-radius: 14px;
    border: 1px solid transparent;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}
.btn:hover { transform: translateY(-1px); }
.btn-primary {
    color: #fff;
    background: linear-gradient(90deg, var(--primary-dark), var(--primary));
    box-shadow: 0 14px 26px rgba(57, 70, 183, 0.18);
}
.btn-primary:hover { box-shadow: 0 18px 30px rgba(57, 70, 183, 0.22); }
.btn-secondary,
.btn-light {
    background: #fff;
    border-color: var(--line-strong);
    color: var(--text);
}
.btn-secondary:hover,
.btn-light:hover {
    border-color: var(--primary);
    color: var(--primary-dark);
}
.btn-ghost {
    background: transparent;
    border-color: rgba(255, 255, 255, 0.18);
    color: #fff;
}
.btn-large {
    min-height: 54px;
    padding-inline: 22px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.field span {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--text);
}
input,
select,
textarea {
    width: 100%;
    padding: 14px 15px;
    border-radius: 14px;
    border: 1px solid var(--line-strong);
    background: #fff;
    color: var(--text);
    transition: border-color 0.18s ease, box-shadow 0.18s ease;
}
input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: rgba(84, 103, 243, 0.5);
    box-shadow: 0 0 0 4px rgba(84, 103, 243, 0.1);
}
textarea { resize: vertical; min-height: 120px; }
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}
.form-grid .field:last-child:nth-child(odd) { grid-column: span 2; }
.stack {
    display: grid;
    gap: 18px;
}
.filters {
    display: grid;
    grid-template-columns: 1.2fr 1.2fr 0.8fr auto;
    gap: 14px;
    align-items: end;
}

.table-wrap { overflow-x: auto; }
.table {
    width: 100%;
    border-collapse: collapse;
    min-width: 720px;
}
.table th,
.table td {
    padding: 14px 12px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}
.table th {
    color: var(--muted);
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 800;
}
.table tbody tr:hover {
    background: rgba(84, 103, 243, 0.03);
}

.stats-grid .card {
    min-height: 140px;
}
.stat-label {
    font-size: 0.84rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    font-weight: 800;
}
.stat-value {
    margin-top: 16px;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.04em;
}
.stat-value.small {
    font-size: 1.2rem;
    line-height: 1.35;
    letter-spacing: -0.02em;
}
.stat-card-highlight {
    background: linear-gradient(180deg, #fff 0%, #f9fbff 100%);
}

.chart-grid {
    align-items: stretch;
}
.chart-card {
    min-height: 420px;
    background: linear-gradient(180deg, #ffffff 0%, #fbfcff 100%);
}
.chart-card h2,
.table-card h2,
.summary-card h2 { margin-bottom: 8px; }
.chart-head,
.chart-card-head,
.table-head {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: flex-start;
    margin-bottom: 16px;
}
.chart-head p,
.chart-card-head p,
.table-head p,
.note-under-chart {
    color: var(--muted);
}
.chart-wrap {
    position: relative;
    min-height: 320px;
    padding: 6px 2px 2px;
}
.chart-wrap.compact-wrap { min-height: 300px; }
.chart-wrap.tall { min-height: 360px; }

.dashboard-hero,
.result-hero {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 20px;
}
.dashboard-hero .page-title,
.result-hero .page-title {
    max-width: none;
}
.dashboard-hero.card,
.result-hero.card {
    background: linear-gradient(180deg, #fff 0%, #f7f9fe 100%);
}

.summary-card .dominant {
    font-size: clamp(1.8rem, 4vw, 2.8rem);
    line-height: 1.04;
    font-weight: 900;
    letter-spacing: -0.04em;
    margin: 0 0 10px;
}
.score-list {
    display: grid;
    gap: 12px;
    margin-top: 22px;
}
.score-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    border-radius: 14px;
    background: var(--surface-alt);
    border: 1px solid var(--line);
}
.score-row strong {
    font-size: 1.05rem;
}
.text-block p:last-child { margin-bottom: 0; }
.text-block ul { margin: 0; }

.text-block {
    color: var(--muted);
    line-height: 1.72;
}
.text-block p { margin: 0 0 12px; }
.text-block p:last-child { margin-bottom: 0; }

.notes {
    display: grid;
    gap: 14px;
}
.note {
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--surface-alt);
}
.note-meta {
    margin-bottom: 8px;
    color: var(--muted);
    font-size: 0.9rem;
    font-weight: 600;
}

.consent-box {
    margin: 22px 0;
    padding: 20px;
    border-radius: 18px;
    border: 1px solid var(--line);
    background: var(--surface-alt);
    line-height: 1.74;
    white-space: pre-line;
}

.question-card {
    display: grid;
    grid-template-columns: 70px 1fr;
    gap: 20px;
    align-items: start;
    padding: 22px;
}
.question-number {
    margin: 0;
    width: 54px;
    height: 54px;
    border-radius: 18px;
    font-size: 1.1rem;
}
.question-options {
    display: grid;
    gap: 12px;
}
.option-pill {
    display: block;
    cursor: pointer;
}
.option-pill input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}
.option-pill span {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 18px;
    border: 1px solid var(--line-strong);
    border-radius: 16px;
    background: var(--surface-alt);
    transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
    line-height: 1.5;
}
.option-pill strong {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    background: #fff;
    border: 1px solid var(--line-strong);
    color: var(--primary-dark);
    flex: 0 0 auto;
    font-size: 0.9rem;
}
.option-pill input:checked + span {
    background: rgba(84, 103, 243, 0.08);
    border-color: rgba(84, 103, 243, 0.52);
    box-shadow: 0 0 0 4px rgba(84, 103, 243, 0.08);
}
.option-pill input:checked + span strong {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    color: #fff;
}

.auth-card {
    max-width: 560px;
    margin: 0 auto;
}
.error {
    color: var(--danger);
    font-size: 0.92rem;
}

.site-footer {
    margin-top: 28px;
    background: var(--navy);
    color: rgba(255, 255, 255, 0.82);
}
.footer-logos {
    display: flex;
    align-items: center;
    gap: 10px;
}
.footer-logo-secondary {
    width: 42px;
    height: 42px;
    background: rgba(255, 255, 255, 0.94);
    border-radius: 12px;
    padding: 4px;
}
.footer-inner {
    min-height: 110px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 24px 0;
}
.footer-brand {
    display: flex;
    align-items: center;
    gap: 14px;
}
.footer-brand strong {
    display: block;
    color: #fff;
    margin-bottom: 6px;
}
.footer-brand p,
.footer-note { margin: 0; }
.footer-logo {
    width: 54px;
    height: 54px;
    object-fit: contain;
}

@media (max-width: 1080px) {
    .hero-grid,
    .grid-3,
    .feature-grid,
    .card-grid.three,
    .grid-4,
    .card-grid.two,
    .grid-2,
    .form-grid,
    .filters {
        grid-template-columns: 1fr;
    }

    .dashboard-hero,
    .result-hero,
    .page-intro,
    .panel-header,
    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-title {
        max-width: none;
    }

    .form-grid .field:last-child:nth-child(odd) {
        grid-column: span 1;
    }
}

@media (max-width: 760px) {
    .container {
        width: min(100% - 20px, 100%);
    }

    .nav {
        min-height: 74px;
        align-items: flex-start;
        padding: 12px 0;
        flex-direction: column;
    }

    .nav-links {
        width: 100%;
        gap: 14px 20px;
    }

    .hero-copy,
    .hero-side,
    .card {
        padding: 20px;
        border-radius: 20px;
    }

    .hero-copy::before,
    .card-accent::before,
    .chart-card::before,
    .table-card::before,
    .form-card::before,
    .summary-card::before {
        border-radius: 20px 20px 0 0;
    }

    .hero {
        padding-top: 20px;
    }

    .hero-title {
        font-size: clamp(34px, 12vw, 52px);
        max-width: none;
    }

    .event-banner-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .hero-side-head {
        align-items: flex-start;
    }

    .page-title {
        font-size: clamp(28px, 10vw, 40px);
    }

    .fact-grid {
        grid-template-columns: 1fr 1fr;
    }

    .question-card {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .question-number {
        width: 46px;
        height: 46px;
        border-radius: 14px;
    }

    .table {
        min-width: 620px;
    }
}
