:root {
  --bg: #0b1220;
  --bg-elevated: #121a2b;
  --bg-card: #162033;
  --border: rgba(148, 163, 184, 0.14);
  --text: #e8eef9;
  --muted: #94a3b8;
  --accent: #0ea5e9;
  --accent-2: #6366f1;
  --good: #22c55e;
  --fair: #eab308;
  --poor: #f97316;
  --bad: #ef4444;
  --cyan: #22d3ee;
  --radius: 18px;
  --shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --safe-top: env(safe-area-inset-top, 0px);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

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

html, body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
}

body {
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(14, 165, 233, 0.18), transparent 55%),
    radial-gradient(900px 500px at 100% 0%, rgba(99, 102, 241, 0.16), transparent 50%),
    var(--bg);
  min-height: 100dvh;
}

.app {
  max-width: 480px;
  margin: 0 auto;
  padding: calc(16px + var(--safe-top)) 16px calc(28px + var(--safe-bottom));
}

.header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: grid;
  place-items: center;
  box-shadow: 0 8px 24px rgba(14, 165, 233, 0.35);
  flex-shrink: 0;
}

.brand-mark svg {
  width: 24px;
  height: 24px;
}

.brand h1 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand p {
  margin: 2px 0 0;
  font-size: 0.78rem;
  color: var(--muted);
}

.credit {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 5px;
  color: #7dd3fc;
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.credit img {
  width: 28px;
  height: 38px;
  object-fit: contain;
  display: block;
  flex-shrink: 0;
  border-radius: 7px;
  background: #f8fafc;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.credit:active { opacity: 0.8; }

.credit:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 6px;
}

.install-hint {
  font-size: 0.72rem;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 6px 10px;
  margin-top: 2px;
  white-space: nowrap;
}

.app-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin: -6px 0 14px;
}

.share-btn,
.feedback-btn,
.tip-btn,
.more-brand-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  line-height: 1.1;
  text-align: center;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.share-btn,
.feedback-btn {
  appearance: none;
  border: 1px solid rgba(34, 211, 238, 0.35);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
}

.share-btn { color: var(--cyan); }

.feedback-btn { color: var(--text); }

.share-btn.is-copied {
  color: #041018;
  background: var(--cyan);
  border-color: transparent;
}

.tip-btn {
  grid-column: 1 / -1;
  border: 0;
  color: #04140a;
  background: linear-gradient(135deg, #00e676, #00c853);
  box-shadow: 0 8px 22px rgba(0, 200, 83, 0.28);
}

.more-brand-btn {
  grid-column: 1 / -1;
  border: 1px solid rgba(125, 211, 252, 0.45);
  color: #e0f2fe;
  background: rgba(14, 165, 233, 0.12);
}

.share-btn:active,
.feedback-btn:active,
.tip-btn:active,
.more-brand-btn:active { transform: scale(0.98); }

.share-btn:focus-visible,
.feedback-btn:focus-visible,
.tip-btn:focus-visible,
.more-brand-btn:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
}

.hero {
  background: linear-gradient(160deg, rgba(22, 32, 51, 0.95), rgba(18, 26, 43, 0.9));
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: 22px 18px 18px;
  box-shadow: var(--shadow);
  text-align: center;
  margin-bottom: 14px;
  position: relative;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: -40% -20% auto;
  height: 70%;
  background: radial-gradient(circle at 50% 0%, rgba(14, 165, 233, 0.2), transparent 60%);
  pointer-events: none;
}

.status-orb {
  width: 88px;
  height: 88px;
  margin: 0 auto 14px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  position: relative;
  background: rgba(255, 255, 255, 0.04);
  border: 2px solid rgba(148, 163, 184, 0.25);
  transition: border-color 0.3s, box-shadow 0.3s, background 0.3s;
}

.status-orb::after {
  content: "";
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid transparent;
  opacity: 0.5;
  transition: border-color 0.3s, opacity 0.3s;
}

.status-orb[data-state="online"] {
  border-color: rgba(34, 197, 94, 0.7);
  background: rgba(34, 197, 94, 0.12);
  box-shadow: 0 0 32px rgba(34, 197, 94, 0.25);
}
.status-orb[data-state="online"]::after { border-color: rgba(34, 197, 94, 0.35); }

