/* is-my-internet-working.com: one stylesheet, system fonts, no frameworks. */

:root {
  --bg: #f4f6fb;
  --bg-glow: rgba(37, 99, 235, 0.08);
  --surface: #ffffff;
  --surface-2: #f7f9fc;
  --surface-3: #eef2f8;
  --border: #e2e7f0;
  --border-strong: #cfd7e4;
  --text: #0d1424;
  --muted: #566176;
  --faint: #8792a6;
  --accent: #2563eb;
  --accent-2: #7c3aed;
  --accent-soft: rgba(37, 99, 235, 0.1);
  --good: #15a34a;
  --good-soft: rgba(21, 163, 74, 0.12);
  --warn: #d97706;
  --warn-soft: rgba(217, 119, 6, 0.13);
  --bad: #dc2626;
  --bad-soft: rgba(220, 38, 38, 0.11);
  --radius: 18px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(15, 23, 42, 0.04), 0 6px 24px rgba(15, 23, 42, 0.06);
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --wrap: 1120px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0a0e17;
  --bg-glow: rgba(96, 165, 250, 0.1);
  --surface: #111826;
  --surface-2: #0e1522;
  --surface-3: #182133;
  --border: #1f2a3d;
  --border-strong: #2c3a52;
  --text: #e8edf5;
  --muted: #9aa6ba;
  --faint: #6b788e;
  --accent: #60a5fa;
  --accent-2: #a78bfa;
  --accent-soft: rgba(96, 165, 250, 0.14);
  --good: #34d399;
  --good-soft: rgba(52, 211, 153, 0.13);
  --warn: #fbbf24;
  --warn-soft: rgba(251, 191, 36, 0.13);
  --bad: #f87171;
  --bad-soft: rgba(248, 113, 113, 0.13);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 30px rgba(0, 0, 0, 0.25);
  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0a0e17;
    --bg-glow: rgba(96, 165, 250, 0.1);
    --surface: #111826;
    --surface-2: #0e1522;
    --surface-3: #182133;
    --border: #1f2a3d;
    --border-strong: #2c3a52;
    --text: #e8edf5;
    --muted: #9aa6ba;
    --faint: #6b788e;
    --accent: #60a5fa;
    --accent-2: #a78bfa;
    --accent-soft: rgba(96, 165, 250, 0.14);
    --good: #34d399;
    --good-soft: rgba(52, 211, 153, 0.13);
    --warn: #fbbf24;
    --warn-soft: rgba(251, 191, 36, 0.13);
    --bad: #f87171;
    --bad-soft: rgba(248, 113, 113, 0.13);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 30px rgba(0, 0, 0, 0.25);
    color-scheme: dark;
  }
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0;
  font: 16px/1.55 var(--sans);
  color: var(--text);
  background: var(--bg);
  background-image: radial-gradient(1200px 500px at 50% -120px, var(--bg-glow), transparent 70%);
  background-repeat: no-repeat;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
img, svg, canvas { max-width: 100%; }
button, input, select { font: inherit; color: inherit; }
code, pre, .mono { font-family: var(--mono); }
code { font-size: 0.9em; background: var(--surface-3); padding: 0.1em 0.4em; border-radius: 6px; overflow-wrap: anywhere; }
[hidden] { display: none !important; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--accent-soft); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
@media (min-width: 720px) { .wrap { padding: 0 24px; } }
.stack { display: flex; flex-direction: column; gap: 20px; padding-bottom: 56px; }
.page-top { padding-top: 28px; }
.narrow { max-width: 760px; }
.center { justify-content: center; }
.center-text { text-align: center; align-items: center; }
.muted { color: var(--muted); }
.small { font-size: 0.875rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: -9999px; top: 8px; z-index: 100; background: var(--surface); padding: 8px 14px; border-radius: 8px; }
.skip-link:focus { left: 8px; }
.accent-text { color: var(--accent); overflow-wrap: anywhere; }

