* {
    box-sizing: border-box;
}


:root {
    --ink: #17211b;
    --muted: #68736c;
    --line: #dce4df;
    --background: #f7faf8;
    --white: #ffffff;
    --green: #19754a;
    --green-dark: #155b3a;
    --soft: #eaf4ee;
}


html {
    font-family:
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background:
        var(--background);

    color:
        var(--ink);
}


body {
    margin: 0;

    line-height: 1.5;
}


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


.container {
    width:
        min(
            1080px,
            calc(100% - 28px)
        );

    margin:
        0 auto;
}


/* Header */

header {
    height: 70px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding:
        0 max(
            14px,
            calc((100% - 1080px) / 2)
        );

    background: white;

    border-bottom:
        1px solid var(--line);
}


.logo {
    font-size: 21px;
    font-weight: 950;
    letter-spacing: -1px;
}


.logo span {
    color: var(--green);
}


.logo small {
    color: var(--muted);
    font-size: 10px;
}


nav {
    display: flex;
    gap: 24px;

    color: var(--muted);

    font-size: 14px;
    font-weight: 700;
}


/* Hero */

.hero {
    padding: 70px 0 45px;
}


.hero-inner {
    max-width: 760px;
}


.eyebrow {
    color: var(--green);

    font-size: 11px;
    font-weight: 900;

    letter-spacing: .17em;
}


h1 {
    margin: 12px 0 18px;

    font-size:
        clamp(
            40px,
            7vw,
            68px
        );

    line-height: 1;

    letter-spacing: -.05em;
}


h2 {
    margin: 7px 0;

    font-size: 28px;
    line-height: 1.1;
}


.lead {
    max-width: 650px;

    color: var(--muted);

    font-size: 19px;
}


/* Forms */

.card,
.panel,
.rank-card,
.need-card,
.directory {
    background: white;

    border:
        1px solid var(--line);

    border-radius: 16px;
}


.form {
    margin-top: 30px;
    padding: 20px;
}


.form label {
    display: block;

    margin-bottom: 6px;

    font-size: 13px;
    font-weight: 800;
}


.form textarea,
.form input,
.filter input {
    width: 100%;

    padding: 13px;

    border:
        1px solid #c9d3cc;

    border-radius: 10px;

    font: inherit;

    color: var(--ink);

    background: white;

    outline: 0;
}


.form textarea:focus,
.form input:focus,
.filter input:focus {
    border-color:
        var(--green);

    box-shadow:
        0 0 0 3px
        #19754a16;
}


.autocomplete {
    position: relative;
}


.suggestions {
    position: absolute;

    left: 0;
    right: 0;
    top: 100%;

    z-index: 10;

    overflow: hidden;

    background: white;

    border:
        1px solid var(--line);

    border-radius: 10px;

    box-shadow:
        0 10px 25px #0002;
}


.suggestion {
    display: block;

    width: 100%;

    padding: 12px 14px;

    border: 0;

    border-bottom:
        1px solid var(--line);

    background: white;

    text-align: left;

    font: inherit;

    cursor: pointer;
}


.suggestion:hover {
    background: var(--soft);
}


.suggestion strong,
.suggestion small {
    display: block;
}


.location {
    display: grid;

    grid-template-columns:
        2fr 1fr;

    gap: 10px;

    margin: 12px 0;
}


.button {
    display: inline-flex;

    align-items: center;
    justify-content: center;

    padding: 12px 18px;

    border: 0;

    border-radius: 10px;

    font: inherit;
    font-weight: 850;

    cursor: pointer;
}


.primary {
    color: white;
    background: var(--green);
}


.primary:hover {
    background:
        var(--green-dark);
}


.secondary {
    color: var(--ink);
    background: #edf2ee;
}


.full {
    width: 100%;
}


.hint,
.muted,
small {
    color: var(--muted);
    font-size: 12px;
}


.hint {
    text-align: center;
}


/* Homepage cards */

.section {
    padding:
        20px 0 70px;
}


.section-title {
    display: flex;

    justify-content: space-between;
    align-items: end;

    margin-bottom: 15px;
}


.section-title a,
.back {
    color: var(--green);
    font-weight: 800;
}


