:root {
    --page: #eef4f1;
    --surface: #ffffff;
    --ink: #172d25;
    --muted: #5f7169;
    --line: #d4e0db;
    --green: #216a4f;
    --green-dark: #174d3a;
    --green-soft: #e4f2eb;
    --shadow: 0 22px 60px rgba(22, 62, 47, .11);
}

* {
    box-sizing: border-box;
}

html {
    color-scheme: light;
    scroll-behavior: smooth;
    background: var(--page);
}

body {
    min-height: 100vh;
    margin: 0;
    color: var(--ink);
    background:
        radial-gradient(circle at 10% 0%, rgba(92, 161, 131, .18), transparent 30rem),
        radial-gradient(circle at 94% 38%, rgba(33, 106, 79, .07), transparent 30rem),
        var(--page);
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    line-height: 1.55;
}

a {
    color: inherit;
}

.skip-link {
    position: fixed;
    z-index: 100;
    top: 10px;
    left: 10px;
    padding: 9px 13px;
    border-radius: 8px;
    color: #fff;
    background: var(--green-dark);
    transform: translateY(-160%);
}

.skip-link:focus {
    transform: translateY(0);
}

.site-header,
main,
footer {
    width: min(1180px, calc(100% - 40px));
    margin-inline: auto;
}

.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 0;
}

