:root {
    color-scheme: light;
    --bg: #ffffff;
    --surface: rgba(255, 255, 255, 0.78);
    --surface-strong: rgba(255, 255, 255, 0.92);
    --text: #102033;
    --muted: #5c6b7d;
    --border: rgba(16, 32, 51, 0.12);
    --shadow: 0 24px 80px rgba(76, 97, 121, 0.14);
    --primary: #ff5a7a;
    --primary-2: #10b6b3;
    --accent: #7c8cff;
    --accent-2: #ffc857;
    --radius: 28px;
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: Arial, Helvetica, sans-serif;
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 90, 122, 0.08), transparent 30%),
        radial-gradient(circle at 80% 0%, rgba(124, 140, 255, 0.11), transparent 28%),
        radial-gradient(circle at 50% 80%, rgba(16, 182, 179, 0.08), transparent 28%),
        var(--bg);
    color: var(--text);
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image: linear-gradient(rgba(16, 32, 51, 0.03) 1px, transparent 1px), linear-gradient(90deg, rgba(16, 32, 51, 0.03) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.45), transparent 85%);
    pointer-events: none;
}

.floating-shapes {
    position: fixed;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.shape {
    position: absolute;
    border-radius: 999px;
    filter: blur(0.2px);
    opacity: 0.8;
    mix-blend-mode: multiply;
    will-change: transform;
}

.shape-a { width: 170px; height: 170px; background: rgba(255, 90, 122, 0.16); }
.shape-b { width: 130px; height: 130px; background: rgba(16, 182, 179, 0.18); }
.shape-c { width: 110px; height: 110px; background: rgba(124, 140, 255, 0.18); }
.shape-d { width: 190px; height: 190px; background: rgba(255, 200, 87, 0.14); }
.shape-e { width: 90px; height: 90px; background: rgba(87, 204, 153, 0.18); }

.shell {
    position: relative;
    z-index: 1;
    width: min(1080px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 48px;
}

.shell.wide {
    width: min(1180px, calc(100% - 32px));
}

.card {
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
}

.glass {
    background: rgba(255, 255, 255, 0.74);
    backdrop-filter: blur(18px);
}

.hero {
    padding: 44px;
}

.topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 28px;
    margin-bottom: 22px;
}

.home-topbar {
    margin-bottom: 18px;
}

.menu-shell {
    position: relative;
    display: flex;
    align-items: center;
    gap: 12px;
}

.menu-toggle {
    display: none;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.86);
    color: var(--text);
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.menu-icon {
    position: relative;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    display: inline-block;
}

.menu-icon::before,
.menu-icon::after {
    content: '';
    position: absolute;
    left: 0;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
}

.menu-icon::before {
    top: -6px;
}

.menu-icon::after {
    top: 6px;
}

.home-menu {
    display: flex;
    align-items: center;
    gap: 10px;
}

.home-menu a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 16px;
    border-radius: 999px;
    text-decoration: none;
    color: var(--text);
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--border);
    font-weight: 700;
}

.eyebrow {
    margin: 0 0 12px;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-size: 0.78rem;
    color: var(--primary-2);
    font-weight: 700;
}

h1, h2, p {
    margin-top: 0;
}

h1 {
    font-size: clamp(2.3rem, 5vw, 4.6rem);
    line-height: 0.98;
    max-width: 12ch;
    margin-bottom: 18px;
}

.hero .lead {
    max-width: 60ch;
    color: var(--muted);
    font-size: 1.03rem;
    line-height: 1.7;
}

.hero a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 700;
}

.stats {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    margin: 28px 0;
}

.stats div,
.info-grid article,
.question-card,
.panel {
    background: var(--surface-strong);
}

.stats div {
    border: 1px solid var(--border);
    border-radius: 22px;
    padding: 18px;
}

.stats strong {
    display: block;
    font-size: 2rem;
    margin-bottom: 6px;
}

.stats span {
    color: var(--muted);
}

.actions,
.top-links {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.button,
.top-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    text-decoration: none;
    border: 1px solid transparent;
    font-weight: 700;
}

.button {
    padding: 14px 20px;
    cursor: pointer;
    font-size: 1rem;
}

.button.primary {
    color: white;
    background: linear-gradient(135deg, var(--primary), #ff8d6b);
    box-shadow: 0 16px 30px rgba(255, 90, 122, 0.25);
}

.button.secondary,
.top-links a {
    color: var(--text);
    background: rgba(255, 255, 255, 0.72);
    border-color: var(--border);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-top: 22px;
}

.info-grid article,
.panel,
.question-card,
.form-card {
    padding: 22px;
}

.info-grid p,
.question-card .question-meta,
.notice,
label span {
    color: var(--muted);
}

.wide .topbar h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    max-width: none;
    margin-bottom: 0;
}

.quiz-layout {
    display: grid;
    grid-template-columns: 360px minmax(0, 1fr);
    gap: 22px;
}

.stack {
    display: grid;
    gap: 16px;
}

label {
    display: grid;
    gap: 8px;
}

textarea,
input {
    width: 100%;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.9);
    color: var(--text);
    padding: 14px 16px;
    font: inherit;
    outline: none;
}

textarea:focus,
input:focus {
    border-color: rgba(255, 90, 122, 0.42);
    box-shadow: 0 0 0 4px rgba(255, 90, 122, 0.08);
}

.quiz-results {
    display: grid;
    gap: 18px;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.category-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    border: 1px solid var(--border);
    border-radius: 999px;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.7);
}

.category-pill input[type="checkbox"] {
    width: auto;
}

.question-card {
    display: grid;
    gap: 16px;
}

.question-meta {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 0.92rem;
}

.options {
    list-style: none;
    margin: 0;
    padding: 0;
    display: grid;
    gap: 12px;
}

.options li {
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 12px 14px;
    background: rgba(255, 255, 255, 0.65);
}

.options label {
    display: flex;
    align-items: center;
    gap: 12px;
    cursor: pointer;
}

.options input[type="radio"] {
    width: auto;
}

.meta {
    margin: 0;
    font-size: 0.95rem;
    color: var(--text);
}

.notice.error {
    color: #b42318;
}

.notice.success {
    color: #067647;
}

@media (max-width: 920px) {
    .info-grid,
    .quiz-layout {
        grid-template-columns: 1fr;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .menu-toggle {
        display: inline-flex;
    }

    .home-menu {
        position: absolute;
        top: calc(100% + 10px);
        right: 0;
        min-width: 220px;
        flex-direction: column;
        align-items: stretch;
        padding: 12px;
        border: 1px solid var(--border);
        border-radius: 22px;
        background: rgba(255, 255, 255, 0.96);
        box-shadow: var(--shadow);
        opacity: 0;
        transform: translateY(-8px);
        pointer-events: none;
        transition: opacity 160ms ease, transform 160ms ease;
        z-index: 5;
    }

    .home-menu.is-open {
        opacity: 1;
        transform: translateY(0);
        pointer-events: auto;
    }

    .home-menu a {
        width: 100%;
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .shell,
    .shell.wide {
        width: min(100% - 20px, 100%);
        padding-top: 18px;
    }

    .hero,
    .panel,
    .question-card,
    .info-grid article,
    .form-card {
        padding: 18px;
    }

    .stats {
        grid-template-columns: 1fr;
    }

    .menu-shell {
        width: 100%;
        justify-content: flex-start;
    }

    .home-menu {
        left: 0;
        right: auto;
        min-width: min(100vw - 40px, 260px);
    }

    .category-grid {
        grid-template-columns: 1fr;
    }
}