/* ==========================================================================
   THE CHA — prototype v1 stylesheet
   Depends on ../../../design/tokens.css (linked first in every page).
   Shapes follow design-system.md §3.4: the 60px pill is the signature, cards
   take --r-lg, media frames --r-xl, inputs --r-md.
   ========================================================================== */

:root {
  /* The ground the current section sits on — set it on any tinted section. */
  --ground: var(--surface);
}

/* ---- 1. BASE ----------------------------------------------------------- */

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  /* §11.6: body's background does not reach the overscroll area. */
  background: var(--surface);
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: var(--t-body);
  line-height: var(--lh-normal);
  -webkit-font-smoothing: antialiased;
  overflow-x: clip;
}

a { color: inherit; text-decoration: none; }
img, video { display: block; max-width: 100%; }
input, button, select, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--cha-ink);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}
.on-dark :focus-visible, .on-media :focus-visible { outline-color: var(--cha-white); }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}
.skip-link:focus, .skip-link:focus-visible {
  position: fixed; top: 1rem; left: 1rem; z-index: 200;
  width: auto; height: auto; margin: 0;
  padding: var(--s-3) var(--s-5);
  overflow: visible; clip-path: none;
  background: var(--cha-ink); color: var(--cha-white);
  font-size: var(--t-small);
}

/* ---- 2. LAYOUT & TYPE -------------------------------------------------- */

.wrap { max-width: var(--container); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: var(--section-y); }
/* An in-page link (#how-it-works on the product page, /#system) lands below
   the fixed header and announcement bar, not under them. */
section[id] { scroll-margin-top: calc(var(--header-h, 64px) + var(--announce-h)); }
.section--tight { padding-block: var(--section-y-tight); }

.ground-cream  { background: var(--surface-tinted); --ground: var(--surface-tinted); }
.ground-sunken { background: var(--surface-sunken); --ground: var(--surface-sunken); }
.ground-ink {
  background: var(--surface-inverse); color: var(--text-inverse);
  --ground: var(--surface-inverse);
}
/* A section's native colour scheme (its "Colour scheme" setting; schemes are in
   Theme settings › Colors, printed as .color-scheme-N by theme-css-var). After
   the ground rules, so the scheme's own colours win; the ground class it also
   carries keeps that ground's tuned eyebrows and leads (playbook §8.8). */
.scheme {
  --ground: rgba(var(--color-background));
  --text: rgba(var(--color-text));
  --text-secondary: rgba(var(--color-light-text));
  background: rgba(var(--color-background));
  color: rgba(var(--color-text));
}

/* Every text is in the site face, DM Sans: the client asked for the labels
   above titles to match the rest of the site (thecha-v2 review #1), and on
   review every other DM Mono use (nav, announcement, switch, notes, prices,
   cart) went the same way. DM Mono is no longer loaded. Smaller tracking than
   the old mono labels — DM Sans capitals need less air. */
.eyebrow {
  font-family: var(--font-sans);
  font-size: .72rem;
  font-weight: var(--weight-medium);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin: 0 0 var(--s-4);
}
.ground-cream .eyebrow, .ground-sunken .eyebrow { color: var(--text-secondary); }
.ground-ink .eyebrow, .on-media .eyebrow { color: rgba(253, 252, 248, .68); }

h1, h2, h3, h4 { margin: 0; font-weight: var(--weight-regular); }
.h1      { font-size: calc(var(--t-h1) * var(--hs, 1)); font-weight: var(--weight-light); line-height: var(--lh-tight); letter-spacing: var(--track-tight); }
.h2      { font-size: calc(var(--t-h2) * var(--hs, 1)); line-height: var(--lh-snug); letter-spacing: var(--track-tight); }
.h2--light { font-weight: var(--weight-light); }
.h3      { font-size: calc(var(--t-h3) * var(--hs, 1)); line-height: var(--lh-snug); }
/* A section's "Heading size" setting (23 Oct call: sizes changed without
   custom CSS). --hs scales its h1–h3; h4 and body text keep their size. */
.hsize-s  { --hs: .8; }
.hsize-l  { --hs: 1.15; }
.hsize-xl { --hs: 1.3; }
.h4      { font-size: var(--t-h4); line-height: var(--lh-snug); }
.display { font-size: var(--t-display); font-weight: var(--weight-light); line-height: var(--lh-tight); letter-spacing: var(--track-display); }

.lead { font-size: var(--t-lead); line-height: var(--lh-normal); color: var(--text-secondary); margin: 0; }
.on-media .lead, .ground-ink .lead { color: rgba(253, 252, 248, .82); }
.body { font-size: var(--t-body); line-height: var(--lh-loose); color: var(--text-secondary); margin: 0; max-width: var(--container-text); }
.mono { font-family: var(--font-sans); font-size: var(--t-small); }
.micro { font-family: var(--font-sans); font-size: var(--t-micro); color: var(--text-secondary); margin: 0; }
.measure { max-width: 46ch; }
.note-open { font-family: var(--font-sans); font-size: var(--t-micro); color: var(--cha-terra); margin: 0; }

