:root {
    --ivory: #f4efe4;
    --ivory-deep: #e7dfd0;
    --paper: #fbf8f2;
    --indigo: #1c2744;
    --indigo-deep: #141c33;
    --teal: #1a6b64;
    --teal-deep: #124e49;
    --teal-soft: #e5f2f0;
    --ink: #1c2433;
    --muted: #5c6573;
    --line: #ddd4c4;
    --warn: #8c3a32;
    --ok: #1f7a4d;
    --primary: #1a6b64;
    --primary-hover: #124e49;
    --secondary: #1c2744;
    --accent: #2f8f86;
    --text-main: #1c2433;
    --text-muted: #5c6573;
    --bg-body: #f4efe4;
    --bg-white: #fbf8f2;
    --border-light: #ddd4c4;
    --shadow-sm: 0 1px 2px rgba(28, 39, 68, 0.04);
    --shadow-md: 0 12px 32px rgba(28, 39, 68, 0.06);
    --shadow-lg: 0 18px 44px rgba(28, 39, 68, 0.08);
    --radius: 0.9rem;
    --transition: 0.2s ease;
    --font-serif: "Source Serif 4", "Iowan Old Style", Palatino, "Palatino Linotype", serif;
    --font-sans: "Source Sans 3", "Segoe UI", sans-serif;
    --measure: 42rem;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    font-size: 1.0625rem;
    background-color: var(--ivory);
    color: var(--ink);
    line-height: 1.7;
    overflow-x: hidden;
}

::selection {
    background: #c9e3df;
    color: var(--indigo);
}

h1,
h2,
h3,
h4,
.font-heading {
    font-family: var(--font-serif);
    font-weight: 560;
    letter-spacing: -0.018em;
    color: var(--indigo);
    line-height: 1.2;
}

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

ul {
    list-style: none;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    padding: 0 1.5rem;
}

.hidden {
    display: none !important;
}

/* --- Header --- */
header {
    background: rgba(251, 248, 242, 0.94);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
    box-shadow: inset 0 3px 0 var(--indigo);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 0.85rem 0;
}

header.scrolled {
    box-shadow: inset 0 3px 0 var(--teal), 0 8px 24px rgba(28, 39, 68, 0.05);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
}

.logo {
    font-family: var(--font-serif);
    font-size: 1.7rem;
    font-weight: 600;
    letter-spacing: -0.03em;
    color: var(--indigo);
    display: flex;
    align-items: center;
    line-height: 1;
}

.logo span {
    color: var(--teal);
    font-style: italic;
    font-weight: 560;
}

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

nav ul a {
    font-weight: 560;
    font-size: 0.98rem;
    color: var(--indigo);
    letter-spacing: 0.01em;
    transition: color var(--transition);
}

nav ul a:hover,
nav ul a.active {
    color: var(--teal);
}

nav ul a:focus-visible,
.logo:focus-visible {
    outline: 3px solid var(--teal);
    outline-offset: 3px;
    border-radius: 4px;
}

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

.nav-toggle {
    display: none;
}

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.35rem;
    border-radius: 999px;
    font-family: var(--font-sans);
    font-weight: 600;
    cursor: pointer;
    transition: background var(--transition), color var(--transition), border-color var(--transition);
    border: 1px solid transparent;
    font-size: 1rem;
    gap: 0.5rem;
    line-height: 1.2;
    text-align: center;
}

.btn:focus-visible {
    outline: 3px solid var(--teal);
    outline-offset: 3px;
}

.btn-primary {
    background: var(--indigo);
    color: #f7f3ea;
}

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

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

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

.btn-lg {
    padding: 0.95rem 1.6rem;
    font-size: 1.05rem;
}

.btn-block {
    width: 100%;
}

.btn:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

/* --- Hero --- */
#hero {
    padding: 4.25rem 0 3.25rem;
    text-align: left;
    background:
        radial-gradient(ellipse at 100% 0%, rgba(26, 107, 100, 0.08), transparent 42%),
        var(--ivory);
    border-bottom: 1px solid var(--line);
}

