:root {
    color-scheme: dark;
    --primary-cyan: #58c4d0;
    --primary-dark: #267b87;
    --dark-bg: #10171d;
    --darker-bg: #0a1015;
    --card-bg: #121d23;
    --card-border: rgba(145, 174, 182, 0.2);
    --border-strong: rgba(145, 174, 182, 0.25);
    --text-primary: #e9f0f2;
    --text-secondary: #b2c0c5;
    --accent-purple: #a6a0bd;
    --accent-pink: #cb8c9b;
    --accent-green: #82c59d;
}

html {
    margin: 0 !important;
    padding: 0 !important;
    scroll-behavior: smooth;
}

body {
    margin: 0 !important;
    padding: 0 !important;
    color: var(--text-primary);
    background: #0a1015;
    font-family: "Segoe UI Variable", "Aptos", "Segoe UI", sans-serif;
    line-height: 1.55;
}

body::before {
    animation: none !important;
    opacity: 0.35;
}

body > .hero {
    margin-top: 0 !important;
    padding: 2.25rem 1.5rem 1.5rem !important;
}

main,
main.container,
body > .container {
    width: min(100% - 40px, 1200px);
    max-width: 1200px;
    margin-inline: auto;
}

main:not(.container) {
    padding-top: 2.5rem;
}

main.container,
body > .container {
    padding: 2.25rem 0 3rem;
}

h1,
h2,
h3 {
    color: #e6eef0;
    text-wrap: balance;
}

h1 {
    font-size: 2.25rem !important;
    line-height: 1.2;
    font-weight: 680;
}

h2 {
    font-size: clamp(1.25rem, 2vw, 1.6rem);
    line-height: 1.3;
    font-weight: 640;
}

p,
li {
    text-wrap: pretty;
}

.eyebrow,
.donation-eyebrow {
    color: #9cb0b6 !important;
    font-size: 0.72rem !important;
    letter-spacing: 0.09em !important;
}

.site-nav__link:focus-visible,
.site-nav__resources-button:focus-visible,
.site-nav__resource-link:focus-visible,
.site-nav__button:focus-visible,
.site-nav__brand:focus-visible,
.site-nav__toggle:focus-visible,
.site-nav__user-button:focus-visible,
.site-nav .dropdown-menu-item:focus-visible,
:where(button, a, input, textarea, select, summary, [tabindex="0"]):focus-visible {
    outline: 2px solid #7dd1d9;
    outline-offset: 3px;
}

