:root {
  --bg: #101312;
  --panel: #171b19;
  --panel-hover: #1c211e;
  --text: #f3f5ed;
  --muted: #939c95;
  --line: #303733;
  --line-bright: #4a554e;
  --acid: #c8ff3d;
  --acid-soft: rgba(200, 255, 61, 0.1);
  --acid-dark: #161d08;
  --danger: #ff826e;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.28);
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at 72% 12%, rgba(200, 255, 61, 0.055), transparent 24rem),
    var(--bg);
  overflow-x: hidden;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  font: inherit;
}

.noise {
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0.2;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    90deg,
    transparent 0,
    transparent 3px,
    rgba(255, 255, 255, 0.018) 4px
  );
}

.site-header,
main,
footer {
  width: min(1180px, calc(100% - 48px));
  margin-inline: auto;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 78px;
  border-bottom: 1px solid var(--line);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--text);
  text-decoration: none;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.11em;
}

.brand-mark {
  width: 12px;
  height: 12px;
  background: var(--acid);
  box-shadow: 0 0 22px rgba(200, 255, 61, 0.35);
  transform: rotate(45deg);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.14em;
}

.status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--acid);
  box-shadow: 0 0 0 5px rgba(200, 255, 61, 0.08);
  animation: pulse 2.2s ease-in-out infinite;
}

.hero {
  min-height: 580px;
  padding: 112px 0 96px;
  border-bottom: 1px solid var(--line);
}

.eyebrow {
  margin: 0 0 22px;
  color: var(--acid);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
}

.ip-address {
  display: flex;
  align-items: center;
  max-width: 100%;
  min-height: 1.2em;
  margin: 0;
  overflow-wrap: anywhere;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(42px, 8vw, 108px);
  font-weight: 500;
  line-height: 1.04;
  letter-spacing: -0.065em;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 28px;
}

.hero-badge {
  padding: 7px 10px;
  border: 1px solid var(--line);
  color: #b4bcb6;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.footer-credit {
  color: #8a948d;
  letter-spacing: 0.035em;
  text-transform: none;
}

.footer-credit strong {
  color: #bac3bc;
  font-weight: 600;
}

.footer-credit strong span {
  color: var(--acid);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 40px;
}

