/* #region Core variables & resets
   =========================== */

:root {
  /* Palette 60/30/10 */
  --color-soft-ice: #edf6f9;     /* 60% - main background */
  --color-seafoam:   #83c5be;    /* 30% - sections & cards */
  --color-deep-teal: #006d77;    /* 10% - accents / CTAs */

  --color-bg: var(--color-soft-ice);
  --color-surface: #ffffff;
  --color-text: #102a43;
  --color-text-muted: #5a5f5c;
  --color-border: #c7d6dd;

  --radius-lg: 20px;
  --radius-md: 12px;

  --shadow-soft: 0 8px 22px rgba(15, 23, 42, 0.08);
  --transition-fast: 0.18s ease-out;

  --header-height: 68px;
  --header-offset: 88px;

  --tool-max-width: 1200px;
  --edge-padding: clamp(0.75rem, 4vw, 1.25rem);
}

@media (max-width: 768px) {
  :root {
    --header-height: 64px;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  overflow-y: scroll;
}

html,
body {
  width: 100%;
  overflow-x: hidden;
}

main {
  padding-top: var(--header-height);
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: linear-gradient(
    180deg,
    var(--color-soft-ice) 0%,
    #ffffff 45%,
    #ffffff 100%
  );
  color: var(--color-text);
  line-height: 1.5;
}

/* Layout utility */
.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: 1.25rem;
}

/* Make images responsive by default */
img {
  max-width: 100%;
  height: auto;
  display: block;
}

/* Stop iOS from zooming when focusing form fields */
@media (max-width: 768px) {
  input,
  select,
  textarea {
    font-size: 16px;
  }
}

/* #endregion */

/* ---------------------------------------------------------
   INNER LAYOUT
--------------------------------------------------------- */

.site-header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 1000;

  height: 72px;

  background: rgba(0, 109, 119, 0.35);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid rgba(0, 109, 119, 0.35);

  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    box-shadow 0.3s ease;
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;

  height: 100%;
  padding: 0 1.1rem;

  max-width: 1280px;
  margin: 0 auto;
  position: relative;
}

/* --- Logo container --- */
.logo {
  display: flex;
  align-items: center;
}

/* --- Actual logo image --- */
.nav-logo {
  height: 44px;   /* adjust to 44–48px */
  width: auto;
  display: block;
  border: none;
  background: transparent;
  box-shadow: none;
}

/* Optional: subtle polish */
.nav-logo {
  filter:
    drop-shadow(0 1px 1px rgba(0, 0, 0, 0.18))
    drop-shadow(0 -1px 0 rgba(255, 255, 255, 0.25));
}

/* Accessibility cleanup */
.logo a {
  outline: none;
}

/* =========================================================
   HERO — SINGLE SOURCE OF TRUTH
   ========================================================= */

.hero {
  /* padding: 4.75rem 0 4.5rem; */
  background:
    radial-gradient(
      ellipse at 65% 55%,
      rgba(0, 109, 119, 0.16),
      rgba(0, 109, 119, 0.04) 65%,
      transparent 90%
    );
  position: relative;
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  align-items: center;
  gap: 3.5rem;
  padding-block: 3.5rem;
}

.hero-text {
  max-width: 640px;
}

.hero-text h1 {
  font-size: clamp(2.4rem, 3vw + 1.6rem, 3.3rem);
  line-height: 1.1;
  margin-bottom: 1rem;
  color: #0b2538;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 1.4rem;
  margin-bottom: 1.1rem;
}

.hero-trust-points {
  display: flex;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.hero-trust-points li {
  position: relative;
  padding-left: 1.1rem;
}

.hero-trust-points li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 999px;
  background: var(--color-seafoam);
}

.hero-visual {
  display: flex;
  justify-content: flex-end;
  position: relative;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: -10%;
  background: radial-gradient(
    circle at top,
    rgba(131, 197, 190, 0.45),
    transparent 60%
  );
  z-index: -1;
}

@media (max-width: 900px) {
  .hero {
    padding: 3.25rem 0 3rem;
  }

  .hero-inner {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }

  .hero-text {
    order: 1;
    text-align: center;
    margin-inline: auto;
  }

  .hero-visual {
    order: 2;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  .hero {
    padding-top: 2.25rem;
    padding-bottom: 2rem;
  }

  .hero-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.4rem;
    padding-block: 0;
  }

  .hero-text {
    max-width: 22rem;
  }

  .hero-text h1 {
    font-size: 1.75rem;
    line-height: 1.15;
    margin-bottom: 0.5rem;
  }

  .hero-actions {
    width: 100%;
    flex-direction: column;
    gap: 0.6rem;
    margin-bottom: 1rem;
  }

  .hero-actions .btn {
    width: 100%;
    text-align: center;
    padding: 0.85rem 0;
    font-weight: 600;
  }
}

@media (max-width: 640px) {
  .hero {
    padding-top: 2rem;
    padding-bottom: 2.75rem;
  }

  .hero-inner {
    gap: 1.75rem;
  }

  .hero-actions {
    gap: 0.75rem;
  }
}

/*------End Hero Region -----*/

.hero-illustration-frame {
  position: relative;
  border-radius: 28px;
  padding: 0.55rem;
  background: linear-gradient(135deg, #d7f1ee, #ffffff);
  box-shadow: 0 26px 55px rgba(15, 23, 42, 0.18);
  transition: transform 0.35s ease, box-shadow 0.35s ease;
  will-change: transform, box-shadow;
}

.hero-illustration-frame:hover {
  transform: translateY(-4px);
  box-shadow: 0 32px 70px rgba(15, 23, 42, 0.22);
}

.hero-illustration-frame picture,
.hero-illustration-frame img {
  border-radius: 22px;
  overflow: hidden;
}

/* #end snapshot region

/* =========================================
   PLAN SUMMARY CARD — SINGLE SOURCE OF TRUTH
   ========================================= */

.plan-summary-card {
  position: relative;
  overflow: hidden;

  background: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 1.7rem 1.9rem;

  border: 1px solid rgba(15, 23, 42, 0.05);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.06);

  transition: box-shadow 220ms ease, transform 220ms ease;
}

/* Premium gradient accent bar — calmer */
.plan-summary-card::before {
  content: "";
  position: absolute;
  inset: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(
    90deg,
    rgba(0, 109, 119, 0.45),
    rgba(131, 197, 190, 0.45)
  );
}

/* Gentle hover — confidence, not flash */
.plan-summary-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

/* Mobile */
@media (max-width: 900px) {
  .plan-summary-card {
    padding: 1.5rem 1.6rem;
  }
}

.plan-summary-card {
  will-change: transform, box-shadow;
}

@media (prefers-reduced-motion: reduce) {
  .plan-summary-card,
  .plan-summary-card:hover {
    transform: none;
    transition: none;
  }
}

