
:root {
    --navy: #102a43;
    --blue: #1769aa;
    --pale-blue: #eef6fc;
    --text: #253746;
    --muted: #627d98;
    --border: #d9e2ec;
    --white: #fff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #f4f7fb;
    color: var(--text);
    font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
}

.app-navbar {
    background: var(--navy);
}

.app-navbar .navbar-brand {
    white-space: normal;
}

.app-navbar .nav-link {
    color: #eaf2f8;
    padding-inline: 0.9rem;
}

.app-navbar .nav-link:hover,
.app-navbar .nav-link.active {
    color: #fff;
    text-decoration: underline;
    text-underline-offset: 5px;
}

.page-container {
    min-height: calc(100vh - 140px);
    padding-top: 1.5rem;
    padding-bottom: 3rem;
}

.user-strip {
    margin-bottom: 1rem;
    color: var(--muted);
    font-size: 0.9rem;
    text-align: right;
}

.hero-card,
.content-card,
.feature-card,
.login-card {
    background: var(--white);
    border: 1px solid var(--border);
    border-radius: 18px;
    box-shadow: 0 8px 28px rgba(16, 42, 67, 0.06);
}

.hero-card {
    padding: clamp(1.5rem, 5vw, 4rem);
    background: linear-gradient(135deg, #eef6fc, #fff 70%);
}

.hero-card h1,
.login-card h1 {
    color: var(--navy);
    font-size: clamp(2rem, 5vw, 3.3rem);
    font-weight: 800;
    line-height: 1.15;
    margin: 0.75rem 0;
}

.hero-card .lead {
    max-width: 700px;
    color: var(--muted);
}

.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 1.5rem;
}

.eyebrow {
    color: var(--blue);
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.15em;
}

.feature-card {
    height: 100%;
    padding: 1.5rem;
}

.feature-card h2 {
    font-size: 1.2rem;
    color: var(--navy);
}

.content-card {
    padding: clamp(1rem, 3vw, 2rem);
    margin-bottom: 1.25rem;
    min-width: 0;
}

.content-card h1 {
    margin: 0.4rem 0 0.75rem;
    color: var(--navy);
    font-size: clamp(1.7rem, 4vw, 2.4rem);
    font-weight: 750;
}

.content-card h2 {
    color: var(--navy);
    font-size: clamp(1.25rem, 3vw, 1.6rem);
}

.question-card {
    margin: 1.25rem 0;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    min-width: 0;
}

.question-card legend {
    float: none;
    width: auto;
    max-width: 100%;
    padding: 0 0.2rem;
    color: var(--navy);
    font-weight: 700;
    font-size: 1rem;
}

.answer-option {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    padding: 0.7rem;
    margin: 0.35rem 0;
    background: #f7fafc;
    border: 1px solid transparent;
    border-radius: 8px;
    cursor: pointer;
}

.answer-option:hover {
    background: var(--pale-blue);
    border-color: #b7d8f0;
}

.answer-option input {
    margin-top: 0.25rem;
    flex: 0 0 auto;
}

.score-panel {
    text-align: center;
    padding: 2rem 1rem;
    background: var(--pale-blue);
    border-radius: 14px;
}

.score-number {
    font-size: clamp(3rem, 10vw, 5rem);
    font-weight: 800;
    color: var(--blue);
    line-height: 1.1;
    margin: 1rem 0;
}

.rating-options {
    display: flex;
    gap: 0.75rem;
    margin: 1rem 0 0.5rem;
}

.rating-choice {
    cursor: pointer;
}

.rating-choice input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.rating-choice span {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 1px solid var(--border);
    border-radius: 50%;
    background: #fff;
    font-weight: 700;
}

.rating-choice input:checked + span {
    color: #fff;
    background: var(--blue);
    border-color: var(--blue);
}

.rating-choice input:focus-visible + span {
    outline: 3px solid #8cc8f2;
    outline-offset: 3px;
}

.chart-wrap {
    position: relative;
    width: 100%;
    height: 330px;
}

.selection-panel {
    margin-top: 1.25rem;
    padding: 1rem;
    background: #f8fafc;
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow-wrap: anywhere;
}

.selection-panel h3 {
    color: var(--navy);
    font-size: 1.1rem;
}

.table {
    margin-bottom: 0;
}

.login-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.25rem;
    background: linear-gradient(140deg, #e8f3fb, #f7f9fc 55%, #e8edf7);
}

.login-card {
    width: min(100%, 520px);
    padding: clamp(1.5rem, 5vw, 3rem);
    text-align: center;
}

.logo-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

.logo-row img {
    max-width: 120px;
    max-height: 75px;
    object-fit: contain;
}

.google-button-wrap {
    display: flex;
    justify-content: center;
    margin-top: 1.5rem;
}

.app-footer {
    padding: 1.25rem 0;
    background: var(--navy);
    color: #eaf2f8;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--blue);
    border-color: var(--blue);
}

@media (max-width: 576px) {
    .page-container {
        padding-top: 1rem;
    }

    .user-strip {
        text-align: left;
    }

    .hero-actions .btn,
    .content-card form > .btn {
        width: 100%;
    }

    .chart-wrap {
        height: 280px;
    }

    .rating-options {
        gap: 0.5rem;
    }

    .rating-choice span {
        width: 42px;
        height: 42px;
    }

    .table {
        font-size: 0.85rem;
    }
}

/* Assessment UX */
.question-step[hidden] { display: none !important; }
.answer-option { cursor: pointer; transition: border-color .15s ease, background-color .15s ease; }
.answer-option:hover { border-color: #0d6efd !important; background: #eef5ff !important; }
.answer-option:has(input:checked) { border-color: #0d6efd !important; background: #e7f1ff !important; box-shadow: 0 0 0 .1rem rgba(13,110,253,.12); }
.progress { height: .65rem; }
@media (max-width: 576px) { .hero-card .btn { width: 100%; } .display-5 { font-size: 2rem; } }


/* Two-logo responsive masthead */
.site-masthead { background:#fff; border-bottom:1px solid var(--border); }
.masthead-inner { display:flex; align-items:center; justify-content:space-between; gap:1rem; padding:.75rem 0; }
.masthead-logo { display:flex; align-items:center; justify-content:center; flex:0 0 auto; }
.masthead-logo img { width:76px; height:76px; object-fit:contain; }
.masthead-title { text-align:center; color:var(--navy); line-height:1.45; font-size:clamp(.9rem,2vw,1.25rem); }
.masthead-title small { display:block; color:var(--muted); font-size:.75rem; }
.qr-output { display:flex; justify-content:center; align-items:center; min-height:230px; }
.qr-output img, .qr-output canvas { max-width:100%; height:auto; }
.rating-choice { display:inline-flex; }
@media(max-width:576px) {
 .masthead-inner { gap:.4rem; padding:.55rem 0; }
 .masthead-logo img { width:48px; height:48px; }
 .masthead-title { font-size:.8rem; }
 .masthead-title small { font-size:.68rem; }
}
@media print {
 body { background:#fff; }
 .navbar, .app-footer, .btn, .alert, main > p { display:none !important; }
 .site-masthead { display:none !important; }
 .qr-output { min-height:230px; }
 .card { box-shadow:none !important; border:1px solid #999 !important; break-inside:avoid; }
}
