/* ============================================================
   NatuRx — "Living Apothecary" design system
   Forest + sage + apothecary amber on herbarium paper.
   Cormorant Garamond (display) · Hanken Grotesk (UI) · Spline Sans Mono (data)
   ============================================================ */

:root{
  /* Clinical-professional palette: near-white ground, one authoritative deep
     green, bronze reserved for small highlights. (2026-09-12 brand refresh —
     the old cream + gold + romantic serif read as templated.) */
  --forest:#0F3D2E; --forest-700:#0B2E23; --forest-900:#07211A;
  --sage:#4E6B58; --sage-300:#A9BCA9; --sage-100:#E4EBE1;
  --amber:#B97F1F; --amber-600:#8F650F; --amber-100:#F3E9D2;
  --paper:#FAFAF6; --paper-2:#F2F2EA; --card:#FFFFFF;
  --ink:#16241C; --muted:#5D6B61; --line:#E3E3D9; --line-2:#ECECE3;
  --danger:#b3261e; --danger-bg:#fbeceb; --ok:#2F6B3C; --warn:#a2670e;
  --radius:12px; --radius-sm:8px; --shadow:0 1px 2px rgba(22,36,28,.04), 0 10px 28px rgba(22,36,28,.05);
  --maxw:1140px;
  --ff-display:"Source Serif 4",Georgia,serif;
  --ff-body:"Hanken Grotesk",system-ui,-apple-system,Segoe UI,sans-serif;
  --ff-mono:"Spline Sans Mono",ui-monospace,SFMono-Regular,Menlo,monospace;
}

*{box-sizing:border-box}
html{scroll-behavior:smooth}
body{
  margin:0; font-family:var(--ff-body); color:var(--ink);
  background:var(--paper);
  line-height:1.6; -webkit-font-smoothing:antialiased;
}
a{color:var(--forest); text-decoration:none}
a:hover{color:var(--amber-600)}
img{max-width:100%; display:block}
.container{max-width:var(--maxw); margin:0 auto; padding:0 22px}