.card,
.panel,
.post,
.discussion,
.metric-card,
.improvement-card,
.timeline-card,
.initiative-card,
.phase-card,
.dual-card,
.donation-impact-card,
.feature-card,
.pricing-card,
.about-card,
.donation-form,
.donation-section {
    border: 1px solid rgba(145, 174, 182, 0.2) !important;
    border-radius: 8px !important;
    background: #121d23 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

.card,
.panel,
.metric-card,
.improvement-card,
.timeline-card,
.initiative-card,
.phase-card,
.dual-card,
.donation-impact-card,
.feature-card,
.pricing-card,
.about-card,
.donation-form {
    padding: 1.1rem !important;
}

.card h3,
.panel h2,
.post h3,
.metric-card .label,
.improvement-card h3,
.timeline-card h3,
.initiative-card h3,
.phase-card h3,
.feature-card h3,
.pricing-card h3 {
    color: #dce8ea;
}

.card p,
.panel p,
.post p,
.discussion p,
.metric-card .detail,
.improvement-card p,
.timeline-card p,
.initiative-card p,
.phase-card p {
    color: #b2c0c5;
}

.meta,
.timestamp,
.section-subtitle,
.hero p,
.lead,
.subtitle {
    color: #b2c0c5 !important;
}

.tag,
.initiative-pill,
.improvement-impact,
.hero .meta {
    border: 1px solid rgba(104, 177, 186, 0.3);
    border-radius: 4px;
    background: rgba(55, 114, 122, 0.18);
    color: #b9dfe2;
    letter-spacing: 0.015em;
    text-transform: none;
}

.panel,
.card,
.feature-card,
.pricing-card,
.donation-form {
    transition: border-color 150ms ease, background-color 150ms ease;
}

.panel:hover,
.card:hover,
.feature-card:hover,
.pricing-card:hover {
    border-color: rgba(104, 177, 186, 0.4) !important;
    transform: none;
}

table {
    color: #dce7e9;
    font-size: 0.88rem;
    font-variant-numeric: tabular-nums;
}

th,
td {
    padding: 0.65rem 0.75rem;
    border-bottom-color: rgba(145, 174, 182, 0.16) !important;
}

th {
    background: #19262c;
    color: #c0d0d4 !important;
    font-size: 0.72rem;
}

tbody tr:nth-child(even) {
    background: rgba(145, 174, 182, 0.035);
}

input,
textarea,
select {
    border-color: rgba(145, 174, 182, 0.3) !important;
    border-radius: 6px !important;
    background: #0c151a !important;
    color: #e6eef0 !important;
}

input::placeholder,
textarea::placeholder {
    color: #95a8ae;
    opacity: 1;
}

button,
.btn,
.site-nav__button {
    transition: color 140ms ease, background-color 140ms ease, border-color 140ms ease, transform 140ms ease;
}

.btn-primary,
.donation-submit,
.btn-sponsor {
    border: 1px solid #347c85 !important;
    border-radius: 6px !important;
    background: #286f79 !important;
    color: #f4fbfc !important;
    box-shadow: none !important;
}

.btn-outline,
.period-btn,
.donation-pills button {
    border: 1px solid rgba(117, 173, 181, 0.42) !important;
    border-radius: 6px !important;
    background: transparent !important;
    color: #c8dadd !important;
}

button:hover,
.btn:hover {
    box-shadow: none !important;
}

footer {
    margin-top: 2rem !important;
    padding: 1.65rem 1.5rem 1.1rem !important;
    background: #0e171c !important;
    border-top-color: rgba(145, 174, 182, 0.18) !important;
    color: #aab9be !important;
}

footer a,
.card a,
.panel a {
    color: #8ed3da;
}

footer .footer-content {
    margin-bottom: 1.15rem;
    gap: 1.25rem;
}

footer .footer-section h4 {
    margin-bottom: 0.65rem;
    color: #b9d5d8 !important;
    font-size: 0.82rem;
}

footer .footer-section ul li {
    margin-bottom: 0.4rem;
}

footer .footer-section a {
    color: #b2c0c5;
}

footer .footer-bottom {
    padding-top: 1rem;
    border-top-color: rgba(145, 174, 182, 0.12);
}

footer .legal-links {
    margin-top: 0.75rem;
    gap: 0.75rem;
}

footer .legal-links a {
    color: #a7cdd1;
    font-weight: 600;
}

.cta {
    padding: 3rem 1.5rem 2rem !important;
}

@media (max-width: 760px) {
    main,
    main.container,
    body > .container {
        width: min(100% - 28px, 1200px);
    }

    main:not(.container) {
        padding-top: 1.8rem;
    }

    main.container,
    body > .container {
        padding-top: 1.5rem;
        padding-bottom: 2rem;
    }

    h1 {
        font-size: 1.8rem !important;
    }

    .cta {
        padding: 2rem 1rem 1.5rem !important;
    }

    body > .hero {
        padding: 1.5rem 1rem 1rem !important;
    }

    .site-nav__inner {
        padding: 0.75rem 1rem;
    }

    .grid,
    .split,
    .card-grid,
    .donation-grid,
    .metrics-grid,
    .improvement-grid,
    .initiatives-grid,
    .phases-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    table {
        display: block;
        max-width: 100%;
        overflow-x: auto;
        white-space: nowrap;
    }

    .hero-actions,
    .actions {
        align-items: stretch;
    }

    .hero-actions .btn,
    .actions .btn {
        min-height: 42px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

nav:not(.site-nav) {
    background: rgba(10, 16, 21, 0.97);
    border-bottom: 1px solid rgba(145, 174, 182, 0.18);
}

nav:not(.site-nav) .nav-container {
    width: min(100% - 40px, 1200px);
}

nav:not(.site-nav) .nav-links a {
    color: #bdcbd0;
    border-radius: 6px;
}

nav:not(.site-nav) .nav-links a:hover,
nav:not(.site-nav) .nav-links a.active {
    color: #bde8ec;
    background: rgba(75, 155, 166, 0.15);
}

body > main.container,
body > main.legal-page {
    width: min(100% - 40px, 860px);
    max-width: 860px;
    padding: 1.5rem 1.25rem;
    border: 1px solid rgba(145, 174, 182, 0.2);
    border-radius: 8px;
    background: #121d23;
    box-shadow: none;
}

.legal-section {
    max-width: 900px;
    margin: 0 auto 0.85rem !important;
    padding: 1rem 1.1rem !important;
    border: 1px solid rgba(145, 174, 182, 0.18) !important;
    border-radius: 7px !important;
    background: #152128 !important;
    box-shadow: none !important;
}

.legal-section h2 {
    color: #dce8ea !important;
}

@media (max-width: 760px) {
    body > main.container,
    body > main.legal-page {
        width: min(100% - 28px, 860px);
        padding: 1rem 0.75rem;
    }
}

.donation-section {
    box-sizing: border-box;
    scroll-margin-top: 88px;
    width: min(100% - 48px, 1100px);
    margin: 3rem auto !important;
    padding: 1.75rem !important;
    border-radius: 8px !important;
    background: #111a20 !important;
    box-shadow: none !important;
}

.donation-section::after {
    display: none;
}

.donation-grid {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
    gap: 2rem;
    align-items: center;
}

.donation-logo {
    width: 96px;
    height: 96px;
    margin-bottom: 0.85rem;
    border-radius: 8px;
    background: rgba(50, 110, 119, 0.16);
    box-shadow: none;
}

.donation-logo img {
    display: block;
    width: 80px;
    height: 80px;
}

.donation-story h2 {
    margin: 0.25rem 0 0.65rem !important;
    color: #e6eef0 !important;
    background: none !important;
    font-size: 1.75rem !important;
    line-height: 1.25;
    -webkit-text-fill-color: currentColor !important;
}

.donation-description {
    max-width: 54ch;
    color: #b2c0c5;
    font-size: 0.94rem;
    line-height: 1.65;
}

.donation-highlights {
    gap: 0.55rem;
    margin-top: 1rem;
}

.donation-highlights li {
    color: #d4e0e3;
    font-size: 0.88rem;
}

.donation-form {
    padding: 0 0 0 1.5rem !important;
    border: 0 !important;
    border-left: 1px solid rgba(145, 174, 182, 0.2) !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

#donationCalloutHeading {
    margin-bottom: 0.65rem !important;
    color: #e1ebed !important;
    font-size: 1.15rem !important;
}

.donation-hint {
    margin-bottom: 0.75rem;
    color: #b2c0c5;
    font-size: 0.86rem;
    line-height: 1.55;
}

.donation-secure-note {
    margin-top: 0.75rem;
    color: #9eafb4;
    font-size: 0.78rem;
    line-height: 1.5;
}

.donation-sponsor-cta {
    gap: 0.65rem;
    margin-top: 1rem;
    padding-top: 0.9rem;
    border-top-color: rgba(145, 174, 182, 0.18);
}

.donation-sponsor-cta p {
    color: #b2c0c5;
    font-size: 0.86rem;
    line-height: 1.5;
}

@media (max-width: 760px) {
    .donation-section {
        scroll-margin-top: 72px;
        width: min(100% - 28px, 1100px);
        margin: 2rem auto !important;
        padding: 1rem !important;
    }

    .donation-grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.25rem;
    }

    .donation-logo {
        width: 72px;
        height: 72px;
        margin: 0 0 0.75rem;
    }

    .donation-logo img {
        width: 58px;
        height: 58px;
    }

    .donation-story h2 {
        font-size: 1.5rem !important;
    }

    .donation-form {
        padding: 1rem 0 0 !important;
        border-top: 1px solid rgba(145, 174, 182, 0.2) !important;
        border-left: 0 !important;
    }
}

.about {
    margin: 3rem auto 1.25rem !important;
    padding-inline: 1.5rem;
}

.about-subtitle {
    max-width: 66ch;
    margin-bottom: 1.5rem !important;
    line-height: 1.6;
}

.about-cta-grid {
    gap: 1rem;
}

.about-highlight {
    min-width: 0;
    padding: 1.1rem !important;
    border: 1px solid rgba(145, 174, 182, 0.2) !important;
    border-radius: 8px !important;
    background: #121d23 !important;
    box-shadow: none !important;
}

.about-highlight h3 {
    margin-bottom: 0.45rem;
    color: #dce8ea !important;
    font-size: 1rem;
}

.about-highlight p {
    margin-bottom: 0.75rem;
    font-size: 0.88rem;
    line-height: 1.55;
}

.about-highlight ul {
    gap: 0.35rem;
    margin-bottom: 0;
}

.about-highlight ul li {
    font-size: 0.84rem;
}

.cta {
    padding: 1.75rem 1.5rem 1.25rem !important;
}

.cta h2 {
    margin-bottom: 0.65rem;
    font-size: 1.6rem !important;
}

.cta p {
    max-width: 68ch;
    margin: 0 auto 1rem;
    font-size: 0.95rem;
    line-height: 1.55;
}

.cta-buttons .btn {
    min-height: 42px;
    padding: 0.7rem 1rem !important;
    font-size: 0.92rem !important;
}

@media (max-width: 760px) {
    .about {
        margin: 2rem auto 1rem !important;
        padding-inline: 14px;
    }

    .about-cta-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .cta {
        padding: 1.25rem 1rem 1rem !important;
    }

    .cta h2 {
        font-size: 1.35rem !important;
    }

    .cta-buttons .btn {
        width: 100%;
    }
}

.auth-overlay {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    background: rgba(4, 10, 14, 0.78);
    backdrop-filter: blur(8px);
    animation: authFadeIn 160ms ease-out;
}

.auth-dialog {
    position: relative;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(300px, 0.92fr);
    grid-template-areas: "welcome form";
    width: min(960px, 100%);
    max-height: min(880px, 90dvh);
    overflow: hidden;
    border: 1px solid rgba(131, 171, 180, 0.3);
    border-radius: 10px;
    background: #111a20;
    box-shadow: 0 24px 72px rgba(0, 6, 10, 0.55);
}

.auth-dialog--signup {
    grid-template-areas: "form welcome";
}

.auth-form-panel {
    grid-area: form;
    min-width: 0;
    max-height: min(880px, 90dvh);
    overflow-y: auto;
    padding: 34px clamp(22px, 4vw, 48px) 28px;
    background: #111a20;
    scrollbar-color: #47626a transparent;
}

.auth-form-panel > div {
    text-align: left !important;
}

.auth-form-panel > div:first-child {
    margin-bottom: 10px !important;
}

.auth-form-panel > div:first-child svg {
    width: 32px;
    height: 32px;
    margin: 0 !important;
    color: #8bcbd2;
}

.auth-form-panel h3#authHeading {
    margin: 0 0 20px !important;
    color: #e5eef0 !important;
    font-size: 1.6rem !important;
    font-weight: 650 !important;
    line-height: 1.25;
}

#authModal #authForm {
    display: flex;
    flex-direction: column;
    gap: 0;
    width: 100% !important;
    text-align: left;
}

