/* ================================================================
   CSS Custom Properties — Light / Dark Theming
   ================================================================ */
:root {
  --bg:           #f8fafc;
  --bg-card:      #ffffff;
  --bg-subtle:    #f1f5f9;
  --bg-input:     #ffffff;
  --text-primary: #0f172a;
  --text-secondary:#64748b;
  --text-muted:   #94a3b8;
  --border:       #e2e8f0;
  --border-input: #cbd5e1;

  --accent:       #3b82f6;
  --accent-hover: #2563eb;
  --accent-light: #eff6ff;

  --up-color:     #10b981;
  --up-bg:        #ecfdf5;
  --up-border:    #a7f3d0;

  --down-color:   #ef4444;
  --down-bg:      #fef2f2;
  --down-border:  #fecaca;

  --warn-color:   #f59e0b;
  --warn-bg:      #fffbeb;
  --warn-border:  #fde68a;

  --orange-color: #f97316;
  --orange-bg:    #fff7ed;
  --orange-border:#fed7aa;

  --shadow-sm: 0 1px 3px rgba(0,0,0,.08), 0 1px 2px rgba(0,0,0,.04);
  --shadow-md: 0 4px 16px rgba(0,0,0,.08), 0 2px 6px rgba(0,0,0,.04);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.12), 0 4px 12px rgba(0,0,0,.06);

  --radius:     16px;
  --radius-sm:  10px;
  --radius-pill:999px;
  --transition: 0.2s ease;
  --max-w:      700px;
}

[data-theme="dark"] {
  --bg:           #0f172a;
  --bg-card:      #1e293b;
  --bg-subtle:    #1e293b;
  --bg-input:     #1e293b;
  --text-primary: #f1f5f9;
  --text-secondary:#94a3b8;
  --text-muted:   #64748b;
  --border:       #334155;
  --border-input: #475569;

  --accent:       #60a5fa;
  --accent-hover: #93c5fd;
  --accent-light: rgba(59,130,246,.15);

  --up-color:     #34d399;
  --up-bg:        rgba(16,185,129,.08);
  --up-border:    rgba(52,211,153,.35);

  --down-color:   #f87171;
  --down-bg:      rgba(239,68,68,.08);
  --down-border:  rgba(248,113,113,.35);

  --warn-color:   #fbbf24;
  --warn-bg:      rgba(245,158,11,.08);
  --warn-border:  rgba(251,191,36,.35);

  --orange-color: #fb923c;
  --orange-bg:    rgba(249,115,22,.08);
  --orange-border:rgba(251,146,60,.35);

  --shadow-sm: 0 1px 3px rgba(0,0,0,.35);
  --shadow-md: 0 4px 16px rgba(0,0,0,.35);
  --shadow-lg: 0 12px 40px rgba(0,0,0,.5);
}

/* ================================================================
   Reset & Base
   ================================================================ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text-primary);
  min-height: 100vh;
  line-height: 1.6;
  transition: background var(--transition), color var(--transition);
}

button { font-family: inherit; }

/* ================================================================
   App Shell
   ================================================================ */
.app { min-height: 100vh; display: flex; flex-direction: column; }

/* ================================================================
   Header
   ================================================================ */