.hero-content {
    max-width: 46rem;
    margin: 0;
}

.hero-content h1 {
    font-size: clamp(2.45rem, 5vw, 4.15rem);
    line-height: 1.08;
    margin-bottom: 1.15rem;
    color: var(--indigo);
}

.hero-content h1 span {
    color: var(--teal);
    font-style: italic;
    font-weight: 560;
    background: none;
    -webkit-text-fill-color: currentColor;
}

.hero-content p {
    font-size: 1.2rem;
    color: var(--muted);
    margin-bottom: 1.75rem;
    max-width: var(--measure);
}

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

/* --- Features --- */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.25rem;
    padding: 2.5rem 0 1rem;
}

.feature-card {
    background: var(--paper);
    padding: 1.6rem 1.5rem 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    border-top: 3px solid var(--teal);
    box-shadow: var(--shadow-sm);
}

.icon-box {
    width: 2.75rem;
    height: 2.75rem;
    background: var(--teal-soft);
    border-radius: 0.7rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    color: var(--teal-deep);
}

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

.feature-card h3 {
    font-size: 1.35rem;
    margin-bottom: 0.45rem;
}

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

/* --- Sections --- */
.section-head {
    text-align: left;
    max-width: var(--measure);
    margin: 2.5rem 0 0.5rem;
}

.section-head h2 {
    font-size: clamp(1.9rem, 3vw, 2.55rem);
    margin-bottom: 0.55rem;
}

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

.content-box {
    background: var(--paper);
    padding: 2.25rem 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-sm);
    margin: 1.5rem 0 2rem;
}

.content-box h2 {
    font-size: clamp(1.7rem, 2.5vw, 2.15rem);
    margin-bottom: 0.85rem;
}

.content-box p {
    max-width: 68ch;
}

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

.content-box a:hover,
.faq-answer a:hover {
    color: var(--indigo);
}

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

.faq-question {
    width: 100%;
    text-align: left;
    padding: 1.05rem 0;
    background: none;
    border: none;
    font-family: var(--font-serif);
    font-size: 1.2rem;
    font-weight: 560;
    color: var(--indigo);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    line-height: 1.35;
}

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

.faq-question:focus-visible {
    outline: 3px solid var(--teal);
    outline-offset: 3px;
}

.faq-toggle-icon {
    font-family: var(--font-sans);
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--teal);
    transition: transform 0.2s ease;
    flex-shrink: 0;
}

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

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

.faq-answer p {
    padding-bottom: 1.15rem;
    max-width: 72ch;
}

/* --- Pricing --- */
#methodology,
#pricing,
#faq,
#scores,
#features,
#hero,
#test-section {
    scroll-margin-top: 5.25rem;
}

#pricing {
    padding-bottom: 1rem;
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.25rem;
    max-width: 860px;
    margin: 1rem 0 0;
}

.pricing-card {
    background: var(--paper);
    border-radius: var(--radius);
    padding: 2rem 1.6rem 1.6rem;
    border: 1px solid var(--line);
    text-align: left;
    position: relative;
    box-shadow: var(--shadow-sm);
}

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

.badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--teal);
    color: #f7f3ea;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-family: var(--font-sans);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.price {
    font-family: var(--font-serif);
    font-size: 2.75rem;
    font-weight: 560;
    color: var(--indigo);
    margin: 0.75rem 0;
    line-height: 1;
}

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

.features-list {
    text-align: left;
    margin: 1.25rem 0 1.5rem;
}

.features-list li {
    padding: 0.4rem 0 0.4rem 1.15rem;
    color: var(--muted);
    position: relative;
}

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

.features-list li svg {
    color: var(--teal);
    width: 1.25rem;
    height: 1.25rem;
}

/* --- Footer --- */
footer {
    background: var(--indigo);
    color: #f4efe4;
    padding: 3.5rem 0 2rem;
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-bottom: 2.25rem;
}

