* {
    box-sizing: border-box;
}

:root {
    --color-background: #b6d2df;
    --color-link: #235f8b;
    --color-link-border: #23a1e8;
    --color-text: #374661;
    --color-email-border: #7088bb;
    --color-email-background: #a8d9f7;
    --color-email-shadow: #94c6e6;
    --color-button-background-hover: rgba(176, 219, 247, 0.72);
    --color-button-text: #227b96;
    --dialog-background: #aedefe;
    --dialog-backdrop: rgba(176, 223, 254, 0.72);
    --footer-height: 3rem;
    --footer-color-background: rgba(155, 198, 219, 0.86);
}

@media (prefers-color-scheme: dark) {
    :root {
        --color-background: #19243d;
        --color-link: #5b8af6;
        --color-link-border: #90adee;
        --color-text: #c4cfe8;
        --color-email-border: #32446b;
        --color-email-background: #1e2e50;
        --color-email-shadow: #243458;
        --color-button-background-hover: rgba(62, 89, 129, 0.6);
        --color-button-text: #aeb7fe;
        --dialog-background: #111b30;
        --dialog-backdrop: rgba(10, 5, 19, 0.91);
        --footer-color-background: rgba(0, 0, 0, 0.5);
    }
}

html {
    background-color: var(--color-background);
    color: var(--color-text);
    font-family: 'DM Sans', sans-serif;
    font-optical-sizing: auto;
    font-style: normal;
    font-weight: 300;
    margin: 0;
    padding: 0;
}

body {
    color: var(--color-text);
    margin: 0 auto;
    padding: 0;
}

a {
    border-bottom: 2px solid var(--color-link-border);
    color: var(--color-link);
    display: inline-block;
    font-weight: bold;
    line-height: 1.2;
    text-decoration: none;
}

a:hover {
    border-bottom: 2px dotted var(--color-link-border);
}

body {
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

::backdrop {
    background: var(--dialog-backdrop);
}

.c-content {
    align-items: center;
    display: flex;
    height: calc(100vh - var(--footer-height));
    margin: 0 auto;
}

.c-content__inner {
    margin: 0 auto;
    max-width: 40rem;
}

.c-email {
    border: 1px solid var(--color-email-border);
    border-radius: 4px;
    box-shadow: 2px 2px 7px 2px var(--color-email-shadow);
}

.c-email__title {
    border-bottom: 1px solid var(--color-email-border);
    font-size: 0.9rem;
    font-weight: 500;
    padding: 1rem;
    text-align: center;
}

.c-email__body {
    padding: 1rem 1.25rem;
}

.c-email__footer {
    border-top: 1px solid var(--color-email-border);
    display: flex;
    justify-content: flex-end;
    padding: 1rem 1.25rem;
}

.c-alert {
    background-color: var(--dialog-background);
    border: 1px solid var(--color-email-border);
    border-radius: 4px;
    color: var(--color-text);
    padding: 1.25rem 1.5rem;
    position: fixed;
    width: min(100%, 390px);
    z-index: 2;
}

.c-alert p:first-child {
    margin-top: 0;
}

.c-button {
    background: none;
    background-color: transparent;
    border: 1px solid var(--color-link-border);
    border-radius: 4px;
    color: var(--color-button-text);
    font-family: inherit;
    font-size: 0.9rem;
    line-height: 1;
    margin: 0;
    padding: 0.5rem 1rem;
    transition: background-color 0.25s ease;
}

.c-button:hover {
    background-color: var(--color-button-background-hover);
}

.c-button:focus {
    outline: 2px dotted var(--color-link-border);
    outline-offset: 2px;
}

.c-footer {
    align-items: center;
    background-color: var(--footer-color-background);
    display: flex;
    font-size: 0.85rem;
    height: var(--footer-height);
    inset: auto 0 0 0;
    justify-content: center;
    padding: 1rem 1.5rem 1rem;
    position: fixed;
    width: 100%;
}


@media (min-width: 680px) {
    .c-cards {
        grid-gap: 2rem;
    }

    .c-card {
        width: 20rem;
    }
}


@media (min-width: 980px) {
    body {
        padding-left: 2rem;
        padding-right: 2rem;
    }

    .c-cards {
        grid-template-columns: repeat(4, auto);
        grid-template-rows: repeat(3, auto);
    }

    .c-card {
        width: 14rem;
    }

    .c-cards__item:first-child {
        grid-row: 1 / span 3;
    }
}
