:root {
    color-scheme: light dark;
    --bg: #eef4f7;
    --panel: #ffffff;
    --line: #cddbe3;
    --text: #102231;
    --muted: #526978;
    --button: #087fa3;
    --button-hover: #076d8c;
    --secondary: #e7eff3;
    --secondary-hover: #dbe7ed;
    --secondary-text: #183142;
    --notice-bg: #fff5e4;
    --notice-line: #e5a94a;
    --notice-text: #634415;
    --shadow: #15354a24;
    --logo-filter: none;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        --bg: #08121d;
        --panel: #101e2c;
        --line: #294158;
        --text: #f4f8fb;
        --muted: #a9bac7;
        --button: #087fa3;
        --button-hover: #0a95bd;
        --secondary: #182b3c;
        --secondary-hover: #20394e;
        --secondary-text: #d7e5ed;
        --notice-bg: #211b12;
        --notice-line: #9c6b22;
        --notice-text: #d3b984;
        --shadow: #0006;
        --logo-filter: invert(1);
    }
}

:root[data-theme="dark"] {
    --bg: #08121d;
    --panel: #101e2c;
    --line: #294158;
    --text: #f4f8fb;
    --muted: #a9bac7;
    --button: #087fa3;
    --button-hover: #0a95bd;
    --secondary: #182b3c;
    --secondary-hover: #20394e;
    --secondary-text: #d7e5ed;
    --notice-bg: #211b12;
    --notice-line: #9c6b22;
    --notice-text: #d3b984;
    --shadow: #0006;
    --logo-filter: invert(1);
}

* { box-sizing: border-box; }

body {
    margin: 0;
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 20px;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--bg);
}

main {
    width: min(100%, 680px);
    padding: clamp(24px, 5vw, 42px);
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel);
    box-shadow: 0 18px 45px var(--shadow);
}

.toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 18px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 800;
    letter-spacing: -.02em;
}

.brand img {
    width: 44px;
    height: 44px;
    object-fit: contain;
    filter: var(--logo-filter);
}

.brand-dot { color: #0ba9a1; }

.theme-toggle {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    min-height: 38px;
    padding: 7px 11px;
    border: 1px solid var(--line);
    border-radius: 8px;
    color: var(--text);
    background: var(--secondary);
    font: inherit;
    font-size: .78rem;
    font-weight: 700;
    cursor: pointer;
}

.theme-toggle:hover,
.theme-toggle:focus-visible { background: var(--secondary-hover); }

h1 {
    margin: 0;
    text-align: center;
    font-size: clamp(1.65rem, 5vw, 2.35rem);
    line-height: 1.15;
}

.intro {
    margin: 10px 0 24px;
    text-align: center;
    color: var(--muted);
    font-size: .95rem;
}

nav { display: grid; gap: 12px; }

.button {
    display: block;
    padding: 16px 18px;
    border: 1px solid #21a5c9;
    border-radius: 10px;
    color: #fff;
    background: var(--button);
    text-align: center;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 750;
    line-height: 1.3;
    transition: background .15s ease, transform .15s ease;
}

.button:hover,
.button:focus-visible {
    background: var(--button-hover);
    transform: translateY(-1px);
    outline: 3px solid #58cbe755;
    outline-offset: 2px;
}

.button.secondary {
    border-color: var(--line);
    color: var(--secondary-text);
    background: var(--secondary);
}

.button.secondary:hover,
.button.secondary:focus-visible { background: var(--secondary-hover); }

.security {
    margin-top: 22px;
    padding: 13px 14px;
    border-left: 3px solid var(--notice-line);
    border-radius: 6px;
    color: var(--notice-text);
    background: var(--notice-bg);
    font-size: .7rem;
    line-height: 1.55;
}

.security strong {
    text-transform: uppercase;
    letter-spacing: .04em;
}

.security .ip { display: inline-block; margin-top: 4px; font-weight: 750; }

footer {
    margin-top: 18px;
    color: var(--muted);
    text-align: center;
    font-size: .64rem;
    line-height: 1.5;
}

.build { display: block; margin-top: 3px; opacity: .6; font-family: ui-monospace, monospace; }

@media (max-width: 430px) {
    .theme-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
}

@media (prefers-reduced-motion: reduce) {
    .button { transition: none; }
}
