/* ═══════════════════════════════════════
   VC 2.0 Ghost Theme — Book Cover Palette
   Next Wave Partners / John Cowan
   ═══════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg-dark: #0f1113;
  --bg-deep: #1a1210;
  --bg-card: #1e1714;
  --rust: #853824;
  --rust-light: #a84a2e;
  --burnt-sienna: #693b25;
  --amber: #faac24;
  --amber-light: #ffba15;
  --meteor-fire: #f9410f;
  --meteor-glow: #fef862;
  --text-primary: #ffffff;
  --text-secondary: #c4a88a;
  --text-muted: #8a7565;
  --border: #3d2a1a;
}

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background: var(--bg-dark);
  color: var(--text-primary);
  line-height: 1.6;
  overflow-x: hidden;
}

a { color: var(--amber); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--amber-light); }

.container { max-width: 1100px; margin: 0 auto; padding: 0 24px; position: relative; z-index: 1; }

/* ═══ METEOR & DINOSAUR VISUAL SYSTEM ═══ */

.meteor-field {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.meteor-main {
  position: absolute;
  top: -10%;
  right: -5%;
  width: 600px;
  height: 4px;
  background: linear-gradient(90deg, transparent 0%, var(--meteor-fire) 30%, var(--amber) 60%, var(--meteor-glow) 90%, #fff 100%);
  border-radius: 2px;
  transform: rotate(35deg);
  opacity: 0;
  animation: meteorMain 12s ease-in-out infinite;
  filter: blur(0.5px);
}
.meteor-main::before {
  content: '';
  position: absolute;
  right: -8px;
  top: -12px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff 0%, var(--meteor-glow) 25%, var(--amber) 50%, var(--meteor-fire) 75%, transparent 100%);
  box-shadow: 0 0 40px 12px rgba(249, 65, 15, 0.5), 0 0 80px 24px rgba(250, 172, 36, 0.25);
}
.meteor-main::after {
  content: '';
  position: absolute;
  top: -1px;
  left: 0;
  width: 100%;
  height: 6px;
  background: linear-gradient(90deg, transparent, rgba(250, 172, 36, 0.15) 50%, transparent);
  filter: blur(4px);
}

@keyframes meteorMain {
  0% { opacity: 0; top: -10%; right: -5%; }
  5% { opacity: 0.9; }
  25% { opacity: 0.7; top: 35%; right: 55%; }
  30% { opacity: 0; }
  100% { opacity: 0; }
}

.meteor-shard {
  position: absolute;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--amber) 60%, #fff 100%);
  border-radius: 1px;
  transform: rotate(35deg);
  opacity: 0;
}
.meteor-shard:nth-child(2) { width: 120px; top: 5%; right: 15%; animation: meteorShard 12s 3s ease-in-out infinite; }
.meteor-shard:nth-child(3) { width: 80px; top: 12%; right: 8%; animation: meteorShard 12s 4.5s ease-in-out infinite; }
.meteor-shard:nth-child(4) { width: 160px; top: -2%; right: 25%; animation: meteorShard 12s 6s ease-in-out infinite; }

@keyframes meteorShard {
  0% { opacity: 0; transform: rotate(35deg) translateX(0); }
  3% { opacity: 0.6; }
  15% { opacity: 0; transform: rotate(35deg) translateX(-400px); }
  100% { opacity: 0; }
}

.meteor-ambient {
  position: fixed;
  top: -30%;
  right: -10%;
  width: 80%;
  height: 60%;
  background: radial-gradient(ellipse at 70% 30%, rgba(249, 65, 15, 0.06) 0%, rgba(250, 172, 36, 0.03) 30%, transparent 65%);
  pointer-events: none;
  z-index: 0;
}

