/*
  Web lane — page-specific demo styles.
  Loaded after /main_style.css and /portfolio/portfolio.css.

  Contains three self-contained demo surfaces:
    .dw-*    DEMO 01 — "NovaFit", a full marketing site inside a browser frame
    .uik-*   DEMO 02 — a design-system documentation page
    .shop-*  DEMO 03 — a storefront with quick-view, promo codes and checkout preview

  All "imagery" is drawn in the browser — CSS gradients and conic rings for the
  first two demos, inline SVG for the storefront's products. No external assets,
  no network requests. Each surface is its own container-query context, so the
  demos respond to the FRAME width, not the viewport — which is what makes the
  in-frame mobile menu behave like a real site.

  Spacing: each demo declares a small scale on its root (--dw-gut / --dw-sec,
  --shop-gut) and section padding is composed from it, so the vertical rhythm is
  one decision instead of thirty ad-hoc values.
*/

/* ============================================================================
   DEMO 1: NOVAFIT LANDING
   ========================================================================== */

.demo-web {
  --dwbg: #0b1020;
  --dwbg2: #0d1426;
  --dwtext: #eef1fb;
  --dwmuted: rgba(238, 241, 251, 0.66);
  --dwcard: rgba(255, 255, 255, 0.055);
  --dwcard2: rgba(255, 255, 255, 0.085);
  --dwline: rgba(238, 241, 251, 0.12);
  --dwaccent: #38b6ff;
  --dwaccent2: #7bdff2;
  --dwink: #04121f;
  --dwshadow: rgba(0, 0, 0, 0.45);

  /* spacing scale — one gutter, one section rhythm */
  --dw-gut: 1.5rem;
  --dw-sec: 2.6rem;

  container-type: inline-size;
  container-name: dw;
  position: relative;
  background:
    radial-gradient(120% 60% at 78% -8%, color-mix(in srgb, var(--dwaccent) 20%, transparent), transparent 62%),
    radial-gradient(90% 50% at 8% 4%, color-mix(in srgb, var(--dwaccent2) 12%, transparent), transparent 60%),
    linear-gradient(180deg, var(--dwbg2), var(--dwbg) 42%);
  color: var(--dwtext);
  padding: 0;
  transition: background 380ms ease, color 380ms ease;
  max-height: 520px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scroll-behavior: smooth;
  font-size: 15px;
}

.demo-web.light {
  --dwbg: #f4f6fc;
  --dwbg2: #ffffff;
  --dwtext: #101528;
  --dwmuted: rgba(16, 21, 40, 0.64);
  --dwcard: rgba(16, 21, 40, 0.045);
  --dwcard2: rgba(16, 21, 40, 0.075);
  --dwline: rgba(16, 21, 40, 0.12);
  --dwaccent: #0d7fd8;
  --dwaccent2: #38b6ff;
  --dwink: #ffffff;
  --dwshadow: rgba(20, 30, 60, 0.16);
}

.demo-web::-webkit-scrollbar { width: 9px; }
.demo-web::-webkit-scrollbar-track { background: transparent; }
.demo-web::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--dwtext) 20%, transparent);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.demo-web section,
.demo-web .dw-metrics { scroll-margin-top: 62px; }

/* ------------------------------- header ---------------------------------- */

.dw-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.95rem var(--dw-gut);
  border-bottom: 1px solid transparent;
  position: sticky;
  top: 0;
  background: color-mix(in srgb, var(--dwbg) 72%, transparent);
  backdrop-filter: blur(12px) saturate(140%);
  -webkit-backdrop-filter: blur(12px) saturate(140%);
  z-index: 6;
  transition: padding 240ms ease, background 240ms ease, border-color 240ms ease, box-shadow 240ms ease;
}
.dw-nav.is-condensed {
  padding: 0.5rem var(--dw-gut);
  background: color-mix(in srgb, var(--dwbg) 92%, transparent);
  border-bottom-color: var(--dwline);
  box-shadow: 0 10px 30px color-mix(in srgb, var(--dwshadow) 60%, transparent);
}

.dw-logo {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-weight: 900;
  letter-spacing: 0.01em;
  font-size: 1.02rem;
  white-space: nowrap;
}
.dw-logo.sm { font-size: 0.95rem; }
.dw-logo-accent { color: var(--dwaccent); }
.dw-logomark {
  width: 20px;
  height: 20px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--dwaccent), var(--dwaccent2));
  box-shadow: 0 4px 14px color-mix(in srgb, var(--dwaccent) 45%, transparent);
  position: relative;
  flex: none;
}
.dw-logomark::after {
  content: "";
  position: absolute;
  inset: 6px 5px;
  border-radius: 2px;
  background: color-mix(in srgb, var(--dwink) 85%, transparent);
  clip-path: polygon(0 40%, 34% 40%, 34% 0, 66% 0, 66% 40%, 100% 40%, 100% 60%, 66% 60%, 66% 100%, 34% 100%, 34% 60%, 0 60%);
}

.dw-links { display: flex; align-items: center; gap: 1.05rem; }

.dw-navlink {
  position: relative;
  background: none;
  border: 0;
  padding: 0.3rem 0;
  color: var(--dwmuted);
  font: inherit;
  font-size: 0.86rem;
  font-weight: 650;
  cursor: pointer;
  transition: color 180ms ease;
}
.dw-navlink::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -2px;
  height: 2px;
  border-radius: 2px;
  background: var(--dwaccent);
  transform: scaleX(0);
  transform-origin: 50% 50%;
  transition: transform 220ms cubic-bezier(.2,.9,.2,1);
}
.dw-navlink:hover { color: var(--dwtext); }
.dw-navlink:hover::after { transform: scaleX(0.65); }
.dw-navlink.is-active { color: var(--dwtext); }
.dw-navlink.is-active::after { transform: scaleX(1); }

.dw-nav-actions { display: flex; align-items: center; gap: 0.5rem; }

.dw-theme {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--dwline);
  background: var(--dwcard);
  color: var(--dwtext);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 0.85rem;
  flex: none;
  transition: transform 180ms ease, background 180ms ease;
}
.dw-theme:hover { transform: translateY(-1px) rotate(-12deg); background: var(--dwcard2); }

.dw-nav-cta {
  height: 34px;
  padding: 0 0.95rem;
  border-radius: 999px;
  border: 0;
  background: var(--dwaccent);
  color: var(--dwink);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: 0 8px 22px color-mix(in srgb, var(--dwaccent) 34%, transparent);
  transition: transform 180ms ease, box-shadow 200ms ease;
}
.dw-nav-cta:hover { transform: translateY(-1px); box-shadow: 0 12px 30px color-mix(in srgb, var(--dwaccent) 46%, transparent); }

.dw-burger {
  display: none;
  width: 34px;
  height: 34px;
  border-radius: 10px;
  border: 1px solid var(--dwline);
  background: var(--dwcard);
  cursor: pointer;
  padding: 0;
  place-items: center;
  gap: 4px;
  flex-direction: column;
}
.dw-burger span {
  display: block;
  width: 16px;
  height: 2px;
  border-radius: 2px;
  background: var(--dwtext);
  transition: transform 220ms cubic-bezier(.2,.9,.2,1), opacity 160ms ease;
}
.dw-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.dw-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.dw-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* mobile drawer (only rendered by the container query below) */
.dw-mobile {
  display: none;
  position: sticky;
  top: var(--dw-navh, 54px);
  z-index: 5;
  flex-direction: column;
  gap: 0.15rem;
  padding: 0 var(--dw-gut);
  background: color-mix(in srgb, var(--dwbg) 96%, transparent);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid transparent;
  max-height: 0;
  overflow: hidden;
  visibility: hidden;
  transition: max-height 280ms cubic-bezier(.2,.9,.2,1), padding 280ms ease, visibility 0s linear 280ms;
}
.dw-mobile[data-open="true"] {
  max-height: 320px;
  padding: 0.5rem var(--dw-gut) 0.9rem;
  border-bottom-color: var(--dwline);
  visibility: visible;
  transition: max-height 320ms cubic-bezier(.2,.9,.2,1), padding 280ms ease, visibility 0s;
}
.dw-mlink {
  text-align: left;
  background: none;
  border: 0;
  border-radius: 10px;
  padding: 0.62rem 0.7rem;
  color: var(--dwtext);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 160ms ease;
}
.dw-mlink:hover { background: var(--dwcard); }
.dw-mcta {
  margin-top: 0.4rem;
  height: 40px;
  border-radius: 12px;
  border: 0;
  background: var(--dwaccent);
  color: var(--dwink);
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

/* -------------------------------- hero ----------------------------------- */

.dw-hero {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  align-items: center;
  gap: 1.8rem;
  padding: var(--dw-sec) var(--dw-gut);
}

/* Balanced pill: equal left/right padding, icon on a fixed track so the label
   sits at the same offset no matter which glyph is used. */
.dw-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.34rem 0.8rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--dwaccent) 40%, transparent);
  background: color-mix(in srgb, var(--dwaccent) 12%, transparent);
  color: color-mix(in srgb, var(--dwaccent) 70%, var(--dwtext));
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  line-height: 1;
}
.dw-pill i { width: 0.85em; text-align: center; flex: none; }

.dw-hero h4 {
  margin: 0.75rem 0 0.6rem;
  font-size: clamp(1.7rem, 5.6cqi, 2.5rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
}
.dw-hero h4 em {
  font-style: normal;
  color: var(--dwaccent);
  border-bottom: 3px solid color-mix(in srgb, var(--dwaccent) 45%, transparent);
  transition: opacity 220ms ease;
}
.dw-hero p {
  margin: 0 0 1.15rem;
  max-width: 40ch;
  color: var(--dwmuted);
  line-height: 1.55;
  font-size: 0.94rem;
}

.dw-hero-cta { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.dw-cta {
  height: 42px;
  padding: 0 1.25rem;
  border-radius: 999px;
  border: 0;
  background: var(--dwaccent);
  color: var(--dwink);
  font: inherit;
  font-weight: 800;
  letter-spacing: 0.01em;
  font-size: 0.9rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  box-shadow: 0 12px 32px color-mix(in srgb, var(--dwaccent) 36%, transparent);
  transition: transform 180ms ease, box-shadow 220ms ease, background 200ms ease;
}
.dw-cta:hover { transform: translateY(-2px); box-shadow: 0 18px 44px color-mix(in srgb, var(--dwaccent) 48%, transparent); }
.dw-cta.ghost {
  background: var(--dwcard);
  color: var(--dwtext);
  border: 1px solid var(--dwline);
  box-shadow: none;
}
.dw-cta.ghost:hover { background: var(--dwcard2); box-shadow: none; }

.dw-hero-note {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.85rem;
  color: var(--dwmuted);
  font-size: 0.76rem;
  font-weight: 650;
}
.dw-hero-note i { color: color-mix(in srgb, var(--dwaccent) 75%, var(--dwtext)); width: 0.9em; text-align: center; flex: none; }

/* CSS-only product shot */
.dw-shot { position: relative; padding: 0.4rem; }
.dw-shot-glow {
  position: absolute;
  inset: 6% -6% 12% 4%;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--dwaccent) 38%, transparent), transparent 72%);
  filter: blur(18px);
  opacity: 0.75;
}
.dw-shot-card {
  position: relative;
  border-radius: 16px;
  padding: 0.85rem;
  background: linear-gradient(160deg, color-mix(in srgb, var(--dwbg2) 92%, #fff 6%), color-mix(in srgb, var(--dwbg) 96%, transparent));
  border: 1px solid var(--dwline);
  box-shadow: 0 24px 60px var(--dwshadow), inset 0 1px 0 color-mix(in srgb, #fff 12%, transparent);
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}
.dw-shot-head { display: flex; align-items: center; gap: 0.55rem; }
.dw-shot-avatar {
  width: 30px; height: 30px; border-radius: 999px; flex: none;
  background: linear-gradient(135deg, var(--dwaccent), var(--dwaccent2));
}
.dw-shot-titles { display: flex; flex-direction: column; line-height: 1.25; flex: 1; min-width: 0; }
.dw-shot-titles b { font-size: 0.82rem; }
.dw-shot-titles i { font-style: normal; font-size: 0.68rem; color: var(--dwmuted); }
.dw-shot-chip {
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  line-height: 1;
  font-size: 0.66rem;
  font-weight: 800;
  color: #0a3d2a;
  background: #46e6a8;
}
.dw-shot-mid { display: flex; align-items: center; gap: 0.8rem; }

.dw-ring {
  width: 72px; height: 72px; flex: none;
  border-radius: 999px;
  display: grid;
  place-items: center;
  background: conic-gradient(var(--dwaccent) 0 78%, color-mix(in srgb, var(--dwtext) 12%, transparent) 78% 100%);
  position: relative;
}
.dw-ring::after {
  content: "";
  position: absolute;
  inset: 8px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--dwbg2) 94%, transparent);
}
.dw-ring-in { position: relative; z-index: 1; font-size: 1rem; font-weight: 900; }
.dw-ring-in em { font-style: normal; font-size: 0.6rem; font-weight: 700; color: var(--dwmuted); }

.dw-shot-rows { display: flex; flex-direction: column; gap: 0.42rem; flex: 1; min-width: 0; }
.dw-shot-row { display: flex; align-items: center; gap: 0.45rem; }
.dw-shot-row i { width: 8px; height: 8px; border-radius: 3px; background: color-mix(in srgb, var(--dwaccent) 65%, transparent); flex: none; }
.dw-shot-row b {
  height: 7px;
  width: var(--w);
  border-radius: 999px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--dwaccent) 70%, transparent), color-mix(in srgb, var(--dwaccent2) 55%, transparent));
}

