/* ==========================================================================
   Worksheet Patch — "Smooth, Buttery, Fluffy" Feel Pass — TRANSLATED DRAFT
   Translated 2026-12-01 from the zip's feel-pass.css (Neon kit) onto the
   REAL live class system. DRAFT ONLY — not applied anywhere.

   Why a translation was needed: the zip targeted .ws-card / .nov-card /
   .band-card / .tier-card / .mc-card / .season-card. Some of those exist on
   secondary pages (pricing tiers, book store), but the product cards
   teachers actually browse — homepage, search, filter grids, /worksheets/,
   /grades/ — are the Batch 8 system: .cl-card wrapping .ws-card-art /
   .ws-card-img / .ws-card-body / .ws-card-foot / .ws-card-price, with
   .cl-pill, .cl-chips/.cl-chip, .cl-inside, .cl-btn (build.py card()/
   catalog_card(), filter.js cardHtml(), search renderer; Batch 8 styles
   ship as the per-page <style id="cl-batch8"> block, 3,997 chars).

   HOW TO APPLY (when Derrick says go): append AFTER both the extracted
   /assets/site.<hash>.css rules and the cl-batch8 block, or ship as its own
   stamped stylesheet linked last. Rules below use specificity >= the
   Batch 8 block (.cl-card .ws-card-art = 0,2,0) so the layer wins without
   !important, except where noted.

   DELIBERATE DEVIATIONS FROM THE ZIP (flagged for Derrick in REPORT.md):
   - Live --pm-r is 14px and load-bearing across the whole site; the zip
     redefines --pm-r to 22px. This draft does NOT touch --pm-r. It adds
     feel-only variables (--feel-r etc.) and applies the bigger radius to
     cards/tiles only.
   - Live stylesheet sets scroll-behavior:auto!important somewhere in the
     cascade; the zip's smooth-scroll rule is kept but will lose to that
     !important until the source rule is revisited — left as a decision.
   - Zip's .pm-shelf tuning is merged into the live .pm-shelf (which
     already swipe-scrolls): mandatory snap + hidden scrollbar + mobile
     peek are the deltas; desktop column count is left at the live 6.
   ========================================================================== */

:root {
  --feel-r: 22px;          /* card radius (Batch 8 live: 14px — DECISION) */
  --feel-r-lg: 28px;       /* tile radius */
  --feel-shadow: 0 2px 6px rgba(20, 37, 28, 0.045), 0 10px 26px rgba(20, 37, 28, 0.065);
  --feel-shadow-lift: 0 4px 10px rgba(20, 37, 28, 0.07), 0 18px 38px rgba(20, 37, 28, 0.12);
  --feel-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* 1. Breathing room & silky scroll -------------------------------------- */
html {
  scroll-behavior: smooth; /* NOTE: loses to live scroll-behavior:auto!important — see header */
  -webkit-tap-highlight-color: transparent;
}

.pm-section {
  padding-block: clamp(24px, 4vw, 44px);
}

.pm-section + .pm-section {
  margin-top: clamp(8px, 1.5vw, 18px);
}

/* Defer off-screen shelf painting on mobile for glide (zip: .band-shelf/.nov-picks — both real on the homepage) */
.band-shelf,
.nov-picks {
  content-visibility: auto;
  contain-intrinsic-size: 1px 420px;
}

/* 2. Swipe-sideways shelves — deltas on the LIVE .pm-shelf ----------------
   Live today: grid-auto-flow:column, 6 across, snap proximity, thin scrollbar.
   Feel deltas: mandatory snap, hidden scrollbar, touch momentum, mobile peek. */
.pm-shelf {
  scroll-snap-type: x mandatory;
  scroll-padding-inline: 16px;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}

.pm-shelf::-webkit-scrollbar {
  display: none;
}

.pm-shelf > * {
  scroll-snap-align: start;
}

@media (max-width: 680px) {
  /* Mobile "peek": next card visibly cut off so swipeability is obvious */
  .pm-shelf {
    grid-auto-columns: minmax(220px, 72vw);
    gap: 14px;
    padding: 8px 16px 24px;
    margin-inline: -16px;
    scroll-padding-inline: 16px;
  }
}

/* 3. Fluffy cards — the Batch 8 system + the zip's secondary-page cards --- */
.cl-card,
.ws-card,
.nov-card,
.band-card,
.tier-card,
.mc-card,
.season-card {
  border-radius: var(--feel-r);
  box-shadow: var(--feel-shadow);
  transition: transform 0.24s var(--feel-ease), box-shadow 0.24s var(--feel-ease);
  will-change: transform;
}

/* .cl-card already has border:0 in Batch 8; .ws-card grid cards keep their border, softened */
.ws-card {
  border: 1px solid rgba(20, 37, 28, 0.06);
  background: var(--pm-white);
  overflow: hidden;
}

@media (hover: hover) {
  .cl-card:hover,
  .ws-card:hover,
  .nov-card:hover,
  .band-card:hover,
  .tier-card:hover,
  .mc-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--feel-shadow-lift);
  }
}

