/* The health care pages: what being ill costs.
 *
 * One stylesheet for all five pages, not five copies of one. The pages before
 * this group each got their own stylesheet and the five were near-identical,
 * which is the fault this project has already paid for twice: six pages broke
 * on one stray rule in a copied stylesheet, and three menus drifted apart
 * before they were made one. Every shape here is shared, and a page needing
 * something of its own adds it under its own class rather than copying this
 * file.
 *
 * The shell, the title section, the folded how-to, the side menu grid, the
 * fact bar and the floating panel all come from the shared stylesheets each
 * page links. Only the shapes this group adds are here.
 *
 * Every card sits on --bm-subtle rather than --bm-white, because a card the
 * same colour as the block behind it is invisible against the one thing a
 * reader actually sees it against.
 */

.hc-block {
  background: var(--bm-white);
  border: 1px solid var(--bm-border);
  border-radius: var(--bm-radius);
  box-shadow: var(--bm-shadow);
  padding: 1.25rem 1.4rem;
  margin: 0 0 1.25rem;
}
.hc-block h2 {
  font-family: var(--bm-mono);
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin: 0 0 0.7rem;
  color: var(--bm-accent);
}
.hc-block p { line-height: 1.65; }
.hc-block-lede { margin: 0 0 1.1rem; color: var(--bm-muted); font-size: 0.95rem; }
.hc-note { margin: 1rem 0 0; color: var(--bm-light); font-size: 0.85rem; line-height: 1.6; }
.hc-note a { color: var(--bm-accent); }
.hc-source { margin: 0.9rem 0 0; color: var(--bm-light); font-size: 0.8rem; line-height: 1.6; }
.hc-source a { color: var(--bm-accent); }

/* ---- the real price, before any policy figure ---- */

.hc-price { border-left: 4px solid var(--bm-accent); }
.hc-headline {
  font-family: var(--bm-mono);
  font-size: 2.5rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  line-height: 1.05;
}
.hc-per {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--bm-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.hc-big {
  font-family: var(--bm-mono);
  font-size: 1.9rem;
  font-weight: 700;
  margin: 0 0 0.6rem;
  line-height: 1.15;
}
.hc-point { margin: 0.9rem 0 0; font-weight: 600; }
.hc-split {
  display: flex;
  margin: 1.1rem 0 0.8rem;
  border-radius: var(--bm-radius);
  overflow: hidden;
  border: 1px solid var(--bm-border);
}
.hc-split div {
  padding: 0.55rem 0.7rem;
  font-family: var(--bm-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  overflow: hidden;
}
.hc-split-one { background: #0284c7; color: #ffffff; }
.hc-split-two { background: var(--bm-subtle); color: var(--bm-text); }

/* ---- a caveat that must travel with a figure ----
 *
 * Used wherever a figure is an average across everybody, a ceiling rather than
 * an amount, or a published figure for one programme being read beside a
 * different one. A striking figure without its caveat is the fault rather than
 * the finding.
 */

.hc-caveat {
  background: var(--bm-subtle);
  border-left: 3px solid #d97706;
  border-radius: var(--bm-radius);
  padding: 0.8rem 1rem;
  margin: 0.9rem 0 0;
  font-size: 0.92rem;
  line-height: 1.65;
}

/* ---- cards: a thing with a figure, a name and a sentence ---- */

.hc-cards { display: flex; flex-wrap: wrap; gap: 0.6rem; margin: 0 0 1.1rem; }
.hc-card {
  flex: 1 1 12rem;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
  align-items: flex-start;
  text-align: left;
  background: var(--bm-subtle);
  border: 1px solid var(--bm-border);
  border-top: 3px solid var(--bm-border-dark);
  border-radius: var(--bm-radius);
  padding: 0.7rem 0.85rem;
  color: var(--bm-text);
  font-family: inherit;
}
button.hc-card { cursor: pointer; }
button.hc-card:hover { border-color: var(--bm-accent); }
.hc-card.is-on {
  border-top-color: var(--bm-accent);
  box-shadow: inset 0 0 0 2px var(--bm-accent);
}
/* A thing with no published figure, marked so a reader can tell it apart from
 * a figure that failed to arrive. Those are two different things entirely. */
.hc-card.is-nofigure { border-top-style: dashed; }
.hc-card-figure {
  font-family: var(--bm-mono);
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.25;
}
.hc-card.is-nofigure .hc-card-figure {
  font-size: 1rem;
  color: var(--bm-light);
  font-weight: 600;
}
.hc-card strong { font-size: 0.88rem; }
.hc-card-under { font-size: 0.78rem; color: var(--bm-light); }
.hc-card-name {
  font-family: var(--bm-mono);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bm-light);
  margin: 0 0 0.3rem;
}

/* ---- lines of a bill, or steps of a calculation ---- */

.hc-lines { display: grid; gap: 0.8rem; }
.hc-line {
  background: var(--bm-subtle);
  border: 1px solid var(--bm-border);
  border-left: 3px solid var(--bm-accent);
  border-radius: var(--bm-radius);
  padding: 0.9rem 1rem;
}
.hc-line-cost {
  font-family: var(--bm-mono);
  font-size: 1.3rem;
  font-weight: 700;
  margin: 0;
  line-height: 1.2;
}
.hc-line-none { font-size: 1.05rem; color: var(--bm-muted); }
.hc-line-share {
  font-family: var(--bm-font);
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--bm-light);
}
.hc-line h3 {
  font-family: var(--bm-mono);
  font-size: 0.86rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin: 0.25rem 0 0.45rem;
}
.hc-line p { margin: 0; font-size: 0.92rem; }

/* ---- a definition list of terms about one thing ---- */

.hc-terms { margin: 0; }
.hc-terms dt {
  font-family: var(--bm-mono);
  font-size: 0.66rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bm-light);
  margin: 0.7rem 0 0.15rem;
}
.hc-terms dd { margin: 0; font-size: 0.9rem; line-height: 1.65; color: var(--bm-muted); }

