:root {
    color-scheme: light;
    --bg: #fcfaf5;
    --panel: #ffffff;
    --panel-soft: #f7f4ed;
    --text: #202b2c;
    --muted: #6d7068;
    --line: #e4ded1;
    --accent: #6f8c75;
    --accent-strong: #536d59;
    --blue: #657c88;
    --green-soft: #eff5ed;
    --blue-soft: #eef3f6;
    --amber-soft: #f7efe1;
    --shadow: 0 14px 34px rgba(58, 44, 23, 0.08);
    font-family:
        Inter,
        ui-sans-serif,
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
}

* {
    box-sizing: border-box;
}

html {
    background: var(--bg);
    color: var(--text);
}

body {
    margin: 0;
    min-width: 320px;
    background: linear-gradient(
        180deg,
        rgba(252, 250, 245, 0.96) 0%,
        rgba(246, 242, 234, 0.9) 54%,
        #fcfaf5 100%
    );
}

button,
input,
textarea,
select {
    font: inherit;
}

img {
    display: block;
    max-width: 100%;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 0.85rem 0.7rem;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    color: #41575d;
    font-size: 0.76rem;
    font-weight: 750;
    letter-spacing: 0;
    text-transform: uppercase;
}

td {
    color: #25373b;
    font-size: 0.94rem;
}

.app-shell {
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 30px 0 54px;
}

.hero-section {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(320px, 0.95fr);
    gap: 28px;
    align-items: stretch;
    min-height: clamp(560px, 74vh, 700px);
    padding: 14px 0 42px;
}

.hero-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
    padding: clamp(18px, 4vw, 56px) 0;
}

.hero-copy h1,
.section-heading h2,
.verification-band h2,
.status-screen h1 {
    margin: 0;
    color: var(--text);
    letter-spacing: 0;
}

.hero-copy h1 {
    max-width: 820px;
    font-size: clamp(2.45rem, 5.5vw, 5.05rem);
    line-height: 1;
    font-weight: 720;
}

.hero-lede {
    max-width: 660px;
    margin: 18px 0 0;
    color: #4b5d58;
    font-size: clamp(1.05rem, 2vw, 1.32rem);
    line-height: 1.6;
}

.eyebrow {
    margin: 0 0 10px;
    color: #66765d;
    font-size: 0.74rem;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.private-label {
    width: fit-content;
    margin: 18px 0 0;
    padding: 8px 12px;
    border: 1px solid rgba(111, 140, 117, 0.26);
    border-radius: 999px;
    background: rgba(239, 245, 237, 0.75);
    color: #536d59;
    font-size: 0.9rem;
    font-weight: 750;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 34px;
    color: #394b48;
    font-size: 1rem;
    font-weight: 700;
}

.progress-track {
    width: min(540px, 100%);
    height: 12px;
    margin-top: 12px;
    overflow: hidden;
    background: #e7e2d8;
    border-radius: 999px;
}

.progress-fill {
    height: 100%;
    background: #78977e;
    border-radius: inherit;
}

.hero-facts {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0;
    max-width: 540px;
    margin-top: 22px;
    padding: 8px 0;
    border-top: 1px solid rgba(111, 140, 117, 0.28);
    border-bottom: 1px solid rgba(111, 140, 117, 0.18);
}

.hero-facts div {
    min-width: 0;
    padding: 12px 16px;
    border-left: 1px solid rgba(111, 140, 117, 0.18);
}

.hero-facts div:first-child {
    border-left: 0;
}

.hero-facts div:nth-child(odd) {
    padding-left: 0;
    border-left: 0;
}

.hero-facts span {
    display: block;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 750;
}

.hero-facts strong {
    display: block;
    margin-top: 5px;
    color: #243633;
    font-size: clamp(1.05rem, 2vw, 1.42rem);
    line-height: 1.08;
    overflow-wrap: anywhere;
}

.hero-facts small {
    display: block;
    max-width: 26ch;
    margin-top: 8px;
    color: var(--muted);
    font-size: 0.78rem;
    font-weight: 520;
    line-height: 1.35;
}

.bar-track {
    overflow: hidden;
    background: #e7e2d8;
    border-radius: 999px;
}

.bar-fill {
    height: 100%;
    background: #78977e;
    border-radius: inherit;
}

.hero-visual {
    position: relative;
    min-height: 420px;
    margin: 0;
    overflow: hidden;
    border: 1px solid rgba(228, 222, 209, 0.9);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.hero-visual img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 42%;
}

.flow-divider {
    width: 100%;
    height: 48px;
    margin: -8px auto 14px;
    display: grid;
    place-items: center;
    pointer-events: none;
}

.flow-divider svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.flow-divider path {
    vector-effect: non-scaling-stroke;
}

.flow-divider-ribbon {
    fill: #6f8c75;
    opacity: 0.74;
}

.page-grid {
    display: grid;
    gap: 20px;
    margin-top: 22px;
}

.intro-grid {
    grid-template-columns: minmax(0, 1.18fr) minmax(300px, 0.82fr);
}

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

.spending-grid {
    grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
}

.panel,
.summary-card,
.verification-band,
.status-screen {
    position: relative;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.68);
}

