@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:ital,wght@0,400;0,600;0,700;0,800;1,400&display=swap');

/* === Reset & Base === */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --violet: #8000ff;
  --magenta: #ff00ff;
  --ink: #0d0d0d;
  --ink-2: #111118;
  --ink-3: #1a1a2e;
  --glass: rgba(128,0,255,0.07);
  --glass-border: rgba(128,0,255,0.25);
  --text: #e8e8f0;
  --text-muted: #8888aa;
  --text-dim: #555577;
  --radius: 4px;
  --max-w: 1200px;
  --col-main: 1fr;
  --col-aside: 280px;
  --header-h: 64px;
  --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
  --mono: 'Courier New', Courier, monospace;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  background: var(--ink);
  color: var(--text);
  font-family: var(--font);
  line-height: 1.65;
  min-height: 100vh;
  overflow-x: hidden;
}

/* === Scanlines overlay === */
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9999;
  background: repeating-linear-gradient(
    0deg,
    transparent,
    transparent 2px,
    rgba(0,0,0,0.18) 2px,
    rgba(0,0,0,0.18) 4px
  );
}

/* === Typography === */
h1, h2, h3, h4 {
  font-family: var(--font);
  font-weight: 800;
  line-height: 1.2;
  color: #fff;
}

h1 { font-size: clamp(1.6rem, 4vw, 2.8rem); }
h2 { font-size: clamp(1.2rem, 2.5vw, 1.75rem); margin-top: 2rem; }
h3 { font-size: 1.15rem; margin-top: 1.5rem; }
h4 { font-size: 1rem; }

p { margin-bottom: 1rem; }
a { color: var(--violet); text-decoration: underline; transition: color .15s; }
a:hover { color: var(--magenta); text-shadow: 0 0 8px var(--magenta); }

hr {
  border: none;
  border-top: 1px solid var(--glass-border);
  margin: 0.75rem 0 1.25rem;
  box-shadow: 0 0 6px rgba(128,0,255,0.3);
}

small { font-size: 0.8rem; color: var(--text-muted); line-height: 1.5; }

ul, ol { padding-left: 1.4rem; margin-bottom: 1rem; }
li { margin-bottom: 0.4rem; }

table { width: 100%; border-collapse: collapse; margin-bottom: 1.5rem; }
th { background: rgba(128,0,255,0.15); color: var(--violet); font-weight: 700; padding: 0.6rem 0.8rem; text-align: left; border-bottom: 1px solid var(--glass-border); }
td { padding: 0.55rem 0.8rem; border-bottom: 1px solid rgba(255,255,255,0.05); }
tr:nth-child(even) td { background: rgba(255,255,255,0.02); }

code, pre { font-family: var(--mono); font-size: 0.875rem; }
pre { background: var(--ink-3); border: 1px solid var(--glass-border); border-radius: var(--radius); padding: 1rem; overflow-x: auto; margin-bottom: 1rem; }
code { background: rgba(128,0,255,0.12); padding: 0.1em 0.35em; border-radius: 2px; }

blockquote {
  border-left: 3px solid var(--violet);
  padding: 0.75rem 1.25rem;
  background: var(--glass);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 1rem;
  color: var(--text-muted);
  font-style: italic;
}

/* === Header === */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(13,13,13,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--glass-border);
  height: var(--header-h);
}

.header-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1rem;
  height: 100%;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand {
  font-size: 1.1rem;
  font-weight: 800;
  color: #fff;
  text-decoration: none;
  white-space: nowrap;
  text-shadow: 0 0 12px var(--violet);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.brand:hover { color: var(--magenta); text-shadow: 0 0 16px var(--magenta); }
.brand img { display: block; height: 36px; width: auto; }

/* Nav toggle (mobile) */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
  width: 44px;
  height: 44px;
  background: transparent;
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  cursor: pointer;
  padding: 8px;
  flex-shrink: 0;
  margin-left: auto;
}
.toggle-bar {
  display: block;
  width: 20px;
  height: 2px;
  background: var(--violet);
  border-radius: 1px;
  transition: transform .2s, opacity .2s;
}
.nav-toggle[aria-expanded="true"] .toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Primary nav */
.primary-nav { flex: 1; overflow: hidden; }

