:root {
    color-scheme: light;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    color: #16233a;
    background: #f2f6fb;
    font-synthesis: none;
}

* { box-sizing: border-box; }

body {
    min-height: 100vh;
    margin: 0;
    padding: 24px;
    display: grid;
    place-items: center;
    background:
        radial-gradient(circle at 15% 15%, rgba(51, 107, 255, .12), transparent 34%),
        radial-gradient(circle at 85% 85%, rgba(32, 170, 142, .10), transparent 32%),
        #f4f7fb;
}

.card {
    width: min(100%, 560px);
    padding: 42px;
    background: rgba(255, 255, 255, .96);
    border: 1px solid #e1e8f2;
    border-radius: 24px;
    box-shadow: 0 24px 70px rgba(22, 35, 58, .10);
}

.brand {
    width: 50px;
    height: 50px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    color: #fff;
    background: linear-gradient(145deg, #326aff, #1e927a);
    font-size: 24px;
    font-weight: 800;
    box-shadow: 0 10px 24px rgba(50, 106, 255, .22);
}

.eyebrow {
    margin: 28px 0 8px;
    color: #2861d8;
    font-size: 12px;
    font-weight: 750;
    letter-spacing: .14em;
}

h1 {
    margin: 0;
    font-size: clamp(26px, 6vw, 34px);
    line-height: 1.25;
    letter-spacing: -.035em;
}

.intro {
    margin: 16px 0 0;
    color: #627088;
    font-size: 15px;
    line-height: 1.8;
}

.status-panel {
    min-height: 28px;
    margin-top: 32px;
    display: flex;
    align-items: center;
    gap: 12px;
}

#status {
    margin: 0;
    font-size: 15px;
    font-weight: 650;
    line-height: 1.6;
}

.spinner {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    border: 2px solid #d9e2f2;
    border-top-color: #326aff;
    border-radius: 50%;
    animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

#routes {
    margin: 18px 0 0;
    padding: 0;
    list-style: none;
}

#routes li {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 0;
    border-bottom: 1px solid #e9eef5;
    font-size: 14px;
}

#routes li span:last-child { color: #68758a; }
#routes li[data-state="testing"] span:last-child { color: #2861d8; }
#routes li[data-state="success"] span:last-child { color: #148268; }
#routes li[data-state="failed"] span:last-child { color: #b54747; }

.actions {
    margin-top: 22px;
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

button,
#continue {
    appearance: none;
    border: 0;
    border-radius: 11px;
    padding: 12px 19px;
    color: #fff;
    background: #285fd7;
    font: inherit;
    font-size: 14px;
    font-weight: 650;
    text-decoration: none;
    cursor: pointer;
}

button:hover,
#continue:hover { background: #1f50bb; }
button:disabled { cursor: wait; opacity: .7; }
[hidden] { display: none !important; }

:focus-visible {
    outline: 3px solid rgba(50, 106, 255, .4);
    outline-offset: 4px;
}

noscript {
    display: block;
    margin-top: 24px;
    padding: 13px;
    color: #7a5113;
    background: #fff6dc;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.7;
}

footer {
    margin-top: 34px;
    color: #8490a2;
    font-size: 12px;
    line-height: 1.7;
}

@media (max-width: 520px) {
    body { padding: 16px; }
    .card { padding: 30px 22px; border-radius: 20px; }
}

@media (prefers-reduced-motion: reduce) {
    .spinner { animation-duration: 1.8s; }
}