.status-orb[data-state="spotty"] {
  border-color: rgba(234, 179, 8, 0.75);
  background: rgba(234, 179, 8, 0.12);
  box-shadow: 0 0 32px rgba(234, 179, 8, 0.22);
}
.status-orb[data-state="spotty"]::after { border-color: rgba(234, 179, 8, 0.35); }

.status-orb[data-state="no-internet"] {
  border-color: rgba(249, 115, 22, 0.8);
  background: rgba(249, 115, 22, 0.12);
  box-shadow: 0 0 32px rgba(249, 115, 22, 0.22);
}
.status-orb[data-state="no-internet"]::after { border-color: rgba(249, 115, 22, 0.35); }

.status-orb[data-state="offline"] {
  border-color: rgba(239, 68, 68, 0.8);
  background: rgba(239, 68, 68, 0.12);
  box-shadow: 0 0 32px rgba(239, 68, 68, 0.22);
}
.status-orb[data-state="offline"]::after { border-color: rgba(239, 68, 68, 0.35); }

.status-orb[data-state="checking"] {
  border-color: rgba(14, 165, 233, 0.7);
  background: rgba(14, 165, 233, 0.1);
  animation: pulse 1.4s ease-in-out infinite;
}
.status-orb[data-state="checking"]::after { border-color: rgba(14, 165, 233, 0.3); }

@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.04); opacity: 0.85; }
}

.status-orb .icon {
  font-size: 2rem;
  line-height: 1;
}

.status-label {
  font-size: 1.65rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  margin: 0 0 6px;
}

.status-sub {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.4;
}

.history {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 5px;
  height: 36px;
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.history .dot {
  width: 8px;
  border-radius: 4px;
  background: rgba(148, 163, 184, 0.25);
  transition: height 0.25s, background 0.25s;
  min-height: 8px;
}

.history .dot.ok { background: var(--good); }
.history .dot.fair { background: var(--fair); }
.history .dot.poor { background: var(--poor); }
.history .dot.fail { background: var(--bad); }

.metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}

.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 14px 12px;
}

.card.full {
  grid-column: 1 / -1;
}

.card-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 6px;
  font-weight: 600;
}

.card-value {
  font-size: 1.55rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  margin: 0;
  font-variant-numeric: tabular-nums;
}

.card-value .unit {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--muted);
  margin-left: 2px;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 8px;
  font-size: 0.78rem;
  font-weight: 650;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.06);
  color: var(--muted);
}