.panel {
    padding: clamp(20px, 3vw, 30px);
}

.intro-grid .panel,
.updates-panel {
    border: 0;
    background: transparent;
    box-shadow: none;
}

.help-panel,
.chart-panel,
.spending-panel,
.summary-card {
    border: 1px solid rgba(228, 222, 209, 0.88);
    box-shadow: none;
}

.section-heading {
    margin-bottom: 18px;
}

.section-heading h2,
.verification-band h2 {
    font-size: clamp(1.35rem, 2.4vw, 2rem);
    line-height: 1.12;
}

.body-copy {
    margin: 0;
    color: #45534d;
    font-size: 1.02rem;
    line-height: 1.75;
}

.privacy-note {
    margin: 18px 0 0;
    padding: 13px 14px;
    border: 1px solid #dbe5d9;
    border-radius: 8px;
    background: var(--green-soft);
    color: #4f5d55;
    font-size: 0.92rem;
    line-height: 1.55;
}

.summary-section {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin-top: 20px;
}

.summary-card {
    min-width: 0;
    padding: 20px;
    background: rgba(255, 255, 255, 0.76);
}

.summary-card p,
.summary-card span {
    margin: 0;
    color: var(--muted);
    font-size: 0.9rem;
}

.summary-card strong {
    display: block;
    margin: 10px 0 8px;
    color: #29433b;
    font-size: clamp(1.35rem, 2.6vw, 1.9rem);
    line-height: 1;
}

.chart-list,
.support-list {
    display: grid;
    gap: 0;
}

.chart-row {
    display: grid;
    gap: 8px;
}

.chart-row-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    color: #2d4247;
}

.chart-row-header strong,
.chart-row-header span:last-child {
    overflow-wrap: anywhere;
}

.bar-track {
    height: 8px;
}

.support-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 16px;
    align-items: baseline;
    padding: 13px 0;
    border-bottom: 1px solid rgba(228, 222, 209, 0.82);
}

.support-row:first-child {
    padding-top: 0;
}

.support-row:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.support-row strong {
    color: #2e403b;
    overflow-wrap: anywhere;
}

.support-row span {
    color: #43524d;
    font-weight: 700;
    overflow-wrap: anywhere;
    text-align: right;
}

.table-wrap {
    overflow-x: auto;
}

.expense-table td:last-child {
    white-space: nowrap;
    font-weight: 750;
}

.mobile-expense-list {
    display: none;
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 18px;
}

.category-card {
    min-width: 0;
    padding: 15px;
    border: 1px solid #dbe5d9;
    border-radius: 8px;
    background: var(--panel-soft);
}

.category-card span {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
}

.category-card strong {
    display: block;
    margin-top: 7px;
    color: #29433b;
    font-size: 1.26rem;
}

.detail-list {
    display: grid;
    gap: 10px;
    margin: 0;
}

.detail-list div {
    padding: 13px 14px;
    border: 1px solid rgba(208, 199, 181, 0.78);
    border-radius: 8px;
    background: rgba(252, 250, 245, 0.54);
}

.detail-list dt {
    color: #687269;
    font-size: 0.72rem;
    font-weight: 780;
    letter-spacing: 0;
    text-transform: uppercase;
}

