:root {
    /* green theme, built around the base mint rgb(186, 238, 161) */
    --green-bg: rgb(233, 248, 224); /* lightest — page background */
    --green-bg-edge: rgb(210, 240, 195); /* slightly deeper — page edges */
    --green-surface: rgb(186, 238, 161); /* base — cards / form */
    --green-accent: rgb(150, 214, 122); /* deeper — borders / accents */
}

* {
    box-sizing: border-box;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui,
        sans-serif;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100vh;
    min-height: 100dvh;
    background-color: var(--green-bg);
    background-image: radial-gradient(
        ellipse 80% 60% at 50% 40%,
        var(--green-bg),
        var(--green-bg-edge)
    );
    background-attachment: fixed;
}

body {
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-x: hidden;
}

main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 40px;
    padding: 120px 24px 48px;
}

/* Intro */

#hooray-intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    text-align: center;
    max-width: 320px;
}

#hooray-intro-heading {
    margin: 0;
    font-family: "Quicksand", sans-serif;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.1;
}

#hooray-intro-tagline {
    margin: 0;
    max-width: 36ch;
    font-size: 17px;
    line-height: 1.5;
    color: rgba(0, 0, 0, 0.6);
}

/* Demo */

#hooray-demo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 40px;
}

/* two-column layout once there's room for it */
@media (min-width: 800px) {
    main {
        flex-direction: row;
        align-items: center;
        justify-content: center;
        gap: 72px;
        padding: 48px;
    }

    #hooray-intro {
        align-items: flex-start;
        text-align: left;
        max-width: 420px;
    }

    #hooray-intro-heading {
        font-size: 56px;
    }
}

/* Header */

#hooray-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding-top: 24px;
}

#hooray-header-title {
    margin: 0;
    font-family: "Quicksand", sans-serif;
    font-size: 42px;
    font-weight: 700;
}

#hooray-header-logo {
    width: 24px;
    height: auto;
}

/* Footer */

footer {
    display: flex;
    justify-content: center;
    padding: 24px;
}

footer p {
    margin: 0;
    font-size: 14px;
}

/* Install */

#hooray-install,
#hooray-install * {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

#hooray-install {
    width: 100%;
    max-width: 320px;
    margin: 0;
    background-color: #2b2d3a;
    border: 1px solid #3c3f52;
    border-radius: 8px;
    color: #c8cad8;
    font-size: 14px;
    padding: 12px 16px;
    overflow-x: auto;
}

#hooray-install .tok-prompt {
    color: #6b6f85;
    user-select: none;
}

#hooray-install .tok-cmd {
    color: #7cc4ff;
}

#hooray-install .tok-sub {
    color: #c8cad8;
}

#hooray-install .tok-pkg {
    color: #b8e986;
}

/* Form */

#hooray-form {
    width: 100%;
    max-width: 320px;
    background-color: var(--green-surface);
    border-radius: 16px;
    border: 2px solid black;
    box-shadow: 2px 2px 2px black;
    display: flex;
    flex-direction: column;
    padding: 16px;
}

#hooray-form-label {
    display: inline-block;
    max-width: 280px;
    text-align: center;
    font-size: 16px;
    margin: 0 auto 16px;
}

#hooray-form-input {
    background-color: var(--green-bg);
    border-radius: 8px;
    border: 1px solid black;
    font-size: 16px;
    padding: 4px;
}

#hooray-form-input-wrapper {
    margin: 0 auto;
}

#hooray-form-submit {
    background: black;
    border-radius: 8px;
    border: 1px solid black;
    color: rgb(250, 249, 240);
    cursor: pointer;
    font-size: 16px;
    padding: 4px 8px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 80px;
    min-height: 28px;
}

#hooray-form-submit:active {
    transform: scale(0.96);
}

#hooray-form-submit:disabled {
    cursor: default;
}

.spinner {
    display: inline-block;
    width: 14px;
    height: 14px;
    border: 2px solid rgba(250, 249, 240, 0.3);
    border-top-color: rgb(250, 249, 240);
    border-radius: 50%;
    animation: hooray-spin 0.6s linear infinite;
}

@keyframes hooray-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Controls */

#hooray-controls {
    width: 100%;
    max-width: 320px;
    margin: 0 auto;
}

#hooray-controls-dropdown {
    width: 100%;
    background-color: var(--green-surface);
    box-shadow: 2px 2px 2px black;
    border-radius: 8px;
    border: 2px solid black;
    font-size: 16px;
    padding: 4px;
}