.button {
  min-height: 48px;
  padding: 0 19px;
  border: 1px solid transparent;
  border-radius: 2px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  transition:
    background-color 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.button:hover:not(:disabled),
.speed-button:hover {
  transform: translateY(-2px);
}

.button:focus-visible,
.speed-button:focus-visible {
  outline: 2px solid var(--acid);
  outline-offset: 3px;
}

.button:disabled {
  cursor: wait;
  opacity: 0.5;
}

.button-primary {
  background: var(--acid);
  color: #11150d;
}

.button-primary:hover:not(:disabled) {
  background: #d5ff6c;
}

.button-secondary {
  border-color: var(--line);
  background: transparent;
  color: var(--text);
}

.button-secondary:hover:not(:disabled) {
  border-color: #59625c;
  background: var(--panel);
}

.hero-note {
  max-width: 610px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.65;
}

.hero-note.is-error {
  color: var(--danger);
}

.speedtest,
.details {
  padding: 96px 0;
  border-bottom: 1px solid var(--line);
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 38px;
}

.section-heading .eyebrow {
  margin-bottom: 14px;
}

.section-heading h2,
.privacy-panel h2 {
  margin: 0;
  font-size: clamp(26px, 4vw, 44px);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.045em;
}

.section-count {
  margin: 0;
  color: var(--muted);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

.speed-console {
  border: 1px solid var(--line);
  background: rgba(23, 27, 25, 0.86);
  box-shadow: var(--shadow);
}

.speed-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  min-height: 154px;
  padding: 34px;
}

.speed-kicker {
  margin: 0 0 10px;
  color: #6f7a72;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.15em;
}

.speed-status {
  margin: 0;
  font-size: clamp(23px, 3vw, 34px);
  font-weight: 600;
  letter-spacing: -0.04em;
}

.speed-detail {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.speed-button {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-width: 174px;
  min-height: 54px;
  padding: 0 22px;
  border: 0;
  border-radius: 2px;
  background: var(--acid);
  color: #11150d;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  transition:
    transform 160ms ease,
    background-color 160ms ease;
}

.speed-button-mark {
  width: 0;
  height: 0;
  border-top: 6px solid transparent;
  border-bottom: 6px solid transparent;
  border-left: 9px solid currentColor;
}

.is-running .speed-button {
  background: var(--danger);
}

.is-running .speed-button-mark {
  width: 10px;
  height: 10px;
  border: 0;
  background: currentColor;
}

.speed-progress {
  display: block;
  width: 100%;
  height: 4px;
  border: 0;
  border-radius: 0;
  background: #222824;
  appearance: none;
}

.speed-progress::-webkit-progress-bar {
  background: #222824;
}

.speed-progress::-webkit-progress-value {
  background: var(--acid);
  transition: width 180ms ease;
}

.speed-progress::-moz-progress-bar {
  background: var(--acid);
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.metric-card {
  min-width: 0;
  min-height: 190px;
  padding: 28px;
  border-right: 1px solid var(--line);
}

.metric-card:last-child {
  border-right: 0;
}

.metric-card-accent {
  background: rgba(200, 255, 61, 0.025);
}

.metric-label {
  margin: 0 0 36px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.metric-value {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin: 0;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 500;
  line-height: 1;
  letter-spacing: -0.065em;
}

.metric-unit {
  color: #778079;
  font-size: 11px;
  letter-spacing: 0;
}

.metric-meta {
  margin: 14px 0 0;
  color: #737d76;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 10px;
}

.speed-footnote {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 17px 28px;
  border-top: 1px solid var(--line);
  color: #68716b;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.speed-warning {
  max-width: 820px;
  margin: 20px 0 0;
  color: #7c857e;
  font-size: 12px;
  line-height: 1.65;
}

.loaded-latency-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  background: rgba(10, 13, 11, 0.34);
}

.loaded-latency-item {
  min-width: 0;
  padding: 16px 20px;
  border-right: 1px solid var(--line);
}

.loaded-latency-item:last-child {
  border-right: 0;
}

.loaded-latency-label,
.loaded-latency-meta {
  margin: 0;
  color: #737d76;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 9px;
}

.loaded-latency-value {
  margin: 7px 0 5px;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 19px;
  font-weight: 600;
}

.loaded-latency-grade .loaded-latency-value {
  color: var(--acid);
}

.loaded-latency-grade .loaded-latency-value[data-grade="D"],
.loaded-latency-grade .loaded-latency-value[data-grade="F"] {
  color: var(--danger);
}

.geoip-panel {
  margin: 36px 0 0;
  border: 1px solid var(--line);
  background: rgba(23, 27, 25, 0.82);
  box-shadow: var(--shadow);
}

.geoip-panel-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 24px;
  border-bottom: 1px solid var(--line);
}

.geoip-panel-header .eyebrow {
  margin-bottom: 8px;
}

.geoip-panel h2 {
  margin: 0;
  font-size: 24px;
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -0.035em;
}

.geoip-source {
  margin: 0;
  color: #68716b;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
}

.geoip-grid {
  display: grid;
  grid-template-columns: 0.9fr 0.65fr 1.45fr;
}

.geoip-item {
  min-width: 0;
  padding: 20px 24px;
  border-right: 1px solid var(--line);
}

.geoip-item:nth-child(3n) {
  border-right: 0;
}

.geoip-item:nth-child(n + 4) {
  border-top: 1px solid var(--line);
}

.geoip-label {
  margin: 0 0 10px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
}

.geoip-value {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: clamp(17px, 2vw, 24px);
  font-weight: 580;
  line-height: 1.18;
  letter-spacing: -0.025em;
}

.geoip-meta {
  margin: 7px 0 0;
  overflow-wrap: anywhere;
  color: #737d76;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 9px;
  line-height: 1.4;
}

.data-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--line);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.data-card {
  position: relative;
  min-height: 205px;
  padding: 25px 26px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: rgba(23, 27, 25, 0.74);
  transition: background-color 180ms ease;
}

.data-card:hover {
  background: var(--panel-hover);
}

.data-card-wide {
  grid-column: span 2;
}

.data-index {
  position: absolute;
  top: 24px;
  right: 25px;
  margin: 0;
  color: #5d6760;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 11px;
}

.data-label {
  margin: 0 0 42px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
}

.data-value {
  margin: 0;
  overflow-wrap: anywhere;
  font-size: clamp(19px, 2.1vw, 27px);
  font-weight: 580;
  line-height: 1.15;
  letter-spacing: -0.035em;
}

.data-meta {
  display: -webkit-box;
  margin: 11px 0 0;
  overflow: hidden;
  color: #737d76;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 10px;
  line-height: 1.55;
  overflow-wrap: anywhere;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.network-diagnostics {
  margin-top: 24px;
  border: 1px solid var(--line);
  background: rgba(23, 27, 25, 0.66);
}

.network-diagnostics-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}

.network-diagnostics-header .eyebrow {
  margin-bottom: 6px;
}

.network-diagnostics h3 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.network-diagnostics-note {
  margin: 0;
  color: #68716b;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 9px;
  text-align: right;
}

.timing-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.timing-item {
  min-width: 0;
  padding: 15px 12px;
  border-right: 1px solid var(--line);
}

.timing-item:last-child {
  border-right: 0;
}

.timing-label {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 10px;
}

.timing-value {
  margin: 0;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
}

.ip-family-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}

