/* Internet speed test. Colors come from resources.css so the tool matches the other /tools pages in both themes.
   Nothing that changes while a test runs uses filters or blur, so frames stay cheap. */

.st-page {
    --st-ink: var(--resource-ink, #18233b);
    --st-muted: var(--resource-muted, #65718a);
    --st-line: var(--resource-line, #e5e9f1);
    --st-surface: var(--resource-surface, #fff);
    --st-soft: var(--resource-soft, #f7f8fc);
    --st-accent: var(--resource-accent, #4f46e5);
    --st-primary: #4f46e5;
    --st-primary-hover: #4338ca;
    --st-latency: #d97706;
    --st-jitter: #ea580c;
    --st-down: #4f46e5;
    --st-up: #0891b2;
    --st-good: #059669;
    --st-ok: #2563eb;
    --st-warn: #d97706;
    --st-bad: #dc2626;
    overflow-x: clip;
}
.dark .st-page {
    --st-primary: #6366f1;
    --st-primary-hover: #818cf8;
    --st-latency: #fbbf24;
    --st-jitter: #fb923c;
    --st-down: #a5b4fc;
    --st-up: #22d3ee;
    --st-good: #34d399;
    --st-ok: #60a5fa;
    --st-warn: #fbbf24;
    --st-bad: #f87171;
}
.st-page .st-container { width: min(100%, 1100px); margin-inline: auto; padding-inline: 24px; }
.st-page .st-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Stage */

.st-stage { padding: 116px 0 48px; border-bottom: 1px solid var(--st-line); background: linear-gradient(120deg, #fafbff, #f1f3ff); }
.dark .st-stage { background: linear-gradient(120deg, #141d31, #1c2340); }
.st-head { max-width: 720px; }
.st-eyebrow { display: block; margin-bottom: 10px; color: var(--st-accent); font-size: .7rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.st-head h1 { margin: 0; color: var(--st-ink); font-size: clamp(1.9rem, 4vw, 2.7rem); font-weight: 800; line-height: 1.2; letter-spacing: -.035em; }
.st-head p { max-width: 680px; margin: 11px 0 0; color: var(--st-muted); font-size: 1rem; line-height: 1.7; }

/* ---------- Instrument panel */

.st-device {
    --st-phase: var(--st-down);
    position: relative; margin: 28px 0 0; padding: 20px 28px 0;
    border: 1px solid var(--st-line); border-radius: 16px; color: var(--st-ink); background: var(--st-surface);
    box-shadow: 0 8px 30px rgba(15, 23, 42, .05);
}
.st-device[data-phase="latency"] { --st-phase: var(--st-latency); }
.st-device[data-phase="up"] { --st-phase: var(--st-up); }

.st-device-top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.st-steps { display: flex; gap: 14px; margin: 0; padding: 0; list-style: none; }
.st-steps li { --p: 0; display: grid; gap: 7px; min-width: 88px; color: var(--st-muted); font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.st-steps li[data-step="latency"] { --st-step: var(--st-latency); }
.st-steps li[data-step="down"] { --st-step: var(--st-down); }
.st-steps li[data-step="up"] { --st-step: var(--st-up); }
.st-steps i { display: block; height: 4px; overflow: hidden; border-radius: 2px; background: var(--st-line); }
.st-steps b { display: block; width: 100%; height: 100%; background: var(--st-step); transform: scaleX(var(--p)); transform-origin: left; transition: transform .2s linear; }
.st-steps li.is-active { color: var(--st-ink); }
.st-steps li.is-done b { transform: none; }
.st-units { display: inline-flex; padding: 3px; border: 1px solid var(--st-line); border-radius: 8px; background: var(--st-soft); }
.st-units button { min-height: 32px; padding: 5px 12px; border: 0; border-radius: 6px; color: var(--st-muted); background: transparent; font: inherit; font-size: .78rem; font-weight: 700; cursor: pointer; }
.st-units button[aria-pressed="true"] { color: #fff; background: var(--st-primary); }
.st-units button:hover:not([aria-pressed="true"]) { color: var(--st-ink); }

.st-core { display: grid; grid-template-columns: minmax(0, 1fr) minmax(280px, 400px) minmax(0, 1fr); align-items: center; gap: clamp(12px, 3vw, 32px); padding: 12px 0 4px; }
.st-side { display: grid; gap: 12px; }
.st-side-left { justify-items: end; }
.st-stat { width: min(100%, 230px); padding: 16px 18px; border: 1px solid var(--st-line); border-radius: 12px; background: var(--st-soft); transition: border-color .2s, box-shadow .2s; }
.st-stat[data-stat="ping"] { --st-dot: var(--st-latency); }
.st-stat[data-stat="jitter"] { --st-dot: var(--st-jitter); }
.st-stat[data-stat="down"] { --st-dot: var(--st-down); }
.st-stat[data-stat="up"] { --st-dot: var(--st-up); }
.st-stat-label { display: flex; align-items: center; gap: 8px; color: var(--st-muted); font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.st-stat-label i { width: 8px; height: 8px; border-radius: 2px; background: var(--st-dot); }
.st-stat strong { display: flex; align-items: baseline; gap: 6px; margin-top: 8px; font-size: clamp(1.5rem, 2.4vw, 1.9rem); font-weight: 800; line-height: 1.1; letter-spacing: -.025em; font-variant-numeric: tabular-nums; }
.st-stat output { color: var(--st-ink); }
.st-stat.is-empty output { color: var(--st-muted); font-weight: 500; }
.st-stat small { color: var(--st-muted); font-size: .8rem; font-weight: 600; letter-spacing: 0; }
.st-stat em { display: block; margin-top: 6px; overflow: hidden; color: var(--st-muted); font-size: .75rem; font-style: normal; white-space: nowrap; text-overflow: ellipsis; }
.st-stat.is-active { border-color: var(--st-dot); box-shadow: inset 0 0 0 1px var(--st-dot); }

/* ---------- Gauge */

.st-gauge { position: relative; width: 100%; aspect-ratio: 1; }
.st-gauge-svg { display: block; width: 100%; height: 100%; overflow: visible; }
.st-arc-track { fill: none; stroke: var(--st-line); stroke-width: 12; stroke-linecap: round; }
.st-arc-value { fill: none; stroke: var(--st-phase); stroke-width: 12; stroke-linecap: round; transition: stroke .3s, opacity .3s; }
.st-tick { stroke: var(--st-line); stroke-width: 2; stroke-linecap: round; }
.st-tick-minor { fill: var(--st-line); }
.st-tick-label { fill: var(--st-muted); font-size: 13px; font-weight: 600; font-variant-numeric: tabular-nums; }
.st-tick-label.is-passed { fill: var(--st-ink); }
.st-comet { fill: var(--st-surface); stroke: var(--st-phase); stroke-width: 4; opacity: 0; transition: opacity .3s, stroke .3s; }
.st-comet.is-visible { opacity: 1; }

.st-readout { position: absolute; inset: 0; display: grid; place-items: center; }
.st-readout > * { grid-area: 1 / 1; }
.st-start {
    display: grid; place-content: center; gap: 4px; width: 44%; aspect-ratio: 1; border: 0; border-radius: 50%; cursor: pointer;
    color: #fff; background: var(--st-primary); box-shadow: 0 6px 18px rgba(79, 70, 229, .25);
    transition: background .15s, box-shadow .15s;
}
.st-start:hover { background: var(--st-primary-hover); box-shadow: 0 8px 24px rgba(79, 70, 229, .32); }
.st-start:focus-visible { outline: 3px solid var(--st-primary); outline-offset: 6px; }
.st-start-text { font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; letter-spacing: -.02em; line-height: 1; }
.st-start-sub { color: rgba(255, 255, 255, .8); font-size: .72rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }

.st-live { display: grid; justify-items: center; gap: 2px; margin-top: -4%; text-align: center; }
.st-live-label { color: var(--st-phase); font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.st-live-value { color: var(--st-ink); font-size: clamp(2.8rem, 7vw, 4.4rem); font-weight: 800; line-height: 1; letter-spacing: -.04em; font-variant-numeric: tabular-nums; }
.st-live-unit { color: var(--st-muted); font-size: .92rem; font-weight: 600; }
.st-error { display: grid; gap: 6px; max-width: 62%; text-align: center; }
.st-error strong { color: var(--st-bad); font-size: 1.02rem; font-weight: 800; }
.st-error p { margin: 0; color: var(--st-muted); font-size: .84rem; line-height: 1.55; }
.st-gauge-actions { align-self: end; margin-bottom: 7%; display: flex; gap: 8px; }
.st-chip-button { display: inline-flex; align-items: center; gap: 7px; min-height: 38px; padding: 8px 16px; border: 1px solid var(--st-line); border-radius: 8px; color: var(--st-ink); background: var(--st-surface); font: inherit; font-size: .82rem; font-weight: 700; cursor: pointer; transition: background .15s, border-color .15s; }
.st-chip-button:hover { border-color: var(--st-primary); }
.st-chip-button svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.st-chip-primary { border-color: var(--st-primary); color: #fff; background: var(--st-primary); }
.st-chip-primary:hover { border-color: var(--st-primary-hover); background: var(--st-primary-hover); }
.st-chip-button:focus-visible, .st-units button:focus-visible, .st-ip-toggle:focus-visible { outline: 2px solid var(--st-primary); outline-offset: 3px; }

.st-live, .st-error, #stStop, #stAgain { display: none; }
.st-device[data-state="running"] .st-start,
.st-device[data-state="done"] .st-start,
.st-device[data-state="error"] .st-start { display: none; }
.st-device[data-state="running"] .st-live { display: grid; }
.st-device[data-state="error"] .st-error { display: grid; }
.st-device[data-state="running"] #stStop,
.st-device[data-state="error"] #stAgain { display: inline-flex; }

/* ---------- Finished: the gauge steps aside and the results take the stage */

.st-final { display: none; }
.st-device[data-state="done"] .st-gauge { display: none; }
.st-device[data-state="done"] .st-core { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "final final" "down up" "ping jitter"; gap: 14px; padding: 20px 0 12px; }
.st-device[data-state="done"] .st-side { display: contents; }
.st-device[data-state="done"] .st-stat { width: 100%; }
.st-device[data-state="done"] .st-stat[data-stat="ping"] { grid-area: ping; }
.st-device[data-state="done"] .st-stat[data-stat="jitter"] { grid-area: jitter; }
.st-device[data-state="done"] .st-stat[data-stat="down"] { grid-area: down; }
.st-device[data-state="done"] .st-stat[data-stat="up"] { grid-area: up; }
.st-device[data-state="done"] .st-final { grid-area: final; display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 14px 24px; padding-bottom: 6px; }
.st-final-text { min-width: 0; }
.st-final-kicker { display: inline-flex; align-items: center; gap: 7px; color: var(--st-good); font-size: .72rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.st-final-kicker svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.st-final-title { display: block; margin-top: 6px; color: var(--st-ink); font-size: clamp(1.4rem, 3vw, 1.9rem); font-weight: 800; line-height: 1.2; letter-spacing: -.03em; }
.st-final-meta { display: block; margin-top: 4px; color: var(--st-muted); font-size: .86rem; }
.st-final-meta:empty { display: none; }
.st-final-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.st-final-actions a { text-decoration: none; }

.st-device[data-state="done"] :is(.st-stat[data-stat="down"], .st-stat[data-stat="up"]) { padding: 22px 24px; box-shadow: inset 0 3px 0 var(--st-dot); }
.st-device[data-state="done"] :is(.st-stat[data-stat="down"], .st-stat[data-stat="up"]) strong { flex-wrap: wrap; margin-top: 12px; font-size: clamp(2.6rem, 6.4vw, 4.4rem); letter-spacing: -.045em; }
.st-device[data-state="done"] :is(.st-stat[data-stat="down"], .st-stat[data-stat="up"]) small { font-size: 1rem; }

@keyframes st-rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.st-device[data-state="done"] :is(.st-final, .st-stat) { animation: st-rise .45s cubic-bezier(.2, .7, .2, 1) both; }
.st-device[data-state="done"] .st-stat[data-stat="down"] { animation-delay: .06s; }
.st-device[data-state="done"] .st-stat[data-stat="up"] { animation-delay: .12s; }
.st-device[data-state="done"] .st-stat[data-stat="ping"] { animation-delay: .18s; }
.st-device[data-state="done"] .st-stat[data-stat="jitter"] { animation-delay: .22s; }

/* ---------- Live chart */

.st-chart { position: relative; height: 120px; margin-top: 4px; padding-top: 22px; border-top: 1px solid var(--st-line); }
.st-chart svg { display: block; width: 100%; height: 100%; }
.st-chart-grid { stroke: var(--st-line); stroke-dasharray: 3 5; vector-effect: non-scaling-stroke; }
.st-chart-split { stroke: var(--st-line); vector-effect: non-scaling-stroke; }
.st-chart-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.st-chart-line-down { stroke: var(--st-down); }
.st-chart-line-up { stroke: var(--st-up); }
.st-chart-label { position: absolute; top: 4px; color: var(--st-muted); font-size: .72rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.st-chart-label-down { left: 0; }
.st-chart-label-up { left: calc(50.4%); }
.st-chart-scale { position: absolute; top: 4px; right: 0; color: var(--st-muted); font-size: .72rem; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- Connection strip */

.st-device-foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin: 4px -28px 0; padding: 16px 28px; border-top: 1px solid var(--st-line); border-radius: 0 0 16px 16px; background: var(--st-soft); }
.st-conn { display: grid; flex: 1; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin: 0; }
.st-conn div { min-width: 0; }
.st-conn dt { display: flex; align-items: center; gap: 8px; color: var(--st-muted); font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.st-conn dd { margin: 4px 0 0; }
.st-conn strong { display: block; overflow: hidden; color: var(--st-ink); font-size: .9rem; font-weight: 700; white-space: nowrap; text-overflow: ellipsis; font-variant-numeric: tabular-nums; }
.st-conn small { display: block; overflow: hidden; color: var(--st-muted); font-size: .74rem; white-space: nowrap; text-overflow: ellipsis; }
.st-ip-toggle { padding: 1px 8px; border: 1px solid var(--st-line); border-radius: 6px; color: var(--st-muted); background: var(--st-surface); font: inherit; font-size: .64rem; cursor: pointer; }
.st-ip-toggle:hover { color: var(--st-ink); }

.st-hint { display: flex; flex-wrap: wrap; gap: 6px 22px; margin: 16px 0 0; color: var(--st-muted); font-size: .82rem; }
.st-hint span { display: inline-flex; align-items: baseline; gap: 8px; }
.st-hint span::before { content: ""; flex: 0 0 auto; width: 5px; height: 5px; transform: translateY(-2px); border-radius: 50%; background: var(--st-muted); }

/* ---------- Report */

.st-results { padding: 40px 0 8px; scroll-margin-top: 90px; }
.st-kicker { display: block; margin-bottom: 8px; color: var(--st-accent); font-size: .7rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.st-shared { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 22px; padding: 14px 18px; border: 1px solid var(--st-line); border-left: 3px solid var(--st-primary); border-radius: 10px; color: var(--st-ink); background: var(--st-soft); font-size: .9rem; }
.st-verdict { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 18px 28px; }
.st-verdict h2 { margin: 0; color: var(--st-ink); font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 800; line-height: 1.2; letter-spacing: -.03em; }
.st-verdict p { max-width: 640px; margin: 10px 0 0; color: var(--st-muted); font-size: 1rem; line-height: 1.7; }
.st-share { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.st-share-status { min-width: 90px; color: var(--st-good); font-size: .8rem; font-weight: 700; }

.st-button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 10px 18px; border: 1px solid var(--st-primary); border-radius: 8px; color: #fff; background: var(--st-primary); font: inherit; font-size: .86rem; font-weight: 700; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s; }
.st-button:hover { color: #fff; border-color: var(--st-primary-hover); background: var(--st-primary-hover); }
.st-button svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.st-button-ghost { border-color: var(--st-line); color: var(--st-ink); background: var(--st-surface); }
.st-button-ghost:hover { color: var(--st-ink); border-color: var(--st-primary); background: var(--st-surface); }
.st-button-small { min-height: 36px; padding: 7px 14px; font-size: .8rem; }
.st-text-link { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0; border: 0; color: var(--st-accent); background: none; font: inherit; font-size: .86rem; font-weight: 700; text-decoration: none; cursor: pointer; }
.st-text-link:hover { color: var(--st-accent); text-decoration: underline; text-underline-offset: 3px; }
.st-page :is(.st-button, .st-text-link, .st-faq summary, .st-related a):focus-visible { outline: 3px solid var(--st-primary); outline-offset: 3px; }

.st-report-grid { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 16px; margin-top: 24px; }
.st-grade { --st-grade: var(--st-ok); display: flex; gap: 22px; padding: 24px; border: 1px solid var(--st-line); border-radius: 14px; background: var(--st-surface); }
.st-grade[data-grade="aplus"], .st-grade[data-grade="a"] { --st-grade: var(--st-good); }
.st-grade[data-grade="b"] { --st-grade: var(--st-ok); }
.st-grade[data-grade="c"], .st-grade[data-grade="d"] { --st-grade: var(--st-warn); }
.st-grade[data-grade="f"] { --st-grade: var(--st-bad); }
.st-grade-ring { display: grid; flex: 0 0 auto; place-items: center; width: 84px; height: 84px; border: 6px solid var(--st-grade); border-radius: 50%; }
.st-grade-ring span { color: var(--st-grade); font-size: 1.8rem; font-weight: 800; letter-spacing: -.03em; }
.st-grade h3, .st-use h3, .st-host h3, .st-history h3 { margin: 0; color: var(--st-ink); font-size: 1.06rem; font-weight: 800; letter-spacing: -.01em; }
.st-grade p { margin: 8px 0 0; color: var(--st-muted); font-size: .9rem; line-height: 1.65; }
.st-grade-values { display: grid; grid-template-columns: repeat(3, auto); justify-content: start; gap: 4px 22px; margin: 14px 0 0; }
.st-grade-values dt { color: var(--st-muted); font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.st-grade-values dd { margin: 2px 0 0; white-space: nowrap; color: var(--st-ink); font-size: 1rem; font-weight: 800; font-variant-numeric: tabular-nums; }

.st-uses { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.st-use { --st-level: var(--st-ok); display: flex; gap: 14px; padding: 18px; border: 1px solid var(--st-line); border-radius: 14px; background: var(--st-surface); }
.st-use.is-great { --st-level: var(--st-good); }
.st-use.is-limited { --st-level: var(--st-warn); }
.st-use.is-poor { --st-level: var(--st-bad); }
.st-use-icon { display: grid; flex: 0 0 auto; place-items: center; width: 40px; height: 40px; border-radius: 10px; color: var(--st-level); background: var(--st-soft); border: 1px solid var(--st-line); }
.st-use-icon svg { width: 21px; height: 21px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }
.st-use > div { min-width: 0; }
.st-use-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.st-use h3 { font-size: .98rem; }
.st-use-level { padding: 2px 8px; border: 1px solid currentColor; border-radius: 6px; color: var(--st-level); font-size: .68rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.st-use p { margin: 5px 0 0; color: var(--st-muted); font-size: .85rem; line-height: 1.55; }

.st-host { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); align-items: center; gap: 28px; margin-top: 16px; padding: 28px; border: 1px solid var(--st-line); border-radius: 14px; background: var(--st-surface); }
.st-host p { margin: 10px 0 0; color: var(--st-muted); font-size: .92rem; line-height: 1.7; }
.st-host-links { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px; margin-top: 18px; }
.st-host-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.st-host-tiles div { padding: 16px; border: 1px solid var(--st-line); border-radius: 12px; background: var(--st-soft); }
.st-host-tiles dt { color: var(--st-muted); font-size: .72rem; font-weight: 700; line-height: 1.35; }
.st-host-tiles dd { margin: 8px 0 2px; color: var(--st-ink); font-size: 1.4rem; white-space: nowrap; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.st-host-tiles small { color: var(--st-muted); font-size: .7rem; }

.st-history { margin-top: 16px; padding: 24px 26px; border: 1px solid var(--st-line); border-radius: 14px; background: var(--st-surface); }
.st-history-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.st-table-wrap { overflow-x: auto; }
.st-table { width: 100%; border-collapse: collapse; font-size: .88rem; font-variant-numeric: tabular-nums; }
.st-table th, .st-table td { padding: 12px 14px 12px 0; border-bottom: 1px solid var(--st-line); color: var(--st-ink); text-align: left; white-space: nowrap; }
.st-table thead th { color: var(--st-muted); font-size: .7rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; }
.st-table tbody th { font-weight: 700; }
.st-table tbody tr:last-child > * { border-bottom: 0; }
.st-footnote { margin: 12px 0 0; color: var(--st-muted); font-size: .8rem; line-height: 1.6; }

/* ---------- Guide */

.st-content { padding: 32px 0 90px; }
.st-section { padding: 56px 0 0; scroll-margin-top: 90px; }
.st-section h2 { max-width: 760px; margin: 0; color: var(--st-ink); font-size: clamp(1.4rem, 2.6vw, 1.8rem); font-weight: 800; line-height: 1.25; letter-spacing: -.025em; }
.st-lead { max-width: 760px; margin: 12px 0 0; color: var(--st-muted); font-size: 1rem; line-height: 1.8; }
.st-method { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 26px 0 0; padding: 0; list-style: none; }
.st-method li { padding: 22px 20px; border: 1px solid var(--st-line); border-top: 3px solid var(--st-method); border-radius: 12px; background: var(--st-surface); }
.st-method li:nth-child(1) { --st-method: var(--st-latency); }
.st-method li:nth-child(2) { --st-method: var(--st-down); }
.st-method li:nth-child(3) { --st-method: var(--st-up); }
.st-method li:nth-child(4) { --st-method: var(--st-bad); }
.st-method-step { color: var(--st-muted); font-size: .74rem; font-weight: 700; letter-spacing: .06em; font-variant-numeric: tabular-nums; }
.st-method h3 { margin: 10px 0 0; color: var(--st-ink); font-size: 1rem; font-weight: 800; }
.st-method p { margin: 8px 0 0; color: var(--st-muted); font-size: .86rem; line-height: 1.7; }
.st-table-reference { margin-top: 24px; }
.st-table-reference td { color: var(--st-muted); }
.st-table-reference tbody th { min-width: 240px; white-space: normal; }
.st-section > .st-table-wrap { margin-top: 24px; padding: 4px 22px; border: 1px solid var(--st-line); border-radius: 12px; background: var(--st-surface); }
.st-section > .st-table-wrap .st-table-reference { margin-top: 0; }

.st-metric-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px 32px; margin-top: 26px; }
.st-metric-grid h3 { display: flex; align-items: center; gap: 10px; margin: 0; color: var(--st-ink); font-size: 1rem; font-weight: 800; }
.st-metric-grid p { margin: 8px 0 0; color: var(--st-muted); font-size: .9rem; line-height: 1.75; }
.st-dot { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 2px; }
.st-dot-down { background: var(--st-down); }
.st-dot-up { background: var(--st-up); }
.st-dot-ping { background: var(--st-latency); }
.st-dot-jitter { background: var(--st-jitter); }
.st-dot-load { background: var(--st-bad); }
.st-dot-grade { background: var(--st-good); }

.st-split { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: 32px; align-items: start; }
.st-tips { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.st-tips li { position: relative; padding: 16px 18px 16px 44px; border: 1px solid var(--st-line); border-radius: 12px; color: var(--st-muted); background: var(--st-surface); font-size: .9rem; line-height: 1.7; }
.st-tips li::before { content: "✓"; position: absolute; left: 18px; top: 16px; color: var(--st-good); font-size: .85rem; font-weight: 800; }
.st-tips strong { color: var(--st-ink); }

.st-faq details { border-bottom: 1px solid var(--st-line); }
.st-faq details:first-of-type { margin-top: 22px; border-top: 1px solid var(--st-line); }
.st-faq summary { position: relative; padding: 18px 36px 18px 0; color: var(--st-ink); font-size: .98rem; font-weight: 700; cursor: pointer; list-style: none; }
.st-faq summary::-webkit-details-marker { display: none; }
.st-faq summary::after { content: "+"; position: absolute; right: 4px; top: 14px; color: var(--st-accent); font-size: 1.4rem; font-weight: 400; line-height: 1.2; }
.st-faq details[open] summary::after { content: "−"; }
.st-faq details p { max-width: 820px; margin: 0; padding: 0 30px 20px 0; color: var(--st-muted); font-size: .94rem; line-height: 1.8; }
.st-faq details a { color: var(--st-accent); text-decoration: underline; text-underline-offset: 3px; }

.st-related { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 48px; }
.st-related a { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 10px 14px; border: 1px solid var(--st-line); border-radius: 8px; color: var(--st-accent); background: var(--st-soft); font-size: .84rem; font-weight: 700; text-decoration: none; }
.st-related a:hover { border-color: var(--st-accent); }

/* ---------- Responsive */

@media (max-width: 1023px) {
    .st-method { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .st-report-grid, .st-host, .st-split { grid-template-columns: 1fr; }
    .st-metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 859px) {
    .st-core { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-areas: "gauge gauge" "down up" "ping jitter"; gap: 12px; }
    .st-side { display: contents; }
    .st-gauge { grid-area: gauge; width: min(100%, 380px); justify-self: center; }
    .st-stat { width: 100%; }
    .st-stat[data-stat="ping"] { grid-area: ping; }
    .st-stat[data-stat="jitter"] { grid-area: jitter; }
    .st-stat[data-stat="down"] { grid-area: down; }
    .st-stat[data-stat="up"] { grid-area: up; }
    .st-conn { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .st-device-foot { flex-direction: column; align-items: stretch; }
}
@media (max-width: 599px) {
    .st-page .st-container { padding-inline: 16px; }
    .st-stage { padding: 96px 0 32px; }
    .st-device { margin-top: 22px; padding: 16px 16px 0; border-radius: 14px; }
    .st-device-foot { margin-inline: -16px; padding-inline: 16px; border-radius: 0 0 14px 14px; }
    .st-device-top { flex-direction: column; align-items: stretch; }
    .st-steps { justify-content: space-between; }
    .st-steps li { flex: 1; min-width: 0; font-size: .64rem; }
    .st-units { align-self: center; }
    .st-stat { padding: 14px; }
    .st-stat em { white-space: normal; }
    .st-device[data-state="done"] .st-core { gap: 10px; }
    .st-device[data-state="done"] :is(.st-stat[data-stat="down"], .st-stat[data-stat="up"]) { padding: 18px 16px; }
    .st-device[data-state="done"] :is(.st-stat[data-stat="down"], .st-stat[data-stat="up"]) strong { font-size: clamp(2rem, 10vw, 2.6rem); }
    .st-final-actions { width: 100%; }
    .st-final-actions > * { flex: 1 1 auto; justify-content: center; }
    .st-chart { height: 100px; }
    .st-method, .st-metric-grid, .st-uses, .st-host-tiles { grid-template-columns: 1fr; }
    .st-grade { flex-direction: column; padding: 22px; }
    .st-host, .st-history { padding: 22px 18px; }
    .st-share { width: 100%; }
    .st-share .st-button { flex: 1 1 auto; }
}

@media (prefers-reduced-motion: reduce) {
    .st-page *, .st-page *::before, .st-page *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
