/* Variant 1: confident navy and teal on warm neutral surfaces. */
:root {
    --navy: #14324a;
    --navy-deep: #0e2436;
    --teal: #0f6e6a;
    --teal-deep: #0c5855;
    --teal-wash: #e7f4f2;
    --primary: #0f6e6a;
    --primary-hover: #0c5855;
    --secondary: #1f7a8c;
    --accent: #9a3412;
    --text-main: #1c2b33;
    --text-muted: #5c6b73;
    --bg-body: #f3efe7;
    --bg-white: #fffdf9;
    --border-light: #e3dcd1;
    --focus: #0f6e6a;
    --shadow-sm: 0 1px 2px rgba(20, 50, 74, 0.06);
    --shadow-md: 0 6px 16px rgba(20, 50, 74, 0.08);
    --shadow-lg: 0 12px 28px rgba(20, 50, 74, 0.1);
    --radius: 0.75rem;
    --transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: "Source Sans 3", "Segoe UI", sans-serif;
    background:
        radial-gradient(900px 420px at 80% -10%, rgba(15, 110, 106, 0.08), transparent 55%),
        var(--bg-body);
    color: var(--text-main);
    line-height: 1.55;
    overflow-x: hidden;
    font-size: 1.0625rem;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1 0 auto;
    width: 100%;
}

h1,
h2,
h3,
h4,
.font-heading {
    font-family: "Libre Franklin", "Source Sans 3", sans-serif;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.25;
    overflow-wrap: break-word;
}

p,
li,
label,
button,
input,
select,
textarea {
    overflow-wrap: break-word;
}

a {
    text-decoration: none;
    color: inherit;
}

ul {
    list-style: none;
}

.container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 1.25rem;
}

.hidden {
    display: none !important;
}

:focus-visible {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

/* --- Header --- */
header {
    background: rgba(255, 253, 249, 0.94);
    border-bottom: 1px solid var(--border-light);
    border-top: 3px solid var(--navy);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.65rem 0;
}

header.scrolled {
    box-shadow: var(--shadow-sm);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    position: relative;
}

.logo {
    font-family: "Libre Franklin", "Source Sans 3", sans-serif;
    font-size: 1.35rem;
    font-weight: 700;
    letter-spacing: -0.03em;
    color: var(--navy);
    display: flex;
    align-items: center;
    flex-shrink: 0;
    min-height: 44px;
}

.logo span {
    color: var(--teal);
}

.nav-toggle {
    display: none;
    margin-left: auto;
    width: 44px;
    height: 44px;
    border: 1px solid var(--border-light);
    border-radius: 0.5rem;
    background: var(--bg-white);
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 0;
}

.nav-toggle-bar {
    display: block;
    width: 18px;
    height: 2px;
    background: var(--navy);
    border-radius: 1px;
}

nav ul {
    display: flex;
    gap: 1.25rem;
    align-items: center;
}

nav ul a {
    font-weight: 600;
    color: var(--text-muted);
    font-size: 0.98rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
}

nav ul a:hover {
    color: var(--navy);
}

nav ul a.active {
    color: var(--navy);
    box-shadow: inset 0 -2px 0 var(--teal);
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.65rem 1.1rem;
    border-radius: 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
    font-family: inherit;
    gap: 0.5rem;
    min-height: 44px;
    line-height: 1.2;
    text-align: center;
}

.btn-primary {
    background: var(--teal);
    color: #fff;
    box-shadow: none;
}

.btn-primary:hover {
    background: var(--teal-deep);
}

.btn-outline {
    background: transparent;
    border: 1px solid #cfc6b8;
    color: var(--navy);
}

.btn-outline:hover {
    border-color: var(--teal);
    color: var(--teal-deep);
    background: var(--teal-wash);
}

.btn-lg {
    padding: 0.8rem 1.35rem;
    font-size: 1.05rem;
    min-height: 48px;
}

.btn-block {
    width: 100%;
}

.btn:disabled,
.donation-cta:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

a.btn {
    text-decoration: none;
}

/* --- Hero --- */
#hero {
    padding: 2.5rem 0 1.75rem;
    text-align: center;
}

