/* Tailwind 4 requires newer browser features; keep the public pages usable on older Android TV browsers. */
@supports not (color: oklch(50% 0 0)) {
    *,
    *::before,
    *::after {
        box-sizing: border-box;
    }

    html,
    body.fence-site {
        min-height: 100%;
        background: #141414;
    }

    body.fence-site {
        margin: 0;
        color: #f2f2f2;
        font-family: 'Segoe UI', Arial, sans-serif;
        -webkit-font-smoothing: antialiased;
    }

    .fence-site a {
        color: inherit;
    }

    .fence-site button,
    .fence-site textarea {
        font: inherit;
    }

    .fence-home-shell {
        position: relative;
        display: flex;
        flex-direction: column;
        min-height: 100vh;
    }

    .fence-background {
        position: fixed;
        z-index: 0;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        overflow: hidden;
        pointer-events: none;
        background: radial-gradient(ellipse at 50% 18%, #242424 0%, #141414 65%);
    }

    .fence-waves {
        width: 100%;
        height: 100%;
        min-height: 700px;
    }

    .fence-home-main,
    .fence-home-footer {
        position: relative;
        z-index: 1;
    }

    .fence-home-main {
        display: flex;
        flex: 1 0 auto;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 100%;
        max-width: 1024px;
        margin: 0 auto;
        padding: 56px 20px;
    }

    .fence-home-main > * + * {
        margin-top: 48px;
    }

    .fence-home-header,
    .fence-home-downloads {
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 100%;
        text-align: center;
    }

    .fence-home-header > * + * {
        margin-top: 20px;
    }

    .fence-home-header h1 {
        margin: 0;
        font-size: 48px;
        font-weight: 600;
        letter-spacing: -0.055em;
    }

    .fence-mark {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 144px;
        height: 144px;
        border: 1px solid rgba(255, 255, 255, 0.055);
        border-radius: 38px;
        background: linear-gradient(145deg, #363636, #222 55%, #1b1b1b);
        box-shadow: inset 1px 1px 1px rgba(255, 255, 255, 0.09), 0 18px 45px rgba(0, 0, 0, 0.32);
    }

    .fence-mark img {
        width: 152px;
        max-width: none;
        height: 152px;
    }

    .fence-home-downloads > * + * {
        margin-top: 24px;
    }

    .fence-home-downloads h2 {
        margin: 0;
        font-size: 20px;
        font-weight: 500;
    }

    .fence-home-downloads h2 + p {
        margin: 8px 0 0;
        color: #b3b3b3;
        font-size: 14px;
    }

    .fence-home-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-gap: 12px;
        width: 100%;
        margin: 0;
        padding: 0;
        list-style: none;
    }

    .fence-download {
        display: flex;
        flex-direction: column;
        align-items: center;
        min-width: 0;
        padding: 28px 16px 24px;
        border: 1px solid rgba(255, 255, 255, 0.055);
        border-radius: 24px;
        background: linear-gradient(150deg, #2a2a2a, #1c1c1c 65%);
        text-align: center;
        box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.035), 0 12px 28px rgba(0, 0, 0, 0.13);
    }

    .fence-platform-icon {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 56px;
        height: 56px;
        border: 1px solid rgba(255, 255, 255, 0.07);
        border-radius: 16px;
        background: linear-gradient(145deg, #414141, #2a2a2a 55%, #232323);
        color: #cecece;
    }

    .fence-platform-icon svg {
        width: 28px;
        height: 28px;
    }

    .fence-download > div {
        min-width: 0;
        margin-top: 20px;
    }

    .fence-download h3 {
        margin: 0;
        font-size: 18px;
        font-weight: 500;
    }

    .fence-download p {
        margin: 6px 0 0;
        color: #b3b3b3;
        font-size: 12px;
        word-wrap: break-word;
    }

    .fence-download-button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-height: 44px;
        padding: 0 12px;
        border: 1px solid rgba(255, 255, 255, 0.11);
        border-radius: 12px;
        background: linear-gradient(180deg, #555, #3a3a3a);
        color: #f2f2f2;
        font-size: 14px;
        font-weight: 500;
        text-align: center;
        text-decoration: none;
        cursor: pointer;
    }

    .fence-download-button svg {
        width: 16px;
        height: 16px;
        margin-right: 8px;
        flex-shrink: 0;
    }

    .fence-download > .fence-download-button {
        width: 100%;
        margin-top: 20px;
        padding-top: 10px;
        padding-bottom: 10px;
    }

    .fence-download-button:disabled {
        border-color: rgba(255, 255, 255, 0.05);
        background: linear-gradient(180deg, #353535, #292929);
        color: #a9a9a9;
        cursor: not-allowed;
    }

    .fence-download-button:focus,
    .fence-credit:focus {
        outline: 2px solid #b3b3b3;
        outline-offset: 4px;
    }

    .fence-home-footer {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        padding: 0 20px 28px;
        color: #b3b3b3;
        font-size: 12px;
        text-align: center;
    }

    .fence-home-footer > *,
    .fence-home-footer nav > * {
        margin: 0 4px 6px;
    }

    .fence-home-footer nav {
        display: flex;
        flex-wrap: wrap;
        justify-content: center;
    }

    .fence-credit {
        color: #b3b3b3;
        text-decoration: underline;
    }

    .fence-inner-main {
        max-width: 768px;
        margin: 0 auto;
        padding: 40px 20px 64px;
    }

    .fence-inner-content {
        margin-top: 40px;
        line-height: 1.75;
    }

    .fence-inner-content > * + * {
        margin-top: 20px;
    }

    .fence-inner-content h1 {
        margin-bottom: 0;
        font-size: 32px;
        font-weight: 600;
    }

    .fence-inner-content p {
        color: #b3b3b3;
    }

    .fence-inner-content form > * + * {
        margin-top: 16px;
    }

    .fence-inner-content label {
        display: block;
        font-weight: 500;
    }

    .fence-inner-content textarea {
        display: block;
        width: 100%;
        min-height: 192px;
        padding: 16px;
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 12px;
        outline: none;
        background: #242424;
        color: #f2f2f2;
        resize: vertical;
    }

    .fence-inner-content textarea:focus {
        border-color: rgba(255, 255, 255, 0.6);
    }

    .fence-inner-content form .fence-download-button {
        padding: 0 24px;
    }

    .fence-inner-content [role='status'] {
        padding: 16px;
        border: 1px solid rgba(16, 185, 129, 0.3);
        border-radius: 12px;
        background: rgba(16, 185, 129, 0.1);
        color: #a7f3d0;
    }

    .fence-inner-content [role='alert'] {
        color: #fca5a5;
    }

    .fence-document > * + * {
        margin-top: 16px;
    }

    .fence-document h2 {
        margin-top: 32px;
        font-size: 20px;
    }

    .fence-document h3 {
        margin-top: 24px;
        font-size: 18px;
    }

    .fence-document ul,
    .fence-document ol {
        padding-left: 24px;
    }

    @media (min-width: 640px) {
        .fence-home-main {
            padding: 80px 32px;
        }

        .fence-home-header h1 {
            font-size: 60px;
        }

        .fence-home-grid {
            grid-gap: 16px;
        }

        .fence-download {
            padding: 28px 24px 24px;
        }

        .fence-inner-main {
            padding: 64px 32px;
        }

        .fence-inner-content h1 {
            font-size: 36px;
        }
    }

    @media (min-width: 900px) {
        .fence-home-grid {
            grid-template-columns: repeat(5, minmax(0, 1fr));
        }
    }

    @media (min-width: 900px) and (orientation: landscape) {
        .fence-home-main {
            padding: 32px 24px;
        }

        .fence-home-main > * + * {
            margin-top: 24px;
        }

        .fence-home-header > * + * {
            margin-top: 8px;
        }

        .fence-home-header h1 {
            font-size: 40px;
        }

        .fence-mark {
            width: 96px;
            height: 96px;
            border-radius: 28px;
        }

        .fence-mark img {
            width: 104px;
            height: 104px;
        }

        .fence-home-downloads > * + * {
            margin-top: 16px;
        }

        .fence-download {
            padding: 16px 12px;
        }

        .fence-platform-icon {
            width: 48px;
            height: 48px;
        }

        .fence-download > div {
            margin-top: 12px;
        }
    }
}
