/**
 * Copyright 2024 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */

@layer reset {
    * {
        box-sizing: border-box;
    }
    html,
    body {
        background: aliceblue;
    }
    html {
        height: 100%;
    }
    body {
        min-height: 100%;
    }
    html, body, ul[class] {
        margin: 0;
        padding: 0;
    }

    input, textarea, select, button {
        font-family: inherit;
        font-size: inherit;
    }
}
@layer layout {
    html {
        line-height: 1.5;
        font-size: 1.25em;
        font-family:system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
    }
    html, body {
        background: aliceblue;
    }
    body {
        background-image: linear-gradient(to right, rgb(0 0 0 / 0.05) 1px, transparent 1px), linear-gradient(to bottom, rgb(0 0 0 / 0.05) 1px, transparent 1px);
        background-size: 50px 50px;
        padding: 3rem 2rem;
        color: #333;
    }

    header, main, footer {
        max-width: 80ch;
        width: 90%;
        margin: 0 auto;
        background: rgb(255 255 255 / 0.5);
        border: 1px solid rgb(0 0 0 / 0.2);
        border-radius: 0.35rem;
        padding: 1rem;
        margin: 1rem auto;

        > *:first-child {
            margin-top: 0;
        }
        > *:last-child {
            margin-bottom: 0;
        }
    }

    header {
        margin-top: 3rem;
    }

    h1, h2 {
        font-weight: 700;
        text-decoration: underline;
        text-decoration-color: hotpink;
        text-decoration-thickness: 0.2rem;
        text-decoration-style: wavy;
        text-decoration-skip-ink: none;
    }

    h2 {
        text-decoration-color: hsl(156deg 100% 50% / 50%);
    }

    a,
    a:visited {
        color: blue;
    }

    footer {
        p {
            font-size: 0.8em;
            text-align: center;
            font-style: italic;
        }
    }

    hr {
        height: 0;
        border: none;
        border-top: 1px solid rgb(0 0 0 / 0.2);
        margin: 2rem auto;
    }

    form {
        border: 1px solid #ccc;
        padding: 1rem;
        background: rgb(255 255 255 / 0.5);
        border: 1px solid rgb(0 0 0 / 0.2);
        border-radius: 0.35rem;
    }

    .row {
        + .row {
            margin-top: 1rem;
        }

        &:has(button) {
            text-align: right;
        }
    }

    label {
        display: block;
        font-variant: small-caps;
    }

    select {
        width: 100%;
    }

    button {
        padding: 0.2rem 0.4rem;
        background: rgb(255 255 255 / 0.5);
        border: 1px solid rgb(0 0 0 / 0.2);
        border-radius: 0.35rem;
        cursor: pointer;
        font-weight: 700;

        &:hover, &:focus {
            background: white;
            color: black;
        }
    }
}