.footer-col h4 {
    color: #fbf8f2;
    margin-bottom: 0.9rem;
    font-size: 1.15rem;
}

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

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

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

.footer-col p {
    color: #d9d2c4 !important;
    font-size: 0.98rem !important;
    line-height: 1.6;
}

.footer-disclaimer {
    border-top: 1px solid rgba(244, 239, 228, 0.16);
    padding-top: 1.5rem;
    color: #c9c1b2;
    font-size: 0.92rem;
    text-align: left;
    max-width: 78ch;
}

.footer-col a:focus-visible,
.footer-disclaimer a:focus-visible {
    outline: 3px solid #8fd0c8;
    outline-offset: 3px;
}

/* --- Legacy homepage test shell --- */
.test-card {
    background: var(--paper);
    max-width: 760px;
    margin: 2rem auto;
    padding: 2rem 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--line);
    box-shadow: var(--shadow-md);
}

.progress-container {
    background: var(--ivory-deep);
    height: 0.55rem;
    border-radius: 999px;
    margin-top: 1.5rem;
    overflow: hidden;
}

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

.option-btn {
    width: 100%;
    padding: 1rem;
    border: 1.5px solid var(--line);
    background: var(--paper);
    border-radius: 0.75rem;
    text-align: left;
    font-size: 1rem;
    font-family: var(--font-sans);
    cursor: pointer;
    color: var(--ink);
}

.option-btn:hover,
.option-btn:focus-visible {
    border-color: var(--teal);
    outline: 3px solid var(--teal);
    outline-offset: 2px;
}

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

#processing-screen {
    background: var(--ivory) !important;
    color: var(--ink);
}

#processing-screen h2 {
    margin-top: 0.5rem;
}

/* --- Quiz --- */
.test-container {
    max-width: 740px;
    margin: 0 auto;
    padding: 1.75rem 1.25rem 4.5rem;
}

.test-instructions {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.75rem 1.5rem 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.test-instructions h2 {
    font-size: clamp(1.8rem, 3vw, 2.3rem);
}

.test-instructions ul {
    list-style: disc;
    padding-left: 1.2rem;
    max-width: 62ch;
}

.test-instructions li {
    margin: 0.2rem 0;
}

.test-instructions > div {
    background: #f3e6c8 !important;
    border-left: 4px solid #8c6a2f !important;
    border-radius: 0.6rem !important;
}

.test-instructions > div p {
    color: #5c4314 !important;
}

.quiz-toolbar {
    position: sticky;
    top: 4.75rem;
    z-index: 30;
    display: grid;
    gap: 0.55rem;
    background: rgba(251, 248, 242, 0.94);
    backdrop-filter: blur(10px);
    border: 1px solid var(--line);
    border-radius: 0.9rem;
    padding: 0.75rem 0.9rem 0.85rem;
    margin-bottom: 1rem;
}

.timer-display {
    position: static;
    top: auto;
    right: auto;
    background: transparent;
    color: var(--indigo);
    padding: 0;
    border-radius: 0;
    font-weight: 650;
    font-size: 0.98rem;
    letter-spacing: 0.01em;
    font-variant-numeric: tabular-nums;
    box-shadow: none;
    z-index: 1;
}

.timer-warning {
    color: var(--warn);
    background: transparent;
}

.progress-bar {
    height: 0.55rem;
    background: var(--ivory-deep);
    border-radius: 999px;
    margin: 0;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: var(--teal);
    border-radius: inherit;
    transition: width 0.25s ease;
}

.question-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.5rem 1.35rem 1.35rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

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

.question-text {
    font-family: var(--font-serif);
    font-size: clamp(1.35rem, 2.4vw, 1.85rem);
    font-weight: 560;
    line-height: 1.3;
    letter-spacing: -0.015em;
    margin-bottom: 1.25rem;
    color: var(--indigo);
}

.question-text:focus {
    outline: none;
}

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

.option-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    width: 100%;
    min-height: 3.35rem;
    padding: 0.9rem 1rem;
    border: 1.5px solid var(--line);
    border-radius: 0.8rem;
    cursor: pointer;
    background: #fffdf8;
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 1.0625rem;
    font-weight: 500;
    line-height: 1.4;
    text-align: left;
    transition: border-color var(--transition), background var(--transition);
}

