/* hdpf-article.css — the editorial article system for content pages.
 *
 * Layout: a reading column beside a sticky margin rail. The *content column
 * itself is a single column* — an earlier version split it into a measure
 * track plus a breakout track, which fought the content instead of serving it.
 * Width inside the column comes from .hdpf-figure, a floated image the copy
 * wraps around (and which falls inline on narrow screens).
 *
 * Type: body copy is set at reading size in full-strength ink, not muted
 * caption text. The lead paragraph steps up from it rather than the body
 * stepping down into a footnote.
 *
 * Tokens only (no raw hex). rem for layout/spacing, px for hairlines/shadows,
 * @container layout-root (rem thresholds) for breakpoints.
 */

/* ------------------------------------------------------------------ *
 * Shell — reading column + sticky margin rail
 * ------------------------------------------------------------------ */

.hdpf-article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 20rem;
  gap: var(--hdpf-space-10);
  align-items: start;
}

/* Single column. Everything in the body runs the full width of this track;
 * a floated figure is what creates the side-by-side rhythm. */
.hdpf-article__body {
  display: block;
  min-width: 0;
}

/* Kept so page markup stays stable: inside a single-column body this is just
 * rhythm — a block that wants clear air above and below, and must not sit
 * beside a floated figure. */
.hdpf-article__wide {
  clear: both;
  margin-block: var(--hdpf-space-7);
}

/* ------------------------------------------------------------------ *
 * Prose
 * ------------------------------------------------------------------ */

/* A section heading always starts a fresh band, below any floated figure. */
:where(.hdpf-article__body) > h2 {
  clear: both;
  margin: var(--hdpf-space-10) 0 var(--hdpf-space-5);
  font-family: var(--hdpf-font-display);
  font-size: var(--hdpf-fs-display-3);
  font-weight: var(--hdpf-fw-black);
  line-height: var(--hdpf-lh-tight);
  letter-spacing: var(--hdpf-tracking-tight);
  color: var(--hdpf-ink-strong);
  text-wrap: balance;
  scroll-margin-top: 6rem;
  text-transform: capitalize;
}

:where(.hdpf-article__body) > h2:first-child {
  margin-top: 0;
}

/* Drafting tick above each section heading — ties the article to the eyebrow
 * treatment used in every band on the home page. */
:where(.hdpf-article__body) > h2::before {
  content: "";
  display: block;
  width: 2rem;
  height: 2px;
  margin-bottom: var(--hdpf-space-4);
  background: var(--hdpf-accent);
  border-radius: var(--hdpf-radius-pill);
}

:where(.hdpf-article__body) > h3 {
  clear: both;
  margin: var(--hdpf-space-8) 0 var(--hdpf-space-3);
  font-family: var(--hdpf-font-ui);
  font-size: var(--hdpf-fs-headline);
  font-weight: var(--hdpf-fw-bold);
  color: var(--hdpf-ink-strong);
  scroll-margin-top: 6rem;
}

/* Body copy. What made this read like a footnote was the *colour*, not the
 * size: it was set in ink-muted, the same value used for captions and meta.
 * Full-strength ink and a roomier rhythm make it read as the main text it is,
 * while the lead keeps its original size to stay one clear step above.
 * :where() keeps these at zero specificity so a component class dropped into
 * the body still wins. */
:where(.hdpf-article__body) > :where(p, ul, ol) {
  margin-block: 0 var(--hdpf-space-5);
  font-size: var(--hdpf-fs-body);
  line-height: var(--hdpf-lh-relaxed);
  color: var(--hdpf-ink);
  text-wrap: pretty;
}

:where(.hdpf-article__body) > :where(ul, ol) {
  padding-left: var(--hdpf-space-6);
  display: grid;
  gap: var(--hdpf-space-3);
}

:where(.hdpf-article__body) li::marker {
  color: var(--hdpf-accent);
}

