/* The page for patients at /patients (views/public/patients.ejs), on top of home.css.
   Daylight Glass, with the violet patient hue leading. The first half (header, hero, sections,
   cards, steps, notes, FAQ, band) is shared with pharmacies.css and kept word for word the same
   there, apart from the hue tokens; the second half is this page's own.
   One radius per kind of thing: cards var(--rad-card), blocks inside a card --rad-inner, fields and
   QR boxes --rad-field, buttons and pills 999px. The audience mark (a soft blob here, a square for
   pharmacies) is the only shape that changes from page to page. */

body.patients {
  --c1: var(--pat-1); --c2: var(--pat-2); --rgb: var(--pat-rgb); --ci: var(--pat-ink); --ci2: var(--pat-ink-2);
  --b1: var(--pat-b1); --b2: var(--pat-b2);
  --mark: 58% 42% 55% 45% / 48% 58% 42% 52%;
  --mark-ink: #0c0a24;
  --rad-inner: 22px;
  --rad-field: 14px;
}
body.patients ::selection { background: rgba(var(--pat-rgb), .26); }

/* ───────────────────────── shared: header ───────────────────────── */
body.home .xc-top {
  position: relative; z-index: 2; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px;
  padding-top: calc(14px + env(safe-area-inset-top)); padding-bottom: 12px;
}
body.home .xc-nav { display: flex; align-items: center; gap: 4px; }
body.home .xc-nav a {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 14px; border-radius: 999px;
  font-size: 14.5px; font-weight: 550; color: var(--ink-2); text-decoration: none; white-space: nowrap;
  transition: background-color .2s, color .2s, box-shadow .2s;
}
body.home .xc-nav a:hover { color: var(--ink); background: rgba(255, 255, 255, .7); }
body.home .xc-nav a:not(.xc-nav-plain)::before { content: ""; width: 7px; height: 7px; flex: none; border-radius: 50%; background: var(--dot); box-shadow: 0 0 8px var(--dot); }
body.home .xc-nav-doc { --dot: var(--doc-1); --dot-rgb: var(--doc-rgb); }
body.home .xc-nav-pat { --dot: var(--pat-1); --dot-rgb: var(--pat-rgb); }
body.home .xc-nav-pat::before { border-radius: 58% 42% 55% 45% / 48% 58% 42% 52% !important; }
body.home .xc-nav-ph { --dot: var(--ph-2); --dot-rgb: var(--ph-rgb); }
body.home .xc-nav-ph::before { border-radius: 1.5px !important; }
body.home .xc-nav a[aria-current="page"] {
  color: var(--ink); font-weight: 650; background: rgba(255, 255, 255, .9);
  box-shadow: inset 0 0 0 1px rgba(var(--dot-rgb), .5), 0 6px 18px -10px rgba(var(--dot-rgb), .9);
}
body.home .xc-nav-plain { border: 1px solid rgba(12, 19, 36, .12); background: rgba(255, 255, 255, .5); }
/* A phone: the three audiences become a row of their own under the logo, and Pricing stays up
   beside the logo, so nothing is hidden behind a menu. No backdrop-filter on that row: it would
   become the containing block of the Pricing pill and pull it down into the row. */
@media (max-width: 759px) {
  body.home .xc-nav {
    flex: 1 0 100%; gap: 2px; padding: 3px; border-radius: 999px;
    background: rgba(255, 255, 255, .74); box-shadow: inset 0 0 0 1px rgba(12, 19, 36, .08), 0 8px 24px -18px rgba(var(--shade), .4);
  }
  body.home .xc-nav a:not(.xc-nav-plain) { flex: 1 1 auto; gap: 6px; padding: 0 8px; font-size: clamp(13px, 3.6vw, 14.5px); }
  body.home .xc-nav-plain { position: absolute; top: calc(14px + env(safe-area-inset-top)); right: var(--gutter-r); }
}

