/* =====================================================================
   Labpass — design system + components
   Organised as: tokens → reset → primitives → components → pages →
   motion → print → responsive
   ===================================================================== */

/* ---------- 1. Tokens ---------- */
:root {
  /* Brand ramp */
  --teal-50:  #eef8f8;
  --teal-100: #d7eeee;
  --teal-200: #b3e0e0;
  --teal-300: #7fc9cc;
  --teal-400: #45a8ae;
  --teal-500: #14808f;
  --teal-600: #0f6874;
  --teal-700: #0e4a56;
  --teal-800: #0a3a44;
  --teal-900: #072a32;

  --mint: #cdeee6;
  --wa: #25d366;
  --wa-ink: #0b3d1f;
  --danger: #c0392b;
  --warning: #b7791f;
  --success: #1a7f4b;

  /* Semantic — light theme */
  --bg: #f2f8f8;
  --bg-alt: #e7f2f3;
  --surface: #ffffff;
  --surface-2: #f7fbfb;
  --ink: #0b1f2a;
  --ink-2: #405a66;
  --ink-3: #5b7178;          /* AA-safe against --bg for small text */
  --line: #d8e7e8;
  --line-strong: #bcd6d8;
  --brand: var(--teal-500);  /* borders, rings, fills */
  --accent-text: var(--teal-600); /* small brand-coloured TEXT — AA safe */
  --brand-ink: var(--teal-700);
  --on-brand: #ffffff;

  /* Elevation */
  --sh-1: 0 1px 2px rgba(9, 38, 45, .06), 0 2px 8px rgba(9, 38, 45, .05);
  --sh-2: 0 4px 12px rgba(9, 38, 45, .07), 0 12px 28px rgba(9, 38, 45, .07);
  --sh-3: 0 12px 28px rgba(9, 38, 45, .10), 0 28px 60px rgba(9, 38, 45, .12);
  --ring: 0 0 0 3px rgba(20, 128, 143, .28);

  /* Radii */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-full: 999px;

  /* Spacing scale */
  --s-1: 4px;  --s-2: 8px;  --s-3: 12px; --s-4: 16px;
  --s-5: 24px; --s-6: 32px; --s-7: 48px; --s-8: 64px;
  --s-9: 88px; --s-10: 120px;

  /* Type */
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  --t-xs:  0.76rem;
  --t-sm:  0.86rem;
  --t-base:0.95rem;
  --t-md:  1.05rem;
  --t-lg:  clamp(1.15rem, 1rem + .6vw, 1.35rem);
  --t-xl:  clamp(1.4rem, 1.15rem + 1.1vw, 1.85rem);
  --t-2xl: clamp(1.75rem, 1.3rem + 2vw, 2.6rem);
  --t-3xl: clamp(2.1rem, 1.4rem + 3.2vw, 3.5rem);

/* Theme-aware component tokens. Component rules use these instead of a
     [data-theme="dark"] twin — those twins silently did nothing for users
     whose OS is dark but who never touched the theme toggle. */
  --btn-primary-bg: var(--teal-700);
  --btn-primary-fg: #ffffff;
  --btn-primary-bg-hover: var(--teal-800);
  --btn-mint-fg: var(--teal-800);
  --btn-mint-bg-hover: #bde7dc;
  --badge-brand-bg: var(--teal-50);
  --badge-brand-fg: var(--teal-700);
  --badge-brand-bd: var(--teal-200);
  --badge-warn-bg: #fdf5e3;
  --badge-warn-fg: #8a5a0d;
  --badge-warn-bd: #f0dcae;
  --badge-ok-bg: #e6f5ec;
  --badge-ok-fg: #15693c;
  --badge-ok-bd: #bfe3cd;
  --icon-tile-bg: var(--teal-50);
  --icon-tile-fg: var(--teal-600);
  --step-bg: var(--teal-700);
  --step-fg: #ffffff;
  --chip-on-bg: var(--teal-700);
  --chip-on-fg: #ffffff;
  --row-selected-bg: var(--teal-50);
  --panel-icon-bg: #e6f5ec;
  --panel-icon-fg: var(--success);
  --toast-bg: var(--teal-800);
  --toast-fg: #ffffff;
  --toast-accent: var(--wa);
  --hero-check: var(--mint);

  --header-h: 68px;
  color-scheme: light;
}

:root[data-theme="dark"],
html:not([data-theme="light"]) body.theme-dark {
  color-scheme: dark;
}

