/* ===== VicPulse — Night-ride tech dashboard theme ===== */
:root {
  --bg: #0b0f1a;
  --card: #151b2b;
  --card-2: #1b2235;
  --text: #e8ecf5;
  --text-dim: #9aa4b8;
  --accent: #7c5cff;
  --accent-solid: #5b3fd9;
  --accent-2: #22d3ee;
  --ok: #3ddc97;
  --warn: #f5a623;
  --danger: #ff5c7a;
  --border: rgba(255,255,255,0.08);
  --shadow-1: 0 1px 2px rgba(0,0,0,.3);
  --shadow-2: 0 8px 24px rgba(0,0,0,.35);
  --radius: 14px;
  --font-head: 'Space Grotesk', 'Inter', sans-serif;
  --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--accent-2); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4 { font-family: var(--font-head); line-height: 1.2; font-weight: 700; margin: 0 0 16px; color: #fff; }
h1 { font-size: 36px; }
h2 { font-size: 28px; margin-top: 48px; }
h3 { font-size: 22px; margin-top: 32px; }
p { margin: 0 0 16px; }
ul, ol { margin: 0 0 16px; padding-left: 22px; }
li { margin-bottom: 8px; }
code, pre, kbd { font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, monospace; }
code { background: rgba(124,92,255,0.12); color: #cdbcff; padding: 2px 6px; border-radius: 6px; font-size: 0.9em; }
pre { background: #0e1320; border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 20px; overflow-x: auto; }
pre code { background: none; padding: 0; color: #d7deee; }
hr { border: none; border-top: 1px solid var(--border); margin: 48px 0; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 0; background: var(--accent-solid); color: #fff; padding: 10px 16px; z-index: 100; border-radius: 0 0 8px 0; }
.skip-link:focus { left: 0; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* ===== Header ===== */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(11,15,26,0.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 8px; color: #fff; font-family: var(--font-head); font-weight: 700; font-size: 19px; }
.brand:hover { text-decoration: none; }
.brand-pulse { color: var(--accent-2); display: inline-flex; }
.primary-nav { display: flex; gap: 4px; }
.primary-nav a {
  color: var(--text-dim); font-weight: 600; font-size: 14px;
  padding: 8px 12px; border-radius: 8px;
}
.primary-nav a:hover { color: #fff; background: var(--card); text-decoration: none; }
.nav-toggle { display: none; flex-direction: column; justify-content: center; gap: 5px; width: 40px; height: 40px; background: none; border: 1px solid var(--border); border-radius: 8px; cursor: pointer; }
.nav-toggle span { display: block; width: 18px; height: 2px; background: var(--text); margin: 0 auto; }

/* ===== Footer ===== */
.site-footer { border-top: 1px solid var(--border); margin-top: 80px; padding: 48px 0 24px; background: #0a0d17; }
.footer-inner { display: grid; grid-template-columns: 1.4fr 1fr; gap: 48px; }
.footer-brand { display: flex; gap: 10px; max-width: 420px; }
.footer-brand p { color: var(--text-dim); font-size: 14px; margin: 0; }
.footer-nav { display: flex; gap: 48px; }
.footer-nav h3 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-dim); margin-bottom: 12px; }
.footer-nav a { display: block; color: var(--text-dim); font-size: 14px; margin-bottom: 8px; }
.footer-nav a:hover { color: #fff; }
.footer-bottom { margin-top: 32px; padding-top: 24px; border-top: 1px solid var(--border); }
.footer-bottom p { color: #697087; font-size: 13px; margin: 0; }

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .primary-nav {
    position: absolute; top: 64px; left: 0; right: 0;
    background: var(--bg); border-bottom: 1px solid var(--border);
    flex-direction: column; padding: 8px; gap: 2px;
    display: none;
  }
  .primary-nav.is-open { display: flex; }
  .primary-nav a { padding: 12px; }
  .footer-inner { grid-template-columns: 1fr; gap: 32px; }
  .footer-nav { gap: 32px; }
}


/* ===== Page shell ===== */
.page { padding: 48px 0 32px; }
.page-head { max-width: 760px; }
.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-head); font-size: 13px; font-weight: 700;
  text-transform: uppercase; letter-spacing: 0.06em; color: var(--accent-2);
  margin-bottom: 14px;
}
.eyebrow .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px rgba(61,220,151,0.18); }
.lede { font-size: 19px; color: var(--text-dim); max-width: 68ch; }
.content-grid { display: grid; grid-template-columns: minmax(0,1fr) 280px; gap: 48px; margin-top: 40px; align-items: start; }
.prose { max-width: 70ch; }
.prose img { border-radius: var(--radius); border: 1px solid var(--border); margin: 24px 0; }
.sidebar { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 20px; }

/* ===== Cards ===== */
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px; box-shadow: var(--shadow-1);
}
.card h3 { margin-top: 0; font-size: 16px; }

/* ===== Stat grid ===== */
.stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin: 32px 0; }
.stat-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 20px; text-align: left;
}
.stat-card .stat-value { font-family: var(--font-head); font-size: 30px; font-weight: 700; color: #fff; display: block; }
.stat-card .stat-label { font-size: 13px; color: var(--text-dim); margin-top: 4px; display: block; }
.stat-card.accent { border-color: rgba(124,92,255,0.4); background: linear-gradient(160deg, rgba(124,92,255,0.14), var(--card)); }

/* ===== Banners ===== */
.banner { border-radius: var(--radius); padding: 18px 22px; margin: 28px 0; border: 1px solid; display: flex; gap: 14px; align-items: flex-start; }
.banner-icon { flex-shrink: 0; font-size: 20px; line-height: 1; margin-top: 2px; }
.banner p { margin: 0; }
.banner strong { color: #fff; }
.banner-warn { background: rgba(245,166,35,0.1); border-color: rgba(245,166,35,0.35); }
.banner-danger { background: rgba(255,92,122,0.1); border-color: rgba(255,92,122,0.35); }
.banner-info { background: rgba(34,211,238,0.08); border-color: rgba(34,211,238,0.3); }

/* ===== Progress bars ===== */
.progress-row { margin-bottom: 18px; }
.progress-row .progress-label { display: flex; justify-content: space-between; font-size: 14px; margin-bottom: 6px; }
.progress-row .progress-label span:last-child { color: var(--text-dim); font-variant-numeric: tabular-nums; }
.progress-track { height: 10px; border-radius: 6px; background: #0e1320; overflow: hidden; border: 1px solid var(--border); }
.progress-fill { height: 100%; border-radius: 6px; background: linear-gradient(90deg, var(--accent), var(--accent-2)); }

/* ===== Tables ===== */
.table-wrap { overflow-x: auto; margin: 24px 0; border: 1px solid var(--border); border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 480px; }
th, td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { background: var(--card-2); color: var(--text-dim); font-weight: 600; font-size: 13px; text-transform: uppercase; letter-spacing: 0.03em; }
tr:last-child td { border-bottom: none; }
td.num { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ===== Badges ===== */
.badge { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 600; padding: 4px 10px; border-radius: 999px; border: 1px solid; }
.badge-ok { color: var(--ok); border-color: rgba(61,220,151,0.4); background: rgba(61,220,151,0.1); }
.badge-warn { color: var(--warn); border-color: rgba(245,166,35,0.4); background: rgba(245,166,35,0.1); }
.badge-danger { color: var(--danger); border-color: rgba(255,92,122,0.4); background: rgba(255,92,122,0.1); }
.badge-muted { color: var(--text-dim); border-color: var(--border); background: var(--card-2); }

/* ===== Buttons ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 15px;
  padding: 12px 22px; border-radius: 10px; border: 1px solid transparent;
  cursor: pointer; min-height: 44px; text-decoration: none;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--accent-solid); color: #fff; }
.btn-primary:hover { background: #6a4af0; }
.btn-ghost { background: transparent; color: var(--text); border-color: var(--border); }
.btn-ghost:hover { background: var(--card); }
.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 24px 0; }

/* ===== Toc ===== */
.toc { font-size: 14px; }
.toc a { display: block; padding: 6px 0; color: var(--text-dim); border-bottom: 1px solid var(--border); }
.toc a:last-child { border-bottom: none; }
.toc a:hover { color: #fff; }

/* ===== FAQ ===== */
.faq-list { margin-top: 24px; }
.faq-item { border: 1px solid var(--border); border-radius: 12px; margin-bottom: 12px; background: var(--card); overflow: hidden; }
.faq-q {
  width: 100%; text-align: left; background: none; border: none; color: #fff;
  font-family: var(--font-head); font-weight: 700; font-size: 16px;
  padding: 18px 48px 18px 20px; cursor: pointer; position: relative;
}
.faq-q::after {
  content: "+"; position: absolute; right: 20px; top: 50%; transform: translateY(-50%);
  font-size: 20px; color: var(--accent-2); font-weight: 400;
}
.faq-item.is-open .faq-q::after { content: "\2212"; }
.faq-a { padding: 0 20px 20px; color: var(--text-dim); display: none; }
.faq-item.is-open .faq-a { display: block; }
.faq-a p:last-child { margin-bottom: 0; }

/* ===== Engagement: like / share / comments ===== */
.engage-row { display: flex; align-items: center; gap: 12px; margin: 32px 0; flex-wrap: wrap; }
.like-btn, .share-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
  padding: 10px 18px; border-radius: 10px; border: 1px solid var(--border);
  background: var(--card); color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer;
}
.like-btn[aria-pressed="true"] { border-color: var(--danger); color: var(--danger); background: rgba(255,92,122,0.1); }
.share-menu { display: flex; gap: 8px; flex-wrap: wrap; }
.share-msg, .newsletter-msg { font-size: 13px; color: var(--ok); }

.comments-section { margin-top: 56px; }
.comment-form { display: flex; flex-direction: column; gap: 12px; margin-bottom: 28px; }
.comment-form input, .comment-form textarea {
  background: #0e1320; border: 1px solid var(--border); border-radius: 10px;
  padding: 12px 14px; color: var(--text); font-family: var(--font-body); font-size: 15px;
}
.comment-form textarea { min-height: 90px; resize: vertical; }
.comment-form input:focus, .comment-form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; }

.comment-list { display: flex; flex-direction: column; gap: 16px; }
.comment-list[data-gf-empty]::before { content: "No comments yet — be the first to share what you found."; color: var(--text-dim); font-size: 14px; }
.comment-list[data-gf-off] { display: none; }
.comment {
  background: var(--card); border: 1px solid var(--border); border-radius: 12px; padding: 16px 18px;
}
.comment[data-gf-owner] { border-color: rgba(124,92,255,0.5); background: rgba(124,92,255,0.08); }
.comment-head { display: flex; gap: 10px; align-items: baseline; margin-bottom: 6px; flex-wrap: wrap; }
.comment-name { font-weight: 700; color: #fff; font-size: 14px; }
.comment-owner-tag { font-size: 12px; background: var(--accent-solid); color: #fff; padding: 2px 8px; border-radius: 999px; font-weight: 700; }
.comment-time { font-size: 12.5px; color: var(--text-dim); }
.comment-text { font-size: 14.5px; color: #d7deee; }
.comment-reply-btn { background: none; border: none; color: var(--accent-2); font-size: 13px; cursor: pointer; padding: 0; margin-top: 6px; }
.comment-replies { margin-top: 14px; margin-left: 20px; display: flex; flex-direction: column; gap: 12px; border-left: 2px solid var(--border); padding-left: 16px; }

@media (max-width: 900px) {
  .content-grid { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .stat-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  h1 { font-size: 28px; }
  h2 { font-size: 22px; }
  .stat-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .stat-card { padding: 14px; }
  .stat-card .stat-value { font-size: 22px; }
  .page { padding: 28px 0 24px; }
}