.nav-list {
  display: flex;
  flex-wrap: nowrap;
  gap: 0;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-list dt, .nav-list dd {
  display: block;
  margin: 0;
  padding: 0;
}

.nav-list a {
  display: block;
  padding: 0.35rem 0.65rem;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
  white-space: nowrap;
  border-radius: var(--radius);
  transition: color .15s, background .15s;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.nav-list a:hover { color: var(--violet); background: var(--glass); text-shadow: 0 0 8px var(--violet); }

/* CTA buttons */
.header-ctas {
  display: flex;
  gap: 0.5rem;
  align-items: center;
  flex-shrink: 0;
  margin-left: auto;
}

.cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0 0.9rem;
  height: 44px;
  border-radius: var(--radius);
  text-decoration: none;
  white-space: nowrap;
  transition: box-shadow .15s, background .15s, color .15s;
  letter-spacing: 0.02em;
}

.cta-signup {
  background: var(--violet);
  color: #fff;
  border: 1px solid var(--violet);
  box-shadow: 0 0 10px rgba(128,0,255,0.4);
}
.cta-signup:hover {
  background: var(--magenta);
  border-color: var(--magenta);
  box-shadow: 0 0 18px rgba(255,0,255,0.5);
  color: #fff;
  text-shadow: none;
}

.cta-login {
  background: transparent;
  color: var(--violet);
  border: 1px solid var(--violet);
}
.cta-login:hover {
  color: var(--magenta);
  border-color: var(--magenta);
  box-shadow: 0 0 10px rgba(255,0,255,0.3);
  text-shadow: none;
}

/* === Main layout === */
.page-main {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 2rem 1rem 3rem;
  min-height: 60vh;
}

/* Content layout: content + aside */
.content-layout {
  display: grid;
  grid-template-columns: var(--col-main) var(--col-aside);
  gap: 2rem;
  align-items: start;
  margin-top: 2rem;
}

.content-body { min-width: 0; }
.content-aside { min-width: 0; }

/* === Prose styles === */
.prose h2 { color: #fff; }
.prose h3 { color: var(--text); }
.prose a { color: var(--violet); text-decoration: underline; }
.prose a:hover { color: var(--magenta); }
.prose strong { color: #fff; font-weight: 700; }
.prose img { max-width: 100%; height: auto; border-radius: var(--radius); display: block; margin: 1.5rem 0; }

/* === Aside card (glassmorphism) === */
.aside-card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  backdrop-filter: blur(8px);
}

.aside-heading {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--violet);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0 0 0.5rem;
}

.aside-card nav dl { margin: 0; padding: 0; }
.aside-card nav dt,
.aside-card nav dd { margin: 0; padding: 0; }
.aside-card nav a {
  display: block;
  padding: 0.45rem 0;
  font-size: 0.85rem;
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid rgba(128,0,255,0.1);
  transition: color .15s;
}
.aside-card nav a:hover { color: var(--violet); }
.aside-card nav dt:last-child a,
.aside-card nav dd:last-child a { border-bottom: none; }

.rg-aside .rg-label {
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--magenta);
  margin-bottom: 0.4rem;
}
.rg-aside small { font-size: 0.75rem; color: var(--text-dim); }

/* === Breadcrumb === */
.breadcrumb {
  font-size: 0.78rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  align-items: center;
}
.breadcrumb a { color: var(--text-dim); text-decoration: none; }
.breadcrumb a:hover { color: var(--violet); }
.breadcrumb span[aria-hidden] { color: var(--text-dim); }

/* === Byline === */
.byline {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin: 0.75rem 0 1rem;
}
.byline time { color: var(--violet); }

/* === Stage label === */
.stage-label {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 0.2em 0.6em;
  border-radius: 2px;
  margin-bottom: 0.75rem;
}
.stage-awareness { background: rgba(128,0,255,0.2); color: var(--violet); border: 1px solid var(--violet); }
.stage-consideration { background: rgba(255,0,255,0.15); color: var(--magenta); border: 1px solid var(--magenta); }
.stage-decision { background: rgba(0,255,128,0.1); color: #00ff88; border: 1px solid #00ff88; }

/* === Hero (home) === */
.hero-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
  min-height: 45vh;
  padding: 2rem 0;
  border-bottom: 1px solid var(--glass-border);
  margin-bottom: 2rem;
}