.plan-outcome {
  margin: 1rem 0 1.25rem;
  padding: 0.85rem 1rem;

  background: var(--color-soft-ice, #f6fbfc);
  border-radius: var(--radius-md);

  font-size: 0.95rem;
  font-weight: 500;
  line-height: 1.45;

  color: var(--color-text-primary);
}

.plan-outcome.outcome-positive {
  background: rgba(131, 197, 190, 0.12);
}

.plan-outcome.outcome-neutral {
  background: rgba(148, 163, 184, 0.12);
}

.plan-outcome.outcome-negative {
  background: rgba(239, 68, 68, 0.08);
}

.plan-summary-card--resp::before {
  background: linear-gradient(
    90deg,
    rgba(0, 109, 119, 0.28),
    rgba(131, 197, 190, 0.70)
  );
}

/* Header */

.plan-summary-header {
  margin-bottom: 0.6rem;
}

.plan-tagline {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

/* ==============================
   MOBILE REFINEMENTS
   Mortgage vs RRSP vs TFSA
   ============================== */

@media (max-width: 768px) {

  /* Overall spacing */
  .plan-summary-card {
    padding: 1.25rem;
  }

  /* Outcome callout */
  .plan-outcome {
    font-size: 0.95rem;
    line-height: 1.45;
    padding: 0.9rem 1rem;
    border-radius: 12px;
  }

  .plan-tagline {
    font-size: 0.85rem;
    margin-top: 0.5rem;
  }

  /* ----- Option snapshots ----- */

  .plan-metric-row {
    display: block;
    padding: 0.9rem 0;
  }

  .plan-metric-label {
    display: flex;
    gap: 0.6rem;
    align-items: flex-start;
    font-size: 0.9rem;
  }

  .plan-metric-icon {
    font-size: 1.15rem;
    margin-top: 0.1rem;
    flex-shrink: 0;
  }

  .results-note-small {
    font-size: 0.75rem;
    line-height: 1.4;
    margin-top: 0.25rem;
  }

  .plan-metric-value {
    margin-top: 0.5rem;
    font-size: 1.35rem;
    font-weight: 600;
    text-align: left;
  }

  /* ----- Overall comparison ----- */

  .results-summary {
    padding: 0.75rem 0;
  }

  .results-row {
    display: block;
    padding: 0.65rem 0;
  }

  .results-row span {
    display: block;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
  }

  .results-row strong {
    display: block;
    font-size: 1.25rem;
  }

  /* ----- Insight card ----- */

  .plan-insight-card {
    font-size: 0.9rem;
    line-height: 1.45;
    padding: 0.9rem 1rem;
    border-radius: 12px;
  }

  .plan-footnote {
    font-size: 0.75rem;
    line-height: 1.5;
  }
}

/* ==============================
   SYMMETRIC MOBILE RESULTS GRID
   ============================== */

@media (max-width: 768px) {

  /* ---- OPTION SNAPSHOTS ---- */

  .plan-metric-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 1rem;

    padding: 0.85rem 0;
    border-bottom: 1px dashed rgba(0,0,0,0.08);
  }

  .plan-metric-label {
    display: grid;
    grid-template-columns: 1.25rem 1fr;
    column-gap: 0.6rem;
    align-items: start;

    font-size: 0.9rem;
    line-height: 1.35;
  }

  .plan-metric-icon {
    font-size: 1.1rem;
    line-height: 1;
    margin-top: 0.15rem;
  }

  .results-note-small {
    display: block;
    font-size: 0.75rem;
    opacity: 0.75;
    margin-top: 0.15rem;
  }

  .plan-metric-value {
    font-size: 1.3rem;
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
  }

  /* ---- OVERALL COMPARISON ---- */

  .results-summary {
    padding: 0.5rem 0;
  }

  .results-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 1rem;

    padding: 0.7rem 0;
  }

  .results-row span {
    font-size: 0.85rem;
    line-height: 1.35;
  }

  .results-row strong {
    font-size: 1.25rem;
    font-weight: 600;
    text-align: right;
    white-space: nowrap;
  }

  /* ---- REMOVE VISUAL NO*

  @media (max-width: 768px) {

  /* Shared numeric column width */
  :root {
    --value-col-width: 8ch;
  }

  /* Option snapshots */
  .plan-metric-row {
    display: grid;
    grid-template-columns: 1fr var(--value-col-width);
    align-items: center;
    gap: 1rem;
  }

  .plan-metric-value {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    white-space: nowrap;
  }

  /* Overall comparison */
  .results-row {
    display: grid;
    grid-template-columns: 1fr var(--value-col-width);
    align-items: center;
    gap: 1rem;
  }

  .results-row strong {
    text-align: right;
    font-variant-numeric: tabular-nums;
    font-feature-settings: "tnum";
    white-space: nowrap;
  }
}

:root {
  --money-column-width: 8ch;
}

.money-value {
  width: var(--money-column-width);
  text-align: right;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* Monetary values – fixed-width numerals */
.plan-metric-value,
.results-row strong {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* Groups */

.plan-group {
  padding: 0.7rem 0;
  border-bottom: 1px dashed var(--color-border);
}

.plan-group:first-of-type {
  padding-top: 0.4rem;
}

.plan-group--no-border {
  border-bottom: none;
}

/* Group title */

.plan-group-title {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--color-deep-teal);
  margin: 0 0 0.4rem;
  letter-spacing: 0.01em;
}

/* Metric rows */

.plan-metric-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-top: 0.35rem;
}

.plan-metric-label {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--color-text);
}

.plan-metric-icon {
  font-size: 1rem;
}

.plan-metric-value {
  font-size: 1rem;
  font-weight: 600;
  white-space: nowrap;
}

.plan-metric-value--highlight {
  font-size: 1.05rem;
}

/* Inline detail lists */

.plan-detail-list {
  list-style: none;
  padding: 0.35rem 0 0;
  margin: 0;
}

.plan-detail-list li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.3rem 0;
  font-size: 0.88rem;
}

.plan-detail-list span {
  color: var(--color-text-muted);
}

.plan-detail-list strong {
  font-weight: 600;
}

/* Insight / callout block */

.plan-insight-card {
  margin-top: 1.1rem;
  padding: 0.9rem 1rem;

  border-radius: var(--radius-md);
  background: rgba(131, 197, 190, 0.09);

  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--color-text);
}

/* Footnote */

.plan-footnote {
  margin-top: 0.45rem;
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

/* #region Your Plan page
   =========================== */

.plan-submit-btn {
  margin-top: 1.4rem;
}

.plan-footnote {
  margin-top: 1.0rem;
  font-size: 0.78rem;
  color: var(--color-text-muted);
}

.plan-group + .plan-group {
  margin-top: 1.25rem;
}

/* #end Region Plan Summary Card

/* =========================================================
   PRIMARY NAV — FINFORFAM (CLEAN & STABLE)
========================================================= */

/* -------------------------
   BASE (ALL VIEWPORTS)
-------------------------- */

.nav {
  display: flex;
  gap: 0.25rem;
}

.nav,
.nav ul,
.nav li {
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-item {
  position: relative;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 0.5rem 1rem;
  border-radius: 999px;

  font-size: 0.95rem;
  text-decoration: none;
  color: #e0f2f4;

  transition:
    background-color 0.2s ease,
    color 0.2s ease,
    transform 0.2s ease;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.25);
  color: #003f48;
  transform: translateY(-1px);
}

.nav-link.active {
  background: rgba(255, 255, 255, 0.35);
  color: #003f48;
  font-weight: 600;
}

/* Dropdown panels start closed everywhere */
.nav-submenu {
  display: none;
  flex-direction: column;
}

/* Submenu typography */
.nav-subtitle {
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(224, 242, 244, 0.55);
  margin: 0.25rem 0 0.6rem;
}

/* Sub-links */
.nav-sub-link {
  display: block;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;

  font-size: 0.85rem;
  line-height: 1.35;
  color: #ffffff;
  text-decoration: none;

  transition: background-color 0.2s ease, transform 0.2s ease;
}

.nav-sub-link:hover {
  background: rgba(255, 255, 255, 0.08);
  transform: translateX(2px);
}

/* Divider before View All */
.nav-sub-link--view-all {
  margin-top: 0.85rem;
  padding-top: 0.75rem;
  border-top: 1px solid rgba(255, 255, 255, 0.25);
  font-weight: 600;
}

/* Tools accordion groups */
.nav-subgroup {
  display: flex;
  flex-direction: column;
}

.nav-subgroup-toggle {
  background: none;
  border: none;
  color: #e0f2f4;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.55rem 0.4rem;
  cursor: pointer;

  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-subgroup-toggle::after {
  content: "▸";
  font-size: 0.7rem;
  transition: transform 0.2s ease;
  opacity: 0.85;
}

/* Your JS sets aria-expanded on .nav-subgroup */
.nav-subgroup[aria-expanded="true"] .nav-subgroup-toggle::after {
  transform: rotate(90deg);
}

.nav-subgroup-panel {
  display: none;
  flex-direction: column;
  gap: 0.45rem;
  padding-top: 0.35rem;
  padding-left: 0.4rem;
}

.nav-subgroup[aria-expanded="true"] .nav-subgroup-panel {
  display: flex;
}

.nav-subgroup[aria-expanded="true"] > .nav-subgroup-toggle {
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

/* -------------------------
   DESKTOP (>= 769px)
-------------------------- */

@media (min-width: 769px) {
  /* Hamburger off */
  .nav-toggle {
    display: none !important;
  }

  /* Hover opens dropdown */
  .nav-item.has-submenu:hover .nav-submenu {
    display: flex;
  }

  /* Dropdown panel styling */
  .nav-submenu {
    position: absolute;
    left: 0;
    top: calc(100% + 1px);
    z-index: 60;

    min-width: 280px;
    max-width: 460px;

    padding: 0.9rem 1.1rem;
    background: #006d77;
    border-radius: 16px;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.22);
  }
}

/* Slightly wider dropdown on large screens (matches your intent) */
@media (min-width: 1024px) {
  .nav-submenu {
    width: 460px;
  }
}

/* -------------------------
   MOBILE (<= 768px)
-------------------------- */

@media (max-width: 768px) {
  /* Hamburger */
  .nav-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

    width: 40px;
    height: 40px;
    border-radius: 50%;

    border: 2px solid rgba(224, 242, 244, 0.9);
    background: none;
    cursor: pointer;

    gap: 5px;
  }

  .nav-toggle span {
    width: 20px;
    height: 2px;
    background: #e0f2f4;
    border-radius: 2px;
    display: block;
    transition: transform 0.25s ease, opacity 0.25s ease;
  }

  /* Hamburger -> X when header has nav-open (your JS toggles this on .site-header) */
  .site-header.nav-open .nav-toggle span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  .site-header.nav-open .nav-toggle span:nth-child(2) {
    opacity: 0;
  }
  .site-header.nav-open .nav-toggle span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  /* Mobile panel */
  .nav {
    position: absolute;
    inset: 100% 0 auto;

    display: flex;
    flex-direction: column;
    gap: 1rem;

    padding: 1.25rem;
    background: rgba(0, 109, 119, 0.97);

    max-height: 0;
    opacity: 0;
    pointer-events: none;
    overflow: hidden;
    transform: translateY(-6px);

    transition:
      max-height 0.35s ease,
      opacity 0.35s ease,
      transform 0.35s ease;
  }

  /* Open state (your JS toggles .nav-open on .site-header) */
  .site-header.nav-open .nav {
    max-height: calc(100vh - var(--header-height));
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);

    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Make links full-width for tap comfort */
  .nav-link {
    width: 100%;
  }

  .nav-item {
    width: 100%;
  }

  /* Mobile dropdown panels are inline sections */
  .nav-submenu {
    position: static;
    margin-top: 0.4rem;

    padding: 0.6rem 0.75rem 0.75rem;
    border-radius: 0 0 18px 18px;

    background: rgba(0, 109, 119, 0.25);
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.25);
  }

  /* Your JS toggles .open on .nav-item.has-submenu */
  .nav-item.has-submenu.open .nav-submenu {
    display: flex;
  }
}