#authModal #authForm > div[style*="text-align: left"],
#authModal #authForm .auth-name-row > div {
    margin-bottom: 14px !important;
}

#authModal #authForm label {
    display: block;
    margin-bottom: 6px !important;
    color: #c3d0d4 !important;
    font-size: 0.8rem !important;
    font-weight: 600 !important;
}

#authModal #authForm input {
    min-width: 0;
    min-height: 44px;
    padding: 10px 12px !important;
    border: 1px solid rgba(145, 174, 182, 0.3) !important;
    border-radius: 5px !important;
    background: #0c1419 !important;
    color: #e7eff1 !important;
    font: inherit !important;
    font-size: 0.92rem !important;
    box-shadow: none !important;
}

#authModal #authForm input:focus {
    border-color: #69b5be !important;
    outline: 2px solid rgba(105, 181, 190, 0.2) !important;
    outline-offset: 1px;
}

#authModal .auth-name-row {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
    margin-bottom: 0 !important;
}

#authModal .auth-field-wrapper {
    gap: 8px !important;
}

#authModal .auth-field-wrapper button.toggle-password {
    min-width: 58px;
    padding: 8px !important;
    border-color: rgba(117, 173, 181, 0.35) !important;
    color: #b9dfe2 !important;
    font-size: 0.8rem;
}

