/* Vividh Health — base styles v2 (mobile-first)
 *
 * Layered:
 *   1. Reset + base typography
 *   2. Layout primitives (container, stack, cluster, divider)
 *   3. Chrome (app bar, tab bar, footer)
 *   4. Forms
 *   5. Buttons
 *   6. Cards
 *   7. Chips, pills, badges
 *   8. Tracking timeline
 *   9. PDP (product detail)
 *   10. Ops (KPIs, funnel, ops nav)
 *   11. Toasts, banners, status colors
 *   12. Utilities (small, focused)
 */

/* ============================================================
 * 1. Reset + typography
 * ========================================================== */

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img, svg { display: block; max-width: 100%; }

body.vh-body {
  font-family: var(--vh-font);
  background: var(--vh-bg);
  color: var(--vh-text);
  font-size: var(--vh-text-base);
  line-height: var(--vh-leading-base);
  font-feature-settings: "ss01", "cv11", "tnum"; /* Inter contextual + tabular nums */
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-bottom: calc(var(--vh-tabbar-h) + var(--vh-safe-bottom));
}

a {
  color: var(--vh-primary);
  text-decoration: none;
  transition: color var(--vh-dur-fast) var(--vh-ease);
}
a:hover { color: var(--vh-green-700); }

h1, h2, h3 {
  font-family: var(--vh-font);
  font-weight: var(--vh-weight-semibold);
  letter-spacing: var(--vh-tracking-tight);
  line-height: var(--vh-leading-snug);
  color: var(--vh-text);
}

p { margin: 0; }
ul, ol { margin: 0; padding: 0; }

:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px var(--vh-focus);
  border-radius: var(--vh-radius-xs);
}

::selection {
  background: color-mix(in srgb, var(--vh-secondary) 30%, transparent);
  color: var(--vh-text);
}

.vh-tnum, .vh-num {
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
}

/* ============================================================
 * 2. Layout primitives
 * ========================================================== */

.vh-main {
  max-width: var(--vh-container);
  margin: 0 auto;
  padding: var(--vh-space-phi-2) var(--vh-space-4) var(--vh-space-phi-3);
}
@media (min-width: 1024px) {
  .vh-main { padding: var(--vh-space-phi-3) var(--vh-space-phi-2) var(--vh-space-phi-4); }
}

/* Vertical rhythm utilities — pick the one that matches the section weight.
 * Component-level: stack-sm (8px) / stack (12px) / stack-lg (24px)
 * Section-level:   stack-xl (42px, φ-1) / stack-2xl (68px, φ-2)
 * All margin-top on every direct child after the first. */
.vh-stack > * + *      { margin-top: var(--vh-space-3); }
.vh-stack-sm > * + *   { margin-top: var(--vh-space-2); }
.vh-stack-lg > * + *   { margin-top: var(--vh-space-6); }
.vh-stack-xl > * + *   { margin-top: var(--vh-space-phi-3); }
.vh-stack-2xl > * + *  { margin-top: var(--vh-space-phi-4); }
@media (max-width: 760px) {
  /* Compress φ-rhythm on narrow screens so sections still feel breathable
     but don't waste a screen height between each. */
  .vh-stack-xl  > * + * { margin-top: var(--vh-space-8); }
  .vh-stack-2xl > * + * { margin-top: var(--vh-space-10); }
}

.vh-cluster { display: flex; flex-wrap: wrap; gap: var(--vh-space-2); align-items: center; }

.vh-section + .vh-section { margin-top: var(--vh-space-phi-2); }

/* Common inline-style patterns lifted into utilities so pages stay tidy. */
.vh-row-between {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--vh-space-3);
  flex-wrap: wrap;
}
.vh-row-baseline {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: var(--vh-space-3);
}
.vh-page-title {
  margin: 0;
  font-size: var(--vh-text-xl);
  font-weight: var(--vh-weight-bold);
  letter-spacing: var(--vh-tracking-tight);
  line-height: var(--vh-leading-snug);
}
@media (min-width: 760px) {
  .vh-page-title { font-size: var(--vh-text-2xl); }
}

.vh-divider {
  height: 1px; width: 100%;
  background: var(--vh-border);
  margin: var(--vh-space-4) 0;
}

/* ============================================================
 * 3. Chrome — app bar, tab bar, footer
 * ========================================================== */

.vh-appbar {
  position: sticky; top: 0; z-index: 30;
  height: var(--vh-appbar-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 var(--vh-space-4);
  background: var(--vh-glass-bg-strong);
  backdrop-filter: var(--vh-glass-blur);
  -webkit-backdrop-filter: var(--vh-glass-blur);
  border-bottom: 1px solid var(--vh-glass-border);
}

.vh-brand {
  display: inline-flex; align-items: center; gap: var(--vh-space-2);
  font-weight: var(--vh-weight-bold);
  font-size: var(--vh-text-md);
  letter-spacing: var(--vh-tracking-tight);
  color: var(--vh-primary);
}
.vh-brand:hover { color: var(--vh-primary); }

.vh-brand__mark {
  display: inline-block;
  width: 28px; height: 26px;
  background-image: url("/static/img/vividh-logo-mark.png");
  background-repeat: no-repeat;
  background-position: center;
  background-size: contain;
  animation: vh-brand-breathe 5s ease-in-out infinite;
  transform-origin: center;
}
@keyframes vh-brand-breathe {
  0%, 100% { transform: scale(1);    filter: drop-shadow(0 0 0 transparent); }
  50%      { transform: scale(1.04); filter: drop-shadow(0 4px 10px color-mix(in srgb, var(--vh-primary) 30%, transparent)); }
}
@media (prefers-reduced-motion: reduce) {
  .vh-brand__mark { animation: none; }
}

.vh-appbar__nav { display: flex; gap: var(--vh-space-3); align-items: center; }

/* ============================================================
 * .vh-themebtn — single-icon light/dark toggle (sun ↔ moon morph)
 * Lives in topnav (desktop) and appbar (mobile). Persists via the
 * inline FOUC-prevention script in base.html.
 * ========================================================== */
.vh-themebtn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: transparent;
  border: 1px solid var(--vh-border);
  color: var(--vh-text);
  cursor: pointer;
  font-family: inherit;
  transition:
    background var(--vh-dur-fast) var(--vh-ease),
    border-color var(--vh-dur-fast) var(--vh-ease),
    color var(--vh-dur-fast) var(--vh-ease);
}
.vh-themebtn:hover {
  background: var(--vh-bg-muted);
  border-color: var(--vh-border-strong);
  color: var(--vh-primary);
}
.vh-themebtn svg {
  position: absolute;
  stroke: currentColor; fill: none; stroke-width: 1.7;
  transition:
    opacity var(--vh-dur-cinematic) var(--vh-ease-soft),
    transform var(--vh-dur-cinematic) var(--vh-ease-soft);
}
@media (prefers-reduced-motion: reduce) {
  .vh-themebtn svg { transition: none; }
}
.vh-appbar__nav a {
  color: var(--vh-text-muted); font-size: var(--vh-text-sm); font-weight: var(--vh-weight-medium);
}
.vh-appbar__nav a:hover { color: var(--vh-text); }

/* ============================================================
 * .vh-hamburger — mobile menu trigger (in the app bar, so it is
 * inherently mobile-only: .vh-appbar is hidden ≥1024px).
 * .vh-navdrawer — the off-canvas it toggles.
 * ========================================================== */
.vh-hamburger {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--vh-border);
  background: transparent; color: var(--vh-text);
  cursor: pointer;
  transition: background var(--vh-dur-fast) var(--vh-ease),
              border-color var(--vh-dur-fast) var(--vh-ease);
}
.vh-hamburger:hover {
  background: var(--vh-bg-muted);
  border-color: var(--vh-border-strong);
}

.vh-navdrawer__scrim {
  position: fixed; inset: 0; z-index: 95;
  background: color-mix(in srgb, #000 50%, transparent);
}
.vh-navdrawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 96;
  width: min(86vw, 320px);
  display: flex; flex-direction: column;
  background: var(--vh-bg-elevated);
  border-left: 1px solid var(--vh-border);
  box-shadow: var(--vh-shadow-4);
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform 0.28s var(--vh-ease-1, ease);
}
.vh-navdrawer.is-open { transform: translateX(0); }
@media (prefers-reduced-motion: reduce) { .vh-navdrawer { transition: none; } }
/* Desktop has the full .vh-topnav — the drawer is never used there. */
@media (min-width: 1024px) {
  .vh-navdrawer, .vh-navdrawer__scrim { display: none; }
}

.vh-navdrawer__head {
  display: flex; align-items: center; justify-content: space-between;
  padding: var(--vh-space-4);
  border-bottom: 1px solid var(--vh-border);
}
.vh-navdrawer__brand {
  display: flex; align-items: center; gap: 8px;
  font-weight: var(--vh-weight-bold);
}
.vh-navdrawer__close {
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--vh-border); background: var(--vh-bg-muted);
  color: var(--vh-text-muted); cursor: pointer;
}
.vh-navdrawer__nav {
  display: flex; flex-direction: column;
  padding: var(--vh-space-2) var(--vh-space-2) var(--vh-space-4);
}
.vh-navdrawer__label {
  padding: var(--vh-space-3) var(--vh-space-2) 6px;
  font-size: var(--vh-text-2xs); font-weight: var(--vh-weight-bold);
  text-transform: uppercase; letter-spacing: var(--vh-tracking-wide);
  color: var(--vh-text-subtle);
}
.vh-navdrawer__nav a,
.vh-navdrawer__nav button {
  display: flex; align-items: center; gap: var(--vh-space-2);
  padding: var(--vh-space-2);
  border-radius: var(--vh-radius-md, 12px);
  color: var(--vh-text); text-decoration: none;
  font-size: var(--vh-text-sm); font-weight: var(--vh-weight-semibold);
}
.vh-navdrawer__nav button {
  width: 100%;
  background: none; border: 0;
  font-family: inherit; cursor: pointer; text-align: left;
}
.vh-navdrawer__nav a:hover,
.vh-navdrawer__nav button:hover { background: var(--vh-bg-muted); }
.vh-navdrawer__nav a svg,
.vh-navdrawer__nav button svg { color: var(--vh-text-muted); flex-shrink: 0; }
.vh-navdrawer__signout { color: var(--vh-danger); }
.vh-navdrawer__signout svg { color: var(--vh-danger); }

/* ============================================================
 * .vh-locmodal — pincode-entry modal. Global chrome, opened by the
 * `vh-location-open` window event (topnav pill + nav-drawer item).
 * ========================================================== */