.h1 { font-size: clamp(1.9rem, 4.2vw, 2.8rem); line-height: 1.12; letter-spacing: -0.025em; margin: 0 0 8px; font-weight: 800; }
.h2 { font-size: 1.3rem; line-height: 1.3; letter-spacing: -0.01em; margin: 0 0 12px; font-weight: 750; }
.h3 { font-size: 1.05rem; margin: 20px 0 10px; font-weight: 700; }
.lead { font-size: 1.125rem; color: var(--muted); margin: 0; max-width: 62ch; }
.page-head { margin-bottom: 4px; }
.eyebrow { font-size: 0.8rem; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); margin: 0 0 6px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); font-weight: 650; letter-spacing: -0.01em; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.brand-mark { color: var(--accent); display: inline-flex; }
.brand-text b { color: var(--accent); }
.site-nav { display: flex; gap: 2px; margin-left: auto; }
.site-nav a { color: var(--muted); padding: 8px 12px; border-radius: 10px; font-size: 0.94rem; font-weight: 550; white-space: nowrap; }
.site-nav a:hover { color: var(--text); background: var(--surface-3); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--accent); background: var(--accent-soft); }
.icon-btn { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface); cursor: pointer; color: var(--muted); }
.icon-btn:hover { color: var(--text); border-color: var(--border-strong); }
.i-moon { display: none; }
:root[data-theme="dark"] .i-sun { display: none; }
:root[data-theme="dark"] .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .i-sun { display: none; }
  :root:not([data-theme="light"]) .i-moon { display: block; }
}
@media (max-width: 900px) {
  .header-inner { gap: 8px; padding-top: 8px; }
  .brand { order: 1; }
  .icon-btn { order: 2; margin-left: auto; }
  .site-nav { order: 3; width: 100%; margin: 0 -16px; padding: 4px 16px 8px; overflow-x: auto; scrollbar-width: none; width: calc(100% + 32px); }
  .site-nav::-webkit-scrollbar { display: none; }
}
@media (max-width: 380px) { .brand-text { font-size: 0.95rem; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 12px; border: 1px solid var(--border-strong);
  background: var(--surface); color: var(--text); font-weight: 600; font-size: 0.95rem;
  cursor: pointer; text-decoration: none; transition: transform 0.08s ease, background 0.15s, border-color 0.15s, box-shadow 0.15s;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; border-color: var(--accent); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; box-shadow: 0 4px 14px color-mix(in srgb, var(--accent) 30%, transparent); }
:root[data-theme="dark"] .btn-primary { color: #06101f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .btn-primary { color: #06101f; } }
.btn-primary:hover { filter: brightness(1.07); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn-ghost:hover { color: var(--text); background: var(--surface-3); border-color: transparent; }
.btn-small { padding: 6px 12px; font-size: 0.85rem; border-radius: 10px; }
.btn-lg { padding: 13px 22px; font-size: 1.02rem; border-radius: 14px; }
.btn-xl { padding: 16px 30px; font-size: 1.1rem; border-radius: 16px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font-weight: 600; }
.link-btn:hover { text-decoration: underline; }
.copy-btn { font-size: 0.78rem; font-weight: 600; padding: 3px 10px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); color: var(--muted); cursor: pointer; vertical-align: middle; }
.copy-btn:hover { color: var(--text); border-color: var(--accent); }

/* ---------- cards ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); min-width: 0; }
@media (min-width: 720px) { .card { padding: 28px; } }
.card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 8px; }
.card-head .h2 { margin: 0; }
.grid-2 { display: grid; gap: 20px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

/* ---------- hero (home) ---------- */
.hero { position: relative; overflow: hidden; padding: 40px 0 36px; text-align: center; --state: var(--faint); --state-soft: transparent; }
.hero::before {
  content: ""; position: absolute; inset: -40% -10% auto; height: 120%;
  background: radial-gradient(closest-side, var(--state-soft), transparent);
  opacity: 0.9; pointer-events: none; transition: background 0.6s ease;
}
.hero-inner { position: relative; display: flex; flex-direction: column; align-items: center; }
.hero[data-state="yes"] { --state: var(--good); --state-soft: var(--good-soft); }
.hero[data-state="slow"], .hero[data-state="partial"], .hero[data-state="captive"] { --state: var(--warn); --state-soft: var(--warn-soft); }
.hero[data-state="no"] { --state: var(--bad); --state-soft: var(--bad-soft); }
.answer {
  margin: 4px 0 6px; font-size: clamp(4.2rem, 17vw, 9.5rem); font-weight: 850; line-height: 0.95; letter-spacing: -0.06em;
  color: var(--state, var(--text)); transition: color 0.4s ease;
}
.hero[data-state="checking"] .answer { color: var(--faint); font-size: clamp(3rem, 11vw, 6.5rem); animation: breathe 1.6s ease-in-out infinite; }
.answer-sm { font-size: clamp(4rem, 14vw, 7rem); color: var(--warn); margin: 0; }
.answer-sub { font-size: clamp(1.05rem, 2.4vw, 1.3rem); color: var(--text); margin: 6px 0 18px; max-width: 40ch; }
.answer-sub b { color: var(--state); }
@keyframes breathe { 50% { opacity: 0.45; } }

.probes { list-style: none; padding: 0; margin: 0 0 16px; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.probe { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px 6px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-size: 0.87rem; color: var(--muted); }
.probe b { color: var(--text); font-weight: 600; font-variant-numeric: tabular-nums; }
.probe .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); }
.probe[data-ok="true"] .dot { background: var(--good); }
.probe[data-ok="false"] .dot { background: var(--bad); }
.probe[data-ok="pending"] .dot { animation: breathe 1s infinite; }

.hero-meta { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 0.9rem; margin-bottom: 22px; flex-wrap: wrap; justify-content: center; }
.live-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--state); box-shadow: 0 0 0 0 var(--state); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--state) 55%, transparent); } 70% { box-shadow: 0 0 0 10px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; justify-content: center; }

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

