/* =============================================================
   HANDLED MONEY — Design System
   "Build wealth. Enjoy life. Consider it handled."

   Edit colors and type here; every page inherits them.
   ============================================================= */

/* ---------- 1. Design tokens ---------- */
:root {
  /* Approved brand colors */
  --ink:        #17212B;   /* Handled Ink — primary text */
  --teal:       #0F5B5D;   /* Deep Teal — sections, primary CTAs */
  --mineral:    #557F9A;   /* Mineral Blue — travel, planning, info */
  --navy:       #1D3557;   /* Deep Navy — premium dark sections */
  --cranberry:  #9F4054;   /* Cranberry — destination points, active states */
  --eucalyptus: #789A91;   /* Cool Eucalyptus — life planning, secondary */
  --ivory:      #F7F4EF;   /* Editorial Ivory — primary canvas */
  --bluegray:   #E7EEF1;   /* Pale Blue-Gray — quiet panels */
  --white:      #FFFFFF;

  /* Derived tints (mixes of approved colors — no new hues) */
  --teal-deep:   #0B4547;
  --navy-deep:   #16294A;
  --ink-soft:    #3E4A56;      /* secondary text on light */
  --ivory-line:  #DDD6CB;      /* hairline rules on ivory */
  --teal-wash:   #E4ECEA;      /* teal-tinted panel */

  /* Text-safe darker shades of the two light accents — WCAG AA for
     small text on light backgrounds. Use the true brand colors for
     borders, fills, and large display type only. */
  --mineral-text:    #44677F;  /* Mineral Blue, deepened for small text */
  --eucalyptus-text: #4F6B62;  /* Cool Eucalyptus, deepened for small text */
  --cranberry-tint:  #D98A9B;  /* Cranberry, lightened for dark backgrounds */

  /* Type */
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "Source Sans 3", -apple-system, "Segoe UI", Helvetica, Arial, sans-serif;

  /* Scale */
  --text-xs: 0.8125rem;
  --text-sm: 0.9375rem;
  --text-base: 1.0625rem;
  --text-lg: 1.1875rem;
  --text-xl: 1.375rem;

  /* Layout */
  --container: 72rem;
  --container-narrow: 46rem;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --section-y: clamp(4rem, 9vw, 7.5rem);

  --radius: 2px;
  --radius-card: 4px;

  --shadow-card: 0 1px 2px rgba(23, 33, 43, 0.05), 0 8px 28px rgba(23, 33, 43, 0.07);
  --shadow-card-hover: 0 2px 4px rgba(23, 33, 43, 0.06), 0 16px 44px rgba(23, 33, 43, 0.12);

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: var(--text-base);
  line-height: 1.65;
  color: var(--ink);
  background: var(--ivory);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -0.01em;
  margin: 0 0 0.6em;
  color: var(--ink);
}

h1 { font-size: clamp(2.5rem, 6vw, 4.25rem); }
h2 { font-size: clamp(1.9rem, 3.8vw, 2.75rem); }
h3 { font-size: clamp(1.3rem, 2.2vw, 1.6rem); }
h4 { font-size: 1.15rem; }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--teal); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--cranberry); }

ul, ol { padding-left: 1.25rem; }

::selection { background: var(--teal); color: var(--white); }

/* Visible focus — never remove */
:focus-visible {
  outline: 2px solid var(--cranberry);
  outline-offset: 3px;
  border-radius: var(--radius);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--ink);
  color: var(--white);
  padding: 0.75rem 1.25rem;
  font-weight: 600;
}
.skip-link:focus { left: 0; }

/* ---------- 3. Layout primitives ---------- */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--narrow { max-width: var(--container-narrow); }

.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(2.75rem, 6vw, 4.5rem); }

/* Section color themes */
.theme-ivory    { background: var(--ivory); }
.theme-bluegray { background: var(--bluegray); }
.theme-white    { background: var(--white); }
.theme-tealwash { background: var(--teal-wash); }

.theme-teal, .theme-navy, .theme-ink {
  color: var(--ivory);
}
.theme-teal { background: var(--teal); }
.theme-navy { background: var(--navy); }
.theme-ink  { background: var(--ink); }

.theme-teal h1, .theme-teal h2, .theme-teal h3, .theme-teal h4,
.theme-navy h1, .theme-navy h2, .theme-navy h3, .theme-navy h4,
.theme-ink h1,  .theme-ink h2,  .theme-ink h3,  .theme-ink h4 {
  color: var(--white);
}
.theme-teal a, .theme-navy a, .theme-ink a { color: var(--bluegray); }
.theme-teal a:hover, .theme-navy a:hover, .theme-ink a:hover { color: var(--white); }

/* ---------- 4. Editorial details ---------- */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 1.1rem;
}
.kicker::before {
  content: "";
  width: 2rem;
  height: 1px;
  background: currentColor;
  opacity: 0.6;
}
.kicker--mineral { color: var(--mineral-text); }
.kicker--eucalyptus { color: var(--eucalyptus-text); }
.kicker--cranberry { color: var(--cranberry); }
.theme-teal .kicker, .theme-navy .kicker, .theme-ink .kicker { color: var(--bluegray); }

