/* Climb With Ridgewell: /learn pages only (the hub and every article, generated by scripts/build-articles.js).
   These pages use the light ridgewellinsurance.com look: its palette, type, spacing, cards, header, footer,
   and article template. No other page on this site loads this file.
   Contrast on the canvas (#FBFCFE): ink 10.9:1, soft ink 6.8:1, muted ink 4.9:1, links and buttons 6.8:1.
   Inline CTA on its tint: body text 6.4:1, white on the blue button 7.0:1. Navy end box: title 13.9:1, text 10.8:1.
   Sky buttons (navy text): 5.8:1. */

:root {
  --canvas: #fbfcfe;
  --surface: #ffffff;
  --surface-tint: #f3f6fb;
  --rule: #e0e7f0;
  --rule-soft: #eef2f8;
  --ink: #1c3a6e;
  --ink-soft: #4a5a76;
  --ink-mute: #5f6f8c;
  --action: #2557a8;
  --action-hover: #1c4080;
  --action-glow: rgba(37, 87, 168, 0.18);
  /* Climb With Ridgewell CTA colors */
  --navy: #0e1d42;
  --navy-rim: #2c4d85;
  --sky: #3b9cff;
  --sky-glow: #6eb5ff;
  --stone: #e8ecf4;
  --cta-text: #c9d2e0;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  background: var(--canvas);
  color: var(--ink);
  font-family: 'Geist', system-ui, -apple-system, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; }

/* Same width and side padding as the header and footer, so everything lines up. */
.article-wrap, .nav-inner, .footer-inner { max-width: 1280px; margin: 0 auto; padding-left: 2.5rem; padding-right: 2.5rem; }
.article-col { max-width: 46rem; margin-left: auto; margin-right: auto; }
.hub-col { max-width: 1200px; margin-left: auto; margin-right: auto; }

/* ============== Buttons ============== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: 'Space Grotesk', sans-serif; font-weight: 600; font-size: 1rem; letter-spacing: 0.005em;
  padding: 0.95rem 1.7rem; border-radius: 10px; border: 0; cursor: pointer; white-space: nowrap;
  transition: transform 0.14s ease, box-shadow 0.2s ease, background 0.15s ease;
}
.btn-primary { background: var(--action); color: #ffffff; box-shadow: 0 14px 30px -14px rgba(37, 87, 168, 0.55), inset 0 1px 0 rgba(255,255,255,0.18); }
.btn-primary:hover { background: var(--action-hover); transform: translateY(-1px); }
.btn-sm { padding: 0.55rem 1.05rem; font-size: 0.875rem; border-radius: 8px; }
/* Inside the navy CTA boxes: this site's sky-blue button. */
.btn-sky { background: var(--sky); color: var(--navy); box-shadow: 0 0 30px rgba(59,156,255,0.35); }
.btn-sky:hover { background: var(--sky-glow); transform: translateY(-1px); }

/* ============== Nav ============== */
.nav-shell {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(20px); -webkit-backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid var(--rule-soft);
  transition: background 0.2s ease, box-shadow 0.2s ease;
}
.nav-shell.is-scrolled { background: rgba(255, 255, 255, 0.96); box-shadow: 0 10px 30px -22px rgba(28, 58, 110, 0.18); }
.nav-inner { height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; }
.nav-wordmark { font-family: 'Space Grotesk', sans-serif; font-size: 1.5rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--navy); }
.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-link { color: var(--ink-soft); font-weight: 500; font-size: 0.95rem; letter-spacing: 0.02em; transition: color 0.15s ease; }
.nav-link:hover { color: var(--ink); }
.nav-actions { display: flex; align-items: center; gap: 0.75rem; }

.nav-menu-toggle {
  width: 44px; height: 44px; display: none; flex-direction: column; justify-content: center; align-items: center; gap: 5px;
  background: transparent; border: 1px solid var(--rule); border-radius: 10px; cursor: pointer;
}
.nav-menu-toggle span { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; transition: transform 0.22s ease, opacity 0.15s ease; }
.nav-menu-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-menu-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-menu-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.nav-mobile-panel {
  position: absolute; top: 100%; left: 0; right: 0; display: none; flex-direction: column;
  background: rgba(255, 255, 255, 0.98); border-bottom: 1px solid var(--rule-soft);
  padding: 0.75rem 1.25rem 1.75rem; box-shadow: 0 20px 40px -20px rgba(28, 58, 110, 0.22);
}
.nav-mobile-panel.is-open { display: flex; }
.nav-mobile-link { display: block; padding: 1.05rem 0.4rem; font-family: 'Space Grotesk', sans-serif; font-size: 1.125rem; font-weight: 500; color: var(--ink); border-bottom: 1px solid var(--rule-soft); }
.nav-mobile-cta { width: 100%; margin-top: 1rem; }