/* ---- 3. WORDMARK ------------------------------------------------------- *
 * The real logo face. 'Lady Ice - Small Caps' ships on the live site as an
 * inline @font-face with a base64 TrueType payload — not a Google Fonts
 * request, which is why design-system.md §3.1 recorded it as never loaded.
 * The binary is extracted verbatim from assets/raw/home.html, so this is the
 * merchant's actual wordmark, not a rebuild.
 * ONE component, one place to change: CHA.wordmark() in ../js/site.js.     */

/* @font-face for 'Lady Ice' lives in components/site-assets.html — a relative
   url() in a static .css cannot resolve on the platform CDN (playbook §10.3). */

.wordmark {
  display: inline-flex;
  /* Matches .logo / .hero-logo / .f-logo on the live site verbatim. */
  font-family: var(--font-wordmark);
  font-variant: small-caps;
  font-weight: var(--weight-regular);
  letter-spacing: .1em;
  line-height: 1;
  white-space: nowrap;
}
.wordmark i { font-style: normal; transition: color var(--d-slow) var(--ease); }
.wordmark .wm-c { color: var(--cha-olive); }
.wordmark .wm-h { color: var(--cha-steel); }
.wordmark .wm-a { color: var(--cha-terra); }
/* 13 Nov: Theme settings › Logo › Black (the default) sets the whole word in
   the text black. Declared before the media/ink rule so that still wins. */
.wordmark.wordmark--mono i { color: var(--cha-ink); }
/* Over media and on ink the tri-colour drops below AA, so it goes solid. */
.on-media .wordmark i, .ground-ink .wordmark i { color: var(--cha-white); }

/* Lady Ice is heavily condensed, so the live site's 1.7rem nav / 2rem footer
   read smaller than their numbers suggest. Sized up to hold the same
   presence in the bar. */
.wordmark--sm { font-size: 2.1rem; }
.wordmark--md { font-size: 2.6rem; }
.wordmark--display {
  font-size: var(--t-display);
  letter-spacing: .08em;
  line-height: .9;
}