.badge[data-q="excellent"] { background: rgba(34, 197, 94, 0.15); color: #4ade80; }
.badge[data-q="good"] { background: rgba(34, 197, 94, 0.12); color: #86efac; }
.badge[data-q="fair"] { background: rgba(234, 179, 8, 0.15); color: #fde047; }
.badge[data-q="poor"] { background: rgba(249, 115, 22, 0.15); color: #fdba74; }
.badge[data-q="down"] { background: rgba(239, 68, 68, 0.15); color: #fca5a5; }

.actions {
  display: grid;
  gap: 10px;
  margin: 14px 0 12px;
}

.btn {
  appearance: none;
  border: none;
  border-radius: 14px;
  padding: 15px 18px;
  font-size: 1rem;
  font-weight: 700;
  cursor: pointer;
  color: #041018;
  background: linear-gradient(135deg, var(--accent), #38bdf8);
  box-shadow: 0 10px 28px rgba(14, 165, 233, 0.28);
  transition: transform 0.12s, filter 0.12s, opacity 0.12s;
}

.btn:active { transform: scale(0.98); }
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none;
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  box-shadow: none;
  border: 1px solid var(--border);
}

.meta {
  margin-top: 4px;
}

.meta-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
  font-size: 0.88rem;
}

.meta-row:last-child { border-bottom: none; }

.meta-row span:first-child { color: var(--muted); }
.meta-row span:last-child {
  font-weight: 600;
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.footer {
  margin-top: 18px;
  text-align: center;
  color: var(--muted);
  font-size: 0.75rem;
  line-height: 1.45;
}

.footer code {
  font-size: 0.7rem;
  background: rgba(255,255,255,0.06);
  padding: 1px 6px;
  border-radius: 6px;
}

.copyright {
  margin: 10px 0 0;
  text-align: center;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.copyright a {
  color: #7dd3fc;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.copyright a:focus-visible {
  outline: 2px solid var(--cyan);
  outline-offset: 3px;
  border-radius: 4px;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: calc(20px + var(--safe-bottom));
  transform: translateX(-50%) translateY(120%);
  background: #1e293b;
  color: var(--text);
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 0.85rem;
  box-shadow: var(--shadow);
  opacity: 0;
  transition: transform 0.25s, opacity 0.25s;
  z-index: 50;
  max-width: calc(100% - 32px);
}

.toast.show {
  transform: translateX(-50%) translateY(0);
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .status-orb[data-state="checking"],
  .btn,
  .history .dot,
  .toast {
    animation: none;
    transition: none;
  }
}

/* ---------- Tabs ---------- */
.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  padding: 4px;
  margin-bottom: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border);
  border-radius: 14px;
}

.tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 9px 10px;
  border-radius: 10px;
  color: var(--muted);
  font-weight: 650;
  font-size: 0.92rem;
  text-decoration: none;
}

.tab[aria-selected="true"] {
  background: var(--bg-card);
  color: var(--text);
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
}

.tab-count {
  min-width: 20px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 750;
  background: rgba(234, 179, 8, 0.2);
  color: #fde047;
}
.tab-count.live { background: rgba(239, 68, 68, 0.22); color: #fca5a5; }

[hidden] { display: none !important; }

/* ---------- History view ---------- */
.summary-card { margin-bottom: 6px; }

.summary-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  text-align: center;
  margin: 6px 0 8px;
}

.sum-num {
  display: block;
  font-size: 1.25rem;
  font-weight: 750;
  letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums;
}

.sum-lbl {
  display: block;
  font-size: 0.68rem;
  color: var(--muted);
  line-height: 1.2;
  margin-top: 2px;
}

.sum-range {
  margin: 4px 0 12px;
  font-size: 0.8rem;
  color: var(--muted);
  text-align: center;
}

.export-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
}

.btn-small {
  padding: 11px 16px;
  font-size: 0.9rem;
}

.export-hint {
  margin: 10px 2px 2px;
  font-size: 0.76rem;
  color: var(--muted);
  line-height: 1.45;
}

.section-title {
  margin: 20px 4px 10px;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  font-weight: 700;
}

.section-sub {
  text-transform: none;
  letter-spacing: 0;
  font-weight: 500;
  opacity: 0.8;
}

.empty {
  color: var(--muted);
  font-size: 0.88rem;
  text-align: center;
  padding: 14px;
  margin: 0;
  list-style: none;
  background: rgba(255, 255, 255, 0.03);
  border: 1px dashed var(--border);
  border-radius: 14px;
}

.stretch-list { display: grid; gap: 8px; }

.stretch {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-left: 4px solid var(--fair);
  border-radius: 14px;
  padding: 11px 13px;
}
.stretch.outage { border-left-color: var(--bad); }
.stretch.unstable-stretch { border-left-color: var(--poor); }
.stretch.ongoing { box-shadow: 0 0 0 1px rgba(239, 68, 68, 0.35); }

.stretch-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 10px;
}

.stretch-name { font-weight: 700; font-size: 0.92rem; }
.stretch-dur {
  font-weight: 700;
  font-size: 0.85rem;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.stretch.ongoing .stretch-dur { color: #fca5a5; }

.stretch-range,
.stretch-meta {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.check-list {
  list-style: none;
  margin: 0;
  padding: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--border);
}
.check:last-child { border-bottom: none; }

.check-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  margin-top: 5px;
  flex-shrink: 0;
  background: var(--good);
}
.check.s-spotty .check-dot { background: var(--fair); }
.check.s-no-internet .check-dot { background: var(--poor); }
.check.s-offline .check-dot { background: var(--bad); }

.check-main { flex: 1; min-width: 0; }
.check-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.88rem;
}
.check-status { font-weight: 650; }
.check-nums { font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }
.check-sub {
  font-size: 0.74rem;
  color: var(--muted);
  margin-top: 2px;
  overflow-wrap: anywhere;
}

.more-btn { width: 100%; margin-top: 8px; }

.btn-danger {
  width: 100%;
  margin-top: 22px;
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
  border: 1px solid rgba(239, 68, 68, 0.35);
  box-shadow: none;
}

/* Compact archive note + collapsible recent checks */
.archive-note {
  margin: 8px 2px 0;
  font-size: 0.72rem;
  color: var(--muted);
  opacity: 0.85;
  text-align: center;
}

.recent-details > summary {
  cursor: pointer;
  list-style: none;
  user-select: none;
}
.recent-details > summary::-webkit-details-marker { display: none; }
.recent-details > summary::before {
  content: '▸';
  display: inline-block;
  width: 1em;
  transition: transform 0.15s ease;
}
.recent-details[open] > summary::before { transform: rotate(90deg); }

/* ---------- Two separate indicators: 1 Internet status · 2 Link type ---------- */
.indicators {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  position: relative; /* above .hero::before glow */
}

.indicator {
  --ic: #94a3b8;
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 0;
  padding: 12px 10px 12px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--border);
  border-top: 3px solid var(--ic);
  transition: border-color 0.3s, background 0.3s;
}

