/* ════════════════════════════════════════════════════════════════════════
   compare.css — the paid comparison of 2 to 4 reports (/compare-advisers)
   and the sample comparison. Nov 2026: cards, one column per firm,
   replacing the attribute table. Loaded after landing.css, whose card
   pieces (.lp-card, .lp-stat, .lp-row ...) it reuses.

   Any breakpoint added here must be "screen and (...)": a Letter page is
   narrower than the phone breakpoint, and print should keep the columns.
   ════════════════════════════════════════════════════════════════════════ */

.cmp-wrap { max-width: 1120px; margin: 0 auto; padding: 0 40px; box-sizing: border-box; }

/* ── Hero ───────────────────────────────────────────────────────────── */
.cmp-hero {
  background: linear-gradient(172deg, #0E2841 0%, #1B3A4B 38%, #264F74 100%);
  padding: 28px 0 84px;
}
.cmp-back {
  font-family: var(--font-heading); font-weight: 600; font-size: 13.5px;
  color: #DCE6EB; text-decoration: none;
}
.cmp-back:hover { color: #FFFFFF; text-decoration: underline; }
.cmp-back-bottom { display: inline-block; margin: 28px 0 56px; color: var(--secondary); }
.cmp-back-bottom:hover { color: var(--primary); }
.cmp-title {
  margin: 22px 0 8px; font-family: var(--font-heading); font-weight: 700;
  font-size: 34px; line-height: 1.15; letter-spacing: -.5px; color: #FFFFFF;
}
.cmp-sample { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 18px; font-size: 14px; color: #DCE6EB; }
.cmp-sample-tag {
  font-family: var(--font-heading); font-weight: 700; font-size: 12px; letter-spacing: .1em;
  text-transform: uppercase; color: var(--primary); background: var(--accent);
  border-radius: 14px; padding: 4px 14px; white-space: nowrap;
}
.cmp-prompt {
  margin: 44px auto 0; max-width: 720px; text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: 12px;
}
.cmp-prompt h2 { margin: 0; font-family: var(--font-heading); font-weight: 700; font-size: 26px; line-height: 1.2; letter-spacing: -.3px; color: var(--primary); }
.cmp-prompt p { margin: 0; font-size: 16px; color: #4B5A63; }
.cmp-prompt .lp-cta { display: inline-flex; text-decoration: none; }
.cmp-framing { margin: 0; font-size: 16px; line-height: 1.55; color: #DCE6EB; max-width: 760px; }

/* ── The grid: one column per firm, rows shared ─────────────────────── */
.cmp-grid {
  display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr));
  column-gap: 20px; margin-top: -48px; position: relative; z-index: 10;
}
.cmp-n3 { column-gap: 16px; }
.cmp-n4 { column-gap: 16px; }
.cmp-col { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.cmp-cc { display: flex; flex-direction: column; gap: 16px; }
.cmp-fc { display: flex; flex-direction: column; gap: 22px; }
@supports (grid-template-rows: subgrid) {
  /* Column rows: complexity card 4, firm card 9, plus the adviser card
     and the revenue card when any column has an adviser. */
  /* The single column is minmax(0, 1fr) so a long name cannot widen it. */
  .cmp-col { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: subgrid; grid-row: span 13; row-gap: 20px; }
  .cmp-has-adv .cmp-col { grid-row: span 15; }
  .cmp-cc { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: subgrid; grid-row: span 4; row-gap: 16px; }
  .cmp-fc { display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: subgrid; grid-row: span 9; row-gap: 22px; }
  /* The three areas sit closer together than the card's other blocks. */
  .cmp-area { margin-top: -12px; }
}
.cmp-col > *, .cmp-cc > *, .cmp-fc > * { min-width: 0; }
.cmp-grid .lp-card { min-width: 0; }
.cmp-n3 .lp-card, .cmp-n4 .lp-card { padding: 16px 16px; }
.cmp-empty { min-height: 0; }

/* ── Firm-only column: find an adviser to add ───────────────────────────
   One card over the two rows the adviser card and the revenue card take
   in the other columns. Results scroll inside it, so it never makes those
   rows taller. */
.cmp-pick { grid-row: span 2; display: flex; flex-direction: column; gap: 10px; background: var(--bg-subtle); border-style: dashed; }
.cmp-pick-head {
  display: flex; align-items: flex-start; gap: 10px;
  font-family: var(--font-heading); font-weight: 600; font-size: 17px; line-height: 1.3; color: var(--primary);
}
.cmp-pick-head svg { width: 24px; height: 24px; flex-shrink: 0; margin-top: 1px; fill: none; stroke: var(--secondary); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.cmp-pick-lead { margin: 0; }
.cmp-pick-row { display: flex; gap: 8px; }
.cmp-pick-row .lp-fi { flex: 1; min-width: 0; }
.cmp-pick-row .lp-cta { min-height: 44px; padding: 8px 16px; font-size: 14.5px; flex-shrink: 0; }
.cmp-n3 .cmp-pick-row, .cmp-n4 .cmp-pick-row { flex-direction: column; }
.cmp-pick-results { font-size: 13.5px; min-height: 0; }
.cmp-pick-note { margin: 0; color: #4B5A63; }
.cmp-pick-count { font-family: var(--font-heading); font-weight: 600; font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: #4B5A63; margin-bottom: 4px; }
.cmp-pick-list { list-style: none; margin: 0; padding: 0; max-height: 196px; overflow-y: auto; background: #FFFFFF; border: 1px solid var(--border); border-radius: 8px; }
/* The full list for a small firm gets more room before it scrolls. */
.cmp-pick-roster { max-height: 308px; }
.cmp-pick-list li + li { border-top: 1px solid var(--border); }
.cmp-pick-list a { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 44px; padding: 6px 12px; text-decoration: none; color: var(--primary); }
.cmp-pick-list a:hover, .cmp-pick-list a:focus-visible { background: #FDF0E8; }
.cmp-pick-list strong { font-family: var(--font-heading); font-weight: 600; font-size: 14px; }
.cmp-pick-list span { font-size: 12.5px; color: #4B5A63; white-space: nowrap; }

/* Glossary terms wrap inside a narrow column; a badge or pill carries no
   dotted underline. */
.cmp-grid .term-tip { white-space: normal; border-bottom-color: #9FB1BA; }
.term-tip--bare { border-bottom: none; }
.cmp-sr {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ── Firm name + badge: one line, sized to fit (compare.js) ─────────── */
.cmp-fit {
  --fs: 23px;
  display: flex; align-items: center; gap: 8px; flex-wrap: nowrap; min-width: 0;
}
.cmp-n3 .cmp-fit { --fs: 21px; }
.cmp-n4 .cmp-fit { --fs: 19px; }
.cmp-n3 .cmp-fit, .cmp-n4 .cmp-fit { gap: 6px; }
.cmp-fit-name {
  font-family: var(--font-heading); font-weight: 600; font-size: var(--fs);
  line-height: 1.2; color: var(--primary); white-space: nowrap;
}
.cmp-fit .cmp-fit-bdg {
  width: calc(var(--fs) * 1.39); height: calc(var(--fs) * 1.39);
  font-size: calc(var(--fs) * .46);
}
/* Too long for one line even at the smallest size: the name wraps at a
   readable size and the badges stay beside its first line. */
.cmp-fit.is-wrapped { align-items: flex-start; }
.cmp-fit.is-wrapped .cmp-fit-name { white-space: normal; overflow-wrap: break-word; min-width: 0; }
.cmp-fit .term-tip { flex-shrink: 0; display: inline-flex; }
.cmp-same {
  display: inline-block; margin-top: 6px; padding: 2px 9px;
  font-family: var(--font-heading); font-weight: 600; font-size: 11px;
  letter-spacing: .06em; text-transform: uppercase;
  color: #8A3D12; background: #FDF0E8; border: 1px solid #F3C9AE; border-radius: 10px;
}

/* ── Complexity card ────────────────────────────────────────────────── */
.cmp-cc-index { display: flex; align-items: center; gap: 12px; }
/* The site's band icon (.band-chip, common.css), a step larger here. */
.cmp-cc-icon.band-chip { width: 44px; height: 44px; }
.cmp-cc-icon.band-chip .band-icon { width: 28px; height: 28px; }
.cmp-n4 .cmp-cc-icon.band-chip { width: 36px; height: 36px; border-radius: 8px; }
.cmp-n4 .cmp-cc-icon.band-chip .band-icon { width: 23px; height: 23px; }
.cmp-n4 .cmp-cc-index { gap: 9px; }
.cmp-cc-text { flex: 1; min-width: 0; }
.cmp-cc-label { color: #3F6C7D; white-space: nowrap; }
.cmp-n4 .cmp-cc-label { letter-spacing: .04em; font-size: 10.5px; }
.cmp-cc-band { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.cmp-band-name, .cmp-band-score {
  font-family: var(--font-heading); font-weight: 700; font-size: 24px;
  line-height: 1.15; white-space: nowrap;
}
.cmp-band-name { color: var(--primary); }
.cmp-band-score { color: var(--accent); }
.cmp-n3 .cmp-band-name, .cmp-n3 .cmp-band-score { font-size: 22px; }
.cmp-n4 .cmp-band-name, .cmp-n4 .cmp-band-score { font-size: 17px; }
.cmp-n4 .cmp-cc-band { gap: 6px; }
.cmp-cc-scale { padding-top: 6px; }
.cmp-dot {
  position: absolute; top: -5px; margin-left: -10px; width: 20px; height: 20px;
  border-radius: 50%; background: var(--accent); border: 3px solid #FFFFFF;
  box-shadow: 0 0 0 1.5px var(--accent); box-sizing: border-box;
}
.cmp-n4 .lp-scale-labels { font-size: 10px; }
.cmp-cc-items { display: flex; flex-direction: column; gap: 6px; }
.cmp-cc-items-title { font-family: var(--font-heading); font-weight: 700; font-size: 13.5px; color: var(--primary); line-height: 1.3; }
.cmp-bl { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; line-height: 1.35; color: #1B2A33; }
.cmp-bd { width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; margin-top: 7px; }

/* ── Adviser card ───────────────────────────────────────────────────── */
.cmp-adviser { display: flex; flex-direction: column; gap: 14px; }
.cmp-adviser .lp-stats { margin-top: auto; }
.cmp-n3 .lp-name, .cmp-n4 .lp-name { font-size: 19px; }
.cmp-n3 .lp-adv-id, .cmp-n4 .lp-adv-id { min-width: 0; flex-basis: 100%; }
.cmp-n3 .lp-stats, .cmp-n4 .lp-stats { gap: 6px; }
.cmp-n3 .lp-stat, .cmp-n4 .lp-stat { padding: 8px 9px; }
.cmp-n4 .lp-sl { font-size: 10px; letter-spacing: .05em; }
.cmp-n4 .lp-sv { font-size: 14.5px; }
.cmp-n4 .lp-sv-sm { font-size: 12.5px; }
.cmp-grid .lp-sl .term-tip { border-bottom-color: #8FA3AD; }
.cmp-grid .lp-stat-model .term-tip { color: inherit; }

/* ── Revenue card ───────────────────────────────────────────────────── */
.cmp-paths { display: flex; flex-direction: column; gap: 12px; }
.cmp-paths .lp-hats { display: flex; flex-direction: column; gap: 8px; }
.cmp-paths .lp-hat { flex: 0 0 auto; }
.cmp-hm { font-size: 12.5px; color: #4B5A63; line-height: 1.45; }
.cmp-ins { font-size: 12px; color: #4B5A63; line-height: 1.4; }
.cmp-meter { margin-top: 12px; max-width: 420px; }
.cmp-meter-head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  font-size: 12px; color: #4B5A63; margin-bottom: 22px;
}
.cmp-meter-head strong {
  font-family: var(--font-heading); color: var(--primary); font-weight: 600;
  font-size: 12.5px; white-space: nowrap;
}
.cmp-meter-track {
  position: relative; height: 10px; border-radius: 5px;
  background: linear-gradient(90deg, #C1E5F5 0%, #83CBEB 35%, #46B1E1 65%, #104862 100%);
}
.cmp-meter-label {
  position: absolute; bottom: 16px; transform: translateX(-50%);
  font-family: var(--font-heading); font-weight: 700; font-size: 13px;
  color: var(--accent); white-space: nowrap;
}
.cmp-meter-marker {
  position: absolute; top: 50%; transform: translate(-50%, -50%);
  width: 16px; height: 16px; border-radius: 50%; background: var(--accent);
  border: 3px solid #FFFFFF; box-shadow: 0 1px 4px rgba(14,40,65,.35); box-sizing: border-box;
}
.cmp-meter-scale { display: flex; justify-content: space-between; font-size: 10.5px; color: #4B5A63; margin-top: 5px; }
.cmp-hats-link { font-size: 13px; margin-top: auto; color: var(--secondary); }
.cmp-hats-link:hover { color: #B4521B; }

/* ── Firm card ──────────────────────────────────────────────────────── */
.cmp-fc-id .lp-sm { margin-top: 2px; }
.cmp-block { display: flex; flex-direction: column; gap: 12px; }
.cmp-block .lp-ct, .cmp-fc .lp-ct { min-height: 0; margin: 0; }
.cmp-n3 .lp-ct, .cmp-n4 .lp-ct { font-size: 16px; }
.cmp-n4 .lp-num { font-size: 40px; }
.cmp-n4 .lp-numl { font-size: 14.5px; }
.cmp-n3 .lp-row, .cmp-n4 .lp-row { font-size: 13.5px; gap: 8px; }
.cmp-fc .lp-row { align-items: flex-start; }
.cmp-fc .lp-row .lp-ck, .cmp-fc .lp-row .lp-dash { margin-top: 1px; }
.cmp-conf-head { gap: 6px; }
.cmp-conf-head .lp-ct { margin-bottom: 6px; }

.cmp-area { min-width: 0; }
.cmp-area-head {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 0 6px; border-bottom: 2px solid var(--border);
}
.cmp-area-name {
  flex: 1; min-width: 0; font-family: var(--font-heading); font-weight: 600;
  font-size: 13.5px; color: var(--primary);
}
.cmp-area-toggle { display: none; }
.cmp-chev { width: 18px; height: 18px; fill: none; stroke: var(--secondary); stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s ease; }
.cmp-q {
  margin-left: auto; width: 18px; height: 18px; border-radius: 50%;
  background: var(--secondary); color: #FFFFFF; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--font-heading); font-weight: 700; font-size: 11px; line-height: 1;
  cursor: pointer;
}
.cmp-q:focus-visible { outline: 3px solid rgba(74,124,143,.45); outline-offset: 2px; }
.cmp-fc-foot { display: flex; align-items: flex-start; }
.cmp-full {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 44px; padding: 8px 18px; text-align: center;
  font-family: var(--font-heading); font-weight: 600; font-size: 14px;
  color: var(--primary); background: #FFFFFF; border: 2px solid var(--accent);
  border-radius: 40px; text-decoration: none;
}
.cmp-full:hover { background: #FDF0E8; text-decoration: none; }

.cmp-qnote { margin: 14px 0 0; display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; color: #4B5A63; }
.cmp-qnote .lp-q { width: 18px; height: 18px; font-size: 11px; margin-top: 2px; }

/* ── Pinned names (wide screens) ────────────────────────────────────── */
.cmp-pin {
  position: fixed; left: 0; right: 0; top: var(--cmp-nav-h, 56px); z-index: 90;
  background: #FFFFFF; border-bottom: 1px solid var(--border);
  box-shadow: 0 2px 10px rgba(14,40,65,.08);
  transform: translateY(-110%); visibility: hidden;
  transition: transform .18s ease, visibility 0s linear .18s;
}
.cmp-pin.is-on { transform: translateY(0); visibility: visible; transition: transform .18s ease; }
.cmp-pin-grid {
  display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr));
  column-gap: 20px; padding: 8px 0;
}
.cmp-pin-cell { min-width: 0; padding: 0 22px; }
.cmp-pin-firm {
  font-family: var(--font-heading); font-weight: 600; font-size: 14.5px; color: var(--primary);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.cmp-pin-adv { font-size: 12.5px; color: #4B5A63; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ── About This Report ──────────────────────────────────────────────── */
.cmp-about { margin-top: 40px; }
.cmp-about-header { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.cmp-about-icon {
  width: 36px; height: 36px; border-radius: 6px; background: var(--icon-09, #5E7E8E);
  display: flex; align-items: center; justify-content: center; flex-shrink: 0;
}
.cmp-about-icon svg {
  width: 18px; height: 18px; stroke: #fff; fill: none; stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}
.cmp-about-title {
  flex: 1; font-family: var(--font-heading); font-size: 15px; font-weight: 600;
  color: var(--primary); text-transform: uppercase; letter-spacing: .06em;
}
.cmp-about-toggle { display: none; }
.cmp-about-card {
  background: var(--bg-subtle); border: 1px solid var(--border); border-radius: 8px;
  padding: 18px 20px; font-size: 14px; line-height: 1.7; color: var(--text);
}
.cmp-about-card p { margin: 0 0 10px 0; }
.cmp-about-card p:last-child { margin-bottom: 0; }
.cmp-about-card strong { color: var(--primary); }
.cmp-about-card a { color: var(--primary); }

/* Tabs and hint: phones only. */
.cmp-tabs, .cmp-tabs-hint { display: none; }

/* ── Phones: one firm per screen ────────────────────────────────────── */
@media screen and (max-width: 900px) {
  .cmp-wrap { padding: 0 20px; }
  .cmp-hero { padding: 20px 0 24px; }
  .cmp-title { margin-top: 16px; font-size: 28px; }
  .cmp-framing { font-size: 14.5px; }
  .cmp-pin { display: none; }

  .cmp-tabs {
    display: grid; grid-template-columns: repeat(var(--n, 2), minmax(0, 1fr));
    position: sticky; top: var(--cmp-nav-h, 56px); z-index: 60;
    background: #FFFFFF; border-bottom: 1px solid var(--border);
    box-shadow: 0 2px 8px rgba(14,40,65,.06);
  }
  .cmp-tab {
    min-width: 0; min-height: 48px; padding: 8px 6px;
    background: none; border: none; border-bottom: 3px solid transparent; cursor: pointer;
    font-family: var(--font-heading); font-weight: 500; font-size: 13.5px; line-height: 1.2;
    color: #4B5A63; overflow-wrap: anywhere;
  }
  .cmp-tab.is-on { font-weight: 700; color: var(--primary); border-bottom-color: var(--accent); }
  .cmp-tabs-hint { display: block; text-align: center; font-size: 12.5px; color: #4B5A63; padding: 10px 20px 0; margin: 0; }

  .cmp-grid, .cmp-n3, .cmp-n4 {
    grid-template-columns: repeat(var(--n, 2), 100%); column-gap: 0;
    overflow-x: auto; scroll-snap-type: x mandatory; scroll-behavior: smooth;
    margin-top: 16px; padding-bottom: 4px;
    scrollbar-width: none; -webkit-overflow-scrolling: touch;
  }
  .cmp-grid::-webkit-scrollbar { display: none; }
  .cmp-col { scroll-snap-align: start; padding: 0 1px; box-sizing: border-box; }
  /* On a phone a column is the full screen, so the wide-screen sizes return. */
  .cmp-n3 .lp-card, .cmp-n4 .lp-card { padding: 20px 22px; }
  .cmp-n3 .cmp-fit, .cmp-n4 .cmp-fit { --fs: 23px; }
  .cmp-n3 .lp-name, .cmp-n4 .lp-name { font-size: 23px; }
  .cmp-n3 .lp-ct, .cmp-n4 .lp-ct { font-size: 18px; }
  .cmp-n3 .lp-row, .cmp-n4 .lp-row { font-size: 14.5px; gap: 10px; }
  .cmp-n4 .lp-num { font-size: 46px; }
  .cmp-n4 .lp-numl { font-size: 16px; }
  .cmp-n4 .lp-sl { font-size: 11px; letter-spacing: .08em; }
  .cmp-n4 .lp-sv { font-size: 16px; }
  .cmp-n4 .lp-sv-sm { font-size: 14px; }
  .cmp-n3 .lp-stat, .cmp-n4 .lp-stat { padding: 10px 12px; }
  .cmp-n3 .cmp-band-name, .cmp-n3 .cmp-band-score,
  .cmp-n4 .cmp-band-name, .cmp-n4 .cmp-band-score { font-size: 24px; }
  .cmp-n4 .cmp-cc-icon.band-chip { width: 44px; height: 44px; border-radius: 10px; }
  .cmp-n4 .cmp-cc-icon.band-chip .band-icon { width: 28px; height: 28px; }
  .cmp-n4 .cmp-cc-label { font-size: 11px; letter-spacing: .08em; }
  .cmp-n4 .lp-scale-labels { font-size: 11px; }

  /* Conflict areas and About This Report: closed until opened. Opening an
     area opens it on every firm (compare.js) so rows stay level. */
  .cmp-area-head { cursor: pointer; padding: 12px 0 10px; }
  .cmp-area-toggle {
    display: inline-flex; align-items: center; gap: 8px; min-height: 44px;
    margin: -12px 0 -10px; padding: 0 0 0 8px; background: none; border: none; cursor: pointer;
  }
  .cmp-area-count { font-family: var(--font-heading); font-weight: 700; font-size: 13.5px; color: var(--accent); white-space: nowrap; }
  .cmp-area-count.is-none { color: #5F6F78; font-weight: 600; }
  .cmp-area:not(.is-open) .cmp-area-body { display: none; }
  .cmp-area.is-open .cmp-chev, .cmp-about.is-open .cmp-chev { transform: rotate(180deg); }
  .cmp-about-header { cursor: pointer; margin-bottom: 0; }
  .cmp-about.is-open .cmp-about-header { margin-bottom: 14px; }
  .cmp-about-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; background: none; border: none; cursor: pointer;
  }
  .cmp-about:not(.is-open) .cmp-about-card { display: none; }
  .cmp-fc { gap: 18px; }
  @media (prefers-reduced-motion: reduce) { .cmp-grid { scroll-behavior: auto; } }
}

@media (prefers-reduced-motion: reduce) {
  .cmp-pin, .cmp-chev { transition: none; }
}

/* ── Print: keep the columns, drop the page furniture ───────────────── */
@media print {
  .cmp-pin, .cmp-tabs, .cmp-tabs-hint, .cmp-back, .cmp-full, .cmp-pick, .cmp-prompt { display: none !important; }
  .cmp-hero { background: none; padding: 0 0 12px; }
  .cmp-title { color: #000; }
  .cmp-framing { color: #222; }
  .cmp-grid { margin-top: 0; }
}