/* ───────────────────────── shared: hero ───────────────────────── */
/* home.css turns .home-main into the live page's two-column grid on a desktop; these pages stack
   their own sections, so it stays a plain block (it keeps home-main for the overflow clip). */
body.home .xc-main { display: block; }
body.home .xc-hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; padding-top: clamp(22px, 5vw, 48px); }
body.home .xc-hero-copy { display: grid; justify-items: start; }
body.home .xc-eyebrow { margin-bottom: 18px; }
body.home .xc-spark { position: relative; width: 8px; height: 8px; flex: none; border-radius: var(--mark); background: var(--c1); box-shadow: 0 0 10px var(--c1); }
body.home .xc-spark::after { content: ""; position: absolute; inset: -4px; border-radius: inherit; border: 1px solid var(--c1); opacity: 0; animation: home-ping 3.2s ease-out infinite; }
body.home .xc-hue-text {
  display: inline-block; padding-bottom: .06em;
  background: linear-gradient(100deg, var(--ci) 10%, var(--ci2) 90%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
body.home .xc-jumps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
body.home .xc-jumps a {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px 0 18px; border-radius: 999px;
  font-size: 15px; font-weight: 600; color: var(--ink); text-decoration: none;
  background: rgba(255, 255, 255, .62); box-shadow: inset 0 0 0 1px rgba(var(--rgb), .34), 0 8px 20px -16px rgba(var(--rgb), .9);
  transition: background-color .2s, box-shadow .2s;
}
body.home .xc-jumps a:hover { background: rgba(255, 255, 255, .9); box-shadow: inset 0 0 0 1px rgba(var(--rgb), .6), 0 10px 24px -14px rgba(var(--rgb), .9); }
body.home .xc-jumps svg { width: 16px; height: 16px; fill: none; stroke: var(--ci); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transform: rotate(90deg); }
/* The card that does the job of the page (sign in here, check a code on the other) sits beside the
   headline on a desktop and right under it on a phone. */
body.home .xc-lead { align-self: start; }
@media (min-width: 960px) {
  body.home .xc-hero { grid-template-columns: minmax(0, 1.08fr) minmax(0, .92fr); align-items: center; column-gap: 56px; min-height: min(640px, calc(100vh - 90px)); padding-bottom: 24px; }
  body.home .xc-lead { align-self: center; }
}

/* ───────────────────────── shared: sections and cards ───────────────────────── */
body.home .xc-sec { margin-top: clamp(64px, 9vw, 112px); scroll-margin-top: 16px; }
body.home .xc-sec-head { display: grid; gap: 10px; max-width: 40em; margin-bottom: clamp(20px, 3vw, 30px); }
body.home .xc-kicker { font: 600 12.5px/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--ci); }
body.home .xc-h2 { font: 740 clamp(1.85rem, 6.6vw, 2.75rem)/1.06 var(--display); letter-spacing: -.036em; color: var(--ink); text-wrap: balance; }
body.home .xc-intro { font-size: clamp(16px, 1.3vw, 18px); color: var(--ink-2); max-width: 36em; text-wrap: pretty; }
body.home .xc-card {
  position: relative; padding: clamp(22px, 3.2vw, 38px); border-radius: var(--rad-card);
  background: linear-gradient(180deg, rgba(255, 255, 255, .84), rgba(255, 255, 255, .6) 60%), rgba(255, 255, 255, .32);
  -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .9), 0 0 0 1px rgba(var(--shade), .05), 0 16px 40px -28px rgba(var(--shade), .22);
}
@media (max-width: 759px) { body.home .xc-card { -webkit-backdrop-filter: blur(14px) saturate(160%); backdrop-filter: blur(14px) saturate(160%); } }
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) { body.home .xc-card { background: #fff; } }
/* Heading on the left, card on the right, once there is room for both. */
@media (min-width: 960px) {
  body.home .xc-split { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); column-gap: 56px; align-items: start; }
  body.home .xc-split > .xc-sec-head { position: sticky; top: 24px; margin-bottom: 0; }
}

/* A calm aside inside a card, in the page's hue. */
body.home .xc-note {
  padding: 14px 16px; border-radius: var(--rad-inner); font-size: 14.5px; color: var(--ink-2);
  background: rgba(var(--rgb), .08); box-shadow: inset 0 0 0 1px rgba(var(--rgb), .26);
}
body.home .xc-caption { margin-top: 14px; text-align: center; font-size: 13.5px; color: var(--ink-3); }

/* Numbered steps, each number on the page's own mark. */
body.home .xc-steps { display: grid; gap: 20px; counter-reset: xc-step; }
body.home .xc-steps li { position: relative; display: grid; gap: 3px; min-height: 36px; padding-left: 52px; counter-increment: xc-step; font-size: 15.5px; color: var(--ink-2); }
body.home .xc-steps li::before {
  content: counter(xc-step); position: absolute; left: 0; top: -3px; display: grid; place-items: center; width: 36px; height: 36px;
  border-radius: var(--mark); font: 750 15px/1 var(--display); color: var(--mark-ink);
  background: linear-gradient(140deg, var(--c1), var(--c2));
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .35) inset, 0 6px 16px -8px var(--c1);
}
body.home .xc-steps h3 { font: 700 17.5px/1.3 var(--display); letter-spacing: -.012em; color: var(--ink); }
body.home .xc-steps p { text-wrap: pretty; }