/* Lead — the answer-first opener, one step above body copy. Deliberately not
 * bold and not display-sized: it sets up the section, it doesn't shout. */
.hdpf-article__lead {
  font-size: var(--hdpf-fs-title);
  line-height: var(--hdpf-lh-relaxed);
  color: var(--hdpf-ink);
}

/* Links in running copy: underlined, but with the descender-clearing offset
 * that makes long-form text readable rather than striped. */
:where(.hdpf-article__body) a:not(.hdpf-btn):not(.hdpf-inline-cta) {
  color: var(--hdpf-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
  text-decoration-color: color-mix(in srgb, var(--hdpf-accent) 45%, transparent);
  transition: color var(--hdpf-duration-fast) var(--hdpf-ease-standard),
    text-decoration-color var(--hdpf-duration-fast) var(--hdpf-ease-standard);
}

:where(.hdpf-article__body) a:not(.hdpf-btn):not(.hdpf-inline-cta):hover {
  color: var(--hdpf-accent-hover);
  text-decoration-color: currentColor;
}

:where(.hdpf-article__body) strong {
  font-weight: var(--hdpf-fw-semibold);
  color: var(--hdpf-ink-strong);
}

@container layout-root (max-width: 52rem) {
  :where(.hdpf-article__body) > h2 {
    margin-top: var(--hdpf-space-9);
  }
}

/* ------------------------------------------------------------------ *
 * Margin rail — sticky, beside the reading column
 * ------------------------------------------------------------------ */

.hdpf-rail {
  position: sticky;
  top: 5.5rem;
  display: flex;
  flex-direction: column;
  gap: var(--hdpf-space-5);
  min-width: 0;
}

/* Consult card — the persistent conversion anchor beside the copy. */
.hdpf-rail__card {
  position: relative;
  overflow: hidden;
  padding: var(--hdpf-space-6);
  border: 1px solid var(--hdpf-border);
  border-radius: var(--hdpf-radius-xl);
  background: var(--hdpf-surface);
  box-shadow: var(--hdpf-shadow-sm);
}

/* Blueprint ruling washed behind the card, masked so it fades out downward. */
.hdpf-rail__card::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--hdpf-bp-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--hdpf-bp-line) 1px, transparent 1px);
  background-size: var(--hdpf-bp-size) var(--hdpf-bp-size);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 70%);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.55), transparent 70%);
  pointer-events: none;
}

.hdpf-rail__card > * {
  position: relative;
  z-index: 1;
}

.hdpf-rail__title {
  margin: 0 0 var(--hdpf-space-2);
  font-family: var(--hdpf-font-display);
  font-size: var(--hdpf-fs-headline);
  font-weight: var(--hdpf-fw-extrabold);
  line-height: var(--hdpf-lh-snug);
  letter-spacing: var(--hdpf-tracking-tight);
  color: var(--hdpf-ink-strong);
  text-wrap: balance;
}

.hdpf-rail__text {
  margin: 0 0 var(--hdpf-space-5);
  font-size: var(--hdpf-fs-caption);
  line-height: var(--hdpf-lh-relaxed);
  color: var(--hdpf-ink-muted);
  text-wrap: pretty;
}

/* One row: the consult CTA takes the space, the phone sits beside it as an
 * icon-only button of matching height. */
.hdpf-rail__actions {
  display: flex;
  align-items: stretch;
  gap: var(--hdpf-space-2);
}

.hdpf-rail__actions > .hdpf-btn:not(.hdpf-btn--icon-only) {
  flex: 1 1 auto;
  min-width: 0;
}

.hdpf-rail__actions > .hdpf-btn--icon-only {
  flex: 0 0 auto;
}

.hdpf-rail__meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--hdpf-space-2) var(--hdpf-space-4);
  margin: var(--hdpf-space-5) 0 0;
  padding-top: var(--hdpf-space-4);
  border-top: 1px dashed var(--hdpf-border-strong);
  list-style: none;
  padding-left: 0;
}

