:root {
  --guide-bg: #fafafa;
  --guide-surface: #ffffff;
  --guide-ink: #111111;
  --guide-muted: #5f5f5f;
  --guide-soft: #8a8a8a;
  --guide-border: #e5e5e5;
  --guide-dark: #0a0a0a;
  --guide-accent: #c8e64a;
  --guide-accent-dark: #a5c23a;
  --guide-mono: 'JetBrains Mono', 'SF Mono', monospace;
  --guide-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body.guide-page {
  margin: 0;
  font-family: var(--guide-sans);
  background: var(--guide-bg);
  color: var(--guide-ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* Reading progress bar */
.guide-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--guide-accent);
  z-index: 200;
  transition: width 0.1s linear;
}

/* Dot grid background matching landing page */
.guide-page .dot-grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}
.guide-page .dot-grid-bg::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    to bottom,
    rgba(132, 128, 118, 0.1) 0 8px,
    transparent 8px 16px
  );
  -webkit-mask: linear-gradient(
    to right,
    transparent 0, transparent calc(21.5% - 0.5px),
    #000 calc(21.5% - 0.5px), #000 calc(21.5% + 0.5px),
    transparent calc(21.5% + 0.5px), transparent calc(50% - 0.5px),
    #000 calc(50% - 0.5px), #000 calc(50% + 0.5px),
    transparent calc(50% + 0.5px), transparent calc(78.2% - 0.5px),
    #000 calc(78.2% - 0.5px), #000 calc(78.2% + 0.5px),
    transparent calc(78.2% + 0.5px), transparent 100%
  );
  mask: linear-gradient(
    to right,
    transparent 0, transparent calc(21.5% - 0.5px),
    #000 calc(21.5% - 0.5px), #000 calc(21.5% + 0.5px),
    transparent calc(21.5% + 0.5px), transparent calc(50% - 0.5px),
    #000 calc(50% - 0.5px), #000 calc(50% + 0.5px),
    transparent calc(50% + 0.5px), transparent calc(78.2% - 0.5px),
    #000 calc(78.2% - 0.5px), #000 calc(78.2% + 0.5px),
    transparent calc(78.2% + 0.5px), transparent 100%
  );
}

.guide-shell {
  position: relative;
  z-index: 1;
}

.guide-hero {
  padding: 140px 24px 64px;
  border-bottom: 1px solid var(--guide-border);
  background:
    radial-gradient(circle at 85% 20%, rgba(200, 230, 74, 0.08), transparent 30%),
    radial-gradient(circle at 10% 80%, rgba(200, 230, 74, 0.04), transparent 30%),
    linear-gradient(180deg, #ffffff 0%, #fafafa 100%);
}

.guide-hero-inner,
.guide-section-inner,
.guide-cta-inner {
  max-width: 1160px;
  margin: 0 auto;
}

.guide-kicker {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid rgba(165, 194, 58, 0.28);
  background: rgba(200, 230, 74, 0.06);
  font-family: var(--guide-mono);
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--guide-accent-dark);
}

.guide-kicker::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--guide-accent);
}

.guide-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(280px, 0.8fr);
  gap: 40px;
  margin-top: 24px;
  align-items: start;
}

.guide-hero h1 {
  margin: 0 0 16px;
  font-size: clamp(28px, 3.5vw, 38px);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 600;
}

.guide-lead {
  margin: 0 0 16px;
  max-width: 680px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--guide-muted);
}

.guide-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 20px;
  font-family: var(--guide-mono);
  font-size: 11px;
  color: var(--guide-soft);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.guide-summary {
  background: var(--guide-dark);
  color: #f5f5f5;
  border-radius: 10px;
  padding: 22px 20px 18px;
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.12), 0 4px 12px rgba(0, 0, 0, 0.06);
  border: 1px solid rgba(255,255,255,0.06);
}

.guide-summary-label {
  display: inline-block;
  margin-bottom: 10px;
  font-family: var(--guide-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #9ca3af;
}

.guide-summary h2 {
  margin: 0 0 8px;
  font-size: 17px;
  line-height: 1.2;
}

.guide-summary p {
  margin: 0 0 12px;
  color: #cfcfcf;
  font-size: 13px;
  line-height: 1.55;
}

.guide-summary ul {
  margin: 0;
  padding-left: 16px;
  color: #dddddd;
  font-size: 13px;
  line-height: 1.55;
}

.guide-summary li + li {
  margin-top: 6px;
}

.guide-section {
  padding: 64px 24px;
  content-visibility: auto;
  contain-intrinsic-size: 800px;
}

.guide-section.dark {
  background: var(--guide-dark);
  color: #f3f3f3;
}

.guide-section.dark .guide-section-label,
.guide-section.dark .guide-section-intro,
.guide-section.dark .guide-prose p,
.guide-section.dark .guide-prose li,
.guide-section.dark .guide-card p {
  color: #cfcfcf;
}

.guide-section-label {
  margin-bottom: 12px;
  font-family: var(--guide-mono);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--guide-soft);
}