.ind-hdr {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 10px;
  font-size: 0.68rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
  white-space: nowrap;
}
.ind-num {
  display: inline-grid;
  place-items: center;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  font-size: 0.62rem;
  letter-spacing: 0;
  color: var(--bg);
  background: var(--muted);
}

.ind-kind {
  margin: 0 0 6px;
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  opacity: 0.75;
}

/* 1 · Internet status (round orb, traffic-light colours) */
.ind-internet[data-state="online"] { --ic: var(--good); }
.ind-internet[data-state="spotty"] { --ic: var(--fair); }
.ind-internet[data-state="no-internet"] { --ic: var(--poor); }
.ind-internet[data-state="offline"] { --ic: var(--bad); }
.ind-internet[data-state="checking"] { --ic: var(--accent); }

.indicator .status-orb {
  width: 64px;
  height: 64px;
  margin: 0 0 10px;
}
.indicator .status-orb .icon { font-size: 1.6rem; }

.indicator .status-label,
.link-label {
  font-size: 1.3rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  margin: 0 0 2px;
  line-height: 1.15;
}
.ind-internet .status-label { color: var(--text); }

.indicator .status-sub,
.link-note {
  margin: 0;
  font-size: 0.74rem;
  line-height: 1.35;
  color: var(--muted);
  overflow-wrap: anywhere;
}

