/* Shared layout for SEO guide / how-to marketing pages */

.guide-page {
  --guide-hero-from: #0f172a;
  --guide-hero-mid: #1e40af;
  --guide-hero-to: #1e3a8a;
  --guide-accent: #2563eb;
  --guide-accent-hover: #1d4ed8;
  --guide-cta-text: #1e3a8a;
  --guide-callout-bg: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
  --guide-callout-border: #0ea5e9;
  --guide-callout-heading: #0369a1;
  --guide-callout-text: #0c4a6e;
  --guide-h2-bar: linear-gradient(90deg, #2563eb, #6366f1);
  --guide-highlight-bg: #ecfdf5;
  --guide-highlight-border: #6ee7b7;
  --guide-highlight-heading: #065f46;
  --guide-highlight-text: #047857;
}

.guide-page--amber {
  --guide-hero-from: #7c2d12;
  --guide-hero-mid: #9a3412;
  --guide-hero-to: #7c2d12;
  --guide-accent: #ea580c;
  --guide-accent-hover: #c2410c;
  --guide-cta-text: #7c2d12;
  --guide-callout-bg: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
  --guide-callout-border: #fb923c;
  --guide-callout-heading: #9a3412;
  --guide-callout-text: #7c2d12;
  --guide-h2-bar: linear-gradient(90deg, #dc2626, #ea580c);
  --guide-highlight-bg: #fef2f2;
  --guide-highlight-border: #fca5a5;
  --guide-highlight-heading: #991b1b;
  --guide-highlight-text: #7c2d12;
}

.guide-page--green {
  --guide-hero-from: #065f46;
  --guide-hero-mid: #047857;
  --guide-hero-to: #065f46;
  --guide-accent: #059669;
  --guide-accent-hover: #047857;
  --guide-cta-text: #065f46;
  --guide-callout-bg: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
  --guide-callout-border: #6ee7b7;
  --guide-callout-heading: #065f46;
  --guide-callout-text: #047857;
  --guide-h2-bar: linear-gradient(90deg, #10b981, #059669);
  --guide-highlight-bg: #ecfdf5;
  --guide-highlight-border: #6ee7b7;
  --guide-highlight-heading: #065f46;
  --guide-highlight-text: #047857;
}

.guide-page {
  font-family:
    "Plus Jakarta Sans",
    -apple-system,
    BlinkMacSystemFont,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  line-height: 1.7;
  color: #1f2937;
  background: #fff;
  -webkit-font-smoothing: antialiased;
}

.guide-page * {
  box-sizing: border-box;
}

/* Hero — tighter nav clearance, original blue gradient look */
body.guide-page #nav-placeholder + section.hero {
  padding-top: calc(var(--nav-height, 64px) + var(--nav-top-offset, 16px) + 18px) !important;
  padding-bottom: 1.35rem !important;
}

.guide-page .guide-breadcrumb {
  max-width: 720px;
  margin: 0 auto 0.65rem;
  padding: 0;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.55);
  text-align: center;
}

.guide-page .guide-breadcrumb a {
  color: rgba(255, 255, 255, 0.75);
  text-decoration: none;
  font-weight: 500;
}

.guide-page .guide-breadcrumb a:hover {
  color: #fff;
  text-decoration: underline;
}

.guide-page .guide-breadcrumb span[aria-current] {
  color: rgba(255, 255, 255, 0.45);
}

.guide-page .hero {
  padding-left: 2rem;
  padding-right: 2rem;
  background: linear-gradient(
    180deg,
    var(--guide-hero-from) 0%,
    var(--guide-hero-mid) 55%,
    var(--guide-hero-to) 100%
  );
  color: white;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.guide-page .hero::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.12), transparent);
}

.guide-page .hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 25% 50%, rgba(255, 255, 255, 0.1) 0%, transparent 55%),
    radial-gradient(circle at 75% 30%, rgba(99, 102, 241, 0.2) 0%, transparent 50%);
  pointer-events: none;
}

.guide-page .hero-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
}

.guide-page .hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.75);
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.28rem 0.8rem;
  border-radius: 50px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  margin-bottom: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.guide-page .hero-badge::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #60a5fa;
  flex-shrink: 0;
}

