:root {
    color-scheme: light only;
    --bg-gradient: linear-gradient(135deg, #0f172a, #1e293b 60%, #312e81);
    --card-bg: rgba(15, 23, 42, 0.65);
    --panel-bg: #ffffff;
    --accent: #6366f1;
    --accent-strong: #4f46e5;
    --accent-soft: rgba(99, 102, 241, 0.12);
    --text-primary: #0f172a;
    --text-on-dark: #f8fafc;
    --muted: #64748b;
    --border-soft: rgba(148, 163, 184, 0.3);
    --success: #22c55e;
    --danger: #ef4444;
    --info: #0ea5e9;
    font-size: 16px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Inter", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text-primary);
    background: var(--bg-gradient);
    min-height: 100vh;
    display: flex;
    justify-content: center;
}

.app-shell {
    width: min(1100px, 95%);
    display: flex;
    flex-direction: column;
    gap: 2rem;
    padding: 2rem 0 3rem;
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    font-weight: 700;
    font-size: 1.5rem;
    color: var(--text-on-dark);
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-welcome {
    color: var(--text-on-dark);
    font-weight: 500;
}

.btn {
    border-radius: 999px;
    padding: 0.55rem 1.3rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
    border: 1px solid transparent;
    cursor: pointer;
}

.btn-primary {
    color: white;
    background: var(--accent);
    box-shadow: 0 10px 30px rgba(79, 70, 229, 0.35);
}

.btn-primary:hover {
    background: var(--accent-strong);
    transform: translateY(-1px);
}

.btn-secondary {
    color: white;
    background: rgba(148, 163, 184, 0.2);
    border-color: rgba(148, 163, 184, 0.4);
}

.btn-secondary:hover {
    background: rgba(148, 163, 184, 0.35);
}

.btn-ghost {
    color: var(--text-on-dark);
    border-color: rgba(148, 163, 184, 0.2);
}

.btn-ghost:hover {
    background: rgba(148, 163, 184, 0.15);
}

.btn-full {
    width: 100%;
}

.content {
    flex: 1;
}

.hero {
    display: grid;
    gap: 2rem;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    align-items: stretch;
}

.hero-copy {
    background: var(--panel-bg);
    border-radius: 24px;
    padding: 2.5rem;
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.28);
}

.hero-copy h1 {
    margin-top: 0;
    font-size: clamp(2rem, 3vw, 3rem);
    color: var(--text-primary);
}

.hero-copy p {
    color: var(--muted);
    line-height: 1.6;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
    flex-wrap: wrap;
}

.hero-card {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 2rem;
    color: var(--text-on-dark);
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    backdrop-filter: blur(12px);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    font-size: 0.8rem;
}

.status-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--success);
    box-shadow: 0 0 12px var(--success);
}

.feature-list {
    margin: 0;
    padding-left: 1.1rem;
    display: grid;
    gap: 0.35rem;
}

.feature-list li {
    color: rgba(226, 232, 240, 0.9);
}

.flash-stack {
    display: grid;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.flash {
    border-radius: 12px;
    padding: 0.85rem 1.2rem;
    color: #0f172a;
    background: #f1f5f9;
    border: 1px solid rgba(148, 163, 184, 0.4);
    font-weight: 500;
}

.flash-success {
    border-color: rgba(34, 197, 94, 0.4);
    background: rgba(34, 197, 94, 0.15);
}

.flash-danger {
    border-color: rgba(239, 68, 68, 0.4);
    background: rgba(239, 68, 68, 0.15);
}

.flash-info {
    border-color: rgba(14, 165, 233, 0.4);
    background: rgba(14, 165, 233, 0.15);
}

.auth-shell {
    display: flex;
    justify-content: center;
}

.auth-card {
    background: var(--panel-bg);
    border-radius: 24px;
    width: min(420px, 100%);
    padding: 2.5rem 2.75rem;
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.28);
}

.auth-card h1 {
    margin: 0;
    font-size: 2rem;
}

.auth-subtitle {
    color: var(--muted);
    margin-bottom: 2rem;
    line-height: 1.5;
}

