/* The Rowan Clinic — Patient Portal · design system
   Principles: one clean sans, near-borderless surfaces, soft elevation,
   calm neutral canvas with a single green hero accent, strict 4pt rhythm.
   Type is Inter throughout — loaded once here, no per-page font links.

   BRAND IS TOKEN-CONTROLLED AND NOT YET FINAL. The visual identity is
   deliberately committed only at the token level (the "brand swap" block
   below). Re-skinning = changing those values; markup and component classes
   never reference raw colours. Illustration, iconography finalisation,
   motion and photography are intentionally deferred to the brand phase. */
@import url('https://fonts.googleapis.com/css2?family=Jost:wght@400;500;600;700&family=Playfair+Display:wght@500;600;700;800;900&display=swap');

:root{
  /* canvas & ink */
  --page:#F0EBE0; --paper:#FFFFFF; --raise:#F7F3E9;
  --backdrop:#8DAF96;   /* desktop frame backdrop only — NOT the app canvas */
  --ink:#1A3528; --muted:#54564E; --faint:#6F716A;
  --line:#E7E1D3; --line-2:#DCD5C5;

  /* brand + semantic (restrained: green is the only hero accent) */
  --green:#4A6C5A; --green-deep:#1A3528; --green-tint:#E7EEE9;
  --gold:#4A6C5A;                 /* progress / positive accent (aura) */
  --info:#0C447C; --info-tint:#E6F1FB;
  --amber:#8A5A12; --amber-tint:#FBEFD7;
  --alert:#A32828; --alert-tint:#FAEBE3;
  --alert-ink:#7E2424; --coral-line:#F5C4B3;   /* alert text/links + soft coral hairline (aura) */
  --cream:#FAEEDA; --cream-ink:#854F0B; --cream-deep:#412402;  /* warm tonal card (aura) */

  --focus:#4A6C5A;                /* keyboard focus ring = hero accent */

  --serif:'Jost',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
  --sans:'Jost',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;
  /* display = headings + brand only; body/UI stays Inter. Token-level &
     reversible — brand is still intentionally unsettled (a SANS face, so the
     prior 'serif = wrong register' rejection stands). */
  --display:'Playfair Display',Georgia,'Times New Roman',serif;

  /* scale */
  --r-sm:12px; --r-md:16px; --r-lg:22px; --r-pill:999px;
  --sh-1:0 0 0 1px var(--line-2);   /* aura: flat hairline border, not a drop shadow */
  --sh-2:0 0 0 1px var(--line-2);   /* aura: flat hairline border, not a drop shadow */
  --sh-hover:0 12px 28px -16px rgba(26,53,40,.3);  /* ink-derived lift for interactive cards */
}

*{box-sizing:border-box;margin:0;padding:0}
a{text-decoration:none;color:inherit}
button{font:inherit;cursor:pointer;color:inherit}
img,svg{display:block}
/* Icons standardised to the Lucide spec: the geometry is already Feather/
   Lucide; enforce uniform 2px stroke + round caps/joins so every icon across
   the prototype renders consistently. One rule, no dependency, offline-safe. */
svg[stroke]{stroke-width:2;stroke-linecap:round;stroke-linejoin:round}
/* icons inside tinted chip containers (stat cards, quick actions, feed rows)
   render at 17-22px — a lighter stroke keeps them delicate, matching the
   brand icon set's thinner line weight */
.si svg,.qi svg,.ci svg{stroke-width:1.5}

/* accessibility primitives (WCAG 2.2 AA is a build requirement) */
:focus-visible{outline:2px solid var(--focus);outline-offset:2px;border-radius:5px}
.apphead :focus-visible,.side :focus-visible{outline-color:#E7EEE9}
.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}
body{font-family:var(--sans);background:var(--page);color:var(--ink);
  line-height:1.5;-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;
  min-height:100vh;margin:0;padding:0}

/* Display face — headings + brand lockups only (one place; markup untouched).
   Everything else inherits Inter from body for clinical legibility. */
.brandmark .lg,.wordmark,.htitle,.hero,.greetblock h1,.center h4,.sheet h4,
.qbody h2,.map h1,.map h2,.side .brand{font-family:var(--display)}

/* ── app shell — sidebar + main on desktop, stacked on mobile ── */
.app{display:flex;height:100vh;height:100dvh}
.main{flex:1;min-width:0;display:flex;flex-direction:column;background:var(--page);overflow:hidden}

/* sidebar (desktop only — hidden on mobile) */
.side{display:none}

/* topbar (desktop only — hidden on mobile) */
.topbar{display:none}

/* header */
.apphead{display:flex;align-items:center;justify-content:space-between;
  padding:16px 20px;background:var(--green-deep);color:#E7EEE9;
  /* Compact, even 16px bar. Wordmark/avatar sit beside the centred notch, not
     under it, so no extra top clearance is needed in the frame. On a real
     notched phone env() adds only the actual status-bar inset. */
  padding-top:max(16px,env(safe-area-inset-top))}