/* ---------- Type ---------- */
h1,h2,h3,h4{font-family:var(--ff-display); font-weight:600; color:var(--ink); line-height:1.14; margin:0 0 .4em; letter-spacing:-.01em}
h1{font-size:clamp(2.3rem,4.6vw,3.6rem); letter-spacing:-.02em}
h2{font-size:clamp(1.8rem,3.2vw,2.4rem)}
h3{font-size:1.32rem}
.eyebrow{font-family:var(--ff-body); font-weight:600; font-size:.74rem; letter-spacing:.12em; text-transform:uppercase; color:var(--sage)}
.lede{font-size:1.18rem; color:#3c463a; max-width:62ch}
.muted{color:var(--muted)}
.mono{font-family:var(--ff-mono)}

/* ---------- Buttons ---------- */
.btn{display:inline-flex; align-items:center; gap:.5em; font-family:var(--ff-body); font-weight:600;
  font-size:.98rem; padding:.78em 1.5em; border-radius:999px; border:1.5px solid transparent;
  cursor:pointer; transition:transform .15s ease, background .2s, color .2s, box-shadow .2s; text-decoration:none}
.btn:hover{transform:translateY(-1px)}
.btn-primary{background:var(--forest); color:#fff}
.btn-primary:hover{background:var(--forest-700); color:#fff}
/* Historic class name; renders as the primary brand button (deep green). */
.btn-amber{background:var(--forest); color:#fff}
.btn-amber:hover{background:var(--forest-700); color:#fff}
.btn:active{transform:scale(.98)}
.btn-ghost{background:transparent; color:var(--forest); border-color:var(--forest)}
.btn-ghost:hover{background:var(--forest); color:var(--paper)}
.btn-block{display:flex; width:100%; justify-content:center}
.btn-sm{padding:.5em 1em; font-size:.85rem}

/* ---------- Nav ---------- */
/* White, because the logo is drawn on white: the wordmark's gold and deep green were
   picked against it, and the old cream put a second warm tone behind a mark that already
   has one. Still translucent with a blur so content reads through it when the bar sticks. */
.nav{position:sticky; top:0; z-index:50; background:rgba(255,255,255,.90); backdrop-filter:blur(10px);
  border-bottom:1px solid var(--line)}
.nav-inner{display:flex; align-items:center; justify-content:space-between; height:72px}
/* flex:0 0 auto because the brand is a flex item and WILL be shrunk by the nav links
   competing for width. Between 900 and 1100px the logo was squashed to 49px of its 146 —
   the image kept its 38px height while its box collapsed, so the wordmark read as cut.
   The links shrink instead; they have padding to give and a logo does not.             */
.brand{display:flex; align-items:center; gap:.6rem; flex:0 0 auto; font-family:var(--ff-display);
  font-weight:600; font-size:1.7rem; color:var(--ink); letter-spacing:-.3px}
.brand .rx{color:var(--amber-600)}
.brand-mark{width:34px;height:34px}
.nav-links{display:flex; align-items:center; gap:.4rem; min-width:0; flex-wrap:nowrap}
/* Between the drawer breakpoint and ~1120px the five links, the cart, Sign in and the
   CTA genuinely do not fit beside a 146px logo. Tighten them a little here; below 1040
   the drawer takes over, because cramming a row until something distorts is not a fix. */
@media (min-width:1041px) and (max-width:1120px){
  .nav-links{gap:.1rem}
  .nav-links a{padding:.5rem .6rem; font-size:.9rem}
}
.nav-links a{padding:.5rem .85rem; border-radius:8px; color:var(--ink); font-weight:500; font-size:.95rem}
.nav-links a:hover{background:var(--sage-100); color:var(--forest)}
/* Buttons inside the nav keep button colors (".nav-links a" outranks ".btn-*"). */
.nav-links a.btn-amber,.nav-links a.btn-primary{color:#fff}
.nav-links a.btn-amber:hover,.nav-links a.btn-primary:hover{background:var(--forest-700); color:#fff}
.nav-toggle{display:none; background:none; border:0; font-size:1.6rem; cursor:pointer; color:var(--ink)}

/* ---------- Full-bleed cinematic hero ---------- */
.hero-cine{position:relative; min-height:88vh; display:flex; align-items:center; overflow:hidden; background:var(--forest-900)}
.hero-cine .hero-bg{position:absolute; inset:0; width:100%; height:100%; object-fit:cover; z-index:0}
.hero-cine .hero-overlay{position:absolute; inset:0; z-index:1; background:
  linear-gradient(90deg, rgba(13,30,21,.88) 0%, rgba(13,30,21,.62) 40%, rgba(13,30,21,.18) 72%, rgba(13,30,21,.42) 100%),
  linear-gradient(0deg, rgba(13,30,21,.72) 0%, rgba(13,30,21,0) 48%)}
.hero-cine-inner{position:relative; z-index:2; color:#fff; max-width:680px; padding:70px 0}
.hero-cine-inner .eyebrow{color:var(--amber)}
.hero-cine-inner h1{color:#fff; text-shadow:0 2px 30px rgba(0,0,0,.35)}
.hero-cine-inner h1 em{font-style:normal; color:#E8C989}
.hero-cine-inner .lede{color:#eaf0e7; max-width:60ch}
.hero-cine-inner .hero-note{margin-top:1.4rem; font-size:.86rem; color:#bccdb7}
.hero-cine-inner .btn-amber{background:var(--paper); color:var(--forest-900)}
.hero-cine-inner .btn-amber:hover{background:#fff; color:var(--forest-900)}
.hero-cine-inner .btn-ghost{color:#fff; border-color:rgba(255,255,255,.65)}
.hero-cine-inner .btn-ghost:hover{background:#fff; color:var(--forest)}
.hero-scroll{position:absolute; left:50%; bottom:20px; transform:translateX(-50%); z-index:2; color:#cdd9c8; font-family:var(--ff-mono); font-size:.62rem; letter-spacing:.22em; text-transform:uppercase; opacity:.85}
.hero-scroll::after{content:""; display:block; width:1px; height:26px; margin:8px auto 0; background:linear-gradient(var(--amber), transparent)}

/* ---------- Hero (legacy split) ---------- */
.hero{position:relative; background:
  radial-gradient(1200px 500px at 80% -10%, rgba(91,122,91,.18), transparent 60%),
  linear-gradient(180deg, var(--paper) 0%, var(--paper-2) 100%);
  overflow:hidden}
.hero-grid{display:grid; grid-template-columns:1.1fr .9fr; gap:48px; align-items:center; padding:72px 0 80px}
.hero h1{margin-bottom:.25em}
.hero .lede{margin:0 0 2rem}
.hero-cta{display:flex; gap:.8rem; flex-wrap:wrap}
.hero-aside{position:relative}
.hero-figure{position:relative}
.hero-figure>img,.hero-figure>video{width:100%;height:460px;object-fit:cover;border-radius:18px;box-shadow:0 24px 60px rgba(31,42,36,.22);display:block;background:var(--forest-900)}
.hero-figure::after{content:"";position:absolute;inset:0;border-radius:18px;pointer-events:none;box-shadow:inset 0 0 0 1px rgba(255,255,255,.18), inset 0 -80px 90px -40px rgba(15,33,24,.55)}
.hero-figure .play-note{position:absolute;top:14px;right:14px;z-index:3;font-family:var(--ff-mono);font-size:.6rem;letter-spacing:.18em;text-transform:uppercase;color:#fff;background:rgba(15,33,24,.45);backdrop-filter:blur(6px);padding:5px 10px;border-radius:999px}
.hero-readout{position:absolute;left:-26px;bottom:-26px;width:66%;min-width:240px;padding:18px 20px}
.media{height:210px;object-fit:cover;border-radius:11px 11px 0 0;margin:-26px -26px 16px;width:calc(100% + 52px);max-width:none;display:block}
.media-sm{height:170px}
/* Artwork that carries its own baked-in headline (the supplied category banners and the
   CLEANSE / NOURISH / STRENGTHEN pillars) must never be cropped — a cover-crop eats the
   title. These keep their natural aspect ratio instead. */
.media.media-full{height:auto;object-fit:contain}
.img-full{height:auto!important;object-fit:contain!important}
.card-frame::before{z-index:1}
.card>*{position:relative;z-index:2}
.prac-photo{width:84px;height:84px;border-radius:50%;object-fit:cover;border:2px solid var(--sage-100);margin-bottom:6px}
.figure-tea{width:100%;height:340px;object-fit:cover;border-radius:16px;box-shadow:var(--shadow)}
.cine{position:relative;border-radius:18px;overflow:hidden;box-shadow:0 24px 60px rgba(31,42,36,.22)}
.cine>video,.cine>img{display:block;width:100%;height:380px;object-fit:cover;background:var(--forest-900)}
.cine::after{content:"";position:absolute;inset:0;border-radius:18px;pointer-events:none;box-shadow:inset 0 0 0 1px rgba(255,255,255,.16), inset 0 -70px 80px -40px rgba(15,33,24,.5)}
.cine .tag{position:absolute;left:16px;bottom:14px;z-index:2;font-family:var(--ff-mono);font-size:.62rem;letter-spacing:.18em;text-transform:uppercase;color:#fff;background:rgba(15,33,24,.5);backdrop-filter:blur(6px);padding:6px 12px;border-radius:999px}

/* signature: herbarium specimen frame */
.specimen{position:relative; background:var(--card); border:1px solid var(--line);
  border-radius:var(--radius); padding:26px; box-shadow:var(--shadow)}
.specimen::before{content:none}
.specimen .latin{font-family:var(--ff-display); font-style:italic; color:var(--sage); font-size:1.05rem}
.specimen .sci{font-family:var(--ff-mono); font-size:.7rem; letter-spacing:.18em; text-transform:uppercase; color:var(--amber-600)}

/* ---------- Cards ---------- */
.grid{display:grid; gap:22px}
.grid-3{grid-template-columns:repeat(3,1fr)}
.grid-4{display:grid;gap:14px;grid-template-columns:repeat(4,1fr)}
@media(max-width:1100px){.qa-grid{grid-template-columns:repeat(2,1fr)}}
@media(max-width:560px){.qa-grid{grid-template-columns:1fr}}
.grid-2{grid-template-columns:repeat(2,1fr)}
.card{background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:26px; box-shadow:var(--shadow)}
.card h3{margin-top:.2rem}
.card-frame{position:relative}
/* 2026-09-12: decorative inner frame removed — clean single-border cards. */
.card-frame::before{content:none}
.card .ico{width:46px;height:46px;border-radius:11px;display:grid;place-items:center;background:var(--sage-100);color:var(--forest);margin-bottom:14px;font-size:1.3rem}

/* ---------- Sections ---------- */
.section{padding:76px 0}
.section-head{max-width:64ch; margin-bottom:40px}
.section-alt{background:var(--card); border-block:1px solid var(--line)}
.section-forest{background:var(--forest); color:#e9efe6}
.section-forest h1,.section-forest h2,.section-forest h3{color:#fff}
.section-forest .lede{color:#cdd9c8}
.section-forest .eyebrow,.section-tracks .eyebrow,.hero-cine .eyebrow{color:#D9B36A}

/* ---------- Badges / pills ---------- */
.badge{display:inline-flex; align-items:center; gap:.4em; font-family:var(--ff-mono); font-size:.68rem;
  letter-spacing:.12em; text-transform:uppercase; padding:.32em .7em; border-radius:999px;
  background:var(--sage-100); color:var(--forest); border:1px solid var(--sage-100)}
.badge-amber{background:var(--amber-100); color:var(--amber-600); border-color:var(--amber-100)}
.badge-danger{background:var(--danger-bg); color:var(--danger); border-color:#f1d4d2}
.badge-ok{background:#e6f0e6; color:var(--ok)}
.badge-muted{background:var(--line-2); color:var(--muted)}

/* ---------- Lab gauge (apothecary readout) ---------- */
.gauge{display:flex; align-items:center; gap:12px; padding:12px 0; border-top:1px solid var(--line-2)}
.gauge-name{flex:1; font-weight:600}
.gauge-val{font-family:var(--ff-mono); font-weight:600}
.gauge-bar{position:relative; height:8px; width:160px; border-radius:6px; background:linear-gradient(90deg,#cfe0c9,#eadfae,#cfe0c9)}
.gauge-pin{position:absolute; top:-3px; width:3px; height:14px; background:var(--ink); border-radius:2px; transform:translateX(-50%)}
.cls-LOW,.cls-HIGH{color:var(--danger)} .cls-BORDERLINE_LOW,.cls-BORDERLINE_HIGH{color:var(--warn)} .cls-OPTIMAL{color:var(--ok)}

/* ---------- Forms ---------- */
.form{max-width:440px}
.field{margin-bottom:16px}
.field label{display:block; font-weight:600; font-size:.9rem; margin-bottom:6px; color:var(--ink)}
.input,select,textarea{width:100%; font-family:var(--ff-body); font-size:1rem; padding:.72em .9em;
  border:1.5px solid var(--line); border-radius:var(--radius-sm); background:#fff; color:var(--ink)}
.input:focus,select:focus,textarea:focus{outline:none; border-color:var(--sage); box-shadow:0 0 0 3px rgba(91,122,91,.18)}
.auth-wrap{max-width:480px; margin:54px auto; padding:0 22px}
.auth-card{background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:38px; box-shadow:var(--shadow)}

/* ---------- Alerts ---------- */
.alert{padding:14px 16px; border-radius:var(--radius-sm); margin-bottom:18px; font-size:.95rem; border:1px solid}
.alert-error{background:var(--danger-bg); border-color:#f1d4d2; color:var(--danger)}
.alert-ok{background:#e9f1e9; border-color:#cfe0c9; color:var(--ok)}
.alert-info{background:var(--amber-100); border-color:#ecd9b3; color:var(--amber-600)}

/* ---------- Disclaimer ribbon ---------- */
.disclaimer{background:var(--forest-900); color:#cdd9c8; font-size:.82rem; text-align:center; padding:8px 16px}
.disclaimer strong{color:var(--amber)}

/* ---------- App shell (dashboards) ---------- */
.app{display:grid; grid-template-columns:248px 1fr; min-height:100vh}
.side{background:var(--forest); color:#cdd9c8; padding:24px 16px; position:sticky; top:0; height:100vh; overflow:auto}
.side .brand{color:#F5F2E9; font-size:1.45rem; padding:0 8px 18px}
.side .brand .rx{color:var(--amber)}
.side a{display:flex; align-items:center; gap:.6rem; color:#bcccb8; padding:.62rem .8rem; border-radius:9px; font-weight:500; font-size:.94rem}
.side a:hover{background:var(--forest-700); color:#fff}
.side a.active{background:var(--amber); color:#1c1405}
.side .side-group{font-family:var(--ff-mono); font-size:.64rem; letter-spacing:.18em; text-transform:uppercase; color:var(--sage-300); padding:18px 10px 6px}
.main{padding:30px 34px; background:var(--paper)}
.topbar{display:flex; align-items:center; justify-content:space-between; margin-bottom:26px}
.page-title{font-family:var(--ff-display); font-size:2rem; margin:0}

/* stat tiles */
.stats{display:grid; grid-template-columns:repeat(4,1fr); gap:16px; margin-bottom:26px}
.stat{background:var(--card); border:1px solid var(--line); border-radius:var(--radius); padding:18px 20px}
.stat .n{font-family:var(--ff-display); font-size:2rem; color:var(--forest)}
.stat .l{font-size:.82rem; color:var(--muted)}

/* footer */
.footer{background:var(--forest-900); color:#9db39a; padding:54px 0 28px; margin-top:0}
.footer h4{color:#F5F2E9; font-family:var(--ff-body); font-size:.8rem; letter-spacing:.1em; text-transform:uppercase}
.footer a{color:#bcccb8; display:block; padding:3px 0}
.footer a:hover{color:var(--amber)}
.footer-grid{display:grid; grid-template-columns:1.5fr 1fr 1fr 1fr; gap:30px; margin-bottom:30px}
.footer-base{border-top:1px solid rgba(255,255,255,.08); padding-top:20px; font-size:.8rem; color:#7c8478}

/* tables */
.table{width:100%; border-collapse:collapse; background:var(--card); border:1px solid var(--line); border-radius:var(--radius); overflow:hidden}
.table th,.table td{text-align:left; padding:12px 14px; border-bottom:1px solid var(--line-2); font-size:.92rem}
.table th{font-family:var(--ff-mono); font-size:.68rem; letter-spacing:.1em; text-transform:uppercase; color:var(--muted); background:var(--paper-2)}
.table tr:last-child td{border-bottom:0}

/* utility */
.flex{display:flex} .between{justify-content:space-between} .center{align-items:center}
.gap{gap:14px} .wrap{flex-wrap:wrap}
.mt0{margin-top:0}.mb0{margin-bottom:0}.mt2{margin-top:1.4rem}.mb2{margin-bottom:1.4rem}
[data-reveal]{opacity:0; transform:translateY(18px); transition:opacity .7s ease, transform .7s ease}
[data-reveal].in{opacity:1; transform:none}

/* responsive */
@media (max-width:880px){
  .hero-grid,.grid-3,.grid-2,.footer-grid,.stats{grid-template-columns:1fr}
  .stats{grid-template-columns:repeat(2,1fr)}
  .app{grid-template-columns:1fr}
  .side{position:static; height:auto; display:none}
  .side.open{display:block}
}
/* The public nav needs the drawer sooner than the page grid needs one column: the links
   stop fitting beside the logo at about 1040px, well before the 880px layout break. */
@media (max-width:1040px){
  .nav-links{display:none}
  /* The toggle has always written .show on #nl and NOTHING matched it, so the public
     hamburger opened nothing — the same fault the app sidebar had. */
  .nav-links.show{display:flex; flex-direction:column; align-items:stretch;
    position:absolute; left:0; right:0; top:100%; gap:2px; padding:10px 16px 16px;
    background:rgba(255,255,255,.98); backdrop-filter:blur(10px);
    border-bottom:1px solid var(--line); box-shadow:0 14px 30px rgba(20,35,26,.10)}
  .nav-links.show a{padding:.7rem .8rem}
  .nav-toggle{display:block}
  .nav-inner{position:relative}
}
@media (prefers-reduced-motion:reduce){
  *{scroll-behavior:auto!important}
  [data-reveal]{opacity:1!important; transform:none!important; transition:none}
}

/* ============================================================
   Blended sections — Apple-style color melt (2026-09 redesign)
   Sections stop being flat bands: cream melts into imagery and
   back, with soft ambient color fields carrying the palette.
   ============================================================ */
.section-ambient{background:
  radial-gradient(900px 420px at 10% -5%, rgba(91,122,91,.11), transparent 62%),
  radial-gradient(760px 340px at 92% 105%, rgba(200,134,43,.08), transparent 60%)}

/* Healing-tracks band: dark botanical photograph, cream-melted edges */
.section-tracks{position:relative; padding:150px 0 160px; color:#e9efe6; isolation:isolate}
.section-tracks::before{content:""; position:absolute; inset:0; z-index:-2;
  background:url('../images/tracks-forest.webp') center/cover no-repeat; background-color:var(--forest-900)}
.section-tracks::after{content:""; position:absolute; inset:0; z-index:-1; background:
  linear-gradient(180deg, var(--paper) 0%, rgba(245,242,233,0) 16%, rgba(245,242,233,0) 84%, var(--paper) 100%),
  linear-gradient(180deg, rgba(9,22,15,.20) 8%, rgba(9,22,15,.52) 48%, rgba(9,22,15,.34) 90%)}
.section-tracks h2{color:#fff; text-shadow:0 2px 26px rgba(0,0,0,.5)}
.section-tracks .lede{color:#e2ead9; text-shadow:0 1px 14px rgba(0,0,0,.4)}
.section-tracks .section-head{margin-bottom:34px}

/* Glass cards over imagery (translucent material, not flat panels) */
.card-glass{background:rgba(10,25,17,.44); -webkit-backdrop-filter:blur(14px); backdrop-filter:blur(14px);
  border:1px solid rgba(255,255,255,.15); border-radius:var(--radius); padding:26px;
  box-shadow:0 18px 44px rgba(0,0,0,.30); transition:transform .22s cubic-bezier(.23,1,.32,1), border-color .22s ease}
@media (hover:hover) and (pointer:fine){
  .card-glass:hover{transform:translateY(-4px); border-color:rgba(255,255,255,.30)}
}

/* Hero trust chips */
.hero-chips{display:flex; gap:10px; flex-wrap:wrap; margin-top:1.3rem}
.hero-chips .chip{font-family:var(--ff-body); font-weight:600; font-size:.72rem; letter-spacing:.06em; text-transform:uppercase;
  color:#eef3ea; border:1px solid rgba(255,255,255,.28); background:rgba(13,30,21,.38);
  -webkit-backdrop-filter:blur(8px); backdrop-filter:blur(8px); padding:.55em 1.05em; border-radius:999px}
.hero-chips .chip::before{content:"✓  "; color:var(--amber)}

/* Consult figure (image variant of .cine) */
.cine-img{position:relative; border-radius:18px; overflow:hidden; box-shadow:0 24px 60px rgba(31,42,36,.22)}
.cine-img>img{display:block; width:100%; height:440px; object-fit:cover; background:var(--forest-900)}
.cine-img::after{content:""; position:absolute; inset:0; border-radius:18px; pointer-events:none;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.16), inset 0 -70px 80px -40px rgba(15,33,24,.42)}
.cine-img .tag{position:absolute; left:16px; bottom:14px; z-index:2; font-family:var(--ff-mono); font-size:.62rem;
  letter-spacing:.18em; text-transform:uppercase; color:#fff; background:rgba(15,33,24,.5);
  -webkit-backdrop-filter:blur(6px); backdrop-filter:blur(6px); padding:6px 12px; border-radius:999px}

/* Differentiator checklist */
.diff-list{list-style:none; padding:0; margin:18px 0 22px}
.diff-list li{position:relative; padding:10px 0 10px 34px; border-top:1px solid var(--line-2)}
.diff-list li:first-child{border-top:0}
.diff-list li::before{content:"✓"; position:absolute; left:6px; top:9px; color:var(--amber-600);
  font-weight:700; font-family:var(--ff-mono)}
.diff-list strong{color:var(--ink)}

@media (max-width:720px){
  .section-tracks{padding:104px 0 116px}
  .cine-img>img{height:300px}
}
@media (prefers-reduced-motion: reduce){
  .card-glass{transition:none}
}

/* ---- signed-in app imagery (includes/app_art.php) ----
   App pages are work surfaces: a slim identity strip, icon-led headings and an
   illustrated empty state — never a hero that buries the actual task. */
.app-banner{position:relative; height:var(--ab-h,150px); border-radius:14px; overflow:hidden;
  margin:0 0 20px; box-shadow:var(--shadow); background:var(--forest-900)}
.app-banner img{width:100%; height:100%; object-fit:cover; object-position:center 42%; display:block}
.app-banner::after{content:""; position:absolute; inset:0; pointer-events:none;
  background:linear-gradient(90deg,rgba(7,33,26,.55) 0%,rgba(7,33,26,.12) 55%,rgba(7,33,26,0) 100%)}
.app-banner-cap{position:absolute; left:20px; bottom:16px; z-index:2; color:#fff;
  font-family:var(--ff-display); font-size:1.25rem; line-height:1.2; max-width:70%;
  text-shadow:0 2px 18px rgba(0,0,0,.45)}
@media(max-width:700px){ .app-banner{height:112px} .app-banner-cap{font-size:1.02rem; left:14px} }

.app-head{display:flex; align-items:center; gap:11px; margin:0 0 12px}
.app-head-ico{width:30px; height:30px; flex:0 0 30px; object-fit:contain}

.app-empty{text-align:center; padding:30px 18px}
.app-empty img{width:84px; height:84px; object-fit:contain; opacity:.92; margin-bottom:10px}
.app-empty-t{font-weight:600; margin:0 0 4px}
.app-empty-b{margin:0 auto 14px; max-width:46ch; font-size:.9rem}

/* ---- admin "view as" bar (includes/impersonate.php) ---- */
.imp-bar{position:sticky; top:0; z-index:200; display:flex; align-items:center; gap:10px;
  flex-wrap:wrap; padding:9px 16px; background:#7A3E12; color:#FFF4E2;
  font-size:.86rem; line-height:1.35; box-shadow:0 2px 10px rgba(0,0,0,.2)}
.imp-bar strong{color:#fff}
.imp-dot{width:9px; height:9px; border-radius:50%; background:#F0B445; flex:0 0 9px;
  box-shadow:0 0 0 3px rgba(240,180,69,.25)}
.imp-role{display:inline-block; font-family:var(--ff-mono); font-size:.66rem; letter-spacing:.09em;
  text-transform:uppercase; background:rgba(255,255,255,.17); border-radius:999px; padding:1px 8px}
.imp-form{margin:0 0 0 auto}
.imp-exit{border:1px solid rgba(255,255,255,.55); background:transparent; color:#fff;
  border-radius:999px; padding:5px 14px; font:inherit; font-size:.82rem; cursor:pointer}
.imp-exit:hover{background:#fff; color:#7A3E12}
@media(max-width:620px){ .imp-form{margin-left:0; width:100%} .imp-exit{width:100%} }

/* ---- brand logo ---------------------------------------------------------
   The header carries the real wordmark as an image. It is sized by HEIGHT with
   width:auto so the artwork's own proportions decide the rest — a fixed width
   would squash it the first time the logo is redrawn. The white background was
   cut out of the asset itself (naturx-logo-mark.webp) rather than hidden behind
   a white chip, so the mark sits on the cream bar, on a photo, anywhere.        */
.brand-img{gap:0}
.brand-logo{height:38px; width:auto; max-width:none; flex:none; display:block}
@media (max-width:860px){ .brand-logo{height:32px} }

/* ---- in-app notices ------------------------------------------------------ */
.notices{background:var(--card); border:1px solid var(--amber-100); border-left:3px solid var(--amber);
  border-radius:var(--radius); padding:14px 16px; margin-bottom:18px}
.notice{display:flex; justify-content:space-between; align-items:center; gap:14px;
  flex-wrap:wrap; padding:10px 0; border-top:1px solid var(--line-2)}
.notice:first-of-type{border-top:0}

/* ---- booking: pick a day, then a time --------------------------------------
   The day radios sit before the strip and the panels so a plain `~` rule can
   show the matching panel — no JavaScript, so the picker works before any
   script loads and on anything that blocks it. Per-day rules are emitted by
   book.php because it knows how many days there are.                          */
.bk-radio{position:absolute;opacity:0;pointer-events:none;width:0;height:0}

.bk-soonest{display:flex;align-items:center;justify-content:space-between;gap:16px;flex-wrap:wrap;
  background:var(--sage-100);border:1px solid var(--sage-100);border-radius:var(--radius);
  padding:16px 18px;margin-bottom:18px}
.bk-soonest .when{font-family:var(--ff-display);font-size:1.35rem;color:var(--forest);line-height:1.2}

.bk-strip{display:flex;gap:8px;overflow-x:auto;padding:2px 2px 10px;scroll-snap-type:x proximity;
  -webkit-overflow-scrolling:touch}
.bk-strip::-webkit-scrollbar{height:6px}
.bk-strip::-webkit-scrollbar-thumb{background:var(--line);border-radius:99px}
.bk-day{flex:0 0 auto;scroll-snap-align:start;min-width:74px;text-align:center;cursor:pointer;
  border:1.5px solid var(--line);border-radius:12px;padding:10px 12px;background:var(--card);
  transition:transform 160ms cubic-bezier(.23,1,.32,1), border-color 160ms ease, background 160ms ease}
.bk-day:active{transform:scale(.97)}
.bk-day .dow{font-size:.72rem;letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.bk-day .num{font-family:var(--ff-display);font-size:1.5rem;line-height:1.1;color:var(--ink)}
.bk-day .mon{font-size:.72rem;color:var(--muted)}
.bk-day .n{display:inline-block;margin-top:5px;font-size:.68rem;padding:1px 7px;border-radius:99px;
  background:var(--paper-2);color:var(--muted)}
@media (hover:hover) and (pointer:fine){ .bk-day:hover{border-color:var(--forest)} }

.bk-panel{display:none}
.bk-times{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}
.bk-time{cursor:pointer;border:1.5px solid var(--line);border-radius:99px;padding:9px 16px;
  background:var(--card);font-size:.95rem;color:var(--ink);
  transition:transform 140ms cubic-bezier(.23,1,.32,1), border-color 140ms ease,
             background 140ms ease, color 140ms ease}
.bk-time:active{transform:scale(.97)}
@media (hover:hover) and (pointer:fine){ .bk-time:hover{border-color:var(--forest)} }

/* A chosen time is unmistakable: the whole pill fills. */
.bk-slot:checked + .bk-time{background:var(--forest);border-color:var(--forest);color:#fff}

.bk-panel-in{animation:bkRise 200ms cubic-bezier(.23,1,.32,1) both}
@keyframes bkRise{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}

@media (prefers-reduced-motion:reduce){
  .bk-day,.bk-time{transition:border-color 160ms ease, background 160ms ease}
  .bk-day:active,.bk-time:active{transform:none}
  .bk-panel-in{animation:none}
}

/* The strip scrolls; say so at the edge rather than letting a day look cut off. */
.bk-stripwrap{position:relative}
.bk-stripwrap::after{content:'';position:absolute;top:0;right:0;bottom:10px;width:34px;
  pointer-events:none;background:linear-gradient(90deg,rgba(255,255,255,0),var(--card))}

/* ---- laboratory request: dense tick lists ---------------------------------
   A request form is scanned, not read: two columns of small targets beat one
   long list, and the whole row is clickable so a tick never needs precision.  */
.lab-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:2px 10px}
@media (max-width:560px){ .lab-grid{grid-template-columns:1fr} }
.lab-pick{display:flex;align-items:center;gap:8px;padding:6px 8px;border-radius:8px;
  cursor:pointer;font-size:.92rem;line-height:1.3;
  transition:background 140ms ease}
.lab-pick input{flex:0 0 auto;margin:0}
.lab-pick:active{transform:scale(.99)}
@media (hover:hover) and (pointer:fine){ .lab-pick:hover{background:var(--paper-2)} }
.lab-pick:has(input:checked){background:var(--sage-100);font-weight:600}
@media (prefers-reduced-motion:reduce){ .lab-pick{transition:none} .lab-pick:active{transform:none} }

/* ---- app shell: the way back to the menu on a phone ------------------------
   .side is display:none below 900px and .side.open was the only route out of
   that, but nothing ever set it — a practitioner on a phone had no navigation
   at all. The button only exists where the sidebar is hidden.                 */
.side-toggle{display:none;align-items:center;justify-content:center;width:40px;height:40px;
  margin-right:12px;flex:0 0 auto;border:1px solid var(--line);border-radius:10px;
  background:var(--card);color:var(--forest);font-size:1.15rem;line-height:1;cursor:pointer;
  transition:transform 140ms cubic-bezier(.23,1,.32,1), background 140ms ease}
.side-toggle:active{transform:scale(.95)}
@media (max-width:900px){
  .side-toggle{display:inline-flex}
  .topbar{gap:0}
  .side.open{display:block;border-radius:12px;margin-bottom:16px;height:auto;position:static}
}
@media (prefers-reduced-motion:reduce){ .side-toggle{transition:none} .side-toggle:active{transform:none} }

/* ---- chart actions ---------------------------------------------------------
   Six identical pills read as a wall: nothing tells you which one you reach for
   most. These are tiles with an icon and a one-line purpose, the primary action
   carrying the brand fill, so the row can be scanned instead of read.          */
.chart-actions{display:grid;grid-template-columns:repeat(auto-fit,minmax(196px,1fr));gap:10px;margin-top:16px}
.ca{display:flex;align-items:center;gap:11px;padding:12px 14px;border-radius:12px;
  border:1px solid var(--line);background:var(--card);color:var(--ink);text-decoration:none;
  transition:transform 160ms cubic-bezier(.23,1,.32,1), border-color 160ms ease,
             box-shadow 160ms ease, background 160ms ease}
.ca img{width:26px;height:26px;flex:0 0 26px;object-fit:contain}
.ca-i{width:24px;height:24px;flex:0 0 24px;color:var(--forest);opacity:.85}
.ca-primary .ca-i{color:#fff;opacity:1}
.ca .t{font-weight:600;font-size:.94rem;line-height:1.15}
.ca .s{display:block;font-weight:400;font-size:.76rem;color:var(--muted);margin-top:2px}
.ca:active{transform:scale(.98)}
@media (hover:hover) and (pointer:fine){
  .ca:hover{border-color:var(--forest);box-shadow:0 6px 18px rgba(20,35,26,.08)}
}
/* The one a practitioner reaches for most often should not look like the rest. */
.ca-primary{background:var(--forest);border-color:var(--forest);color:#fff}
.ca-primary .s{color:#bcccb8}
.ca-primary img{filter:brightness(0) invert(1);opacity:.92}
.ca .t{text-wrap:balance}
@media (hover:hover) and (pointer:fine){
  .ca-primary:hover{background:var(--forest-900,#0D1E15);border-color:var(--forest-900,#0D1E15)}
}
@media (prefers-reduced-motion:reduce){ .ca{transition:border-color 160ms ease} .ca:active{transform:none} }

/* ---- week calendar --------------------------------------------------------
   A real grid: hours down, days across. The page used to be a text box for
   times and a flat table, which answers "what did I type" rather than
   "what does my week look like".                                             */
.cal-wrap{overflow-x:auto;border:1px solid var(--line);border-radius:var(--radius);background:var(--card)}
.cal{display:grid;grid-template-columns:58px repeat(7,minmax(104px,1fr));min-width:780px}
.cal-corner{position:sticky;left:0;z-index:3;background:var(--card);border-bottom:1px solid var(--line)}
.cal-dayhead{position:sticky;top:0;z-index:2;text-align:center;padding:9px 4px;background:var(--card);
  border-bottom:1px solid var(--line);border-left:1px solid var(--line-2)}
.cal-dayhead .dow{display:block;font-size:.68rem;letter-spacing:.09em;text-transform:uppercase;color:var(--muted)}
.cal-dayhead .num{display:block;font-family:var(--ff-display);font-size:1.25rem;line-height:1.15;color:var(--ink)}
.cal-dayhead.is-today .num{color:var(--forest)}
.cal-dayhead.is-today{background:var(--sage-100)}
.cal-hour{position:sticky;left:0;z-index:1;background:var(--card);font-size:.7rem;color:var(--muted);
  padding:6px 7px;text-align:right;border-top:1px solid var(--line-2)}
.cal-cell{min-height:46px;padding:4px;border-top:1px solid var(--line-2);border-left:1px solid var(--line-2);
  display:flex;flex-direction:column;gap:3px}
.cal-cell.is-today{background:rgba(94,122,91,.045)}
.cal-slotform{margin:0}

/* An open slot is a button because closing one is the commonest edit. */
.cal-slot{display:block;width:100%;font-size:.76rem;padding:3px 6px;border-radius:6px;cursor:pointer;
  border:1px dashed var(--forest);background:transparent;color:var(--forest);
  transition:transform 130ms cubic-bezier(.23,1,.32,1), background 130ms ease}
.cal-slot:active{transform:scale(.96)}
@media (hover:hover) and (pointer:fine){ .cal-slot:hover{background:var(--sage-100)} }
.cal-slot.past{border-style:solid;border-color:var(--line);color:var(--muted);cursor:default;opacity:.6}

.cal-appt{display:block;font-size:.74rem;padding:4px 6px;border-radius:6px;text-decoration:none;
  background:var(--forest);color:#fff;line-height:1.25;
  transition:transform 130ms cubic-bezier(.23,1,.32,1), filter 130ms ease}
.cal-appt .t{display:block;font-weight:700}
.cal-appt .n{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cal-appt:active{transform:scale(.97)}
@media (hover:hover) and (pointer:fine){ .cal-appt:hover{filter:brightness(1.12)} }
.cal-appt.unpaid{background:var(--amber-100);color:var(--amber-600);
  border:1px solid var(--amber);box-shadow:inset 0 0 0 1px rgba(185,127,31,.15)}

.key{width:14px;height:14px;border-radius:4px;display:inline-block}
.key-open{border:1px dashed var(--forest)}
.key-appt{background:var(--forest)}
.key-unpaid{background:var(--amber-100);border:1px solid var(--amber)}

.dow-pick{display:inline-flex;align-items:center;gap:6px;padding:7px 11px;border:1px solid var(--line);
  border-radius:99px;cursor:pointer;font-size:.9rem;transition:background 140ms ease,border-color 140ms ease}
.dow-pick:has(input:checked){background:var(--sage-100);border-color:var(--forest);font-weight:600}

@media (prefers-reduced-motion:reduce){
  .cal-slot,.cal-appt{transition:none}
  .cal-slot:active,.cal-appt:active{transform:none}
}

/* ---- certificate kind picker ---------------------------------------------- */
.cert-pick{display:flex;gap:10px;align-items:flex-start;padding:11px 13px;border:1px solid var(--line);
  border-radius:10px;cursor:pointer;transition:background 140ms ease,border-color 140ms ease}
.cert-pick input{margin:3px 0 0}
.cert-pick .s{display:block;font-weight:400;font-size:.82rem;color:var(--muted);margin-top:2px}
.cert-pick:has(input:checked){border-color:var(--forest);background:var(--sage-100)}
@media (hover:hover) and (pointer:fine){ .cert-pick:hover{border-color:var(--forest)} }

/* ---- programme progress ---------------------------------------------------- */
.diet-progress{height:6px;border-radius:99px;background:var(--paper-2);overflow:hidden;
  max-width:340px;margin:2px 0 4px}
.diet-progress span{display:block;height:100%;border-radius:99px;background:var(--forest)}


/* ============================================================ paper forms ====
   The Association's printed forms, as pages: a dark band per numbered section,
   ruled lines instead of boxes, square marks instead of checkboxes. Shared by
   the practitioner membership form and the H.E.A.L. Practitioner form. */
  .mf-wrap{padding:26px 0 52px;background:var(--paper-2)}
  .mf{max-width:940px;margin:0 auto;background:#fff;border:1px solid var(--line);border-radius:12px;
      overflow:hidden;box-shadow:0 10px 30px rgba(10,30,20,.07)}
  .mf-title{background:var(--forest);color:#fff;text-align:center;font-weight:700;letter-spacing:.09em;
      text-transform:uppercase;padding:15px 18px;font-size:1.04rem;font-family:var(--ff-display);
      border-bottom:3px solid #fff}
  .mf-sec{background:var(--forest);color:#fff;font-weight:700;text-transform:uppercase;letter-spacing:.055em;
      font-size:.8rem;padding:8px 13px;display:flex;gap:9px;align-items:center}
  .mf-sec span.n{opacity:.72;font-variant-numeric:tabular-nums}
  .mf-sub{background:#E6F0E6;color:var(--forest-900);font-weight:700;font-size:.79rem;padding:7px 13px;
      border-bottom:1px solid #d3e3d3}
  .mf-body{padding:16px 15px 20px}
  .mf-note{font-size:.78rem;color:var(--muted);margin:-6px 0 14px}

  /* A ruled line, like the printed form: the input IS the rule. */
  .mf-line{display:flex;align-items:baseline;gap:7px;min-width:0;margin:0 0 13px}
  .mf-line>.lab{font-size:.8rem;white-space:nowrap;color:var(--ink);flex:none}
  .mf-rule{flex:1 1 auto;min-width:0;width:100%;border:0;border-bottom:1px solid #a2b0a5;background:transparent;
      font:inherit;font-size:.88rem;padding:2px 4px;color:var(--ink);border-radius:0;
      transition:border-color .18s ease-out,box-shadow .18s ease-out}
  .mf-rule:focus{outline:none;border-bottom-color:var(--forest);box-shadow:0 1px 0 0 var(--forest)}
  .mf-rule::placeholder{color:#b4bdb6}
  textarea.mf-rule{resize:vertical;min-height:2.2em}

  .mf-grid{display:grid;gap:0 18px}
  .mf-g2{grid-template-columns:1fr 1fr}
  .mf-g3{grid-template-columns:1.25fr 1fr 1fr}

  /* Section II / III rows: box, then the row's own two ruled fields. */
  .mf-row{display:grid;grid-template-columns:252px minmax(0,1fr) 206px;gap:8px 16px;align-items:baseline;padding:4px 0}
  .mf-row .mf-line{margin:0}
  .mf-pick{display:flex;align-items:center;gap:8px;font-size:.84rem;cursor:pointer;padding:3px 0}
  .mf-box{appearance:none;-webkit-appearance:none;width:14px;height:14px;flex:none;border:1px solid #6f7f73;
      border-radius:2px;background:#fff;cursor:pointer;position:relative;
      transition:background-color .16s ease-out,border-color .16s ease-out}
  .mf-box:checked{background:var(--forest);border-color:var(--forest)}
  .mf-box:checked::after{content:"";position:absolute;left:4px;top:1px;width:4px;height:8px;
      border:solid #fff;border-width:0 2px 2px 0;transform:rotate(42deg)}
  .mf-box:focus-visible{outline:2px solid var(--amber);outline-offset:2px}

  .mf-declare{font-size:.82rem;line-height:1.62;color:var(--ink);margin:0 0 14px}
  .mf-sign{display:grid;grid-template-columns:1fr 1fr;gap:26px;margin-top:26px}
  .mf-sign .cap{text-align:center;font-size:.74rem;font-weight:700;text-transform:uppercase;
      letter-spacing:.05em;color:var(--ink);padding-top:6px}
  .mf-consent{display:flex;gap:10px;align-items:flex-start;font-size:.84rem;line-height:1.55;margin:12px 0 0;cursor:pointer}

  @media (max-width:820px){
    .mf-g2,.mf-g3{grid-template-columns:1fr}
    .mf-row{grid-template-columns:1fr;gap:3px;padding:9px 0;border-bottom:1px dashed var(--line-2)}
    .mf-sign{grid-template-columns:1fr;gap:20px}
  }
  @media (prefers-reduced-motion:reduce){.mf-rule,.mf-box{transition:none}}
