/* ============================================================
   Container — shared responsive layout constraint
   Provides 1024px max content width with responsive side padding.
   Import this in any component that uses the .container class.
   ============================================================ */

.container {
  position:   relative;
  width:      100%;
  max-width:  calc(1024px + 160px); /* 1024px content + 80px × 2 */
  padding:    0 80px;
  margin:     0 auto;
  box-sizing: border-box;
}

/* Tablet (≤991px): 60px sides */
@media (max-width: 991px) {
  .container {
    padding: 0 60px;
  }
}

/* Landscape mobile (≤767px): 2rem sides */
@media (max-width: 767px) {
  .container {
    padding: 0 2rem;
  }
}



/* ============================================================
   Wide container — 1360px content + 48px side padding
   Used for full-bleed section content blocks (slider, big cards)
   that need to be wider than the standard 1024px text container.
   ============================================================ */

.container-wide {
  width:      100%;
  max-width:  calc(1384px + 96px);   /* 1384px content + 48px × 2 */
  padding:    0 3rem;                /* 48px sides */
  margin:     0 auto;
  box-sizing: border-box;
}

/* Tablet (≤991px): 16px less than .container (60px → 44px) */
@media (max-width: 991px) {
  .container-wide {
    padding: 0 44px;
  }
}

/* Landscape mobile (≤767px): 16px less than .container (2rem → 1rem) */
@media (max-width: 767px) {
  .container-wide {
    padding: 0 1rem;
  }
}


/* ============================================================
   ComparisonReportSection — Figma rR6TChqSqmXUL4MfXtJ8gv, node 7539:11826.
   Spec: ComparisonReportSection.figma.md.
   ============================================================ */

.comparison-report {
  background: var(--background-white);
  /* The cover runs past the viewport's right edge by design. */
  overflow-x: clip;
}

/* The section-header convention: this stack owns header → cards (64) and
   cards → CTA (64). Not positioned, so the cover (a child of it) positions
   off the container; at ≤991 off this stack, whose top is the header's. */
.comparison-report__content {
  display:        flex;
  flex-direction: column;
  gap:            4rem;                              /* 64px */
}

/* Figma caps the intro at 568, which is where it breaks after "reach".
   Two classes, to beat section.css's `.section-header__text .hp-body` cap. */
.section-header__text .comparison-report__body {
  max-width: 568px;
}


/* ---- Stat cards (7566:2329) ------------------------------- */

/* Three 330.67 columns, 16 apart; the cards fill the first two. Under the
   cover, which overlaps card 2's right edge as in Figma. */
.comparison-report__cards {
  position:              relative;
  z-index:               1;
  display:               grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap:                   var(--spacing-4);           /* 16px */
  margin:                0;
  padding:               0;
  list-style:            none;
}

.comparison-report__card {
  display:        flex;
  flex-direction: column;
  gap:            var(--spacing-6);                  /* 24px */
  padding:        var(--spacing-6);                  /* 24px */
  background:     var(--color-brand-blue-50);
  border-radius:  var(--radius-lg);                  /* 24px */
  color:          var(--color-brand-blue-700);
}

/* Figure → caption 4. The caption reserves three lines (Figma pads card
   one's two-line caption with an empty third) so both bar blocks line up. */
.comparison-report__stat {
  display:        flex;
  flex-direction: column;
  gap:            var(--spacing-1);
  margin:         0;
}

/* II Increments Sans Light 96, normal leading (116). */
.comparison-report__figure {
  font-size:   6rem;                                 /* 96px — no token */
  line-height: normal;
  font-weight: var(--font-weight-light);
}

.comparison-report__caption {
  min-height:  calc(3 * var(--line-height-2xl));     /* 96 = 3 × 32 */
  font-family: var(--font-family-serif);
  font-size:   var(--font-size-2xl);                 /* 24px */
  line-height: var(--line-height-2xl);               /* 32px */
  font-weight: 600;                                  /* Rowan Semibold — no token */
}

/* Bars — label 14/20 over a 24px pill + the value, 6 apart; bars 16 apart. */
.comparison-report__bars {
  display:        flex;
  flex-direction: column;
  gap:            var(--spacing-4);
  margin:         0;
}

