/* ─── Reset & Root ─────────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg:        #080812;
  --bg2:       #0e0e1c;
  --border:    rgba(255,255,255,0.07);
  --border-hi: rgba(255,255,255,0.14);
  --card-bg:   rgba(255,255,255,0.03);
  --text:      #eeeef8;
  --text-muted:#7070a0;
  --text-dim:  #4a4a6a;
  --radius:    1.25rem;
  --transition:0.25s ease;
}

html {
  scroll-behavior: smooth;
  /* prevent iOS overscroll bounce during tests */
  overscroll-behavior: none;
  /* ensure html fills the full viewport-fit area */
  height: -webkit-fill-available;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100vh;
  min-height: -webkit-fill-available;
  min-height: 100dvh;
  overflow-x: hidden;
  overscroll-behavior: none;
  -webkit-font-smoothing: antialiased;
  /* remove blue flash on tap (iOS/Android) */
  -webkit-tap-highlight-color: transparent;
  /* prevent long-press callout on non-text elements */
  -webkit-touch-callout: none;
}

/* ─── Noise texture overlay ─────────────────────────────────────────────────── */

.noise {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  opacity: 0.6;
}

/* ─── Ambient blobs ─────────────────────────────────────────────────────────── */

body::before, body::after {
  content: '';
  position: fixed;
  border-radius: 50%;
  filter: blur(120px);
  pointer-events: none;
  z-index: 0;
}
body::before {
  width: 600px; height: 600px;
  top: -200px; left: -100px;
  background: radial-gradient(circle, rgba(60,40,130,0.35) 0%, transparent 70%);
}
body::after {
  width: 500px; height: 500px;
  bottom: -150px; right: -100px;
  background: radial-gradient(circle, rgba(0,60,80,0.3) 0%, transparent 70%);
}

/* ─── App layout ────────────────────────────────────────────────────────────── */

.app {
  position: relative; z-index: 1;
  max-width: 1380px;
  margin: 0 auto;
  /* Only handle horizontal safe areas here.
     Vertical safe areas are owned by .header (top) and .footer (bottom)
     so they aren't double-applied with the PWA banner spacer. */
  padding-left:  calc(1.5rem + env(safe-area-inset-left));
  padding-right: calc(1.5rem + env(safe-area-inset-right));
}

/* ─── Header ────────────────────────────────────────────────────────────────── */

.header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  /* top padding includes safe area so header clears the Dynamic Island */
  padding-top: calc(1.25rem + env(safe-area-inset-top));
  padding-bottom: 1.5rem;
  margin-bottom: 2.5rem;
  border-bottom: 1px solid var(--border);
}

.logo {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 1.45rem; font-weight: 700; letter-spacing: -0.02em;
  color: #fff;
}
.logo-icon {
  width: 28px; height: 28px;
  color: #a78bfa;
  filter: drop-shadow(0 0 8px rgba(167,139,250,0.6));
}

.btn-primary {
  display: flex; align-items: center; gap: 0.5rem;
  background: linear-gradient(135deg, #7c3aed, #4f46e5);
  color: #fff;
  border: none; border-radius: 0.75rem;
  padding: 0.65rem 1.4rem;
  min-height: 44px;
  font-size: 0.9rem; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: var(--transition);
  box-shadow: 0 4px 20px rgba(124,58,237,0.35);
  touch-action: manipulation;
  -webkit-user-select: none; user-select: none;
}
.btn-primary svg { width: 15px; height: 15px; }
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 28px rgba(124,58,237,0.5);
}
.btn-primary:active { transform: translateY(0); }
.btn-primary:disabled {
  opacity: 0.6; cursor: not-allowed; transform: none;
  box-shadow: none;
}

/* ─── Cards grid ────────────────────────────────────────────────────────────── */

.grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
}

@media (max-width: 1200px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 620px) {
  .grid { grid-template-columns: 1fr; }
  .app {
    padding-left:  calc(1rem + env(safe-area-inset-left));
    padding-right: calc(1rem + env(safe-area-inset-right));
  }
  .header { margin-bottom: 1.5rem; }
}

/* ─── Card ──────────────────────────────────────────────────────────────────── */