.dw-bars {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  align-items: end;
  gap: 5px;
  height: 54px;
  padding-top: 0.2rem;
  border-top: 1px solid var(--dwline);
}
.dw-bars i {
  height: var(--h);
  border-radius: 4px 4px 2px 2px;
  background: linear-gradient(180deg, color-mix(in srgb, var(--dwaccent) 85%, transparent), color-mix(in srgb, var(--dwaccent) 28%, transparent));
}

/* ------------------------------ features --------------------------------- */

.dw-features {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.9rem;
  padding: 0 var(--dw-gut);
}

.dw-feat {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  background: var(--dwcard);
  border: 1px solid var(--dwline);
  padding: 0.95rem;
  display: flex;
  flex-direction: column;
  gap: 0.28rem;
  transition: transform 240ms cubic-bezier(.2,.9,.2,1), border-color 240ms ease, background 240ms ease;
}
.dw-feat:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--dwaccent) 45%, transparent);
  background: var(--dwcard2);
}
.dw-feat > i { color: var(--dwaccent); font-size: 1.05rem; margin-bottom: 0.25rem; }
.dw-feat strong { font-size: 0.94rem; }
.dw-feat span { color: var(--dwmuted); font-size: 0.81rem; line-height: 1.5; }

.dw-feat-art {
  display: block;
  height: 46px;
  margin: -0.2rem -0.2rem 0.5rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--dwaccent) 10%, transparent);
  position: relative;
  overflow: hidden;
}
.dw-feat-art b { position: absolute; display: block; border-radius: 3px; background: color-mix(in srgb, var(--dwaccent) 70%, transparent); }
.art-plan b { height: 6px; left: 12px; border-radius: 999px; }
.art-plan b:nth-child(1) { top: 9px; width: 46%; }
.art-plan b:nth-child(2) { top: 21px; width: 68%; opacity: 0.7; }
.art-plan b:nth-child(3) { top: 33px; width: 32%; opacity: 0.45; }
.art-plan b:nth-child(4) { top: 9px; right: 12px; left: auto; width: 10px; height: 28px; border-radius: 5px; opacity: 0.9; }
.art-track b { bottom: 8px; width: 9px; border-radius: 4px 4px 1px 1px; }
.art-track b:nth-child(1) { left: 12px; height: 14px; }
.art-track b:nth-child(2) { left: 26px; height: 22px; }
.art-track b:nth-child(3) { left: 40px; height: 12px; }
.art-track b:nth-child(4) { left: 54px; height: 28px; }
.art-track b:nth-child(5) { left: 68px; height: 19px; }
.art-track b:nth-child(6) { left: 82px; height: 32px; opacity: 0.55; }
.art-team b { top: 11px; width: 24px; height: 24px; border-radius: 999px; }
.art-team b:nth-child(1) { left: 14px; }
.art-team b:nth-child(2) { left: 32px; opacity: 0.72; }
.art-team b:nth-child(3) { left: 50px; opacity: 0.45; }

/* ------------------------------ metrics ---------------------------------- */

/* The "sample numbers" marker used to float in the corner; it now sits centred
   under the row, so the band has one axis and nothing overlaps. */
.dw-metrics {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.7rem;
  margin: var(--dw-sec) var(--dw-gut) 0;
  padding: 1.3rem 1.1rem 1.1rem;
  border-radius: 16px;
  background: linear-gradient(120deg, color-mix(in srgb, var(--dwaccent) 14%, transparent), color-mix(in srgb, var(--dwaccent2) 8%, transparent));
  border: 1px solid color-mix(in srgb, var(--dwaccent) 26%, transparent);
}
.dw-metric-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.6rem; width: 100%; }
.dw-metric { text-align: center; display: flex; flex-direction: column; gap: 0.2rem; }
.dw-metric strong { font-size: clamp(1.15rem, 3.4cqi, 1.55rem); font-weight: 900; letter-spacing: -0.01em; }
.dw-metric span { font-size: 0.72rem; color: var(--dwmuted); font-weight: 650; }
.dw-sample {
  font-size: 0.58rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dwmuted);
  opacity: 0.8;
  text-align: center;
}

/* ------------------------------ sections --------------------------------- */

.dw-coaches,
.dw-quotes,
.dw-pricing,
.dw-faq,
.dw-contact { padding: var(--dw-sec) var(--dw-gut) 0; text-align: center; }

.demo-web h5 { margin: 0 0 0.35rem; font-size: 1.18rem; letter-spacing: -0.01em; }
.dw-sec-sub { margin: 0 auto 1.35rem; max-width: 44ch; color: var(--dwmuted); font-size: 0.8rem; line-height: 1.5; }

.dw-coach-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; }
.dw-coach {
  border-radius: 16px;
  background: var(--dwcard);
  border: 1px solid var(--dwline);
  padding: 1.05rem 0.6rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.28rem;
  transition: transform 220ms cubic-bezier(.2,.9,.2,1), border-color 220ms ease;
}
.dw-coach:hover { transform: translateY(-4px); border-color: color-mix(in srgb, var(--dwaccent) 42%, transparent); }
.dw-avatar {
  width: 48px;
  height: 48px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.95rem;
  color: #06111f;
  background: linear-gradient(135deg, var(--c1, #38b6ff), var(--c2, #7bdff2));
  box-shadow: 0 8px 20px color-mix(in srgb, var(--c1, #38b6ff) 32%, transparent);
  margin-bottom: 0.25rem;
}
.dw-avatar.sm { width: 34px; height: 34px; font-size: 0.76rem; margin: 0; }
.dw-coach strong { font-size: 0.9rem; }
.dw-coach span { color: var(--dwmuted); font-size: 0.78rem; }
.dw-coach em {
  font-style: normal;
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: color-mix(in srgb, var(--dwaccent) 72%, var(--dwmuted));
}

/* ---------------------------- testimonials ------------------------------- */

.dw-quote {
  max-width: 560px;
  margin: 0 auto;
  border-radius: 18px;
  background: var(--dwcard);
  border: 1px solid var(--dwline);
  padding: 1.4rem 1.4rem 1.2rem;
  text-align: left;
}
/* Tag was absolutely positioned in the corner; it now shares a flow row with
   the quote glyph so nothing overlaps and both baselines agree. */
.dw-quote-head { display: flex; align-items: center; justify-content: space-between; gap: 0.8rem; }
.dw-quote-tag {
  font-size: 0.56rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dwmuted);
  opacity: 0.75;
}
.dw-quote-head > i {
  color: color-mix(in srgb, var(--dwaccent) 55%, transparent);
  font-size: 1.1rem;
}
.dw-quote blockquote {
  margin: 0.5rem 0 1rem;
  font-size: 0.95rem;
  line-height: 1.6;
  font-weight: 600;
  transition: opacity 240ms ease;
}
.dw-quote.swap blockquote,
.dw-quote.swap .dw-quote-by { opacity: 0.15; }
.dw-quote-by { display: flex; align-items: center; gap: 0.6rem; transition: opacity 240ms ease; }
.dw-quote-by > span { display: flex; flex-direction: column; line-height: 1.3; }
.dw-quote-by b { font-size: 0.84rem; }
.dw-quote-by i { font-style: normal; font-size: 0.74rem; color: var(--dwmuted); }
.dw-stars { margin-left: auto; color: #ffc861; font-size: 0.8rem; letter-spacing: 0.08em; }

.dw-quote-dots { display: flex; justify-content: center; gap: 0.4rem; margin-top: 0.85rem; }
.dw-qdot {
  width: 8px; height: 8px; padding: 0;
  border-radius: 999px;
  border: 0;
  background: color-mix(in srgb, var(--dwtext) 22%, transparent);
  cursor: pointer;
  transition: width 220ms ease, background 220ms ease;
}
.dw-qdot.is-on { width: 20px; background: var(--dwaccent); }

/* ------------------------------- pricing --------------------------------- */

.dw-billing {
  position: relative;
  display: inline-flex;
  padding: 4px;
  margin-bottom: 1.1rem;
  border-radius: 999px;
  background: var(--dwcard);
  border: 1px solid var(--dwline);
}
.dw-bill {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  height: 30px;
  padding: 0 0.85rem;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--dwmuted);
  font: inherit;
  font-size: 0.8rem;
  font-weight: 750;
  cursor: pointer;
  transition: color 200ms ease;
}
.dw-bill.is-on { color: var(--dwink); }
/* Width and X-offset are set from JS (syncBillSlide) by measuring the active
   button. The old `width: calc(50% - 4px)` + `translateX(100%)` pair assumed
   both options were the same width; "Annual −20%" is ~40px wider than
   "Monthly", so the pill overlapped the inactive label. Falls back to the
   Monthly button's box before JS runs, so it is never wrong on first paint. */
.dw-bill-slide {
  position: absolute;
  z-index: 0;
  top: 4px;
  /* left:0 (not 4px) so the JS can translate by the active button's raw
     offsetLeft — one number, no padding arithmetic to drift out of sync. */
  left: 0;
  bottom: 4px;
  width: 0;
  border-radius: 999px;
  background: var(--dwaccent);
  box-shadow: 0 6px 18px color-mix(in srgb, var(--dwaccent) 40%, transparent);
  transition: transform 300ms cubic-bezier(.2,.9,.2,1), width 300ms cubic-bezier(.2,.9,.2,1);
}
.dw-save {
  font-size: 0.62rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  line-height: 1;
  padding: 0.18rem 0.42rem;
  border-radius: 999px;
  background: color-mix(in srgb, #46e6a8 85%, transparent);
  color: #0a3d2a;
}

.dw-tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.85rem; align-items: stretch; }

.dw-tier {
  position: relative;
  border-radius: 16px;
  background: var(--dwcard);
  border: 1px solid var(--dwline);
  padding: 1.2rem 0.95rem 1.05rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.3rem;
  transition: transform 220ms cubic-bezier(.2,.9,.2,1), border-color 220ms ease;
}
.dw-tier:hover { transform: translateY(-3px); }
.dw-tier.featured {
  border-color: color-mix(in srgb, var(--dwaccent) 60%, transparent);
  background: linear-gradient(180deg, color-mix(in srgb, var(--dwaccent) 12%, transparent), var(--dwcard));
  box-shadow: 0 14px 40px color-mix(in srgb, var(--dwaccent) 20%, transparent);
}
.dw-badge {
  position: absolute;
  top: -0.62rem;
  left: 50%;
  transform: translateX(-50%);
  background: var(--dwaccent);
  color: var(--dwink);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  white-space: nowrap;
  border-radius: 999px;
  padding: 0.2rem 0.65rem;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--dwaccent) 40%, transparent);
}
.dw-tier strong { font-size: 0.92rem; }
.dw-price { font-size: 1.65rem; font-weight: 900; letter-spacing: -0.02em; line-height: 1.1; }
.dw-price em,
.dw-per { font-style: normal; font-size: 0.72rem; font-weight: 700; color: var(--dwmuted); }
.dw-amt { font-variant-numeric: tabular-nums; }
.dw-price.flash { animation: dwFlash 420ms ease; }
@keyframes dwFlash {
  0% { transform: translateY(-5px); opacity: 0.35; }
  100% { transform: none; opacity: 1; }
}
.dw-bill-note {
  font-size: 0.64rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  font-weight: 750;
  color: var(--dwmuted);
  margin-bottom: 0.35rem;
}
.dw-tier ul {
  margin: 0 0 0.5rem;
  padding: 0;
  list-style: none;
  color: var(--dwmuted);
  font-size: 0.78rem;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  text-align: left;
  width: 100%;
}
/* Fixed icon track + flex-start keeps every feature label on the same left edge,
   including the ones that wrap to two lines. */
.dw-tier li { display: flex; align-items: flex-start; gap: 0.45rem; }
.dw-tier li i {
  color: color-mix(in srgb, var(--dwaccent) 80%, transparent);
  font-size: 0.68rem;
  width: 0.8rem;
  flex: none;
  text-align: center;
  line-height: 1.5;
}
.dw-tier-cta {
  margin-top: auto;
  height: 34px;
  width: 100%;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--dwaccent) 55%, transparent);
  background: transparent;
  color: color-mix(in srgb, var(--dwaccent) 88%, var(--dwtext));
  font: inherit;
  font-weight: 750;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 180ms ease, color 180ms ease, transform 160ms ease;
}
.dw-tier-cta:hover { background: var(--dwaccent); color: var(--dwink); transform: translateY(-1px); }
.dw-tier.featured .dw-tier-cta { background: var(--dwaccent); color: var(--dwink); border-color: transparent; }

