/* =========================================================
   INTERACTIVE BALANCE SHEET
   Marsharine A. Simpson
   ========================================================= */

:root {
    --navy-950: #111827;
    --navy-900: #172033;
    --navy-800: #24324a;

    --teal-700: #276a67;
    --teal-600: #36827d;
    --teal-500: #54a19b;
    --teal-100: #eaf6f4;

    --gold-600: #a9782b;
    --gold-100: #fff7e8;

    --green-700: #2d6a4f;
    --green-100: #edf8f2;

    --red-700: #9b493f;
    --red-100: #fff1ee;

    --white: #ffffff;
    --off-white: #f7f8fa;
    --soft-gray: #edf0f4;

    --text: #222831;
    --muted: #697181;
    --border: #dce1e8;

    --shadow-sm: 0 8px 22px rgba(17, 24, 39, 0.07);
    --shadow-md: 0 18px 46px rgba(17, 24, 39, 0.11);
    --shadow-lg: 0 30px 75px rgba(17, 24, 39, 0.14);

    --radius-sm: 12px;
    --radius-md: 20px;
    --radius-lg: 30px;

    --max-width: 1180px;
}


/* RESET */

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;

    color: var(--text);

    background:
        radial-gradient(
            circle at top right,
            rgba(84, 161, 155, 0.17),
            transparent 34rem
        ),
        var(--off-white);

    font-family:
        Inter,
        "Segoe UI",
        Arial,
        Helvetica,
        sans-serif;

    line-height: 1.6;
}

button,
input {
    font: inherit;
}

button {
    cursor: pointer;
}

a {
    color: inherit;
}

[hidden] {
    display: none !important;
}


/* PAGE */

.page-shell {
    width: min(100% - 40px, var(--max-width));
    margin: 0 auto;
}


/* HERO */

.hero {
    max-width: 900px;
    margin: 0 auto;
    padding: 88px 0 52px;

    text-align: center;
}

.eyebrow,
.section-label,
.panel-label {
    margin: 0 0 9px;

    color: var(--teal-600);

    font-size: 0.76rem;
    font-weight: 850;

    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.hero h1 {
    margin: 0;

    color: var(--navy-950);

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: clamp(3.2rem, 8vw, 6.4rem);
    font-weight: 600;

    letter-spacing: -0.055em;
    line-height: 0.94;
}

.hero h1 span {
    display: block;

    color: var(--teal-700);
}

.hero-description {
    max-width: 720px;
    margin: 27px auto 0;

    color: var(--muted);

    font-size: 1.07rem;
}

.hero-tags {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 9px;

    margin-top: 25px;
}

.hero-tags span {
    padding: 7px 13px;

    border: 1px solid var(--border);
    border-radius: 999px;

    color: var(--navy-800);
    background: rgba(255, 255, 255, 0.74);

    font-size: 0.82rem;
    font-weight: 750;
}


/* DASHBOARD */

.dashboard-card {
    max-width: 1050px;
    margin: 0 auto 95px;
    padding: clamp(28px, 5vw, 50px);

    border: 1px solid rgba(39, 106, 103, 0.12);
    border-radius: var(--radius-lg);

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.99),
            rgba(242, 249, 248, 0.97)
        );

    box-shadow: var(--shadow-lg);
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 28px;

    margin-bottom: 32px;
}

.dashboard-header h2 {
    margin: 0;

    color: var(--navy-950);

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: clamp(2rem, 4vw, 3rem);

    line-height: 1.05;
}

.dashboard-note {
    margin: 7px 0 0;

    color: var(--muted);

    font-size: 0.92rem;
}

.dashboard-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;
}


/* BUTTONS */

.primary-button,
.secondary-button,
.year-button {
    min-height: 46px;
    padding: 10px 18px;

    border-radius: 999px;

    font-weight: 750;

    transition:
        transform 0.18s ease,
        background-color 0.18s ease,
        color 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.primary-button {
    border: 2px solid var(--navy-900);

    color: var(--white);
    background: var(--navy-900);

    box-shadow: 0 8px 18px rgba(23, 32, 51, 0.15);
}

.primary-button:hover {
    transform: translateY(-2px);

    background: var(--teal-700);

    box-shadow: 0 12px 24px rgba(23, 32, 51, 0.2);
}

.secondary-button {
    border: 2px solid var(--border);

    color: var(--navy-900);
    background: var(--white);
}

.secondary-button:hover {
    transform: translateY(-2px);

    border-color: var(--teal-500);

    background: var(--teal-100);
}


/* YEAR SELECTOR */

.year-selector {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;

    margin-bottom: 30px;
    padding: 18px 20px;

    border: 1px solid var(--border);
    border-radius: var(--radius-md);

    background: var(--white);
}

.selector-label {
    margin: 0;

    color: var(--navy-900);

    font-weight: 800;
}

.year-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.year-button {
    min-height: 40px;
    padding: 8px 16px;

    border: 1px solid var(--border);

    color: var(--navy-800);
    background: var(--off-white);
}

.year-button:hover {
    border-color: var(--teal-500);

    background: var(--teal-100);
}

.year-button.active {
    border-color: var(--teal-700);

    color: var(--white);
    background: var(--teal-700);
}


/* SUMMARY */

.summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 15px;

    margin-bottom: 30px;
}

