/* jeffmccracken.net - Shared Styles */

:root {
  --navy: #1a3c5e;
  --navy-light: #2a5580;
  --navy-dark: #0f2840;
  --slate: #475569;
  --gray-100: #f8fafc;
  --gray-200: #e2e8f0;
  --gray-300: #cbd5e1;
  --gray-400: #94a3b8;
  --gray-600: #475569;
  --gray-800: #1e293b;
  --white: #ffffff;
  --accent: #3b82f6;
  --accent-light: #dbeafe;
  --warm: #f8f6f3;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--gray-800);
  background: var(--white);
  line-height: 1.7;
  font-size: 16px;
}

/* ── Navigation ── */

.site-nav {
  background: var(--navy);
  padding: 0 2rem;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.nav-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 60px;
}

.nav-brand {
  color: var(--white);
  text-decoration: none;
  font-weight: 700;
  font-size: 1.1rem;
  letter-spacing: -0.01em;
}

.nav-brand:hover {
  opacity: 0.9;
}

.nav-links {
  display: flex;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  padding: 0.5rem 0.85rem;
  border-radius: 6px;
  transition: all 0.15s;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--white);
  background: rgba(255,255,255,0.12);
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.25rem;
}

/* ── Container ── */

.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 2rem;
}

.container-wide {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 2rem;
}

/* ── Hero Section ── */

.hero {
  background: var(--navy);
  color: var(--white);
  padding: 5rem 2rem 4rem;
}

.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 4rem;
}

.hero-text {
  flex: 1;
}

.hero-text h1 {
  font-size: 2.75rem;
  font-weight: 700;
  line-height: 1.15;
  margin-bottom: 0.5rem;
  letter-spacing: -0.02em;
}

.hero-text .subtitle {
  font-size: 1.2rem;
  color: #93b8d8;
  margin-bottom: 1.5rem;
  font-weight: 400;
}

.hero-text .tagline {
  font-size: 1.05rem;
  color: rgba(255,255,255,0.85);
  line-height: 1.7;
  max-width: 520px;
}

.hero-photo {
  flex-shrink: 0;
}

.hero-photo img {
  width: 240px;
  height: 240px;
  border-radius: 50%;
  object-fit: cover;
  border: 4px solid rgba(255,255,255,0.2);
  box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}

/* ── Section Styles ── */

.section {
  padding: 4rem 2rem;
}

.section-alt {
  background: var(--gray-100);
}

.section-warm {
  background: var(--warm);
}

.section h2 {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 1rem;
  letter-spacing: -0.01em;
}

.section h3 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--gray-800);
  margin-bottom: 0.75rem;
}

.section p {
  color: var(--slate);
  max-width: 700px;
  margin-bottom: 1rem;
}

.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--accent);
  margin-bottom: 0.5rem;
}

/* ── Card Grid ── */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 1.75rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.card:hover {
  border-color: var(--navy);
  box-shadow: 0 4px 16px rgba(26, 60, 94, 0.08);
}

.card h3 {
  font-size: 1.1rem;
  margin-bottom: 0.5rem;
}

.card p {
  font-size: 0.95rem;
  color: var(--slate);
}

.card a {
  color: var(--navy);
  text-decoration: none;
  font-weight: 600;
  display: inline-block;
  margin-top: 0.75rem;
  font-size: 0.9rem;
}

.card a:hover {
  text-decoration: underline;
}

/* ── Sabrina Teaser ── */

.sabrina-teaser {
  display: flex;
  align-items: flex-start;
  gap: 2rem;
  max-width: 900px;
  margin: 0 auto;
}

.sabrina-teaser img {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  object-fit: cover;
  flex-shrink: 0;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.sabrina-teaser-text h2 {
  margin-bottom: 0.75rem;
}

.sabrina-teaser-text p {
  margin-bottom: 0.75rem;
}

/* ── Quote Block ── */

.quote-block {
  border-left: 4px solid var(--navy);
  padding: 1.5rem 2rem;
  background: var(--gray-100);
  border-radius: 0 8px 8px 0;
  margin: 1.5rem 0;
  max-width: 700px;
}

.quote-block p {
  font-style: italic;
  font-size: 1.1rem;
  color: var(--navy);
  margin-bottom: 0;
}

.quote-block cite {
  display: block;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--gray-400);
  font-style: normal;
}

