:root {
    color-scheme: light;
    --bg: #f4f1ea;
    --ink: #1d2521;
    --muted: #66706b;
    --line: #d8d2c7;
    --panel: #fffdf8;
    --primary: #19715f;
    --primary-dark: #0f5145;
    --accent: #b73e2f;
    --warn: #fff4cf;
    --shadow: 0 18px 50px rgba(35, 45, 40, .12);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background:
        linear-gradient(rgba(244, 241, 234, .88), rgba(244, 241, 234, .96)),
        url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1200' height='800' viewBox='0 0 1200 800'%3E%3Crect fill='%23d7e1d2' width='1200' height='800'/%3E%3Cpath fill='%238aa095' d='M0 544h1200v256H0z'/%3E%3Cpath fill='%23f7f0dd' d='M96 366h310v54H96zM736 345h318v60H736z'/%3E%3Cpath fill='%23842f2a' d='M84 326h334l-46 44H130zM720 305h352l-60 52H780z'/%3E%3Ccircle fill='%23f6ca5b' cx='1022' cy='128' r='72'/%3E%3Cpath fill='%234c6f61' d='M0 591c180-68 326-64 496-16 206 58 398 66 704-40v265H0z'/%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
    color: var(--ink);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
    color: var(--primary-dark);
}

.app {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 28px 0 56px;
}

.hero {
    min-height: calc(100vh - 56px);
    display: grid;
    align-items: center;
    max-width: 760px;
}

.hero h1 {
    margin: 0;
    font-size: clamp(2.7rem, 7vw, 5.8rem);
    line-height: .94;
    letter-spacing: 0;
}

.hero p {
    max-width: 620px;
    font-size: 1.2rem;
    line-height: 1.55;
}

.eyebrow {
    margin: 0 0 12px;
    color: var(--accent);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--panel);
    color: var(--ink);
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
}

.button.primary {
    border-color: var(--primary);
    background: var(--primary);
    color: #fff;
}

.button:hover {
    border-color: var(--primary-dark);
}

.panel {
    margin: 18px 0;
    padding: 24px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 253, 248, .94);
    box-shadow: var(--shadow);
}

.panel.narrow {
    max-width: 520px;
    margin: 9vh auto 0;
}

.panel.warning {
    background: var(--warn);
    box-shadow: none;
}

.panel h1,
.panel h2 {
    margin: 0 0 14px;
    letter-spacing: 0;
}

.panel h1 {
    font-size: 2rem;
    line-height: 1.08;
}

.panel h2 {
    font-size: 1.25rem;
}

.muted {
    color: var(--muted);
    line-height: 1.55;
}

.form {
    display: grid;
    gap: 16px;
}

label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: .9rem;
    font-weight: 700;
}

input,
select {
    width: 100%;
    min-height: 44px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    font: inherit;
    padding: 9px 11px;
}

input:focus,
select:focus {
    outline: 3px solid rgba(25, 113, 95, .18);
    border-color: var(--primary);
}

.topbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 14px 0;
}

.topbar div {
    display: flex;
    align-items: baseline;
    gap: 12px;
}

.topbar span {
    color: var(--muted);
}

.topbar nav {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    font-weight: 750;
}

.grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(340px, .95fr);
    gap: 18px;
}

.segmented {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.segmented label {
    display: block;
}

.segmented input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.segmented span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
    text-align: center;
    font-size: .9rem;
}

.segmented input:checked + span {
    border-color: var(--primary);
    background: #e4f2ee;
    color: var(--primary-dark);
}

.time-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.periods {
    display: grid;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.periods li {
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
}

.flash {
    margin: 0 0 12px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #eaf2ff;
    border: 1px solid #bed6fb;
}

.flash.error {
    background: #fff0ed;
    border-color: #f1b9ad;
}

.flash.success {
    background: #edf8f0;
    border-color: #b8dec0;
}

.small-link {
    display: inline-flex;
    margin-top: 10px;
    font-weight: 750;
}

code {
    overflow-wrap: anywhere;
}

@media (max-width: 760px) {
    .app {
        width: min(100% - 20px, 1120px);
        padding-top: 12px;
    }

    .hero {
        min-height: calc(100vh - 24px);
        align-items: end;
        padding-bottom: 54px;
    }

    .hero h1 {
        font-size: 3rem;
    }

    .grid,
    .segmented,
    .time-row {
        grid-template-columns: 1fr;
    }

    .topbar,
    .topbar div,
    .topbar nav {
        align-items: flex-start;
        flex-direction: column;
    }

    .panel {
        padding: 18px;
    }
}
