.cast-home {
    max-width: 78rem;
    margin-inline: auto;
}

.sou-site .cast-home-hero {
    grid-template-columns: minmax(16rem, 3fr) minmax(0, 5fr);
    grid-template-areas: "intro desktop" "actions desktop";
    grid-template-rows: auto auto;
    align-content: center;
    gap: 0 clamp(2rem, 4vw, 4rem);
    padding-block: clamp(2rem, 5vw, 4rem);
}

.cast-home-hero .site-intro { grid-area: intro; align-self: end; }
.cast-home-actions { grid-area: actions; align-self: start; }

.sou-site .cast-home-hero .site-intro h1 {
    margin: 0 0 1rem;
    font-size: clamp(2.75rem, 5.4vw, 5.25rem);
    line-height: .98;
    text-wrap: balance;
}

.sou-site .cast-home-hero .site-intro .cast-home-author {
    display: block;
    margin-bottom: .25em;
    color: var(--accent-ink);
    font-size: .52em;
    letter-spacing: -.04em;
}

.cast-home-desktop {
    grid-area: desktop;
    min-width: 0;
    margin: 0;
}

.cast-home-screen {
    display: block;
    overflow: hidden;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius);
    cursor: zoom-in;
}

.cast-home-screen:focus-visible {
    outline: 3px solid var(--accent-ink);
    outline-offset: 3px;
}

.cast-home-screen img { display: block; width: 100%; height: auto; }
.cast-home-desktop figcaption {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: .25rem 1rem;
    margin-top: .6rem;
    font-size: .8125rem;
    color: var(--secondary);
}
.cast-home-desktop figcaption strong { color: var(--text); }

.cast-home-hero .site-lead,
.cast-home-setup p,
.cast-home-note p {
    max-width: 56ch;
}

.cast-home .site-hero-support a {
    white-space: nowrap;
}

.cast-home-setup,
.cast-home-note,
.cast-home-develop {
    border-top: 1px solid var(--border-subtle);
    padding-block: clamp(2rem, 4vw, 3.75rem);
}

.cast-home-setup {
    display: grid;
    grid-template-columns: minmax(14rem, 2fr) minmax(0, 3fr);
    align-items: start;
    gap: clamp(2rem, 4vw, 4rem);
    scroll-margin-top: 1rem;
}

.cast-home :is(h2, h3) {
    margin: 0;
    line-height: 1.2;
    text-wrap: balance;
}

.cast-home h2 {
    font-size: clamp(1.65rem, 3vw, 2.65rem);
    letter-spacing: -.035em;
}

.cast-home h3 {
    font-size: 1.15rem;
}

.cast-home :is(.cast-home-index, .cast-home-note, .cast-home-develop) p {
    margin: .75rem 0 0;
    line-height: 1.65;
}

.camera-output-pair img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--radius);
}

.camera-output-pair {
    display: grid;
    gap: 1rem;
    margin-top: 1.25rem;
}

.sou-site .camera-output-pair figure {
    margin: 0;
    padding: 0;
    background: transparent;
    border: 0;
}

.camera-output-pair figure:last-child {
    justify-self: end;
    width: 65%;
}

.sou-site .camera-output-pair figcaption {
    margin: 0 0 .4rem;
    color: var(--secondary);
    font-size: .8125rem;
    line-height: 1.5;
}

.cast-home-index > div + div {
    margin-top: 1.25rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--border-subtle);
}

.cast-home-output figure { margin: 0; }
.cast-home-output img { display: block; width: 100%; height: auto; border-radius: var(--radius); }
.cast-home-output figcaption { margin-top: .5rem; font-size: .8125rem; color: var(--secondary); }

.cast-home-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .25rem 1.25rem;
    margin-top: .75rem;
}

.cast-home-links a {
    display: inline-flex;
    align-items: center;
    min-height: 2.75rem;
    font-size: .875rem;
    font-weight: 600;
    text-underline-offset: .2em;
}

.cast-home-note {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
}

.cast-home-note .site-free-signature {
    color: var(--accent-ink);
    font-weight: 600;
}

