/*
  /sammenlign — the comparison table.

  Below 46rem: a stacked card per competitor (the three rows that actually
  differ from Notarium). Above it: the full ten-row table, horizontally
  scrollable, with the Notarium column pinned via `position: sticky`. This is
  a PURE CSS BREAKPOINT — pages/_compare_table.html.erb renders both markups
  always, and only display:none/block per breakpoint decides which one a
  visitor sees. A crawler and a no-JS visitor therefore see exactly what a
  sighted visitor at that width does; compare_controller.js only adds a
  cosmetic `.is-scrolled` class once the wide table has actually been
  scrolled, so the sticky column's border reads as an edge, not a stray line.

  Propshaft's `stylesheet_link_tag :app` (shared/_head.html.erb) bundles every
  file in this directory on every page — there is nothing to register.
*/

.cmp-cards { display: grid; gap: 1.1rem; }

.cmp-card {
  border: 1px solid var(--nt-hairline);
  border-radius: 0.9rem;
  background: var(--nt-surface);
  padding: 1.1rem 1.2rem 1.3rem;
  overflow: hidden;
}

.cmp-card-table { width: 100%; border-collapse: collapse; }

.cmp-card-caption {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.7rem;
  margin-bottom: 0.35rem;
  border-bottom: 1px solid var(--nt-hairline);
  text-align: left;
}

.cmp-card-name { font-family: var(--nt-font-display); font-size: 1.05rem; color: var(--nt-ink); }
.cmp-card-source {
  font-family: var(--nt-font-mono); font-size: 0.62rem; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--nt-ink-faint);
}

.cmp-card-table thead { display: none; }
.cmp-card-table th[scope="row"] {
  text-align: left; font-weight: 550; color: var(--nt-ink-soft); font-size: 0.85rem;
  padding: 0.6rem 0 0.15rem; width: 34%; vertical-align: top;
}
.cmp-card-table td {
  padding: 0.6rem 0 0.15rem; font-size: 0.9rem; color: var(--nt-ink-soft); line-height: 1.5;
  vertical-align: top;
}
.cmp-card-table td.is-us { color: var(--nt-ink); font-weight: 550; }
.cmp-card-table tr { display: grid; grid-template-columns: 34% 1fr; }
.cmp-card-table tr + tr { border-top: 1px dashed var(--nt-hairline); }
.cmp-card-table th[scope="row"] { grid-row: 1 / 3; }
.cmp-card-table td:nth-of-type(1) { grid-column: 2; }
.cmp-card-table td:nth-of-type(2) { grid-column: 2; }

.cmp-mark {
  display: inline-block; width: 1.1em; text-align: center; font-weight: 700; margin-right: 0.3em;
}
.cmp-mark-full { color: var(--nt-ok); }
.cmp-mark-partial { color: var(--nt-warn); }
.cmp-mark-none { color: var(--nt-ink-faint); }

.cmp-footnote { margin-top: 1rem; font-size: 0.8rem; color: var(--nt-ink-faint); }

.cmp-table-wrap { display: none; }

.cmp-scroll { overflow-x: auto; border-radius: 0.9rem; border: 1px solid var(--nt-hairline); }

.cmp-table { width: 100%; border-collapse: collapse; min-width: 62rem; background: var(--nt-surface); }

.cmp-table th,
.cmp-table td { padding: 0.85rem 1.1rem; text-align: left; vertical-align: top; font-size: 0.88rem; }

.cmp-corner { background: var(--nt-surface); }

.cmp-col {
  position: sticky; top: 0; background: var(--nt-surface);
  font-weight: 500; border-bottom: 1px solid var(--nt-hairline);
}
.cmp-col-name { display: block; font-family: var(--nt-font-display); font-size: 1rem; color: var(--nt-ink); }
.cmp-col-price { display: block; margin-top: 0.2rem; color: var(--nt-ink-soft); font-size: 0.82rem; }
.cmp-col-source {
  display: block; margin-top: 0.15rem; font-family: var(--nt-font-mono); font-size: 0.6rem;
  letter-spacing: 0.05em; text-transform: uppercase; color: var(--nt-ink-faint);
}

.cmp-feature { color: var(--nt-ink-soft); font-weight: 550; white-space: nowrap; }

.cmp-table tbody tr:nth-child(odd) { background: color-mix(in srgb, var(--nt-hairline) 22%, transparent); }
.cmp-table td { color: var(--nt-ink-soft); }

/* The Notarium column: pinned to the right edge of the scroll container so it
   stays visible while a reader scrolls through the four competitors, with an
   opaque ground and a left border that only means something once there is
   something to scroll past — see .is-scrolled below. */
.cmp-col.is-us,
.cmp-cell.is-us {
  position: sticky; right: 0; background: var(--nt-seal-soft);
  color: var(--nt-ink); font-weight: 550;
}
.cmp-cell.is-us { color: var(--nt-ink); }
.cmp-col.is-us .cmp-col-name,
.cmp-col.is-us .cmp-col-price { color: var(--nt-ink); }

.cmp-scroll.is-scrolled .cmp-col.is-us,
.cmp-scroll.is-scrolled .cmp-cell.is-us { border-left: 1px solid var(--nt-hairline); }

@media (min-width: 46rem) {
  .cmp-cards { display: none; }
  .cmp-table-wrap { display: block; }
}