/* Ember particles */
.ember-field {
  position: absolute;
  bottom: 0; left: 0; right: 0; height: 100%;
  pointer-events: none;
  overflow: hidden;
}
.ember {
  position: absolute;
  width: 3px; height: 3px;
  border-radius: 50%;
  background: var(--amber);
  opacity: 0;
  animation: emberFloat 4s ease-out infinite;
}
.ember:nth-child(1) { left: 20%; animation-delay: 0s; }
.ember:nth-child(2) { left: 35%; animation-delay: 0.8s; width: 2px; height: 2px; }
.ember:nth-child(3) { left: 50%; animation-delay: 1.5s; background: var(--meteor-fire); }
.ember:nth-child(4) { left: 65%; animation-delay: 2.2s; width: 2px; height: 2px; }
.ember:nth-child(5) { left: 80%; animation-delay: 3s; }
.ember:nth-child(6) { left: 42%; animation-delay: 0.5s; background: var(--meteor-glow); width: 2px; height: 2px; }
.ember:nth-child(7) { left: 58%; animation-delay: 1.8s; }
.ember:nth-child(8) { left: 73%; animation-delay: 2.8s; background: var(--meteor-fire); width: 2px; height: 2px; }

@keyframes emberFloat {
  0% { bottom: 0; opacity: 0; transform: translateX(0); }
  15% { opacity: 0.7; }
  100% { bottom: 100%; opacity: 0; transform: translateX(20px); }
}

/* ─── NAV ─── */
.site-nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 100;
  background: rgba(15, 17, 19, 0.9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
}
.site-nav .container { display: flex; align-items: center; justify-content: space-between; }
.nav-brand {
  font-weight: 800;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  background: linear-gradient(135deg, var(--amber), var(--meteor-fire));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.nav-links { display: flex; gap: 28px; }
.nav-links ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 28px;
}
.nav-links li {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--amber); }

/* ─── HAMBURGER TOGGLE ─── */
.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
  z-index: 101;
}
.nav-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--text-primary);
  margin: 5px 0;
  border-radius: 2px;
  transition: transform 0.3s, opacity 0.3s;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── HERO ─── */
.hero {
  min-height: 100vh;
  display: flex;
  align-items: center;
  padding: 120px 0 80px;
  position: relative;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 60px;
  align-items: center;
}
.hero-badge {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  border: 1px solid rgba(250, 172, 36, 0.3);
  padding: 6px 14px;
  border-radius: 20px;
  margin-bottom: 24px;
}
.hero h1 {
  font-size: 3.5rem;
  font-weight: 900;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 8px;
}
.hero h1 .accent {
  background: linear-gradient(135deg, var(--amber), var(--meteor-fire));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}
.typewriter-cursor {
  display: inline-block;
  width: 2px;
  height: 1.2em;
  background: var(--amber);
  vertical-align: text-bottom;
  animation: blink 0.8s infinite;
}
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }

.hero-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 520px;
  margin-bottom: 10px;
}
.hero-feature-rotate {
  font-size: 0.9rem;
  color: var(--text-muted);
  margin-bottom: 36px;
  min-height: 1.6em;
}
.hero-feature-rotate span { color: var(--amber-light); font-weight: 500; }

.hero-cta-row { display: flex; gap: 16px; align-items: center; }
.btn-primary {
  display: inline-flex; align-items: center; gap: 8px;
  background: linear-gradient(135deg, var(--meteor-fire), var(--amber));
  color: #000;
  font-weight: 700;
  font-size: 0.95rem;
  padding: 14px 28px;
  border-radius: 8px;
  border: none;
  cursor: pointer;
  transition: transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
}
.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 30px rgba(249, 65, 15, 0.3);
  color: #000;
}
.btn-secondary {
  color: var(--text-secondary);
  font-weight: 500;
  font-size: 0.95rem;
  padding: 14px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  transition: border-color 0.2s;
}
.btn-secondary:hover { border-color: var(--amber); color: var(--amber); }

.book-cover-wrapper { position: relative; }
.book-cover-wrapper img {
  width: 100%;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0,0,0,0.5), 0 0 80px rgba(249,65,15,0.1), 0 0 120px rgba(250,172,36,0.05);
}
.book-cover-wrapper::after {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  border-radius: 8px;
  border: 1px solid rgba(250, 172, 36, 0.12);
  pointer-events: none;
}

/* ─── SECTIONS ─── */
section { padding: 100px 0; }

.section-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 16px;
}
.section-heading {
  font-size: 2.4rem;
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 20px;
}
.section-sub {
  font-size: 1.05rem;
  color: var(--text-muted);
  max-width: 600px;
  margin-bottom: 56px;
}

/* ─── CARDS ─── */
.card-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 32px 28px;
  transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-color: var(--rust-light); transform: translateY(-2px); }