.vh-locmodal__scrim {
  position: fixed; inset: 0; z-index: 110;
  display: grid; place-items: center;
  padding: var(--vh-space-4);
  background: color-mix(in srgb, #000 55%, transparent);
  -webkit-backdrop-filter: blur(2px);
  backdrop-filter: blur(2px);
}
.vh-locmodal {
  position: relative;
  width: min(100%, 384px);
  padding: var(--vh-space-5, 24px);
  text-align: center;
  background: var(--vh-bg-elevated);
  border: 1px solid var(--vh-border);
  border-radius: var(--vh-radius-lg, 18px);
  box-shadow: var(--vh-shadow-4);
  animation: vh-locmodal-in 0.22s var(--vh-ease, ease) both;
}
@keyframes vh-locmodal-in {
  from { opacity: 0; transform: scale(0.95) translateY(8px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .vh-locmodal { animation: none; }
}
.vh-locmodal__close {
  position: absolute; top: 10px; right: 10px;
  width: 32px; height: 32px; border-radius: 50%;
  display: grid; place-items: center;
  border: 1px solid var(--vh-border); background: var(--vh-bg-muted);
  color: var(--vh-text-muted); cursor: pointer;
}
.vh-locmodal__close:hover { color: var(--vh-text); }
.vh-locmodal__icon {
  width: 48px; height: 48px;
  margin: 0 auto var(--vh-space-3);
  display: grid; place-items: center; border-radius: 50%;
  background: color-mix(in srgb, var(--vh-primary) 14%, transparent);
  color: var(--vh-primary);
}
.vh-locmodal__icon svg {
  width: 22px; height: 22px;
  stroke: currentColor; fill: none; stroke-width: 1.8;
}
.vh-locmodal__title {
  margin: 0 0 4px;
  font-size: var(--vh-text-lg, 1.0625rem);
  font-weight: var(--vh-weight-bold);
}
.vh-locmodal__sub {
  margin: 0 0 var(--vh-space-4);
  font-size: var(--vh-text-sm);
  color: var(--vh-text-muted);
  line-height: 1.5;
}
.vh-locmodal__form {
  display: flex; flex-direction: column;
  gap: var(--vh-space-3);
}
.vh-locmodal__input {
  width: 100%;
  padding: 12px 14px;
  font-family: inherit;
  font-size: var(--vh-text-lg, 1.0625rem);
  text-align: center;
  letter-spacing: 0.18em;
  color: var(--vh-text);
  background: var(--vh-bg);
  border: 1px solid var(--vh-border);
  border-radius: var(--vh-radius-md, 12px);
}
.vh-locmodal__input::placeholder {
  letter-spacing: 0.08em;
  color: var(--vh-text-subtle);
}
.vh-locmodal__input:focus {
  outline: none;
  border-color: var(--vh-primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--vh-primary) 18%, transparent);
}
.vh-locmodal__submit { width: 100%; justify-content: center; }
.vh-locmodal__submit:disabled { opacity: 0.5; cursor: not-allowed; }

.vh-tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 30;
  height: var(--vh-tabbar-h);
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--vh-glass-bg-strong);
  backdrop-filter: var(--vh-glass-blur);
  -webkit-backdrop-filter: var(--vh-glass-blur);
  border-top: 1px solid var(--vh-glass-border);
  padding-bottom: var(--vh-safe-bottom);
}