.ip-family-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 16px;
  color: var(--muted);
  font-size: 10px;
}

.ip-family-item:first-child {
  border-right: 1px solid var(--line);
}

.ip-family-item strong {
  color: var(--text);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 10px;
  font-weight: 600;
  text-align: right;
}

.privacy-panel {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 24px;
  margin: 96px 0;
  padding: 34px;
  border: 1px solid rgba(200, 255, 61, 0.22);
  background: var(--acid-dark);
}

.privacy-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border: 1px solid var(--acid);
  color: var(--acid);
  font-family: Georgia, serif;
  font-size: 17px;
  font-style: italic;
}

.privacy-panel h2 {
  font-size: 20px;
  letter-spacing: -0.02em;
}

.privacy-panel p {
  max-width: 850px;
  margin: 10px 0 0;
  color: #aab29d;
  font-size: 14px;
  line-height: 1.65;
}

.privacy-panel a {
  color: var(--acid);
  text-underline-offset: 3px;
}

.privacy-panel a:hover {
  color: #dcff83;
}

footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 28px 0 42px;
  border-top: 1px solid var(--line);
  color: #69716c;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.toast {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 10;
  padding: 13px 17px;
  background: var(--text);
  color: var(--bg);
  font-size: 13px;
  font-weight: 700;
  opacity: 0;
  pointer-events: none;
  transform: translateY(10px);
  transition:
    opacity 180ms ease,
    transform 180ms ease;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

@keyframes pulse {
  50% {
    opacity: 0.5;
  }
}

@media (max-width: 900px) {
  .hero {
    min-height: auto;
    padding: 88px 0 78px;
  }

  .metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .metric-card:nth-child(2) {
    border-right: 0;
  }

  .metric-card:nth-child(-n + 2) {
    border-bottom: 1px solid var(--line);
  }

  .data-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .data-card-wide {
    grid-column: span 2;
  }
}