.card-icon {
  width: 44px; height: 44px;
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  margin-bottom: 20px;
}
.card-icon.fire { background: rgba(249, 65, 15, 0.12); }
.card-icon.amber { background: rgba(250, 172, 36, 0.12); }
.card-icon.rust { background: rgba(133, 56, 36, 0.12); }
.card h3 { font-size: 1.1rem; font-weight: 700; margin-bottom: 12px; color: var(--text-primary); }
.card p { font-size: 0.92rem; color: var(--text-muted); line-height: 1.6; }

/* ─── EXTINCTION SECTION (unified) ─── */
.extinction-section {
  position: relative;
  overflow: hidden;
}
.extinction-bg {
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background-size: cover;
  background-position: center top;
  background-repeat: no-repeat;
  opacity: 0.12;
  pointer-events: none;
}
.extinction-section .container {
  position: relative;
  z-index: 1;
}
.extinction-punchline {
  position: relative;
  text-align: center;
  padding: 60px 0 20px;
  margin-top: 40px;
  border-top: 1px solid var(--border);
}
.punchline-text {
  font-size: 1.8rem;
  font-weight: 700;
  line-height: 1.3;
  max-width: 700px;
  margin: 0 auto;
  letter-spacing: -0.01em;
}
.punchline-text em {
  font-style: normal;
  background: linear-gradient(135deg, var(--amber), var(--meteor-fire));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Impact glow */
.impact-glow-element {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(254,248,98,0.06) 0%, rgba(249,65,15,0.03) 30%, transparent 60%);
  animation: impactPulse 6s ease-in-out infinite;
  pointer-events: none;
}
@keyframes impactPulse {
  0%, 100% { width: 200px; height: 200px; opacity: 0.3; }
  50% { width: 800px; height: 800px; opacity: 0.8; }
}

/* Impact divider */
.impact-divider { position: relative; height: 200px; overflow: hidden; }
.impact-divider .impact-line {
  position: absolute;
  top: 50%; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--meteor-fire) 30%, var(--amber) 50%, var(--meteor-fire) 70%, transparent);
  opacity: 0.3;
}
.impact-divider .impact-glow {
  position: absolute;
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  width: 400px; height: 400px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(254,248,98,0.06) 0%, rgba(249,65,15,0.03) 30%, transparent 60%);
  animation: impactPulse 6s ease-in-out infinite;
}

/* ─── TIER COMPARISON ─── */
.tier-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  align-items: start;
}
.tier-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color 0.2s, transform 0.2s;
}
.tier-card:hover { border-color: var(--rust-light); transform: translateY(-2px); }
.tier-featured {
  border-color: var(--amber);
  box-shadow: 0 0 60px rgba(250, 172, 36, 0.08), 0 0 120px rgba(249, 65, 15, 0.04);
}
.tier-featured:hover { border-color: var(--amber-light); }

.tier-header {
  padding: 36px 32px 24px;
  text-align: center;
  border-bottom: 1px solid var(--border);
}
.tier-badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.tier-badge-free {
  color: var(--text-secondary);
  border: 1px solid var(--border);
}
.tier-badge-premium {
  color: #000;
  background: linear-gradient(135deg, var(--amber), var(--meteor-fire));
}
.tier-header h3 {
  font-size: 1.4rem;
  font-weight: 800;
  margin-bottom: 8px;
  color: var(--text-primary);
}
.tier-price {
  font-size: 2.2rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--text-primary);
  margin-bottom: 4px;
}
.tier-price span {
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
}
.tier-tagline {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.tier-features {
  padding: 28px 32px;
  flex: 1;
}
.tier-feature-group {
  margin-bottom: 20px;
}
.tier-group-label {
  display: block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 10px;
}
.tier-features ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.tier-features li {
  font-size: 0.88rem;
  color: var(--text-secondary);
  padding: 6px 0;
  padding-left: 20px;
  position: relative;
  line-height: 1.45;
}
.tier-features li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--amber);
  font-weight: 600;
}
.tier-features li code {
  color: var(--amber);
  background: rgba(250,172,36,0.08);
  padding: 1px 5px;
  border-radius: 3px;
  font-size: 0.82rem;
}
.tier-telemetry-note,
.tier-privacy-note {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  line-height: 1.5;
}
.tier-privacy-note { color: var(--amber-light); }