.lede {
  font-size: var(--text-lg);
  color: var(--ink-soft);
  max-width: 38em;
}
.theme-teal .lede, .theme-navy .lede, .theme-ink .lede { color: var(--bluegray); }

.rule {
  border: 0;
  border-top: 1px solid var(--ivory-line);
  margin: 0;
}

.fineprint {
  font-size: var(--text-xs);
  color: var(--ink-soft);
}
.theme-teal .fineprint, .theme-navy .fineprint, .theme-ink .fineprint {
  color: var(--bluegray);
  opacity: 0.85;
}

/* Editorial link: underline resolves in cranberry */
.link-editorial {
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  background-image: linear-gradient(var(--cranberry), var(--cranberry));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 1.5px;
  padding-bottom: 2px;
  transition: background-size 0.35s var(--ease-out), color 0.2s;
}
.link-editorial:hover, .link-editorial:focus-visible {
  color: var(--cranberry);
  background-size: 100% 1.5px;
}
.link-editorial .arrow { display: inline-block; transition: transform 0.3s var(--ease-out); }
.link-editorial:hover .arrow { transform: translateX(4px); }
.theme-teal .link-editorial, .theme-navy .link-editorial, .theme-ink .link-editorial { color: var(--white); }

/* ---------- 5. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  font-family: var(--font-body);
  font-size: var(--text-sm);
  font-weight: 600;
  letter-spacing: 0.04em;
  line-height: 1;
  padding: 1rem 1.75rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.25s, color 0.25s, border-color 0.25s, transform 0.25s var(--ease-out);
}
.btn:active { transform: translateY(1px); }

.btn--primary { background: var(--teal); color: var(--white); }
.btn--primary:hover { background: var(--teal-deep); color: var(--white); }

.btn--ink { background: var(--ink); color: var(--white); }
.btn--ink:hover { background: var(--navy); color: var(--white); }

.btn--outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn--outline:hover { background: var(--ink); color: var(--white); }

.btn--light { background: var(--ivory); color: var(--ink); }
.btn--light:hover { background: var(--white); color: var(--teal); }

.btn--outline-light {
  background: transparent;
  color: var(--white);
  border-color: rgba(247, 244, 239, 0.6);
}
.btn--outline-light:hover { background: var(--ivory); color: var(--ink); border-color: var(--ivory); }

.btn--small { padding: 0.65rem 1.15rem; font-size: var(--text-xs); }

/* Dark sections restyle links; buttons must keep their own colors.
   These raise specificity so a button never inherits the link color. */
.theme-teal .btn--primary, .theme-navy .btn--primary, .theme-ink .btn--primary,
.theme-teal .btn--ink, .theme-navy .btn--ink, .theme-ink .btn--ink { color: var(--white); }

.theme-teal .btn--light, .theme-navy .btn--light, .theme-ink .btn--light { color: var(--ink); }
.theme-teal .btn--light:hover, .theme-navy .btn--light:hover, .theme-ink .btn--light:hover { color: var(--teal); }

.theme-teal .btn--outline-light, .theme-navy .btn--outline-light, .theme-ink .btn--outline-light { color: var(--white); }
.theme-teal .btn--outline-light:hover, .theme-navy .btn--outline-light:hover, .theme-ink .btn--outline-light:hover { color: var(--ink); }

.theme-teal .panel-light .btn--primary,
.theme-navy .panel-light .btn--primary,
.theme-ink .panel-light .btn--primary { color: var(--white); }

/* ---------- 6. Announcement bar ---------- */
.announce {
  background: var(--ink);
  color: var(--ivory);
  text-align: center;
  font-size: var(--text-xs);
  letter-spacing: 0.05em;
  padding: 0.6rem var(--gutter);
}

/* ---------- 7. Header / navigation ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 244, 239, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s, box-shadow 0.3s;
}
.header.is-scrolled {
  border-bottom-color: var(--ivory-line);
  box-shadow: 0 4px 24px rgba(23, 33, 43, 0.05);
}

.nav {
  display: flex;
  align-items: center;
  gap: 2rem;
  max-width: var(--container);
  margin-inline: auto;
  padding: 1rem var(--gutter);
}

.brand {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.brand:hover { color: var(--teal); }
.brand .brand-mark { color: var(--cranberry); }
/* Cranberry is too dark against dark surfaces — use the lightened tint */
.footer .brand-mark,
.theme-ink .brand-mark,
.theme-navy .brand-mark,
.theme-teal .brand-mark { color: var(--cranberry-tint); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
  margin: 0 0 0 auto;
  padding: 0;
}