.guide-page .hero h1 {
  font-size: clamp(1.55rem, 3.2vw, 2.15rem);
  margin-bottom: 0.55rem;
  line-height: 1.18;
  font-weight: 800;
  letter-spacing: -0.03em;
  text-wrap: balance;
}

.guide-page .hero-lede {
  font-size: clamp(0.92rem, 1.8vw, 1.02rem);
  opacity: 0.9;
  max-width: 540px;
  margin: 0 auto 0.9rem;
  font-weight: 400;
  line-height: 1.55;
}

.guide-page .hero-ctas {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
  margin-top: 0.25rem;
  margin-bottom: 0;
}

.guide-page .cta-button-large {
  background: #ffffff;
  color: var(--guide-cta-text);
  padding: 0.7rem 1.4rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 700;
  font-size: 0.88rem;
  display: inline-block;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
}

.guide-page .cta-button-large:hover {
  transform: translateY(-3px);
  background: #f8fafc;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.28);
}

.guide-page .cta-button-secondary {
  background: transparent;
  color: rgba(255, 255, 255, 0.9);
  padding: 0.7rem 1.4rem;
  border-radius: 50px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.88rem;
  border: 1.5px solid rgba(255, 255, 255, 0.4);
  transition: background 0.2s, transform 0.2s;
}

.guide-page .cta-button-secondary:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-2px);
}

.guide-page .hero-stats {
  display: flex;
  justify-content: center;
  gap: 0;
  padding-top: 0.85rem;
  margin-top: 1rem;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  max-width: 480px;
  margin-left: auto;
  margin-right: auto;
}

.guide-page .hero-stat {
  flex: 1;
  text-align: center;
  padding: 0 0.85rem;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
}

.guide-page .hero-stat:last-child {
  border-right: none;
}

.guide-page .hero-stat strong {
  display: block;
  font-size: 0.95rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}

.guide-page .hero-stat span {
  display: block;
  font-size: 0.65rem;
  opacity: 0.65;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-top: 0.15rem;
}

/* Page intro — below hero, separate cards (matches portfolio-monitoring) */
.guide-page .page-intro {
  max-width: 900px;
  margin: 0 auto;
  padding: 1.15rem 2rem 1rem;
  border-bottom: 1px solid #f1f5f9;
}

.guide-page .page-intro-lede {
  font-size: 0.98rem;
  font-weight: 600;
  color: #111827;
  line-height: 1.5;
  letter-spacing: -0.01em;
  margin: 0 0 0.75rem;
  text-align: center;
  max-width: 640px;
  margin-left: auto;
  margin-right: auto;
}

.guide-page .page-intro-points {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.85rem;
}

.guide-page .page-intro-points li {
  background: linear-gradient(180deg, #f8fafc 0%, #f1f5f9 100%);
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  text-align: left;
}

.guide-page .page-intro-points strong {
  display: block;
  color: #0f172a;
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
  letter-spacing: -0.01em;
}

.guide-page .page-intro-points span {
  display: block;
  font-size: 0.86rem;
  color: #64748b;
  line-height: 1.5;
}

/* Content */
.guide-page .content {
  max-width: 900px;
  margin: 0 auto;
  padding: 2.5rem 2rem 4rem;
}

.guide-page .content .section-eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--guide-accent);
  margin-bottom: 0.35rem;
}

.guide-page .content h2 {
  font-size: clamp(1.5rem, 2.8vw, 2rem);
  margin: 3rem 0 1.25rem;
  color: #111827;
  font-weight: 700;
  position: relative;
  padding-bottom: 0.75rem;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.guide-page .content h2:first-of-type {
  margin-top: 0;
}

.guide-page .content h2::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 48px;
  height: 3px;
  background: var(--guide-h2-bar);
  border-radius: 2px;
}

.guide-page .content p {
  font-size: 1.05rem;
  margin-bottom: 1.25rem;
  color: #4b5563;
  line-height: 1.8;
  max-width: 72ch;
}

.guide-page .content a {
  color: var(--guide-accent);
  font-weight: 600;
  text-decoration: none;
}