@media (max-width: 900px) { .nav-links { gap: 1.25rem; } }
@media (max-width: 767px) {
  .nav-links, .nav-cta { display: none; }
  .nav-menu-toggle { display: inline-flex; }
  .nav-inner { height: 64px; }
  .nav-wordmark { font-size: 1.3rem; }
}

/* ============== Page header (plain, no background image) ============== */
.article-hero { padding: 9rem 0 3rem; }
.hub-hero { padding: 9rem 0 3.5rem; text-align: center; }
.article-main { padding-bottom: 5rem; }
.hub-main { padding-bottom: 6rem; }

/* ============== Breadcrumb and byline ============== */
.article-breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 0.35rem 0.5rem; font-size: 0.875rem; color: var(--ink-mute); }
.hub-hero .article-breadcrumb ol { justify-content: center; }
.article-breadcrumb li { display: inline-flex; align-items: center; gap: 0.5rem; min-width: 0; }
.article-breadcrumb li + li::before { content: "/"; color: var(--ink-mute); }
.article-breadcrumb a { color: var(--action); }
.article-breadcrumb a:hover { text-decoration: underline; }
.article-breadcrumb [aria-current] { color: var(--ink-soft); }

.eyebrow {
  margin-top: 2rem; display: inline-flex; align-items: center; gap: 12px;
  font-family: 'Space Grotesk', sans-serif; font-size: 0.78rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: 0.22em; color: var(--action);
}
.eyebrow::before { content: ""; width: 30px; height: 1.5px; background: var(--action); display: inline-block; }

.article-title { margin-top: 1.25rem; font-family: 'Space Grotesk', sans-serif; font-weight: 700; color: var(--ink); font-size: 2.25rem; line-height: 1.08; letter-spacing: -0.02em; overflow-wrap: break-word; }
@media (min-width: 768px) { .article-title { font-size: 3.25rem; } }
.hub-title { margin-top: 2rem; font-family: 'Space Grotesk', sans-serif; font-weight: 700; color: var(--ink); font-size: 3rem; line-height: 1.02; letter-spacing: -0.025em; }
@media (min-width: 768px) { .hub-title { font-size: 4.5rem; } }
.hub-intro { margin: 1.5rem auto 0; max-width: 48rem; font-size: 1.125rem; line-height: 1.625; color: var(--ink-soft); }
@media (min-width: 768px) { .hub-intro { font-size: 1.25rem; } }
.article-byline { margin-top: 1.25rem; font-size: 0.95rem; color: var(--ink-mute); line-height: 1.6; }

/* ============== Table of contents ============== */
.article-toc { margin-top: 2rem; border: 1px solid var(--rule-soft); background: var(--surface); border-radius: 14px; padding: 1rem 1.25rem; }
.article-toc summary { cursor: pointer; font-family: 'Space Grotesk', sans-serif; font-weight: 600; color: var(--ink); list-style-position: inside; }
.article-toc ol { margin-top: 0.75rem; padding-left: 1.25rem; list-style: decimal; color: var(--ink-mute); }
.article-toc li { margin: 0.35rem 0; line-height: 1.45; }
.article-toc a { color: var(--action); }
.article-toc a:hover { text-decoration: underline; }