.brand {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-mark {
    display: grid;
    width: 46px;
    height: 46px;
    place-items: center;
    border-radius: 12px;
    color: #fff;
    background: var(--green-dark);
    box-shadow: 0 8px 20px rgba(23, 77, 58, .22);
    font-size: 1.25rem;
    font-weight: 850;
}

.brand-name {
    display: grid;
    color: #18372b;
    font-size: 1rem;
    font-weight: 850;
    letter-spacing: .055em;
    line-height: 1.2;
}

.brand-name small {
    margin-top: 3px;
    color: var(--muted);
    font-size: .75rem;
    font-weight: 650;
    letter-spacing: .02em;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-link,
.header-action {
    min-height: 43px;
    padding: 10px 14px;
    border-radius: 9px;
    font-size: .875rem;
    font-weight: 750;
    text-decoration: none;
}

.header-link {
    color: #285541;
}

.header-link:hover,
.header-link:focus-visible {
    background: rgba(255, 255, 255, .72);
}

.header-action {
    border: 1px solid var(--green-dark);
    color: #fff;
    background: var(--green-dark);
}

.header-action:hover,
.header-action:focus-visible {
    background: var(--green);
}

main {
    padding-top: 18px;
}

.portal-hero {
    display: grid;
    grid-template-columns: minmax(280px, .78fr) minmax(480px, 1.22fr);
    align-items: stretch;
    gap: clamp(24px, 4vw, 48px);
}

.portal-copy {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 42px 8px;
}

.eyebrow,
.section-kicker {
    margin: 0 0 13px;
    color: var(--green);
    font-size: .76rem;
    font-weight: 850;
    letter-spacing: .1em;
    text-transform: uppercase;
}

h1 {
    max-width: 580px;
    margin: 0;
    color: #183f31;
    font-size: clamp(2.3rem, 4.5vw, 4.1rem);
    font-weight: 790;
    letter-spacing: -.045em;
    line-height: 1.02;
}

.lead {
    max-width: 600px;
    margin: 22px 0 0;
    color: var(--muted);
    font-size: clamp(1rem, 1.5vw, 1.13rem);
    line-height: 1.7;
}

.calculator-card {
    --calculator-padding: clamp(34px, 5vw, 58px);
    position: relative;
    isolation: isolate;
    display: flex;
    min-height: 430px;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .16);
    border-radius: 26px;
    color: #fff;
    background: linear-gradient(128deg, #123e31 0%, #1d6249 68%, #287459 100%);
    box-shadow: var(--shadow);
    transition: transform .15s ease, box-shadow .15s ease;
}

.calculator-card::before,
.calculator-card::after {
    position: absolute;
    z-index: -1;
    border: 1px solid rgba(255, 255, 255, .19);
    border-radius: 50%;
    content: "";
}

.calculator-card::before {
    top: -165px;
    left: -170px;
    width: 310px;
    height: 310px;
    box-shadow: 0 0 0 36px rgba(255, 255, 255, .045), 0 0 0 72px rgba(255, 255, 255, .025);
}

.calculator-card::after {
    right: -125px;
    bottom: -170px;
    width: 390px;
    height: 390px;
    box-shadow: 0 0 0 46px rgba(255, 255, 255, .04), 0 0 0 92px rgba(255, 255, 255, .025);
}

.calculator-card:hover,
.calculator-card:focus-within {
    transform: translateY(-3px);
    box-shadow: 0 27px 68px rgba(22, 62, 47, .2);
}

.calculator-card-link {
    position: relative;
    z-index: 1;
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: var(--calculator-padding) var(--calculator-padding) 26px;
    color: inherit;
    text-decoration: none;
}

.calculator-label {
    align-self: flex-start;
    padding: 6px 10px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    color: #d9eee4;
    background: rgba(8, 38, 28, .28);
    font-size: .72rem;
    font-weight: 800;
    letter-spacing: .09em;
    text-transform: uppercase;
}

.calculator-title {
    display: block;
    max-width: 650px;
    margin: auto 0 18px;
    padding-top: 42px;
    font-size: clamp(2.2rem, 4vw, 3.8rem);
    font-weight: 790;
    letter-spacing: -.045em;
    line-height: 1.02;
}

.calculator-description {
    display: block;
    max-width: 620px;
    color: #dbece4;
    font-size: .98rem;
    line-height: 1.65;
}

.calculator-action {
    display: inline-flex;
    width: fit-content;
    min-width: 235px;
    min-height: 52px;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    margin-top: 30px;
    padding: 13px 17px 13px 20px;
    border-radius: 10px;
    color: var(--green-dark);
    background: #fff;
    box-shadow: 0 10px 24px rgba(8, 34, 24, .22);
    font-weight: 800;
}

.calculator-action span {
    font-size: 1.25rem;
}

.calculator-access {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 12px 24px;
    margin: 0 var(--calculator-padding);
    padding: 17px 0 22px;
    border-top: 1px solid rgba(255, 255, 255, .17);
    color: #cfe5da;
    font-size: .8rem;
}

.calculator-access strong {
    color: #fff;
}

.calculator-access a {
    position: relative;
    z-index: 2;
    color: #fff;
    font-weight: 800;
    text-underline-offset: 3px;
}

.materials {
    position: relative;
    margin-top: 24px;
    padding: clamp(28px, 5vw, 52px);
    overflow: hidden;
    border: 1px solid #d8dde1;
    border-radius: 20px;
    background: linear-gradient(145deg, #f5f6f7 0%, #eef1f3 100%);
    box-shadow: 0 8px 24px rgba(42, 53, 61, .055);
}

.materials::before {
    position: absolute;
    top: -112px;
    right: -112px;
    width: 230px;
    height: 230px;
    border: 1px solid rgba(74, 87, 96, .08);
    border-radius: 50%;
    box-shadow: 0 0 0 34px rgba(74, 87, 96, .025), 0 0 0 68px rgba(74, 87, 96, .018);
    content: "";
    pointer-events: none;
}

.materials > * {
    position: relative;
}

.section-heading {
    max-width: 760px;
    margin-bottom: 28px;
}

.materials .section-kicker {
    color: #727e87;
}

.section-heading h2 {
    margin: 0 0 8px;
    color: #303b43;
    font-size: clamp(1.7rem, 3vw, 2.45rem);
    letter-spacing: -.03em;
    line-height: 1.1;
}

.section-heading > p:last-child {
    margin: 0;
    color: var(--muted);
    font-size: .95rem;
}

.material-group + .material-group {
    margin-top: 34px;
    padding-top: 30px;
    border-top: 1px solid #d5dade;
}

.material-group-heading {
    margin-bottom: 16px;
}

.material-group-heading h3 {
    margin: 0 0 4px;
    color: #37434b;
    font-size: 1.08rem;
}

.material-group-heading p {
    margin: 0;
    color: var(--muted);
    font-size: .84rem;
}

.document-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.document-card {
    display: flex;
    min-height: 285px;
    flex-direction: column;
    justify-content: space-between;
    gap: 28px;
    padding: 28px;
    border: 1px solid #d9dde0;
    border-radius: 16px;
    background: linear-gradient(145deg, #fff 0%, #fafbfb 100%);
    box-shadow: 0 8px 24px rgba(42, 53, 61, .045);
}

.document-meta {
    display: flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 19px;
    color: var(--muted);
    font-size: .76rem;
    font-weight: 700;
}

.document-badge {
    padding: 5px 8px;
    border-radius: 6px;
    color: #fff;
    background: #6f7b84;
    font-size: .65rem;
    font-weight: 850;
    letter-spacing: .07em;
}

.document-card h4 {
    margin: 0 0 10px;
    color: #334049;
    font-size: clamp(1.15rem, 2vw, 1.38rem);
    line-height: 1.25;
}

.document-card p {
    margin: 0;
    color: var(--muted);
    font-size: .9rem;
}

.document-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
}

.document-actions a {
    display: inline-flex;
    min-height: 43px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 9px 14px;
    border-radius: 9px;
    font-size: .83rem;
    font-weight: 780;
    text-decoration: none;
}

.document-open {
    color: #fff;
    background: #536771;
}

.document-open:hover,
.document-open:focus-visible {
    background: var(--green-dark);
}

.document-download {
    border: 1px solid #c9ced2;
    color: #4f5d66;
    background: #fff;
}

.document-download:hover,
.document-download:focus-visible {
    border-color: #aab2b8;
    background: #f0f2f3;
}

.clinical-note {
    display: grid;
    grid-template-columns: minmax(180px, .35fr) 1fr;
    gap: 28px;
    margin: 16px 0 0;
    padding: 21px 24px;
    border: 1px solid #c9d9d2;
    border-left: 4px solid #6d9f89;
    border-radius: 12px;
    background: rgba(255, 255, 255, .68);
}

.clinical-note strong {
    color: #2a4c3f;
}

.clinical-note p {
    margin: 0;
    color: var(--muted);
    font-size: .88rem;
}

footer {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 28px 0 34px;
    color: #64736d;
    font-size: .78rem;
}

a:focus-visible {
    outline: 3px solid #9ed4bd;
    outline-offset: 3px;
}

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

    .portal-copy {
        padding: 28px 6px 4px;
    }

    .calculator-card {
        min-height: 380px;
    }
}

@media (max-width: 620px) {
    .site-header,
    main,
    footer {
        width: min(100% - 24px, 1180px);
    }

    .site-header {
        padding: 15px 0;
    }

    .brand-name small,
    .header-link {
        display: none;
    }

    .header-action {
        min-height: 40px;
        padding: 8px 11px;
        font-size: .78rem;
    }

    main {
        padding-top: 6px;
    }

    .portal-copy {
        padding: 24px 2px 2px;
    }

    .eyebrow {
        max-width: 34ch;
        font-size: .68rem;
    }

    h1 {
        font-size: clamp(2.25rem, 12vw, 3.15rem);
    }

    .lead {
        margin-top: 17px;
    }

    .calculator-card {
        --calculator-padding: 22px;
        min-height: 390px;
        border-radius: 18px;
    }

    .calculator-card-link {
        padding-top: 28px;
    }

    .calculator-title {
        font-size: clamp(2.05rem, 10vw, 2.8rem);
    }

    .calculator-action {
        width: 100%;
        min-width: 0;
    }

    .calculator-access {
        align-items: flex-start;
        flex-direction: column;
        padding-bottom: 20px;
    }

    .materials {
        padding: 25px 20px;
        border-radius: 18px;
    }

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

    .document-card {
        min-height: 270px;
        padding: 23px;
    }

    .clinical-note {
        grid-template-columns: 1fr;
        gap: 7px;
        padding: 18px;
    }

    footer {
        flex-direction: column;
        gap: 5px;
    }
}

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