.compare-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  padding-block: clamp(2rem, 4vw, 4rem);
}
.compare-hero h1 { font-size: clamp(2.5rem, 4.5vw, 4.25rem); max-width: 22ch; }
.compare-hero .lead { font-size: clamp(1.05rem, 1.4vw, 1.2rem); max-width: 59ch; }
.compare-hero .eyebrow { letter-spacing: .08em; }
.compare-back { display: inline-block; margin-bottom: 1.25rem; }
.compare-intro {
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  border-bottom: 1px solid var(--line);
  padding-block: clamp(1.65rem, 3.2vw, 3.2rem);
}
.compare-intro .lead { margin: 0; }
.compare-intro h1 { max-width: none; font-size: clamp(2.25rem, 3.4vw, 3.3rem); }
.compare-intro .actions { margin-bottom: 0; }
.compare-case h2 { font-size: clamp(1.45rem, 2vw, 1.85rem); letter-spacing: -.035em; }
.compare-case dl { margin: 1rem 0 0; }
.compare-offers { padding-block: 1.5rem clamp(2.5rem, 4vw, 4rem); }
.compare-offers h2, .compare-references h2 { font-size: clamp(1.8rem, 2.8vw, 2.6rem); }
.compare-offers h2 { margin-bottom: 1.1rem; }
.offer-picker { display: none; }
.offer-matrix { overflow-x: auto; }
.offer-table { width: 100%; min-width: 44rem; table-layout: fixed; border-collapse: collapse; text-align: left; }
.offer-table th, .offer-table td { padding: .52rem .9rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.offer-table th:first-child { width: 34%; }
.offer-table td, .offer-table th:not(:first-child) { text-align: center; }
.offer-table thead th { background: var(--plum); color: white; }
.offer-table thead th:nth-child(2) { background: var(--teal); }
.offer-table thead a { color: inherit; text-underline-offset: .16em; }
.offer-table thead a:focus-visible { outline-color: white; }
.offer-table thead th:target { scroll-margin-block-start: 8rem; }
.offer-table tbody th { color: var(--plum); }
.offer-table tbody td:nth-child(2) { background: var(--tint); font-weight: 700; }
.offer-table small { display: block; font-size: .87rem; font-weight: 400; }
.offer-table td span { font: 700 1.3rem/1 system-ui, sans-serif; }
.compare-costs { border-top: 1px solid var(--line); }
.cost-table { width: 100%; margin-top: 1.2rem; border-collapse: collapse; text-align: left; }
.cost-table th, .cost-table td { padding: .65rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.cost-table thead { background: var(--plum); color: white; }
.cost-table tbody tr:first-child { background: var(--tint); }
.cost-table strong { font-size: 1.2rem; white-space: nowrap; }
.cost-table small { display: block; font-size: .87rem; }
.status-yes { color: var(--teal); }
.status-no, .status-unknown { color: #685c63; }
.offer-key { display: flex; align-items: center; flex-wrap: wrap; gap: .2rem 1.2rem; margin: 0 0 .8rem; font-size: .87rem; }
.offer-key b { font: 700 1.05rem/1 system-ui, sans-serif; }
.compare-sources { margin: .45rem 0 0; font-size: .9rem; }
.compare-sources ul { padding-inline-start: 1.25rem; }
.compare-next { margin-top: 1.1rem; }
.compare-case { padding: clamp(1.2rem, 2vw, 2rem); background: var(--tint); border-top: .22rem solid var(--teal); }
.compare-case > p { margin-top: .75rem; }
.compare-case dl > div { padding-block: .8rem; border-top: 1px solid #b3cdca; }
.compare-case dl > div:last-child { padding-bottom: 0; }
.compare-case dt { color: var(--teal); font-weight: 700; }
.compare-case dd { margin: .2rem 0 0; }
.compare-hero + .section { border-top: 1px solid var(--line); }
.compare-references { padding-block: clamp(2rem, 3.5vw, 3.5rem); }
.compare-references p { margin-top: .75rem; }
.compare-references .compare-back { margin: 1.25rem 0 0; }

@media (max-width: 48rem) {
  .compare-hero { grid-template-columns: 1fr; gap: 1.25rem; }
  .compare-hero .actions { margin-bottom: 0; }
  .cost-table { table-layout: fixed; hyphens: auto; overflow-wrap: anywhere; }
  .cost-table th, .cost-table td { padding: .55rem .35rem; }
  .cost-table th:first-child { width: 30%; hyphens: manual; }
}

@media screen and (max-width: 48rem) {
  @supports selector(:has(:target)) {
    .offer-picker { display: flex; align-items: center; flex-wrap: wrap; gap: .4rem; margin-bottom: .85rem; }
    .offer-picker span { flex-basis: 100%; font-weight: 700; }
    .offer-picker a { padding: .45rem .7rem; border: 1px solid var(--line); border-radius: .35rem; }
    .offer-table { min-width: 0; }
    .offer-table th, .offer-table td { padding: .6rem .45rem; hyphens: auto; overflow-wrap: anywhere; }
    .offer-table th:first-child { width: 44%; }
    .offer-table thead a span { display: none; }
    .offer-table thead th:target { scroll-margin-block-start: 14rem; }

    /* LichtLot stays visible alongside the provider selected by the URL fragment. */
    .offer-table tr > :nth-child(4), .offer-table tr > :nth-child(5) { display: none; }
    .compare-offers:has(#mit-doccape:target, #mit-docuflair:target) .offer-table tr > :nth-child(3) { display: none; }
    .compare-offers:has(#mit-doccape:target) .offer-table tr > :nth-child(4),
    .compare-offers:has(#mit-docuflair:target) .offer-table tr > :nth-child(5) { display: table-cell; }

    .compare-offers:not(:has(#mit-doccape:target, #mit-docuflair:target)) a[href="#mit-anymize"],
    .compare-offers:has(#mit-doccape:target) a[href="#mit-doccape"],
    .compare-offers:has(#mit-docuflair:target) a[href="#mit-docuflair"] {
      background: var(--plum); color: white; border-color: var(--plum);
    }
  }
}
