/* guides.html — page-only composition. Components come from ../system.css.
   Learning pages (learning-center, guides, guide, glossary) mark "Learn" as the current section. */

/* hero: the wide keys photo, framed on the couple */
@media (min-width: 1001px) { .gb-hero .page-hero-media { aspect-ratio: 4 / 3.4; } }
.gb-hero .page-hero-media img { object-position: 77% 45%; }

/* guidebook: reading rail + chapters */
.guidebook { overflow: clip; }
.gb-layout { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--split-gap); align-items: start; }
.gb-rail { position: sticky; top: calc(var(--nav-h) + 48px); }
.gb-rail-title { font-size: var(--t-small); font-weight: 500; letter-spacing: 0; line-height: 1.4; color: var(--l-text); margin-bottom: 18px; }
.gb-track { position: relative; }
.gb-line { position: absolute; left: 7px; top: 22px; bottom: 22px; width: 1px; background: var(--line); overflow: hidden; }
.gb-line i { position: absolute; inset: 0; background: var(--pine-bright); transform: scaleY(0); transform-origin: 50% 0; }
.gb-steps { list-style: none; margin: 0; padding: 0; }
.gb-steps a { display: grid; grid-template-columns: 15px minmax(0, 1fr); column-gap: 20px; align-items: center; padding: 11px 0; text-decoration: none; color: var(--l-muted); border-radius: 8px; }
.gb-node { position: relative; grid-row: 1 / span 2; width: 15px; height: 15px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 1.5px #B9C6BE; transition: box-shadow .4s var(--ease-out); }
.gb-node::before { content: ""; position: absolute; inset: 3.5px; border-radius: 50%; background: var(--pine-bright); transform: scale(0); transition: transform .45s var(--ease-out); }
.gb-label { font-size: 16px; line-height: 1.3; color: var(--l-text); transition: color var(--dur-fast); }
.gb-sub { margin-top: 2px; font-size: var(--t-micro); line-height: 1.3; color: var(--l-faint); }
.gb-steps a:hover .gb-label { color: var(--pine); }
.gb-steps li.is-done .gb-node { box-shadow: inset 0 0 0 1.5px var(--pine-bright); }
.gb-steps li.is-done .gb-node::before { transform: scale(1); }
.gb-steps a[aria-current="true"] .gb-label { color: var(--pine-deep); font-weight: 500; }
.gb-steps a[aria-current="true"] .gb-node { box-shadow: inset 0 0 0 1.5px var(--pine-bright), 0 0 0 5px rgba(20, 135, 111, .14); }
.gb-rail-foot { margin-top: 28px; padding-left: 35px; }

.gb-chapters { min-width: 0; }
.chapter + .chapter { margin-top: clamp(64px, 7vw, 112px); padding-top: clamp(40px, 4.5vw, 64px); border-top: 1px solid var(--line); }
.chapter > h2 { font-size: var(--t-h3); line-height: 1.1; letter-spacing: -.035em; max-width: 22ch; }
.chapter > * + * { margin-top: 24px; }
.chapter .prose p { font-size: var(--t-body); }
.chapter-pull { font-size: clamp(22px, 2.1vw, 30px); font-weight: 300; letter-spacing: -.03em; line-height: 1.25; color: var(--pine-deep); max-width: 30ch; text-wrap: balance; }
.chapter > h2 + .chapter-pull { margin-top: 28px; }
.chapter-pull + .prose, .prose + .chapter-pull { margin-top: 28px; }

.chapter-ask { padding: clamp(20px, 2.2vw, 28px) clamp(20px, 2.4vw, 32px) 8px; border-radius: var(--r-panel); background: #fff; box-shadow: inset 0 0 0 1px var(--line); }
.chapter-ask h3, .le-fields h3 { font-size: var(--t-small); font-weight: 500; letter-spacing: 0; color: var(--l-text); }
.chapter-ask .ticks { margin-top: 10px; }
.chapter-ask .ticks li { color: var(--l-text); }
.chapter-ask .ticks li:first-child { border-top: 0; }

/* contract + closing on one timeline: a real sequence */
.stages { list-style: none; margin: 0; padding: 0; }
.chapter > .stages { margin-top: 32px; }
.stages li { position: relative; padding: 0 0 26px 38px; }
.stages li:last-child { padding-bottom: 0; }
.stages li::before { content: ""; position: absolute; left: 0; top: 4px; width: 15px; height: 15px; border-radius: 50%; background: var(--paper); box-shadow: inset 0 0 0 1.5px var(--pine-bright); }
.stages li::after { content: ""; position: absolute; left: 7px; top: 24px; bottom: 4px; width: 1px; background: linear-gradient(180deg, var(--pine-bright), var(--line)); }
.stages li:last-child::after { display: none; }
.stages strong { display: block; font-size: var(--t-h4); font-weight: 500; letter-spacing: -.02em; line-height: 1.25; color: var(--l-text); }
.stages span { display: block; margin-top: 6px; font-size: var(--t-text); line-height: 1.5; color: var(--l-muted); max-width: 56ch; }

/* the fields to check on every Loan Estimate */
.le-fields ul { list-style: none; margin: 12px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.le-fields li { display: inline-flex; align-items: center; min-height: 38px; padding: 0 16px; border-radius: var(--r-pill); background: #fff; box-shadow: inset 0 0 0 1px var(--line); font-size: 14px; color: var(--l-text); }

.chapter-media { margin: 32px 0 0; border-radius: var(--r-panel); overflow: hidden; aspect-ratio: 16 / 8; background: var(--soft); }
.chapter-media img { width: 100%; height: 100%; object-fit: cover; object-position: 55% 45%; }

.chapter-next { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 28px; }
.chapter > .chapter-next { margin-top: 28px; }
.chapter .note { max-width: 62ch; }

/* phone: a slim progress strip stays under the header while the rail scrolls away */
.gb-mini { display: none; }

@media (max-width: 1000px) {
  .gb-layout { grid-template-columns: minmax(0, 1fr); }
  .gb-rail { position: static; padding-bottom: 8px; }
  .gb-steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 24px; }
  .gb-line { display: none; }
  .gb-rail-foot { padding-left: 0; }
  .gb-mini { position: sticky; top: var(--nav-h); z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: calc(var(--section) * -1 + 8px) calc(var(--gutter) * -1) 0; padding: 12px var(--gutter); background: rgba(243, 245, 242, .94); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 1px 0 var(--line); font-size: 14px; font-weight: 500; color: var(--l-text); opacity: 0; transition: opacity .3s; }
  .gb-mini.is-on { opacity: 1; }
  .gb-mini-label { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .gb-mini-track { flex: none; width: 72px; height: 3px; border-radius: 3px; background: var(--line); overflow: hidden; }
  .gb-mini-track i { display: block; height: 100%; background: var(--pine-bright); transform: scaleX(0); transform-origin: 0 50%; }
  .gb-layout { margin-top: calc(var(--section) - 48px); }
}
@media (max-width: 560px) {
  .gb-steps { grid-template-columns: minmax(0, 1fr); }
  .chapter-media { aspect-ratio: 4 / 3; }
}