/* Plain statements with a tick on the page's mark. */
body.home .xc-points { display: grid; gap: 16px; }
body.home .xc-points li { position: relative; padding-left: 34px; font-size: 15.5px; color: var(--ink-2); }
body.home .xc-points li::before {
  content: ""; position: absolute; left: 0; top: .2em; width: 20px; height: 20px; border-radius: var(--mark);
  background: rgba(var(--rgb), .14); box-shadow: inset 0 0 0 1.5px rgba(var(--rgb), .7);
}
body.home .xc-points li::after {
  content: ""; position: absolute; left: 7.5px; top: calc(.2em + 4px); width: 5px; height: 9px;
  border: solid var(--ci); border-width: 0 2px 2px 0; transform: rotate(45deg);
}
body.home .xc-points b { color: var(--ink); font-weight: 650; }

/* The scanner's corner brackets, drawn around whatever QR they sit on. */
body.home .xc-aim {
  --l: 22px;
  position: absolute; inset: -9px; z-index: 1; pointer-events: none;
  border: 2px solid #f08a3c; border-radius: var(--rad-field);
  -webkit-mask:
    linear-gradient(#000 0 0) left top / var(--l) var(--l), linear-gradient(#000 0 0) right top / var(--l) var(--l),
    linear-gradient(#000 0 0) left bottom / var(--l) var(--l), linear-gradient(#000 0 0) right bottom / var(--l) var(--l);
  -webkit-mask-repeat: no-repeat;
  mask:
    linear-gradient(#000 0 0) left top / var(--l) var(--l), linear-gradient(#000 0 0) right top / var(--l) var(--l),
    linear-gradient(#000 0 0) left bottom / var(--l) var(--l), linear-gradient(#000 0 0) right bottom / var(--l) var(--l);
  mask-repeat: no-repeat;
  filter: drop-shadow(0 0 4px rgba(var(--ph-rgb), .55));
}

/* FAQ: plain <details>, every answer in the HTML; public/js/faq.js slides them (.is-shutting while one closes). */
body.home .xc-faq { padding-block: 8px; }
body.home .xc-faq details + details { border-top: 1px solid var(--line); }
body.home .xc-faq summary {
  display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; padding: 14px 0;
  cursor: pointer; list-style: none; font: 650 17px/1.35 var(--display); letter-spacing: -.01em; color: var(--ink);
  border-radius: 10px;
}
body.home .xc-faq summary::-webkit-details-marker { display: none; }
body.home .xc-faq summary svg {
  width: 22px; height: 22px; padding: 3px; flex: none; border-radius: 50%; fill: none; stroke: var(--ci); stroke-width: 2.4; stroke-linecap: round;
  background: rgba(var(--rgb), .12); transition: transform .25s cubic-bezier(.2, .8, .2, 1);
}
body.home .xc-faq details[open]:not(.is-shutting) summary svg { transform: rotate(45deg); }
body.home .xc-faq details p { padding: 0 38px 18px 0; font-size: 15.5px; color: var(--ink-2); text-wrap: pretty; transition: opacity .25s cubic-bezier(.2, .8, .2, 1), transform .35s cubic-bezier(.2, .8, .2, 1); }
body.home .xc-faq details[open] p { animation: xc-up .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes xc-up { from { opacity: 0; transform: translateY(18px); } }
body.home .xc-faq details.is-shutting p { opacity: 0; transform: translateY(-6px); }

/* The closing band. */
body.home .xc-band { display: grid; justify-items: center; gap: 12px; text-align: center; overflow: hidden; isolation: isolate; }
body.home .xc-band::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit;
  background: radial-gradient(80% 120% at 50% 120%, rgba(var(--rgb), .2), rgba(var(--rgb), 0) 70%);
}
body.home .xc-band-h { font: 740 clamp(1.6rem, 5.6vw, 2.3rem)/1.1 var(--display); letter-spacing: -.034em; color: var(--ink); text-wrap: balance; }
body.home .xc-band p { color: var(--ink-2); font-size: 16.5px; }
body.home .xc-band .home-btn { margin-top: 8px; }
body.home .xc-band .home-btn svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
body.home .xc-band .xc-band-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 12px; }
body.home .xc-btn-doc { --b1: var(--doc-b1); --b2: var(--doc-b2); --rgb: var(--doc-rgb); }
body.home .xc-link {
  display: inline-flex; align-items: center; min-height: 52px; padding: 0 12px; font-weight: 600; color: var(--ink);
  text-decoration: underline; text-decoration-color: rgba(12, 19, 36, .28); text-underline-offset: 4px;
}
body.home .xc-link:hover { text-decoration-color: currentColor; }

/* ───────────────────────── this page: what you get ───────────────────────── */
/* Soft blobs strung on a line: down the card on a phone, across it on a desktop. */
body.patients .xp-path { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); gap: 28px; }
body.patients .xp-path::before {
  content: ""; position: absolute; left: 21px; top: 22px; bottom: 22px; width: 2px; border-radius: 2px;
  background: linear-gradient(180deg, var(--pat-1), var(--pat-2) 70%, rgba(98, 147, 255, .15));
}
body.patients .xp-path li { position: relative; display: grid; gap: 4px; align-content: start; min-height: 44px; padding-left: 64px; }
body.patients .xp-node {
  position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 44px; height: 44px;
  border-radius: var(--mark); color: var(--mark-ink);
  background: linear-gradient(140deg, var(--pat-1), var(--pat-2));
  box-shadow: 0 0 0 5px #fafbfe, 0 0 16px rgba(var(--pat-rgb), .55);
}
body.patients .xp-node svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
body.patients .xp-when { font: 600 12px/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--pat-ink); padding-top: 2px; }
body.patients .xp-path h3 { font: 700 19px/1.25 var(--display); letter-spacing: -.016em; color: var(--ink); }
body.patients .xp-path li > p:last-child { margin-top: 2px; font-size: 15.5px; color: var(--ink-2); text-wrap: pretty; }
@media (min-width: 900px) {
  body.patients .xp-path { grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: 28px; }
  body.patients .xp-path::before {
    left: 22px; right: calc((100% - 84px) / 4 - 22px); top: 21px; bottom: auto; width: auto; height: 2px;
    background: linear-gradient(90deg, var(--pat-1), var(--pat-2));
  }
  body.patients .xp-path li { padding: 66px 0 0; }
}

/* ───────────────────────── this page: at the pharmacy ───────────────────────── */
body.patients .xp-counter { display: grid; grid-template-columns: minmax(0, 1fr); gap: 36px; overflow: hidden; }
body.patients .xp-counter-copy { display: grid; gap: 20px; align-content: start; }
body.patients .xp-counter-copy .xc-h2 { margin-top: -10px; }
@media (min-width: 860px) {
  body.patients .xp-counter { grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); column-gap: 48px; align-items: center; }
}