.tier-cta {
  padding: 0 32px 32px;
}
.btn-tier {
  display: block;
  text-align: center;
  font-weight: 700;
  font-size: 1rem;
  padding: 16px 28px;
  border-radius: 10px;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}
.btn-tier-free {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border);
}
.btn-tier-free:hover {
  border-color: var(--amber);
  color: var(--amber);
  transform: translateY(-1px);
}
.btn-tier-premium {
  background: linear-gradient(135deg, var(--meteor-fire), var(--amber));
  color: #000;
}
.btn-tier-premium:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(249, 65, 15, 0.35);
  color: #000;
}

.install-cta-row {
  display: flex;
  gap: 16px;
  justify-content: center;
  padding-top: 16px;
}
.install-cta-row .btn-tier {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 220px;
}

/* ─── INSTALL ─── */
.install-section {
  background: linear-gradient(180deg, rgba(133, 56, 36, 0.08) 0%, var(--bg-dark) 100%);
  border-top: 1px solid var(--border);
}
.install-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-bottom: 48px; }
.install-step { text-align: center; padding: 24px; }
.step-number {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--meteor-fire), var(--amber));
  color: #000; font-weight: 800; font-size: 1.1rem;
  margin-bottom: 16px;
}
.install-step h4 { font-size: 1rem; font-weight: 700; margin-bottom: 8px; }
.install-step p { font-size: 0.88rem; color: var(--text-muted); }
.install-step code {
  color: var(--amber);
  background: rgba(250,172,36,0.08);
  padding: 2px 6px;
  border-radius: 4px;
}
.install-cta { text-align: center; padding-top: 16px; }
.btn-download {
  display: inline-flex; align-items: center; gap: 10px;
  background: linear-gradient(135deg, var(--meteor-fire), var(--amber));
  color: #000; font-weight: 800; font-size: 1.1rem;
  padding: 18px 40px; border-radius: 10px; border: none;
  cursor: pointer; transition: transform 0.15s, box-shadow 0.15s;
  text-decoration: none;
}
.btn-download:hover { transform: translateY(-2px); box-shadow: 0 12px 40px rgba(249, 65, 15, 0.35); color: #000; }
.install-note { text-align: center; margin-top: 16px; font-size: 0.82rem; color: var(--text-muted); }

/* ─── NEWSLETTER ─── */
.newsletter { padding: 80px 0; text-align: center; border-top: 1px solid var(--border); }
.newsletter h3 { font-size: 1.6rem; font-weight: 800; margin-bottom: 10px; }
.newsletter p { font-size: 0.95rem; color: var(--text-muted); margin-bottom: 28px; }
.newsletter-form { display: flex; gap: 10px; max-width: 440px; margin: 0 auto; }
.newsletter-form input {
  flex: 1; padding: 14px 16px;
  background: var(--bg-card);
  border: 1px solid var(--border); border-radius: 8px;
  color: var(--text-primary); font-size: 0.9rem; font-family: inherit;
  outline: none; transition: border-color 0.2s;
}
.newsletter-form input::placeholder { color: var(--text-muted); }
.newsletter-form input:focus { border-color: var(--amber); }
.newsletter-form button {
  background: linear-gradient(135deg, var(--meteor-fire), var(--amber));
  color: #000; font-weight: 700; font-size: 0.9rem;
  padding: 14px 24px; border-radius: 8px; border: none;
  cursor: pointer; white-space: nowrap; transition: transform 0.15s;
}
.newsletter-form button:hover { transform: translateY(-1px); }
.newsletter-cta { margin-top: 24px; }
.newsletter-cta button {
  font-size: 1rem;
  padding: 16px 36px;
  cursor: pointer;
  border: none;
}

/* ─── FOOTER ─── */
footer { padding: 40px 0; border-top: 1px solid var(--border); text-align: center; }
footer p { font-size: 0.8rem; color: var(--text-muted); line-height: 1.8; }
footer a { color: var(--text-secondary); }
footer a:hover { color: var(--amber); }

/* ─── GHOST CONTENT STYLING ─── */
.gh-content { font-size: 1.05rem; line-height: 1.75; color: var(--text-primary); }
.gh-content h2, .gh-content h3, .gh-content h4 { color: var(--text-primary); margin-top: 2em; margin-bottom: 0.5em; }
.gh-content p { margin-bottom: 1.2em; color: var(--text-primary); }
.gh-content li { color: var(--text-primary); }
.gh-content a { color: var(--amber); text-decoration: underline; }
.gh-content img { max-width: 100%; height: auto; border-radius: 8px; margin: 2em 0; object-fit: contain; }
.gh-content blockquote {
  border-left: 3px solid var(--amber);
  padding-left: 20px;
  margin: 1.5em 0;
  color: var(--text-secondary);
  font-style: italic;
}
.gh-content code {
  color: var(--amber);
  background: rgba(250,172,36,0.08);
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.9em;
}
.gh-content pre {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
  overflow-x: auto;
  margin: 1.5em 0;
}

/* ─── GHOST KOENIG EDITOR WIDTH CLASSES ─── */
.gh-content .kg-width-wide {
  position: relative;
  width: 85vw;
  min-width: 100%;
  margin: 2em calc(50% - 42.5vw);
}
.gh-content .kg-width-full {
  position: relative;
  width: 100vw;
  min-width: 100%;
  margin: 2em calc(50% - 50vw);
}
.gh-content .kg-width-wide img,
.gh-content .kg-width-full img {
  width: 100%;
}

/* Koenig card types */
.kg-image-card, .kg-gallery-card, .kg-bookmark-card,
.kg-embed-card, .kg-toggle-card, .kg-callout-card { margin: 2em 0; }

.kg-image-card img { margin: 0; }
.kg-image-card figcaption,
.kg-gallery-card figcaption {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.8em;
}

.kg-bookmark-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
}
.kg-bookmark-container {
  display: flex;
  text-decoration: none;
  color: inherit;
}
.kg-bookmark-content {
  flex: 1;
  padding: 20px;
}
.kg-bookmark-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
}
.kg-bookmark-description {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 8px;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.kg-bookmark-metadata {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 12px;
  font-size: 0.8rem;
  color: var(--text-muted);
}
.kg-bookmark-icon { width: 20px; height: 20px; border-radius: 4px; }
.kg-bookmark-thumbnail { width: 200px; }
.kg-bookmark-thumbnail img { width: 100%; height: 100%; object-fit: cover; margin: 0; }

.kg-gallery-container {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.kg-gallery-row { display: flex; gap: 8px; width: 100%; }
.kg-gallery-image img { width: 100%; height: 100%; object-fit: cover; border-radius: 4px; margin: 0; }

.kg-callout-card {
  display: flex;
  gap: 16px;
  padding: 20px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
}
.kg-callout-emoji { font-size: 1.2em; }

.kg-toggle-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 20px;
}
.kg-toggle-heading { cursor: pointer; font-weight: 600; color: var(--text-primary); }
.kg-toggle-content { margin-top: 12px; color: var(--text-secondary); }

/* ─── SITE HEADER ─── */
.site-header { margin-bottom: 48px; }

/* ─── POST FEED ─── */
.post-feed { display: grid; gap: 24px; margin-top: 40px; grid-template-columns: 1fr; }
.post-feed-grid { grid-template-columns: repeat(3, 1fr); }
.post-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; overflow: hidden; transition: border-color 0.2s, transform 0.2s; }
.post-card:hover { border-color: var(--rust-light); transform: translateY(-2px); }
.post-card a { display: flex; color: inherit; text-decoration: none; align-items: stretch; }
.post-card-image { width: 180px; min-width: 180px; height: auto; min-height: 140px; object-fit: cover; border-radius: 12px 0 0 12px; }
.post-card-content { padding: 24px; flex: 1; }
.post-card-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--amber);
  margin-bottom: 8px;
}
.post-card-title { font-size: 1.2rem; font-weight: 700; margin-bottom: 8px; color: var(--text-primary); }
.post-card-excerpt { font-size: 0.92rem; color: var(--text-muted); line-height: 1.6; margin-bottom: 12px; }
.post-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  color: var(--text-muted);
}
.post-card-avatar { width: 24px; height: 24px; border-radius: 50%; object-fit: cover; }
.reading-time { opacity: 0.7; }
.reading-time::before { content: "·"; margin-right: 10px; }