/* --------------------------------- FAQ ----------------------------------- */

.dw-acc { max-width: 620px; margin: 0.4rem auto 0; text-align: left; display: flex; flex-direction: column; gap: 0.5rem; }
.dw-acc-item {
  border-radius: 14px;
  background: var(--dwcard);
  border: 1px solid var(--dwline);
  overflow: hidden;
  transition: border-color 200ms ease, background 200ms ease;
}
.dw-acc-item[data-open="true"] { border-color: color-mix(in srgb, var(--dwaccent) 45%, transparent); background: var(--dwcard2); }
.dw-acc-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0.95rem;
  background: none;
  border: 0;
  color: var(--dwtext);
  font: inherit;
  font-size: 0.88rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.dw-acc-q i {
  color: var(--dwaccent);
  font-size: 0.75rem;
  transition: transform 260ms cubic-bezier(.2,.9,.2,1);
  flex: none;
}
.dw-acc-item[data-open="true"] .dw-acc-q i { transform: rotate(135deg); }
.dw-acc-a {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows 280ms cubic-bezier(.2,.9,.2,1), visibility 0s linear 280ms;
}
.dw-acc-item[data-open="true"] .dw-acc-a {
  grid-template-rows: 1fr;
  visibility: visible;
  transition: grid-template-rows 280ms cubic-bezier(.2,.9,.2,1), visibility 0s;
}
.dw-acc-a > div { overflow: hidden; }
.dw-acc-a p { margin: 0; padding: 0 0.95rem 0.9rem; color: var(--dwmuted); font-size: 0.83rem; line-height: 1.6; }

/* ------------------------------- contact --------------------------------- */

.dw-contact { max-width: 520px; margin: 0 auto; }
.dw-form { display: flex; flex-direction: column; gap: 0.7rem; text-align: left; }
.dw-row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.7rem; }
.dw-field { display: flex; flex-direction: column; gap: 0.3rem; min-width: 0; }
.dw-field label { font-size: 0.75rem; font-weight: 750; color: var(--dwmuted); letter-spacing: 0.02em; }
.dw-field input,
.dw-field select {
  height: 42px;
  padding: 0 0.9rem;
  border-radius: 12px;
  border: 1px solid var(--dwline);
  background: var(--dwcard);
  color: var(--dwtext);
  font: inherit;
  font-size: 0.9rem;
  width: 100%;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}
.dw-field select { cursor: pointer; padding-right: 0.5rem; }
.dw-field input:focus,
.dw-field select:focus {
  outline: none;
  border-color: var(--dwaccent);
  background: var(--dwcard2);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--dwaccent) 22%, transparent);
}
.dw-field.invalid input { border-color: #ff6b7d; }
.dw-field.invalid.shake input { animation: dwShake 0.4s ease; }
@keyframes dwShake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-6px); }
  40% { transform: translateX(6px); }
  60% { transform: translateX(-4px); }
  80% { transform: translateX(4px); }
}
.dw-err { color: #ff6b7d; font-size: 0.75rem; font-weight: 650; }
.dw-submit { align-self: flex-start; margin-top: 0.2rem; }
.dw-submit[disabled] { opacity: 0.7; cursor: default; transform: none; }
.dw-success {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: #2fbd86;
  font-weight: 700;
  font-size: 0.86rem;
  margin: 0.2rem 0 0;
}
.demo-web:not(.light) .dw-success { color: #46e6a8; }

/* -------------------------------- footer --------------------------------- */

.dw-footer {
  margin-top: var(--dw-sec);
  padding: 1.7rem var(--dw-gut) 1.2rem;
  border-top: 1px solid var(--dwline);
  background: color-mix(in srgb, var(--dwtext) 3%, transparent);
}
.dw-foot-cols {
  display: grid;
  grid-template-columns: 1.7fr repeat(2, 1fr);
  gap: 1.4rem;
  text-align: left;
}
.dw-foot-col { display: flex; flex-direction: column; gap: 0.42rem; min-width: 0; }
.dw-foot-col b {
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--dwmuted);
  margin-bottom: 0.15rem;
}
.dw-foot-col span { font-size: 0.8rem; color: color-mix(in srgb, var(--dwtext) 80%, transparent); cursor: default; transition: color 160ms ease; }
.dw-foot-col span:hover { color: var(--dwaccent); }
.dw-foot-col.brand p { margin: 0.35rem 0 0.6rem; font-size: 0.78rem; line-height: 1.55; color: var(--dwmuted); max-width: 32ch; }
.dw-social { display: flex; gap: 0.4rem; }
.dw-social span {
  width: 28px; height: 28px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--dwcard);
  border: 1px solid var(--dwline);
  font-size: 0.72rem;
  color: var(--dwmuted);
}
.dw-foot-legal {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 1.3rem;
  padding-top: 0.85rem;
  border-top: 1px solid var(--dwline);
  color: var(--dwmuted);
  font-size: 0.74rem;
}
.dw-legal-links { display: flex; gap: 0.9rem; }

/* ------------------------------- overlays --------------------------------
   Deliberately thin: one persistent floating control (back-to-top, revealed
   only deep in the scroll) and one transient toast. The cookie bar and the
   hero's floating stat chips were removed — stacked floating chrome was the
   single biggest thing making this read as assembled rather than designed. */

.dw-dock {
  position: sticky;
  bottom: 0;
  z-index: 7;
  height: 0;
  pointer-events: none;
}

.dw-top {
  position: absolute;
  right: 1rem;
  bottom: 1rem;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  border: 1px solid var(--dwline);
  background: color-mix(in srgb, var(--dwbg2) 88%, transparent);
  color: var(--dwtext);
  cursor: pointer;
  pointer-events: auto;
  display: grid;
  place-items: center;
  box-shadow: 0 10px 26px var(--dwshadow);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  opacity: 0;
  transform: translateY(10px) scale(0.85);
  transition: opacity 220ms ease, transform 260ms cubic-bezier(.2,.9,.2,1), background 180ms ease;
}
.dw-top[data-show="true"] { opacity: 1; transform: none; }
.dw-top:hover { background: var(--dwaccent); color: var(--dwink); }

.dw-toast {
  position: absolute;
  left: 50%;
  bottom: 1rem;
  transform: translateX(-50%);
  width: max-content;
  max-width: 88%;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--dwaccent) 22%, var(--dwbg2));
  border: 1px solid color-mix(in srgb, var(--dwaccent) 50%, transparent);
  color: var(--dwtext);
  font-size: 0.82rem;
  font-weight: 700;
  pointer-events: auto;
  box-shadow: 0 14px 40px var(--dwshadow);
  animation: dwToastIn 260ms ease;
}
.dw-toast i { width: 0.9rem; text-align: center; flex: none; }
@keyframes dwToastIn { from { opacity: 0; transform: translate(-50%, 10px); } to { opacity: 1; transform: translateX(-50%); } }

/* --------------------- landing: container responsive --------------------- */

@container dw (max-width: 700px) {
  .dw-hero { grid-template-columns: 1fr; text-align: center; gap: 1.4rem; }
  .dw-hero p { margin-left: auto; margin-right: auto; }
  .dw-hero-cta { justify-content: center; }
  .dw-shot { max-width: 340px; margin: 0.6rem auto 0; }
  .dw-foot-cols { grid-template-columns: 1fr 1fr; }
  .dw-features { grid-template-columns: 1fr; }
  .dw-tiers { grid-template-columns: 1fr; }
  .dw-tier.featured { order: -1; }
}

@container dw (max-width: 560px) {
  .demo-web { font-size: 14px; --dw-sec: 2.1rem; }
  .dw-links { display: none; }
  .dw-nav-cta { display: none; }
  .dw-burger { display: inline-grid; }
  .dw-mobile { display: flex; }
  .dw-coach-row { grid-template-columns: 1fr; }
  .dw-metric-row { grid-template-columns: 1fr; gap: 0.9rem; }
  .dw-row2 { grid-template-columns: 1fr; }
  .dw-foot-legal { flex-direction: column; align-items: flex-start; }
}

@container dw (max-width: 400px) {
  .demo-web { --dw-gut: 1.1rem; }
  .dw-foot-cols { grid-template-columns: 1fr; }
}

/* ============================================================================
   DEMO 2: DESIGN SYSTEM DOC
   ========================================================================== */

.uik {
  --uik-accent: #38b6ff;
  --uik-accent-hi: #66c6ff;
  --uik-accent-soft: rgba(56, 182, 255, 0.16);
  --uik-accent-ink: #06111f;
  container-type: inline-size;
  container-name: uik;
  position: relative;
  display: flex;
  flex-direction: column;
}

