:root {
  --bg-deep: #06090e;
  --bg-surface: #0e1420;
  --bg-surface-card: #131b2c;
  --bg-surface-hover: #192338;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --text-dim: #64748b;
  --accent-emerald: #10b981;
  --accent-emerald-glow: rgba(16, 185, 129, 0.25);
  --accent-cyan: #38bdf8;
  --accent-amber: #f59e0b;
  --border: #1e293b;
  --border-focus: #334155;
  --radius-lg: 16px;
  --radius-md: 10px;
  --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
body {
  background-color: var(--bg-deep);
  color: var(--text-main);
  font-family: var(--font-sans);
  line-height: 1.65;
  padding: 0;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent-cyan); text-decoration: none; transition: all 0.2s; }
a:hover { color: #fff; text-decoration: none; }

.container { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* Navbar */
.navbar {
  position: sticky;
  top: 0;
  background: rgba(6, 9, 14, 0.88);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  z-index: 100;
  padding: 14px 0;
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.15rem;
  font-weight: 700;
  color: #fff;
}
.brand-pulse {
  width: 10px;
  height: 10px;
  background: var(--accent-emerald);
  border-radius: 50%;
  box-shadow: 0 0 10px var(--accent-emerald);
}
.nav-links {
  display: flex;
  gap: 18px;
  align-items: center;
}
.nav-links a {
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 500;
}
.nav-links a:hover { color: #fff; }

.btn-cta {
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff !important;
  padding: 8px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: 0 2px 10px var(--accent-emerald-glow);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.btn-cta:hover {
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
}

/* Breadcrumbs */
.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-dim);
  margin: 22px 0 10px;
}
.breadcrumb a { color: var(--text-muted); }
.breadcrumb span.sep { color: var(--text-dim); }

/* Hero */
.hero {
  padding: 36px 0 24px;
  text-align: center;
}
.hero-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: rgba(16, 185, 129, 0.12);
  color: var(--accent-emerald);
  border: 1px solid rgba(16, 185, 129, 0.3);
  padding: 4px 14px;
  border-radius: 20px;
  font-size: 0.8rem;
  font-weight: 600;
  margin-bottom: 16px;
  letter-spacing: 0.3px;
}
.hero h1 {
  font-size: 2.3rem;
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 16px;
  background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
.hero p.lead {
  color: var(--text-muted);
  font-size: 1.12rem;
  max-width: 780px;
  margin: 0 auto 24px;
}

/* Operator Benchmark Grid */
.isp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
  margin-bottom: 32px;
}
.isp-badge {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  padding: 12px 14px;
  border-radius: var(--radius-md);
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.isp-name {
  font-size: 0.82rem;
  color: var(--text-muted);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.isp-status {
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--accent-emerald);
}
.isp-ping {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent-cyan);
}

/* Article Layout */
.article-wrapper {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px;
  margin-bottom: 40px;
}

/* Table of Contents */
.toc-box {
  background: var(--bg-surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 24px;
  margin-bottom: 32px;
}
.toc-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.toc-list { list-style: none; padding-left: 0; }
.toc-list li { margin: 6px 0; font-size: 0.9rem; }
.toc-list a { color: var(--accent-cyan); }
.toc-list a:hover { color: #fff; text-decoration: underline; }

/* Markdown body formatting */
.article-body h2 {
  font-size: 1.6rem;
  font-weight: 700;
  margin: 36px 0 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  color: #fff;
}
.article-body h3 {
  font-size: 1.25rem;
  font-weight: 600;
  margin: 24px 0 12px;
  color: var(--accent-cyan);
}
.article-body p { margin-bottom: 18px; color: #cbd5e1; font-size: 1.05rem; }
.article-body ul, .article-body ol { margin: 0 0 20px 24px; color: #cbd5e1; }
.article-body li { margin-bottom: 8px; }
.article-body strong { color: #fff; }
.article-body blockquote {
  background: rgba(16, 185, 129, 0.08);
  border-left: 4px solid var(--accent-emerald);
  padding: 14px 20px;
  border-radius: 0 8px 8px 0;
  margin: 24px 0;
  color: #e2e8f0;
  font-style: italic;
}

/* Tables */
.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 28px 0;
  font-size: 0.92rem;
  background: var(--bg-surface-card);
  border-radius: 8px;
  overflow: hidden;
}
.article-body th {
  background: #192438;
  color: #fff;
  text-align: left;
  padding: 12px 16px;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
}
.article-body td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
  color: #cbd5e1;
}
.article-body tr:last-child td { border-bottom: none; }
.article-body tr:hover td { background: rgba(255, 255, 255, 0.02); }

/* Download / CTA Box */
.cta-box {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.15) 0%, rgba(6, 182, 212, 0.08) 100%);
  border: 1px solid rgba(16, 185, 129, 0.35);
  border-radius: var(--radius-lg);
  padding: 32px;
  text-align: center;
  margin: 40px 0;
}
.cta-box h3 { font-size: 1.6rem; color: #fff; margin-bottom: 10px; }
.cta-box p { color: var(--text-muted); max-width: 600px; margin: 0 auto 20px; font-size: 1.05rem; }
.cta-box .btn-big {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: linear-gradient(135deg, #10b981 0%, #059669 100%);
  color: #fff;
  padding: 14px 32px;
  border-radius: 12px;
  font-size: 1.1rem;
  font-weight: 700;
  box-shadow: 0 4px 20px rgba(16, 185, 129, 0.35);
}
.cta-box .btn-big:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 26px rgba(16, 185, 129, 0.5);
}
.cta-perks {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
  margin-top: 16px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* FAQ section */
.faq-box { margin-top: 36px; }
.faq-card {
  background: var(--bg-surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 22px;
  margin-bottom: 14px;
}
.faq-card h4 {
  color: #fff;
  font-size: 1.05rem;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.faq-card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 0;
  line-height: 1.6;
}

/* Related articles */
.related-section { margin: 48px 0; }
.related-section h3 { font-size: 1.4rem; color: #fff; margin-bottom: 20px; }
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.card {
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: all 0.2s;
}
.card:hover {
  border-color: var(--accent-emerald);
  transform: translateY(-2px);
  background: var(--bg-surface-card);
}
.card h4 {
  font-size: 1.05rem;
  color: #fff;
  margin-bottom: 8px;
  line-height: 1.35;
}
.card p {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 14px;
  flex-grow: 1;
}
.card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-dim);
}
.badge-isp {
  background: rgba(16, 185, 129, 0.15);
  color: var(--accent-emerald);
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 600;
}

/* Search bar on home */
.search-wrapper { max-width: 650px; margin: 0 auto 36px; }
.search-box {
  width: 100%;
  padding: 14px 20px;
  background: var(--bg-surface);
  border: 1px solid var(--border);
  border-radius: 12px;
  color: #fff;
  font-size: 1.05rem;
  outline: none;
  transition: border 0.2s;
}
.search-box:focus { border-color: var(--accent-emerald); }

/* Footer */
footer {
  border-top: 1px solid var(--border);
  padding: 40px 0;
  text-align: center;
  color: var(--text-dim);
  font-size: 0.85rem;
}
footer a { color: var(--text-muted); margin: 0 10px; }
footer a:hover { color: #fff; }

@media (max-width: 768px) {
  .hero h1 { font-size: 1.7rem; }
  .article-wrapper { padding: 20px; }
  .nav-links a { display: none; }
  .isp-grid { grid-template-columns: 1fr 1fr; }
}