:root {
    --ink: #1a1a1a;
    --paper: #f5f8f5;        /* warmed with the faintest hint of GSZ green, not stark white */
    --card: #ffffff;
    --accent: #0ba14b;
    --accent-dark: #004e27;
    --accent-light: #d9f0e3;
    --line: #dcdcd6;
    --success: #0ba14b;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    color: var(--ink);
    background: var(--paper);
    line-height: 1.5;
}

/* ---------- Brand masthead (GSZ logo, static — scrolls away, unlike the sponsor banner below it) ---------- */
.brand-strip {
    background: #fff;
    padding: 12px 16px;
    display: flex;
    justify-content: center;
    border-bottom: 1px solid var(--line);
}
.brand-logo {
    height: 78px;
    width: auto;
    max-width: 320px;
    object-fit: contain;
}
.brand-strip--bottom {
    border-bottom: none;
    border-top: 1px solid var(--line);
}

/* ---------- Shared sticky group: title banner + progress bar stick together as one unit ---------- */
/* This is the actual fix for the overlap issue — instead of guessing a pixel offset for where ----
   the progress bar should start (which breaks the moment the banner's height changes), the banner
   and the progress bar are now both plain, non-sticky children inside ONE sticky parent. Whatever
   height the banner renders at, the progress bar is simply the next thing in normal document flow
   right below it — they can never overlap, on any screen size, with any image. */
.sticky-header-group {
    position: sticky;
    top: 0;
    z-index: 50;
    background: var(--paper);
}

/* ---------- Title sponsor banner — same card treatment as the game question-blocks below (border, rounded corners, shadow), capped to the same width ---------- */
.title-banner-wrap {
    background: var(--card);
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    max-width: 640px; /* matches .form-shell below — on a wide desktop screen this keeps the banner the same width as the games/buttons column instead of stretching edge-to-edge. On narrow (mobile) screens it still fills the full device width, same as before, since 100% of the screen is already narrower than 640px. */
    margin: 8px auto 0;
    padding: 10px;
}
.title-banner-wrap--bottom {
    /* Bottom placement isn't part of the sticky group — it's further down the page, static like before */
    margin: 40px auto 0;
}
.title-banner-wrap a {
    display: block;
    line-height: 0;
    border-radius: 8px;
    overflow: hidden;
}
.banner a {
    display: inline-block;
    line-height: 0;
}
.title-banner-img {
    display: block;
    width: 100%;
    height: auto; /* was a fixed 96px box — that forced object-fit:contain to shrink wide banner-ad-shaped images down to a narrow strip with blank space on both sides. Auto height means the image always fills the full width, at its own natural proportions, with zero blank bars. */
    background: #fff;
    border-radius: 8px;
}
.title-banner-fallback {
    height: 96px; /* only used when no image is set (or one fails to load) — this is plain text on a color bar, no image aspect ratio to preserve, so a fixed height is fine here */
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--accent);
    color: #fff;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.02em;
    border-radius: 8px;
}

/* ---------- Sticky sponsor bars (legacy, kept for other pages) ---------- */
.sponsor-bar {
    position: sticky;
    z-index: 50;
    display: flex;
    align-items: center;
    gap: 12px;
    background: #fff;
    border-bottom: 1px solid var(--line);
    padding: 10px 16px;
}
.sponsor-bar--top { top: 0; box-shadow: 0 2px 8px rgba(0,0,0,0.05); }
.sponsor-bar--bottom {
    position: static;
    border-top: 1px solid var(--line);
    border-bottom: none;
    margin-top: 40px;
}
.sponsor-logo {
    height: 40px;
    max-width: 140px;
    object-fit: contain;
}
.sponsor-tag {
    font-size: 0.85rem;
    color: #555;
}

