/* after-proof.css — interaction polish for ab-test, benchmarks, enterprise and
   pricing. Loaded after polish.css. Tokens only. Rules aimed at elements with
   inline styles need !important or they lose silently (DESIGN.md). */

/* Press feedback on pointer-down. polish.css presses buttons and the filled
   CTA; the bordered link CTAs (a.hv-4) had a hover and no press. Scoped to
   <main> so the shared nav keeps its own behaviour. */
main a.hv-4:active {
  transform: scale(var(--scale-press));
  transition: transform var(--dur-instant) var(--ease-niro);
}

/* Enterprise shape picker: a segmented control presses by tinting, not by
   scaling — a shrinking cell in a clipped strip opens gaps at its seams. */
.n-enshapes > button:active { transform: none; }
.n-enshapes > button[aria-selected="false"]:active { background: var(--surface-alpha-md) !important; }

/* A/B sample list: the id currently in the field stays marked. */
[data-ab="rows"] button[aria-pressed="true"] > span:first-child { color: var(--a0); }

@media (hover: hover) and (pointer: fine) {
  .n-enshapes > button[aria-selected="false"]:hover { background: var(--surface-alpha-md) !important; }
  /* benchmarks task filter: secondary hover is an accent border (DESIGN.md) */
  [data-q-tab][aria-pressed="false"]:hover { border-color: var(--accent) !important; color: var(--text-primary) !important; }
  [data-ab="rows"] button:hover > span:first-child { color: var(--a0); }
}

/* Pricing comparison: row identity survives a sideways scroll on a phone.
   Opaque, because the numbers slide underneath it. */
#compare .ap-scroll th[scope="row"],
#compare .ap-scroll thead td:first-child {
  position: sticky; left: 0; z-index: 1;
  background: var(--surface-page) !important;
}

/* Benchmarks: the same rule for the three smaller tables. Each sits on the
   surface it is drawn on, so the pinned cell matches it. */
#ceiling th[scope="row"], #ceiling thead td:first-child,
#economics th[scope="row"], #economics thead td:first-child {
  position: sticky; left: 0; z-index: 1;
  background: var(--surface-page);
}
#bytask th[scope="row"], #bytask thead td:first-child {
  position: sticky; left: 0; z-index: 1;
  background: var(--surface-card);
}

/* Benchmarks "why retries cannot close it": label beside the paragraph on a
   wide screen; stacked on a phone, where a 240px label column left the
   paragraph two words wide. */
@media (max-width: 640px) {
  .ap-why { grid-template-columns: 1fr !important; gap: var(--space-2) !important; }
}