.summary-card {
    padding: 20px;

    border: 1px solid var(--border);
    border-radius: var(--radius-md);

    background: var(--white);

    box-shadow: var(--shadow-sm);
}

.summary-card p {
    margin: 0 0 7px;

    color: var(--muted);

    font-size: 0.82rem;
    font-weight: 750;
}

.summary-card strong {
    display: block;

    margin-bottom: 3px;

    color: var(--navy-950);

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: clamp(1.4rem, 3vw, 2rem);
}

.summary-card span {
    color: var(--muted);

    font-size: 0.78rem;
}

.highlight-card {
    border-color: rgba(39, 106, 103, 0.32);

    background: var(--teal-100);
}

.highlight-card strong {
    color: var(--teal-700);
}

.highlight-card.negative {
    border-color: rgba(155, 73, 63, 0.28);

    background: var(--red-100);
}

.highlight-card.negative strong {
    color: var(--red-700);
}


/* FINANCIAL PANELS */

.financial-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.financial-panel {
    padding: 26px;

    border: 1px solid var(--border);
    border-radius: var(--radius-md);

    background: var(--white);

    box-shadow: var(--shadow-sm);
}

.panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 20px;

    margin-bottom: 22px;
}

.panel-heading h3 {
    margin: 0;

    color: var(--navy-950);

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 1.7rem;
}

.panel-total {
    color: var(--teal-700);

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 1.4rem;
    font-weight: 700;
}


/* FIELDS */

.field-list {
    display: grid;
    gap: 13px;
}

.financial-field {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 155px;
    align-items: center;
    gap: 18px;

    padding: 14px 0;

    border-bottom: 1px solid var(--soft-gray);
}

.financial-field:last-child {
    border-bottom: 0;
}

.financial-field strong {
    display: block;

    color: var(--navy-900);

    font-size: 0.93rem;
}

.financial-field small {
    display: block;

    margin-top: 2px;

    color: var(--muted);

    font-size: 0.76rem;
}

.currency-input {
    display: grid;
    grid-template-columns: auto 1fr;
    align-items: center;

    overflow: hidden;

    border: 1px solid var(--border);
    border-radius: var(--radius-sm);

    background: var(--off-white);
}

.currency-input > span {
    padding-left: 12px;

    color: var(--muted);

    font-weight: 750;
}

.currency-input input {
    width: 100%;

    padding: 11px 12px 11px 6px;

    border: 0;
    outline: 0;

    color: var(--text);
    background: transparent;

    text-align: right;
    font-weight: 750;
}

.currency-input:focus-within {
    border-color: var(--teal-600);

    box-shadow:
        0 0 0 3px rgba(54, 130, 125, 0.12);
}


/* EQUATION */

.equation-panel {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 30px;

    margin-top: 26px;
    padding: 24px 26px;

    border-radius: var(--radius-md);

    color: var(--white);

    background:
        linear-gradient(
            135deg,
            var(--navy-950),
            var(--navy-800)
        );
}

.equation-panel .section-label {
    color: #9bd0cc;
}

.equation-panel h3 {
    margin: 0;

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 1.35rem;
}

.equation-values {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 10px;

    font-size: 1rem;
}

.equation-values strong {
    color: #b9e3df;

    font-size: 1.2rem;
}


/* HOW IT WORKS */

.how-it-works {
    padding: 10px 0 100px;
}

.section-heading {
    max-width: 720px;

    margin-bottom: 38px;
}

.section-heading h2,
.project-info h2 {
    margin: 0 0 12px;

    color: var(--navy-950);

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: clamp(2.2rem, 5vw, 3.9rem);

    letter-spacing: -0.035em;
    line-height: 1.05;
}

.section-heading > p:last-child {
    margin: 0;

    color: var(--muted);
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
}

.step-card {
    padding: 26px;

    border: 1px solid var(--border);
    border-radius: var(--radius-md);

    background: var(--white);

    box-shadow: var(--shadow-sm);
}