/* ---------- Progress bar ---------- */
.progress-wrap {
    position: sticky;
    top: 61px;
    z-index: 49;
    background: var(--paper);
    padding: 8px 16px 4px;
    border-bottom: 1px solid var(--line);
}
.progress-bar {
    height: 6px;
    width: 0%;
    background: var(--accent);
    border-radius: 3px;
    transition: width 0.25s ease;
}
.progress-label {
    font-size: 0.75rem;
    color: #777;
    margin-top: 4px;
}

/* ---------- Football-field progress indicator ---------- */
.vu-wrap {
    /* No longer sticky on its own — it's a normal-flow child inside .sticky-header-group now,
       which sticks the whole group (banner + this) as one unit. Always sits directly below the
       banner card with no gap or overlap, regardless of the banner's actual rendered height. */
    background: var(--paper);
    padding: 14px 16px 8px;
    border-bottom: 1px solid var(--line);
}
.vu-field {
    position: relative;
    padding-top: 10px;
}
.vu {
    display: flex;
    height: 24px;
    border: 2px solid #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 0 0 1px rgba(0,0,0,0.1);
    background: repeating-linear-gradient(
        90deg,
        #0d7a38 0, #0d7a38 20px,
        #0a6830 20px, #0a6830 40px
    );
}
.vu-segs {
    display: flex;
    flex: 1 1 auto;
}
.vu-seg {
    flex: 1;
    height: 100%;
    background: transparent;
    border: none;
    border-right: 1px solid rgba(255,255,255,0.4);
    padding: 0;
    margin: 0;
    cursor: pointer;
    transition: background 0.2s ease;
}
.vu-segs .vu-seg:last-child { border-right: none; }
.vu-seg:hover { background: rgba(255,255,255,0.18); }
.vu-seg.lit { background: rgba(255,255,255,0.6); }
.vu-seg.lit:hover { background: rgba(255,255,255,0.8); }
.vu-seg:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.vu-endzone {
    flex: 0 0 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: repeating-linear-gradient(45deg, var(--accent-dark), var(--accent-dark) 4px, #052815 4px, #052815 8px);
    color: #fff;
    font-size: 0.6rem;
    font-weight: 800;
    letter-spacing: 0.02em;
    writing-mode: vertical-rl;
    text-orientation: upright;
}
.vu-field.touchdown .vu-endzone {
    animation: tdPulse 0.8s ease-in-out infinite;
}
@keyframes tdPulse {
    0%, 100% { filter: brightness(1); }
    50% { filter: brightness(1.6); }
}
.vu-ball {
    position: absolute;
    top: -8px;
    left: 0;
    font-size: 18px;
    line-height: 1;
    transform: translateX(-50%) rotate(-30deg);
    transition: left 0.35s ease;
    filter: drop-shadow(0 1px 1px rgba(0,0,0,0.35));
    pointer-events: none;
}
.vu-field.touchdown .vu-ball {
    transform: translateX(-50%) rotate(0deg) scale(1.15);
}
.vu-label {
    font-size: 0.75rem;
    color: #777;
    margin-top: 6px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    text-align: center;
}
.vu-count {
    display: block;
    width: 100%;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--ink);
    padding: 2px 0;
}
.vu-count span#vuAnswered { color: var(--accent-dark); }
.vu-count.is-touchdown {
    font-size: 1.4rem;
    color: var(--accent-dark);
}
.skip-hint { opacity: 0; transition: opacity 0.2s ease; color: #b06a00; font-size: 0.75rem; }
.skip-hint.show { opacity: 1; }

/* ---------- Sponsor spotlight banner (mid-scroll) ---------- */
.banner {
    padding: 20px 16px;
    margin-bottom: 14px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    text-align: center;
}
.banner-eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: var(--accent-dark);
    text-transform: uppercase;
    margin-bottom: 8px;
    font-weight: 700;
}
.banner-img {
    display: block;
    width: 100%;
    height: auto; /* fills the card's full width at the image's own natural proportions — no forced height, no blank bars, no cropping */
    border-radius: 10px;
}

