:root {
    color-scheme: dark;
    --background: #080f1e;
    --surface: #111d31;
    --surface-raised: #16253c;
    --border: #293a52;
    --text: #edf4ff;
    --muted: #a6b5cc;
    --accent: #64ead5;
    --accent-strong: #31cdb7;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-height: 100vh;
    background: radial-gradient(ellipse at 50% 0, #163550 0, transparent 55%), var(--background);
    color: var(--text);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Microsoft Yahei", sans-serif;
    font-size: 15px;
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    color: #b0fff0;
}

a:focus-visible,
summary:focus-visible {
    outline: 3px solid var(--accent);
    outline-offset: 5px;
}

h1, h2, p, ul {
    margin: 0;
}

.release {
    width: min(100% - 40px, 840px);
    margin: 0 auto;
    padding: 32px 0 24px;
}

.site-header,
.brand,
.header-note,
.section-heading,
.section-label {
    display: flex;
    align-items: center;
}

.site-header {
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 44px;
}

.brand {
    gap: 12px;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 1px;
}

.brand-mark {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    border: 1px solid #438b8c;
    border-radius: 12px;
    background: #173a43;
    color: var(--accent);
    font-size: 14px;
    letter-spacing: 0;
}

.header-note {
    gap: 8px;
    color: var(--muted);
    font-size: 12px;
}

.header-note::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

.title {
    text-align: center;
    padding: 0 16px 32px;
}

.eyebrow {
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 4px;
    margin-bottom: 14px;
}

.title h1 {
    font-size: clamp(28px, 5vw, 42px);
    line-height: 1.35;
    letter-spacing: 2px;
}

.title > p:last-child {
    margin-top: 16px;
    color: var(--muted);
}

kbd {
    display: inline-block;
    padding: 1px 7px;
    border: 1px solid #40536e;
    border-bottom-width: 2px;
    border-radius: 5px;
    background: var(--surface-raised);
    color: var(--text);
    font: inherit;
    font-size: 12px;
}

.panel {
    border: 1px solid var(--border);
    border-radius: 20px;
    background: var(--surface);
    padding: 28px;
    margin-bottom: 18px;
    box-shadow: 0 14px 36px #0000001a;
}

.route-panel {
    border-top-color: #437a85;
    background: linear-gradient(135deg, #142b3c, var(--surface) 65%);
}

.section-heading {
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 22px;
}

.section-label {
    gap: 10px;
}

.section-number {
    color: var(--accent);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 1px;
}

.section-heading h2 {
    font-size: 17px;
    font-weight: 600;
}

.section-tag {
    padding: 3px 10px;
    border: 1px solid #365558;
    border-radius: 6px;
    color: #a4d8d0;
    font-size: 11px;
    white-space: nowrap;
}

.route-intro,
.section-description {
    color: var(--muted);
    font-size: 13px;
}

.route-intro {
    text-align: center;
}

#fastest-progress-panel {
    max-width: 480px;
    margin: 18px auto 0;
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

.speed-progress-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin-top: 8px;
    color: var(--accent);
    font-size: 12px;
}

.speed-progress-dot {
    display: none;
    width: 12px;
    height: 12px;
    border: 2px solid var(--accent);
    border-top-color: transparent;
    border-radius: 50%;
    animation: speed-spin .8s linear infinite;
}

.speed-progress-meta.running .speed-progress-dot {
    display: inline-block;
}

.speed-progress-track {
    height: 5px;
    margin-top: 12px;
    border-radius: 8px;
    overflow: hidden;
    background: #26384b;
}

.speed-progress-bar {
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #3685e0, var(--accent));
    transition: width .25s ease;
}

.links ul {
    padding: 0;
    list-style: none;
}

#fastest-list {
    margin: 22px auto 28px;
    max-width: 400px;
    text-align: center;
}

#fastest-list li {
    color: var(--muted);
}

#fastest-list a.fastest-link {
    display: block;
    padding: 15px 24px;
    border: 1px solid #8cf7e5;
    border-radius: 12px;
    background: linear-gradient(110deg, #77f1de, var(--accent-strong));
    box-shadow: 0 6px 28px #31cdb71c;
    color: #082c30;
    font-size: 20px;
    font-weight: 700;
    transition: transform .2s ease, box-shadow .2s ease;
}