.vh-tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px;
  font-size: var(--vh-text-2xs);
  color: var(--vh-text-muted);
  font-weight: var(--vh-weight-medium);
  letter-spacing: var(--vh-tracking-base);
  transition: color var(--vh-dur-fast) var(--vh-ease);
}
.vh-tab svg { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.vh-tab:hover, .vh-tab.is-active { color: var(--vh-primary); }
.vh-tab[aria-disabled="true"] { opacity: 0.4; pointer-events: none; }

.vh-footer {
  text-align: center;
  font-size: var(--vh-text-xs);
  color: var(--vh-text-subtle);
  padding: var(--vh-space-4) var(--vh-space-4) calc(var(--vh-tabbar-h) + var(--vh-space-2));
}
.vh-footer a {
  color: var(--vh-text-subtle);
  margin: 0 var(--vh-space-1);
}
.vh-footer a:hover { color: var(--vh-primary); }
.vh-footer__addr {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 var(--vh-space-2);
  color: var(--vh-text-subtle);
}
.vh-footer__addr svg { stroke: currentColor; fill: none; stroke-width: 1.7; }
.vh-footer__legal {
  margin: var(--vh-space-3) 0 0;
  color: var(--vh-text-subtle);
}

/* Long-form legal pages — typography tuned for sustained reading. Applied
 * to <article class="vh-card vh-legal"> wrappers on /legal/* templates. */
.vh-legal { line-height: 1.6; }
.vh-legal h2 { margin-top: var(--vh-space-8); margin-bottom: var(--vh-space-3); }
.vh-legal h3 {
  margin-top: var(--vh-space-6);
  margin-bottom: var(--vh-space-2);
  font-size: var(--vh-text-md);
  font-weight: var(--vh-weight-semibold);
  color: var(--vh-text);
}
.vh-legal p,
.vh-legal ul,
.vh-legal ol { margin-bottom: var(--vh-space-3); }
.vh-legal ul,
.vh-legal ol { padding-left: var(--vh-space-5); }
.vh-legal li { margin-bottom: var(--vh-space-1); }

/* ============================================================
 * 4. Forms
 * ========================================================== */

.vh-label {
  display: block;
  font-size: var(--vh-text-xs);
  font-weight: var(--vh-weight-semibold);
  letter-spacing: var(--vh-tracking-wide);
  text-transform: uppercase;
  color: var(--vh-text-muted);
  margin-bottom: var(--vh-space-2);
}

.vh-input {
  width: 100%;
  padding: var(--vh-space-3) var(--vh-space-3);
  font-family: inherit;
  font-size: var(--vh-text-md);
  color: var(--vh-text);
  background: var(--vh-bg-elevated);
  border: 1px solid var(--vh-border);
  border-radius: var(--vh-radius-sm);
  outline: none;
  transition:
    border-color var(--vh-dur-fast) var(--vh-ease),
    box-shadow   var(--vh-dur-fast) var(--vh-ease),
    background   var(--vh-dur-fast) var(--vh-ease);
}
.vh-input::placeholder { color: var(--vh-text-subtle); }
.vh-input:hover { border-color: var(--vh-border-strong); }
.vh-input:focus,
.vh-input:focus-visible {
  outline: none;
  border-color: var(--vh-primary);
  box-shadow: 0 0 0 3px var(--vh-focus);
}

input, textarea, select {
  outline: none;
}
input:focus, input:focus-visible,
textarea:focus, textarea:focus-visible,
select:focus, select:focus-visible {
  outline: none;
}

select.vh-input {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path d='M1 1l5 5 5-5' fill='none' stroke='%231b5232' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

textarea.vh-input { min-height: 96px; line-height: var(--vh-leading-base); resize: vertical; }

input[type="file"].vh-input,
.vh-input[type="file"] {
  font-size: var(--vh-text-sm);
  padding: var(--vh-space-2);
}

/* Search field — pill style w/ leading icon */
.vh-search {
  position: relative;
  display: flex; align-items: center;
  background: var(--vh-bg-elevated);
  border: 1px solid var(--vh-border);
  border-radius: var(--vh-radius-pill);
  padding-left: var(--vh-space-4);
  transition: box-shadow var(--vh-dur-base) var(--vh-ease), border-color var(--vh-dur-base) var(--vh-ease);
}
.vh-search:focus-within {
  border-color: var(--vh-primary);
  box-shadow: 0 0 0 3px var(--vh-focus);
}
.vh-search svg { width: 18px; height: 18px; color: var(--vh-text-muted); flex: 0 0 auto; }
.vh-search input {
  border: 0; background: transparent; outline: none;
  flex: 1; padding: var(--vh-space-3); font-size: var(--vh-text-md); color: var(--vh-text);
}
.vh-search input::placeholder { color: var(--vh-text-subtle); }

/* ============================================================
 * 5. Buttons
 * ========================================================== */

.vh-btn {
  --_bg: var(--vh-bg-elevated);
  --_fg: var(--vh-text);
  --_bd: var(--vh-border-strong);

  position: relative;
  isolation: isolate;
  display: inline-flex; align-items: center; justify-content: center;
  gap: var(--vh-space-2);
  width: 100%;
  padding: var(--vh-space-3) var(--vh-space-4);
  font: var(--vh-weight-semibold) var(--vh-text-base) var(--vh-font);
  letter-spacing: var(--vh-tracking-base);
  background: var(--_bg);
  color: var(--_fg);
  border: 1px solid var(--_bd);
  border-radius: 100px;
  cursor: pointer;
  transition:
    transform var(--vh-dur-fast) var(--vh-ease),
    background var(--vh-dur-fast) var(--vh-ease),
    box-shadow var(--vh-dur-fast) var(--vh-ease);
}
.vh-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.vh-btn:active { transform: translateY(1px) scale(0.99); }
.vh-btn:disabled, .vh-btn[disabled] {
  opacity: 0.55; cursor: not-allowed; transform: none;
}

.vh-btn--primary {
  --_bg: linear-gradient(135deg, var(--vh-primary), var(--vh-green-700));
  --_fg: var(--vh-text-on-brand);
  --_bd: transparent;
  box-shadow:
    var(--vh-shadow-inset),
    0 4px 12px color-mix(in srgb, var(--vh-primary) 32%, transparent);
}
.vh-btn--primary:hover {
  box-shadow:
    var(--vh-shadow-inset),
    0 6px 18px color-mix(in srgb, var(--vh-primary) 40%, transparent);
}

.vh-btn--secondary {
  --_bg: linear-gradient(135deg, var(--vh-secondary), var(--vh-gold-700));
  --_fg: var(--vh-neutral-900);
  --_bd: transparent;
  box-shadow:
    var(--vh-shadow-inset),
    0 4px 12px color-mix(in srgb, var(--vh-secondary) 32%, transparent);
}

.vh-btn--ghost {
  --_bg: transparent;
  --_fg: var(--vh-text);
  --_bd: var(--vh-border);
}
.vh-btn--ghost:hover { --_bg: var(--vh-bg-muted); }

.vh-btn--soft {
  --_bg: var(--vh-primary-soft);
  --_fg: var(--vh-primary);
  --_bd: transparent;
}
.vh-btn--soft:hover { --_bg: color-mix(in srgb, var(--vh-primary) 14%, transparent); }

.vh-btn--danger {
  --_bg: var(--vh-danger);
  --_fg: var(--vh-neutral-0);
  --_bd: transparent;
  box-shadow: 0 4px 12px color-mix(in srgb, var(--vh-danger) 30%, transparent);
}

.vh-btn--sm    { padding: var(--vh-space-2) var(--vh-space-3); font-size: var(--vh-text-sm); }
.vh-btn--lg    { padding: var(--vh-space-4) var(--vh-space-5); font-size: var(--vh-text-md); }
.vh-btn--auto  { width: auto; }
.vh-btn--block { width: 100%; }

/* ============================================================
 * Animated glass shimmer on solid CTA borders
 * Applies to primary (green), secondary (gold), danger (red),
 * and any opt-in [data-shimmer] button. A 1.5px conic-gradient ring
 * rotates around the border using @property + mask-composite so only
 * the border edge shows the highlight (not the fill).
 * Honours prefers-reduced-motion.
 * ========================================================== */
@property --vh-shimmer-angle {
  syntax: "<angle>";
  initial-value: 0deg;
  inherits: false;
}

.vh-btn--primary,
.vh-btn--secondary,
.vh-btn--danger,
.vh-btn[data-shimmer] {
  /* Stack-context already set on .vh-btn (position:relative, isolation:isolate).
   * overflow:hidden clips the linear sheen streak below; box-shadow halos
   * (focus ring + accent glow) render outside the box so they're unaffected. */
  overflow: hidden;
}

/* ::before — translating light streak across the surface (universal support) */
.vh-btn--primary::before,
.vh-btn--secondary::before,
.vh-btn--danger::before,
.vh-btn[data-shimmer]::before {
  content: "";
  position: absolute;
  top: -10%; bottom: -10%;
  left: -60%;
  width: 50%;
  background: linear-gradient(
    115deg,
    transparent 0%,
    rgba(255, 255, 255, 0.45) 50%,
    transparent 100%
  );
  pointer-events: none;
  z-index: 0;
  animation: vh-shimmer-streak 3.6s ease-in-out infinite;
  animation-delay: var(--vh-shimmer-delay, 0s);
}

/* ::after — rotating conic ring on the border (modern browsers) */
.vh-btn--primary::after,
.vh-btn--secondary::after,
.vh-btn--danger::after,
.vh-btn[data-shimmer]::after {
  content: "";
  position: absolute;
  inset: 0;
  padding: 1.5px;
  border-radius: inherit;
  pointer-events: none;
  background: conic-gradient(
    from var(--vh-shimmer-angle, 0deg),
    transparent 0deg,
    transparent 60deg,
    rgba(255, 255, 255, 0.65) 90deg,
    rgba(255, 255, 255, 0.20) 110deg,
    transparent 140deg,
    transparent 360deg
  );
  -webkit-mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
          mask:
    linear-gradient(#000 0 0) content-box,
    linear-gradient(#000 0 0);
          mask-composite: exclude;
  animation: vh-shimmer-rotate 4s linear infinite;
  z-index: 0;
}

@keyframes vh-shimmer-streak {
  0%, 38% { transform: translateX(0)    skewX(-12deg); opacity: 0; }
  42%     { opacity: 1; }
  88%     { opacity: 1; }
  92%, 100% { transform: translateX(420%) skewX(-12deg); opacity: 0; }
}

/* Danger button → warmer-tinted shimmer for visual contrast against the
 * red fill. Same effect, different highlight colour. */
.vh-btn--danger::after {
  background: conic-gradient(
    from var(--vh-shimmer-angle, 0deg),
    transparent 0deg,
    transparent 60deg,
    rgba(255, 220, 200, 0.75) 90deg,
    rgba(255, 200, 180, 0.20) 110deg,
    transparent 140deg,
    transparent 360deg
  );
}

@keyframes vh-shimmer-rotate {
  to { --vh-shimmer-angle: 360deg; }
}

@media (prefers-reduced-motion: reduce) {
  .vh-btn--primary::before,  .vh-btn--secondary::before,
  .vh-btn--danger::before,   .vh-btn[data-shimmer]::before,
  .vh-btn--primary::after,   .vh-btn--secondary::after,
  .vh-btn--danger::after,    .vh-btn[data-shimmer]::after {
    animation: none;
    opacity: 0;
  }
}

/* ============================================================
 * 6. Cards
 * ========================================================== */

.vh-card {
  background: var(--vh-bg-elevated);
  border: 1px solid var(--vh-border);
  border-radius: var(--vh-radius-lg);
  box-shadow: var(--vh-shadow-1);
  padding: var(--vh-space-4);
  transition: box-shadow var(--vh-dur-base) var(--vh-ease);
}
.vh-card--hover:hover { box-shadow: var(--vh-shadow-2); }

.vh-card--accent {
  border-top: 3px solid var(--vh-primary);
  border-top-left-radius: var(--vh-radius-lg);
  border-top-right-radius: var(--vh-radius-lg);
}

.vh-card--gold {
  background: linear-gradient(180deg, var(--vh-gold-50) 0%, var(--vh-bg-elevated) 100%);
}

.vh-card__title {
  margin: 0 0 var(--vh-space-3);
  font-size: var(--vh-text-lg);
  letter-spacing: var(--vh-tracking-tight);
  font-weight: var(--vh-weight-semibold);
}
.vh-card__lede {
  margin: 0 0 var(--vh-space-3);
  font-size: var(--vh-text-base);
  color: var(--vh-text-muted);
}

/* Hero banner */
.vh-hero {
  position: relative;
  border-radius: var(--vh-radius-xl);
  padding: var(--vh-space-6);
  background:
    radial-gradient(120% 80% at 0% 0%, color-mix(in srgb, var(--vh-secondary) 28%, transparent) 0%, transparent 50%),
    linear-gradient(135deg, var(--vh-primary) 0%, var(--vh-green-700) 80%);
  color: var(--vh-text-on-brand);
  box-shadow: var(--vh-shadow-3);
  overflow: hidden;
  isolation: isolate;
}
.vh-hero::after {
  content: "";
  position: absolute; right: -40px; top: -40px; width: 220px; height: 220px;
  border-radius: 50%;
  background: radial-gradient(closest-side, color-mix(in srgb, var(--vh-secondary) 70%, transparent), transparent);
  z-index: -1; opacity: 0.45;
}
.vh-hero__eyebrow {
  font-size: var(--vh-text-2xs); text-transform: uppercase; letter-spacing: var(--vh-tracking-wide);
  font-weight: var(--vh-weight-semibold); opacity: 0.85;
}
.vh-hero__title {
  margin: var(--vh-space-1) 0 var(--vh-space-2);
  font-size: var(--vh-text-2xl);
  letter-spacing: var(--vh-tracking-tight);
  line-height: var(--vh-leading-snug);
}
.vh-hero__sub { margin: 0; opacity: 0.88; font-size: var(--vh-text-sm); }
.vh-hero__accent { color: var(--vh-secondary); }

/* Sponsored slot */
.vh-sponsor {
  display: flex; flex-direction: column; gap: var(--vh-space-1);
  padding: var(--vh-space-5);
  border-radius: var(--vh-radius-lg);
  margin-top: var(--vh-space-3);
  box-shadow: var(--vh-shadow-2);
  text-decoration: none;
  position: relative;
  overflow: hidden;
  isolation: isolate;
  transition: transform var(--vh-dur-base) var(--vh-ease), box-shadow var(--vh-dur-base) var(--vh-ease);
}
.vh-sponsor:hover { transform: translateY(-2px); box-shadow: var(--vh-shadow-3); }
.vh-sponsor::after {
  content: ""; position: absolute; right: -30px; bottom: -30px; width: 140px; height: 140px;
  border-radius: 50%; background: rgba(255,255,255,0.15); z-index: -1;
}
.vh-sponsor__brand {
  font-size: var(--vh-text-2xs); opacity: 0.85;
  text-transform: uppercase; letter-spacing: var(--vh-tracking-wide);
  font-weight: var(--vh-weight-semibold);
}
.vh-sponsor__head {
  font-size: var(--vh-text-lg);
  font-weight: var(--vh-weight-semibold);
  line-height: var(--vh-leading-snug);
  letter-spacing: var(--vh-tracking-tight);
}
.vh-sponsor__sub { font-size: var(--vh-text-sm); opacity: 0.88; }

/* Generic banner */
.vh-banner {
  background: linear-gradient(135deg, var(--vh-primary) 0%, var(--vh-green-700) 100%);
  color: var(--vh-text-on-brand);
  border-radius: var(--vh-radius-lg);
  padding: var(--vh-space-5);
  box-shadow: var(--vh-shadow-2);
}

/* ============================================================
 * 7. Chips, pills, badges
 * ========================================================== */

.vh-chip {
  display: inline-flex; align-items: center;
  gap: var(--vh-space-1);
  padding: var(--vh-space-1) var(--vh-space-3);
  border-radius: var(--vh-radius-pill);
  font-size: var(--vh-text-xs);
  font-weight: var(--vh-weight-semibold);
  letter-spacing: var(--vh-tracking-wide);
  border: 1px solid transparent;
  transition: background var(--vh-dur-fast) var(--vh-ease), color var(--vh-dur-fast) var(--vh-ease);
  cursor: pointer;
}

.vh-chip--lab     { background: color-mix(in srgb, var(--vh-product-lab)     14%, transparent); color: var(--vh-product-lab); }
.vh-chip--package { background: color-mix(in srgb, var(--vh-product-package) 14%, transparent); color: var(--vh-product-package); }
.vh-chip--doctor  { background: color-mix(in srgb, var(--vh-product-doctor)  14%, transparent); color: var(--vh-product-doctor); }
.vh-chip--physio  { background: color-mix(in srgb, var(--vh-product-physio) 16%, transparent); color: #b45309; }
.vh-chip--otc     { background: color-mix(in srgb, var(--vh-product-otc)     14%, transparent); color: #047857; }

.vh-chip--ghost {
  background: var(--vh-bg-elevated);
  color: var(--vh-text);
  border-color: var(--vh-border);
}
.vh-chip--ghost:hover { background: var(--vh-bg-muted); }
.vh-chip.is-active {
  box-shadow: 0 0 0 2px var(--vh-primary);
}

.vh-badge {
  display: inline-flex; align-items: center; gap: var(--vh-space-1);
  padding: 2px var(--vh-space-2);
  border-radius: var(--vh-radius-pill);
  font-size: var(--vh-text-2xs);
  font-weight: var(--vh-weight-semibold);
  letter-spacing: var(--vh-tracking-wide);
  text-transform: uppercase;
}
.vh-badge--ok      { background: var(--vh-success-50); color: var(--vh-success); }
.vh-badge--warn    { background: var(--vh-warning-50); color: var(--vh-warning); }
.vh-badge--danger  { background: var(--vh-danger-50);  color: var(--vh-danger); }
.vh-badge--info    { background: var(--vh-info-50);    color: var(--vh-info); }
.vh-badge--neutral { background: var(--vh-bg-muted);   color: var(--vh-text-muted); }

/* Section heading helper */
.vh-h2 {
  margin: 0 0 var(--vh-space-2);
  font-size: var(--vh-text-base);
  font-weight: var(--vh-weight-semibold);
  letter-spacing: var(--vh-tracking-tight);
}
.vh-h2-eyebrow {
  display: block;
  font-size: var(--vh-text-2xs);
  text-transform: uppercase;
  letter-spacing: var(--vh-tracking-wide);
  color: var(--vh-text-subtle);
  font-weight: var(--vh-weight-semibold);
  margin-bottom: 2px;
}

/* ============================================================
 * 8. Tracking timeline
 * ========================================================== */
.vh-timeline { list-style: none; margin: var(--vh-space-3) 0; padding: 0; }
.vh-timeline__item {
  position: relative;
  padding: var(--vh-space-1) 0 var(--vh-space-1) var(--vh-space-6);
  font-size: var(--vh-text-base);
  border-left: 2px solid var(--vh-border);
  margin-left: 6px;
  min-height: 24px;
}
.vh-timeline__item:last-child { border-left-color: transparent; }
.vh-timeline__dot {
  position: absolute; left: -7px; top: 6px;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--vh-border-strong);
  border: 2px solid var(--vh-bg);
  transition: background var(--vh-dur-base) var(--vh-ease), box-shadow var(--vh-dur-base) var(--vh-ease);
}
.vh-timeline__item--done .vh-timeline__dot { background: var(--vh-primary); }
.vh-timeline__item--active .vh-timeline__dot {
  background: var(--vh-secondary);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--vh-secondary) 30%, transparent);
}
.vh-timeline__item--todo { color: var(--vh-text-muted); }
.vh-timeline__item--active .vh-timeline__label { font-weight: var(--vh-weight-semibold); }

/* ============================================================
 * 9. Product detail page
 * ========================================================== */
.vh-pdp__chip { align-self: flex-start; margin-bottom: var(--vh-space-2); }
.vh-pdp__name {
  margin: var(--vh-space-1) 0 var(--vh-space-2);
  font-size: var(--vh-text-2xl);
  letter-spacing: var(--vh-tracking-tight);
  line-height: var(--vh-leading-snug);
}
.vh-pdp__desc {
  margin: 0 0 var(--vh-space-3);
  color: var(--vh-text-muted);
  font-size: var(--vh-text-base);
  line-height: var(--vh-leading-base);
}
.vh-pdp__lede { font-size: var(--vh-text-base); color: var(--vh-text); }
.vh-pdp__h    {
  margin: var(--vh-space-4) 0 var(--vh-space-2);
  font-size: var(--vh-text-base);
  font-weight: var(--vh-weight-semibold);
  letter-spacing: var(--vh-tracking-tight);
}
.vh-pdp__dl {
  display: grid; grid-template-columns: max-content 1fr;
  gap: var(--vh-space-1) var(--vh-space-3);
  margin: var(--vh-space-2) 0;
  font-size: var(--vh-text-base);
}
.vh-pdp__dl dt { color: var(--vh-text-muted); font-weight: var(--vh-weight-medium); }
.vh-pdp__dl dd { margin: 0; }
.vh-pdp__params { margin: var(--vh-space-1) 0 var(--vh-space-3); padding-left: 18px; font-size: var(--vh-text-base); }
.vh-pdp__cta {
  display: flex; align-items: center; gap: var(--vh-space-3);
  margin-top: var(--vh-space-4); padding-top: var(--vh-space-3);
  border-top: 1px solid var(--vh-border);
}

/* ============================================================
 * 10. Ops console
 * ========================================================== */

/* Horizontal scroll wrapper for wide tables on narrow screens —
 * keeps a sane minimum width and lets the row scroll instead of
 * crushing columns or overflowing the page. */
.vh-tablescroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.vh-tablescroll > table { min-width: 460px; }

/* Two-up form field grid — collapses to a single column on narrow screens. */
.vh-formgrid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--vh-space-2);
}
@media (max-width: 620px) {
  .vh-formgrid-2 { grid-template-columns: 1fr; }
}

/* Ops list rows — multi-column on desktop; on narrow screens the trailing
 * cells stack under the leading icon/thumbnail instead of crushing. */
.vh-oplistrow { display: grid; }
.vh-oplistrow--5 { grid-template-columns: 40px 1fr auto auto auto; }
.vh-oplistrow--4 { grid-template-columns: 72px 1fr auto auto; }
@media (max-width: 620px) {
  .vh-oplistrow--5,
  .vh-oplistrow--4 { grid-template-columns: auto 1fr; }
  .vh-oplistrow--5 > :nth-child(n+3),
  .vh-oplistrow--4 > :nth-child(n+3) { grid-column: 2 / -1; }
}

.vh-kpis {
  display: grid; gap: var(--vh-space-2);
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
}
.vh-kpi {
  background: var(--vh-bg-elevated);
  border: 1px solid var(--vh-border);
  border-radius: var(--vh-radius-md);
  padding: var(--vh-space-3) var(--vh-space-4);
  position: relative;
  overflow: hidden;
  transition: transform var(--vh-dur-base) var(--vh-ease), box-shadow var(--vh-dur-base) var(--vh-ease);
}
.vh-kpi:hover { transform: translateY(-1px); box-shadow: var(--vh-shadow-2); }
.vh-kpi::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: linear-gradient(90deg, var(--vh-primary), var(--vh-secondary));
  opacity: 0; transition: opacity var(--vh-dur-base) var(--vh-ease);
}
.vh-kpi:hover::after { opacity: 1; }
.vh-kpi__label {
  font-size: var(--vh-text-2xs);
  color: var(--vh-text-muted);
  text-transform: uppercase;
  letter-spacing: var(--vh-tracking-wide);
  font-weight: var(--vh-weight-semibold);
}
.vh-kpi__value {
  font-size: var(--vh-text-xl);
  font-weight: var(--vh-weight-bold);
  color: var(--vh-text);
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--vh-tracking-tight);
  margin-top: 2px;
}
.vh-kpi__sub { font-size: var(--vh-text-2xs); color: var(--vh-text-subtle); margin-top: 2px; }