/* ── Story Page ── */

.story-hero {
  background: var(--navy);
  color: var(--white);
  padding: 4rem 2rem 3rem;
  text-align: center;
}

.story-hero h1 {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
}

.story-hero .story-subtitle {
  font-size: 1.1rem;
  color: #93b8d8;
  font-style: italic;
}

.story-content {
  max-width: 740px;
  margin: 0 auto;
  padding: 3rem 2rem 4rem;
}

.story-content h2 {
  font-size: 1.6rem;
  color: var(--navy);
  margin: 3rem 0 0.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--gray-200);
}

.story-content h2:first-of-type {
  border-top: none;
  padding-top: 0;
}

.story-content h3 {
  font-size: 1.2rem;
  color: var(--navy-light);
  margin: 2rem 0 0.5rem;
  font-style: italic;
}

.story-content p {
  color: var(--slate);
  margin-bottom: 1rem;
  max-width: none;
}

.story-content blockquote {
  border-left: 4px solid var(--navy);
  padding: 1rem 1.5rem;
  background: var(--gray-100);
  border-radius: 0 8px 8px 0;
  margin: 1.5rem 0;
  font-style: italic;
  color: var(--navy);
}

.story-content code {
  background: var(--gray-100);
  padding: 0.15em 0.4em;
  border-radius: 4px;
  font-size: 0.9em;
}

.story-content pre {
  background: var(--gray-800);
  color: #e2e8f0;
  padding: 1.25rem 1.5rem;
  border-radius: 8px;
  overflow-x: auto;
  margin: 1.5rem 0;
  font-size: 0.85rem;
  line-height: 1.6;
}

.story-content pre code {
  background: none;
  padding: 0;
  color: inherit;
}

.story-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5rem 0;
  font-size: 0.9rem;
}

.story-content th {
  background: var(--navy);
  color: var(--white);
  padding: 0.6rem 1rem;
  text-align: left;
  font-weight: 600;
}

.story-content td {
  padding: 0.6rem 1rem;
  border-bottom: 1px solid var(--gray-200);
}

.story-content tr:nth-child(even) td {
  background: var(--gray-100);
}

.story-content strong {
  color: var(--gray-800);
}

.story-content em {
  color: var(--navy-light);
}

.story-content hr {
  border: none;
  border-top: 1px solid var(--gray-200);
  margin: 2.5rem 0;
}

.story-separator {
  text-align: center;
  margin: 3rem 0;
  color: var(--gray-300);
  font-size: 1.5rem;
  letter-spacing: 0.5em;
}

/* ── Image in Story ── */

.story-content .inline-image {
  text-align: center;
  margin: 2rem 0;
}

.story-content .inline-image img {
  max-width: 160px;
  border-radius: 50%;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.story-content .inline-image.wide img {
  max-width: 100%;
  border-radius: 8px;
}

/* ── Footer ── */

.site-footer {
  background: var(--navy-dark);
  color: rgba(255,255,255,0.6);
  padding: 2.5rem 2rem;
  text-align: center;
  font-size: 0.85rem;
}

.site-footer a {
  color: rgba(255,255,255,0.8);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--white);
  text-decoration: underline;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
  list-style: none;
}

/* ── CTA Button ── */

.btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 0.15s;
}

.btn-primary {
  background: var(--white);
  color: var(--navy);
}