.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  display: flex; flex-direction: column; gap: 1rem;
  transition: border-color var(--transition), box-shadow var(--transition);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}
.card:hover {
  border-color: var(--border-hi);
}
.card.testing {
  border-color: rgba(var(--accent-rgb), 0.4);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.15),
              0 8px 40px rgba(var(--accent-rgb), 0.12);
}
.card.done {
  border-color: rgba(var(--accent-rgb), 0.25);
}
.card.error {
  border-color: rgba(239,68,68,0.35);
}

/* Card header */

.card-header {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 0.5rem;
}
.provider-wrap {
  display: flex; align-items: center; gap: 0.75rem;
}
.provider-badge {
  display: flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 0.75rem;
  flex-shrink: 0;
}
.provider-name {
  font-size: 0.97rem; font-weight: 700; line-height: 1.2;
}
.provider-sub {
  font-size: 0.72rem; color: var(--text-muted); margin-top: 0.1rem;
}

/* Status badge */

.badge {
  font-size: 0.68rem; font-weight: 600; letter-spacing: 0.03em;
  padding: 0.25rem 0.65rem; border-radius: 99px;
  white-space: nowrap; flex-shrink: 0;
  text-transform: uppercase;
}
.badge.idle    { background: rgba(255,255,255,0.06); color: var(--text-muted); }
.badge.testing { background: rgba(var(--accent-rgb),0.18); color: var(--accent); animation: pulse-badge 1.2s ease infinite; }
.badge.done    { background: rgba(34,197,94,0.15); color: #4ade80; }
.badge.error   { background: rgba(239,68,68,0.15); color: #f87171; }

@keyframes pulse-badge {
  0%,100% { opacity: 1; }
  50%      { opacity: 0.65; }
}

/* Gauge */

.gauge-wrap {
  position: relative;
  width: 100%; aspect-ratio: 1.7;
}
.gauge-wrap canvas {
  width: 100%; height: 100%; display: block;
}
.phase-label {
  position: absolute; bottom: 4px; left: 0; right: 0;
  text-align: center;
  font-size: 0.7rem; color: var(--text-dim);
  height: 1rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

/* Stats row */

.stats-row {
  display: flex; align-items: center; gap: 0.5rem;
}
.stat { flex: 1; text-align: center; }
.stat-divider {
  width: 1px; height: 36px;
  background: var(--border); flex-shrink: 0;
}
.stat-icon {
  font-size: 0.65rem; font-weight: 700;
  width: 20px; height: 20px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  margin-bottom: 0.3rem;
}
.stat-icon.down { background: rgba(96,165,250,0.15); color: #60a5fa; }
.stat-icon.up   { background: rgba(52,211,153,0.15); color: #34d399; }
.stat-icon.ping { background: rgba(251,191,36,0.15); color: #fbbf24; }

.stat-value {
  font-size: 0.85rem; font-weight: 700;
  letter-spacing: -0.01em; line-height: 1.1;
  color: var(--text);
  white-space: nowrap;
}
.stat-label {
  font-size: 0.62rem; color: var(--text-muted); margin-top: 0.15rem;
  text-transform: uppercase; letter-spacing: 0.04em;
}

/* Card footer */

.card-footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 0.25rem;
  border-top: 1px solid var(--border);
  gap: 0.5rem;
}
.server-label {
  font-size: 0.68rem; color: var(--text-dim);
  flex: 1; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.btn-run {
  background: rgba(var(--accent-rgb), 0.12);
  color: var(--accent);
  border: 1px solid rgba(var(--accent-rgb), 0.25);
  border-radius: 0.6rem;
  padding: 0.4rem 0.9rem;
  font-size: 0.78rem; font-weight: 600; font-family: inherit;
  cursor: pointer; transition: var(--transition);
  white-space: nowrap; flex-shrink: 0;
  touch-action: manipulation;
  -webkit-user-select: none; user-select: none;
}
.btn-run:hover {
  background: rgba(var(--accent-rgb), 0.22);
  border-color: rgba(var(--accent-rgb), 0.45);
}
.btn-run:active { transform: scale(0.97); }
.btn-run:disabled {
  opacity: 0.5; cursor: not-allowed; transform: none;
}

/* ─── Footer ────────────────────────────────────────────────────────────────── */

.footer {
  margin-top: 2.5rem;
  padding-bottom: calc(1rem + env(safe-area-inset-bottom));
  text-align: center;
  color: var(--text-dim); font-size: 0.73rem; line-height: 1.6;
}
.footer-note { margin-top: 0.25rem; }

/* ─── Landing view ───────────────────────────────────────────────────────────── */

#view-landing {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2.25rem;
  padding: calc(2rem + env(safe-area-inset-top))
           calc(1.5rem + env(safe-area-inset-right))
           calc(2rem + env(safe-area-inset-bottom))
           calc(1.5rem + env(safe-area-inset-left));
}

.landing-logo {
  display: flex; align-items: center; gap: 0.6rem;
  font-size: 1.35rem; font-weight: 700; letter-spacing: -0.02em;
  color: #fff;
}

.landing-hero { text-align: center; }

.landing-title {
  font-size: clamp(1.9rem, 4vw, 2.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  background: linear-gradient(135deg, #fff 20%, rgba(255,255,255,0.55) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 0.55rem;
}

.landing-sub {
  font-size: 1rem; color: var(--text-muted);
}

/* Provider picker grid */

.picker-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  width: 100%;
  max-width: 960px;
}

@media (max-width: 860px) {
  .picker-grid { grid-template-columns: repeat(2, 1fr); max-width: 520px; }
}
@media (max-width: 460px) {
  .picker-grid { grid-template-columns: 1fr; max-width: 320px; }
}

.picker-card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem 1.25rem 1.5rem;
  display: flex; flex-direction: column; align-items: center;
  gap: 0.85rem;
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition),
              box-shadow var(--transition), transform var(--transition);
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
  font-family: inherit; color: var(--text);
  text-align: center;
  text-decoration: none;
  touch-action: manipulation;
  -webkit-user-select: none; user-select: none;
}

.picker-card:hover {
  border-color: rgba(var(--accent-rgb), 0.55);
  background: rgba(var(--accent-rgb), 0.06);
  box-shadow: 0 0 0 1px rgba(var(--accent-rgb), 0.18),
              0 10px 40px rgba(var(--accent-rgb), 0.18);
  transform: translateY(-4px);
}
.picker-card:active { transform: translateY(-1px); }

.picker-icon {
  width: 72px; height: 72px;
  border-radius: 1.25rem;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}

.picker-name {
  font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em;
}
.picker-url {
  font-size: 0.72rem; color: var(--text-muted);
}

/* "Compare all four" link-style button */

.tagline {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-align: center;
  margin: 0.5rem 0 1rem;
  opacity: 0.7;
}

.btn-compare {
  display: flex; align-items: center; gap: 0.5rem;
  background: transparent;
  border: 1px solid var(--border-hi);
  border-radius: 0.75rem;
  padding: 0.6rem 1.3rem;
  min-height: 44px;
  font-size: 0.83rem; font-weight: 500;
  color: var(--text-muted); font-family: inherit;
  cursor: pointer; transition: var(--transition);
  text-decoration: none;
  touch-action: manipulation;
  -webkit-user-select: none; user-select: none;
}
.btn-compare:hover {
  color: var(--text);
  border-color: rgba(255,255,255,0.22);
  background: rgba(255,255,255,0.04);
}

/* ─── Test view ──────────────────────────────────────────────────────────────── */

#view-test {
  display: flex; flex-direction: column;
  min-height: 100vh;
  min-height: 100dvh;
}

/* Back button */

.btn-back {
  display: flex; align-items: center; gap: 0.45rem;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 0.6rem;
  padding: 0.5rem 0.9rem;
  min-height: 44px;
  font-size: 0.82rem; font-weight: 500;
  color: var(--text-muted); font-family: inherit;
  cursor: pointer; transition: var(--transition);
  text-decoration: none;
  touch-action: manipulation;
  -webkit-user-select: none; user-select: none;
}
.btn-back:hover {
  color: var(--text); border-color: var(--border-hi);
  background: rgba(255,255,255,0.04);
}

/* Single-card mode — one card centred, full-focus layout */

.grid-single {
  display: flex !important;
  justify-content: center;
  align-items: flex-start;
  padding: 1rem 0 2rem;
}

.grid-single .card {
  width: 100%;
  max-width: 560px;
  padding: 2rem 2rem 1.75rem;
}

.grid-single .gauge-wrap {
  aspect-ratio: 1.5;
}

.grid-single .provider-badge {
  width: 52px;
  height: 52px;
}

.grid-single .provider-badge svg {
  width: 26px;
  height: 26px;
}

.grid-single .provider-name {
  font-size: 1.15rem;
}

.grid-single .provider-sub {
  font-size: 0.78rem;
}

/* ─── Mobile overrides ───────────────────────────────────────────────────────── */

/* Header: 3-item flex row collapses on narrow screens.
   Hide the centre logo (redundant on the test page) and compact the right button. */
@media (max-width: 560px) {
  .header .logo { display: none; }
  .btn-primary  { padding: 0.55rem 0.85rem; font-size: 0.8rem; }
}

/* Landing: reduce gap and internal padding so it fits on short/narrow phones.
   safe-area-inset-* must be preserved in every override. */
@media (max-width: 620px) {
  #view-landing {
    gap: 1.5rem;
    padding: calc(1.5rem + env(safe-area-inset-top))
             calc(1rem   + env(safe-area-inset-right))
             calc(1.5rem + env(safe-area-inset-bottom))
             calc(1rem   + env(safe-area-inset-left));
  }
}
@media (max-width: 420px) {
  #view-landing {
    gap: 1.1rem;
    padding: calc(1rem    + env(safe-area-inset-top))
             calc(0.5rem  + env(safe-area-inset-right))
             calc(1rem    + env(safe-area-inset-bottom))
             calc(0.5rem  + env(safe-area-inset-left));
  }
  .landing-sub  { font-size: 0.9rem; }
}

/* Single-card mode: reduce side padding on narrow phones so the stat row has room */
@media (max-width: 480px) {
  .grid-single .card { padding: 1.5rem 1.25rem 1.5rem; }
}

/* ─── PWA install banner ────────────────────────────────────────────────────── */

.pwa-banner {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 1rem 0.7rem calc(1rem + env(safe-area-inset-left));
  padding-right: calc(1rem + env(safe-area-inset-right));
  padding-top: calc(0.7rem + env(safe-area-inset-top));
  background: rgba(10, 10, 22, 0.96);
  border-bottom: 1px solid rgba(167, 139, 250, 0.28);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  /* hidden by default — JS adds --visible */
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
  transition: opacity 0.25s ease, transform 0.3s ease;
}

.pwa-banner--visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.pwa-banner--hiding {
  opacity: 0;
  transform: translateY(-100%);
  pointer-events: none;
}

.pwa-banner-inner {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.pwa-banner-bolt {
  flex-shrink: 0;
  width: 22px; height: 22px;
  color: #a78bfa;
  filter: drop-shadow(0 0 6px rgba(167,139,250,0.55));
}

.pwa-banner-text {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  min-width: 0;
}

.pwa-banner-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text);
  white-space: nowrap;
}