.cl-card:active,
.ws-card:active,
.nov-card:active,
.band-card:active {
  transform: scale(0.985);
}

/* Art sits inside the bigger radius (Batch 8 selectors, re-stated at >= specificity) */
.cl-card .ws-card-art,
.ws-card .ws-card-art {
  padding: 10px 10px 0;
  background: transparent;
}

.cl-card .ws-card-art img,
.cl-card .ws-card-art img.card-cover,
.ws-card .ws-card-img {
  border-radius: calc(var(--feel-r) - 8px);
}

.cl-card .ws-card-body,
.ws-card .ws-card-body {
  padding: 14px 16px 16px;
  gap: 8px;
}

.cl-card .ws-card-foot,
.ws-card .ws-card-foot {
  padding: 10px 16px 16px;
  border-top: 1px solid rgba(20, 37, 28, 0.05);
}

/* 4. Big round grade tiles (live: .grade-tile on /grades/, .pm-tile on home) */
.grade-tile,
.pm-tile {
  border-radius: var(--feel-r-lg);
  box-shadow: var(--feel-shadow);
  touch-action: manipulation;
  transition: transform 0.22s var(--feel-ease), box-shadow 0.22s var(--feel-ease), background-color 0.18s ease, border-color 0.18s ease;
}

.grade-tile {
  min-height: 82px;
  padding: 18px 16px;
  border: 1.5px solid rgba(18, 104, 58, 0.12);
  font-weight: 700;
}

@media (hover: hover) {
  .grade-tile:hover,
  .pm-tile:hover {
    transform: translateY(-3px);
    background: var(--pm-green-tint, #E3EDE8);
    border-color: var(--pm-green);
    box-shadow: var(--feel-shadow-lift);
  }
}

.grade-tile:active,
.pm-tile:active {
  transform: scale(0.96);
}

@media (max-width: 680px) {
  .grade-tile {
    min-height: 76px;
    padding: 16px 12px;
    border-radius: 24px;
  }
}

/* 5. Chunky pill buttons — card button, site buttons, buy buttons -------- */
.cl-btn {
  min-height: 40px;
  padding: 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  touch-action: manipulation;
  transition: transform 0.18s var(--feel-ease), box-shadow 0.18s var(--feel-ease), filter 0.18s ease;
}

.pm-btn,
.btn,
.add-cart-btn {
  min-height: 50px;
  padding: 0 24px;
  border-radius: var(--pm-pill);
  font-weight: 700;
  letter-spacing: -0.01em;
  touch-action: manipulation;
  box-shadow: 0 2px 8px rgba(20, 37, 28, 0.08);
  transition: transform 0.18s var(--feel-ease), box-shadow 0.18s var(--feel-ease), filter 0.18s ease;
}

.pm-btn--big {
  min-height: 56px;
  padding: 0 28px;
  font-size: 17px;
}

@media (hover: hover) {
  .pm-btn:hover,
  .btn:hover,
  .add-cart-btn:hover,
  .cl-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(20, 37, 28, 0.14);
  }
}

.pm-btn:active,
.btn:active,
.add-cart-btn:active,
.cl-btn:active {
  transform: scale(0.97);
}

/* Shelf header + "see more" pill (live: .pm-shelf-head, .shelf-more) ------ */
.pm-shelf-head {
  margin-bottom: 14px;
  align-items: baseline;
}

.shelf-more {
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 16px;
  border-radius: var(--pm-pill);
  background: var(--pm-green-tint, #E3EDE8);
  color: var(--pm-green-deep, #0E3621);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}

/* Respect accessibility motion preferences -------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .cl-card, .ws-card, .nov-card, .band-card, .tier-card, .mc-card,
  .grade-tile, .pm-tile, .pm-btn, .btn, .add-cart-btn, .cl-btn {
    transition: none;
  }
}

/* 6. Crisp cover cards — Derrick 2026-12-01: "no jagged edge, no little
   white pieces" under December ELA ---------------------------------------
   Cause (reproduced on the live homepage at 390px): Batch 8's .has-inside
   cards squeeze the cover to max-width:64% and float the white first-page
   preview beside it (position:absolute, top:17%, height:72%, rotate(4deg)).
   At phone width the tilted white page pokes above the cover line and reads
   as jagged white pieces along the card's top/right edge.
   Fix: on cover cards the peek page is removed and the cover fills the art
   box edge-to-edge inside the round radius. Product pages keep previews. */
.cl-card .ws-card-art.has-inside,
.ws-card .ws-card-art.has-inside {
  justify-content: center;
  padding: 10px 10px 0;
  padding-left: 10px;
}

.cl-card .ws-card-art.has-inside > img.cl-inside,
.ws-card .ws-card-art.has-inside > img.cl-inside {
  display: none;
}

.cl-card .ws-card-art.has-inside > img.card-cover,
.cl-card .ws-card-art.has-inside > img.ws-card-img,
.ws-card .ws-card-art.has-inside > img.card-cover,
.ws-card .ws-card-art.has-inside > img.ws-card-img {
  max-width: 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: calc(var(--feel-r) - 8px);
}
