/* v29.24.1 design review (Marketing Dec 2; Marcus 9:34 / 9:35 AM). Square corners, navy/gold, Plex. */

/* 1. Remove ridge/mountain line art from every page hero. Flat cream, thin light rule already on .page-hero. */
.page-hero::before,
.page-hero::after {
  content: none !important;
  background: none !important;
  -webkit-mask-image: none !important;
  mask-image: none !important;
  display: none !important;
}

/* Gold heading underline removed sitewide (Marcus 9:35). Spacing instead.
   Don't stack on a section that already has top padding, or on a heading that follows another heading. */
.guide-section h2::after,
.section-head h2::after,
.xp-app .calc-panel h2::after,
[data-calc="rent"] .rvb-block h2::after,
[data-calc="rent"] .rvb-results-title::after {
  content: none !important;
  display: none !important;
  background: none !important;
  width: 0 !important;
  height: 0 !important;
}
.guide-section h2 { padding-bottom: 0; margin-top: 0; margin-bottom: 16px; }
.section-head h2 { padding-bottom: 0; }
.guide-section { margin-top: 0; padding-top: 56px; }
.guide-section:first-of-type { padding-top: 0; border-top: 0; margin-top: 0; }
.guide-section h2 + h3 { margin-top: 1.15em; }
.section-head { margin-top: 0; }
.block > .wrap > .section-head:first-child { margin-top: 0; padding-top: 0; }
@media (min-width: 821px) {
  .guide-section { padding-top: 72px; }
  .guide-section:first-of-type { padding-top: 0; }
  /* Headings that are not the first child of a padded section */
  .block .section-head:not(:first-child) { margin-top: 72px; }
}
@media (max-width: 820px) {
  .block .section-head:not(:first-child) { margin-top: 56px; }
}

/* 2+3. In-page jump strip: wrap, no sideways scroll, no grey band or heavy navy rule,
   thin light divider, spacing from callouts, gold underline on the active item.
   Not sticky on a phone (a wrapped bar would cover headings). */