:root[data-theme="dark"] {
  --bg: #071b21;
  --bg-alt: #0a242c;
  --surface: #0d2a33;
  --surface-2: #10333d;
  --ink: #e9f4f4;
  --ink-2: #a9c6cb;
  --ink-3: #7e9ea5;
  --line: #17414c;
  --line-strong: #1f5462;
  --brand: var(--teal-300);
  --accent-text: var(--teal-300);
  --brand-ink: var(--teal-200);
  --on-brand: #06232a;
  --mint: #17414c;

  --sh-1: 0 1px 2px rgba(0, 0, 0, .4), 0 2px 8px rgba(0, 0, 0, .3);
  --sh-2: 0 4px 12px rgba(0, 0, 0, .42), 0 12px 28px rgba(0, 0, 0, .36);
  --sh-3: 0 12px 28px rgba(0, 0, 0, .5), 0 28px 60px rgba(0, 0, 0, .45);
  --ring: 0 0 0 3px rgba(127, 201, 204, .35);

  --btn-primary-bg: var(--teal-300);
  --btn-primary-fg: var(--teal-900);
  --btn-primary-bg-hover: var(--teal-200);
  --btn-mint-fg: var(--teal-100);
  --btn-mint-bg-hover: #1d5162;
  --badge-brand-bg: var(--teal-800);
  --badge-brand-fg: var(--teal-200);
  --badge-brand-bd: var(--teal-600);
  --badge-warn-bg: #3a2f14;
  --badge-warn-fg: #e8c877;
  --badge-warn-bd: #5c4a1f;
  --badge-ok-bg: #103522;
  --badge-ok-fg: #7fd6a3;
  --badge-ok-bd: #1d5c3a;
  --icon-tile-bg: var(--teal-800);
  --icon-tile-fg: var(--teal-200);
  --step-bg: var(--teal-300);
  --step-fg: var(--teal-900);
  --chip-on-bg: var(--teal-300);
  --chip-on-fg: var(--teal-900);
  --row-selected-bg: var(--teal-800);
  --panel-icon-bg: #123c28;
  --panel-icon-fg: #7fd6a3;
  --toast-bg: var(--teal-300);
  --toast-fg: var(--teal-900);
  --toast-accent: var(--teal-700);
  --hero-check: var(--teal-300);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #071b21;
    --bg-alt: #0a242c;
    --surface: #0d2a33;
    --surface-2: #10333d;
    --ink: #e9f4f4;
    --ink-2: #a9c6cb;
    --ink-3: #7e9ea5;
    --line: #17414c;
    --line-strong: #1f5462;
    --brand: var(--teal-300);
    --accent-text: var(--teal-300);
    --brand-ink: var(--teal-200);
    --on-brand: #06232a;
    --mint: #17414c;
    --sh-1: 0 1px 2px rgba(0, 0, 0, .4), 0 2px 8px rgba(0, 0, 0, .3);
    --sh-2: 0 4px 12px rgba(0, 0, 0, .42), 0 12px 28px rgba(0, 0, 0, .36);
    --sh-3: 0 12px 28px rgba(0, 0, 0, .5), 0 28px 60px rgba(0, 0, 0, .45);
    --ring: 0 0 0 3px rgba(127, 201, 204, .35);

    --btn-primary-bg: var(--teal-300);
    --btn-primary-fg: var(--teal-900);
    --btn-primary-bg-hover: var(--teal-200);
    --btn-mint-fg: var(--teal-100);
    --btn-mint-bg-hover: #1d5162;
    --badge-brand-bg: var(--teal-800);
    --badge-brand-fg: var(--teal-200);
    --badge-brand-bd: var(--teal-600);
    --badge-warn-bg: #3a2f14;
    --badge-warn-fg: #e8c877;
    --badge-warn-bd: #5c4a1f;
    --badge-ok-bg: #103522;
    --badge-ok-fg: #7fd6a3;
    --badge-ok-bd: #1d5c3a;
    --icon-tile-bg: var(--teal-800);
    --icon-tile-fg: var(--teal-200);
    --step-bg: var(--teal-300);
    --step-fg: var(--teal-900);
    --chip-on-bg: var(--teal-300);
    --chip-on-fg: var(--teal-900);
    --row-selected-bg: var(--teal-800);
    --panel-icon-bg: #123c28;
    --panel-icon-fg: #7fd6a3;
    --toast-bg: var(--teal-300);
    --toast-fg: var(--teal-900);
    --toast-accent: var(--teal-700);
    --hero-check: var(--teal-300);
  }
}

/* ---------- 2. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul, ol { list-style: none; margin: 0; padding: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: none; padding: 0; }
h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -0.02em; font-weight: 800; }
p { margin: 0; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--brand-ink);
  color: #fff;
  padding: 12px 20px;
  border-radius: 0 0 var(--r-sm) 0;
  font-weight: 700;
}
.skip-link:focus { left: 0; }

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

/* ---------- 3. Layout primitives ---------- */
.container {
  width: 100%;
  max-width: 1160px;
  margin-inline: auto;
  padding-inline: var(--s-5);
}
.container--narrow { max-width: 820px; }

.section { padding-block: var(--s-9); }
.section--tight { padding-block: var(--s-7); }
.section--soft { background: var(--bg-alt); }
.section--surface { background: var(--surface); }

.section-head { max-width: 60ch; margin-bottom: var(--s-7); }
.section-head--center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-block;
  font-size: var(--t-xs);
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: var(--s-3);
}

.section-title { font-size: var(--t-2xl); margin-bottom: var(--s-3); }
.section-sub { color: var(--ink-2); font-size: var(--t-md); }

.grid { display: grid; gap: var(--s-5); }
.grid--2 { grid-template-columns: repeat(2, 1fr); }
.grid--3 { grid-template-columns: repeat(3, 1fr); }
.grid--4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- 4. Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--s-2);
  padding: 12px 22px;
  border-radius: var(--r-full);
  font-size: var(--t-base);
  font-weight: 700;
  border: 1.5px solid transparent;
  white-space: nowrap;
  transition: transform .12s ease, box-shadow .18s ease, background-color .18s ease,
              border-color .18s ease, color .18s ease, opacity .18s ease;
}
.btn:active { transform: translateY(1px) scale(.99); }
.btn svg { flex-shrink: 0; }

.btn--primary { background: var(--btn-primary-bg); color: var(--btn-primary-fg); box-shadow: var(--sh-1); }
.btn--primary:hover { background: var(--btn-primary-bg-hover); box-shadow: var(--sh-2); }

.btn--wa { background: var(--wa); color: #06280f; box-shadow: 0 6px 16px rgba(37, 211, 102, .28); }
.btn--wa:hover { background: #1fbb59; box-shadow: 0 8px 22px rgba(37, 211, 102, .36); }

.btn--mint { background: var(--mint); color: var(--btn-mint-fg); }
.btn--mint:hover { background: var(--btn-mint-bg-hover); }

.btn--outline { border-color: var(--line-strong); color: var(--ink); background: var(--surface); }
.btn--outline:hover { border-color: var(--brand); color: var(--brand-ink); }

.btn--light { background: transparent; color: #fff; border-color: rgba(255,255,255,.5); }
.btn--light:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.8); }

.btn--ghost { color: var(--brand-ink); }
.btn--ghost:hover { background: var(--bg-alt); }

.btn--sm { padding: 8px 16px; font-size: var(--t-sm); }
.btn--lg { padding: 15px 28px; font-size: var(--t-md); }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .5; pointer-events: none; }