.vh-funnel { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--vh-space-1); }
.vh-funnel li {
  display: grid; grid-template-columns: 1fr auto;
  align-items: center; gap: var(--vh-space-2);
  position: relative;
  padding: var(--vh-space-2) var(--vh-space-3);
  background: var(--vh-bg-muted);
  border-radius: var(--vh-radius-sm);
  overflow: hidden;
  font-size: var(--vh-text-sm);
}
.vh-funnel__bar {
  position: absolute; inset: 0 auto 0 0;
  width: var(--w, 0%);
  background: linear-gradient(90deg,
    color-mix(in srgb, var(--vh-primary) 22%, transparent),
    color-mix(in srgb, var(--vh-primary) 10%, transparent));
  z-index: 0;
  transition: width var(--vh-dur-slow) var(--vh-ease);
}
.vh-funnel__label,
.vh-funnel__count { position: relative; z-index: 1; }
.vh-funnel__count {
  font-weight: var(--vh-weight-bold);
  font-variant-numeric: tabular-nums;
}

/* ============================================================
 * 11. Misc — banners, status colors, helpers
 * ========================================================== */
.vh-alert {
  padding: var(--vh-space-3) var(--vh-space-4);
  border-radius: var(--vh-radius-md);
  font-size: var(--vh-text-sm);
  border: 1px solid transparent;
}
.vh-alert--ok      { background: var(--vh-success-50); color: var(--vh-success); border-color: color-mix(in srgb, var(--vh-success) 25%, transparent); }
.vh-alert--warn    { background: var(--vh-warning-50); color: var(--vh-warning); border-color: color-mix(in srgb, var(--vh-warning) 25%, transparent); }
.vh-alert--danger  { background: var(--vh-danger-50);  color: var(--vh-danger);  border-color: color-mix(in srgb, var(--vh-danger) 25%, transparent); }
.vh-alert--info    { background: var(--vh-info-50);    color: var(--vh-info);    border-color: color-mix(in srgb, var(--vh-info) 25%, transparent); }

.vh-skel {
  background: linear-gradient(90deg, var(--vh-bg-muted) 0%, var(--vh-border) 50%, var(--vh-bg-muted) 100%);
  background-size: 200% 100%;
  animation: vh-shimmer 1.4s infinite;
  border-radius: var(--vh-radius-sm);
}
@keyframes vh-shimmer {
  0%   { background-position: 100% 0%; }
  100% { background-position: -100% 0%; }
}

#vh-toasts {
  position: fixed; left: 0; right: 0;
  bottom: calc(var(--vh-tabbar-h) + var(--vh-safe-bottom) + var(--vh-space-3));
  display: flex; flex-direction: column; gap: var(--vh-space-2);
  pointer-events: none; z-index: 50;
  padding: 0 var(--vh-space-4);
}
.vh-toast {
  pointer-events: auto;
  background: var(--vh-neutral-900);
  color: var(--vh-neutral-0);
  padding: var(--vh-space-3) var(--vh-space-4);
  border-radius: var(--vh-radius-md);
  font-size: var(--vh-text-sm);
  box-shadow: var(--vh-shadow-3);
  animation: vh-toast-in var(--vh-dur-slow) var(--vh-ease-spring);
}
@keyframes vh-toast-in {
  from { transform: translateY(20px); opacity: 0; }
  to   { transform: translateY(0); opacity: 1; }
}

.vh-lift { transition: transform var(--vh-dur-base) var(--vh-ease), box-shadow var(--vh-dur-base) var(--vh-ease); }
.vh-lift:hover { transform: translateY(-2px); box-shadow: var(--vh-shadow-2); }

.vh-vh {
  position: absolute !important; clip: rect(0 0 0 0);
  height: 1px; width: 1px; overflow: hidden;
  white-space: nowrap;
}

/* ============================================================
 * Body silhouette (used by floating widget)
 * ========================================================== */

.vh-body__svgel { width: 100%; height: auto; max-height: 380px; }
.vh-body__silhouette {
  fill: var(--vh-primary-soft);
  stroke: var(--vh-primary);
  stroke-width: 1.5;
  stroke-linejoin: round;
}
.vh-body__face {
  fill: var(--vh-primary);
  stroke: var(--vh-primary);
  opacity: 0.55;
}
.vh-body__spine {
  stroke: var(--vh-primary);
  fill: none;
}
.vh-body__region {
  fill: transparent;
  stroke: transparent;
  stroke-width: 1.2;
  cursor: pointer;
  transition: fill var(--vh-dur-fast) var(--vh-ease), stroke var(--vh-dur-fast) var(--vh-ease);
}
.vh-body__region:hover, .vh-body__region:focus {
  fill: rgba(196, 156, 58, 0.40);
  stroke: var(--vh-secondary);
  outline: none;
}
.vh-body__region.is-selected {
  fill: rgba(196, 156, 58, 0.62);
  stroke: var(--vh-secondary);
}
.vh-body__hide { display: none; }
.vh-body__viewbtn {
  background: transparent; border: 0;
  padding: 4px 12px;
  font-size: var(--vh-text-xs);
  color: var(--vh-text-muted);
  font-weight: var(--vh-weight-semibold);
  border-radius: var(--vh-radius-pill);
  cursor: pointer; font-family: inherit;
  transition: background var(--vh-dur-fast) var(--vh-ease), color var(--vh-dur-fast) var(--vh-ease);
}
.vh-body__viewbtn.is-active {
  background: var(--vh-primary);
  color: var(--vh-text-on-brand);
  box-shadow: var(--vh-shadow-1);
}

/* ============================================================
 * Floating body-part widget (FAB + sheet)
 * ========================================================== */

.vh-bodywidget { position: relative; z-index: 60; }

/* FAB sizing — uniform across .vh-aifab + .vh-bodyfab so the stack reads
 * as one family. Distinct gradient + glow gives each its own identity. */
.vh-bodyfab {
  position: relative;
  width: 56px; height: 56px;
  border-radius: 50%;
  /* Warm gradient: coral → gold. Pairs against AI's cool aurora gradient. */
  background: linear-gradient(135deg, var(--vh-tertiary-coral) 0%, var(--vh-secondary) 100%);
  color: #fff;
  border: 0;
  box-shadow: var(--vh-glow-coral);
  cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  z-index: 60;
  overflow: hidden;
  isolation: isolate;
  transition: transform var(--vh-dur-cinematic) var(--vh-ease-soft),
              box-shadow var(--vh-dur-cinematic) var(--vh-ease-soft);
}
.vh-bodyfab:hover { transform: translateY(-2px) scale(1.04); box-shadow: var(--vh-glow-coral), 0 0 0 4px var(--vh-focus); }
.vh-bodyfab.is-active { box-shadow: var(--vh-glow-gold), 0 0 0 4px var(--vh-focus); }
.vh-bodyfab svg { width: 24px; height: 24px; }