@media (max-width: 620px) {
  .site-header,
  main,
  footer {
    width: min(100% - 28px, 1180px);
  }

  .site-header {
    min-height: 66px;
  }

  .hero {
    padding: 68px 0 62px;
  }

  .ip-address {
    font-size: clamp(36px, 12vw, 64px);
    letter-spacing: -0.07em;
  }

  .hero-actions {
    margin-top: 34px;
  }

  .button {
    flex: 1 1 100%;
  }

  .geoip-panel {
    margin-top: 24px;
  }

  .geoip-panel-header {
    align-items: start;
    flex-direction: column;
    padding: 20px;
  }

  .geoip-grid {
    grid-template-columns: 1fr;
  }

  .geoip-item {
    padding: 18px 20px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
    border-top: 0;
  }

  .geoip-item:nth-child(3n) {
    border-right: 0;
  }

  .geoip-item:last-child {
    border-bottom: 0;
  }

  .loaded-latency-grid,
  .timing-grid,
  .ip-family-grid {
    grid-template-columns: 1fr;
  }

  .loaded-latency-item,
  .timing-item,
  .ip-family-item,
  .ip-family-item:first-child {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .loaded-latency-item:last-child,
  .timing-item:last-child,
  .ip-family-item:last-child {
    border-bottom: 0;
  }

  .network-diagnostics-header {
    align-items: start;
    flex-direction: column;
  }

  .speedtest,
  .details {
    padding: 70px 0;
  }

  .section-heading {
    align-items: start;
    flex-direction: column;
  }

  .speed-summary {
    align-items: stretch;
    flex-direction: column;
    padding: 26px;
  }

  .speed-button {
    width: 100%;
  }

  .metrics-grid,
  .data-grid {
    grid-template-columns: 1fr;
  }

  .metric-card {
    min-height: 165px;
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .metric-card:last-child {
    border-bottom: 0;
  }

  .data-card-wide {
    grid-column: auto;
  }

  .data-card {
    min-height: 180px;
  }

  .speed-footnote,
  footer {
    flex-direction: column;
  }

  .privacy-panel {
    grid-template-columns: 1fr;
    margin: 70px 0;
    padding: 26px;
  }
}

/* Keep the complete dashboard inside a typical desktop viewport. */
@media (min-width: 1100px) and (min-height: 760px) {
  .site-header,
  main,
  footer {
    width: min(1440px, calc(100% - 32px));
  }

  .site-header {
    min-height: 54px;
  }

  main {
    display: grid;
    grid-template-columns: minmax(0, 1.24fr) minmax(430px, 0.76fr);
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 14px;
    height: calc(100vh - 86px);
    padding: 14px 0;
  }

  .hero {
    display: grid;
    grid-column: 1;
    grid-row: 1;
    grid-template-areas:
      "eyebrow actions"
      "ip ip"
      "badges note";
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: end;
    min-height: 138px;
    padding: 12px 16px;
    border: 1px solid var(--line);
  }

  .hero .eyebrow {
    grid-area: eyebrow;
    margin: 0 0 7px;
  }

  .ip-address {
    grid-area: ip;
    min-height: 1.05em;
    font-size: clamp(34px, 4vw, 58px);
  }

  .ip-address.is-ipv6 {
    font-size: clamp(21px, 2.35vw, 38px);
    letter-spacing: -0.055em;
  }

  .hero-badges {
    grid-area: badges;
    margin-top: 10px;
  }

  .hero-badge {
    padding: 5px 8px;
    font-size: 9px;
  }

  .hero-actions {
    grid-area: actions;
    justify-content: flex-end;
    align-self: start;
    margin: 0;
  }

  .hero-actions .button {
    min-height: 36px;
    padding-inline: 13px;
    font-size: 11px;
  }

  .hero-note {
    grid-area: note;
    max-width: 330px;
    margin: 7px 0 0 18px;
    font-size: 9px;
    line-height: 1.4;
  }

  .speedtest,
  .details {
    min-height: 0;
    padding: 0;
    border-bottom: 0;
  }

  .speedtest {
    grid-column: 1;
    grid-row: 3;
  }

  .details {
    grid-column: 2;
    grid-row: 1 / span 3;
  }

  .geoip-panel {
    display: grid;
    grid-column: 1;
    grid-row: 2;
    grid-template-columns: 158px minmax(0, 1fr);
    min-height: 94px;
    margin: 0;
    box-shadow: none;
  }

  .geoip-panel-header {
    align-items: start;
    justify-content: center;
    flex-direction: column;
    gap: 0;
    padding: 9px 12px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .geoip-panel-header .eyebrow {
    margin: 0 0 4px;
    font-size: 7px;
  }

  .geoip-panel h2 {
    font-size: 14px;
    letter-spacing: -0.02em;
  }

  .geoip-source {
    display: none;
  }

  .geoip-grid {
    grid-template-columns: 0.85fr 0.65fr 1.5fr;
  }

  .geoip-item {
    display: flex;
    min-width: 0;
    padding: 6px 9px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
    flex-direction: column;
    justify-content: center;
  }

  .geoip-label {
    margin-bottom: 3px;
    font-size: 7px;
  }

  .geoip-value {
    font-size: 11px;
    line-height: 1.15;
  }

  .geoip-meta {
    margin-top: 2px;
    overflow: hidden;
    font-size: 7px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .geoip-item:nth-child(5) .geoip-value {
    font-size: 9px;
  }

  .speedtest .section-heading,
  .details .section-heading {
    margin-bottom: 10px;
  }

  .speedtest .section-heading .eyebrow,
  .details .section-heading .eyebrow {
    margin-bottom: 5px;
    font-size: 9px;
  }

  .speedtest .section-heading h2,
  .details .section-heading h2 {
    font-size: 24px;
  }

  .speedtest .section-count,
  .details .section-count {
    display: none;
  }

  .speed-summary {
    min-height: 88px;
    padding: 14px 18px;
  }

  .speed-kicker {
    margin-bottom: 5px;
    font-size: 8px;
  }

  .speed-status {
    font-size: 21px;
  }

  .speed-detail {
    margin-top: 5px;
    font-size: 10px;
  }

  .speed-button {
    min-width: 150px;
    min-height: 42px;
    padding-inline: 16px;
    font-size: 12px;
  }

  .metrics-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .metric-card,
  .metric-card:nth-child(-n + 2) {
    min-height: 132px;
    padding: 16px;
    border-right: 1px solid var(--line);
    border-bottom: 0;
  }

  .metric-card:last-child {
    border-right: 0;
  }

  .metric-label {
    margin-bottom: 20px;
    font-size: 10px;
  }

  .metric-value {
    gap: 5px;
    font-size: clamp(25px, 2.5vw, 38px);
  }

  .metric-unit {
    font-size: 9px;
  }

  .metric-meta {
    margin-top: 9px;
    font-size: 8px;
    white-space: nowrap;
  }

  .loaded-latency-item {
    padding: 8px 12px;
  }

  .loaded-latency-label,
  .loaded-latency-meta {
    font-size: 7px;
  }

  .loaded-latency-value {
    margin: 4px 0 3px;
    font-size: 14px;
  }

  .speed-footnote {
    padding: 10px 16px;
    font-size: 8px;
  }

  .speed-warning {
    margin-top: 8px;
    font-size: 9px;
    line-height: 1.45;
  }

  .details .data-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .details .data-card {
    min-height: 62px;
    padding: 8px 10px;
  }

  .details .data-card-wide {
    grid-column: span 2;
  }

  .details .data-index {
    top: 7px;
    right: 9px;
    font-size: 8px;
  }

  .details .data-label {
    margin: 0 0 6px;
    font-size: 9px;
  }

  .details .data-value {
    padding-right: 18px;
    font-size: 14px;
    letter-spacing: -0.02em;
  }

  .details .data-meta {
    margin-top: 3px;
    font-size: 8px;
    line-height: 1.3;
    -webkit-line-clamp: 1;
  }

  .network-diagnostics {
    margin-top: 8px;
  }

  .network-diagnostics-header {
    align-items: center;
    padding: 7px 9px;
  }

  .network-diagnostics-header .eyebrow {
    display: none;
  }

  .network-diagnostics h3 {
    font-size: 13px;
  }

  .network-diagnostics-note {
    font-size: 7px;
  }

  .timing-item {
    padding: 7px 6px;
  }

  .timing-label {
    margin-bottom: 4px;
    font-size: 7px;
  }

  .timing-value {
    font-size: 9px;
  }

  .ip-family-item {
    padding: 7px 9px;
    font-size: 7px;
  }

  .ip-family-item strong {
    font-size: 8px;
  }

  .privacy-panel {
    display: none;
  }

  footer {
    display: flex;
    align-items: center;
    min-height: 32px;
    padding: 0;
    font-size: 8px;
  }
}

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