/* ---------- 5. Badges & pills ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: var(--r-full);
  font-size: var(--t-xs);
  font-weight: 700;
  background: var(--bg-alt);
  color: var(--ink-2);
  border: 1px solid var(--line);
}
.badge--brand { background: var(--badge-brand-bg); color: var(--badge-brand-fg); border-color: var(--badge-brand-bd); }
.badge--warn { background: var(--badge-warn-bg); color: var(--badge-warn-fg); border-color: var(--badge-warn-bd); }
.badge--ok { background: var(--badge-ok-bg); color: var(--badge-ok-fg); border-color: var(--badge-ok-bd); }

.badge--hero {
  background: rgba(255,255,255,.12);
  border-color: rgba(255,255,255,.3);
  color: #fff;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 6px 14px;
  backdrop-filter: blur(6px);
}

/* ---------- 5b. Announcement bar ---------- */
.announce {
  background: linear-gradient(100deg, var(--teal-800), var(--teal-600));
  color: #fff;
  font-size: var(--t-sm);
  position: relative;
  z-index: 70;
}
.announce__inner {
  max-width: 1160px;
  margin-inline: auto;
  padding: 10px 52px 10px var(--s-5);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--s-2) var(--s-4);
  text-align: center;
}
.announce__text { font-weight: 600; }
.announce__dot { opacity: .5; }
.announce__cta {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 800;
  color: #fff;
  border-bottom: 1.5px solid rgba(255,255,255,.55);
  padding-bottom: 1px;
  white-space: nowrap;
}
.announce__cta:hover { border-bottom-color: #fff; }
.announce__close {
  position: absolute;
  top: 50%; right: 12px;
  transform: translateY(-50%);
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: rgba(255,255,255,.8);
}
.announce__close:hover { background: rgba(255,255,255,.16); color: #fff; }

/* ---------- 6. Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: blur(14px) saturate(1.4);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.header.is-stuck { border-bottom-color: var(--line); box-shadow: var(--sh-1); }

.header__inner {
  max-width: 1160px;
  margin-inline: auto;
  padding: var(--s-3) var(--s-5);
  min-height: var(--header-h);
  display: flex;
  align-items: center;
  gap: var(--s-4);
}

.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.08rem; letter-spacing: -.02em; }
.brand__mark {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(145deg, var(--teal-500), var(--teal-800));
  color: #fff; display: grid; place-items: center;
  font-weight: 800; font-size: .98rem; flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(14, 74, 86, .35);
}

.nav { display: flex; align-items: center; gap: var(--s-5); margin-left: var(--s-5); }
.nav__link {
  font-size: var(--t-base);
  font-weight: 600;
  color: var(--ink-2);
  padding: 6px 0;
  position: relative;
  transition: color .15s ease;
}
.nav__link:hover { color: var(--brand-ink); }
.nav__link[aria-current="page"] { color: var(--brand-ink); }
.nav__link[aria-current="page"]::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: -2px;
  height: 2px; border-radius: 2px; background: var(--brand);
}

.header__actions { margin-left: auto; display: flex; align-items: center; gap: var(--s-2); }

.icon-btn {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  border-radius: var(--r-full);
  color: var(--ink-2);
  border: 1.5px solid var(--line);
  background: var(--surface);
  transition: color .15s ease, border-color .15s ease, background .15s ease;
  position: relative;
  flex-shrink: 0;
}
.icon-btn:hover { color: var(--brand-ink); border-color: var(--line-strong); }

.cart-count {
  position: absolute;
  top: -5px; right: -5px;
  min-width: 19px; height: 19px;
  padding: 0 5px;
  border-radius: var(--r-full);
  background: var(--wa);
  color: #06280f;
  font-size: 11px; font-weight: 800;
  display: grid; place-items: center;
  border: 2px solid var(--surface);
}
.cart-count[hidden] { display: none; }

.theme-toggle .icon-sun { display: none; }
.theme-toggle .icon-moon { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: block; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .icon-sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .icon-moon { display: none; }
}

.nav-toggle { display: none; width: 44px; height: 44px; place-items: center; flex-direction: column; gap: 5px; flex-shrink: 0; }
.nav-toggle span { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .22s ease, opacity .18s ease; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav__cta-mobile { display: none; }

/* ---------- 7. Hero ---------- */
.hero {
  position: relative;
  color: #fff;
  background:
    radial-gradient(1100px 500px at 82% -8%, rgba(69, 168, 174, .5), transparent 62%),
    radial-gradient(760px 420px at 6% 108%, rgba(20, 128, 143, .42), transparent 60%),
    linear-gradient(150deg, #0d3b47 0%, #0b5560 48%, #08333c 100%);
  padding-block: var(--s-8) calc(var(--s-9) + 44px);
  overflow: hidden;
  isolation: isolate;
}
.hero::after {
  content: "";
  position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(circle at 1px 1px, rgba(255,255,255,.13) 1.4px, transparent 1.4px);
  background-size: 24px 24px;
  mask-image: linear-gradient(180deg, #000 10%, transparent 88%);
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.08fr .92fr;
  gap: var(--s-8);
  align-items: center;
}

.hero h1 { font-size: var(--t-3xl); font-weight: 850; margin-block: var(--s-4) var(--s-4); text-wrap: balance; }
.hero__lead { font-size: var(--t-md); color: rgba(255,255,255,.86); max-width: 48ch; margin-bottom: var(--s-5); }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); margin-bottom: var(--s-5); }

.hero__trust { display: flex; flex-wrap: wrap; gap: var(--s-4) var(--s-5); }
.hero__trust li { display: inline-flex; align-items: center; gap: 7px; font-size: var(--t-sm); color: rgba(255,255,255,.82); }
.hero__trust svg { color: var(--hero-check); flex-shrink: 0; }

/* Hero visual — self-contained pass card mockup */
.hero__visual { position: relative; display: grid; place-items: center; min-height: 340px; }
.hero__blob {
  position: absolute; inset: 8% 4%;
  background: radial-gradient(circle at 30% 30%, rgba(205,238,230,.22), rgba(205,238,230,0) 68%);
  filter: blur(6px);
}

.pass-card {
  position: relative;
  width: min(100%, 350px);
  background: linear-gradient(155deg, #ffffff 0%, #f0fbf8 100%);
  color: var(--teal-800);
  border-radius: var(--r-lg);
  padding: var(--s-5);
  box-shadow: var(--sh-3);
  transform: rotate(-3deg);
  transition: transform .4s cubic-bezier(.2,.8,.2,1);
}
.hero__visual:hover .pass-card { transform: rotate(-1deg) translateY(-4px); }

.pass-card__top { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--s-5); }
.pass-card__brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; font-size: .95rem; }
.pass-card__off { font-size: var(--t-xs); font-weight: 800; color: var(--teal-600); background: var(--teal-50); border: 1px solid var(--teal-200); padding: 4px 10px; border-radius: var(--r-full); }
.pass-card__label { font-size: var(--t-xs); font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: #7d99a0; margin-bottom: 6px; }
.pass-card__code {
  font-family: var(--mono);
  font-size: 1.42rem; font-weight: 800; letter-spacing: .1em;
  color: var(--teal-700);
  border: 1.5px dashed var(--teal-300);
  border-radius: var(--r-sm);
  background: #f4fbfa;
  padding: 14px 10px;
  text-align: center;
  margin-bottom: var(--s-4);
}
.pass-card__meta { display: flex; justify-content: space-between; font-size: var(--t-xs); color: #7d99a0; font-weight: 600; }

.hero__chip {
  position: absolute;
  display: inline-flex; align-items: center; gap: 9px;
  background: var(--surface);
  color: var(--ink);
  border-radius: var(--r-full);
  padding: 10px 16px;
  font-size: var(--t-sm); font-weight: 700;
  box-shadow: var(--sh-2);
  white-space: nowrap;
}
.hero__chip svg { color: var(--wa); flex-shrink: 0; }
.hero__chip--a { bottom: 6%; left: -2%; }
.hero__chip--b { top: 4%; right: -1%; }

/* ---------- 8. Stats ---------- */
.stats { margin-top: -60px; position: relative; z-index: 5; }
.stats__card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-3);
  padding: var(--s-6) var(--s-7);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--s-5);
}
.stat__num { font-size: var(--t-xl); font-weight: 850; color: var(--brand-ink); margin-bottom: 2px; letter-spacing: -.03em; }
.stat__label { font-size: var(--t-sm); color: var(--ink-3); }