.guide-page .content a:hover {
  text-decoration: underline;
}

.guide-page .content ul.content-list {
  list-style: none;
  padding: 0;
  margin: 1.25rem 0 2rem;
}

.guide-page .content ul.content-list li {
  padding: 0.5rem 0 0.5rem 1.75rem;
  position: relative;
  color: #4b5563;
  font-size: 1.02rem;
  line-height: 1.65;
}

.guide-page .content ul.content-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--guide-accent);
  font-weight: 700;
}

/* Callout boxes */
.guide-page .key-takeaways,
.guide-page .rule-box,
.guide-page .warning-box {
  border-radius: 16px;
  padding: 1.75rem 2rem;
  margin: 0 0 2.5rem;
}

.guide-page .key-takeaways,
.guide-page .rule-box {
  background: var(--guide-callout-bg);
  border: 2px solid var(--guide-callout-border);
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.06);
}

.guide-page .warning-box {
  background: var(--guide-highlight-bg);
  border: 2px solid var(--guide-highlight-border);
  margin: 1.25rem 0 2rem;
}

.guide-page .key-takeaways h2,
.guide-page .key-takeaways h3,
.guide-page .rule-box h3,
.guide-page .warning-box h3 {
  color: var(--guide-callout-heading);
  font-size: 1.15rem;
  margin: 0 0 1rem;
  font-weight: 700;
  line-height: 1.35;
}

.guide-page .warning-box h3 {
  color: var(--guide-highlight-heading);
}

.guide-page .key-takeaways ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.guide-page .key-takeaways li {
  padding: 0.45rem 0;
  display: flex;
  gap: 0.65rem;
  font-size: 1rem;
  color: var(--guide-callout-text);
  line-height: 1.55;
}

.guide-page .key-takeaways li::before {
  content: "✓";
  font-weight: 700;
  flex-shrink: 0;
  color: var(--guide-accent);
}

.guide-page .rule-box p,
.guide-page .warning-box p {
  color: var(--guide-callout-text);
  margin: 0.4rem 0;
  font-size: 0.98rem;
  max-width: none;
}

.guide-page .warning-box p {
  color: var(--guide-highlight-text);
}

/* Step cards */
.guide-page .steps-grid {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}

.guide-page .step-card {
  display: flex;
  gap: 1.25rem;
  padding: 1.35rem 1.5rem;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  align-items: flex-start;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.guide-page .step-card:hover {
  border-color: #c7d2fe;
  box-shadow: 0 6px 20px rgba(99, 102, 241, 0.08);
}

.guide-page .step-number {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--guide-accent), var(--guide-accent-hover));
  color: white;
  font-size: 0.95rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

.guide-page .step-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 0.4rem;
}

.guide-page .step-body p {
  font-size: 0.95rem;
  margin: 0;
  max-width: none;
}

/* Warning sign cards */
.guide-page .sign-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem 1.25rem;
  padding: 1.5rem;
  background: #fff;
  border: 1.5px solid #fecaca;
  border-radius: 14px;
  margin: 1.5rem 0 2.5rem;
  box-shadow: 0 4px 16px rgba(220, 38, 38, 0.06);
}

.guide-page .sign-number {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: linear-gradient(135deg, #fef2f2, #fee2e2);
  border: 1px solid #fca5a5;
  color: #b91c1c;
  font-size: 1.1rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  justify-content: center;
}

.guide-page .sign-body h2 {
  margin: 0 0 0.65rem;
  font-size: 1.25rem;
  padding-bottom: 0;
}

.guide-page .sign-body h2::after {
  display: none;
}

.guide-page .sign-body > p {
  margin-bottom: 1rem;
}

/* Comparison table */
.guide-page .comparison-table {
  width: 100%;
  margin: 1.5rem 0 2rem;
  border-collapse: collapse;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  font-size: 0.92rem;
}

.guide-page .comparison-table th {
  background: var(--guide-highlight-bg);
  padding: 0.85rem 1rem;
  font-weight: 700;
  color: var(--guide-highlight-heading);
  text-align: left;
  border-bottom: 2px solid var(--guide-highlight-border);
}

.guide-page .comparison-table td {
  padding: 0.9rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  color: #374151;
}

.guide-page .comparison-table tr:nth-child(even) td {
  background: #f9fafb;
}

.guide-page .section-divider {
  height: 1px;
  background: linear-gradient(90deg, transparent, #e5e7eb 20%, #e5e7eb 80%, transparent);
  margin: 3rem 0;
}

/* Formula and worked examples */
.guide-page .formula-box {
  background: #0f172a;
  border-radius: 14px;
  padding: 1.75rem 1.5rem;
  margin: 1.5rem 0 1rem;
  text-align: center;
  box-shadow: 0 8px 28px rgba(15, 23, 42, 0.2);
  position: relative;
  overflow: hidden;
}

.guide-page .formula-box::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--guide-accent), #6366f1);
}