/* ---- 5. BUTTONS & PILLS ------------------------------------------------ *
 * The pill (--r-pill, 60px) is the signature shape on the live site and the
 * most recognisable non-colour element the brand owns. design-system.md §5.1. */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 48px;
  padding: .85rem 1.8rem;
  border-radius: var(--r-pill);
  background: var(--cha-ink);
  color: var(--text-inverse);
  font-size: var(--t-small);
  font-weight: var(--weight-medium);
  letter-spacing: var(--track-wide);
  text-align: center;
  cursor: pointer;
  transition: background var(--d-fast) var(--ease), transform var(--d-base) var(--ease),
              color var(--d-fast) var(--ease), border-color var(--d-fast) var(--ease);
}
.btn:hover { transform: translateY(-1px); background: #262626; color: var(--text-inverse); }
.btn:active { transform: translateY(0) scale(.98); transition-duration: var(--d-instant); }

.btn--soft {
  background: transparent;
  border: 1px solid var(--border-strong);
  color: var(--text);
}
.btn--soft:hover { background: rgba(56, 56, 56, .05); color: var(--text); }

/* 6 Nov: ink text directly. Inside a .scheme on the Ink ground, --text is the
   scheme's white, which left "Subscribe" white on white in the footer. */
.btn--light { background: var(--cha-white); color: var(--cha-ink); }
.btn--light:hover { background: #FFFFFF; color: var(--cha-ink); }

.btn--media {
  background: rgba(253, 252, 248, .16);
  border: 1px solid var(--border-inverse);
  color: var(--cha-white);
  -webkit-backdrop-filter: blur(12px);
          backdrop-filter: blur(12px);
}
.btn--media:hover { background: rgba(253, 252, 248, .3); color: var(--cha-white); }

.btn--block { display: flex; width: 100%; }

.btn[aria-disabled="true"], .btn:disabled {
  background: rgba(56, 56, 56, .25);
  border-color: transparent;
  pointer-events: none;
  color: var(--cha-white);
}

/* Small pill — nav links, shop filters, formula chips. */
.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  min-height: 40px;
  padding: .5rem 1.1rem;
  border-radius: var(--r-pill);
  border: 1px solid transparent;
  background: transparent;
  font-family: var(--font-sans);
  font-size: var(--t-micro);
  letter-spacing: .01em;
  white-space: nowrap;
  cursor: pointer;
  color: var(--text-secondary);
  transition: background var(--d-fast) var(--ease), color var(--d-fast) var(--ease),
              border-color var(--d-fast) var(--ease);
}
.pill:hover { background: rgba(56, 56, 56, .06); color: var(--text); }
.pill[aria-checked="true"], .pill.is-active, .pill[aria-current="page"] {
  background: var(--cha-ink);
  border-color: var(--cha-ink);
  color: var(--text-inverse);
}
.filterbar .pill, .opts .pill { border-color: var(--border-strong); }
.filterbar .pill[aria-checked="true"], .opts .pill[aria-checked="true"] { border-color: var(--cha-ink); }
.on-media .pill { color: rgba(253, 252, 248, .84); }
.on-media .pill:hover { background: rgba(253, 252, 248, .16); color: var(--cha-white); }
.on-media .pill[aria-current="page"] { background: rgba(253, 252, 248, .24); border-color: transparent; color: var(--cha-white); }

/* Larger choice control — pack, plan, delivery options. */
.choice {
  display: block;
  width: 100%;
  text-align: left;
  min-height: 56px;
  padding: .8rem 1.2rem;
  border-radius: var(--r-lg);
  border: 1px solid var(--border-strong);
  background: transparent;
  cursor: pointer;
  color: var(--text);
  transition: background var(--d-fast) var(--ease), border-color var(--d-fast) var(--ease);
}
.choice:hover { background: rgba(56, 56, 56, .04); }
.choice[aria-checked="true"] { border-color: var(--cha-ink); background: var(--surface-tinted); }
.choice[aria-checked="true"] .choice__name { font-weight: var(--weight-medium); }
.choice__name { display: block; font-size: .95rem; }
.choice__note { display: block; font-family: var(--font-sans); font-size: var(--t-micro); color: var(--text-secondary); margin-top: .15rem; }
.choice__tick {
  display: inline-block; width: 9px; height: 9px; border-radius: var(--r-full);
  margin-right: .55rem; vertical-align: baseline;
}

.field {
  position: relative;
  display: block;
  flex: 1 1 220px;
  min-width: 0;
  border-radius: var(--r-md);
  border: 1px solid var(--border-strong);
  background: transparent;
  transition: border-color var(--d-fast) var(--ease);
}
.field:focus-within { border-color: var(--cha-ink); }
.field input {
  width: 100%;
  min-height: 50px;
  padding: .8rem 1.1rem;
  background: transparent;
  border: 0;
  font-size: .95rem;
}
.field input::placeholder { color: var(--text-tertiary); }
.newsletter .field { border-radius: var(--r-pill); }
.newsletter .field input { padding-inline: 1.4rem; }
.ground-ink .field { border-color: rgba(253, 252, 248, .3); }
.ground-ink .field:focus-within { border-color: var(--cha-white); }
.ground-ink .field input::placeholder { color: rgba(253, 252, 248, .5); }

.qty {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--border-strong);
  border-radius: var(--r-pill);
}
.qty button { width: 44px; height: 44px; font-size: 1.05rem; color: var(--text); }
.qty output { min-width: 3ch; text-align: center; font-family: var(--font-sans); font-size: .9rem; }

/* ---- 7. HEADER --------------------------------------------------------- */

/* The promotion bar (sections/promo-bar) is fixed above this; --announce-h is
   its height, 0 when it does not show. */
.site-top { position: fixed; inset: var(--announce-h) 0 auto 0; z-index: var(--z-header); }
.site-header {
  transition: background var(--d-slow) var(--ease), color var(--d-slow) var(--ease),
              border-color var(--d-slow) var(--ease);
  background: rgba(253, 252, 248, .94);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header.on-media { background: transparent; color: var(--cha-white); border-bottom-color: transparent; }

.site-header nav {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-5);
}
.nav-links { display: flex; align-items: center; gap: .25rem; }
.nav-actions { display: flex; align-items: center; gap: .5rem; }

.cart-btn { position: relative; }
.cart-btn .cart-count { font-variant-numeric: tabular-nums; }

/* The menu in capitals (Leo, 2026-10-08): the bar's links, Cart, and the
   mobile drawer. A touch smaller with open tracking, so the bar still fits. */
.nav-links .pill, .cart-btn { text-transform: uppercase; letter-spacing: .08em; font-size: .76rem; }
.nav-drawer nav a:not(.drawer-mail) { text-transform: uppercase; letter-spacing: .02em; }