/* -------------------------
   GLOBAL STATE HOOKS (JS)
-------------------------- */

/* Lock page scroll when mobile nav is open (your JS toggles this on <body>) */
body.nav-lock {
  overflow: hidden;
  touch-action: none;
}

/* Header becomes full-screen overlay so taps/scroll stay inside nav area */
.site-header.nav-open {
  position: fixed;
  inset: 0;
  z-index: 1000;
}

/* HARD scroll lock */
html.nav-lock,
body.nav-lock {
  overflow: hidden;
  height: 100%;
}

/* Prevent scroll chaining to page */
.site-header {
  overscroll-behavior: contain;
}

.site-header.nav-open .nav {
  overscroll-behavior: contain;
}


/* #region Buttons
   =========================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.4rem;
  font-size: 0.95rem;
  border-radius: 999px;
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition:
    transform var(--transition-fast),
    box-shadow var(--transition-fast),
    background-color var(--transition-fast),
    color var(--transition-fast),
    border-color var(--transition-fast);
}

.btn-primary {
  background: linear-gradient(
    135deg,
    var(--color-deep-teal),
    var(--color-seafoam)
  );
  color: #fdfefe;
  border-color: var(--color-deep-teal);
  box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 26px rgba(15, 23, 42, 0.15);
}

.btn-secondary {
  background-color: transparent;
  color: var(--color-deep-teal);
  border-color: rgba(0, 109, 119, 0.4);
}

.btn-secondary:hover {
  background-color: rgba(237, 246, 249, 0.9);
  color: #063440;
}

/* #endregion */

/* #region Generic sections, grids & cards
   =========================== */

.section {
  padding: 3.0rem 0;
}

/* FORCE tool grids to respect container centering */
.section .budget-layout {
  max-width: 100%;
  margin-left: auto;
  margin-right: auto;
}

.section-tools {
  padding: 3.0rem 0;
  background-color: rgba(131, 197, 190, 0.12);
}
.section-header {
  margin-bottom: 1.75rem;
}

.section-header h2 {
  font-size: 1.5rem;
  margin: 0 0 0.35rem;
}

.section-header p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

/* Eyebrow labels must never inherit section paragraph styles */
.section-header .eyebrow {
  color: var(--color-deep-teal);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  line-height: 1.2;
  margin-bottom: 0.6rem;
}

.section-kicker {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-deep-teal);
  margin: 0 0 0.25rem;
}

/* Grids & cards */

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.35rem;
}

/* =========================================================
   Base Card — visual primitive ONLY
   ========================================================= */

.card {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft);
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 12px 28px rgba(15, 23, 42, 0.12);
  border-color: rgba(0, 109, 119, 0.45);
}

/* Tool / calculator panels */
.card--tool {
  padding: 1.5rem 1.4rem;
  display: flex;
  flex-direction: column;
  align-items: stretch;
}

.card-title {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  text-align: inherit;
}

.card-body {
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

.card-body + .card-body {
  margin-top: auto;
}


.card .card-body:last-child {
  margin-top: auto;
}

.section > .container {
  max-width: var(--tool-max-width);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--edge-padding);
  padding-right: var(--edge-padding);
}

/* Tool icons on cards */

.card-icon {
  width: 52px;
  height: 52px;
  display: block;
  object-fit: contain;
}

.card-icon-shell {
  width: 80px;
  height: 80px;
  border-radius: 24px;
  margin-bottom: 1.2rem;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: rgba(0, 109, 119, 0.06);
}

/* Pill-style CTA link */

.pill-link {
  display: inline-flex;
  align-items: center;
  margin-top: 1rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 109, 119, 0.4);
  font-size: 0.85rem;
  text-decoration: none;
  color: var(--color-deep-teal);
  transition:
    background-color var(--transition-fast),
    border-color var(--transition-fast),
    transform var(--transition-fast);
}

.pill-link:hover {
  background-color: rgba(131, 197, 190, 0.18);
  border-color: var(--color-seafoam);
  transform: translateY(-1px);
}

/* Tools grid: ensure buttons sit at bottom */
.tools-grid .card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.tools-grid .card-body {
  flex-grow: 1;
}

.tools-grid .btn,
.tools-grid .pill-link {
  margin-top: auto;
  align-self: center;
}

/* =========================================================
   TOOL GRID — core layout
   ========================================================= */

.tool-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.75rem;
  align-items: stretch;
}

.tools-section {
  margin-top: 2rem;
}

/* #endregion */

/* #region Home page sections (How, Audience, Tools highlight)
   =========================== */

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.75rem; /* was larger – this tightens horizontally and vertically */
  margin-top: 2rem;
}

/* Stack How It Works steps on mobile */
@media (max-width: 768px) {
  .how-grid {
    grid-template-columns: 1fr;   /* one card per row */
  }
}

/* =========================================
   HOW-STEP (Framework-equivalent cards)
   ========================================= */

.how-step {
  background: #ffffff;
  border-radius: 16px;
  padding: 1.2rem 1.15rem;

  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.05);

  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background-color 0.18s ease;
  --hover-y: 0px;
  transform: translateY(calc(var(--reveal-y, 0px) + var(--hover-y)));
}

/* Hover lift (same as framework cards) */
.how-step:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 36px rgba(15, 23, 42, 0.10);
  background-color: #fffffffa;
  --hover-y: -3px;
}

/* =========================================
   Step Number (matches framework-number)
   ========================================= */

.how-step-number {
  width: 2rem;
  height: 2rem;
  border-radius: 999px;

  display: inline-flex;
  align-items: center;
  justify-content: center;

  background: var(--color-deep-teal, #006d77);
  color: #ffffff;

  font-weight: 700;
  font-size: 0.95rem;

  margin-bottom: 0.7rem;

  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

/* Number pop on hover (framework behavior) */
.how-step:hover .how-step-number {
  transform: translateY(-3px);
  box-shadow: 0 8px 18px rgba(0, 109, 119, 0.35);
}

/* =========================================
   Typography (aligned with framework cards)
   ========================================= */

.how-step h3 {
  margin: 0 0 0.45rem;

  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;

  color: var(--color-text, #1a2a2f);
}

.how-step p {
  margin: 0;

  font-size: 0.92rem;
  line-height: 1.55;

  color: var(--color-text-muted, #54656a);
}

/* =========================================
   Tool cards – shared layout behavior
   ========================================= */

/* Audience section */
.section-audience {
  padding: 3.0rem 0;
  background: #ffffff;
}

/* # End Section Tools

/* #region Tools page
   =========================== */


.section-tools .section-header {
  margin-bottom: 1.25rem;
}

.section-tools .section-header p {
  margin-bottom: 0.5rem;
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.75rem;
  margin-top: 2rem;
  align-items: stretch;
}

.hero-tools {
  padding-top: 8rem;
  padding-bottom: 1.5rem;
  background: linear-gradient(
    to bottom,
    rgba(237, 246, 249, 0.95),
    #ffffff
  );
}

/* #endregion */

/* #region Forms (generic)
   =========================== */

.form-field {
  margin-bottom: 0.85rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.form-field label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.form-field input {
  padding: 0.55rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  font-size: 0.95rem;
  outline: none;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast);
}

.form-field input:focus {
  border-color: var(--color-seafoam);
  box-shadow: 0 0 0 2px rgba(131, 197, 190, 0.5);
}

/* #endregion */

/* #region Learn & article pages
   =========================== */

.section-learn-main {
  padding: 3.5rem 0 3rem;
  background: linear-gradient(
    to bottom,
    rgba(237, 246, 249, 0.95),
    #ffffff
  );
}

.learn-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.learn-card-content {
  flex-grow: 1;
}

.learn-card .btn {
  margin-top: 1rem;
  align-self: center;
}

/* Learn page topic nav + sections */

.learn-topic-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.75rem 0 2.25rem;
}

.learn-topic-nav a {
  font-size: 0.9rem;
  padding: 0.45rem 0.9rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 109, 119, 0.18);
  text-decoration: none;
  color: var(--color-text);
  background: #ffffff;
}

.learn-topic-nav a:hover {
  border-color: rgba(0, 109, 119, 0.45);
}

.learn-topics {
  display: flex;
  flex-direction: column;
  gap: 3rem;
}

.learn-topic-block {
  scroll-margin-top: 96px; /* so anchor links sit nicely below header */
}

.learn-topic-header {
  max-width: 48rem;
  margin-bottom: 1.4rem;
}

.learn-topic-kicker {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--color-text-muted);
  margin-bottom: 0.25rem;
}

.learn-topic-header h3 {
  font-size: 1.4rem;
  margin-bottom: 0.35rem;
}

/* Smaller titles inside cards in learn sections (so hierarchy feels right) */
.learn-card .card-title {
  font-size: 1.05rem;
}

/* Mobile tweaks */
@media (max-width: 768px) {
  .learn-topic-nav {
    margin-bottom: 1.75rem;
  }

  .learn-topic-header h3 {
    font-size: 1.2rem;
  }
}

/* =========================================
   ARTICLE LAYOUT — Premium Editorial Style
   ========================================= */

.article-section {
  background: linear-gradient(
    to bottom,
    #edf6f9 0%,
    #ffffff 45%
  );
  padding: 3.25rem 0 4.5rem;
}

.article {
  max-width: 840px;
  margin: 0 auto;
  padding: 0 1rem;
}

.article-header {
  margin-bottom: 2.5rem;
}

.article-kicker {
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--color-deep-teal);
  margin: 0 0 0.25rem;
}