.nav-link {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  padding: 0.35rem 0;
  background-image: linear-gradient(var(--cranberry), var(--cranberry));
  background-repeat: no-repeat;
  background-position: 0 100%;
  background-size: 0% 2px;
  transition: background-size 0.3s var(--ease-out), color 0.2s;
}
.nav-link:hover, .nav-link:focus-visible { color: var(--cranberry); background-size: 100% 2px; }
.nav-link[aria-current="page"] { color: var(--cranberry); background-size: 100% 2px; }

.nav-utility { font-weight: 400; color: var(--ink-soft); }

.nav-cta { margin-left: 0.25rem; }

.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 1px solid var(--ivory-line);
  border-radius: var(--radius);
  padding: 0.55rem 0.7rem;
  cursor: pointer;
  color: var(--ink);
}
.nav-toggle-bars { display: block; width: 20px; height: 2px; background: currentColor; position: relative; }
.nav-toggle-bars::before, .nav-toggle-bars::after {
  content: ""; position: absolute; left: 0; width: 20px; height: 2px; background: currentColor;
  transition: transform 0.25s var(--ease-out), top 0.25s var(--ease-out);
}
.nav-toggle-bars::before { top: -6px; }
.nav-toggle-bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::before { top: 0; transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bars::after { top: 0; transform: rotate(-45deg); }

@media (max-width: 56rem) {
  .nav-toggle { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--ivory);
    border-bottom: 1px solid var(--ivory-line);
    padding: 0.75rem var(--gutter) 1.5rem;
    box-shadow: 0 24px 40px rgba(23, 33, 43, 0.12);
  }
  .nav-links.is-open { display: flex; }
  .nav-links li { border-bottom: 1px solid var(--ivory-line); }
  .nav-links li:last-child { border-bottom: 0; }
  .nav-link { display: block; padding: 0.9rem 0; background-image: none; }
  .nav-cta { margin: 1rem 0 0; }
  .nav-cta .btn { width: 100%; }
}

/* ---------- 8. Hero ---------- */
.hero {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
  overflow: hidden;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  margin-top: 2.25rem;
}
@media (max-width: 56rem) {
  .hero-grid { grid-template-columns: 1fr; }
}

/* ---------- 9. Photo placeholders (editorial frames) ----------
   Swap each .photo for a real <img> later; keep the aspect ratio class. */
.photo {
  position: relative;
  border-radius: var(--radius-card);
  overflow: hidden;
  background:
    linear-gradient(155deg, rgba(85, 127, 154, 0.28), rgba(15, 91, 93, 0.42)),
    linear-gradient(35deg, var(--bluegray), var(--eucalyptus));
  box-shadow: var(--shadow-card);
}
.photo::after {  /* linen texture */
  content: "";
  position: absolute; inset: 0;
  background-image:
    repeating-linear-gradient(0deg, rgba(247,244,239,0.05) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(23,33,43,0.04) 0 1px, transparent 1px 3px);
  pointer-events: none;
}
.photo--43 { aspect-ratio: 4 / 3; }
.photo--34 { aspect-ratio: 3 / 4; }
.photo--45 { aspect-ratio: 4 / 5; }
.photo--169 { aspect-ratio: 16 / 9; }
.photo--21 { aspect-ratio: 2 / 1; }

.photo--warm {
  background:
    linear-gradient(155deg, rgba(120, 154, 145, 0.35), rgba(29, 53, 87, 0.4)),
    linear-gradient(35deg, var(--ivory), var(--mineral));
}
.photo--navy {
  background:
    linear-gradient(155deg, rgba(29, 53, 87, 0.55), rgba(23, 33, 43, 0.6)),
    linear-gradient(35deg, var(--mineral), var(--navy));
}

/* Scrim so a caption stays legible over any photograph placed here */
.photo-caption::before {
  content: "";
  position: absolute;
  left: -1rem; right: -1rem; bottom: -1rem;
  height: calc(100% + 3rem);
  background: linear-gradient(to top, rgba(23, 33, 43, 0.72), rgba(23, 33, 43, 0));
  z-index: -1;
  pointer-events: none;
}

.photo-caption {
  position: absolute;
  left: 1rem; right: 1rem; bottom: 1rem;
  z-index: 1;
  font-size: var(--text-xs);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ivory);
  border-left: 2px solid var(--cranberry);
  padding-left: 0.75rem;
  opacity: 0.9;
}

/* Open frame offset — an editorial rule that outlines the image */
.frame {
  position: relative;
}
.frame::before {
  content: "";
  position: absolute;
  inset: -14px 14px 14px -14px;
  border: 1px solid var(--ivory-line);
  border-radius: var(--radius-card);
  pointer-events: none;
}
.theme-teal .frame::before, .theme-navy .frame::before, .theme-ink .frame::before {
  border-color: rgba(247, 244, 239, 0.25);
}

/* ---------- 10. Route line motif ---------- */
.route-line { display: block; overflow: visible; }
.route-line path {
  fill: none;
  stroke: var(--mineral);
  stroke-width: 1.5;
  stroke-dasharray: 4 6;
  stroke-linecap: round;
}
.route-line circle.route-dot { fill: var(--cranberry); }
.route-line circle.route-halo { fill: none; stroke: var(--cranberry); stroke-width: 1; opacity: 0.4; }