.pwa-banner-hint {
  font-size: 0.72rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.pwa-banner-close {
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  width: 28px; height: 28px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  color: var(--text-muted);
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  touch-action: manipulation;
  -webkit-user-select: none; user-select: none;
}
.pwa-banner-close:hover {
  background: rgba(255,255,255,0.12);
  color: var(--text);
}

@media (max-width: 480px) {
  .pwa-banner-title { font-size: 0.78rem; }
  .pwa-banner-hint  { font-size: 0.68rem; }
}

/* ─── PWA banner active overrides ───────────────────────────────────────────── */
/* When the install banner is showing, its spacer height already includes
   env(safe-area-inset-top). Remove it from .header / #view-landing so the
   Dynamic Island clearance isn't counted twice.                               */

body.pwa-banner-active .header {
  padding-top: 1.25rem;
}

body.pwa-banner-active #view-landing {
  padding-top: 2rem;
}
@media (max-width: 620px) {
  body.pwa-banner-active #view-landing { padding-top: 1.5rem; }
}
@media (max-width: 420px) {
  body.pwa-banner-active #view-landing { padding-top: 1rem; }
}

/* ─── Scrollbar ─────────────────────────────────────────────────────────────── */

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }

/* ─── Network info bar ───────────────────────────────────────────────────────── */