.comparison-report__bar-item {
  display:        flex;
  flex-direction: column;
  gap:            var(--spacing-1-5);                /* 6px */
}

.comparison-report__bar-label {
  font-size:   var(--font-size-sm);
  line-height: var(--line-height-sm);
}

/* The value follows the bar; the bar's width is its share of this row. */
.comparison-report__bar-row {
  display:     flex;
  align-items: center;
  gap:         10px;                                 /* no token */
  margin:      0;
}

.comparison-report__bar {
  flex-shrink:   0;
  max-width:     calc(100% - 5.5rem);                /* always leaves room for the value */
  height:        24px;
  border-radius: var(--radius-full);
  background:    linear-gradient(90deg, var(--opacity-info-30), color-mix(in srgb, var(--info) 60%, transparent));
}

.comparison-report__bar--strong {
  background: linear-gradient(90deg, var(--info), var(--color-brand-blue-700));
}

.comparison-report__bar-value {
  font-size:   var(--font-size-xl);                  /* 20px */
  line-height: var(--line-height-xl);
  font-weight: var(--font-weight-medium);
  white-space: nowrap;
}

/* Who offers it — 20px check / x, 6 gap, rows 8px padded. */
.comparison-report__offers {
  margin:     0;
  padding:    0;
  list-style: none;
}

.comparison-report__offer {
  display:     flex;
  align-items: center;
  gap:         var(--spacing-1-5);
  padding:     var(--spacing-2) 0;
  font-size:   var(--font-size-base);
  line-height: var(--line-height-base);
}

.comparison-report__offer svg {
  flex-shrink: 0;
}

.comparison-report__offer--no {
  opacity: 0.4;
}

.comparison-report__sr-only {
  position:    absolute;
  width:       1px;
  height:      1px;
  overflow:    hidden;
  clip:        rect(0 0 0 0);
  white-space: nowrap;
}

.comparison-report__actions {
  display: flex;
}


/* ---- Report cover (7566:2485) ----------------------------- */

/* The book's own edges land where Figma draws them at 1512: x 907 → 1393,
   y 108 from the section top. The CDN image carries its shadow around the
   book, so the box starts 33px left / 50px above the book and is 688 wide
   (the book's 484px at the export's 0.594 scale). Positioned off the
   container's content edge (x 244), so it tracks the column, not the
   viewport. Above the cards: Figma draws the book (and its shadow) over
   card 2's right edge. */
.comparison-report__cover {
  position:       absolute;
  z-index:        2;
  top:            -50px;                             /* 78 − the section's 128 */
  left:           calc(80px + 630px);                /* padding + (874 − 244) */
  width:          688px;
  height:         auto;
  pointer-events: none;
}


/* ---- Responsive ------------------------------------------- */

/* 992–1280 ("small desktop", docs/conventions.md): the desktop layout, with
   the cover scaled to the column. The container narrows to 832 at 992, so the
   column (--report-col) shrinks from 330.67, and the cover's box — 688 wide,
   63.33 left of column three, 50 above the container at 330.67 — keeps those
   proportions to it. It still overhangs the viewport (clipped). `left` and
   `width` resolve against the container's width; `top` can't (a % there is
   of the height), so it takes the same column from the viewport. The text
   stops 32 short of the cards' right edge, so the book never sits on a word
   (the heading wraps, balanced, below ~1060), and the captions step from
   24/32 at 1280 down to 20/28 at 992, so card two's still takes three lines. */
@media (min-width: 992px) and (max-width: 1280px) {
  .comparison-report .section-header__text {
    max-width: calc((100% - 32px) * 2 / 3 - 16px);   /* two columns + gap − 32 */
  }

  .comparison-report .hp-heading {
    text-wrap: balance;                              /* no lone "won" */
  }

  .comparison-report__caption {
    --report-caption-lh: clamp(1.75rem, 1.75rem + (100vw - 992px) / 72, 2rem);   /* 28 → 32 */
    min-height:  calc(3 * var(--report-caption-lh));
    font-size:   clamp(1.25rem, 1.25rem + (100vw - 992px) / 72, 1.5rem);        /* 20 → 24 */
    line-height: var(--report-caption-lh);
  }

  .comparison-report__cover {
    --report-col: calc((100% - 192px) / 3);          /* (width − 2 × 80 − 2 × 16) / 3 */
    top:   calc((min(1024px, 100vw - 160px) - 32px) / 3 * -50 / 330.67);
    left:  calc(112px + var(--report-col) * (2 - 63.33 / 330.67));   /* 80 + 32 + column three − 63.33 */
    width: calc(var(--report-col) * 688 / 330.67);
  }
}