.hdpf-rail__meta li {
  display: inline-flex;
  align-items: center;
  gap: var(--hdpf-space-2);
  font-size: var(--hdpf-fs-micro);
  font-weight: var(--hdpf-fw-semibold);
  color: var(--hdpf-ink-muted);
  text-transform: capitalize;
}

.hdpf-rail__meta .hdpf-icon {
  color: var(--hdpf-success);
  flex-shrink: 0;
}

/* Rail block — generic titled group (the at-a-glance facts). */
.hdpf-rail__block {
  padding: var(--hdpf-space-5) var(--hdpf-space-6);
  border: 1px solid var(--hdpf-border);
  border-radius: var(--hdpf-radius-xl);
  background: var(--hdpf-surface-inset);
}

.hdpf-rail__label {
  display: block;
  margin: 0 0 var(--hdpf-space-3);
  font-family: var(--hdpf-font-mono);
  font-size: var(--hdpf-fs-micro);
  letter-spacing: var(--hdpf-tracking-wider);
  text-transform: uppercase;
  font-weight: var(--hdpf-fw-semibold);
  color: var(--hdpf-ink-muted);
}

/* Facts — label / value pairs, set like a drawing title block. */
.hdpf-rail__facts {
  margin: 0;
  display: grid;
  gap: var(--hdpf-space-3);
}

.hdpf-rail__facts > div {
  display: grid;
  gap: var(--hdpf-space-1);
  padding-bottom: var(--hdpf-space-3);
  border-bottom: 1px solid var(--hdpf-divider);
}

.hdpf-rail__facts > div:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.hdpf-rail__facts dt {
  font-family: var(--hdpf-font-mono);
  font-size: var(--hdpf-fs-micro);
  letter-spacing: var(--hdpf-tracking-wide);
  text-transform: uppercase;
  color: var(--hdpf-ink-muted);
}

.hdpf-rail__facts dd {
  margin: 0;
  font-size: var(--hdpf-fs-caption);
  font-weight: var(--hdpf-fw-semibold);
  color: var(--hdpf-ink);
}

/* Narrow: the rail stops sticking and stacks after the body, keeping DOM order
 * and visual order identical. The consult card drops out — the page intro's
 * buttons and the closing CTA band already carry it — leaving the facts as a
 * closing spec sheet. */