/* toolbar */
.uik-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.7rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(0, 0, 0, 0.22);
}
.uik-brand { display: inline-flex; align-items: center; gap: 0.55rem; flex-wrap: wrap; }
.uik-brandmark {
  width: 22px; height: 22px; flex: none;
  border-radius: 7px;
  background: conic-gradient(from 140deg, var(--uik-accent), var(--uik-accent-hi), var(--uik-accent));
  box-shadow: 0 4px 14px color-mix(in srgb, var(--uik-accent) 40%, transparent);
}
.uik-brandname { font-weight: 850; font-size: 0.95rem; letter-spacing: 0.01em; }
.uik-brandname em {
  display: inline-block;
  font-style: normal;
  font-size: 0.68rem;
  font-weight: 750;
  line-height: 1.2;
  color: var(--muted);
  padding: 0.14rem 0.5rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  margin-left: 0.35rem;
}
.uik-top-tools { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

/* segmented control */
/* The highlight below is `width: 50%` + `translateX(100%)`, which is only
   correct while both options are the same width. They were not — "Cozy" is
   48.9px against "Compact" at 71.7px, so the pill overhung the inactive label
   by 11.4px. Equal grid columns make the 50% true instead of assumed: with
   intrinsic sizing, `1fr` columns both resolve to the widest option. */
.uik-seg {
  position: relative;
  display: inline-grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  padding: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
}
.uik-seg-btn {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;   /* equal columns are wider than the text now */
  gap: 0.35rem;
  height: 26px;
  padding: 0 0.7rem;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.75rem;
  font-weight: 750;
  cursor: pointer;
  white-space: nowrap;
  transition: color 200ms ease;
}
/* Fixed icon track: moon/sun and grip/list are different glyph widths, so
   without this the label jumped sideways every time the segment toggled. */
.uik-seg-btn i { width: 0.9rem; text-align: center; flex: none; }
.uik-seg-btn.is-on { color: var(--uik-accent-ink); }
.uik-seg-slide {
  position: absolute;
  z-index: 0;
  top: 3px;
  bottom: 3px;
  left: 3px;
  width: calc(50% - 3px);
  border-radius: 999px;
  background: var(--uik-accent);
  transition: transform 280ms cubic-bezier(.2,.9,.2,1);
}
.uik-seg[data-idx="1"] .uik-seg-slide { transform: translateX(100%); }

/* body split */
.uik-body { display: grid; grid-template-columns: 1fr 214px; gap: 0; align-items: stretch; }

.uik-canvas {
  --s: 1;
  --uik-surface: rgba(255, 255, 255, 0.04);
  --uik-surface2: rgba(255, 255, 255, 0.07);
  --uik-line: rgba(255, 255, 255, 0.11);
  --uik-line2: rgba(255, 255, 255, 0.2);
  --uik-text: #eef1fb;
  --uik-muted: rgba(238, 241, 251, 0.6);
  --uik-bg: transparent;
  /* Popover surface. --uik-surface above is a 4% white TINT meant to sit on top
     of a background — it is not itself a background. Anything that floats over
     page content (dropdown, popover, menu) needs a genuinely opaque fill or the
     content behind it reads straight through the text. Kept a touch lighter than
     the canvas so the menu still reads as elevated. */
  --uik-overlay: #171c2b;
  min-width: 0;
  padding: calc(1.15rem * var(--s));
  display: flex;
  flex-direction: column;
  gap: calc(1.35rem * var(--s));
  color: var(--uik-text);
  background: var(--uik-bg);
  max-height: 560px;
  overflow-y: auto;
  overscroll-behavior: contain;
  transition: background 320ms ease, color 320ms ease;
}
.uik-canvas.light {
  color-scheme: light;
  --uik-surface: #ffffff;
  --uik-surface2: #eef2f9;
  --uik-line: rgba(15, 21, 40, 0.12);
  --uik-line2: rgba(15, 21, 40, 0.24);
  --uik-text: #101528;
  --uik-muted: rgba(16, 21, 40, 0.62);
  --uik-bg: #f6f8fd;
  --uik-overlay: #ffffff;
}
.uik-canvas.light select option,
.uik-canvas.light optgroup { background-color: #ffffff; color: #101528; }

.uik-canvas::-webkit-scrollbar { width: 9px; }
.uik-canvas::-webkit-scrollbar-thumb {
  background: color-mix(in srgb, var(--uik-text) 20%, transparent);
  border-radius: 999px;
  border: 2px solid transparent;
  background-clip: padding-box;
}

.uik[data-density="compact"] .uik-canvas { --s: 0.72; font-size: 0.94em; }
.uik[data-view="list"] .uik-grid2,
.uik[data-view="list"] .uik-fields { grid-template-columns: 1fr; }
.uik[data-view="list"] .uik-mini.span2 { grid-column: span 1; }
.uik[data-outline="on"] .uik-canvas :is(.uik-sec, .uik-mini, .uik-f, .uik-btn, .uik-chip, .uik-av, .uik-acc-item) {
  outline: 1px dashed color-mix(in srgb, var(--uik-accent) 60%, transparent);
  outline-offset: 2px;
}

/* section scaffolding */
.uik-sec { display: flex; flex-direction: column; gap: calc(0.7rem * var(--s)); }
.uik-sec-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.7rem;
  padding-bottom: calc(0.4rem * var(--s));
  border-bottom: 1px solid var(--uik-line);
}
.uik-sec-head h5 { margin: 0; font-size: calc(0.92rem * max(var(--s), 0.85)); letter-spacing: 0.01em; }
.uik-sec-note {
  font-size: 0.68rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--uik-muted);
  white-space: nowrap;
}

.uik-row { display: flex; flex-wrap: wrap; align-items: center; gap: calc(0.55rem * var(--s)); }

/* buttons */
.uik-btn {
  height: calc(38px * max(var(--s), 0.8));
  padding: 0 calc(1.05rem * max(var(--s), 0.75));
  border-radius: 999px;
  border: 1px solid transparent;
  background: var(--uik-accent);
  color: var(--uik-accent-ink);
  font: inherit;
  font-weight: 800;
  font-size: 0.83rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  white-space: nowrap;
  transition: transform 160ms ease, box-shadow 200ms ease, background 200ms ease, opacity 160ms ease;
}
.uik-btn:hover { transform: translateY(-1px); box-shadow: 0 10px 26px color-mix(in srgb, var(--uik-accent) 34%, transparent); }
.uik-btn:active { transform: translateY(0) scale(0.98); }
.uik-btn.ghost {
  background: var(--uik-surface);
  color: var(--uik-text);
  border-color: var(--uik-line2);
}
.uik-btn.ghost:hover { background: var(--uik-surface2); box-shadow: none; }
.uik-btn.quiet { background: transparent; color: color-mix(in srgb, var(--uik-accent) 80%, var(--uik-text)); border-color: transparent; }
.uik-btn.quiet:hover { background: var(--uik-accent-soft); box-shadow: none; }
.uik-btn.danger { background: #ff5e76; color: #2a0510; }
.uik-btn.danger:hover { box-shadow: 0 10px 26px rgba(255, 94, 118, 0.32); }
.uik-btn.sm { height: calc(30px * max(var(--s), 0.8)); padding: 0 0.75rem; font-size: 0.76rem; }
.uik-btn[disabled] { opacity: 0.42; cursor: not-allowed; transform: none; box-shadow: none; }
.uik-icon-btn { width: calc(38px * max(var(--s), 0.8)); padding: 0; justify-content: center; }
.uik-btn.sm.uik-icon-btn { width: calc(30px * max(var(--s), 0.8)); }

/* chips */
.uik-chips { display: inline-flex; gap: 0.35rem; flex-wrap: wrap; }
.uik-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.24rem 0.62rem;
  border-radius: 999px;
  line-height: 1.2;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  background: var(--uik-accent-soft);
  color: color-mix(in srgb, var(--uik-accent) 80%, var(--uik-text));
  border: 1px solid color-mix(in srgb, var(--uik-accent) 34%, transparent);
}
.uik-chip.warn { background: rgba(255, 200, 97, 0.16); color: #d99a1c; border-color: rgba(255, 200, 97, 0.4); }
.uik-canvas:not(.light) .uik-chip.warn { color: #ffc861; }
.uik-chip.off { background: var(--uik-surface2); color: var(--uik-muted); border-color: var(--uik-line); }

/* dropdown */
.uik-dd { position: relative; }
.uik-dd-btn b { font-weight: 800; }
.uik-dd-btn i { font-size: 0.68rem; transition: transform 220ms ease; }
.uik-dd-btn[aria-expanded="true"] i { transform: rotate(180deg); }
.uik-dd-menu {
  position: absolute;
  z-index: 12;
  top: calc(100% + 6px);
  left: 0;
  min-width: 168px;
  padding: 0.35rem;
  border-radius: 12px;
  /* Opaque, not a tint — see --uik-overlay. This previously mixed the 4%-alpha
     --uik-surface with a dark tone and resolved to 42% alpha, so the pills and
     tab row behind the menu showed through its items. */
  background: var(--uik-overlay);
  border: 1px solid var(--uik-line2);
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.45);
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  /* Closed menus must never intercept clicks. Without this the menu stayed
     hit-testable for the whole 200ms hide delay, so a click aimed at the
     control underneath hit the invisible menu instead and the thing felt
     like it refused to close. */
  pointer-events: none;
  transform: translateY(-6px) scale(0.97);
  transform-origin: top left;
  transition: opacity 140ms ease, transform 160ms cubic-bezier(.2,.9,.2,1), visibility 0s linear 140ms;
}
/* (light mode now comes from --uik-overlay with the rest of the theme) */
.uik-dd-menu[data-open="true"] {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: none;
  transition: opacity 140ms ease, transform 160ms cubic-bezier(.2,.9,.2,1), visibility 0s;
}
.uik-dd-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.48rem 0.6rem;
  border: 0;
  border-radius: 8px;
  background: none;
  color: var(--uik-text);
  font: inherit;
  font-size: 0.82rem;
  font-weight: 650;
  text-align: left;
  cursor: pointer;
  transition: background 140ms ease;
}
.uik-dd-item i { font-size: 0.68rem; opacity: 0; color: var(--uik-accent); width: 0.8rem; text-align: center; flex: none; }
.uik-dd-item.is-on { font-weight: 800; }
.uik-dd-item.is-on i { opacity: 1; }
.uik-dd-item:hover { background: var(--uik-accent-soft); }

/* tooltip */
.uik-tipwrap { position: relative; display: inline-flex; }
.uik-tip {
  position: absolute;
  z-index: 13;
  bottom: calc(100% + 8px);
  left: 50%;
  width: max-content;
  max-width: 210px;
  transform: translateX(-50%) translateY(4px);
  padding: 0.42rem 0.6rem;
  border-radius: 9px;
  background: #0b0e18;
  border: 1px solid rgba(255, 255, 255, 0.16);
  color: #eef1fb;
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.4;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}
.uik-tip::after {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: #0b0e18;
}
.uik-tipwrap:hover .uik-tip,
.uik-tipwrap:focus-within .uik-tip { opacity: 1; transform: translateX(-50%); }