.nav-toggle {
  width: 44px; height: 44px;
  display: none;
  flex-direction: column; align-items: center; justify-content: center; gap: 6px;
}
.nav-toggle span {
  display: block; width: 20px; height: 1.5px; background: currentColor;
  transition: transform var(--d-base) var(--ease);
}
.nav-toggle[aria-expanded="true"] span:first-child { transform: translateY(3.75px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:last-child { transform: translateY(-3.75px) rotate(-45deg); }

.nav-drawer {
  position: fixed; inset: 0; z-index: -1;
  background: var(--surface);
  overflow-y: auto;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity var(--d-slow) var(--ease), transform var(--d-slow) var(--ease), visibility var(--d-slow);
}
.nav-drawer[data-open="true"] { opacity: 1; visibility: visible; transform: none; }
.nav-drawer nav {
  display: flex; flex-direction: column; gap: var(--s-5);
  padding: calc(var(--header-h) + var(--announce-h) + var(--s-7)) var(--gutter) var(--s-7);
}
.nav-drawer a { font-size: var(--t-h3); line-height: var(--lh-snug); }
.nav-drawer .drawer-contact { margin-top: var(--s-5); }
.nav-drawer .drawer-mail { font-family: var(--font-sans); font-size: var(--t-small); color: var(--text-secondary); margin-top: var(--s-2); }

@media (max-width: 1080px) {
  .nav-links { display: none; }
  .nav-toggle { display: flex; }
  .nav-cta { display: none; }
}

/* Every page reserves the header's height; hero pages pull back under it. */
.page { padding-top: calc(var(--header-h) + var(--announce-h)); }
.page--hero { padding-top: 0; }

/* ---- 8. CART DRAWER ---------------------------------------------------- */

.cart-scrim {
  position: fixed; inset: 0; z-index: var(--z-drawer);
  background: var(--scrim-full);
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity var(--d-slow) var(--ease), visibility var(--d-slow);
}
.cart-panel {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: calc(var(--z-drawer) + 5);
  width: min(430px, 100vw);
  display: flex; flex-direction: column;
  background: var(--surface);
  box-shadow: var(--shadow-lg);
  transform: translateX(100%);
  visibility: hidden;
  transition: transform var(--d-slow) var(--ease), visibility var(--d-slow);
}
[data-cart-open="true"] .cart-scrim { opacity: 1; visibility: visible; pointer-events: auto; }
[data-cart-open="true"] .cart-panel { transform: none; visibility: visible; }

.cart-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--s-5) var(--s-5);
  border-bottom: 1px solid var(--border);
}
.cart-head p { margin: 0; font-family: var(--font-sans); font-size: var(--t-micro); letter-spacing: .14em; text-transform: uppercase; }
.cart-close { width: 44px; height: 44px; font-size: 1.2rem; }
.cart-body { flex: 1; overflow-y: auto; padding: var(--s-5); }
.cart-foot { border-top: 1px solid var(--border); padding: var(--s-5); background: var(--surface-tinted); --ground: var(--surface-tinted); }

.cart-line { display: grid; grid-template-columns: 72px 1fr; gap: var(--s-4); padding: var(--s-4) 0; border-bottom: 1px solid var(--border); }
.cart-line__shot { width: 72px; height: 90px; border-radius: var(--r-md); background-size: cover; background-position: center; }
.cart-line__top { display: flex; justify-content: space-between; gap: var(--s-3); align-items: baseline; }
.cart-line__top p { margin: 0; font-size: .98rem; }
.cart-line__plan { margin: .25rem 0 .6rem; font-family: var(--font-sans); font-size: var(--t-micro); color: var(--text-tertiary); }
.cart-line__ctl { display: flex; align-items: center; gap: var(--s-3); }
.cart-line__ctl .qty button { width: 36px; height: 36px; }
.link-quiet { font-family: var(--font-sans); font-size: var(--t-micro); color: var(--text-tertiary); padding: .5rem 0; }
.link-quiet:hover { color: var(--cha-terra); }

.cart-empty { padding: var(--s-8) 0; text-align: center; }

.cart-sum { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: var(--s-4); }
.cart-sum span:first-child { font-family: var(--font-sans); font-size: var(--t-micro); letter-spacing: .14em; text-transform: uppercase; color: var(--text-secondary); }
.cart-sum span:last-child { font-family: var(--font-sans); font-size: 1.05rem; }

/* ---- 8.1 FREE-SHIPPING METER ------------------------------------------ */

.shipbar {
  height: 3px;
  border-radius: var(--r-pill);
  background: rgba(56, 56, 56, .12);
  overflow: hidden;
  margin-bottom: .6rem;
}
.shipbar__fill {
  height: 100%;
  width: 0;
  border-radius: var(--r-pill);
  background: var(--trail);
  transition: width var(--d-slow) var(--ease), background var(--d-slow) var(--ease);
}
.shipbar-note { margin: 0 0 var(--s-4); font-family: var(--font-sans); font-size: var(--t-micro); color: var(--text-secondary); }
.shipbar-note b { font-weight: var(--weight-medium); color: var(--cha-olive); }

/* ---- 9. REVEAL --------------------------------------------------------- */