@container layout-root (max-width: 64rem) {
  .hdpf-article {
    grid-template-columns: 1fr;
    gap: var(--hdpf-space-8);
  }

  .hdpf-rail {
    position: static;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .hdpf-rail > * {
    flex: 1 1 16rem;
  }

  .hdpf-rail__card {
    display: none;
  }
}

/* ------------------------------------------------------------------ *
 * Figure — an inline image the copy wraps around
 * ------------------------------------------------------------------ */

.hdpf-figure {
  float: right;
  width: min(22rem, 45%);
  margin: var(--hdpf-space-2) 0 var(--hdpf-space-6) var(--hdpf-space-7);
}

.hdpf-figure--left {
  float: left;
  margin: var(--hdpf-space-2) var(--hdpf-space-7) var(--hdpf-space-6) 0;
}

/* Wider variant for a photo that deserves more room. */
.hdpf-figure--wide {
  width: min(28rem, 55%);
}

.hdpf-figure__frame {
  position: relative;
  overflow: hidden;
  border: 1px solid var(--hdpf-border-strong);
  border-radius: var(--hdpf-radius-xl);
  background: var(--hdpf-surface-inset);
  box-shadow: var(--hdpf-shadow-md);
}

.hdpf-figure__img {
  display: block;
  width: 100%;
  height: auto;
}

/* Illustration variant — blueprint grid behind the line art. */
.hdpf-figure__frame--ill {
  display: grid;
  place-items: center;
  padding: var(--hdpf-space-5);
  background-color: var(--hdpf-surface-inset);
  background-image:
    linear-gradient(var(--hdpf-bp-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--hdpf-bp-line) 1px, transparent 1px);
  background-size: var(--hdpf-bp-size) var(--hdpf-bp-size);
}

.hdpf-figure__frame--ill .hdpf-ill {
  width: 100%;
  height: auto;
}

.hdpf-figure__caption {
  display: block;
  margin-top: var(--hdpf-space-3);
  font-family: var(--hdpf-font-mono);
  font-size: var(--hdpf-fs-micro);
  letter-spacing: var(--hdpf-tracking-wide);
  text-transform: uppercase;
  color: var(--hdpf-ink-muted);
}

/* Overlay caption chip — used on the page-intro media plane, where the caption
 * sits on the image rather than under it. */
.hdpf-media-caption {
  position: absolute;
  left: var(--hdpf-space-4);
  bottom: var(--hdpf-space-4);
  display: inline-flex;
  align-items: center;
  gap: var(--hdpf-space-2);
  padding: var(--hdpf-space-1) var(--hdpf-space-3);
  border-radius: var(--hdpf-radius-pill);
  background: color-mix(in srgb, var(--hdpf-surface) 92%, transparent);
  border: 1px solid var(--hdpf-border);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  font-family: var(--hdpf-font-mono);
  font-size: var(--hdpf-fs-micro);
  letter-spacing: var(--hdpf-tracking-wide);
  text-transform: uppercase;
  color: var(--hdpf-ink-muted);
}

/* Narrow: stop floating and let the figure fall into the flow. */
@container layout-root (max-width: 46rem) {
  .hdpf-figure,
  .hdpf-figure--left,
  .hdpf-figure--wide {
    float: none;
    width: 100%;
    margin: var(--hdpf-space-6) 0;
  }
}

/* ------------------------------------------------------------------ *
 * Spec strip — "at a glance", set like a drawing title block
 * ------------------------------------------------------------------ */

.hdpf-specs {
  display: flex;
  flex-wrap: wrap;
  gap: 1px;
  margin: 0;
  padding: 0;
  border: 1px solid var(--hdpf-border);
  border-radius: var(--hdpf-radius-xl);
  background: var(--hdpf-border);
  overflow: hidden;
}

.hdpf-specs > div {
  flex: 1 1 15rem;
  display: grid;
  gap: var(--hdpf-space-2);
  padding: var(--hdpf-space-5);
  background: var(--hdpf-surface);
}

.hdpf-specs dt {
  display: flex;
  align-items: center;
  gap: var(--hdpf-space-2);
  font-family: var(--hdpf-font-mono);
  font-size: var(--hdpf-fs-micro);
  letter-spacing: var(--hdpf-tracking-wider);
  text-transform: uppercase;
  color: var(--hdpf-ink-muted);
}

.hdpf-specs dt .hdpf-icon {
  color: var(--hdpf-accent);
  flex-shrink: 0;
}

.hdpf-specs dd {
  margin: 0;
  font-family: var(--hdpf-font-display);
  font-size: var(--hdpf-fs-title);
  font-weight: var(--hdpf-fw-bold);
  line-height: var(--hdpf-lh-snug);
  color: var(--hdpf-ink-strong);
  text-wrap: balance;
}

/* ------------------------------------------------------------------ *
 * Check grid — "what's included", as scannable cards instead of bullets
 * ------------------------------------------------------------------ */

/* Flex, not grid, so the last row fills the space it's given. Under auto-fit
 * columns a lone trailing item sat in one track with the rest of the row empty
 * beside it — six items read fine, seven looked broken. Flex items grow into
 * whatever the row has left, so any count lands square. The basis is 16rem to
 * keep the same column count the grid produced in the reading column. */
.hdpf-checks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--hdpf-space-3);
}

