/* Plan and Thrive: the cost calculator (calculator_app).

   The site's own look, with as little of its own as possible: the site's
   body text (18px at standard size) for everything that isn't a heading,
   headings in the site's heading face, the site's cards, notes and
   tooltips. Three sizes only (2026-10-15):
     body text   inherited (1.125rem)
     --calc-h3   1.25rem   small headings: section labels, card titles
     --calc-h2   1.5rem    the results' headings, a card's total
   Exceptions: the "i" icon, the chart's axis labels, printed tables. */
:root { --calc-h3: 1.25rem; --calc-h2: 1.5rem; }

.calc-page legend, .calc-page summary,
.calc-page button, .calc-page input, .calc-page select {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: inherit;
}
.calc-head { margin-bottom: 1.25rem; }
.calc-head h1 { margin: 0 0 .25rem; }
.calc-head p { margin: 0; color: var(--ink-muted); }
.calc-head .calc-head-lede { color: var(--ink); margin: .25rem 0 .6rem; max-width: 52rem; }
.calc-head-points { margin: 0 0 .6rem; padding-left: 1.25rem; max-width: 52rem; }
.calc-head-points li { margin: .3rem 0; }
.calc-head .calc-head-brand { font-weight: 600; color: var(--ink-muted); }
/* The three steps: a plain numbered list. */
.calc-head-steps { margin: .5rem 0 .75rem; padding-left: 1.6rem; max-width: 52rem; }
.calc-head-steps li { margin: .25rem 0; }
.calc-head .calc-head-why { max-width: 52rem; color: var(--ink); }
.calc-head-how { max-width: 52rem; margin-top: .5rem; }
/* Notes on the page (beta, the feedback ask, low ratings): one plain look. */
.calc-head .calc-beta-note, .calc-feedback-ask, .calc-notice {
  max-width: 52rem; margin: .75rem 0; padding: .6rem .85rem; color: var(--ink);
  background: var(--wash); border: 1px solid var(--line); border-radius: var(--radius); }

/* One column, top to bottom: the steps, Your assumptions (open on arrival),
   the notes, the results, and the advanced assumptions at the foot. */
.calc-layout { display: block; }

/* Your assumptions, the plans compared and the advanced assumptions: the
   site's card (as on the report and survey pages). */
.calc-panel { margin: 1.25rem 0; }
.calc-panel-box, .calc-medical-box, .calc-swap.calc-swap, .calc-advanced-section {
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow); padding: .9rem 1.25rem 1rem;
}
.calc-panel-box > summary, .calc-medical-box > summary { padding: .2rem 0; }
.calc-medical-box { margin-top: 1rem; }
.calc-panel-title { display: inline; font-size: var(--calc-h3); margin: 0; color: var(--heading); }
/* Its sections side by side where there's room; one under another on a phone. */
.calc-panel-grid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 19em), 1fr));
  gap: 0 2rem; align-items: start;
}
.calc-panel-foot { border-top: 1px solid var(--line); margin-top: 1rem; padding-top: .75rem; }
.calc-panel-foot .calc-reset-all { margin-bottom: 0; }

.calc-swap.calc-swap { margin: 0 0 1.25rem; }
.calc-swap-title { float: left; width: 100%; font-size: var(--calc-h3); font-weight: 700; color: var(--heading); margin: 0 0 .3rem; padding: 0; }
.calc-swap-title + * { clear: left; }