.header {
  position: sticky; top: 0; z-index: 100;
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  transition: background var(--transition), border-color var(--transition);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.logo {
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-dot {
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-light);
  animation: pulse-dot 2.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { box-shadow: 0 0 0 3px var(--accent-light); }
  50%       { box-shadow: 0 0 0 7px transparent; }
}

.logo-text {
  font-size: 17px; font-weight: 700;
  letter-spacing: -0.4px;
  color: var(--text-primary);
}

.logo-badge {
  font-size: 10px; font-weight: 700;
  background: var(--accent);
  color: #fff;
  padding: 2px 6px;
  border-radius: var(--radius-pill);
  letter-spacing: 0.05em;
}

.theme-btn {
  width: 38px; height: 38px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: border-color var(--transition), color var(--transition), transform var(--transition);
}

.theme-btn:hover { border-color: var(--accent); color: var(--accent); transform: rotate(20deg) scale(1.05); }
.theme-btn svg { width: 17px; height: 17px; }

.icon-moon { display: none; }
[data-theme="dark"] .icon-sun  { display: none; }
[data-theme="dark"] .icon-moon { display: block; }

/* ── Mobile hamburger button ── */
.hamburger-btn {
  display: none;
  width: 38px; height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  cursor: pointer;
  align-items: center; justify-content: center;
  flex-shrink: 0;
  transition: all var(--transition);
}
.hamburger-btn:hover { border-color: var(--accent); color: var(--accent); }
@media (max-width: 640px) {
  .hamburger-btn { display: flex; }
  .header-nav-desktop { display: none !important; }
}

/* Mobile nav drawer */
.mobile-nav-drawer {
  display: none;
  position: fixed;
  top: 62px; left: 0; right: 0;
  background: var(--bg-card);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 8px 32px -8px rgba(0,0,0,0.12);
  z-index: 99;
  padding: 12px 20px 16px;
  flex-direction: column;
  gap: 4px;
  animation: slideDown 0.2s ease;
}
.mobile-nav-drawer.open { display: flex; }
@keyframes slideDown { from { opacity:0; transform:translateY(-8px); } to { opacity:1; transform:translateY(0); } }
.mobile-nav-drawer a {
  padding: 11px 14px;
  border-radius: 10px;
  font-size: 0.92rem; font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  transition: all var(--transition);
}
.mobile-nav-drawer a:hover { background: var(--bg-subtle); color: var(--text-primary); }

/* ── Cookie / font consent notice ── */
.cookie-notice {
  position: fixed;
  bottom: 20px; left: 50%; transform: translateX(-50%);
  width: calc(100% - 40px); max-width: 560px;
  background: var(--text-primary);
  color: var(--bg-card);
  border-radius: 14px;
  padding: 14px 18px;
  display: flex; align-items: center; gap: 14px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.22);
  z-index: 9999;
  font-size: 0.8rem; line-height: 1.5;
  animation: slideUp 0.3s ease;
}
@keyframes slideUp { from { opacity:0; transform:translateX(-50%) translateY(16px); } to { opacity:1; transform:translateX(-50%) translateY(0); } }
.cookie-notice.hidden { display: none; }
.cookie-notice-text { flex: 1; }
.cookie-notice-text a { color: #93c5fd; font-weight: 600; text-decoration: none; }
.cookie-notice-text a:hover { text-decoration: underline; }
.cookie-accept-btn {
  flex-shrink: 0;
  background: var(--accent);
  color: #fff;
  border: none; border-radius: 8px;
  padding: 7px 16px;
  font-size: 0.8rem; font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.2s;
}
.cookie-accept-btn:hover { background: var(--accent-hover); }

/* ================================================================
   Main
   ================================================================ */
.main {
  flex: 1;
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 52px 24px 80px;
  width: 100%;
}

/* ================================================================
   Hero
   ================================================================ */
.hero { text-align: center; margin-bottom: 40px; }

.hero-title {
  font-size: clamp(2rem, 5.5vw, 2.9rem);
  font-weight: 800;
  letter-spacing: -1.5px;
  line-height: 1.15;
  color: var(--text-primary);
  margin-bottom: 14px;
}

.hero-title em { font-style: normal; color: var(--accent); }

.hero-sub {
  font-size: 0.95rem;
  color: var(--text-secondary);
  line-height: 1.65;
}

.hero-sub strong { color: var(--text-primary); }

/* ================================================================
   Form
   ================================================================ */
.form-section { margin-bottom: 32px; }
.check-form   { position: relative; }

.input-wrap {
  display: flex; align-items: center;
  background: var(--bg-card);
  border: 2px solid var(--border-input);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.input-wrap:focus-within {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-light), var(--shadow-sm);
}

.input-icon { padding-left: 18px; color: var(--text-muted); flex-shrink: 0; display: flex; align-items: center; }
.input-icon svg { width: 19px; height: 19px; }

.url-input {
  flex: 1; border: none; outline: none;
  background: transparent;
  color: var(--text-primary);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.9rem;
  padding: 17px 14px;
  min-width: 0;
}

.url-input::placeholder { color: var(--text-muted); font-family: 'Inter', sans-serif; font-size: 0.88rem; }

.check-btn {
  flex-shrink: 0; margin: 6px; padding: 11px 26px;
  border: none; border-radius: var(--radius-sm);
  background: var(--accent); color: #fff;
  font-size: 0.9rem; font-weight: 600;
  cursor: pointer;
  display: flex; align-items: center; gap: 8px;
  transition: background var(--transition), transform 0.1s ease;
  white-space: nowrap;
}

.check-btn:hover   { background: var(--accent-hover); }
.check-btn:active  { transform: scale(0.96); }
.check-btn:disabled { opacity: 0.65; cursor: not-allowed; transform: none; }

.btn-spinner { display: flex; align-items: center; }
.spin { width: 17px; height: 17px; animation: spin 0.75s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.form-error { margin-top: 9px; padding-left: 4px; font-size: 0.85rem; color: var(--down-color); }

/* ================================================================
   Results Section
   ================================================================ */
.results-section {
  margin-bottom: 24px;
  animation: slide-up 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes slide-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Status Bar ──────────────────────────────────────────────── */
.check-status-bar {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 0 18px;
  font-size: 0.875rem;
  color: var(--text-secondary);
  font-weight: 500;
}

.status-dot-anim {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
  flex-shrink: 0;
  animation: blink 1.2s ease-in-out infinite;
}

@keyframes blink {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

.check-status-bar.done .status-dot-anim { animation: none; background: var(--up-color); }
.check-status-bar.done { color: var(--text-muted); }

/* ── Probe List ──────────────────────────────────────────────── */
.probe-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

/* ── Probe Card ──────────────────────────────────────────────── */
.probe-card {
  background: var(--bg-card);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
  animation: slide-up 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.probe-card[data-state="pending"] {
  border-color: var(--border);
}

.probe-card[data-state="up"] {
  border-color: var(--up-border);
  background: var(--up-bg);
  box-shadow: var(--shadow-sm), 0 0 0 1px var(--up-border);
}

.probe-card[data-state="down"] {
  border-color: var(--down-border);
  background: var(--down-bg);
  box-shadow: var(--shadow-sm), 0 0 0 1px var(--down-border);
}

.probe-card[data-state="skipped"] {
  opacity: 0.55;
  border-style: dashed;
}

/* Card Header */
.probe-header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px 20px;
}

.probe-emoji {
  font-size: 1.4rem;
  line-height: 1;
  flex-shrink: 0;
  width: 28px;
  text-align: center;
}

.probe-meta { flex: 1; min-width: 0; }

.probe-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.probe-network {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.3s ease;
}

.probe-state-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
}

/* Probe spinner */
.probe-spinner-anim {
  width: 18px; height: 18px;
  border: 2px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

/* Progress bar (pending state) */
.probe-progress {
  height: 3px;
  background: var(--bg-subtle);
  overflow: hidden;
}

.probe-progress-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), #60a5fa, var(--accent));
  background-size: 200% 100%;
  animation: shimmer 1.5s linear infinite;
  width: 100%;
}

@keyframes shimmer {
  from { background-position: 200% 0; }
  to   { background-position: -200% 0; }
}

/* Details section (revealed on result) */
.probe-details {
  padding: 0 20px 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
  animation: fade-in 0.3s ease both;
}

@keyframes fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* DNS resolver grid */
.resolver-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 5px;
  padding-top: 2px;
}

.resolver-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--text-secondary);
}