/* ---------- 9. Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  box-shadow: var(--sh-1);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card--hover:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--line-strong); }

.feature__icon {
  width: 46px; height: 46px;
  border-radius: var(--r-sm);
  display: grid; place-items: center;
  background: var(--icon-tile-bg);
  color: var(--icon-tile-fg);
  margin-bottom: var(--s-4);
}
.feature h3 { font-size: var(--t-md); margin-bottom: var(--s-2); }
.feature p { font-size: var(--t-sm); color: var(--ink-2); }

/* Option cards (how it works) */
.option { display: flex; flex-direction: column; }
.option__tag { font-size: var(--t-xs); font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent-text); margin-bottom: var(--s-2); }
.option h3 { font-size: var(--t-lg); margin-bottom: var(--s-5); }
.steps { display: flex; flex-direction: column; gap: var(--s-4); margin-bottom: var(--s-6); flex: 1; }
.step { display: flex; gap: var(--s-3); align-items: flex-start; }
.step__n {
  width: 27px; height: 27px; flex-shrink: 0;
  border-radius: 50%;
  background: var(--step-bg); color: var(--step-fg);
  display: grid; place-items: center;
  font-size: var(--t-xs); font-weight: 800;
}
.step p { font-size: var(--t-base); color: var(--ink-2); }
.step strong { color: var(--ink); font-weight: 700; }

/* ---------- 10. Test cards ---------- */
.tests-toolbar {
  display: flex; flex-wrap: wrap; gap: var(--s-4);
  align-items: center; justify-content: space-between;
  margin-bottom: var(--s-5);
}
.search { position: relative; flex: 1 1 300px; max-width: 440px; }
.search svg { position: absolute; left: 15px; top: 50%; transform: translateY(-50%); color: var(--ink-3); pointer-events: none; }
.search input {
  width: 100%;
  padding: 13px 44px 13px 44px;
  border-radius: var(--r-full);
  border: 1.5px solid var(--line);
  background: var(--surface);
  font-size: var(--t-base);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.search input:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.search__clear { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; color: var(--ink-3); }
.search__clear:hover { background: var(--bg-alt); color: var(--ink); }

.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }
.chip {
  padding: 8px 15px;
  border-radius: var(--r-full);
  border: 1.5px solid var(--line);
  background: var(--surface);
  font-size: var(--t-sm); font-weight: 600;
  color: var(--ink-2);
  transition: all .15s ease;
}
.chip:hover { border-color: var(--line-strong); color: var(--ink); }
.chip[aria-pressed="true"] { background: var(--chip-on-bg); border-color: var(--chip-on-bg); color: var(--chip-on-fg); }

.tests-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--s-5); }

.tests-toolbar__right { display: flex; align-items: center; gap: var(--s-4); }

/* ---------- Collapsible test groups ----------
   With 80+ tests a flat grid is unusable, so tests are grouped and only
   a couple of groups start open. */
.tgroup {
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface);
  margin-bottom: var(--s-3);
  overflow: hidden;
}
.tgroup__head {
  width: 100%;
  display: flex;
  align-items: center;
  gap: var(--s-3);
  padding: var(--s-4) var(--s-5);
  text-align: left;
  font-size: var(--t-md);
  font-weight: 800;
  color: var(--ink);
  background: var(--surface-2);
  transition: background .15s ease;
}
.tgroup__head:hover { background: var(--bg-alt); }
.tgroup__name { flex: 1; }
.tgroup__count {
  font-size: var(--t-xs);
  font-weight: 800;
  color: var(--ink-2);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-full);
  padding: 3px 10px;
  flex-shrink: 0;
}
.tgroup__chev { flex-shrink: 0; color: var(--ink-3); transition: transform .22s ease; }
.tgroup__head[aria-expanded="true"] .tgroup__chev { transform: rotate(180deg); color: var(--brand); }

.tgroup__body { display: none; }
.tgroup__body.is-open { display: block; }

/* ---------- Compact test row ---------- */
.trow {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  padding: var(--s-4) var(--s-5);
  border-top: 1px solid var(--line);
}
.trow:first-child { border-top: none; }
.trow.is-selected { background: var(--row-selected-bg); }

.trow__main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.trow__name { font-size: var(--t-base); font-weight: 700; line-height: 1.3; }
.trow__meta { display: flex; flex-wrap: wrap; gap: 6px; }
.trow__price {
  font-size: var(--t-md);
  font-weight: 800;
  color: var(--brand-ink);
  white-space: nowrap;
  flex-shrink: 0;
}
.trow .btn { flex-shrink: 0; }

@media (max-width: 620px) {
  .tests-toolbar__right { justify-content: space-between; width: 100%; }
  .tgroup__head { padding: var(--s-4); font-size: var(--t-base); }
  /* Keep name, price and Add on one line — letting the name take the full
     width pushes the button to a third row and makes every row ~145px. */
  .trow { padding: var(--s-3) var(--s-4); gap: var(--s-3); }
  .trow__name { font-size: var(--t-sm); }
  .trow__price { font-size: var(--t-base); }
  .trow .btn--sm { padding-inline: 13px; }
}

