:root {
  --bg: #0f1115;
  --surface: #171a21;
  --border: #2a2e38;
  --text: #e8e9ec;
  --text-dim: #9aa0ac;
  --accent: #4f7cff;
  --accent-dark: #3a5fd9;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.5;
}
a { color: var(--accent); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

header.site {
  position: sticky;
  top: 0;
  z-index: 10;
  background: rgba(15, 17, 21, 0.9);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand { display: flex; align-items: center; }
.brand img { height: 64px; width: auto; }
nav.site-nav { display: flex; gap: 24px; }
nav.site-nav a { color: var(--text-dim); text-decoration: none; font-size: 0.95rem; }
nav.site-nav a:hover { color: var(--text); }

.hero {
  padding: 96px 0 72px;
  text-align: center;
}
.hero h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
  margin: 0 0 18px;
  font-weight: 800;
  letter-spacing: -0.02em;
}
.hero h1 span { color: var(--accent); }
.hero p.lede {
  color: var(--text-dim);
  font-size: 1.15rem;
  max-width: 620px;
  margin: 0 auto 32px;
}
.cta-row { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  font-size: 1rem;
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-icon { display: inline-flex; align-items: center; gap: 8px; }
.btn-primary { background: var(--accent); color: white; }
.btn-primary:hover { background: var(--accent-dark); }
.btn-secondary { background: transparent; border-color: var(--border); color: var(--text); }
.btn-secondary:hover { border-color: var(--accent); color: var(--accent); }

section { padding: 64px 0; border-top: 1px solid var(--border); }
section h2 { font-size: 1.8rem; margin: 0 0 12px; text-align: center; }
section p.section-lede { color: var(--text-dim); text-align: center; max-width: 560px; margin: 0 auto 40px; }

.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 28px 24px;
}
.card .num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(79, 124, 255, 0.15);
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 14px;
}
.card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.card p { color: var(--text-dim); margin: 0; font-size: 0.95rem; }

.split {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 40px;
  align-items: center;
}
@media (max-width: 760px) { .split { grid-template-columns: 1fr; } }
.split ul { padding-left: 20px; color: var(--text-dim); }
.split li { margin-bottom: 10px; }
.split-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 32px;
}
.split-panel .price-tag { font-size: 2.2rem; font-weight: 800; color: var(--accent); }

.coverage-badges { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.coverage-badge {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 10px 22px;
  font-weight: 600;
}

footer.site {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  color: var(--text-dim);
  font-size: 0.85rem;
}
footer.site .wrap { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }

/* Help widget */
#help-fab {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 58px;
  height: 58px;
  border-radius: 50%;
  background: var(--accent);
  color: white;
  border: none;
  font-size: 1.4rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
  z-index: 50;
}
#help-fab:hover { background: var(--accent-dark); }

#help-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 60;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
#help-overlay.open { display: flex; }
#help-modal {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 28px;
  width: 100%;
  max-width: 440px;
}
#help-modal h3 { margin: 0 0 4px; }
#help-modal p.hint { color: var(--text-dim); font-size: 0.9rem; margin: 0 0 20px; }
#help-modal label { display: block; font-size: 0.85rem; color: var(--text-dim); margin: 14px 0 6px; }
#help-modal input, #help-modal textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 0.95rem;
  font-family: inherit;
}
#help-modal textarea { resize: vertical; min-height: 90px; }
#help-modal .modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 20px; }
#help-modal .close-link { background: none; border: none; color: var(--text-dim); text-decoration: underline; cursor: pointer; font-size: 0.9rem; }
#help-error { color: #ff5c5c; font-size: 0.85rem; margin-top: 10px; display: none; }
#help-success { text-align: center; padding: 20px 0; display: none; }
#help-success h3 { margin-bottom: 8px; }

/* Blog */
.blog-hero { padding: 56px 0 40px; text-align: center; }
.blog-hero h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 10px; font-weight: 800; }
.blog-hero p { color: var(--text-dim); margin: 0; }

.blog-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 24px; }
.blog-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  text-decoration: none;
  color: var(--text);
  display: flex;
  flex-direction: column;
}
.blog-card:hover { border-color: var(--accent); }
.blog-card img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; display: block; background: var(--bg); }
.blog-card-body { padding: 20px; flex: 1; display: flex; flex-direction: column; }
.blog-card h3 { margin: 0 0 8px; font-size: 1.1rem; }
.blog-card p { color: var(--text-dim); margin: 0 0 12px; font-size: 0.92rem; flex: 1; }

.blog-meta { color: var(--text-dim); font-size: 0.82rem; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.tag-pill {
  display: inline-block;
  background: rgba(79, 124, 255, 0.15);
  color: var(--accent);
  border-radius: 999px;
  padding: 3px 10px;
  font-size: 0.78rem;
  text-decoration: none;
}

.post-header { padding: 48px 0 24px; }
.post-header h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 12px 0; }
.post-cover { width: 100%; max-height: 420px; object-fit: cover; border-radius: 14px; border: 1px solid var(--border); margin: 24px 0; }
.post-body { padding-bottom: 64px; font-size: 1.05rem; }
.post-body h2 { font-size: 1.4rem; margin-top: 2em; }
.post-body h3 { font-size: 1.15rem; margin-top: 1.6em; }
.post-body p { color: var(--text); }
.post-body a { text-decoration: underline; }
.post-body img { max-width: 100%; border-radius: 10px; }
.post-body pre { background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 16px; overflow-x: auto; }
.post-body code { background: var(--surface); border-radius: 4px; padding: 2px 6px; }
.post-body pre code { background: none; padding: 0; }
.post-body blockquote { border-left: 3px solid var(--accent); margin: 0; padding-left: 18px; color: var(--text-dim); }
.post-body ul, .post-body ol { color: var(--text); padding-left: 22px; }
.post-body li { margin-bottom: 6px; }
.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.6em 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: hidden;
}
.post-body th, .post-body td {
  padding: 12px 16px;
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.post-body th {
  background: rgba(79, 124, 255, 0.12);
  color: var(--text);
  font-weight: 600;
}
.post-body tr:last-child td { border-bottom: none; }