.article-header h1 {
  font-size: 2.1rem;
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin-bottom: 0.75rem;
}

.article-intro {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--color-text-muted);
  max-width: 60rem;
}

.article-body {
  font-size: 1rem;
  line-height: 1.75;
  color: var(--color-text);
}

.article-body h2 {
  font-size: 1.35rem;
  font-weight: 650;
  letter-spacing: -0.01em;
  margin-top: 3rem;
  margin-bottom: 0.7rem;
}

.article-body h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 1.75rem;
  margin-bottom: 0.4rem;
}

.article-body p {
  margin-bottom: 1rem;
  max-width: 46rem;
}

.article-body ul,
.article-body ol {
  margin: 0.75rem 0 1.1rem 1.3rem;
}

.article-body li {
  margin-bottom: 0.35rem;
}

.article-callout {
  margin: 2.25rem 0;
  padding: 1.1rem 1.4rem;
  border-left: 4px solid var(--color-deep-teal);
  background: rgba(0, 109, 119, 0.04);
  border-radius: 14px;
  font-size: 0.95rem;
}

.article-callout strong {
  display: block;
  margin-bottom: 0.3rem;
}

.article-footer-note {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(0,0,0,0.06);
  font-size: 0.95rem;
  color: var(--color-text-muted);
}

.article-tools {
  margin-top: 0;
  padding: 1.1rem 1.5rem 1.4rem;
  background: #f7fbfc;
  border-radius: 16px;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.article-tools h3 {
  font-size: 1.1rem;
  margin-top: 0;
  margin-bottom: 0.35rem;
}

.article-tools p {
  font-size: 0.95rem;
  color: var(--color-text-muted);
  margin-bottom: 0.4rem;
}

.article-tools .tool-link {
  font-weight: 600;
  color: var(--color-deep-teal);
}

.article-tool-link {
  display: inline-block;
  font-weight: 600;
  color: var(--color-deep-teal);
  text-decoration: none;
}

.article-tool-link:hover {
  text-decoration: underline;
}

.article-footer-note + .section-kicker {
  margin-top: 1.25rem;
  margin-bottom: 0.35rem;
}

@media (max-width: 768px) {
  .article-section {
    padding: 2.25rem 0 3rem;
  }

  .article-header h1 {
    font-size: 1.65rem;
  }

  .article-body {
    font-size: 0.98rem;
  }

  .article-body h2 {
    font-size: 1.2rem;
  }
}

/* #endregion */

/* #region About page
   =========================== */
.section-about-hero {
  padding: 3.5rem 0 2rem;
  background: linear-gradient(
    135deg,
    #e6f4f5 0%,
    #f5fafb 55%,
    #ffffff 100%
  );
}

.about-intro-text p + p {
  margin-top: 0.75rem;
}

.about-quick-facts {
  padding: 1rem 1.4rem;
}

.about-hero-grid {
  max-width: 760px;
}

.about-hero-text h1 {
  font-size: clamp(2rem, 3vw, 2.4rem);
  margin-bottom: 0.8rem;
}

.section-about-body {
  background: #f7fbfc; /* very subtle */
  padding: 3rem 0 3.5rem;
}

/* OR even tighter premium layout */
.section-about-body--tight {
  padding-top: 1.5rem;
}

.about-story {
  padding: 1.5rem 1.75rem;
  border-left: 4px solid var(--color-seafoam);
  background: rgba(131, 197, 190, 0.08);
  border-radius: 8px;
  margin-bottom: 2.5rem;
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

.about-story h2:first-of-type {
  margin-top: 0;
}

.about-story h2 + p {
  margin-top: 0.6rem;
}

.about-story p + p {
  margin-top: 0.85rem;
}

.about-origin {
  padding: 1.5rem 1.75rem;
  margin: 2rem 0 2.5rem;
  background: var(--color-soft-ice);
  border-radius: 14px;
}

.about-closing {
  margin-top: 0;
  padding-top: 2rem;
  border-top: 1px solid rgba(0,0,0,0.06);
}

.about-content {
  max-width: 720px;
  margin-left: auto;
  margin-right: auto;
}

/* #region Footer
   =========================== */

.site-footer {
  border-top: 1px solid rgba(0, 109, 119, 0.3);
  padding: 1.5rem 0;
  font-size: 0.85rem;
  color: var(--color-text-muted);
  background: rgba(0, 109, 119, 0.05);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.75rem;
}

.site-footer .nav-link {
  color: #006d77;
  padding: 0;
  background-color: transparent;
}

.site-footer .nav-link:hover {
  color: #004d55;
  background-color: transparent;
  text-decoration: underline;
}


/* #endregion */

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ==========================================================
   Scroll Reveal (Single Source of Truth)
   ========================================================== */

/* Default: content is visible (no JS, no failure state) */
.reveal {
  opacity: 1;
  transform: none;
}

/* JS-enabled reveal behavior */
.js .reveal {
  opacity: 0;
  --reveal-y: 24px;
  transform: translateY(var(--reveal-y));
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}

.js .reveal.visible {
  opacity: 1;
  --reveal-y: 0px;
}


.reveal.visible {
  opacity: 1;
  --reveal-y: 0px;
}

/* Optional stagger */
.card-grid .reveal:nth-child(1) { transition-delay: 0.05s; }
.card-grid .reveal:nth-child(2) { transition-delay: 0.12s; }
.card-grid .reveal:nth-child(3) { transition-delay: 0.19s; }
.card-grid .reveal:nth-child(4) { transition-delay: 0.26s; }

/* #endregion */

/* #region Budget planner
   =========================== */

.budget-layout {
  margin-top: 2rem; /* more breathing room */
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr);
  gap: 2.25rem; /* slightly wider = calmer */
  align-items: flex-start;
}

.budget-column {
  background-color: var(--color-surface);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.4rem;
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-soft);
}

.budget-column .card-title {
  font-size: 1.1rem;
  margin-bottom: 0.75rem;
  text-align: left;
}

/* Optional: subtle emphasis on results column */
@media (min-width: 901px) {
  .budget-results {
    position: sticky;
    top: 6.5rem; /* clears header */
  }
}

/* Responsive */
@media (max-width: 900px) {
  .budget-layout {
    grid-template-columns: 1fr;
    justify-items: stretch;
    gap: 2rem;
  }

  .budget-column {
    width: 100%;
    max-width: 100%;
  }
}

.budget-form h4 {
  margin: 1.1rem 0 0.35rem;
  font-size: 0.95rem;
}

.budget-group {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 0.75rem 1rem;
}

.budget-group label {
  font-size: 0.85rem;
  color: var(--color-text-muted);
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.budget-group input {
  padding: 0.55rem 0.6rem;
  border-radius: 8px;
  border: 1px solid var(--color-border);
  font-size: 0.95rem;
  outline: none;
  transition:
    border-color var(--transition-fast),
    box-shadow var(--transition-fast),
    background-color var(--transition-fast);
}

.budget-group input:focus {
  border-color: var(--color-seafoam);
  box-shadow: 0 0 0 2px rgba(131, 197, 190, 0.45);
  background-color: #f8fcfd;
}

/* Results side */

.budget-results h4 {
  margin-top: 1.25rem;
  margin-bottom: 0.45rem;
  font-size: 0.95rem;
}

.results-summary {
  margin-top: 0.5rem;
  padding: 0.9rem 1rem;
  border-radius: 14px;
  background-color: rgba(237, 246, 249, 0.9);
  border: 1px solid rgba(0, 109, 119, 0.18);
}

.results-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.9rem;
  margin-bottom: 0.25rem;
}