.test-card { display: flex; flex-direction: column; gap: var(--s-3); padding: var(--s-5); }
.test-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--s-3); }
.test-card__name { font-size: var(--t-md); font-weight: 800; line-height: 1.3; }
.test-card__desc { font-size: var(--t-sm); color: var(--ink-2); flex: 1; }
.test-card__meta { display: flex; flex-wrap: wrap; gap: 6px; }
.test-card__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-top: var(--s-2); padding-top: var(--s-4); border-top: 1px solid var(--line); }
.price { font-size: var(--t-lg); font-weight: 850; color: var(--brand-ink); letter-spacing: -.02em; }
.price small { font-size: var(--t-xs); font-weight: 600; color: var(--ink-3); display: block; letter-spacing: 0; }

.test-card.is-selected { border-color: var(--brand); box-shadow: var(--ring); }

.empty-state { text-align: center; padding: var(--s-8) var(--s-5); color: var(--ink-2); }
.empty-state svg { color: var(--ink-3); margin-inline: auto; margin-bottom: var(--s-4); }
.empty-state h3 { font-size: var(--t-lg); margin-bottom: var(--s-2); color: var(--ink); }

/* ---------- 11. Forms ---------- */
.form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-2); padding: var(--s-6); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: var(--s-4); }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: var(--s-4); }
.field--full { grid-column: 1 / -1; }
.field label { font-size: var(--t-sm); font-weight: 700; }
.field .hint { font-size: var(--t-xs); color: var(--ink-3); font-weight: 500; }

.field input, .field select, .field textarea {
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  padding: 12px 14px;
  font-size: var(--t-base);
  background: var(--surface-2);
  color: var(--ink);
  width: 100%;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.field input::placeholder, .field textarea::placeholder { color: var(--ink-3); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: var(--ring); background: var(--surface);
}
.field textarea { resize: vertical; min-height: 52px; }
.field input[aria-invalid="true"], .field select[aria-invalid="true"], .field textarea[aria-invalid="true"] {
  border-color: var(--danger);
}
.field__error { font-size: var(--t-xs); color: var(--danger); font-weight: 600; min-height: 1.1em; }

.form-note { font-size: var(--t-sm); color: var(--ink-3); text-align: center; margin-top: var(--s-4); }

/* Selected tests summary on booking page */
.summary { background: var(--bg-alt); border: 1px solid var(--line); border-radius: var(--r-md); padding: var(--s-4); margin-bottom: var(--s-5); }
.summary__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); margin-bottom: var(--s-3); }
.summary__head h3 { font-size: var(--t-base); }
.summary__list { display: flex; flex-direction: column; gap: var(--s-2); margin-bottom: var(--s-3); }
.summary__row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); font-size: var(--t-sm); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xs); padding: 9px 12px; }
.summary__row button { color: var(--ink-3); display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; flex-shrink: 0; }
.summary__row button:hover { color: var(--danger); background: var(--bg-alt); }
.summary__total { display: flex; align-items: center; justify-content: space-between; padding-top: var(--s-3); border-top: 1px dashed var(--line-strong); font-weight: 800; }
.summary__total span:last-child { color: var(--brand-ink); font-size: var(--t-md); }

/* ---------- 11b. Panels, payment & lookup ---------- */
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-2);
  padding: var(--s-7) var(--s-6);
  text-align: center;
}
.panel__icon {
  width: 54px; height: 54px;
  margin: 0 auto var(--s-4);
  border-radius: 50%;
  display: grid; place-items: center;
  background: var(--panel-icon-bg);
  color: var(--panel-icon-fg);
}
.panel__icon svg { width: 26px; height: 26px; }
.panel h2 { font-size: var(--t-xl); margin-bottom: var(--s-3); }
.panel__lead { color: var(--ink-2); font-size: var(--t-base); max-width: 52ch; margin: 0 auto var(--s-5); }
.panel__foot { font-size: var(--t-sm); color: var(--ink-3); margin-top: var(--s-4); }
.panel__foot a { color: var(--accent-text); font-weight: 700; }

/* Booking reference */
.ref-box {
  display: flex; flex-wrap: wrap;
  align-items: center; justify-content: center;
  gap: var(--s-3);
  background: var(--bg-alt);
  border: 1.5px dashed var(--brand);
  border-radius: var(--r-md);
  padding: var(--s-4);
  margin-bottom: var(--s-5);
}
.ref-box__label { font-size: var(--t-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); width: 100%; }
.ref-box__code { font-family: var(--mono); font-size: 1.25rem; font-weight: 800; letter-spacing: .06em; color: var(--brand-ink); user-select: all; }

/* Payment block */
.pay {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--s-5);
  margin-bottom: var(--s-4);
  text-align: left;
}
.pay h3 { font-size: var(--t-md); margin-bottom: var(--s-2); }
.pay__hint { font-size: var(--t-sm); color: var(--ink-2); margin-bottom: var(--s-4); }
.pay__amount {
  display: flex; align-items: center; justify-content: space-between;
  padding-bottom: var(--s-3); margin-bottom: var(--s-3);
  border-bottom: 1px dashed var(--line-strong);
  font-size: var(--t-sm); color: var(--ink-2);
}
.pay__amount strong { font-size: var(--t-lg); color: var(--brand-ink); }
.pay__vpa {
  display: flex; flex-wrap: wrap; align-items: center; gap: var(--s-2) var(--s-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: var(--s-3) var(--s-4);
  margin-bottom: var(--s-4);
}
.pay__vpa-label { font-size: var(--t-xs); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); width: 100%; }
.pay__vpa-value { font-family: var(--mono); font-size: var(--t-md); font-weight: 700; color: var(--ink); user-select: all; word-break: break-all; flex: 1; }
.pay__note { display: flex; gap: 9px; align-items: flex-start; font-size: var(--t-xs); color: var(--ink-3); margin-top: var(--s-3); }
.pay__note svg { flex-shrink: 0; margin-top: 1px; }

/* UPI QR. Always dark-on-white regardless of theme — inverted or tinted
   QR codes fail to scan, so the plate stays white in dark mode too. */