.hero-copy { display: flex; flex-direction: column; gap: 1rem; }

.eyebrow {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
}
.neon-violet { color: var(--violet); text-shadow: 0 0 8px var(--violet); }

.glitch-text {
  color: #fff;
  text-shadow: 0 0 20px rgba(128,0,255,0.6);
  position: relative;
}

.hero-lead {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 44ch;
  line-height: 1.7;
}

.hero-media { display: flex; align-items: center; justify-content: center; }
.hero-img { max-width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--glass-border); box-shadow: 0 0 30px rgba(128,0,255,0.2); }
.guide-hero-img { max-width: 100%; height: auto; border-radius: var(--radius); margin: 1rem 0; border: 1px solid var(--glass-border); }

/* === Buttons === */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--violet);
  color: #fff;
  font-weight: 700;
  font-size: 0.9rem;
  padding: 0.75rem 1.5rem;
  border-radius: var(--radius);
  text-decoration: none;
  border: 1px solid var(--violet);
  box-shadow: 0 0 14px rgba(128,0,255,0.4);
  transition: background .15s, box-shadow .15s;
  min-height: 44px;
}
.btn-primary:hover {
  background: var(--magenta);
  border-color: var(--magenta);
  box-shadow: 0 0 22px rgba(255,0,255,0.5);
  color: #fff;
  text-shadow: none;
}

/* === Child cards (home) === */
.child-cards, .all-guides { margin: 2rem 0; }

.section-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--violet);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0;
}

.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
  list-style: none;
  padding: 0;
}

.card {
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
  padding: 1.1rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  transition: border-color .15s, box-shadow .15s;
}
.card:hover { border-color: var(--violet); box-shadow: 0 0 12px rgba(128,0,255,0.2); }
.card a { text-decoration: none; color: #fff; }
.card a:hover { color: var(--magenta); text-shadow: none; }
.card-title { font-size: 0.9rem; font-weight: 700; display: block; }
.card-desc { font-size: 0.78rem; color: var(--text-muted); }

/* Guide list (home) */
.guide-list {
  list-style: none;
  padding: 0;
  margin-top: 1rem;
}
.guide-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(128,0,255,0.08);
}
.guide-list li a { font-size: 0.9rem; color: var(--text); text-decoration: none; flex: 1; }
.guide-list li a:hover { color: var(--violet); }
.guide-list li small { font-size: 0.72rem; color: var(--text-dim); white-space: nowrap; }

/* === Author article (about) === */
.author-section {
  margin-top: 2.5rem;
  padding: 1.5rem;
  background: var(--glass);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius);
}
.author-name {
  font-size: 1.3rem;
  color: var(--violet);
  text-shadow: 0 0 10px rgba(128,0,255,0.4);
}
.author-credentials {
  font-size: 0.82rem;
  color: var(--magenta);
  font-weight: 600;
  margin-bottom: 0.75rem;
}
.author-bio { font-size: 0.9rem; color: var(--text-muted); }

/* === Pre-footer nav === */
.pre-footer-nav {
  background: var(--ink-2);
  border-top: 1px solid var(--glass-border);
  padding: 3rem 1rem 2rem;
}

.pfn-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.pfn-cta-block {
  text-align: center;
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid var(--glass-border);
}

.footer-cta-headline {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin-bottom: 1rem;
  text-shadow: 0 0 10px rgba(128,0,255,0.3);
}

.pfn-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
}

.pfn-col { display: flex; flex-direction: column; gap: 0.5rem; }

.pfn-col-head {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--violet);
  margin-bottom: 0.5rem;
}

.pfn-col nav dl { margin: 0; padding: 0; }
.pfn-col nav dt,
.pfn-col nav dd { margin: 0; padding: 0; }
.pfn-col nav a {
  display: block;
  padding: 0.3rem 0;
  font-size: 0.82rem;
  color: var(--text-muted);
  text-decoration: none;
  transition: color .15s;
  min-height: 44px;
  display: flex;
  align-items: center;
}
.pfn-col nav a:hover { color: var(--violet); }