.vh-bodysheet {
  /* Hidden by default — CSS-controlled, no Alpine dependency. The
   * .is-open modifier (added by Alpine when `open` is true) flips it on. */
  display: none;
  position: fixed;
  right: var(--vh-space-4);
  bottom: calc(var(--vh-tabbar-h) + var(--vh-safe-bottom) + var(--vh-space-3) + 64px);
  left: var(--vh-space-4);
  background: var(--vh-glass-bg-strong);
  border: 1px solid var(--vh-glass-border);
  backdrop-filter: var(--vh-glass-blur-lg);
  -webkit-backdrop-filter: var(--vh-glass-blur-lg);
  border-radius: var(--vh-radius-3xl);
  box-shadow: var(--vh-glow-neutral);
  padding: var(--vh-space-phi-2);
  z-index: 60;
  max-height: calc(100vh - var(--vh-tabbar-h) - 140px);
  overflow-y: auto;
}
.vh-bodysheet.is-open {
  display: block;
  animation: vh-sheet-fade-in var(--vh-dur-cinematic) var(--vh-ease-soft);
}
.vh-bodysheet__head {
  display: flex; align-items: stretch; justify-content: space-between;
  gap: var(--vh-space-2);
  margin-bottom: var(--vh-space-2);
}
.vh-bodysheet__toggle {
  flex: 1; min-width: 0;
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--vh-space-2);
  background: transparent;
  border: 0;
  padding: 4px 0;
  cursor: pointer;
  font-family: inherit;
  text-align: left;
  color: var(--vh-text);
}
.vh-bodysheet__title {
  display: block;
  font-size: var(--vh-text-lg);
  font-weight: var(--vh-weight-semibold);
  letter-spacing: var(--vh-tracking-tight);
  line-height: var(--vh-leading-snug);
}
.vh-bodysheet__caret {
  display: inline-block;
  font-size: var(--vh-text-md);
  color: var(--vh-primary);
  transition: transform var(--vh-dur-base) var(--vh-ease);
  flex: 0 0 auto;
}
.vh-bodysheet__caret.is-open { transform: rotate(180deg); }
.vh-bodysheet__hint {
  margin: var(--vh-space-2) 0 0;
  font-size: var(--vh-text-xs);
  color: var(--vh-text-subtle);
}
.vh-bodysheet__close {
  background: transparent; border: 0;
  width: 32px; height: 32px; border-radius: 50%;
  cursor: pointer;
  color: var(--vh-text-muted);
  display: inline-flex; align-items: center; justify-content: center;
}
.vh-bodysheet__close:hover { background: var(--vh-bg-muted); color: var(--vh-text); }
.vh-bodysheet__close svg { width: 18px; height: 18px; }
.vh-bodysheet__viewtoggle {
  display: inline-flex;
  background: var(--vh-bg-muted);
  border-radius: var(--vh-radius-pill);
  padding: 2px;
  margin-bottom: var(--vh-space-2);
}
.vh-bodysheet__svg {
  display: flex; justify-content: center;
  padding: var(--vh-space-2) 0;
}
.vh-bodysheet__svg .vh-body__svgel { max-height: 360px; width: auto; }
.vh-bodysheet__foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--vh-space-2);
  border-top: 1px solid var(--vh-border);
  padding-top: var(--vh-space-2);
  margin-top: var(--vh-space-2);
}

@media (min-width: 1024px) {
  .vh-bodysheet {
    left: auto;
    bottom: calc(var(--vh-space-4) + 72px);
    width: 380px;
    max-height: calc(100vh - 160px);
  }
}

/* Tiny utilities (intentionally focused) */
.vh-mt-1 { margin-top: var(--vh-space-1) !important; }
.vh-mt-2 { margin-top: var(--vh-space-2) !important; }
.vh-mt-3 { margin-top: var(--vh-space-3) !important; }
.vh-mt-4 { margin-top: var(--vh-space-4) !important; }
.vh-mt-6 { margin-top: var(--vh-space-6) !important; }
.vh-mb-2 { margin-bottom: var(--vh-space-2) !important; }
.vh-mb-3 { margin-bottom: var(--vh-space-3) !important; }
.vh-text-muted   { color: var(--vh-text-muted) !important; }
.vh-text-subtle  { color: var(--vh-text-subtle) !important; }
.vh-text-xs      { font-size: var(--vh-text-xs) !important; }
.vh-text-sm      { font-size: var(--vh-text-sm) !important; }
.vh-text-lg      { font-size: var(--vh-text-lg) !important; }
.vh-fw-semibold  { font-weight: var(--vh-weight-semibold) !important; }
.vh-fw-bold      { font-weight: var(--vh-weight-bold) !important; }
.vh-text-center  { text-align: center !important; }

/* Trust-signal row (encrypted/ABDM/etc.) */
.vh-trust {
  display: flex; flex-wrap: wrap; gap: var(--vh-space-3);
  font-size: var(--vh-text-2xs);
  color: var(--vh-text-subtle);
  text-transform: uppercase;
  letter-spacing: var(--vh-tracking-wide);
  font-weight: var(--vh-weight-semibold);
}
.vh-trust__item { display: inline-flex; align-items: center; gap: var(--vh-space-1); }
.vh-trust__item svg { width: 14px; height: 14px; stroke: currentColor; fill: none; stroke-width: 1.6; }

/* ============================================================
 * .vh-mono — Geist Mono numerals (prices, lab values, codes)
 * ========================================================== */
.vh-mono {
  font-family: var(--vh-font-mono);
  font-feature-settings: "ss01", "ss02", "tnum";
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.01em;
}

/* ============================================================
 * .vh-toggle-group — segmented radio (theme switch, view tabs, etc.)
 * Reusable primitive: any 2-5 button group fits.
 * ========================================================== */
.vh-toggle-group {
  display: inline-flex;
  background: var(--vh-bg-muted);
  border: 1px solid var(--vh-border);
  border-radius: var(--vh-radius-pill);
  padding: 3px;
  gap: 2px;
}
.vh-toggle-group > button {
  display: inline-flex; align-items: center; gap: 6px;
  background: transparent;
  border: 0;
  cursor: pointer;
  font-family: inherit;
  font-size: var(--vh-text-2xs);
  font-weight: var(--vh-weight-semibold);
  color: var(--vh-text-muted);
  padding: 6px 10px;
  border-radius: var(--vh-radius-pill);
  transition:
    background var(--vh-dur-fast) var(--vh-ease),
    color      var(--vh-dur-fast) var(--vh-ease),
    box-shadow var(--vh-dur-fast) var(--vh-ease);
}
.vh-toggle-group > button:hover { color: var(--vh-text); }
.vh-toggle-group > button svg {
  width: 14px; height: 14px;
  stroke: currentColor; fill: none; stroke-width: 1.7;
}
.vh-toggle-group > button.is-active {
  background: var(--vh-bg-elevated);
  color: var(--vh-text);
  box-shadow: var(--vh-shadow-1);
}

/* Account menu — appearance row */
.vh-avatar__menu__theme {
  padding: var(--vh-space-3) var(--vh-space-4);
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--vh-space-3);
  border-bottom: 1px solid var(--vh-border);
}
.vh-avatar__menu__themelbl {
  font-size: var(--vh-text-2xs);
  font-weight: var(--vh-weight-semibold);
  text-transform: uppercase;
  letter-spacing: var(--vh-tracking-wide);
  color: var(--vh-text-subtle);
}

/* ============================================================
 * Generic page header — used by Profile / Family / Addresses /
 * Reports / Order history / Wallet. Eyebrow → title → sub.
 * ========================================================== */
.vh-pageheader {
  display: flex; flex-direction: column; gap: 4px;
}
.vh-pageheader p { margin: 0; }

/* 2-column field grid for forms */
.vh-row-grid-2 {
  display: grid; grid-template-columns: 1fr; gap: var(--vh-space-2);
}
@media (min-width: 540px) { .vh-row-grid-2 { grid-template-columns: 1fr 1fr; } }

/* ============================================================
 * Quick links rail — sidebar on profile / similar pages
 * ========================================================== */
.vh-quicklinks { list-style: none; padding: 0; margin: var(--vh-space-2) 0 0; display: grid; gap: 4px; }
.vh-quicklinks a {
  display: grid; grid-template-columns: 22px 1fr 14px; gap: var(--vh-space-2);
  align-items: center;
  padding: 10px 12px;
  border-radius: var(--vh-radius-md);
  font-size: var(--vh-text-sm);
  color: var(--vh-text); text-decoration: none;
  transition: background var(--vh-dur-fast) var(--vh-ease);
}
.vh-quicklinks a:hover { background: var(--vh-bg-muted); }
.vh-quicklinks a > .vh-icon:first-child { color: var(--vh-text-muted); }
.vh-quicklinks a:hover > .vh-icon:first-child { color: var(--vh-primary); }
.vh-quicklinks a > .vh-icon:last-child { color: var(--vh-text-subtle); justify-self: end; }

/* ============================================================
 * Family member cards
 * ========================================================== */
.vh-memberlist { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--vh-space-2); }
@media (min-width: 760px) { .vh-memberlist { grid-template-columns: 1fr 1fr; } }
.vh-membercard {
  display: grid; grid-template-columns: 56px 1fr;
  gap: var(--vh-space-3); align-items: center;
  padding: var(--vh-space-3) var(--vh-space-4);
}
.vh-membercard__avatar {
  width: 48px; height: 48px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--vh-primary) 14%, var(--vh-bg-elevated));
  color: var(--vh-primary);
  font-weight: var(--vh-weight-bold);
  font-size: var(--vh-text-lg);
}
.vh-membercard__avatar[data-rel="spouse"]  { background: color-mix(in srgb, var(--vh-tertiary-coral) 16%, var(--vh-bg-elevated)); color: var(--vh-tertiary-coral); }
.vh-membercard__avatar[data-rel="parent"]  { background: color-mix(in srgb, var(--vh-secondary) 18%, var(--vh-bg-elevated)); color: var(--vh-gold-700, #876a27); }
.vh-membercard__avatar[data-rel="child"]   { background: color-mix(in srgb, var(--vh-tertiary-teal) 16%, var(--vh-bg-elevated)); color: var(--vh-tertiary-teal); }
.vh-membercard__avatar[data-rel="sibling"] { background: color-mix(in srgb, var(--vh-product-doctor) 16%, var(--vh-bg-elevated)); color: var(--vh-product-doctor); }
.vh-membercard__name { margin: 0; font-size: var(--vh-text-md); font-weight: var(--vh-weight-bold); letter-spacing: var(--vh-tracking-tight); }
.vh-membercard__meta {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-top: 4px;
  font-size: var(--vh-text-xs);
  color: var(--vh-text-muted);
}
.vh-membercard__meta span { display: inline-flex; align-items: center; gap: 4px; }

/* ============================================================
 * Address cards
 * ========================================================== */
.vh-addrlist { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--vh-space-2); }
@media (min-width: 760px) { .vh-addrlist { grid-template-columns: 1fr 1fr; } }
.vh-addrcard {
  display: grid; grid-template-columns: 48px 1fr;
  gap: var(--vh-space-3);
  padding: var(--vh-space-3) var(--vh-space-4);
}
.vh-addrcard.is-default { border-color: color-mix(in srgb, var(--vh-primary) 38%, var(--vh-border)); }
.vh-addrcard__badge {
  width: 40px; height: 40px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--vh-primary-soft);
  color: var(--vh-primary);
}
.vh-addrcard__label { margin: 0; font-size: var(--vh-text-md); font-weight: var(--vh-weight-bold); display: flex; align-items: center; gap: 8px; }
.vh-addrcard__chip {
  padding: 2px 8px;
  background: var(--vh-primary-soft);
  color: var(--vh-primary);
  border-radius: var(--vh-radius-pill);
  font-size: 10px;
  font-weight: var(--vh-weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--vh-tracking-wide);
}
.vh-addrcard__line { margin: 4px 0 0; font-size: var(--vh-text-sm); color: var(--vh-text); }
.vh-addrcard__city { margin: 2px 0 0; font-size: var(--vh-text-xs); color: var(--vh-text-muted); }