.resolver-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.resolver-dot.ok   { background: var(--up-color); }
.resolver-dot.fail { background: var(--down-color); }

.resolver-name { font-weight: 500; }
.resolver-error { color: var(--text-muted); font-size: 0.72rem; }

/* ================================================================
   Badges
   ================================================================ */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 11px;
  border-radius: var(--radius-pill);
  font-size: 0.76rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
}

.badge.green  { background: var(--up-color);   color: #fff; }
.badge.red    { background: var(--down-color);  color: #fff; }
.badge.amber  { background: var(--warn-color);  color: #fff; }
.badge.grey   { background: var(--bg-subtle); color: var(--text-secondary); border: 1px solid var(--border); }
.badge.blue   { background: var(--accent);    color: #fff; }
.badge.outline{ background: transparent; border: 1.5px solid var(--border); color: var(--text-secondary); }

/* ================================================================
   Verdict Banner
   ================================================================ */
.verdict-banner {
  border-radius: var(--radius);
  border: 2px solid;
  padding: 24px 28px;
  box-shadow: var(--shadow-md);
  animation: slide-up 0.4s 0.05s cubic-bezier(0.16, 1, 0.3, 1) both;
  margin-top: 6px;
}

.verdict-banner[data-status="up"] {
  background: var(--up-bg);
  border-color: var(--up-border);
}

.verdict-banner[data-status="down"] {
  background: var(--down-bg);
  border-color: var(--down-border);
}

.verdict-banner[data-status="likely_up"] {
  background: var(--warn-bg);
  border-color: var(--warn-border);
}

.verdict-banner[data-status="likely_down"] {
  background: var(--orange-bg);
  border-color: var(--orange-border);
}

.verdict-top {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 18px;
}

.verdict-icon { font-size: 2rem; line-height: 1; flex-shrink: 0; }

.verdict-body { flex: 1; }

.verdict-message {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.4px;
  line-height: 1.25;
  margin-bottom: 5px;
}

.verdict-banner[data-status="up"]          .verdict-message { color: var(--up-color); }
.verdict-banner[data-status="down"]        .verdict-message { color: var(--down-color); }
.verdict-banner[data-status="likely_up"]   .verdict-message { color: var(--warn-color); }
.verdict-banner[data-status="likely_down"] .verdict-message { color: var(--orange-color); }

.verdict-detail {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

/* Confidence meter */
.confidence-section {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}

.confidence-label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  flex-shrink: 0;
  width: 80px;
}

.confidence-track {
  flex: 1;
  height: 6px;
  background: var(--border);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.confidence-fill {
  height: 100%;
  border-radius: var(--radius-pill);
  transition: width 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.verdict-banner[data-status="up"]          .confidence-fill { background: var(--up-color); }
.verdict-banner[data-status="down"]        .confidence-fill { background: var(--down-color); }
.verdict-banner[data-status="likely_up"]   .confidence-fill { background: var(--warn-color); }
.verdict-banner[data-status="likely_down"] .confidence-fill { background: var(--orange-color); }

.confidence-pct {
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--text-secondary);
  flex-shrink: 0;
  width: 36px;
  text-align: right;
}

/* Actions row */
.verdict-actions { display: flex; gap: 10px; flex-wrap: wrap; }

.share-btn {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 18px;
  border-radius: var(--radius-pill);
  border: 1.5px solid var(--border);
  background: var(--bg-card);
  color: var(--text-secondary);
  font-size: 0.83rem; font-weight: 500;
  cursor: pointer;
  transition: all var(--transition);
}

.share-btn:hover { border-color: var(--accent); color: var(--accent); }
.share-btn svg   { width: 14px; height: 14px; }

/* ================================================================
   Tips Card
   ================================================================ */
.tips-section {
  margin-bottom: 24px;
  animation: slide-up 0.35s 0.08s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.tips-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.tips-title {
  font-size: 0.9rem; font-weight: 600;
  color: var(--text-primary);
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 14px;
}

.tips-title svg { width: 16px; height: 16px; color: var(--accent); flex-shrink: 0; }

.tips-list { list-style: none; display: flex; flex-direction: column; gap: 10px; }

.tips-list li {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 0.865rem;
  color: var(--text-secondary);
  line-height: 1.55;
}

.tips-list li::before { content: '→'; color: var(--accent); font-weight: 700; flex-shrink: 0; margin-top: 1px; }

.tips-list code {
  display: inline-block;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 5px;
  padding: 1px 6px;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.77rem;
  color: var(--text-primary);
  white-space: nowrap;
}

/* ================================================================
   History
   ================================================================ */
.history-section { animation: slide-up 0.35s 0.12s cubic-bezier(0.16, 1, 0.3, 1) both; }

.history-header {
  display: flex; align-items: center; justify-content: space-between;
  margin-bottom: 10px;
}

.history-title {
  font-size: 0.76rem; font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase; letter-spacing: 0.09em;
}

.clear-btn {
  background: none; border: none;
  color: var(--text-muted);
  font-size: 0.76rem; cursor: pointer;
  padding: 2px 6px; border-radius: 5px;
  transition: color var(--transition), background var(--transition);
}

.clear-btn:hover { color: var(--down-color); background: var(--down-bg); }

.history-list { list-style: none; display: flex; flex-direction: column; gap: 7px; }

.history-item {
  display: flex; align-items: center; gap: 12px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 15px; cursor: pointer;
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}

.history-item:hover { border-color: var(--accent); transform: translateX(4px); box-shadow: var(--shadow-sm); }

.history-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.history-dot.up           { background: var(--up-color); }
.history-dot.down         { background: var(--down-color); }
.history-dot.likely_up    { background: var(--warn-color); }
.history-dot.likely_down  { background: var(--orange-color); }

.history-url {
  flex: 1; min-width: 0;
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.79rem; color: var(--text-primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

.history-confidence {
  font-size: 0.72rem; font-weight: 600;
  color: var(--text-muted); flex-shrink: 0;
}

.history-time { font-size: 0.72rem; color: var(--text-muted); flex-shrink: 0; }

/* ================================================================
   Toast
   ================================================================ */
.toast {
  position: fixed; bottom: 28px; left: 50%;
  transform: translateX(-50%);
  background: var(--text-primary); color: var(--bg);
  padding: 11px 22px; border-radius: var(--radius-pill);
  font-size: 0.84rem; font-weight: 500;
  box-shadow: var(--shadow-lg); z-index: 9999;
  white-space: nowrap;
  animation: toast-in 0.3s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* ================================================================
   Footer
   ================================================================ */
/* ================================================================
   Site Footer
   ================================================================ */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-subtle);
  margin-top: 48px;
}

.footer-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 40px 24px 24px;
}

/* Top: brand + popular services side by side */
.footer-top {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 40px;
  margin-bottom: 32px;
}

@media (max-width: 580px) {
  .footer-top { grid-template-columns: 1fr; gap: 28px; }
}

/* Brand column */
.footer-logo {
  display: inline-block;
  font-size: 1rem;
  font-weight: 800;
  color: var(--text-primary);
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.footer-tagline {
  font-size: 0.82rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: 8px;
}

.footer-method {
  font-size: 0.75rem;
  color: var(--text-muted);
  line-height: 1.5;
}

/* Services column */
.footer-col-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.footer-service-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}

.footer-service-links a {
  font-size: 0.8rem;
  color: var(--text-secondary);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-service-links a:hover { color: var(--accent); }

/* Bottom bar */
.footer-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}

.footer-copy {
  font-size: 0.75rem;
  color: var(--text-muted);
}

.footer-legal {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.footer-legal a {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color var(--transition);
}

.footer-legal a:hover { color: var(--text-primary); }



.footer p {
  font-size: 0.77rem;
  color: var(--text-muted);
  max-width: var(--max-w);
  margin: 0 auto;
  line-height: 1.6;
}

/* ================================================================
   Trending / Popular Services
   ================================================================ */
/* ================================================================
   URL Input Service Suggestions Dropdown
   ================================================================ */
.url-suggestions {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 8px 28px rgba(0,0,0,0.12);
  z-index: 100;
  overflow: hidden;
}

.sugg-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 0.88rem;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.sugg-item:last-child { border-bottom: none; }
.sugg-item:hover, .sugg-item.active { background: var(--accent-light); }

.sugg-favicon {
  width: 18px; height: 18px;
  border-radius: 3px;
  object-fit: contain;
  flex-shrink: 0;
}

.sugg-name {
  font-weight: 600;
  flex: 1;
}

.sugg-name mark {
  background: transparent;
  color: var(--accent);
  font-weight: 700;
}

.sugg-action {
  font-size: 0.75rem;
  color: var(--accent);
  white-space: nowrap;
  opacity: 0.8;
}

.search-result-item mark {
  background: transparent;
  color: var(--accent);
  font-weight: 700;
}

/* ================================================================
   Services Grid
   ================================================================ */
.services-section {
  margin-bottom: 40px;
}

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

.services-header-left {
  display: flex;
  align-items: center;
  gap: 8px;
}

/* Pulsing live dot */
.live-dot {
  width: 8px;
  height: 8px;
  background: var(--up-color);
  border-radius: 50%;
  flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(16,185,129,0.4);
  animation: live-pulse 2s ease-out infinite;
}

@keyframes live-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(16,185,129,0.4); }
  70%  { box-shadow: 0 0 0 6px rgba(16,185,129,0); }
  100% { box-shadow: 0 0 0 0 rgba(16,185,129,0); }
}

.services-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.services-count {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

/* Card grid — responsive, 4 columns on desktop */
.services-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

@media (max-width: 900px) { .services-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 600px) { .services-grid { grid-template-columns: repeat(2, 1fr); } }

/* Individual service card */
.service-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  text-decoration: none;
  color: var(--text-primary);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
  position: relative;
  overflow: hidden;
}

.service-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 20px rgba(0,0,0,0.09);
  border-color: var(--accent);
}

.service-card:active { transform: translateY(-1px); }

/* Card top row: favicon + status dot */
.card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  width: 100%;
}

.card-favicon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  object-fit: contain;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  padding: 2px;
}

/* Status indicator dot (top right) */
.card-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
  margin-top: 2px;
}
.card-dot.up          { background: var(--up-color);   }
.card-dot.down        { background: var(--down-color);  }
.card-dot.likely_up   { background: var(--warn-color);  }
.card-dot.likely_down { background: #f97316; }
.card-dot.unknown     { background: var(--border); }

/* Service name */
.card-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  width: 100%;
}

/* Mini sparkline bars */
.card-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  width: 100%;
  height: 16px;
}

