/* Comparison template (final build, Wave 12, Run 51). The T7 v2 decision-tool structure in the locked style: the calm
   guide hero, the tool in a mist panel, price cards with hairlines, a navy border and a green tag on the pick, every
   "The catch:" line in the amber caveat colour, CSS bars beside the real tables, the frosted photo close.
   Loads after tokens.css, components.css and guide.css. Every class here is new (cmp-). */

/* ---------- Top: breadcrumb, H1, byline; the disclosure beside them on desktop; the tool under them ---------- */
.cmp-top { padding: 12px 0 40px; }
.cmp-top-in { display: grid; gap: 16px; }
.cmp-head { display: grid; gap: 10px; }
.f .cmp-head .f-gh1 { font-size: 34px; line-height: 1.08; }
.cmp-head .gd-byline { margin-top: 2px; }
.cmp-disc { order: 3; }
.cmp-disc .gd-disclose { margin: 0; }

/* ---------- The tool ---------- */
.cmp-tool { order: 2; overflow: hidden; border-radius: var(--r-xl); background: var(--mist); }
.cmp-picker { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 14px 12px; margin: 0; padding: 18px 16px 20px; }
.cmp-picker > .cmp-q:last-child:nth-child(3) { grid-column: 1 / -1; }
.cmp-q { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.cmp-q legend, .cmp-qlbl { padding: 0 0 8px; font: 700 16px/1.3 var(--body); color: var(--ink); }
fieldset.cmp-q legend { float: left; width: 100%; }
.cmp-seg { display: flex; clear: both; padding: 0; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--white); }
.cmp-seg input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.cmp-seg label { flex: 1; display: flex; align-items: center; justify-content: center; min-height: var(--tap); padding: 0 10px; border-radius: var(--r-pill);
  font: 700 17px/1.2 var(--body); color: var(--navy); cursor: pointer; transition: background-color 120ms ease, color 120ms ease; }
.cmp-seg input:checked + label { background: var(--navy); color: var(--white); }
.cmp-seg input:focus-visible + label { outline: var(--ring); outline-offset: var(--ring-offset); }
.cmp-sel { position: relative; }
.cmp-sel::after { content: ""; position: absolute; top: 50%; right: 20px; width: 9px; height: 9px; margin-top: -7px; border: solid var(--navy); border-width: 0 2px 2px 0;
  transform: rotate(45deg); pointer-events: none; }
.cmp-sel select { -webkit-appearance: none; appearance: none; width: 100%; min-height: var(--tap); padding: 0 44px 0 20px; 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; }
.cmp-sel select:focus-visible { outline: var(--ring); outline-offset: var(--ring-offset); }

.cmp-answer { display: grid; gap: 16px; padding: 20px 16px 24px; background: var(--white); }
.f .cmp-sentence { min-height: 224px; font: 500 21px/1.38 var(--serif); letter-spacing: -.005em; color: var(--ink); }
.cmp-cards { display: flex; flex-direction: column; gap: 12px; }
.cmp-card { order: 3; display: grid; gap: 8px; align-content: start; min-height: 262px; padding: 18px 20px 20px; border: 1px solid var(--line); border-radius: var(--r-m);
  background: var(--white); }
.cmp-card[hidden] { display: none !important; }
.cmp-card.is-pick { order: 1; padding: 17.5px 19.5px 19.5px; border: 1.5px solid var(--navy); }
.f .cmp-pick { justify-self: start; min-height: 1.6em; padding: 3px 12px; border-radius: var(--r-pill); background: var(--green-bg); font: 700 16px/1.35 var(--body);
  color: var(--green); visibility: hidden; }