#authModal #authForm > div[style*="text-align: right"] {
    margin: -2px 0 14px !important;
}

#authModal #authForm a {
    color: #8ed3da !important;
    font-size: 0.82rem !important;
}

#authModal #authForm > button[type="submit"] {
    min-height: 44px;
    padding: 10px 14px !important;
    border: 1px solid #347c85 !important;
    border-radius: 5px !important;
    background: #286f79 !important;
    color: #f4fbfc !important;
    font-size: 0.9rem !important;
    font-weight: 650 !important;
    letter-spacing: 0 !important;
    text-transform: none !important;
    box-shadow: none !important;
}

#authModal #authForm > button[type="submit"]:hover:not(:disabled) {
    background: #327f89 !important;
    transform: none !important;
}

#authModal #authForm > div[style*="position: relative"] {
    margin: 16px 0 !important;
}

#authModal #authForm > div[style*="position: relative"] span {
    background: #111a20 !important;
    color: #9eafb4 !important;
    font-size: 0.78rem !important;
}

#authModal #authForm a[href^="/auth/"] {
    min-height: 42px;
    padding: 8px 10px !important;
    border: 1px solid rgba(145, 174, 182, 0.25) !important;
    border-radius: 5px !important;
    background: #17232a !important;
    color: #dce7e9 !important;
    font-size: 0.82rem !important;
    box-shadow: none !important;
}