/* Advanced assumptions: their own section at the foot of the page. */
.calc-advanced-section { margin: 2rem 0 1rem; }
.calc-advanced-section .calc-advanced { margin: 0; border: 0; padding: 0; }
.calc-advanced-section .calc-assume { max-width: 34rem; }
.calc-panel fieldset { border: 0; border-top: 1px solid var(--line); margin: 1rem 0 0; padding: .9rem 0 0; }
.calc-panel legend { font-size: var(--calc-h3); font-weight: 600; color: var(--ink); padding: 0; margin-bottom: .4rem; }
.calc-panel label { display: block; margin: .5rem 0; }
.calc-panel input[type=number], .calc-panel input[type=search],
.calc-panel input:not([type]), .calc-panel select,
.calc-advanced-section input[type=number] {
  display: block; width: 100%; box-sizing: border-box; margin-top: .2rem; padding: .45rem .6rem;
  border: 1px solid var(--field-border); border-radius: 6px;
  background: var(--paper); color: var(--ink); font-size: inherit;
}
.calc-pair { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.calc-hint, .calc-note { color: var(--ink-muted); margin: .3rem 0; }
.calc-error { color: var(--danger-text); margin: .2rem 0 .5rem; }
.calc-check { display: flex !important; gap: .5rem; align-items: baseline; }
.calc-check input { width: auto; }
.calc-quiz summary, .calc-more summary { color: var(--link); }
.calc-q { margin: .6rem 0 .2rem; }

.calc-button {
  font-size: inherit; padding: .35rem .75rem; min-height: 2.4rem; min-width: 2.4rem;
  border: 1px solid var(--field-border); border-radius: 6px;
  background: var(--paper); color: var(--ink); cursor: pointer;
}
.calc-button:hover { border-color: var(--ink); }
.calc-button[disabled] { color: var(--ink-muted); cursor: default; }
.calc-step { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; margin: .45rem 0; }
.calc-stepper { display: inline-flex; align-items: center; gap: .3rem; flex: none; }
.calc-stepper input { width: 3.4em !important; display: inline-block !important; text-align: center; margin: 0 !important; }
.calc-slider span { display: flex; align-items: center; gap: .6rem; }
.calc-slider input[type=range] { flex: 1; }
.calc-slider output { min-width: 3em; text-align: right; font-variant-numeric: tabular-nums; }
.calc-reset { margin: .3rem 0 .6rem; }
.calc-reset .calc-button { margin-top: .4rem; }

.calc-drugs { list-style: none; padding: 0; margin: .5rem 0; }
.calc-drugs li { display: flex; justify-content: space-between; align-items: center; gap: .5rem; padding: .3rem 0; border-bottom: 1px solid var(--line-soft); }
.calc-drug-results { list-style: none; padding: 0; margin: 0; border: 1px solid var(--line); border-radius: 6px; background: var(--paper); }
.calc-drug-results button { display: block; width: 100%; text-align: left; border: 0; background: none; padding: .5rem .6rem; cursor: pointer; color: var(--ink); font-size: inherit; }
.calc-drug-results button:hover, .calc-drug-results button:focus { text-decoration: underline; }

.calc-results { min-width: 0; transition: opacity .15s; }
.calc-results.loading { opacity: .6; }
/* "Updating your costs…": at the foot of the window, wherever the shopper is. */
.calc-updating { position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); z-index: 20;
  margin: 0; padding: .5rem 1rem; border-radius: var(--radius); background: var(--ink); color: var(--paper);
  box-shadow: 0 2px 8px rgba(0, 0, 0, .2); max-width: calc(100vw - 2rem); }
.calc-updating[hidden] { display: none; }
.calc-title { font-size: var(--calc-h2); margin: 0 0 .2rem; }
.calc-disclaimer-short { margin: .2rem 0 .6rem; font-weight: 600; }
.calc-disclaimer { border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem 1rem; margin: 1.25rem 0; }
.calc-disclaimer h2 { font-size: var(--calc-h3); margin: 0 0 .4rem; }
.calc-disclaimer p { margin: .4rem 0; }
.calc-lede { margin: 0 0 .75rem; }
.calc-empty { border: 1px solid var(--line); border-radius: var(--radius); padding: 1.5rem; }

.calc-table-wrap { overflow-x: auto; margin: .75rem 0; }
.calc-table-wrap:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }
.calc-table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.calc-table th, .calc-table td { padding: .5rem .6rem; border-bottom: 1px solid var(--line); text-align: right; vertical-align: top; }
.calc-table thead th { text-align: left; font-weight: 600; color: var(--ink); min-width: 9rem; border-bottom: 2px solid var(--ink); }
.calc-table tbody th { text-align: left; font-weight: 400; }
.calc-table .calc-total th, .calc-table .calc-total td { font-weight: 700; border-top: 2px solid var(--ink); }
.calc-sub { display: block; font-weight: 400; color: var(--ink-muted); }
.calc-lines { margin-bottom: .5rem; }
/* The "i" that opens a figure's notes (decision 14B): a small round button
   set apart from the number, so "$1,603" can't read as "$1,6034". */