.card-bar {
  flex: 1;
  border-radius: 2px;
  min-width: 3px;
}
.card-bar.up          { background: var(--up-color);   height: 100%; opacity: 0.85; }
.card-bar.down        { background: var(--down-color);  height: 60%; opacity: 0.85; }
.card-bar.likely_up   { background: var(--warn-color);  height: 80%; opacity: 0.85; }
.card-bar.likely_down { background: #f97316;            height: 65%; opacity: 0.85; }
.card-bar.unknown     { background: var(--border);      height: 30%; }

/* No history placeholder bars */
.card-bars-empty {
  width: 100%;
  height: 4px;
  background: var(--border);
  border-radius: 2px;
  opacity: 0.5;
}

/* Browse all link */
.browse-all-link {
  display: block;
  text-align: center;
  margin-top: 16px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent);
  text-decoration: none;
  opacity: 0.8;
  transition: opacity var(--transition);
}
.browse-all-link:hover { opacity: 1; }



/* ================================================================
   24hr History Chart
   ================================================================ */
.chart-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-sm);
  margin-top: 12px;
  animation: slide-up 0.4s 0.1s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.chart-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.chart-header-left {
  display: flex;
  align-items: center;
  gap: 10px;
}

.chart-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
}

.chart-domain {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.chart-uptime-badge {
  font-size: 0.78rem;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: var(--radius-pill);
}

.chart-uptime-badge.high   { background: var(--up-bg);   color: var(--up-color);   border: 1px solid var(--up-border); }
.chart-uptime-badge.medium { background: var(--warn-bg);  color: var(--warn-color); border: 1px solid var(--warn-border); }
.chart-uptime-badge.low    { background: var(--down-bg);  color: var(--down-color); border: 1px solid var(--down-border); }

.chart-body {
  width: 100%;
  margin-bottom: 6px;
  border-radius: 6px;
  overflow: hidden;
}

.chart-body svg {
  width: 100%;
  height: 36px;
  display: block;
}

.chart-time-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.68rem;
  color: var(--text-muted);
  margin-bottom: 10px;
}