/* ---- a table of published figures ----
 *
 * Wider than a phone in every case here, so it scrolls inside its own box and
 * the page itself never scrolls sideways.
 */

.hc-table {
  width: 100%;
  border-collapse: collapse;
  margin: 1rem 0 0;
  font-size: 0.86rem;
  display: block;
  overflow-x: auto;
}
.hc-table caption {
  font-family: var(--bm-mono);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bm-light);
  text-align: left;
  padding: 0 0 0.4rem;
}
.hc-table th,
.hc-table td {
  border: 1px solid var(--bm-border);
  padding: 0.4rem 0.55rem;
  text-align: left;
  white-space: nowrap;
}
.hc-table thead th,
.hc-table tbody th {
  background: var(--bm-subtle);
  font-family: var(--bm-mono);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--bm-light);
  font-weight: 600;
}
.hc-table td { font-family: var(--bm-mono); }
/* A name is prose and wraps; only the figures stay on one line. */
.hc-table tbody th { white-space: normal; min-width: 8rem; font-family: var(--bm-mono); }
.hc-total th,
.hc-total td {
  border-top: 2px solid var(--bm-accent);
  font-weight: 700;
}

/* ---- a button that shows the rest of a long table ---- */

.hc-more {
  background: var(--bm-subtle);
  border: 1px solid var(--bm-border);
  border-radius: var(--bm-radius);
  color: var(--bm-text);
  font-family: inherit;
  font-size: 0.86rem;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
}
.hc-more:hover { border-color: var(--bm-accent); }

/* ---- two cards side by side ---- */

.hc-pair {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
  gap: 0.9rem;
}
.hc-side {
  background: var(--bm-subtle);
  border: 1px solid var(--bm-border);
  border-top: 3px solid var(--bm-accent);
  border-radius: var(--bm-radius);
  padding: 0.9rem 1rem;
}
.hc-side h3 {
  font-family: var(--bm-mono);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin: 0 0 0.5rem;
}
.hc-side p { margin: 0 0 0.6rem; font-size: 0.92rem; }

/* ---- a plain list of findings ---- */

.hc-findings { margin: 1rem 0 0; padding-left: 1.1rem; }
.hc-findings li { margin: 0 0 0.6rem; line-height: 1.65; font-size: 0.93rem; }

/* ---- the dated history every page in this family carries ---- */

.hc-juncture {
  border-top: 1px solid var(--bm-border);
  padding: 1.1rem 0 0;
  margin: 1.1rem 0 0;
}
.hc-juncture:first-of-type { border-top: none; padding-top: 0; margin-top: 0; }
.hc-juncture-date {
  font-family: var(--bm-mono);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--bm-light);
  margin: 0;
}
.hc-juncture h3 { margin: 0.25rem 0 0.6rem; font-size: 1.02rem; }
.hc-juncture p { margin: 0 0 0.5rem; font-size: 0.93rem; }
.hc-juncture-end { color: var(--bm-muted); }

/* ---- the folded notes the family's pages end with ---- */

.hc-notes {
  background: var(--bm-white);
  border: 1px solid var(--bm-border);
  border-radius: var(--bm-radius);
  padding: 0.9rem 1.2rem;
  margin: 0 0 1rem;
}
.hc-notes summary { cursor: pointer; }
.hc-notes ul { margin: 0.8rem 0 0; padding-left: 1.1rem; }
.hc-notes li { margin: 0 0 0.6rem; line-height: 1.65; color: var(--bm-muted); font-size: 0.92rem; }
.hc-notes dl { margin: 0.8rem 0 0; }
.hc-notes dt { margin: 0.8rem 0 0.2rem; font-size: 0.9rem; font-weight: 600; }
.hc-notes dt:first-child { margin-top: 0; }
.hc-notes dt a { color: var(--bm-accent); }
.hc-notes dd { margin: 0; font-size: 0.86rem; line-height: 1.6; color: var(--bm-muted); }

@media (max-width: 640px) {
  .hc-headline { font-size: 2rem; }
  .hc-big { font-size: 1.5rem; }
  .hc-split { flex-direction: column; }
  .hc-table { font-size: 0.8rem; }
}

/* ---- buttons that re-sort a table ----
 *
 * On the pages where the spread between rows is the point, alphabetical order
 * hides it, so the table is sortable and the chosen sort is marked by a ring
 * rather than by a change of background.
 */

.hc-sorts { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: 0 0 0.8rem; }
.hc-sort {
  background: var(--bm-subtle);
  border: 1px solid var(--bm-border);
  border-radius: var(--bm-radius);
  color: var(--bm-text);
  font-family: inherit;
  font-size: 0.82rem;
  padding: 0.35rem 0.7rem;
  cursor: pointer;
}
.hc-sort:hover { border-color: var(--bm-accent); }
.hc-sort.is-on { box-shadow: inset 0 0 0 2px var(--bm-accent); font-weight: 600; }