.results-row span {
  color: var(--color-text-muted);
}

.results-row strong {
  font-weight: 600;
}

.results-list {
  list-style: none;
  padding: 0;
  margin: 0.25rem 0 0.75rem;
  font-size: 0.9rem;
}

.results-list li {
  display: flex;
  justify-content: space-between;
  padding: 0.25rem 0;
  border-bottom: 1px dashed rgba(0, 109, 119, 0.1);
}

.results-list li:last-child {
  border-bottom: none;
}

.results-note {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--color-text-muted);
}

/* make summary elements behave in cards */
.budget-results {
  align-items: stretch;
}

.budget-results .results-summary,
.budget-results .results-list,
.budget-results .results-note {
  width: 100%;
}

/* #endregion */

/* #region Debt planner
   =========================== */

/* layout tweaks */
#debt-rows,
.debt-table,
.budget-group .table-wrapper,
#add-debt {
  grid-column: 1 / -1;
}

#add-debt {
  justify-self: flex-start;
  margin-top: 0.75rem;
}

.table-wrapper {
  width: 100%;
  overflow-x: auto;
}

.debt-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 0.5rem;
}

.debt-table thead tr {
  background: #f3f7fa;
}

.debt-table th {
  padding: 0.35rem 0.75rem;
  text-align: left;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  color: var(--color-text-muted);
}

.debt-table tbody tr {
  background: #ffffff;
  box-shadow: 0 0 0 1px rgba(16, 42, 67, 0.06);
  border-radius: 999px;
}

.debt-table tbody tr:hover {
  box-shadow: 0 0 0 1px rgba(0, 109, 119, 0.22);
  background: #f7fbfc;
}

.debt-table td {
  padding: 0.35rem 0.75rem;
  vertical-align: middle;
}

.debt-table td:first-child {
  border-top-left-radius: 999px;
  border-bottom-left-radius: 999px;
}

.debt-table td:last-child {
  border-top-right-radius: 999px;
  border-bottom-right-radius: 999px;
}

.debt-table input[type="text"],
.debt-table input[type="number"] {
  width: 100%;
  box-sizing: border-box;
  font-size: 0.9rem;
}

.debt-table td.remove-cell {
  width: 1%;
  white-space: nowrap;
  text-align: right;
}

.debt-table .btn-link.remove-debt {
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(16, 42, 67, 0.12);
  font-size: 0.8rem;
}

.debt-table .btn-link.remove-debt:hover {
  border-color: rgba(200, 60, 60, 0.4);
  color: #b3261e;
}

/* Headers tweaks */
.debt-table th.debt-name-header {
  font-size: 0.95rem;
  font-weight: 700;
}

.debt-table th.min-payment-header {
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--color-text-muted);
}

/* Snowball / avalanche radio pills */

.payoff-option {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  margin-bottom: 1rem;
}

.payoff-option input[type="radio"] {
  order: 2;
  margin-top: 0.35rem;
}

.payoff-option .payoff-label {
  order: 1;
  display: block;
}

/* Payoff list */

#debtList {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
}

#debtList li {
  padding: 0.75rem 0;
  border-top: 1px solid rgba(16,42,67,0.08);
}

#debtList li:first-child {
  border-top: none;
}


@media (max-width: 600px) {
  #debtList li {
    padding: 1rem 0;
  }
}



/* Compact hero for debt page */
@media (max-width: 600px) {
  .section--debt-compact {
    padding-top: 2rem;
    padding-bottom: 0.5rem;
  }

  .section--debt-compact .section-header {
    margin-bottom: 0.4rem;
  }

  .section--debt-compact .section-header h2 {
    margin-bottom: 0.25rem;
    font-size: 1.25rem;
    line-height: 1.25;
  }

  .section--debt-compact .section-header p {
    display: none;
  }
}

/* Mobile-friendly debt table */
@media (max-width: 640px) {
  .debt-table thead {
    display: none;
  }

  .debt-table,
  .debt-table tbody,
  .debt-table tr,
  .debt-table td {
    display: block;
    width: 100%;
  }

  .debt-table tbody tr {
    background: #fff;
    border-radius: 16px;
    box-shadow: 0 0 0 1px rgba(16, 42, 67, 0.08);
    padding: 1rem;
    margin-bottom: 1rem;
  }

  .debt-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0;
  }

  .debt-table td::before {
    content: attr(data-label);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-muted);
    flex: 0 0 45%;
    max-width: 45%;
  }

  .debt-table td input[type="text"],
  .debt-table td input[type="number"] {
    width: 100%;
  }

    /* 👇 This is the important bit */
  .debt-table td.remove-cell {
    width: 100%;                 /* override desktop width: 1% */
    justify-content: flex-end;
    padding-top: 0.75rem;
    padding-bottom: 0;
    white-space: normal;
  }

  .debt-table td.remove-cell::before {
    content: "";
  }

  .debt-table td.remove-cell .remove-debt {
    position: static;
    display: inline-block;
    padding: 0.3rem 0.8rem;
    font-size: 0.8rem;
    border-radius: 999px;
    border: 1px solid rgba(16, 42, 67, 0.18);
  }

  .table-wrapper {
    overflow-x: visible !important;
  }
}
/* #endregion */

.budget-group {
  display: grid;
  gap: 1rem;
}

@media (min-width: 768px) {
  .budget-group {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.budget-group label {
  font-size: 0.9rem;
  font-weight: 500;
}

/* =====================================================
   SEO SYSTEM CALLOUT — PREMIUM, BRAND-ALIGNED
   ===================================================== */

.section-seo-callout {
  padding: 1.5rem 0 2.2rem;
}

.section-seo-callout .seo-callout {
  position: relative;

  max-width: 132ch;
  margin: 0 auto;

  padding: 1.6rem 1.9rem;
  border-radius: 16px;

  background: linear-gradient(
    180deg,
    #f4fbfc 0%,
    #f9fdfe 100%
  );

  border: 1px solid rgba(0, 109, 119, 0.18);

  box-shadow:
    inset 4px 0 0 rgba(0, 109, 119, 0.35),
    0 10px 30px rgba(15, 23, 42, 0.04);

  color: var(--color-text);
  font-size: 0.95rem;
  line-height: 1.65;
}

/* Eyebrow */
.section-seo-callout .seo-eyebrow {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 700;

  color: var(--color-deep-teal);
  margin-bottom: 0.6rem;
}

.eyebrow {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-deep-teal);
  margin: 0 0 0.6rem;

  /* 👇 critical */
  line-height: 1.2;
}

/* Links */
.section-seo-callout a {
  color: var(--color-deep-teal);
  font-weight: 600;
  text-decoration: none;

  border-bottom: 1px solid rgba(0, 109, 119, 0.35);
  transition:
    color 0.15s ease,
    border-color 0.15s ease;
}

.section-seo-callout a:hover {
  color: #004f55;
  border-bottom-color: #004f55;
}

/* Calm reassurance callout */
.seo-callout--soft {
  margin-top: 2.5rem;
  padding: 1.25rem 1.5rem;
  max-width: 140ch;

  background: linear-gradient(
    to right,
    rgba(237, 246, 249, 0.9),
    rgba(255, 255, 255, 0.9)
  );

  border-left: 3px solid var(--color-seafoam);
  border-radius: 0.75rem;

  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.04);

}

.seo-callout--soft .seo-eyebrow {
  margin-bottom: 0.35rem;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-deep-teal);
}

.seo-callout--soft p:last-child {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  line-height: 1.55;
}

.seo-footnote {
  margin-top: 1.25rem;
  font-size: 0.85rem;
  line-height: 1.45;
  color: var(--color-text-muted);
  max-width: 740px;
}

/* Make the Extra Payment block look uniform with other fields */
.budget-group-extra {
  display: block;              /* cancel any flex layout from .budget-group */
}

.budget-group-extra label {
  display: block;
  margin-bottom: 0.5rem;
}

.budget-group-extra .tool-helper-text {
  margin-top: 0.25rem;
  max-width: 32rem;  
  font-size: 0.875rem;   /* 14px *         /* keeps the text from stretching too wide */
  line-height: 1.5;
}