.netinfo-bar {
  display: flex; align-items: center;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 0.875rem;
  padding: 0.6rem 1.25rem;
  margin-bottom: 1.75rem;
  gap: 0;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.netinfo-item {
  display: flex; align-items: center; gap: 0.45rem;
  flex: 1; min-width: 0;
}

.netinfo-sep {
  width: 1px; height: 20px;
  background: var(--border);
  flex-shrink: 0; margin: 0 1.1rem;
}

.netinfo-icon { color: var(--text-dim); flex-shrink: 0; }

.netinfo-label {
  color: var(--text-muted);
  font-size: 0.63rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.06em;
  flex-shrink: 0;
}

.netinfo-val {
  color: var(--text);
  font-size: 0.78rem; font-weight: 500;
  min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}

@media (max-width: 680px) {
  .netinfo-bar {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
  }
  .netinfo-sep { display: none; }
}
@media (max-width: 420px) {
  .netinfo-bar { grid-template-columns: 1fr; }
}

/* ─── Jitter sub-label ───────────────────────────────────────────────────────── */

.stat-sub {
  font-size: 0.63rem; font-weight: 500;
  color: var(--text-muted);
  margin-top: 0.08rem;
  min-height: 0.9rem;
}

/* ─── History section ────────────────────────────────────────────────────────── */

.history-section {
  margin-top: 1.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card-bg);
  overflow: hidden;
  backdrop-filter: blur(24px);
  -webkit-backdrop-filter: blur(24px);
}