/* ─── SINGLE POST / PAGE ─── */
.post-header { margin-bottom: 40px; }
.post-tag {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--amber);
  border: 1px solid rgba(250, 172, 36, 0.3);
  padding: 4px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.post-title {
  font-size: 2.8rem;
  font-weight: 900;
  line-height: 1.12;
  letter-spacing: -0.02em;
  margin-bottom: 16px;
}
.post-excerpt {
  font-size: 1.2rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: 24px;
}
.post-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.88rem;
  color: var(--text-muted);
  flex-wrap: wrap;
}
.post-authors { display: flex; gap: 12px; }
.post-author {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  text-decoration: none;
}
.post-author:hover { color: var(--amber); }
.post-author-avatar { width: 32px; height: 32px; border-radius: 50%; object-fit: cover; }
.post-feature-image { margin: 0 0 40px; text-align: center; }
.post-feature-image img { max-width: 100%; max-height: 500px; width: auto; height: auto; object-fit: contain; border-radius: 12px; }
.post-feature-image figcaption {
  text-align: center;
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 12px;
}
.post-content { max-width: 720px; color: var(--text-primary); }
.post-tags { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; gap: 8px; }
.tag-pill {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-secondary);
  border: 1px solid var(--border);
  padding: 6px 14px;
  border-radius: 20px;
  transition: border-color 0.2s, color 0.2s;
}
.tag-pill:hover { border-color: var(--amber); color: var(--amber); }