[data-reveal] { opacity: 1; }
.js [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity var(--d-reveal) var(--ease-out), transform var(--d-reveal) var(--ease-out);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---- 10. MEDIA --------------------------------------------------------- */

.frame {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  background: var(--surface-media);
}
.frame > img, .frame > video { width: 100%; height: 100%; object-fit: cover; }
.frame--16x9 { aspect-ratio: 16 / 9; }
.frame--1x1  { aspect-ratio: 1 / 1; }
.frame--4x3  { aspect-ratio: 4 / 3; }
.frame--4x5  { aspect-ratio: 4 / 5; }
.frame--9x16 { aspect-ratio: 9 / 16; max-width: 360px; margin-inline: auto; }

.bleed {
  position: relative;
  overflow: hidden;
  background: var(--surface-media);
  display: flex;
  align-items: flex-end;
}
.bleed > img, .bleed > video {
  position: absolute; inset: 0;
  width: 100%; height: 100%; object-fit: cover;
  z-index: var(--z-media);
}
.bleed__scrim { position: absolute; inset: 0; background: var(--scrim-bottom); z-index: var(--z-overlay); }
.bleed__body {
  position: relative; z-index: var(--z-content);
  width: 100%; max-width: var(--container);
  margin-inline: auto;
  padding: 0 var(--gutter) clamp(2.5rem, 6vh, 4.5rem);
}
.bleed--hero { height: 100svh; min-height: 560px; }
.bleed--tall { height: clamp(520px, 82svh, 900px); }
.bleed--band { height: clamp(360px, 70svh, 720px); }

.video-toggle {
  width: 40px; height: 40px; border-radius: var(--r-full);
  border: 1px solid var(--border-inverse);
  background: rgba(56, 56, 56, .4);
  color: var(--cha-white);
  font-size: .7rem;
  display: inline-flex; align-items: center; justify-content: center;
}

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: clamp(2rem, 5vw, 5rem);
  align-items: center;
}
.split--start { align-items: start; }
.split__media-last { order: 2; }
@media (max-width: 700px) { .split__media-last { order: 0; } }

/* ---- 11. THE CHA SYSTEM ------------------------------------------------ */

.system { position: relative; }
.system__rail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(.5rem, 2vw, 2rem);
  align-items: end;
  touch-action: pan-y;
}
.system__cell {
  display: block;
  min-height: 44px;
  text-align: left;
  width: 100%;
  color: inherit;
  text-decoration: none;
  opacity: .55;
  transform: scale(.92);
  transition: opacity var(--d-slower) var(--ease), transform var(--d-slower) var(--ease);
}
.system__cell.is-active { opacity: 1; transform: scale(1) translateY(-12px); }
.system__cell:focus-visible { outline: 2px solid var(--accent); outline-offset: 6px; border-radius: var(--r-xl); }

/* The flip card (thecha-v2 #12): the front is the shot, the back the product's
   description. Hover and focus turn it over; on touch the script adds
   .is-flipped on the first tap. */
.system__card {
  position: relative;
  display: block;
  aspect-ratio: 4 / 5;
  perspective: 1400px;
}
.system__face {
  position: absolute; inset: 0;
  border-radius: var(--r-xl);
  overflow: hidden;
  -webkit-backface-visibility: hidden;
          backface-visibility: hidden;
  transition: transform .6s var(--ease);
}
.system__shot {
  display: flex;
  align-items: flex-end;
  background-color: var(--accent);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
.system__shot--contain {
  background-color: color-mix(in srgb, var(--accent) 22%, var(--surface));
  background-size: contain;
  background-origin: content-box;
  padding: 8%;
}
.system__shot span {
  font-family: var(--font-sans); font-size: var(--t-label);
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--cha-white); padding: var(--s-4);
}
.system__back {
  display: flex; flex-direction: column; justify-content: space-between; gap: var(--s-4);
  padding: clamp(1.1rem, 2.2vw, 2rem);
  background: color-mix(in srgb, var(--accent) 16%, var(--surface));
  border: 2px solid var(--accent);
  color: var(--text);
  transform: rotateY(180deg);
}
.system__back-name {
  font-family: var(--font-sans); font-size: .72rem; font-weight: var(--weight-medium);
  letter-spacing: .14em; text-transform: uppercase; color: var(--text-secondary);
}
.system__desc { font-size: clamp(1rem, 1.25vw, 1.2rem); line-height: 1.45; }
.system__more { font-weight: var(--weight-medium); text-decoration: underline; text-underline-offset: 3px; }
@media (hover: hover) {
  .system__cell:hover .system__shot { transform: rotateY(-180deg); }
  .system__cell:hover .system__back { transform: rotateY(0deg); }
}
.system__cell:focus-visible .system__shot,
.system__cell.is-flipped .system__shot { transform: rotateY(-180deg); }
.system__cell:focus-visible .system__back,
.system__cell.is-flipped .system__back { transform: rotateY(0deg); }