.history-header {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
}

.history-title {
  font-size: 0.88rem; font-weight: 700;
}

.history-count {
  font-size: 0.68rem; font-weight: 600;
  color: var(--text-muted);
  background: rgba(255,255,255,0.06);
  border-radius: 99px;
  padding: 0.12rem 0.5rem;
}

.history-clear {
  margin-left: auto;
  font-size: 0.72rem; font-weight: 600; font-family: inherit;
  color: var(--text-muted);
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 0.45rem;
  padding: 0.28rem 0.7rem;
  cursor: pointer;
  transition: var(--transition);
  touch-action: manipulation;
}
.history-clear:hover { color: var(--text); border-color: var(--border-hi); }

.history-list { max-height: 320px; overflow-y: auto; }

.history-empty {
  padding: 1.5rem 1.25rem;
  font-size: 0.78rem; color: var(--text-dim);
  text-align: center;
}

.history-row {
  display: flex; align-items: center; gap: 0.6rem;
  padding: 0.6rem 1.25rem;
  border-bottom: 1px solid var(--border);
  font-size: 0.78rem;
  transition: background var(--transition);
}
.history-row:last-child { border-bottom: none; }
.history-row:hover { background: rgba(255,255,255,0.02); }

.history-time {
  font-size: 0.7rem; color: var(--text-muted);
  min-width: 62px; flex-shrink: 0;
}

.history-provider {
  font-weight: 700; font-size: 0.75rem;
  min-width: 68px; flex-shrink: 0;
}

.history-stat {
  display: flex; align-items: center; gap: 0.28rem;
  flex: 1; min-width: 0; white-space: nowrap;
  color: var(--text);
}

.history-icon {
  font-size: 0.58rem; font-weight: 700;
  width: 15px; height: 15px;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.history-icon.down { background: rgba(96,165,250,0.15); color: #60a5fa; }
.history-icon.up   { background: rgba(52,211,153,0.15); color: #34d399; }
.history-icon.ping { background: rgba(251,191,36,0.15); color: #fbbf24; }

.history-jitter {
  font-size: 0.68rem; color: var(--text-muted); margin-left: 0.15rem;
}

@media (max-width: 620px) {
  .history-row { gap: 0.4rem; padding: 0.55rem 1rem; }
  .history-time { min-width: 50px; }
  .history-provider { min-width: 58px; }
}
@media (max-width: 400px) {
  .history-stat:nth-child(5) { display: none; }
}