/* ---------- Layout ---------- */
.form-shell {
    max-width: 640px;
    margin: 0 auto;
    padding: 24px 16px 60px;
}
.intro {
    text-align: center;
}
.intro h1 {
    font-size: 1.6rem;
    margin-bottom: 8px;
    color: var(--accent-dark);
}
.intro p {
    color: #555;
}

.question-block {
    position: relative;
    overflow: hidden;
    padding: 28px 20px 24px;
    margin-bottom: 14px;
    background: var(--card);
    border: 1px solid var(--line);
    border-radius: 14px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
    scroll-margin-top: 130px;
}
.question-block::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-dark), var(--accent));
}
.question-block h2 {
    font-size: 1.15rem;
    margin: 0 0 14px;
}
.q-number {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--accent-dark);
    background: var(--accent-light);
    padding: 2px 8px;
    border-radius: 20px;
    margin-right: 8px;
    vertical-align: middle;
}

.options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.option {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px 12px 44px;
    border: 1px solid var(--line);
    border-radius: 10px;
    cursor: pointer;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.option:hover { border-color: var(--accent); }
.option input[type="radio"] {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 20px;
    margin: 0;
    opacity: 0;
    cursor: pointer;
}
.option-indicator {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 20px;
    height: 14px;
    border-radius: 50%;
    border: 2px solid var(--line);
    background: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    line-height: 1;
    transition: border-color 0.15s ease, background 0.15s ease, transform 0.15s ease;
}
.option input[type="radio"]:checked ~ .option-indicator {
    border-color: var(--accent-dark);
    background: var(--accent);
    transform: translateY(-50%) scale(1.1);
}
.option input[type="radio"]:checked ~ .option-indicator::after {
    content: "🏈";
    font-size: 9px;
}
.option input[type="radio"]:focus-visible ~ .option-indicator {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
}
.option:has(input:checked) {
    border-color: var(--accent);
    background: var(--accent-light);
    font-weight: 600;
}
.home-tag {
    font-size: 0.75em;
    font-weight: 700;
    color: var(--accent-dark);
    opacity: 0.75;
}
.question-block.is-answered .q-number {
    background: var(--accent);
    color: #fff;
}

/* ---------- Contact block ---------- */
.contact-block { margin-top: 4px; }
.field { margin-bottom: 14px; }
.field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 4px;
}
.field input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    font-size: 1rem;
}
.terms {
    display: flex;
    gap: 10px;
    align-items: flex-start;
    font-size: 0.85rem;
    color: #444;
    margin: 18px 0;
}
.terms input { margin-top: 3px; }

.submit-btn {
    width: 100%;
    padding: 14px;
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    background: var(--accent);
    border: none;
    border-radius: 10px;
    cursor: pointer;
}
.submit-btn:hover { background: var(--accent-dark); }
.submit-btn.btn-incomplete { opacity: 0.55; }

@keyframes flashMissing {
    0%, 100% { box-shadow: 0 1px 3px rgba(0,0,0,0.04); }
    50% { box-shadow: 0 0 0 3px rgba(176,38,30,0.55); }
}
.question-block.flash-missing {
    animation: flashMissing 0.4s ease-in-out 2;
}

.incomplete-msg {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    background: #fbeaea;
    color: #7a1f1f;
    border: 1px solid #f0c5c5;
    border-radius: 8px;
    text-align: center;
    font-size: 0.85rem;
    padding: 0 14px;
    margin: 0;
    transition: max-height 0.25s ease, opacity 0.25s ease, padding 0.25s ease, margin 0.25s ease;
}
.incomplete-msg.show {
    max-height: 60px;
    opacity: 1;
    padding: 10px 14px;
    margin-bottom: 12px;
}

/* ---------- Confirmation ---------- */
.confirm-shell {
    max-width: 520px;
    margin: 80px auto;
    text-align: center;
    padding: 0 16px;
}
.confirm-shell h1 { color: var(--accent-dark); }

.prize-banner-wrap {
    max-width: 640px;
    margin: 0 auto;
}
.prize-banner {
    padding: 12px 16px;
}
.prize-banner-img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 10px;
}
