/* ============================================================
   KeyLen Web — Compare product page
   ------------------------------------------------------------
   `/compare` and `/compare/zh` are PRODUCT PAGES, not a new
   layout. They reuse the site's twelve-column field, type scale,
   header, footer and design tokens unchanged.

   This file is ADDITIVE and PAGE-LOCAL. It defines no selector
   that `site.css` or `help.css` already owns, so the frozen
   homepage, Recall and AI pages cannot be affected by it — those
   pages do not link this stylesheet at all.

   Only four things are new, because the shared system does not
   already provide them:

     1. the availability line in the hero
     2. the section rhythm for the feature and FAQ blocks
     3. the feature block itself
     4. the width overrides for the Free / Pro table, which reuses
        `help.css`'s `.help-table` rather than inventing a second
        table component

   No JavaScript is involved, and none is required.
   ============================================================ */

/* ---- availability ------------------------------------------
   A factual status line, not a button and not a store badge.
   There is no App Store URL for KeyLen Compare yet, so nothing
   here may look like a download action. */
.cmp-availability {
  grid-column: 1 / 9;
  margin: var(--space-4) 0 0;
  font-size: var(--fs-small);
  color: var(--muted);
}
.cmp-availability strong { font-weight: 650; color: var(--fg); }

/* ---- section rhythm ----------------------------------------
   The same tempo as the site's product sections. `--section-pad`
   is reused rather than re-invented, so Compare reads as part of
   the same site as Recall and AI. */
.cmp-doc { padding: var(--section-pad) 0; }
.cmp-doc .grid { row-gap: var(--space-4); }
.cmp-end { padding: var(--section-pad) 0 var(--space-16); }

/* The explanatory sections share Section 03's indent on the
   Recall page: headline at column 4, body and lists below it. */
.cmp-head { grid-column: 4 / 12; }
.cmp-body { grid-column: 4 / 9; }

/* ---- feature blocks ----------------------------------------
   Four short blocks, one per capability. Not cards, not a grid of
   boxes: a plain stack on the same reading axis as the body copy. */
.cmp-features {
  grid-column: 4 / 10;
  display: grid;
  gap: var(--space-6);
}

.cmp-feature h3 {
  margin: 0;
  font-size: var(--fs-body-lg);
  font-weight: 650;
  letter-spacing: -0.01em;
}

.cmp-feature p {
  margin: var(--space-2) 0 0;
  font-size: var(--fs-body-lg);
  color: var(--muted);
  max-width: var(--measure);
}

/* ---- Free / Pro table --------------------------------------
   The table itself is `help.css`'s existing `.help-table`; only
   the column widths are set here. The shared table gives the last
   column `width: 1%` because its third column holds a shortcut.
   In this table the third column holds the Pro answer, so it must
   take its natural width instead. */
.cmp-table { grid-column: 4 / 13; }

.cmp-table .help-table th:last-child,
.cmp-table .help-table td:last-child { width: auto; }

.cmp-table .help-table th:first-child,
.cmp-table .help-table td:first-child { width: 46%; }

/* ---- FAQ ---------------------------------------------------
   Five questions, set as a plain definition-style stack. The
   question carries the heading weight; the answer stays in the
   site's muted body tier. No accordion, because there is no
   JavaScript anywhere on this site. */
.cmp-faq {
  grid-column: 4 / 10;
  display: grid;
  gap: var(--space-6);
}

.cmp-faq-q {
  margin: 0;
  font-size: var(--fs-body-lg);
  font-weight: 650;
  letter-spacing: -0.01em;
}

.cmp-faq-a {
  margin: var(--space-2) 0 0;
  font-size: var(--fs-body-lg);
  color: var(--muted);
  max-width: var(--measure);
}

/* ============================================================
   MOBILE — the desktop composition collapses to one reading axis
   ============================================================ */
@media (max-width: 900px) {
  .cmp-availability,
  .cmp-head,
  .cmp-body,
  .cmp-features,
  .cmp-table,
  .cmp-faq { grid-column: 1 / -1; }

  .cmp-availability { margin-top: var(--space-3); }

  .cmp-doc { padding: var(--section-pad-sm) 0; }
  .cmp-end { padding: var(--section-pad-sm) 0 var(--space-12); }

  .cmp-features,
  .cmp-faq { gap: var(--space-4); }

  /* The table already stacks at 640px via `help.css`; the first
     column's 46% width must not survive that breakpoint. */
  .cmp-table .help-table th:first-child,
  .cmp-table .help-table td:first-child { width: auto; }
}

@media (max-width: 640px) {
  /* `help.css` switches `.help-table` to `display: block` at this
     width. The caption then shrink-wraps to its longest word, so it
     renders one word per line. Keep the caption full-width; the
     stacked table below it is unaffected. */
  .cmp-table .help-table-caption { display: block; width: 100%; }
}
