/* ============================================================
   Two Neighbors: landing-page longevity-based planning story.
   Marketing surface: forest-green + gold brand tokens, editorial
   serif display, with two persona accents (long arc / short arc).
   Persona tokens (--persona-long / --persona-short) are declared on
   .marketing-page in LandingPage.css.
   ============================================================ */

.tn {
  --tn-serif: "Palatino Linotype", "Book Antiqua", Palatino, "Iowan Old Style", "Hoefler Text", Garamond, serif;

  position: relative;
  overflow: hidden;
  isolation: isolate;
  scroll-margin-top: 40px;
  padding: clamp(38px, 5vw, 72px) clamp(16px, 3vw, 48px) clamp(34px, 4vw, 56px);
  border-top: 1px solid rgba(205, 173, 113, 0.3);
  border-bottom: 1px solid rgba(205, 173, 113, 0.3);
  background:
    radial-gradient(circle at 12% 6%, rgba(205, 173, 113, 0.1), transparent 42%),
    radial-gradient(circle at 88% 96%, rgba(17, 71, 52, 0.07), transparent 44%),
    linear-gradient(180deg, #fffdf7 0%, #f6faf8 100%);
}

.tn-aura {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: radial-gradient(64% 48% at 50% -6%, rgba(205, 173, 113, 0.16), transparent 70%);
}

.tn-inner {
  position: relative;
  z-index: 1;
  max-width: 1440px;
  margin: 0 auto;
}

/* ---------- Intro ---------- */
.tn-intro {
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

.tn-kicker {
  display: inline-block;
  margin-bottom: 16px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #b8924d;
}

.tn-title {
  margin: 0;
  font-family: var(--tn-serif);
  font-weight: 800;
  font-size: clamp(2.05rem, 4.6vw, 3.3rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  color: var(--brand);
}

.tn-title em {
  display: block;
  margin-top: 4px;
  font-style: italic;
  /* Roomier line-height + bottom padding so the italic descenders (y, f)
     stay inside the background-clip: text paint box and aren't cut off. */
  line-height: 1.22;
  padding-bottom: 0.08em;
  background: linear-gradient(100deg, #b8924d 0%, #1f6b4f 78%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

.tn-lede {
  margin: 20px auto 0;
  /* Wide enough to keep the one-sentence lede on a single line on desktop/
     tablet; it still wraps naturally on phones where the intro is narrower. */
  max-width: 92ch;
  font-size: clamp(1rem, 1.4vw, 1.13rem);
  line-height: 1.7;
  color: var(--text-muted);
}

.tn-lede strong {
  color: var(--brand);
  font-weight: 700;
}

/* ---------- Shared starting point ---------- */
.tn-shared {
  margin: clamp(24px, 3.6vw, 40px) auto 0;
  max-width: 980px;
  text-align: center;
}

.tn-shared-head {
  margin-bottom: 18px;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #64748b;
}

/* Identical-start stat tiles */
.tn-tiles {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 1.6vw, 18px);
}

.tn-tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 9px;
  padding: clamp(18px, 2.2vw, 26px) 14px;
  border-radius: 18px;
  border: 1px solid rgba(205, 173, 113, 0.3);
  background: linear-gradient(170deg, #ffffff 0%, #fbf7ee 100%);
  box-shadow:
    0 12px 26px rgba(15, 23, 42, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

/* Two-class selector so the explicit size + content-box beat the
   `.marketing-page *` border-box reset (equal-specificity tie otherwise shrinks
   the glyph to a speck once padding is applied). */
.tn-tile .tn-tile-icon {
  box-sizing: content-box;
  width: 1.7rem;
  height: 1.7rem;
  padding: 11px;
  border-radius: 50%;
  color: var(--brand);
  background: var(--brand-soft);
  font-size: 1.7rem !important;
}

.tn-tile-value {
  font-family: var(--tn-serif);
  font-weight: 800;
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--text-main);
}

.tn-tile-value small {
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 0.5em;
  font-weight: 600;
  color: #64748b;
}

.tn-tile-label {
  font-size: 0.82rem;
  font-weight: 500;
  color: #64748b;
}

.tn-tile-note {
  font-size: 0.7rem;
  color: #94a3b8;
}

/* ---------- Interactive sliders (2026-08 compliance: reader-set inputs) ---------- */
.tn-shared-note {
  margin: -10px 0 16px;
  font-size: 0.84rem;
  color: #64748b;
}

/* Reset pill. Rendered at all times so its space is reserved; it fades in
   once a slider leaves its default instead of shifting the layout. */
.tn-reset {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 13px;
  border: 1px solid rgba(17, 71, 52, 0.28);
  border-radius: 999px;
  background: #fff;
  font: inherit;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--brand, #114734);
  vertical-align: middle;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(17, 71, 52, 0.08);
  transition: opacity 0.2s ease, background 0.15s ease, border-color 0.15s ease;
}

.tn-reset:hover,
.tn-reset:focus-visible {
  background: var(--brand-soft, #e3ebe7);
  border-color: rgba(17, 71, 52, 0.45);
}

.tn-reset-hidden {
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.tn-reset-icon {
  font-size: 15px !important;
}

/* Centered row between the slider note and the four starting tiles. */
.tn-reset-row {
  margin: -2px 0 14px;
  text-align: center;
}

/* Compact variant beside each card's lifespan slider (the shared tiles are a
   long scroll away, so the reset repeats here). */
.tn-reset-card {
  flex: none;
  margin-left: 2px;
  padding: 3px 10px;
  font-size: 0.75rem;
}

.tn-range {
  width: 100%;
  max-width: 170px;
  height: 18px;
  margin: 2px 0 0;
  accent-color: var(--brand);
  cursor: pointer;
}

.tn-tile .tn-range {
  max-width: 84%;
}

/* Per-card lifespan slider row */
.tn-life {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  font-size: 0.82rem;
  color: #64748b;
}

.tn-life-label {
  flex: none;
  font-weight: 600;
}

.tn-life .tn-range {
  flex: 1 1 auto;
  max-width: 250px;
  margin: 0;
  accent-color: var(--tn-accent);
}

.tn-life-value {
  flex: none;
  min-width: 52px;
  text-align: right;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: var(--tn-accent);
}

/* "100 − age rule is broken": visual allocation bar.
   Two-column layout — heading + note on the left, allocation bar on the right —
   so the block reads wide and short instead of tall. Collapses to a stack on
   narrow screens (see responsive block below). */
.tn-broken {
  margin: clamp(26px, 3.2vw, 40px) auto 0;
  max-width: 1040px;
  padding: clamp(18px, 2.2vw, 26px) clamp(22px, 2.6vw, 32px);
  border-radius: 18px;
  border: 1px solid rgba(192, 121, 58, 0.28);
  background: linear-gradient(180deg, rgba(192, 121, 58, 0.08), rgba(192, 121, 58, 0.02));
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
  grid-template-areas:
    "head  alloc"
    "note  alloc";
  align-items: center;
  column-gap: clamp(24px, 3vw, 48px);
  row-gap: 12px;
}

.tn-broken-head {
  grid-area: head;
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 8px;
}

.tn-broken-tag,
.tn-broken-verdict {
  font-family: var(--tn-serif);
  font-weight: 700;
  font-size: clamp(1.12rem, 1.9vw, 1.4rem);
}

.tn-broken-tag {
  color: var(--text-main);
}

.tn-broken-verdict {
  font-style: italic;
  color: #a85f29;
}

.tn-alloc {
  grid-area: alloc;
  align-self: center;
  display: flex;
  height: 46px;
  border-radius: 10px;
  overflow: hidden;
  box-shadow: inset 0 0 0 1px rgba(17, 71, 52, 0.08);
}

.tn-alloc-seg {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-grow: 0;
  flex-shrink: 0;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
  color: #ffffff;
}

.tn-alloc-eq {
  background: linear-gradient(135deg, #1f6b4f, #114734);
}

.tn-alloc-bd {
  background: linear-gradient(135deg, #a6b8af, #7e938a);
  color: #0f2a20;
}

.tn-broken-note {
  grid-area: note;
  margin: 0;
  text-align: left;
  font-size: 0.95rem;
  line-height: 1.55;
  color: var(--text-muted);
}

/* ---------- Divergence cards ---------- */
.tn-cards {
  margin: clamp(38px, 5vw, 62px) auto 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(20px, 2.6vw, 32px);
}

.tn-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: clamp(22px, 2.6vw, 34px);
  border-radius: 24px;
  border: 1px solid rgba(205, 173, 113, 0.28);
  background: linear-gradient(170deg, #ffffff 0%, #fdfaf3 100%);
  box-shadow:
    0 28px 56px rgba(15, 23, 42, 0.1),
    inset 0 1px 0 rgba(255, 255, 255, 0.92);
}

.tn-card.tn-healthy {
  --tn-accent: var(--persona-long);
  --tn-accent-weak: rgba(31, 122, 87, 0.1);
}

.tn-card.tn-impaired {
  --tn-accent: var(--persona-short);
  --tn-accent-weak: rgba(192, 121, 58, 0.1);
}

.tn-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: linear-gradient(90deg, transparent 0%, var(--tn-accent) 28%, var(--tn-accent) 72%, transparent 100%);
  opacity: 0.92;
  z-index: 2;
}

.tn-card::after {
  content: "";
  position: absolute;
  top: -42%;
  right: -16%;
  width: 56%;
  height: 72%;
  border-radius: 50%;
  background: radial-gradient(circle, var(--tn-accent-weak) 0%, transparent 66%);
  z-index: 0;
  pointer-events: none;
}

.tn-card > * {
  position: relative;
  z-index: 1;
}

.tn-card-head {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.tn-card-dot {
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 6px;
  border-radius: 50%;
  background: var(--tn-accent);
  box-shadow: 0 0 0 4px var(--tn-accent-weak);
}

.tn-card-id {
  flex: 1 1 auto;
  min-width: 0;
}

.tn-card-id h3 {
  margin: 0;
  font-size: 1.18rem;
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.01em;
  color: var(--text-main);
}

.tn-card-profile {
  margin: 3px 0 0;
  font-size: 0.9rem;
  color: #64748b;
}

.tn-arc {
  flex: none;
  text-align: right;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  line-height: 1.2;
  color: var(--tn-accent);
}

.tn-arc small {
  display: block;
  margin-top: 2px;
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  color: #64748b;
}

/* ---------- Hero multiple ---------- */
.tn-hero {
  margin-top: clamp(18px, 2vw, 26px);
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.tn-hero-num {
  font-family: var(--tn-serif);
  font-weight: 800;
  font-size: clamp(3.2rem, 7vw, 4.7rem);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--tn-accent);
  font-variant-numeric: tabular-nums;
}

.tn-hero-x {
  font-size: 0.5em;
  font-weight: 700;
  margin-left: 3px;
}

.tn-hero-label {
  max-width: 36ch;
  font-size: 0.98rem;
  font-weight: 500;
  color: var(--text-muted);
}

/* ---------- Chart ---------- */
.tn-chart {
  flex: 1 1 auto;
  margin-top: clamp(14px, 1.8vw, 20px);
}

.tn-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  margin-top: 8px;
  padding-left: 46px;
  font-size: 0.78rem;
  color: #64748b;
}

.tn-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.tn-legend-item::before {
  content: "";
  width: 18px;
}

.tn-legend-opt::before {
  border-top: 2.5px solid var(--tn-accent);
}

.tn-legend-gen::before {
  border-top: 2.5px dashed #94a3b8;
}

.tn-legend-band::before {
  width: 15px;
  height: 11px;
  border-radius: 3px;
  background: var(--tn-accent-weak);
  border: 1px solid var(--tn-accent);
}

/* Income-by-source bar chart legend + note (impaired card) */
.tn-bar-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 14px;
  margin-top: 10px;
  padding-left: 46px;
  font-size: 0.76rem;
  color: #475569;
}

.tn-bar-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.tn-bar-swatch {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

/* Info hover ("ⓘ" in the legend) — keeps the chart explanation off the card body */
.tn-info {
  display: inline-flex;
  align-items: center;
  cursor: help;
  outline: none;
}

.tn-info-icon {
  font-size: 1rem !important;
  color: #94a3b8;
  transition: color 140ms ease;
}

.tn-info:hover .tn-info-icon,
.tn-info:focus-visible .tn-info-icon {
  color: var(--tn-accent);
}

/* Hover overlay — portaled to <body>, so it uses literal colors (no inherited
   --tokens) and fixed positioning (no clipping by the card's overflow). */
.tn-info-pop {
  position: fixed;
  z-index: 80;
  transform: translate(-50%, calc(-100% - 10px));
  width: max-content;
  max-width: 280px;
  padding: 11px 13px;
  font-family: "Avenir Next", "Segoe UI", "Helvetica Neue", sans-serif;
  font-size: 0.82rem;
  line-height: 1.5;
  text-align: left;
  color: #334155;
  background: #ffffff;
  border: 1px solid rgba(17, 71, 52, 0.16);
  border-radius: 12px;
  box-shadow: 0 18px 38px rgba(15, 23, 42, 0.2);
  pointer-events: none;
  animation: tn-info-fade 140ms ease-out;
}

@keyframes tn-info-fade {
  from {
    opacity: 0;
    transform: translate(-50%, calc(-100% - 4px));
  }
  to {
    opacity: 1;
    transform: translate(-50%, calc(-100% - 10px));
  }
}

/* recharts tooltip */
.tn-tip {
  min-width: 174px;
  padding: 10px 12px;
  font-size: 0.84rem;
  background: #ffffff;
  border: 1px solid rgba(17, 71, 52, 0.14);
  border-radius: 10px;
  box-shadow: 0 14px 30px rgba(15, 23, 42, 0.16);
}

.tn-tip-age {
  margin-bottom: 6px;
  font-weight: 700;
  color: var(--text-main);
}

.tn-tip-sub {
  margin: 0 0 5px;
  font-size: 0.76rem;
  color: #94a3b8;
}

.tn-tip-row {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  padding: 2px 0;
}

.tn-tip-key {
  font-weight: 600;
}

.tn-tip-gen {
  color: #94a3b8;
}

.tn-tip-row b {
  color: var(--text-main);
  font-variant-numeric: tabular-nums;
}

/* ---------- Stat strip ---------- */
.tn-stat {
  margin-top: clamp(16px, 2vw, 22px);
  padding: 16px 18px;
  border-radius: 14px;
  background: var(--tn-accent-weak);
  border-left: 3px solid var(--tn-accent);
}

.tn-stat-main {
  font-family: var(--tn-serif);
  font-weight: 700;
  font-size: clamp(1.45rem, 2.4vw, 1.85rem);
  letter-spacing: -0.01em;
  color: var(--text-main);
}

.tn-stat-unit {
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  font-size: 0.86rem;
  font-weight: 600;
  letter-spacing: 0;
  color: #64748b;
}

.tn-stat-sub {
  margin-top: 6px;
  font-size: 0.92rem;
  line-height: 1.55;
  color: var(--text-muted);
}

.tn-stat-sub b {
  color: var(--text-main);
}

.tn-takeaway {
  margin: clamp(16px, 2vw, 20px) 0 0;
  font-size: 0.97rem;
  line-height: 1.65;
  color: #475569;
}

/* ---------- Closing + CTA ---------- */
.tn-close {
  margin: clamp(42px, 5vw, 66px) auto 0;
  max-width: 860px;
  text-align: center;
}

.tn-close-line {
  margin: 0;
  font-family: var(--tn-serif);
  font-style: italic;
  font-weight: 700;
  font-size: clamp(1.3rem, 2.6vw, 1.95rem);
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: var(--brand);
}

.tn-close-underline {
  text-decoration: underline;
  text-decoration-thickness: 2px;
  text-underline-offset: 5px;
}

.tn-cta {
  margin-top: clamp(22px, 3vw, 30px);
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
}

.tn-cta-primary,
.tn-cta-secondary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease;
}

.tn-cta-primary,
.tn-cta-primary:visited {
  color: #ffffff;
  background: linear-gradient(135deg, #114734 0%, #1f6b4f 100%);
  border: 1px solid rgba(205, 173, 113, 0.72);
  box-shadow: 0 14px 26px rgba(17, 71, 52, 0.26);
}

.tn-cta-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(17, 71, 52, 0.32);
}

.tn-cta-primary svg {
  width: 18px;
  height: 18px;
}

.tn-cta-secondary {
  color: var(--brand);
  background: rgba(227, 235, 231, 0.6);
  border: 1px solid rgba(205, 173, 113, 0.5);
}

.tn-cta-secondary:hover {
  transform: translateY(-2px);
  background: rgba(227, 235, 231, 0.96);
}

.tn-hero-hypo {
  font-size: 0.68rem;
  line-height: 1.45;
  color: #64748b;
  margin: 2px 0 10px;
}

.tn-assumptions {
  border-top: 1px solid rgba(17, 71, 52, 0.1);
  padding-top: 8px;
  margin: 10px 0 0;
}

.tn-assumptions summary {
  font-size: 0.7rem;
  font-weight: 600;
  color: #64748b;
  cursor: pointer;
}

.tn-assumptions summary:hover {
  color: #475569;
}

.tn-assumptions p {
  font-size: 0.7rem;
  line-height: 1.5;
  color: #64748b;
  margin: 6px 0 0;
}

.tn-disclosures {
  max-width: 860px;
  margin: 18px auto 0;
  text-align: left;
  border: 1px solid rgba(17, 71, 52, 0.14);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.6);
  padding: 12px 16px;
}

.tn-disclosures-assump {
  font-size: 0.72rem;
  font-weight: 600;
  color: #475569;
  margin: 0 0 8px;
}

.tn-disclosures-list {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 6px;
}

.tn-disclosures-list li {
  font-size: 0.7rem;
  line-height: 1.5;
  color: #64748b;
}

.tn-disclosures-def {
  font-size: 0.7rem;
  line-height: 1.5;
  color: #64748b;
  margin: 8px 0 0;
}

/* ---------- Responsive ---------- */
/* Side-by-side: reserve equal heights for the bits that wrap to different line
   counts so the two cards' rows line up (the chart area absorbs the slack and the
   stat strip + takeaway bottom-align). Only applied when the cards sit together. */
@media (min-width: 881px) {
  .tn-card-id h3 {
    min-height: 2.5em;
  }

  .tn-hero-label {
    min-height: 2.7em;
  }

  .tn-stat-sub {
    min-height: 2.9em;
  }

  .tn-takeaway {
    min-height: 4.9em;
  }
}

@media (max-width: 880px) {
  .tn-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .tn-tiles {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  /* Stack the broken-rule block back to a single column when it's too narrow
     to read side by side. */
  .tn-broken {
    grid-template-columns: 1fr;
    grid-template-areas:
      "head"
      "alloc"
      "note";
    row-gap: 14px;
  }

  .tn-broken-head {
    justify-content: center;
  }

  .tn-broken-note {
    text-align: center;
  }
}

@media (max-width: 520px) {
  .tn-legend,
  .tn-bar-legend {
    padding-left: 0;
  }

  .tn-cta-primary,
  .tn-cta-secondary {
    width: 100%;
    justify-content: center;
  }
}

@media (max-width: 768px) {
  /* Taller sliders for touch dragging, and let the tile/lifespan sliders use
     the full width so the small thumb is easier to grab on a phone. */
  .tn-range { height: 34px; }
  .tn-tile .tn-range { max-width: 100%; }
  .tn-life .tn-range { max-width: 100%; }
}