.detail-list dd {
    margin: 8px 0 0;
    color: #24383d;
    line-height: 1.38;
    overflow-wrap: anywhere;
}

.detail-stack {
    display: grid;
    gap: 7px;
}

.payment-primary {
    display: block;
    color: #1f3437;
    font-size: clamp(1.04rem, 3.7vw, 1.22rem);
    font-weight: 780;
    line-height: 1.2;
    letter-spacing: 0;
}

.detail-line {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 5px;
    align-items: baseline;
}

.detail-label {
    color: #687269;
    font-weight: 760;
}

.contact-wrap {
    min-width: 0;
}

.contact-link {
    display: inline-flex;
    gap: 0.35rem;
    align-items: center;
    color: #155c45;
    font-weight: 760;
    line-height: 1.3;
    text-decoration-color: rgba(21, 92, 69, 0.34);
    text-underline-offset: 3px;
    overflow-wrap: anywhere;
}

.contact-link-icon {
    flex: 0 0 auto;
    width: 1.1em;
    height: 1.1em;
}

.contact-link:hover {
    color: #0e4735;
    text-decoration-color: currentColor;
}

.updates-list {
    display: grid;
    gap: 14px;
}

.update-item {
    padding: 0 0 14px 18px;
    border-bottom: 1px solid var(--line);
    border-left: 3px solid rgba(111, 140, 117, 0.78);
}

.update-item:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.update-item time {
    color: var(--blue);
    font-size: 0.83rem;
    font-weight: 750;
}

.update-item h3 {
    margin: 5px 0 6px;
    color: #24383d;
    font-size: 1.05rem;
}

.update-item p {
    margin: 0;
    color: #4e6268;
    line-height: 1.6;
}

.verification-band {
    display: grid;
    grid-template-columns: minmax(260px, 0.42fr) minmax(0, 1fr);
    gap: 24px;
    align-items: center;
    margin-top: 18px;
    padding: clamp(22px, 3vw, 32px);
    border: 1px solid rgba(228, 222, 209, 0.88);
    background: rgba(247, 239, 225, 0.82);
}

.verification-band p {
    margin: 0;
    color: #3c5258;
    font-size: 1rem;
    line-height: 1.65;
}

.status-screen {
    display: grid;
    place-items: center;
    min-height: 70vh;
    padding: 48px 20px;
    text-align: center;
}

.status-mark {
    width: 42px;
    height: 42px;
    margin-bottom: 18px;
    border: 4px solid #d8e6e2;
    border-top-color: var(--accent);
    border-radius: 999px;
    animation: spin 900ms linear infinite;
}

.status-screen h1 {
    font-size: clamp(1.6rem, 5vw, 2.3rem);
}

.status-screen p {
    max-width: 560px;
    margin: 12px 0 0;
    color: var(--muted);
    line-height: 1.55;
}

.error-state .status-mark {
    animation: none;
    border-color: #d48b7b;
}

@keyframes spin {
    to {
        transform: rotate(1turn);
    }
}

