/* ======================================================================================================
   Cost template (Wave 7, Run 32: /life-insurance-cost/in-your-70s). Figma 616:59 (phone) / 616:100 (desktop).
   Built on tokens.css + components.css + guide.css; every rule here is scoped to a c- class.
   Reused by the cost-by-age pages (Runs 33 to 36 add to this file only).
   ====================================================================================================== */

/* ---------- Hero: breadcrumb, H1, answer card, jump link, photo, byline ---------- */
.c-hero { padding: 20px 0 32px; }
.c-hero-in { display: flex; flex-direction: column; gap: 16px; }
.c-head { display: grid; gap: 10px; }
.f .c-h1 { font-size: var(--fs-h1-guide); line-height: 1.05; text-wrap: balance; }
.f .c-h1 em { display: block; font-style: italic; }
.c-answer { display: grid; gap: 14px; padding: 22px 20px; box-shadow: var(--shadow); }
.f .c-answer .c-a1 { font: 500 18px/1.55 var(--body); color: var(--ink); }
.c-answer .c-a1 strong { font-weight: 700; }
.f .c-answer .c-a2 { font: 400 18px/1.55 var(--body); color: var(--body-c); }
.c-ans-btn { width: 100%; margin-top: 4px; }
.c-jump { text-align: center; }
.f .c-jump a { display: inline-flex; align-items: center; min-height: var(--tap); color: var(--navy); font: 700 18px/1.3 var(--body); text-decoration: underline; text-underline-offset: .18em; }
.c-hero-pic { display: block; overflow: hidden; height: 200px; border-radius: var(--r-xl); }
.c-hero-pic img { display: block; width: 100%; height: 100%; object-fit: cover; object-position: 50% 30%; }
.c-crumbs .c-ell { display: none; }

/* ---------- Summary (locked L1) and the disclosure ---------- */
.c-live { padding: 8px 0 32px; }
.c-col { display: grid; gap: 20px; max-width: 820px; }
.c-col > *, .c-in > *, .c-wide > * { min-width: 0; }
.c-col > p, .c-more-b > p { font-size: var(--fs-body); line-height: 1.55; color: var(--body-c); }
.f .c-col a:not(.f-btn), .f .c-more-b a, .f .c-tlead a { color: var(--navy); font-weight: 600; text-decoration: underline; text-underline-offset: .18em; padding: 14px 0; }
.f .c-disc { padding: 20px 20px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--off); color: var(--body-c); }

/* ---------- Contents: closed disclosure on phones, chips on desktop (in the flow, never sticky) ---------- */
.c-toc { padding: 0 0 8px; }
.c-toc .f-toc-m { max-width: 560px; }
/* One sticky "Contents" pill on phones, from section 2 to the FAQ (style guide §9.8); it opens the contents disclosure */
.c-rest { position: relative; }
.f .c-pill { position: sticky; top: calc(var(--hdr-h) + 8px); z-index: 20; float: right; display: inline-flex; align-items: center; min-height: var(--tap);
  margin: 8px var(--gutter) -56px 0; padding: 0 18px; border-radius: var(--r-pill); background: var(--navy); color: var(--white);
  font: 700 16px/1 var(--body); text-decoration: none; box-shadow: 0 6px 18px rgba(14, 34, 51, .22); }
.f .c-pill:focus-visible { outline: var(--ring); outline-offset: 2px; }