.need-grid {
    display: grid;

    grid-template-columns:
        repeat(5, 1fr);

    gap: 10px;
}


.need-card {
    min-height: 125px;

    padding: 17px;

    display: flex;

    flex-direction: column;

    justify-content: space-between;
}


.need-card > span {
    color: var(--muted);

    font-size: 12px;

    font-weight: 800;
}


.need-card strong {
    line-height: 1.2;
}


/* Pages */

.page {
    padding:
        60px 0 80px;
}


.narrow {
    max-width: 760px;
}


.intro {
    margin-bottom: 28px;
}


.intro h1 {
    font-size:
        clamp(
            38px,
            6vw,
            55px
        );
}


.intro p {
    color: var(--muted);
    font-size: 18px;
}


/* Filters */

.filter {
    display: flex;

    gap: 10px;

    margin-bottom: 18px;
}


.filter input:first-child {
    flex: 1;
}


/* Rankings */

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


.rank-card {
    display: grid;

    grid-template-columns:
        45px 1fr auto;

    gap: 12px;

    align-items: center;

    padding: 16px;
}


.rank-card > b {
    color: #94a097;

    font-size: 22px;
}


.rank-card strong,
.rank-card small {
    display: block;
}


.rank-card em {
    font-size: 20px;

    font-style: normal;

    font-weight: 900;

    text-align: right;
}


.rank-card em small {
    font-size: 11px;

    font-weight: 500;
}


/* Directory */

.directory {
    overflow: hidden;
}


.directory-row {
    display: flex;

    justify-content: space-between;

    padding: 16px 18px;

    border-bottom:
        1px solid var(--line);
}


.directory-row:last-child {
    border: 0;
}


.directory-row span {
    display: flex;

    flex-direction: column;
}


/* Opportunity */

.back {
    display: inline-block;

    margin-bottom: 30px;
}


.demand {
    font-size: 20px;
}


.detail-grid {
    display: grid;

    grid-template-columns:
        1.5fr 1fr;

    gap: 16px;
}


.panel {
    padding: 23px;
}


.panel h2 {
    margin-top: 0;

    font-size: 21px;
}


.panel blockquote {
    margin: 0;

    padding: 14px 0;

    border-bottom:
        1px solid var(--line);
}


.facts div {
    display: flex;

    justify-content: space-between;

    padding: 12px 0;

    border-bottom:
        1px solid var(--line);
}


/* Success */

.success {
    padding: 50px 25px;

    text-align: center;

    background: white;

    border:
        1px solid var(--line);

    border-radius: 18px;
}


.check {
    display: grid;

    place-items: center;

    width: 52px;
    height: 52px;

    margin:
        0 auto 16px;

    border-radius: 50%;

    background: var(--soft);

    color: var(--green);

    font-size: 28px;

    font-weight: 900;
}


.actions {
    display: flex;

    justify-content: center;

    gap: 10px;

    margin-top: 25px;
}


/* About */

.prose {
    font-size: 17px;
}


.prose li {
    margin: 14px 0;
}


/* Footer */

footer {
    padding: 28px 0;

    background: white;

    border-top:
        1px solid var(--line);
}


.footer-inner {
    display: flex;

    justify-content: space-between;

    align-items: center;

    color: var(--muted);

    font-size: 13px;
}


/* Mobile */

@media (max-width: 800px) {

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


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

}


@media (max-width: 520px) {

    header {
        height: 62px;
    }


    nav {
        gap: 12px;
        font-size: 12px;
    }


    nav a:nth-child(2) {
        display: none;
    }


    .hero {
        padding-top: 45px;
    }


    .container {
        width:
            calc(100% - 24px);
    }


    h1 {
        font-size: 40px;
    }


    .lead {
        font-size: 17px;
    }


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


    .location {
        grid-template-columns:
            1fr 80px;
    }


    .filter {
        flex-wrap: wrap;
    }


    .filter input:first-child {
        min-width: 100%;
    }


    .rank-card {
        grid-template-columns:
            34px 1fr auto;
    }


    .actions {
        flex-direction: column;
    }


    .footer-inner {
        flex-direction: column;

        align-items: flex-start;

        gap: 10px;
    }

}
