:root { font-family: system-ui,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif; color: #1e293b; background: #fafbfe; font-synthesis: none; --muted: #64748b; --line: #dce4ee; --accent: #2563eb; --panel: #fff; --up: #67a5dc; color-scheme: light; }
* { box-sizing: border-box; }
body { margin: 0; }
main { max-width: 1000px; margin: auto; padding: 22px 30px 16px; }
a { color: inherit; }
header { display: flex; align-items: center; padding: 0 0 10px; }
.brand { display: flex; align-items: center; gap: 14px; font-size: 14px; font-weight: 750; text-decoration: none; letter-spacing: .06em; }
.brand picture,.brand img { display: block; }
.brand img { width: 145px; height: 50px; object-fit: contain; }
p { line-height: 1.5; margin: 6px 0; color: var(--muted); }
h2 { font-size: 14px; font-weight: 600; margin: 0 0 12px; }
button,input { font: inherit; font-size: 13px; border: 1px solid var(--line); border-radius: 7px; background: var(--panel); color: inherit; min-height: 42px; padding: 10px 14px; }
button { cursor: pointer; white-space: nowrap; }
button:hover { border-color: var(--accent); }
button:disabled { opacity: .5; cursor: default; }
button:focus-visible,input:focus-visible,summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.test { padding: 14px 0 16px; }
.controls { display: flex; justify-content: center; align-items: center; gap: 24px; margin-bottom: 26px; }
.primary { flex: 0 0 148px; width: 148px; height: 64px; border-radius: 11px; background: var(--accent); color: white; border: 0; font-size: 24px; font-weight: 600; letter-spacing: -.03em; transition: transform .18s,filter .18s; }
.primary:hover:not(:disabled) { filter: brightness(1.08); }
.primary:active:not(:disabled) { transform: scale(.98); }
.options { display: flex; gap: 14px; }
.switch { padding: 0; margin: 0; border: 0; min-width: 0; }
.switch legend { text-align: center; font-size: 10px; color: var(--muted); margin-bottom: 5px; width: 100%; }
.segments { display: flex; border: 1px solid var(--line); padding: 2px; border-radius: 7px; background: var(--panel); }
.segments label { position: relative; cursor: pointer; }
.segments input { position: absolute; opacity: 0; width: 1px; height: 1px; min-height: 0; padding: 0; margin: 0; }
.segments span { display: block; min-width: 34px; padding: 6px 10px; text-align: center; border-radius: 4px; font-size: 11px; line-height: 16px; color: var(--muted); transition: background .15s,color .15s; }
.segments b { font-weight: 600; margin-left: 7px; }
.segments input:checked + span { color: white; background: var(--accent); }
.segments input[disabled] + span { opacity: .4; cursor: not-allowed; }
.segments input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 4px; }
.switch:disabled { opacity: .5; }
.switch:disabled label { cursor: default; }
.metrics { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 20px; }
.metric { min-width: 0; }
.metrics h2 { color: var(--muted); font-weight: 400; margin: 0 0 6px; }
.metrics h2 span { margin-left: 4px; }
.readout { display: flex; align-items: baseline; gap: 7px; min-height: 56px; }
.metrics strong { font-size: clamp(28px,4.6vw,46px); font-weight: 500; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.unit { font-size: 12px; color: var(--muted); }
progress { display: block; width: 100%; height: 4px; appearance: none; border: none; background: var(--line); border-radius: 2px; overflow: hidden; }
progress::-webkit-progress-bar { background: var(--line); }
progress::-webkit-progress-value { background: var(--accent); }
progress::-moz-progress-bar { background: var(--accent); }
.remaining { display: block; margin-top: 6px; min-height: 15px; font-size: 11px; color: var(--muted); font-variant-numeric: tabular-nums; }
.metric.active h2,.metric.active .remaining { color: var(--accent); }
.test-status { display: flex; justify-content: space-between; align-items: center; gap: 15px; margin-top: 16px; min-height: 20px; font-size: 12px; color: var(--muted); }
.phase-wrap { display: inline-flex; align-items: center; gap: 8px; }
.protocol-badge { font-size: 10px; border: 1px solid var(--line); border-radius: 4px; padding: 2px 5px; color: var(--muted); }
.data-usage { display: flex; align-items: baseline; gap: 10px; white-space: nowrap; }
.data-usage strong { color: #202728; font-weight: 500; font-variant-numeric: tabular-nums; }
.addresses { display: grid; grid-template-columns: 1fr 1.3fr 1fr; gap: 18px; padding: 13px 0; border-top: 1px solid var(--line); }
.addresses span,.addresses strong { display: block; font-size: 12px; }
.addresses span { color: var(--muted); margin-bottom: 3px; }
.addresses strong { font-weight: 500; overflow-wrap: anywhere; }
.small { font-size: 12px; color: var(--muted); font-weight: 400; }
.details { border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 28px; padding: 18px 0; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th,td { text-align: right; border-bottom: 1px solid var(--line); padding: 8px 0; font-weight: 400; font-variant-numeric: tabular-nums; }
th:first-child { text-align: left; }
thead th { font-size: 10px; color: var(--muted); padding-top: 0; }
.charts svg { display: block; width: 100%; height: 64px; background: repeating-linear-gradient(to top,transparent 0,transparent 24px,var(--line) 25px); overflow: visible; }
.charts svg:last-child { height: 42px; }
.charts path { fill: none; stroke-width: 1.8; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.down-line { stroke: var(--accent); }
.up-line { stroke: var(--up); }
.latency-line { stroke: #a58247; }
.chart-caption { display: flex; justify-content: space-between; gap: 12px; font-size: 10px; color: var(--muted); margin: 8px 0 6px; }
.chart-caption span:first-child { color: var(--accent); }
#share-section { border-top: 1px solid var(--line); padding: 18px 0; }
.share-row { display: flex; gap: 10px; margin-top: 8px; }
.share-row input { flex: 1; min-width: 0; font-size: 12px; }
.result-link { display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; min-height: 42px; font-size: 13px; border: 1px solid var(--line); border-radius: 7px; text-decoration: none; white-space: nowrap; }
.result-link:hover { border-color: var(--accent); }
.result-link:focus-visible { outline: 2px solid var(--accent); outline-offset: 4px; }
.diagnostics { border-top: 1px solid var(--line); padding: 18px 0; }
.diagnostic-heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; }
.diagnostic-heading h2 { margin-bottom: 3px; }
#assessment { padding-top: 10px; }
#assessment article { border-left: 3px solid var(--accent); padding: 0 0 0 14px; margin: 18px 0; }
#assessment article.warn { border-color: #b07b2e; }
#assessment h3 { font-size: 13px; margin: 0; }
#assessment p { font-size: 12px; margin: 3px 0; }
#checks { display: grid; grid-template-columns: repeat(4,1fr); gap: 15px; border-block: 1px solid var(--line); padding: 15px 0; margin: 20px 0; }
#checks strong,#checks span { display: block; font-size: 12px; }
#checks span { color: var(--muted); font-size: 11px; margin-top: 5px; }
footer { border-top: 1px solid var(--line); padding: 14px 0; color: var(--muted); font-size: 11px; display: flex; justify-content: space-between; gap: 24px; }
footer details { max-width: 650px; }
footer summary { cursor: pointer; }
footer p { font-size: 11px; }
footer>span { white-space: nowrap; }
[hidden] { display: none!important; }
@media(max-width:650px) {
 main { padding: 18px; }
 .controls { gap: 18px; }
 .primary { flex-basis: 120px; width: 120px; height: 64px; }
 .options { gap: 10px; }
 .segments span { padding: 7px 8px; }
 .metrics { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; }
 .metrics strong { font-size: 38px; }
 .readout { min-height: 48px; }
 .test-status { align-items: start; flex-direction: column; gap: 6px; }
 .addresses { grid-template-columns: 1fr; gap: 8px; }
 .addresses div { display: flex; justify-content: space-between; gap: 16px; }
 .addresses span { min-width: 100px; }
 .addresses strong { text-align: right; }
 .details { grid-template-columns: 1fr; gap: 18px; }
 .diagnostic-heading { align-items: start; flex-direction: column; gap: 10px; }
 .share-row { flex-direction: column; }
 #checks { grid-template-columns: 1fr 1fr; }
 footer { flex-direction: column; gap: 10px; }
 .chart-caption { font-size: 11px; }
}
@media(prefers-color-scheme:dark) {
 :root { color: #e2e8f0; background: #111827; --muted: #a0aec0; --line: #2d3b50; --panel: #182337; --accent: #3478f6; --up: #91b9de; color-scheme: dark; }
 .primary,.segments input:checked + span { color: white; }
 .data-usage strong { color: #e3e8e4; }
 .latency-line { stroke: #c7a166; }
}
@media(max-width:480px) {
 main { padding: 18px; }
 header { gap: 12px; }
 .brand img { width: 116px; height: 40px; }
 .controls { gap: 14px; }
 .primary { flex-basis: 108px; width: 108px; height: 80px; }
 .options { flex-direction: column; gap: 6px; }
 .switch { display: flex; align-items: center; gap: 6px; }
 .switch legend { float: left; width: 36px; margin: 0; text-align: left; font-size: 10px; padding: 0; }
 .segments { flex: 1; }
 .segments label { flex: 1; }
 .segments span { min-width: 30px; padding: 6px 5px; }
 .metrics { gap: 20px; }
 .metrics strong { font-size: clamp(26px,9vw,38px); }
 .data-usage { white-space: normal; }
 .share-row input { width: 100%; }
 table { font-size: 11px; }
}
@media(prefers-reduced-motion:reduce) { .primary,.segments span { transition: none; } }