.step-card > span {
    display: block;

    margin-bottom: 28px;

    color: var(--teal-600);

    font-size: 0.78rem;
    font-weight: 850;

    letter-spacing: 0.14em;
}

.step-card h3 {
    margin: 0 0 8px;

    color: var(--navy-950);

    font-family:
        Georgia,
        "Times New Roman",
        serif;

    font-size: 1.4rem;
}

.step-card p {
    margin: 0;

    color: var(--muted);

    font-size: 0.94rem;
}


/* PROJECT INFO */

.project-info {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(300px, 0.8fr);
    align-items: center;
    gap: 60px;

    margin-bottom: 100px;
    padding: clamp(34px, 5vw, 56px);

    border-radius: var(--radius-lg);

    color: var(--white);

    background:
        linear-gradient(
            135deg,
            var(--navy-950),
            var(--teal-700)
        );

    box-shadow: var(--shadow-md);
}

.project-info .eyebrow {
    color: #a9ddd8;
}

.project-info h2 {
    color: var(--white);
}

.project-info p:not(.eyebrow) {
    color: #e0efed;
}

.skills-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px 18px;

    margin: 0;
    padding: 0;

    list-style: none;
}

.skills-list li {
    position: relative;

    padding-left: 19px;

    color: #ecf6f5;

    font-size: 0.91rem;
}

.skills-list li::before {
    position: absolute;
    left: 0;

    color: #a9ddd8;

    content: "◆";

    font-size: 0.54rem;

    top: 0.45rem;
}


/* FOOTER */

.site-footer {
    padding: 38px 20px;

    color: #dce2eb;
    background: var(--navy-950);
}

.footer-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 28px;

    width: min(100%, var(--max-width));
    margin: 0 auto;
}

.footer-inner p {
    margin: 0;
}

.footer-name {
    margin-bottom: 4px !important;

    color: var(--white);

    font-weight: 850;
}

.footer-links {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 8px 20px;
}

.footer-links a {
    color: #a9ddd8;

    font-size: 0.9rem;
    font-weight: 700;

    text-decoration: none;
}

.footer-links a:hover {
    color: var(--white);

    text-decoration: underline;
    text-underline-offset: 4px;
}


/* ACCESSIBILITY */

button:focus-visible,
a:focus-visible,
input:focus-visible {
    outline: 3px solid rgba(84, 161, 155, 0.4);
    outline-offset: 3px;
}


/* TABLET */

@media (max-width: 900px) {

    .summary-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .financial-grid {
        grid-template-columns: 1fr;
    }

    .project-info {
        grid-template-columns: 1fr;

        gap: 34px;
    }

}


/* MOBILE */

@media (max-width: 620px) {

    .page-shell {
        width: min(100% - 28px, var(--max-width));
    }

    .hero {
        padding: 62px 0 38px;
    }

    .hero h1 {
        font-size: clamp(3rem, 16vw, 4.6rem);
    }

    .dashboard-card {
        margin-bottom: 72px;
        padding: 24px 20px;

        border-radius: 22px;
    }

    .dashboard-header,
    .year-selector,
    .equation-panel {
        flex-direction: column;
        align-items: stretch;
    }

    .dashboard-actions {
        display: grid;
        grid-template-columns: 1fr;

        width: 100%;
    }

    .primary-button,
    .secondary-button {
        width: 100%;
    }

    .year-buttons {
        display: grid;
        grid-template-columns: repeat(3, 1fr);

        width: 100%;
    }

    .summary-grid {
        grid-template-columns: 1fr;
    }

    .financial-panel {
        padding: 22px 18px;
    }

    .financial-field {
        grid-template-columns: 1fr;

        gap: 10px;
    }

    .currency-input {
        width: 100%;
    }

    .equation-values {
        justify-content: flex-start;
    }

    .steps-grid {
        grid-template-columns: 1fr;
    }

    .project-info {
        margin-bottom: 72px;

        padding: 30px 24px;
    }

    .skills-list {
        grid-template-columns: 1fr;
    }

    .footer-inner {
        flex-direction: column;
        align-items: flex-start;
    }

    .footer-links {
        justify-content: flex-start;
    }

}


/* PRINT */

@media print {

    body {
        background: #ffffff;
    }

    .hero,
    .dashboard-actions,
    .year-selector,
    .how-it-works,
    .project-info,
    .site-footer {
        display: none !important;
    }

    .page-shell {
        width: 100%;
    }

    .dashboard-card {
        margin: 0;
        padding: 0;

        border: 0;

        box-shadow: none;
    }

    .financial-panel,
    .summary-card {
        break-inside: avoid;

        box-shadow: none;
    }

}


/* REDUCED MOTION */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;

        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }

}
