/* Shared styles for the Homebuyer Guide pages (journey.html and guide-*.html) */

  *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
  :root {
    --navy: #0D1B2A; --navy-mid: #1A2E42; --navy-light: #243A52;
    --cream: #F5F0E8; --cream-dark: #EAE3D5;
    --gold: #C8973A; --gold-light: #E8B85A; --white: #FFFFFF;
    --text-muted: #8A9BB0;
    --font-display: 'DM Serif Display', Georgia, serif;
    --font-body: 'DM Sans', sans-serif;
  }
  html { scroll-behavior: smooth; }
  body { font-family: var(--font-body); background: var(--navy); color: var(--cream); line-height: 1.6; }

  /* NAV (matches site nav) */
  nav { position: sticky; top: 0; z-index: 100; display: flex; align-items: center; justify-content: space-between; padding: 1.25rem 4rem; background: rgba(13,27,42,0.92); backdrop-filter: blur(12px); border-bottom: 1px solid rgba(200,151,58,0.15); }
  .logo { font-family: var(--font-display); font-size: 1.3rem; color: var(--cream); text-decoration: none; }
  .logo span { color: var(--gold); }

  .page-header { padding: 4rem 4rem 2rem; max-width: 900px; }
  .eyebrow { font-size: 0.75rem; font-weight: 500; letter-spacing: 0.12em; text-transform: uppercase; color: var(--gold); margin-bottom: 1rem; }
  .page-header h1 { font-family: var(--font-display); font-size: clamp(2.2rem, 4vw, 3.2rem); line-height: 1.15; margin-bottom: 1rem; }
  .page-header h1 em { color: var(--gold); font-style: italic; }
  .page-header p { color: var(--text-muted); font-size: 1.05rem; max-width: 620px; }

  .layout { display: flex; max-width: 1200px; margin: 0 auto; padding: 0 4rem 6rem; gap: 3rem; }

  /* STAGE NAV SIDEBAR */
  .stage-nav { position: sticky; top: 90px; align-self: flex-start; min-width: 220px; max-height: calc(100vh - 110px); overflow-y: auto; }
  .stage-nav a { display: block; padding: 0.6rem 0.9rem; margin-bottom: 0.25rem; border-radius: 6px; color: var(--text-muted); text-decoration: none; font-size: 0.875rem; border-left: 2px solid transparent; transition: all 0.2s; }
  .stage-nav a:hover, .stage-nav a.active { color: var(--cream); background: rgba(200,151,58,0.08); border-left-color: var(--gold); }

  .content { flex: 1; max-width: 720px; }
  .stage { padding: 3rem 0; border-bottom: 1px solid rgba(200,151,58,0.12); }
  .stage:last-child { border-bottom: none; }
  .stage-num { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 50%; background: rgba(200,151,58,0.12); border: 1px solid var(--gold); color: var(--gold); font-family: var(--font-display); font-size: 0.95rem; margin-bottom: 1rem; }
  .stage h2 { font-family: var(--font-display); font-size: 1.85rem; margin-bottom: 1rem; }
  .stage h2 em { color: var(--gold); font-style: italic; }
  .stage p { color: var(--cream-dark); margin-bottom: 1rem; font-size: 0.975rem; }
  .stage ul { margin: 0 0 1rem 1.25rem; color: var(--cream-dark); font-size: 0.975rem; }
  .stage li { margin-bottom: 0.5rem; }
  .stage h3 { font-family: var(--font-body); font-weight: 500; font-size: 1rem; color: var(--gold-light); margin: 1.5rem 0 0.5rem; }

  .callout { background: var(--navy-mid); border: 1px solid rgba(200,151,58,0.2); border-radius: 10px; padding: 1.1rem 1.25rem; margin: 1.25rem 0; }
  .callout-tag { display: inline-block; font-size: 0.72rem; font-weight: 500; letter-spacing: 0.04em; text-transform: uppercase; color: var(--gold-light); margin-bottom: 0.5rem; }
  .callout p { margin-bottom: 0; font-size: 0.925rem; }
  /* Disclosure deadlines (TRID): bold and underlined so the dates to receive and sign stand out */
  .trid { font-weight: 600; color: var(--cream); text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 3px; text-decoration-color: var(--gold); }
  .gtable { width: 100%; border-collapse: collapse; margin: 1rem 0 1.25rem; font-size: 0.9rem; color: var(--cream-dark); }
  .gtable th { text-align: left; padding: 0.5rem 0.75rem 0.5rem 0; color: var(--gold-light); font-weight: 500; border-bottom: 1px solid rgba(200,151,58,0.3); }
  .gtable td { padding: 0.5rem 0.75rem 0.5rem 0; border-bottom: 1px solid rgba(200,151,58,0.12); vertical-align: top; }
  .gtable tr:last-child td { border-bottom: none; }
  .stage p.verified { font-size: 0.8rem; color: var(--text-muted); font-style: italic; margin-top: 1.5rem; }
  .stage a { color: var(--gold-light); }

  .warning { background: rgba(200,80,60,0.08); border: 1px solid rgba(200,80,60,0.35); border-radius: 10px; padding: 1.1rem 1.25rem; margin: 1.25rem 0; }
  .warning .callout-tag { color: #E08070; }
  .warning p { margin-bottom: 0; font-size: 0.925rem; color: var(--cream); }

  @media (max-width: 900px) {
    nav, .page-header, .layout { padding-left: 1.5rem; padding-right: 1.5rem; }
    .layout { flex-direction: column; }
    .stage-nav { position: static; display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 2rem; }
    .stage-nav a { margin-bottom: 0; }
  }

  /* Guide chapters */
  .eyebrow a { color: inherit; text-decoration: none; }
  .eyebrow a:hover { text-decoration: underline; }
  .nav-label { display: block; font-size: 0.7rem; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; color: var(--gold); padding: 0 0.9rem; margin: 0 0 0.5rem; }
  .nav-label.nav-more { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid rgba(200,151,58,0.15); }
  .stages-banner { background: rgba(200,151,58,0.08); border: 1px solid rgba(200,151,58,0.45); border-radius: 12px; padding: 1.1rem 1.25rem; margin-bottom: 1.5rem; }
  .stages-banner-main { display: block; text-decoration: none; }
  .stages-banner-tag { display: inline-block; font-size: 0.7rem; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--gold-light); margin-bottom: 0.3rem; }
  .stages-banner-title { display: block; font-family: var(--font-display); font-size: 1.35rem; color: var(--cream); line-height: 1.25; }
  .stages-banner-desc { display: block; color: var(--text-muted); font-size: 0.875rem; line-height: 1.55; margin-top: 0.3rem; }
  .stages-banner-go { display: inline-block; margin-top: 0.6rem; color: var(--gold-light); font-size: 0.9rem; font-weight: 500; }
  .stages-banner-main:hover .stages-banner-go { text-decoration: underline; }
  .stages-banner-steps { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-top: 0.9rem; padding-top: 0.9rem; border-top: 1px solid rgba(200,151,58,0.2); }
  .stages-banner-steps a { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.4rem 0.75rem; border: 1px solid rgba(200,151,58,0.3); border-radius: 20px; color: var(--cream); font-size: 0.8rem; text-decoration: none; background: var(--navy-mid); }
  .stages-banner-steps a:hover { border-color: var(--gold); }
  .stages-banner-steps b { display: inline-flex; align-items: center; justify-content: center; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: var(--gold); color: var(--navy); font-size: 0.7rem; font-weight: 600; }
  .guide-footer { max-width: 1100px; margin: 2.5rem auto 0; padding: 1.25rem 1.5rem 2.5rem; border-top: 1px solid rgba(200,151,58,0.15); color: var(--text-muted); font-size: 0.75rem; line-height: 1.6; }
  .guide-footer a { color: var(--text-muted); }
  .guide-footer .gf-links { margin-top: 0.6rem; }
  .chapter-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 0.75rem; }
  .chapter-card { display: block; background: var(--navy-mid); border: 1px solid rgba(200,151,58,0.2); border-radius: 10px; padding: 0.9rem 1rem; text-decoration: none; transition: border-color 0.2s; }
  .chapter-card:hover { border-color: var(--gold); }
  .chapter-card-title { display: block; color: var(--cream); font-weight: 500; font-size: 0.95rem; margin-bottom: 0.3rem; }
  .chapter-card-desc { display: block; color: var(--text-muted); font-size: 0.8rem; line-height: 1.5; }
  .more-chapters { padding: 2.5rem 0 0; border-top: 1px solid rgba(200,151,58,0.12); margin-top: 1rem; }
  .more-chapters.top { padding: 0 0 1rem; border-top: none; margin-top: 0; }
  .pager { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 2rem 0 1rem; }
  .pager a { color: var(--gold-light); text-decoration: none; font-size: 0.925rem; }
  .pager a:hover { text-decoration: underline; }
  .stage p.read-more { font-size: 0.875rem; color: var(--text-muted); margin-top: 1.25rem; }
  p.page-note { font-size: 0.8rem; color: var(--text-muted); font-style: italic; margin-top: 2rem; }
  .table-wrap { overflow-x: auto; }
  .content { min-width: 0; }

  @media (max-width: 900px) {
    .nav-label { width: 100%; padding: 0; margin: 0; }
    .stage-nav .nav-more { display: none; } /* the chapter cards on the page do this job on a phone */
  }

/* Small phones: short header link so it doesn't crowd the logo */
.nav-short { display: none; }
@media (max-width: 600px) { .nav-long { display: none; } .nav-short { display: inline; } }