/* ---------- Sections ---------- */
.c-sec { padding: 48px 0; }
.f .c-sec .f-head { margin-bottom: 18px; }
.f .c-sec .f-head h2 { font-size: 30px; line-height: 1.15; }
.c-in > * + * { margin-top: 18px; }
.c-col { gap: 18px; }
.c-wide > * + * { margin-top: 12px; }
.f .c-h3 { font: 700 20px/1.35 var(--body); color: var(--ink); text-wrap: balance; }
.c-cap, .c-col > .c-cap { margin-top: 0; padding: 0; font-size: 13px; line-height: 1.5; color: var(--body-c); }   /* table disclosures, as .f-cap */
.f .c-cap a { padding: 16px 0; font-weight: 400; }
.f .c-col .c-cap a:not(.f-btn) { padding: 16px 0; }   /* 13 px note text: keep the 48 px tap height */
.c-tcard { padding: 0; overflow: hidden; border-radius: var(--r-l); }
.f .c-tcard > h3.c-h3 { padding: 18px 16px 12px; font-size: 19px; }
.f .c-tlead { padding: 0 16px 16px; font-size: var(--fs-body); line-height: 1.6; color: var(--body-c); }
.c-tcard .f-table { min-width: 0; }
.c-t1 thead th { white-space: normal; vertical-align: bottom; }
.c-t1 th:first-child { width: 64px; }
.c-tcard .f-table th, .c-tcard .f-table td { padding: 14px 16px; }
.c-tcard .f-table tbody tr:last-child > * { border-bottom: 0; }
.c-t5p, .c-t5 { min-width: 560px; }
.c-tcard .c-t5p { min-width: 520px; }
.c-t5p tbody th, .c-t5 tbody th { white-space: normal; min-width: 128px; vertical-align: top; }
.c-t5p td, .c-t5 td { vertical-align: top; }
.c-prod { display: block; margin-top: 4px; font-weight: 400; font-size: 16px; color: var(--body-c); }
.c-tmax { min-width: 0; }
.c-tmax td, .c-tmax th { white-space: normal; vertical-align: top; }
.c-hint, .c-col > .c-hint { margin-top: 10px; font-size: 16px; color: var(--body-c); }
.c-tabs .gd-tablist { margin: 0 0 14px; }
.c-tabp + .c-tabp { margin-top: 16px; }
.c-tabp[hidden] + .c-tabp, .c-tabp + .c-tabp[hidden] { margin-top: 0; }
.c-nojs-l { padding: 0 0 8px; font-weight: 700; color: var(--ink); }
html.js .c-nojs-l { display: none; }
.c-dk { display: none; }

/* Estimate only (white card on a light band), good news (green), caveats (amber) */
.f .c-est { padding: 18px 20px; border: 1px solid var(--line); border-radius: var(--r-m); background: var(--off); color: var(--body-c); }
.c-est strong { color: var(--ink); }
.f .c-good { padding: 18px 20px; border-radius: var(--r-m); background: var(--green-bg); color: var(--green); }
.f .c-cav { margin: 0; padding: 18px 20px; border-radius: var(--r-m); font-size: 18px; line-height: 1.6; }

/* A real table drawn as bars: label and value, the bar, then the source */
.c-barcard { padding: 18px 16px; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--white); }
.c-bars, .c-bars tbody { display: block; }
.c-bars tbody { display: grid; gap: 16px; }
.c-bars tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "l v" "b b" "s s"; column-gap: 12px; row-gap: 8px; }
.c-bars tr::after { content: ""; grid-area: b; width: var(--w); height: 14px; border-radius: 7px; background: var(--navy);
  box-shadow: 0 0 0 0 transparent; }
.c-bars tr::before { content: ""; grid-area: b; height: 14px; border-radius: 7px; background: var(--mist); }
.c-bars th { grid-area: l; padding: 0; text-align: left; font: 700 18px/1.35 var(--body); color: var(--ink); }
.c-bars .c-bv { grid-area: v; padding: 0; font: 700 19px/1.35 var(--body); color: var(--ink); text-align: right; }
.c-bars .c-bs { grid-area: s; padding: 0; font-size: 16px; line-height: 1.5; color: var(--body-c); }

/* Factor and policy cards (structure over prose; style guide §9.4) */
.c-cards { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
.c-card { padding: 20px 20px; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--white); }
.f .c-card p { font-size: var(--fs-body); line-height: 1.55; color: var(--body-c); }
.c-card strong { color: var(--ink); }

/* After-quote card */
.c-aq { display: grid; gap: 14px; padding: 24px 20px; border: 2px solid var(--navy); border-radius: var(--r-l); background: var(--white); }
.f .c-aq h3 { font: 700 22px/1.3 var(--body); color: var(--ink); }
.f .c-aq p { color: var(--body-c); }
.c-aq-btn { width: 100%; }

/* Steps: number, question, answer */
.c-steps { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; counter-reset: c-step; max-width: 820px; }
.c-steps > li { position: relative; display: grid; gap: 8px; padding: 24px 20px 24px 72px; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--white); counter-increment: c-step; }
.c-steps > li::before { content: counter(c-step); position: absolute; left: 20px; top: 24px; display: flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; border-radius: 50%; background: var(--navy); color: var(--white); font: 700 17px/1 var(--body); }
.f .c-steps h3 { font: 700 19px/1.35 var(--body); color: var(--ink); }
.f .c-steps p { font-size: var(--fs-body); line-height: 1.55; color: var(--body-c); }
.f .c-steps h3 { text-wrap: pretty; }