.is-revealed .route-line path {
  stroke-dashoffset: 600;
  animation: route-draw 2.4s var(--ease-out) forwards;
}
@keyframes route-draw {
  from { stroke-dashoffset: 600; }
  to { stroke-dashoffset: 0; }
}

/* ---------- 11. Cards ---------- */
.card {
  background: var(--white);
  border: 1px solid var(--ivory-line);
  border-radius: var(--radius-card);
  padding: 1.75rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }

/* A light card sitting inside a dark section. The dark-theme text rules
   would otherwise make headings and labels white on ivory — invisible.
   This resets everything inside back to the light-surface palette. */
.panel-light { background: var(--ivory); }
.theme-teal .panel-light,
.theme-navy .panel-light,
.theme-ink .panel-light { color: var(--ink); }

.theme-teal .panel-light h1, .theme-teal .panel-light h2,
.theme-teal .panel-light h3, .theme-teal .panel-light h4,
.theme-navy .panel-light h1, .theme-navy .panel-light h2,
.theme-navy .panel-light h3, .theme-navy .panel-light h4,
.theme-ink .panel-light h1,  .theme-ink .panel-light h2,
.theme-ink .panel-light h3,  .theme-ink .panel-light h4,
.theme-teal .panel-light label,
.theme-navy .panel-light label,
.theme-ink .panel-light label { color: var(--ink); }

.theme-teal .panel-light .lede, .theme-teal .panel-light .fineprint, .theme-teal .panel-light .form-note,
.theme-navy .panel-light .lede, .theme-navy .panel-light .fineprint, .theme-navy .panel-light .form-note,
.theme-ink .panel-light .lede,  .theme-ink .panel-light .fineprint,  .theme-ink .panel-light .form-note {
  color: var(--ink-soft);
  opacity: 1;
}

.theme-teal .panel-light a, .theme-navy .panel-light a, .theme-ink .panel-light a { color: var(--teal); }
.theme-teal .panel-light a:hover, .theme-navy .panel-light a:hover, .theme-ink .panel-light a:hover { color: var(--cranberry); }

.theme-teal .panel-light .field-error,
.theme-navy .panel-light .field-error,
.theme-ink .panel-light .field-error { color: var(--cranberry); }

.theme-teal .panel-light .form-success,
.theme-navy .panel-light .form-success,
.theme-ink .panel-light .form-success {
  background: var(--teal-wash);
  border-left-color: var(--teal);
  color: var(--ink);
}

/* Pillar cards — subtle color signal via top rule */
.pillar-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.25rem;
}
@media (max-width: 68rem) { .pillar-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 40rem) { .pillar-grid { grid-template-columns: 1fr; } }

.pillar {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--ivory-line);
  border-top: 3px solid var(--pillar-color, var(--teal));
  border-radius: var(--radius-card);
  padding: 1.75rem 1.5rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}
.pillar:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }

.pillar--today    { --pillar-color: var(--teal); }
.pillar--tomorrow { --pillar-color: var(--navy); }
.pillar--enjoy    { --pillar-color: var(--mineral); --pillar-label-color: var(--mineral-text); }
.pillar--prepare  { --pillar-color: var(--eucalyptus); --pillar-label-color: var(--eucalyptus-text); }

.pillar-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--pillar-label-color, var(--pillar-color, var(--teal)));
  margin-bottom: 0.75rem;
}
.pillar h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.pillar-topics {
  font-size: var(--text-sm);
  color: var(--ink-soft);
  margin: 0 0 1.25rem;
}
.pillar .link-editorial { margin-top: auto; font-size: var(--text-sm); }

/* Article cards */
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}
@media (max-width: 62rem) { .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 40rem) { .article-grid { grid-template-columns: 1fr; } }

.article-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--ivory-line);
  border-radius: var(--radius-card);
  overflow: hidden;
  box-shadow: var(--shadow-card);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}
.article-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }

.article-card .photo { border-radius: 0; box-shadow: none; }

.article-body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 1.4rem 1.5rem 1.6rem;
}
.article-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  font-size: var(--text-xs);
  color: var(--ink-soft);
  margin-bottom: 0.8rem;
}
.article-meta .dot-sep { width: 3px; height: 3px; border-radius: 50%; background: var(--ivory-line); }

.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.25rem 0.6rem;
  border-radius: 2px;
  background: var(--bluegray);
  color: var(--navy);
}
.tag--today    { background: var(--teal-wash); color: var(--teal); }
.tag--tomorrow { background: var(--bluegray); color: var(--navy); }
.tag--enjoy    { background: var(--bluegray); color: var(--mineral-text); }
.tag--prepare  { background: var(--teal-wash); color: var(--eucalyptus-text); }

