:root {
    --ink: #102018;
    --muted: #63706a;
    --line: #dde5df;
    --field: #0f6b3f;
    --field-dark: #073820;
    --paper: #fbfdfb;
    --wash: #eef5ef;
}

* {
    box-sizing: border-box;
}

body {
    min-height: 100vh;
    color: var(--ink);
    background: var(--paper);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    letter-spacing: 0;
}

.site-hero {
    position: relative;
    overflow: hidden;
    min-height: 360px;
    color: #fff;
    background:
        linear-gradient(90deg, rgba(4, 24, 15, .92) 0%, rgba(4, 24, 15, .76) 42%, rgba(4, 24, 15, .26) 100%),
        url("https://images.unsplash.com/photo-1522778119026-d647f0596c20?auto=format&fit=crop&w=1800&q=80") center 58% / cover;
}

.site-hero::after {
    content: "";
    position: absolute;
    inset: auto 0 0;
    height: 80px;
    background: linear-gradient(180deg, rgba(251, 253, 251, 0) 0%, var(--paper) 100%);
}

.hero-inner {
    position: relative;
    z-index: 1;
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    padding: 58px 0 92px;
    text-align: center;
    animation: riseIn .55s ease-out both;
}

.brand-logo {
    display: block;
    width: min(210px, 54vw);
    height: auto;
    margin: 0 auto 26px;
}

.hero-kicker {
    margin: 0 0 14px;
    color: rgba(255, 255, 255, .76);
    font-size: .78rem;
    font-weight: 800;
    letter-spacing: .14em;
    text-transform: uppercase;
}

.hero-title {
    max-width: 100%;
    margin: 0;
    font-size: clamp(2rem, 5.2vw, 4.7rem);
    line-height: .96;
    font-weight: 900;
    letter-spacing: 0;
    white-space: nowrap;
}

.hero-copy {
    max-width: 560px;
    margin: 20px auto 0;
    color: rgba(255, 255, 255, .82);
    font-size: 1.08rem;
    line-height: 1.55;
}

.hero-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 30px;
}

.meta-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 38px;
    padding: 8px 13px;
    border: 1px solid rgba(255, 255, 255, .22);
    border-radius: 999px;
    background: rgba(255, 255, 255, .1);
    color: rgba(255, 255, 255, .9);
    backdrop-filter: blur(8px);
    font-size: .92rem;
}

.main-shell {
    width: min(1120px, calc(100% - 32px));
    margin: -42px auto 56px;
    position: relative;
    z-index: 2;
}

.entry-panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 340px);
    gap: 18px;
    align-items: end;
    padding: 22px;
    border: 1px solid rgba(16, 32, 24, .08);
    border-radius: 8px;
    background: rgba(255, 255, 255, .94);
    box-shadow: 0 20px 60px rgba(16, 32, 24, .13);
}

.email-gate {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(280px, 520px);
    gap: 24px;
    align-items: end;
    padding: 26px;
    border: 1px solid rgba(16, 32, 24, .08);
    border-radius: 8px;
    background: rgba(255, 255, 255, .96);
    box-shadow: 0 20px 60px rgba(16, 32, 24, .13);
}

.email-gate-form {
    min-width: 0;
}

.panel-title {
    margin: 0 0 14px;
    font-size: 1rem;
    font-weight: 800;
}

.form-control,
.form-select {
    min-height: 48px;
    border-color: #cfdad3;
    border-radius: 6px;
}

.form-control:focus {
    border-color: var(--field);
    box-shadow: 0 0 0 .2rem rgba(15, 107, 63, .16);
}

.summary-stat {
    padding: 16px;
    border-top: 4px solid var(--field);
    background: var(--wash);
    border-radius: 6px;
    text-align: center;
}

.summary-stat strong {
    display: block;
    font-size: 2rem;
    line-height: 1;
}

.summary-stat small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
}

.round-section {
    margin-top: 34px;
}

.round-heading {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--line);
}

.round-heading h2 {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 900;
}

.round-heading span {
    color: var(--muted);
    font-size: .9rem;
}

.match-list {
    display: grid;
    gap: 0;
}

.match-row {
    display: grid;
    grid-template-columns: 130px minmax(0, 1fr) 216px;
    gap: 18px;
    align-items: center;
    padding: 18px 0;
    border-bottom: 1px solid var(--line);
    transition: background-color .18s ease, transform .18s ease;
}

.match-row:focus-within,
.match-row:hover {
    background: rgba(15, 107, 63, .045);
    transform: translateX(4px);
}

.date-block {
    color: var(--muted);
    font-size: .9rem;
}

.date-block strong {
    display: block;
    color: var(--ink);
    font-size: 1rem;
}