.option-item::before {
    content: "";
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 50%;
    border: 2px solid #8d97a6;
    flex: 0 0 1.15rem;
    background: #fff;
}

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

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

.option-item.selected {
    border-color: var(--teal);
    background: var(--teal-soft);
    color: var(--indigo);
    box-shadow: inset 0 0 0 1px var(--teal);
}

.option-item.selected::before {
    border-color: var(--teal-deep);
    background:
        radial-gradient(circle at center, var(--teal) 0 5px, transparent 5.5px),
        #fff;
}

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

.results-container {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    padding: 1.6rem 1.35rem 1.4rem;
    box-shadow: var(--shadow-sm);
}

#answers-container > div:first-child {
    background: var(--teal-soft) !important;
    border: 1px solid #c5e0db;
}

.answer-item {
    padding: 0.95rem 1rem;
    margin-bottom: 0.75rem;
    border-radius: 0.75rem;
    border: 1px solid var(--line);
    border-left: 4px solid var(--line);
    background: #fffdf8;
}

.answer-item.correct {
    border-left-color: var(--ok);
    background: #eef7f1;
}

.answer-item.incorrect {
    border-left-color: var(--warn);
    background: #fbf1ef;
}

.spinner-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.1rem;
    background: var(--paper);
    border-radius: var(--radius);
    padding: 2.4rem 2rem;
    border: 1px solid var(--line);
    box-shadow: var(--shadow-lg);
    animation: popupIn 0.3s ease;
}

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

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

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

/* --- Research (legacy hooks) --- */
#research {
    background: var(--ivory);
    padding: 4rem 0;
    margin-top: 2rem;
}

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

.research-content h2 {
    font-size: 2.3rem;
    margin-bottom: 1rem;
}

.research-content p {
    color: var(--muted);
    font-size: 1.08rem;
    margin-bottom: 1rem;
}

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

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

.stat-item span {
    color: var(--muted);
    font-size: 0.95rem;
}