.article-card h3 {
  font-size: 1.2rem;
  line-height: 1.3;
  margin-bottom: 0.6rem;
}
.article-card h3 a { color: inherit; text-decoration: none; }
.article-card h3 a:hover { color: var(--teal); }
.article-excerpt { font-size: var(--text-sm); color: var(--ink-soft); margin-bottom: 1rem; }
.article-body .link-editorial { margin-top: auto; font-size: var(--text-sm); align-self: flex-start; }

/* Product cards (Tools page) */
.product-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
}
@media (max-width: 62rem) { .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 40rem) { .product-grid { grid-template-columns: 1fr; } }

.product-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--ivory-line);
  border-radius: var(--radius-card);
  padding: 2rem 1.75rem;
  box-shadow: var(--shadow-card);
  transition: transform 0.35s var(--ease-out), box-shadow 0.35s var(--ease-out);
}
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-card-hover); }
.product-price {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--teal);
  margin-bottom: 1rem;
}
.badge {
  display: inline-block;
  align-self: flex-start;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.3rem 0.65rem;
  border-radius: 2px;
  margin-bottom: 1rem;
}
.badge--free   { background: var(--teal); color: var(--white); }
.badge--soon   { background: var(--bluegray); color: var(--navy); }
/* Materials finished, not yet open for purchase */
.badge--ready  { background: var(--teal-wash); color: var(--teal); }
/* In private beta — cranberry as the "you are here" marker */
.badge--beta   { background: transparent; color: var(--cranberry); box-shadow: inset 0 0 0 1px var(--cranberry); }

/* Format line under a product title: workbook, spreadsheet, app… */
.product-format {
  font-size: var(--text-xs);
  letter-spacing: 0.04em;
  color: var(--ink-soft);
  margin: -0.35rem 0 0.9rem;
}

/* ---------- 12. Principles / feature rows ---------- */
.principles {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 2.5rem;
}
@media (max-width: 56rem) { .principles { grid-template-columns: 1fr; } }

.principle {
  border-top: 1px solid var(--ivory-line);
  padding-top: 1.25rem;
}
.principle-num {
  font-family: var(--font-display);
  font-size: var(--text-sm);
  color: var(--cranberry);
  display: block;
  margin-bottom: 0.5rem;
}
.principle h3 { font-size: 1.2rem; margin-bottom: 0.35rem; }
.principle p { font-size: var(--text-sm); color: var(--ink-soft); }

.theme-teal .principle, .theme-navy .principle { border-top-color: rgba(247, 244, 239, 0.25); }
.theme-teal .principle p, .theme-navy .principle p { color: var(--bluegray); }
.theme-teal .principle-num, .theme-navy .principle-num { color: var(--ivory); opacity: 0.7; }

/* Benefit list with resolved-endpoint markers */
.benefit-list {
  position: relative;
  list-style: none;
  padding: 0;
  margin: 1.5rem 0;
  display: grid;
  gap: 0.85rem;
}
/* One continuous route line threading the destination dots */
.benefit-list::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 1em;
  bottom: 1.1em;
  width: 1px;
  background: var(--ivory-line);
}
.theme-teal .benefit-list::before,
.theme-navy .benefit-list::before,
.theme-ink .benefit-list::before { background: rgba(247, 244, 239, 0.35); }
.benefit-list li {
  position: relative;
  padding-left: 1.75rem;
  font-size: var(--text-base);
}
.benefit-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 9px; height: 9px;
  border-radius: 50%;
  background: var(--cranberry);
}
.benefit-list li::before { box-shadow: 0 0 0 3px var(--ivory); }
.theme-teal .benefit-list li::before { background: var(--ivory); box-shadow: 0 0 0 3px var(--teal); }
.theme-navy .benefit-list li::before { background: var(--ivory); box-shadow: 0 0 0 3px var(--navy); }
.theme-ink .benefit-list li::before { background: var(--ivory); box-shadow: 0 0 0 3px var(--ink); }
.theme-white .benefit-list li::before { box-shadow: 0 0 0 3px var(--white); }
.theme-bluegray .benefit-list li::before { box-shadow: 0 0 0 3px var(--bluegray); }
/* Inside a light card the dark-theme dot/line rules would render ivory on
   ivory — restore the light-surface treatment. */
.panel-light .benefit-list li::before,
.theme-teal .panel-light .benefit-list li::before,
.theme-navy .panel-light .benefit-list li::before,
.theme-ink .panel-light .benefit-list li::before {
  background: var(--cranberry);
  box-shadow: 0 0 0 3px var(--ivory);
}
.theme-teal .panel-light .benefit-list::before,
.theme-navy .panel-light .benefit-list::before,
.theme-ink .panel-light .benefit-list::before { background: var(--ivory-line); }

/* ---------- 13. Forms ---------- */
.form-stack {
  display: grid;
  gap: 1.1rem;
  max-width: 30rem;
}
.form-row { display: grid; gap: 0.4rem; }

label {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--ink);
}
.theme-teal label, .theme-navy label, .theme-ink label { color: var(--ivory); }