.teams {
    min-width: 0;
}

.team-line {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    font-weight: 800;
}

.team-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.versus {
    color: var(--muted);
    font-size: .84rem;
    font-weight: 700;
    text-transform: uppercase;
}

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

.pick-option {
    display: grid;
    place-items: center;
    min-height: 48px;
    border: 1px solid #cfdad3;
    border-radius: 6px;
    background: #fff;
    color: var(--ink);
    font-size: 1.15rem;
    font-weight: 800;
    cursor: pointer;
    transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}

.pick-option:hover {
    border-color: var(--field);
    transform: translateY(-1px);
}

.btn-check:checked + .pick-option {
    border-color: var(--field);
    background: var(--field);
    color: #fff;
}

.btn-check:focus + .pick-option {
    box-shadow: 0 0 0 .2rem rgba(15, 107, 63, .16);
}

.sticky-submit {
    position: sticky;
    bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-top: 28px;
    padding: 16px 0;
    background: linear-gradient(180deg, rgba(251, 253, 251, 0) 0%, var(--paper) 30%);
}

.btn-primary {
    min-height: 48px;
    border-color: var(--field);
    background: var(--field);
    border-radius: 6px;
    font-weight: 800;
}

.btn-primary:hover {
    border-color: var(--field-dark);
    background: var(--field-dark);
}

.empty-state,
.thanks-panel {
    padding: 34px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    text-align: center;
}

.thanks-logo {
    display: block;
    width: 160px;
    height: auto;
    margin: 0 auto 22px;
}

.thanks-page {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
    background:
        linear-gradient(120deg, rgba(4, 24, 15, .9), rgba(15, 107, 63, .66)),
        url("https://images.unsplash.com/photo-1518091043644-c1d4457512c6?auto=format&fit=crop&w=1800&q=80") center / cover;
}

.welcome-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: grid;
    place-items: center;
    padding: 20px;
    background: rgba(4, 24, 15, .66);
    backdrop-filter: blur(5px);
}

.welcome-dialog {
    width: min(440px, 100%);
    padding: 28px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 28px 90px rgba(0, 0, 0, .24);
    text-align: center;
    animation: riseIn .28s ease-out both;
}

.welcome-dialog h2 {
    margin: 0 0 12px;
    font-size: 1.55rem;
    font-weight: 900;
}

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

.modal-logo {
    display: block;
    width: 142px;
    height: auto;
    margin: 0 auto 22px;
}

.footer-note {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto 22px;
    color: var(--muted);
    font-size: .7rem;
    text-align: center;
}

.footer-legal {
    font-size: 13px;
    font-weight: 800;
}

.footer-note-light {
    position: fixed;
    inset: auto 0 18px;
    width: min(1120px, calc(100% - 32px));
    color: rgba(255, 255, 255, .76);
}

@keyframes riseIn {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 820px) {
    .site-hero {
        min-height: 300px;
    }

    .hero-inner {
        width: min(100% - 24px, 1120px);
        padding: 38px 0 72px;
    }

    .hero-title {
        font-size: clamp(1.16rem, 5.7vw, 2.1rem);
    }

    .hero-copy {
        font-size: .98rem;
    }

    .main-shell {
        width: min(100% - 24px, 1120px);
        margin-top: -34px;
    }

    .entry-panel {
        grid-template-columns: 1fr;
        padding: 18px;
    }

    .email-gate {
        grid-template-columns: 1fr;
        padding: 18px;
    }

    .email-gate .input-group,
    .entry-panel .input-group {
        flex-wrap: nowrap;
    }

    .match-row {
        grid-template-columns: 1fr;
        gap: 12px;
        padding: 18px 0 22px;
        transform: none;
    }

    .match-row:hover,
    .match-row:focus-within {
        transform: none;
    }

    .pick-grid {
        max-width: 100%;
        gap: 8px;
    }

    .pick-option {
        min-height: 52px;
        font-size: 1.2rem;
    }

    .sticky-submit {
        align-items: stretch;
        flex-direction: column;
        padding-bottom: max(16px, env(safe-area-inset-bottom));
    }

    .footer-note {
        width: min(100% - 24px, 1120px);
        margin-bottom: 18px;
    }
}

@media (max-width: 380px) {
    .brand-logo {
        width: min(172px, 58vw);
        margin-bottom: 20px;
    }

    .hero-title {
        font-size: clamp(1rem, 5.25vw, 1.4rem);
    }

    .hero-copy {
        font-size: .92rem;
    }

    .email-gate .input-group {
        display: grid;
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .email-gate .input-group > .form-control,
    .email-gate .input-group > .btn {
        width: 100%;
        border-radius: 6px !important;
    }
}
