/* Only the life-cost page uses these rules.

   The result hero, the supporting tiles and the Share result / Save as image row are the shared
   .results-page pieces from results.css. This file adds only what this calculator has on top: the
   quiet context line under the hero value, the fun-fact column, the legacy #how anchor and the
   source list. Everything is scoped, so no rule reaches another calculator. */
.life-results { min-width: 0; }
.life-results .life-hero { text-align: left; }
.life-results .life-hero .value { font-size: clamp(1.9rem, 4vw, 2.8rem); line-height: 1.15; }
.life-results .life-hero-live { min-width: 0; }
.life-results .life-hero-live .sub { font-size: 0.95rem; line-height: 1.5; }
.life-results .life-context { margin-top: 12px; font-size: 0.82rem; line-height: 1.6; opacity: 0.85; overflow-wrap: anywhere; }
.life-results .life-tiles .hint { font-size: 0.75rem; line-height: 1.4; }
.life-results .life-story[hidden] { display: none; }
.life-results .life-story h3 { font-size: 1.05rem; line-height: 1.4; margin: 0 0 10px; }
.life-results .life-pay { margin: 24px 0; }
.life-results .life-pay-options { display: flex; flex-wrap: wrap; gap: 8px; margin: 16px 0; }
.life-results .life-pay-options button { font: inherit; font-size: 0.85rem; min-height: 44px; padding: 8px 12px; border: 1px solid var(--border); border-radius: 24px; background: var(--card); color: var(--text); cursor: pointer; }
.life-results .life-pay-options button[aria-pressed="true"] { background: var(--primary); color: var(--on-primary); border-color: var(--primary); }
.life-results .life-pay-options button:focus-visible { outline: 2px solid var(--highlight); outline-offset: 3px; }
.life-results .life-pay-picture { display: flex; align-items: center; gap: 24px; padding: 20px; border-radius: var(--radius); background: var(--accent); }
.life-results .life-pay-ring { width: 140px; height: 140px; flex: none; border-radius: 50%; padding: 12px; background: conic-gradient(var(--highlight) var(--pay-fill, 0%), var(--border) 0); }
.life-results .life-pay-ring > div { height: 100%; border-radius: 50%; background: var(--card); display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 4px; }
.life-results .life-pay-ring strong { font-size: 1.15rem; color: var(--text); overflow-wrap: anywhere; max-width: 100%; text-align: center; }
.life-results .life-pay-ring span { font-size: 0.75rem; color: var(--muted); }
.life-results .life-pay-copy { min-width: 0; }
.life-results .life-pay-label { margin: 0; font-size: 0.85rem; color: var(--muted); }
.life-results .life-pay-insight { margin: 12px 0 0; font-weight: 600; line-height: 1.5; }
.life-results .life-caption { margin: 12px 0 6px; font-size: 0.9rem; line-height: 1.6; }
.life-results .life-assumption { color: var(--muted); font-size: 0.8rem; line-height: 1.5; margin: 8px 0 0; }
.life-results .life-comparisons { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px; margin: 24px 0; }
.life-results .life-comparisons > section { min-width: 0; padding-top: 16px; border-top: 2px solid var(--border); }
.life-results .life-number { font-weight: 700; font-size: 1.5rem; line-height: 1.3; margin: 10px 0; overflow-wrap: anywhere; }
.life-results .life-explorer { padding: 20px; border-radius: var(--radius); background: var(--accent); margin: 24px 0; }
.life-results .life-slider-label { display: flex; justify-content: space-between; font-weight: 600; margin: 16px 0 8px; }
.life-results .life-slider-label output { font-weight: 700; }
.life-results input[type="range"] { width: 100%; min-width: 0; min-height: 44px; margin: 0; accent-color: var(--primary); cursor: pointer; }
.life-results input[type="range"]:focus-visible { outline: 2px solid var(--highlight); outline-offset: 3px; border-radius: 5px; }
.life-results .life-saving { display: grid; gap: 4px; margin: 14px 0 18px; }
.life-results .life-saving strong { font-size: 1.2rem; }
.life-results .life-saving span { color: var(--muted); }
.life-results .life-scenario { margin-top: 12px; }
.life-results .life-scenario-label { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 6px; font-size: 0.85rem; margin-bottom: 6px; }
.life-results .life-scenario .gauge { background: var(--card); }
.life-results .life-scenario:last-of-type .fill { background: var(--highlight); }
.life-results .life-scenario .fill { transition: width 180ms ease; }
.life-results .life-table .share-cell { min-width: 104px; }
.life-results .life-table .share-cell .gauge { display: block; width: 100%; margin: 0 0 4px; }
.life-results .life-table .share-pct { display: block; }
@media (max-width: 600px) {
  .life-results .life-comparisons { grid-template-columns: minmax(0,1fr); gap: 16px; }
  .life-results .life-explorer { padding: 16px; }
  .life-results .life-pay-picture { flex-direction: column; align-items: flex-start; gap: 16px; padding: 16px; }
  .life-results .life-pay-ring { align-self: center; }
}
@media (prefers-reduced-motion: reduce) {
  .life-results .life-scenario .fill { transition: none; }
}

/* ---------------------------------------------------------------- The fun facts */

/* Five full-width cards, one under the other, at every width — including a wide desktop, where a
   shared two-column grid would otherwise pair them up. */
.life-page .calc-info .fact-list {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  margin-top: 14px;
}
.life-page .calc-info .fact {
  min-width: 0;
  padding: 14px 16px;
  border-left: 3px solid var(--highlight);
  border-radius: 0 12px 12px 0;
  background: var(--accent);
}
.life-page .calc-info .fact h3 {
  margin: 0 0 6px;
  font-size: 0.95rem;
  line-height: 1.4;
  overflow-wrap: break-word;
  white-space: normal;
}
.life-page .calc-info .fact p {
  margin: 0;
  max-width: 100%;
  font-size: 0.9rem;
  line-height: 1.55;
  overflow-wrap: break-word;
  white-space: normal;
}

/* ---------------------------------------------------------------- The method's sources */

.life-page .life-sources { margin: 12px 0 0; padding-left: 20px; }
.life-page .life-sources li { margin-bottom: 8px; line-height: 1.55; }
.life-page .life-sources a { color: var(--primary); }
.life-page .life-sources a:focus-visible { outline: 2px solid var(--highlight); outline-offset: 3px; border-radius: 4px; }

/* The old #how fragment still resolves: an empty anchor at the top of the section that replaced
   it, held at zero height so it adds nothing to the page. */
.life-page .life-legacy-anchor { display: block; height: 0; overflow: hidden; }