.hero-content {
    max-width: 740px;
    margin: 0 auto;
}

.hero-content h1 {
    font-size: clamp(1.85rem, 4vw, 2.7rem);
    line-height: 1.15;
    margin-bottom: 0.85rem;
    letter-spacing: -0.03em;
}

.hero-content h1 span {
    color: var(--teal-deep);
}

.hero-content p {
    font-size: 1.125rem;
    color: var(--text-muted);
    margin-bottom: 1.25rem;
    max-width: 38rem;
    margin-left: auto;
    margin-right: auto;
}

.hero-content p strong,
.content-box strong,
.faq-answer strong {
    color: var(--text-main);
    font-weight: 650;
}

.hero-btns {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

/* --- Features Grid --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
    gap: 0.9rem;
    padding: 1.25rem 0 0.5rem;
}

.feature-card {
    background: var(--bg-white);
    padding: 1.15rem 1.15rem 1.2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    border-top: 3px solid var(--teal);
    box-shadow: var(--shadow-sm);
}

.icon-box {
    width: 2.5rem;
    height: 2.5rem;
    background: var(--teal-wash);
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 0.75rem;
    color: var(--teal-deep);
}

.icon-box svg {
    width: 1.35rem;
    height: 1.35rem;
}

.feature-card h3 {
    font-size: 1.05rem;
    margin-bottom: 0.4rem;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.98rem;
}

/* --- Generic Section Styles --- */
.section-head {
    text-align: center;
    max-width: 40rem;
    margin: 0.5rem auto 1rem;
}

.section-head h2 {
    font-size: clamp(1.45rem, 3vw, 1.85rem);
    margin-bottom: 0.4rem;
}

.section-head p {
    color: var(--text-muted);
    font-size: 1.05rem;
}

main > section.container {
    padding-top: 0.35rem !important;
    padding-bottom: 0.35rem !important;
}

.content-box {
    background: var(--bg-white);
    padding: 1.35rem 1.35rem 1.2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    margin-bottom: 0.9rem;
}

.content-box h2 {
    font-size: clamp(1.3rem, 2.5vw, 1.6rem);
}

.content-box p,
.faq-answer p {
    margin-bottom: 0.75rem;
}

.content-box p:last-child,
.faq-answer p:last-child {
    margin-bottom: 0;
}

.content-box a,
.faq-answer a,
main p a {
    color: var(--teal-deep);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.content-box ul[style*="disc"],
main ul[style*="disc"] {
    margin-bottom: 0.75rem;
}

/* --- FAQ Accordion --- */
.faq-item {
    border-bottom: 1px solid var(--border-light);
}

.faq-item:last-child {
    border-bottom: none;
}

.faq-question {
    width: 100%;
    text-align: left;
    padding: 0.85rem 0;
    background: none;
    border: none;
    font-size: 1.02rem;
    font-weight: 650;
    font-family: inherit;
    color: var(--navy);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    min-height: 48px;
}

.faq-question:hover {
    color: var(--teal-deep);
}

.faq-toggle-icon {
    font-size: 1.35rem;
    font-weight: 400;
    line-height: 1;
    color: var(--teal);
    transition: transform 0.15s ease;
}

.faq-item.active .faq-toggle-icon {
    transform: rotate(45deg);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.2s ease-out;
    color: var(--text-muted);
}

.faq-answer p {
    padding-bottom: 0.9rem;
}

/* --- Pricing --- */
#pricing {
    padding: 0.5rem 0 1.5rem;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
    gap: 0.9rem;
    max-width: 820px;
    margin: 0 auto;
}

.pricing-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 1.25rem 1.2rem 1.3rem;
    border: 1px solid var(--border-light);
    text-align: center;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.pricing-card.featured {
    border-color: var(--navy);
    box-shadow: var(--shadow-md);
}

.badge {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: var(--navy);
    color: white;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.price {
    font-family: "Libre Franklin", "Source Sans 3", sans-serif;
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--navy);
    margin: 0.75rem 0;
    line-height: 1.1;
}

.price span {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
}

.features-list {
    text-align: left;
    margin: 0.85rem 0 1rem;
}

.features-list li {
    padding: 0.35rem 0 0.35rem 1rem;
    color: var(--text-muted);
    position: relative;
}

.features-list li::before {
    content: "";
    width: 0.4rem;
    height: 0.4rem;
    border-radius: 50%;
    background: var(--teal);
    position: absolute;
    left: 0;
    top: 0.7rem;
}

/* --- Footer --- */
footer {
    background: var(--navy-deep);
    color: #f6f3ee;
    padding: 2rem 0 1.25rem;
    margin-top: 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
    gap: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
}

.footer-col h4 {
    color: #fff;
    margin-bottom: 0.65rem;
    font-size: 0.95rem;
}

.footer-col ul li {
    margin-bottom: 0.35rem;
}

.footer-col ul a {
    color: #d5ddd8;
    font-size: 0.95rem;
    display: inline-flex;
    min-height: 32px;
    align-items: center;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.footer-col ul a:hover {
    color: #fff;
}

.footer-col p {
    color: #d5ddd8 !important;
    font-size: 0.95rem !important;
    line-height: 1.5;
}

.footer-disclaimer {
    border-top: 1px solid rgba(255, 255, 255, 0.12);
    padding-top: 1rem;
    color: #c9d3ce;
    font-size: 0.875rem;
    text-align: left;
    line-height: 1.55;
}

/* --- Legacy test card (unused hidden block on the homepage) --- */
.test-card {
    background: var(--bg-white);
    max-width: 800px;
    margin: 1.5rem auto;
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

.progress-container {
    background: #efeae2;
    height: 0.45rem;
    border-radius: 1rem;
    margin-top: 1rem;
    overflow: hidden;
}

#progress {
    background: var(--teal);
    height: 100%;
    width: 0;
    transition: width 0.2s ease;
}

.option-btn {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid var(--border-light);
    background: white;
    border-radius: 0.5rem;
    text-align: left;
    font-size: 1rem;
    cursor: pointer;
    color: var(--text-main);
    min-height: 48px;
}

.option-btn:hover {
    border-color: var(--teal);
    background: var(--teal-wash);
}

.loader {
    width: 2.5rem;
    height: 2.5rem;
    border: 3px solid var(--border-light);
    border-top-color: var(--teal);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-bottom: 1rem;
}

/* --- Research (unused classes kept) --- */
#research {
    background: transparent;
    padding: 1.5rem 0;
}

.research-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    align-items: center;
}