.chart-legend {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.75rem;
  color: var(--text-muted);
}

.chart-legend span { display: flex; align-items: center; gap: 5px; }

.legend-dot {
  width: 8px; height: 8px;
  border-radius: 2px;
  flex-shrink: 0;
  display: inline-block !important;
}

.legend-dot.up     { background: var(--up-color); }
.legend-dot.down   { background: var(--down-color); }
.legend-dot.nodata { background: var(--border); }


/* ================================================================
   Responsive
   ================================================================ */
@media (max-width: 580px) {
  .main           { padding: 36px 16px 60px; }
  .header-inner   { padding: 0 16px; }
  .hero-title     { font-size: 1.8rem; letter-spacing: -1px; }
  .verdict-banner { padding: 20px; }
  .verdict-message{ font-size: 1.15rem; }
  .check-btn      { padding: 11px 16px; font-size: 0.85rem; }
  .probe-header   { padding: 14px 16px; }
  .probe-details  { padding: 0 16px 14px; }
  .resolver-grid  { grid-template-columns: 1fr; }
  .vote-buttons   { flex-direction: column; }
  .vote-btn       { min-width: unset; width: 100%; }
  .service-heading{ font-size: 1.6rem; }
}

/* ================================================================
   Service Favicon
   ================================================================ */