.hdpf-checks li {
  flex: 1 1 16rem;
  min-width: 0;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--hdpf-space-4);
  align-items: start;
  padding: var(--hdpf-space-5);
  border: 1px solid var(--hdpf-border);
  border-radius: var(--hdpf-radius-lg);
  background: var(--hdpf-surface);
  box-shadow: var(--hdpf-shadow-xs);
  font-size: var(--hdpf-fs-body);
  line-height: var(--hdpf-lh-relaxed);
  color: var(--hdpf-ink-muted);
  text-wrap: pretty;
  /* min-width: 0 lets a card shrink below its basis, so a long unbreakable
   * string would overflow the card rather than widen it. Break instead. */
  overflow-wrap: break-word;
}

/* One column — every card full width, whatever the count. Use it when the
 * items are sentences rather than labels: at 16rem those wrap to four or five
 * ragged lines, and a full-width card reads them in one or two. Doubled class
 * so it wins on specificity rather than on being declared later in the file. */
.hdpf-checks.hdpf-checks--one-column li {
  flex: 1 1 100%;
}

/* Check plate. The icon used to float bare at 1.1em, which gave each card no
 * visual anchor and left the text hanging off nothing. Padding the <svg>
 * itself turns it into a plate without needing a wrapper element, so this
 * works on hand-written .hdpf-checks markup too, not just hdpf_checks() output.
 * content-box is required: the global reset is border-box, which would eat the
 * icon rather than grow the plate. */
.hdpf-checks li > .hdpf-icon {
  box-sizing: content-box;
  padding: var(--hdpf-space-3);
  border: 1px solid color-mix(in srgb, var(--hdpf-success) 22%, transparent);
  border-radius: var(--hdpf-radius-md);
  background: var(--hdpf-success-soft);
  color: var(--hdpf-success);
}

.hdpf-checks li > span {
  min-width: 0;
}

.hdpf-checks strong {
  display: block;
  margin-bottom: var(--hdpf-space-2);
  font-family: var(--hdpf-font-display);
  font-size: var(--hdpf-fs-title);
  font-weight: var(--hdpf-fw-extrabold);
  line-height: var(--hdpf-lh-snug);
  letter-spacing: var(--hdpf-tracking-tight);
  color: var(--hdpf-ink-strong);
  text-transform: capitalize;
}

/* Accent variant — used where the list is the section's main visual. The plate
 * flips to plain surface so it still reads out of the tinted card. */
.hdpf-checks--accent li {
  background: var(--hdpf-accent-soft);
  border-color: color-mix(in srgb, var(--hdpf-accent) 18%, transparent);
}

.hdpf-checks--accent li > .hdpf-icon {
  background: var(--hdpf-surface);
  border-color: color-mix(in srgb, var(--hdpf-accent) 28%, transparent);
  color: var(--hdpf-accent);
}

/* ------------------------------------------------------------------ *
 * Compare — a spec-sheet comparison, without table markup
 * ------------------------------------------------------------------ *
 *
 * A real <table> forces every option into one cramped row, and on narrow
 * screens it either scrolls sideways or has to be faked back into cards. This
 * gives each option its own card and each attribute its own full-width row, so
 * values get room to breathe at any width.
 *
 * Rows still line up across cards like a table: the cards share the parent's
 * row tracks via `grid-template-rows: subgrid`. Pass the attribute count as
 * --hdpf-compare-rows (the renderer does this) so the parent can declare the
 * tracks. Without subgrid support the cards simply size themselves — still
 * readable, just not cross-aligned.
 *
 * Keep it machine-readable: each card is a <section> with a real heading, and
 * the attributes are a <dl> of term/definition pairs. That is a structure
 * crawlers and answer engines parse cleanly, which is the whole reason the
 * comparison earns citations in the first place.
 */

/* Two columns maximum, then wrap. Values here are phrases, not single words —
 * "Excellent (waterproof or highly water-resistant)" — and a third column
 * breaks them into a ragged stack of two-word lines at any realistic page
 * width. Two wide cards per row read; four narrow ones don't. */
.hdpf-compare {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--hdpf-space-4);
}

@container layout-root (max-width: 46rem) {
  .hdpf-compare {
    grid-template-columns: minmax(0, 1fr);
  }
}

