:root {
  --orange: #e85d04;
  --orange-accent: #ff7a2f;
  --orange-deep: #c44d00;
  --orange-soft: rgba(232, 93, 4, .10);
  --bg: #f6f7fa;
  --bg-alt: #eef1f5;
  --surface: #ffffff;
  --surface-2: #f9fafc;
  --surface-strong: #121a2a;
  --text: #172033;
  --text-strong: #0d1422;
  --muted: #6f7888;
  --muted-2: #9aa2af;
  --border: #dfe3e9;
  --border-strong: #cdd3dc;
  --download: #e85d04;
  --upload: #ff8a4c;
  --ping: #e4a100;
  --jitter: #7c63c9;
  --danger: #d93b3b;
  --success: #1b9a5a;
  --header-bg: rgba(255,255,255,.92);
  --shadow-sm: 0 8px 24px rgba(20, 28, 45, .07);
  --shadow: 0 24px 70px rgba(20, 28, 45, .12);
  --gauge-track: #e5e8ed;
  --gauge-tick: #858d9a;
  --input-bg: #fff;
  color-scheme: light;
}

html[data-theme="dark"] {
  --bg: #080b11;
  --bg-alt: #0c111b;
  --surface: #111722;
  --surface-2: #151d2a;
  --surface-strong: #080b11;
  --text: #eef2f8;
  --text-strong: #ffffff;
  --muted: #a4adbb;
  --muted-2: #798392;
  --border: rgba(255,255,255,.11);
  --border-strong: rgba(255,255,255,.18);
  --header-bg: rgba(7, 10, 15, .91);
  --shadow-sm: 0 10px 28px rgba(0,0,0,.28);
  --shadow: 0 28px 80px rgba(0,0,0,.38);
  --gauge-track: #272d37;
  --gauge-tick: #9ba3af;
  --input-bg: #0d131d;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--text);
  background:
    radial-gradient(circle at 50% 6rem, rgba(232,93,4,.08), transparent 24rem),
    var(--bg);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  line-height: 1.5;
  transition: background-color .25s ease, color .25s ease;
}
button, select { font: inherit; }
button { color: inherit; }
button:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid rgba(232,93,4,.35); outline-offset: 3px; }
img, svg { display: block; }
h1, h2, h3, p { margin-top: 0; }
h2 { margin-bottom: .35rem; color: var(--text-strong); font-size: clamp(1.25rem, 2.6vw, 1.7rem); }
h3 { margin: 0; color: var(--text-strong); font-size: 1.05rem; }
.mono { font-family: "Roboto Mono", ui-monospace, monospace; }
.visually-hidden { position: absolute!important; width: 1px!important; height: 1px!important; padding: 0!important; margin: -1px!important; overflow: hidden!important; clip: rect(0,0,0,0)!important; white-space: nowrap!important; border: 0!important; }
.skip-link { position: fixed; left: 1rem; top: -5rem; z-index: 999; padding: .75rem 1rem; color: #111; background: #fff; border-radius: .5rem; }
.skip-link:focus { top: 1rem; }

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 40;
  height: 68px;
  background: var(--header-bg);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 0 rgba(232,93,4,.08);
  backdrop-filter: blur(18px);
}
.header-inner {
  width: min(1220px, calc(100% - 2rem));
  height: 100%;
  margin: auto;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.2rem;
}
.brand { display: inline-flex; align-items: center; gap: .7rem; width: fit-content; color: var(--text-strong); text-decoration: none; }
.brand img { filter: drop-shadow(0 5px 13px rgba(232,93,4,.18)); }
.brand-copy { display: flex; flex-direction: column; line-height: 1.03; letter-spacing: .035em; }
.brand-copy strong { font-size: .92rem; }
.brand-copy small { margin-top: .22rem; color: var(--orange); font-size: .58rem; font-weight: 700; letter-spacing: .2em; }
.header-nav { display: flex; align-items: center; gap: .15rem; }
.nav-button {
  display: inline-flex;
  align-items: center;
  gap: .42rem;
  padding: .55rem .75rem;
  border: 0;
  color: var(--muted);
  background: transparent;
  border-radius: 999px;
  cursor: pointer;
  font-size: .78rem;
  font-weight: 600;
}
.nav-button:hover { color: var(--text-strong); background: var(--orange-soft); }
.nav-button svg { width: 15px; fill: currentColor; }
.header-actions { justify-self: end; display: flex; align-items: center; gap: .75rem; }
.server-button {
  display: flex;
  align-items: center;
  gap: .58rem;
  max-width: 295px;
  min-width: 205px;
  padding: .48rem .75rem;
  border: 1px solid var(--border);
  color: var(--text);
  background: var(--surface-2);
  border-radius: 999px;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
}
.server-button:hover { border-color: rgba(232,93,4,.42); }
.server-copy { min-width: 0; display: flex; flex: 1; flex-direction: column; text-align: left; line-height: 1.08; }
.server-copy small { color: var(--muted-2); font-size: .5rem; font-weight: 700; letter-spacing: .13em; }
.server-copy strong { margin-top: .16rem; overflow: hidden; color: var(--text-strong); text-overflow: ellipsis; white-space: nowrap; font-size: .7rem; }
.server-button > svg { width: 15px; flex: 0 0 auto; fill: var(--muted); }
.status-dot { width: .55rem; height: .55rem; flex: 0 0 auto; border-radius: 50%; background: #e4a100; box-shadow: 0 0 0 4px rgba(228,161,0,.12); }
.status-dot.ready { background: var(--success); box-shadow: 0 0 0 4px rgba(27,154,90,.12); }
.theme-toggle {
  display: flex;
  align-items: center;
  gap: .3rem;
  height: 38px;
  padding: 0 .45rem;
  border: 1px solid var(--border);
  background: var(--surface-2);
  border-radius: 999px;
  cursor: pointer;
}
.theme-toggle > span:not(.toggle-track) { width: 16px; color: var(--muted); text-align: center; font-size: .76rem; }
.toggle-track { position: relative; width: 31px; height: 17px; background: var(--border-strong); border-radius: 999px; }
.toggle-track span { position: absolute; top: 3px; left: 3px; width: 11px; height: 11px; background: var(--surface); border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .2s ease; }
html[data-theme="dark"] .toggle-track { background: var(--orange); }
html[data-theme="dark"] .toggle-track span { transform: translateX(14px); }

main { padding-top: 68px; }
.shared-result-banner { position: sticky; top: 68px; z-index: 30; display: flex; align-items: center; justify-content: center; gap: 1rem; padding: .75rem 1rem; color: #5e2600; background: #fff0e5; box-shadow: 0 8px 24px rgba(0,0,0,.12); }
.shared-result-banner div { display: flex; gap: .6rem; flex-wrap: wrap; justify-content: center; }
.shared-result-banner button { border: 0; color: inherit; background: transparent; cursor: pointer; font-size: 1.3rem; }

.speed-stage {
  min-height: 720px;
  padding: 1.6rem 1rem 2.5rem;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.test-tabs { display: flex; align-items: center; gap: .4rem; min-height: 34px; margin-bottom: .8rem; }
.test-tab { padding: .45rem .62rem; border: 0; color: var(--muted-2); background: transparent; border-radius: .55rem; cursor: pointer; font-size: .66rem; font-weight: 600; letter-spacing: .035em; }
.test-tab span { margin-right: .22rem; }
.test-tab.active { color: var(--orange); background: var(--orange-soft); }
.test-tab:hover { color: var(--text-strong); }
.test-console { width: min(690px, 100%); text-align: center; }
.headline-results { min-height: 78px; display: grid; grid-template-columns: 1fr 1fr; gap: 5rem; align-items: start; padding: 0 3.6rem; }
.headline-metric { min-width: 0; }
.metric-label { display: flex; align-items: center; justify-content: center; gap: .3rem; color: var(--muted); font-size: .74rem; font-weight: 500; letter-spacing: .01em; }
.metric-label small { color: var(--muted-2); font-size: .7rem; }
.metric-icon { width: 18px; height: 18px; display: inline-grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-weight: 700; line-height: 1; }
.download-metric .metric-icon { color: var(--download); }
.upload-metric .metric-icon { color: var(--upload); }
.headline-metric > strong { display: block; min-height: 48px; margin-top: .08rem; color: var(--text-strong); font-size: clamp(2.15rem, 6vw, 3.05rem); font-weight: 300; line-height: 1; letter-spacing: -.055em; font-variant-numeric: tabular-nums; }
.metric-progress { width: 100%; height: 2px; margin-top: .4rem; overflow: hidden; background: var(--border); border-radius: 999px; }
.metric-progress span { display: block; width: 0; height: 100%; background: linear-gradient(90deg, var(--orange-deep), var(--orange-accent)); transition: width .2s linear; }
.latency-row { position: relative; min-height: 35px; display: flex; align-items: center; justify-content: center; gap: 1.05rem; margin-top: .2rem; color: var(--muted); font-size: .73rem; }
.latency-title { color: var(--text); }
.latency-item { display: inline-flex; align-items: center; gap: .32rem; }
.latency-item i { width: 17px; height: 17px; display: grid; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-style: normal; font-size: .62rem; }
.latency-item.ping i { color: var(--ping); }
.latency-item.jitter i { color: var(--jitter); }
.latency-item strong { min-width: 26px; color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
.latency-progress { position: absolute; left: 50%; bottom: -2px; width: 140px; height: 1px; transform: translateX(-50%); overflow: hidden; background: transparent; }
.latency-progress span { display: block; width: 0; height: 100%; background: var(--ping); }
.quality-chip { padding: .18rem .46rem; color: var(--muted); background: var(--surface-2); border: 1px solid var(--border); border-radius: 999px; font-size: .58rem; }
.connection-summary { width: min(520px, 100%); margin: -.25rem auto 0; display: grid; grid-template-columns: 1fr 82px 1fr; align-items: center; gap: .7rem; }
.connection-party { display: flex; align-items: center; gap: .68rem; min-width: 0; text-align: left; }
.connection-party > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.connection-party strong, .connection-party small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.connection-party strong { color: var(--text-strong); font-size: .85rem; font-weight: 500; }
.connection-party small { color: var(--muted); font-size: .68rem; }
.party-icon { width: 39px; height: 39px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid var(--border-strong); border-radius: 50%; background: var(--surface); }
.party-icon svg { width: 18px; fill: var(--muted); }
.connection-link { display: flex; align-items: center; justify-content: center; }
.connection-link i { width: 28px; height: 1px; background: var(--border-strong); }
.connection-link b { width: 8px; height: 8px; border: 2px solid var(--orange); border-radius: 50%; }
.test-message { min-height: 1.4rem; max-width: 620px; margin: 1rem auto .3rem; color: var(--muted); font-size: .76rem; }
.test-message.error { color: var(--danger); }
.cancel-test-button { margin-top: .25rem; color: var(--danger); }
.action-buttons { display: flex; justify-content: center; gap: .7rem; margin-top: .85rem; }
.primary-button, .secondary-button { min-height: 42px; padding: .68rem 1.2rem; border-radius: 999px; font-weight: 700; cursor: pointer; }
.primary-button { width: 100%; border: 0; color: #fff; background: linear-gradient(135deg, var(--orange-deep), var(--orange-accent)); box-shadow: 0 8px 20px rgba(232,93,4,.2); }
.primary-button:hover { filter: brightness(1.04); }
.secondary-button { border: 1px solid rgba(232,93,4,.45); color: var(--orange-deep); background: var(--orange-soft); }
html[data-theme="dark"] .secondary-button { color: var(--orange-accent); }
.compact-button { width: auto; min-width: 120px; }
.text-button { padding: .35rem .45rem; border: 0; color: var(--orange); background: transparent; cursor: pointer; font-size: .72rem; font-weight: 600; }

.results-section, .network-section, .history-section { width: min(1120px, calc(100% - 2rem)); margin: 0 auto 2rem; }
.results-section { scroll-margin-top: 90px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 2rem; margin-bottom: 1rem; }
.section-heading > p { max-width: 520px; margin-bottom: .2rem; color: var(--muted); text-align: right; font-size: .78rem; }
.section-heading.compact { align-items: center; }
.eyebrow { margin: 0 0 .3rem; color: var(--orange); font-size: .62rem; font-weight: 700; letter-spacing: .16em; }
.result-date { color: var(--muted); font-size: .72rem; }
.proof-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: .75rem; }
.proof-card { min-width: 0; min-height: 92px; display: flex; align-items: center; gap: .72rem; padding: .9rem 1rem; background: var(--surface); border: 1px solid var(--border); border-radius: 15px; box-shadow: var(--shadow-sm); }
.proof-card.wide { grid-column: span 2; }
.proof-icon { width: 34px; height: 34px; flex: 0 0 auto; display: grid; place-items: center; color: var(--orange); background: var(--orange-soft); border-radius: 50%; font-size: .85rem; font-weight: 700; }
.proof-card > div { min-width: 0; display: flex; flex-direction: column; }
.proof-card small { color: var(--muted-2); font-size: .54rem; font-weight: 700; letter-spacing: .11em; }
.proof-card strong { margin-top: .16rem; overflow: hidden; color: var(--text-strong); text-overflow: ellipsis; white-space: nowrap; font-size: .72rem; }
#backend-status.verified { color: var(--success); }
.network-section { margin-top: 3.2rem; }
.network-grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 1rem; align-items: stretch; }
.network-card { min-width: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: 20px; box-shadow: var(--shadow-sm); }
.card-heading { min-height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1rem 1.2rem; border-bottom: 1px solid var(--border); }
.card-kicker { color: var(--orange); font-size: .55rem; font-weight: 700; letter-spacing: .14em; }
.card-symbol { width: 38px; height: 38px; display: grid; place-items: center; color: var(--orange); background: var(--orange-soft); border-radius: 12px; font-size: .7rem; font-weight: 700; }

.site-footer { display: grid; grid-template-columns: 1fr 1.35fr 1fr; align-items: center; gap: 2rem; padding: 1.45rem max(1rem, calc((100% - 1120px) / 2)); color: var(--muted); background: var(--surface); border-top: 1px solid var(--border); font-size: .68rem; }
.footer-brand { display: flex; align-items: center; gap: .65rem; }
.footer-brand span { display: flex; flex-direction: column; }
.footer-brand strong { color: var(--text-strong); }
.footer-brand small { color: var(--orange); }
.site-footer p { margin: 0; text-align: center; }
.engine-credit { text-align: right!important; }

.settings-modal { width: min(590px, calc(100% - 2rem)); padding: 0; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 22px; box-shadow: var(--shadow); }
.settings-modal::backdrop { background: rgba(3, 6, 12, .66); backdrop-filter: blur(6px); }
.settings-modal form { padding: 1.4rem; }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 1rem; }
.close-button { width: 36px; height: 36px; display: grid; place-items: center; border: 1px solid var(--border); color: var(--muted); background: var(--surface-2); border-radius: 50%; cursor: pointer; font-size: 1.3rem; }
.settings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .85rem; margin: 1rem 0; }
.settings-grid label:first-child { grid-column: 1 / -1; }
.settings-modal label { display: flex; flex-direction: column; gap: .4rem; color: var(--muted); font-size: .72rem; }
.settings-modal select { width: 100%; min-height: 44px; padding: .7rem .8rem; color: var(--text); background: var(--input-bg); border: 1px solid var(--border); border-radius: .7rem; }
.settings-note { margin: 1rem 0; padding: .85rem; background: var(--orange-soft); border: 1px solid rgba(232,93,4,.22); border-radius: .75rem; }
.settings-note p { margin: .2rem 0 0; color: var(--muted); font-size: .72rem; }
.toast { position: fixed; z-index: 100; left: 50%; bottom: 1.5rem; transform: translateX(-50%); padding: .75rem 1rem; color: #fff; background: #171e2a; border-radius: 999px; box-shadow: var(--shadow); font-weight: 700; font-size: .75rem; }
[hidden] { display: none!important; }

@media (max-width: 980px) {
  .header-inner { grid-template-columns: 1fr auto; }
  .header-nav { display: none; }
  .proof-grid { grid-template-columns: repeat(2, 1fr); }
  .network-grid { grid-template-columns: 1fr; }
  .site-footer { grid-template-columns: 1fr; text-align: center; }
  .footer-brand { justify-content: center; }
  .engine-credit { text-align: center!important; }
}

@media (max-width: 700px) {
  .site-header { height: 62px; }
  .header-inner { width: calc(100% - 1.2rem); gap: .5rem; }
  .brand-copy small { display: none; }
  .brand img { width: 35px; height: 35px; }
  .server-button { min-width: 0; max-width: 165px; padding: .42rem .58rem; }
  .server-copy small { display: none; }
  .server-copy strong { font-size: .62rem; }
  .theme-toggle > span:not(.toggle-track) { display: none; }
  main { padding-top: 62px; }
  .shared-result-banner { top: 62px; }
  .speed-stage { min-height: 660px; padding-top: 1rem; }
  .headline-results { gap: 1.2rem; padding: 0 1rem; }
  .connection-summary { grid-template-columns: 1fr 40px 1fr; }
  .connection-link i { width: 11px; }
  .party-icon { width: 34px; height: 34px; }
  .connection-party { gap: .45rem; }
  .connection-party strong { font-size: .72rem; }
  .connection-party small { font-size: .59rem; }
  .proof-card.wide { grid-column: span 1; }
  .section-heading { align-items: flex-start; flex-direction: column; gap: .25rem; }
  .section-heading > p { text-align: left; }
  .settings-grid { grid-template-columns: 1fr; }
  .settings-grid label:first-child { grid-column: auto; }
}

@media (max-width: 620px) {
  .brand-copy strong { font-size: .78rem; }
  .proof-grid { grid-template-columns: 1fr; }
  .latency-row { gap: .62rem; }
  .quality-chip { display: none; }
  .results-section, .network-section, .history-section { width: min(100% - 1.1rem, 1120px); }
  .site-footer { padding: 1.2rem; }
}

@media (max-width: 420px) {
  .brand-copy { display: none; }
  .server-button { max-width: 145px; }
  .headline-results { gap: .5rem; padding: 0; }
  .metric-label { font-size: .64rem; }
  .metric-label small { display: none; }
  .connection-summary { grid-template-columns: 1fr 28px 1fr; }
  .connection-party { align-items: flex-start; flex-direction: column; text-align: center; }
  .connection-party > span:last-child { width: 100%; }
  .party-icon { margin: auto; }
}

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

/* v1.3 compact completed state and social sharing */
.completed-summary {
  width: min(540px, 100%);
  margin: .9rem auto 0;
  padding: 1rem 1.05rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow-sm);
}
.completed-identity {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: baseline;
  gap: .2rem .8rem;
  padding-bottom: .85rem;
  border-bottom: 1px solid var(--border);
  text-align: left;
}
.completed-identity > span {
  grid-column: 1 / -1;
  color: var(--muted-2);
  font-size: .56rem;
  font-weight: 700;
  letter-spacing: .13em;
}
.completed-identity strong {
  color: var(--orange);
  font-size: 1.05rem;
  overflow-wrap: anywhere;
}
.completed-identity p {
  margin: 0;
  color: var(--text);
  font-size: .72rem;
  text-align: right;
}
.share-heading {
  margin: .8rem 0 .55rem;
  color: var(--muted);
  font-size: .64rem;
  font-weight: 600;
}
.social-share {
  display: flex;
  justify-content: center;
  gap: .55rem;
}
.social-button {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border: 0;
  border-radius: 50%;
  color: #fff;
  cursor: pointer;
  font-size: .75rem;
  font-weight: 800;
  box-shadow: 0 7px 18px rgba(0,0,0,.12);
  transition: transform .18s ease, filter .18s ease;
}
.social-button:hover { transform: translateY(-2px); filter: brightness(1.05); }
.social-button.whatsapp { background: #25d366; }
.social-button.facebook { background: #1877f2; font-size: 1rem; }
.social-button.x-share { background: #111; }
.social-button.linkedin { background: #0a66c2; }
.social-button.copy-link { color: var(--text-strong); background: var(--surface-2); border: 1px solid var(--border); }
.more-details-button {
  margin-top: .85rem;
  padding: .35rem .7rem;
  border: 0;
  color: var(--orange);
  background: transparent;
  cursor: pointer;
  font-size: .7rem;
  font-weight: 700;
}
.more-details-button::after { content: " ↓"; }
.more-details-button[aria-expanded="true"]::after { content: " ↑"; }
.details-container { padding-top: .35rem; }

.public-test-providers {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .8rem .9rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: .75rem;
}
.public-test-providers > div:first-child { display: flex; flex-direction: column; gap: .15rem; }
.public-test-providers strong { color: var(--text-strong); font-size: .72rem; }
.public-test-providers span { color: var(--muted); font-size: .62rem; }
.provider-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .4rem; }
.provider-links a {
  padding: .34rem .58rem;
  color: var(--orange-deep);
  background: var(--orange-soft);
  border: 1px solid rgba(232,93,4,.2);
  border-radius: 999px;
  text-decoration: none;
  font-size: .62rem;
  font-weight: 700;
}
html[data-theme="dark"] .provider-links a { color: var(--orange-accent); }

@media (max-width: 620px) {
  .completed-identity { grid-template-columns: 1fr; }
  .completed-identity p { text-align: left; }
  .public-test-providers { align-items: flex-start; flex-direction: column; }
  .provider-links { justify-content: flex-start; }
}

/* v1.4 startup provider detection and collision-safe live metrics */
.test-console { container-type: inline-size; }
.headline-results {
  width: 100%;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(1rem, 8vw, 5rem);
}
.headline-metric { overflow: hidden; }
.headline-metric > strong {
  width: 100%;
  min-width: 0;
  min-height: 52px;
  display: grid;
  place-items: center;
  overflow: hidden;
  white-space: nowrap;
  text-overflow: clip;
  font-size: clamp(1.75rem, 8.5cqw, 3.05rem);
  line-height: 1.08;
  letter-spacing: -.045em;
}
.metric-label { min-height: 20px; white-space: nowrap; }
.latency-row { flex-wrap: wrap; row-gap: .35rem; }

.idle-provider {
  width: fit-content;
  max-width: min(430px, 100%);
  min-height: 58px;
  margin: -.55rem auto .25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .7rem;
  padding: .45rem .85rem;
  color: var(--text);
  border-radius: 999px;
  transition: opacity .22s ease, transform .22s ease;
}
.provider-globe {
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  color: var(--muted);
}
.provider-globe svg { width: 25px; height: 25px; fill: currentColor; }
.provider-copy { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.provider-name-row { min-width: 0; display: flex; align-items: center; gap: .48rem; }
.provider-name-row strong {
  max-width: min(320px, 62vw);
  overflow: hidden;
  color: var(--success);
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 1rem;
  font-weight: 650;
}
.provider-name-row i {
  width: 10px;
  height: 10px;
  flex: 0 0 auto;
  border-right: 3px solid var(--success);
  border-bottom: 3px solid var(--success);
  transform: translateY(-2px) rotate(45deg);
  border-radius: 1px;
}
.provider-copy small { margin-top: .18rem; color: var(--muted); font-size: .7rem; font-weight: 500; }

body:not([data-test-state="IDLE"]):not([data-test-state="SELECTING"]):not([data-test-state="VERIFYING"]) .idle-provider {
  position: absolute;
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px);
}
body[data-test-state="IDLE"] .connection-summary,
body[data-test-state="SELECTING"] .connection-summary,
body[data-test-state="VERIFYING"] .connection-summary { display: none; }
body[data-test-state="IDLE"] .idle-provider,
body[data-test-state="SELECTING"] .idle-provider,
body[data-test-state="VERIFYING"] .idle-provider { opacity: 1; transform: none; }
body[data-test-state="SELECTING"] .provider-globe,
body[data-test-state="VERIFYING"] .provider-globe { animation: provider-turn 1.8s linear infinite; }
body[data-test-state="SELECTING"] .provider-name-row strong,
body[data-test-state="VERIFYING"] .provider-name-row strong { animation: provider-soft-blink 1.15s ease-in-out infinite; }

@keyframes provider-turn { to { transform: rotate(360deg); } }
@keyframes provider-soft-blink { 0%,100% { opacity: .48; } 50% { opacity: 1; } }

@container (max-width: 480px) {
  .headline-results { gap: .45rem; padding-inline: 0; }
  .headline-metric > strong { min-height: 43px; font-size: clamp(1.48rem, 10cqw, 2.3rem); }
  .metric-label { gap: .2rem; font-size: .61rem; }
  .metric-label small { display: none; }
  .latency-row { gap: .5rem; }
}

@media (max-width: 420px) {
  .idle-provider { margin-top: -.9rem; padding-inline: .35rem; }
  .provider-name-row strong { max-width: 220px; font-size: .9rem; }
  .provider-copy small { font-size: .64rem; }
}
body:not([data-test-state="IDLE"]):not([data-test-state="SELECTING"]):not([data-test-state="VERIFYING"]) .idle-provider { display: none; }
.headline-results, .latency-row { transition: opacity .2s ease, transform .2s ease; }
body[data-test-state="IDLE"] .headline-results,
body[data-test-state="IDLE"] .latency-row,
body[data-test-state="SELECTING"] .headline-results,
body[data-test-state="SELECTING"] .latency-row,
body[data-test-state="VERIFYING"] .headline-results,
body[data-test-state="VERIFYING"] .latency-row {
  visibility: hidden;
  opacity: 0;
  transform: translateY(-4px);
}
/* Keep the ready/loading screen compact; live metrics appear only after measurement starts. */
body[data-test-state="IDLE"] .headline-results,
body[data-test-state="IDLE"] .latency-row,
body[data-test-state="SELECTING"] .headline-results,
body[data-test-state="SELECTING"] .latency-row,
body[data-test-state="VERIFYING"] .headline-results,
body[data-test-state="VERIFYING"] .latency-row { display: none; }
