:root {
  color-scheme: light dark;
  --ground: #f6f7f8;
  --ink: #14181c;
  --muted: #566069;
  --rule: #d9dde1;
  --sign: #0f1215;
  --sign-ink: #ffffff;
  --sign-muted: #c0c7ce;
  --c-v4: #c8005f;
  --c-v6: #0a58ca;
  --c-dns: #66751a;
  --c-speed: #c2410c;
  --on-line: #ffffff;
  --off: #8b949c;
  --land: #dfe3e7;
  --dot: 20px;
  --track: 6px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --sans: 'Overpass', system-ui, sans-serif;
  --mono: 'Overpass Mono', ui-monospace, monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #15191e;
    --ink: #eef1f3;
    --muted: #a3acb4;
    --rule: #2d343b;
    --sign: #0a0c0f;
    --c-v4: #ff5fa2;
    --c-v6: #6aa8ff;
    --c-dns: #b6c84a;
    --c-speed: #ff8a4c;
    --on-line: #0f1215;
    --off: #737d86;
    --land: #2a3138;
  }
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scrollbar-color: var(--off) var(--ground); }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 400 1rem/1.4 var(--sans);
  font-variant-numeric: tabular-nums;
}

::selection { background: var(--c-v6); color: var(--on-line); }
:focus-visible { outline: 3px solid var(--c-v6); outline-offset: 2px; border-radius: 4px; }
.sign :focus-visible { outline-color: var(--sign-ink); }

.sprite { position: absolute; width: 0; height: 0; }