input[type="text"], input[type="email"], select, textarea {
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--ivory-line);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
  width: 100%;
  transition: border-color 0.2s, box-shadow 0.2s;
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px rgba(15, 91, 93, 0.15);
}
input[aria-invalid="true"], textarea[aria-invalid="true"] {
  border-color: var(--cranberry);
  box-shadow: 0 0 0 3px rgba(159, 64, 84, 0.12);
}
textarea { min-height: 8rem; resize: vertical; }

.field-error {
  font-size: var(--text-xs);
  font-weight: 600;
  color: var(--cranberry);
  display: none;
}
.field-error.is-visible { display: block; }
.theme-teal .field-error, .theme-navy .field-error { color: #F0C9D1; }

.form-note { font-size: var(--text-xs); color: var(--ink-soft); }
.theme-teal .form-note, .theme-navy .form-note, .theme-ink .form-note { color: var(--bluegray); }

.form-success {
  display: none;
  border-left: 3px solid var(--teal);
  background: var(--teal-wash);
  color: var(--ink);
  padding: 1.1rem 1.25rem;
  font-size: var(--text-sm);
  border-radius: var(--radius);
}
.form-success.is-visible { display: block; }
.theme-teal .form-success, .theme-navy .form-success {
  background: rgba(247, 244, 239, 0.12);
  border-left-color: var(--ivory);
  color: var(--ivory);
}

/* Inline (single-row) signup */
.form-inline {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.form-inline input { flex: 1 1 12rem; }
@media (max-width: 40rem) {
  .form-inline { flex-direction: column; }
  .form-inline .btn { width: 100%; }
}

/* ---------- 14. Assessment (What should you handle first?) ---------- */
.quiz {
  background: var(--white);
  border: 1px solid var(--ivory-line);
  border-radius: var(--radius-card);
  box-shadow: var(--shadow-card);
  padding: clamp(1.75rem, 4vw, 3rem);
  max-width: 44rem;
  margin-inline: auto;
}
.quiz-progress {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 2rem;
}
.quiz-progress-track {
  flex: 1;
  height: 2px;
  background: var(--bluegray);
  border-radius: 1px;
  overflow: hidden;
}
.quiz-progress-bar {
  height: 100%;
  background: var(--cranberry);
  width: 0%;
  transition: width 0.5s var(--ease-out);
}
.quiz-progress-text { font-size: var(--text-xs); color: var(--ink-soft); white-space: nowrap; }

.quiz-question h3 { margin-bottom: 1.5rem; }
.quiz-options { display: grid; gap: 0.75rem; }
.quiz-option {
  text-align: left;
  font-family: var(--font-body);
  font-size: var(--text-base);
  color: var(--ink);
  background: var(--ivory);
  border: 1px solid var(--ivory-line);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  cursor: pointer;
  transition: border-color 0.2s, background-color 0.2s, transform 0.2s var(--ease-out);
}
.quiz-option:hover {
  border-color: var(--teal);
  background: var(--teal-wash);
}
.quiz-option:active { transform: scale(0.995); }

.quiz-result { text-align: left; }
.quiz-result-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--cranberry);
  margin-bottom: 0.75rem;
}
/* The hand-off from the Clarity Check into the Midlife Money Reset */
.quiz-handoff {
  margin-top: 1.75rem;
  padding: 1.6rem;
  background: var(--ivory);
  border: 1px solid var(--ivory-line);
  border-left: 3px solid var(--cranberry);
  border-radius: var(--radius);
}
.quiz-handoff h4 { margin-bottom: 0.4rem; }
.quiz-handoff .fineprint { margin-bottom: 1.25rem; }
.quiz-handoff .form-stack { max-width: none; }

.quiz-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1.5rem;
  margin-top: 1.75rem;
}
.quiz-restart {
  background: none; border: none; cursor: pointer;
  font-family: var(--font-body); font-size: var(--text-sm); font-weight: 600;
  color: var(--ink-soft); text-decoration: underline; text-underline-offset: 3px; padding: 0.5rem 0;
}
.quiz-restart:hover { color: var(--cranberry); }

/* ---------- 15. Learn page filters ---------- */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-block: 1.75rem;
}
.filter-chip {
  font-family: var(--font-body);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: 0.06em;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--ivory-line);
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}
.filter-chip:hover { border-color: var(--teal); color: var(--teal); }
.filter-chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--white);
}
.filter-group-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 1.5rem 0 0.6rem;
}
.search-field { position: relative; max-width: 26rem; }
.search-field input { padding-left: 2.6rem; }
.search-field svg {
  position: absolute; left: 0.9rem; top: 50%;
  transform: translateY(-50%);
  width: 18px; height: 18px;
  color: var(--ink-soft);
  pointer-events: none;
}
/* Honest state while the library is still being written */
.library-notice {
  border: 1px solid var(--ivory-line);
  border-left: 3px solid var(--mineral);
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  margin-top: 2rem;
  max-width: 54em;
}
.library-notice p { font-size: var(--text-sm); color: var(--ink-soft); }
.library-notice p:last-child { margin-bottom: 0; }
.library-notice strong { color: var(--ink); }

