:root { color-scheme: dark; font-family: system-ui, sans-serif; }
* { box-sizing: border-box; }
body { margin: 0; background: #10131a; color: #eef2ff; }
main { width: min(52rem, calc(100% - 2rem)); margin: 5rem auto; }
h1 { font-size: clamp(3.8rem, 12vw, 6rem); letter-spacing: -.08em; line-height: .9; margin: 0; }
h2 { margin: 0; font-size: 1.4rem; }
h3 { margin: 0; font-size: 1.1rem; }
p { line-height: 1.55; }
.eyebrow { color: #89a7ff; font-size: .85rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.intro { color: #c3cbe0; max-width: 38rem; font-size: 1.2rem; }
.duration-control { align-items: center; display: flex; gap: .75rem; color: #c3cbe0; font-weight: 700; margin-top: 1.5rem; }
select { border: 1px solid #4b5876; border-radius: .45rem; background: #171c27; color: #eef2ff; font: inherit; padding: .5rem .65rem; }
.actions { display: flex; gap: .75rem; flex-wrap: wrap; margin: 1.8rem 0 .8rem; }
button { appearance: none; border: 1px solid #89a7ff; border-radius: .5rem; background: #89a7ff; color: #111725; cursor: pointer; font: inherit; font-weight: 700; padding: .65rem 1rem; }
button:hover { background: #b7c8ff; }
button:disabled { cursor: wait; opacity: .6; }
button.secondary { border-color: #4b5876; background: transparent; color: #dfe6f6; }
#status { min-height: 1.55em; color: #aab4ca; }
section { margin-top: 4rem; }
.route-panel { display: block; }
.route-panel h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
.route-panel p:not(.eyebrow) { color: #aab4ca; margin: .4rem 0 1rem; }
.family-summary { color: #c3cbe0; font-weight: 650; }
.map-stage { aspect-ratio: 2000 / 857; overflow: hidden; position: relative; width: 100%; border-radius: .8rem; background: #dce4ed; }
#world-map { display: block; width: calc(var(--map-scale, 1) * 100%); max-width: none; margin-left: var(--map-x, 0); margin-top: var(--map-y, 0); }
.map-overlay { aspect-ratio: 2000 / 857; height: auto; left: var(--map-x, 0); position: absolute; top: var(--map-y, 0); width: calc(var(--map-scale, 1) * 100%); }
.route-line { stroke: #aabaff; stroke-width: 3; stroke-dasharray: 8 7; }
.client-marker { fill: #8ee6b0; stroke: #0e1724; stroke-width: 4; }
.server-marker { fill: #89a7ff; stroke: #0e1724; stroke-width: 5; }
.map-label { fill: #162033; font-family: system-ui, sans-serif; font-weight: 800; paint-order: stroke; stroke: #f7f9fc; stroke-width: 5; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.section-heading p { color: #aab4ca; margin: 0; }
.test-list { display: grid; gap: .8rem; margin-top: 1rem; }
.test-card { border: 1px solid #303b54; border-radius: .75rem; padding: 1.25rem; background: #171c27; }
.test-card p { color: #aab4ca; margin: .5rem 0 1rem; }
.chart { display: block; width: 100%; height: 9rem; border-radius: .45rem; background: #121826; margin: 1rem 0; }
.payload-results { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: .55rem; margin: 1rem 0; }
.spinner { display: inline-block; width: .8rem; height: .8rem; border: 2px solid #455575; border-top-color: #89a7ff; border-radius: 50%; animation: spin .8s linear infinite; vertical-align: -.1rem; }@keyframes spin { to { transform: rotate(360deg); } }
.payload-result { border: 1px solid #46516b; border-radius: .5rem; display: grid; gap: .15rem; padding: .65rem; background: #121826; }
.payload-result span { font-weight: 700; }.payload-result small { color: #aab4ca; }.payload-result.pending { border-color: #46516b; color: #7f8ba4; }.payload-result.testing { border-color: #89a7ff; }.payload-result.clean { border-color: #3d9a63; }.payload-result.warning { border-color: #d1a340; }.payload-result.loss { border-color: #d56872; }.payload-output { display: none; }
.test-footer { align-items: center; display: flex; gap: 1rem; justify-content: space-between; }
output { color: #cdd6ea; font-size: .92rem; }
output { white-space: pre-line; }
output[data-state="running"] { color: #89a7ff; }
output[data-state="success"] { color: #8ee6b0; }
output[data-state="error"] { color: #ffadb4; }
.downloads { border-top: 1px solid #303b54; display: flex; gap: .75rem; flex-wrap: wrap; padding-top: 2rem; }
.stability-control { align-items: center; color: #c3cbe0; display: flex; font-weight: 700; gap: .75rem; margin: 1rem 0 0; }
@media (max-width: 38rem) { main { margin: 2rem auto; } .duration-control, .section-heading, .test-footer { align-items: start; flex-direction: column; } }
