/* site-compare.css — competitor pages: /vs hub, vs/<competitor>, alternativa/<competitor>
   and the AI-tools roundup. Same visual language as the pricing table
   (site-pricing-page.css): paper cards, serif display, mono labels, the HeyProf
   column lifted with a terracotta border. */
@layer features {

  /* ── 30-second verdict: two honest cards right after the hero ── */
  .landing-page .lp-verdict {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 28px;
  }

  .landing-page .lp-verdict-card {
    background: var(--lp-white);
    border: 1px solid var(--lp-rule);
    border-top: 3px solid var(--lp-ink-faint);
    border-radius: var(--lp-radius);
    padding: 26px 28px;
    box-shadow: var(--lp-shadow-soft);
  }

  .landing-page .lp-verdict-card--me { border-top-color: var(--lp-wa-d); }

  .landing-page .lp-verdict-card h3 {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 420;
    letter-spacing: -0.015em;
    margin: 0 0 10px;
  }

  .landing-page .lp-verdict-card p {
    font-size: var(--lp-fs-base);
    color: var(--lp-ink-soft);
    line-height: 1.6;
    margin: 0;
  }

  /* ── Side-by-side table: label column + HeyProf (featured) + competitor ──
     A real <table> (AI answer engines and screen readers need the semantics)
     laid out as a grid clone of lp-ptable with three columns; the middle column
     gets the lifted terracotta card treatment. */
  .landing-page .lp-vstable {
    display: grid;
    /* Fixed label column (like lp-ptable's 340px) so the ::after overlay can
       compute the featured column's x. minmax(0, …): bare fr has an auto floor
       and long cells would unbalance the two value columns. */
    grid-template-columns: 240px repeat(2, minmax(0, 1fr));
    border: 1px solid var(--lp-rule);
    background: var(--color-surface);
    box-shadow: var(--lp-shadow-soft);
    position: relative;
    margin-top: 28px;
  }

  /* Unboxing the row wrappers promotes every th/td to a direct grid item, which
     is what makes the three-column layout work on a real <table>.
     Careful: `display: contents` eats table semantics in the accessibility
     tree. Not just history (Chrome 113 regression, fixed in 115; Safari only
     fixed tbody in TP 203, Sep/2024): measured on Chrome 148 over CDP, with no
     explicit role the table exposes 1 rowgroup instead of 2. That's why the
     markup declares the ARIA roles (table/rowgroup/row/columnheader/rowheader/
     cell) mirroring the implicit ones — they survive whichever browser bug is
     current. */
  .landing-page .lp-vstable thead,
  .landing-page .lp-vstable tbody,
  .landing-page .lp-vstable tr { display: contents; }

  .landing-page .lp-vstable th,
  .landing-page .lp-vstable td {
    position: relative;
    z-index: 1;
    /* th defaults (bold, centered) would rewrite the whole table's typography */
    font-weight: 400;
    text-align: start;
  }

  /* header cells */
  .landing-page .lp-vstable .lp-vsh {
    padding: 22px;
    border-inline-end: 1px solid var(--lp-rule);
    border-bottom: 1px solid var(--lp-rule);
    display: flex;
    flex-direction: column;
    gap: 4px;
    background: var(--color-surface);
    position: relative;
  }
  .landing-page .lp-vstable thead th:last-child { border-inline-end: 0; }

  .landing-page .lp-vstable .lp-vsh-corner {
    background: var(--lp-paper-warm);
    justify-content: flex-end;
  }
  .landing-page .lp-vstable .lp-vsh-corner .lp-corner-label {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--lp-ink-mute);
    font-weight: 600;
  }

  .landing-page .lp-vstable .lp-vsh .lp-vsh-name {
    font-family: var(--font-serif);
    font-size: 26px;
    font-weight: 460;
    letter-spacing: -0.015em;
  }
  .landing-page .lp-vstable .lp-vsh .lp-vsh-sub {
    font-family: var(--font-mono);
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--lp-ink-mute);
  }

  /* HeyProf column card: lifts out of the grid like the Pro plan on /precos */
  .landing-page .lp-vstable .lp-vsh.lp-featured {
    border: 1px solid var(--lp-terracotta);
    box-shadow: var(--lp-shadow-card);
    margin: -1px;
    z-index: 3;
  }
  .landing-page .lp-vstable .lp-vsh .lp-vsh-tag {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    white-space: nowrap;
    background: var(--lp-terracotta);
    color: var(--lp-white);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 500;
    z-index: 4;
  }
  .landing-page .lp-vstable .lp-vsh .lp-doodle-sparkle {
    position: absolute;
    top: -20px;
    inset-inline-end: -20px;
    width: 48px;
    height: 48px;
    color: var(--lp-mustard);
    opacity: 0.85;
    pointer-events: none;
    z-index: 4;
  }

  /* row label cells */
  .landing-page .lp-vstable .lp-vslabel {
    padding: 16px 22px;
    border-inline-end: 1px solid var(--lp-rule);
    border-bottom: 1px solid var(--lp-rule);
    display: flex;
    align-items: center;
    font-size: 15px;
    font-weight: 600;
    color: var(--lp-ink);
    letter-spacing: -0.005em;
    line-height: 1.35;
  }

  /* value cells */
  .landing-page .lp-vstable .lp-vscell {
    padding: 16px 20px;
    border-inline-end: 1px solid var(--lp-rule);
    border-bottom: 1px solid var(--lp-rule);
    font-size: 15px;
    color: var(--lp-ink);
    line-height: 1.5;
    display: flex;
    align-items: center;
    gap: 8px;
  }
  .landing-page .lp-vstable tbody td:last-child { border-inline-end: 0; }

  /* last row (label + two cells) closes the table without a double border.
     :where() keeps the row lookup free of specificity, so the mobile card rules
     below still win and redraw a full border on every cell. */
  .landing-page .lp-vstable :where(tbody tr):last-child > * { border-bottom: 0; }

  .landing-page .lp-vstable .lp-yes {
    color: var(--lp-wa-d);
    font-weight: 700;
    flex-shrink: 0;
  }
  .landing-page .lp-vstable .lp-no {
    color: var(--lp-ink-faint);
    font-weight: 700;
    flex-shrink: 0;
  }

  /* continuous terracotta verticals over the featured (middle) column */
  .landing-page .lp-vstable::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    /* 1px outset each side: the featured header card pulls itself 1px out of
       the grid cell (margin: -1px), so the descending lines must too. */
    inset-inline-start: calc(240px - 1px);
    width: calc((100% - 240px) / 2 + 2px);
    border-inline-start: 1px solid var(--lp-terracotta);
    border-inline-end: 1px solid var(--lp-terracotta);
    z-index: 2;
    pointer-events: none;
  }

  /* ── "Same task, two ways": chat sample vs platform-steps card ── */
  .landing-page .lp-vs-path {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 28px;
    margin-top: 36px;
    align-items: start;
  }

  .landing-page .lp-path-note {
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--lp-ink-mute);
    margin: 0 0 12px;
  }
  .landing-page .lp-path--me .lp-path-note { color: var(--lp-wa-d); }

  .landing-page .lp-path-steps {
    background: var(--lp-white);
    border: 1px solid var(--lp-rule);
    border-radius: 12px;
    box-shadow: var(--lp-shadow-soft);
    padding: 22px 24px;
    margin: 0;
    list-style: none;
    counter-reset: path;
  }
  .landing-page .lp-path-steps li {
    counter-increment: path;
    display: flex;
    gap: 14px;
    align-items: baseline;
    padding: 10px 0;
    font-size: 15px;
    color: var(--lp-ink-soft);
    line-height: 1.5;
  }
  .landing-page .lp-path-steps li + li { border-top: 1px solid var(--lp-paper-warm); }
  .landing-page .lp-path-steps li::before {
    content: counter(path, decimal-leading-zero);
    font-family: var(--font-mono);
    font-size: 12px;
    font-weight: 600;
    color: var(--lp-terracotta);
    flex-shrink: 0;
  }
  .landing-page .lp-path-foot {
    margin-top: 14px;
    font-size: var(--lp-fs-sm);
    color: var(--lp-ink-mute);
  }

  /* ── Deep dive (3 differences you can feel) ── */
  .landing-page .lp-vs-deep {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 36px;
    margin-top: 36px;
  }
  .landing-page .lp-vs-deep h3 {
    margin: 0 0 10px;
    font-size: 22px;
  }
  .landing-page .lp-vs-deep p {
    color: var(--lp-ink-soft);
    line-height: 1.62;
    margin: 0;
  }

  /* ── Audience split (pra quem é cada um) ── */
  .landing-page .lp-vs-audience {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 28px;
    align-items: start;
  }

  .landing-page .lp-vs-aud {
    background: var(--lp-white);
    border: 1px solid var(--lp-rule);
    border-radius: var(--lp-radius);
    box-shadow: var(--lp-shadow-soft);
    padding: 28px 30px;
  }
  .landing-page .lp-vs-aud--me { border-color: var(--lp-terracotta); }
  .landing-page .lp-vs-aud h3 {
    font-family: var(--font-serif);
    font-size: 24px;
    font-weight: 420;
    letter-spacing: -0.015em;
    margin: 0 0 14px;
  }
  .landing-page .lp-vs-aud ul { margin: 0; padding-inline-start: 22px; }
  .landing-page .lp-vs-aud li { margin-bottom: 10px; line-height: 1.55; color: var(--lp-ink-soft); }
  .landing-page .lp-vs-aud p { margin: 0; line-height: 1.6; color: var(--lp-ink-soft); }

  /* ── Roundup (ferramentas-ia): ranked entry cards with fact chips ── */
  .landing-page .lp-tools {
    display: grid;
    gap: 24px;
    margin-top: 36px;
  }

  .landing-page .lp-tool {
    display: grid;
    grid-template-columns: 96px minmax(0, 1fr);
    min-inline-size: 0;
    gap: 8px 28px;
    background: var(--lp-white);
    border: 1px solid var(--lp-rule);
    border-radius: var(--lp-radius);
    box-shadow: var(--lp-shadow-soft);
    padding: 30px 32px;
    position: relative;
  }
  .landing-page .lp-tool > * {
    min-inline-size: 0;
  }
  .landing-page .lp-tool--me {
    border-color: var(--lp-terracotta);
    box-shadow: var(--lp-shadow-card);
  }
  .landing-page .lp-tool--me .lp-tool-tag {
    position: absolute;
    top: -12px;
    inset-inline-start: 28px;
    background: var(--lp-terracotta-d);
    color: var(--lp-white);
    font-family: var(--font-mono);
    font-size: 11px;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    font-weight: 500;
  }

  .landing-page .lp-tool .lp-tool-rank {
    grid-row: 1 / -1;
    font-family: var(--font-serif);
    font-size: 84px;
    line-height: 0.9;
    font-weight: 300;
    color: var(--lp-terracotta);
    letter-spacing: -0.05em;
    opacity: 0.9;
  }

  .landing-page .lp-tool .lp-tool-verdict {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--lp-terracotta-d);
  }

  .landing-page .lp-tool h3 {
    font-family: var(--font-serif);
    font-size: 28px;
    font-weight: 420;
    letter-spacing: -0.015em;
    margin: 0;
  }

  .landing-page .lp-tool p {
    color: var(--lp-ink-soft);
    line-height: 1.62;
    margin: 6px 0 0;
  }

  .landing-page .lp-tool .lp-tool-verdict,
  .landing-page .lp-tool h3,
  .landing-page .lp-tool p,
  .landing-page .lp-tool .lp-tool-facts { grid-column: 2; }

  .landing-page .lp-tool .lp-tool-facts {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 16px;
    padding: 0;
    list-style: none;
  }
  .landing-page .lp-tool .lp-tool-facts li {
    font-size: 13px;
    color: var(--lp-ink-soft);
    background: var(--lp-paper);
    border: 1px solid var(--lp-rule);
    border-radius: 999px;
    padding: 4px 12px;
    white-space: normal;
    max-inline-size: 100%;
    overflow-wrap: anywhere;
  }
  .landing-page .lp-tool .lp-tool-facts li.lp-fact-yes { color: var(--lp-ink-soft); }
  .landing-page .lp-tool .lp-tool-facts li a { color: inherit; }

  /* ── Roundup matrix: every tool at a glance (classic scrolling table) ── */
  .landing-page .lp-matrix-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin-top: 28px;
    border: 1px solid var(--lp-rule);
    border-radius: var(--lp-radius);
    box-shadow: var(--lp-shadow-soft);
    background: var(--lp-white);
  }
  .landing-page .lp-matrix-wrap:focus-visible {
    outline: 2px solid var(--lp-ink);
    outline-offset: 3px;
  }
  .landing-page .lp-matrix {
    width: 100%;
    min-width: 44rem;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 14px;
  }
  .landing-page .lp-matrix th,
  .landing-page .lp-matrix td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--lp-paper-warm);
    text-align: start;
    vertical-align: top;
    line-height: 1.45;
  }
  .landing-page .lp-matrix thead th {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--lp-ink-mute);
    background: var(--lp-paper-warm);
    white-space: nowrap;
  }
  .landing-page .lp-matrix tbody th {
    font-weight: 600;
    color: var(--lp-ink);
    white-space: nowrap;
  }
  .landing-page .lp-matrix tbody tr:last-child th,
  .landing-page .lp-matrix tbody tr:last-child td { border-bottom: 0; }
  .landing-page .lp-matrix .lp-yes { color: var(--lp-wa-d); font-weight: 700; }
  .landing-page .lp-matrix .lp-no { color: var(--lp-ink-faint); }
  .landing-page .lp-matrix .lp-row-me {
    background: color-mix(in srgb, var(--lp-terracotta) 7%, var(--lp-white));
  }

  /* ── /vs hub: comparison index cards ── */
  .landing-page .lp-cmp-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 36px;
  }
  .landing-page .lp-cmp-card {
    display: flex;
    flex-direction: column;
    gap: 8px;
    background: var(--lp-white);
    border: 1px solid var(--lp-rule);
    border-radius: var(--lp-radius);
    box-shadow: var(--lp-shadow-soft);
    padding: 26px 28px;
    text-decoration: none;
    color: var(--lp-ink);
    transition: transform 0.18s ease, box-shadow 0.18s ease;
  }
  .landing-page .lp-cmp-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--lp-shadow-card);
    text-decoration: none;
  }
  .landing-page .lp-cmp-card .lp-cmp-kind {
    font-family: var(--font-mono);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--lp-terracotta-d);
  }
  .landing-page .lp-cmp-card h3 {
    font-family: var(--font-serif);
    font-size: 26px;
    font-weight: 420;
    letter-spacing: -0.015em;
    margin: 0;
  }
  .landing-page .lp-cmp-card p {
    margin: 0;
    color: var(--lp-ink-soft);
    line-height: 1.55;
    font-size: 15px;
  }
  .landing-page .lp-cmp-card .lp-cmp-go {
    margin-top: auto;
    padding-top: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--lp-terracotta);
  }

  /* ── Full pack showcase (site/_full_pack): everything around the plan ── */
  .landing-page .lp-pack {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    margin-top: 36px;
  }

  .landing-page .lp-pack-col {
    background: var(--lp-white);
    border: 1px solid var(--lp-rule);
    border-radius: var(--lp-radius);
    box-shadow: var(--lp-shadow-soft);
    padding: 26px 28px;
  }

  .landing-page .lp-pack-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 0;
    padding: 0;
    list-style: none;
  }
  .landing-page .lp-pack-chips li {
    font-size: 14px;
    color: var(--lp-ink-soft);
    background: var(--lp-paper);
    border: 1px solid var(--lp-rule);
    border-radius: 999px;
    padding: 5px 13px;
    line-height: 1.4;
  }
  .landing-page .lp-pack-chips li small {
    font-family: var(--font-mono);
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--lp-terracotta-d);
    margin-inline-start: 4px;
  }

  .landing-page .lp-pack-foot {
    margin: 14px 0 0;
    font-size: var(--lp-fs-sm);
    color: var(--lp-ink-mute);
    line-height: 1.5;
  }

  /* In-copy links across the comparison prose must read as links (the global
     a:not(.btn) reset strips decoration). */
  .landing-page .lp-pack-foot a,
  .landing-page .lp-path-foot a,
  .landing-page .lp-tool-facts li a,
  .landing-page .lp-tool p a,
  .landing-page .lp-verdict-card a {
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 3px;
    text-decoration-color: var(--lp-ink-faint);
  }
  .landing-page .lp-pack-foot a:hover,
  .landing-page .lp-path-foot a:hover,
  .landing-page .lp-tool-facts li a:hover,
  .landing-page .lp-tool p a:hover,
  .landing-page .lp-verdict-card a:hover {
    color: var(--lp-terracotta);
    text-decoration-color: var(--lp-terracotta);
  }

  /* ── Mobile ── */
  @media (max-width: 900px) {
    .landing-page .lp-cmp-cards { grid-template-columns: 1fr 1fr; }
    .landing-page .lp-vs-deep { grid-template-columns: 1fr; gap: 24px; }
    .landing-page .lp-pack { grid-template-columns: 1fr; }
  }

  @media (max-width: 720px) {
    .landing-page .lp-verdict,
    .landing-page .lp-vs-audience,
    .landing-page .lp-vs-path,
    .landing-page .lp-cmp-cards { grid-template-columns: 1fr; }

    /* The vs table folds to label rows + two labeled value cells side by side.
       Column names come from each cell's data-col attribute, so copy stays in
       the markup (never in CSS content). */
    .landing-page .lp-vstable {
      grid-template-columns: 1fr 1fr;
      border: 0;
      background: transparent;
      box-shadow: none;
    }
    .landing-page .lp-vstable::after { display: none; }
    .landing-page .lp-vstable .lp-vsh-corner { display: none; }

    .landing-page .lp-vstable .lp-vsh {
      border: 1px solid var(--lp-rule);
      border-radius: var(--lp-radius);
      background: var(--lp-white);
      margin-bottom: 4px;
    }
    .landing-page .lp-vstable .lp-vsh.lp-featured {
      margin: 0 0 4px;
      box-shadow: 0 0 0 1px var(--lp-terracotta);
    }
    .landing-page .lp-vstable .lp-vsh .lp-doodle-sparkle { display: none; }
    .landing-page .lp-vstable .lp-vsh .lp-vsh-tag { top: -10px; }

    .landing-page .lp-vstable .lp-vslabel {
      grid-column: 1 / -1;
      border: 0;
      padding: 18px 2px 6px;
      font-size: 16px;
    }
    .landing-page .lp-vstable .lp-vscell {
      flex-direction: column;
      align-items: flex-start;
      gap: 4px;
      border: 1px solid var(--lp-rule);
      border-radius: var(--lp-radius);
      background: var(--lp-white);
      padding: 12px 14px;
      font-size: 14px;
    }
    .landing-page .lp-vstable .lp-vscell::before {
      content: attr(data-col);
      font-family: var(--font-mono);
      font-size: 10px;
      font-weight: 600;
      text-transform: uppercase;
      letter-spacing: 0.1em;
      color: var(--lp-ink-mute);
    }
    .landing-page .lp-vstable .lp-vscell--me {
      border-color: var(--lp-terracotta);
    }
    .landing-page .lp-vstable .lp-vscell--me::before { color: var(--lp-terracotta); }

    .landing-page .lp-tool {
      grid-template-columns: minmax(0, 1fr);
      padding: 24px 22px;
    }
    .landing-page .lp-tool .lp-tool-rank {
      grid-row: auto;
      font-size: 44px;
    }
    .landing-page .lp-tool .lp-tool-verdict,
    .landing-page .lp-tool h3,
    .landing-page .lp-tool p,
    .landing-page .lp-tool .lp-tool-facts { grid-column: 1; }
  }
}