/* Letrero */
.sign { background: var(--sign); color: var(--sign-ink); --c-v4: #ff5fa2; --c-v6: #6aa8ff; --c-dns: #b6c84a; --c-speed: #ff8a4c; --on-line: #0f1215; }

.sign-inner, .lines, .help, .local-note {
  width: min(100%, 1240px);
  margin-inline: auto;
  padding-inline: clamp(16px, 3vw, 32px);
}

.sign-inner {
  display: grid;
  grid-template-columns: auto auto 1fr auto;
  grid-template-areas:
    'brand nav actions lang'
    'verdict verdict verdict scores';
  align-items: center;
  column-gap: 16px;
  padding-block: 12px 18px;
}

.brand { grid-area: brand; display: flex; flex-wrap: wrap; align-items: center; gap: 0 8px; min-width: 0; font-weight: 800; font-size: 1.0625rem; }
.brand-mark { width: 24px; height: 24px; flex: none; }
.test-count { margin-left: 4px; color: var(--sign-muted); font-size: 0.8125rem; font-weight: 600; white-space: nowrap; text-underline-offset: 3px; }
.test-count:hover { color: var(--sign-ink); }
.brand-home { display: flex; align-items: center; gap: 8px; min-height: 40px; color: inherit; text-decoration: none; }
.brand-home:hover span { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }

.lang { grid-area: lang; display: flex; gap: 2px; }
.lang a {
  display: grid;
  place-items: center;
  min-width: 40px;
  min-height: 40px;
  padding: 3px 6px 0;
  border-radius: 6px;
  color: var(--sign-muted);
  font: 600 0.875rem/1 var(--sans);
  text-decoration: none;
  transition: background-color 160ms, color 160ms;
}
.lang a:hover { background: #262c32; color: var(--sign-ink); }
.lang a[aria-current='true'] { color: var(--sign-ink); font-weight: 800; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 2px; }

.site-nav { grid-area: nav; display: flex; gap: 4px; }
.site-nav a {
  display: grid;
  place-items: center;
  min-height: 38px;
  padding: 3px 11px 0;
  border-radius: 8px;
  background: #1f252b;
  color: var(--sign-ink);
  font: 600 0.875rem/1.1 var(--sans);
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 160ms;
}
.site-nav a:hover { background: #30383f; }
.site-nav a[aria-current='page'] { background: #39434c; font-weight: 800; }

.scores { grid-area: scores; display: flex; gap: 20px; margin-top: 10px; align-self: start; justify-content: flex-end; }
.score { display: flex; align-items: center; gap: 8px; }
.score--v4 { --c: var(--c-v4); }
.score--v6 { --c: var(--c-v6); }
.score--dns { --c: var(--c-dns); }
.score .badge { position: relative; width: 36px; height: 36px; font-size: 1.125rem; }
.score[data-loading='true'] .badge::after {
  content: '';
  position: absolute;
  inset: -5px;
  border: 3px solid transparent;
  border-top-color: var(--sign-ink);
  border-radius: 50%;
  animation: spin 900ms linear infinite;
}
.score[data-loading='true'] strong { animation: pulse 1100ms ease-in-out infinite; }
.score-text { display: grid; line-height: 1.05; }
.score-text strong { font-size: 1.5rem; font-weight: 800; letter-spacing: -0.01em; white-space: nowrap; }
.score-text span { color: var(--sign-muted); font-size: 0.8125rem; font-weight: 600; }

.verdict { grid-area: verdict; margin-top: 10px; min-width: 0; }

.verdict-title {
  margin: 0;
  font-size: clamp(1.375rem, 2.6vw, 2rem);
  font-weight: 800;
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.verdict-detail { margin: 6px 0 0; max-width: 110ch; color: var(--sign-muted); font-size: 1rem; line-height: 1.35; text-wrap: pretty; }

.actions { grid-area: actions; display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }

.btn {
  appearance: none;
  min-height: 38px;
  padding: 8px 14px 6px;
  border: 1px solid #59626b;
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: 600 0.9375rem/1.2 var(--sans);
  cursor: pointer;
  transition: background-color 160ms, border-color 160ms, transform 120ms var(--ease);
}
.btn:hover { background: #262c32; border-color: #89929b; }
.btn:active { transform: scale(0.98); }
.btn:disabled { opacity: 0.55; cursor: progress; }
.btn-primary { background: var(--sign-ink); border-color: var(--sign-ink); color: var(--sign); font-weight: 800; }
.btn-primary:hover { background: #dfe3e7; border-color: #dfe3e7; }

.local-note {
  margin-block: 10px 0;
  color: var(--muted);
  font-size: 0.875rem;
}

/* Líneas */
.lines {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 48px;
}

.line {
  --c: var(--ink);
  min-width: 0;
  padding-block: 14px 16px;
  border-bottom: 1px solid var(--rule);
}
.line--v4 { --c: var(--c-v4); }
.line--v6 { --c: var(--c-v6); }
.line--dns { --c: var(--c-dns); border-bottom: 0; }
.line--speed { --c: var(--c-speed); }
.line--speed, .line--dns { grid-column: 1 / -1; }
/* Sin prueba en marcha ni resultados, la línea de velocidad no aporta nada. */
.line--speed[data-state='wait'] { display: none; }

.line-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.line-head > div { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 10px; min-width: 0; }
.badge {
  display: grid;
  place-items: center;
  flex: none;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--c);
  color: var(--on-line);
  font-weight: 800;
  font-size: 1rem;
  line-height: 1;
  padding-top: 2px;
}
.line-head h2 { margin: 0; font-size: 1.125rem; font-weight: 800; line-height: 1.1; }
.line-status { margin: 0; font-size: 0.875rem; font-weight: 600; color: var(--muted); line-height: 1.2; }
.line[data-state='ok'] .line-status, .line[data-state='no'] .line-status { color: var(--ink); }
.line-score { margin: 0 0 0 auto; font-size: 0.875rem; color: var(--muted); white-space: nowrap; }
.line-score strong { color: var(--ink); font-weight: 800; font-size: 1.0625rem; }

/* Velocidad y DNS: con datos, se reparten a dos columnas */
.line--dns .line-body,
.line--speed .line-body:has(.speed-live:not([hidden]), .speed-table:not([hidden])) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 48px;
  align-items: start;
}
.line--speed .strip, .line--speed .line-note, .line--dns .strip { grid-column: 1; }
.line--speed .speed-live, .line--speed .speed-table { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; }
.line--dns .facts { grid-column: 2; grid-row: 1 / span 2; margin-top: 0; }
.line--dns .line-note { grid-column: 1; }

/* Tira de estaciones */
.strip { display: flex; margin: 0; padding: 0; list-style: none; }

.stop { position: relative; flex: 1 1 0; min-width: 0; padding-right: 10px; }
.stop:last-child { padding-right: 0; }

.stop:not(:last-child)::before,
.stop:not(:last-child)::after {
  content: '';
  position: absolute;
  top: calc((var(--dot) - var(--track)) / 2);
  left: 0;
  right: 0;
  height: var(--track);
}
.stop::before { background: color-mix(in srgb, var(--c) 22%, var(--ground)); }
.stop::after {
  background: var(--c);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 700ms var(--ease);
}
.stop[data-state='ok']::after { transform: scaleX(1); }
.stop[data-state='no']:not(:last-child)::before {
  height: 0;
  background: none;
  border-top: var(--track) dotted var(--off);
}

.dot {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: var(--dot);
  height: var(--dot);
  border: 4px solid color-mix(in srgb, var(--c) 35%, var(--ground));
  border-radius: 50%;
  background: var(--ground);
  color: var(--c);
  transition: border-color 200ms, background-color 200ms;
}
.dot svg { display: none; width: 12px; height: 12px; }
.stop[data-state='run'] .dot { border-color: var(--c); animation: pulse 1100ms ease-in-out infinite; }
.stop[data-state='ok'] .dot { border: 0; background: var(--c); color: var(--on-line); }
.stop[data-state='ok'] .dot .i-ok { display: block; }
.stop[data-state='no'] .dot { border: 0; background: var(--off); color: var(--ground); }
.stop[data-state='no'] .dot .i-no { display: block; }
.stop[data-state='skip'] .dot { border-color: var(--off); }

@keyframes pulse { 50% { opacity: 0.35; } }
@keyframes spin { to { transform: rotate(360deg); } }

.stop-name { display: block; margin-top: 6px; color: var(--muted); font-size: 0.8125rem; line-height: 1.2; }
.stop-value { display: block; margin-top: 2px; font-weight: 800; font-size: 1rem; line-height: 1.2; overflow-wrap: anywhere; }
.stop[data-state='no'] .stop-value, .stop[data-state='skip'] .stop-value { font-weight: 600; color: var(--muted); }

/* Datos */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px 20px;
  margin: 12px 0 0;
}
.facts:empty { display: none; }
.facts dt { color: var(--muted); font-size: 0.8125rem; line-height: 1.2; }
.facts dd { margin: 1px 0 0; font-weight: 600; font-size: 0.9375rem; line-height: 1.25; overflow-wrap: anywhere; }
.facts .wide { grid-column: 1 / -1; }
.facts .addr { font-family: var(--mono); font-weight: 500; font-size: 1rem; letter-spacing: -0.01em; }
.line--dns .facts .addr { font-size: 0.875rem; }

.line-note { margin: 8px 0 0; max-width: 72ch; color: var(--muted); font-size: 0.875rem; line-height: 1.3; text-wrap: pretty; }
.line-note:empty { display: none; }

.score-missing { margin: 10px 0 0; max-width: 72ch; font-size: 0.875rem; font-weight: 600; line-height: 1.3; text-wrap: pretty; }
.score-missing:empty { display: none; }

.line-link { display: inline-block; margin-top: 12px; color: var(--c-v6); font-size: 0.9375rem; font-weight: 700; text-underline-offset: 3px; }
.line-link::after { content: ' ›'; }

/* Prueba detallada de IPv6 */
.v6lab {
  --c: var(--c-v6);
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: 24px 48px;
  width: min(100%, 1240px);
  margin-inline: auto;
  padding: 20px clamp(16px, 3vw, 32px) 28px;
  align-items: start;
}
.v6lab h2 { margin: 0 0 10px; font-size: 1.125rem; font-weight: 800; }
.v6lab h3 { margin: 12px 0 4px; font-size: 0.9375rem; font-weight: 800; }
.v6lab-side { display: grid; gap: 22px; min-width: 0; }

.checks { margin: 0; padding: 0; list-style: none; }
.checks .stop { flex: none; min-height: 46px; padding: 0 0 12px calc(var(--dot) + 12px); }
.checks .stop:last-child { width: auto; padding-bottom: 0; }
.checks .dot { position: absolute; left: 0; top: 0; }
.checks .stop-name { margin-top: 0; }
.checks .stop:not(:last-child)::before,
.checks .stop:not(:last-child)::after {
  top: 0;
  bottom: 0;
  left: calc((var(--dot) - var(--track)) / 2);
  right: auto;
  width: var(--track);
  height: auto;
}
.checks .stop::after { transform: scaleY(0); transform-origin: top; }
.checks .stop[data-state='ok']::after { transform: scaleY(1); }
.checks .stop[data-state='no']:not(:last-child)::before { width: 0; height: auto; border-top: 0; border-left: var(--track) dotted var(--off); }

.v6-legend { display: flex; flex-wrap: wrap; gap: 4px 18px; margin-bottom: 6px; color: var(--muted); font-size: 0.9375rem; }
.v6-legend b { color: var(--ink); font-weight: 800; }
.v6-legend span::before { content: ''; display: inline-block; width: 12px; height: 4px; margin: 0 6px 3px 0; border-radius: 2px; }
.v6-legend-6::before { background: var(--c-v6); }
.v6-legend-4::before { background: var(--c-v4); }
.v6-chart { display: block; width: 100%; height: 90px; }

.v6-hint { margin: 0 0 8px; color: var(--muted); font-size: 0.875rem; line-height: 1.35; text-wrap: pretty; }
.v6-row { display: flex; justify-content: space-between; gap: 14px; padding: 5px 0 3px; border-bottom: 1px solid var(--rule); font-size: 0.9375rem; line-height: 1.25; }
.v6-row:last-child { border-bottom: 0; }
.v6-row span:last-child { font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.v6-row[data-state='no'] span:last-child { color: var(--muted); }
.v6-rows--mono .v6-row { justify-content: flex-start; font-family: var(--mono); font-size: 0.8125rem; }
.v6-rows--mono .v6-row span:first-child { flex: none; width: 2ch; color: var(--muted); }
.v6-rows--mono .v6-row span:last-child { font-weight: 500; text-align: left; }

.v6-log { max-height: 190px; overflow-y: auto; padding: 10px 12px; border-radius: 8px; background: var(--sign); color: #dfe3e7; font: 500 0.78125rem/1.5 var(--mono); }
.v6-log:empty { display: none; }

/* Prueba detallada de DNS */
.dnslab { grid-template-columns: minmax(0, 0.7fr) minmax(0, 1.3fr); }
.dnslab .facts { grid-template-columns: minmax(0, 1fr); margin-top: 18px; }
.dns-table { display: grid; }
.dns-top { display: grid; gap: 6px; margin: 0 0 16px; padding: 0; list-style: none; }
.dns-top:empty { display: none; }
.dns-top li { display: grid; grid-template-columns: 26px minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 6px 12px 5px 8px; border-radius: 8px; background: color-mix(in srgb, var(--c-dns) 12%, var(--ground)); line-height: 1.2; }
.dns-top-rank { display: grid; place-items: center; width: 26px; height: 26px; padding-top: 2px; border-radius: 50%; background: var(--c-dns); color: var(--on-line); font-weight: 800; font-size: 0.875rem; }
.dns-top-name small { display: block; color: var(--muted); font-size: 0.75rem; overflow-wrap: anywhere; }
.dns-top-ms { white-space: nowrap; }
.dns-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) 90px 62px;
  gap: 4px 14px;
  align-items: start;
  padding: 9px 0 7px;
  border-bottom: 1px solid var(--rule);
  font-size: 0.9375rem;
  line-height: 1.25;
}
.dns-row:last-child { border-bottom: 0; }
.dns-row[data-state='wait'] { opacity: 0.55; }
.dns-row b { font-weight: 800; }
.dns-row small { display: block; color: var(--muted); font-size: 0.78125rem; overflow-wrap: anywhere; }
.dns-row-label { display: block; color: var(--muted); font-size: 0.75rem; }
.dns-row-time .stats-row-bar { margin-top: 4px; }
.dns-tag { display: inline-block; margin-left: 6px; padding: 1px 6px 0; border-radius: 4px; background: color-mix(in srgb, var(--c-dns) 18%, var(--ground)); color: var(--ink); font-size: 0.6875rem; font-style: normal; font-weight: 800; line-height: 1.4; white-space: nowrap; }
.dns-tag--you { background: color-mix(in srgb, var(--c-v6) 20%, var(--ground)); }
.v6-log time { color: #8b949c; }

/* Velocidad */
.speed-live { margin-top: 12px; display: grid; grid-template-columns: auto minmax(0, 1fr); column-gap: 20px; align-items: end; }
.speed-live[hidden] { display: none; }
.speed-phase { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: 0.875rem; font-weight: 600; }
.speed-number { margin: 0; font-weight: 800; font-size: 2.25rem; line-height: 1.1; letter-spacing: -0.02em; white-space: nowrap; }
.speed-number small { margin-left: 6px; font-size: 0.9375rem; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.speed-chart { display: block; width: 100%; height: 44px; }

.speed-table { width: 100%; margin-top: 12px; border-collapse: collapse; font-size: 0.9375rem; line-height: 1.2; }
.speed-table[hidden], .speed-live:not([hidden]) ~ .speed-table { display: none; }
.speed-table th, .speed-table td { padding: 5px 10px 4px 0; text-align: left; border-bottom: 1px solid var(--rule); white-space: nowrap; }
.speed-table thead th { padding-top: 0; color: var(--muted); font-size: 0.8125rem; font-weight: 400; white-space: normal; vertical-align: bottom; }
.speed-table tbody th { font-weight: 800; }
.speed-table td { font-weight: 600; }
.speed-table td:last-child, .speed-table th:last-child { padding-right: 0; }
.speed-table tbody tr:last-child th, .speed-table tbody tr:last-child td { border-bottom: 0; }

/* Presentación */
.about { width: min(100%, 1240px); margin-inline: auto; padding: 22px clamp(16px, 3vw, 32px) 0; border-top: 1px solid var(--rule); }
.about h1 { margin: 0 0 8px; font-size: 1.25rem; font-weight: 800; line-height: 1.2; letter-spacing: -0.01em; text-wrap: balance; }
.about p { margin: 0 0 8px; max-width: 80ch; color: var(--muted); line-height: 1.45; }
.about ul { margin: 0; padding-left: 20px; max-width: 80ch; color: var(--muted); line-height: 1.45; }
.about li { margin-bottom: 3px; }
.about h2 { margin: 18px 0 4px; font-size: 1.0625rem; font-weight: 800; line-height: 1.25; }
.about a { color: var(--c-v6); font-weight: 600; text-underline-offset: 3px; }
.page-links { display: flex; flex-wrap: wrap; gap: 6px 18px; margin-top: 16px; font-size: 0.9375rem; }

/* Cada página pone primero la prueba por la que se llega a ella */
[data-focus='speed'] .line--speed[data-state='wait'] { display: block; }

/* Estadísticas */
.sign-inner--stats {
  grid-template-columns: auto 1fr auto;
  grid-template-areas:
    'brand nav lang'
    'verdict verdict cta';
}
.stats-head { min-width: 0; }
.stats-head h1 { font-size: clamp(1.375rem, 2.6vw, 2rem); }
.stats-cta { grid-area: cta; align-self: end; display: inline-grid; place-items: center; text-decoration: none; white-space: nowrap; }

.stats {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr);
  gap: 32px 48px;
  width: min(100%, 1240px);
  margin-inline: auto;
  padding: 24px clamp(16px, 3vw, 32px) 56px;
  align-items: start;
}
#map { display: block; width: 100%; height: auto; }
.map-land { fill: var(--land); }
.map-bubble { fill: var(--c-v6); fill-opacity: 0.62; stroke: var(--c-v6); stroke-width: 1; cursor: default; }
.map-bubble:hover { fill-opacity: 0.9; }

.stats-note { margin: 10px 0 0; color: var(--muted); font-size: 0.875rem; line-height: 1.35; text-wrap: pretty; }
.stats-note[hidden] { display: none; }

.stats-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 8px; }
.stats-tabs h2 { margin: 0 auto 0 0; font-size: 1.125rem; font-weight: 800; }
.stats-tabs button, .stats-pager button {
  appearance: none;
  min-height: 36px;
  min-width: 36px;
  padding: 6px 12px 4px;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: transparent;
  color: inherit;
  font: 600 0.875rem/1.2 var(--sans);
  cursor: pointer;
}
.stats-tabs button:hover, .stats-pager button:hover:not(:disabled) { border-color: var(--muted); }
.stats-tabs button[aria-pressed='true'] { background: var(--ink); border-color: var(--ink); color: var(--ground); }
.stats-pager button:disabled { opacity: 0.4; cursor: default; }

.stats-rows { margin: 0; padding: 0; list-style: none; }
.stats-rows li { display: grid; grid-template-columns: minmax(0, 1fr) auto 90px; align-items: center; gap: 12px; padding: 7px 0 5px; border-bottom: 1px solid var(--rule); font-size: 0.9375rem; line-height: 1.2; }
.stats-rows li:last-child { border-bottom: 0; }
.stats-row-label { overflow-wrap: anywhere; }
.stats-row-value { font-weight: 800; text-align: right; }
.stats-row-bar { display: block; height: 8px; background: color-mix(in srgb, var(--c-v6) 16%, var(--ground)); }
.stats-row-bar span { display: block; height: 100%; min-width: 2px; background: var(--c-v6); }

.stats-pager { display: flex; align-items: center; gap: 6px; margin-top: 10px; color: var(--muted); font-size: 0.875rem; }
.stats-pager[hidden] { display: none; }
.stats-pager span { margin-left: 6px; }

/* Preguntas */
.help { padding-block: 24px 56px; }
.help h2 { margin: 0 0 10px; font-size: 1.125rem; font-weight: 800; }
.help details { border-top: 1px solid var(--rule); }
.help details:last-of-type { border-bottom: 1px solid var(--rule); }
.help summary { padding: 10px 0 8px; font-weight: 600; cursor: pointer; }
.help summary:hover { color: var(--c-v6); }
.help details p { margin: 0; padding: 0 0 14px; max-width: 72ch; color: var(--muted); line-height: 1.45; }

@media (max-width: 1100px) {
  .sign-inner {
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      'brand . lang'
      'nav actions actions'
      'verdict verdict scores';
    row-gap: 8px;
  }
  .sign-inner--stats {
    grid-template-areas:
      'brand nav lang'
      'verdict verdict cta';
  }
}

@media (max-width: 900px) {
  .v6lab, .dnslab { grid-template-columns: minmax(0, 1fr); }
  .stats { grid-template-columns: minmax(0, 1fr); gap: 20px; }
  .lines { grid-template-columns: minmax(0, 1fr); }
  .line--speed, .line--dns { grid-column: auto; }
  .line--dns { border-bottom: 0; }
  .line--v6 { border-bottom: 1px solid var(--rule); }

  .line--dns .line-body,
  .line--speed .line-body:has(.speed-live:not([hidden]), .speed-table:not([hidden])) { display: block; }
  .line--speed .speed-live, .line--speed .speed-table, .line--dns .facts { margin-top: 12px; }
}

@media (max-width: 640px) {
  .sign-inner {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      'brand lang'
      'nav nav'
      'verdict verdict'
      'scores scores'
      'actions actions';
    row-gap: 0;
    padding-block: 6px 14px;
  }
  .site-nav { margin-bottom: 8px; }
  .site-nav a { flex: 1 1 0; padding-inline: 4px; }
  .sign-inner--stats {
    grid-template-columns: 1fr auto;
    grid-template-areas:
      'brand lang'
      'nav nav'
      'verdict verdict'
      'cta cta';
  }
  .stats-cta { margin-top: 12px; }
  .verdict { margin-top: 4px; }
  .scores { flex-wrap: wrap; gap: 10px 12px; justify-content: flex-start; margin-top: 12px; }
  .score { gap: 10px; }
  .score .badge { width: 32px; height: 32px; font-size: 1rem; }
  .score[data-loading='true'] .badge::after { inset: -4px; }
  .score-text strong { font-size: 1.25rem; }
  .facts dd { font-size: 0.875rem; }
  .verdict-detail { font-size: 0.9375rem; }
  .actions { margin-top: 12px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .btn { min-height: 44px; padding-inline: 8px; }
  .btn-primary { grid-column: 1 / -1; }
  [data-page='ipv6'] .btn-primary, [data-page='dns'] .btn-primary { grid-column: auto; }
  .dns-row { grid-template-columns: minmax(0, 1fr) 84px 62px; }
  .dns-row-name { grid-column: 1 / -1; }

  .line { padding-block: 12px 14px; }
  .stop { padding-right: 6px; }
  .stop-name { font-size: 0.75rem; }
  .stop-value { font-size: 0.9375rem; }

  .speed-table { font-size: 0.8125rem; }
  .speed-table th, .speed-table td { padding-right: 6px; }
  .speed-table thead th { font-size: 0.75rem; }
  /* La variación es la columna que menos dice a quien solo quiere su resultado. */
  .speed-table [data-col='jitter'], .speed-table td[data-col='jitter'] { display: none; }
  .speed-number { font-size: 2rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