.hdpf-compare__item {
  display: grid;
  align-content: start;
  border: 1px solid var(--hdpf-border);
  border-radius: var(--hdpf-radius-xl);
  background: var(--hdpf-surface);
  box-shadow: var(--hdpf-shadow-xs);
  overflow: hidden;
}

/* Rows align across cards by sharing the grid's row tracks.
 *
 * Each card spans a fixed number of rows (`span N`) instead of the full column
 * (`1 / -1`). That distinction is the whole ballgame: with `1 / -1` every card
 * is pinned to one row band, so once auto-fit runs out of columns the extras
 * are placed in *implicit* columns — which are content-sized, not 18rem — and
 * the last cards collapse to unreadable slivers. Spanning a fixed row count
 * lets auto-placement wrap to a new band instead.
 *
 * Nested subgrid keeps the <dl> element in the tree: the card subgrids the
 * parent's rows, and the <dl> subgrids the card's. Flattening it with
 * `display: contents` would have worked too, but that can drop definition-list
 * semantics in some screen readers — and those semantics are the reason this
 * comparison stays machine-readable.
 */
@supports (grid-template-rows: subgrid) {
  .hdpf-compare__item {
    grid-row: span var(--hdpf-compare-span, 5);
    grid-template-rows: subgrid;
    gap: var(--hdpf-space-2);
  }

  .hdpf-compare__specs {
    display: grid;
    grid-row: span var(--hdpf-compare-rows, 4);
    grid-template-rows: subgrid;
    margin-block-start: 0.5rem;
    margin-block-end: 0.5rem;
    gap: var(--hdpf-space-2);
  }
}

/* Card header — the option being compared, set like a drawing title block. */
.hdpf-compare__head {
  position: relative;
  /* Own stacking context so the index watermark can sit at z-index -1: behind
   * the title, but still above the head's own background. */
  isolation: isolate;
  padding: var(--hdpf-space-5);
  background: var(--hdpf-surface-inset);
  border-bottom: 1px solid var(--hdpf-border);
}

.hdpf-compare__head::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--hdpf-bp-line) 1px, transparent 1px),
    linear-gradient(90deg, var(--hdpf-bp-line) 1px, transparent 1px);
  background-size: var(--hdpf-bp-size) var(--hdpf-bp-size);
  -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.6), transparent);
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.6), transparent);
  pointer-events: none;
}

/* Optional index watermark, upper-right. Off by default (a comparison is a set,
 * not a sequence) — hdpf_compare() emits it only when asked. Matches the step
 * cards' plate number: same size and inset, just anchored to the opposite
 * corner. Decorative, so the renderer marks it aria-hidden. */
.hdpf-compare__index {
  position: absolute;
  top: 0.35em;
  right: 0.38em;
  z-index: -1;
  font-family: var(--hdpf-font-display);
  font-size: 1.6rem;
  font-weight: var(--hdpf-fw-black);
  line-height: 1;
  letter-spacing: var(--hdpf-tracking-tight);
  font-variant-numeric: tabular-nums;
  color: color-mix(in srgb, var(--hdpf-accent) 14%, transparent);
  pointer-events: none;
  user-select: none;
  -webkit-user-select: none;
}

.hdpf-compare__title {
  position: relative;
  margin: 0;
  font-family: var(--hdpf-font-display);
  font-size: var(--hdpf-fs-headline);
  font-weight: var(--hdpf-fw-extrabold);
  line-height: var(--hdpf-lh-snug);
  letter-spacing: var(--hdpf-tracking-tight);
  color: var(--hdpf-ink-strong);
  text-wrap: balance;
  text-transform: capitalize;
}

/* One attribute per row: mono label above, value below, full card width. */
.hdpf-compare__row {
  display: grid;
  gap: var(--hdpf-space-1);
  padding: var(--hdpf-space-2) var(--hdpf-space-5);
  border-bottom: 1px solid var(--hdpf-divider);
}