/* A phone, drawn rather than photographed: a light frame around the page a pharmacist sees. */
body.patients .xp-phone-fig { justify-self: center; width: 100%; max-width: 270px; }
body.patients .xp-phone {
  position: relative; padding: 10px; border-radius: 40px;
  background: linear-gradient(160deg, #ffffff, #e6e9f3);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .9), 0 0 0 1px rgba(var(--shade), .1), 0 40px 70px -34px rgba(var(--shade), .5), 0 0 60px -20px rgba(var(--pat-rgb), .5);
}
body.patients .xp-phone::before {
  content: ""; position: absolute; top: 18px; left: 50%; z-index: 1; width: 64px; height: 18px; margin-left: -32px; border-radius: 999px;
  background: #0c1324;
}
body.patients .xp-screen {
  display: grid; gap: 12px; padding: 44px 16px 22px; border-radius: 30px; overflow: hidden;
  background: #f7f8fc; box-shadow: inset 0 0 0 1px rgba(12, 19, 36, .08);
  font-size: 12.5px; line-height: 1.4; color: var(--ink-2);
}
body.patients .xp-url {
  padding: 6px 12px; border-radius: 999px; background: #fff; box-shadow: inset 0 0 0 1px rgba(12, 19, 36, .08);
  font: 500 11px/1.3 var(--mono); color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: center;
}
body.patients .xp-ok {
  display: flex; gap: 8px; align-items: flex-start; padding: 10px 12px; border-radius: var(--rad-field);
  background: rgba(var(--doc-rgb), .12); box-shadow: inset 0 0 0 1px rgba(var(--doc-rgb), .45); color: var(--ink);
}
body.patients .xp-ok b { color: var(--doc-ink); }
body.patients .xp-ok-mark { display: grid; place-items: center; width: 18px; height: 18px; flex: none; margin-top: 1px; border-radius: 50%; background: var(--doc-b1); color: #fff; }
body.patients .xp-ok-mark svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
body.patients .xp-dr { display: grid; font: 650 13.5px/1.35 var(--display); color: var(--ink); }
body.patients .xp-dr span { font: 400 12px/1.4 var(--sans); color: var(--ink-3); }
body.patients .xp-qr {
  position: relative; justify-self: center; width: 148px; margin: 10px 0 4px; padding: 10px; border-radius: var(--rad-field);
  background: #fff; line-height: 0; box-shadow: 0 0 0 1px rgba(12, 19, 36, .1), 0 10px 24px -12px rgba(var(--shade), .4);
}
body.patients .xp-qr svg { display: block; width: 100%; height: auto; }
body.patients .xp-qr path[stroke] { stroke: var(--ink); }
body.patients .xp-code { text-align: center; font: 700 15px/1.3 var(--mono); letter-spacing: .08em; color: var(--ink); white-space: nowrap; }
body.patients .xp-valid { margin-top: -8px; text-align: center; font-size: 12px; color: var(--ink-3); }

/* Motion: the brackets breathe a little, as a viewfinder does while it looks for the code. */
@media (prefers-reduced-motion: no-preference) {
  body.patients .xp-qr .xc-aim { animation: xc-aim 3.6s ease-in-out infinite; }
}
@keyframes xc-aim { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.04); opacity: .7; } }