.btn-primary:hover {
  background: var(--gray-100);
  box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

.btn-outline {
  border: 2px solid var(--navy);
  color: var(--navy);
  background: transparent;
}

.btn-outline:hover {
  background: var(--navy);
  color: var(--white);
}

/* ── Responsive ── */

/* ── Genealogy / Family History Styles ── */

.genealogy-stats {
  margin: 2rem 0;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1rem;
}

.stat-card {
  background: var(--navy);
  color: var(--white);
  padding: 1.5rem 1rem;
  border-radius: 12px;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.stat-number {
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.1;
}

.stat-label {
  font-size: 0.8rem;
  opacity: 0.85;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.line-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
  margin: 1.5rem 0;
}

.line-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 1.5rem;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.line-card:hover {
  border-color: var(--navy);
  box-shadow: 0 4px 16px rgba(26, 60, 94, 0.08);
}

.line-card h3 {
  color: var(--navy);
  margin-bottom: 0.25rem;
  font-size: 1.15rem;
}

.line-card .line-subtitle {
  font-size: 0.85rem;
  color: var(--gray-400);
  margin-bottom: 0.75rem;
  font-style: italic;
}

.line-card p {
  font-size: 0.95rem;
  margin-bottom: 0.5rem;
}

.line-card .line-origin {
  font-size: 0.8rem;
  color: var(--accent);
  font-weight: 600;
  margin-top: 0.75rem;
  margin-bottom: 0;
}

/* Timeline */
.timeline {
  position: relative;
  margin: 2rem 0;
  padding-left: 2rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--gray-200);
}

.timeline-item {
  position: relative;
  margin-bottom: 1.5rem;
  padding-left: 1.5rem;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -1.55rem;
  top: 0.35rem;
  width: 12px;
  height: 12px;
  background: var(--navy);
  border-radius: 50%;
  border: 2px solid var(--white);
  box-shadow: 0 0 0 2px var(--navy);
}

.timeline-year {
  display: inline-block;
  background: var(--navy);
  color: var(--white);
  font-size: 0.75rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
}

.timeline-content strong {
  display: block;
  color: var(--navy);
  margin-bottom: 0.25rem;
}

.timeline-content p {
  font-size: 0.95rem;
  margin-bottom: 0;
}

/* Ancestor Grid */
.ancestor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0;
}

.ancestor-card {
  background: var(--gray-100);
  border-left: 4px solid var(--navy);
  padding: 1.25rem;
  border-radius: 0 8px 8px 0;
}

.ancestor-card h4 {
  color: var(--navy);
  margin-bottom: 0.15rem;
  font-size: 1.05rem;
}

.ancestor-card .ancestor-dates {
  font-size: 0.8rem;
  color: var(--gray-400);
  margin-bottom: 0.5rem;
  font-style: italic;
}

.ancestor-card p {
  font-size: 0.9rem;
  margin-bottom: 0.5rem;
}

.ancestor-card .ancestor-relation {
  font-size: 0.75rem;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0;
}

/* Lineage Details (collapsible) */
.lineage-details {
  background: var(--gray-100);
  border-radius: 12px;
  padding: 1rem 1.5rem;
  margin: 1.5rem 0;
}

.lineage-details summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--navy);
  padding: 0.5rem 0;
  font-size: 1rem;
}

.lineage-details summary:hover {
  color: var(--navy-light);
}

.lineage-details[open] summary {
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--gray-200);
  padding-bottom: 1rem;
}

.lineage-tree {
  padding-left: 0.5rem;
}

.lineage-person {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 8px;
  padding: 1rem 1.25rem;
  margin-bottom: 0;
}

.lineage-person strong {
  color: var(--navy);
  font-size: 1rem;
}

.lineage-person .person-dates {
  display: block;
  font-size: 0.8rem;
  color: var(--gray-400);
  margin-bottom: 0.35rem;
}

.lineage-person p {
  font-size: 0.9rem;
  margin-bottom: 0;
}

.lineage-connector {
  text-align: center;
  color: var(--gray-300);
  font-size: 1.25rem;
  padding: 0.25rem 0;
}

/* ── Responsive ── */

@media (max-width: 768px) {
  .hero {
    padding: 3rem 1.5rem 2.5rem;
  }

  .hero-inner {
    flex-direction: column-reverse;
    text-align: center;
    gap: 2rem;
  }

  .hero-text h1 {
    font-size: 2rem;
  }

  .hero-text .tagline {
    max-width: none;
  }

  .hero-photo img {
    width: 180px;
    height: 180px;
  }

  .sabrina-teaser {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--navy);
    flex-direction: column;
    padding: 1rem;
    box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: block;
  }

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

  .section {
    padding: 3rem 1.5rem;
  }

  .story-content {
    padding: 2rem 1.5rem 3rem;
  }

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

  .line-cards {
    grid-template-columns: 1fr;
  }

  .ancestor-grid {
    grid-template-columns: 1fr;
  }

  .timeline {
    padding-left: 1.5rem;
  }
}

/* ── Enhanced Story Page ── */

/* Reading Progress Bar */
.progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), #60a5fa);
  width: 0%;
  z-index: 200;
  transition: width 0.1s linear;
}

