/* ==========================================================================
   HeyABRI V5 · SHARED PROSPERITY PAGE                                sp.css
   ==========================================================================
   Page-specific layer on top of ../styles.css (tokens, type, header, footer,
   tags, buttons) and ../routes.css (the Memory Routes inks and states).
   The page follows the homepage's day: morning intro, afternoon Family
   Access, golden Community Benefit, evening accountability, night close.
   ========================================================================== */

.sp-main { display: block; }

/* Route hosts: each section isolates, so a route layer at z-index -1 sits
   above the section background and below every piece of content. */
.sp-hero, .sp-section { position: relative; isolation: isolate; }

/* Header: a back-to-home control replaces the homepage menu below 960px. */
.sp-home { display: none; }
.sp-back-icon { transform: scaleX(-1); }
.button:hover .sp-back-icon { transform: scaleX(-1) translateX(2px); }

/* Intro ---------------------------------------------------------------- */
.sp-hero {
  padding: clamp(48px, 8vh, 96px) 0 clamp(120px, 16vh, 176px);
  background: var(--morning);
}
.sp-hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(0, .88fr);
  column-gap: clamp(40px, 6vw, 104px);
  align-items: end;
}
.sp-crumb ol { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(32px, 6vh, 56px); color: var(--fg-2); font-size: .9rem; }
.sp-crumb li + li::before { margin-right: 8px; color: var(--fg-3); content: "/"; }
.sp-crumb a { color: var(--link); font-weight: 600; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.sp-title {
  max-width: 11ch;
  font-size: clamp(2.7rem, 1.2rem + 4.8vw, 5.4rem);
  line-height: .98;
  letter-spacing: -.028em;
  text-wrap: balance;
}
.sp-lead { margin-top: 26px; }
.sp-intro { display: grid; gap: 18px; }
.sp-notice {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  margin-top: 30px;
  border-top: 1px solid var(--line-strong);
  padding-top: 22px;
  color: var(--fg);
  font-size: .975rem;
  font-weight: 500;
  line-height: 1.45;
}

/* Program sections ------------------------------------------------------ */
.sp-section { padding: clamp(120px, 16vh, 184px) 0; }
.sp-family { background: var(--afternoon); }
.sp-community { background: var(--golden); }
.sp-account { background: var(--evening); }

.sp-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(40px, 7vw, 112px);
  align-items: start;
}
.sp-flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
.sp-flip .sp-head { order: 2; }
.sp-head h2 { margin-bottom: 26px; }

.sp-card {
  display: grid;
  gap: 18px;
  border-radius: 24px;
  padding: clamp(28px, 3.2vw, 44px);
  background: #FFFDF9;
  box-shadow: 0 1px 2px rgba(30, 23, 19, .08), 0 30px 60px -42px rgba(84, 56, 26, .5);
  --fg: var(--ink);
  --fg-2: var(--ink-2);
  --fg-3: var(--ink-3);
}
.sp-card .body { max-width: none; }
.sp-community .sp-card { background: #FFFBF4; }

.sp-steps-wrap, .sp-split-wrap { display: grid; gap: 10px; margin-top: 6px; }
.sp-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; counter-reset: sp; }
.sp-steps li {
  counter-increment: sp;
  border: 1px dashed rgba(30, 23, 19, .28);   /* dashed: proposed, not built */
  border-radius: 12px;
  padding: 12px 14px 14px;
  color: var(--ink);
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.3;
}
.sp-steps li::before {
  display: block;
  margin-bottom: 6px;
  color: var(--ink-3);
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 400;
  content: counter(sp, decimal-leading-zero);
}

.sp-callout {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border-radius: 14px;
  padding: 16px 18px;
  background: var(--trust-bg);
  color: var(--trust-ink);
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.5;
}
.sp-callout .icon { margin-top: .15em; }

.sp-split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sp-split li { display: grid; gap: 6px; border: 1px solid rgba(30, 23, 19, .16); border-radius: 12px; padding: 12px 14px 14px; }
.sp-split-k { color: var(--ink-3); font-family: var(--font-mono); font-size: .72rem; }
.sp-split strong { color: var(--ink); font-size: .95rem; line-height: 1.3; }

/* Accountability -------------------------------------------------------- */
.sp-account-head { margin-bottom: clamp(56px, 9vh, 96px); }
.sp-account-head h2 { max-width: 15ch; }
.sp-pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--line-strong); }
.sp-pillar { padding: 26px 32px 6px 0; }
.sp-pillar + .sp-pillar { border-left: 1px solid var(--line-strong); padding-left: 32px; }
.sp-pillar-k { color: var(--lamp); font-family: var(--font-mono); font-size: .78rem; }
.sp-pillar h3 { margin: 14px 0 10px; color: var(--fg); }
.sp-pillar p { color: var(--fg-2); font-size: 1rem; line-height: 1.6; }

/* Closing note ---------------------------------------------------------- */
.sp-close { padding: clamp(64px, 9vh, 104px) 0; background: var(--night); border-top: 1px solid var(--line); }
.sp-close-inner { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 32px 64px; align-items: center; }
.sp-fine { max-width: 66ch; color: var(--ink-e2); font-size: .95rem; line-height: 1.65; }
.sp-close-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 24px; }

.footer-grid a[aria-current="page"] { color: var(--ink-e); }
/* Top navigation: this page is the current one (same mark as the homepage's active section link). */
.desktop-nav a[aria-current="page"] { opacity: 1; }
.desktop-nav a[aria-current="page"]::after { transform: scaleX(1); }
@media (forced-colors: active) { .desktop-nav a[aria-current="page"]::after { background: LinkText; forced-color-adjust: none; } }

/* Responsive ------------------------------------------------------------ */
@media (max-width: 1179px) {
  .sp-steps { grid-template-columns: 1fr; }
  .sp-steps li { display: flex; align-items: baseline; gap: 12px; padding: 10px 14px; }
  .sp-steps li::before { margin: 0; }
}
@media (max-width: 959px) {
  .sp-home { display: inline-flex; }
  .sp-hero-inner, .sp-grid, .sp-flip { grid-template-columns: 1fr; }
  .sp-flip .sp-head { order: 0; }
  .sp-hero-side { margin-top: 40px; max-width: 620px; }
  .sp-grid { gap: 40px; }
  .sp-card { max-width: 680px; }
  .sp-pillars { grid-template-columns: 1fr; border-top: 0; }
  .sp-pillar, .sp-pillar + .sp-pillar { border-left: 0; border-top: 1px solid var(--line-strong); padding: 24px 0 28px; }
  .sp-close-inner { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .sp-hero { padding-top: 28px; }
  .sp-title { font-size: clamp(2.5rem, 11vw, 3.3rem); }
  .sp-section { padding: 104px 0; }
  .sp-card { border-radius: 20px; padding: 24px 20px; }
  .sp-split { grid-template-columns: 1fr; }
  .sp-close-actions .button { flex: 1 1 100%; }
}

@media (forced-colors: active) {
  .sp-card, .sp-callout, .sp-steps li, .sp-split li { border: 1px solid CanvasText; }
}
@media print {
  .site-header, .sp-close-actions { display: none; }
}