.input-field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    margin-bottom: 1.3rem;
}

.input-field label {
    font-weight: 600;
    color: var(--text-primary);
}

.input-control {
    border-radius: 12px;
    border: 1px solid var(--border-soft);
    padding: 0.75rem 1rem;
    font-size: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.input-control:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
}

.input-error {
    color: var(--danger);
    font-size: 0.85rem;
}

.form-actions {
    margin-top: 1.5rem;
}

.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
    color: var(--muted);
}

.auth-switch a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 600;
}

.dashboard {
    display: flex;
    justify-content: center;
}

.dashboard-card {
    width: 100%;
    background: var(--panel-bg);
    border-radius: 24px;
    padding: 2.5rem 3rem;
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.28);
}

.dashboard-card h1 {
    margin: 0;
    font-size: clamp(2rem, 4vw, 2.5rem);
}

.dashboard-card > p {
    color: var(--muted);
    margin-bottom: 2.5rem;
}

.dashboard-grid {
    display: grid;
    gap: 1.5rem;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.info-tile {
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    padding: 1.5rem;
    background: #f8fafc;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.info-tile h2 {
    margin-top: 0;
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.info-tile p {
    margin: 0;
    color: var(--muted);
    line-height: 1.5;
}

.assessment {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.assessment-header h1 {
    margin: 0 0 0.5rem;
    font-size: clamp(2rem, 3.5vw, 2.8rem);
}

.assessment-intro {
    color: var(--muted);
    max-width: 60ch;
    line-height: 1.6;
}

.assessment-form {
    background: var(--panel-bg);
    border-radius: 24px;
    padding: 2.5rem 3rem;
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.28);
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.question-block {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    padding: 1.5rem;
    background: #f8fafc;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
}

.question-label {
    display: flex;
    align-items: baseline;
    gap: 0.65rem;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-primary);
}

.question-number {
    font-weight: 700;
    color: var(--accent);
}

.question-hint {
    margin: 0;
    font-size: 0.9rem;
    color: var(--muted);
}

.question-input {
    display: block;
}

.option-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.option-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.4);
    padding: 0.45rem 0.9rem;
    background: white;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.option-pill:hover {
    border-color: var(--accent);
}

.option-input {
    accent-color: var(--accent);
}

.option-text {
    font-weight: 500;
}

.input-errors {
    margin: 0;
    padding-left: 1.1rem;
    color: var(--danger);
    font-size: 0.9rem;
}

.responses {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.responses-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.responses-header h1 {
    margin: 0;
    font-size: clamp(2rem, 3vw, 2.6rem);
}

.responses-subtitle {
    margin: 0.25rem 0 0;
    color: var(--muted);
}

.responses-table {
    display: grid;
    gap: 0.75rem;
    background: var(--panel-bg);
    border-radius: 24px;
    padding: 2rem;
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.28);
}

.responses-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    align-items: center;
    padding: 0.75rem 1rem;
    border-radius: 14px;
    background: rgba(241, 245, 249, 0.6);
}

.responses-row--head {
    font-weight: 600;
    color: var(--muted);
    background: transparent;
    padding-bottom: 0.5rem;
}

.link-pill {
    color: var(--accent);
    font-weight: 600;
    text-decoration: none;
}

.empty-state {
    background: var(--panel-bg);
    border-radius: 24px;
    padding: 2.25rem;
    box-shadow: 0 30px 70px rgba(15, 23, 42, 0.28);
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    align-items: flex-start;
}

.empty-state p {
    margin: 0;
    font-size: 1rem;
    color: var(--muted);
}

.footer {
    color: rgba(248, 250, 252, 0.75);
    text-align: center;
    font-size: 0.9rem;
}

@media (max-width: 720px) {
    .app-shell {
        padding-top: 1.5rem;
    }

    .topbar {
        flex-direction: column;
        gap: 1.25rem;
        align-items: flex-start;
    }

    .nav-links {
        width: 100%;
        justify-content: space-between;
    }

    .hero-copy,
    .hero-card,
    .auth-card,
    .dashboard-card {
        padding: 2rem;
    }
}