.service-favicon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  object-fit: contain;
  box-shadow: 0 2px 8px rgba(0,0,0,0.10);
  border: 1px solid var(--border);
  background: var(--bg-card);
}

/* ================================================================
   Voting Section
   ================================================================ */
.voting-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px 20px;
  margin-bottom: 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.voting-question {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 18px;
}

/* Independent data disclaimer */
.independent-disclaimer {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-align: center;
  line-height: 1.5;
  max-width: 520px;
  margin: -8px auto 20px;
  padding: 8px 16px;
  background: var(--bg-subtle);
  border-radius: var(--radius);
  border: 1px solid var(--border);
}

.vote-buttons {

  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  min-width: 200px;
  justify-content: center;
  font-family: inherit;
}

.vote-btn.problem {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
}
.vote-btn.problem:hover {
  background: #fee2e2;
  border-color: #ef4444;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(239,68,68,0.18);
}
.vote-btn.fine {
  background: #f0fdf4;
  border-color: #86efac;
  color: #16a34a;
}
.vote-btn.fine:hover {
  background: #dcfce7;
  border-color: #4ade80;
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(34,197,94,0.18);
}
.vote-btn:active   { transform: translateY(0); }
.vote-btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.vote-btn.voted-problem { background: #fee2e2; border-color: #ef4444; }
.vote-btn.voted-fine    { background: #dcfce7; border-color: #4ade80; }

.vote-text  { font-weight: 600; }

.vote-count {
  background: rgba(0,0,0,0.08);
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 0.82rem;
  font-weight: 700;
  min-width: 28px;
  text-align: center;
}

/* Category selector */
.category-wrap {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  animation: slide-up 0.3s cubic-bezier(0.16,1,0.3,1) both;
}

.category-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.category-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.cat-btn {
  padding: 8px 18px;
  background: var(--bg-subtle);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
  font-family: inherit;
}
.cat-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
  transform: translateY(-1px);
}
.cat-btn:active { transform: translateY(0); }
.cat-btn.selected {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 700;
}

.vote-thanks {
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--up-color);
  margin-top: 12px;
  animation: slide-up 0.3s cubic-bezier(0.16,1,0.3,1) both;
}