/* ============== Body ============== */
.article-body { color: var(--ink-soft); overflow-wrap: break-word; }
.article-body h2 { font-family: 'Space Grotesk', sans-serif; color: var(--ink); font-weight: 700; font-size: 1.6rem; line-height: 1.2; letter-spacing: -0.01em; margin-top: 3rem; margin-bottom: 1rem; scroll-margin-top: 96px; }
.article-body h3 { font-family: 'Space Grotesk', sans-serif; color: var(--ink); font-weight: 600; font-size: 1.15rem; margin-top: 1.75rem; margin-bottom: 0.5rem; }
.article-body p { line-height: 1.75; margin-bottom: 1.1rem; font-size: 1.0625rem; }
.article-body ul, .article-body ol { padding-left: 1.4rem; margin-bottom: 1.4rem; line-height: 1.7; font-size: 1.0625rem; }
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { margin-bottom: 0.6rem; }
.article-body a { color: var(--action); text-decoration: underline; text-underline-offset: 2px; }
.article-body a:hover { color: var(--action-hover); }
.article-body strong { color: var(--ink); font-weight: 600; }
.article-body p.article-disclosure, .article-disclosure { font-size: 0.85rem; line-height: 1.6; color: var(--ink-mute); }

/* Tables scroll sideways inside their own box on small screens; the page never does. */
.article-table { margin: 1.5rem 0 1.75rem; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; border: 1px solid var(--rule); border-radius: 12px; background: var(--surface); }
.article-table:focus-visible { outline: 2px solid var(--action); outline-offset: 2px; }
.article-table table { width: 100%; border-collapse: collapse; font-size: 0.95rem; font-variant-numeric: tabular-nums; }
.article-table th, .article-table td { padding: 0.7rem 0.9rem; text-align: left; vertical-align: top; border-bottom: 1px solid var(--rule-soft); }
.article-table th { background: var(--surface-tint); color: var(--ink); font-family: 'Space Grotesk', sans-serif; font-weight: 600; white-space: nowrap; }
.article-table td { color: var(--ink-soft); }
.article-table tr:last-child td { border-bottom: 0; }
@media (max-width: 639px) {
  .article-table table { font-size: 0.875rem; }
  .article-table th, .article-table td { padding: 0.6rem 0.55rem; }
  .article-table th { white-space: normal; }
  .article-table-wide table { min-width: 34rem; }
}