/* "More about …" panels: one closed panel per section, everything inside in the HTML (style guide §9.1) */
.f .c-more { border: 1px solid var(--line); border-radius: var(--r-m); background: var(--cream-2); }
.f .c-more > summary { min-height: 64px; padding: 0 16px 0 20px; font: 600 17px/1.3 var(--body); color: var(--navy); gap: 10px; }
.c-more-b { display: grid; gap: 16px; padding: 4px 20px 24px; }
.f .c-more-b h3 { font: 700 19px/1.35 var(--body); color: var(--ink); margin-top: 4px; }

/* FAQ: the call button under the heading */
.c-faq-head { display: grid; gap: 20px; align-content: start; }
.c-faq-call { justify-self: start; min-height: 56px; padding: 0 26px; font-size: 18px; }

/* Keep reading: mist cards, the whole card is the link */
.f .c-krc { gap: 8px; padding: 22px 22px 24px; border-radius: var(--r-l); background: var(--mist); color: inherit; text-decoration: none; }
.f .c-krc h3 { font: 700 20px/1.35 var(--body); color: var(--navy); text-decoration: underline; text-underline-offset: .18em; }
.f .c-krc p { font-size: 17px; line-height: 1.55; color: var(--body-c); }
.f .c-krc:hover { background: #E2EEEC; }
.f .c-krc:focus-visible { outline: var(--ring); outline-offset: 2px; border-radius: var(--r-l); }
.c-kr .f-more { max-width: 300px; margin-top: 20px; background: var(--cream-2); }

/* Sources in a closed panel; the compliance paragraph stays visible */
.c-src { padding: 40px 0; }
.c-srcd { max-width: 820px; background: var(--white); }
.c-srcd .f-sources ol { margin: 0; padding-left: 22px; display: grid; gap: 8px; font-size: 13px; line-height: 1.5; color: var(--body-c); }
.c-src .f-compliance { max-width: 820px; margin-top: 24px; }

/* The close: face kept clear of the frosted panel on phones */
.c-close .gd-close-pic img { object-position: 50% 0; }

/* Phones narrower than 375 px: H1 32 px and the short breadcrumb (the full trail stays for screen readers) */
@media (max-width: 374px) {
  .f .c-h1 { font-size: 32px; }
  .c-hero { padding-top: 4px; }
  .c-hero-in { gap: 12px; }
  .c-head { gap: 4px; }
  .c-answer { gap: 10px; padding: 16px 16px; }
  .f .c-answer .c-a1, .f .c-answer .c-a2 { line-height: 1.5; }
  .c-crumbs .c-ell { display: inline-flex; }
  .c-crumbs .c-mid { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}

@media (min-width: 768px) {
  .c-dk { display: block; }
  .c-ph { display: none; }
  .c-cards-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .c-hero { padding: 56px 0 72px; }
  .c-hero-in { display: grid; grid-template-columns: minmax(0, 644px) minmax(0, 500px); grid-template-rows: auto auto auto 1fr; justify-content: space-between; column-gap: 56px; row-gap: 22px; }
  .c-head, .c-answer, .c-jump, .c-byline { grid-column: 1; }
  .c-hero-pic { grid-column: 2; grid-row: 1 / span 4; height: 560px; border-radius: var(--r-2xl); }
  .f .c-h1 { font-size: 60px; }
  .c-answer { padding: 30px 32px; gap: 12px; }
  .f .c-answer .c-a1 { font-size: 19px; line-height: 1.55; }
  .f .c-answer .c-a2 { font-size: 17px; }
  .c-ans-btn { width: auto; justify-self: start; }
  .c-jump { text-align: left; }
  .c-live { padding: 16px 0 40px; }
  .c-toc { padding: 0 0 24px; }
  .f .c-pill { display: none; }
  .c-sec { padding: 88px 0; }
  .f .c-sec .f-head { margin-bottom: 28px; }
  .c-in > * + * { margin-top: 24px; }
  .c-col .c-tcard { max-width: 820px; }
  .c-tcard .f-tscroll { padding: 0; }
  .c-tcard .f-table th, .c-tcard .f-table td { padding: 14px 24px; }
  .f .c-sec .f-head h2 { font-size: 44px; }
  .c-barcard { max-width: 820px; padding: 22px 24px; }
  .c-cards-1 { max-width: 820px; }
  .c-aq { padding: 28px 32px; }
  .c-aq-btn { width: auto; justify-self: start; }
  .c-faq-call { min-height: 56px; }
  .c-kr .f-grid-3 { gap: 20px; }
}

/* ======================================================================================================
   Run 33 additions (in your 60s): key takeaways in the hero, two answer buttons, woman / man tables side by side
   ====================================================================================================== */
.c-ans-acts { display: grid; gap: 10px; margin-top: 4px; }
.c-ans-acts .c-ans-btn { width: 100%; margin-top: 0; }
.c-kt { padding: 20px 20px 22px; }
.c-kt .f-ticks li { font-size: var(--fs-body); line-height: 1.55; }
.c-fm .c-tabp > .c-h3 { margin-bottom: 12px; }
.c-fm .c-nojs-l { display: none; }
.f .c-defs { display: grid; gap: 8px; margin: 0; padding-left: 22px; font-size: var(--fs-body); line-height: 1.55; color: var(--body-c); }
.c-t3 td, .c-t3 th { white-space: normal; }
.c-tw { min-width: 0; }
@media (min-width: 768px) {
  .c-fm .gd-tablist { display: none; }
  .c-fm .c-tabs { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; max-width: 1000px; }
  .c-fm .c-tabp[hidden] { display: block; }
  .c-fm .c-tabp + .c-tabp { margin-top: 0; }
}
@media (min-width: 1024px) {
  .c-ans-acts { display: flex; flex-wrap: wrap; gap: 12px; }
  .c-ans-acts .c-ans-btn { width: auto; }
  .c-kt { grid-column: 1; }
  .c-hero-in:has(.c-kt) { grid-template-rows: auto auto auto auto 1fr; }
  .c-hero-in:has(.c-kt) .c-hero-pic { grid-row: 1 / span 5; }
}
.c-t3 td, .c-t3 thead th:not(:first-child) { white-space: nowrap; }
.c-t3 tbody th { min-width: 96px; }

/* Run 34 (in your 80s): the answer buttons under the card, where a long answer would push the card past the first phone screen */
.c-ans-out { margin-top: -4px; }
@media (min-width: 1024px) { .c-ans-out { grid-column: 1; } }

/* Run 36 (whole life cost): a four-column price table that fits a 360 px phone without a swipe (copy REV 2) */
/* Wave 11, Run 48 (2026-10-30): a product picker with an amount switch over eight tables. Two groups of toggle buttons, shown
   only when JS runs; one table at a time with JS, every table in order without it */
.c-pickbar { display: grid; gap: 10px; margin: 0 0 20px; }
.c-pickg { display: flex; flex-wrap: wrap; gap: 8px; }
.c-pickg button { min-height: 48px; padding: 0 18px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--white); font: 700 17px/1.2 var(--body); color: var(--navy); cursor: pointer; }
.c-pickg button[aria-pressed="true"] { border-color: var(--navy); background: var(--navy); color: var(--white); }
.c-pickg button:focus-visible { outline: var(--ring); outline-offset: 2px; }
.c-pp[hidden] { display: none; }
.c-pp + .c-pp { margin-top: 28px; }
.c-pp > .c-h3 { margin-bottom: 12px; }
.c-more-b .c-pp + .c-pp, .c-more-b .c-pp { margin-top: 24px; }
.c-pickbar[hidden] { display: none; }
/* Wave 11, Run 48: a long short answer (about 95 words) under a three-line H1, so the card fits the first screen: tighter lines
   and padding, and on phones the short breadcrumb the template uses below 375 px (the full trail stays for screen readers) */
@media (max-width: 1023px) { .c-hero.c-hero-xl { padding-top: 8px; } .c-hero-xl .c-answer { padding: 14px; } .f .c-hero-xl .c-answer .c-a1 { line-height: 1.38; } }
@media (max-width: 767px) {
  .c-hero-xl .c-crumbs .c-ell { display: inline-flex; }
  .c-hero-xl .c-crumbs .c-mid { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
}
@media (min-width: 1024px) { .c-hero-xl .c-answer { padding: 24px 28px; } .f .c-hero-xl .c-answer .c-a1 { line-height: 1.42; } }
/* Wave 68 Run 239 (additions only): a tab row with four or more tabs (term cost: $100,000 to $1,000,000) is 488 px wide;
   below 768 px it becomes a 2 by 2 grid so the page does not scroll sideways. Same buttons, same 17 px type, same 48 px targets. */
@media (max-width: 767px) {
  .c-tabs .gd-tablist:has(> [role="tab"]:nth-child(4)) { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-radius: var(--r-xl); }
}