/* ============================================================
 * Report cards (reports list)
 * ========================================================== */
.vh-rcards { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--vh-space-2); }
@media (min-width: 760px) { .vh-rcards { grid-template-columns: 1fr 1fr; } }
.vh-rcard {
  display: grid; grid-template-columns: 44px 1fr 16px;
  gap: var(--vh-space-3); align-items: center;
  padding: var(--vh-space-3) var(--vh-space-4);
  text-decoration: none;
  color: var(--vh-text);
}
.vh-rcard__icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--vh-primary-soft);
  color: var(--vh-primary);
}
.vh-rcard__name { margin: 0; font-size: var(--vh-text-base); font-weight: var(--vh-weight-bold); letter-spacing: var(--vh-tracking-tight); }
.vh-rcard__meta {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-top: 4px;
  font-size: var(--vh-text-xs);
  color: var(--vh-text-muted);
}
.vh-rcard__meta span { display: inline-flex; align-items: center; gap: 4px; }
.vh-rcard__chevron { color: var(--vh-text-subtle); transition: transform var(--vh-dur-fast) var(--vh-ease); }
.vh-rcard:hover .vh-rcard__chevron { transform: translateX(2px); color: var(--vh-primary); }

/* Reminders list */
.vh-reminders { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--vh-space-2); }
.vh-reminder {
  display: grid; grid-template-columns: 32px 1fr auto;
  gap: var(--vh-space-3); align-items: center;
  padding: var(--vh-space-3) var(--vh-space-3);
  background: color-mix(in srgb, var(--vh-secondary) 8%, var(--vh-bg-muted));
  border-radius: var(--vh-radius-md);
}
.vh-reminder__icon {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--vh-secondary) 18%, var(--vh-bg-elevated));
  color: var(--vh-gold-700, #876a27);
}
.vh-reminder strong { font-size: var(--vh-text-sm); font-weight: var(--vh-weight-bold); }
.vh-reminder__when {
  font-size: var(--vh-text-xs);
  font-weight: var(--vh-weight-bold);
  color: var(--vh-gold-700, #876a27);
  text-transform: uppercase;
  letter-spacing: var(--vh-tracking-wide);
}

/* ============================================================
 * Order cards (order history)
 * ========================================================== */
.vh-orderlist { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--vh-space-2); }
.vh-ordercard {
  display: grid;
  grid-template-columns: 44px 1fr auto 16px;
  gap: var(--vh-space-3); align-items: center;
  padding: var(--vh-space-3) var(--vh-space-4);
  text-decoration: none;
  color: var(--vh-text);
}
.vh-ordercard__icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--vh-primary-soft);
  color: var(--vh-primary);
}
.vh-ordercard__id { margin: 0; font-size: var(--vh-text-md); font-weight: var(--vh-weight-bold); letter-spacing: 0.04em; }
.vh-ordercard__meta {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-top: 4px;
  font-size: var(--vh-text-xs);
  color: var(--vh-text-muted);
}
.vh-ordercard__meta span { display: inline-flex; align-items: center; gap: 4px; }
.vh-ordercard__amount {
  display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
}
.vh-ordercard__amount strong {
  font-size: var(--vh-text-lg);
  font-weight: var(--vh-weight-bold);
  color: var(--vh-primary);
  letter-spacing: -0.01em;
}
.vh-ordercard__chevron { color: var(--vh-text-subtle); transition: transform var(--vh-dur-fast) var(--vh-ease); }
.vh-ordercard:hover .vh-ordercard__chevron { transform: translateX(2px); color: var(--vh-primary); }

/* ============================================================
 * Wallet — full-width credit-card hero variant + transactions
 * ========================================================== */
.vh-walletcard--full {
  margin: 0;
  /* Wallet-page hero: free-flowing height (no 16:9 lock), bigger padding */
  aspect-ratio: auto;
  min-height: 220px;
  padding: var(--vh-space-phi-2) var(--vh-space-phi-3);
}
.vh-walletcard--full .vh-walletcard__balance {
  font-size: var(--vh-text-3xl);
  margin-top: var(--vh-space-2);
}
.vh-walletcard--full .vh-walletcard__chip { width: 36px; height: 28px; }

.vh-tx { list-style: none; padding: 0; margin: 0; }
.vh-tx li + li .vh-txrow { border-top: 1px solid var(--vh-border); }
.vh-txrow {
  display: grid; grid-template-columns: 36px 1fr auto;
  gap: var(--vh-space-3); align-items: center;
  padding: var(--vh-space-3) var(--vh-space-phi-2);
}
.vh-txrow__icon {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
}
.vh-txrow__icon--CREDIT { background: var(--vh-success-50); color: var(--vh-success); }
.vh-txrow__icon--DEBIT  { background: var(--vh-danger-50);  color: var(--vh-danger); }
.vh-txrow__title { font-size: var(--vh-text-sm); font-weight: var(--vh-weight-semibold); }
.vh-txrow__sub {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: var(--vh-text-2xs);
  color: var(--vh-text-subtle);
  margin-top: 4px;
}
.vh-txrow__amt { text-align: right; }
.vh-txrow__amt strong { display: block; font-size: var(--vh-text-md); }
.vh-txrow__amt--CREDIT strong { color: var(--vh-success); }
.vh-txrow__amt--DEBIT  strong { color: var(--vh-danger); }
.vh-txrow__bal { font-size: var(--vh-text-2xs); color: var(--vh-text-subtle); margin-top: 2px; }

/* Wallet info bullets */
.vh-walletinfo { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--vh-space-2); }
.vh-walletinfo li {
  display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start;
  font-size: var(--vh-text-sm); color: var(--vh-text-muted); line-height: var(--vh-leading-relaxed);
}
.vh-walletinfo li strong { color: var(--vh-text); font-weight: var(--vh-weight-semibold); }
.vh-walletinfo__icon {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  background: var(--vh-primary-soft);
  color: var(--vh-primary);
  flex: 0 0 auto;
}

/* ============================================================
 * Cart cards (orders/cart) — used by .vh-cartlist + .vh-cartcard
 * ========================================================== */
.vh-cartlist { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--vh-space-2); }
.vh-cartcard {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: var(--vh-space-3); align-items: start;
  padding: var(--vh-space-3) var(--vh-space-4);
}
.vh-cartcard__icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--vh-primary-soft);
  color: var(--vh-primary);
}
.vh-cartcard__name { margin: 0; font-size: var(--vh-text-base); font-weight: var(--vh-weight-bold); letter-spacing: var(--vh-tracking-tight); }
.vh-cartcard__meta {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-top: 4px; font-size: var(--vh-text-xs); color: var(--vh-text-muted);
}
.vh-cartcard__meta span { display: inline-flex; align-items: center; gap: 4px; }
.vh-cartcard__forwhom {
  display: flex; align-items: center; gap: 8px;
  margin-top: var(--vh-space-2);
  padding: 4px 10px;
  background: var(--vh-bg-muted);
  border-radius: var(--vh-radius-pill);
  width: fit-content;
}
.vh-cartcard__forwhom__label {
  font-size: var(--vh-text-2xs); color: var(--vh-text-subtle);
  text-transform: uppercase; letter-spacing: var(--vh-tracking-wide);
  font-weight: var(--vh-weight-semibold);
  display: inline-flex; align-items: center; gap: 4px;
}
.vh-cartcard__forwhom__select {
  width: auto;
  padding: 2px 22px 2px 6px;
  font-size: var(--vh-text-xs);
  background: transparent;
  border: 0;
  box-shadow: none !important;
  border-radius: 0;
}
.vh-cartcard__right {
  display: flex; flex-direction: column; align-items: flex-end; gap: 2px;
  text-align: right;
}
.vh-cartcard__price { font-size: var(--vh-text-lg); font-weight: var(--vh-weight-bold); color: var(--vh-primary); letter-spacing: -0.01em; }
.vh-cartcard__qty { font-size: var(--vh-text-2xs); color: var(--vh-text-subtle); }
.vh-cartcard__remove { margin-top: var(--vh-space-2); }

.vh-cart__summary { display: flex; flex-direction: column; gap: 6px; }
.vh-cart__summary-card { display: flex; flex-direction: column; gap: 6px; }
.vh-cart__row { display: flex; justify-content: space-between; align-items: baseline; font-size: var(--vh-text-sm); }
.vh-cart__row--total {
  margin-top: 6px;
  padding-top: var(--vh-space-2);
  border-top: 1px dashed var(--vh-border-strong);
  font-size: var(--vh-text-md); font-weight: var(--vh-weight-bold);
}
.vh-cart__row--total strong { color: var(--vh-primary); font-size: var(--vh-text-lg); }
.vh-cart__savings { margin-top: 4px; }
.vh-cart__trust {
  list-style: none; padding: 0; margin: var(--vh-space-3) 0 0;
  display: grid; gap: 6px;
  font-size: var(--vh-text-xs); color: var(--vh-text-muted);
}
.vh-cart__trust li { display: flex; align-items: center; gap: 8px; }
.vh-cart__trust svg { color: var(--vh-success); flex: 0 0 auto; }

/* ============================================================
 * Referral page — hero + code card + 3-step list
 * ========================================================== */
.vh-refhero {
  position: relative;
  padding: var(--vh-space-phi-3) var(--vh-space-phi-2);
  border-radius: var(--vh-radius-3xl);
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  background:
    radial-gradient(120% 100% at 100% 0%, color-mix(in srgb, var(--vh-secondary) 40%, transparent) 0%, transparent 60%),
    radial-gradient(110% 100% at 0% 100%, color-mix(in srgb, var(--vh-tertiary-coral) 26%, transparent) 0%, transparent 60%),
    linear-gradient(135deg, var(--vh-primary), var(--vh-green-700));
  border: 1px solid color-mix(in srgb, #fff 18%, transparent);
  box-shadow: var(--vh-shadow-3);
}
.vh-refhero__top {
  display: flex; align-items: center; gap: 8px; margin-bottom: var(--vh-space-3);
}
.vh-refhero__eyebrow {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 4px 12px;
  background: rgba(0,0,0,0.18);
  border-radius: var(--vh-radius-pill);
  font-size: var(--vh-text-2xs);
  font-weight: var(--vh-weight-bold);
  text-transform: uppercase;
  letter-spacing: var(--vh-tracking-wide);
  color: var(--vh-secondary);
}
.vh-refhero__amounts {
  display: flex; align-items: center; gap: var(--vh-space-3);
  flex-wrap: wrap;
}
.vh-refhero__amount {
  display: flex; flex-direction: column; gap: 4px;
}
.vh-refhero__amount__label {
  font-size: var(--vh-text-2xs);
  color: rgba(255,255,255,0.8);
  text-transform: uppercase;
  letter-spacing: var(--vh-tracking-wide);
  font-weight: var(--vh-weight-bold);
}
.vh-refhero__amount strong {
  font-size: var(--vh-text-3xl);
  font-weight: var(--vh-weight-bold);
  letter-spacing: -0.02em;
  line-height: 1;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0,0,0,0.22);
}
.vh-refhero__plus {
  font-size: var(--vh-text-2xl);
  font-weight: var(--vh-weight-bold);
  color: var(--vh-secondary);
  margin: 0 var(--vh-space-2);
}
.vh-refhero__sub {
  margin: var(--vh-space-3) 0 0;
  font-size: var(--vh-text-sm);
  color: rgba(255,255,255,0.85);
  max-width: 56ch;
  line-height: var(--vh-leading-relaxed);
}