.cmp-card.is-pick .cmp-pick { visibility: visible; }
.cmp-card-top { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.f .cmp-card-name { font: 500 21px/1.25 var(--serif); color: var(--ink); }
.f .cmp-tag { display: inline-flex; padding: 3px 10px; border: 1px solid var(--line); border-radius: var(--r-pill); background: var(--off); font: 600 16px/1.35 var(--body); color: var(--body-c); }
.f .cmp-price { display: flex; align-items: baseline; gap: 8px; margin: 2px 0 0; }
.f .cmp-price [data-f="price"] { font: 700 40px/1.05 var(--head); letter-spacing: -.01em; color: var(--ink); font-variant-numeric: tabular-nums; }
.f .cmp-mo { font-size: 17px; color: var(--body-c); }
.f .cmp-terms, .f .cmp-note { font-size: 17px; line-height: 1.5; color: var(--body-c); }
.f .cmp-note { font-size: 16px; }
.f .cmp-catch { font-size: 17px; line-height: 1.5; color: var(--amber); }
.cmp-catch strong { font-weight: 700; }

/* phones: the picked card first, then "Compare all three" (the other cards behind it), then the hedge */
details.cmp-all { order: 2; border-bottom: 1px solid var(--line); }
.cmp-all > summary { list-style: none; display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 52px; padding: 12px 4px; cursor: pointer;
  font: 700 17px/1.3 var(--body); color: var(--navy); }
.cmp-all > summary::-webkit-details-marker { display: none; }
.cmp-all:not([open]) ~ .cmp-card:not(.is-pick) { display: none; }
.cmp-all > summary:focus-visible { outline: var(--ring); outline-offset: var(--ring-offset); border-radius: var(--r-s); }

.f .cmp-hedge, .f .cmp-scope { font-size: 16px; line-height: 1.55; color: var(--body-c); }
.cmp-answer .gd-panel { margin-top: 0; }
.cmp-cta { display: grid; gap: 10px; justify-items: start; }
.f .cmp-cta p { font-size: 17px; color: var(--body-c); }

/* ---------- Sections below the tool ---------- */
.cmp-catches { display: grid; gap: 14px; }
.cmp-catch-card { display: grid; gap: 10px; align-content: start; padding: 22px 22px 18px; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--white); }
.f .cmp-catch-card h3 { font: 700 20px/1.3 var(--head); color: var(--ink); }
.f .cmp-catch-card p { line-height: 1.55; }
.f .cmp-catch-card a { justify-self: start; padding: 12px 0; font-weight: 700; color: var(--navy); text-decoration: underline; text-underline-offset: .18em; }
.cmp-panels { display: grid; gap: 12px; margin-top: 24px; }
.cmp-panels .gd-panel { margin-top: 0; }
.f .cmp-panels .gd-panel-b > * + * { margin-top: 14px; }

/* a price table whose cells carry a bar (the bars are decoration; the numbers are the record) */
.cmp-sbar { display: block; height: 10px; margin-bottom: 6px; border-radius: 5px; background: var(--mist); }
.cmp-sbar i { display: block; width: var(--w); height: 100%; border-radius: 5px; background: var(--navy); }