/* Chapter Navigation */
.chapter-nav {
  background: var(--white);
  border-bottom: 1px solid var(--gray-200);
  position: sticky;
  top: 60px;
  z-index: 90;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.chapter-nav::-webkit-scrollbar { display: none; }

.chapter-nav-inner {
  display: flex;
  gap: 0.25rem;
  padding: 0.6rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
  white-space: nowrap;
}

.chapter-nav-pill {
  display: inline-block;
  padding: 0.35rem 0.75rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--slate);
  text-decoration: none;
  border-radius: 20px;
  border: 1px solid var(--gray-200);
  transition: all 0.15s;
  flex-shrink: 0;
}

.chapter-nav-pill:hover {
  color: var(--navy);
  border-color: var(--navy);
  background: var(--gray-100);
}

.chapter-nav-pill.active {
  background: var(--navy);
  color: var(--white);
  border-color: var(--navy);
}

/* Chapter Headers */
.chapter-header {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin: 3.5rem 0 1.5rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--gray-200);
}

.chapter-header:first-of-type {
  border-top: none;
  padding-top: 0;
  margin-top: 2rem;
}

.chapter-badge {
  flex-shrink: 0;
  width: 52px;
  height: 52px;
  background: var(--navy);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  line-height: 1.1;
  text-align: center;
  box-shadow: 0 2px 8px rgba(26, 60, 94, 0.25);
}

.chapter-badge.prologue {
  background: var(--gray-600);
}

.chapter-title-group h2 {
  font-size: 1.6rem;
  color: var(--navy);
  margin: 0 0 0.15rem;
  border: none;
  padding: 0;
}

.chapter-title-group .chapter-date {
  font-size: 0.8rem;
  color: var(--gray-400);
  font-style: italic;
  font-weight: 400;
}

/* Journey Timeline */
.journey-timeline {
  background: var(--gray-100);
  border-radius: 12px;
  padding: 2rem;
  margin: 2rem auto;
  max-width: 740px;
  overflow-x: auto;
}

.journey-timeline svg {
  display: block;
  margin: 0 auto;
}

.journey-timeline .node-label {
  font-size: 11px;
  font-weight: 600;
  fill: var(--navy);
}

.journey-timeline .node-sublabel {
  font-size: 9px;
  fill: var(--slate);
}

.journey-timeline .milestone-dot {
  cursor: pointer;
  transition: r 0.2s;
}

.journey-timeline .milestone-dot:hover {
  r: 10;
}

.journey-path {
  stroke-dasharray: 600;
  stroke-dashoffset: 600;
  transition: stroke-dashoffset 1.5s ease-out;
}

.journey-path.animate {
  stroke-dashoffset: 0;
}

/* Pull Quotes */
.pull-quote {
  position: relative;
  border-left: 4px solid var(--navy);
  padding: 1.75rem 2rem 1.75rem 2.5rem;
  background: var(--warm);
  border-radius: 0 12px 12px 0;
  margin: 2rem 0;
  font-size: 1.1rem;
  font-style: italic;
  color: var(--navy);
  line-height: 1.6;
}

.pull-quote::before {
  content: '\201C';
  position: absolute;
  top: 0.5rem;
  left: 0.75rem;
  font-size: 3rem;
  color: var(--navy);
  opacity: 0.15;
  font-family: Georgia, serif;
  line-height: 1;
}

.pull-quote cite {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.85rem;
  color: var(--gray-400);
  font-style: normal;
}

/* Float Images */
.story-float-image {
  float: right;
  max-width: 280px;
  margin: 0 0 1.5rem 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.story-float-image.left {
  float: left;
  margin: 0 2rem 1.5rem 0;
}

.story-float-image.circle {
  border-radius: 50%;
  max-width: 180px;
}

/* Full-width Story Image */
.story-full-image {
  width: 100%;
  border-radius: 12px;
  box-shadow: 0 4px 24px rgba(0,0,0,0.1);
  margin: 2rem 0;
}

.story-image-caption {
  text-align: center;
  font-size: 0.8rem;
  color: var(--gray-400);
  margin-top: -1rem;
  margin-bottom: 2rem;
  font-style: italic;
}

/* Infrastructure Mini-Timeline (Ch6) */
.infra-timeline {
  position: relative;
  margin: 1.5rem 0;
  padding-left: 2rem;
}

.infra-timeline::before {
  content: '';
  position: absolute;
  left: 0.5rem;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--navy), var(--accent));
}