.cast-home-develop h2 {
    font-size: 1.25rem;
    letter-spacing: normal;
}

@media (max-width: 53rem) {
    .sou-site .cast-home-hero,
    .cast-home-setup {
        grid-template-columns: minmax(0, 1fr);
        gap: 1.5rem;
    }

    .sou-site .cast-home-hero {
        grid-template-areas: "intro" "desktop" "actions";
        grid-template-rows: auto;
    }

    .cast-home-hero .site-intro p { margin-bottom: 0; }
    .sou-site .cast-home-actions .site-intro-actions { margin-top: 0; }

    .cast-home-note {
        align-items: flex-start;
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 620px) {
    /* Keep the active match and both teams legible on a phone. The link opens the full desktop. */
    .cast-home-desktop .cast-home-screen { aspect-ratio: 16 / 9; }
    .cast-home-desktop .cast-home-screen img {
        max-width: none;
        width: 166%;
        margin: -8% 0 0 -24%;
    }

    .sou-site .site-hero .remote-handset {
        width: min(100%, 21rem);
        justify-self: center;
    }
}

.cast-switch {
    grid-area: demo;
    min-width: 0;
    margin: 0;
    overflow: hidden;
    color: #f4f4ed;
    background: #202829;
    border-radius: var(--radius);
    scroll-margin-top: 1rem;
}

.cast-switch-heading,
.cast-switch figcaption {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: .25rem 1rem;
    min-height: 2.75rem;
    margin: 0;
    padding: .375rem .875rem;
    font-size: .85rem;
}

.cast-switch-heading strong { letter-spacing: .02em; }
.cast-switch-heading strong span { color: #ffb944; }
.cast-switch-target {
    position: relative;
    display: block;
    text-decoration: none;
    pointer-events: none;
}
/* The DE/EN Flutter observer fixtures end in -vex.png. The tablet crop starts at
   (112, 94), 896 × 504. The phone crop starts at (0, 198), 390 × 390.
   These offsets keep the hit area on nova's row while vex is still on camera. */
.cast-switch-hit {
    position: absolute;
    left: 1.34%;
    top: 28.37%;
    width: 19.65%;
    height: 17.46%;
    min-height: 44px;
    pointer-events: auto;
}
.cast-switch picture, .cast-switch img, .cast-switch video { display: block; width: 100%; height: auto; }
.cast-switch video { background: #182022; aspect-ratio: 16/9; }
.cast-switch [hidden] { display: none; }
.cast-switch-action {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    position: absolute;
    right: .75rem;
    bottom: .75rem;
    min-height: 2.75rem;
    padding: .5rem .875rem;
    color: #1d211d;
    background: #ffb944;
    border-radius: var(--radius);
    font-weight: 700;
    pointer-events: auto;
}
.cast-switch-action .site-icon { width: 1rem; height: 1rem; }
.cast-switch-target:hover .cast-switch-action { background: #ffcb6b; }
.cast-switch-target:is(:hover, :focus-visible) .cast-switch-hit {
    outline: 2px solid #fff;
    outline-offset: -2px;
}
.cast-switch-target:focus-visible { outline: .2rem solid white; outline-offset: -.25rem; }
.cast-switch-target:focus-visible .cast-switch-action { outline: 2px solid #fff; outline-offset: 2px; }
.cast-switch figcaption { color: #e2e6df; }
.cast-switch figcaption strong { color: #ffbf57; }
.cast-switch button {
    min-height: 2.75rem;
    margin-block: -.375rem;
    padding: .375rem .25rem;
    color: inherit;
    background: transparent;
    border: none;
    text-decoration: underline;
    text-underline-offset: .2em;
    cursor: pointer;
}
.cast-switch button:focus-visible { outline: 2px solid currentColor; outline-offset: -2px; }
@media (max-width: 620px) {
    .cast-switch video { aspect-ratio: 1; }
    .cast-switch-hit { left: 3.08%; top: 67.18%; width: 45.9%; height: 13.34%; }
}