.system__rule { display: block; height: 2px; background: var(--accent); margin: var(--s-4) 0 var(--s-3); }
.system__cell h3 { font-size: var(--t-h4); }
@media (max-width: 700px) {
  .system__desc { font-size: .88rem; }
  .system__back { padding: .85rem; gap: .5rem; }
}
.system__cell p { margin: .35rem 0 0; font-family: var(--font-sans); font-size: var(--t-micro); color: var(--text-secondary); }

.system__readout {
  margin-top: clamp(1.5rem, 4vh, 3rem);
  display: flex; align-items: center; gap: var(--s-4); justify-content: center;
}
.system__readout i { display: block; width: 56px; height: 2px; background: var(--accent); transition: background var(--d-slower) var(--ease); }
.system__readout p { margin: 0; font-family: var(--font-sans); font-size: var(--t-micro); letter-spacing: .1em; text-transform: uppercase; color: var(--text-secondary); }

/* ---- 12. CARDS & GRIDS ------------------------------------------------- */

.grid-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: clamp(1rem, 2.5vw, 2rem); }
/* Fixed three-up for the range: applicators on row one, refills on row two
   (review #1, #6). A modifier, not a change to .grid-cards, so related-products
   keeps its auto-fill. The teaser tile becomes a full-width banner row. */
.grid-cards--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-cards--3 > .card--ghost { grid-column: 1 / -1; min-height: 0; flex-direction: row; align-items: center; gap: var(--s-6); }
@media (max-width: 900px) { .grid-cards--3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* Phones stay two-up, 2×2 rather than one long column (23 Oct call): the
   card text steps down and name and price stack so they fit the half width. */
@media (max-width: 520px) {
  .grid-cards--3 { gap: .75rem; }
  .grid-cards--3 > .card--ghost { flex-direction: column; align-items: flex-start; }
  .grid-cards--3 .card__body { padding: .8rem .8rem 1rem; }
  .grid-cards--3 .card__top { flex-direction: column; gap: .15rem; }
  .grid-cards--3 .card__top p { font-size: .95rem; }
  .grid-cards--3 .card__meta { font-size: .72rem; }
  .grid-cards--3 .card__shot span { padding: .6rem; font-size: .6rem; }
}
.grid-3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: var(--s-6); }

.card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform var(--d-base) var(--ease), box-shadow var(--d-base) var(--ease);
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.card__rule { height: 2px; background: var(--accent); }
.card__shot { aspect-ratio: 1 / 1; display: flex; align-items: flex-end; background-color: var(--accent); background-size: cover; background-position: center; }
.card__shot span { font-family: var(--font-sans); font-size: var(--t-label); letter-spacing: .14em; text-transform: uppercase; color: var(--cha-white); padding: var(--s-4); }
.card__body { padding: 1.15rem 1.15rem 1.4rem; }
.card__top { display: flex; justify-content: space-between; gap: var(--s-4); align-items: baseline; }
.card__top p { margin: 0; font-size: 1.05rem; }
.card__price { font-family: var(--font-sans); font-size: .85rem; }
.card__meta { margin: .4rem 0 0; font-family: var(--font-sans); font-size: var(--t-micro); color: var(--text-tertiary); }

.card--ghost {
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-lg);
  padding: 1.15rem;
  display: flex; flex-direction: column; justify-content: space-between;
  min-height: 240px;
}

.step p.step__n { font-family: var(--font-sans); font-size: var(--t-small); color: var(--text-tertiary); margin: var(--s-5) 0 .4rem; }
.step h3 { margin-bottom: .6rem; }

.rows { border-top: 1px solid var(--border-strong); }
.rows__row { display: flex; justify-content: space-between; gap: var(--s-6); padding: .9rem 0; border-bottom: 1px solid var(--border); }
.rows__row dt, .rows__k { font-family: var(--font-sans); font-size: var(--t-micro); letter-spacing: .08em; text-transform: uppercase; color: var(--text-tertiary); margin: 0; }
.rows__row dd, .rows__v { margin: 0; font-size: .9rem; text-align: right; }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.fact { border-top: 1px solid var(--border-strong); padding: var(--s-5) var(--s-5) var(--s-5) 0; }
.fact:not(:first-child) { padding-left: var(--s-5); }
.fact__src { margin: 0 0 .6rem; font-family: var(--font-sans); font-size: var(--t-micro); color: var(--text-tertiary); }
.fact__t { margin: 0 0 .6rem; font-size: 1rem; font-weight: var(--weight-medium); }
.fact__b { margin: 0; font-size: var(--t-small); line-height: var(--lh-loose); color: var(--text-secondary); }
@media (max-width: 640px) { .fact, .fact:not(:first-child) { padding-inline: 0; } }

/* ---- 13. COMPARE TABLE ------------------------------------------------- */

