/* "Your account". Tokens from Alex's v2 mockup (MOCKUP_V2_REVIEW.md). Self-hosted Figtree only. No inline styles anywhere (CSP style-src 'self'). */
@font-face { font-family: 'Playfair Display'; font-style: italic; font-weight: 400; src: url(/fonts/playfair-display-latin-400-italic.woff2) format('woff2'); font-display: swap; }
@font-face { font-family: Figtree; src: url(/fonts/figtree-latin-wght-normal.woff2) format('woff2'); font-weight: 300 900; font-display: swap; }
:root {
  --ink: #14110F; --blue: #1B5C92; --blue-dk: #164B77; --muted: #5B5348; --line: #E0D9CC; --cream: #F6F3EE; --sand: #EFEAE0;
  --tint: #D5E2EC; --green: #D9E8E1; --white: #fff; --warn-bg: #FBEFD9; --focus: #1B5C92;
  --r-card: 22px; --r-pill: 99px; --max: 860px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: Figtree, system-ui, -apple-system, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.55; color: var(--ink); background: var(--sand); }
a { color: var(--blue); text-underline-offset: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1 { font-size: clamp(2rem, 6vw, 3.25rem); line-height: 1.08; font-weight: 800; letter-spacing: -0.02em; margin: 8px 0 20px; }
h1:focus { outline: none; }
h1:focus-visible { outline: 3px solid var(--focus); }
h2 { font-size: 1.15rem; font-weight: 700; margin: 0 0 6px; }
p { margin: 0 0 10px; }
strong { font-weight: 700; }

.skip { position: absolute; left: -9999px; top: 8px; background: var(--white); padding: 10px 14px; border-radius: var(--r-pill); z-index: 20; }
.skip:focus { left: 12px; }

.top { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px max(16px, env(safe-area-inset-left)); background: rgba(242, 237, 228, .96); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 800; letter-spacing: .04em; font-size: 15px; }
.brand small { font-weight: 600; color: var(--muted); font-size: 12px; }
#nav { display: flex; gap: 4px; background: var(--sand); border: 1px solid var(--line); border-radius: var(--r-pill); padding: 4px; }
#nav[hidden] { display: none; }
#nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: var(--r-pill); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; }
#nav a[aria-current="page"] { background: var(--blue); color: var(--white); }

main { max-width: var(--max); margin: 0 auto; padding: 24px 16px 120px; }
.card, .box, .task { background: var(--white); border-radius: var(--r-card); padding: 22px; margin: 0 0 14px; border: 1px solid var(--line); }
.card.narrow { max-width: 520px; }
.task.urgent { background: var(--tint); border-color: #BFD2E2; }
.task.info { background: var(--white); }
.task.quiet { background: var(--cream); }
.sub { font-size: 1.05rem; margin-bottom: 16px; }
.empty { background: var(--green); border-radius: var(--r-card); padding: 20px 22px; }
.fine { font-size: 15px; color: var(--muted); }
.loading { padding: 24px 4px; color: var(--muted); }
.gbtn { width: 100%; margin-top: 8px; gap: 8px; padding: 0 12px; white-space: nowrap; }
.glogo { width: 24px; height: 24px; flex: none; }  /* Google's official G mark, unmodified (signin-assets, Light/icon-only), served from our own host */
.or { text-align: center; color: var(--muted); margin: 14px 0 0; }
.foot-note { max-width: 520px; font-size: 15px; color: var(--muted); margin-top: 18px; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 14px 0 4px; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 22px; border-radius: var(--r-pill); border: 1.5px solid var(--ink);
  background: var(--white); color: var(--ink); font: inherit; font-weight: 700; font-size: 16px; text-decoration: none; cursor: pointer; }
.btn.primary { background: var(--blue); border-color: var(--blue); color: var(--white); }
.btn.primary:hover { background: var(--blue-dk); }
.btn:disabled { opacity: .55; cursor: progress; }
.linkbtn { background: none; border: 0; padding: 0; font: inherit; color: var(--blue); text-decoration: underline; cursor: pointer; min-height: 24px; }

form label { display: block; font-weight: 600; margin: 14px 0 6px; }
input { width: 100%; min-height: 48px; padding: 10px 14px; font: inherit; font-size: 17px; border: 1.5px solid #8A8172; border-radius: 14px; background: var(--white); color: var(--ink); }
input[aria-invalid="true"] { border-color: #A3261B; }
form .btn { margin-top: 16px; width: 100%; }

.live { position: fixed; left: 50%; transform: translateX(-50%); bottom: 88px; width: min(560px, calc(100% - 24px)); z-index: 15; }
.live p { margin: 8px 0 0; padding: 12px 16px; border-radius: 14px; background: var(--ink); color: var(--white); box-shadow: 0 6px 24px rgba(20, 17, 15, .2); }
.live a, .live .linkbtn { color: #BFD8EE; }
#alert p { background: #7A1D14; }


@media (max-width: 767px) {
  .top { justify-content: center; }
  #nav { position: fixed; bottom: 0; left: 0; right: 0; border-radius: 0; border: 0; border-top: 1px solid var(--line); background: rgba(246, 243, 238, .98);
    justify-content: space-around; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  #nav a { flex: 1; justify-content: center; padding: 0 6px; font-size: 14px; text-align: center; }
  .btn { width: 100%; }
}
@media (min-width: 768px) { .live { bottom: 24px; } }
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }


.dob { border: 0; padding: 0; margin: 14px 0 0; display: flex; gap: 10px; flex-wrap: wrap; }
.dob legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.dob span { flex: 1 1 64px; }
.dob span.y { flex: 2 1 96px; }
.dob label { font-weight: 500; margin: 0 0 4px; font-size: 15px; }

.pending { text-decoration: underline dotted #C77700; text-decoration-thickness: 2px; text-underline-offset: 3px; }
.sec { font-size: 1.15rem; font-weight: 700; margin: 22px 0 10px; }
.removed { color: var(--muted); }
.ord .st { margin-top: 6px; }


/* ===== Design pass 11/26: Alex v2 layout (pill nav, white cards, tiles, badges, order tracker) ===== */
.top { display: grid; grid-template-columns: 1fr max-content 1fr; padding: 14px max(20px, env(safe-area-inset-left)); background: rgba(239, 234, 224, .94); }
.top-end { justify-self: end; }
#nav { background: var(--white); box-shadow: 0 1px 2px rgba(20, 17, 15, .05); }
#nav a { gap: 8px; }
.ico { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
main { padding-top: 40px; }
h1 { margin: 0 0 28px; }
.card.narrow { margin: 24px max(0px, calc(50% - 260px)) 0; padding: 32px; box-shadow: 0 12px 40px rgba(20, 17, 15, .07); border: 0; }
.card.narrow h1 { font-size: clamp(1.9rem, 5vw, 2.4rem); margin-bottom: 18px; }
.foot-note { margin: 18px max(0px, calc(50% - 260px)) 0; text-align: center; }
.sub { color: var(--muted); max-width: 60ch; }
.sec { font-size: 1.35rem; font-weight: 800; letter-spacing: -.01em; margin: 36px 0 14px; }
.sec:first-of-type { margin-top: 0; }

.card, .box, .task { box-shadow: 0 1px 2px rgba(20, 17, 15, .04); }
.head { display: flex; gap: 14px; align-items: flex-start; }
.head > div { min-width: 0; }
.tile { flex: none; display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 14px; background: var(--tint); color: var(--blue-dk); font-weight: 800; font-size: 20px; }
.tile.muted { background: var(--sand); color: var(--muted); }
.tile.who { background: var(--ink); color: var(--white); border-radius: 50%; width: 44px; height: 44px; font-size: 17px; }

.task.saved { background: var(--white); border-left: 5px solid #E9A92A; }
.task.saved .lead { font-weight: 700; font-size: 1.08rem; margin-bottom: 4px; }
.grid { display: grid; gap: 14px; grid-template-columns: 1fr; margin-bottom: 8px; }
.grid .task { margin: 0; display: flex; flex-direction: column; }
.task.refill { background: var(--white); }
.task.refill .head { align-items: center; }
.pname { font-size: 1.4rem; font-weight: 800; letter-spacing: -.01em; margin: 0; }
.task.refill .actions { margin-top: 18px; }
.task.refill .fine { padding-top: 6px; }

.badge { display: inline-block; padding: 3px 10px; border-radius: var(--r-pill); font-size: 13px; font-weight: 700; line-height: 1.5; margin-bottom: 6px; background: var(--sand); color: var(--ink); }
.b-review, .b-approved { background: var(--tint); color: #123F66; }
.b-pharmacy { background: #FFE3A3; color: #4A3300; }
.b-shipped { background: var(--green); color: #1E4A36; }
.b-declined { background: #F3E1DE; color: #7A1D14; }
.ord h2 { font-size: 1.1rem; margin: 0; }
.live-ord { padding: 24px; }
.live-ord .st { margin: 14px 0 0; }

.trk { position: relative; list-style: none; margin: 20px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); }
.trk::before, .trk::after { content: ""; position: absolute; top: 5px; left: 12.5%; height: 4px; border-radius: 2px; }
.trk::before { right: 12.5%; background: var(--line); }
.trk::after { width: 0; background: var(--blue); }
.trk[data-at="review"]::after { width: 25%; }
.trk[data-at="approved"]::after { width: 37.5%; }
.trk[data-at="pharmacy"]::after { width: 50%; }
.trk[data-at="shipped"]::after { width: 75%; }
.trk li { position: relative; z-index: 1; padding-top: 24px; font-size: 13px; color: var(--muted); text-align: center; }
.trk li::after { content: ""; position: absolute; top: 0; left: calc(50% - 7px); width: 14px; height: 14px; border-radius: 50%; background: var(--white); border: 2.5px solid var(--line); box-sizing: border-box; }
.trk li.done, .trk li.cur { color: var(--ink); font-weight: 600; }
.trk li.done::after { background: var(--blue); border-color: var(--blue); }
.trk li.cur::after { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(27, 92, 146, .18); }

.row { display: flex; align-items: center; gap: 14px; background: var(--white); border: 1px solid var(--line); border-radius: 18px; padding: 14px 18px; margin: 0 0 10px; }
.row .grow, .pr .grow { flex: 1; min-width: 0; }
.row .st { margin: 2px 0 0; font-size: 15px; color: var(--muted); }

.panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--r-card); overflow: hidden; margin-bottom: 18px; }
.pr { display: flex; align-items: center; gap: 14px; padding: 18px 22px; border-top: 1px solid var(--line); }
.pr:first-child { border-top: 0; }
.pr p { margin: 0; }
.pr h2 { margin: 0 0 2px; }

@media (min-width: 768px) {
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 767px) {
  .top { grid-template-columns: 1fr; justify-items: center; }
  .top-end { display: none; }
  main { padding-top: 24px; }
  .card.narrow { padding: 24px 20px; margin-top: 4px; }
  .head { gap: 12px; }
  .tile { width: 42px; height: 42px; font-size: 18px; border-radius: 12px; }
  .row { align-items: flex-start; }
  .pr.wrap { flex-wrap: wrap; }
  .trk li { font-size: 12px; }
}

/* the page heading gets focus for screen readers on each view; it is not a control, so no visible ring */
h1[tabindex="-1"]:focus-visible { outline: none; }
.or { margin: 16px 0 12px; }


/* ===== Design v2 (11/26): site + checkout signature (RO_FORENSICS_V2_AND_DESIGN_PLAN.md §4) ===== */
:root { --page: #F2EDE4; --ease: cubic-bezier(.22, 1, .36, 1); --shadow: 0 1px 2px rgba(20, 17, 15, .04), 0 18px 40px -26px rgba(20, 17, 15, .18); --r-card: 26px; }
body { background: var(--page); }
::selection { background: var(--blue); color: var(--white); }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* V1 headline */
h1 { font-weight: 800; letter-spacing: -.045em; line-height: .95; }
.pf { font-family: 'Playfair Display', Georgia, serif; font-style: italic; font-weight: 400; letter-spacing: -.01em; font-size: 1.04em; }
.sec { letter-spacing: -.03em; }
.pname { letter-spacing: -.03em; }

/* V2 nav = site navpill */
.top { background: rgba(242, 237, 228, .94); border-bottom-color: rgba(20, 17, 15, .08); }
#nav { background: rgba(20, 17, 15, .06); border: 1px solid rgba(20, 17, 15, .1); box-shadow: none; padding: 5px; }
#nav a { color: var(--ink); border: 1px solid transparent; transition: background .2s, color .2s, box-shadow .2s; }
#nav a:hover { background: rgba(255, 255, 255, .55); }
#nav a[aria-current="page"] { background: var(--white); color: var(--blue); border-color: rgba(20, 17, 15, .16); box-shadow: 0 2px 9px -4px rgba(20, 15, 10, .28); }

/* V3 buttons = checkout CTA feel */
.btn { min-height: 52px; padding: 0 26px; transition: transform .18s var(--ease), box-shadow .22s var(--ease), background-color .18s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 16px 32px -14px rgba(20, 17, 15, .35); }
.btn.primary:hover { box-shadow: 0 16px 32px -14px rgba(27, 92, 146, .6); }
.btn:active { transform: translateY(0) scale(.97); transition-duration: .07s; }
.btn:disabled { transform: none; box-shadow: none; }
form .btn { min-height: 58px; font-size: 17px; }
.gbtn { min-height: 56px; }

/* V5 cards */
.card, .box, .task, .row, .panel { border-color: rgba(20, 17, 15, .08); box-shadow: var(--shadow); }
.row { border-radius: 20px; }
.card.narrow { box-shadow: 0 1px 2px rgba(20, 17, 15, .04), 0 30px 60px -30px rgba(20, 17, 15, .25); }

/* V4 house tiles */
.tile.h-kalos { background: #F6E3DF; color: #8E2A20; }
.tile.h-hygeia { background: #E3EADB; color: #3A5226; }
.tile.h-pan { background: var(--tint); color: var(--blue-dk); }
.tile.muted { filter: saturate(.35); opacity: .85; }

/* V6 skeleton */
.skel { display: grid; gap: 14px; }
.skel i { display: block; border-radius: var(--r-card); background: linear-gradient(90deg, rgba(20,17,15,.05) 25%, rgba(20,17,15,.09) 50%, rgba(20,17,15,.05) 75%); background-size: 200% 100%; animation: shimmer 1.2s linear infinite; }
.skel .sk-h { height: 54px; width: 55%; border-radius: 14px; margin-bottom: 10px; }
.skel .sk-c { height: 150px; }
.skel .sk-c.short { height: 90px; }
@keyframes shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* V7 code entry */
#cd { font-size: 28px; letter-spacing: .5em; text-align: center; font-weight: 700; padding-left: calc(14px + .5em); font-variant-numeric: tabular-nums; }

/* V8 track package as a pill */
.live-ord[data-status="shipped"] .st a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; margin-left: 6px; border-radius: var(--r-pill); background: var(--ink); color: var(--white); text-decoration: none; font-weight: 700; font-size: 15px; transition: transform .18s var(--ease); }
.live-ord[data-status="shipped"] .st a:hover { transform: translateY(-1px); }

/* V10 view fade */
#app.in > * { animation: rise .2s var(--ease) both; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

@media (max-width: 767px) {
  #nav { background: rgba(242, 237, 228, .98); border: 0; border-top: 1px solid rgba(20, 17, 15, .1); padding: 8px 10px calc(8px + env(safe-area-inset-bottom)); gap: 8px; }
  #nav a { background: rgba(20, 17, 15, .05); }
}
@media (prefers-reduced-motion: reduce) { .skel i { animation: none; } #app.in > * { animation: none; } .btn:hover, .btn:active { transform: none; } }


/* ===== Beta 3 (11/26): the v1 auto-renewal screens in design-v2 tokens. Only classes v2 lacked; v1 colours mapped to v2 tokens. ===== */
#nav a[hidden] { display: none; }
#nav.n4 a { padding: 0 14px; }
.btn.manage { margin: 0 0 22px; }
.btn.danger { background: var(--white); border-color: var(--ink); color: var(--ink); }
.note { background: var(--cream); border-radius: 14px; padding: 12px 14px; }
.note.warn { background: var(--warn-bg); }
.confirm { margin-top: 12px; background: var(--cream); border-radius: 14px; padding: 12px 14px; }
.confirm p { font-weight: 600; }
.box.plan { padding: 24px; }
.plan .pl-line { font-size: 1.3rem; font-weight: 800; letter-spacing: -.02em; margin-bottom: 10px; }
.plan .pl-pay { border-top: 1px solid rgba(20, 17, 15, .08); margin-top: 14px; padding-top: 14px; }
.plan .pl-pay p { margin-bottom: 4px; }
.plan.canceled { background: var(--cream); }
.payform { border: 1.5px solid rgba(27, 92, 146, .35); }
.task h2 { font-size: 1.15rem; }
.task.urgent .actions, .task.info .actions { margin-top: 16px; }
/* stub card form: local test only (stub-card.js is not shipped) */
.stubcard { border: 2px dashed #A3261B; border-radius: 14px; padding: 12px; }
.stubtag { font-size: 12px; font-weight: 800; color: #A3261B; letter-spacing: .05em; }
@media (max-width: 767px) {
  #nav.n4 { gap: 4px; padding-left: 6px; padding-right: 6px; }
  #nav.n4 a { flex-direction: column; justify-content: center; gap: 2px; padding: 4px 2px; font-size: 12px; line-height: 1.2; min-width: 0; }
  #nav.n4 a span { text-align: center; }
  .btn.manage { margin-bottom: 18px; }
}


/* ===== Beta 4 (11/26): Ro-style layout in Panterra's brand (portal/BETA4_RO_LAYOUT.md). CSS only; no images in main, no new hosts. ===== */
:root { --col: 600px; --glass: rgba(255, 255, 255, .13); --glass-b: rgba(255, 255, 255, .22); --deep: #0E3556; }
main { max-width: calc(var(--col) + 32px); padding-top: 28px; }

/* floating nav pill (Ro): white tray, soft shadow, active = tinted pill */
.top { position: sticky; top: 0; background: linear-gradient(var(--page) 70%, rgba(242, 237, 228, 0)); border-bottom: 0; padding-top: 12px; padding-bottom: 14px; }
#nav { background: rgba(255, 255, 255, .92); border: 1px solid rgba(20, 17, 15, .07); box-shadow: 0 1px 2px rgba(20, 17, 15, .04), 0 10px 30px -12px rgba(20, 17, 15, .18); padding: 5px; gap: 2px; -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); }
#nav a { min-height: 44px; padding: 0 15px; font-size: 14.5px; font-weight: 600; }
#nav a:hover { background: rgba(20, 17, 15, .04); }
#nav a[aria-current="page"] { background: var(--page); color: var(--ink); border-color: transparent; box-shadow: inset 0 0 0 1px rgba(20, 17, 15, .06); }
#nav a[aria-current="page"] .ico { color: var(--blue); }

/* hero (Ro's home and product heroes): brand gradient + watermark mark, centred heading, glass quick actions */
.hero { position: relative; overflow: hidden; border-radius: 30px; padding: 44px 22px 22px; margin: 0 0 18px; color: #fff; text-align: center; isolation: isolate;
  background: radial-gradient(120% 80% at 50% -10%, rgba(255, 255, 255, .22), transparent 55%), linear-gradient(160deg, #2A71AC 0%, var(--blue) 38%, var(--deep) 100%);
  box-shadow: 0 30px 60px -34px rgba(14, 53, 86, .65); }
.hero::before { content: ""; position: absolute; z-index: -1; right: -40px; bottom: -60px; width: 260px; height: 330px; background: url(/img/mark.png) no-repeat center / contain; opacity: .07; filter: brightness(10); }
.hero::after { content: ""; position: absolute; z-index: -1; inset: 0; background: radial-gradient(60% 50% at 15% 110%, rgba(255, 200, 75, .18), transparent 70%); }
.hero.h-kalos { background: radial-gradient(120% 80% at 50% -10%, rgba(255, 255, 255, .2), transparent 55%), linear-gradient(160deg, #CF5A47 0%, #B8392C 40%, #6E1F16 100%); box-shadow: 0 30px 60px -34px rgba(110, 31, 22, .6); }
.hero.h-hygeia { background: radial-gradient(120% 80% at 50% -10%, rgba(255, 255, 255, .2), transparent 55%), linear-gradient(160deg, #6A8A4C 0%, #4A6632 42%, #263819 100%); box-shadow: 0 30px 60px -34px rgba(38, 56, 25, .6); }
.hero h1 { color: #fff; margin: 0 auto 12px; max-width: 16ch; font-size: clamp(2.3rem, 7vw, 3.3rem); }
.hero .pf { color: #FFE2A0; }
.hero.h-kalos .pf, .hero.h-hygeia .pf { color: #fff; }
.hero .sub, .hero .empty { color: rgba(255, 255, 255, .88); background: none; padding: 0; margin: 0 auto 4px; max-width: 42ch; font-size: 1.02rem; }
.hero .empty strong { color: #fff; }
.hero a:not(.qa) { color: #fff; }
.qas { display: grid; gap: 10px; margin-top: 30px; grid-template-columns: repeat(2, 1fr); text-align: left; }
.qas.n1 { grid-template-columns: 1fr; }
.qas.n3 { grid-template-columns: repeat(3, 1fr); }
.qas.n4 { grid-template-columns: repeat(4, 1fr); }
.qa { display: flex; flex-direction: column; justify-content: space-between; gap: 18px; min-height: 104px; padding: 16px 14px 14px; border-radius: 18px; border: 1px solid var(--glass-b);
  background: var(--glass); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); color: #fff; text-decoration: none; font: inherit; font-size: 14.5px; font-weight: 600; line-height: 1.25; text-align: left; cursor: pointer;
  transition: transform .18s var(--ease), background-color .18s; }
.qa .ico { width: 22px; height: 22px; stroke-width: 1.6; }
.qa:hover { background: rgba(255, 255, 255, .2); transform: translateY(-2px); }
.qa:active { transform: scale(.97); }
.qa:disabled { opacity: .6; cursor: progress; }
.qa:focus-visible { outline: 3px solid #fff; outline-offset: 2px; }
.qa .pending { text-decoration-color: #FFC84B; }

/* section rhythm: Ro's stacked white sheets */
.stack > .task:last-child { margin-bottom: 0; }
.sec { font-size: 1.3rem; margin: 34px 0 12px; }
.sec-link { display: inline-flex; align-items: center; gap: 4px; color: inherit; text-decoration: none; }
.sec-link .ico { width: 20px; height: 20px; color: var(--muted); transition: transform .18s var(--ease); }
.sec-link:hover .ico { transform: translateX(3px); }
.pad { padding: 0 6px; }
.db { display: block; }

/* treatment cards (Ro's goal cards): house-tinted, details link; horizontal rail on phones */
.rail { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
.rail.col { grid-template-columns: 1fr; }
.tcard { position: relative; display: flex; flex-direction: column; border-radius: 24px; padding: 20px; background: #fff; border: 1px solid rgba(20, 17, 15, .07); box-shadow: var(--shadow); overflow: hidden; }
.tcard::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 84px; z-index: 0; background: linear-gradient(180deg, var(--tint), rgba(255, 255, 255, 0)); }
.tcard.h-kalos::before { background: linear-gradient(180deg, #F6E3DF, rgba(255, 255, 255, 0)); }
.tcard.h-hygeia::before { background: linear-gradient(180deg, #E3EADB, rgba(255, 255, 255, 0)); }
.tcard > * { position: relative; z-index: 1; }
.tcard .head { align-items: center; }
.tcard .pname { font-size: 1.35rem; margin: 0; }
.tcard .actions { margin: 16px 0 0; }
.tcard .actions .btn { width: 100%; }
.tcard .fine { font-size: 13.5px; margin: 8px 0 0; }
.tlink { margin-top: auto; padding-top: 14px; display: inline-flex; align-items: center; gap: 2px; min-height: 44px; font-weight: 700; color: var(--ink); text-decoration: none; }
.tlink .ico { width: 18px; height: 18px; transition: transform .18s var(--ease); }
.tlink:hover .ico { transform: translateX(3px); }

/* orders: Ro's status bar on the left, whole card opens the details */
.ord { position: relative; }
.ord::before { content: ""; position: absolute; left: 0; top: 18px; bottom: 18px; width: 4px; border-radius: 0 4px 4px 0; background: var(--line); }
.ord.s-review::before, .ord.s-approved::before { background: var(--blue); }
.ord.s-pharmacy::before { background: #E9A92A; }
.ord.s-shipped::before { background: #2F7A55; }
.ord.s-declined::before { background: #A3261B; }
.stretch { color: inherit; text-decoration: none; }
.stretch::after { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 0; }
.stretch:focus-visible { outline: none; }
.stretch:focus-visible::after { outline: 3px solid var(--focus); outline-offset: 2px; }
.ord .st a, .ord .st .linkbtn, .ord .trk { position: relative; z-index: 1; }
.ord .head .go, .row.ord > .go { flex: none; width: 20px; height: 20px; color: var(--muted); align-self: center; }
.ord:has(.stretch):hover { box-shadow: 0 1px 2px rgba(20, 17, 15, .05), 0 24px 44px -26px rgba(20, 17, 15, .3); }

/* order details header (Ro: coloured status header) */
.ohead { border-radius: 28px; padding: 26px 22px; margin: 0 0 14px; background: var(--tint); }
.ohead.s-pharmacy { background: #FFF0CC; }
.ohead.s-shipped { background: var(--green); }
.ohead.s-declined { background: #F6E5E2; }
.ohead.s-unavailable { background: var(--cream); }
.ohead h1 { font-size: clamp(1.5rem, 5vw, 2rem); letter-spacing: -.03em; line-height: 1.1; margin: 0; }
.ohead .st { margin: 16px 0 0; }
.ohead.s-shipped .st a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; margin-left: 6px; border-radius: var(--r-pill); background: var(--ink); color: #fff; text-decoration: none; font-weight: 700; font-size: 15px; }

/* back chip */
.back { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; padding: 0 16px 0 10px; margin: 0 0 12px; border-radius: var(--r-pill); background: #fff; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 15px; box-shadow: var(--shadow); }
.back .ico { width: 18px; height: 18px; }

/* list rows with icon + chevron (Ro's Profile and Support lists) */
.ibox { flex: none; display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--page); color: var(--ink); }
.ibox.lg { width: 48px; height: 48px; border-radius: 14px; background: var(--tint); color: var(--blue-dk); }
.ibox .ico { width: 20px; height: 20px; }
.pr.link { color: var(--ink); text-decoration: none; min-height: 64px; transition: background-color .15s; }
.pr.link:hover { background: rgba(20, 17, 15, .025); }
.pr .go { flex: none; width: 18px; height: 18px; color: var(--muted); display: inline-flex; align-items: center; gap: 2px; font-weight: 700; font-size: 15px; }
span.go { width: auto; color: var(--ink); }
span.go .ico { width: 18px; height: 18px; }
.panel + .panel { margin-top: 0; }
.msgcard .head { align-items: center; }
.msgcard h2 { margin-bottom: 2px; }

/* Profile shortcut tiles (Ro: Orders · Membership) */
.scs { display: grid; gap: 10px; grid-template-columns: repeat(2, 1fr); }
.scs.n3 { grid-template-columns: repeat(3, 1fr); }
.scs.n1 { grid-template-columns: 1fr; }
.sc { display: flex; flex-direction: column; justify-content: space-between; gap: 16px; min-height: 92px; padding: 14px; border-radius: 16px; border: 1px solid rgba(20, 17, 15, .09); color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14.5px; line-height: 1.25; transition: transform .18s var(--ease), box-shadow .18s; }
.sc .ico { width: 22px; height: 22px; color: var(--blue); }
.sc:hover { transform: translateY(-2px); box-shadow: var(--shadow); }

@media (max-width: 767px) {
  main { padding-top: 16px; }
  .top { position: static; background: none; padding-bottom: 4px; }
  /* phone: Ro-app bottom tab bar, icon over label */
  #nav { position: fixed; left: 10px; right: 10px; bottom: calc(10px + env(safe-area-inset-bottom)); top: auto; border-radius: 26px; padding: 6px; gap: 2px; justify-content: space-between;
    background: rgba(255, 255, 255, .94); border: 1px solid rgba(20, 17, 15, .08); box-shadow: 0 18px 40px -16px rgba(20, 17, 15, .35); }
  #nav a { flex: 1 1 0; min-width: 0; flex-direction: column; justify-content: center; gap: 3px; min-height: 54px; padding: 4px 2px; font-size: 11.5px; line-height: 1.15; border-radius: 20px; background: none; text-align: center; }
  #nav a .ico { width: 21px; height: 21px; }
  #nav a span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
  #nav a[aria-current="page"] { background: var(--page); }
  .live { bottom: calc(96px + env(safe-area-inset-bottom)); }
  .hero { border-radius: 26px; padding: 36px 14px 14px; }
  .qas.n3, .qas.n4 { grid-template-columns: repeat(2, 1fr); }
  .qa { min-height: 92px; }
  .rail { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 82%; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 -16px; padding: 4px 16px 18px; scrollbar-width: none; }
  .rail::-webkit-scrollbar { display: none; }
  .rail > .tcard { scroll-snap-align: start; }
  .rail.col { grid-auto-flow: row; grid-auto-columns: auto; grid-template-columns: 1fr; overflow: visible; margin: 0; padding: 0; }
  .scs.n3 { grid-template-columns: repeat(3, 1fr); }
  .sc { min-height: 84px; font-size: 13.5px; }
  body { padding-bottom: 20px; }
}
@media (prefers-reduced-motion: reduce) { .qa:hover, .qa:active, .sc:hover { transform: none; } }
.head .grow { flex: 1; }
.live-ord .head .go { align-self: center; }
#app > .sec { margin-top: 34px; }
#app > .hero + .sec { margin-top: 26px; }
.rail { margin-bottom: 14px; }
.rail:has(> .tcard:only-child) { grid-template-columns: 1fr; grid-auto-columns: 100%; }
span.go { white-space: nowrap; }
.ohead .badge { background: rgba(255, 255, 255, .7); }
@media (max-width: 767px) {
  .qas.n3 > :last-child { grid-column: 1 / -1; min-height: 72px; flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px; }
  .scs.n3 { grid-template-columns: repeat(2, 1fr); }
  .scs.n3 > :last-child { grid-column: 1 / -1; }
}
/* the phone tab bar always sits above the content (cards with position:relative painted over it) */
@media (max-width: 767px) { #nav { z-index: 30; } }

/* ---- Beta 5 part A: sign-in in the checkout's look (email, Or, Google white, Apple black); desktop adds a brand panel (CSS only, no words) ---- */
.signin { display: grid; grid-template-columns: minmax(0, 1fr); gap: 32px; max-width: 1120px; margin: 8px auto 0; align-items: stretch; }
.si-main { max-width: 480px; width: 100%; margin: 0 auto; padding: 8px 0 24px; }
.si-main h1 { font-family: Figtree, system-ui, sans-serif; font-style: normal; font-weight: 800; font-size: clamp(2.1rem, 6vw, 3.1rem); line-height: 1.04; letter-spacing: -.035em; color: #102033; margin: 8px 0 12px; }
.si-sub { color: var(--muted); font-size: 17px; margin: 0 0 22px; }
.si-main form label { margin-top: 0; }
.si-main input#em, .si-main input#cd { min-height: 58px; border-radius: 16px; font-size: 17px; padding: 0 18px; background: var(--white); }
.si-main form .btn { min-height: 58px; }
.si-or { display: flex; align-items: center; gap: 14px; margin: 22px 0 16px; color: #777; font-size: 15px; }
.si-or::before, .si-or::after { content: ""; flex: 1; border-top: 1px solid #D4D4D4; }
.si-main .gbtn { margin-top: 0; min-height: 56px; background: var(--white); border: 1px solid #CFCFCF; color: var(--ink); font-weight: 600; gap: 10px; }
.si-main .gbtn:hover { border-color: var(--ink); }
.abtn { width: 100%; min-height: 56px; margin-top: 12px; background: #000; border-color: #000; color: #fff; font-weight: 600; gap: 10px; }
.abtn:hover { background: #1d1d1f; }
.abtn .alogo { flex: none; color: #fff; }
.si-oa { font-size: 13.5px; line-height: 1.45; color: #555; margin: 14px 2px 0; }
.si-main .foot-note { margin: 28px 0 0; text-align: left; max-width: none; }
.si-main .card.narrow, .si-main > h1 + p { box-shadow: none; }
.si-panel { display: none; }
@media (min-width: 900px) {
  .signin { grid-template-columns: minmax(0, 460px) minmax(0, 520px); justify-content: center; gap: 64px; align-items: center; margin-top: 32px; }
  .si-main { margin: 0; padding: 0; }
  .si-main h1 { font-size: 2.75rem; }
  .si-panel { display: block; position: relative; border-radius: 32px; overflow: hidden; height: 620px;
    background: radial-gradient(120% 90% at 15% 10%, #2E77B3 0%, #1B5C92 45%, #102033 100%); box-shadow: 0 30px 60px -30px rgba(16, 32, 51, .55); }
  .si-mark { position: absolute; left: 50%; top: 50%; width: 46%; aspect-ratio: 22 / 28; transform: translate(-50%, -50%); background: url(/img/mark.png) center / contain no-repeat; opacity: .16; filter: brightness(0) invert(1); }
}