.budget-actions {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* Mobile layout for the budget action buttons */
@media (max-width: 640px) {
  .budget-actions {
    display: flex;             /* in case it isn't already */
    flex-direction: column;    /* stack vertically */
    align-items: stretch;      /* buttons fill the column width */
    gap: 0.5rem;               /* space between buttons */
    margin-top: 1rem;
  }

  .budget-actions button {
    width: 100%;
    justify-content: center;   /* center the text in pill-style buttons */
  }
}

.tool-disclaimer-card p {
  font-size: 0.78rem;     /* smaller text */
  line-height: 1.35;      /* tighter spacing */
  color: #566;            /* softer color (optional) */
  opacity: 0.85;          /* subtle fade */
}

.section + .section {
  border-top: 1px solid rgba(0,0,0,0.04);
}

.text-highlight {
  color: #006d77;
  font-weight: 500;
}

/* ===== Debt Planner premium styles ===== */

/* Softer table wrapper */
.table-wrapper--soft {
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: var(--shadow-soft);
  border: 1px solid rgba(15, 23, 42, 0.04);
}

/* Calm, less-grid debt table */
.debt-table--premium {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.debt-table--premium thead tr {
  border-bottom: 1px solid var(--color-border);
}

.debt-table--premium th,
.debt-table--premium td {
  padding: 0.6rem 0.5rem;
}

.debt-table--premium input {
  width: 100%;
}

.debt-table--premium tbody tr:nth-child(even) {
  background: rgba(148, 163, 184, 0.03);
}

/* Payoff method rows as soft cards */
.payoff-option--card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-md);
  background: rgba(148, 163, 184, 0.08);
  margin-bottom: 0.55rem;
}

.payoff-label {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.payoff-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 600;
  background: var(--color-deep-teal);
  color: #fff;
}

.payoff-pill--outline {
  background: transparent;
  color: var(--color-deep-teal);
  border: 1px solid rgba(0, 109, 119, 0.4);
}

.payoff-description {
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

/* Make radio small and unobtrusive */
.payoff-option--card input[type="radio"] {
  accent-color: var(--color-deep-teal);
}

.results-list--debt {
  padding-left: 0;
  list-style: none;
  font-size: 0.88rem;
}

.results-list--debt li {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.25rem 0;
}


/* Mobile tweaks */
@media (max-width: 900px) {
  #debt-results {
    margin-top: 1.75rem;
  }
}

/* Surplus colouring */
.surplus-positive { color: #006d77; }
.surplus-negative { color: #b00020; }
.surplus-neutral  { color: inherit; }

/* Compact list variant for inside cards */
.results-list--compact {
  padding-left: 0;
  list-style: none;
}

.results-list--compact li {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 0.25rem 0;
  font-size: 0.9rem;
}

.results-list-pct {
  font-size: 0.8rem;
  color: var(--color-text-muted);
}

/* Mobile tweaks */
@media (max-width: 900px) {
  #budget-results {
    margin-top: 1.75rem;
  }
}

/* =========================================
   LEARN PAGE — PREMIUM FINTECH STYLING
   ========================================= */

/* Top-level background & spacing */
.section-learn-main {
  background: linear-gradient(180deg, #f6fafb 0%, #ffffff 65%);
}

/* Intro header */
.section-learn-main .section-header {
  max-width: 720px;
  margin-bottom: 2.5rem;
}

.learn-hero-title {
  font-size: clamp(2.1rem, 3vw, 2.6rem);
  margin-bottom: 0.75rem;
}

.section-intro {
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--color-text-muted);
}

/* Topic quick-nav chips */
.learn-topic-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  padding: 0.9rem 1.1rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.06);
  margin-bottom: 2.5rem;
}

.learn-topic-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.45rem 0.95rem;
  border-radius: 999px;
  font-size: 0.9rem;
  border: 1px solid rgba(0, 109, 119, 0.18);
  color: var(--color-deep-teal);
  background: #ffffff;
  text-decoration: none;
  transition: background-color 0.2s ease, color 0.2s ease, transform 0.18s ease, box-shadow 0.2s ease;
}

.learn-topic-chip:hover {
  background: var(--color-seafoam);
  color: #04323a;
  transform: translateY(-1px);
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.14);
}

/* Topic blocks */
.learn-topics {
  display: flex;
  flex-direction: column;
  gap: 3.5rem;
}

.learn-topic-block {
  position: relative;
}

.learn-topic-shell {
  padding: 2.3rem 2rem 2rem;
  border-radius: 24px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.06);
}

/* Topic header */
.learn-topic-header {
  max-width: 640px;
  margin-bottom: 1.9rem;
}

.learn-topic-kicker {
  position: relative;
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--color-text-muted);
  margin-bottom: 0.45rem;
}

.learn-topic-kicker::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 48px;
  height: 3px;
  border-radius: 999px;
  background: var(--color-deep-teal);
}

.learn-topic-header h2 {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.learn-topic-header p {
  color: var(--color-text-muted);
  line-height: 1.6;
}

/* Card grid */
.learn-card-content {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.4rem;
}

@media (max-width: 1100px) {
  .learn-card-content {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .learn-card-content {
    grid-template-columns: 1fr;
  }

  .learn-topic-shell {
    padding: 1.7rem 1.25rem 1.5rem;
  }
}

/* Individual guide cards */
.learn-card {
  border-radius: 20px;
  padding: 1.4rem 1.4rem 1.2rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #ffffff;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.04);
  transition: transform 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease;
}

.learn-card .card-title {
  font-size: 1.05rem;
  margin-bottom: 0.45rem;
}

.learn-card .card-body {
  font-size: 0.95rem;
  line-height: 1.6;
  color: var(--color-text-muted);
  margin-bottom: 0.9rem;
}

.learn-card .pill-link {
  margin-top: auto;
  font-size: 0.9rem;
}

/* Card hover — gentle lift */
.learn-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.12);
  background-color: #fffffffa;
}

/* How-to section */
.section-learn-how {
  background: #f7fbfc;
}

.section-learn-how .section-header {
  max-width: 640px;
}

@media (max-width: 900px) {
  .how-grid {
    grid-template-columns: 1fr;
  }
}




/* Global smooth scrolling for anchor-like behaviour */
html {
  scroll-behavior: smooth;
}

/* LEARN PAGE
   ============================================= */

.section-learn-main {
  background: linear-gradient(
      180deg,
      rgba(131, 197, 190, 0.10) 0%,
      rgba(237, 246, 249, 0.85) 260px,
      #edf6f9 100%
  );
  padding-top: 4rem;
  padding-bottom: 4rem;
}

.learn-hero-surface {
  background: rgba(255, 255, 255, 0.92);
  border-radius: 24px;
  padding: 2.25rem 2.25rem 1.75rem;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.08);
  backdrop-filter: blur(10px);
}

.learn-hero-header h2 {
  font-size: clamp(2.1rem, 2.5vw, 2.5rem);
}

.learn-hero-header p {
  max-width: 640px;
}

/* Topic pill nav */

.learn-topic-nav {
  margin-top: 1.75rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
}

.learn-topic-pill {
  border: 1px solid rgba(148, 163, 184, 0.45);
  background: #ffffff;
  border-radius: 999px;
  padding: 0.55rem 1.2rem;
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: #1f2933;
  cursor: pointer;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.04);
  transition: background-color 0.18s ease, color 0.18s ease,
              box-shadow 0.18s ease, transform 0.18s ease, border-color 0.18s ease;
}

.learn-topic-pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.08);
  border-color: rgba(0, 109, 119, 0.35);
}

.learn-topic-pill.is-active {
  background: #006d77;
  color: #ffffff;
  border-color: #006d77;
  box-shadow: 0 14px 32px rgba(0, 109, 119, 0.35);
}

/* Topic blocks */

.learn-topics {
  margin-top: 3rem;
}

.learn-topic-block + .learn-topic-block {
  margin-top: 2.0rem;
}

.learn-topic-header {
  margin-bottom: 1.5rem;
}

.learn-topic-kicker {
  font-size: 0.8rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 0.35rem;
}

.learn-topic-header h3 {
  font-size: clamp(1.6rem, 2vw, 1.9rem);
  margin-bottom: 0.4rem;
}

/* Cards */

.learn-card-content {
  margin-top: 0.5rem;
}

.learn-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  min-height: 260px;
  padding: 1.6rem 1.7rem 1.5rem;
  border-radius: 20px;
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.05);
  transition: transform 0.22s ease, box-shadow 0.22s ease, background-color 0.22s ease;
}

.learn-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.10);
  background-color: #ffffffF2;
}

/* Card meta: level + read time */

.learn-card-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.8rem;
  color: var(--color-text-muted);
  margin-bottom: 0.45rem;
}

.learn-card-level {
  display: inline-flex;
  align-items: center;
  padding: 0.15rem 0.55rem;
  border-radius: 999px;
  background: rgba(131, 197, 190, 0.20);
  color: #006d77;
  font-weight: 500;
}

.learn-card-time {
  opacity: 0.9;
}

/* How-to grid keeps your existing style, just tighten spacing a bit */