.wordmark{font-size:17px;font-weight:600;letter-spacing:-.02em;
  display:flex;align-items:center;gap:9px;color:#fff}
.berry{width:9px;height:9px;border-radius:50%;background:#E7EEE9;opacity:.85}
.berry::after{content:none}
/* Brand logo (replaces the wordmark text) */
.brand-logo{display:block;width:auto;height:24px}
.side .brand .brand-logo{height:34px}
.wordmark .brand-logo{height:21px}
.auth-form .brand-logo{height:30px;margin-bottom:2px}
.brand-logo-lg{height:40px}
.brandmark .brand-logo{height:40px;margin:0 auto 10px}
.greet{font-size:12px;opacity:.72;font-weight:450;margin-top:3px;letter-spacing:0}
.avatar{width:34px;height:34px;border-radius:50%;background:rgba(255,255,255,.14);
  color:#E7EEE9;display:flex;align-items:center;justify-content:center;
  font-size:12px;font-weight:600;letter-spacing:.02em}
.back{display:flex;align-items:center;gap:6px;font-size:14px;font-weight:500;color:#E7EEE9}
.htitle{font-size:15px;font-weight:600;letter-spacing:-.01em}
.hicons{display:flex;align-items:center;gap:16px}
.hicons .bell{position:relative;display:inline-flex;opacity:.9}
.hicons .bell i{position:absolute;top:-2px;right:-3px;width:7px;height:7px;
  border-radius:50%;background:#A32828;box-shadow:0 0 0 2px var(--green)}

/* help dropdown */
.help-drop{position:relative;display:inline-flex}
.help-drop>button{background:none;border:none;padding:0}
.help-menu{display:none;position:absolute;top:calc(100% + 8px);right:0;z-index:100;
  min-width:180px;background:var(--paper);border-radius:var(--r-md);
  box-shadow:0 4px 24px rgba(0,0,0,.12),0 0 0 1px var(--line-2);
  padding:6px;overflow:hidden}
.help-drop.open .help-menu{display:block}
.help-menu a{display:flex;align-items:center;gap:10px;padding:10px 14px;
  border-radius:var(--r-sm);font-size:13.5px;font-weight:500;color:var(--ink)}
.help-menu a:hover{background:var(--raise)}
.help-menu a svg{flex:none;color:var(--muted)}

/* body & rhythm */
.body{flex:1;min-height:0;padding:22px 18px 104px;overflow-y:auto}
.body.flow{padding-bottom:26px}
/* auth/splash screens: vertically centre the content group */
.body.authcenter{display:flex;flex-direction:column;
  max-width:440px;margin-left:auto;margin-right:auto}
.body.authcenter>:first-child{margin-top:auto}
.body.authcenter>:last-child{margin-bottom:auto}
/* ── Desktop layout: sidebar + topbar ── */
@media (min-width:768px){
  /* hide mobile chrome, show desktop chrome */
  .apphead{display:none}
  .bnav{display:none}
  .topbar{display:flex;align-items:center;justify-content:space-between;
    padding:16px 36px;border-bottom:1px solid var(--line);background:var(--paper);flex:none}
  .crumbs{font-size:13px;color:var(--muted)}
  .crumbs .sep{margin:0 8px;color:var(--line-2)}
  .crumbs strong{color:var(--ink);font-weight:600}
  .tools{display:flex;align-items:center;gap:12px}
  .icon-btn{width:36px;height:36px;border-radius:10px;border:0;background:var(--raise);
    display:flex;align-items:center;justify-content:center;color:var(--muted);
    position:relative;cursor:pointer}
  .icon-btn:hover{background:var(--line)}
  .dot-n{position:absolute;top:6px;right:6px;width:7px;height:7px;border-radius:50%;
    background:#A32828;display:block}

  /* sidebar — green branded panel */
  .side{display:flex;flex-direction:column;width:240px;flex:none;background:var(--green-deep);
    border-right:none;padding:22px 16px;overflow-y:auto}
  .side .brand{display:flex;align-items:center;gap:10px;font-family:var(--display);
    font-size:16px;font-weight:600;color:#fff;letter-spacing:-.02em;padding:4px 8px;
    margin-bottom:24px}
  .side .brand .berry{width:10px;height:10px;border-radius:50%;background:#E7EEE9;opacity:.85}
  .nav-lab{font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.1em;
    color:rgba(255,255,255,.5);padding:0 8px;margin:20px 0 8px}
  .nav-lab:first-of-type{margin-top:0}
  .side .nav{display:flex;flex-direction:column;gap:2px}
  .side .nav a{display:flex;align-items:center;gap:10px;padding:9px 10px;border-radius:10px;
    font-size:13.5px;font-weight:500;color:rgba(255,255,255,.72);letter-spacing:-.01em}
  .side .nav a svg{flex:none;color:rgba(255,255,255,.5);stroke:currentColor}
  .side .nav a:hover{background:rgba(255,255,255,.1);color:#fff}
  .side .nav a.on{background:rgba(255,255,255,.18);color:#fff;font-weight:600}
  .side .nav a.on svg{color:#fff}
  .side .nav a .count{margin-left:auto;font-size:11px;font-weight:700;background:#A32828;
    color:#fff;border-radius:var(--r-pill);padding:1px 7px;min-width:20px;text-align:center}
  .side-foot{margin-top:auto;border-top:1px solid rgba(255,255,255,.15);padding-top:16px}
  .side-foot .profile{display:flex;align-items:center;gap:10px;padding:8px;
    border-radius:10px;font-size:13px}
  .side-foot .profile:hover{background:rgba(255,255,255,.1)}
  .side-foot .avatar{width:32px;height:32px;border-radius:50%;background:rgba(255,255,255,.18);
    color:#E7EEE9;display:flex;align-items:center;justify-content:center;
    font-size:11px;font-weight:600;flex:none}
  .side-foot .who{display:flex;flex-direction:column;min-width:0}
  .side-foot .nm{font-weight:600;color:#fff;letter-spacing:-.01em;
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
  .side-foot .em{font-size:11px;color:rgba(255,255,255,.55);
    white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

  /* content area scales up */
  .body{padding:32px 36px 40px;overflow-y:auto}
  .greetblock{padding:4px 0 24px}
  .greetblock h1{font-size:56px}
  .greetblock .d{font-size:13px}
  .greetblock p{font-size:14.5px}
  .tcard{padding:28px;margin-bottom:16px}
  .trow{margin-bottom:18px}
  .tlabel{font-size:13px}
  .badge{font-size:12px;padding:6px 13px}
  .hero{font-size:22px;margin-bottom:8px}
  .sub{font-size:14.5px;margin-bottom:22px}
  .btn{font-size:15px;padding:16px;max-width:380px}
  .panel{padding:22px;margin-bottom:16px}
  .eyebrow{font-size:12px;margin-bottom:16px}
  .sec-h{margin:28px 0 14px}
  .sec-h .t{font-size:20px}
  .ctiles{grid-template-columns:repeat(3,1fr);gap:14px}
  .ctile{padding:20px;border-radius:var(--r-lg)}
  .ctile .t{font-size:13px}
  .ctile .m{font-size:11px}
  .qgrid{grid-template-columns:repeat(3,1fr);gap:14px}
  .qtile{padding:26px;gap:12px;font-size:17px;border-radius:var(--r-lg)}
  .qtile .qi{width:42px;height:42px;border-radius:13px}
  .qtile .qi svg{width:28px;height:28px}
  .qtile .qm{font-size:12.5px;margin-top:-6px}
  .qtile .qa svg{width:16px;height:16px}
  .supportbar{padding:20px 22px;border-radius:var(--r-lg)}
  .supportbar .t{font-size:14px}
  .reassure{font-size:13.5px;padding:14px 18px}
}
@media (min-width:1024px){
  .side{width:260px;padding:24px 18px}
  .side .brand{font-size:17px;margin-bottom:28px}
  .topbar{padding:18px 48px}
  .body{padding:36px 48px 48px}
  .greetblock h1{font-size:68px}
  .greetblock p{font-size:15px}
  .tcard{padding:32px;margin-bottom:18px}
  .hero{font-size:24px}
  .sub{font-size:15px}
  .sec-h{margin:32px 0 15px}
  .sec-h .t{font-size:23px}
  .panel{padding:24px;margin-bottom:18px}
  .ctiles{grid-template-columns:repeat(3,1fr);gap:16px}
  .ctile{padding:22px}
  .ctile .t{font-size:13.5px}
  .qgrid{grid-template-columns:repeat(3,1fr);gap:16px}
  .qtile{padding:28px;gap:12px;font-size:18px}
  .qtile .qi{width:44px;height:44px;border-radius:14px}
  .qtile .qi svg{width:30px;height:30px}
  .qtile .qm{font-size:13px}
  .actsum{grid-template-columns:repeat(4,1fr);gap:14px}
  .actsum .n{font-size:24px}
  .supportbar{padding:22px 26px}
}
@media (min-width:1280px){
  .body{padding:40px 56px 56px}
  .greetblock h1{font-size:80px}
  .tcard{padding:34px}
  .hero{font-size:26px}
  .sub{font-size:15.5px}
  .panel{padding:26px}
  .ctiles{grid-template-columns:repeat(4,1fr)}
  .qgrid{grid-template-columns:repeat(4,1fr)}
  .qtile{padding:30px;gap:12px;font-size:19px}
  .qtile .qi{width:44px;height:44px;border-radius:14px}
  .qtile .qi svg{width:32px;height:32px}
  .qtile .qm{font-size:13.5px}
}
.eyebrow{font-size:11px;letter-spacing:.14em;text-transform:uppercase;
  color:var(--faint);font-weight:600;margin-bottom:14px}
.minifoot{font-size:11px;color:var(--muted);line-height:1.55;text-align:center;
  padding:18px 8px 2px}

/* primary treatment card */
.tcard{background:var(--paper);border-radius:var(--r-lg);padding:22px;
  margin-bottom:14px;box-shadow:var(--sh-2)}
.tcard.amber{background:var(--amber-tint);box-shadow:var(--sh-1)}
.tcard.alert{background:var(--alert-tint);box-shadow:var(--sh-1)}
.tcard.paused{background:var(--raise);box-shadow:var(--sh-1)}
.trow{display:flex;align-items:center;justify-content:space-between;margin-bottom:16px}
.tlabel{font-size:12px;color:var(--muted);font-weight:500;letter-spacing:.01em}
.badge{font-size:11px;font-weight:600;padding:5px 11px;border-radius:var(--r-pill);
  display:inline-flex;align-items:center;gap:6px;letter-spacing:.01em;white-space:nowrap}
.badge .dot{width:6px;height:6px;border-radius:50%;background:currentColor;opacity:.7}
.badge.ok{background:var(--green-tint);color:var(--green)}
.badge.review{background:var(--amber-tint);color:var(--amber)}
.badge.alert{background:var(--alert-tint);color:var(--alert)}
.badge.paused{background:#EAE8DF;color:var(--muted)}
.badge.info{background:var(--info-tint);color:var(--info)}
.hero{font-size:21px;font-weight:600;color:var(--ink);letter-spacing:-.02em;
  line-height:1.22;margin-bottom:7px}
.tcard.alert .hero{color:var(--alert)}
.sub{font-size:13.5px;color:var(--muted);margin-bottom:20px;line-height:1.5}
.reassure{font-size:12.5px;color:var(--amber);background:rgba(255,255,255,.6);
  border-radius:var(--r-sm);padding:12px 14px;margin-bottom:18px;line-height:1.5}
.reassure.good{color:var(--green);background:var(--green-tint)}

/* buttons */
.btn{display:block;width:100%;text-align:center;font-size:15px;font-weight:600;
  letter-spacing:-.01em;padding:15px;border-radius:14px;border:none;
  transition:transform .04s ease}
.btn:active{transform:scale(.992)}
.btn-primary{background:var(--green-deep);color:#fff}
.btn-primary.alert{background:var(--alert)}
/* primary CTAs carry a forward affordance icon */
.btn-primary::after{content:"→";display:inline-block;margin-left:9px;font-weight:600}
.btn-ghost{background:var(--paper);color:var(--ink);box-shadow:inset 0 0 0 1px var(--line-2);
  margin-top:10px}
.links{display:flex;flex-direction:column;margin-top:14px;border-top:1px solid var(--line);
  padding-top:4px}
.lnk{display:flex;align-items:center;justify-content:space-between;padding:13px 2px;
  font-size:13.5px;color:var(--ink);font-weight:500}
.lnk+.lnk{border-top:1px solid var(--line)}
.lnk svg{color:var(--faint)}
.lnk.quiet{color:var(--muted)}

/* bottom nav */
.bnav{background:var(--paper);border-top:1px solid var(--line);display:flex;
  padding:10px 0 30px;flex:none}
.bnav a{flex:1;text-align:center;font-size:10.5px;font-weight:600;color:var(--faint);
  display:flex;flex-direction:column;align-items:center;gap:5px;letter-spacing:.01em}
.bnav a.on{color:var(--green)}
/* hide the bottom nav on desktop — sidebar (.side) takes over.
   Must come after the base .bnav rule above to win on source order. */
@media (min-width:768px){.bnav{display:none}}

/* bottom sheet */
.dim{position:absolute;inset:0;background:rgba(20,19,16,.4);z-index:30;
  backdrop-filter:saturate(.9) blur(1px)}
.sheet{position:absolute;left:0;right:0;bottom:0;background:var(--paper);
  border-radius:26px 26px 0 0;padding:10px 22px 28px;z-index:31;
  box-shadow:0 -20px 50px -24px rgba(20,19,16,.4);max-height:86%;overflow-y:auto}
.grab{width:38px;height:4px;border-radius:2px;background:var(--line-2);margin:8px auto 18px}
.sheet h4{font-size:20px;font-weight:600;color:var(--ink);letter-spacing:-.02em;margin-bottom:7px}
.sheet p.sp{font-size:13px;color:var(--muted);margin-bottom:20px;line-height:1.5}
.ordline{display:flex;justify-content:space-between;font-size:14px;padding:13px 0;
  border-bottom:1px solid var(--line)}
.ordline .k{color:var(--muted)}
.ordline .v{font-weight:600;text-align:right}
.ordline.total{border-bottom:none;font-size:16px;padding-top:16px}
.consent{font-size:11.5px;color:var(--muted);background:var(--raise);
  border-radius:var(--r-sm);padding:13px 14px;margin:16px 0 18px;line-height:1.55}
.flabel{font-size:12px;font-weight:600;color:var(--muted);margin-bottom:10px;
  letter-spacing:.01em}

/* segmented + picker */
.seg{display:flex;gap:8px;margin:6px 0 20px;flex-wrap:wrap}
.seg .opt{flex:1;min-width:78px;text-align:center;font-size:13px;font-weight:600;
  padding:12px 8px;border-radius:var(--r-sm);color:var(--muted);
  box-shadow:inset 0 0 0 1px var(--line-2)}
.seg .opt.sel{color:var(--green);background:var(--green-tint);box-shadow:none}
.picker{border-radius:var(--r-md);overflow:hidden;margin-bottom:20px;background:var(--paper);
  box-shadow:inset 0 0 0 1px var(--line)}
.pi{display:flex;align-items:center;justify-content:space-between;padding:15px 16px;
  font-size:14px;border-bottom:1px solid var(--line)}
.pi:last-child{border-bottom:none}
.pi .chk{width:20px;height:20px;border-radius:7px;box-shadow:inset 0 0 0 1.5px var(--line-2)}
.pi.sel{background:var(--green-tint);color:var(--green);font-weight:600}
.pi.sel .chk{background:var(--green);box-shadow:none}

/* result screens */
.center{flex:1;display:flex;flex-direction:column;align-items:center;
  justify-content:flex-start;text-align:center;padding:84px 34px 44px}
.spinner{width:42px;height:42px;border-radius:50%;border:3px solid var(--line-2);
  border-top-color:var(--green);margin-bottom:24px;animation:spin 1s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}
.tick{width:58px;height:58px;border-radius:50%;background:var(--green-tint);display:flex;
  align-items:center;justify-content:center;margin-bottom:22px;color:var(--green)}
.warn{width:58px;height:58px;border-radius:50%;background:var(--alert-tint);display:flex;
  align-items:center;justify-content:center;margin-bottom:22px;color:var(--alert)}
.center h4{font-size:22px;font-weight:600;color:var(--ink);letter-spacing:-.02em;margin-bottom:10px}
.center p{font-size:13.5px;color:var(--muted);max-width:250px;margin-bottom:6px;line-height:1.55}
.center .onum{font-size:13px;font-weight:600;color:var(--ink);background:var(--raise);
  padding:7px 14px;border-radius:var(--r-sm);margin:10px 0 24px}

/* account */
.acct{border-radius:var(--r-md);overflow:hidden;background:var(--paper);
  margin-bottom:14px;box-shadow:var(--sh-1)}
.ar{display:flex;align-items:center;justify-content:space-between;gap:14px;
  padding:16px 18px;border-bottom:1px solid var(--line);font-size:14px}
.ar:last-child{border-bottom:none}
.ar .l{display:flex;flex-direction:column;min-width:0}
.ar>.badge,.ar>svg{flex:none}
.ar .l small{font-size:12px;color:var(--muted);margin-top:3px;font-weight:400}
.ar b{font-weight:600;letter-spacing:-.01em}
.ar.danger b{color:var(--alert)}
/* Account list — title left, description right (compact single-line rows) */
.ar.split .l{flex-direction:row;align-items:baseline;justify-content:space-between;gap:16px;flex:1;min-width:0}
.ar.split .l b{flex:none}
.ar.split .l small{margin-top:0;text-align:right;font-size:13.5px;color:var(--muted)}
.legalbox{font-size:11px;color:var(--faint);line-height:1.6;padding:6px 6px 0}

/* chat */
.bub-them{align-self:flex-start;max-width:82%;background:var(--paper);
  border-radius:18px 18px 18px 5px;padding:12px 15px;font-size:13.5px;
  line-height:1.5;box-shadow:var(--sh-1)}
.bub-me{align-self:flex-end;max-width:82%;background:var(--green);color:#fff;
  border-radius:18px 18px 5px 18px;padding:12px 15px;font-size:13.5px;line-height:1.5}
.bub-time{font-size:11px;color:var(--faint);margin-top:7px}
.bub-me .bub-time{color:rgba(255,255,255,.7)}
.composer{margin-top:auto;display:flex;gap:10px;align-items:center;
  border-top:1px solid var(--line);padding-top:16px}
.composer .field{flex:1;background:var(--raise);border-radius:var(--r-pill);
  padding:13px 18px;font-size:13px;color:var(--ink);box-shadow:inset 0 0 0 1px var(--line);
  border:none;font:inherit;outline:none;-webkit-appearance:none;appearance:none}
.composer .field::placeholder{color:var(--muted)}
.composer .field:focus{box-shadow:inset 0 0 0 2px var(--focus)}
.composer .send{width:44px;height:44px;border-radius:50%;background:var(--green-deep);
  display:flex;align-items:center;justify-content:center;color:#fff;flex:none;border:0}

/* ── rich home ───────────────────────────────────────────────── */
.greetblock{padding:6px 4px 18px}
.greetblock .d{font-size:12px;color:var(--faint);margin-bottom:6px;font-weight:500;
  letter-spacing:.02em}
.greetblock h1{font-size:44px;font-weight:600;letter-spacing:-.025em;
  color:var(--ink);margin-bottom:6px}
.greetblock p{font-size:13.5px;color:var(--muted);line-height:1.5}

.panel{background:var(--paper);border-radius:var(--r-lg);padding:20px;
  margin-bottom:14px;box-shadow:var(--sh-2)}
.panel .ph{display:flex;justify-content:space-between;align-items:flex-start;margin-bottom:14px}
.panel .ph [style*="font-weight:600"]{letter-spacing:-.01em}
.eyebrow2{font-size:10.5px;color:var(--faint);text-transform:uppercase;
  letter-spacing:.08em;margin-bottom:8px;font-weight:600}
.metric{display:flex;align-items:baseline;gap:8px}
.metric .big{font-size:34px;font-weight:600;line-height:1;color:var(--ink);
  letter-spacing:-.03em}
.metric .u{font-size:13px;color:var(--muted)}
.chip{display:inline-flex;align-items:center;gap:4px;padding:4px 9px;
  border-radius:var(--r-pill);background:var(--green-tint);color:var(--green);
  font-size:11px;font-weight:600;margin-left:8px}
.rangebtns{display:flex;gap:6px}
.rangebtns button{font-size:11px;font-weight:600;padding:5px 11px;border-radius:8px;
  background:transparent;color:var(--muted);box-shadow:inset 0 0 0 1px var(--line-2)}
.rangebtns button.on{background:var(--ink);color:var(--paper);box-shadow:none}
.stats{display:grid;grid-template-columns:1fr 1fr 1fr;margin-top:18px;padding-top:18px;
  border-top:1px solid var(--line)}
.stats .c{padding-left:16px}
.stats .c:first-child{padding-left:0}
.stats .c+.c{border-left:1px solid var(--line)}
.stats .lab{font-size:10px;color:var(--faint);text-transform:uppercase;
  letter-spacing:.07em;margin-bottom:5px;font-weight:600}
.stats .val{font-size:15px;font-weight:600;letter-spacing:-.01em}
.stats .sm{font-size:11px;color:var(--muted);margin-top:1px}
.stats .sm.accent{color:var(--gold)}

.duo{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:14px}
.tcardlite{border-radius:var(--r-lg);padding:18px;box-shadow:var(--sh-1)}
.tcardlite .top{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.tcardlite .k{font-size:10.5px;text-transform:uppercase;letter-spacing:.07em;font-weight:600}
.tcardlite .cd{display:flex;align-items:baseline;gap:6px;margin-bottom:3px}
.tcardlite .cd .big{font-size:30px;font-weight:600;line-height:1;letter-spacing:-.03em}
.tcardlite .ttl{font-size:15px;font-weight:600;margin-bottom:3px;letter-spacing:-.01em}
.tcardlite .meta{font-size:11.5px;margin-bottom:14px;line-height:1.45}
.tone-a{background:var(--green-tint)}
.tone-a .k,.tone-a .ic{color:var(--green)}
.tone-a .big{color:var(--green-deep)}.tone-a .meta{color:var(--green)}
.tone-a .btn-s{background:var(--green-deep);color:var(--green-tint)}
.tone-b{background:var(--cream)}
.tone-b .k,.tone-b .ic{color:var(--cream-ink)}
.tone-b .ttl{color:var(--cream-deep)}.tone-b .meta{color:var(--cream-ink)}
.tone-b .btn-s{background:var(--cream-deep);color:var(--cream)}
.btn-s{display:inline-flex;align-items:center;gap:6px;border:0;padding:9px 15px;
  border-radius:11px;font-size:12px;font-weight:600;letter-spacing:-.01em}

.dosegrid{display:grid;grid-template-columns:repeat(8,1fr);gap:7px}
.dosegrid .cell{text-align:center}
.dosegrid .box{height:36px;border-radius:9px;background:var(--green-tint);
  display:flex;align-items:center;justify-content:center;color:var(--green)}
.dosegrid .box.due{background:var(--paper);color:var(--alert);
  box-shadow:inset 0 0 0 1.5px var(--alert)}
.dosegrid .lab{font-size:10px;color:var(--faint);margin-top:5px;font-weight:500}
.dosegrid .lab.due{color:var(--alert);font-weight:600}
.note-row{font-size:12px;color:var(--muted);margin-top:16px;padding-top:14px;
  border-top:1px solid var(--line);display:flex;gap:7px;align-items:center;line-height:1.45}
.note-row a{color:var(--ink);font-weight:600}

.otrack{position:relative;padding:0 6px;margin-top:6px}
.otrack .bar{position:absolute;top:6px;left:14px;right:14px;height:2px;background:var(--line-2)}
.otrack .fill{position:absolute;top:6px;left:14px;height:2px;background:var(--info)}
.otrack .row{display:grid;grid-template-columns:repeat(5,1fr);position:relative}
.otrack .s{text-align:center}
.otrack .nd{width:14px;height:14px;border-radius:50%;margin:0 auto;background:var(--paper);
  box-shadow:inset 0 0 0 1.5px var(--line-2)}
.otrack .s.done .nd{background:var(--info);box-shadow:none;display:flex;
  align-items:center;justify-content:center}
.otrack .s.now .nd{background:var(--paper);box-shadow:inset 0 0 0 2px var(--info)}
.otrack .t1{font-size:10px;margin-top:8px;font-weight:600}
.otrack .t2{font-size:9px;color:var(--faint);margin-top:1px}
.otrack .s.muted .t1{color:var(--muted);font-weight:500}

/* soft tonal blocker card — calm warm surface, no shadow, no red rule */
.alert-tile{background:var(--paper);border-radius:var(--r-lg);padding:18px;
  margin-bottom:14px;box-shadow:0 0 0 1px var(--coral-line)}
.alert-tile .in{display:flex;gap:14px;align-items:flex-start}
.alert-tile .ico{width:38px;height:38px;border-radius:12px;background:var(--alert-tint);
  color:var(--alert);display:flex;align-items:center;justify-content:center;flex:none}
.alert-tile .ti2{font-size:14.5px;font-weight:600;margin-bottom:4px;letter-spacing:-.01em;
  color:var(--ink)}
.alert-tile .ds{font-size:12.5px;color:var(--muted);margin-bottom:14px;line-height:1.5}
.alert-tile a.u{display:inline-flex;align-items:center;gap:7px;background:var(--green-tint);
  color:var(--green-deep);font-size:12.5px;font-weight:600;padding:10px 17px;border-radius:14px;
  letter-spacing:-.01em;transition:transform .04s ease}
.alert-tile a.u::after{content:"→";font-weight:600}
.alert-tile a.u:active{transform:scale(.99)}

.sec-h{display:flex;justify-content:space-between;align-items:center;padding:0 2px;
  margin:24px 0 13px}
.sec-h .t{font-size:18px;font-weight:600;letter-spacing:-.015em}
.sec-h a{font-size:12px;color:var(--muted);font-weight:500}
.ctiles{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:14px}
.ctile{background:var(--paper);border-radius:var(--r-md);padding:15px;box-shadow:var(--sh-1)}
.ctile svg{color:var(--green);margin-bottom:10px}
.ctile .t{font-size:12px;font-weight:600;line-height:1.3;margin-bottom:3px;
  letter-spacing:-.01em}
.ctile .m{font-size:10px;color:var(--faint)}
.supportbar{display:flex;align-items:center;justify-content:space-between;
  padding:16px 18px;background:var(--cream);color:var(--cream-deep);border-radius:var(--r-md);
  box-shadow:var(--sh-1);margin-bottom:4px}
.supportbar .l{display:flex;align-items:center;gap:12px}
.supportbar .av{width:32px;height:32px;border-radius:50%;background:rgba(124,79,18,.12);
  display:flex;align-items:center;justify-content:center}
.supportbar .t{font-size:13px;font-weight:600;letter-spacing:-.01em}
.supportbar .m{font-size:11px;opacity:.66;margin-top:1px}

/* ── activity ────────────────────────────────────────────────── */
.actsum{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:18px}
.actsum .t{background:var(--paper);border-radius:var(--r-md);padding:15px 14px;
  box-shadow:var(--sh-1)}
.actsum .n{font-size:22px;font-weight:600;color:var(--ink);line-height:1;letter-spacing:-.02em}
.actsum .l{font-size:10px;color:var(--faint);margin-top:7px;text-transform:uppercase;
  letter-spacing:.06em;font-weight:600}
.chips{display:flex;gap:8px;overflow-x:auto;padding-bottom:4px;margin-bottom:20px;
  scrollbar-width:none}
.chips::-webkit-scrollbar{display:none}
.chips .ch{flex:none;font-size:12px;font-weight:600;padding:8px 14px;
  border-radius:var(--r-pill);color:var(--muted);background:var(--paper);
  box-shadow:inset 0 0 0 1px var(--line-2)}
.chips .ch.on{background:var(--ink);color:var(--paper);box-shadow:none}
.glabel{font-size:11px;font-weight:600;color:var(--faint);text-transform:uppercase;
  letter-spacing:.09em;margin:6px 2px 12px}
/* de-boxed: one quiet surface, hairline-separated rows */
.afeed{background:var(--paper);border-radius:var(--r-md);box-shadow:var(--sh-1);
  margin-bottom:20px;overflow:hidden}
.fitem{display:flex;gap:14px;align-items:flex-start;padding:16px 16px}
.fitem+.fitem{border-top:1px solid var(--line)}
.fitem .ci{width:34px;height:34px;border-radius:10px;flex:none;display:flex;
  align-items:center;justify-content:center}
.ci.order{background:var(--info-tint);color:var(--info)}
.ci.clin{background:var(--green-tint);color:var(--green)}
.ci.deliv{background:#EDEBE3;color:var(--muted)}
.ci.report{background:var(--alert-tint);color:var(--alert)}
/* bare brand icon variant — no chip tint, larger deep-green line icon */
.ci.bare{background:transparent;color:var(--green-deep)}
.fitem .ci.bare svg{width:30px;height:30px}
.fitem .fb{flex:1;min-width:0}
.fitem h5{font-size:15px;font-weight:600;letter-spacing:-.01em}
.fitem .fm{font-size:13px;color:var(--muted);margin-top:3px;line-height:1.45}
.fitem .ftag{display:inline-block;font-size:10px;font-weight:600;padding:3px 9px;
  border-radius:var(--r-pill);margin-top:9px;background:var(--green-tint);color:var(--green)}
.fitem .ftag.warn{background:var(--alert-tint);color:var(--alert)}
.fitem .ftag.info{background:var(--info-tint);color:var(--info)}
.fitem .fch{color:var(--faint);flex:none;align-self:center}

/* ── prototype screen map (index) ────────────────────────────── */
.map{max-width:780px;margin:0 auto;background:var(--paper);border-radius:var(--r-lg);
  padding:38px 34px;box-shadow:var(--sh-2)}
.map .kick{font-size:11px;letter-spacing:.16em;text-transform:uppercase;
  color:var(--green);font-weight:700}
.map h1{font-size:30px;font-weight:600;color:var(--ink);margin:10px 0 6px;letter-spacing:-.03em}
.map .lead{font-size:14px;color:var(--muted);margin-bottom:26px;line-height:1.55}
.map h2{font-size:13px;font-weight:600;color:var(--muted);text-transform:uppercase;
  letter-spacing:.08em;margin:26px 0 12px;border-top:1px solid var(--line);padding-top:22px}
.map .grp{display:grid;grid-template-columns:repeat(auto-fill,minmax(210px,1fr));gap:10px}
.map a.s{display:block;border-radius:var(--r-sm);padding:14px 16px;background:var(--raise);
  font-size:13.5px;font-weight:600;color:var(--ink);box-shadow:inset 0 0 0 1px var(--line);
  letter-spacing:-.01em;transition:transform .05s ease}
.map a.s:hover{transform:translateY(-1px)}
.map a.s small{display:block;font-weight:400;color:var(--muted);font-size:12px;margin-top:4px}
.map a.start{display:inline-block;background:var(--green-deep);color:#fff;font-weight:600;
  padding:14px 28px;border-radius:12px;margin-top:8px;letter-spacing:-.01em}
.map .note{font-size:11.5px;color:var(--faint);margin-top:28px;border-top:1px solid var(--line);
  padding-top:18px;line-height:1.6}

/* supply progress (home-repeat) */
.pbar{height:8px;border-radius:var(--r-pill);background:var(--green-tint);
  overflow:hidden;margin:8px 0 12px}
.pbar i{display:block;height:100%;background:var(--gold);border-radius:var(--r-pill)}
.pmeta{display:flex;justify-content:space-between;font-size:12px;color:var(--muted);
  font-weight:500}
.pnote{font-size:14px;color:var(--muted);margin-top:14px;line-height:1.5}

/* contextual severe-reaction escalation — loud, only in clinical-risk
   flows (report a side effect, pause, message). This is the real safety
   win: prominent exactly where a deteriorating patient is looking. */
.erflag{display:flex;gap:11px;align-items:flex-start;background:var(--alert-tint);
  color:var(--alert-ink);border-radius:var(--r-sm);padding:13px 15px;
  margin-bottom:16px;font-size:12.5px;line-height:1.5;
  box-shadow:inset 3px 0 0 var(--alert)}
.erflag svg{color:var(--alert);flex:none;margin-top:1px}
.erflag b{font-weight:600}
.erflag a{color:var(--alert-ink);font-weight:700;text-decoration:underline;
  text-underline-offset:2px}

/* support quick-grid (home-multi) — previously referenced but never
   defined; mirrors the .ctile language so the screen renders as designed */
.qgrid{display:grid;grid-template-columns:repeat(3,1fr);gap:10px;margin-bottom:14px}
.qtile{background:var(--paper);border-radius:var(--r-md);padding:20px 16px;
  box-shadow:var(--sh-1);display:flex;flex-direction:column;align-items:flex-start;
  gap:12px;font-size:15px;font-weight:600;color:var(--ink);line-height:1.3;
  letter-spacing:-.01em}
/* brand icon set: bare deep-green line icons, no tinted chip behind them */
.qtile .qi{width:36px;height:36px;display:flex;align-items:center;
  justify-content:flex-start;flex:none}
.qtile .qi svg{width:26px;height:26px;color:var(--green-deep)}
.qtile .qm{font-size:11.5px;font-weight:450;color:var(--faint);line-height:1.4;
  margin-top:-4px}
.qtile .qa{margin-top:auto;color:var(--faint);opacity:.55}
.qtile .qa svg{width:14px;height:14px}

/* toggle switch — iOS-style; works off native <input type=checkbox> + sibling <span>.
   No JS required. Label wraps both; hidden checkbox drives :checked state. */
.tog{position:relative;display:inline-block;width:48px;height:28px;flex:none}
.tog input{position:absolute;opacity:0;width:0;height:0}
.tog .track{position:absolute;cursor:pointer;inset:0;background:var(--line-2);
  border-radius:28px;transition:background .2s}
.tog .track::after{content:"";position:absolute;left:3px;top:3px;width:22px;height:22px;
  background:#fff;border-radius:50%;transition:transform .2s;
  box-shadow:0 1px 3px rgba(0,0,0,.15)}
.tog input:checked+.track{background:var(--green)}
.tog input:checked+.track::after{transform:translateX(20px)}
.tog input:focus-visible+.track{outline:2px solid var(--focus);outline-offset:2px}

/* data slot — marks a value rendered by Nexus at runtime, never hardcoded.
   Used to prove the template is condition-agnostic while still satisfying
   the consent/GDPR duty to show the exact medicine + dose. */
.slot{background:var(--green-tint);color:var(--green-deep);font-weight:600;
  border-radius:6px;padding:1px 7px;box-decoration-break:clone;
  -webkit-box-decoration-break:clone;letter-spacing:0}
.slot-note{font-size:11px;color:var(--faint);line-height:1.5;margin-top:14px;
  display:flex;gap:7px;align-items:flex-start}
.slot-note svg{flex:none;margin-top:1px}

/* form primitives (login, update-payment) — real labels + inputs */
.fld{margin-bottom:16px}
.fld label{display:block;font-size:12px;font-weight:600;color:var(--muted);
  margin-bottom:7px;letter-spacing:.01em}
.fld input{width:100%;font:inherit;font-size:15px;color:var(--ink);
  background:var(--paper);border:1px solid var(--line-2);border-radius:var(--r-sm);
  padding:14px 15px;-webkit-appearance:none;appearance:none}
.fld input::placeholder{color:var(--faint)}
.fld input:focus{outline:2px solid var(--focus);outline-offset:2px;border-color:transparent}
.fld .hint{font-size:11.5px;color:var(--faint);margin-top:7px;line-height:1.5}
.formnote{font-size:11.5px;color:var(--faint);line-height:1.6;text-align:center;
  padding:16px 6px 2px}
.brandmark{display:flex;flex-direction:column;align-items:center;text-align:center;
  padding:14px 0 26px}
.brandmark .lg{display:flex;align-items:center;gap:9px;font-size:20px;font-weight:600;
  color:var(--ink);letter-spacing:-.02em}
.brandmark .lg .berry{width:11px;height:11px;border-radius:50%;background:var(--green);opacity:1}
.brandmark .sub{font-size:13px;color:var(--muted);margin-top:8px;line-height:1.5}

/* ── treatment check-in ──────────────────────────────────────────
   A clinician-reviewed submission, NOT self-logging and never charted
   back to the patient. Condition-agnostic: the question set is supplied
   by Nexus per module pack. Reuses .fld / .seg / .picker / .pi. */
.fld textarea{width:100%;font:inherit;font-size:14.5px;color:var(--ink);
  background:var(--paper);border:1px solid var(--line-2);border-radius:var(--r-sm);
  padding:13px 15px;min-height:84px;resize:vertical;line-height:1.5;
  -webkit-appearance:none;appearance:none}
.fld textarea::placeholder{color:var(--faint)}
.fld textarea:focus{outline:2px solid var(--focus);outline-offset:2px;border-color:transparent}
.steps{display:flex;align-items:center;gap:8px;margin:2px 2px 18px;font-size:11px;
  font-weight:600;color:var(--muted);letter-spacing:.02em}
.steps .track{flex:1;height:5px;border-radius:var(--r-pill);background:var(--line-2);
  overflow:hidden}
.steps .track i{display:block;height:100%;background:var(--green);border-radius:var(--r-pill)}
.fsec{margin:0 0 22px;border:0;padding:0;min-width:0}
.fsec>legend{display:block;width:100%;font-size:13px;font-weight:600;color:var(--ink);
  letter-spacing:-.01em;padding:0;margin-bottom:4px}
.fsec .fsub{font-size:12px;color:var(--muted);line-height:1.5;margin-bottom:12px}
/* native, working selection for check-in controls — no JS.
   Real radio/checkbox inside <label>; :checked drives the existing visual. */
.seg .opt,.picker .pi{cursor:pointer}
.seg .opt{display:flex;align-items:center;justify-content:center}
.picker .pi{position:relative}
.seg .opt>input,.picker .pi>input{position:absolute;width:1px;height:1px;
  opacity:0;margin:0;pointer-events:none}
.seg .opt:has(input:checked){color:var(--green);background:var(--green-tint);box-shadow:none}
.picker .pi:has(input:checked){background:var(--green-tint);color:var(--green);font-weight:600}
.picker .pi .chk{position:relative;flex:none}
.picker .pi:has(input:checked) .chk{background:var(--green);box-shadow:none}
.picker .pi:has(input:checked) .chk::after{content:"";position:absolute;left:7px;top:3px;
  width:5px;height:10px;border:solid #fff;border-width:0 2px 2px 0;transform:rotate(45deg)}
.seg .opt:has(input:focus-visible){outline:2px solid var(--focus);outline-offset:2px}
.picker .pi:has(input:focus-visible){outline:2px solid var(--focus);outline-offset:-2px}

/* ── one-question-at-a-time check-in (Typeform-style, no JS) ──────
   :target stepper. All steps live in one <form>, so native radio/
   checkbox/text answers persist as you move between questions. */
.qflow{display:flex;flex-direction:column;min-height:100%}
.q{display:none;flex:1;flex-direction:column}
.q:target{display:flex}
.qflow:not(:has(.q:target)) #q1{display:flex}
.qhead{display:flex;align-items:center;gap:10px;margin-bottom:26px}
.qhead .pno{font-size:11px;font-weight:600;color:var(--faint);letter-spacing:.04em;
  flex:none;min-width:74px}
.qhead .ptrack{flex:1;height:5px;border-radius:var(--r-pill);background:var(--line-2);
  overflow:hidden}
.qhead .ptrack i{display:block;height:100%;background:var(--green);
  border-radius:var(--r-pill)}
.qbody{flex:1;display:flex;flex-direction:column;justify-content:safe center}
.qbody h2{font-size:22px;font-weight:600;letter-spacing:-.025em;color:var(--ink);
  line-height:1.25;margin-bottom:8px}
.qbody .qsub{font-size:13px;color:var(--muted);line-height:1.55;margin-bottom:22px}
.qbody .seg,.qbody .picker{margin-bottom:0}
/* welcome step — icon + what-to-expect so it doesn't read as an empty screen */
.wmark{width:46px;height:46px;border-radius:14px;background:var(--green-tint);
  color:var(--green);display:flex;align-items:center;justify-content:center;
  margin-bottom:20px}
.wpoints{list-style:none;margin-top:24px;display:flex;flex-direction:column;gap:15px}
.wpoints li{display:flex;gap:11px;align-items:flex-start;font-size:13px;
  color:var(--ink);line-height:1.45}
.wpoints svg{color:var(--green);flex:none;margin-top:1px}
.q:focus-visible{outline:none}
.qnav{display:flex;gap:10px;align-items:stretch;margin-top:auto;padding-top:28px}
/* Back + Continue read as one matched pair: same height & radius, ghost vs primary */
.qnav .back{flex:none;display:inline-flex;align-items:center;justify-content:center;gap:7px;
  font-size:15px;font-weight:600;letter-spacing:-.01em;color:var(--ink);background:var(--paper);
  box-shadow:inset 0 0 0 1px var(--line-2);border-radius:14px;padding:15px 22px;
  transition:transform .04s ease}
.qnav .back::before{content:"←";font-weight:600}
.qnav .back:hover{background:var(--raise)}
.qnav .back:active{transform:scale(.992)}
.qnav .btn{margin:0;flex:1}
.qnav .btn-ghost{box-shadow:inset 0 0 0 1px var(--line-2)}

/* ── support-ticket thread (message.html) — Zendesk-style ─────────
   Ticket header + structured threaded entries (avatar/name/role/time/
   body) + reply box. Flat hairline aura aesthetic, not chat bubbles. */
.tkmeta{margin-bottom:16px}
.tkmeta .subj{font-size:17px;font-weight:600;letter-spacing:-.02em;
  color:var(--ink);margin-bottom:8px}
.tkmeta .row{display:flex;align-items:center;gap:9px;flex-wrap:wrap;
  font-size:12px;color:var(--muted)}
.tkmeta .row .sep{color:var(--faint)}
.thread{background:var(--paper);border-radius:var(--r-md);box-shadow:var(--sh-1);
  overflow:hidden;margin-bottom:18px}
.tmsg{display:flex;gap:12px;padding:15px 16px}
.tmsg+.tmsg{border-top:1px solid var(--line)}
.tmsg.clinic{background:var(--green-tint)}
.tmsg .av{width:30px;height:30px;border-radius:50%;flex:none;display:flex;
  align-items:center;justify-content:center;font-size:11px;font-weight:600}
.tmsg.clinic .av{background:var(--green);color:#fff}
.tmsg.you .av{background:var(--line-2);color:var(--ink)}
.tmsg .mb{flex:1;min-width:0}
.tmsg .who{display:flex;align-items:baseline;gap:8px;margin-bottom:5px}
.tmsg .who b{font-size:13px;font-weight:600;letter-spacing:-.01em;color:var(--ink)}
.tmsg .who .rl{font-size:11px;color:var(--faint);font-weight:500}
.tmsg .who .tm{font-size:11px;color:var(--faint);margin-left:auto;flex:none}
.tmsg .mt{font-size:13.5px;line-height:1.55;color:var(--ink)}
.tmsg.clinic .mt{color:var(--green-deep)}
.reply .flabel{margin-bottom:8px}

/* ── self-tracking modules: injection log + weight trajectory ───────
   Polished bodies for the two patient self-logged dashboard modules;
   headers reuse the shared .panel/.ph pattern for consistency. */
.duestrip{display:flex;align-items:center;gap:11px;background:var(--green-tint);
  border-radius:var(--r-md);padding:11px 13px;margin-bottom:14px}
.duestrip .ic{width:32px;height:32px;border-radius:50%;background:#fff;color:var(--green);
  display:flex;align-items:center;justify-content:center;flex:none}
.duestrip .dt{font-size:13px;font-weight:600;color:var(--green-deep);letter-spacing:-.01em}
.duestrip .dm{font-size:11.5px;color:var(--green-deep);opacity:.7;margin-top:1px}
.logrow{display:flex;align-items:center;gap:12px;padding:12px 0;border-top:1px solid var(--line)}
.logrow .lc{width:32px;height:32px;border-radius:50%;background:var(--green-tint);
  color:var(--green);display:flex;align-items:center;justify-content:center;flex:none}
.logrow .lb{flex:1;min-width:0}
.logrow .lt{font-size:13px;font-weight:600;color:var(--ink);letter-spacing:-.01em}
.logrow .ld{font-size:11.5px;color:var(--muted);margin-top:1px}
.logrow .lg{font-size:10px;font-weight:600;color:var(--muted);background:var(--raise);
  border:1px solid var(--line);padding:3px 8px;border-radius:var(--r-pill);flex:none}
.wnow{display:flex;align-items:baseline;gap:7px;margin:4px 0 2px;white-space:nowrap}
.wnow .wv{font-family:var(--display);font-size:44px;font-weight:600;color:var(--ink);
  letter-spacing:-.02em;line-height:1}
.wnow .wu{font-size:18px;color:var(--muted);font-weight:600}
.wnow .wd{margin-left:auto;align-self:center;font-size:11.5px;font-weight:700;
  color:var(--green-deep);background:rgba(29,158,117,.14);padding:3px 10px;
  border-radius:var(--r-pill)}
.wsub{font-size:13.5px;color:var(--muted);margin-top:4px}

/* "This week" — weight trend + goal progress, two-up */
.wcards{display:grid;grid-template-columns:1fr;gap:14px;margin-bottom:14px}
.wcards .panel{margin-bottom:0;height:100%}
.goalcard{display:flex;flex-direction:column}
.gprog{margin-top:auto;padding-top:20px}
.gbar{height:10px;border-radius:var(--r-pill);background:var(--green-tint);overflow:hidden}
.gfill{height:100%;border-radius:var(--r-pill);background:var(--green);min-width:8px;
  transition:width .6s ease}
.gmeta{display:flex;justify-content:space-between;margin-top:11px;font-size:12.5px;
  color:var(--muted);font-weight:500}
@media(min-width:768px){.wcards{grid-template-columns:1fr 1fr;gap:16px}}
.wchart{margin:16px 0 0}
.wgrid{display:flex;gap:9px}
.wyax{display:flex;flex-direction:column;justify-content:space-between;flex:none;
  min-width:24px;text-align:right;font-size:9.5px;font-weight:600;
  color:var(--faint);padding:1px 0 17px}
.wplot{flex:1;min-width:0}
.wchart svg,.wplot svg{display:block;width:100%;height:108px;overflow:visible}
.wxax{display:flex;justify-content:space-between;font-size:10px;font-weight:600;
  color:var(--muted);margin-top:7px}
.wcap{display:flex;justify-content:space-between;font-size:11px;font-weight:600;
  color:var(--muted);margin-top:10px}
.wcap .tg{color:var(--green)}

/* escalation section heading */
.esc-heading{font-family:var(--display);font-size:18px;font-weight:600;color:var(--ink);
  letter-spacing:-.02em;margin:10px 0 14px;padding-top:6px}

/* ── Escalation page — desktop grid layouts ─────────────────── */
.esc-pair{display:flex;flex-direction:column;gap:14px;margin-bottom:14px}
.esc-pair>.tcard,.esc-pair>.panel{margin-bottom:0}

/* alert tile — desktop CTA + dismiss (hidden on mobile) */
.alert-tile .act{display:none}

/* check-in card — meta row */
.tcard-meta{display:flex;flex-wrap:wrap;gap:8px 20px;font-size:12px;color:var(--muted);
  padding-top:16px;border-top:1px solid var(--line);margin-top:18px;line-height:1.45}
.tcard-meta b{font-weight:600;color:var(--ink)}

/* date panel — flex column so countdown pins to bottom */
.date-panel{display:flex;flex-direction:column}

/* countdown */
.countdown{display:flex;gap:24px;padding-top:16px;border-top:1px solid var(--line)}
.countdown .cu{min-width:0}
.countdown .cv{font-size:22px;font-weight:600;color:var(--ink);letter-spacing:-.02em;line-height:1}
.countdown .cl{font-size:11px;color:var(--muted);margin-top:4px;font-weight:500}

/* early check-in prompt — inside date panel */
.early-checkin{margin-top:auto;padding-top:16px;border-top:1px solid var(--line)}
.early-checkin p{font-size:12.5px;color:var(--muted);line-height:1.5;margin-bottom:12px}

/* desktop escalation grids */
@media (min-width:768px){
  .esc-pair{display:grid;gap:16px;margin-bottom:16px}
  .esc-pair.main{grid-template-columns:1fr 320px}
  .esc-pair.half{grid-template-columns:1fr 1fr}

  .esc-heading{font-size:20px;margin:14px 0 16px}

  /* alert tile: inline CTA + dismiss on right */
  .alert-tile{display:flex;align-items:center;gap:18px}
  .alert-tile .in{flex:1;min-width:0}
  .alert-tile .ds{margin-bottom:0}
  .alert-tile a.u{display:none}
  .alert-tile .act{display:flex;align-items:center;gap:12px;flex:none}
  .btn-alert{display:inline-flex;align-items:center;gap:7px;
    background:var(--green-deep);color:#fff;font-size:13px;font-weight:600;
    padding:12px 22px;border-radius:14px;border:none;white-space:nowrap;
    letter-spacing:-.01em;cursor:pointer;text-decoration:none;
    transition:transform .04s ease}
  .btn-alert::after{content:"→";font-weight:600}
  .btn-alert:active{transform:scale(.99)}
  .dismiss{width:36px;height:36px;border-radius:50%;border:1px solid var(--line-2);
    background:var(--paper);display:flex;align-items:center;justify-content:center;
    color:var(--faint);cursor:pointer;flex:none}
  .dismiss:hover{background:var(--raise)}

  /* check-in card: button + link inline */
  .tcard .action-row{display:flex;align-items:center;gap:20px}
  .tcard .action-row .btn{width:auto;flex:none;padding:15px 28px}
  .tcard .action-row .links{margin-top:0;border-top:none;padding-top:0;flex:none}
  .tcard .action-row .lnk{padding:0;font-size:13px}
  .tcard .action-row .lnk.quiet{color:var(--green)}
  .tcard .action-row .lnk svg{display:none}
}
@media (min-width:1024px){
  .esc-pair{gap:18px;margin-bottom:18px}
  .esc-pair.main{grid-template-columns:1fr 360px}
}
@media (min-width:1280px){
  .esc-pair.main{grid-template-columns:1fr 400px}
}

/* ── Shop ─────────────────────────────────────────────────────── */

/* Hero */
.shop-hero{display:flex;flex-direction:column;gap:16px;margin-bottom:28px}
.shop-hero .sh-left,.shop-hero .sh-right{background:var(--paper);border-radius:var(--r-lg);
  box-shadow:var(--sh-1);padding:24px 22px}
.shop-hero .sh-left{flex:1.4}
.shop-hero .sh-right{flex:1;background:var(--green);color:var(--paper)}
.shop-hero .eyebrow{font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;
  color:var(--faint);margin-bottom:8px}
.shop-hero .sh-right .eyebrow{color:rgba(255,255,255,.55)}
.shop-hero h1{font-size:22px;font-weight:700;color:var(--ink);letter-spacing:-.03em;
  line-height:1.25;margin:0 0 8px}
.shop-hero h1 em{font-style:italic;color:var(--green)}
.shop-hero .sh-left>p{font-size:13px;color:var(--muted);line-height:1.55;margin:0 0 18px}
.shop-hero .sh-right h3{font-size:17px;font-weight:700;color:#fff;margin:0 0 6px;letter-spacing:-.02em}
.shop-hero .sh-right>p{font-size:12.5px;color:rgba(255,255,255,.72);line-height:1.5;margin:0 0 16px}
.sh-stats{display:flex;gap:20px;flex-wrap:wrap}
.sh-stats>div{display:flex;flex-direction:column;gap:2px}
.sh-stats .k{font-size:11px;font-weight:600;color:var(--green);letter-spacing:.02em}
.sh-stats .v{font-size:12px;color:var(--muted);font-weight:500}
.sh-nx{display:flex;align-items:center;justify-content:space-between;gap:14px;
  padding-top:14px;border-top:1px solid rgba(255,255,255,.15)}
.sh-nx .n{font-size:26px;font-weight:800;color:#fff;letter-spacing:-.03em;line-height:1}
.sh-nx .l{font-size:12px;color:rgba(255,255,255,.6);font-weight:500}

/* Toolbar */
.shop-toolbar{margin-bottom:22px}
.shop-search{display:flex;align-items:center;gap:8px;background:var(--paper);
  border-radius:var(--r-lg);box-shadow:var(--sh-1);padding:10px 14px;margin-bottom:12px}
.shop-search svg{color:var(--faint);flex-shrink:0}
.shop-search input{border:0;background:none;font:inherit;font-size:13px;color:var(--ink);
  width:100%;outline:none}
.shop-search input::placeholder{color:var(--line-2)}
.cat-tabs{display:flex;gap:6px;overflow-x:auto;padding-bottom:2px;-webkit-overflow-scrolling:touch}
.cat-tabs button{font:inherit;font-size:12px;font-weight:600;color:var(--muted);
  background:var(--paper);border:1px solid var(--line);border-radius:999px;
  padding:6px 14px;white-space:nowrap;cursor:pointer;transition:all .15s}
.cat-tabs button.on,.cat-tabs button:hover{background:var(--green-deep);color:#fff;border-color:var(--green-deep)}

/* Section header */
.shop-sec-h{display:flex;align-items:baseline;justify-content:space-between;
  margin-bottom:14px;gap:12px}
.shop-sec-h h2{font-size:17px;font-weight:700;color:var(--ink);letter-spacing:-.02em;margin:0}
.shop-sec-h .ct{font-size:12px;font-weight:500;color:var(--faint);margin-left:6px}
.shop-sec-h .lnk{font-size:12px;font-weight:600;color:var(--green);text-decoration:none;white-space:nowrap}

/* Product grid + cards */
.pgrid{display:grid;grid-template-columns:repeat(2,1fr);gap:14px;margin-bottom:24px}
.pcard{background:var(--paper);border-radius:var(--r-lg);box-shadow:var(--sh-1);
  overflow:hidden;display:flex;flex-direction:column}
.pimg{height:140px;background:var(--raise);display:flex;align-items:center;
  justify-content:center;overflow:hidden;position:relative}
.pimg img{width:100%;height:100%;object-fit:cover}
.pimg--placeholder{color:var(--line-2)}
.pbody{padding:14px 16px 16px;display:flex;flex-direction:column;flex:1}
.ptag{font-size:10.5px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;
  color:var(--green);margin-bottom:4px}
.pbody h4{font-size:14px;font-weight:600;color:var(--ink);letter-spacing:-.01em;
  line-height:1.3;margin:0 0 4px}
.pmeta{font-size:11.5px;color:var(--muted);line-height:1.4;margin-bottom:12px;flex:1}
.pfoot{display:flex;align-items:center;justify-content:space-between;margin-top:auto;gap:8px}
.pfoot .price{display:flex;flex-direction:column}
.pfoot .price .v{font-size:16px;font-weight:700;color:var(--green);letter-spacing:-.01em}
.pfoot .price .u{font-size:10px;color:var(--faint);font-weight:500}
/* Mobile: single-column list view for products */
@media (max-width:600px){
  .pgrid{grid-template-columns:1fr;gap:10px}
  .pcard{flex-direction:row;align-items:stretch}
  .pimg{width:96px;min-width:96px;height:auto;min-height:96px;align-self:stretch;flex:none}
  .pimg svg{width:26px;height:26px}
  .pbody{padding:12px 14px;min-width:0}
  .pbody h4{font-size:13.5px;margin-bottom:2px}
  .pmeta{margin-bottom:10px}
  .pfoot{margin-top:auto}
}
/* Bundle grid + cards */
.bgrid{display:grid;grid-template-columns:1fr;gap:16px;margin-bottom:24px}
.bcard{background:var(--paper);border-radius:var(--r-lg);box-shadow:var(--sh-1);
  overflow:hidden;display:flex;flex-direction:column}
.bimg{height:120px;background:var(--green);display:flex;align-items:center;
  justify-content:center;color:rgba(255,255,255,.35)}
.bbody{padding:16px 18px 18px;display:flex;flex-direction:column;flex:1}
.bbody h4{font-size:15px;font-weight:700;color:var(--ink);letter-spacing:-.01em;
  line-height:1.3;margin:0 0 4px}
.bdesc{font-size:12px;color:var(--muted);line-height:1.45;margin:0 0 14px}
.includes{list-style:none;padding:0;margin:0 0 16px;display:flex;flex-direction:column;gap:6px}
.includes li{display:flex;align-items:center;gap:8px;font-size:12.5px;color:var(--ink);font-weight:500}
.includes li svg{color:var(--green);flex-shrink:0}
.includes .qty{font-size:11px;color:var(--faint);font-weight:600;margin-left:auto}
.bfoot{display:flex;align-items:center;justify-content:space-between;margin-top:auto;
  padding-top:14px;border-top:1px solid var(--line);gap:8px}
.bprice .v{font-size:17px;font-weight:700;color:var(--green);letter-spacing:-.01em}
.bprice .was{font-size:12px;color:var(--faint);text-decoration:line-through;margin-left:6px;font-weight:500}

/* Dispensing bar */
.disp-bar{display:flex;gap:12px;align-items:flex-start;background:var(--paper);
  border-radius:var(--r-lg);box-shadow:var(--sh-1);padding:16px 18px;
  margin-bottom:20px;font-size:12.5px;color:var(--muted);line-height:1.55}
.disp-bar .db-ic{width:36px;height:36px;border-radius:var(--r-md);background:var(--raise);
  display:flex;align-items:center;justify-content:center;color:var(--green);flex-shrink:0}
.disp-bar b{color:var(--ink)}

/* Responsive */
@media (min-width:768px){
  .shop-hero{flex-direction:row}
  .shop-hero .sh-left,.shop-hero .sh-right{padding:28px 26px}
  .shop-hero h1{font-size:26px}
  .pgrid{grid-template-columns:repeat(3,1fr);gap:16px}
  .pimg{height:160px}
  .bgrid{grid-template-columns:repeat(2,1fr);gap:16px}
}
@media (min-width:1024px){
  .pgrid{grid-template-columns:repeat(4,1fr);gap:18px}
  .pimg{height:180px}
  .bgrid{grid-template-columns:repeat(3,1fr)}
  .shop-hero h1{font-size:28px}
  .shop-hero .sh-left,.shop-hero .sh-right{padding:32px 30px}
}
@media (min-width:1280px){
  .pgrid{gap:20px}
  .bgrid{gap:20px}
}

/* ── form-shell layout: form-card + rail (profile.html pattern) ──────
   Two-column on desktop: form-card (main) + rail (aside).
   Stacked on mobile. Reuses .fld for field primitives. */

/* shell wrapper — column on mobile, row on desktop */
.form-shell{display:flex;flex-direction:column;gap:24px}

/* form card — white surface, padded, rounded */
.form-card{background:var(--paper);border-radius:var(--r-lg);padding:24px 22px;
  box-shadow:var(--sh-2);flex:1;min-width:0}
.form-card h3{font-size:17px;font-weight:600;letter-spacing:-.02em;
  color:var(--ink);margin-bottom:4px}
.form-card .sub{font-size:12.5px;color:var(--muted);margin-bottom:20px;
  line-height:1.5}

/* fieldset wrapper inside form-card */
.form-card .fieldset{display:flex;flex-direction:column;gap:0}

/* field — replaces .fld inside form-card context */
.form-card .field{margin-bottom:16px}
.form-card .field label{display:block;font-size:12px;font-weight:600;
  color:var(--muted);margin-bottom:7px;letter-spacing:.01em}
.form-card .field input,
.form-card .field select,
.form-card .field textarea{width:100%;font:inherit;font-size:15px;color:var(--ink);
  background:var(--paper);border:1px solid var(--line-2);border-radius:var(--r-sm);
  padding:14px 15px;-webkit-appearance:none;appearance:none}
.form-card .field input::placeholder,
.form-card .field textarea::placeholder{color:var(--faint)}
.form-card .field input:focus,
.form-card .field select:focus,
.form-card .field textarea:focus{outline:2px solid var(--focus);outline-offset:2px;
  border-color:transparent}
.form-card .field textarea{min-height:84px;resize:vertical;line-height:1.5;
  font-size:14.5px}
.form-card .field select{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2354524A' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 14px center;padding-right:38px}
.form-card .field .hint{font-size:11.5px;color:var(--faint);margin-top:7px;
  line-height:1.5}

/* locked / disabled field — clearly non-interactive */
.form-card .field input[readonly],
.form-card .field input[disabled],
.form-card .field input:disabled{background:var(--raise);color:var(--muted);
  cursor:not-allowed;border-color:var(--line)}
.form-card .field input[readonly]:focus,
.form-card .field input[disabled]:focus,
.form-card .field input:disabled:focus{outline:none;border-color:var(--line)}

/* field-row — side by side fields */
.field-row{display:flex;gap:12px}
.field-row>.field{flex:1;min-width:0}

/* locked / readonly hint with lock icon */
.lockedhint{display:flex;align-items:flex-start;gap:8px;font-size:11.5px;
  color:var(--faint);margin-top:7px;line-height:1.5;background:var(--raise);
  border-radius:var(--r-sm);padding:10px 12px}
.lockedhint svg{flex:none;color:var(--faint);margin-top:1px}
.lockedhint a{color:var(--green);font-weight:600}

/* form actions — buttons row at form bottom */
.form-actions{display:flex;align-items:center;gap:12px;padding-top:20px;
  border-top:1px solid var(--line);margin-top:8px;flex-wrap:wrap}
.form-actions .btn{width:auto;padding:14px 28px;flex:none}
.form-actions .right{margin-left:auto;font-size:11px;color:var(--faint)}

/* rail (aside) — contextual info cards */
.rail{display:flex;flex-direction:column;gap:14px}
.rail-card{background:var(--paper);border-radius:var(--r-md);padding:18px;
  box-shadow:var(--sh-1)}
.rail-card .rh{display:flex;align-items:center;gap:8px;margin-bottom:10px}
.rail-card .rh .ic{width:28px;height:28px;border-radius:9px;background:var(--raise);
  display:flex;align-items:center;justify-content:center;flex:none;color:var(--faint)}
.rail-card .rh h4{font-size:13.5px;font-weight:600;letter-spacing:-.01em;
  color:var(--ink)}
.rail-card p{font-size:12.5px;color:var(--muted);line-height:1.55}

/* key-value pairs inside rail cards */
.kvline{display:flex;justify-content:space-between;font-size:12px;padding:7px 0;
  border-bottom:1px solid var(--line)}
.kvline:last-child{border-bottom:none}
.kvline .k{color:var(--muted);font-weight:500}
.kvline .v{color:var(--ink);font-weight:600;text-align:right}

/* nexus tag */
.nexus-tag{font-size:10.5px;color:var(--faint);margin-top:10px;font-style:italic;
  line-height:1.4}

/* also support .fld inside form-card (backwards compat) */
.form-card .fld{margin-bottom:16px}

/* also support .acct/.ar inside form-card for toggle rows */
.form-card .acct{margin-bottom:16px}
.form-card .consent{margin:16px 0 0}

/* fieldset inside form-card */
.form-card .fsec{margin:0 0 16px}

/* rail links */
.rail-card .lnk{font-size:12.5px}

/* ── form-shell responsive — desktop: side-by-side ──────────────── */
@media (min-width:768px){
  .form-shell{flex-direction:row;gap:28px}
  .form-card{padding:30px 28px}
  .form-card h3{font-size:18px}
  .form-card .sub{font-size:13px}
  .rail{width:280px;flex:none}
  .form-actions .btn{padding:15px 32px}
}
@media (min-width:1024px){
  .form-shell{gap:32px}
  .form-card{padding:34px 32px}
  .form-card h3{font-size:19px}
  .rail{width:300px}
  .rail-card{padding:20px}
}
@media (min-width:1280px){
  .form-shell{gap:36px}
  .form-card{padding:36px 34px}
  .rail{width:320px}
}

/* ── Ticket detail — two-pane threaded view ──────────────────────
   Redesigned support ticket: header bar, date-grouped thread with
   bubble messages, rich composer, and contextual rail sidebar.
   Mobile-first: stacks vertically, side-by-side from 768px. */

/* Ticket header bar */
.ticket-head{display:flex;align-items:flex-start;gap:14px;margin-bottom:22px}
.thback{width:36px;height:36px;border-radius:10px;background:var(--paper);
  box-shadow:var(--sh-1);display:flex;align-items:center;justify-content:center;
  color:var(--muted);flex:none;margin-top:4px}
.thback:hover{background:var(--raise)}
.ticket-head .h{flex:1;min-width:0}
.ticket-head .h .sub{display:flex;align-items:center;gap:9px;flex-wrap:wrap;
  font-size:12px;color:var(--muted);margin-bottom:8px}
.ticket-head .h .sub .sep{color:var(--line-2)}
.ticket-head .h .sub b{color:var(--ink);font-weight:600}
.ticket-head .h h1{font-family:var(--display);font-size:22px;font-weight:600;
  letter-spacing:-.02em;color:var(--ink);line-height:1.25;margin:0}
.ticket-head .ix{display:flex;align-items:center;gap:8px;flex:none}
.ticket-head .ix .tkt-resolve{width:auto;display:inline-flex;align-items:center;
  gap:6px;font-size:12px;padding:8px 14px;margin:0;border-radius:10px}
.ticket-head .ix .tkt-resolve::after{content:none}

/* Status pill (inline in header + rail) */
.pill{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;
  border-radius:var(--r-pill);font-size:11px;font-weight:600;letter-spacing:.01em;
  white-space:nowrap}
.pill .dot{width:6px;height:6px;border-radius:50%;background:currentColor;opacity:.7}
.pill.info{background:var(--info-tint);color:var(--info)}
.pill.ok{background:var(--green-tint);color:var(--green)}
.pill.review{background:var(--amber-tint);color:var(--amber)}
.pill.paused{background:#EAE8DF;color:var(--muted)}

/* Two-pane shell (thread left, rail right on desktop) */
.ticket-shell{display:flex;flex-direction:column;gap:22px}

/* Day separator */
.thread .day-sep{text-align:center;font-size:11px;font-weight:600;color:var(--faint);
  letter-spacing:.04em;padding:16px 16px 4px}
.thread .day-sep+.day-sep{padding-top:8px}
.thread .msg+.day-sep{border-top:1px solid var(--line)}

/* Message row */
.msg{display:flex;align-items:flex-start;gap:10px;padding:12px 16px}
.msg+.msg{border-top:1px solid var(--line)}
.msg .av{width:28px;height:28px;border-radius:50%;flex:none;display:flex;
  align-items:center;justify-content:center;font-size:10px;font-weight:600;
  letter-spacing:.01em;margin-top:1px}
.msg.you .av{background:var(--line-2);color:var(--ink)}
.msg.clinic .av{background:var(--green);color:#fff}
.msg .mbody{flex:1;min-width:0}
.msg .meta{display:flex;align-items:baseline;gap:8px;margin-bottom:2px;flex-wrap:wrap}
.msg .meta .who{font-size:13px;font-weight:600;letter-spacing:-.01em;color:var(--ink)}
.msg .meta .role{font-size:10.5px;color:var(--faint);font-weight:500;
  background:var(--raise);padding:2px 8px;border-radius:var(--r-pill)}
.msg .meta .time{font-size:11px;color:var(--faint);margin-left:auto;flex:none}
.msg .bubble{font-size:13.5px;line-height:1.55;color:var(--ink)}
.msg .bubble p{margin-bottom:8px}
.msg .bubble p:last-child{margin-bottom:0}
.msg.clinic{background:var(--green-tint)}
.msg.clinic .bubble{color:var(--green-deep)}

/* Ticket composer (distinct from chat .composer) */
.tkt-composer{background:var(--paper);border-radius:var(--r-md);box-shadow:var(--sh-1);
  padding:18px;margin-top:4px}
.tkt-composer .ch{display:flex;align-items:baseline;justify-content:space-between;
  margin-bottom:10px}
.tkt-composer .ch label{font-size:13px;font-weight:600;color:var(--ink)}
.tkt-composer .ch .topic{font-size:12px;color:var(--muted);font-weight:500}
.tkt-composer textarea{width:100%;font:inherit;font-size:14px;color:var(--ink);
  background:var(--raise);border:1px solid var(--line);border-radius:var(--r-sm);
  padding:14px 16px;min-height:100px;resize:vertical;line-height:1.55;
  -webkit-appearance:none;appearance:none}
.tkt-composer textarea::placeholder{color:var(--faint)}
.tkt-composer textarea:focus{outline:2px solid var(--focus);outline-offset:2px;
  border-color:transparent}

/* Quick-reply suggestion chips */
.qr-row{display:flex;gap:8px;flex-wrap:wrap;margin-top:14px}
.qchip{display:inline-flex;padding:7px 14px;border-radius:var(--r-pill);
  font-size:12px;font-weight:500;color:var(--muted);background:var(--paper);
  box-shadow:inset 0 0 0 1px var(--line-2);border:none;cursor:pointer;
  transition:background .1s}
.qchip:hover{background:var(--raise);color:var(--ink)}

/* Composer footer (toolbar + send) */
.tkt-composer .cf{display:flex;align-items:center;justify-content:space-between;
  margin-top:16px;padding-top:14px;border-top:1px solid var(--line)}
.tkt-composer .ctools{display:flex;gap:6px}
.cbtn{width:34px;height:34px;border-radius:50%;border:1px solid var(--line-2);
  background:var(--paper);display:flex;align-items:center;justify-content:center;
  color:var(--faint);cursor:pointer;flex:none}
.cbtn:hover{background:var(--raise)}
.tkt-composer .send-grp{display:flex;align-items:center;gap:12px;margin-left:auto}
.tkt-composer .send-grp .btn{width:auto;display:inline-flex;align-items:center;
  padding:12px 22px;font-size:13.5px;margin:0}

/* Ticket info card (rail) */
.tinfo{background:var(--paper);border-radius:var(--r-md);padding:18px;box-shadow:var(--sh-1)}
.ti-hd{font-size:13px;font-weight:600;color:var(--ink);letter-spacing:-.01em;
  margin-bottom:14px;padding-bottom:12px;border-bottom:1px solid var(--line)}
.ti-row{display:flex;justify-content:space-between;align-items:flex-start;
  font-size:12.5px;padding:8px 0}
.ti-row .k{color:var(--muted);font-weight:500;flex:none;min-width:80px}
.ti-row .v{color:var(--ink);font-weight:600;text-align:right;flex:1;min-width:0}
.ti-row .v small{display:block;font-size:11px;color:var(--faint);font-weight:400;
  margin-top:2px}
.ti-row.divider{border-bottom:1px solid var(--line);padding:0;margin:6px 0}

/* Who card — "Handled by" (rail) */
.who-card{background:var(--paper);border-radius:var(--r-md);padding:18px;
  box-shadow:var(--sh-1)}
.who-card h5{font-size:11px;font-weight:600;color:var(--muted);text-transform:uppercase;
  letter-spacing:.06em;margin-bottom:14px}
.who-card .person{display:flex;align-items:center;gap:12px}
.who-card .person .av{width:36px;height:36px;border-radius:50%;background:var(--green);
  color:#fff;display:flex;align-items:center;justify-content:center;
  font-size:12px;font-weight:600;flex:none}
.who-card .nm{font-size:13.5px;font-weight:600;color:var(--ink);letter-spacing:-.01em}
.who-card .rl{font-size:12px;color:var(--muted);margin-top:1px}

/* Related card — contextual links (rail) */
.related-card{background:var(--paper);border-radius:var(--r-md);box-shadow:var(--sh-1);
  overflow:hidden}
.related-card h5,.related-card .rc-h{font-size:11px;font-weight:600;color:var(--muted);
  text-transform:uppercase;letter-spacing:.06em;padding:16px 16px 10px;margin:0}
.related-card a{display:flex;align-items:center;gap:12px;padding:12px 16px;
  font-size:13px;border-top:1px solid var(--line)}
.related-card a:hover{background:var(--raise)}
.related-card .ic{width:30px;height:30px;border-radius:9px;background:var(--raise);
  display:flex;align-items:center;justify-content:center;flex:none;color:var(--faint)}
.related-card .lb{flex:1;min-width:0}
.related-card .t1{font-size:13px;font-weight:600;color:var(--ink);letter-spacing:-.01em}
.related-card .t2{font-size:11px;color:var(--muted);margin-top:1px}
.related-card>a>svg{color:var(--faint);flex:none}

/* Urgent note (rail) */
.urgent-note{font-size:12px;color:var(--muted);line-height:1.55;background:var(--raise);
  border-radius:var(--r-sm);padding:14px 16px}
.urgent-note b{color:var(--ink);font-weight:600}
.urgent-note a{color:var(--alert);font-weight:700}

/* Footer fine print */
.fineprint{display:flex;align-items:center;justify-content:center;flex-wrap:wrap;
  gap:4px;font-size:11px;color:var(--faint);padding:18px 8px 2px;text-align:center}
.fineprint .sep{color:var(--line-2)}
.fineprint a{color:var(--faint);font-weight:500}
.fineprint a:hover{color:var(--ink)}

/* ── Ticket detail — responsive ────────────────────────────────── */
@media (min-width:768px){
  .ticket-shell{flex-direction:row;gap:28px}
  .ticket-shell>div:first-child{flex:1;min-width:0}
  .ticket-shell>.rail{width:300px;flex:none}
  .ticket-head .h h1{font-size:24px}
  .msg{padding:14px 20px}
  .tkt-composer{padding:22px}
}
@media (min-width:1024px){
  .ticket-shell{gap:32px}
  .ticket-shell>.rail{width:320px}
  .ticket-head .h h1{font-size:26px}
}
@media (min-width:1280px){
  .ticket-shell{gap:36px}
  .ticket-shell>.rail{width:340px}
}

/* ── Auth pages — centered single-card login / register / check-email ── */
.auth-page{min-height:100vh;min-height:100dvh;display:flex;flex-direction:column;
  align-items:center;justify-content:center;background:var(--page);padding:32px 18px}

/* Centered column: logo · card · legal footer */
.auth-shell{width:100%;max-width:430px;display:flex;flex-direction:column;align-items:center}
.auth-brand{display:block;margin-bottom:22px}
.auth-brand .brand-logo{height:28px;width:auto}

/* The card itself */
.auth-card{width:100%;background:var(--paper);border-radius:var(--r-lg);padding:32px 30px;
  box-shadow:0 1px 2px rgba(26,53,40,.04),0 12px 32px rgba(26,53,40,.07),0 0 0 1px var(--line)}
.auth-card h1{font-family:var(--display);font-size:25px;font-weight:700;color:var(--ink);
  letter-spacing:-.03em;margin-bottom:8px;text-align:center}
.auth-card .auth-sub{font-size:14px;color:var(--muted);line-height:1.55;
  margin-bottom:26px;text-align:center}
.auth-card .auth-sub strong{color:var(--ink);font-weight:600}
.auth-card form{margin-bottom:0}
.auth-card .btn{margin-top:6px}
.auth-card .btn:first-of-type{margin-top:0}

/* Auth OK / success message */
.auth-ok{font-size:13px;font-weight:500;color:var(--green);background:var(--green-tint);
  border-radius:var(--r-sm);padding:10px 14px;margin-bottom:18px;line-height:1.5}

/* Auth icon (link-expired, etc.) */
.auth-icon{width:52px;height:52px;border-radius:50%;display:flex;align-items:center;
  justify-content:center;margin:0 auto 18px}
.auth-icon.warn{background:var(--amber-tint);color:var(--amber)}

/* Trust-this-device checkbox row */
.auth-check{display:flex;align-items:center;gap:11px;margin:2px 0 18px;cursor:pointer;
  font-size:13.5px;font-weight:500;color:var(--ink);user-select:none}
.auth-check input{position:absolute;width:1px;height:1px;opacity:0}
.auth-check .box{width:22px;height:22px;flex:none;border-radius:7px;background:var(--paper);
  box-shadow:inset 0 0 0 1.5px var(--line-2);display:flex;align-items:center;
  justify-content:center;transition:background .15s,box-shadow .15s}
.auth-check .box svg{width:13px;height:13px;color:#fff;opacity:0;transition:opacity .15s}
.auth-check svg{stroke-width:3}
.auth-check input:checked + .box{background:var(--green);box-shadow:none}
.auth-check input:checked + .box svg{opacity:1}
.auth-check input:focus-visible + .box{outline:2px solid var(--focus);outline-offset:2px}

/* Labelled divider — "NEW HERE?" */
.auth-div{display:flex;align-items:center;gap:14px;margin:24px 0 16px}
.auth-div::before,.auth-div::after{content:"";flex:1;height:1px;background:var(--line)}
.auth-div span{font-size:11px;font-weight:600;letter-spacing:.13em;text-transform:uppercase;
  color:var(--faint)}

/* Soft / secondary button (new-patient action) */
.btn-soft{display:flex;align-items:center;justify-content:center;gap:8px;width:100%;
  text-align:center;font-size:15px;font-weight:600;letter-spacing:-.01em;padding:15px;
  border-radius:14px;border:none;background:var(--green-tint);color:var(--green-deep);
  transition:background .15s,transform .04s ease}
.btn-soft svg{width:18px;height:18px;color:var(--green);flex:none}
.btn-soft:hover{background:#dce7df}
.btn-soft:active{transform:scale(.992)}

/* Helper line under a button */
.auth-help{font-size:12px;color:var(--faint);text-align:center;margin-top:11px;line-height:1.5}

/* Auth alternate action link */
.auth-alt{display:flex;align-items:center;justify-content:center;gap:6px;
  font-size:13px;color:var(--muted);margin-top:22px}
.auth-alt a{color:var(--green);font-weight:600}
.auth-alt a:hover{text-decoration:underline}

/* OTP row — 6 individual digit boxes */
.otp-row{display:flex;gap:8px;margin-top:4px}
.otp-row .otp{width:46px;height:54px;text-align:center;font-size:22px;font-weight:700;
  font-family:var(--sans);color:var(--ink);background:var(--paper);
  border:1.5px solid var(--line-2);border-radius:var(--r-sm);
  padding:0;-webkit-appearance:none;appearance:none;
  transition:border-color .15s}
.otp-row .otp:focus{outline:2px solid var(--focus);outline-offset:2px;border-color:transparent}

/* Resend line */
.resend-line{display:flex;align-items:center;justify-content:center;gap:6px;
  font-size:13px;color:var(--muted);margin-top:20px}
.link-btn{background:none;border:none;color:var(--green);font:inherit;font-size:13px;
  font-weight:600;cursor:pointer;padding:0}
.link-btn:hover{text-decoration:underline}

/* Legal / safety footer below the card */
.auth-legal{text-align:center;font-size:11.5px;color:var(--faint);line-height:1.7;
  margin-top:22px;max-width:380px}
.auth-legal .safety{color:var(--muted)}

/* ── Auth pages — responsive ── */
@media (min-width:768px){
  .auth-card{padding:36px 34px}
  .auth-card h1{font-size:27px}
  .otp-row .otp{width:48px;height:56px}
}

/* ── Article detail ──────────────────────────────────────────────── */
.back-link{display:inline-flex;align-items:center;gap:6px;font-size:13px;
  font-weight:600;color:var(--green);margin-bottom:12px}
.back-link:hover{text-decoration:underline}
.article-meta{display:flex;align-items:center;gap:10px;margin-top:8px;font-size:12px;color:var(--muted)}
.article-cat{background:var(--green-tint);color:var(--green);font-weight:600;
  padding:3px 10px;border-radius:var(--r-pill);font-size:11px}
.article-time{font-weight:500}

.article-body{font-size:14px;line-height:1.7;color:var(--ink)}
.article-body h2{font-size:17px;font-weight:700;letter-spacing:-.02em;margin:28px 0 10px;color:var(--ink)}
.article-body h3{font-size:15px;font-weight:600;margin:22px 0 8px;color:var(--ink)}
.article-body p{margin:0 0 14px}
.article-body ul,.article-body ol{margin:0 0 14px;padding-left:22px}
.article-body li{margin-bottom:6px}
.article-body a{color:var(--green);font-weight:500;text-decoration:underline}
.article-body a:hover{color:var(--green-deep)}
.article-body blockquote{border-left:3px solid var(--green);padding:10px 16px;
  margin:14px 0;background:var(--raise);border-radius:0 var(--r-sm) var(--r-sm) 0;
  font-style:italic;color:var(--muted)}
.article-body img{max-width:100%;height:auto;border-radius:var(--r-md);margin:14px 0}
.article-body strong{font-weight:600}

/* ── home (repeat) — "next pen" journey ──────────────────────────
   Structural components for the redesigned repeat-supply home.
   Colours reuse existing tokens only — no new palette is introduced. */

/* reorder hero — stacks on mobile (ring on top), side-by-side on desktop */
.reorderhero{display:flex;flex-direction:column-reverse;gap:18px;align-items:stretch}
.reorderhero .rh-main{flex:1;min-width:0}
.reorderhero .penring{align-self:center}
.penbadge{margin-bottom:14px}
.penbadge svg{flex:none}
.btnrow{display:flex;gap:10px;flex-wrap:wrap;margin-top:18px}
.rbtn{display:inline-flex;align-items:center;justify-content:center;gap:9px;
  font-size:14px;font-weight:600;letter-spacing:-.01em;padding:13px 20px;
  border-radius:14px;border:none;cursor:pointer;white-space:nowrap;
  transition:transform .04s ease}
.rbtn:active{transform:scale(.99)}
.rbtn.primary{background:var(--green-deep);color:#fff}
.rbtn.ghost{background:var(--paper);color:var(--ink);box-shadow:inset 0 0 0 1px var(--line-2)}
.rbtn svg{width:16px;height:16px;flex:none}

/* ── orders page: reorder banner + history rows ─────────────── */
.ordbanner{display:flex;flex-wrap:wrap;align-items:center;gap:13px 16px;
  background:var(--paper);border-radius:var(--r-lg);padding:18px;
  margin-bottom:22px;box-shadow:var(--sh-2)}
.ordbanner .ob-ico{width:48px;height:48px;border-radius:14px;flex:none;
  display:flex;align-items:center;justify-content:center;
  background:var(--amber-tint);color:var(--amber)}
.ordbanner .ob-main{flex:1 1 auto;min-width:0}
.ordbanner .ob-t{font-size:16px;font-weight:600;color:var(--ink);
  letter-spacing:-.01em;line-height:1.3}
.ordbanner .ob-s{font-size:13px;color:var(--muted);margin-top:3px;line-height:1.45}
.ordbanner .ob-s b{color:var(--ink);font-weight:600}
.ordbanner .rbtn{flex:1 0 100%;justify-content:center}
.ordbanner.alert{background:var(--alert-tint);box-shadow:var(--sh-1)}
.ordbanner.alert .ob-ico{background:rgba(255,255,255,.6);color:var(--alert)}
.ordbanner.alert .ob-t{color:var(--alert)}
.ordbanner.progress .ob-ico{background:var(--green-tint);color:var(--green)}

.ohist .orow{display:flex;align-items:center;gap:13px;padding:14px 16px;
  border-bottom:1px solid var(--line)}
.ohist .orow:last-child{border-bottom:none}
.ohist .orow-main{display:flex;align-items:center;gap:13px;flex:1;min-width:0}
.ohist .oico{width:40px;height:40px;border-radius:11px;flex:none;
  display:flex;align-items:center;justify-content:center;
  background:var(--raise);color:var(--muted)}
.ohist .ometa{display:flex;flex-direction:column;min-width:0}
.ohist .ometa b{font-weight:600;font-size:14px;letter-spacing:-.01em;color:var(--ink);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ohist .ometa small{font-size:12px;color:var(--muted);margin-top:3px;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ohist .badge{flex:none}
.ohist .odl{width:38px;height:38px;border-radius:50%;flex:none;
  display:flex;align-items:center;justify-content:center;
  background:var(--raise);color:var(--muted);box-shadow:inset 0 0 0 1px var(--line-2);
  transition:background .12s ease,color .12s ease}
.ohist .odl:hover{background:var(--line);color:var(--ink)}
.ohist .odl svg{width:17px;height:17px}

/* supply ring */
.penring{position:relative;width:148px;height:148px;flex:none}
.penring svg{width:100%;height:100%;transform:rotate(-90deg)}
.penring .ring-bg{fill:none;stroke:var(--green-tint);stroke-width:9}
.penring .ring-fg{fill:none;stroke:var(--green);stroke-width:9;stroke-linecap:round;
  transition:stroke-dashoffset .6s ease}
.penring .ring-c{position:absolute;inset:0;display:flex;flex-direction:column;
  align-items:center;justify-content:center;text-align:center}
.penring .rn{font-family:var(--display);font-size:40px;font-weight:600;color:var(--ink);
  line-height:1;letter-spacing:-.02em}
.penring .rl{font-size:12px;color:var(--faint);font-weight:600;margin-top:5px;
  max-width:84px;line-height:1.25}

/* stat trio — next dose / weight / total change */
.statgrid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:9px;margin-bottom:14px}
.statcard{background:var(--paper);border-radius:var(--r-md);padding:14px 13px;min-width:0;
  box-shadow:var(--sh-1);display:flex;flex-direction:column;gap:10px}
.statcard>div{min-width:0}
.statcard .si{width:44px;height:44px;color:var(--green-deep);
  display:flex;align-items:center;justify-content:flex-start;flex:none}
.statcard .si svg{width:32px;height:32px}
.statcard .sl{font-size:13.5px;color:var(--faint);font-weight:600;letter-spacing:.01em}
.statcard .sv{font-size:22px;font-weight:600;color:var(--ink);letter-spacing:-.02em;
  line-height:1.15;margin-top:2px}
.statcard .sv small{font-size:14px;color:var(--muted);font-weight:600;letter-spacing:0}
.statcard .sm{font-size:13px;color:var(--muted);margin-top:-4px}

/* weight goal-line label overlay */
.wplot{position:relative}
.wgoal{position:absolute;right:0;font-size:9.5px;font-weight:600;color:var(--faint);
  background:var(--paper);padding:0 4px;white-space:nowrap;pointer-events:none}

/* pill action row — log weight / trends */
.pillrow{display:flex;gap:10px;flex-wrap:wrap;margin-top:16px}
.pillbtn{display:inline-flex;align-items:center;gap:8px;font-size:14px;font-weight:600;
  letter-spacing:-.01em;padding:13px 22px;border-radius:var(--r-pill)}
.pillbtn svg{width:16px;height:16px;flex:none}
.pillbtn.fill{background:var(--green-tint);color:var(--green-deep)}
.pillbtn.outline{background:var(--paper);color:var(--ink);box-shadow:inset 0 0 0 1px var(--line-2)}

/* quick actions — 4 up (2×2 on mobile) + tonal icon variants */
.qgrid.four{grid-template-columns:repeat(2,1fr)}
/* tonal qi variants retired — the brand icon set is uniformly deep green */
.qtile .qi.amber svg,.qtile .qi.info svg{color:var(--green-deep)}

/* highlighted "helpful" row */
.fitem.hl{background:var(--green-tint)}

@media (min-width:768px){
  .reorderhero{flex-direction:row;align-items:center;justify-content:space-between;gap:28px}
  .reorderhero .penring{align-self:auto}
  .ordbanner{flex-wrap:nowrap;gap:18px;padding:20px 22px}
  .ordbanner .rbtn{flex:none}
  .hero{margin-top:2px}
  .penring{width:168px;height:168px}
  .penring .rn{font-size:50px}
  .statgrid{gap:14px}
  .statcard{padding:20px}
  .statcard .sv{font-size:26px}
  .qgrid.four{grid-template-columns:repeat(4,1fr)}
}
@media (min-width:1024px){
  .statgrid{gap:16px}
  .penring{width:190px;height:190px}
}

/* ── Order tracking — one consistent vertical timeline ───────────────
   Used by every order detail page (first orders and reorders alike). */
.track-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:4px}
.track-head .th-l{min-width:0}
.track-title{font-size:19px;font-weight:700;letter-spacing:-.02em;color:var(--ink);
  display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.track-sub{font-size:12.5px;color:var(--muted);margin-top:5px;line-height:1.5}
.demo-btn{flex:none;display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;
  color:var(--muted);background:var(--paper);border:1px dashed var(--line-2);border-radius:var(--r-pill);
  padding:7px 13px;cursor:pointer;transition:transform .04s ease,border-color .15s}
.demo-btn:hover{border-color:var(--green);color:var(--green)}
.demo-btn:active{transform:scale(.98)}

/* Order timeline — horizontal stepper that uses the full card width */
.otimeline{display:flex;margin-top:26px}
.otl-step{position:relative;flex:1 1 0;min-width:0;display:flex;flex-direction:column;align-items:flex-start}
/* connector runs behind the nodes, from this node's centre to the next */
.otl-step::before{content:"";position:absolute;top:14px;left:15px;width:100%;height:2px;
  background:var(--line-2);z-index:0}
.otl-step:last-child::before{display:none}
.otl-step.done::before{background:var(--green)}
.otl-node{position:relative;z-index:1;width:30px;height:30px;flex:none;border-radius:50%;
  display:flex;align-items:center;justify-content:center;background:var(--line);
  box-shadow:inset 0 0 0 1px var(--line-2);color:var(--faint)}
.otl-node svg{width:15px;height:15px}
.otl-step.done .otl-node{background:var(--green);box-shadow:none;color:#fff}
.otl-step.now .otl-node{background:var(--paper);box-shadow:inset 0 0 0 2px var(--green)}
.otl-step.now .otl-node::after{content:"";width:11px;height:11px;border-radius:50%;background:var(--green)}
.otl-b{padding:14px 14px 0 0}
.otl-b .tt{font-size:15px;font-weight:600;color:var(--ink);letter-spacing:-.01em;line-height:1.25}
.otl-step.now .otl-b .tt{color:var(--green-deep)}
.otl-step.pending .otl-b .tt{color:var(--muted)}
.otl-b .ss{font-size:12.5px;color:var(--muted);margin-top:3px;line-height:1.4}
.otl-step.pending .otl-b .ss{color:var(--faint)}
@media(max-width:680px){
  .otimeline{margin-top:20px}
  .otl-node{width:26px;height:26px}
  .otl-step::before{top:12px;left:13px}
  .otl-b{padding:10px 8px 0 0}
  .otl-b .tt{font-size:11.5px;line-height:1.2}
  .otl-b .ss{font-size:10px;margin-top:2px}
}

/* Inline "message your clinician" note box */
.notebox{display:flex;gap:11px;align-items:flex-start;background:var(--green-tint);
  border-radius:var(--r-md);padding:14px 16px;margin-top:22px}
.notebox svg{width:17px;height:17px;color:var(--green);flex:none;margin-top:2px}
.notebox .nb-t{font-size:12.5px;color:var(--muted);line-height:1.5}
.notebox .nb-t a{display:inline-block;margin-top:5px;color:var(--green);font-weight:600}
.notebox .nb-t a:hover{text-decoration:underline}

/* Tracking action row (Get help / Delivery preferences) */
.track-actions{display:flex;gap:10px;margin-top:14px;flex-wrap:wrap}
.track-actions .rbtn{flex:1 1 0;min-width:150px}

/* ── Document notifications — one card per outstanding document ──────── */
.docnotes{display:flex;flex-direction:column;gap:10px;margin-bottom:16px}
.docnote{display:flex;align-items:center;gap:14px;background:var(--paper);
  border-radius:var(--r-md);padding:15px 16px;box-shadow:inset 0 0 0 1px var(--line-2)}
.docnote.required{box-shadow:inset 0 0 0 1px var(--coral-line)}
/* bare brand icon — no chip tint; urgency is carried by the status chip */
.dn-ico{width:38px;height:38px;flex:none;display:flex;
  align-items:center;justify-content:center;color:var(--green-deep)}
.dn-ico svg{width:28px;height:28px;stroke-width:1.5}
.dn-body{flex:1;min-width:0}
.dn-top{display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.dn-title{font-size:14px;font-weight:600;color:var(--ink);letter-spacing:-.01em}
.dn-chip{font-size:10px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;
  padding:3px 8px;border-radius:var(--r-pill);line-height:1}
.docnote.required .dn-chip{background:var(--alert-tint);color:var(--alert)}
.docnote.pending .dn-chip{background:var(--info-tint);color:var(--info)}
.dn-desc{font-size:12.5px;color:var(--muted);line-height:1.5;margin-top:5px}
.dn-act{flex:none;display:inline-flex;align-items:center;justify-content:center;gap:7px;
  font-size:13.5px;font-weight:600;letter-spacing:-.01em;padding:11px 18px;border-radius:12px;
  background:var(--green-deep);color:#fff;transition:transform .04s ease}
.dn-act svg{width:15px;height:15px}
.dn-act.ghost{background:var(--paper);color:var(--ink);box-shadow:inset 0 0 0 1px var(--line-2)}
.dn-act:active{transform:scale(.98)}
@media (max-width:560px){
  .docnote{flex-wrap:wrap}
  .dn-act{width:100%;margin-top:2px}
}

/* "View" trigger on a document row */
.doc-view{display:inline-flex;align-items:center;gap:5px;font-size:12.5px;font-weight:600;
  color:var(--green);background:none;border:none;padding:0;cursor:pointer}
.doc-view:hover{text-decoration:underline}
.doc-view svg{width:14px;height:14px}

/* Document preview modal */
.docmodal{position:fixed;inset:0;z-index:1000;display:flex;align-items:center;justify-content:center;padding:24px}
.docmodal[hidden]{display:none}
.docmodal-backdrop{position:absolute;inset:0;background:rgba(26,53,40,.55)}
.docmodal-box{position:relative;z-index:1;background:var(--paper);border-radius:var(--r-lg);
  width:100%;max-width:560px;max-height:88vh;display:flex;flex-direction:column;overflow:hidden;
  box-shadow:0 24px 64px rgba(0,0,0,.32)}
.docmodal-head{display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:14px 18px;border-bottom:1px solid var(--line);flex:none}
.docmodal-title{font-size:14px;font-weight:600;color:var(--ink);letter-spacing:-.01em}
.docmodal-close{width:32px;height:32px;border-radius:9px;border:none;background:var(--raise);
  color:var(--muted);display:flex;align-items:center;justify-content:center;cursor:pointer}
.docmodal-close:hover{background:var(--line);color:var(--ink)}
.docmodal-body{padding:16px;overflow:auto;background:var(--raise);display:flex;
  align-items:center;justify-content:center;min-height:220px}
.docmodal-img{max-width:100%;max-height:70vh;border-radius:var(--r-sm);display:block}
.docmodal-frame{width:100%;height:70vh;border:none;border-radius:var(--r-sm);background:#fff}

/* ── Resource library + Help centre ──────────────────────────────
   Articles hub, article detail and FAQ pages. Token-only colours;
   reuses qgrid/qtile, ticket-shell/rail, related-card, supportbar.
   Cover "imagery" is inline SVG illustration (cover-art partial) —
   offline-safe and re-skinnable, per the brand-deferral principle. */

/* shared cover art (cards, featured, article banner) — fills its
   positioned container so auto-height covers (featured, desktop) work */
.cover-art{position:absolute;inset:0;width:100%;height:100%;display:block}
.cover-photo{object-fit:cover}

/* JS search hides cards/groups via [hidden] — must beat the display
   rules below regardless of source order */
.feat-card[hidden],.rescard[hidden],.res-group[hidden],
.faqsec[hidden],.faq details[hidden]{display:none}

/* hero */
.res-hero{position:relative;overflow:hidden;background:var(--green-deep);
  border-radius:var(--r-lg);padding:26px 22px;margin-bottom:20px}
.res-hero>*{position:relative;z-index:1}
.res-hero .rh-art{position:absolute;inset:0;left:auto;width:62%;height:100%;z-index:0;
  pointer-events:none}
.res-hero .eyebrow{color:rgba(255,255,255,.55);margin-bottom:10px}
.res-hero h1{font-family:var(--display);font-size:25px;font-weight:600;color:#fff;
  letter-spacing:-.02em;line-height:1.2;margin-bottom:8px;max-width:480px}
.res-hero p{font-size:13px;color:rgba(255,255,255,.75);line-height:1.55;
  max-width:430px;margin-bottom:18px}
.res-search{display:flex;align-items:center;gap:10px;background:var(--paper);
  border-radius:14px;padding:13px 16px;max-width:440px}
.res-search svg{color:var(--faint);flex:none}
.res-search input{flex:1;min-width:0;border:0;background:none;font:inherit;
  font-size:14px;color:var(--ink);outline:none}
.res-search input::placeholder{color:var(--faint)}
.res-search:focus-within{outline:2px solid #fff;outline-offset:2px}
.res-meta{display:flex;gap:8px 18px;flex-wrap:wrap;margin-top:16px;font-size:12px;
  color:rgba(255,255,255,.66);font-weight:500}
.res-meta span{display:inline-flex;align-items:center;gap:6px}
.res-meta svg{width:14px;height:14px;flex:none;opacity:.8}

/* featured guide */
.feat-card{display:flex;flex-direction:column;background:var(--paper);
  border-radius:var(--r-lg);overflow:hidden;box-shadow:var(--sh-2);margin-bottom:24px}
.feat-card .fc-cover{position:relative;height:168px;flex:none}
.feat-card .fc-body{padding:18px 20px 20px;display:flex;flex-direction:column;
  align-items:flex-start;flex:1;min-width:0}
.fc-kick{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:10px}
.feat-chip{display:inline-flex;align-items:center;gap:5px;font-size:10px;font-weight:700;
  letter-spacing:.05em;text-transform:uppercase;background:var(--cream);
  color:var(--cream-ink);padding:4px 10px;border-radius:var(--r-pill)}
.feat-chip svg{flex:none}
.feat-card h2{font-family:var(--display);font-size:20px;font-weight:600;color:var(--ink);
  letter-spacing:-.02em;line-height:1.25;margin-bottom:6px}
.fc-ex{font-size:13px;color:var(--muted);line-height:1.55;margin-bottom:16px}
.fc-foot{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin-top:auto;width:100%}
.fc-cta{display:inline-flex;align-items:center;gap:7px;background:var(--green-deep);
  color:#fff;font-size:12.5px;font-weight:600;letter-spacing:-.01em;
  padding:10px 17px;border-radius:12px;margin-left:auto;
  transition:transform .04s ease}
.feat-card:active .fc-cta{transform:scale(.98)}

/* reading-time tag (featured + cards) */
.ac-time{display:inline-flex;align-items:center;gap:5px;font-size:11.5px;
  color:var(--faint);font-weight:500;white-space:nowrap}
.ac-time svg{width:13px;height:13px;flex:none}

/* section header — icon chip + title + count (resources + FAQ) */
.res-sec{display:flex;align-items:center;gap:11px;margin:24px 0 13px;padding:0 2px}
.res-sec .ic{width:34px;height:34px;border-radius:10px;flex:none;display:flex;
  align-items:center;justify-content:center;background:var(--green-tint);color:var(--green)}
.res-sec .ic.order{background:var(--cream);color:var(--cream-ink)}
.res-sec .ic.report{background:var(--alert-tint);color:var(--alert)}
.res-sec .ic.info{background:var(--info-tint);color:var(--info)}
.res-sec h2{font-size:15.5px;font-weight:600;letter-spacing:-.01em;color:var(--ink);
  line-height:1.25}
.res-sec .ct{font-size:11.5px;color:var(--muted);font-weight:500;margin-top:2px}

/* guide card grid (.rescard — .acard is taken by the admin portal) */
.agrid{display:grid;grid-template-columns:1fr;gap:12px;margin-bottom:8px}
.rescard{display:flex;flex-direction:column;background:var(--paper);
  border-radius:var(--r-md);overflow:hidden;box-shadow:var(--sh-1);
  transition:transform .12s ease,box-shadow .12s ease}
.rescard:hover{transform:translateY(-2px);
  box-shadow:var(--sh-hover),0 0 0 1px var(--line-2)}
.rescard .ac-cover{position:relative;height:118px;flex:none}
.rescard .ac-body{padding:13px 16px 14px;display:flex;flex-direction:column;flex:1;min-width:0}
.ac-tag{font-size:10.5px;font-weight:600;letter-spacing:.05em;text-transform:uppercase;
  color:var(--green);margin-bottom:5px}
.ac-tag.order{color:var(--cream-ink)}
.ac-tag.report{color:var(--alert-ink)}
.rescard h3{font-size:14.5px;font-weight:600;letter-spacing:-.01em;line-height:1.3;
  color:var(--ink);margin-bottom:4px}
.ac-ex{font-size:12.5px;color:var(--muted);line-height:1.5;flex:1}
.ac-foot{display:flex;align-items:center;gap:8px;margin-top:12px;padding-top:11px;
  border-top:1px solid var(--line)}
.ac-foot .go{margin-left:auto;display:inline-flex;align-items:center;gap:4px;
  color:var(--green);font-weight:600;font-size:12px}

/* search empty state */
.res-empty{display:flex;gap:13px;align-items:flex-start;background:var(--paper);
  border-radius:var(--r-md);box-shadow:var(--sh-1);padding:18px;margin-bottom:18px;
  color:var(--faint)}
.res-empty[hidden]{display:none}
.res-empty b{display:block;font-size:13.5px;font-weight:600;color:var(--ink);
  letter-spacing:-.01em;margin-bottom:3px}
.res-empty p{font-size:12.5px;color:var(--muted);line-height:1.5}

/* two-up quick tiles */
.qgrid.two{grid-template-columns:repeat(2,1fr)}

/* ── FAQ page ── */
.faq-search{display:flex;align-items:center;gap:10px;background:var(--paper);
  border-radius:var(--r-md);box-shadow:var(--sh-1);padding:14px 16px;margin-bottom:14px}
.faq-search svg{color:var(--faint);flex:none}
.faq-search input{flex:1;min-width:0;border:0;background:none;font:inherit;
  font-size:14px;color:var(--ink);outline:none}
.faq-search input::placeholder{color:var(--faint)}
.faq-search:focus-within{box-shadow:0 0 0 2px var(--focus)}
.faq-tabs{margin-bottom:20px}
.faqsec{scroll-margin-top:90px}
.faqsec .res-sec{margin-top:30px}
/* align the rail's top with the first FAQ heading (which carries a 30px top margin) */
@media(min-width:768px){.faq-rail{margin-top:30px}}
.faqsec .res-sec h2{font-size:18px}
.faqsec .res-sec .ct{font-size:13px;margin-top:3px}
.faq{background:var(--paper);border-radius:var(--r-md);box-shadow:var(--sh-1);
  overflow:hidden;margin-bottom:10px}
.faq details+details{border-top:1px solid var(--line)}
.faq summary{display:flex;align-items:center;gap:12px;padding:15px 18px;cursor:pointer;
  list-style:none;font-size:14px;font-weight:600;letter-spacing:-.01em;color:var(--ink)}
.faq summary::-webkit-details-marker{display:none}
.faq summary:hover{background:var(--raise)}
.faq summary .chev{margin-left:auto;flex:none;color:var(--faint);
  transition:transform .18s ease}
.faq details[open] summary{color:var(--green-deep)}
.faq details[open] summary .chev{transform:rotate(180deg);color:var(--green)}
.faq .ans{padding:0 18px 17px;font-size:13px;color:var(--muted);line-height:1.6}
.faq .ans a{color:var(--green);font-weight:600}
.faq .ans a:hover{text-decoration:underline}

/* ── article detail ── */
.article-shell{max-width:1100px}
.article-card{background:var(--paper);border-radius:var(--r-lg);overflow:hidden;
  box-shadow:var(--sh-2)}
.article-card .ab-cover{position:relative;height:150px}
.article-card .ab-in{padding:22px 20px 26px}
.article-head{margin-bottom:18px;padding-bottom:18px;border-bottom:1px solid var(--line)}
.article-head .article-meta{margin-top:0;margin-bottom:0}
.article-head h1{font-family:var(--display);font-size:24px;font-weight:600;
  letter-spacing:-.02em;line-height:1.22;color:var(--ink);margin:12px 0 10px}
.article-time{display:inline-flex;align-items:center;gap:5px}
.article-time svg{flex:none}
.review-tag{display:flex;align-items:center;gap:6px;flex-wrap:wrap;font-size:11.5px;
  color:var(--faint);font-weight:500;line-height:1.4}
.review-tag svg{width:13px;height:13px;flex:none;color:var(--green)}

/* related-card additions: stacked labels + tonal icon chips */
.related-card .lb .t1,.related-card .lb .t2{display:block}
.related-card .ic.clin-tone{background:var(--green-tint);color:var(--green)}
.related-card .ic.order-tone{background:var(--cream);color:var(--cream-ink)}
.related-card .ic.report-tone{background:var(--alert-tint);color:var(--alert)}

/* ── responsive ── */
@media (min-width:768px){
  .res-hero{padding:34px 32px}
  .res-hero h1{font-size:30px}
  .res-hero p{font-size:14px}
  .feat-card{flex-direction:row}
  .feat-card .fc-cover{width:42%;height:auto;min-height:230px}
  .feat-card .fc-body{padding:26px 28px}
  .feat-card h2{font-size:23px}
  .fc-ex{font-size:13.5px}
  .agrid{grid-template-columns:repeat(2,1fr);gap:14px}
  .res-sec h2{font-size:16.5px}
  .article-card .ab-cover{height:190px}
  .article-card .ab-in{padding:30px 32px 34px}
  .article-head h1{font-size:28px}
  .article-body{font-size:14.5px}
}
@media (min-width:1024px){
  .res-hero{padding:38px 36px}
  .res-hero h1{font-size:32px}
  .agrid{grid-template-columns:repeat(3,1fr);gap:16px}
  .rescard .ac-cover{height:128px}
  .article-card .ab-cover{height:210px}
  .article-head h1{font-size:30px}
}
@media (min-width:1280px){
  .agrid{gap:18px}
}