/* "What do 20 years of payments cost?": bars beside the real table; the chart does not change with the picker */
.cmp-chart { display: grid; gap: 18px; }
.f .cmp-chart-h { font: 700 20px/1.35 var(--head); color: var(--ink); }
.cmp-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 16px; color: var(--body-c); }
.cmp-legend span { display: inline-flex; align-items: center; gap: 8px; }
.cmp-legend span::before { content: ""; width: 14px; height: 14px; border-radius: 4px; background: var(--c); }
.cmp-bars { display: grid; gap: 14px; padding: 18px 16px; border: 1px solid var(--line); border-radius: var(--r-l); background: var(--white); }
.cmp-bar-row { display: grid; gap: 6px; }
.f .cmp-bar-y { font: 700 16px/1.3 var(--body); color: var(--ink); }
.cmp-bar { display: grid; grid-template-columns: minmax(0, 1fr) 70px; align-items: center; gap: 10px; }
.cmp-bar i { display: block; width: var(--w); height: 12px; border-radius: 6px; background: var(--c); }
.f .cmp-bar b { font: 700 16px/1 var(--head); color: var(--ink); text-align: right; font-variant-numeric: tabular-nums; }
.cmp-c1 { --c: var(--navy); } .cmp-c2 { --c: #7FAFCB; } .cmp-c3 { --c: #A8957A; }

/* "Which one fits you?" */
.cmp-fits { display: grid; gap: 14px; }
.cmp-notsure { display: grid; gap: 10px; margin-top: 18px; max-width: 860px; }
.f .cmp-notsure .cmp-notsure-a { font-weight: 600; color: var(--ink); }

/* Keep reading: the small label over each card title */
.f .cmp-krl { font: 700 16px/1.3 var(--body); color: var(--body-c); }

@media (min-width: 768px) {
  .cmp-fits { grid-template-columns: 1fr 1fr; }
}
@media (min-width: 1024px) {
  .cmp-top { padding: 32px 0 64px; }
  .cmp-top-in { grid-template-columns: minmax(0, 1fr) minmax(0, 420px); column-gap: 56px; row-gap: 28px; align-items: start; }
  .f .cmp-head .f-gh1 { font-size: 52px; line-height: 1.06; }
  .cmp-head { grid-column: 1; grid-row: 1; }
  .cmp-disc { grid-column: 2; grid-row: 1; align-self: end; }
  .cmp-tool { grid-column: 1 / -1; grid-row: 2; }
  .cmp-picker { display: flex; flex-wrap: wrap; align-items: end; gap: 16px 32px; padding: 22px 32px; }
  .cmp-q { min-width: 200px; }
  .cmp-seg label { padding: 0 20px; }
  .cmp-sel select { min-width: 128px; }
  .cmp-answer { gap: 20px; padding: 28px 32px 32px; }
  .f .cmp-sentence { min-height: 101px; font-size: 25px; }
  .cmp-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
  .cmp-card, .cmp-card.is-pick { order: 0; min-height: 258px; }
  details.cmp-all { display: none; }
  .cmp-all:not([open]) ~ .cmp-card:not(.is-pick) { display: grid; }
  .cmp-cta { grid-template-columns: auto 1fr; align-items: center; gap: 20px; }
  .cmp-catches { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .cmp-chart { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); align-items: start; column-gap: 32px; }
  .cmp-chart-h, .cmp-legend { grid-column: 1 / -1; }
}
@media (prefers-reduced-motion: reduce) { .cmp-seg label { transition: none; } }
/* a table title kept as its <caption> (T7 v2: the "Every age" table) */
.f .cmp-tcap { caption-side: top; padding: 0 0 12px; text-align: left; font: 700 18px/1.35 var(--head); color: var(--ink); }
/* grid children may shrink below their content, so a wide table scrolls inside its frame instead of widening the page */
.cmp-top-in > *, .cmp-answer > *, .cmp-panels > *, .cmp-chart > *, .cmp-catches > *, .cmp-fits > * { min-width: 0; }
.cmp-answer .gd-panel-b > *, .cmp-panels .gd-panel-b > * { min-width: 0; }
/* the head keeps breadcrumb, H1, byline in that order (guide.css reorders .gd-byline in its own heroes) */
.cmp-head > .f-crumbs { order: 1; } .cmp-head > .f-gh1 { order: 2; } .cmp-head > .gd-byline { order: 3; }
.cmp-seg label { white-space: nowrap; }
.cmp-card-top { flex-direction: column; align-items: flex-start; gap: 6px; }
/* phones: the picker and the answer sentence on the first screen (390 x 844, with the sticky header) */
@media (max-width: 1023px) {
  .cmp-top { padding-top: 4px; }
  .cmp-top-in { gap: 12px; }
  .cmp-head { gap: 6px; }
  .cmp-picker { gap: 10px 12px; padding: 14px 16px 16px; }
  .cmp-q legend, .cmp-qlbl { padding-bottom: 6px; }
  .cmp-answer { padding-top: 16px; }
}
@media (min-width: 1024px) { .cmp-head > * { grid-row: auto; grid-column: auto; } }   /* guide.css pins .gd-byline to row 2 in its hero grid */
/* the 20-year table beside the bars fits its half of the row: headers wrap instead of scrolling */
@media (min-width: 1024px) { .cmp-chart .f-table { min-width: 0; width: 100%; } .cmp-chart .f-table th { white-space: normal; } }
/* reserved heights: the largest sentence and card over every picker state at each width (measured), so a change never shifts the page */
.f .cmp-sentence { min-height: 236px; } .cmp-card, .cmp-card.is-pick { min-height: 362px; }
@media (min-width: 390px) { .cmp-card, .cmp-card.is-pick { min-height: 336px; } }
@media (min-width: 768px) { .f .cmp-sentence { min-height: 120px; } .cmp-card, .cmp-card.is-pick { min-height: 286px; } }
@media (min-width: 1024px) { .f .cmp-sentence { min-height: 106px; } .cmp-card, .cmp-card.is-pick { min-height: 362px; } }
@media (min-width: 1248px) { .cmp-card, .cmp-card.is-pick { min-height: 310px; } }
/* the pick tag sits in a row that always holds two lines ("Likely pick, if she can answer the questions" wraps), so the card never moves */
.cmp-pick-row { display: flex; align-items: flex-start; min-height: 52px; }
.f .cmp-pick { display: inline-block; min-height: 0; }
/* the reserved card heights again, with the two-line pick row (measured over every state) */
.cmp-card, .cmp-card.is-pick { min-height: 388px; }
@media (min-width: 390px) { .cmp-card, .cmp-card.is-pick { min-height: 362px; } }
@media (min-width: 768px) { .cmp-card, .cmp-card.is-pick { min-height: 310px; } }
@media (min-width: 1024px) { .cmp-card, .cmp-card.is-pick { min-height: 388px; } }
@media (min-width: 1248px) { .cmp-card, .cmp-card.is-pick { min-height: 336px; } }
/* each card's price holds the width of its widest price (set per card in the HTML), so "a month" never moves */
.f .cmp-price [data-f="price"] { display: inline-block; }
/* "Your age" is a <label> (it focuses the select): a 48 px tap area, the padding taken back by negative margins so nothing moves */
.cmp-q .cmp-qlbl { padding: 14px 0; margin: -14px 0 -6px; }
@media (max-width: 1023px) { .cmp-q .cmp-qlbl { margin-bottom: -8px; } }
/* Wave 12, Run 52 (additions only): three "fits" lists in one row on desktop */
@media (min-width: 1024px) { .cmp-fits.cmp-fits-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
/* Run 52, Colonial Penn vs Globe Life: its own reserved heights (longer sentences and the Colonial Penn units and footnote line; measured over every state) */
.cmp-tool[data-page="cvg"] .cmp-sentence { min-height: 292px; } .cmp-tool[data-page="cvg"] .cmp-card { min-height: 442px; }
@media (min-width: 390px) { .cmp-tool[data-page="cvg"] .cmp-sentence { min-height: 236px; } .cmp-tool[data-page="cvg"] .cmp-card { min-height: 392px; } }
@media (min-width: 768px) { .cmp-tool[data-page="cvg"] .cmp-sentence { min-height: 120px; } .cmp-tool[data-page="cvg"] .cmp-card { min-height: 316px; } }
@media (min-width: 1024px) { .cmp-tool[data-page="cvg"] .cmp-sentence { min-height: 140px; } .cmp-tool[data-page="cvg"] .cmp-card { min-height: 416px; } }
@media (min-width: 1248px) { .cmp-tool[data-page="cvg"] .cmp-sentence { min-height: 106px; } .cmp-tool[data-page="cvg"] .cmp-card { min-height: 366px; } }
/* Run 53, Colonial Penn vs Gerber Life: its own reserved card heights (the two-line tags and the Colonial Penn units line; measured over every state) */
.cmp-tool[data-page="cpg"] .cmp-card { min-height: 442px; }
@media (min-width: 390px) { .cmp-tool[data-page="cpg"] .cmp-card { min-height: 416px; } }
@media (min-width: 768px) { .cmp-tool[data-page="cpg"] .cmp-card { min-height: 316px; } }
@media (min-width: 1024px) { .cmp-tool[data-page="cpg"] .cmp-card { min-height: 416px; } }
@media (min-width: 1248px) { .cmp-tool[data-page="cpg"] .cmp-card { min-height: 366px; } }
/* Run 53: a link inside the hedge or a table source line gets a 48 px tap area (inline padding only; nothing moves) */
.f .cmp-hedge a, .f .cmp-tool .f-cap a, .f .cmp-panels .f-cap a { padding: 13px 0; }
/* Run 54, Transamerica vs Mutual of Omaha: its own reserved heights (one sentence, no health row; measured over every state) */
.cmp-tool[data-page="tvm"] .cmp-sentence { min-height: 206px; } .cmp-tool[data-page="tvm"] .cmp-card { min-height: 434px; }
@media (min-width: 390px) { .cmp-tool[data-page="tvm"] .cmp-sentence { min-height: 178px; } .cmp-tool[data-page="tvm"] .cmp-card { min-height: 388px; } }
@media (min-width: 768px) { .cmp-tool[data-page="tvm"] .cmp-sentence { min-height: 90px; } .cmp-tool[data-page="tvm"] .cmp-card { min-height: 284px; } }
@media (min-width: 1024px) { .cmp-tool[data-page="tvm"] .cmp-sentence { min-height: 106px; } .cmp-tool[data-page="tvm"] .cmp-card { min-height: 408px; } }
@media (min-width: 1248px) { .cmp-tool[data-page="tvm"] .cmp-sentence { min-height: 72px; } .cmp-tool[data-page="tvm"] .cmp-card { min-height: 336px; } }
/* Run 54: bars whose labels carry cents ("$14,688.00") get a wider label column, the same on every row so the bars stay comparable */
.cmp-bars-cents .cmp-bar { grid-template-columns: minmax(0, 1fr) 96px; }
/* Wave 13, Run 55 (additions only): a comparison of two cards ("Compare both") takes two columns on desktop */
@media (min-width: 1024px) { .cmp-cards.cmp-cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* a line under the cards shown for one answer (compare.js data-when); the row holds 48 px either way, so nothing moves */
.f .cmp-alt { display: flex; align-items: center; min-height: 48px; margin: -8px 0; }
.f .cmp-alt a { display: inline-flex; align-items: center; min-height: 48px; font-weight: 600; } .f .cmp-alt a[hidden] { display: none; }
/* the lead line between the byline and the tool */
.f .cmp-head .cmp-lede { max-width: 68ch; } .cmp-head > .cmp-lede { order: 4; }
/* Run 55, Mutual of Omaha vs Colonial Penn: its own reserved heights (two cards; the Colonial Penn footnote line at 80; measured over every state) */
.cmp-tool[data-page="mvc"] .cmp-sentence { min-height: 232px; } .cmp-tool[data-page="mvc"] .cmp-card { min-height: 536px; }
@media (min-width: 390px) { .cmp-tool[data-page="mvc"] .cmp-card { min-height: 462px; } }
@media (min-width: 768px) { .cmp-tool[data-page="mvc"] .cmp-sentence { min-height: 116px; } .cmp-tool[data-page="mvc"] .cmp-card { min-height: 338px; } }
@media (min-width: 1024px) { .cmp-tool[data-page="mvc"] .cmp-sentence { min-height: 104px; } .cmp-tool[data-page="mvc"] .cmp-card { min-height: 388px; } }
@media (min-width: 1248px) { .cmp-tool[data-page="mvc"] .cmp-card { min-height: 362px; } }
/* Run 55 (Master Chief, 2026-10-30): a page whose lead sits above the tool keeps it there on desktop; on phones the lead moves to
   just after the tool, before the disclosure, so the picker and the answer stay on the first screen. Order only; the HTML is unchanged. */
@media (max-width: 1023px) {
  .cmp-head.cmp-head-lede { display: contents; }
  .cmp-head-lede > .f-gh1 { margin-top: -6px; } .cmp-head-lede > .gd-byline { margin-top: -4px; }   /* the head's 6 px gap inside the 12 px one */
  .cmp-head-lede ~ .cmp-tool { order: 4; } .cmp-head-lede > .cmp-lede { order: 5; } .cmp-head-lede ~ .cmp-disc { order: 6; }
}
/* Run 56, guaranteed issue vs simplified issue: its own reserved heights (three plan types; measured over every state) */
.cmp-tool[data-page="gvs"] .cmp-sentence { min-height: 174px; } .cmp-tool[data-page="gvs"] .cmp-card { min-height: 386px; }
@media (min-width: 390px) { .cmp-tool[data-page="gvs"] .cmp-card { min-height: 360px; } }
@media (min-width: 768px) { .cmp-tool[data-page="gvs"] .cmp-sentence { min-height: 88px; } .cmp-tool[data-page="gvs"] .cmp-card { min-height: 308px; } }
@media (min-width: 1024px) { .cmp-tool[data-page="gvs"] .cmp-sentence { min-height: 104px; } .cmp-tool[data-page="gvs"] .cmp-card { min-height: 360px; } }
@media (min-width: 1248px) { .cmp-tool[data-page="gvs"] .cmp-sentence { min-height: 70px; } .cmp-tool[data-page="gvs"] .cmp-card { min-height: 358px; } }