.infra-day {
  position: relative;
  margin-bottom: 1.25rem;
  padding-left: 1.5rem;
}

.infra-day::before {
  content: '';
  position: absolute;
  left: -1.55rem;
  top: 0.35rem;
  width: 10px;
  height: 10px;
  background: var(--accent);
  border-radius: 50%;
  border: 2px solid var(--white);
  box-shadow: 0 0 0 2px var(--accent);
}

.infra-day strong {
  color: var(--navy);
  display: block;
  margin-bottom: 0.15rem;
}

.infra-day p {
  margin-bottom: 0;
  font-size: 0.95rem;
}

/* Metrics Dashboard */
.metrics-dashboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  margin: 2rem 0;
}

.metrics-column {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 1.5rem;
  text-align: center;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.metrics-column:hover {
  border-color: var(--navy);
  box-shadow: 0 4px 16px rgba(26, 60, 94, 0.08);
}

.metrics-column.era-1 {
  border-top: 4px solid var(--gray-300);
}

.metrics-column.era-2 {
  border-top: 4px solid var(--navy-light);
}

.metrics-column.era-3 {
  border-top: 4px solid var(--navy);
}

.metrics-column h3 {
  font-size: 1rem;
  color: var(--navy);
  margin-bottom: 0.25rem;
}

.metrics-column .era-date {
  font-size: 0.75rem;
  color: var(--gray-400);
  margin-bottom: 1rem;
  font-style: italic;
}

.metric-item {
  margin-bottom: 0.75rem;
}

.metric-value {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--navy);
  line-height: 1.2;
}

.metric-label {
  font-size: 0.7rem;
  color: var(--gray-400);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Stat Highlight */
.stat-highlight {
  display: inline-block;
  background: var(--navy);
  color: var(--white);
  padding: 0.15rem 0.6rem;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.9em;
}

/* Lesson Cards */
.lesson-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin: 2rem 0;
}

.lesson-card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: 12px;
  padding: 1.5rem;
  position: relative;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.lesson-card:hover {
  border-color: var(--navy);
  box-shadow: 0 4px 16px rgba(26, 60, 94, 0.08);
}

.lesson-card:nth-child(odd) {
  border-left: 4px solid var(--navy);
}

.lesson-card:nth-child(even) {
  border-left: 4px solid var(--accent);
}

.lesson-card .lesson-number {
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 24px;
  height: 24px;
  background: var(--gray-100);
  color: var(--gray-400);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
}

.lesson-card h3 {
  font-size: 1rem;
  color: var(--navy);
  margin-bottom: 0.5rem;
  padding-right: 2rem;
}

.lesson-card p {
  font-size: 0.9rem;
  color: var(--slate);
  margin-bottom: 0;
  line-height: 1.6;
}

/* Story Epilogue */
.story-epilogue {
  text-align: center;
  padding: 3rem 0 2rem;
  border-top: 1px solid var(--gray-200);
  margin-top: 3rem;
}

.story-epilogue p {
  font-style: italic;
  color: var(--navy);
  max-width: none;
  margin-bottom: 0.75rem;
}

/* Reading Time */
.reading-time {
  font-size: 0.85rem;
  color: rgba(255,255,255,0.6);
  margin-top: 0.5rem;
}

/* ── Story Responsive Overrides ── */
@media (max-width: 768px) {
  .chapter-nav-inner {
    padding: 0.5rem 1rem;
  }

  .chapter-nav-pill {
    font-size: 0.65rem;
    padding: 0.25rem 0.6rem;
  }

  .chapter-header {
    gap: 0.75rem;
  }

  .chapter-badge {
    width: 40px;
    height: 40px;
    font-size: 0.6rem;
  }

  .chapter-title-group h2 {
    font-size: 1.3rem;
  }

  .story-float-image,
  .story-float-image.left {
    float: none;
    max-width: 100%;
    margin: 1.5rem 0;
  }

  .metrics-dashboard {
    grid-template-columns: 1fr;
  }

  .lesson-grid {
    grid-template-columns: 1fr;
  }

  .journey-timeline {
    padding: 1rem;
  }

  .journey-timeline svg {
    min-width: 500px;
  }

  .infra-timeline {
    padding-left: 1.5rem;
  }
}