/* ─── LATEST POSTS (homepage) ─── */
.latest-posts {
  border-top: 1px solid var(--border);
  padding: 100px 0;
}

/* ─── RELATED POSTS ─── */
.related-posts { padding: 60px 0 80px; border-top: 1px solid var(--border); }
.related-heading { font-size: 1.3rem; font-weight: 700; margin-bottom: 24px; }

/* ─── PAGINATION ─── */
.pagination { display: flex; justify-content: center; gap: 16px; margin-top: 48px; }
.pagination a {
  display: inline-flex; align-items: center;
  padding: 10px 20px;
  border: 1px solid var(--border);
  border-radius: 8px;
  color: var(--text-secondary);
  font-size: 0.9rem;
  font-weight: 500;
  transition: border-color 0.2s, color 0.2s;
}
.pagination a:hover { border-color: var(--amber); color: var(--amber); }
.pagination .page-number { display: none; }

/* ─── RESPONSIVE ─── */
@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; text-align: center; }
  .book-cover-wrapper { max-width: 280px; margin: 0 auto; order: -1; }
  .hero h1 { font-size: 2.5rem; }
  .hero-sub { margin-left: auto; margin-right: auto; }
  .hero-cta-row { justify-content: center; }
  .card-grid, .tier-grid, .install-steps { grid-template-columns: 1fr; }
  .install-cta-row { flex-direction: column; align-items: center; }
  .post-feed-grid { grid-template-columns: 1fr; }
  .post-card a { flex-direction: row; }
  .post-card-image { width: 120px; min-width: 120px; min-height: 100px; }
  .punchline-text { font-size: 1.4rem; }
  .section-heading { font-size: 1.8rem; }
  .post-title { font-size: 2rem; }
  .meteor-main { width: 300px; }
  .extinction-punchline { padding: 40px 0 10px; }
}
@media (max-width: 640px) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: rgba(15, 17, 19, 0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 16px 24px;
    flex-direction: column;
    gap: 0;
  }
  .nav-links.open { display: flex; }
  .nav-links ul {
    flex-direction: column;
    gap: 0;
  }
  .nav-links li { padding: 12px 0; border-bottom: 1px solid var(--border); }
  .nav-links li:last-child { border-bottom: none; }
  .nav-links a { font-size: 1.05rem; }
  .hero h1 { font-size: 2rem; }
  .hero-cta-row { flex-direction: column; }
  .newsletter-form { flex-direction: column; }
  .meteor-field { display: none; }
  .post-card a { flex-direction: column; }
  .post-card-image { width: 100%; min-width: 100%; height: 160px; border-radius: 12px 12px 0 0; }
}

@media (prefers-reduced-motion: reduce) {
  .meteor-main, .meteor-shard, .ember, .impact-glow, .impact-glow-element { animation: none; opacity: 0; }
}
