:root {
    color-scheme: light dark;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: #f3f5f8;
    color: #172033;
}

* {
    box-sizing: border-box;
}

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    background:
        radial-gradient(circle at top, rgba(45, 108, 223, 0.11), transparent 34rem),
        #f3f5f8;
}

.gate,
.protected-content {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
}

.card {
    width: min(100%, 440px);
    padding: 34px;
    border: 1px solid rgba(23, 32, 51, 0.09);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 55px rgba(37, 47, 66, 0.12);
    text-align: center;
}

.shield {
    display: grid;
    width: 56px;
    height: 56px;
    margin: 0 auto 20px;
    place-items: center;
    border-radius: 18px;
    background: #e9f0ff;
    color: #2d6cdf;
    font-size: 28px;
    font-weight: 800;
}

.shield--success {
    background: #e6f8ef;
    color: #137a48;
}

h1 {
    margin: 0;
    font-size: clamp(1.55rem, 5vw, 2rem);
    line-height: 1.15;
}

.intro,
.card > p {
    margin: 12px 0 24px;
    color: #5c667a;
    line-height: 1.55;
}

.turnstile-widget {
    display: flex;
    min-height: 65px;
    justify-content: center;
    margin: 24px 0 14px;
}

.webgl-canvas {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    pointer-events: none;
}

.status {
    min-height: 1.5em;
    margin: 0 0 16px;
    color: #667085;
    font-size: 0.9rem;
}

.status--success {
    color: #137a48;
}

button {
    display: block;
    width: min(100%, 280px);
    min-height: 48px;
    margin: 0 auto;
    padding: 12px 18px;
    border: 0;
    border-radius: 12px;
    background: #2d6cdf;
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 750;
    transition: transform 150ms ease, background 150ms ease, opacity 150ms ease;
}

button:not(:disabled):hover {
    background: #245cc1;
    transform: translateY(-1px);
}

button:focus-visible {
    outline: 3px solid rgba(45, 108, 223, 0.3);
    outline-offset: 3px;
}

button:disabled {
    cursor: wait;
    opacity: 0.5;
}

.notice {
    padding: 12px 14px;
    border-radius: 10px;
    font-size: 0.92rem;
    line-height: 1.45;
    text-align: left;
}

.notice--error {
    border: 1px solid #f1c5c5;
    background: #fff1f1;
    color: #912d2d;
}

.content-placeholder {
    padding: 22px;
    border: 1px dashed #aab3c3;
    border-radius: 12px;
    color: #667085;
    line-height: 1.5;
}

code {
    font-size: 0.9em;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
    }
}

@media (prefers-color-scheme: dark) {
    :root {
        background: #101522;
        color: #eef2f8;
    }

    body {
        background:
            radial-gradient(circle at top, rgba(80, 132, 232, 0.16), transparent 34rem),
            #101522;
    }

    .card {
        border-color: rgba(255, 255, 255, 0.1);
        background: rgba(25, 32, 47, 0.97);
        box-shadow: 0 18px 55px rgba(0, 0, 0, 0.3);
    }

    .intro,
    .card > p,
    .status,
    .content-placeholder {
        color: #b1bacb;
    }

    .notice--error {
        border-color: #743c3c;
        background: #3b2024;
        color: #ffc8c8;
    }
}