.guide-toc,
.guide-toc.page-map {
  background: transparent !important;
  border: 0 !important;
  border-top: 1px solid var(--line, #d9d1c3) !important;
  border-bottom: 1px solid var(--line, #d9d1c3) !important;
  margin: 1.5rem 0 2rem !important;
  padding: 14px 0 !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  box-shadow: none !important;
}
.guide-toc.page-map { position: static !important; top: auto !important; z-index: auto; }
@media (min-width: 821px) {
  .guide-toc.page-map { position: sticky !important; top: 0; z-index: 15; background: #fff !important; }
}
.guide-toc.page-map h2,
.guide-toc h2 {
  position: static !important;
  width: auto !important;
  height: auto !important;
  overflow: visible !important;
  clip: auto !important;
  clip-path: none !important;
  font-family: var(--sans, "IBM Plex Sans", system-ui, sans-serif);
  font-size: 0.85rem !important;
  font-weight: 600;
  letter-spacing: 0.02em;
  margin: 0 0 0.5rem !important;
  color: var(--navy, #14202E);
}
.guide-toc.page-map ol {
  display: flex;
  flex-wrap: wrap !important;
  gap: 4px 18px;
  list-style: none;
  margin: 0;
  padding: 0;
  overflow: visible !important;
  overflow-x: visible !important;
  columns: auto;
}
.guide-toc.page-map li { margin: 0; flex: 0 1 auto; padding: 0; }
.guide-toc.page-map a {
  display: inline-flex !important;
  align-items: center;
  white-space: normal !important;
  max-width: 100%;
  padding: 6px 0;
  min-height: 44px;
  border: 0 !important;
  border-radius: 0;
  background: transparent !important;
  color: var(--navy, #14202E);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: none;
}
.guide-toc.page-map a:hover {
  color: var(--navy, #14202E);
  background: transparent !important;
  text-decoration: underline;
}
.guide-toc.page-map a[aria-current="true"] {
  background: transparent !important;
  color: var(--navy, #14202E);
  box-shadow: inset 0 -3px 0 var(--gold, #C4A35A);
}
.guide-toc.page-map a:focus-visible {
  outline: 3px solid var(--gold, #C4A35A);
  outline-offset: 3px;
  background: #fff !important;
  color: var(--navy, #14202E);
}
@media (min-width: 821px) {
  .guide-section[id],
  .guide-body [id],
  section[id],
  h2[id],
  h3[id] { scroll-margin-top: 6.5rem; }
}
@media (max-width: 820px) {
  .guide-section[id],
  .guide-body [id],
  section[id],
  h2[id],
  h3[id] { scroll-margin-top: 1.25rem; }
}

/* 4. Pin the slim bar to the screen width; never 100vw. */
.mobile-bar {
  left: 0 !important;
  right: 0 !important;
  width: auto !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}

/* 5+17. Tables: swipe cue, right fade, freeze first column, tighter headers; fee tables as labeled cards on phones. */
.guide-table-wrap,
.gx-table-wrap {
  position: relative;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}
.guide-table-wrap::after,
.gx-table-wrap::after {
  content: "";
  position: sticky;
  right: 0;
  top: 0;
  display: block;
  width: 28px;
  margin: 0 0 -100%;
  height: 100%;
  float: right;
  pointer-events: none;
  background: linear-gradient(to right, transparent, rgba(248, 244, 236, 0.9));
}
.guide-table-wrap::before,
.gx-table-wrap::before {
  display: none;
  content: none;
}
@media (max-width: 820px) {
  .guide-table-wrap::before,
  .gx-table-wrap::before {
    content: "Swipe to see more";
    display: block;
    margin: 0 0 6px;
    font-size: 13px;
    color: var(--slate, #4B5565);
  }
  #aari-terms .guide-table-wrap::before { content: none; display: none; }
  .guide-table thead th,
  .guide-table th,
  .guide-table td { padding: 8px 10px; }
  .guide-table tbody th[scope="row"] {
    position: sticky;
    left: 0;
    z-index: 1;
    background: var(--grey, #F4F6F9);
    box-shadow: 1px 0 0 var(--line, #d9d1c3);
    min-width: 7.5em;
  }
  /* Fee glance table: stack as labeled cards */
  #aari-terms .guide-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }
  #aari-terms .guide-table,
  #aari-terms .guide-table tbody,
  #aari-terms .guide-table tr,
  #aari-terms .guide-table th,
  #aari-terms .guide-table td { display: block; width: 100%; box-sizing: border-box; }
  #aari-terms .guide-table tr { margin: 0 0 12px; border: 1px solid var(--line, #d9d1c3); background: #fff; }
  #aari-terms .guide-table tbody th[scope="row"] {
    position: static;
    background: var(--navy, #14202E);
    color: #fff;
    box-shadow: none;
  }
  #aari-terms .guide-table td { border: 0; border-top: 1px solid var(--line, #d9d1c3); }
  #aari-terms .guide-table td::before {
    content: attr(data-label);
    display: block;
    font-weight: 600;
    color: var(--navy, #14202E);
    margin-bottom: 2px;
  }
}

/* 6. Key-dates chart: swipe cue and fade. */
.nc-chart-wrap,
.nc-key-dates-graphic,
.nc-kd {
  position: relative;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  max-width: 100%;
}
.nc-chart-wrap::before {
  display: none;
  content: none;
}
@media (max-width: 820px) {
  .nc-chart-wrap::before {
    content: "Swipe to see 2027 to 2031";
    display: block;
    margin: 0 0 8px;
    font-size: 13px;
    color: var(--slate, #4B5565);
  }
  .nc-chart-wrap::after {
    content: "";
    position: sticky;
    right: 0; top: 0;
    display: block;
    width: 36px;
    height: 100%;
    margin: 0 0 -100%;
    float: right;
    pointer-events: none;
    background: linear-gradient(to right, transparent, rgba(248,244,236,.95));
  }
}

/* 7. Round bullets instead of gold dashes; 1px full-width light rules. */
.checklist { list-style: disc; padding-left: 1.2em; }
.checklist li { padding-left: 0; }
.checklist li::before { content: none !important; width: 0 !important; height: 0 !important; background: none !important; }
.av-reach { border-top: 1px solid var(--line, #d9d1c3); padding-top: 12px; width: 100%; }

/* 8. Align hero text with the reading column on guide/fees pages. */
@media (min-width: 821px) {
  .page-hero .wrap { max-width: 844px; }
}

/* 9. Callouts: cream + gold left, navy next-step, white card. */
.disclaimer, .rc-note {
  background: #fff;
  border: 1px solid var(--line, #d9d1c3);
  border-left: 4px solid var(--navy, #14202E);
  border-radius: 0;
}
.note-box, .callout, .nc-register {
  background: var(--sand, #F7F0DE);
  border-left: 4px solid var(--gold, #C4A35A);
  border-radius: 0;
}

/* 10. Money figures and our comparison bar in navy/gold; teal stays on links. */
.fee-cmp-bar-us i { background: var(--navy, #14202E) !important; }
.calc input[type="range"]::-webkit-slider-runnable-track {
  background: linear-gradient(to right, var(--navy, #14202E) var(--fill), #dfe4ec var(--fill));
}
.calc input[type="range"]::-moz-range-progress { background: var(--navy, #14202E); }
.nc-chart-today, .nc-bar--today, .nc-chart-now { background: var(--gold, #C4A35A) !important; }

/* 12. Footer: 16px text, 44px tap targets, one left edge. */
footer.site-footer { font-size: 16px; padding-bottom: 20px; }
footer.site-footer .footer-inner { max-width: 844px; }
footer.site-footer .links a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font-size: 16px;
  padding: 0 4px;
}

/* 13. Home: top-align cards, full-width calculator, space under area cards, darker photo credit. */
.cards.ag-grid, .cards { align-items: start; }
.keep-calc .calc, #what-you-keep .calc, .keep-calc { max-width: none; width: 100%; }
.areas, .areas-regions { margin-bottom: 24px; }
.hero-photo-credit, p.hero-photo-credit {
  color: #fff !important;
  text-shadow: 0 1px 2px rgba(0,0,0,.8);
  font-weight: 600;
  background: rgba(11, 37, 69, .45);
  padding: 2px 8px;
}

/* 16. No-photo text cards (cream, thin border, square corners). */
a.nc-dir-row--textcard,
.nc-dir-row--textcard {
  display: block;
  background: var(--sand, #F7F0DE);
  border: 1px solid var(--line, #D5DBE3);
  border-radius: 0;
  padding: 14px 16px;
  margin: 8px 0;
  min-height: 72px;
  box-sizing: border-box;
  text-decoration: none;
  color: inherit;
}
.nc-dir-row--textcard .nc-dir-name {
  display: block;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--navy, #0B2545);
  margin: 0 0 4px;
}
.nc-dir-row--textcard .nc-dir-meta,
.nc-dir-row--textcard .nc-dir-type,
.nc-dir-row--textcard .nc-dir-area,
.nc-dir-row--textcard .nc-dir-price,
.nc-dir-row--textcard .nc-dir-dates {
  display: block;
  font-size: 0.92rem;
  line-height: 1.4;
  color: var(--slate, #475467);
  margin: 0 0 2px;
}
.nc-dir-row--textcard .nc-dir-price { font-weight: 600; color: var(--navy, #0B2545); }
.nc-dir-row--textcard .nc-dir-more {
  display: inline-block;
  margin-top: 8px;
  font-weight: 600;
  color: var(--navy, #0B2545);
  text-decoration: underline;
}
.nc-dir-row--textcard:focus-visible {
  outline: 3px solid var(--gold, #C9A24A);
  outline-offset: 3px;
}
.nc-dir-ph { display: none !important; }

/* Contain page-level horizontal scroll on phones; inner wraps still swipe. */
html, body { overflow-x: hidden; max-width: 100%; }
main, .wrap, .guide-body { max-width: 100%; min-width: 0; }
.photo-credit, .gx-sources, .gx-sources a, .sources, .sources a, figcaption {
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
}
.guide-table-wrap,
.gx-table-wrap,
.nc-chart-wrap {
  overflow-x: auto !important;
  max-width: 100% !important;
  width: 100%;
  min-width: 0;
  display: block;
  box-sizing: border-box;
}