/* tabs */
.uik-tabs { position: relative; display: flex; gap: 0.25rem; border-bottom: 1px solid var(--uik-line); }
.uik-tab {
  background: none;
  border: 0;
  padding: calc(0.55rem * var(--s)) 0.85rem;
  color: var(--uik-muted);
  font: inherit;
  font-weight: 750;
  font-size: 0.85rem;
  cursor: pointer;
  transition: color 180ms ease;
}
.uik-tab:hover { color: var(--uik-text); }
.uik-tab.active { color: color-mix(in srgb, var(--uik-accent) 85%, var(--uik-text)); }
.uik-underline {
  position: absolute;
  bottom: -1px;
  left: 0;
  height: 2px;
  width: 0;
  background: var(--uik-accent);
  box-shadow: 0 0 12px color-mix(in srgb, var(--uik-accent) 55%, transparent);
  transition: transform 280ms cubic-bezier(.2,.9,.2,1), width 280ms cubic-bezier(.2,.9,.2,1);
}
.uik-panels { position: relative; min-height: 52px; }
.uik-panel { display: none; color: var(--uik-muted); font-size: 0.86rem; line-height: 1.55; animation: uikFade 260ms ease; }
.uik-panel.active { display: block; }
.uik-panel p { margin: 0; }
.uik-panel kbd,
.uik-modal kbd {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.76rem;
  padding: 0.05rem 0.35rem;
  border-radius: 5px;
  background: var(--uik-surface2, rgba(255,255,255,0.1));
  border: 1px solid var(--uik-line2, rgba(255,255,255,0.16));
}
@keyframes uikFade { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }

/* accordion */
.uik-acc { display: flex; flex-direction: column; gap: 0.4rem; }
.uik-acc-item {
  border-radius: 12px;
  border: 1px solid var(--uik-line);
  background: var(--uik-surface);
  overflow: hidden;
  transition: border-color 200ms ease;
}
.uik-acc-item[data-open="true"] { border-color: color-mix(in srgb, var(--uik-accent) 42%, transparent); }
.uik-acc-q {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: calc(0.65rem * var(--s)) 0.85rem;
  border: 0;
  background: none;
  color: var(--uik-text);
  font: inherit;
  font-size: 0.84rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}
.uik-acc-q i { font-size: 0.7rem; color: var(--uik-accent); transition: transform 260ms cubic-bezier(.2,.9,.2,1); }
.uik-acc-item[data-open="true"] .uik-acc-q i { transform: rotate(180deg); }
.uik-acc-a {
  display: grid;
  grid-template-rows: 0fr;
  visibility: hidden;
  transition: grid-template-rows 260ms cubic-bezier(.2,.9,.2,1), visibility 0s linear 260ms;
}
.uik-acc-item[data-open="true"] .uik-acc-a {
  grid-template-rows: 1fr;
  visibility: visible;
  transition: grid-template-rows 260ms cubic-bezier(.2,.9,.2,1), visibility 0s;
}
.uik-acc-a > div { overflow: hidden; }
.uik-acc-a p { margin: 0; padding: 0 0.85rem 0.8rem; font-size: 0.81rem; line-height: 1.55; color: var(--uik-muted); }

/* mini grid: avatars / progress / skeleton */
.uik-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: calc(0.7rem * var(--s)); }
.uik-mini {
  border-radius: 12px;
  border: 1px solid var(--uik-line);
  background: var(--uik-surface);
  padding: calc(0.75rem * var(--s));
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-width: 0;
}
.uik-mini.span2 { grid-column: span 2; }
.uik-mini-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--uik-muted);
}
.uik-mini-label em { font-style: normal; letter-spacing: 0; color: color-mix(in srgb, var(--uik-accent) 80%, var(--uik-text)); }

.uik-avatars { display: flex; align-items: center; }
.uik-av {
  width: 32px; height: 32px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.7rem;
  font-weight: 850;
  color: #06111f;
  background: linear-gradient(135deg, var(--c1, #38b6ff), var(--c2, #7bdff2));
  box-shadow: 0 0 0 2px var(--uik-bg, #0c101c);
  margin-left: -8px;
  flex: none;
  transition: transform 180ms ease;
}
.uik-canvas:not(.light) .uik-av { box-shadow: 0 0 0 2px #131727; }
.uik-av:first-child { margin-left: 0; }
.uik-avatars:hover .uik-av { transform: translateY(-2px); }
.uik-av.more { background: var(--uik-surface2); color: var(--uik-muted); font-size: 0.65rem; }

.uik-prog {
  height: 8px;
  border-radius: 999px;
  background: var(--uik-surface2);
  overflow: hidden;
}
.uik-prog > span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--uik-accent), var(--uik-accent-hi));
  transition: width 320ms cubic-bezier(.2,.9,.2,1);
}
.uik-prog.indeterminate > span {
  width: 38%;
  animation: uikIndet 1.6s ease-in-out infinite;
  opacity: 0.6;
}
@keyframes uikIndet {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(280%); }
}

.uik-skelwrap { position: relative; min-height: 44px; }
.uik-skel,
.uik-loaded { display: flex; align-items: center; gap: 0.6rem; transition: opacity 240ms ease; }
.uik-skelwrap[data-state="ready"] .uik-skel { display: none; }
.uik-skelwrap[data-state="loading"] .uik-loaded { display: none; }
.sk-av { width: 32px; height: 32px; border-radius: 999px; flex: none; }
.sk-lines { display: flex; flex-direction: column; gap: 6px; flex: 1; min-width: 0; }
.sk-lines i { display: block; height: 8px; border-radius: 999px; }
.sk-lines i:nth-child(1) { width: 42%; }
.sk-lines i:nth-child(2) { width: 78%; }
.sk-lines i:nth-child(3) { width: 56%; }
.sk-av, .sk-lines i {
  background: linear-gradient(90deg, var(--uik-surface2) 25%, color-mix(in srgb, var(--uik-accent) 16%, var(--uik-surface2)) 50%, var(--uik-surface2) 75%);
  background-size: 220% 100%;
  animation: uikShimmer 1.3s linear infinite;
}
@keyframes uikShimmer { to { background-position: -220% 0; } }
.uik-loaded-txt { display: flex; flex-direction: column; line-height: 1.35; min-width: 0; }
.uik-loaded-txt b { font-size: 0.85rem; }
.uik-loaded-txt i { font-style: normal; font-size: 0.74rem; color: var(--uik-muted); }

/* form fields */
.uik-fields { display: grid; grid-template-columns: 1fr 1fr; gap: calc(0.7rem * var(--s)); }
.uik-f { display: flex; flex-direction: column; gap: 0.28rem; min-width: 0; }
.uik-f > span { font-size: 0.72rem; font-weight: 750; color: var(--uik-muted); }
.uik-f input,
.uik-f select,
.uik-f textarea {
  height: calc(38px * max(var(--s), 0.8));
  padding: 0 0.75rem;
  border-radius: 10px;
  border: 1px solid var(--uik-line2);
  background: var(--uik-surface);
  color: var(--uik-text);
  font: inherit;
  font-size: 0.83rem;
  width: 100%;
  transition: border-color 180ms ease, box-shadow 180ms ease;
}
.uik-f textarea { height: auto; padding: 0.5rem 0.75rem; resize: vertical; min-height: 54px; }
.uik-f input:focus,
.uik-f select:focus,
.uik-f textarea:focus {
  outline: none;
  border-color: var(--uik-accent);
  box-shadow: 0 0 0 3px var(--uik-accent-soft);
}
.uik-f > em {
  font-style: normal;
  font-size: 0.7rem;
  color: var(--uik-muted);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}
/* Success and error hints sit in adjacent grid cells — a fixed icon track keeps
   their text on a shared left edge instead of drifting by a glyph width. */