.guide-page .formula-label {
  font-size: 0.72rem;
  color: #93c5fd;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 700;
  margin-bottom: 0.85rem;
}

.guide-page .formula-main {
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.15rem, 2.5vw, 1.55rem);
  color: #f8fafc;
  font-style: italic;
  line-height: 1.55;
  margin-bottom: 0.75rem;
}

.guide-page .formula-note {
  font-size: 0.85rem;
  color: #94a3b8;
  line-height: 1.55;
  max-width: 52ch;
  margin: 0 auto;
}

.guide-page .formula-vars {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 1rem 1.25rem;
  margin: 0.75rem 0 2rem;
}

.guide-page .formula-vars table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

.guide-page .formula-vars td {
  padding: 0.55rem 0.5rem;
  border-bottom: 1px solid #f1f5f9;
  color: #4b5563;
  vertical-align: top;
  line-height: 1.5;
}

.guide-page .formula-vars td:first-child {
  font-family: Georgia, serif;
  font-style: italic;
  font-weight: 700;
  color: var(--guide-accent);
  width: 100px;
  white-space: nowrap;
}

.guide-page .formula-vars tr:last-child td {
  border-bottom: none;
}

.guide-page .worked-example {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 2px solid #93c5fd;
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  margin: 1.5rem 0 2rem;
  box-shadow: 0 6px 22px rgba(37, 99, 235, 0.08);
}

.guide-page .worked-example h3,
.guide-page .worked-example h4 {
  font-size: 1.1rem;
  font-weight: 800;
  color: #1e40af;
  margin: 0 0 1.25rem;
}

.guide-page .worked-step {
  background: #fff;
  border-radius: 10px;
  padding: 1.1rem 1.15rem;
  margin-bottom: 0.85rem;
  border-left: 4px solid var(--guide-accent);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.guide-page .worked-step:last-child {
  margin-bottom: 0;
}

.guide-page .worked-step-title {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.92rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.45rem;
}

.guide-page .worked-step-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--guide-accent);
  color: #fff;
  font-size: 0.72rem;
  font-weight: 800;
  flex-shrink: 0;
}

.guide-page .worked-step p {
  font-size: 0.92rem;
  margin: 0.35rem 0 0;
  max-width: none;
  line-height: 1.6;
}

.guide-page .worked-result {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.4rem 0.75rem;
  background: #ecfdf5;
  border: 1px solid #6ee7b7;
  border-radius: 8px;
  font-size: 0.88rem;
  font-weight: 700;
  color: #065f46;
}

.guide-page .info-box {
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.35rem 1.5rem;
  margin: 1.5rem 0 2rem;
}

.guide-page .info-box h3,
.guide-page .info-box h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 0.75rem;
}

.guide-page .info-box p {
  font-size: 0.95rem;
  margin: 0.4rem 0;
  max-width: none;
}

/* Drift bar visual */
.guide-page .drift-visual {
  background: #fff;
  border: 1.5px solid #e2e8f0;
  border-radius: 14px;
  padding: 1.5rem 1.35rem;
  margin: 1.5rem 0 2rem;
  box-shadow: 0 4px 18px rgba(15, 23, 42, 0.05);
}

