:root {
    color-scheme: light;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #eef2f6;
    color: #172033;
}

* { box-sizing: border-box; }

body {
    min-width: 320px;
    min-height: 100vh;
    margin: 0;
    background: #eef2f6;
}

.container {
    width: calc(100% - 32px);
    max-width: 640px;
    margin: 32px auto 0;
}

.list {
    padding: 24px;
    background: #fff;
    border: 1px solid #d8e0e9;
    border-radius: 8px;
    box-shadow: 0 16px 40px rgb(23 32 51 / 9%);
}

.site-header {
    margin-bottom: 22px;
    padding: 22px;
    background: #f6f8fb;
    border: 1px solid #e4e9f0;
    border-radius: 8px;
}

.site-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.site-kicker {
    margin: 0 0 4px;
    color: #64748b;
    font-size: .75rem;
    font-weight: 700;
}

.site-header h1 {
    margin: 0;
    font-size: 2.25rem;
    line-height: 1.15;
}

.site-header h1,
.route-domain {
    background: linear-gradient(100deg, #164fa8 0%, #087454 52%, #b4550a 100%);
    background-clip: text;
    -webkit-background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
}

.route-list {
    display: grid;
    gap: 14px;
}

.route-card {
    --route-color: #1557b7;
    --route-dark: #0e408b;
    --route-soft: #eef4fc;
    --route-border: #bbcee7;
    display: grid;
    grid-template-columns: 1fr;
    align-items: center;
    gap: 18px;
    min-height: 104px;
    padding: 18px;
    overflow: hidden;
    border: 1px solid var(--route-border);
    border-radius: 8px;
    background: #fff;
    text-align: center;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.route-card:hover {
    border-color: var(--route-color);
    box-shadow: 0 8px 22px rgb(23 32 51 / 8%);
    transform: translateY(-1px);
}

.route-card--blue {
    --route-color: #1557b7;
    --route-dark: #0e408b;
    --route-soft: #eef4fc;
    --route-border: #bbcee7;
}

.route-card--green {
    --route-color: #087454;
    --route-dark: #05553d;
    --route-soft: #edf8f4;
    --route-border: #b8dbcf;
}

.route-card--amber {
    --route-color: #a84d09;
    --route-dark: #7b3504;
    --route-soft: #fff5eb;
    --route-border: #e8c7a8;
}

.route-heading {
    display: flex;
    width: 100%;
    min-width: 0;
    align-items: center;
    justify-content: center;
}

.route-heading h2 {
    margin: 0;
    overflow-wrap: anywhere;
    color: #27364b;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
}

.redirect-btn {
    display: inline-flex;
    width: 100%;
    max-width: 420px;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 9px;
    padding: 10px 16px;
    border: 0;
    border-radius: 6px;
    background: var(--route-color);
    color: #fff;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    justify-self: center;
    letter-spacing: 0;
    text-decoration: none;
    transition: background-color .18s ease, transform .18s ease;
}

.redirect-btn:hover { background: var(--route-dark); }
.redirect-btn:active { transform: translateY(1px); }
.redirect-btn:disabled,
.redirect-btn[aria-disabled="true"] { cursor: wait; opacity: .62; }

.button-arrow {
    font-size: 1.15rem;
    line-height: 1;
}

:focus-visible {
    outline: 3px solid #0f62d6;
    outline-offset: 3px;
}

.status {
    margin: 16px 0 0;
    padding: 11px 14px;
    border: 1px solid #b9d1ef;
    border-radius: 6px;
    background: #eef6ff;
    color: #164e8d;
    font-size: .9rem;
    line-height: 1.5;
    text-align: center;
}

.status-error {
    border-color: #efb8b3;
    background: #fff1f0;
    color: #a52a22;
}

.network-failure {
    display: grid;
    grid-template-columns: 1fr;
    gap: 14px;
    margin-top: 14px;
    padding: 16px;
    border: 1px solid #e6b8b3;
    border-radius: 8px;
    background: #fff7f6;
    text-align: center;
}

.network-failure[hidden] { display: none; }

.network-failure-copy {
    display: grid;
    gap: 4px;
}

.network-failure-network,
.network-failure-message {
    margin: 0;
    overflow-wrap: anywhere;
}

.network-failure-network {
    color: #9b2c24;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.5;
}

.network-failure-message {
    color: #6f3a35;
    font-size: .88rem;
    font-weight: 600;
    line-height: 1.5;
}

.retry-routes {
    min-width: 112px;
    min-height: 40px;
    margin: 0 auto;
    padding: 8px 16px;
    border: 1px solid #9db7d8;
    border-radius: 6px;
    background: #fff;
    color: #164e8d;
    cursor: pointer;
    font: inherit;
    font-weight: 700;
    letter-spacing: 0;
}

.retry-routes:hover { background: #eef6ff; }
.retry-routes:disabled { cursor: wait; opacity: .6; }

footer {
    display: flex;
    width: calc(100% - 32px);
    max-width: 640px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 16px auto 28px;
    padding-top: 16px;
    border-top: 1px solid #d2dbe5;
    color: #53647a;
}

.runtime-dot {
    width: 8px;
    height: 8px;
    flex: 0 0 8px;
    border-radius: 50%;
    background: #16805d;
    box-shadow: 0 0 0 4px rgb(22 128 93 / 12%);
}

.runtime-label {
    display: block;
    margin-bottom: 2px;
    color: #7a899c;
    font-size: .7rem;
    font-weight: 700;
}

footer p {
    margin: 0;
    font-size: .85rem;
}

@media (max-width: 560px) {
    .container { margin-top: 16px; }
    .list { padding: 16px; }
    .site-header { padding: 18px; }
    .site-header h1 { font-size: 1.75rem; }
    .route-card {
        grid-template-columns: 1fr;
        gap: 14px;
        padding: 16px;
    }
    .redirect-btn { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition-duration: .01ms !important;
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
    }
}