/* ---------- key/value ---------- */
.kv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; margin: 12px 0 0; }
.kv { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; min-width: 0; }
.kv dt { font-size: 0.78rem; font-weight: 600; letter-spacing: 0.02em; color: var(--muted); margin-bottom: 3px; }
.kv dd { margin: 0; font-weight: 600; overflow-wrap: anywhere; }
.kv dd small { display: block; font-weight: 450; color: var(--muted); font-size: 0.82rem; font-family: var(--sans); }
.kv dd .muted { font-family: var(--sans); }
.kv-wide { grid-column: 1 / -1; }
@media (max-width: 560px) {
  .kv-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
  .kv { padding: 10px 12px; }
  .kv dd { font-size: 0.95rem; }
}
.ip-big { font-size: clamp(1.25rem, 4vw, 1.9rem); font-weight: 700; letter-spacing: -0.01em; margin-right: 8px; overflow-wrap: anywhere; }
.kv-list { margin: 0; }
.kv-list > div { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--border); }
.kv-list > div:last-child { border-bottom: 0; }
.kv-list dt { color: var(--muted); flex-shrink: 0; }
.kv-list dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; min-width: 0; }
.kv-list.compact > div { padding: 7px 0; }

.skeleton { display: inline-block; width: 9em; max-width: 100%; height: 1em; border-radius: 6px; vertical-align: middle; background: linear-gradient(90deg, var(--surface-3), var(--border), var(--surface-3)); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; }
.skeleton-lg { height: 1.2em; width: 11em; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ---------- speed test ---------- */
.speedtest { scroll-margin-top: 80px; }
.st-head { display: flex; justify-content: space-between; align-items: baseline; flex-wrap: wrap; gap: 8px; }
.st-head .h2 { margin: 0; }
.st-main { display: grid; gap: 18px; align-items: center; justify-items: center; margin: 14px 0 8px; }
@media (min-width: 760px) { .st-main { grid-template-columns: 1fr 1fr; } }
.gauge { position: relative; width: min(100%, 340px); aspect-ratio: 220 / 164; }
.gauge svg { width: 100%; height: 100%; overflow: visible; }
.gauge-track, .gauge-fill { fill: none; stroke-width: 14; stroke-linecap: round; }
.gauge-track { stroke: var(--surface-3); }
.gauge-fill { stroke: url(#gauge-grad); stroke-dasharray: 0 1000; opacity: 0; transition: stroke-dasharray 0.25s ease-out; }
.gauge-ticks text { font-size: 8.5px; fill: var(--faint); font-family: var(--sans); text-anchor: middle; dominant-baseline: middle; }
.gauge-center { position: absolute; inset: 30% 0 auto; display: flex; flex-direction: column; align-items: center; }
.gauge-value { font-size: clamp(2.6rem, 9vw, 3.6rem); font-weight: 800; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; line-height: 1; }
.gauge-unit { color: var(--muted); font-weight: 600; font-size: 0.95rem; }
.gauge-phase { position: absolute; left: 0; right: 0; bottom: 0; text-align: center; font-size: 0.9rem; font-weight: 600; color: var(--muted); }
.st-actions { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.st-note { margin: 0; }
.speedtest[data-running="true"] [data-st-start] { opacity: 0.6; pointer-events: none; }

.metrics { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-top: 12px; }
@media (min-width: 760px) { .metrics { grid-template-columns: repeat(4, 1fr); } }
.metric { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; min-width: 0; transition: border-color 0.2s, box-shadow 0.2s; }
.metric.is-active { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.metric-label { font-size: 0.8rem; font-weight: 650; color: var(--muted); }
.metric-label .arrow { color: var(--accent); }
.metric-value b { font-size: 1.7rem; font-weight: 800; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.metric-value small { margin-left: 4px; color: var(--muted); font-weight: 600; }
.metric-sub { font-size: 0.8rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.grade { display: inline-grid; place-items: center; min-width: 1.6em; }
.grade-good { color: var(--good); } .grade-warn { color: var(--warn); } .grade-bad { color: var(--bad); }

.st-graph { width: 100%; height: 70px; margin-top: 14px; display: block; }
.speedtest:not([data-ran]) .st-graph { display: none; }
.st-graph polyline { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.st-graph-down { stroke: var(--accent); }
.st-graph-up { stroke: var(--accent-2); }

.st-results { margin-top: 18px; border-top: 1px solid var(--border); padding-top: 20px; }
.st-verdict { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.rating-badge { display: inline-block; padding: 6px 14px; border-radius: 999px; font-weight: 800; font-size: 1.05rem; background: var(--good-soft); color: var(--good); }
.rating-badge[data-level="warn"] { background: var(--warn-soft); color: var(--warn); }
.rating-badge[data-level="bad"] { background: var(--bad-soft); color: var(--bad); }
.compare-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); margin-top: 16px; }
.compare { background: var(--surface-2); border: 1px solid var(--border); border-radius: 14px; padding: 14px; }
.compare b { display: block; font-size: 1.35rem; letter-spacing: -0.02em; }
.compare span { color: var(--muted); font-size: 0.86rem; }
.can-grid, .times-grid { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.can-grid li, .times-grid li { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); font-size: 0.93rem; }
.can-grid .ic { flex-shrink: 0; width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; font-size: 0.8rem; font-weight: 800; }
.can-grid [data-ok="yes"] .ic { background: var(--good-soft); color: var(--good); }
.can-grid [data-ok="meh"] .ic { background: var(--warn-soft); color: var(--warn); }
.can-grid [data-ok="no"] .ic { background: var(--bad-soft); color: var(--bad); }
.can-grid small, .times-grid small { display: block; color: var(--muted); }
.times-grid b { margin-left: auto; font-variant-numeric: tabular-nums; white-space: nowrap; }
.st-share { margin-top: 8px; }
.share-card { width: 100%; max-width: 560px; height: auto; aspect-ratio: 1200 / 630; border-radius: 14px; border: 1px solid var(--border); display: block; margin: 4px 0 14px; }
.challenge { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 14px; background: linear-gradient(90deg, var(--accent-soft), transparent); border: 1px solid var(--border); margin-bottom: 16px; }
.challenge-icon { font-size: 1.6rem; }

/* ---------- share buttons ---------- */
.share-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 10px; }
.share-btn { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 10px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-size: 0.85rem; font-weight: 600; cursor: pointer; }
.share-btn:hover { text-decoration: none; border-color: var(--accent); }
.share-btn svg { width: 16px; height: 16px; }

/* ---------- services ---------- */
.svc-mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 8px; margin: 14px 0 18px; }
.svc-mini { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); color: var(--text); font-weight: 600; font-size: 0.93rem; min-width: 0; }
.svc-mini:hover { text-decoration: none; border-color: var(--accent); }
.svc-mini .name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.svc-avatar { --brand: var(--accent); flex-shrink: 0; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 0.9rem; color: #fff; background: var(--brand); }
.svc-avatar-lg { width: 56px; height: 56px; border-radius: 16px; font-size: 1.6rem; }
.sdot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; background: var(--faint); }
.sdot[data-v="up"] { background: var(--good); }
.sdot[data-v="reports"], .sdot[data-v="problems"] { background: var(--warn); }
.sdot[data-v="down"] { background: var(--bad); }
.sdot[data-v="blocked"] { background: var(--faint); box-shadow: inset 0 0 0 2px var(--bad); }

.search-form { display: flex; align-items: center; gap: 8px; background: var(--surface); border: 1.5px solid var(--border-strong); border-radius: 16px; padding: 6px 6px 6px 16px; transition: border-color 0.15s, box-shadow 0.15s; }
.search-form:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search-form input { flex: 1; min-width: 0; border: 0; background: transparent; outline: none; font-size: 1.05rem; padding: 8px 0; font-weight: 600; }
.search-prefix, .search-suffix { color: var(--muted); font-weight: 650; }
.search-form-lg { padding: 8px 8px 8px 20px; box-shadow: var(--shadow); }
.search-form-lg input { font-size: 1.2rem; }
@media (max-width: 520px) { .search-suffix { display: none; } }

.status-summary { display: flex; align-items: center; gap: 14px; padding: 18px 22px; flex-wrap: wrap; }
.status-summary strong { font-size: 1.1rem; }
.filter-row, .chip-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 999px; border: 1px solid var(--border); background: var(--surface); color: var(--text); font-size: 0.88rem; font-weight: 600; cursor: pointer; }
.chip:hover { text-decoration: none; border-color: var(--accent); }
.chip.is-active { background: var(--accent); border-color: var(--accent); color: #fff; }
:root[data-theme="dark"] .chip.is-active { color: #06101f; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .chip.is-active { color: #06101f; } }
.chip.is-done { background: var(--good-soft); border-color: transparent; color: var(--good); cursor: default; }

.svc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.svc-card { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 16px; border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); color: var(--text); min-width: 0; }
.svc-card:hover { text-decoration: none; border-color: var(--accent); }
.svc-card-top { display: flex; align-items: center; gap: 12px; }
.svc-card-top strong { flex: 1; min-width: 0; font-size: 1.02rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.svc-card-rows { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 0.84rem; color: var(--muted); }
.svc-card-rows b { font-weight: 600; color: var(--text); text-align: right; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; white-space: nowrap; background: var(--surface-3); color: var(--muted); }
.pill-good { background: var(--good-soft); color: var(--good); }
.pill-warn { background: var(--warn-soft); color: var(--warn); }
.pill-bad { background: var(--bad-soft); color: var(--bad); }
.pill-muted { background: var(--surface-3); color: var(--muted); box-shadow: inset 0 0 0 1px var(--bad-soft); }
.legend-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.legend-list li { display: flex; gap: 10px; align-items: baseline; color: var(--muted); font-size: 0.92rem; }

/* ---------- checks & verdicts ---------- */
.check-list { list-style: none; margin: 16px 0; padding: 0; display: grid; gap: 10px; }
.check-list-3 { grid-template-columns: 1fr; }
@media (min-width: 760px) { .check-list-3 { grid-template-columns: repeat(3, 1fr); } }
.check-list li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); min-width: 0; }
.check-list li > div { display: flex; flex-direction: column; min-width: 0; }
.check-list li span.muted { font-size: 0.88rem; overflow-wrap: anywhere; }
.check-dot { flex-shrink: 0; width: 12px; height: 12px; margin-top: 5px; border-radius: 50%; background: var(--faint); animation: breathe 1.1s infinite; }
[data-state="good"] > .check-dot { background: var(--good); animation: none; }
[data-state="warn"] > .check-dot { background: var(--warn); animation: none; }
[data-state="bad"] > .check-dot { background: var(--bad); animation: none; }
[data-state="info"] > .check-dot { background: var(--accent); animation: none; }

.verdict-head { display: flex; gap: 16px; align-items: center; }
.verdict-head .muted { margin: 2px 0 0; }
.verdict-title { margin: 0; font-size: clamp(1.4rem, 3.5vw, 1.9rem); letter-spacing: -0.02em; line-height: 1.2; }
.verdict-icon { flex-shrink: 0; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; font-size: 1.5rem; font-weight: 800; background: var(--surface-3); color: var(--muted); }
.verdict-card[data-v="up"] .verdict-icon { background: var(--good-soft); color: var(--good); }
.verdict-card[data-v="just-you"] .verdict-icon, .verdict-card[data-v="problems"] .verdict-icon { background: var(--warn-soft); color: var(--warn); }
.verdict-card[data-v="down"] .verdict-icon { background: var(--bad-soft); color: var(--bad); }
.verdict-card[data-v="up"] .verdict-title { color: var(--good); }
.verdict-card[data-v="down"] .verdict-title { color: var(--bad); }
.verdict-card[data-v="just-you"] .verdict-title, .verdict-card[data-v="problems"] .verdict-title { color: var(--warn); }

.svc-hero-top { display: flex; gap: 18px; align-items: center; }
.svc-hero-top .h1 { margin-bottom: 2px; }
.svc-answer { font-size: clamp(1.1rem, 2.6vw, 1.35rem); font-weight: 700; margin: 0; color: var(--muted); }
.svc-hero[data-verdict="up"] .svc-answer { color: var(--good); }
.svc-hero[data-verdict="reports"] .svc-answer, .svc-hero[data-verdict="problems"] .svc-answer, .svc-hero[data-verdict="blocked"] .svc-answer { color: var(--warn); }
.svc-hero[data-verdict="down"] .svc-answer { color: var(--bad); }
.svc-hero[data-verdict="up"] { border-top: 4px solid var(--good); }
.svc-hero[data-verdict="reports"], .svc-hero[data-verdict="problems"], .svc-hero[data-verdict="blocked"] { border-top: 4px solid var(--warn); }
.svc-hero[data-verdict="down"] { border-top: 4px solid var(--bad); }
.report-box { padding: 16px; border-radius: 14px; background: var(--surface-2); border: 1px dashed var(--border-strong); margin-bottom: 16px; }
.report-box p { margin: 0 0 10px; }
.report-box p:last-child { margin: 10px 0 0; }
.breadcrumb { color: var(--muted); }

.bar-chart { display: flex; align-items: flex-end; gap: 3px; height: 120px; padding-top: 8px; }
.bar-chart span { flex: 1; min-height: 2px; background: var(--accent); opacity: 0.85; border-radius: 3px 3px 0 0; }
.bar-chart span.zero { background: var(--surface-3); opacity: 1; }
.strip { display: flex; gap: 1px; height: 36px; border-radius: 8px; overflow: hidden; margin-top: 8px; }
.strip span { flex: 1; background: var(--good); opacity: 0.85; }
.strip span[data-s="0"] { background: var(--bad); opacity: 1; }
.strip span[data-s="2"] { background: var(--warn); opacity: 1; }
.strip span[data-s="-"] { background: var(--surface-3); }
.strip:empty::before { content: "No data yet"; margin: auto; color: var(--faint); font-size: 0.85rem; }
.chart-axis { display: flex; justify-content: space-between; margin: 6px 0 12px; }
.issue-list { list-style: none; padding: 0; margin: 8px 0 0; display: grid; gap: 8px; }
.issue-list li { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 0.9rem; }
.issue-list .bar { grid-column: 1 / -1; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.issue-list .bar i { display: block; height: 100%; background: var(--accent); border-radius: 3px; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; margin: 0 -4px; }
.table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.table th { text-align: left; font-size: 0.78rem; letter-spacing: 0.03em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 8px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table td { padding: 10px 8px; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
.table tr:last-child td { border-bottom: 0; }
.table tr.is-you td { background: var(--accent-soft); }
.table .num { text-align: right; }
.table .rank { color: var(--muted); width: 2.5em; }
.history-chart { width: 100%; height: 130px; display: block; margin: 8px 0 12px; }
.history-chart polyline { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; }
.history-chart circle { r: 3; }

/* ---------- misc components ---------- */
.feature-grid { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 560px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px) { .feature-grid { grid-template-columns: repeat(4, 1fr); } }
.feature { display: flex; flex-direction: column; gap: 6px; padding: 20px; border-radius: var(--radius); border: 1px solid var(--border); background: var(--surface); box-shadow: var(--shadow); color: var(--text); }
.feature:hover { text-decoration: none; border-color: var(--accent); transform: translateY(-2px); transition: transform 0.15s, border-color 0.15s; }
.feature-icon { font-size: 1.6rem; }
.feature .muted { font-size: 0.92rem; }

.faq-item { border-bottom: 1px solid var(--border); }
.faq-item:last-child { border-bottom: 0; }
.faq-item summary { cursor: pointer; padding: 14px 28px 14px 0; font-weight: 650; list-style: none; position: relative; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 4px; top: 12px; font-size: 1.3rem; color: var(--muted); transition: transform 0.2s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin: 0 0 16px; color: var(--muted); }

.prose p, .prose li { color: var(--text); }
.prose p { margin: 0 0 12px; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 6px; }
.steps { padding-left: 0; margin: 12px 0; list-style: none; counter-reset: step; display: grid; gap: 10px; }
.steps[start="4"] { counter-reset: step 3; }
.steps[start="6"] { counter-reset: step 5; }
.steps > li { counter-increment: step; position: relative; padding-left: 40px; margin: 0; }
.steps > li::before { content: counter(step); position: absolute; left: 0; top: 0; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 0.85rem; background: var(--accent-soft); color: var(--accent); }
.explain-grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }
.explain-grid .h3 { margin-top: 0; }
.explain-grid p { color: var(--muted); font-size: 0.94rem; }

.ip-hero { text-align: center; padding-top: 34px; padding-bottom: 30px; }
.ip-display { font-size: clamp(1.7rem, 7vw, 3.6rem); font-weight: 800; letter-spacing: -0.03em; margin: 4px 0 18px; overflow-wrap: anywhere; line-height: 1.15; }
.map-wrap { margin: 14px 0 8px; }
.map-wrap iframe { width: 100%; height: 260px; border: 1px solid var(--border); border-radius: 14px; }

.symptom-grid { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
.symptom { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); color: var(--text); font-weight: 650; box-shadow: var(--shadow); }
.symptom span { font-size: 1.3rem; }
.symptom:hover { text-decoration: none; border-color: var(--accent); }
.fix-section { scroll-margin-top: 80px; }
.fix-section:target { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft), var(--shadow); }
.live-status { display: inline-flex; align-items: center; gap: 8px; margin: 14px 0 0; padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); font-weight: 600; font-size: 0.92rem; }
.state-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--faint); flex-shrink: 0; }
[data-state="good"] .state-dot { background: var(--good); }
[data-state="bad"] .state-dot { background: var(--bad); }
[data-state="warn"] .state-dot { background: var(--warn); }

.tabs { margin: 8px 0 14px; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; }
.tab-list { display: flex; overflow-x: auto; background: var(--surface-2); border-bottom: 1px solid var(--border); scrollbar-width: none; }
.tab-list button { border: 0; background: none; padding: 10px 16px; cursor: pointer; font-weight: 600; color: var(--muted); white-space: nowrap; border-bottom: 2px solid transparent; }
.tab-list button[aria-selected="true"] { color: var(--accent); border-bottom-color: var(--accent); }
.tab-panel { padding: 14px 16px 4px; }
.code { position: relative; background: var(--surface-3); border-radius: 10px; padding: 12px 14px; overflow-x: auto; font-size: 0.86rem; line-height: 1.6; margin: 0 0 12px; }
.code code { background: none; padding: 0; }
.code .copy-btn { position: absolute; top: 8px; right: 8px; }
.cta-card { display: flex; justify-content: space-between; align-items: center; gap: 18px; flex-wrap: wrap; }
.cta-card .h2 { margin-bottom: 4px; }
.cta-card p { margin: 0; }
.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; justify-content: space-between; }
.toolbar label, .monitor-controls label { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: 0.93rem; }
select { padding: 8px 12px; border-radius: 10px; border: 1px solid var(--border-strong); background: var(--surface); }