.guide-section h2 {
  margin: 0 0 12px;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.guide-section-intro {
  max-width: 680px;
  margin: 0 0 24px;
  font-size: 14px;
  line-height: 1.6;
  color: var(--guide-muted);
}

.guide-grid-2,
.guide-card-grid {
  display: grid;
  gap: 20px;
}

.guide-grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.guide-card-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.guide-card,
.guide-table,
.guide-checklist,
.guide-callout {
  background: var(--guide-surface);
  border: 1px solid var(--guide-border);
  border-radius: 10px;
}

.guide-section.dark .guide-card,
.guide-section.dark .guide-table,
.guide-section.dark .guide-checklist,
.guide-section.dark .guide-callout {
  background: #111111;
  border-color: #2a2a2a;
}

.guide-card {
  padding: 22px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.guide-card:hover {
  border-color: #ccc;
  box-shadow: 0 4px 16px rgba(0,0,0,0.04);
}

.guide-section.dark .guide-card:hover {
  border-color: #3a3a3a;
  box-shadow: 0 4px 16px rgba(0,0,0,0.2);
}

.guide-card h3 {
  margin: 0 0 8px;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.02em;
}

.guide-card p {
  margin: 0;
  color: var(--guide-muted);
  font-size: 13px;
  line-height: 1.6;
}

.guide-table {
  overflow: hidden;
}

.guide-table-row {
  display: grid;
  grid-template-columns: 220px 1fr 1fr;
}

.guide-table-row + .guide-table-row {
  border-top: 1px solid var(--guide-border);
}

.guide-section.dark .guide-table-row + .guide-table-row {
  border-top-color: #2a2a2a;
}

.guide-table-row > div {
  padding: 16px 18px;
}

.guide-table-row > div + div {
  border-left: 1px solid var(--guide-border);
}

.guide-section.dark .guide-table-row > div + div {
  border-left-color: #2a2a2a;
}

.guide-table-head {
  background: rgba(200, 230, 74, 0.06);
  font-family: var(--guide-mono);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--guide-muted);
}

.guide-table-row > div {
  font-size: 13px;
  line-height: 1.55;
}

.guide-checklist {
  padding: 20px;
}

.guide-checklist ul,
.guide-prose ul {
  margin: 0;
  padding-left: 18px;
  font-size: 13px;
  line-height: 1.6;
}

.guide-checklist li + li,
.guide-prose li + li {
  margin-top: 8px;
}

.guide-prose {
  max-width: 720px;
}

.guide-prose p {
  margin: 0 0 14px;
  color: var(--guide-muted);
  font-size: 14px;
  line-height: 1.6;
}

.guide-callout {
  padding: 18px 20px;
  border-left: 3px solid var(--guide-accent);
  font-size: 13px;
  line-height: 1.6;
}

.guide-callout strong {
  display: block;
  margin-bottom: 4px;
  font-size: 11px;
  font-family: var(--guide-mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--guide-accent-dark);
}

.guide-section.dark .guide-callout strong {
  color: var(--guide-accent);
}

.guide-links {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.guide-links a,
.guide-cta-buttons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 0 18px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  transition: all 0.2s;
}

.guide-links a.primary,
.guide-cta-buttons a.primary {
  background: var(--guide-accent);
  color: var(--guide-dark);
}

.guide-links a.primary:hover,
.guide-cta-buttons a.primary:hover {
  background: var(--guide-accent-dark);
}

.guide-links a.secondary,
.guide-cta-buttons a.secondary {
  border: 1px solid var(--guide-border);
  color: var(--guide-ink);
  background: transparent;
}

.guide-links a.surface,
.guide-cta-buttons a.surface {
  background: #ffffff;
  color: var(--guide-ink);
}

.guide-links a.secondary:hover {
  border-color: var(--guide-ink);
}

.guide-links a.surface:hover,
.guide-cta-buttons a.surface:hover {
  background: #f4f4f4;
  border-color: var(--guide-ink);
}

.guide-cta {
  padding: 64px 24px 80px;
  background: var(--guide-dark);
}

.guide-cta-card {
  border-radius: 12px;
  padding: 32px 28px;
  background: linear-gradient(135deg, rgba(200, 230, 74, 0.08), rgba(255, 255, 255, 0.02));
  border: 1px solid rgba(200, 230, 74, 0.15);
  color: #f7f7f7;
  box-shadow: 0 24px 60px rgba(0,0,0,0.2);
}

.guide-cta-card h2 {
  margin: 0 0 10px;
  font-size: clamp(22px, 2.4vw, 28px);
  line-height: 1.15;
  letter-spacing: -0.03em;
}

.guide-cta-card p {
  margin: 0 0 18px;
  max-width: 640px;
  color: #d3d3d3;
  font-size: 14px;
  line-height: 1.6;
}

.guide-cta-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.guide-cta-buttons a.secondary {
  color: #f7f7f7;
  border-color: rgba(255, 255, 255, 0.16);
}

.guide-cta-buttons a.secondary:hover {
  border-color: rgba(255, 255, 255, 0.4);
}

/* Breadcrumb */
.guide-breadcrumb {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-bottom: 16px;
  font-size: 12px;
  color: var(--guide-soft);
}

.guide-breadcrumb a {
  color: var(--guide-soft);
  text-decoration: none;
  transition: color 0.15s;
}

.guide-breadcrumb a:hover {
  color: var(--guide-ink);
}

.guide-breadcrumb span.sep {
  font-size: 11px;
  color: #ccc;
}

.guide-breadcrumb span.current {
  color: var(--guide-ink);
  font-weight: 500;
}

@media (max-width: 960px) {
  .guide-hero-grid,
  .guide-grid-2,
  .guide-card-grid {
    grid-template-columns: 1fr;
  }

  .guide-table-row {
    grid-template-columns: 1fr;
  }

  .guide-table-row > div + div {
    border-left: none;
    border-top: 1px solid var(--guide-border);
  }

  .guide-section.dark .guide-table-row > div + div {
    border-top-color: #2a2a2a;
  }
}

@media (max-width: 640px) {
  .guide-hero {
    padding: 120px 20px 48px;
  }

  .guide-section,
  .guide-cta {
    padding-left: 20px;
    padding-right: 20px;
  }

  .guide-section {
    padding-top: 48px;
    padding-bottom: 48px;
  }
}