.uik-f > em i { width: 0.8rem; text-align: center; flex: none; }
.uik-f.is-ok input { border-color: #2fbd86; }
.uik-f.is-ok > em { color: #2fbd86; }
.uik-canvas:not(.light) .uik-f.is-ok > em { color: #46e6a8; }
.uik-f.is-err input { border-color: #ff5e76; }
.uik-f.is-err > em { color: #ff5e76; }
.uik-f.is-off { opacity: 0.55; }
.uik-f.is-off input { cursor: not-allowed; }

/* data table */
.uik-tablewrap {
  border-radius: 12px;
  border: 1px solid var(--uik-line);
  overflow-x: auto;
  background: var(--uik-surface);
}
.uik-table { width: 100%; border-collapse: collapse; font-size: 0.82rem; min-width: 380px; }
.uik-table th { text-align: left; padding: 0; border-bottom: 1px solid var(--uik-line); }
.uik-table th.num, .uik-table td.num { text-align: right; }
.uik-th {
  width: 100%;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: calc(0.6rem * var(--s)) 0.75rem;
  border: 0;
  background: none;
  color: var(--uik-muted);
  font: inherit;
  font-size: 0.71rem;
  font-weight: 800;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  cursor: pointer;
  transition: color 160ms ease, background 160ms ease;
}
.uik-table th.num .uik-th { justify-content: flex-end; }
.uik-th:hover { color: var(--uik-text); background: var(--uik-accent-soft); }
/* fa-sort / fa-sort-up / fa-sort-down are three different widths — pin the
   track so the header label does not shift every time you sort. */
.uik-th i { font-size: 0.66rem; opacity: 0.5; width: 0.75rem; text-align: center; flex: none; }
.uik-th.is-sorted { color: color-mix(in srgb, var(--uik-accent) 85%, var(--uik-text)); }
.uik-th.is-sorted i { opacity: 1; }
.uik-table td { padding: calc(0.55rem * var(--s)) 0.75rem; border-bottom: 1px solid var(--uik-line); color: var(--uik-text); }
.uik-table tbody tr:last-child td { border-bottom: 0; }
.uik-table tbody tr { transition: background 160ms ease; }
.uik-table tbody tr:hover { background: var(--uik-accent-soft); }
.uik-table td.num { font-variant-numeric: tabular-nums; color: var(--uik-muted); }
.uik-cellname { display: inline-flex; align-items: center; gap: 0.45rem; font-weight: 700; }
.uik-cellname span {
  width: 8px; height: 8px; border-radius: 3px;
  background: color-mix(in srgb, var(--uik-accent) 70%, transparent);
}

/* switches + slider */
.uik-controls { display: flex; flex-wrap: wrap; gap: 1rem; }
.uik-switch { display: inline-flex; align-items: center; gap: 0.55rem; font-size: 0.83rem; font-weight: 650; cursor: pointer; color: var(--uik-text); }
.uik-switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.uik-track {
  width: 40px;
  height: 22px;
  border-radius: 999px;
  background: var(--uik-surface2);
  border: 1px solid var(--uik-line2);
  position: relative;
  flex: none;
  transition: background 200ms ease;
}
.uik-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(0,0,0,0.35);
  transition: transform 200ms cubic-bezier(.2,.9,.2,1);
}
.uik-switch input:checked + .uik-track { background: var(--uik-accent); border-color: var(--uik-accent); }
.uik-switch input:checked + .uik-track .uik-thumb { transform: translateX(18px); }
.uik-switch input:focus-visible + .uik-track { box-shadow: 0 0 0 3px var(--uik-accent-soft); }

.uik-range { display: flex; align-items: center; gap: 0.9rem; }
.uik-range > label { font-size: 0.8rem; font-weight: 750; color: var(--uik-muted); min-width: 62px; }
.uik-range-track { position: relative; flex: 1; display: flex; align-items: center; min-width: 0; }
.uik-range input[type="range"] { width: 100%; accent-color: var(--uik-accent); }
.uik-bubble {
  min-width: 36px;
  text-align: center;
  margin-left: 0.7rem;
  padding: 0.2rem 0.5rem;
  line-height: 1.2;
  border-radius: 8px;
  font-size: 0.76rem;
  font-weight: 850;
  color: var(--uik-accent-ink);
  background: var(--uik-accent);
  font-variant-numeric: tabular-nums;
}

.uik-overlay {
  border-radius: 12px;
  border: 1px dashed color-mix(in srgb, var(--uik-accent) 55%, transparent);
  background: var(--uik-accent-soft);
  padding: 0.7rem 0.9rem;
  animation: uikFade 240ms ease;
}
.uik-overlay-inner { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.84rem; font-weight: 700; flex-wrap: wrap; }
.uik-overlay-inner i { color: color-mix(in srgb, var(--uik-accent) 88%, var(--uik-text)); width: 0.9rem; text-align: center; flex: none; }
.uik-sim, .shop-sim, .uik-rail-note {
  font-size: 0.64rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* rail */
.uik-rail {
  border-left: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03);
  padding: 1rem 0.9rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  min-width: 0;
}
.uik-rail-title { font-size: 0.66rem; font-weight: 850; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.uik-swatches { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.uik-swatch {
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.2);
  background: var(--sw);
  cursor: pointer;
  padding: 0;
  transition: transform 160ms ease, border-color 160ms ease;
}
.uik-swatch:hover { transform: scale(1.12); }
.uik-swatch.active { border-color: #fff; box-shadow: 0 0 0 2px var(--sw); }
.uik-color-row { display: flex; align-items: center; justify-content: space-between; font-size: 0.78rem; font-weight: 650; color: var(--muted); }
.uik-color-row input[type="color"] { width: 34px; height: 26px; border: 0; background: none; cursor: pointer; padding: 0; }

.uik-tokens {
  margin: 0;
  padding: 0.6rem 0.7rem;
  border-radius: 10px;
  background: rgba(0, 0, 0, 0.32);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #cfe6ff;
  font-family: ui-monospace, Consolas, "SF Mono", monospace;
  font-size: 0.66rem;
  line-height: 1.65;
  white-space: pre;
  overflow-x: auto;
  max-height: 148px;
  overflow-y: auto;
}
.uik-tokens::-webkit-scrollbar { width: 7px; height: 7px; }
.uik-tokens::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.18); border-radius: 999px; }
.uik-copy {
  height: 32px;
  border-radius: 9px;
  border: 1px solid color-mix(in srgb, var(--uik-accent) 45%, rgba(255,255,255,0.16));
  background: color-mix(in srgb, var(--uik-accent) 16%, transparent);
  color: var(--text);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 750;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  transition: background 180ms ease, transform 140ms ease;
}
.uik-copy:hover { background: color-mix(in srgb, var(--uik-accent) 28%, transparent); transform: translateY(-1px); }
.uik-copy.is-done { background: rgba(70, 230, 168, 0.2); border-color: rgba(70, 230, 168, 0.5); }
.uik-rail-note { margin: 0; text-transform: none; letter-spacing: 0; font-size: 0.68rem; line-height: 1.5; font-weight: 600; }

/* modal */
.uik-modal-wrap { position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; }
.uik-backdrop { position: absolute; inset: 0; background: rgba(3, 4, 12, 0.62); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); animation: uikFade 200ms ease; }
.uik-modal {
  position: relative;
  z-index: 1;
  width: min(380px, 88%);
  border-radius: var(--radius);
  background: color-mix(in srgb, var(--bg) 82%, #10131f);
  border: 1px solid color-mix(in srgb, var(--uik-accent) 40%, rgba(255, 255, 255, 0.14));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.55);
  padding: 1.4rem 1.4rem 1.2rem;
  animation: uikPop 260ms cubic-bezier(.2,.9,.2,1);
}
@keyframes uikPop { from { opacity: 0; transform: translateY(12px) scale(0.96); } to { opacity: 1; transform: none; } }
.uik-modal h4 { margin: 0 0 0.6rem; font-size: 1.12rem; }
.uik-modal p { margin: 0 0 1.1rem; color: var(--muted); font-size: 0.88rem; line-height: 1.55; }
.uik-modal-actions { display: flex; justify-content: flex-end; gap: 0.6rem; }
.uik-modal-x {
  position: absolute;
  top: 0.7rem;
  right: 0.7rem;
  width: 30px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  color: var(--muted);
  cursor: pointer;
}

/* toasts */
.uik-toasts { position: absolute; right: 1rem; bottom: 1rem; z-index: 22; display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-end; pointer-events: none; }
.uik-toast {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 0.9rem;
  border-radius: 12px;
  background: color-mix(in srgb, var(--uik-accent) 22%, #0b0e18);
  border: 1px solid color-mix(in srgb, var(--uik-accent) 55%, transparent);
  color: var(--text);
  font-size: 0.82rem;
  font-weight: 700;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  animation: uikToastIn 240ms ease;
}
.uik-toast.leaving { animation: uikToastOut 240ms ease forwards; }
.uik-toast i { color: color-mix(in srgb, var(--uik-accent) 90%, #fff); width: 0.9rem; text-align: center; flex: none; }
@keyframes uikToastIn { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@keyframes uikToastOut { to { opacity: 0; transform: translateX(16px); } }

@container uik (max-width: 720px) {
  .uik-body { grid-template-columns: 1fr; }
  .uik-rail { border-left: 0; border-top: 1px solid rgba(255, 255, 255, 0.1); }
  .uik-canvas { max-height: 520px; }
}
@container uik (max-width: 520px) {
  .uik-grid2 { grid-template-columns: 1fr; }
  .uik-mini.span2 { grid-column: span 1; }
  .uik-fields { grid-template-columns: 1fr; }
  .uik-top { padding: 0.7rem 0.85rem; }
  .uik-canvas { padding: calc(0.9rem * var(--s)); }
  .uik-sec-note { display: none; }
  .uik-toasts { left: 0.75rem; right: 0.75rem; align-items: stretch; }
}

/* ============================================================================
   DEMO 3: STOREFRONT
   ========================================================================== */

.shop {
  container-type: inline-size;
  container-name: shop;
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.shop-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.85rem 1.1rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.09);
  background: rgba(0, 0, 0, 0.2);
  z-index: 4;
}
.shop-brand { display: inline-flex; align-items: center; gap: 0.5rem; font-weight: 850; flex-wrap: wrap; }
.shop-brand i { color: color-mix(in srgb, var(--accent) 82%, #fff); }
.shop-sim { font-size: 0.6rem; }
.shop-bar-actions { display: inline-flex; align-items: center; gap: 0.5rem; }

.shop-icon,
.shop-cart {
  position: relative;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.045);
  color: var(--text);
  cursor: pointer;
  display: grid;
  place-items: center;
  transition: transform 160ms ease, background 180ms ease, color 180ms ease;
}
.shop-cart { border-color: color-mix(in srgb, var(--accent) 40%, rgba(255,255,255,0.14)); background: color-mix(in srgb, var(--accent) 14%, rgba(255,255,255,0.04)); }
.shop-icon:hover, .shop-cart:hover { transform: translateY(-1px); background: rgba(255,255,255,0.09); }
.shop-icon.is-on { color: #ff5e8a; border-color: rgba(255, 94, 138, 0.45); background: rgba(255, 94, 138, 0.14); }
.shop-cart.bump { animation: shopBump 0.4s ease; }
@keyframes shopBump { 0%,100% { transform: scale(1); } 40% { transform: scale(1.16); } }
.shop-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--accent);
  color: #06111f;
  font-size: 0.7rem;
  font-weight: 900;
  display: grid;
  place-items: center;
}
.shop-badge.alt { background: #ff5e8a; color: #2b0512; }

.shop-body {
  padding: 1rem 1.1rem 1.2rem;
  max-height: 520px;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.shop-body::-webkit-scrollbar { width: 9px; }
.shop-body::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.16); border-radius: 999px; border: 2px solid transparent; background-clip: padding-box; }

.shop-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.4rem;
  margin-bottom: 1rem;
  padding-bottom: 0.85rem;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.12);
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 650;
}
/* Each item is its own flex row with a fixed icon track, so the three labels
   sit at an identical distance from their icon (they used to drift, because
   truck / rotate / tag are three different glyph widths). */
.shop-strip > span { display: inline-flex; align-items: center; gap: 0.45rem; }
.shop-strip i { color: color-mix(in srgb, var(--accent) 80%, #fff); width: 1rem; text-align: center; flex: none; }
.shop-strip b { color: color-mix(in srgb, var(--accent) 85%, var(--text)); letter-spacing: 0.06em; }

.shop-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.85rem; }

.shop-card {
  position: relative;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  padding: 0.7rem;
  display: flex;
  flex-direction: column;
  gap: 0.42rem;
  min-width: 0;
  transition: transform 220ms cubic-bezier(.2,.9,.2,1), border-color 220ms ease, box-shadow 220ms ease;
}
.shop-card:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--accent) 40%, transparent);
  box-shadow: 0 16px 40px rgba(0, 0, 0, 0.34);
}

.shop-artwrap { position: relative; }

/* ---- product art -------------------------------------------------------
   Real product photographs (see PRODUCTS in demos.js). The pale backdrop stays
   as the loading colour underneath — the photos are lazy-loaded, and a light
   tile reads as an empty studio shot rather than a hole while one arrives.
   Each colourway is its own photograph, so a variant change swaps the <img>
   src; the crossfade below hides the swap.                                  */
.shop-art,
.shop-qv-art,
.shop-line-art {
  background:
    radial-gradient(90% 70% at 30% 8%, #ffffff, transparent 62%),
    linear-gradient(180deg, #edf0f6, #dde3ee);
  box-shadow: inset 0 0 0 1px rgba(12, 18, 34, 0.08);
  overflow: hidden;
  position: relative;
}

/* Square sources, non-square tiles — cover-crop from the centre, where every
   one of these shots is composed.

   Absolutely positioned rather than a plain block: these tiles are grids with
   `place-items: center` (from the old centred-SVG layout), which centres a
   child instead of stretching it, so `height: 100%` resolved against the
   image's own square ratio and the photo rendered 257x257 inside a 3:2 tile.
   Filling the padding box sidesteps the parent's alignment entirely. */
.shop-photo {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: opacity 190ms ease;
}

.shop-art {
  aspect-ratio: 3 / 2;
  min-height: 130px;
  border-radius: 10px;
  display: grid;
  place-items: center;
}

/* Only the photo cross-fades on a variant change; the tile holds still. */
.shop-art.swap .shop-photo,
.shop-qv-art.swap .shop-photo { opacity: 0.15; }

.shop-flag {
  position: absolute;
  top: 7px;
  left: 7px;
  padding: 0.2rem 0.55rem;
  border-radius: 999px;
  line-height: 1.2;
  font-size: 0.6rem;
  font-weight: 900;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: #0b0e18;
  color: #fff;
  border: 1px solid rgba(255,255,255,0.2);
}
.shop-flag.sale { background: #ff5e8a; color: #2b0512; border-color: transparent; }
.shop-flag.new { background: #46e6a8; color: #0a3d2a; border-color: transparent; }

.shop-heart {
  position: absolute;
  top: 7px;
  right: 7px;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(8, 10, 20, 0.55);
  color: rgba(255, 255, 255, 0.86);
  cursor: pointer;
  display: grid;
  place-items: center;
  font-size: 0.75rem;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  transition: transform 180ms ease, color 180ms ease, background 180ms ease;
}
.shop-heart:hover { transform: scale(1.1); }
.shop-heart.is-on { color: #ff5e8a; background: rgba(255, 94, 138, 0.18); border-color: rgba(255, 94, 138, 0.5); }
.shop-heart.pop { animation: shopPop 0.45s cubic-bezier(.2,1.6,.4,1); }
@keyframes shopPop { 0% { transform: scale(1); } 45% { transform: scale(1.42); } 100% { transform: scale(1); } }

.shop-eyebrow {
  font-size: 0.6rem;
  font-weight: 850;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  color: var(--muted);
}
.shop-name { font-weight: 750; font-size: 0.88rem; line-height: 1.25; }
.shop-rating { display: inline-flex; align-items: center; gap: 0.3rem; font-size: 0.7rem; color: var(--muted); }
.shop-rating b { color: #ffc861; letter-spacing: 0.06em; }

.shop-variants { display: flex; gap: 0.32rem; flex-wrap: wrap; }
.shop-dot {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid rgba(255, 255, 255, 0.25);
  background: var(--d);
  cursor: pointer;
  padding: 0;
  transition: transform 160ms ease, border-color 160ms ease;
}
.shop-dot:hover { transform: scale(1.14); }
.shop-dot.active { border-color: #fff; box-shadow: 0 0 0 2px color-mix(in srgb, var(--d) 60%, transparent); }

.shop-sizes { display: flex; gap: 0.28rem; flex-wrap: wrap; }
.shop-size {
  min-width: 30px;
  height: 27px;
  padding: 0 0.55rem;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 750;
  cursor: pointer;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease;
}
.shop-size:hover:not([disabled]) { border-color: color-mix(in srgb, var(--accent) 60%, transparent); }
.shop-size.active { background: var(--accent); border-color: var(--accent); color: #06111f; }
.shop-size[disabled] {
  cursor: not-allowed;
  opacity: 0.4;
  color: var(--muted);
  text-decoration: line-through;
}

.shop-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 0.4rem; margin-top: auto; padding-top: 0.15rem; flex-wrap: wrap; }
.shop-price { font-weight: 850; font-size: 0.92rem; font-variant-numeric: tabular-nums; }
.shop-price s { font-weight: 600; font-size: 0.74rem; color: var(--muted); margin-left: 0.3rem; }

.shop-qty {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.04);
  padding: 2px;
}
.shop-qty-btn {
  width: 22px; height: 22px;
  border-radius: 999px;
  border: 0;
  background: none;
  color: var(--text);
  cursor: pointer;
  font-weight: 900;
  line-height: 1;
  font-size: 0.85rem;
  transition: background 140ms ease;
}
.shop-qty-btn:hover { background: rgba(255, 255, 255, 0.12); }
.shop-qty-n { min-width: 18px; text-align: center; font-size: 0.78rem; font-weight: 800; font-variant-numeric: tabular-nums; }

.shop-actions { display: flex; gap: 0.35rem; align-items: center; }
.shop-add {
  height: 30px;
  padding: 0 0.8rem;
  border-radius: 999px;
  border: 0;
  background: var(--accent);
  color: #06111f;
  font: inherit;
  font-weight: 850;
  font-size: 0.76rem;
  cursor: pointer;
  white-space: nowrap;
  transition: transform 140ms ease, box-shadow 180ms ease;
}
.shop-add:hover { box-shadow: 0 8px 20px color-mix(in srgb, var(--accent) 34%, transparent); }
.shop-add:active { transform: scale(0.94); }
.shop-add.lg { height: 40px; padding: 0 1.2rem; font-size: 0.85rem; flex: 1; }
.shop-add[disabled] { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.shop-quick {
  height: 30px;
  padding: 0 0.65rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font: inherit;
  font-size: 0.72rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: background 160ms ease, border-color 160ms ease;
}
.shop-quick:hover { background: rgba(255, 255, 255, 0.1); border-color: color-mix(in srgb, var(--accent) 45%, transparent); }

/* flying dot */
.shop-fly {
  position: fixed;
  z-index: 30;
  width: 16px;
  height: 16px;
  border-radius: 999px;
  background: var(--accent);
  box-shadow: 0 0 14px color-mix(in srgb, var(--accent) 60%, transparent);
  pointer-events: none;
  transition: transform 620ms cubic-bezier(.5,-0.2,.5,1), opacity 620ms ease;
}

/* scrim */
.shop-scrim {
  position: absolute;
  inset: 0;
  z-index: 8;
  background: rgba(4, 6, 14, 0.5);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  opacity: 0;
  visibility: hidden;
  transition: opacity 280ms ease, visibility 0s linear 280ms;
}
.shop-scrim[data-open="true"] { opacity: 1; visibility: visible; transition: opacity 280ms ease, visibility 0s; }

/* drawer */
.shop-drawer {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  width: min(340px, 92%);
  background: color-mix(in srgb, var(--bg) 78%, #0b0e18);
  border-left: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: -20px 0 60px rgba(0, 0, 0, 0.55);
  transform: translateX(101%);
  transition: transform 340ms cubic-bezier(.2,.9,.2,1);
  display: flex;
  flex-direction: column;
  padding: 0.9rem;
  z-index: 10;
}
.shop-drawer.open { transform: none; }
.shop-drawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 0.7rem; }
.shop-drawer-head strong { font-size: 1rem; }
.shop-drawer-x {
  width: 30px; height: 30px; border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05); color: var(--muted); cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}
.shop-drawer-x:hover { background: rgba(255,255,255,0.12); color: var(--text); }

.shop-view { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.shop-view[hidden] { display: none; }

/* free-shipping meter */
.shop-ship { margin-bottom: 0.7rem; display: flex; flex-direction: column; gap: 0.35rem; }
.shop-ship-txt { font-size: 0.73rem; font-weight: 700; color: var(--muted); }
.shop-ship-txt.is-free { color: #46e6a8; }
.shop-ship-bar { display: block; height: 6px; border-radius: 999px; background: rgba(255, 255, 255, 0.1); overflow: hidden; }
.shop-ship-bar i {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #46e6a8);
  transition: width 380ms cubic-bezier(.2,.9,.2,1);
}

.shop-lines { flex: 1; overflow-y: auto; display: flex; flex-direction: column; gap: 0.5rem; min-height: 0; }
.shop-lines::-webkit-scrollbar { width: 7px; }
.shop-lines::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.16); border-radius: 999px; }
.shop-line {
  display: grid;
  grid-template-columns: 38px 1fr auto;
  gap: 0.6rem;
  align-items: center;
  padding: 0.5rem;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  overflow: hidden;
  transition: opacity 260ms ease, height 260ms ease, padding 260ms ease, margin 260ms ease;
}
.shop-line.removing { opacity: 0; height: 0 !important; padding-top: 0; padding-bottom: 0; margin: 0; border-width: 0; }
.shop-line-art { width: 38px; height: 38px; border-radius: 8px; display: grid; place-items: center; }
.shop-line-info { min-width: 0; }
.shop-line-name { font-size: 0.8rem; font-weight: 750; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.shop-line-meta { font-size: 0.7rem; color: var(--muted); display: flex; align-items: center; gap: 0.3rem; flex-wrap: wrap; }
.shop-line-meta em { font-style: normal; padding: 0.1rem 0.4rem; border-radius: 5px; line-height: 1.25; background: rgba(255,255,255,0.08); font-weight: 700; }
.shop-line-right { display: flex; flex-direction: column; align-items: flex-end; gap: 0.25rem; }
.shop-line-qty { display: inline-flex; align-items: center; gap: 0.1rem; }
.shop-line-sum { font-size: 0.76rem; font-weight: 800; font-variant-numeric: tabular-nums; }

/* empty state */
.shop-empty {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 0.4rem;
  color: var(--muted);
  font-size: 0.8rem;
  padding: 1rem 0.5rem;
}
.shop-empty b { color: var(--text); font-size: 0.95rem; }
.shop-empty span { max-width: 26ch; line-height: 1.5; }
.shop-empty-art {
  width: 58px; height: 58px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  color: color-mix(in srgb, var(--accent) 75%, #fff);
  background: color-mix(in srgb, var(--accent) 12%, rgba(255,255,255,0.04));
  border: 1px dashed color-mix(in srgb, var(--accent) 40%, transparent);
  margin-bottom: 0.35rem;
}
.shop-empty-cta {
  margin-top: 0.5rem;
  height: 34px;
  padding: 0 1rem;
  border-radius: 999px;
  border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent);
  background: transparent;
  color: color-mix(in srgb, var(--accent) 85%, var(--text));
  font: inherit;
  font-size: 0.78rem;
  font-weight: 750;
  cursor: pointer;
  transition: background 160ms ease, color 160ms ease;
}
.shop-empty-cta:hover { background: var(--accent); color: #06111f; }

/* promo + totals */
.shop-foot { padding-top: 0.6rem; }
.shop-promo { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 0.6rem; }
.shop-promo-lab { font-size: 0.66rem; font-weight: 850; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.shop-promo-row { display: flex; gap: 0.35rem; }
.shop-promo-row input {
  flex: 1;
  min-width: 0;
  height: 34px;
  padding: 0 0.65rem;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
  font: inherit;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: border-color 160ms ease, box-shadow 160ms ease;
}
.shop-promo-row input::placeholder { letter-spacing: 0.06em; color: rgba(255,255,255,0.3); }
.shop-promo-row input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 20%, transparent); }
.shop-promo.is-bad .shop-promo-row input { border-color: #ff5e76; }
.shop-promo.is-bad.shake .shop-promo-row input { animation: dwShake 0.4s ease; }
.shop-promo-btn {
  height: 34px;
  padding: 0 0.8rem;
  border-radius: 9px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.07);
  color: var(--text);
  font: inherit;
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
  transition: background 160ms ease;
}
.shop-promo-btn:hover { background: rgba(255, 255, 255, 0.14); }
.shop-promo-msg { font-size: 0.72rem; font-weight: 700; color: #ff5e76; }
.shop-promo-msg.ok { color: #46e6a8; }
.shop-promo-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  align-self: flex-start;
  /* Asymmetric on purpose: the trailing ✕ button carries its own visual weight,
     so it needs less outer padding than the leading text does. */
  padding: 0.26rem 0.32rem 0.26rem 0.7rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 750;
  background: rgba(70, 230, 168, 0.16);
  border: 1px solid rgba(70, 230, 168, 0.42);
  color: #46e6a8;
}
.shop-promo-chip b { letter-spacing: 0.06em; }
.shop-promo-chip button {
  width: 18px; height: 18px;
  border-radius: 999px;
  border: 0;
  background: rgba(70, 230, 168, 0.25);
  color: inherit;
  cursor: pointer;
  font-size: 0.62rem;
  display: grid;
  place-items: center;
}

.shop-totals { border-top: 1px solid rgba(255, 255, 255, 0.1); margin-top: 0.2rem; padding-top: 0.6rem; display: flex; flex-direction: column; gap: 0.3rem; }
.shop-total-row { display: flex; justify-content: space-between; gap: 0.5rem; font-size: 0.83rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.shop-total-row.disc span:last-child { color: #46e6a8; font-weight: 750; }
.shop-total-row.grand { color: var(--text); font-weight: 850; font-size: 1rem; margin-top: 0.15rem; }
.shop-total-row.grand.pay { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 0.6rem; margin-top: 0.6rem; }

.shop-checkout {
  position: relative;
  margin-top: 0.7rem;
  width: 100%;
  height: 42px;
  border-radius: 12px;
  border: 0;
  background: var(--accent);
  color: #06111f;
  font: inherit;
  font-weight: 850;
  font-size: 0.86rem;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: transform 160ms ease, box-shadow 200ms ease;
}
.shop-checkout:hover:not([disabled]) { transform: translateY(-1px); box-shadow: 0 12px 30px color-mix(in srgb, var(--accent) 34%, transparent); }
.shop-checkout[disabled] {
  background: rgba(255, 255, 255, 0.1);
  color: var(--muted);
  cursor: not-allowed;
}
.shop-checkout .shop-tooltip {
  position: absolute;
  bottom: calc(100% + 8px);
  left: 50%;
  transform: translateX(-50%) translateY(4px);
  white-space: nowrap;
  background: #0b0e18;
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: var(--text);
  font-size: 0.7rem;
  font-weight: 650;
  padding: 0.35rem 0.6rem;
  border-radius: 8px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms ease, transform 180ms ease;
}
.shop-checkout:hover .shop-tooltip { opacity: 1; transform: translateX(-50%) translateY(0); }
.shop-back {
  margin-top: 0.5rem;
  width: 100%;
  height: 32px;
  border-radius: 9px;
  border: 0;
  background: none;
  color: var(--muted);
  font: inherit;
  font-size: 0.76rem;
  font-weight: 700;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  transition: color 160ms ease;
}
.shop-back:hover { color: var(--text); }

/* checkout steps */
.shop-steps {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  list-style: none;
  margin: 0 0 0.9rem;
  padding: 0;
}
.shop-steps li {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.7rem;
  font-weight: 750;
  color: var(--muted);
  white-space: nowrap;
}
.shop-steps li span {
  width: 20px; height: 20px;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.66rem;
  font-weight: 900;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  flex: none;
}
.shop-steps li.is-done span { background: rgba(70, 230, 168, 0.2); border-color: rgba(70, 230, 168, 0.5); color: #46e6a8; }
.shop-steps li.is-on { color: var(--text); }
.shop-steps li.is-on span { background: var(--accent); border-color: transparent; color: #06111f; }

.shop-step-body { display: flex; flex-direction: column; flex: 1; min-height: 0; overflow-y: auto; }
.shop-step-body[hidden] { display: none; }
.shop-step-lead { margin: 0 0 0.6rem; font-size: 0.86rem; font-weight: 800; }
.shop-fake-field {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  padding: 0.5rem 0.65rem;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.09);
  margin-bottom: 0.4rem;
}
.shop-fake-field span { font-size: 0.64rem; font-weight: 800; letter-spacing: 0.09em; text-transform: uppercase; color: var(--muted); }
.shop-fake-field b { font-size: 0.82rem; font-weight: 650; }
.shop-step-note {
  margin: 0.5rem 0 0;
  font-size: 0.72rem;
  line-height: 1.5;
  color: var(--muted);
}
.shop-step-note i { color: color-mix(in srgb, var(--accent) 78%, #fff); margin-right: 0.25rem; }
.shop-step-note.strong {
  padding: 0.6rem 0.7rem;
  border-radius: 10px;
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  border: 1px dashed color-mix(in srgb, var(--accent) 40%, transparent);
}
.shop-card-mock {
  height: 108px;
  border-radius: 12px;
  padding: 0.75rem;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 0.4rem;
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 55%, #131a2c), #131a2c 70%);
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.4);
  position: relative;
  overflow: hidden;
}
.shop-card-mock::after {
  content: "";
  position: absolute;
  inset: -40% -10% auto auto;
  width: 120px; height: 120px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
}
.shop-card-chip {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
  width: 30px; height: 22px;
  border-radius: 5px;
  background: linear-gradient(135deg, #ffd17d, #d9a441);
}
.shop-card-num { font-family: ui-monospace, Consolas, monospace; font-size: 0.92rem; letter-spacing: 0.1em; color: rgba(255,255,255,0.85); }
.shop-card-row { display: flex; justify-content: space-between; font-size: 0.62rem; letter-spacing: 0.1em; color: rgba(255,255,255,0.6); }
.shop-card-row i { font-style: normal; }

/* quick view */
.shop-qv {
  position: absolute;
  inset: 0;
  z-index: 16;
  display: grid;
  place-items: center;
  padding: 1rem;
  opacity: 0;
  visibility: hidden;
  transition: opacity 240ms ease, visibility 0s linear 240ms;
}
.shop-qv[data-open="true"] { opacity: 1; visibility: visible; transition: opacity 240ms ease, visibility 0s; }
.shop-qv-back { position: absolute; inset: 0; background: rgba(4, 6, 14, 0.66); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); }
.shop-qv-panel {
  position: relative;
  z-index: 1;
  width: min(560px, 100%);
  max-height: 100%;
  overflow-y: auto;
  display: grid;
  grid-template-columns: 190px 1fr;
  gap: 1rem;
  padding: 1rem;
  border-radius: 16px;
  background: color-mix(in srgb, var(--bg) 82%, #10131f);
  border: 1px solid color-mix(in srgb, var(--accent) 32%, rgba(255, 255, 255, 0.14));
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.6);
  transform: translateY(14px) scale(0.97);
  transition: transform 280ms cubic-bezier(.2,.9,.2,1);
}
.shop-qv[data-open="true"] .shop-qv-panel { transform: none; }
.shop-qv-x {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  z-index: 2;
  width: 28px; height: 28px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(10, 12, 22, 0.7);
  color: var(--muted);
  cursor: pointer;
}
.shop-qv-x:hover { color: var(--text); }
.shop-qv-art {
  border-radius: 12px;
  min-height: 200px;
  align-self: start;
  display: grid;
  place-items: center;
}
.shop-qv-info { display: flex; flex-direction: column; gap: 0.42rem; min-width: 0; }
.shop-qv-eyebrow { font-size: 0.62rem; font-weight: 850; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.shop-qv-info > strong { font-size: 1.15rem; letter-spacing: -0.01em; }
.shop-qv-rating { font-size: 0.74rem; color: var(--muted); display: inline-flex; gap: 0.35rem; align-items: center; }
.shop-qv-rating b { color: #ffc861; letter-spacing: 0.06em; }
.shop-qv-info > p { margin: 0.15rem 0 0.35rem; font-size: 0.82rem; line-height: 1.55; color: var(--muted); }
.shop-qv-block { display: flex; flex-direction: column; gap: 0.35rem; }
.shop-qv-lab {
  font-size: 0.66rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}
.shop-qv-lab b { letter-spacing: 0; text-transform: none; font-size: 0.76rem; color: var(--text); }
.shop-qv-lab em { font-style: normal; letter-spacing: 0; text-transform: none; font-size: 0.7rem; margin-left: auto; }
.shop-qv-lab em.low { color: #ffc861; }
.shop-qv-lab em.out { color: #ff5e76; }
.shop-qv-buy { display: flex; align-items: center; gap: 0.55rem; margin-top: 0.5rem; flex-wrap: wrap; }
.shop-qv-price { font-size: 1.05rem; font-weight: 900; font-variant-numeric: tabular-nums; }

/* shop toasts */
.shop-toasts {
  position: absolute;
  left: 50%;
  bottom: 0.9rem;
  transform: translateX(-50%);
  z-index: 24;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  align-items: center;
  pointer-events: none;
  width: max-content;
  max-width: 92%;
}
.shop-toast {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 20%, #0b0e18);
  border: 1px solid color-mix(in srgb, var(--accent) 50%, transparent);
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 750;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.45);
  animation: shopToastIn 240ms ease;
  white-space: nowrap;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
}
.shop-toast i { width: 0.9rem; text-align: center; flex: none; }
.shop-toast.leaving { animation: shopToastOut 220ms ease forwards; }
@keyframes shopToastIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes shopToastOut { to { opacity: 0; transform: translateY(8px); } }

/* Six products, so the column counts are chosen to always land a full last row
   (3x2 then 2x3 then 1x6) — never an orphan card. */
@container shop (max-width: 720px) {
  .shop-grid { grid-template-columns: repeat(2, 1fr); }
}
@container shop (max-width: 600px) {
  .shop-qv-panel { grid-template-columns: 1fr; }
  .shop-qv-art { min-height: 150px; }
  .shop-body { padding: 0.85rem; max-height: 460px; }
}
@container shop (max-width: 400px) {
  .shop-grid { grid-template-columns: 1fr; }
  .shop-art { aspect-ratio: 2 / 1; }
  .shop-strip { font-size: 0.7rem; gap: 0.4rem 0.9rem; }
}

/* ============================================================================
   LANE POLISH — optical alignment for the page chrome around the demos.

   These refine shared rules from portfolio.css / main_style.css without editing
   them. page.css only loads on this lane, so the scope is this page.

   The recurring problem they solve: Font Awesome glyphs are not a fixed width,
   so an icon+label pair rendered with a plain gap puts every label at a slightly
   different offset. Pinning the icon to a fixed track makes columns of labels
   line up the way a reader expects.
   ========================================================================== */

/* Icon + text pairs are boxed to a shared width in portfolio.css; the local
   copies that used to sit here were lifted there so every lane matches. */

/* Captions can run to two lines; the icon belongs on the first line, not
   floating at the vertical centre of the whole block. */
.pro-page .demo-caption { align-items: flex-start; }
.pro-page .demo-caption i { width: 1rem; text-align: center; flex: none; margin-top: 0.24em; }

/* Pills: main_style.css adds a trailing margin-right on top of the row's gap,
   which both crowds the left side and knocks centred wrapped rows off axis.
   Gap alone handles the spacing, so the margin goes. */
.pro-page .pill {
  gap: 0.45rem;
  margin-right: 0;
  padding: 0.32rem 0.75rem;
  line-height: 1.3;
}
.pro-page .pill i { width: 1em; text-align: center; flex: none; }

/* ============================================================================
   REDUCED MOTION — full functionality, no movement
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .demo-web,
  .uik-canvas,
  .shop-body { scroll-behavior: auto; }

  .demo-web,
  .dw-nav,
  .dw-mobile,
  .dw-acc-a,
  .dw-acc-q i,
  .dw-bill-slide,
  .dw-top,
  .dw-feat,
  .dw-coach,
  .dw-tier,
  .dw-quote blockquote,
  .dw-quote-by,
  .dw-qdot,
  .dw-navlink::after,
  .uik-underline,
  .uik-thumb,
  .uik-seg-slide,
  .uik-dd-menu,
  .uik-acc-a,
  .uik-acc-q i,
  .uik-prog > span,
  .uik-tip,
  .shop-drawer,
  .shop-scrim,
  .shop-qv,
  .shop-qv-panel,
  .shop-fly,
  .shop-svg,
  .shop-card,
  .shop-ship-bar i { transition: none !important; }

  .dw-toast,
  .dw-price.flash,
  .dw-field.invalid.shake input,
  .uik-panel,
  .uik-overlay,
  .uik-modal,
  .uik-backdrop,
  .uik-toast,
  .uik-prog.indeterminate > span,
  .sk-av, .sk-lines i,
  .shop-cart.bump,
  .shop-heart.pop,
  .shop-toast,
  .shop-promo.is-bad.shake .shop-promo-row input { animation: none !important; }
}

/* ==================== Touch target sizing ====================
   The storefront chrome was sized for a mouse: the drawer close was 30x30, the
   promo-clear 18x18 and the checkout back-link 32px tall — all under the ~44px
   a thumb needs, and all of them are controls a phone visitor has to hit to get
   OUT of something. Gated on `pointer: coarse` rather than a width breakpoint,
   so this follows the input device instead of guessing from the viewport, and
   the desktop layout is untouched.

   The promo clear grows its HIT AREA via a pseudo-element rather than its box,
   because it sits inline inside a chip and growing the box would reflow the
   chip around it. */
@media (pointer: coarse) {
  .shop-drawer-x { width: 44px; height: 44px; }
  .shop-back { height: 44px; }
  .shop-promo-btn { min-height: 44px; }
  .shop-promo-row input { min-height: 44px; }

  .shop-promo-chip button { position: relative; }
  .shop-promo-chip button::after {
    content: "";
    position: absolute;
    inset: -13px;              /* 18px box + 26px = 44px effective target */
  }

  /* Quantity steppers are the most-tapped control in the cart. */
  .shop-qty-btn, .shop-line-qty button { min-width: 40px; min-height: 40px; }
}
