*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.5;
    color: #1a1a1a;
    background: #f5f5f7;
    padding: 1.5rem 2rem;
    max-width: 620px;
}

nav {
    font-size: 0.82rem;
    color: #999;
    margin-bottom: 1.5rem;
    position: relative;
    z-index: 10;
}

nav a {
    color: #6c63ff;
    text-decoration: none;
}
nav a:hover { text-decoration: underline; }

h1 {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1a1a2e;
    margin-bottom: 1.25rem;
}

label {
    display: block;
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 0.75rem;
}

input[type="number"] {
    font: inherit;
    font-size: 0.85rem;
    padding: 0.25rem 0.5rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    width: 80px;
    margin-left: 0.35rem;
}

button {
    display: inline-flex;
    align-items: center;
    padding: 0.5rem 1.25rem;
    font: inherit;
    font-size: 0.85rem;
    font-weight: 500;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: #6c63ff;
    color: #fff;
    transition: background 0.12s, opacity 0.12s;
    margin-top: 0.25rem;
}
button:hover:not(:disabled) { background: #5a52e0; }
button:disabled { opacity: 0.4; cursor: default; }

#connect-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

#connect-status {
    font-size: 0.82rem;
    color: #666;
    margin-top: 0.4rem;
    min-height: 1.2rem;
}

#test-section { margin-top: 0.5rem; }

#results {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.9rem;
    margin-top: 0.75rem;
    min-height: 2.25rem;
}

#aggregate {
    background: #f0f0ff;
    border: 1px solid #c4bfff;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    font-size: 0.82rem;
    margin-top: 0.5rem;
}

code {
    font-family: 'SF Mono', 'Fira Code', 'Cascadia Code', monospace;
    background: #eee;
    padding: 0.1em 0.3em;
    border-radius: 3px;
    font-size: 0.88em;
}

latency-test { display: none; }