/* Old footer-col styles kept for compatibility */
.footer-cols {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  max-width: var(--max-w);
  margin: 0 auto 2rem;
}
.footer-col { display: flex; flex-direction: column; gap: 0.4rem; }
.footer-brand { font-weight: 800; color: #fff; font-size: 1rem; }
.footer-col-head { font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--violet); margin-bottom: 0.25rem; }
.footer-col p a { font-size: 0.82rem; color: var(--text-muted); text-decoration: none; display: block; padding: 0.2rem 0; }
.footer-col p a:hover { color: var(--violet); }
.footer-cta-block { text-align: center; padding: 2.5rem 1rem; border-bottom: 1px solid var(--glass-border); margin-bottom: 2rem; }

/* === Footer (minimal: only p + small) === */
.site-footer {
  background: var(--ink);
  border-top: 1px solid var(--glass-border);
  padding: 1.5rem 1rem;
  text-align: center;
}

.footer-rg {
  font-size: 0.75rem;
  color: var(--text-dim);
  max-width: 700px;
  margin: 0 auto 0.5rem;
  line-height: 1.5;
}

.footer-copy {
  font-size: 0.72rem;
  color: var(--text-dim);
  display: block;
}

/* === FAQ === */
.faq-intro { font-size: 1rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.faq-body details { margin-bottom: 1rem; }
.faq-body summary { cursor: pointer; font-weight: 600; color: var(--text); padding: 0.6rem 0; }
.faq-body summary:hover { color: var(--violet); }

/* === Changelog === */
.changelog-intro { font-size: 1rem; color: var(--text-muted); margin-bottom: 1.5rem; }

/* === Glitch animation === */
@keyframes glitch {
  0%, 100% { transform: none; }
  20% { transform: skewX(-2deg); }
  40% { transform: skewX(2deg); }
  60% { transform: translateX(-2px); }
  80% { transform: translateX(2px); }
}

.glitch-text:hover { animation: glitch 0.4s steps(1) forwards; }

@media (prefers-reduced-motion: reduce) {
  .glitch-text:hover { animation: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* === Mobile nav (≤768px) === */
@media (max-width: 768px) {
  .nav-toggle { display: flex; }

  .primary-nav {
    display: none;
    position: absolute;
    top: var(--header-h);
    left: 0;
    right: 0;
    background: rgba(13,13,13,0.98);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem;
    z-index: 999;
  }

  .primary-nav.is-open { display: block; }

  .nav-list {
    flex-direction: column;
    gap: 0;
  }

  .nav-list a {
    padding: 0.75rem 0.5rem;
    font-size: 0.95rem;
    min-height: 44px;
    border-bottom: 1px solid rgba(128,0,255,0.08);
    white-space: normal;
  }

  .header-inner { position: relative; }

  .header-ctas { margin-left: 0; }
  .cta { font-size: 0.7rem; padding: 0 0.6rem; height: 40px; }

  /* Hero */
  .hero-section {
    grid-template-columns: 1fr;
    min-height: auto;
    padding: 1.5rem 0;
  }
  .hero-media { display: none; }

  /* Content layout */
  .content-layout {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .content-aside { order: -1; }

  /* Cards */
  .cards-grid { grid-template-columns: 1fr; }

  /* Footer nav */
  .pfn-cols { grid-template-columns: 1fr 1fr; gap: 1.5rem; }
  .footer-cols { grid-template-columns: 1fr 1fr; gap: 1rem; }
}

@media (max-width: 480px) {
  .pfn-cols { grid-template-columns: 1fr; }
  .footer-cols { grid-template-columns: 1fr; }

  h1 { font-size: 1.5rem; }

  .header-ctas { gap: 0.3rem; }
  .cta { font-size: 0.65rem; padding: 0 0.5rem; height: 38px; }
}

/* === No horizontal scroll === */
body, .page-main, .pre-footer-nav, .site-footer { max-width: 100%; }
img { max-width: 100%; height: auto; }

a[data-cta],button[aria-controls]{min-height:44px;min-width:44px;box-sizing:border-box}main p a{text-decoration:underline}