.research-content h2 {
    font-size: 1.7rem;
    margin-bottom: 0.75rem;
}

.research-content p {
    color: var(--text-muted);
    margin-bottom: 0.75rem;
}

.research-stat {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

.stat-item h4 {
    font-size: 1.8rem;
    color: var(--teal);
    line-height: 1;
    margin-bottom: 0.35rem;
}

.image-canvas {
    background: linear-gradient(135deg, #e7f4f2 0%, #e7e1d6 100%);
    border-radius: var(--radius);
    height: 280px;
    width: 100%;
}

.location-tag {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    background: var(--bg-white);
    padding: 0.5rem 0.8rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
}

/* --- Popup Overlay --- */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(14, 36, 54, 0.62);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 1rem;
    overflow-y: auto;
}

.popup-card {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 1.5rem 1.35rem 1.35rem;
    max-width: 480px;
    width: 100%;
    max-height: min(88vh, 720px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    text-align: center;
    position: relative;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    animation: popupIn 0.2s ease;
}

@keyframes popupIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.popup-close {
    position: absolute;
    top: 0.55rem;
    right: 0.55rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.5rem;
    font-family: inherit;
}

.popup-close:hover {
    color: var(--navy);
    background: #f3efe7;
}

.popup-icon {
    width: 3rem;
    height: 3rem;
    background: var(--teal-wash);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.85rem;
    color: var(--teal-deep);
}

.popup-icon svg {
    width: 1.5rem;
    height: 1.5rem;
}

.popup-card h2 {
    font-size: 1.35rem;
    margin-bottom: 0.5rem;
}

.popup-card p {
    color: var(--text-muted);
    line-height: 1.55;
}

/* --- Donation Popup --- */
.donation-preview-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 4000;
    background: var(--navy);
    color: #f6f3ee;
    text-align: center;
    font-size: 0.85rem;
    padding: 0.55rem 1rem;
}

.donation-popup-card {
    max-width: 440px;
    padding: 1.35rem 1.2rem 1.15rem;
    text-align: left;
    max-height: min(92vh, 860px);
}

.donation-popup-icon {
    width: 2.5rem;
    height: 2.5rem;
    margin-bottom: 0.65rem;
    background: #f8ebe3;
    color: #9a3412;
}

.donation-popup-icon svg {
    width: 1.25rem;
    height: 1.25rem;
}

.donation-popup-card h2 {
    font-size: 1.25rem;
    margin-bottom: 0.4rem;
}

.donation-lead {
    margin-bottom: 0.75rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.donation-perks {
    list-style: none;
    margin: 0 0 0.9rem;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.donation-perks li {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    font-size: 0.92rem;
    color: var(--text-main);
    line-height: 1.4;
}

.donation-perk-check {
    flex-shrink: 0;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 50%;
    background: var(--teal-wash);
    color: var(--teal-deep);
    font-size: 0.68rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 0.12rem;
}

.donation-cta {
    width: 100%;
}

.donation-custom {
    margin-top: 0.55rem;
    text-align: center;
}

.donation-custom-toggle {
    background: none;
    border: none;
    padding: 0.35rem;
    font-size: 0.9rem;
    color: var(--teal-deep);
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 2px;
    font-family: inherit;
    min-height: 44px;
}

.donation-custom-form {
    margin-top: 0.35rem;
}

.donation-custom-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    max-width: 280px;
    margin: 0 auto;
}

.donation-currency {
    font-weight: 700;
    color: var(--navy);
    font-size: 1.05rem;
}

.donation-custom-row input,
.contact-form input,
.contact-form select,
.contact-form textarea {
    width: 100%;
    min-width: 0;
    padding: 0.65rem 0.75rem;
    border: 1px solid #cfc6b8;
    border-radius: 0.5rem;
    font-size: 1rem;
    font-family: inherit;
    color: var(--text-main);
    background: #fff;
    min-height: 44px;
}

.contact-form textarea {
    min-height: 8rem;
    resize: vertical;
}

.donation-custom-row input {
    flex: 1;
    width: auto;
}

.donation-custom-row input:focus,
.contact-form input:focus,
.contact-form select:focus,
.contact-form textarea:focus {
    outline: 3px solid var(--focus);
    outline-offset: 1px;
    border-color: var(--teal);
}

.donation-custom-row .btn {
    padding: 0.6rem 0.9rem;
    flex-shrink: 0;
}

.donation-custom-hint {
    margin-top: 0.35rem;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.donation-custom-error,
.donation-pay-error {
    margin-top: 0.35rem;
    font-size: 0.85rem;
    color: #9f1239;
}

.donation-payment-icons {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    flex-wrap: wrap;
    margin-top: 0.9rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-light);
}

.donation-pay-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 2rem;
    padding: 0 0.5rem;
    background: #fff;
    border: 1px solid var(--border-light);
    border-radius: 0.35rem;
}

.donation-pay-badge svg {
    height: 1rem;
    width: auto;
    display: block;
}

.donation-secure-note {
    margin-top: 0.5rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.donation-popup-card.is-checkout {
    max-width: 480px;
    max-height: min(94vh, 860px);
}

.donation-checkout {
    margin-top: 0.25rem;
}

#donation-payment-element {
    margin: 0.65rem 0 0.85rem;
}

.donation-processing {
    text-align: center;
    padding: 0.15rem 0;
}

.donation-processing h2 {
    margin-bottom: 0.4rem;
}

.donation-processing p {
    margin-bottom: 0.85rem;
}

/* --- Contact --- */
.contact-form .form-field {
    margin-bottom: 0.9rem;
}

.contact-form label {
    display: block;
    margin-bottom: 0.35rem;
    font-weight: 650;
    color: var(--navy);
}

.contact-honeypot {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.contact-notice {
    margin-top: 0.85rem;
    padding: 0.7rem 0.85rem;
    border-radius: 0.5rem;
    font-size: 0.95rem;
}

.contact-notice.ok {
    background: #e7f4f2;
    color: #0c5855;
}

.contact-notice.bad {
    background: #fde8e8;
    color: #9f1239;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --- Quiz --- */
.test-container {
    max-width: 720px;
    margin: 0 auto;
    padding: 1rem 1rem 2rem;
}

.test-instructions,
.question-card,
.results-container {
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 1.15rem 1.1rem 1.2rem;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
}

.test-instructions h2,
.results-container h2 {
    margin-bottom: 0.85rem;
    font-size: 1.45rem;
}

.test-warning {
    background: #fbf3e4;
    padding: 0.75rem 0.85rem;
    border-radius: 0.5rem;
    margin-bottom: 0.9rem;
    border-left: 4px solid #b45309;
}

.test-warning p {
    margin: 0;
    font-weight: 650;
    color: #7c2d12;
}

.test-points {
    line-height: 1.55;
    color: var(--text-muted);
    margin: 0 0 1rem 1.1rem;
    list-style: disc;
}

.test-points li {
    margin: 0.35rem 0;
}

.test-points strong {
    color: var(--text-main);
}

.test-instructions .btn {
    width: 100%;
}

.quiz-toolbar {
    position: sticky;
    top: 3.6rem;
    z-index: 30;
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 0.65rem 0.7rem 0.7rem;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-sm);
}

.timer-display {
    position: static;
    background: var(--navy);
    color: #fff;
    padding: 0.45rem 0.7rem;
    border-radius: 0.45rem;
    font-weight: 650;
    font-size: 0.98rem;
    margin: 0 0 0.55rem;
    letter-spacing: 0.01em;
}

.timer-warning {
    background: #9f1239;
}

.progress-bar {
    height: 8px;
    background: #efeae2;
    border-radius: 999px;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--teal);
    width: 0;
    transition: width 0.2s ease;
}

fieldset.question-card {
    margin: 0;
    min-width: 0;
    max-width: 100%;
    display: flex;
    flex-direction: column;
}

.question-card legend {
    padding: 0;
    margin: 0 0 0.15rem;
    float: none;
}

.question-number {
    color: var(--teal-deep);
    font-weight: 700;
    margin-bottom: 0.35rem;
    font-size: 0.82rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    display: block;
}

.question-text {
    font-family: "Libre Franklin", "Source Sans 3", sans-serif;
    font-size: 1.15rem;
    font-weight: 650;
    margin-bottom: 0.85rem;
    color: var(--navy);
    display: block;
    padding: 0;
}

.question-card legend {
    width: 100%;
}

.options-list {
    display: grid;
    gap: 0.5rem;
}

.option-item {
    display: flex;
    align-items: center;
    gap: 0.7rem;
    padding: 0.7rem 0.8rem;
    border: 2px solid var(--border-light);
    border-radius: 0.55rem;
    cursor: pointer;
    background: #fff;
    min-height: 48px;
    color: var(--text-main);
    font-size: 1.02rem;
}

.option-item input {
    width: 1.15rem;
    height: 1.15rem;
    accent-color: var(--teal);
    flex-shrink: 0;
    margin: 0;
}

.option-item:hover {
    border-color: var(--teal);
    background: #f8fbfb;
}

.option-item.selected {
    border-color: var(--teal);
    background: var(--teal-wash);
}

.option-item:focus-within {
    outline: 3px solid var(--focus);
    outline-offset: 2px;
}

.quiz-nav {
    display: flex;
    gap: 0.6rem;
    margin-top: 0.75rem;
}

.quiz-nav .btn {
    flex: 1;
}

#submit-test-btn {
    width: 100%;
    margin-top: 0.6rem;
    display: none;
}