.vh-codecard {
  text-align: center;
  display: flex; flex-direction: column; gap: var(--vh-space-2);
  padding: var(--vh-space-phi-2);
  background: var(--vh-bg-muted);
  border: 1px dashed var(--vh-border-strong);
  border-radius: var(--vh-radius-2xl);
}
.vh-codecard__label {
  font-size: var(--vh-text-2xs);
  color: var(--vh-text-subtle);
  text-transform: uppercase;
  letter-spacing: var(--vh-tracking-wide);
  font-weight: var(--vh-weight-semibold);
}
.vh-codecard__code {
  font-size: var(--vh-text-3xl);
  font-weight: var(--vh-weight-bold);
  letter-spacing: 0.18em;
  color: var(--vh-primary);
  line-height: 1;
}
.vh-codecard__url-row {
  padding: 8px 12px;
  background: var(--vh-bg-elevated);
  border: 1px solid var(--vh-border);
  border-radius: var(--vh-radius-md);
  word-break: break-all;
}
.vh-codecard__url {
  font-size: var(--vh-text-2xs);
  color: var(--vh-text-muted);
}
.vh-codecard__actions {
  display: flex; flex-wrap: wrap; gap: var(--vh-space-2);
  justify-content: center;
}

/* Redemption list */
.vh-redlist { list-style: none; padding: 0; margin: var(--vh-space-2) 0 0; display: grid; gap: var(--vh-space-2); }
.vh-redrow {
  display: grid; grid-template-columns: 36px 1fr auto;
  gap: var(--vh-space-3); align-items: center;
  padding: var(--vh-space-2) var(--vh-space-3);
  background: var(--vh-bg-muted);
  border-radius: var(--vh-radius-md);
}
.vh-redrow__avatar {
  width: 36px; height: 36px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: color-mix(in srgb, var(--vh-tertiary-coral) 18%, var(--vh-bg-elevated));
  color: var(--vh-tertiary-coral);
  font-family: var(--vh-font-mono);
  font-weight: var(--vh-weight-bold);
  font-size: var(--vh-text-sm);
}
.vh-redrow__body strong { font-size: var(--vh-text-sm); }
.vh-redrow__meta {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-top: 2px;
  font-size: var(--vh-text-2xs);
  color: var(--vh-text-subtle);
}
.vh-redrow__meta span { display: inline-flex; align-items: center; gap: 4px; }

/* Earnings stat grid */
.vh-rstat { display: grid; grid-template-columns: 1fr 1fr; gap: var(--vh-space-2); margin-top: var(--vh-space-3); }
.vh-rstat__cell {
  padding: var(--vh-space-3) var(--vh-space-3);
  background: var(--vh-bg-muted);
  border-radius: var(--vh-radius-md);
}
.vh-rstat__label {
  font-size: var(--vh-text-2xs);
  color: var(--vh-text-muted);
  text-transform: uppercase;
  letter-spacing: var(--vh-tracking-wide);
  font-weight: var(--vh-weight-semibold);
  display: inline-flex; align-items: center; gap: 4px;
}
.vh-rstat__value { font-size: var(--vh-text-xl); font-weight: var(--vh-weight-bold); margin-top: 4px; letter-spacing: -0.01em; }

/* "How it works" 3-step list — reused on referral, subscriptions, ABDM */
.vh-howsteps { list-style: none; padding: 0; margin: var(--vh-space-2) 0 0; display: grid; gap: var(--vh-space-2); }
.vh-howsteps li {
  display: grid; grid-template-columns: 28px 1fr; gap: 10px; align-items: start;
}
.vh-howsteps__num {
  width: 28px; height: 28px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--vh-primary-soft);
  color: var(--vh-primary);
  font-size: var(--vh-text-xs);
  font-weight: var(--vh-weight-bold);
}
.vh-howsteps strong { display: block; font-size: var(--vh-text-sm); color: var(--vh-text); font-weight: var(--vh-weight-semibold); }
.vh-howsteps span   { display: block; font-size: var(--vh-text-xs); color: var(--vh-text-muted); margin-top: 2px; line-height: var(--vh-leading-relaxed); }

/* ============================================================
 * Subscriptions cards
 * ========================================================== */
.vh-sublist { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--vh-space-2); }
.vh-subcard {
  display: grid; grid-template-columns: 44px 1fr auto;
  gap: var(--vh-space-3); align-items: start;
  padding: var(--vh-space-3) var(--vh-space-4);
}
.vh-subcard--PAUSED { opacity: 0.72; }
.vh-subcard--CANCELLED { opacity: 0.50; }
.vh-subcard__icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--vh-primary-soft);
  color: var(--vh-primary);
}
.vh-subcard__name { margin: 0; font-size: var(--vh-text-base); font-weight: var(--vh-weight-bold); letter-spacing: var(--vh-tracking-tight); }
.vh-subcard__meta {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-top: 4px;
  font-size: var(--vh-text-xs);
  color: var(--vh-text-muted);
}
.vh-subcard__meta span { display: inline-flex; align-items: center; gap: 4px; }
.vh-subcard__right {
  display: flex; flex-direction: column; align-items: flex-end; gap: 6px;
}
.vh-subcard__actions { display: flex; flex-wrap: wrap; gap: 4px; justify-content: flex-end; }

/* ============================================================
 * ABDM / ABHA — linked card + consent list
 * ========================================================== */
.vh-abdmcard {
  position: relative;
  padding: var(--vh-space-4);
  min-height: 160px;
  border-radius: var(--vh-radius-3xl);
  overflow: hidden;
  isolation: isolate;
  color: #fff;
  background:
    radial-gradient(120% 100% at 100% 0%, color-mix(in srgb, var(--vh-info) 40%, transparent) 0%, transparent 65%),
    radial-gradient(110% 90% at 0% 100%, color-mix(in srgb, var(--vh-tertiary-teal) 30%, transparent) 0%, transparent 60%),
    linear-gradient(140deg, var(--vh-info) 0%, color-mix(in srgb, var(--vh-info) 70%, var(--vh-neutral-900)) 100%);
  border: 1px solid color-mix(in srgb, #fff 18%, transparent);
  box-shadow: var(--vh-shadow-3);
}
.vh-abdmcard__top {
  display: flex; align-items: center; justify-content: space-between;
  font-size: var(--vh-text-2xs);
  text-transform: uppercase;
  letter-spacing: var(--vh-tracking-wide);
  font-weight: var(--vh-weight-bold);
}
.vh-abdmcard__brand {
  display: inline-flex; align-items: center; gap: 6px;
  color: rgba(255,255,255,0.92);
}
.vh-abdmcard__chip-tag {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 10px;
  background: rgba(0,0,0,0.18);
  border-radius: var(--vh-radius-pill);
  color: var(--vh-success);
}
.vh-abdmcard__chip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-template-rows: repeat(2, 1fr);
  gap: 2px;
  width: 32px; height: 24px;
  margin: var(--vh-space-3) 0 var(--vh-space-2);
  padding: 4px;
  background: linear-gradient(135deg, var(--vh-gold-300), var(--vh-gold-700));
  border-radius: 5px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.30), 0 1px 2px rgba(0,0,0,0.20);
}
.vh-abdmcard__chip span { background: rgba(255,255,255,0.25); border-radius: 1px; }
.vh-abdmcard__address {
  font-size: var(--vh-text-xl);
  font-weight: var(--vh-weight-bold);
  letter-spacing: 0.04em;
  word-break: break-all;
  color: #fff;
  text-shadow: 0 2px 14px rgba(0,0,0,0.22);
}
.vh-abdmcard__foot {
  display: flex; align-items: center; justify-content: space-between; gap: var(--vh-space-2);
  margin-top: var(--vh-space-3);
  font-size: var(--vh-text-2xs);
  font-weight: var(--vh-weight-semibold);
  color: rgba(255,255,255,0.85);
}
.vh-abdmcard__foot > span { display: inline-flex; align-items: center; gap: 4px; }

/* Consent list */
.vh-consentlist { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--vh-space-2); }
.vh-consentcard {
  display: grid; grid-template-columns: 44px 1fr auto;
  gap: var(--vh-space-3); align-items: start;
  padding: var(--vh-space-3) var(--vh-space-4);
}
.vh-consentcard__icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--vh-primary-soft);
  color: var(--vh-primary);
}
.vh-consentcard__icon--GRANTED { background: var(--vh-success-50); color: var(--vh-success); }
.vh-consentcard__icon--EXPIRED { background: var(--vh-warning-50); color: var(--vh-warning); }
.vh-consentcard__icon--REVOKED { background: var(--vh-danger-50);  color: var(--vh-danger); }
.vh-consentcard__purpose { margin: 0; font-size: var(--vh-text-base); font-weight: var(--vh-weight-bold); letter-spacing: var(--vh-tracking-tight); }
.vh-consentcard__meta {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-top: 4px;
  font-size: var(--vh-text-xs);
  color: var(--vh-text-muted);
}
.vh-consentcard__meta span { display: inline-flex; align-items: center; gap: 4px; }
.vh-consentcard__right { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }

/* ============================================================
 * Settings — danger card variant
 * ========================================================== */
.vh-settings__danger {
  border-color: color-mix(in srgb, var(--vh-danger) 32%, var(--vh-border));
  background: linear-gradient(180deg, color-mix(in srgb, var(--vh-danger) 6%, var(--vh-bg-elevated)) 0%, var(--vh-bg-elevated) 100%);
}

/* ============================================================
 * Order confirmation — hero, progress stepper, items list, trust strip
 * ========================================================== */