.hdpf-compare__item > .hdpf-compare__row:last-child,
.hdpf-compare__specs > .hdpf-compare__row:last-child {
  border-bottom: 0;
}

.hdpf-compare__row dt {
  font-family: var(--hdpf-font-mono);
  font-size: var(--hdpf-fs-micro);
  letter-spacing: var(--hdpf-tracking-wide);
  text-transform: uppercase;
  color: var(--hdpf-ink-muted);
}

.hdpf-compare__row dd {
  margin: 0;
  font-size: var(--hdpf-fs-body);
  line-height: var(--hdpf-lh-normal);
  color: var(--hdpf-ink);
  text-wrap: pretty;
}

/* Highlighted option — for a genuine recommendation, not decoration. */
.hdpf-compare__item--highlight {
  border-color: color-mix(in srgb, var(--hdpf-accent) 40%, transparent);
  box-shadow: var(--hdpf-shadow-md);
}

.hdpf-compare__item--highlight .hdpf-compare__head {
  background: var(--hdpf-accent-soft);
  border-bottom-color: color-mix(in srgb, var(--hdpf-accent) 25%, transparent);
}

/* The highlighted card's head is already accent-tinted, so the watermark needs
 * a touch more strength to stay visible against it. */
.hdpf-compare__item--highlight .hdpf-compare__index {
  color: color-mix(in srgb, var(--hdpf-accent) 22%, transparent);
}

/* ------------------------------------------------------------------ *
 * Callout family — panels for copy that should sit apart from the flow
 * ------------------------------------------------------------------ */

.hdpf-callout {
  clear: both;
  margin-block: var(--hdpf-space-6);
  padding: var(--hdpf-space-5) var(--hdpf-space-6);
  border: 1px solid var(--hdpf-border);
  border-radius: var(--hdpf-radius-lg);
  background: var(--hdpf-surface-inset);
  color: var(--hdpf-ink);
}

.hdpf-callout > * {
  margin-block: 0 var(--hdpf-space-3);
  line-height: var(--hdpf-lh-relaxed);
}

.hdpf-callout > :last-child {
  margin-bottom: 0;
}

/* The body wrapper, so a callout can hold more than one paragraph and still
 * space them. Without this the <p>s inside it collapse against each other. */
.hdpf-callout__body > * {
  margin-block: 0 var(--hdpf-space-4);
  line-height: inherit;
}

.hdpf-callout__body > :last-child {
  margin-bottom: 0;
}

.hdpf-callout__label {
  display: block;
  margin-bottom: var(--hdpf-space-3);
  font-family: var(--hdpf-font-mono);
  font-size: var(--hdpf-fs-micro);
  letter-spacing: var(--hdpf-tracking-wider);
  text-transform: uppercase;
  font-weight: var(--hdpf-fw-semibold);
  color: var(--hdpf-ink-muted);
}

/* Quiet — the default. A supporting paragraph set apart from running copy
 * without raising its voice. Same treatment as the references block. */
.hdpf-callout--quiet {
  font-size: var(--hdpf-fs-caption);
  color: var(--hdpf-ink-muted);
}

/* Rule — a margin note hung off an accent rule, no fill. */
.hdpf-callout--rule {
  border: 0;
  border-left: 3px solid var(--hdpf-accent);
  border-radius: 0;
  background: none;
  padding-block: var(--hdpf-space-2);
  padding-right: 0;
}

/* Quote — a pull quote in the display face, with a drafted quote mark. */
.hdpf-callout--quote {
  position: relative;
  border: 0;
  border-radius: 0;
  background: none;
  padding: 0 0 0 var(--hdpf-space-10);
  font-family: var(--hdpf-font-display);
  font-size: var(--hdpf-fs-display-3);
  font-weight: var(--hdpf-fw-bold);
  line-height: var(--hdpf-lh-snug);
  letter-spacing: var(--hdpf-tracking-tight);
  color: var(--hdpf-ink-strong);
  text-wrap: balance;
}