.results-actions {
    margin-top: 1rem;
    padding-top: 0.9rem;
    border-top: 1px solid var(--border-light);
}

.results-container > p {
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.results-container .btn {
    width: 100%;
}

.score-summary {
    background: var(--teal-wash);
    padding: 1rem 1rem 1.05rem;
    border-radius: var(--radius);
    margin-bottom: 1rem;
    text-align: center;
    border: 1px solid #cfe4e1;
}

.score-summary h3 {
    margin-bottom: 0.35rem;
    font-size: 1.05rem;
}

.score-fraction {
    font-size: clamp(1.8rem, 6vw, 2.4rem);
    font-weight: 700;
    color: var(--teal-deep);
    font-family: "Libre Franklin", "Source Sans 3", sans-serif;
}

.score-percent {
    color: var(--text-muted);
    margin-top: 0.25rem;
    margin-bottom: 0.85rem;
}

.score-iq {
    border-top: 2px solid var(--border-light);
    padding-top: 0.85rem;
}

.score-iq-value {
    font-size: clamp(2.2rem, 8vw, 2.8rem);
    font-weight: 700;
    color: var(--navy);
    font-family: "Libre Franklin", "Source Sans 3", sans-serif;
    margin: 0.15rem 0;
}

.answer-item {
    padding: 0.75rem 0.8rem;
    margin-bottom: 0.55rem;
    border-radius: 0.5rem;
    border-left: 4px solid var(--border-light);
    background: #fff;
}

.answer-item.correct {
    border-left-color: #0f766e;
    background: #f3faf8;
}

.answer-item.incorrect {
    border-left-color: #be123c;
    background: #fff5f6;
}

.answer-item .answer-q {
    font-weight: 650;
    margin-bottom: 0.35rem;
    color: var(--navy);
}

.spinner-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.9rem;
    background: var(--bg-white);
    border-radius: var(--radius);
    padding: 1.75rem 1.5rem;
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-light);
    animation: popupIn 0.2s ease;
}