.article-status {
  margin-top: auto;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--mineral-text);
}

.results-empty {
  display: none;
  text-align: center;
  color: var(--ink-soft);
  padding: 3rem 1rem;
  border: 1px dashed var(--ivory-line);
  border-radius: var(--radius-card);
}
.results-empty.is-visible { display: block; }

/* ---------- 16. Founder / About ---------- */
.founder-grid {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(2rem, 5vw, 4.5rem);
  align-items: center;
}
@media (max-width: 56rem) { .founder-grid { grid-template-columns: 1fr; } }

/* ---------- 17. Big closing statement ---------- */
.closing-statement {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.5vw, 3.25rem);
  line-height: 1.2;
  letter-spacing: -0.01em;
  max-width: 22em;
  margin-inline: auto;
  text-align: center;
}

/* ---------- 18. Footer ---------- */
.footer {
  background: var(--ink);
  color: var(--bluegray);
  padding-block: clamp(3rem, 6vw, 5rem) 2rem;
  font-size: var(--text-sm);
}
.footer a { color: var(--bluegray); text-decoration: none; }
.footer a:hover { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) repeat(3, minmax(0, 3fr));
  gap: 2.5rem;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(231, 238, 241, 0.15);
}
@media (max-width: 62rem) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 40rem) { .footer-grid { grid-template-columns: 1fr; } }

.footer .brand { color: var(--white); font-size: 1.25rem; }
.footer-heading {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: 1rem;
}
.footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }

.footer-legal {
  padding-top: 1.75rem;
  display: grid;
  gap: 1rem;
}
.footer-disclaimer {
  font-size: var(--text-xs);
  color: rgba(231, 238, 241, 0.7);
  max-width: 56em;
}
.footer-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 1.75rem;
  font-size: var(--text-xs);
  color: rgba(231, 238, 241, 0.7);
}
.footer-social { display: flex; gap: 1rem; }
.footer-social a {
  display: inline-flex;
  width: 34px; height: 34px;
  align-items: center; justify-content: center;
  border: 1px solid rgba(231, 238, 241, 0.25);
  border-radius: 50%;
  transition: border-color 0.2s, color 0.2s;
}
.footer-social a:hover { border-color: var(--white); text-decoration: none; }
.footer-social svg { width: 15px; height: 15px; }

/* ---------- 19. Page hero (interior pages) ---------- */
.page-hero { padding-block: clamp(3.5rem, 7vw, 5.5rem) clamp(2.5rem, 5vw, 4rem); }
.page-hero .lede { margin-top: 0.5rem; }

/* ---------- 20. Prose (legal / long-form pages) ---------- */
.prose { max-width: var(--container-narrow); }
.prose h2 { font-size: 1.5rem; margin-top: 2.5em; }
.prose h2:first-of-type { margin-top: 0; }
.prose h3 { font-size: 1.15rem; margin-top: 2em; }
.prose ul, .prose ol { margin-bottom: 1.1em; }
.prose li { margin-bottom: 0.4em; }

/* ---------- 21. Reveal on scroll ----------
   Hiding is gated behind html.js (added by main.js) so that
   without JavaScript every element stays fully visible. */
html.js .reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
html.js .reveal.is-revealed { opacity: 1; transform: none; }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  html.js .reveal { opacity: 1; transform: none; transition: none; }
  .is-revealed .route-line path { animation: none; stroke-dashoffset: 0; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* ---------- 22. Utilities ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
.stack-lg > * + * { margin-top: 2.5rem; }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}
.split {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}
@media (max-width: 56rem) { .split { grid-template-columns: 1fr; } }

/* =============================================================
   23. Learn article pages — reusable editorial components
   -------------------------------------------------------------
   Added for the Learn library. Every class below is shared across
   all article pages so markup stays consistent (see the article
   template in /learn-article-template.html). Uses only existing
   design tokens and approved brand colors — no new hues.
   ============================================================= */

/* ---- Breadcrumbs ---- */
.breadcrumbs { margin-bottom: 1.5rem; }
.breadcrumbs ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem;
  padding: 0;
  margin: 0;
  font-size: var(--text-xs);
  color: var(--ink-soft);
}
.breadcrumbs li { display: inline-flex; align-items: center; gap: 0.55rem; }
.breadcrumbs li + li::before {
  content: "";
  width: 5px; height: 5px;
  border-top: 1.5px solid var(--ink-soft);
  border-right: 1.5px solid var(--ink-soft);
  transform: rotate(45deg);
  opacity: 0.55;
}
.breadcrumbs a { color: var(--ink-soft); text-decoration: none; }
.breadcrumbs a:hover { color: var(--cranberry); text-decoration: underline; text-underline-offset: 3px; }
.breadcrumbs [aria-current="page"] { color: var(--ink); font-weight: 600; }