.guide-page .drift-visual h3,
.guide-page .drift-visual h4 {
  font-size: 1rem;
  font-weight: 700;
  color: #111827;
  margin: 0 0 1.25rem;
  text-align: center;
}

.guide-page .drift-row {
  margin-bottom: 1.25rem;
}

.guide-page .drift-row:last-child {
  margin-bottom: 0;
}

.guide-page .drift-row-label {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  font-size: 0.88rem;
  margin-bottom: 0.4rem;
  color: #111827;
  font-weight: 600;
}

.guide-page .drift-delta {
  font-weight: 700;
  font-size: 0.8rem;
  white-space: nowrap;
}

.guide-page .drift-delta.up {
  color: #b91c1c;
}

.guide-page .drift-delta.down {
  color: #15803d;
}

.guide-page .drift-bar-track {
  position: relative;
  background: #f1f5f9;
  height: 24px;
  border-radius: 12px;
  overflow: hidden;
}

.guide-page .drift-target {
  position: absolute;
  top: 0;
  bottom: 0;
  background: rgba(99, 102, 241, 0.22);
  border-right: 2px dashed #6366f1;
}

.guide-page .drift-current {
  position: absolute;
  top: 3px;
  bottom: 3px;
  background: linear-gradient(90deg, var(--guide-accent), #6366f1);
  border-radius: 9px;
}

.guide-page .drift-current.over {
  background: linear-gradient(90deg, #b91c1c, #ef4444);
}

.guide-page .drift-legend {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1rem 1.5rem;
  margin-top: 1.15rem;
  font-size: 0.78rem;
  color: #64748b;
}

.guide-page .drift-legend-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.guide-page .drift-legend-swatch {
  width: 14px;
  height: 14px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--guide-accent), #6366f1);
}

.guide-page .drift-legend-swatch.target {
  background: rgba(99, 102, 241, 0.22);
  border: 2px dashed #6366f1;
}

.guide-page .drift-legend-swatch.over {
  background: linear-gradient(90deg, #b91c1c, #ef4444);
}

.guide-page .data-table {
  width: 100%;
  margin: 1.25rem 0 2rem;
  border-collapse: collapse;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  overflow: hidden;
  font-size: 0.9rem;
}

.guide-page .data-table th {
  background: #f1f5f9;
  padding: 0.8rem 1rem;
  font-weight: 700;
  color: #0f172a;
  text-align: left;
  border-bottom: 2px solid #e2e8f0;
}

.guide-page .data-table td {
  padding: 0.85rem 1rem;
  border-bottom: 1px solid #e5e7eb;
  color: #374151;
  line-height: 1.5;
  vertical-align: top;
}

.guide-page .data-table tr:nth-child(even) td {
  background: #f9fafb;
}

.guide-page .content h3 {
  font-size: 1.2rem;
  font-weight: 700;
  color: #111827;
  margin: 2rem 0 0.85rem;
  letter-spacing: -0.01em;
}

/* Related pages grid */
.guide-page .related-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem 3rem;
}

.guide-page .related-section h2 {
  font-size: 1.5rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}

.guide-page .related-pages {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.guide-page .related-link {
  display: block;
  background: #f8fafc;
  border: 1.5px solid #e2e8f0;
  border-radius: 12px;
  padding: 1.1rem 1.2rem;
  text-decoration: none;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
  height: 100%;
}

.guide-page .related-link:hover {
  border-color: #a5b4fc;
  box-shadow: 0 6px 18px rgba(99, 102, 241, 0.1);
  transform: translateY(-2px);
  background: #fff;
}

.guide-page .related-link strong {
  display: block;
  color: #111827;
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 0.3rem;
}

.guide-page .related-link span {
  font-size: 0.8rem;
  color: #64748b;
  line-height: 1.45;
}

/* FAQ */
.guide-page .faq-section {
  max-width: 900px;
  margin: 0 auto;
  padding: 2rem 2rem 3rem;
  border-top: 1px solid #e5e7eb;
}

.guide-page .faq-title {
  font-size: 1.65rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 1.5rem;
  letter-spacing: -0.02em;
}

.guide-page .faq-item {
  border-bottom: 1px solid #e5e7eb;
  padding: 1.1rem 0;
}

.guide-page .faq-item summary {
  font-weight: 600;
  font-size: 1.02rem;
  color: #1f2937;
  cursor: pointer;
  list-style: none;
  padding-right: 2rem;
  line-height: 1.45;
}

.guide-page .faq-item summary::-webkit-details-marker {
  display: none;
}

.guide-page .faq-item summary::after {
  content: "+";
  float: right;
  font-size: 1.25rem;
  font-weight: 300;
  color: #9ca3af;
}

.guide-page .faq-item[open] summary::after {
  content: "−";
}

.guide-page .faq-item p {
  margin-top: 0.85rem;
  color: #4b5563;
  line-height: 1.75;
  font-size: 0.98rem;
  max-width: 72ch;
}

/* Bottom CTA */
.guide-page .cta-section {
  background: linear-gradient(135deg, var(--guide-hero-from), var(--guide-hero-mid));
  color: white;
  padding: 4.5rem 2rem;
  text-align: center;
}

.guide-page .cta-section h2 {
  font-size: clamp(1.75rem, 3vw, 2.4rem);
  margin-bottom: 1rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.guide-page .cta-section p {
  font-size: 1.1rem;
  margin: 0 auto 2rem;
  opacity: 0.88;
  max-width: 520px;
  line-height: 1.65;
}

.guide-page footer {
  background: #111827;
  color: #9ca3af;
  padding: 2rem;
  text-align: center;
  font-size: 0.875rem;
}

.guide-page footer a {
  color: #9ca3af;
  text-decoration: none;
}

.guide-page footer a:hover {
  color: #d1d5db;
}

/* Sticky mobile CTA */
.guide-sticky-cta {
  display: none;
}

@media (max-width: 768px) {
  body.guide-page #nav-placeholder + section.hero {
    padding-top: calc(var(--nav-height, 64px) + var(--nav-top-offset, 16px) + 12px) !important;
    padding-bottom: 1rem !important;
    padding-left: 1.25rem !important;
    padding-right: 1.25rem !important;
  }

  .guide-page .hero-stats {
    flex-wrap: wrap;
    gap: 0.5rem;
    border-top: none;
    padding-top: 0;
    margin-top: 0.75rem;
  }

  .guide-page .hero-stat {
    flex: 1 1 30%;
    border-right: none;
    padding: 0.35rem 0.5rem;
  }

  .guide-page .page-intro {
    padding: 0.9rem 1rem 0.75rem;
  }

  .guide-page .page-intro-lede {
    font-size: 1rem;
    text-align: left;
  }

  .guide-page .page-intro-points {
    grid-template-columns: 1fr;
    gap: 0.65rem;
  }

  .guide-page .page-intro-points li {
    padding: 0.85rem 0.95rem;
  }

  .guide-page .content {
    padding: 2rem 1.25rem 3rem;
  }

  .guide-page .sign-card {
    grid-template-columns: 1fr;
  }

  .guide-page .comparison-table,
  .guide-page .data-table {
    display: block;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .guide-page .formula-box {
    padding: 1.2rem 1rem;
  }

  .guide-page .formula-main {
    font-size: 1rem;
  }

  .guide-page .worked-example {
    padding: 1.15rem 1rem;
  }

  .guide-page .related-pages {
    grid-template-columns: 1fr;
  }

  .guide-sticky-cta {
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 900;
    padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom));
    background: rgba(255, 255, 255, 0.96);
    border-top: 1px solid #e2e8f0;
    box-shadow: 0 -8px 24px rgba(15, 23, 42, 0.1);
    transform: translateY(110%);
    transition: transform 0.25s ease;
  }

  .guide-sticky-cta.is-visible {
    transform: translateY(0);
  }

  .guide-sticky-cta a {
    display: block;
    text-align: center;
    background: var(--guide-accent);
    color: #fff;
    font-weight: 700;
    font-size: 0.92rem;
    padding: 0.85rem 1rem;
    border-radius: 10px;
    text-decoration: none;
  }

  .guide-sticky-cta small {
    text-align: center;
    font-size: 0.68rem;
    color: #64748b;
  }
}