.compare { overflow-x: auto; }
.compare__inner { min-width: 640px; }
.compare__row { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: var(--s-4); padding: var(--s-4) 0; border-bottom: 1px solid var(--border); align-items: baseline; }
.compare__row--head { padding: 0 0 .9rem; border-bottom: 1px solid var(--border-strong); }
.compare__row--head span { font-family: var(--font-sans); font-size: var(--t-micro); letter-spacing: .1em; text-transform: uppercase; color: var(--text-tertiary); }
.compare__row--head .is-cha { color: var(--text); }
.compare__row span { font-size: .95rem; }
.compare__k { color: var(--text-secondary); }
.compare__cha { color: var(--text); }
.compare__other { color: var(--text-tertiary); }

/* ---- 14. PRODUCT PAGE -------------------------------------------------- */

.pdp { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: clamp(2rem, 4vw, 4rem); align-items: start; }
.pdp__gallery { display: flex; flex-direction: column; gap: var(--s-4); position: sticky; top: calc(var(--header-h) + 56px); }
.pdp__hero { aspect-ratio: 4 / 5; border-radius: var(--r-xl); overflow: hidden; display: flex; align-items: flex-end; background-color: var(--accent); background-size: cover; background-position: center; }
.pdp__hero span { font-family: var(--font-sans); font-size: var(--t-small); letter-spacing: .14em; text-transform: uppercase; color: var(--cha-white); padding: var(--s-5); }
.pdp__thumbs { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s-3); }
.pdp__thumbs button {
  aspect-ratio: 1 / 1; border-radius: var(--r-lg); overflow: hidden;
  background-size: cover; background-position: center; background-color: var(--accent);
  box-shadow: inset 0 0 0 1px var(--border-strong);
  transition: box-shadow var(--d-fast) var(--ease);
}
.pdp__thumbs button[aria-current="true"] { box-shadow: inset 0 0 0 2px var(--cha-ink); }
@media (max-width: 700px) { .pdp__gallery { position: static; } }

.pdp__accent { height: 2px; width: 56px; margin-bottom: var(--s-5); background: var(--accent); transition: background var(--d-slower) var(--ease); }
.pdp__price { margin: 0 0 var(--s-6); font-family: var(--font-sans); font-size: 1.1rem; }
.opts { display: flex; gap: .6rem; flex-wrap: wrap; margin-bottom: var(--s-6); }
.opts--stack { flex-direction: column; }
/* 16 Nov: mix-and-match refill dropdowns on the product page (product-detail). */
.refills { border: 0; margin: 0 0 var(--s-5); padding: 0; min-width: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .6rem; }
.refills__legend { grid-column: 1 / -1; padding: 0; margin-bottom: .75rem; }
.refills__slot { display: flex; flex-direction: column; gap: .35rem; min-width: 0; }
.refills__label { font-family: var(--font-sans); font-size: var(--t-small); color: var(--text-secondary); }
.refills__select {
  width: 100%; min-height: 44px; padding: .55rem 2rem .55rem .8rem;
  font: inherit; font-family: var(--font-sans); font-size: .95rem; color: var(--text);
  background: transparent url("data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%2712%27 height=%278%27%3E%3Cpath d=%27M1 1l5 5 5-5%27 fill=%27none%27 stroke=%27%23383838%27 stroke-width=%271.5%27/%3E%3C/svg%3E") no-repeat right .8rem center;
  border: 1px solid var(--border-strong); border-radius: 999px; -webkit-appearance: none; appearance: none;
}
.refills__select:focus-visible { outline: 2px solid var(--cha-ink); outline-offset: 2px; }
.refills__select:invalid { color: var(--text-tertiary); }
.refills__note { grid-column: 1 / -1; margin: .25rem 0 0; }
@media (max-width: 480px) { .refills { grid-template-columns: minmax(0, 1fr); } }
.buybar { display: flex; gap: var(--s-3); align-items: center; flex-wrap: wrap; margin-bottom: var(--s-4); }
.buybar .btn { flex: 1 1 220px; }

.collapse { overflow: hidden; transition: max-height var(--d-slow) var(--ease), opacity var(--d-slow) var(--ease), margin var(--d-slow) var(--ease); }
.collapse[data-open="false"] { max-height: 0; opacity: 0; margin-bottom: 0; }
.collapse[data-open="true"] { max-height: 260px; opacity: 1; margin-bottom: var(--s-6); }

.faq__item { border-bottom: 1px solid var(--border); }
.faq__q { width: 100%; min-height: 48px; display: flex; justify-content: space-between; align-items: center; gap: var(--s-4); padding: var(--s-4) 0; text-align: left; font-size: 1rem; }
.faq__q span { font-family: var(--font-sans); color: var(--text-tertiary); }
.faq__a { overflow: hidden; max-height: 0; opacity: 0; transition: max-height var(--d-slow) var(--ease), opacity var(--d-slow) var(--ease); }
.faq__item[data-open="true"] .faq__a { max-height: 320px; opacity: 1; }
.faq__a p { margin: 0 0 1.1rem; font-size: .92rem; line-height: var(--lh-loose); color: var(--text-secondary); max-width: 56ch; }