.pay__qr {
  display: flex;
  align-items: center;
  gap: var(--s-4);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: var(--s-4);
  margin-bottom: var(--s-3);
}
.pay__qr-plate {
  flex-shrink: 0;
  width: 148px;
  height: 148px;
  background: #ffffff;
  border-radius: var(--r-xs);
  padding: 6px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
}
.pay__qr-plate svg { width: 100%; height: 100%; display: block; }
.pay__qr-plate svg rect[fill="#ffffff"],
.pay__qr-plate svg rect[fill="white"] { fill: #ffffff; }
.pay__qr-title { font-size: var(--t-sm); font-weight: 800; margin-bottom: 4px; }
.pay__qr-copy p { font-size: var(--t-sm); color: var(--ink-2); }
.pay__qr-copy strong { color: var(--ink); }

@media (max-width: 620px) {
  .pay__qr { flex-direction: column; text-align: center; gap: var(--s-3); }
}

/* Desktop: upi:// has no handler, so give real instructions instead of a
   button that silently does nothing. */
.pay__steps {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: var(--s-4);
}
.pay__steps-title {
  font-size: var(--t-sm);
  font-weight: 800;
  margin-bottom: var(--s-3);
}
.pay__steps ol {
  list-style: decimal;
  padding-left: 1.15em;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.pay__steps li {
  font-size: var(--t-sm);
  color: var(--ink-2);
  padding-left: 2px;
}
.pay__steps li::marker { color: var(--accent-text); font-weight: 800; }
.pay__steps strong { color: var(--ink); }

/* Lookup result */
.lookup-result { margin-top: var(--s-5); }
.lookup-result[hidden] { display: none; }
.lookup-msg {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--danger);
  border-radius: var(--r-sm);
  padding: var(--s-4);
  font-size: var(--t-sm);
  color: var(--ink-2);
}
.lookup-msg a { color: var(--accent-text); font-weight: 700; }
.lookup-result.is-ok .lookup-msg { border-left-color: var(--success); }

.pass-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-2);
  padding: var(--s-7) var(--s-6);
  text-align: center;
}
.pass-panel h2 { font-size: var(--t-xl); margin: var(--s-3) 0 var(--s-2); }
.pass-panel > p { font-size: var(--t-sm); color: var(--ink-2); max-width: 46ch; margin: 0 auto var(--s-5); }
.pass-panel--pending { border-left: 3px solid var(--warning); }

