/* Heritage homepage: decision guides and a private, single-payment planner. */
.heritage-home #center { padding-bottom: 2rem; }
.heritage-home .home-hero-lead { max-width: 34rem; margin: 1.35rem 0 0; color: #e2eaf5; font: 400 clamp(1rem, 1.7vw, 1.2rem)/1.6 var(--heritage-body); }
.heritage-home .heritage-hero-home { margin-bottom: 0; }
.heritage-home #center .home-content { font: 1rem/1.7 var(--heritage-body); }
.heritage-home #center .home-content :is(h2,h3,p,ul,ol,dl,dt,dd,figure) { float: none; width: auto; padding: 0; margin: 0; border: 0; color: inherit; font-family: inherit; }
.heritage-home #center .home-content p { margin: .7rem 0; }
.heritage-home #center .home-content h2 { max-width: 48rem; font: 750 clamp(1.8rem,3.3vw,2.8rem)/1.13 var(--heritage-display); letter-spacing: -.035em; text-wrap: balance; }
.heritage-home #center .home-content h3 { font: 700 1.12rem/1.35 var(--heritage-display); letter-spacing: -.015em; }
.heritage-home #center .home-content a { font-family: inherit; }
.heritage-home #center .home-content ul { padding-left: 1.25rem; list-style: disc; }
.heritage-home #center .home-content li { padding: .35rem 0; }
.heritage-home .home-section-nav { display: flex; gap: .45rem clamp(.6rem,2.5vw,2rem); flex-wrap: wrap; padding: 1rem 0; border-bottom: 1px solid var(--heritage-line); }
.home-section-nav a { display: flex; align-items: center; min-height: 44px; text-decoration: none; font-size: .9rem; font-weight: 650; }
.home-section-nav a:hover { text-decoration: underline; }
.home-section { margin-top: clamp(2.8rem,6vw,5rem); scroll-margin-top: 1.2rem; }
.home-section-heading { max-width: 48rem; margin-bottom: 1.8rem; }
.heritage-home #center .home-content .home-eyebrow { margin: 0 0 .8rem; color: var(--heritage-red); font-size: .72rem; font-weight: 750; line-height: 1.4; letter-spacing: .13em; text-transform: uppercase; }
.home-task-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 1rem; }
.home-task { display: flex; flex-direction: column; align-items: flex-start; padding: 1.5rem; border: 1px solid var(--heritage-line); border-radius: .8rem; background: #fff; text-decoration: none; transition: border-color .15s ease, background-color .15s ease; }
.home-task:hover { border-color: #94a7c0; background: #edf2f8; }
.home-task-number { margin-bottom: 1.3rem; color: var(--heritage-red); font-size: .8rem; font-weight: 750; }
.heritage-home #center .home-task p { margin-bottom: 1.2rem; color: var(--heritage-muted); font-size: .94rem; }
.home-task .home-text-link { margin-top: auto; }
.home-text-link { display: inline-flex; align-items: center; gap: .55rem; min-height: 44px; font-size: .9rem; font-weight: 700; text-decoration: underline; text-underline-offset: .25em; }
.home-costs { padding: clamp(1.35rem,3.3vw,2.75rem); border: 1px solid var(--heritage-line); border-radius: 1rem; background: #fff; }
.home-terms-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1.35rem; }
.home-terms-grid > div { border-top: 2px solid var(--heritage-red); padding-top: .8rem; }
.heritage-home #center .home-terms-grid dt { margin-bottom: .45rem; font-weight: 750; }
.heritage-home #center .home-terms-grid dd { color: var(--heritage-muted); font-size: .92rem; }
.home-cost-bottom { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 1rem; margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid var(--heritage-line); }
.heritage-home #center .home-cost-bottom p { max-width: 42rem; font-size: .93rem; }
.home-compare { margin-top: 1rem; }
.home-compare > summary { cursor: pointer; padding: .8rem 0; font-size: .95rem; font-weight: 700; }
.home-compare-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.5rem; padding-top: .6rem; }
.heritage-home #center .home-compare p { font-size: .93rem; }
.heritage-home #center .home-process-steps { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 1.5rem; list-style: none; margin-bottom: .4rem; }
.home-process-steps li { border-top: 1px solid #a9b8cc; }
.home-process-steps li > span { display: block; margin: .8rem 0 1rem; color: var(--heritage-red); font-size: .8rem; font-weight: 750; }
.heritage-home #center .home-process-steps p { color: var(--heritage-muted); font-size: .93rem; }
.home-media-row { display: grid; grid-template-columns: minmax(0,.8fr) minmax(0,1.2fr); align-items: center; gap: 2rem; padding: 1.5rem; margin-top: 1.5rem; border-radius: .8rem; background: #eaf0f7; }
.home-media-row .video_frame { width: 100%; height: auto; }
.home-media-row .heritage-home-player { width: 100%; aspect-ratio: 16/9; }
.heritage-home .home-media-row .video_frame > a { font-size: .8rem; padding: .5rem .65rem; }
.home-planner-section { scroll-margin-top: 1rem; }
.planner-layout { display: grid; grid-template-columns: minmax(0,1.2fr) minmax(0,.8fr); border: 1px solid var(--heritage-line); border-radius: 1rem; overflow: hidden; background: white; }
.planner-inputs { padding: clamp(1.25rem,3vw,2.25rem); }
.planner-inputs fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.planner-inputs legend { padding: 0; margin-bottom: 1rem; font-weight: 750; }
.planner-field-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 1.1rem; }
.planner-field-grid label { display: flex; flex-direction: column; gap: .4rem; font: 650 .88rem/1.4 var(--heritage-body); min-width: 0; }
.planner-field-grid input { display: block; width: 100%; min-width: 0; height: 48px; border: 1px solid #8496af; border-radius: .4rem; padding: .65rem .75rem; color: var(--heritage-ink); background: #fff; font: 400 16px/1.3 var(--heritage-body); box-shadow: none; }
.planner-field-grid input:focus-visible { outline: 3px solid var(--heritage-red); outline-offset: 2px; }
.planner-field-grid input[aria-invalid="true"] { border-color: #a0142e; }
.planner-field-grid input::placeholder { color: #53657a; font-size: .84rem; opacity: 1; }
.planner-optional { margin: 1.15rem 0; border-block: 1px solid var(--heritage-line); }
.planner-optional summary { padding: .85rem 0; min-height: 44px; cursor: pointer; font-size: .88rem; font-weight: 650; }
.planner-optional .planner-field-grid { padding: .2rem 0 1rem; }
.heritage-home #center .home-content .planner-note { color: var(--heritage-muted); font-size: .8rem; line-height: 1.6; }
.heritage-home #center .home-content .planner-error { color: #a0142e; font-size: .9rem; font-weight: 650; }
.planner-buttons { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1rem; }
.home-content button { min-height: 44px; padding: .65rem 1rem; border: 1px solid #8496af; border-radius: .4rem; color: var(--heritage-navy); background: #fff; font: 700 .9rem/1.3 var(--heritage-body); cursor: pointer; }
.home-content button:focus-visible, .home-content summary:focus-visible { outline: 3px solid var(--heritage-red); outline-offset: 3px; }
.home-content button.heritage-primary { border-color: var(--heritage-red); color: white; }
.planner-output { display: flex; flex-direction: column; justify-content: center; min-width: 0; padding: clamp(1.5rem,3vw,2.5rem); background: var(--heritage-navy); color: #fff; }
.heritage-home #center .planner-output .home-eyebrow { color: #ffb5c3; }
.heritage-home #center .planner-output .planner-empty-title { margin: 1.3rem 0; font-size: clamp(1.9rem,3vw,2.5rem); font-weight: 650; letter-spacing: -.035em; line-height: 1.15; }
.heritage-home #center .planner-output p { color: #e2eaf5; font-size: .94rem; }
.heritage-home #center .planner-output .planner-total { margin: 0 0 1.2rem; color: white; font-size: clamp(2.6rem,5vw,3.8rem); font-weight: 750; letter-spacing: -.035em; line-height: 1.2; overflow-wrap: anywhere; }
.planner-summary { display: flex; flex-wrap: wrap; gap: 1rem 2rem; padding: 1rem 0 !important; border-block: 1px solid #59708c !important; }
.planner-summary dt { font-size: .8rem; color: #cedbea !important; }
.planner-summary dd { font-size: 1.35rem; font-weight: 700; }
.heritage-home #center .planner-output .planner-result-note { margin-top: 1rem; font-size: .78rem; }
.planner-output button { margin-top: .7rem; background: transparent; border-color: #9db1c9; color: white; }
.home-prepare-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 2rem; }
.heritage-home #center .home-prepare-grid ul { margin-top: .75rem; }
.home-source-note { margin-top: 1.4rem; padding-top: .9rem; border-top: 1px solid var(--heritage-line); color: var(--heritage-muted); font-size: .82rem; }
.home-source-note a { text-decoration: underline; }
.home-about { padding: clamp(1.2rem,3.5vw,2.6rem); border: 1px solid var(--heritage-line); border-radius: 1rem; background: #fff; }
.home-about-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,.8fr); gap: 2rem; align-items: center; }
.home-about .modern-photo-gallery { grid-template-rows: repeat(2,7.7rem); }
.heritage-home #center .home-content .home-small { font-size: .83rem; color: var(--heritage-muted); }
.home-faq > details { border-bottom: 1px solid #cbd5e2; padding: .45rem 0; }
.home-faq > details > summary { min-height: 50px; padding: .75rem .2rem; cursor: pointer; font-weight: 650; }
.heritage-home #center .home-faq > details p { max-width: 52rem; padding: .1rem .2rem .8rem; color: var(--heritage-muted); }
.home-faq a[href]:not([class]) { text-decoration: underline; }
.home-final-action { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 2rem; padding: 1.5rem; border-radius: .8rem; background: #eaf0f7; }
.home-final-action .heritage-actions { margin-top: 0; flex-shrink: 0; }
.home-quick-actions[hidden], .home-content [hidden] { display: none !important; }
.home-quick-actions { display: none; }
@media (max-width: 1000px) {
  .home-terms-grid, .heritage-home #center .home-process-steps { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .home-cost-bottom { grid-template-columns: 1fr; gap: 0; }
  .home-final-action { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 900px) {
  .home-quick-actions { position: fixed; z-index: 20; bottom: 0; left: 0; right: 0; display: grid; grid-template-columns: 1fr 1fr; gap: .65rem; padding: .65rem max(.75rem,env(safe-area-inset-right)) calc(.65rem + env(safe-area-inset-bottom)); border-top: 1px solid #c8d3e1; background: #ffffff; box-shadow: 0 -4px 16px rgb(16 38 64 / .09); }
  .home-quick-actions a { display: flex; justify-content: center; align-items: center; min-height: 46px; padding: .6rem; border: 1px solid #9badc5; border-radius: .4rem; font: 700 .9rem/1.2 var(--heritage-body); text-decoration: none; }
  .home-quick-actions a.heritage-primary { border-color: var(--heritage-red); }
  .home-about-grid, .home-media-row { grid-template-columns: minmax(0,1fr); }
  .home-about .modern-photo-gallery { grid-template-rows: repeat(2,8.8rem); }
}
/* Media leads the page; diagrams support the decision content that follows. */
.home-media-feature { display: grid; grid-template-columns: minmax(0,.32fr) minmax(0,1fr); align-items: center; gap: clamp(1.1rem,3vw,2.5rem); padding: clamp(1.2rem,3vw,2.2rem); border: 1px solid var(--heritage-line); border-radius: 1rem; background: #fff; margin-top: 1.5rem; }
.home-media-caption { max-width: 24rem; }
.home-photos-first .modern-photo-gallery { grid-template-rows: repeat(2,clamp(6.8rem,10.5vw,9.5rem)); }
.home-video-second { background: #eaf0f7; }
.home-video-second .video_frame { width: 100%; height: auto; }
.home-video-second .heritage-home-player { margin-bottom: .7rem; aspect-ratio: 16/9; }
.heritage-home .home-video-second .video_frame > a { font-size: .83rem; padding: .5rem .7rem; }
.home-task-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; width: 100%; margin-bottom: 1.35rem; }
.home-task-top svg { display: block; width: 46px; height: 46px; color: var(--heritage-navy); }
.home-task-top .home-task-number { margin: 0; color: var(--heritage-red); }
.home-cost-illustrated { display: grid; grid-template-columns: minmax(0,1.1fr) minmax(0,1fr); gap: 2rem; align-items: center; }
.heritage-home #center .home-cost-illustrated .home-terms-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
.home-infographic img { display: block; width: 100%; height: auto; }
.home-infographic picture { display: block; }
.home-infographic figcaption { padding-top: .75rem; color: var(--heritage-muted); font-size: .82rem; line-height: 1.6; }
.home-planning-intro { display: grid; grid-template-columns: minmax(0,1fr) minmax(0,.9fr); gap: 2.5rem; align-items: center; margin-bottom: 1.75rem; }
.home-planning-intro .home-section-heading { margin: 0; }
.home-calendar-graphic { max-width: 35rem; justify-self: end; }
.heritage-home #center .home-process-steps { position: relative; gap: 1.75rem; margin-top: 2rem; }
.home-process-steps::before { content: ''; position: absolute; top: 32px; left: 32px; right: 32px; height: 2px; background: #c8d3e1; }
.heritage-home #center .home-process-steps li { position: relative; border: 0; padding: 0; }
.home-step-top { position: relative; display: inline-flex; align-items: center; margin-bottom: 1rem; padding-right: .7rem; background: var(--heritage-paper); }
.home-step-symbol { display: grid; width: 64px; height: 64px; place-items: center; border: 1px solid #aabbd0; border-radius: 50%; background: white; color: var(--heritage-navy); }
.home-step-symbol svg { width: 34px; height: 34px; }
.home-step-number { position: absolute; right: 2px; bottom: -3px; padding: .15rem .3rem; border-radius: .25rem; background: var(--heritage-red); color: white; font-size: .68rem; line-height: 1.3; font-weight: 750; }
.home-contact-visual { padding: 1.6rem; border-radius: .8rem; background: var(--heritage-navy); color: #fff; }
.home-contact-symbol { display: grid; place-items: center; width: 64px; height: 64px; margin-bottom: 1.25rem; border: 1px solid #7b94b1; border-radius: .6rem; color: #fff; }
.home-contact-symbol svg { width: 40px; height: 40px; }
.heritage-home #center .home-contact-visual ul { padding-left: 1.1rem; margin-top: .75rem; color: #e1eaf4; font-size: .95rem; }
.heritage-home #center .home-contact-visual a { color: #fff; }
@media (max-width: 1000px) {
  .home-cost-illustrated { grid-template-columns: minmax(0,1fr); gap: 1.5rem; }
  .home-cost-illustrated .home-infographic { max-width: 38rem; }
  .home-process-steps::before { display: none; }
}
@media (max-width: 900px) {
  .home-media-feature { grid-template-columns: minmax(0,1fr); gap: 1rem; }
  .home-media-caption { max-width: none; }
  .home-media-caption > p:last-child { max-width: 35rem; }
  .home-planning-intro { grid-template-columns: minmax(0,1fr); gap: 1.4rem; }
  .home-calendar-graphic { justify-self: stretch; max-width: 38rem; }
}
@media (max-width: 640px) {
  .home-photos-first .modern-photo-gallery { grid-template-rows: auto; }
  .home-media-feature { padding: 1rem; margin-top: 1rem; }
  .home-task-top { margin-bottom: .9rem; }
  .home-task-top svg { width: 40px; height: 40px; }
  .home-cost-illustrated { gap: 1.5rem; }
  .home-infographic { max-width: 24rem !important; justify-self: center; }
  .home-cost-illustrated .home-terms-grid { gap: 1.2rem; }
  .home-planning-intro { gap: 1rem; }
  .heritage-home #center .home-process-steps { gap: 0; }
  .home-process-steps::before { display: block; top: 30px; bottom: 45px; left: 31px; right: auto; width: 2px; height: auto; }
  .heritage-home #center .home-process-steps li { display: grid; grid-template-columns: 64px minmax(0,1fr); column-gap: 1rem; padding-bottom: 1.5rem; }
  .home-step-top { grid-row: 1 / span 2; padding: 0; margin: 0; align-self: start; }
  .home-step-number { right: -4px; }
  .home-process-steps h3 { grid-column: 2; align-self: center; padding-top: .35rem !important; }
  .home-process-steps p { grid-column: 2; }
}
@media (max-width: 640px) {
  .home-section-nav { display: grid !important; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .15rem .8rem !important; }
  .home-task-grid, .planner-layout, .home-prepare-grid, .home-compare-grid { grid-template-columns: minmax(0,1fr); }
  .home-task { padding: 1.15rem; }
  .home-task-number { margin-bottom: .6rem; }
  .home-section-heading { margin-bottom: 1.3rem; }
  .home-terms-grid { gap: 1.1rem; }
  .home-media-row { gap: 1rem; padding: 1rem; }
  .heritage-home #center .home-process-steps { grid-template-columns: minmax(0,1fr); gap: 1rem; }
  .home-process-steps li > span { margin: .5rem 0 .65rem; }
  .planner-field-grid { grid-template-columns: minmax(0,1fr); }
  .planner-output { min-height: 18rem; }
  .home-about .modern-photo-gallery { grid-template-rows: auto; }
  .home-final-action { padding: 1rem; }
}
@media (prefers-reduced-motion: reduce) { .home-task { transition: none; } }
@media print {
  body * { visibility: hidden; }
  #repayment-planner, #repayment-planner * { visibility: visible; }
  #repayment-planner { position: absolute; left: 0; top: 0; width: 100%; margin: 0; }
  .planner-layout { display: block; }
  #repayment-planner :is(button,.planner-inputs,noscript) { display: none; }
  .planner-output { background: white; color: black; }
  .heritage-home #center .planner-output p, .heritage-home #center .planner-output .home-eyebrow, .planner-summary dt { color: black !important; }
}