/* ---- Article header meta ---- */
.article-meta-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.9rem;
  margin-top: 1.75rem;
  font-size: var(--text-sm);
  color: var(--ink-soft);
}
.article-meta-row .dot-sep {
  width: 3px; height: 3px; border-radius: 50%;
  background: var(--ivory-line); display: inline-block;
}
.article-byline { font-weight: 600; color: var(--ink); }
.article-dates { font-size: var(--text-xs); color: var(--ink-soft); }

/* ---- "In this article" box ---- */
.toc {
  border: 1px solid var(--ivory-line);
  border-left: 3px solid var(--teal);
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  margin: 0 0 2.5rem;
  box-shadow: var(--shadow-card);
}
.toc-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 0.8rem;
}
.toc ol { margin: 0; padding-left: 1.2rem; display: grid; gap: 0.45rem; }
.toc li { font-size: var(--text-sm); }
.toc a { color: var(--teal); text-decoration: none; }
.toc a:hover { color: var(--cranberry); text-decoration: underline; text-underline-offset: 3px; }

/* ---- Article body measure & prose ---- */
.article-prose { max-width: 42rem; }
.article-prose h2 { font-size: 1.55rem; margin-top: 2.4em; }
.article-prose h2:first-of-type { margin-top: 0.1em; }
.article-prose h3 { font-size: 1.2rem; margin-top: 1.9em; }
.article-prose ul, .article-prose ol { margin-bottom: 1.15em; }
.article-prose li { margin-bottom: 0.5em; }
.article-prose figure { margin: 0; }

/* ---- Callout boxes ---- */
.callout {
  border: 1px solid var(--ivory-line);
  border-left: 3px solid var(--teal);
  background: var(--white);
  border-radius: var(--radius);
  padding: 1.5rem 1.7rem;
  margin: 2.25rem 0;
}
.callout-label {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin: 0 0 0.65rem;
  color: var(--teal);
}
.callout > :last-child { margin-bottom: 0; }
.callout h3 { font-size: 1.15rem; margin: 0 0 0.5rem; }
.callout--action  { border-left-color: var(--teal);       background: var(--teal-wash); }
.callout--action  .callout-label { color: var(--teal); }
.callout--wait    { border-left-color: var(--mineral);    background: var(--bluegray); }
.callout--wait    .callout-label { color: var(--mineral-text); }
.callout--example { border-left-color: var(--eucalyptus); background: var(--ivory); }
.callout--example .callout-label { color: var(--eucalyptus-text); }
.callout--pro     { border-left-color: var(--cranberry);  background: var(--white); }
.callout--pro     .callout-label { color: var(--cranberry); }

/* ---- Key takeaways ---- */
.takeaways {
  border: 1px solid var(--ivory-line);
  border-top: 3px solid var(--cranberry);
  background: var(--white);
  border-radius: var(--radius-card);
  padding: 1.9rem 2rem;
  margin: 2.75rem 0;
  box-shadow: var(--shadow-card);
}
.takeaways h2 { font-size: 1.35rem; margin-top: 0; margin-bottom: 1.1rem; }
.takeaways .benefit-list { margin: 0; }

/* ---- Data tables ---- */
.table-wrap {
  overflow-x: auto;
  margin: 2.25rem 0;
  border: 1px solid var(--ivory-line);
  border-radius: var(--radius);
  -webkit-overflow-scrolling: touch;
}
table.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--text-sm);
  min-width: 32rem;
  background: var(--white);
}
.data-table caption {
  text-align: left;
  font-size: var(--text-xs);
  color: var(--ink-soft);
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--ivory-line);
}
.data-table th, .data-table td {
  text-align: left;
  padding: 0.85rem 1rem;
  border-bottom: 1px solid var(--ivory-line);
  vertical-align: top;
}
.data-table thead th {
  background: var(--ivory);
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink);
  border-bottom: 2px solid var(--ivory-line);
}
.data-table tbody th { font-weight: 600; color: var(--ink); }
.data-table tbody tr:last-child td,
.data-table tbody tr:last-child th { border-bottom: 0; }

/* ---- Sources ---- */
.sources ol { padding-left: 1.4rem; display: grid; gap: 0.95rem; margin: 0; }
.source-item { font-size: var(--text-sm); color: var(--ink-soft); }
.source-item a { word-break: break-word; }
.source-dates { display: block; font-size: var(--text-xs); color: var(--ink-soft); margin-top: 0.2rem; }

/* ---- Educational disclaimer box ---- */
.article-disclaimer {
  border: 1px solid var(--ivory-line);
  border-left: 3px solid var(--ink-soft);
  background: var(--bluegray);
  border-radius: var(--radius);
  padding: 1.4rem 1.6rem;
  margin: 2rem 0 0;
  font-size: var(--text-sm);
  color: var(--ink-soft);
}
.article-disclaimer strong { color: var(--ink); }
.article-disclaimer :last-child { margin-bottom: 0; }

/* ---- Review line ---- */
.review-line {
  font-size: var(--text-xs);
  color: var(--ink-soft);
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--ivory-line);
}

/* ---- Article CTA panel (reuses .theme-teal section) ---- */
.article-cta .lede { margin-inline: auto; }