.calc-info { display: inline-flex; align-items: center; justify-content: center; width: 1.15em; height: 1.15em;
  margin-left: .3em; border: 1px solid currentColor; border-radius: 50%; font: italic 700 .7em/1 Georgia, serif;
  text-decoration: none; color: var(--link); vertical-align: .25em; }
.calc-info:hover, .calc-info[aria-expanded="true"] { background: var(--link); color: var(--page); }
/* The site's tooltip (.tip), at body size. */
.calc-pop { position: absolute; z-index: 50; max-height: 60vh; overflow: auto; padding: .7rem .85rem;
  background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-left: 4px solid var(--gold);
  border-radius: var(--radius); box-shadow: var(--shadow); line-height: 1.5; }
.calc-pop-note + .calc-pop-note { margin-top: .6rem; padding-top: .6rem; border-top: 1px solid var(--line); }
.calc-pop .calc-source { display: block; margin-top: .35rem; color: var(--ink-muted); }
.calc-pop-close { margin-top: .6rem; }
@media print { .calc-info { display: none; } }
.calc-why { margin: .5rem 0 1rem; }
.calc-more { margin: .9rem 0; }
.calc-more h3 { font-size: var(--calc-h3); margin: 1rem 0 .3rem; }
.calc-long { border-top: 2px solid var(--ink); margin-top: 1.75rem; padding-top: 1.25rem; }
.calc-footnotes { margin: 1.5rem 0 0; padding: 1rem 0 0 1.5rem; border-top: 1px solid var(--line); }
.calc-footnotes li { margin: .45rem 0; }
.calc-footnotes li:target { outline: 2px solid var(--link); outline-offset: 2px; }
.calc-source { color: var(--ink-muted); }

.calc-cards, .calc-jump { display: none; }
.calc-cards { list-style: none; padding: 0; margin: .75rem 0; }
.calc-card { border-top: 2px solid var(--ink); padding: .75rem 0 .5rem; }
.calc-card h3 { font-size: var(--calc-h3); margin: 0; }
.calc-card-total { font-size: var(--calc-h2); font-weight: 700; margin: .4rem 0; }
.calc-card-total span { font-size: 1.125rem; font-weight: 400; color: var(--ink-muted); }
.calc-card dl { display: grid; grid-template-columns: 1fr auto; gap: .25rem 1rem; margin: 0; }
.calc-card dt { color: var(--ink); }
.calc-card dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }

.calc-longview { margin-top: 1rem; }
.calc-long-totals { max-width: 40rem; }
.calc-chart { margin: 1rem 0; }
.calc-chart svg { width: 100%; max-width: 44rem; height: auto; }
.calc-grid { stroke: var(--line); stroke-width: 1; }
.calc-axis { fill: var(--ink-muted); font-size: 16px; }
/* The long view's two colour families: Medicare Advantage and Medigap. */
:root { --calc-ma: #b4531a; --calc-medigap: #1f5fa8; }
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] { --calc-ma: #f0a165; --calc-medigap: #82b4ee; }
}
:root[data-theme="dark"] { --calc-ma: #f0a165; --calc-medigap: #82b4ee; }
.calc-line { fill: none; stroke: var(--ink); stroke-width: 2.75; stroke-linecap: round; }
.calc-line.calc-ma { stroke: var(--calc-ma); }
.calc-line.calc-medigap { stroke: var(--calc-medigap); }
.calc-line.calc-dotted { stroke-width: 3.25; }
.calc-swatch { display: inline-block; width: .8rem; height: .8rem; border-radius: 2px; margin-right: .5rem; vertical-align: baseline; }
.calc-swatch.calc-ma { background: var(--calc-ma); }
.calc-swatch.calc-medigap { background: var(--calc-medigap); }
.calc-subtitle { font-size: var(--calc-h3); margin: 1.5rem 0 .4rem; }
.calc-swap { border: 0; padding: 0; margin: 0 0 1rem; }
.calc-swap legend { font-weight: 600; padding: 0; }
.calc-swap .calc-hint { margin: .25rem 0 .5rem; }
.calc-swap-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: .75rem; }
.calc-swap-slot { display: flex; flex-direction: column; gap: .25rem; min-width: 0; }
.calc-swap-role { color: var(--ink-muted); }
.calc-swap-select { width: 100%; min-width: 0; font-size: inherit; min-height: 2.4rem; padding: .3rem .5rem;
  border: 1px solid var(--field-border); border-radius: 6px; background: var(--paper); color: var(--ink); }