.image-canvas {
    background: linear-gradient(160deg, #e5f2f0 0%, #e7dfd0 100%);
    border-radius: 1.25rem;
    height: 360px;
    width: 100%;
    position: relative;
    overflow: hidden;
    border: 1px solid var(--line);
}

.location-tag {
    position: absolute;
    bottom: 1.25rem;
    left: 1.25rem;
    background: rgba(251, 248, 242, 0.94);
    padding: 0.6rem 0.95rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.9rem;
    border: 1px solid var(--line);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* --- Popups --- */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(20, 28, 51, 0.78);
    backdrop-filter: blur(3px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 3000;
    padding: 1.25rem;
    overflow-y: auto;
}

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

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

.popup-close {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--muted);
    width: 2.5rem;
    height: 2.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.popup-close:hover {
    color: var(--indigo);
    background: var(--ivory-deep);
}

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

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

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

.popup-card h2 {
    font-size: 1.65rem;
    margin-bottom: 0.55rem;
}

.popup-card p,
.donation-lead,
.donation-perks li {
    color: #2f3a48;
    line-height: 1.65;
}

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

.donation-popup-card {
    max-width: 460px;
    padding: 1.6rem 1.45rem 1.3rem;
    text-align: left;
    max-height: min(92vh, 860px);
}

.donation-popup-icon {
    width: 2.8rem;
    height: 2.8rem;
    margin-bottom: 0.75rem;
    background: var(--teal-soft);
    color: var(--teal-deep);
}

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

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

.donation-lead {
    margin-bottom: 0.85rem;
    font-size: 0.98rem;
    line-height: 1.55;
}

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

.donation-perks li {
    display: flex;
    align-items: flex-start;
    gap: 0.55rem;
    font-size: 0.95rem;
    color: var(--ink);
    line-height: 1.4;
}

.donation-perk-check {
    flex-shrink: 0;
    width: 1.15rem;
    height: 1.15rem;
    border-radius: 50%;
    background: var(--teal-soft);
    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.65rem;
    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;
}

.donation-custom-toggle:hover {
    color: var(--indigo);
}

.donation-custom-toggle:focus-visible {
    outline: 3px solid var(--teal);
    outline-offset: 3px;
}

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

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

.donation-currency {
    font-weight: 650;
    color: var(--indigo);
    font-size: 1.15rem;
}

.donation-custom-row input,
.contact-form input,
.contact-form select,
.contact-form textarea {
    font-family: var(--font-sans);
    font-size: 1rem;
    color: var(--ink);
    background: #fffdf8;
}

.donation-custom-row input {
    flex: 1;
    min-width: 0;
    padding: 0.65rem 0.75rem;
    border: 1px solid var(--line);
    border-radius: 0.6rem;
}

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

.donation-custom-row .btn {
    padding: 0.65rem 0.95rem;
    flex-shrink: 0;
}

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

.donation-custom-error,
.donation-pay-error {
    margin-top: 0.35rem;
    font-size: 0.85rem;
    color: var(--warn);
}

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

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

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

.donation-secure-note {
    margin-top: 0.55rem;
    text-align: center;
    font-size: 0.8rem;
    color: var(--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.75rem 0 1rem;
}

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

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

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

.donation-cta:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

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

.contact-notice {
    margin-top: 1rem;
    padding: 0.75rem 1rem;
    border-radius: 0.6rem;
    font-size: 0.98rem;
}

.contact-notice.ok {
    background: #eef7f1;
    color: #145c38;
}

.contact-notice.bad {
    background: #fbf1ef;
    color: #6e2e28;
}

#contact-submit-btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.contact-form label {
    font-family: var(--font-sans);
    color: var(--indigo);
}

.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;
}

@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2.25rem;
    }

    .nav-toggle {
        display: inline-flex;
        flex-direction: column;
        justify-content: center;
        gap: 5px;
        width: 44px;
        height: 44px;
        border: 1px solid var(--line);
        background: var(--paper);
        border-radius: 10px;
        margin-left: auto;
        cursor: pointer;
    }

    .nav-toggle span {
        display: block;
        height: 2px;
        width: 18px;
        background: var(--indigo);
        margin: 0 auto;
        border-radius: 1px;
    }

    .nav-toggle-input:focus-visible + .nav-toggle {
        outline: 3px solid var(--teal);
        outline-offset: 3px;
    }

    nav ul {
        display: none;
        flex-direction: column;
        align-items: stretch;
        width: 100%;
        gap: 0.15rem;
        padding: 0.35rem 0 0.15rem;
        border-top: 1px solid var(--line);
    }

    .nav-toggle-input:checked ~ ul {
        display: flex;
    }

    nav ul a,
    nav ul .btn {
        padding: 0.7rem 0.15rem;
        width: 100%;
    }

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

    .content-box {
        padding: 1.35rem 1.1rem;
    }

    .quiz-nav {
        position: sticky;
        bottom: 0;
        background: rgba(251, 248, 242, 0.96);
        padding: 0.7rem 0 0.2rem;
        border-top: 1px solid var(--line);
        z-index: 25;
    }

    .timer-display {
        position: static;
        margin: 0;
    }
}

@media (min-width: 769px) {
    .nav-toggle,
    .nav-toggle-input {
        display: none !important;
    }

    nav ul {
        display: flex !important;
    }
}

@media (max-width: 480px) {
    .popup-overlay {
        padding: 0.75rem;
    }

    .popup-card {
        max-height: min(94vh, 720px);
    }

    .donation-popup-card {
        padding: 1.35rem 1.1rem 1.1rem;
    }

    .hero-btns,
    .quiz-nav {
        flex-direction: column;
    }

    .hero-btns .btn,
    .quiz-nav .btn {
        width: 100%;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation: none !important;
        transition: none !important;
        scroll-behavior: auto !important;
    }
}