@media (max-width: 900px) {
    .app-shell {
        width: min(100% - 24px, 720px);
        padding-top: 12px;
    }

    .hero-section,
    .intro-grid,
    .contribution-grid,
    .spending-grid,
    .verification-band {
        grid-template-columns: 1fr;
    }

    .hero-section {
        min-height: auto;
        gap: 16px;
    }

    .hero-copy {
        padding: 28px 0 8px;
    }

    .hero-visual {
        min-height: 300px;
        max-height: 440px;
    }

    .hero-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .hero-facts div:nth-child(odd) {
        padding-left: 0;
        border-left: 0;
    }

    .summary-section {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 560px) {
    .app-shell {
        width: min(100% - 28px, 520px);
        padding: 18px 0 34px;
    }

    .page-grid {
        gap: 18px;
        margin-top: 26px;
    }

    .flow-divider {
        width: 100vw;
        height: 34px;
        margin: -2px 0 12px;
        transform: translateX(calc((100% - 100vw) / 2));
    }

    .flow-divider svg {
        width: 100%;
    }

    .hero-copy h1 {
        font-size: clamp(2.18rem, 12vw, 3.05rem);
        line-height: 1.04;
    }

    .private-label {
        margin-top: 14px;
        padding: 7px 10px;
        font-size: 0.84rem;
    }

    .hero-lede {
        margin-top: 16px;
        font-size: 0.98rem;
        line-height: 1.58;
    }

    .hero-meta {
        margin-top: 24px;
        font-size: 0.88rem;
        line-height: 1.35;
    }

    .progress-track {
        height: 10px;
    }

    .hero-visual {
        min-height: 232px;
        height: clamp(380px, 66vh, 560px);
        max-height: none;
    }

    .hero-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0;
        margin-top: 16px;
        padding: 10px 0;
    }

    .hero-facts div {
        padding: 11px 12px;
        border-top: 1px solid rgba(79, 120, 109, 0.14);
        border-left: 1px solid rgba(111, 140, 117, 0.18);
    }

    .hero-facts div:nth-child(odd) {
        padding-left: 0;
        border-left: 0;
    }

    .hero-facts div:nth-child(-n + 2) {
        padding-top: 0;
        border-top: 0;
    }

    .hero-facts span {
        font-size: 0.74rem;
    }

    .hero-facts strong {
        font-size: 1.06rem;
        line-height: 1.12;
    }

    .hero-facts small {
        max-width: 22ch;
        font-size: 0.72rem;
        line-height: 1.3;
    }

    .summary-section,
    .category-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .panel,
    .summary-card,
    .verification-band {
        padding: 16px;
    }

    .section-heading {
        margin-bottom: 14px;
    }

    .section-heading h2,
    .verification-band h2 {
        font-size: 1.42rem;
    }

    .body-copy,
    .verification-band p,
    .update-item p {
        font-size: 0.94rem;
        line-height: 1.62;
    }

    .privacy-note {
        padding: 12px;
        font-size: 0.84rem;
        line-height: 1.48;
    }

    .detail-list {
        gap: 10px;
    }

    .detail-list div {
        padding: 12px;
    }

    .detail-line {
        grid-template-columns: 1fr;
        gap: 2px;
    }

    .payment-primary {
        font-size: 1.12rem;
    }

    .summary-card strong {
        font-size: 1.46rem;
    }

    .support-row {
        grid-template-columns: minmax(0, 0.92fr) minmax(116px, auto);
        gap: 10px;
        padding: 11px 0;
    }

    .support-row strong,
    .support-row span {
        font-size: 0.9rem;
        line-height: 1.25;
    }

    .category-card {
        padding: 13px;
    }

    .category-card strong {
        font-size: 1.24rem;
    }

    .chart-row-header span:last-child {
        grid-column: 1 / -1;
    }

    th,
    td {
        padding: 0.75rem 0.6rem;
    }

    .expense-table {
        display: none;
    }

    .mobile-expense-list {
        display: grid;
        gap: 10px;
    }

    .mobile-expense-card {
        padding: 13px;
        border: 1px solid #e4ded1;
        border-radius: 8px;
        background: rgba(252, 250, 245, 0.78);
    }

    .mobile-expense-top {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;
        gap: 10px;
        align-items: start;
    }

    .mobile-expense-top time {
        color: var(--blue);
        font-size: 0.86rem;
        font-weight: 750;
    }

    .mobile-expense-top strong {
        color: #29433b;
        font-size: 0.92rem;
        line-height: 1.25;
        text-align: right;
        white-space: nowrap;
    }

    .mobile-expense-card p {
        margin: 8px 0 0;
        color: #2e403b;
        font-size: 0.96rem;
        font-weight: 750;
    }

    .mobile-expense-card span {
        display: block;
        margin-top: 4px;
        color: #53615c;
        font-size: 0.9rem;
        line-height: 1.45;
    }
}

@media (max-width: 340px) {
    .hero-facts {
        grid-template-columns: 1fr;
    }

    .hero-facts div {
        padding: 10px 0;
        border-left: 0;
    }

    .hero-facts div:nth-child(2) {
        padding-top: 10px;
        border-top: 1px solid rgba(79, 120, 109, 0.14);
    }

    .support-row {
        grid-template-columns: 1fr;
    }

    .support-row span {
        text-align: left;
    }
}