/* ---------- Lab on the pass ---------- */
.pass-lab {
  display: flex;
  flex-direction: column;
  gap: 3px;
  text-align: left;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: var(--s-4);
  margin-bottom: var(--s-4);
}
.pass-lab__label {
  font-size: var(--t-xs);
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.pass-lab__name { font-size: var(--t-md); font-weight: 800; }
.pass-lab__addr { font-size: var(--t-sm); color: var(--ink-2); }
.pass-lab__map {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 7px;
  font-size: var(--t-sm);
  font-weight: 700;
  color: var(--accent-text);
}
.pass-lab__map:hover { text-decoration: underline; }

/* ---------- Lab picker on the booking form ---------- */
.lab-pick { border: none; padding: 0; margin: 0 0 var(--s-4); }
.lab-pick legend { font-size: var(--t-sm); font-weight: 700; padding: 0; }
.lab-pick .hint { display: block; font-size: var(--t-xs); color: var(--ink-3); margin: 4px 0 10px; }
.lab-pick__list { display: flex; flex-direction: column; gap: var(--s-2); }

.lab-opt {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  padding: var(--s-3) var(--s-4);
  background: var(--surface-2);
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.lab-opt:hover { border-color: var(--line-strong); }
.lab-opt.is-on { border-color: var(--brand); background: var(--surface); box-shadow: var(--ring); }
.lab-opt input { width: 18px; height: 18px; accent-color: var(--brand); flex-shrink: 0; }
.lab-opt__body { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.lab-opt__name { font-size: var(--t-base); font-weight: 700; }
.lab-opt__addr { font-size: var(--t-sm); color: var(--ink-2); }
.lab-opt__map { font-size: var(--t-sm); font-weight: 700; color: var(--accent-text); flex-shrink: 0; }
.lab-opt__map:hover { text-decoration: underline; }

@media (max-width: 620px) {
  .lab-opt { flex-wrap: wrap; }
  .lab-opt__map { margin-left: auto; }
}

/* Selected-tests summary helpers */
.summary__note { font-size: var(--t-xs); color: var(--ink-3); margin-top: var(--s-2); }
.summary__line {
  display: flex; align-items: center; justify-content: space-between;
  font-size: var(--t-sm); color: var(--ink-2); padding: 3px 0;
}
.summary__line--save { color: var(--badge-ok-fg); font-weight: 700; }

.pay__breakdown { margin-bottom: var(--s-3); }
.pay__line {
  display: flex; align-items: center; justify-content: space-between;
  font-size: var(--t-sm); color: var(--ink-2); padding: 3px 0;
}
.pay__line--save { color: var(--badge-ok-fg); font-weight: 700; }
.summary__right { display: flex; align-items: center; gap: 8px; }

/* Spinner */
.spinner {
  width: 15px; height: 15px;
  border: 2px solid currentColor;
  border-right-color: transparent;
  border-radius: 50%;
  display: inline-block;
  animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn.is-loading { opacity: .85; pointer-events: none; }

/* ---------- 12. Pincode checker ---------- */
.pincode { display: flex; gap: var(--s-3); flex-wrap: wrap; }
.pincode input {
  flex: 1 1 200px;
  padding: 14px 18px;
  border-radius: var(--r-full);
  border: 1.5px solid var(--line);
  background: var(--surface);
  font-size: var(--t-base);
  letter-spacing: .06em;
}
.pincode input:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
.pincode__result { margin-top: var(--s-4); font-size: var(--t-base); font-weight: 600; display: none; align-items: center; gap: 9px; }
.pincode__result.is-visible { display: flex; }
.pincode__result[data-state="ok"] { color: var(--success); }
.pincode__result[data-state="no"] { color: var(--warning); }
.pincode__result[data-state="bad"] { color: var(--danger); }

/* ---------- 13. FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq__item { border-bottom: 1px solid var(--line); }
.faq__q {
  width: 100%; text-align: left;
  padding: var(--s-5) var(--s-1);
  display: flex; align-items: center; justify-content: space-between; gap: var(--s-4);
  font-size: var(--t-md); font-weight: 700; color: var(--ink);
}
.faq__q:hover { color: var(--brand-ink); }
.faq__chev { flex-shrink: 0; color: var(--ink-3); transition: transform .25s ease; }
.faq__q[aria-expanded="true"] .faq__chev { transform: rotate(180deg); color: var(--brand); }
.faq__a { display: none; padding: 0 var(--s-1) var(--s-5); }
.faq__a.is-open { display: block; }
.faq__a p { font-size: var(--t-base); color: var(--ink-2); max-width: 70ch; }

/* ---------- 14. CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, var(--teal-700), var(--teal-500));
  color: #fff;
  border-radius: var(--r-xl);
  padding: var(--s-8) var(--s-7);
  text-align: center;
  box-shadow: var(--sh-2);
}
.cta-band h2 { font-size: var(--t-2xl); margin-bottom: var(--s-3); text-wrap: balance; }
.cta-band p { color: rgba(255,255,255,.88); max-width: 54ch; margin: 0 auto var(--s-5); }
.cta-band__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); justify-content: center; }

/* ---------- 15. Footer ---------- */
.footer { background: var(--bg-alt); border-top: 1px solid var(--line); padding-block: var(--s-8) var(--s-6); }
.footer__grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: var(--s-6); }
.footer__about { font-size: var(--t-sm); color: var(--ink-2); margin-top: var(--s-3); max-width: 34ch; }
.footer h4 { font-size: var(--t-sm); margin-bottom: var(--s-4); }
.footer__links { display: flex; flex-direction: column; gap: 11px; }
.footer__links a { font-size: var(--t-sm); color: var(--ink-2); transition: color .15s ease; }
.footer__links a:hover { color: var(--brand-ink); }
.footer__contact p { font-size: var(--t-sm); color: var(--ink-2); margin-bottom: 8px; }
.footer__contact strong { color: var(--ink); }
.footer__bottom {
  margin-top: var(--s-7); padding-top: var(--s-5);
  border-top: 1px solid var(--line);
  display: flex; flex-wrap: wrap; gap: var(--s-3);
  align-items: center; justify-content: space-between;
  font-size: var(--t-xs); color: var(--ink-3);
}
.footer__disclaimer { max-width: 70ch; font-size: var(--t-xs); color: var(--ink-3); margin-top: var(--s-4); }

/* ---------- 16. Modal ---------- */
.modal {
  position: fixed; inset: 0; z-index: 120;
  background: rgba(5, 24, 29, .62);
  backdrop-filter: blur(4px);
  display: none;
  align-items: center; justify-content: center;
  padding: var(--s-5);
}
.modal.is-open { display: flex; animation: fade .18s ease; }
.modal__card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-7) var(--s-6) var(--s-6);
  width: 100%; max-width: 430px;
  text-align: center;
  box-shadow: var(--sh-3);
  position: relative;
  animation: pop .22s cubic-bezier(.2,.9,.3,1.2);
  max-height: 90vh; overflow-y: auto;
}
.modal__close { position: absolute; top: 14px; right: 14px; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; color: var(--ink-3); }
.modal__close:hover { background: var(--bg-alt); color: var(--ink); }
.modal__card h2 { font-size: var(--t-lg); margin-bottom: var(--s-2); }
.modal__card > p { font-size: var(--t-sm); color: var(--ink-2); margin-bottom: var(--s-5); }

.pass-code {
  font-family: var(--mono);
  font-size: 1.55rem; font-weight: 800; letter-spacing: .12em;
  color: var(--brand-ink);
  background: var(--bg-alt);
  border: 1.5px dashed var(--brand);
  border-radius: var(--r-sm);
  padding: var(--s-5) var(--s-3);
  margin-bottom: var(--s-3);
  user-select: all;
}
.pass-actions { display: flex; gap: var(--s-2); margin-bottom: var(--s-4); }
.pass-actions .btn { flex: 1; }
.pass-meta { font-size: var(--t-xs); color: var(--ink-3); margin-bottom: var(--s-5); }

@keyframes fade { from { opacity: 0 } }
@keyframes pop { from { opacity: 0; transform: translateY(12px) scale(.97) } }

/* ---------- 17. Toast ---------- */
.toast-host {
  position: fixed;
  left: 50%; bottom: 26px;
  transform: translateX(-50%);
  z-index: 200;
  display: flex; flex-direction: column; gap: var(--s-2);
  align-items: center;
  pointer-events: none;
  width: max-content; max-width: calc(100vw - 32px);
}
.toast {
  background: var(--toast-bg);
  color: var(--toast-fg);
  padding: 12px 20px;
  border-radius: var(--r-full);
  font-size: var(--t-sm); font-weight: 600;
  box-shadow: var(--sh-3);
  display: flex; align-items: center; gap: 9px;
  animation: toast-in .24s cubic-bezier(.2,.9,.3,1.2);
}
.toast svg { color: var(--toast-accent); flex-shrink: 0; }
@keyframes toast-in { from { opacity: 0; transform: translateY(14px) } }

/* ---------- 17b. Install prompt ---------- */
.install-bar {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translate(-50%, 140%);
  z-index: 150;
  width: min(560px, calc(100vw - 28px));
  display: flex;
  align-items: center;
  gap: var(--s-3);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-3);
  padding: var(--s-3) var(--s-4);
  transition: transform .38s cubic-bezier(.2, .9, .3, 1.1);
}
.install-bar.is-in { transform: translate(-50%, 0); }

.install-bar__icon {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  flex-shrink: 0;
  box-shadow: var(--sh-1);
}

.install-bar__body { display: flex; flex-direction: column; gap: 2px; min-width: 0; flex: 1; }
.install-bar__body strong { font-size: var(--t-base); font-weight: 800; line-height: 1.25; }
.install-bar__body span { font-size: var(--t-xs); color: var(--ink-2); line-height: 1.35; }
.install-bar__body em { font-style: normal; font-weight: 700; color: var(--ink); }

.install-bar__actions { display: flex; align-items: center; gap: var(--s-2); flex-shrink: 0; }
.install-bar__close {
  width: 32px; height: 32px;
  display: grid; place-items: center;
  border-radius: 50%;
  color: var(--ink-3);
  flex-shrink: 0;
}
.install-bar__close:hover { background: var(--bg-alt); color: var(--ink); }

@media (max-width: 620px) {
  .install-bar { bottom: 12px; padding: var(--s-3); gap: var(--s-3); }
  .install-bar__icon { width: 38px; height: 38px; }
  .install-bar__body strong { font-size: var(--t-sm); }
}

@media (prefers-reduced-motion: reduce) {
  .install-bar { transition: none; transform: translate(-50%, 0); }
}

/* ---------- 18. Page headers ---------- */
.page-head { padding-block: var(--s-8) var(--s-6); background: var(--bg-alt); border-bottom: 1px solid var(--line); }
.page-head h1 { font-size: var(--t-2xl); margin-bottom: var(--s-3); }
.page-head p { color: var(--ink-2); font-size: var(--t-md); max-width: 62ch; }