.crumb { font-family: var(--font-sans); font-size: var(--t-micro); color: var(--text-tertiary); }
.crumb a:hover { color: var(--cha-terra); }

/* ---- 15. SHOP FILTER BAR ----------------------------------------------- */

.filterbar {
  position: sticky;
  top: calc(var(--header-h) + var(--announce-h));
  z-index: 20;
  background: rgba(253, 252, 248, .94);
  -webkit-backdrop-filter: blur(10px);
          backdrop-filter: blur(10px);
  border-block: 1px solid var(--border);
}
.filterbar__inner { max-width: var(--container); margin-inline: auto; padding: .75rem var(--gutter); display: flex; gap: .4rem; align-items: center; overflow-x: auto; }
.filterbar__count { margin-left: auto; font-family: var(--font-sans); font-size: var(--t-micro); color: var(--text-tertiary); white-space: nowrap; padding-left: var(--s-4); }

/* ---- 16. CHECKOUT ------------------------------------------------------ */

.checkout { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.checkout__summary { background: var(--surface-tinted); --ground: var(--surface-tinted); border-radius: var(--r-xl); padding: var(--s-5); position: sticky; top: calc(var(--header-h) + 56px); }
@media (max-width: 700px) { .checkout__summary { position: static; } }
.fieldgrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: .9rem; margin-bottom: var(--s-4); }
.sum-line { display: flex; justify-content: space-between; padding: .3rem 0; font-size: .9rem; color: var(--text-secondary); }
.sum-line span:last-child { font-family: var(--font-sans); }
.sum-total { display: flex; justify-content: space-between; align-items: baseline; padding-top: var(--s-4); border-top: 1px solid var(--border-strong); margin-top: var(--s-3); }
.sum-total span:first-child { font-family: var(--font-sans); font-size: var(--t-micro); letter-spacing: .14em; text-transform: uppercase; color: var(--text-secondary); }
.sum-total span:last-child { font-family: var(--font-sans); font-size: 1.1rem; }
.form-error { margin: .9rem 0 0; min-height: 1.2em; font-family: var(--font-sans); font-size: var(--t-micro); color: var(--cha-terra); }

/* ---- 17. NEWSLETTER & FOOTER ------------------------------------------- */

.newsletter { text-align: center; }
.newsletter__inner { max-width: 560px; margin-inline: auto; }
.newsletter form { display: flex; gap: var(--s-3); flex-wrap: wrap; justify-content: center; }
.newsletter .form-msg { margin: var(--s-4) 0 0; min-height: 1.2em; font-family: var(--font-sans); font-size: var(--t-micro); }
.newsletter .form-msg[data-ok="true"] { color: var(--positive); }
.newsletter .form-msg[data-ok="false"] { color: var(--cha-salmon); }

.site-footer { background: var(--surface-sunken); --ground: var(--surface-sunken); padding: clamp(3rem, 7vh, 5rem) var(--gutter) var(--s-6); }
.site-footer__grid { max-width: var(--container); margin-inline: auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 2.5rem; }
.site-footer h2 { font-family: var(--font-sans); font-size: var(--t-label); letter-spacing: .14em; text-transform: uppercase; color: var(--text-tertiary); margin: 0 0 .4rem; font-weight: var(--weight-regular); }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .6rem; font-size: var(--t-small); }
.site-footer a:hover { color: var(--cha-terra); }
.site-footer__legal {
  max-width: var(--container);
  margin: var(--s-7) auto 0;
  font-family: var(--font-sans);
  font-size: var(--t-micro);
  color: var(--text-tertiary);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s-3) var(--s-5);
  flex-wrap: wrap;
}
.site-footer__legal p { margin: 0; }
/* The one outbound link down here, so it gets an underline to read as one. */
.site-footer__credit a {
  color: var(--text-secondary);
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
}
.site-footer__credit a:hover { color: var(--cha-terra); }

/* ---- 18. MOTION SAFETY ------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .js [data-reveal] { opacity: 1; transform: none; }
  .system__cell, .system__cell.is-active { transform: none; }
  /* No turning: the back fades in over the front instead. */
  .system__face { transition: opacity var(--d-fast) var(--ease); }
  .system__shot, .system__cell:hover .system__shot, .system__cell.is-flipped .system__shot,
  .system__cell:focus-visible .system__shot { transform: none; }
  .system__back { transform: none; opacity: 0; }
  .system__cell:hover .system__back, .system__cell.is-flipped .system__back,
  .system__cell:focus-visible .system__back { transform: none; opacity: 1; }
}

/* hidden must win over any display we set */
[hidden] { display: none !important; }