/* ============== Inline CTA ([[cta]]): the ridgewellinsurance.com inline style ============== */
.article-cta-inline {
  margin: 2rem 0; padding: 1.25rem 1.4rem; border-radius: 14px;
  background: var(--surface-tint); border: 1px solid var(--rule); border-left: 4px solid var(--action);
}
.article-body .article-cta-inline p { margin-bottom: 0.4rem; font-size: 1rem; line-height: 1.6; }
.article-body .article-cta-inline .article-cta-inline-title { color: var(--ink); font-family: 'Space Grotesk', sans-serif; font-size: 1.1rem; }
.article-cta-inline-actions { margin-top: 0.9rem; display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem 1.25rem; }
.article-body .article-cta-inline .btn { color: #ffffff; text-decoration: none; white-space: normal; text-align: center; }
@media (max-width: 479px) { .article-cta-inline-actions .btn { width: 100%; } }

/* ============== Pre-licensing course discount: light blue ============== */
.article-course-discount {
  margin: 2rem 0; padding: 1.25rem 1.4rem; border-radius: 14px;
  background: #eaf4ff; border: 1px solid #c4defc; border-left: 4px solid var(--sky);
}
.article-body .article-course-discount p { margin-bottom: 0.4rem; font-size: 1rem; line-height: 1.6; }
.article-body .article-course-discount .article-course-discount-title { color: var(--ink); font-family: 'Space Grotesk', sans-serif; font-size: 1.1rem; }
.article-body .article-course-discount .btn { color: #ffffff; text-decoration: none; white-space: normal; text-align: center; }

/* ============== End-of-article CTA: navy, leading into /agents ============== */
.article-cta-end {
  margin-top: 3rem; padding: 2rem; border-radius: 16px; text-align: center;
  background: var(--navy); border: 1px solid var(--navy-rim); box-shadow: 0 28px 50px -30px rgba(14, 29, 66, 0.5);
}
.article-cta-end h3 { font-family: 'Space Grotesk', sans-serif; color: var(--stone); font-weight: 700; font-size: 1.5rem; line-height: 1.25; }
.article-cta-end p { margin-top: 0.75rem; color: var(--cta-text); line-height: 1.65; }
.article-cta-end .btn { margin-top: 1.4rem; white-space: normal; text-align: center; }

/* ============== FAQ, author, related ============== */
.article-faq h3 { font-size: 1.1rem; }

.article-author { margin-top: 2.5rem; display: flex; gap: 1rem; align-items: center; padding: 1.25rem; border-top: 1px solid var(--rule-soft); border-bottom: 1px solid var(--rule-soft); }
.article-author img { width: 72px; height: 72px; border-radius: 999px; object-fit: cover; flex-shrink: 0; }
.article-author-name { font-family: 'Space Grotesk', sans-serif; font-weight: 600; color: var(--ink); }
.article-author p { color: var(--ink-soft); line-height: 1.55; font-size: 0.95rem; }
.article-author a { color: var(--action); font-weight: 600; }
.article-author a:hover { text-decoration: underline; }

.article-related { margin-top: 3rem; }
.article-related h2, .learn-group h2 { font-family: 'Space Grotesk', sans-serif; color: var(--ink); font-weight: 700; font-size: 1.6rem; line-height: 1.2; }
.learn-cards { margin-top: 1.25rem; display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 768px) { .learn-cards { grid-template-columns: 1fr 1fr; } }
/* Hub: 3 cards per row on desktop, 1 on phones. */
@media (min-width: 768px) { .hub-col .learn-cards { grid-template-columns: repeat(3, 1fr); } }
.learn-card {
  display: flex; flex-direction: column; padding: 1.5rem; height: 100%;
  background: var(--surface); border: 1px solid var(--rule-soft); border-radius: 16px;
  transition: border-color 0.2s ease, transform 0.22s ease, box-shadow 0.22s ease;
}
.learn-card:hover { border-color: var(--rule); box-shadow: 0 28px 50px -28px var(--action-glow); transform: translateY(-3px); }
.learn-card h3 { font-family: 'Space Grotesk', sans-serif; color: var(--ink); font-weight: 600; font-size: 1.15rem; line-height: 1.3; }
.learn-card p { margin-top: 0.6rem; color: var(--ink-soft); font-size: 0.95rem; line-height: 1.6; }
.learn-card .learn-card-meta { margin-top: auto; padding-top: 1rem; color: var(--ink-mute); font-size: 0.85rem; }

.article-end-disclosure { margin-top: 2.5rem; }

.learn-group + .learn-group { margin-top: 3.5rem; }
.learn-states { margin-top: 1.25rem; list-style: none; padding: 0; columns: 2; column-gap: 1.5rem; }
@media (min-width: 768px) { .learn-states { columns: 4; } }
.learn-states li { break-inside: avoid; padding: 0.3rem 0; }
.learn-states a { color: var(--action); font-weight: 500; }
.learn-states a:hover { text-decoration: underline; text-underline-offset: 2px; }

/* ============== Footer ============== */
.site-footer { background: var(--surface); border-top: 1px solid var(--rule-soft); padding: 3.5rem 0; }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 2.5rem; align-items: start; }
.footer-wordmark { font-family: 'Space Grotesk', sans-serif; font-size: 1.3rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--navy); }
.footer-tagline { margin-top: 1rem; font-family: 'Space Grotesk', sans-serif; font-size: 13px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ink-mute); font-weight: 500; }
.footer-heading { font-family: 'Space Grotesk', sans-serif; font-size: 0.875rem; text-transform: uppercase; letter-spacing: 0.18em; font-weight: 600; color: var(--ink); margin-bottom: 1rem; }
.footer-links { list-style: none; display: grid; gap: 0.5rem; }
.footer-link { color: var(--ink-soft); font-weight: 500; font-size: 0.95rem; transition: color 0.15s ease; }
.footer-link:hover { color: var(--ink); }
.footer-bottom { margin-top: 2.5rem; }
.divider-soft { height: 1px; border: 0; background: linear-gradient(90deg, transparent, rgba(37, 87, 168, 0.35), transparent); margin-bottom: 1.5rem; }
.footer-disclaimer { font-size: 0.75rem; color: var(--ink-mute); line-height: 1.625; margin-bottom: 1.5rem; }
.footer-legal { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; font-size: 0.875rem; color: var(--ink-mute); }
.footer-legal-links { display: flex; gap: 1.5rem; }

@media (max-width: 767px) {
  .article-wrap, .nav-inner, .footer-inner { padding-left: 1.25rem; padding-right: 1.25rem; }
  .article-hero, .hub-hero { padding: 7rem 0 2.5rem; }
  .footer-grid { grid-template-columns: 1fr; }
  .article-cta-end { padding: 1.75rem 1.25rem; }
}