.breadcrumb { display: flex; gap: 8px; align-items: center; font-size: var(--t-xs); color: var(--ink-3); margin-bottom: var(--s-4); }
.breadcrumb a:hover { color: var(--brand-ink); }

/* ---------- 19. Notice ---------- */
.notice {
  display: flex; gap: var(--s-3); align-items: flex-start;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-left: 3px solid var(--brand);
  border-radius: var(--r-sm);
  padding: var(--s-4);
  font-size: var(--t-sm);
  color: var(--ink-2);
}
.notice svg { color: var(--brand); flex-shrink: 0; margin-top: 2px; }

/* ---------- 20. Scroll reveal ---------- */
.reveal-on { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.2,1); }
.reveal-on.is-in { opacity: 1; transform: none; }

/* ---------- 21. Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal-on { opacity: 1; transform: none; }
  .pass-card { transform: none; }
}

/* ---------- 22. Responsive ---------- */
@media (max-width: 1000px) {
  .tests-grid { grid-template-columns: repeat(2, 1fr); }
  .footer__grid { grid-template-columns: 1fr 1fr; gap: var(--s-6) var(--s-5); }
  .stats__card { grid-template-columns: repeat(2, 1fr); padding: var(--s-5); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 880px) {
  /* iOS Safari zooms the viewport when a focused control is under 16px */
  .field input, .field select, .field textarea,
  .search input, .pincode input { font-size: 16px; }

  /* Comfortable touch targets */
  .btn--sm { min-height: 44px; padding-block: 10px; }
  .icon-btn { width: 44px; height: 44px; }

  .nav-toggle { display: flex; }
  .nav {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 0;
    margin-left: 0;
    background: var(--surface);
    border-bottom: 1px solid var(--line);
    box-shadow: var(--sh-2);
    padding: var(--s-2) var(--s-5) var(--s-5);
  }
  .nav.is-open { display: flex; }
  .nav__link { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: var(--t-md); }
  .nav__link[aria-current="page"]::after { display: none; }
  .nav .nav__cta-mobile { display: inline-flex; margin-top: var(--s-4); border-bottom: none; }
  .header__cta-desktop { display: none; }

  .hero__grid { grid-template-columns: 1fr; gap: var(--s-7); }
  .hero__visual { order: -1; min-height: 280px; }
  .hero__chip--a { left: 2%; }
  .hero__chip--b { right: 2%; }
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .section { padding-block: var(--s-8); }
  .cta-band { padding: var(--s-7) var(--s-5); }
}

@media (max-width: 620px) {
  .announce__inner { padding: 9px 46px 9px var(--s-4); font-size: var(--t-xs); gap: 4px var(--s-3); }
  .announce__dot { display: none; }
  .ref-box__code { font-size: 1.05rem; }
  .pay { padding: var(--s-4); }
  .panel { padding: var(--s-6) var(--s-4); }
  .pass-panel { padding: var(--s-6) var(--s-4); }

  .tests-grid { grid-template-columns: 1fr; }
  .stats__card { grid-template-columns: 1fr; gap: var(--s-4); }
  .footer__grid { grid-template-columns: 1fr; }
  .container { padding-inline: var(--s-4); }
  .header__inner { padding-inline: var(--s-4); }
  .hero { padding-block: var(--s-6) calc(var(--s-8) + 40px); }
  .stats { margin-top: -44px; }
  .form { padding: var(--s-5) var(--s-4); }
  .hero__chip { font-size: var(--t-xs); padding: 8px 13px; }
  .tests-toolbar { flex-direction: column; align-items: stretch; }
  /* The toolbar is a column here, so flex-basis would apply to HEIGHT and
     stretch .search to 300px — which drops the absolutely-positioned
     search icon and clear button far below the input. */
  .search { max-width: none; flex: 0 0 auto; }
  .modal__card { padding: var(--s-6) var(--s-4) var(--s-5); }
  .pass-actions { flex-direction: column; }
}

/* ---------- 23. Print (LabPass) ---------- */
@media print {
  @page { margin: 14mm; }

  .header, .footer, .nav, .toast-host, .hero, .no-print, .btn,
  .breadcrumb, .page-head p, .notice, .announce,
  .install-bar { display: none !important; }
  body { background: #fff; color: #000; }
  .section { padding-block: 0; }
  .card { box-shadow: none; border: 2px solid #000; break-inside: avoid; }
  .modal { position: static; display: block !important; background: none; padding: 0; backdrop-filter: none; }
  .modal__card { box-shadow: none; border: 2px solid #000; max-width: 100%; animation: none; }
  .pass-code { border: 2px dashed #000; color: #000; background: #fff; }
  .badge { border: 1px solid #000; color: #000; background: #fff; }

  /* ---- LabPass: print the pass alone, on one page ----
     The pass is rendered inside the same card as the lookup form, so
     without this the printout also carries the page heading, the "Find
     my pass" blurb and both form fields — which spills onto a 2nd page. */
  .page-head,
  #pass-lookup-form,
  .lookup-result .pay,
  .lookup-result .pay__qr,
  .card > .section-head { display: none !important; }

  .lookup-result { margin-top: 0 !important; }

  /* Strip the surrounding card so the pass itself is the only frame. */
  .card:has(.pass-panel) {
    border: none !important;
    padding: 0 !important;
  }

  .pass-panel {
    border: 2px solid #000;
    border-radius: 10px;
    padding: 26px 22px;
    max-width: 460px;
    margin: 0 auto;
    break-inside: avoid;
    page-break-inside: avoid;
  }

  /* Identify the printout — the page heading is hidden above. */
  .pass-panel::before {
    content: "Labpass";
    display: block;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .18em;
    text-transform: uppercase;
    margin-bottom: 10px;
  }

  .pass-panel h2 { font-size: 17px; margin: 6px 0; }
  .pass-panel > p { font-size: 12px; margin-bottom: 14px; }
  .pass-panel .pass-code { font-size: 25px; padding: 14px 10px; margin-bottom: 10px; }
  .pass-panel .pass-meta { font-size: 11px; }

  /* The whole point of printing the pass is walking into the lab, so the
     address must survive onto paper. */
  .pass-lab {
    border: 1px solid #000;
    background: #fff;
    padding: 12px 14px;
    margin-top: 12px;
    break-inside: avoid;
  }
  .pass-lab__label { font-size: 9px; color: #000; }
  .pass-lab__name { font-size: 13px; }
  .pass-lab__addr { font-size: 12px; color: #000; }
}