.vote-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 10px;
}

/* Dark mode overrides */
[data-theme="dark"] .vote-btn.problem { background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.4); }
[data-theme="dark"] .vote-btn.fine    { background: rgba(34,197,94,0.12);  border-color: rgba(34,197,94,0.4);  }
[data-theme="dark"] .vote-btn.problem:hover { background: rgba(239,68,68,0.22); }
[data-theme="dark"] .vote-btn.fine:hover    { background: rgba(34,197,94,0.22); }
[data-theme="dark"] .vote-count { background: rgba(255,255,255,0.1); }

/* ================================================================
   Recent Incidents Card
   ================================================================ */
.incidents-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 12px;
  box-shadow: var(--shadow-sm);
  animation: slide-up 0.4s 0.15s cubic-bezier(0.16,1,0.3,1) both;
}

.incidents-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 7px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.incidents-title svg { color: var(--text-muted); flex-shrink: 0; }

.incidents-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.incident-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 9px 12px;
  border-radius: 8px;
  font-size: 0.83rem;
  transition: background var(--transition);
}
.incident-item:hover { background: var(--bg-subtle); }

.incident-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.incident-dot.up          { background: var(--up-color);   box-shadow: 0 0 0 3px rgba(16,185,129,0.15); }
.incident-dot.down        { background: var(--down-color); box-shadow: 0 0 0 3px rgba(239,68,68,0.15);  }
.incident-dot.likely_up   { background: var(--warn-color); }
.incident-dot.likely_down { background: #f97316; }

.incident-status {
  font-weight: 700;
  color: var(--text-primary);
  min-width: 80px;
}
.incident-status.up   { color: var(--up-color);   }
.incident-status.down { color: var(--down-color); }

.incident-confidence {
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 6px;
}

.incident-time {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 0.75rem;
  white-space: nowrap;
}


/* ================================================================
   Voting Section
   ================================================================ */
.voting-section {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 20px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}

.voting-question {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 16px;
}

.vote-buttons {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.vote-btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 24px;
  border: 2px solid transparent;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all var(--transition);
  min-width: 180px;
  justify-content: center;
}

.vote-btn.problem {
  background: #fef2f2;
  border-color: #fca5a5;
  color: #dc2626;
}
.vote-btn.problem:hover {
  background: #fee2e2;
  border-color: #ef4444;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(239,68,68,0.2);
}

.vote-btn.fine {
  background: #f0fdf4;
  border-color: #86efac;
  color: #16a34a;
}
.vote-btn.fine:hover {
  background: #dcfce7;
  border-color: #4ade80;
  transform: translateY(-2px);
  box-shadow: 0 4px 12px rgba(34,197,94,0.2);
}

.vote-btn:active  { transform: translateY(0); }
.vote-btn:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }

.vote-btn.voted-problem { background:#fee2e2; border-color:#ef4444; }
.vote-btn.voted-fine    { background:#dcfce7; border-color:#4ade80; }

.vote-icon  { font-size: 1.1rem; }
.vote-text  { flex: 1; text-align: left; }
.vote-count {
  background: rgba(0,0,0,0.07);
  border-radius: 20px;
  padding: 2px 10px;
  font-size: 0.82rem;
  font-weight: 700;
  min-width: 32px;
  text-align: center;
}

/* Category selector */
.category-wrap {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  animation: slide-up 0.3s cubic-bezier(0.16,1,0.3,1) both;
}

.category-label {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 10px;
}

.category-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.cat-btn {
  padding: 8px 16px;
  background: var(--bg-subtle);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-pill);
  font-size: 0.83rem;
  font-weight: 500;
  color: var(--text-secondary);
  cursor: pointer;
  transition: all var(--transition);
}
.cat-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-light);
  transform: translateY(-1px);
}
.cat-btn:active { transform: translateY(0); }
.cat-btn.selected {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent);
  font-weight: 600;
}

.vote-thanks {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--up-color);
  margin-top: 12px;
  animation: slide-up 0.3s cubic-bezier(0.16,1,0.3,1) both;
}

.vote-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 8px;
}

/* Dark mode vote buttons */
[data-theme="dark"] .vote-btn.problem { background: rgba(239,68,68,0.12); border-color: rgba(239,68,68,0.4); }
[data-theme="dark"] .vote-btn.fine    { background: rgba(34,197,94,0.12); border-color: rgba(34,197,94,0.4);  }
[data-theme="dark"] .vote-btn.problem:hover { background: rgba(239,68,68,0.2); }
[data-theme="dark"] .vote-btn.fine:hover    { background: rgba(34,197,94,0.2); }

/* ================================================================
   Recent Incidents Card
   ================================================================ */
.incidents-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  margin-top: 12px;
  box-shadow: var(--shadow-sm);
  animation: slide-up 0.4s 0.15s cubic-bezier(0.16,1,0.3,1) both;
}

.incidents-title {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.incidents-title svg { color: var(--text-muted); flex-shrink: 0; }

.incidents-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.incident-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 0.82rem;
  transition: background var(--transition);
  cursor: default;
}

.incident-item:hover { background: var(--bg-subtle); }

.incident-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}
.incident-dot.up          { background: var(--up-color); }
.incident-dot.down        { background: var(--down-color); }
.incident-dot.likely_up   { background: var(--warn-color); }
.incident-dot.likely_down { background: #f97316; }

.incident-status {
  font-weight: 600;
  color: var(--text-primary);
  min-width: 90px;
  text-transform: capitalize;
}

.incident-confidence {
  color: var(--text-muted);
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.75rem;
}

.incident-time {
  margin-left: auto;
  color: var(--text-muted);
  font-size: 0.75rem;
  white-space: nowrap;
}
  .header-inner { padding: 0 16px; }
  .hero-title   { font-size: 1.8rem; letter-spacing: -1px; }
  .verdict-banner { padding: 20px; }
  .verdict-message { font-size: 1.15rem; }
  .check-btn    { padding: 11px 16px; font-size: 0.85rem; }
  .probe-header { padding: 14px 16px; }
  .probe-details { padding: 0 16px 14px; }
  .resolver-grid { grid-template-columns: 1fr; }
}