.calc-disclaimer-short a { font-weight: 600; }
.calc-legend { list-style: none; padding: 0; margin: .25rem 0 0; }
.calc-legend li { display: grid; grid-template-columns: 44px 1fr; gap: .6rem; align-items: center; margin: .3rem 0; }
.calc-switch-note { margin: .75rem 0; }
.calc-links { margin: .5rem 0; padding-left: 1.25rem; }
.calc-links li { margin: .3rem 0; }
td.calc-left { text-align: left; }

.calc-appendix h2 { font-size: var(--calc-h2); margin: 1.5rem 0 .5rem; }
.calc-appendix h3 { font-size: var(--calc-h3); margin: 1rem 0 .3rem; }
.calc-kv th { width: 16rem; }
.calc-kv td { text-align: left; }
@media print {
  nav, header, footer, .calc-appendix .calc-button { display: none !important; }
  .calc-appendix { max-width: none; padding: 0; }
  .calc-table th, .calc-table td { padding: .2rem .4rem; }
  /* Paper doesn't scroll: wide tables shrink to the page instead. */
  .calc-table { font-size: .8rem; }
  .calc-table thead th { min-width: 0; }
  .calc-table-wrap { overflow: visible; }
}


@media (max-width: 700px) {
  .calc-results > .calc-table-wrap:first-of-type { display: none; }
  .calc-table thead th { min-width: 0; }
  .calc-cards, .calc-jump { display: block; }
}
/* Larger and Largest text: one plan at a time, as on a phone (decision
   16A). Six columns of large type become too narrow to read. */
:root[data-text-size="larger"] .calc-results > .calc-table-wrap:first-of-type,
:root[data-text-size="largest"] .calc-results > .calc-table-wrap:first-of-type { display: none; }
:root[data-text-size="larger"] .calc-cards,
:root[data-text-size="largest"] .calc-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(18em, 1fr)); gap: 0 1.5rem; }

.calc-version { color: var(--ink-muted); margin: 1.5rem 0 .25rem; }

.calc-plan-id { font-variant-numeric: tabular-nums; letter-spacing: .01em; }
.calc-optional { font-weight: 400; color: var(--ink-muted); }
.calc-drug-table td { text-align: left; }
.calc-not-covered { color: var(--danger, #b42318); font-weight: 600; }

.calc-assume { display: block; margin: .6rem 0; font-weight: 600; }
.calc-assume .calc-hint { display: block; font-weight: 400; }
.calc-assume-row { display: inline-flex; align-items: center; gap: .35rem; margin: .25rem 0; }
.calc-assume-row input { width: 6.5em; }
.calc-reset-all { margin: 1rem 0 .25rem; }
.calc-reset-all .calc-hint { display: block; margin-top: .3rem; }
.calc-plan-id { color: var(--ink-muted); }
.calc-muted { color: var(--ink-muted); font-style: italic; }
.calc-cur-is { display: flex; flex-wrap: wrap; gap: .1rem 1rem; margin: .25rem 0 0; padding: 0; border: 0; }
/* The drug names stay in view while the plans scroll sideways. */
.calc-drug-table th[scope="row"], .calc-drug-table thead th:first-child {
  position: sticky; left: 0; z-index: 1; background: var(--paper); box-shadow: 1px 0 0 var(--line); }
.calc-advanced-section .calc-assume-row input { width: 6.5em; display: inline-block; margin-top: 0; }