/* At ≤991 the book no longer fits beside the cards, so it moves up to the
   header's top right, top-aligned with the badge. The text column stops short
   of it, so no word sits under the book. As at 1512, the book runs down
   behind the cards (which paint over it); the header's min-height keeps that
   overlap to ~60px instead of growing a gap. The image carries its shadow
   around the book (33 left, 50 top, 171 right, 105 bottom at the book's
   484 × 623), hence the offsets: the BOOK lands on --report-book, the shadow
   spills past it. */
@media (max-width: 991px) {
  .comparison-report {
    --report-book: clamp(220px, 26vw, 320px);
  }

  .comparison-report__content {
    position: relative;
  }

  .comparison-report .section-header {
    padding-right: calc(var(--report-book) + var(--spacing-8));   /* + 32 */
    min-height:    calc(var(--report-book) * 623 / 484 - 7.75rem); /* book − (64 gap + ~60 overlap) */
  }

  .comparison-report__cover {
    top:   calc(var(--report-book) * -50 / 484);
    right: calc(var(--report-book) * -171 / 484);
    left:  auto;
    width: calc(var(--report-book) * 688 / 484);
  }

  .comparison-report__cards {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 767px) {
  .comparison-report__cards {
    grid-template-columns: minmax(0, 1fr);
    margin-inline:         -1rem;                    /* the 16px media inset */
  }

  .comparison-report__figure {
    font-size: 3.75rem;                              /* 60 — the redesign's mobile stat size */
  }

  .comparison-report__caption {
    min-height: 0;
    font-size:   var(--font-size-xl);
    line-height: var(--line-height-xl);
  }

  .comparison-report__content {
    gap: 3rem;
  }

  /* Phones: the book sits on its own row between the intro and the cards,
     centered, 48 from each (the stack's gap; Frank, 2026-11-16), so the
     heading and intro get the full width. The negative margins only trim the image's shadow (same offsets
     as above), so the BOOK is what's centered and spaced; its shadow falls
     behind the cards. */
  .comparison-report {
    --report-book: clamp(160px, 50vw, 240px);
  }

  .comparison-report .section-header {
    padding-right: 0;
    min-height:    0;
  }

  .comparison-report__cover {
    position:   static;
    z-index:    auto;
    align-self: center;
    margin:     calc(var(--report-book) * -50 / 484)
                calc(var(--report-book) * -171 / 484)
                calc(var(--report-book) * -105 / 484)
                calc(var(--report-book) * -33 / 484);
  }
}

/* ============================================================
   Button — Component Styles
   Scheme-aware: inherits data-scheme from a parent element.
   All color tokens flip automatically in dark context.
   ============================================================ */

.btn {
  /* Layout */
  align-items:      center;
  border:           1px solid transparent;
  box-sizing:       border-box;
  cursor:           pointer;
  display:          inline-flex;
  flex-shrink:      0;
  justify-content:  center;
  overflow:         hidden;
  text-decoration:  none;
  user-select:      none;
  white-space:      nowrap;
  background-clip:  padding-box;

  /* Typography */
  font-family: var(--font-family-default);
  font-weight: var(--font-weight-medium);

  /* Transition */
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, opacity 120ms ease;
}


/* ============================================================
   Sizes
   Heights: xs=26px  sm=32px  md=36px  lg=40px
   All use font-size-sm (14px) except xs which uses font-size-xs (12px).
   ============================================================ */

.btn[data-size="xs"] {
  font-size:   var(--font-size-xs);      /* 12px */
  line-height: var(--line-height-xs);    /* 16px */
  gap:         0.25rem;                  /* 4px  */
  padding:     0.3125rem 0.75rem;        /* 5px 12px → height 26px */
  --btn-gap:   0.25rem;
}

.btn[data-size="sm"] {
  font-size:   var(--font-size-sm);      /* 14px */
  line-height: var(--line-height-sm);    /* 20px */
  gap:         0.375rem;                 /* 6px  */
  padding:     0.375rem 1rem;            /* 6px 16px → height 32px */
  --btn-gap:   0.375rem;
}

.btn[data-size="md"] {
  font-size:   var(--font-size-sm);      /* 14px */
  line-height: var(--line-height-sm);    /* 20px */
  gap:         0.375rem;                 /* 6px  */
  padding:     0.5rem 1rem;              /* 8px 16px → height 36px */
  --btn-gap:   0.375rem;
}

.btn[data-size="lg"] {
  font-size:   var(--font-size-sm);      /* 14px */
  line-height: var(--line-height-sm);    /* 20px */
  gap:         0.5rem;                   /* 8px  */
  padding:     0.625rem 1.5rem;          /* 10px 24px → height 40px */
  --btn-gap:   0.5rem;
}

.btn[data-icon-only="true"] {
  padding: 0;
}

.btn[data-size="xs"][data-icon-only="true"] {
  width:  1.625rem; /* 26px */
  height: 1.625rem;
}

.btn[data-size="sm"][data-icon-only="true"] {
  width:  2rem; /* 32px */
  height: 2rem;
}

.btn[data-size="md"][data-icon-only="true"] {
  width:  2.25rem; /* 36px */
  height: 2.25rem;
}

.btn[data-size="lg"][data-icon-only="true"] {
  width:  2.5rem; /* 40px */
  height: 2.5rem;
}


/* ============================================================
   Shapes
   ============================================================ */

.btn[data-shape="rounded"] { border-radius: var(--radius-sm);   } /* 8px  */
.btn[data-shape="round"]   { border-radius: var(--radius-full); } /* pill */


/* ============================================================
   Variants
   ============================================================ */

.btn[data-variant="primary"][data-tone="default"] {
  background-color: var(--primary);
  border-color:     var(--primary);
  color:            var(--primary-foreground);
}

.btn[data-variant="secondary"][data-tone="default"] {
  background-color: transparent;
  border-color:     var(--primary);
  color:            var(--primary);
}

.btn[data-variant="primary"][data-tone="accent"] {
  background-color: var(--accent);
  border-color:     var(--accent);
  color:            var(--foreground);
}

.btn[data-variant="secondary"][data-tone="accent"] {
  background-color: transparent;
  border-color:     var(--accent);
  color:            var(--accent);
}


.btn[data-variant="info"] {
  background-color: var(--info);
  border-color:     var(--info);
  color:            var(--info-foreground);
}

.btn[data-variant="success"] {
  background-color: var(--success);
  border-color:     var(--success);
  color:            var(--success-foreground);
}

.btn[data-variant="warning"] {
  background-color: var(--warning);
  border-color:     var(--warning);
  color:            var(--warning-foreground);
}

.btn[data-variant="destructive"] {
  background-color: var(--destructive);
  border-color:     var(--destructive);
  color:            var(--destructive-foreground);
}


/* ============================================================
   States
   ============================================================ */

/* Primary hover — 20% dark overlay on background, full opacity */
.btn[data-variant="primary"][data-tone="default"]:hover:not(:disabled):not([aria-disabled="true"]) {
  background-color: color-mix(in srgb, var(--primary) 80%, #282825 20%);
  border-color:     color-mix(in srgb, var(--primary) 80%, #282825 20%);
  opacity:          1;
}

.btn[data-variant="primary"][data-tone="accent"]:hover:not(:disabled):not([aria-disabled="true"]) {
  background-color: color-mix(in srgb, var(--accent) 80%, transparent);
  border-color:     color-mix(in srgb, var(--accent) 80%, transparent);
  opacity:          1;
}

/* Secondary hover — darker primary border + text, no fill */
.btn[data-variant="secondary"][data-tone="default"]:hover:not(:disabled):not([aria-disabled="true"]) {
  border-color: color-mix(in srgb, var(--primary) 80%, #282825 20%);
  color:        color-mix(in srgb, var(--primary) 80%, #282825 20%);
  opacity:      1;
}

.btn[data-variant="secondary"][data-tone="accent"]:hover:not(:disabled):not([aria-disabled="true"]) {
  border-color: color-mix(in srgb, var(--accent) 80%, transparent);
  color:        color-mix(in srgb, var(--accent) 80%, transparent);
  opacity:      1;
}

.btn[data-variant="info"]:hover:not(:disabled):not([aria-disabled="true"]) {
  background-color: color-mix(in srgb, var(--info) 80%, #282825 20%);
  border-color:     color-mix(in srgb, var(--info) 80%, #282825 20%);
  color:            var(--info-foreground);
  opacity:          1;
}

.btn[data-variant="success"]:hover:not(:disabled):not([aria-disabled="true"]) {
  background-color: color-mix(in srgb, var(--success) 80%, #282825 20%);
  border-color:     color-mix(in srgb, var(--success) 80%, #282825 20%);
  color:            var(--success-foreground);
  opacity:          1;
}

.btn[data-variant="warning"]:hover:not(:disabled):not([aria-disabled="true"]) {
  background-color: color-mix(in srgb, var(--warning) 80%, #282825 20%);
  border-color:     color-mix(in srgb, var(--warning) 80%, #282825 20%);
  color:            var(--warning-foreground);
  opacity:          1;
}

.btn[data-variant="destructive"]:hover:not(:disabled):not([aria-disabled="true"]) {
  background-color: color-mix(in srgb, var(--destructive) 80%, #282825 20%);
  border-color:     color-mix(in srgb, var(--destructive) 80%, #282825 20%);
  color:            var(--destructive-foreground);
  opacity:          1;
}

/* Active / pressed */
.btn:active:not(:disabled):not([aria-disabled="true"]) {
  opacity: 0.76;
}

/* Focus */
.btn:focus-visible {
  outline:        2px solid var(--ring);
  outline-offset: 2px;
}

/* Disabled */
.btn:disabled,
.btn[aria-disabled="true"] {
  cursor:         not-allowed;
  opacity:        0.4;
  pointer-events: none;
}


/* ============================================================
   Icon slot
   ============================================================ */

.btn__icon {
  align-items:     center;
  display:         inline-flex;
  flex-shrink:     0;
  justify-content: center;
}

.btn[data-size="xs"] .btn__icon:not(.btn__icon--hover-only) { height: 0.75rem; width: 0.75rem; } /* 12px */
.btn[data-size="sm"] .btn__icon:not(.btn__icon--hover-only),
.btn[data-size="md"] .btn__icon:not(.btn__icon--hover-only),
.btn[data-size="lg"] .btn__icon:not(.btn__icon--hover-only) { height: 1rem;    width: 1rem;    } /* 16px */

.btn__icon svg {
  display: block;
  height:  100%;
  width:   100%;
}


/* ============================================================
   Hover-only icon — hidden by default, slides/fades in on :hover.
   Negative margin-right cancels the flex gap when collapsed so
   the label stays flush with the padding edge.
   ============================================================ */

/* Must come after the .btn[data-size] .btn__icon rules to win specificity tie */
.btn .btn__icon--hover-only {
  min-width:    0;        /* override flex min-width: auto so item can truly collapse */
  width:        0;
  overflow:     hidden;
  opacity:      0;
  margin-right: calc(-1 * var(--btn-gap, 0.5rem));
  transition:   width 0.2s ease, opacity 0.15s ease, margin-right 0.2s ease;
}

.btn:hover:not(:disabled):not([aria-disabled="true"]) .btn__icon--hover-only {
  width:        1rem; /* sm / md / lg */
  height:       1rem;
  opacity:      1;
  margin-right: 0;
}

.btn[data-size="xs"]:hover:not(:disabled):not([aria-disabled="true"]) .btn__icon--hover-only {
  width:  0.75rem;
  height: 0.75rem;
}


/* ============================================================
   Badge slot — optional count pill inside the button
   ============================================================ */

.btn__badge {
  align-items:      center;
  background-color: var(--primary);
  border-radius:    var(--radius-full);
  color:            var(--primary-foreground);
  display:          inline-flex;
  font-size:        var(--font-size-xs);   /* 12px */
  font-weight:      var(--font-weight-medium);
  justify-content:  center;
  line-height:      var(--line-height-xs); /* 16px */
  min-width:        1.25rem;               /* 20px */
  padding:          0.125rem 0.375rem;     /* 2px 6px */
}