.hdpf-callout--quote::before {
  content: "\201C";
  position: absolute;
  left: 0;
  top: -0.15em;
  font-family: var(--hdpf-font-display);
  font-size: 4em;
  line-height: 1;
  color: color-mix(in srgb, var(--hdpf-accent) 30%, transparent);
}

.hdpf-callout--quote > * {
  line-height: var(--hdpf-lh-snug);
}

.hdpf-callout__cite {
  display: block;
  margin-top: var(--hdpf-space-4);
  font-family: var(--hdpf-font-ui);
  font-size: var(--hdpf-fs-caption);
  font-weight: var(--hdpf-fw-semibold);
  font-style: normal;
  letter-spacing: var(--hdpf-tracking-normal);
  color: var(--hdpf-ink-muted);
}

.hdpf-callout__cite::before {
  content: "\2014\00a0";
  color: var(--hdpf-accent);
}

/* Figures — a lead number carrying a short line of context. Only ever use it
 * for something we can actually stand behind. */
.hdpf-callout--figure {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--hdpf-space-5);
  align-items: center;
}

.hdpf-callout__figure {
  font-family: var(--hdpf-font-display);
  font-size: var(--hdpf-fs-display-1);
  font-weight: var(--hdpf-fw-black);
  line-height: 1;
  letter-spacing: var(--hdpf-tracking-tight);
  color: var(--hdpf-accent);
  font-variant-numeric: tabular-nums;
}

/* ------------------------------------------------------------------ *
 * Note — an aside that earns attention without shouting
 * ------------------------------------------------------------------ */

.hdpf-note {
  clear: both;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: var(--hdpf-space-4);
  padding: var(--hdpf-space-6);
  border: 1px solid color-mix(in srgb, var(--hdpf-accent) 20%, transparent);
  border-left: 3px solid var(--hdpf-accent);
  border-radius: var(--hdpf-radius-lg);
  background: var(--hdpf-accent-soft);
}

.hdpf-note__icon {
  display: inline-flex;
  color: var(--hdpf-accent);
  margin-top: 0.1em;
}

.hdpf-note__label {
  display: block;
  margin: 0 0 var(--hdpf-space-2);
  font-family: var(--hdpf-font-mono);
  font-size: var(--hdpf-fs-micro);
  letter-spacing: var(--hdpf-tracking-wider);
  text-transform: uppercase;
  font-weight: var(--hdpf-fw-semibold);
  color: var(--hdpf-accent-strong);
}

.hdpf-note__body > * {
  margin: 0 0 var(--hdpf-space-3);
  color: var(--hdpf-ink);
  line-height: var(--hdpf-lh-relaxed);
  text-wrap: pretty;
}

.hdpf-note__body > :last-child {
  margin-bottom: 0;
}

/* ------------------------------------------------------------------ *
 * Article-scoped overrides for shared components
 * ------------------------------------------------------------------ */

.hdpf-article__body > .hdpf-faq,
.hdpf-article__body > .hdpf-sources {
  margin-top: 0;
}

.hdpf-article__body > .hdpf-updated {
  clear: both;
  margin-top: var(--hdpf-space-8);
}

/* The check grid carries margin: 0, as a component should — but that also beat
 * .hdpf-article__wide (same specificity, declared earlier), so a list dropped
 * into the reading column had no air below it and the next paragraph sat flush
 * against the cards. Scope the rhythm here instead of loosening the component. */
.hdpf-article__body > .hdpf-checks {
  clear: both;
  margin-block: var(--hdpf-space-6);
}

/* The 4-across stepper is built for a full-width band; in the reading column
 * it gets two rows of two. */
.hdpf-article__body .hdpf-steps-path {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

@container layout-root (max-width: 40rem) {
  .hdpf-article__body .hdpf-steps-path {
    grid-template-columns: 1fr;
  }
}