.section-learn-how {
  background: #ffffff;
  padding-top: 3.5rem;
  padding-bottom: 4rem;
}

/* Responsive tweaks */

@media (max-width: 900px) {
  .learn-hero-surface {
    padding: 1.8rem 1.4rem 1.5rem;
    border-radius: 20px;
  }

  .learn-topic-nav {
    gap: 0.6rem;
  }

  .learn-topic-pill {
    width: 100%;
    justify-content: center;
  }

  .learn-topic-block + .learn-topic-block {
    margin-top: 2.0rem;
  }

  .how-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   HOW IT WORKS
   ====================================================== */

.section-how {
  background-color: rgba(131, 197, 190, 0.12);
}

/* =========================================================
   AUDIENCE SECTION
   ====================================================== */

.audience-grid {
  margin-top: 0;
}

.audience-card {
  padding-top: 1.7rem;
  padding-bottom: 1.7rem;
}

.audience-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
/* =========================================================
   RESPONSIVE TWEAKS
   ====================================================== */

@media (max-width: 960px) {
  .how-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 640px) {
  .audience-grid,
  .tools-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ========== HOW IT WORKS (spacing + compact cards) ========== */

.section-how {
  padding-top: 3.25rem;
  padding-bottom: 3.75rem;
}

.section-how .section-header {
  max-width: 680px;
}

/* Contact page layout */
.contact-layout {
  display: grid;
  gap: 3rem;
  align-items: flex-start;
}

.contact-intro .lead {
  max-width: 34rem;
}

.contact-direct {
  margin-top: 1.5rem;
  padding: 1.25rem 1.5rem;
  padding-block: 1rem;
  border-radius: var(--radius-lg, 20px);
  background: rgba(0, 109, 119, 0.04);
  border: 1px solid var(--color-border, #c7d6dd);
}

.contact-label {
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 600;
  margin-bottom: 0.25rem;
  color: var(--color-text-muted, #5a5f5c);
}

.contact-note {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  color: var(--color-text-muted, #5a5f5c);
}

.contact-form-card {
  background: var(--color-surface, #ffffff);
  border-radius: var(--radius-lg, 20px);
  box-shadow: var(--shadow-soft, 0 8px 22px rgba(15, 23, 42, 0.08));
  padding: 2rem;
}

.contact-form-card h2 {
  margin-top: 0;
  margin-bottom: 1.25rem;
}

/* Form controls */
.field-group {
  margin-bottom: 1.2rem;
}

.field-group label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.35rem;
}

.field-group input,
.field-group select,
.field-group textarea {
  width: 100%;
  border-radius: var(--radius-md, 12px);
  border: 1px solid var(--color-border, #c7d6dd);
  padding: 0.7rem 0.85rem;
  font-size: 1rem;
  font-family: inherit;
  outline: none;
  background: #ffffff;
}

.field-group input:focus,
.field-group select:focus,
.field-group textarea:focus {
  border-color: var(--color-deep-teal, #006d77);
  box-shadow: 0 0 0 1px rgba(0, 109, 119, 0.08);
}

/* Force checkbox + text to stay on the same horizontal line */
.checkbox-label {
  display: flex !important;
  flex-direction: row !important;
  align-items: center !important;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  line-height: 1.45;
  font-size: 0.85rem;
  color: var(--color-text-muted);
}

.button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.6rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 1rem;
  background: var(--color-deep-teal, #006d77);
  color: #ffffff;
  transition: transform 120ms ease, box-shadow 120ms ease, background 120ms ease;
}

.button-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 24px rgba(0, 109, 119, 0.25);
}

.button-primary:active {
  transform: translateY(0);
  box-shadow: 0 4px 10px rgba(0, 109, 119, 0.15);
}

.micro-copy {
  margin-top: 0.75rem;
  font-size: 0.8rem;
  color: var(--color-text-muted, #5a5f5c);
}

.section-contact-reasons h2 {
  margin-bottom: 0.75rem;
}

.contact-reasons {
  list-style: disc;
  padding-left: 1.4rem;
  max-width: 38rem;
  color: var(--color-text-muted, #5a5f5c);
}

.contact-reasons li + li {
  margin-top: 0.35rem;
}

/* Responsive */
@media (max-width: 768px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }

  .contact-form-card {
    padding: 1.4rem;
  }
}

/* Make the contact hero sit a bit higher on the page */
.section.contact-hero {
  padding-top: 3.5rem;
  padding-bottom: 2.5rem;
}

.success-banner {
  background: rgba(0, 109, 119, 0.06);
  border-bottom: 1px solid var(--color-border, #c7d6dd);
  padding: 0.75rem 0;
}

.success-banner p {
  margin: 0;
  font-size: 0.95rem;
  color: var(--color-deep-teal, #006d77);
  font-weight: 500;
}

/* Checkbox row – premium alignment */
.field-inline {
  display: flex;
  margin-top: 1rem;
}

/* Keep checkbox crisp + aligned */
.checkbox-label input[type="checkbox"] {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  accent-color: var(--color-deep-teal);
  margin: 0 !important;
  padding: 0 !important;
  margin-top: 0.15rem;
}

/* Prevent text from dropping down under the checkbox */
.checkbox-label span {
  display: inline-block !important;
}

/* Mortgage Renewal region */
.form-divider {
  border: none;
  border-top: 1px dashed var(--color-border);
  margin: 1.25rem 0;
}

/* End Mortgage Renewal Region */

/* =========================
   Tool Card
   ========================= */

.tool-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;

  padding: 1.75rem;
  border-radius: 16px;

  background: #ffffff;
  border: 1px solid rgba(0, 0, 0, 0.04);
  box-shadow: 0 6px 20px rgba(15, 23, 42, 0.06);

  text-align: left;

  --hover-y: 0px;
  transform: translateY(
    calc(var(--reveal-y, 0px) + var(--hover-y))
  );

  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease;
}

/* Title & body */
.tool-card .card-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 0.25rem;
  margin-bottom: 0.4rem;
}

.tool-card .card-body {
  font-size: 0.95rem;
  line-height: 1.6;
  color: #4b5563;
  margin-bottom: 1.1rem;
}

.tool-card:hover {
  --hover-y: -6px;
  box-shadow: 0 18px 40px rgba(15, 23, 42, 0.12);
}

/* Category tag */
.tool-tag {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #6b7280;
  margin: 0.5rem 0 0.1rem;
}

/* Illustration */
.tool-card-illustration {
  background: linear-gradient(
    180deg,
    rgba(0, 109, 119, 0.045),
    rgba(0, 109, 119, 0.02)
  );
  border-radius: 20px;
  padding: 1rem;

  width: 96px;
  height: 96px;
  margin: 0 auto 1rem;

  display: flex;
  align-items: center;
  justify-content: center;

  box-shadow:
    0 6px 18px rgba(0, 0, 0, 0.10),
    0 2px 6px rgba(0, 0, 0, 0.08);

  transition: transform 0.2s ease;
}

.tool-card-illustration img {
  width: 80px;
  height: auto;
  border-radius: 12px;
}

.tool-card:hover .tool-card-illustration {
  transform: translateY(-4px);
}

/* CTA */
.tool-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  margin-top: auto;              /* anchors to bottom in flex cards */
  margin: auto auto 0;
  padding: 0.75rem 1.25rem;

  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;

  color: #ffffff;
  background-color: var(--color-deep-teal);

  border-radius: 999px;          /* calm pill */
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);

  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    background-color 0.15s ease;
}

/* Hover / focus */
.tool-link:hover,
.tool-link:focus-visible {
  background-color: var(--color-deep-teal-hover, #005b64);
  transform: translateY(-1px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

/* Optional arrow spacing if you use → */
.tool-link span,
.tool-link::after {
  margin-left: 0.35rem;
}

/* Tool explainer section (below calculators) */
.tool-explainer {
  margin-top: 0;
  padding: 2.4rem 0 2.6rem;
  background: var(--color-soft-ice, #f6fbfc);
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.tool-explainer-inner {
  max-width: 920px;
}

.tool-explainer h2 {
  margin-bottom: 1.1rem;
  font-size: 1.35rem;
}

.tool-explainer h3 {
  margin-top: 1.8rem;
  margin-bottom: 0.6rem;
  font-size: 1.05rem;
}

.tool-explainer p {
  margin-bottom: 1rem;
  line-height: 1.65;
  color: rgba(15, 23, 42, 0.9);
}

/* Mobile tap comfort */
@media (max-width: 768px) {
  .tool-link {
    width: 100%;
    padding: 0.9rem 1.25rem;
  }
}

/* Anchor offset for sticky header */
:target {
  scroll-margin-top: 72px;
}

/* ==========================================================
   PILLAR LAYOUT SYSTEM (FinForFam)
   Loaded AFTER styles.css
   ========================================================== */

/* ---------- Base Pillar ---------- */

.pillar {
  display: block;
}

.pillar section + section {
  margin-top: 0;
}

/* ---------- Hero Mobile---------- */

@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
  }
}

/* --- FAQ block --- */
.pillar-faq {
  margin-top: 1.75rem;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(0, 0, 0, 0.04);
  border-radius: 16px;
  padding: 1.25rem 1.25rem;
  box-shadow: 0 10px 25px rgba(15, 23, 42, 0.05);
}

.pillar-faq h3 {
  margin-top: 0;
  margin-bottom: 0.75rem;
  font-size: 1.05rem;
}

.pillar-faq details {
  padding: 0.65rem 0;
  border-top: 1px dashed rgba(0, 109, 119, 0.18);
}

.pillar-faq details:first-of-type {
  border-top: none;
}

.pillar-faq summary {
  cursor: pointer;
  font-weight: 600;
  color: var(--color-text, #1a2a2f);
}

.pillar-faq p {
  margin: 0.5rem 0 0;
  color: var(--color-text-muted, #54656a);
  line-height: 1.6;
  font-size: 0.95rem;
}

/* Quiet legal disclaimer */
.pillar-disclaimer {
  margin-top: 3rem;
  padding: 1.25rem 0;
  font-size: 0.85rem;
  color: #667;
  background: rgba(0, 0, 0, 0.02);
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.pillar-disclaimer-inner {
  max-width: 140ch;
}

.pillar-disclaimer p {
  margin: 0;
  font-size: 0.8rem;
  line-height: 1.45;

  color: var(--color-text-muted);
  opacity: 0.85;
}

.site-header .nav-logo {
  height: 44px;
  max-height: none;
  min-height: 44px;
  width: auto;
  display: block;
}

.site-header {
  transform: none !important;
}


/* ===== Toggle (shared across site) ===== */

.toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  user-select: none;
}

.toggle input {
  display: none;
}

.toggle .slider {
  position: relative;
  width: 42px;
  height: 22px;
  background: #d9e2e1;
  border-radius: 999px;
  transition: background 0.25s ease;
}

.toggle .slider::before {
  content: "";
  position: absolute;
  width: 18px;
  height: 18px;
  top: 2px;
  left: 2px;
  background: #fff;
  border-radius: 50%;
  transition: transform 0.25s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

.toggle input:checked + .slider {
  background: var(--color-deep-teal, #0f766e);
}

.toggle input:checked + .slider::before {
  transform: translateX(20px);
}

.toggle-label {
  font-size: 0.9rem;
  color: #233;
}

@media (max-width: 900px) {
  .budget-layout > *,
  .plan-snapshot-cards > *,
  .dashv3-out-grid > *,
  .dashv3-sandbox-grid > *,
  .card {
    min-width: 0;
  }
}

@media (max-width: 900px) {
  .section * {
    min-width: 0;
  }
}

@media (max-width: 900px) {
  .hero-visual::before {
    inset: 0;
    border-radius: 24px;
  }
}

.hero-visual {
  overflow: hidden;
}

@media (max-width: 900px) {
  .hero-visual::before {
    inset: 0;
  }
}

@media (max-width: 768px) {
  .hero-body:nth-of-type(2),
  .hero-preview {
    display: none;
  }
}

@media (max-width: 768px) {
  .hero-inner {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
  }

  .hero-visual {
    order: 2;
  }

  .hero-illustration-frame {
    border-radius: 16px;
    overflow: hidden;
  }
}

@media (max-width: 768px) {
  .hero-actions {
    flex-direction: column;
    gap: 0.75rem;
  }

  .hero-secondary {
    background: transparent;
    border: none;
    color: var(--color-deep-teal);
    padding: 0;
    font-weight: 500;
  }
}

@media (max-width: 768px) {
  .audience-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
  }

  .audience-card {
    padding: 1rem 1.1rem;
    border-radius: 14px;
  }

  .audience-card h3 {
    margin-bottom: 0.25rem;
  }

  .audience-card p {
    font-size: 0.95rem;
  }
}

@media (max-width: 768px) {
  .section-audience:nth-of-type(2),
  .section-seo-callout:last-of-type {
    display: none;
  }
}

@media (max-width: 768px) {
  .tool-grid {
    display: grid;
    grid-auto-flow: row;
    gap: 1rem;
  }

  .tool-card {
    padding: 1rem;
  }

  .tool-card p {
    font-size: 0.95rem;
  }
}

@media (max-width: 768px) {
  section {
    padding-top: 2.25rem;
    padding-bottom: 2.25rem;
  }

  .section-header p {
    margin-bottom: 0.75rem;
  }
}

@media (max-width: 768px) {
  .eyebrow {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    color: rgba(0, 0, 0, 0.45);
    margin-bottom: 0.4rem;
  }
}

@media (max-width: 768px) {
  .hero-heading {
    font-size: 1.75rem;
    line-height: 1.25;
    margin-bottom: 0.75rem;
  }

  .hero-body {
    font-size: 0.95rem;
    line-height: 1.45;
    margin-bottom: 1.1rem;
  }
}

@media (max-width: 768px) {
  .hero-secondary {
    font-size: 0.9rem;
    opacity: 0.8;
    text-decoration: underline;
    text-underline-offset: 3px;
  }
}

@media (max-width: 768px) {
  .hero-trust-points {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(0,0,0,0.06);
    font-size: 0.8rem;
    gap: 0.6rem;
  }
}

@media (max-width: 768px) {
  .hero-illustration-frame {
    border-radius: 14px;
    padding: 0;
    box-shadow: none;
  }

  .hero-visual {
    margin-top: 1.25rem;
    opacity: 0.95;
  }
}

@media (max-width: 768px) {
  .hero-text {
    text-align: left;
  }

  .hero-actions {
    align-items: stretch;
  }
}

@media (max-width: 768px) {
  .hero-illustration-frame {
    border-radius: 22px;
    overflow: hidden;

    border: 1px solid rgba(0, 0, 0, 0.06);
    background: #fff;
  }
}

@media (max-width: 768px) {
  .hero-illustration-frame {
    box-shadow:
      0 0 0 1px rgba(255,255,255,0.6) inset;
  }
}

/* ===============================
   HERO — MID BREAKPOINT FIX
   (450px–770px)
================================ */

@media (max-width: 770px) {
  .hero-inner {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    align-items: start;
  }
}

@media (max-width: 770px) {
  .hero-text {
    max-width: none;
    width: 100%;
  }
}

@media (max-width: 770px) {
  .hero-home .container {
    max-width: 100%;
    padding-left: 1.25rem;
    padding-right: 1.25rem;
  }
}

@media (max-width: 770px) {
  .hero-visual {
    max-width: 680px;
    margin: 0 auto;
  }
}

@media (max-width: 770px) {
  .hero-heading {
    font-size: clamp(1.8rem, 4.5vw, 2.2rem);
    line-height: 1.15;
  }

  .hero-body {
    font-size: 1rem;
  }
}

.site-footer {
  padding: 1.25rem 0;
  border-top: 1px solid var(--slate-200);
  background: var(--slate-25);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  justify-content: space-between;
  align-items: center;
}

/* ==============================
   Premium Select Styling
   ============================== */

.form-field select {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;

  width: 100%;
  padding: 0.7rem 0.9rem;
  padding-right: 2.25rem;

  font-family: inherit;
  font-size: 0.95rem;
  color: var(--slate-900);

  background-color: #fff;
  border: 1px solid var(--slate-200);
  border-radius: 10px;

  background-image:
    linear-gradient(45deg, transparent 50%, var(--slate-600) 50%),
    linear-gradient(135deg, var(--slate-600) 50%, transparent 50%);
  background-position:
    calc(100% - 1.2rem) 50%,
    calc(100% - 0.9rem) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;

  transition:
    border-color 0.15s ease,
    box-shadow 0.15s ease;
}

.form-field select:hover {
  border-color: var(--slate-300);
}

.form-field select:focus {
  outline: none;
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}

/* ==============================
   Mortgage Options Group updated (Final)
   ============================== */

.form-field-group {
  border: 1px solid var(--slate-700); /* darker than before */
  border-radius: 12px;
  padding: 0.85rem 0.9rem;
  background: linear-gradient(
    30deg,
    #ffffff,
    #f9fbfc
  );
  margin-top: 0.75rem;
}

/* Label */
.form-group-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--slate-600);
  margin-bottom: 0.5rem;
}

/* Spacing */
.form-field-group .form-field {
  margin-bottom: 0.6rem;
}

.form-field-group .form-field:last-child {
  margin-bottom: 0;
}

/* Checkbox */
.form-field--checkbox label {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.92rem;
  color: var(--slate-700);
}

/* Advanced options divider */
.advanced-options {
  margin-top: 0.4rem;
  padding-top: 0.4rem;
  border-top: 1px dashed var(--slate-300);
}

/* Focus state (unchanged but now additive) */
.form-field-group:focus-within {
  border-color: var(--teal-500);
  box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.12);
}