/* 2 · Link type (rounded-square tile, its own palette — no traffic-light colours) */
.ind-link[data-link="w"] { --ic: #22d3ee; }
.ind-link[data-link="c"] { --ic: #a78bfa; }
.ind-link[data-link="e"] { --ic: #60a5fa; }
.ind-link[data-link="b"] { --ic: #f472b6; }
.ind-link[data-link="u"] { --ic: #94a3b8; }
.ind-link[data-link="x"] { --ic: #f87171; }

.link-orb {
  width: 64px;
  height: 64px;
  margin: 0 0 10px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  color: var(--ic);
  background: rgba(148, 163, 184, 0.1); /* fallback for browsers without color-mix() */
  border: 2px solid rgba(148, 163, 184, 0.35);
  background: color-mix(in srgb, var(--ic) 13%, transparent);
  border: 2px solid color-mix(in srgb, var(--ic) 60%, transparent);
  transition: color 0.3s, background 0.3s, border-color 0.3s;
}
.ind-link .link-label { color: var(--ic); transition: color 0.3s; }
.link-icon { width: 30px; height: 30px; display: inline-grid; place-items: center; }
.link-icon svg { width: 30px; height: 30px; display: block; }

.ind-link.flash .link-orb { animation: link-flash 0.9s ease-in-out 3; }
@keyframes link-flash {
  0%, 100% { transform: scale(1); box-shadow: 0 0 0 0 transparent; }
  45% { transform: scale(1.1); box-shadow: 0 0 0 7px color-mix(in srgb, var(--ic) 30%, transparent); }
}

.link-switch {
  position: relative;
  display: table;
  margin: 10px auto 0;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid var(--border);
  transition: background 0.4s, color 0.4s, border-color 0.4s;
}
.link-switch.fresh {
  color: #fde68a;
  background: rgba(234, 179, 8, 0.16);
  border-color: rgba(234, 179, 8, 0.5);
}

/* Live timeline: row 1 internet result, row 2 link type of the same check */
.timeline {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: end;
  column-gap: 8px;
  row-gap: 5px;
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}
.tl-lbl {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  text-align: right;
  line-height: 1;
}
.timeline .history {
  margin: 0;
  padding: 0 3px;
  border: 0;
  height: 28px;
  gap: 4px;
  min-width: 0;
}
.timeline .history .dot,
.link-strip .tick {
  flex: 0 1 8px;
  min-width: 4px;
}
.link-strip {
  display: flex;
  justify-content: center;
  min-width: 0;
  padding: 0 3px;
  gap: 4px;
  align-items: center;
}
.link-strip .tick {
  width: 8px;
  height: 6px;
  border-radius: 2px;
  background: rgba(148, 163, 184, 0.18);
}
.link-strip .tick[data-link="w"] { background: #22d3ee; }
.link-strip .tick[data-link="c"] { background: #a78bfa; }
.link-strip .tick[data-link="e"] { background: #60a5fa; }
.link-strip .tick[data-link="b"] { background: #f472b6; }
.link-strip .tick[data-link="u"] { background: #64748b; }
.link-strip .tick[data-link="x"] { background: #f87171; }
.link-strip .tick.sw { box-shadow: 0 0 0 1.5px #fde047; }

@media (max-width: 340px) {
  .indicators { grid-template-columns: 1fr; }
}

/* sparkline dot right after a connection switch */
.history .dot.sw { box-shadow: 0 0 0 2px var(--bg-card), 0 0 0 3.5px #fde047; }

/* History: link info on stretches / checks */
.chip-switch {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 999px;
  font-size: 0.7rem;
  font-weight: 650;
  vertical-align: 1px;
  color: #fde68a;
  background: rgba(234, 179, 8, 0.14);
  border: 1px solid rgba(234, 179, 8, 0.4);
  white-space: nowrap;
}
.stretch-link,
.stretch-switches {
  margin: 4px 0 0;
  font-size: 0.8rem;
  color: var(--muted);
}
.stretch-link strong { color: var(--text); font-weight: 650; }
.stretch-link.switched strong { color: #fde68a; }
.stretch-switches { font-size: 0.74rem; }
.check.switched { background: rgba(234, 179, 8, 0.05); }
/* History summary: internet status and link type on separate rows */
.sum-split {
  margin: -4px 0 12px;
  display: grid;
  gap: 6px;
}
.sum-split-row {
  display: grid;
  grid-template-columns: 96px 1fr;
  gap: 8px;
  align-items: baseline;
  font-size: 0.78rem;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.03);
  border-left: 3px solid var(--good);
}
.sum-split-row + .sum-split-row { border-left-color: #22d3ee; }
.sum-split-lbl {
  font-size: 0.66rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.sum-split-val { color: var(--text); }

/* "Internet" / "Link" labels on stretch cards */
.dim-lbl {
  display: inline-block;
  min-width: 58px;
  margin-right: 6px;
  font-size: 0.64rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.dim-internet { color: #86efac; }
.dim-link { color: #67e8f9; }

/* Link type chip on each recent check (separate from the status text) */
.link-chip {
  --ic: #94a3b8;
  display: inline-block;
  margin-left: 6px;
  padding: 1px 7px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 650;
  vertical-align: 1px;
  white-space: nowrap;
  color: var(--ic);
  background: rgba(148, 163, 184, 0.1);
  background: color-mix(in srgb, var(--ic) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--ic) 40%, transparent);
}
.link-chip[data-link="w"] { --ic: #22d3ee; }
.link-chip[data-link="c"] { --ic: #a78bfa; }
.link-chip[data-link="e"] { --ic: #60a5fa; }
.link-chip[data-link="b"] { --ic: #f472b6; }
.link-chip[data-link="x"] { --ic: #f87171; }

@media (prefers-reduced-motion: reduce) {
  .ind-link.flash .link-orb { animation: none; outline: 2px solid var(--ic); outline-offset: 2px; }
}