.vh-conf__hero {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: var(--vh-space-5) var(--vh-space-5) var(--vh-space-4);
  border-radius: var(--vh-radius-3xl);
  color: #fff;
  background:
    radial-gradient(120% 90% at 100% 0%, color-mix(in srgb, var(--vh-tertiary-teal) 38%, transparent) 0%, transparent 60%),
    radial-gradient(110% 100% at 0% 100%, color-mix(in srgb, var(--vh-secondary) 28%, transparent) 0%, transparent 60%),
    linear-gradient(140deg, var(--vh-primary) 0%, color-mix(in srgb, var(--vh-primary) 70%, var(--vh-neutral-900)) 100%);
  border: 1px solid color-mix(in srgb, #fff 18%, transparent);
  box-shadow: var(--vh-shadow-3);
}
.vh-conf__hero__halo {
  position: absolute;
  inset: -40% -10% auto auto;
  width: 60%;
  aspect-ratio: 1;
  border-radius: 50%;
  background:
    radial-gradient(closest-side, color-mix(in srgb, #fff 30%, transparent) 0%, transparent 70%);
  filter: blur(40px);
  z-index: -1;
  pointer-events: none;
  animation: vh-conf-halo 12s ease-in-out infinite alternate;
}
.vh-conf__hero__noise {
  position: absolute; inset: 0;
  background-image:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.06) 0, transparent 1.5px),
    radial-gradient(circle at 70% 60%, rgba(255,255,255,0.05) 0, transparent 1.5px),
    radial-gradient(circle at 40% 80%, rgba(255,255,255,0.06) 0, transparent 1.5px);
  background-size: 4px 4px, 6px 6px, 5px 5px;
  mix-blend-mode: overlay;
  opacity: 0.55;
  pointer-events: none;
}
@keyframes vh-conf-halo {
  0%   { transform: translate(0, 0) scale(1); opacity: 0.85; }
  100% { transform: translate(-6%, 4%) scale(1.08); opacity: 1; }
}

.vh-conf__check {
  width: 56px; height: 56px;
  margin-bottom: var(--vh-space-3);
  display: inline-flex;
  align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.32);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  box-shadow: 0 8px 28px -8px rgba(0,0,0,0.35), inset 0 1px 0 rgba(255,255,255,0.32);
}
.vh-conf__check__svg { width: 32px; height: 32px; overflow: visible; }
.vh-conf__check__ring {
  fill: none;
  stroke: rgba(255,255,255,0.55);
  stroke-width: 1.6;
  stroke-dasharray: 70;
  stroke-dashoffset: 70;
  animation: vh-conf-ring 700ms ease-out 80ms forwards;
}
.vh-conf__check__tick {
  fill: none;
  stroke: #fff;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 24;
  stroke-dashoffset: 24;
  animation: vh-conf-tick 420ms ease-out 540ms forwards;
}
@keyframes vh-conf-ring { to { stroke-dashoffset: 0; } }
@keyframes vh-conf-tick { to { stroke-dashoffset: 0; } }

.vh-conf__id {
  display: inline-flex; align-items: center; gap: 8px;
  margin-bottom: var(--vh-space-2);
  padding: 6px 10px 6px 12px;
  font-size: var(--vh-text-xs);
  font-weight: var(--vh-weight-semibold);
  color: #fff;
  background: rgba(0,0,0,0.22);
  border: 1px solid rgba(255,255,255,0.22);
  border-radius: var(--vh-radius-pill);
  letter-spacing: 0.04em;
}
.vh-conf__id__copy {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 2px 8px;
  background: rgba(255,255,255,0.16);
  border: 1px solid rgba(255,255,255,0.26);
  border-radius: var(--vh-radius-pill);
  color: #fff;
  font-size: var(--vh-text-2xs);
  font-weight: var(--vh-weight-bold);
  cursor: pointer;
  transition: background var(--vh-dur-2) var(--vh-ease-1);
}
.vh-conf__id__copy:hover { background: rgba(255,255,255,0.28); }

.vh-conf__title {
  margin: 0 0 6px;
  font-size: var(--vh-text-2xl);
  font-weight: var(--vh-weight-bold);
  letter-spacing: var(--vh-tracking-tight);
  color: #fff;
}
.vh-conf__sub {
  margin: 0 0 var(--vh-space-4);
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: var(--vh-text-sm);
  color: rgba(255,255,255,0.86);
}

/* Progress stepper */
.vh-conf__progress {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 4px;
  position: relative;
  padding-top: var(--vh-space-3);
}
.vh-conf__progress li {
  display: flex; flex-direction: column; align-items: center; gap: 6px;
  position: relative;
  text-align: center;
}
.vh-conf__progress li::before {
  content: "";
  position: absolute;
  top: 11px;
  left: -50%;
  width: 100%;
  height: 2px;
  background: rgba(255,255,255,0.18);
  z-index: 0;
}
.vh-conf__progress li:first-child::before { display: none; }
.vh-conf__progress li.is-done::before,
.vh-conf__progress li.is-current::before {
  background: rgba(255,255,255,0.55);
}
.vh-conf__progress__dot {
  position: relative;
  z-index: 1;
  width: 24px; height: 24px;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.28);
  color: rgba(255,255,255,0.7);
}
.vh-conf__progress li.is-done .vh-conf__progress__dot {
  background: #fff;
  color: var(--vh-primary);
  border-color: #fff;
  box-shadow: 0 4px 14px -4px rgba(0,0,0,0.3);
}
.vh-conf__progress li.is-current .vh-conf__progress__dot {
  background: rgba(255,255,255,0.95);
  color: var(--vh-primary);
  border-color: #fff;
  animation: vh-conf-pulse 1.6s ease-in-out infinite;
}
@keyframes vh-conf-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255,255,255,0.55); }
  50%      { box-shadow: 0 0 0 6px rgba(255,255,255,0); }
}
.vh-conf__progress__label {
  font-size: var(--vh-text-2xs);
  font-weight: var(--vh-weight-semibold);
  color: rgba(255,255,255,0.75);
  letter-spacing: 0.02em;
}
.vh-conf__progress li.is-done .vh-conf__progress__label,
.vh-conf__progress li.is-current .vh-conf__progress__label {
  color: #fff;
}

/* Items list */
.vh-conf__items {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: var(--vh-space-2);
}
.vh-conf__item {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  gap: var(--vh-space-3);
  align-items: center;
  padding: var(--vh-space-3);
  background: var(--vh-bg-muted);
  border-radius: var(--vh-radius-lg);
  border: 1px solid var(--vh-border);
  transition: border-color var(--vh-dur-2) var(--vh-ease-1), transform var(--vh-dur-2) var(--vh-ease-1);
}
.vh-conf__item:hover {
  border-color: color-mix(in srgb, var(--vh-primary) 30%, var(--vh-border));
  transform: translateY(-1px);
}
.vh-conf__item__icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 12px;
  background: var(--vh-primary-soft);
  color: var(--vh-primary);
}
.vh-conf__item__body { min-width: 0; }
.vh-conf__item__name {
  margin: 0;
  font-size: var(--vh-text-sm);
  font-weight: var(--vh-weight-bold);
  letter-spacing: var(--vh-tracking-tight);
  color: var(--vh-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vh-conf__item__meta {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  margin-top: 4px;
  font-size: var(--vh-text-xs);
  color: var(--vh-text-muted);
}
.vh-conf__item__meta span { display: inline-flex; align-items: center; gap: 4px; }
.vh-conf__item__price {
  font-size: var(--vh-text-base);
  font-weight: var(--vh-weight-bold);
  color: var(--vh-text);
  letter-spacing: -0.01em;
}

/* Sidebar total */
.vh-conf__total {
  margin: 4px 0 0;
  font-size: var(--vh-text-3xl);
  font-weight: var(--vh-weight-bold);
  letter-spacing: var(--vh-tracking-tight);
  color: var(--vh-text);
}
.vh-conf__discount {
  margin: 4px 0 0;
  display: inline-flex; align-items: center; gap: 6px;
  font-size: var(--vh-text-xs);
  color: var(--vh-success);
  font-weight: var(--vh-weight-semibold);
}

/* Trust strip */
.vh-conf__trust {
  list-style: none;
  padding: var(--vh-space-3);
  margin: 0;
  display: grid;
  gap: var(--vh-space-2);
  background: var(--vh-bg-muted);
  border-radius: var(--vh-radius-lg);
  border: 1px solid var(--vh-border);
}
.vh-conf__trust li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: var(--vh-text-xs);
  color: var(--vh-text-muted);
}
.vh-conf__trust li svg { color: var(--vh-success); }

@media (prefers-reduced-motion: reduce) {
  .vh-conf__hero__halo,
  .vh-conf__check__ring,
  .vh-conf__check__tick,
  .vh-conf__progress li.is-current .vh-conf__progress__dot {
    animation: none;
  }
  .vh-conf__check__ring,
  .vh-conf__check__tick { stroke-dashoffset: 0; }
}

/* ============================================================
 * Collection photos — shared grid (track page, ops, report viewer)
 * ========================================================== */
.vh-colphotos {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: var(--vh-space-2);
}
.vh-colphoto { margin: 0; }
.vh-colphoto a, .vh-colphoto img {
  display: block;
  width: 100%;
  aspect-ratio: 1;
  border-radius: var(--vh-radius-md);
}
.vh-colphoto img {
  object-fit: cover;
  background: var(--vh-bg-muted);
  border: 1px solid var(--vh-border);
}
.vh-colphoto__ph {
  display: flex; align-items: center; justify-content: center;
  width: 100%; aspect-ratio: 1;
  border-radius: var(--vh-radius-md);
  background: var(--vh-bg-muted);
  border: 1px solid var(--vh-border);
  color: var(--vh-text-subtle);
}
.vh-colphoto figcaption {
  margin-top: 4px;
  font-size: var(--vh-text-2xs);
  color: var(--vh-text-muted);
  text-align: center;
}

/* ============================================================
 * Partner collection-survey rating summary
 * ========================================================== */
.vh-rating__overall { display: flex; align-items: center; gap: 8px; }
.vh-rating__num {
  font-size: var(--vh-text-3xl);
  font-weight: var(--vh-weight-bold);
  letter-spacing: var(--vh-tracking-tight);
  color: var(--vh-text);
}
.vh-rating__star { color: var(--vh-secondary); display: inline-flex; }
.vh-rating__star svg { fill: currentColor; }
.vh-rating__count { font-size: var(--vh-text-xs); color: var(--vh-text-muted); }
.vh-rating__dims {
  list-style: none; margin: var(--vh-space-3) 0 0; padding: 0;
  display: grid; gap: 6px;
}
.vh-rating__dims li {
  display: flex; justify-content: space-between; align-items: baseline;
  font-size: var(--vh-text-xs);
}
.vh-rating__dims li span { color: var(--vh-text-muted); }
.vh-rating__dims li strong { color: var(--vh-text); font-size: var(--vh-text-sm); }

/* ============================================================
 * View Transitions — smooth page-to-page motion
 *
 * HTMX wraps every boosted navigation + swap in a View Transition
 * (htmx-config globalViewTransitions). @view-transition covers the rare
 * true cross-document navigation (JS off / unboosted links). Persistent
 * chrome is named so it stays anchored while only the page content
 * cross-fades.
 * ========================================================== */
@view-transition { navigation: auto; }

::view-transition-old(root),
::view-transition-new(root) {
  animation-duration: 220ms;
  animation-timing-function: var(--vh-ease-1, cubic-bezier(0.4, 0, 0.2, 1));
}
@keyframes vh-vt-out { to { opacity: 0; } }
@keyframes vh-vt-in  { from { opacity: 0; transform: translateY(8px); } }
::view-transition-old(root) { animation-name: vh-vt-out; }
::view-transition-new(root) { animation-name: vh-vt-in; }

/* Persistent chrome — anchored, doesn't fade with the page body. */
.vh-appbar  { view-transition-name: vh-appbar; }
.vh-topnav  { view-transition-name: vh-topnav; }
.vh-sidenav { view-transition-name: vh-sidenav; }

@media (prefers-reduced-motion: reduce) {
  ::view-transition-group(*),
  ::view-transition-old(*),
  ::view-transition-new(*) { animation: none !important; }
}

/* ============================================================
 * Defensive icon sizing — safety net for raw inline sprite icons.
 *
 * <svg><use href="#vh-icon-…"></svg> with no width attribute would
 * otherwise fall back to the 300×150 SVG default and balloon (this
 * bit the home search bar). Zero-specificity :where() wrapper means
 * any real container rule (.vh-btn svg, etc.) still wins — this only
 * applies when nothing else sizes the icon.
 * ========================================================== */
:where(svg:has(use[href^="#vh-icon-"]):not([width])) {
  width: 1.25rem;
  height: 1.25rem;
}