#authModal #authForm a[aria-disabled="true"] {
    min-height: 40px;
    padding: 8px 10px !important;
    border: 1px dashed rgba(145, 174, 182, 0.25) !important;
    border-radius: 5px !important;
    background: transparent !important;
    color: #84969b !important;
}

#authModal #authError {
    margin-top: 12px !important;
    font-size: 0.82rem !important;
}

.auth-welcome-panel {
    grid-area: welcome;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    min-width: 0;
    padding: clamp(28px, 5vw, 56px);
    border-right: 1px solid rgba(145, 174, 182, 0.16);
    background: #17242a;
}

.auth-dialog--signup .auth-welcome-panel {
    border-right: 0;
    border-left: 1px solid rgba(145, 174, 182, 0.16);
}

.auth-brand-mark {
    width: 50px;
    height: 50px;
    margin-bottom: 26px;
}

.auth-welcome-label {
    margin: 0 0 10px;
    color: #9eb2b7;
    font-size: 0.76rem;
    font-weight: 650;
}

.auth-welcome-panel h2 {
    margin: 0 0 10px;
    color: #e5eef0;
    font-size: clamp(1.65rem, 3vw, 2.2rem);
    line-height: 1.12;
}

.auth-welcome-panel > p:not(.auth-welcome-label) {
    max-width: 34ch;
    margin: 0;
    color: #b2c0c5;
    font-size: 0.92rem;
    line-height: 1.6;
}

.auth-switch {
    min-height: 40px;
    margin-top: 24px;
    padding: 8px 14px;
    border: 1px solid rgba(145, 174, 182, 0.35);
    border-radius: 5px;
    background: transparent;
    color: #d5e2e4;
    font: inherit;
    font-size: 0.84rem;
    font-weight: 600;
    cursor: pointer;
}

.auth-switch:hover {
    border-color: #69b5be;
    background: rgba(80, 146, 155, 0.12);
}

.auth-close {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border: 1px solid rgba(145, 174, 182, 0.24);
    border-radius: 5px;
    background: rgba(12, 20, 25, 0.9);
    color: #c2d0d3;
    font: inherit;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
}

.auth-close:hover {
    border-color: #69b5be;
    color: #f0f7f8;
}

@keyframes authFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@media (max-width: 680px) {
    .auth-overlay {
        align-items: flex-start;
        overflow-y: auto;
        padding: 12px;
    }

    .auth-dialog,
    .auth-dialog--signup {
        box-sizing: border-box;
        width: min(480px, 100%);
        max-height: calc(100dvh - 24px);
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas: "welcome" "form";
        margin: auto;
    }

    .auth-welcome-panel,
    .auth-dialog--signup .auth-welcome-panel {
        padding: 18px 20px;
        border: 0;
        border-bottom: 1px solid rgba(145, 174, 182, 0.16);
    }

    .auth-brand-mark {
        width: 34px;
        height: 34px;
        margin-bottom: 8px;
    }

    .auth-welcome-label {
        margin-bottom: 4px;
    }

    .auth-welcome-panel h2 {
        margin-bottom: 4px;
        font-size: 1.3rem;
    }

    .auth-welcome-panel > p:not(.auth-welcome-label) {
        font-size: 0.82rem;
    }

    .auth-switch {
        min-height: 36px;
        margin-top: 10px;
    }

    .auth-form-panel {
        max-height: none;
        padding: 18px 20px 22px;
    }

    .auth-form-panel > div:first-child {
        display: none;
    }

    .auth-form-panel h3#authHeading {
        margin-bottom: 14px !important;
        font-size: 1.35rem !important;
    }
}

@media (prefers-reduced-motion: reduce) {
    .auth-overlay {
        animation: none;
    }
}