.spinner-ring {
    width: 2.75rem;
    height: 2.75rem;
    border: 4px solid var(--border-light);
    border-top-color: var(--teal);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.spinner-text {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
}

@media (max-width: 860px) {
    .nav-toggle {
        display: inline-flex;
    }

    nav ul {
        display: none;
        position: absolute;
        top: calc(100% + 0.55rem);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0.15rem;
        background: var(--bg-white);
        border: 1px solid var(--border-light);
        border-radius: var(--radius);
        padding: 0.4rem;
        box-shadow: var(--shadow-md);
    }

    nav ul.is-open {
        display: flex;
    }

    nav ul a {
        padding: 0 0.65rem;
        border-radius: 0.4rem;
    }

    nav ul a.active {
        box-shadow: none;
        background: var(--teal-wash);
    }

    nav ul .btn,
    nav ul a.btn {
        width: 100%;
    }
}

@media (max-width: 640px) {
    #hero {
        text-align: left;
        padding: 1.35rem 0 1rem;
    }

    .hero-content p {
        margin-left: 0;
        margin-right: 0;
    }

    .hero-btns {
        flex-direction: column;
        align-items: stretch;
    }

    .content-box {
        padding: 1rem 0.9rem;
    }

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

@media (max-width: 390px) {
    .container,
    .test-container {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
    }

    .quiz-nav {
        flex-direction: column;
    }

    .popup-overlay {
        padding: 0.6rem;
    }

    .donation-popup-card,
    .popup-card {
        padding: 1.15rem 0.9rem 1rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }

    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
    }
}