/* ---------- monitor ---------- */
.monitor-top { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.monitor-state { display: flex; align-items: center; gap: 14px; }
.monitor-state > div { display: flex; flex-direction: column; }
.monitor-status { font-size: 1.5rem; letter-spacing: -0.02em; }
.monitor-card .state-dot { width: 18px; height: 18px; }
.monitor-card[data-running="true"] .state-dot { animation: pulse 2s infinite; --state: var(--good); }
.monitor-controls { display: flex; flex-wrap: wrap; gap: 12px 22px; margin: 18px 0; padding: 14px 16px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); }
.switch { cursor: pointer; }
.switch input { width: 18px; height: 18px; accent-color: var(--accent); }
.stat-grid { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .stat-grid { grid-template-columns: repeat(6, 1fr); } }
.stat { padding: 12px 14px; border-radius: 14px; background: var(--surface-2); border: 1px solid var(--border); display: flex; flex-direction: column; min-width: 0; }
.stat-label { font-size: 0.78rem; font-weight: 650; color: var(--muted); }
.stat b { font-size: 1.3rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chart-box { margin-top: 16px; }
.chart-box canvas { width: 100%; height: 180px; display: block; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.chart-legend { display: flex; gap: 16px; margin-top: 8px; }
.lg { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 4px; vertical-align: -1px; }
.lg-ok { background: var(--accent); }
.lg-bad { background: var(--bad); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--border); background: var(--surface-2); padding: 40px 0 24px; margin-top: 20px; }
.footer-grid { display: grid; gap: 28px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 2fr 1fr 1fr 1fr; } }
.site-footer h3 { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin: 0 0 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer ul a { color: var(--text); font-size: 0.93rem; }
.footer-about p { max-width: 40ch; font-size: 0.93rem; }
.footer-about .btn { margin-top: 12px; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 8px; margin-top: 32px; padding-top: 18px; border-top: 1px solid var(--border); color: var(--faint); font-size: 0.83rem; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 50; background: var(--text); color: var(--bg); padding: 10px 18px; border-radius: 12px; font-weight: 600; font-size: 0.93rem; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25); max-width: calc(100vw - 32px); }
