/* App feel: pressed states for chrome and cards, off-screen rendering savings, pull-to-refresh indicator. Transform/opacity only. */

/* pressed feedback (touch + mouse); no hover dependence */
.bottom-nav a { transition: color var(--dur-1), transform var(--dur-1) var(--ease-out); }
.bottom-nav a:active { transform: scale(.92); }
.topbar .nav-d a:active, .topbar .brand:active { opacity: .7; }
.c-card { transition: transform var(--dur-1) var(--ease-out); }
.c-card:active { transform: scale(.985); }
.cartbar:active { transform: scale(.985); }
dialog.sheet button:active, .sheet-body a:active { opacity: .8; }

/* long lists: skip layout and paint for cards well below the first screen (paint containment clips overflow, so only where cards are flat) */
.c-card:nth-child(n+9) { content-visibility: auto; contain-intrinsic-size: auto 300px; }
footer.footer, .footer { content-visibility: auto; contain-intrinsic-size: auto 420px; }

/* images never shift layout: fixed intrinsic ratio from width/height attributes, soft placeholder until decoded */
.c-media, .ph { background-color: var(--surface-3, var(--line)); }

/* scrolling: keep rails and sheets from chaining scroll into the page */
.rail, .hx-rail, [data-rail] { overscroll-behavior-x: contain; }
dialog.sheet { overscroll-behavior: contain; }
dialog.sheet[open] { will-change: transform; }          /* only while a sheet is open (one element), removed on close */

/* pull to refresh (installed app, home only) */
.ptr { position: fixed; top: calc(var(--safe-t, 0px) + 8px); left: 50%; z-index: 90; width: 36px; height: 36px; border-radius: 50%; background: var(--surface); box-shadow: var(--shadow); display: grid; place-items: center; transform: translate3d(-50%, -40px, 0); pointer-events: none; }
.ptr-dot { width: 18px; height: 18px; border-radius: 50%; border: 2px solid var(--line-strong); border-top-color: var(--brand); transition: transform var(--dur-1); }
.ptr.ready .ptr-dot { transform: rotate(180deg); border-color: var(--brand); }
.ptr.spin .ptr-dot { animation: ptr-spin .7s linear infinite; }
@keyframes ptr-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .bottom-nav a:active, .c-card:active, .cartbar:active { transform: none; }
  .ptr.spin .ptr-dot { animation: none; }
}

/* QA pass: tap targets. Small controls keep their look; an invisible 44px hit area surrounds them. Hover and keyboard focus are visible on all of them. */
.chip.sm, .bk-chip.sm, .fq-aud a, .gr-ribbon a.go, .st-link, .au-links a, .pg-crumbs a, .dh-more, .pa-link, .dh-nudge .go, .crumbs a { position: relative; }
.chip.sm::after, .bk-chip.sm::after, .fq-aud a::after, .gr-ribbon a.go::after, .st-link::after, .au-links a::after, .pg-crumbs a::after, .dh-more::after, .pa-link::after, .dh-nudge .go::after, .crumbs a::after {
  content: ""; position: absolute; inset: min(0px, calc((44px - 100%) / -2)) -4px; }
.fq-aud a:hover, .st-link:hover, .au-links a:hover, .pg-crumbs a:hover, .crumbs a:hover, .dh-more:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.fq-aud a:hover:not([aria-current]) { background: var(--surface-2); }
.fq-aud a:focus-visible, .st-link:focus-visible, .au-links a:focus-visible, .pg-crumbs a:focus-visible, .crumbs a:focus-visible, .dh-more:focus-visible, .pa-link:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