#fastest-list a.fastest-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 32px #31cdb733;
}

#fastest-list a.fastest-link:active {
    transform: translateY(0);
}

.list-latency {
    display: block;
    margin-top: 10px;
    color: var(--accent);
    font-size: 12px;
}

.backup-heading {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 400;
}

.backup-heading::before,
.backup-heading::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

#backup-list {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 16px;
}

#backup-list li {
    color: var(--muted);
    font-size: 13px;
    text-align: center;
}

#backup-list a {
    display: block;
    padding: 12px 8px;
    border: 1px solid #354a62;
    border-radius: 10px;
    background: #192b40;
    color: #d5e4f5;
    transition: border-color .2s ease, background .2s ease;
}

#backup-list a:hover {
    border-color: var(--accent);
    background: #1c3b48;
}

.quick-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.quick-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 20px 24px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: var(--surface);
    color: var(--text);
}

.quick-link:hover {
    border-color: #568e96;
    background: var(--surface-raised);
}

.quick-icon {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: #203d50;
    color: var(--accent);
    font-size: 11px;
    font-weight: 700;
}

.quick-link strong,
.quick-link small {
    display: block;
}

.quick-link strong {
    font-size: 14px;
}

.quick-link small {
    margin-top: 2px;
    color: var(--muted);
    font-size: 12px;
}

.quick-arrow {
    margin-left: auto;
    color: var(--muted);
}

.domain-list {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 10px;
    margin: 18px 0;
    padding: 0;
    list-style: none;
}

.domain-list li {
    padding: 9px 4px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #0d182a;
    color: #c9d9ec;
    font-size: 12px;
    text-align: center;
    user-select: all;
}

.email-note {
    padding: 14px 16px;
    border-left: 2px solid var(--accent-strong);
    border-radius: 0 8px 8px 0;
    background: #162b3a;
    color: var(--muted);
    font-size: 13px;
    overflow-wrap: anywhere;
}

.email-note a {
    font-weight: 600;
}

.help-panel {
    color: var(--muted);
    font-size: 13px;
}

.help-panel summary {
    cursor: pointer;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
}

.help-panel p {
    margin-top: 14px;
    overflow-wrap: anywhere;
}

footer {
    padding: 8px 0 0;
    text-align: center;
    color: var(--muted);
    font-size: 12px;
}

footer h2 {
    margin-bottom: 6px;
    color: #c3d1e4;
    font-size: 13px;
    font-weight: 400;
}

.rate-limit {
    display: grid;
    place-items: center;
    padding: 24px;
}

.rate-limit .card {
    width: min(520px, 100%);
    margin: 0;
    text-align: center;
}

.rate-limit h1 {
    margin-bottom: 12px;
    font-size: 24px;
}

.rate-limit .desc {
    color: var(--muted);
}

.rate-limit .sec {
    color: var(--accent);
    font-weight: 700;
}

@keyframes speed-spin {
    to { transform: rotate(360deg); }
}

@media (max-width: 600px) {
    .release {
        width: calc(100% - 28px);
        padding-top: 20px;
    }

    .site-header {
        padding-bottom: 32px;
    }

    .brand {
        gap: 8px;
        font-size: 15px;
    }

    .header-note {
        font-size: 11px;
    }

    .title {
        padding: 0 4px 24px;
    }

    .title > p:last-child {
        font-size: 13px;
    }

    .panel {
        padding: 22px 18px;
        border-radius: 16px;
        margin-bottom: 14px;
    }

    .section-heading h2 {
        font-size: 16px;
    }

    #backup-list {
        gap: 8px;
    }

    .quick-links {
        gap: 10px;
        margin-bottom: 14px;
    }

    .quick-link {
        gap: 10px;
        padding: 16px 12px;
    }

    .quick-icon {
        width: 32px;
        height: 36px;
        font-size: 10px;
    }

    .quick-arrow {
        display: none;
    }

    .domain-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 360px) {
    .header-note {
        display: none;
    }

    .quick-links {
        grid-template-columns: 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
}
