/* ============================================================
   GyMe — Design System  ·  "Switch", minimal (2026-10)
   One face (Heebo), white tiles on the off-white ground (Apple Fitness
   "Summary" layout), no shadows, no gradients, no glass. Shadows stay only on
   what floats: sheets, ask(), toasts. Tile = .card (radius 18); a tile title
   is .tile-h or a leading h3; two half tiles sit in .tiles2.

   THE COLOUR RULE BOOK (every colour below is a role, not a taste)

   GROUND     #F2F4F7  the page behind the tiles, the top bar, the tab bar —
                       a clean cool grey (the cream #F1F1E6 was dropped 2026-10-22).
   SURFACE    #FFFFFF  tiles and sheets — the step from ground to tile is the edge.
   NAVY       #0C386C  PRIMARY = things you act on and the words that carry
                       weight: the one filled button per tile, the active tab,
                       a selected choice (chip / option / muscle), a toggle ON,
                       a logged set, done segments of the weekly ring, the
                       worked muscle. Data marks take --bar-strong (navy in
                       light, periwinkle in dark).
   INK        #12233C / #4A5568 / #55627A  body text, secondary text, captions
                       (navy-derived greys — never a neutral black).
   PERIWINKLE #B0C8FF  SECONDARY = quiet support: the wash behind a selected
                       item (#E4ECFF), "today", info tints, neutral progress
                       (sets done, calorie ring), helping muscles, the second
                       data series, the dark theme's accent.  ALSO what you
                       ACHIEVE: goal bars, "הושג!", record values (.pr-flash).
                       #B0C8FF is a wash, not a word — as text or a small
                       number it takes --secondary-text #2F5FA8 (6.3:1).
   MUSTARD    #D6A419  ACCENT = decoration and reward, never a control:
                       the streak dot, the records COUNT mark, "היום",
                       warm-up sets, a calorie bar past its target,
                       earned badges, "יומיומי", and "waiting" states
                       (paused, pending). As TEXT only the dark shade #8A6A0C,
                       and only as a fill under white — never words on white.
   RED        #D70015  DESTRUCTIVE / ERROR only — delete, invalid, failed.
                       Outside the palette on purpose: a delete that looks
                       like every other button is a trap.
   BORDERS    #E4E8EE / #D2D8E1   hairlines from the ground's own family.

   Dark theme keeps the roles: night navy ground #0B1220, tiles #141F35;
   buttons stay blue (#2F5FA8), periwinkle becomes the text/line accent where
   navy would vanish on navy. The workout canvas follows the theme.
   ============================================================ */
:root{
  /* surfaces — the brand's off-white is the ground; every topic sits on it as
     a white tile (Apple Fitness "Summary" layout): no shadow, no border —
     the step from ground to tile is the only edge. */
  --bg:#F2F4F7;
  --bg-2:#F5F7FA;          /* input fill, tracks, quiet wells inside a tile */
  --surface:#FFFFFF;
  --surface-2:#F5F7FA;
  --frame:#E7EAF0;         /* desktop backdrop around #app */
  --border:#E4E8EE;        /* hairline */
  --border-2:#D2D8E1;
  /* menu sectors — one hue each, reused by the dot and nothing else */
  --sec-protein:#0C386C; --sec-carb:#D6A419; --sec-veg:#7F9FE8;
  --sec-fruit:#B0C8FF;  --sec-fat:#2B5C9E;  --sec-sauce:#8A94A6;
  --sec-other:#A0A8B8;
  /* the body figure: the worked muscle in the primary, helpers in the secondary */
  --mm-p:#0C386C; --mm-s:#7F9FE8;

  /* text — navy ink, never pure black on this ground */
  --text:#12233C;
  --text-2:#4A5568;        /* 6.4:1 on the ground */
  --text-3:#55627A;        /* 5.3:1 on the ground */

  /* brand — navy is the one primary: buttons, active tab, selected states,
     headings that carry weight. Periwinkle is the secondary: washes, selected
     backgrounds, secondary fills. Mustard is decoration only: streaks, records,
     "יומיומי", earned badges — never a button, never body text.
     Legacy --gold* / --accent* names are kept as ALIASES so every existing
     rule (btn.gold, pill.gold, num.gold…) resolves to the primary. */
  --anchor:#0C386C;        /* the dark surfaces and the active tab */
  --anchor-2:#164A86;
  --accent:#0C386C;
  --accent-hover:#164A86;
  --accent-tint:#E4ECFF;   /* periwinkle wash for selected/today states */
  --accent-fill:#0C386C;   /* white on it = 10.8:1 */
  --accent-rgb:12,56,108;  /* for rgba() glows and rings */
  --secondary:#B0C8FF;
  --secondary-deep:#7F9FE8;
  --secondary-text:#2F5FA8; /* periwinkle deepened until it reads as TEXT on white (6.3:1) — record values, achieved pills */
  --decor:#D6A419;         /* mustard — fills and icons */
  --decor-text:#8A6A0C;    /* the deep mustard: a FILL under white text (warn toast) — never text on white */
  --decor-tint:#FBF3DA;
  --on-dark:#F4F7FF;       /* text on navy */
  --grad-fill:linear-gradient(135deg,#0C386C,#0C386C);   /* flat: the primary is one colour */
  --sk-a:#E7EAF0; --sk-b:#F2F4F7;   /* skeleton shimmer */
  --gold:var(--accent);
  --gold-soft:#B0C8FF;
  --gold-deep:#0C386C;
  --grad-gold:linear-gradient(135deg,#0C386C,#0C386C);
  --grad-slate:linear-gradient(#0C386C,#0C386C);   /* flat — the design has no gradients */
  --fit-green:#D6A419;     /* completed states — mustard, the decoration colour (no green anywhere in the UI) */
  /* data marks — light: navy on white; dark: periwinkle on night navy */
  --bar-strong:#0C386C;    /* progress fills, the chart line, done ring segments */
  --bar-2:#B0C8FF;         /* a second series (carbs) */
  --ring-next:#B0C8FF;     /* the next workout's segment on the weekly ring */
  --grid:#EEF1F5;          /* chart gridlines */

  /* status */
  --success:#0C386C;         /* "good" as text = the primary; the palette has no green */
  --success-vivid:#0C386C;   /* for fills/rings where white sits on top */
  --warning:var(--text);   /* a warning is ink + a mustard mark, never mustard words on white */
  --danger:#D70015;
  --danger-vivid:#FF3B30;
  --danger-fill:#D70015;   /* solid red carrying WHITE text */
  --danger-text:#D70015;   /* red AS text on a light surface */

  /* shape — crisp: 10px controls, 12px containers; chips and pills stay round */
  --r-xs:8px; --r-sm:10px; --r:12px; --r-lg:14px; --r-xl:18px;   /* --r-xl = a tile */
  --r-btn:10px;            /* every button — one radius */

  /* motion — --ease for sheets and drawers, --ease-out for presses and entrances */
  --ease:cubic-bezier(.32,.72,0,1);
  --ease-out:cubic-bezier(.23,1,.32,1);
  --ease-spring:cubic-bezier(.2,1.3,.4,1);

  /* elevation — flat. Only what floats over the page (sheets, ask, toasts)
     keeps a shadow; everything else is separated by a hairline. */
  --sh-sm:none;
  --sh:none;
  --sh-md:none;
  --sh-lg:0 24px 48px -16px rgba(12,56,108,.22);
  --ring:0 0 0 3px rgba(12,56,108,.18);

  --safe-b:env(safe-area-inset-bottom,0px);
  --safe-t:env(safe-area-inset-top,0px);
  /* one face everywhere: Heebo, self-hosted (fonts/heebo.css). --serif stays as
     a name because many rules use it for headings and numbers. */
  --font:"Heebo",-apple-system,BlinkMacSystemFont,system-ui,"Segoe UI",sans-serif;
  --serif:var(--font);
  --w:540px;
}
/* App-wide dark theme (toggle in profile) */
body.dark{
  /* Navy dark, not true black — the same hue as the primary, three steps
     deeper, so the dark theme is the same product after sunset. */
  --bg:#0B1220; --bg-2:#1A2740; --surface:#141F35; --surface-2:#1C2A45; --frame:#070C17;
  --border:#24324D; --border-2:#31446A;
  /* lifted for dark: the light-theme sector hues sit too close to the surface */
  --sec-protein:#B0C8FF; --sec-carb:#E2B93B; --sec-veg:#7F9FE8;
  --sec-fruit:#C4D6FF;  --sec-fat:#5F7FC8;  --sec-sauce:#8A94A6;
  --sec-other:#7A8496;
  --mm-p:#B0C8FF; --mm-s:#5F7FC8;
  --text:#F4F7FF; --text-2:#C3CCDD; --text-3:#98A6C0;
  --anchor:#2F5FA8; --anchor-2:#3A6BB8;   /* buttons and the active chip stay blue in the dark */
  --accent:#B0C8FF; --accent-hover:#C4D6FF; --accent-tint:rgba(127,159,232,.16);
  --accent-fill:#2F5FA8;   /* white on it = 5.4:1 */
  --accent-rgb:176,200,255;
  --secondary:#7F9FE8; --secondary-deep:#5F7FC8; --secondary-text:#B0C8FF;
  --decor:#E2B93B; --decor-text:#F0CB5A; --decor-tint:rgba(226,185,59,.16);
  --bar-strong:#B0C8FF; --bar-2:#5476B8; --ring-next:#3A5487; --grid:#1C2840;
  --on-dark:#F4F7FF;
  --grad-fill:linear-gradient(135deg,#2F5FA8,#2F5FA8);
  --sk-a:#1A2740; --sk-b:#24324D;   /* skeleton must not flash white on dark */
  --success:#B0C8FF; --success-vivid:#2F5FA8; --warning:#F0CB5A; --danger:#FF6B5E;
  --danger-fill:#C7302A;   /* deepened: white on #FF6B5E is only 2.9:1 */
  --danger-text:#FF8A7E;   /* lightened: red text needs to out-contrast a dark card */
  --gold-soft:#B0C8FF; --gold-deep:#B0C8FF;
  --grad-gold:linear-gradient(135deg,#B0C8FF,#B0C8FF);
  --fit-green:#E2B93B;
  --grad-slate:linear-gradient(#2F5FA8,#2F5FA8);
  --sh:none; --sh-sm:none; --sh-md:none;
  --sh-lg:0 24px 48px -16px rgba(0,0,0,.7);
  --ring:0 0 0 3px rgba(176,200,255,.32);
}
body.dark .demo-creds{background:var(--surface-2);border-color:var(--border);color:var(--text-2)}
body.dark .demo-creds code{background:#000;color:var(--text-2)}
body.dark .stepper button{background:var(--surface-2)}

/* Large-text / accessibility */
body.big-text{zoom:1.09}

/* Respect users who prefer less motion */
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{animation-duration:.001ms !important;animation-iteration-count:1 !important;
    transition-duration:.001ms !important;scroll-behavior:auto !important}
  .pr-burst{display:none}
}
/* Clear keyboard-focus ring (not on mouse) */
:focus{outline:none}
:focus-visible{outline:2.5px solid var(--gold);outline-offset:2px;border-radius:8px}
.btn:focus-visible,.chip:focus-visible,.icon-btn:focus-visible{outline-offset:3px}
/* visually hidden but still announced — used by the route live region */
.sr-only{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;
  clip:rect(0 0 0 0);clip-path:inset(50%);white-space:nowrap;border:0}
.skip-link{position:fixed;top:-60px;right:12px;z-index:200;background:var(--anchor);color:#fff;
  padding:10px 16px;border-radius:10px;font-weight:700;transition:top .2s}
.skip-link:focus{top:calc(10px + var(--safe-t))}

/* Desktop-only hover affordances — pointer devices get a subtle lift/tint;
   touch devices are never affected (avoids sticky :hover after tap). */
@media (hover:hover) and (pointer:fine){
  .card.tap,.list-item.tap,.btn,.chip,.icon-btn{transition:transform .14s var(--ease-out),background-color .16s ease,border-color .16s ease}
  .card.tap:hover,.list-item.tap:hover{background:var(--surface-2)}
  .btn:not(:disabled):hover{background:var(--anchor-2)}
  .btn.ghost:not(:disabled):hover{background:var(--surface-2)}
  .btn.danger:not(:disabled):hover{background:var(--danger-fill);filter:brightness(1.08)}
  .icon-btn:hover,.chip:not(.active):hover{background:var(--surface-2)}
  .link:hover{text-decoration:underline;text-underline-offset:3px}
}
*{box-sizing:border-box;-webkit-tap-highlight-color:transparent}
html,body{margin:0;padding:0}
body{
  font-family:var(--font);background:var(--bg);color:var(--text);
  direction:rtl;line-height:1.55;font-size:16px;
  -webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility;
  overscroll-behavior-y:none;
}
button{font-family:inherit;cursor:pointer;color:inherit;background:transparent;border:none}
.link{padding:0;position:relative}
.link::after{content:"";position:absolute;inset:-12px -8px;}
input,select,textarea{font-family:inherit;font-size:16px}
a{color:inherit;text-decoration:none}
img{max-width:100%}
::selection{background:rgba(var(--accent-rgb),.18)}

/* ===== App shell ===== */
/* overflow-x:clip — the screen-change slide moves #main 12px sideways for a
   quarter second, and for that long the page was wider than the phone and
   could be swiped sideways. clip, not hidden: hidden would make #app a scroll
   container and the sticky top bar would stop sticking. */
#app{max-width:var(--w);margin:0 auto;min-height:100vh;background:var(--bg);position:relative;overflow-x:clip}
/* Desktop/web: the 540px column sits on the brand's off-white (night navy in
   dark), edged by one hairline — the phone screen as a sheet of paper. */
@media (min-width:900px){
  body{background:var(--frame)}
  #app{box-shadow:0 0 0 1px var(--border)}
}
.screen{padding:14px 18px calc(108px + var(--safe-b));animation:rise .4s cubic-bezier(.16,.84,.44,1)}
@keyframes rise{from{opacity:0;transform:translateY(10px)}to{opacity:1;transform:none}}

/* ===== Top bar ===== */
/* flat paper bar: no blur; a hairline appears only once the page has scrolled under it */
.topbar{
  position:sticky;top:0;z-index:30;background:var(--bg);
  display:flex;align-items:center;gap:10px;padding:calc(14px + var(--safe-t)) 18px 10px;
  border-bottom:1px solid transparent;transition:border-color .2s ease;
}
.topbar.scrolled{border-bottom-color:var(--border)}
/* iOS large-title collapse: title appears in the bar only after scrolling.
   In the flow between the buttons and the logo, not centred on the bar: with
   three buttons on one side the bar's middle sits under them on a phone, and
   "פרופיל" was drawn beneath the bell. Here it takes the gap, or "…". */
.topbar .bar-title{order:1;flex:1 1 0;min-width:0;text-align:center;transform:translateY(4px);
  font-size:16px;font-weight:600;letter-spacing:-.3px;opacity:0;pointer-events:none;
  transition:opacity .22s var(--ease),transform .22s var(--ease);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.topbar.scrolled .bar-title{opacity:1;transform:none}
/* On a phone the gap was 12px for a client (three buttons) — the title
   showed as a bare "…". Once it is showing, the wordmark gives it the room
   and the dumbbell mark alone stays as the brand. */
@media (max-width:480px){
  .topbar.scrolled .bar-title:not(:empty) ~ .logo .brand{display:none}
}
.topbar .logo{order:2;margin-inline-start:auto;display:flex;align-items:center;gap:9px}
.topbar .brand{font-family:var(--serif);font-weight:700;font-size:20px;letter-spacing:-.01em}
.topbar .brand .co{color:var(--accent)}
.topbar .mark{display:none}   /* the wordmark alone is the brand in the bar */
.topbar .actions{order:1;display:flex;gap:4px;align-items:center}
.mark{width:34px;height:34px;border-radius:10px;background:var(--grad-slate);color:#fff;
  display:grid;place-items:center;box-shadow:var(--sh-sm);border:1px solid rgba(255,255,255,.06)}
.mark svg{width:19px;height:19px}
.icon-btn{
  width:40px;height:40px;border-radius:var(--r-xs);border:1px solid transparent;
  background:transparent;display:grid;place-items:center;color:var(--text-2);
  transition:transform .14s var(--ease-out), background-color .16s ease;position:relative
}
.icon-btn::after{content:"";position:absolute;inset:-2px}   /* 44px touch target */
.icon-btn:active{transform:scale(.96);background:var(--surface-2)}
.icon-btn svg{width:20px;height:20px}
.icon-btn.xs{width:34px;height:34px;border-radius:10px}
.icon-btn.xs svg{width:16px;height:16px}
.icon-btn.xs.danger{color:var(--danger-text);border-color:#f3d4d4}
.badge-dot{position:absolute;top:2px;inset-inline-start:0;min-width:18px;height:18px;padding:0 5px;
  border-radius:9px;background:var(--decor);color:#12233C;font-size:10.5px;font-weight:700;
  display:grid;place-items:center;border:2px solid var(--bg)}

/* ===== Bottom nav ===== */
/* flat paper bar with a hairline; the active tab is told by colour alone */
.tabbar{
  position:fixed;bottom:0;left:0;right:0;z-index:40;
  background:var(--bg);border-top:1px solid var(--border);
  display:flex;justify-content:space-around;padding:6px 8px calc(6px + var(--safe-b));
  max-width:var(--w);margin:0 auto;
}
.tabbar a{flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;
  font-size:11px;font-weight:600;color:var(--text-3);padding:6px 2px;position:relative;transition:color .16s ease}
.tabbar a .tic{width:40px;height:28px;display:grid;place-items:center;transition:transform .14s var(--ease-out)}
.tabbar a svg{width:22px;height:22px;stroke-width:2}
.tabbar a.active{color:var(--accent)}
.tabbar a:active .tic{transform:scale(.92)}
@media (prefers-reduced-motion: reduce){ .tabbar a:active .tic{transition:none;transform:none} }

/* ===== Headings & type ===== */
h1{font-family:var(--serif);font-size:30px;font-weight:600;margin:6px 0 18px;letter-spacing:-.02em;line-height:1.12}
h2{font-size:20px;font-weight:600;margin:22px 0 11px;letter-spacing:-.01em}
h3{font-size:15.5px;font-weight:600;margin:0 0 4px;letter-spacing:0}
h1 svg,h2 svg,h3 svg{width:17px;height:17px;vertical-align:-3px}
.muted{color:var(--text-2)}
.small{font-size:13px}
.tiny{font-size:11.5px}
.center{text-align:center}
.eyebrow{font-size:12px;font-weight:600;letter-spacing:0;color:var(--text-3)}   /* Hebrew has no capitals; tracking only spaced it out */
/* a group header above its tiles — quiet, on the ground (iOS grouped list) */
.section-title{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin:26px 4px 8px}
.section-title h2{margin:0;font-size:15px;font-weight:600;letter-spacing:0;color:var(--text-2)}
.section-title .link,.section-title .small{font-size:13.5px}

/* ===== Home — greeting, date, the weekly ring tile ===== */
#main > h1.home-hello{margin:6px 0 2px;font-size:30px;line-height:1.1}
.home-date{font-size:14px;color:var(--text-3);margin:0 0 16px}
.wring{display:flex;align-items:center;gap:20px}
.ring{position:relative;width:112px;height:112px;flex:none;border-radius:50%;padding:0;
  transition:transform .14s var(--ease-out)}
.ring:active{transform:scale(.97)}
.ring svg{width:100%;height:100%;display:block}
.ring svg path,.ring svg circle{transition:stroke .26s var(--ease-out)}
.ring .in{position:absolute;inset:0;display:grid;place-content:center;justify-items:center;line-height:1}
.ring .in b{font-size:34px;font-weight:600;color:var(--text)}
.ring .in b small{font-size:16px;font-weight:500;color:var(--text-3);letter-spacing:0}
.ring .in span{font-size:12.5px;font-weight:600;color:var(--secondary-text);margin-top:6px}
.ring.full .in span{color:var(--accent)}
.wtxt{display:grid;gap:4px;min-width:0}
.wtxt b{font-size:16px;font-weight:600;line-height:1.35;text-wrap:balance}
.wtxt span{font-size:13px;color:var(--text-3)}
.wtxt .streak{display:inline-flex;align-items:center;gap:7px;color:var(--text-2);margin-top:2px}
.wtxt .streak::before{content:"";width:7px;height:7px;border-radius:50%;background:var(--decor);flex:none}
/* a half tile with one figure: label on top, the number large */
.stat-tile{display:grid;gap:6px}
.stat-tile .lbl{font-size:14px;font-weight:600;color:var(--text)}
.stat-tile .num{font-size:30px;font-weight:500;line-height:1.1;font-variant-numeric:tabular-nums;letter-spacing:-.02em}
.stat-tile .num small{font-size:14px;font-weight:400;color:var(--text-3);margin-inline-start:4px;letter-spacing:0}

/* welcome sheet feature icon */
.welcome-ic{width:42px;height:42px;flex:0 0 42px;border-radius:var(--r-sm);background:var(--accent-tint);
  color:var(--accent);display:grid;place-items:center}
.welcome-ic svg{width:21px;height:21px}

/* ===== "Today's workout" — the home's single clear next action, its own tile ===== */
.today-cta{position:relative}
.today-top{display:flex;align-items:center;gap:8px;margin-bottom:2px}
.today-label{font-size:13px;font-weight:500;color:var(--text-3)}
.today-badge{font-size:11px;font-weight:600;letter-spacing:.04em;color:var(--text);background:var(--decor-tint);
  padding:2px 8px;border-radius:999px}
.today-day{font-family:var(--serif);font-size:28px;font-weight:600;letter-spacing:-.015em;color:var(--text);line-height:1.15}
.today-meta{font-size:13.5px;color:var(--text-3);margin:4px 0 16px}
.today-go{position:relative;z-index:1}

/* ===== Apple-style scroll reveals — content rises in as it enters view.
   Safety net: if the observer never fires (hidden tab, odd webview), a delayed
   keyframe forces everything visible so content can never be lost. ===== */
.rv{opacity:0;transform:translateY(16px);animation:rv-safety .01s linear 2.2s forwards}
@keyframes rv-safety{to{opacity:1;transform:none}}
.rv-in{opacity:1;transform:none;transition:opacity .6s var(--ease) var(--rvd,0ms),transform .6s var(--ease) var(--rvd,0ms)}
@media (prefers-reduced-motion: reduce){.rv{opacity:1;transform:none;animation:none}}

/* ===== Cards — large continuous corners, apple.com feature-card feel ===== */
/* a tile: white on the off-white ground, no border, no shadow */
.card{background:var(--surface);border:0;border-radius:var(--r-xl);
  padding:16px;margin-bottom:10px;transition:background-color .16s ease,transform .14s var(--ease-out)}
.card.tight{padding:14px}
.card.tap{cursor:pointer}
.card.tap:active{transform:scale(.985)}
/* tile header: a title and, when the tile leads somewhere, a round chevron */
.tile-h{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:0 0 10px}
.tile-h h2,.tile-h h3{margin:0;font-size:17px;font-weight:600;letter-spacing:-.01em;color:var(--text)}
.tile-h .sub{font-size:13px;color:var(--text-3);font-weight:400}
.tile-go{width:28px;height:28px;flex:none;border-radius:50%;background:var(--surface-2);color:var(--text-3);
  display:grid;place-items:center;position:relative}
.tile-go::after{content:"";position:absolute;inset:-8px}
.tile-go svg{width:16px;height:16px;stroke-width:2.4}
/* a tile that opens with a bare heading reads it as the tile's title */
.card > h3:first-child{font-size:17px;font-weight:600;margin:0 0 10px;letter-spacing:-.01em}
/* two half tiles side by side; a lone one takes the row */
.tiles2{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-bottom:10px}
.tiles2 > .card{margin:0;min-width:0}
.tiles2 > :only-child,.tiles2 > .card:has(+ :empty):first-child{grid-column:1/-1}
/* a list that sits straight on the page — rows divided by hairlines, no box */
.list-flat{margin:0 0 4px}
.list-flat > .list-item{padding:13px 0}
.row{display:flex;align-items:center;gap:12px}
.row.between{justify-content:space-between}
.col{display:flex;flex-direction:column;gap:4px}
.grid2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:11px}
.spacer{flex:1}
.divider{height:1px;background:var(--border);margin:16px 0;border:none}
.divider.gold{background:linear-gradient(90deg,transparent,var(--gold-soft),transparent);height:1.5px}

/* ===== Buttons — one radius everywhere (--r-btn); chips and pills stay round ===== */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;border:none;
  border-radius:var(--r-btn);padding:14px 22px;font-size:15.5px;font-weight:600;letter-spacing:0;
  background:var(--accent-fill);color:#fff;min-height:48px;
  transition:transform .14s var(--ease-out), background-color .16s ease, opacity .2s;position:relative;overflow:hidden}
.btn svg{width:18px;height:18px}
.btn:active{transform:scale(.98)}
.btn.block{display:flex;width:100%}
.btn.lg{padding:15px 26px;font-size:16px;min-height:52px}
.btn.sm{padding:10px 16px;font-size:14px;min-height:44px}
.btn.gold,.btn.success{background:var(--accent-fill);color:#fff}
.btn.gold::after{content:none}
.btn.danger{background:var(--danger-fill)}
.btn.ghost{background:transparent;color:var(--text);border:1px solid var(--border)}
.btn.ghost:active{background:var(--surface-2)}
.btn:disabled{opacity:.5;pointer-events:none}

/* ===== Chips / pills ===== */
.chips{display:flex;gap:9px;overflow-x:auto;padding:3px 0 10px;scrollbar-width:none;-webkit-overflow-scrolling:touch}
.chips::-webkit-scrollbar{display:none}
.chip{white-space:nowrap;border:1px solid var(--border-2);background:var(--surface);color:var(--text-2);
  border-radius:999px;padding:10px 15px;font-size:13.5px;font-weight:600;flex-shrink:0;
  min-height:44px;display:inline-flex;align-items:center;
  transition:background-color .16s ease,border-color .16s ease,color .16s ease,transform .14s var(--ease-out)}
.chip:active{transform:scale(.97)}
.chip.active{background:var(--accent-fill);color:#fff;border-color:var(--accent-fill)}
.pill{display:inline-flex;align-items:center;gap:5px;border-radius:999px;padding:2px 9px;
  font-size:11px;font-weight:600;letter-spacing:.04em}
.pill svg{width:13px;height:13px}
.pill.active{background:var(--accent-tint);color:var(--gold-deep)}
.pill.expired{background:var(--decor-tint);color:var(--text);border:1px solid var(--decor)}
.pill.paused{background:var(--decor-tint);color:var(--text);border:1px solid var(--decor)}
.pill.muscle{background:var(--surface-2);color:var(--text-2)}
body.dark .pill.active{background:var(--accent-tint);color:var(--accent)}
body.dark .pill.expired{background:var(--decor-tint);color:var(--text);border-color:var(--decor)}
body.dark .pill.paused{background:var(--decor-tint);color:var(--text);border-color:var(--decor)}
body.dark .pill.muscle{background:var(--surface-2);color:var(--text-2)}
.pill.gold{background:var(--decor-tint);color:var(--text)}
/* "הושג!" — a reached goal is periwinkle, the same family as its progress bar */
.pill.done{background:var(--accent-tint);color:var(--secondary-text);border:1px solid var(--secondary)}
body.dark .pill.done{background:var(--accent-tint);color:var(--secondary-text);border-color:var(--secondary)}

/* ===== Inputs ===== */
.field{margin-bottom:14px}
.field label{display:block;font-size:12.5px;font-weight:700;color:var(--text-2);margin-bottom:6px;letter-spacing:.1px}
.input,select.input,textarea.input{
  width:100%;border:1px solid var(--border-2);background:var(--surface);border-radius:var(--r-sm);
  padding:14px;font-size:16px;color:var(--text);transition:border-color .16s ease, box-shadow .16s ease;-webkit-appearance:none}
.input::placeholder{color:var(--text-3)}
.input:focus{outline:none;border-color:var(--accent);box-shadow:none}
textarea.input{resize:vertical;min-height:84px}
select.input{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%236A6F76' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:left 14px center;padding-left:40px}
.input.search{background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%239AA0A6' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20.5 20.5 17 17'/%3E%3C/svg%3E");
  background-repeat:no-repeat;background-position:right 14px center;padding-right:44px}

/* ===== Builder reorder ===== */
.move-col{display:flex;flex-direction:column;gap:1px;flex-shrink:0}
.move-btn{width:26px;height:19px;border:1px solid var(--border);background:var(--surface);color:var(--text-3);
  font-size:9px;line-height:1;border-radius:6px;padding:0}
.move-btn:active{background:var(--bg-2)}
.move-btn:disabled{opacity:.3}

/* ===== Builder collapsible day ===== */
.day-toggle{display:flex;align-items:center;gap:8px;background:none;border:none;padding:2px 0;flex:1;
  text-align:start;color:var(--text);cursor:pointer;min-width:0}
.day-toggle b{font-size:15px}
.day-toggle .chev{color:var(--text-3);display:grid;place-items:center;flex-shrink:0}
.day-toggle .chev svg{width:20px;height:20px}
.day-toggle:active{opacity:.7}

/* ===== Filter dropdowns ===== */
/* Flex-wrap, not a fixed 3-column grid: three dropdowns on a 375px phone
   (or any phone with big text) left ~45px for "כל השרירים" and cut it. Each
   one asks for 128px and the row wraps to 2+1 when they don't fit; a row of
   two stretches across instead of leaving an empty third column. Font stays
   16px (select.input) so iOS doesn't zoom on focus; the selector is
   select.input.filter-select because plain .filter-select lost to it. */
.filter-row{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:4px}
.filter-row>.filter-select{flex:1 1 128px;min-width:0}
select.input.filter-select{padding:11px 10px 11px 32px;font-weight:600;border-radius:12px;
  background-position:left 8px center;cursor:pointer;text-overflow:ellipsis}
.filter-select:focus{border-color:var(--anchor)}

/* ===== Goals — one small tile per goal with a progress ring, two to a row =====
   Progress is periwinkle, not mustard: mustard stays decoration and progress is
   a calm state. A reached goal closes its ring in the strong data colour. */
.goal-rings{display:grid;grid-template-columns:repeat(2,1fr);gap:10px;margin-bottom:10px}
.goal-tile{position:relative;margin:0;min-width:0;display:grid;justify-items:center;align-content:start;text-align:center;gap:3px;padding:16px 12px 14px}
.goal-del{position:absolute;top:6px;inset-inline-end:6px;color:var(--text-3)}
.gring{position:relative;width:64px;height:64px;margin-bottom:6px}
.gring svg{width:100%;height:100%;display:block}
.gring-track{fill:none;stroke:var(--surface-2);stroke-width:7}
.gring-fill{fill:none;stroke:var(--secondary-deep);stroke-width:7;stroke-linecap:round;transition:stroke-dashoffset .8s var(--ease-out)}
.goal-tile.done .gring-fill{stroke:var(--bar-strong)}
.gring b{position:absolute;inset:0;display:grid;place-items:center;font-size:15px;font-weight:600;font-variant-numeric:tabular-nums}
.gring b svg{width:20px;height:20px;color:var(--accent)}
.gt-title{font-size:14px;font-weight:600;line-height:1.3;text-wrap:balance;overflow-wrap:anywhere}
.gt-val{font-size:12.5px;color:var(--text-3);font-variant-numeric:tabular-nums}
.goal-tile .pill{margin-top:4px}

/* ===== Energy picker / summary ===== */
.energy-pick{display:flex;gap:8px;justify-content:center}
.energy-pick button{flex:1;max-width:60px;height:50px;border:1px solid var(--border-2);background:var(--surface);
  border-radius:var(--r-sm);color:var(--text-3);display:grid;place-items:center;
  transition:background-color .16s ease,border-color .16s ease,transform .14s var(--ease-out)}
.energy-pick button:active{transform:scale(.96)}
.energy-pick button svg{width:22px;height:22px}
.energy-pick button.on{background:var(--accent-fill);color:#fff;border-color:transparent}
.energy-pick.emoji button{font-size:24px;opacity:.35;filter:grayscale(.6);transition:opacity .16s ease,filter .16s ease}
.energy-pick.emoji button.on{opacity:1;filter:none;background:var(--accent-tint);border-color:transparent}
/* the finished-workout mark: one calm circle — the moment is rare, so it may arrive */
.summary-badge{width:72px;height:72px;border-radius:50%;margin:0 auto;display:grid;place-items:center;
  background:var(--accent-fill);color:#fff;animation:pop .45s var(--ease-out)}
.summary-badge svg{width:36px;height:36px}
/* "+4% — stronger than last time": the summary's headline, in place of volume */
.progress-hero{margin-top:14px;padding:16px 14px}
.progress-hero .ph-big{font-size:40px;font-weight:800;line-height:1.1;font-variant-numeric:tabular-nums;color:var(--text)}
.progress-hero.up .ph-big{color:var(--secondary-text)}
.progress-hero.flat .ph-big{font-size:24px}
.progress-hero .ph-lbl{font-weight:700;margin:4px 0 2px}
.pr-line{padding:6px 0;gap:10px}
.pr-line+.pr-line{border-top:1px solid var(--border)}
.pr-line .pr-set{font-weight:700;color:var(--secondary-text);white-space:nowrap;font-variant-numeric:tabular-nums}
@keyframes pop{0%{transform:scale(.9);opacity:0}100%{transform:scale(1);opacity:1}}

/* ===== Stepper ===== */
.stepper{display:flex;align-items:stretch;gap:8px}
.stepper button{width:48px;flex-shrink:0;border:1px solid var(--border-2);background:var(--surface);
  border-radius:12px;font-size:24px;font-weight:700;color:var(--text);box-shadow:var(--sh-sm);line-height:1}
.stepper button:active{transform:scale(.94);background:var(--bg-2)}
.stepper input{flex:1;min-width:0}

/* ===== Stats ===== */
/* a figure, not a tile: the number and its label on the page, siblings divided by a hairline */
.stat{background:none;border:0;border-radius:0;padding:12px 4px;text-align:center;position:relative;overflow:hidden}
.grid2 > .stat + .stat,.grid3 > .stat + .stat{border-inline-start:1px solid var(--border)}
.grid2:has(> .stat),.grid3:has(> .stat){gap:0;background:var(--surface);border-radius:var(--r-xl);margin-bottom:10px}
.stat .num{font-family:var(--serif);font-size:28px;font-weight:500;letter-spacing:-.02em;line-height:1.1;font-variant-numeric:tabular-nums}
.stat .lbl{font-size:12px;color:var(--text-3);margin-top:5px;font-weight:500}
/* the celebratory number (records) in mustard — decoration, solid, legible */
.stat .num.gold{color:var(--text)}
.stat .num.gold::after{content:"";display:block;width:22px;height:3px;border-radius:2px;background:var(--decor);margin:7px auto 0}   /* the reward mark, not a coloured number */
svg.mini{width:14px;height:14px;vertical-align:-2px}
.link.small svg, .link svg{width:15px;height:15px;vertical-align:-3px}
.stat.feature{background:var(--accent-fill);border-color:transparent;color:#fff}
.stat.feature .num{color:#fff}
.stat.feature .lbl{color:#aeb6c2}

.rec-cell{background:var(--bg-2);border-radius:11px;padding:8px;text-align:center}

/* ===== Favorite star ===== */
.fav-star{border:none;background:transparent;padding:11px;color:var(--border-2);cursor:pointer;flex-shrink:0;
  min-width:44px;min-height:44px;display:grid;place-items:center}
.fav-star svg{width:22px;height:22px;fill:none;stroke:currentColor;stroke-width:1.7}
.fav-star.on{color:var(--gold)}
.fav-star.on svg{fill:var(--gold)}
.fav-star:active{transform:scale(.85)}

/* ===== Trainer inbox ===== */
.inbox-ic{width:38px;height:38px;border-radius:var(--r-sm);display:grid;place-items:center;flex-shrink:0;color:#fff}
.inbox-ic svg{width:18px;height:18px}
.inbox-ic.checkin{background:var(--grad-gold);color:#fff}
.inbox-ic.message{background:var(--grad-slate)}
.inbox-ic.inactive{background:var(--decor);color:#3A2E0C}
.danger-pill{background:var(--danger-fill);color:#fff;border-radius:999px;padding:2px 10px;font-size:12px;font-weight:800}



/* ===== Muscle recovery ===== */
.recov-row{display:flex;align-items:center;gap:10px;padding:7px 0}
.recov-name{width:74px;flex-shrink:0;font-size:13.5px;font-weight:500}
.recov-bar{flex:1;height:6px;background:var(--surface-2);border-radius:99px;overflow:hidden}
.recov-bar>div{height:100%;border-radius:99px;transition:width .6s var(--ease-out)}
.recov-lbl{font-size:12px;font-weight:600;min-width:84px;text-align:end;flex-shrink:0;white-space:nowrap}

/* ===== Achievements (progress screen, under the records) =====
   Off the home screen since 2026-09-23 — there they repeated the activity
   line's own numbers. A fixed grid, not a side-scroller: every milestone is
   visible at once. Earned reads periwinkle like every other done state. */
.ach-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.ach{background:var(--surface);border:0;border-radius:var(--r-lg);
  padding:12px 9px;text-align:center}
.ach.earned{background:var(--surface)}
.ach-ic{width:38px;height:38px;border-radius:var(--r-sm);margin:0 auto 7px;display:grid;place-items:center;
  background:var(--surface-2);color:var(--text-3)}
.ach.earned .ach-ic{background:var(--accent-tint);color:var(--accent)}
.ach-ic svg{width:20px;height:20px}
.ach-t{font-size:12.5px;font-weight:600;line-height:1.2}
.ach-d{font-size:10.5px;color:var(--text-3);margin-top:3px;font-weight:500;line-height:1.3}
.ach.earned .ach-d{color:var(--secondary-text)}
.ach-bar{height:3px;background:var(--surface-2);border-radius:99px;overflow:hidden;margin-top:7px}
.ach-bar i{display:block;height:100%;background:var(--secondary-deep);border-radius:99px}

/* ===== Lists ===== */
.list-item{display:flex;align-items:center;gap:13px;padding:13px 2px;border-bottom:1px solid var(--border)}
.list-item:last-child{border-bottom:none}
/* rows written straight onto the page (no .card around them) read as one tile:
   the run gets the tile's fill, its first row the top corners, its last the bottom */
/* (#main itself, or any plain wrapper div right under it — section zones, tab
   panes; the reveal script adds .rv to them, so they are matched by not being a tile) */
:is(#main, #main > div:not(.card):not(.list-flat)) > .list-item{background:var(--surface);padding:13px 16px}
:is(#main, #main > div:not(.card):not(.list-flat)) > .list-item:first-child,
:is(#main, #main > div:not(.card):not(.list-flat)) > :not(.list-item) + .list-item{border-top-left-radius:var(--r-xl);border-top-right-radius:var(--r-xl)}
:is(#main, #main > div:not(.card):not(.list-flat)) > .list-item:last-child,
:is(#main, #main > div:not(.card):not(.list-flat)) > .list-item:has(+ :not(.list-item)){border-bottom:0;margin-bottom:10px;
  border-bottom-left-radius:var(--r-xl);border-bottom-right-radius:var(--r-xl)}
.avatar{width:44px;height:44px;border-radius:50%;background:var(--grad-slate);color:#fff;
  display:grid;place-items:center;font-weight:600;flex-shrink:0;font-size:15px}
.avatar.gold{background:var(--grad-gold);color:#fff}
.avatar img,.profile-av img{width:100%;height:100%;object-fit:cover;border-radius:50%}
.avatar{overflow:hidden}
.profile-hero{display:flex;align-items:center;gap:14px;background:var(--surface);border:0;
  border-radius:var(--r-xl);padding:16px;margin-bottom:10px}
.profile-av{overflow:hidden}
.pr-num{width:28px;height:28px;flex-shrink:0;display:grid;place-items:center;font-family:var(--serif);
  font-weight:500;font-size:14px;color:var(--text-3);font-variant-numeric:tabular-nums}
.chev{color:var(--border-2);display:grid;place-items:center}
.chev svg{width:20px;height:20px}

/* ===== Chat ===== */
.thread{display:flex;flex-direction:column;gap:6px;margin:8px 0;min-height:46vh;padding-bottom:10px}
.chat-day{text-align:center;margin:12px 0 6px}
.chat-day span{background:var(--bg-2);color:var(--text-2);font-size:11.5px;font-weight:700;padding:3px 12px;border-radius:999px}
.bubble{max-width:80%;padding:10px 13px;border-radius:16px;font-size:14.5px;line-height:1.45;position:relative;box-shadow:var(--sh-sm)}
.bubble.mine{align-self:flex-start;background:var(--grad-slate);color:#fff;border-bottom-right-radius:5px}
.bubble.theirs{align-self:flex-end;background:var(--surface);color:var(--text);border:1px solid var(--border);border-bottom-left-radius:5px}
.bubble-meta{font-size:10.5px;opacity:.65;margin-top:4px;display:flex;gap:4px;align-items:center}
.bubble .ticks{letter-spacing:-2px}
.bubble .ticks.read{color:var(--secondary);opacity:1}
.chat-bar{position:sticky;bottom:calc(78px + var(--safe-b));display:flex;gap:8px;background:var(--bg);padding:8px 0}
.chat-bar .btn{padding:0 16px}

/* ===== Progress photos ===== */
.photo-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.photo-cell{position:relative;aspect-ratio:3/4;border-radius:14px;overflow:hidden;background:var(--bg-2);box-shadow:var(--sh-sm);cursor:pointer}
.photo-cell img{width:100%;height:100%;object-fit:cover}
/* a photo whose file is missing: a quiet cell instead of a broken image */
.photo-missing{display:grid;place-items:center;width:100%;height:100%;padding:8px;text-align:center;
  font-size:12px;color:var(--text-3);background:var(--bg-2)}
.photo-tag{position:absolute;bottom:6px;inset-inline-start:6px;background:rgba(11,17,32,.7);color:#fff;
  font-size:10.5px;font-weight:700;padding:2px 8px;border-radius:999px}
.photo-drop{display:flex;align-items:center;justify-content:center;min-height:160px;border:2px dashed var(--border-2);
  border-radius:16px;background:var(--surface-2);cursor:pointer;text-align:center;padding:14px}
.photo-drop svg{width:30px;height:30px}
.compare{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.compare img{width:100%;aspect-ratio:3/4;object-fit:cover;border-radius:14px}

/* ===== Workout mode — follows the app theme =====
   The canvas used to be dark whatever the theme. It now takes the light or
   dark palette like every other screen; --wk-* stay as names because the
   workout code still reads them, and they resolve on body so body.dark
   reaches them. */
body{
  --wk-bg:var(--bg); --wk-bg-2:var(--surface); --wk-card-a:var(--surface); --wk-card-b:var(--surface);
  --wk-border:var(--border); --wk-line:var(--border); --wk-input:var(--surface-2);
  --wk-text:var(--text); --wk-text-2:var(--text-2); --wk-text-3:var(--text-3);
}
.wk{color:var(--text);min-height:100vh}
/* one exercise = one tile */
.wk .ex-card{background:var(--surface);border:0;border-radius:var(--r-xl);padding:16px;margin-bottom:10px}
.wk .ex-card h3{color:var(--text)}
/* last time / notes: a quiet line of text; only the progression prompt gets a box */
.wk .lasttime{background:none;border:0;border-radius:var(--r-sm);
  padding:2px 0;font-size:13px;color:var(--text-3);margin:6px 0}
.wk .lasttime b{color:var(--text)}
.wk .set-row{display:grid;grid-template-columns:22px 1fr 1fr 52px 52px;gap:7px;align-items:center;margin-bottom:8px}
.wk .set-row.head{color:var(--text-3);font-size:11.5px;font-weight:600;margin-bottom:6px;letter-spacing:0}
.wk .set-in{background:var(--surface-2);border:1px solid transparent;color:var(--text);border-radius:var(--r-sm);
  padding:13px 6px;text-align:center;font-size:17px;font-weight:600;width:100%;font-variant-numeric:tabular-nums;
  transition:border-color .16s ease,background-color .16s ease}
.wk .set-in::placeholder{color:var(--text-3);font-weight:400}
.wk .set-in:focus{outline:none;border-color:var(--accent);box-shadow:none;background:var(--surface)}
.wk .set-in.rpe{font-size:14px;padding:13px 2px}
.wk .set-done{background:var(--accent-tint);border-color:transparent;color:var(--text)}
.wk .set-row.warm .set-in{border-color:transparent;background:var(--decor-tint)}
/* a set waits as an empty square; logged, the square fills navy */
.wk .set-row [data-log]{background:transparent;border:1.5px solid var(--border-2);color:var(--text-3);min-height:46px}
.wk .set-row [data-log]:not(:disabled):hover{background:var(--surface-2)}
.wk .set-row > .center{height:46px;border-radius:var(--r-sm);background:var(--accent-fill);color:#fff}
.wk .set-row > .center.pr-flash{background:var(--accent-tint);color:var(--secondary-text)}
.wk .set-row > .center svg{width:18px;height:18px}
/* compact drop-set boxes (one per defined drop, under each working set) */
.wk .drop-strip{display:flex;flex-wrap:wrap;gap:7px;margin:-2px 0 10px;padding-inline-start:30px}
/* One tab per meal, scrolling sideways. Horizontal because the meal names are
   short and the day is naturally a line, and because it keeps the whole day
   visible while only one meal occupies the screen. */
.meal-tabs{display:flex;gap:7px;overflow-x:auto;padding:2px 0 10px;
  scrollbar-width:none;-webkit-overflow-scrolling:touch}
.meal-tabs::-webkit-scrollbar{display:none}
.meal-tab{flex:0 0 auto;display:grid;gap:2px;justify-items:start;text-align:start;
  padding:9px 13px;border-radius:13px;border:1px solid var(--border);
  background:var(--surface);color:var(--text-2);cursor:pointer;font:inherit;
  transition:background .18s var(--ease),border-color .18s var(--ease)}
.meal-tab b{font-size:13px;color:var(--text);white-space:nowrap}
.meal-tab .tiny{font-size:11px;color:var(--text-3);white-space:nowrap}
.meal-tab.on{background:var(--anchor);border-color:var(--anchor)}
.meal-tab.on b,.meal-tab.on .tiny{color:#fff}
.meal-tab.done:not(.on){background:var(--accent-tint);border-color:var(--accent)}
.meal-tab.done:not(.on) .tiny{color:var(--gold-deep)}
body.dark .meal-tab.on b,body.dark .meal-tab.on .tiny{color:var(--bg)}
body.dark .meal-tab.done:not(.on){background:rgba(var(--accent-rgb),.10)}
@media (prefers-reduced-motion:reduce){ .meal-tab{transition:none} }

/* An exchange slot on the client's menu: closed, it is one line of the plan;
   open, it is the short list of foods that fill it. Closed is the default
   because a menu you have to scroll past is a menu you stop opening. */
.slot-tab{border:1px solid var(--border);border-radius:14px;margin-top:8px;overflow:hidden;
  background:var(--surface-2)}
.slot-tab>summary{display:flex;align-items:center;gap:8px;padding:11px 12px;cursor:pointer;
  list-style:none;-webkit-tap-highlight-color:transparent}
.slot-tab>summary::-webkit-details-marker{display:none}
.slot-tab>summary .tiny{margin-inline-start:auto}
.slot-tab>summary .chev{display:inline-grid;transition:transform .2s var(--ease);color:var(--text-3)}
.slot-tab[open]>summary .chev{transform:rotate(-90deg)}
.slot-tab[open]>summary{border-bottom:1px solid var(--border)}
.slot-opts{padding:4px 10px 10px}
.slot-opts .mi-row{border:0;padding:7px 2px;gap:8px}
.slot-opts .mi-row+.mi-row{border-top:1px solid var(--border)}
/* The prescribed quantity, already filled in. Narrow on purpose — it is a
   correction, not a form field, and it should read as "1.2" not as a blank.

   The name gets the full width and the controls sit on their own line beneath
   it. Side by side, a box + a unit + a button left about eighty pixels for
   "אורז בר 100%, מבושל, ללא תוספת שומן בבישול" and it came out one word per
   line — five lines of food name to change one number. */
.slot-opt{flex-wrap:wrap}
.slot-opt .mi-main{flex:1 1 100%;min-width:0}
.slot-opt .slot-qty{margin-inline-start:auto}
/* A button, not a field: tapping it opens the portion picker on this exact
   portion. It still reads as the number, because that is the thing you came to
   change. */
.slot-qty{display:flex;align-items:center;gap:6px;flex:0 0 auto;cursor:pointer;
  background:var(--surface);border:1px solid var(--border);border-radius:11px;
  padding:7px 10px;font:inherit;color:inherit}
.slot-qty:active{transform:scale(.97)}
.slot-qty .qty{font-weight:700;font-variant-numeric:tabular-nums}
.slot-qty .unit{white-space:nowrap}
/* חילוף sits under the name, on the reading side; the quantity and אכלתי keep
   the far end of the line. A word beside the icon — on its own, the arrows
   read as decoration. */
.slot-swap{display:inline-flex;align-items:center;gap:4px;flex:0 0 auto;background:none;border:0;
  padding:6px 2px;font:inherit;font-size:13px;font-weight:600;color:var(--accent-fill);cursor:pointer}
.slot-swap svg{width:15px;height:15px}
.slot-swap:active{opacity:.6}
.swap-list{padding:4px 12px}
/* The portion sheet's answer and its button, above the controls that change it */
.portion-top{display:grid;gap:8px;margin:4px 0 14px}
.portion-top #pPreview{margin:0}
/* scan.js — a barcode, a plate photo, steps from the iPhone */
.scan-row{display:flex;gap:8px;margin:0 0 10px}
.scan-row .btn{flex:1;gap:6px}
.scan-row .btn svg{width:17px;height:17px}
label.btn{cursor:pointer}
label.btn.disabled{opacity:.5;pointer-events:none}
.plate-head{display:flex;align-items:center;gap:14px;margin:0 0 12px}
.plate-thumb{width:76px;height:76px;flex:0 0 76px;object-fit:cover;border-radius:var(--r-lg);background:var(--surface-2)}
.plate-kcal{font-size:28px;font-weight:800;line-height:1.1;font-variant-numeric:tabular-nums}
.plate-kcal span{font-size:14px;font-weight:600;color:var(--text-3)}
.plate-list{padding:2px 10px}
.plate-row{display:flex;align-items:center;gap:10px;padding:10px 0;border-bottom:1px solid var(--border)}
.plate-row:last-child{border-bottom:0}
.plate-row.nomatch .plate-nm b{color:var(--text-3)}
.plate-nm{flex:1;min-width:0}
.plate-check{width:28px;height:28px;flex:0 0 28px;display:grid;place-items:center;border-radius:var(--r-xs);
  border:1.5px solid var(--border-2,var(--border));background:var(--surface);color:transparent;cursor:pointer;padding:0}
.plate-check.on{background:var(--accent-fill,var(--accent));border-color:transparent;color:#fff}
.plate-check:disabled{opacity:.35;cursor:default}
.plate-check svg{width:16px;height:16px}
.plate-g{display:flex;align-items:center;gap:3px;flex:0 0 auto}
.plate-g .input{width:62px;padding:8px 6px;text-align:center;min-height:40px}
.plate-g span{font-size:12px;color:var(--text-3)}
.plate-k{width:40px;text-align:left;font-size:13px;font-weight:700;font-variant-numeric:tabular-nums}
.steps-link{display:inline-flex;align-items:center;gap:5px;margin:-4px 4px 12px}
.steps-howto{padding-inline-start:20px;margin:6px 0 14px;display:grid;gap:9px;font-size:14px;line-height:1.55}
.copy-row{display:flex;align-items:center;gap:8px}
.copy-row code{flex:1;min-width:0;overflow-wrap:anywhere;font-size:12.5px;background:var(--surface-2);
  border-radius:var(--r-sm);padding:9px 10px;user-select:all}
/* Already eaten: kept visible so the day reads back, but stood down. */
.slot-picked{opacity:.72}
.slot-picked b{color:var(--accent-fill)}
.slot-tab.slot-done{border-color:var(--accent);background:var(--accent-tint)}
.slot-tab.slot-done>summary .tiny{color:var(--gold-deep)}
body.dark .slot-tab.slot-done{background:rgba(var(--accent-rgb),.10)}
body.dark .slot-picked b{color:var(--accent)}
@media (prefers-reduced-motion:reduce){ .slot-tab>summary .chev{transition:none} }

/* A drop set the client marked as not performed. Deliberately quiet — it is a
   placeholder holding its position in the set order, not a thing to act on. */
.wk .drop-skipped{align-items:center;gap:10px;opacity:.55}
.wk .drop-skipped .db-tag{text-decoration:line-through}
.wk .drop-skipped .link{color:var(--secondary-text)}
.wk .drop-box{display:inline-flex;align-items:center;gap:5px;background:var(--accent-tint);
  border:0;border-radius:var(--r-sm);padding:5px 7px}
.wk .drop-box.done{background:var(--accent-tint)}
.wk .db-tag{font-size:10.5px;font-weight:600;color:var(--secondary-text);white-space:nowrap}
.wk .drop-box.done .db-tag{color:var(--text)}
.wk .db-in{width:46px;background:var(--surface);border:1px solid var(--border-2);color:var(--text);
  border-radius:8px;padding:7px 3px;text-align:center;font-size:14px;font-weight:600;font-variant-numeric:tabular-nums}
.wk .db-in:focus{outline:none;border-color:var(--accent)}
.wk .db-in:disabled{opacity:.85}
.wk .db-x{color:var(--text-3);font-size:12px}
.wk [data-stopwatch]{display:grid;place-items:center;color:var(--secondary-text);cursor:pointer}
.wk [data-stopwatch] svg{width:18px;height:18px}
.wk [data-stopwatch].sw-on{background:var(--decor-tint);border-color:var(--decor);color:var(--text)}
.wk .db-go{width:30px;height:30px;border:none;border-radius:8px;background:var(--accent-fill);color:#fff;display:grid;place-items:center}
.add-set-btn{width:100%;border:1px dashed var(--border-2);background:transparent;color:var(--text-2);
  border-radius:var(--r-sm);padding:9px;font-size:13px;font-weight:600;margin-top:6px;display:flex;align-items:center;justify-content:center;gap:5px}
.add-set-btn svg{width:14px;height:14px}
.add-set-btn:active{background:var(--surface-2)}
.wk .db-go svg{width:14px;height:14px}
.wk .db-ok{width:26px;color:var(--success)}
.wk .db-ok svg{width:15px;height:15px}
.wk .ex-head{display:flex;justify-content:space-between;align-items:flex-start;gap:10px}
.wk .warm-toggle{font-size:12px;font-weight:600;border:1px solid var(--border-2);background:transparent;color:var(--text-2);
  border-radius:var(--r-sm);padding:7px 11px;display:inline-flex;align-items:center;gap:5px}
.wk .warm-toggle svg{width:14px;height:14px}
.wk .warm-toggle.on{background:var(--decor);color:#3A2E0C;border-color:var(--decor)}
.pr-flash{font-family:var(--serif);color:var(--secondary-text);font-weight:700}

/* workout exercise tools (info / 1RM / plates / swap) */
.ex-tools{display:flex;gap:6px;flex-shrink:0}
.wk-tool{width:36px;height:36px;border-radius:var(--r-sm);border:0;background:var(--surface-2);color:var(--text-2);display:grid;place-items:center;
  transition:transform .14s var(--ease-out)}
.wk-tool:active{transform:scale(.94)}
.wk-tool svg{width:18px;height:18px}
.wk-instr{margin:8px 0;font-size:13px}
.wk-instr summary{color:var(--secondary-text);font-weight:600;cursor:pointer;list-style:none}
.wk-instr summary::-webkit-details-marker{display:none}
.wk-instr summary::before{content:"▸ "}
.wk-instr[open] summary::before{content:"▾ "}
.wk-instr .small{color:var(--text-2);margin-top:6px;line-height:1.5}

/* plate calculator */
.plate-stack{display:flex;align-items:center;justify-content:center;gap:3px;min-height:120px;padding:12px;background:var(--surface-2);border-radius:var(--r);direction:ltr}
.plate-stack .bar-stub{width:30px;height:10px;background:#9AA0A6;border-radius:3px}
.plate-stack .plate{width:18px;min-width:18px;border-radius:4px;background:var(--c);border:1px solid rgba(0,0,0,.25);
  display:grid;place-items:center;font-size:10px;font-weight:700;color:rgba(0,0,0,.65)}

/* workout progress + quick-actions */
.wk-progress{height:4px;background:var(--border);border:0;border-radius:99px;overflow:hidden}
.wk-progress-bar{height:100%;background:var(--bar-strong);border-radius:99px;transition:width .5s var(--ease-out)}
.wk-actions{display:flex;align-items:center;gap:8px;margin:6px 0 2px}
.qbtn{border:1px solid var(--border-2);background:transparent;color:var(--text);border-radius:var(--r-sm);padding:8px 12px;font-size:13px;font-weight:600;display:inline-flex;align-items:center;gap:5px;flex-shrink:0;
  transition:transform .14s var(--ease-out)}
.qbtn:active{transform:scale(.96)}
.qbtn.solid{background:var(--accent-tint);border-color:transparent;color:var(--secondary-text)}
.qbtn svg{width:14px;height:14px}
.ex-card.done{padding:14px 16px;cursor:pointer}
.ex-card.done:active{transform:scale(.99)}

/* PR celebration burst */
.pr-burst{position:fixed;left:50%;top:38%;z-index:120;pointer-events:none}
.pr-burst i{position:absolute;width:var(--s,7px);height:var(--s,7px);border-radius:2px;
  background:var(--secondary);transform:rotate(var(--a));
  animation:burst .9s cubic-bezier(.2,.7,.3,1) forwards}
@keyframes burst{0%{opacity:1;transform:translate(0,0) rotate(var(--a)) scale(1)}
  100%{opacity:0;transform:rotate(var(--a)) translateY(calc(var(--d)*-1)) scale(.4)}}

/* rest timer — a flat bar over the tab area */
.rest-bar{position:fixed;bottom:0;left:0;right:0;max-width:var(--w);margin:0 auto;
  background:var(--surface);border-top:1px solid var(--border);
  padding:14px 18px calc(14px + var(--safe-b));display:flex;align-items:center;gap:14px;z-index:50;color:var(--text)}
.rest-ring-wrap{position:relative;width:56px;height:56px;flex:0 0 56px;display:grid;place-items:center}
.rest-ring-svg{width:56px;height:56px;position:absolute;inset:0}
.rest-ring-svg #restRing{transition:stroke-dashoffset 1s linear}
.rest-bar .t{font-family:var(--serif);font-size:15px;font-weight:600;color:var(--text);
  font-variant-numeric:tabular-nums;position:relative;z-index:1}

/* ===== Charts ===== */
.bar-chart{display:flex;align-items:flex-end;gap:5px;height:140px;padding-top:10px;direction:ltr}
.bar-chart .bar{flex:1;background:var(--grad-slate);border-radius:6px 6px 3px 3px;min-height:4px;transition:height .5s cubic-bezier(.16,.84,.44,1)}
.bar-chart .bar.gold{background:var(--grad-gold)}
svg.spark{width:100%;height:128px;display:block;overflow:visible;touch-action:none}
.chart-wrap{position:relative;padding-top:2px}
.spark-grid{stroke:var(--grid);stroke-width:1}
/* scale + legend are HTML, not SVG <text>: the SVG is non-uniformly scaled and
   would smear any glyph drawn inside it */
.chart-scale{position:absolute;inset:12px auto 12px 0;display:flex;flex-direction:column;
  justify-content:space-between;pointer-events:none;z-index:2;direction:ltr}
.chart-scale span{font-size:10.5px;font-weight:600;color:var(--text-3);line-height:1;
  font-variant-numeric:tabular-nums;letter-spacing:.2px}
/* opposite the scale: on the scale's side it sat on top of the highest value */
.chart-legend{position:absolute;top:0;right:0;display:flex;align-items:center;gap:5px;z-index:2;
  font-size:10.5px;font-weight:600;color:var(--text-3);background:var(--surface);padding:0 0 2px 4px}
.chart-legend .lg-trend{width:14px;height:0;border-top:1.5px dashed var(--text-3);display:inline-block}
/* single end-cap dot marks the latest reading — an HTML element so the SVG's
   horizontal stretch cannot flatten it into an ellipse */
.spark-end{position:absolute;left:var(--x);top:calc(2px + var(--y));width:7px;height:7px;
  margin:-3.5px 0 0 -3.5px;border-radius:50%;pointer-events:none;z-index:2;
  opacity:0;animation:chartfade .4s ease .75s forwards}
.spark-end::before{content:"";position:absolute;inset:-3.5px;border-radius:50%;background:var(--c);opacity:.2}
.spark-end::after{content:"";position:absolute;inset:0;border-radius:50%;background:var(--c)}
/* strength card: exercise picker + metric switch */
.sc-pick{font-size:14px;font-weight:600;padding-top:9px;padding-bottom:9px}
.sc-seg{margin:0 0 2px}
.sc-seg button{font-size:12.5px}
.sc-body{min-height:40px}
.spark-hit,.bar[data-v]{cursor:pointer}
.bar[data-v]{transition:filter .12s}
.bar[data-v]:active{filter:brightness(1.25)}
.spark-tip{position:absolute;display:none;transform:translate(-50%,-100%);pointer-events:none;z-index:5;
  background:var(--anchor);color:#fff;border-radius:10px;padding:5px 10px;font-size:12px;font-weight:700;
  white-space:nowrap;box-shadow:var(--sh-md);text-align:center}
.spark-tip span{display:block;font-size:10px;font-weight:500;opacity:.7}
.spark-tip::after{content:"";position:absolute;bottom:-4px;left:50%;transform:translateX(-50%);
  width:8px;height:8px;background:var(--anchor);border-radius:1px;rotate:45deg}
.spark-tip.below{transform:translate(-50%,0)}
.spark-tip.below::after{bottom:auto;top:-4px}
/* ===== Orchestrated entrances (all silenced by the global reduced-motion block) ===== */
/* page content rises softly on navigation */
.page-in{animation:pagein .3s cubic-bezier(.16,1,.3,1)}
@keyframes pagein{from{opacity:0;transform:translateY(7px)}}
/* charts draw themselves: line first, then fill and points settle in */
.spark-line{stroke-dasharray:1;stroke-dashoffset:1;animation:chartdraw .9s cubic-bezier(.4,0,.2,1) .15s forwards}
@keyframes chartdraw{to{stroke-dashoffset:0}}
.spark-area{opacity:0;animation:chartfade .5s ease .6s forwards}
.spark-trend{opacity:0;animation:chartfade .45s ease .8s forwards}
@keyframes chartfade{to{opacity:1}}
/* volume bars grow from the baseline, oldest to newest */
.bar-chart .bar{transform-origin:bottom;animation:barup .55s cubic-bezier(.16,1,.3,1) both;animation-delay:calc(var(--bi,0)*14ms)}
@keyframes barup{from{transform:scaleY(0)}}
/* tappable rows answer with a tint, not a scale — a row is a line of a list */
.list-item.tap{transition:background-color .12s ease}
.list-item.tap:active{background:var(--surface-2)}

/* victory confetti */
.confetti{position:absolute;inset:0 0 auto 0;height:0;pointer-events:none;overflow:visible}
.confetti i{position:absolute;top:-10px;left:calc(4% + var(--i)*7%);width:8px;height:14px;border-radius:2px;
  background:var(--gold);opacity:0;transform:rotate(15deg);
  animation:conf-fall 1.9s cubic-bezier(.22,.61,.36,1) calc(var(--i)*.07s) 1 forwards}
.confetti i:nth-child(3n){background:var(--anchor);width:7px;height:11px}
.confetti i:nth-child(4n){background:var(--success);width:6px;height:10px}
.confetti i:nth-child(5n){background:var(--gold-deep)}
@keyframes conf-fall{
  0%{opacity:0;transform:translateY(-8px) rotate(0)}
  12%{opacity:1}
  100%{opacity:0;transform:translateY(330px) rotate(var(--rot,340deg))}}
@media (prefers-reduced-motion: reduce){.confetti{display:none}}
/* chart range selector */
.range-seg{display:inline-flex;gap:16px;border-bottom:1px solid var(--border)}
.range-seg button{border:none;background:transparent;padding:4px 0 8px;margin-bottom:-1px;border-bottom:2px solid transparent;
  border-radius:0;font-size:13px;font-weight:600;color:var(--text-3);transition:color .16s ease,border-color .16s ease}
.range-seg button.on{color:var(--accent);border-bottom-color:var(--accent)}

/* ===== Empty / loading ===== */
.empty{text-align:center;padding:54px 22px;color:var(--text-2)}
.empty .ico{width:60px;height:60px;border-radius:var(--r-lg);background:var(--surface-2);border:0;
  display:grid;place-items:center;margin:0 auto 16px;color:var(--text-3)}
.empty .ico svg{width:30px;height:30px}
.empty h3{font-size:17px;margin-bottom:6px}
.skeleton{background:linear-gradient(90deg,var(--sk-a),var(--sk-b),var(--sk-a));background-size:200% 100%;
  animation:sk 1.3s infinite;border-radius:12px}
@keyframes sk{0%{background-position:200% 0}100%{background-position:-200% 0}}

/* ===== Toasts ===== */
.toast-wrap{position:fixed;top:calc(16px + var(--safe-t));left:0;right:0;display:flex;flex-direction:column;
  align-items:center;gap:8px;z-index:100;pointer-events:none}
.toast{background:var(--accent-fill);color:#fff;padding:13px 20px;border-radius:var(--r-lg);font-weight:600;
  box-shadow:var(--sh-lg);animation:toastin .26s var(--ease-out);max-width:90%;border:0}
.toast.gold{background:var(--accent-fill);color:#fff}
/* Toast text is 16px/600, so WCAG asks for 4.5:1 — not the 3:1 large-text
   allowance. These gradients are deepened to clear it at BOTH stops; the
   previous red and green sat at 3.6 and 2.7 against white. Toasts render
   outside #app, which is why earlier contrast sweeps never caught them. */
.toast.danger{background:var(--danger-fill)}
.toast.success{background:var(--accent-fill)}
.toast.warn{background:var(--decor-text)}
@keyframes toastin{from{opacity:0;transform:translateY(-10px) scale(.97)}to{opacity:1;transform:none}}
.offline-bar{background:var(--accent-fill);color:#fff;text-align:center;padding:8px;font-size:13px;font-weight:700}
.toast .undo-btn{background:transparent;border:none;color:var(--gold-soft);font-weight:800;font-size:14px;padding:2px 4px;text-decoration:underline;pointer-events:auto}

/* ===== Pull-to-refresh ===== */
#ptrInd{position:fixed;top:calc(8px + var(--safe-t));left:50%;transform:translateX(-50%) translateY(-46px);z-index:90;
  width:40px;height:40px;border-radius:50%;background:var(--surface);border:1px solid var(--border);display:grid;place-items:center;opacity:0}
#ptrInd .ring{width:20px;height:20px;border-radius:50%;border:2.5px solid var(--border-2);border-top-color:var(--anchor)}
#ptrInd.ready .ring{border-top-color:var(--gold)}
#ptrInd.spin .ring{animation:spin .7s linear infinite}
@keyframes spin{to{transform:rotate(360deg)}}

/* ===== Install banner ===== */
.install-banner{position:fixed;left:12px;right:12px;bottom:calc(86px + var(--safe-b));max-width:516px;margin:0 auto;z-index:55;
  display:flex;align-items:center;gap:11px;background:var(--surface);border:1px solid var(--border);
  border-radius:var(--r-lg);box-shadow:var(--sh-lg);padding:12px 14px;animation:toastin .3s}
.install-banner .mark{width:38px;height:38px;border-radius:11px}

/* ===== Sheet ===== */
.sheet-backdrop{position:fixed;inset:0;background:rgba(11,18,32,.38);z-index:60;
  display:flex;align-items:flex-end;justify-content:center;animation:fade .25s}
@keyframes fade{from{opacity:0}to{opacity:1}}
/* ask(): the in-app confirmation, above any open sheet */
.ask-backdrop{position:fixed;inset:0;z-index:80;background:rgba(0,0,0,.45);display:flex;align-items:center;justify-content:center;padding:20px;animation:fade .18s}
.ask{background:var(--surface);color:var(--text);border-radius:var(--r-lg);padding:22px 20px 18px;width:min(100%,380px);box-shadow:var(--sh-lg, 0 20px 50px rgba(0,0,0,.3))}
.ask-msg{margin:0 0 16px;font-size:16px;font-weight:600;line-height:1.5;text-align:center}
.ask-actions{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.sheet{background:var(--surface);width:100%;max-width:var(--w);border-radius:16px 16px 0 0;
  padding:20px 18px calc(22px + var(--safe-b));max-height:88vh;overflow-y:auto;
  animation:sheetin .42s var(--ease);box-shadow:var(--sh-lg)}
@keyframes sheetin{from{transform:translateY(100%)}to{transform:none}}
.sheet .grab{width:44px;height:5px;background:var(--border-2);border-radius:3px;margin:0 auto 16px}

/* ===== Auth / onboarding ===== */
.auth-wrap{max-width:440px;margin:0 auto;padding:calc(44px + var(--safe-t)) 24px 40px}
.auth-logo{text-align:center;margin-bottom:28px}
.auth-logo .mark{width:64px;height:64px;border-radius:16px;font-size:32px;margin:0 auto 14px}
.auth-logo .mark svg{width:32px;height:32px}
.auth-logo h1{font-size:32px;margin:0 0 2px}
/* tabs: a hairline with the chosen one underlined — no track, no raised thumb */
.seg{display:flex;gap:4px;background:none;border-radius:0;padding:0;margin-bottom:22px;border:none;border-bottom:1px solid var(--border)}
.seg button{flex:1;border:none;background:transparent;padding:10px 6px;margin-bottom:-1px;border-radius:0;font-weight:600;
  color:var(--text-3);min-height:44px;border-bottom:2px solid transparent;transition:color .16s ease,border-color .16s ease}
.seg button.active{background:none;color:var(--accent);font-weight:600;box-shadow:none;border-bottom-color:var(--accent)}
.link{color:var(--secondary-text);font-weight:600}
.demo-creds{background:var(--bg-2);border:1px solid var(--border);border-radius:14px;
  padding:14px;font-size:13px;margin-top:20px;color:var(--text-2);line-height:1.9}
.demo-creds code{background:var(--surface);padding:2px 7px;border-radius:7px;font-size:12px;font-weight:700;color:var(--text)}
.steps{display:flex;align-items:center;justify-content:center;gap:8px;margin-bottom:18px}
.steps .step{width:30px;height:30px;border-radius:50%;display:grid;place-items:center;font-weight:800;font-size:14px;
  background:var(--bg-2);color:var(--text-3);border:1px solid var(--border)}
.steps .step.on{background:var(--grad-slate);color:#fff;border-color:transparent}
.steps i{width:26px;height:2px;background:var(--border-2);border-radius:2px}
.step-badge{display:inline-grid;place-items:center;width:24px;height:24px;border-radius:7px;background:var(--grad-gold);
  color:#fff;font-size:13px;font-weight:800;vertical-align:-5px;margin-inline-end:4px}

/* superset badge inside the workout screen */
.wk-ss-badge{display:inline-flex;align-items:center;gap:4px;vertical-align:2px;font-size:11px;font-weight:600;
  color:var(--secondary-text);background:var(--accent-tint);border:0;border-radius:999px;padding:2px 9px}
.wk-ss-badge svg{width:12px;height:12px}

/* ===== Menu library: gender × goal category matrix ===== */
/* The menu library drills down audience → goal → diet: one step on screen at
   a time, with a breadcrumb back up. Each step is a row of cards carrying the
   count behind it, so an empty shelf is visible before you open it. */
.crumbs{display:flex;align-items:center;gap:4px;flex-wrap:wrap;margin:2px 0 10px}
.crumb{background:none;border:none;padding:3px 2px;font-size:13px;font-weight:700;color:var(--accent);cursor:pointer}
.crumb.on{color:var(--text-2);cursor:default}
.crumb-sep{color:var(--text-3);font-size:13px}
.drill-step{margin-bottom:4px}
.drill-step .eyebrow{margin:0 2px 6px}
.menu-matrix{display:grid;grid-template-columns:1fr 1fr;gap:10px;margin-top:6px}
.drill-step .menu-matrix{grid-template-columns:repeat(auto-fit,minmax(104px,1fr))}
.drill-step .mm-cell{margin-bottom:0;background:var(--surface);border:1px solid var(--border);
  box-shadow:var(--sh-sm);padding:13px 12px}
.mm-col{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);
  padding:12px 10px;box-shadow:var(--sh-sm)}
.mm-head{font-size:13px;font-weight:800;text-align:center;margin-bottom:8px;color:var(--text)}
.mm-cell{display:flex;align-items:center;justify-content:space-between;width:100%;
  padding:9px 11px;border-radius:var(--r-sm);background:var(--bg-2);margin-bottom:6px;
  transition:.15s var(--ease);cursor:pointer}
.mm-cell:last-child{margin-bottom:0}
.mm-cell:active{transform:scale(.98)}
.mm-cell.on{background:var(--accent-tint);box-shadow:0 0 0 1.5px var(--accent)}
.mm-goal{font-size:13.5px;font-weight:600;color:var(--text)}
.mm-n{font-size:12px;font-weight:800;color:var(--text-2);background:var(--surface);
  min-width:24px;text-align:center;border-radius:999px;padding:1px 7px}
.mm-cell.on .mm-goal,.mm-cell.on .mm-n{color:var(--gold-deep)}

/* ===== Clients table (dense scan view) ===== */
.table-wrap{overflow-x:auto;-webkit-overflow-scrolling:touch;border:1px solid var(--border);
  border-radius:var(--r-lg);background:var(--surface);box-shadow:var(--sh-sm)}
.ctable{width:100%;border-collapse:collapse;font-size:13.5px}
.ctable th{font-size:11.5px;font-weight:700;color:var(--text-2);text-align:center;
  padding:10px 8px;border-bottom:1px solid var(--border);white-space:nowrap}
.ctable th:first-child{text-align:start;padding-inline-start:14px}
.ctable td{padding:11px 8px;text-align:center;border-bottom:1px solid var(--border);
  font-variant-numeric:tabular-nums;font-weight:700;white-space:nowrap}
.ctable tr:last-child td{border-bottom:none}
.ctable tr.tap{cursor:pointer;transition:background .14s var(--ease)}
.ctable tr.tap:active{background:var(--bg-2)}
.ct-name{text-align:start !important;font-weight:400 !important;padding-inline-start:14px !important}
.ct-name b{font-weight:700}
.ct-name .pill{margin-inline-start:6px;font-size:10px;padding:1px 7px}
.ct-good{color:var(--success)}
.ct-warn{color:var(--text)}
.ct-bad{color:var(--danger-text)}
@media (hover:hover){ .ctable tr.tap:hover{background:var(--bg-2)} }

/* library shelf switcher sits tight under the page title */
.lib-seg{margin:2px 0 14px}

/* ===== Daily habits ===== */
/* private trainer notes — preserve the line breaks the trainer typed */
.note-body{font-size:14.5px;line-height:1.5;white-space:pre-wrap;word-break:break-word;margin-top:6px}

.habit-list{padding:0}
.habit-row{display:flex;align-items:center;gap:12px;width:100%;padding:12px 0;
  border-bottom:1px solid var(--border);text-align:start;transition:background-color .16s ease}
.habit-row:last-child{border-bottom:none}
.habit-row:active{background:var(--surface-2)}
/* a square check: the habit's own icon waits inside it; done fills it navy */
.habit-check{width:24px;height:24px;flex:0 0 24px;border-radius:6px;display:grid;place-items:center;
  border:1.5px solid var(--border-2);color:var(--text-3);
  transition:background-color .18s var(--ease-out),border-color .18s var(--ease-out),color .18s var(--ease-out)}
.habit-row.done .habit-check{background:var(--accent-fill);border-color:var(--accent-fill);color:#fff}
.habit-check svg{width:14px;height:14px;stroke-width:2.6}
.habit-name{flex:1;font-size:15px;font-weight:500;transition:color .18s ease}
.habit-row.done .habit-name{color:var(--text-3);text-decoration:line-through;text-decoration-color:var(--border-2)}
.habit-meta{display:flex;align-items:center;gap:10px}
.habit-streak{display:inline-flex;align-items:center;gap:3px;font-size:12.5px;font-weight:600;color:var(--text-2)}
.habit-streak svg{width:12px;height:12px;color:var(--decor)}
.habit-week{font-size:12.5px;font-weight:500;color:var(--text-3);font-variant-numeric:tabular-nums}

/* icon badge used by rich empty states (starter pack prompts) */
.empty-ic{width:60px;height:60px;border-radius:18px;background:var(--accent-tint);color:var(--accent);
  display:grid;place-items:center;margin:0 auto}
.empty-ic svg{width:28px;height:28px}
body.dark .empty-ic{background:var(--accent-tint)}

/* ===== Portion amount chips (¼ ½ 1 1½ 2 …) ===== */
.amount-chips{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}
.amt-chip{padding:11px 2px;border-radius:var(--r-sm);background:var(--bg-2);font-weight:700;
  font-size:15px;color:var(--text);transition:.14s var(--ease);cursor:pointer;font-variant-numeric:tabular-nums}
.amt-chip:active{transform:scale(.94)}
.amt-chip.on{background:var(--accent-fill);color:#fff;box-shadow:0 3px 10px -3px rgba(var(--accent-rgb),.5)}

/* ===== Nutrition: day navigation + water ===== */
.date-nav{display:flex;align-items:center;gap:8px;margin-bottom:10px}
.dn-arrow{width:42px;height:42px;flex:0 0 42px;border-radius:50%;background:var(--surface);
  border:0;display:grid;place-items:center;color:var(--text);transition:transform .14s var(--ease-out)}
.dn-arrow.flip svg{transform:scaleX(-1)}
.dn-arrow:disabled{opacity:.35}
.dn-arrow:not(:disabled):active{transform:scale(.94)}
.dn-label{flex:1;padding:8px 12px;border-radius:var(--r-xl);background:var(--surface);
  border:0;font-weight:600;font-size:15px;
  display:flex;flex-direction:column;align-items:center;gap:1px}
.dn-label .dn-sub{font-size:11.5px;font-weight:500;color:var(--text-3)}
.water-row{display:flex;align-items:center;gap:9px;background:var(--surface);border:0;
  border-radius:var(--r-xl);padding:14px 16px;margin-bottom:10px}
.water-row .rbar{background:var(--surface-2)}

/* exercise picker: already in this day */
.list-item.pk-taken{opacity:.55}
.list-item.pk-taken [data-pick]{cursor:default}

/* builder: edits not yet with the clients training this programme */
.publish-bar{display:flex;align-items:center;gap:10px;margin-bottom:10px}

/* the trainer's diary: a day opens onto what was eaten */
button.cns-day{width:100%;text-align:start;display:flex;align-items:center;gap:8px;font:inherit;color:inherit}
button.cns-day .chev{transition:transform .2s;color:var(--text-3)}
button.cns-day .chev svg{width:16px;height:16px}
button.cns-day[aria-expanded="true"] .chev{transform:rotate(-90deg)}
.cns-detail{background:var(--surface-2);border-radius:var(--r);padding:8px 12px;margin:2px 0 8px}
.cns-meal+.cns-meal{margin-top:8px;padding-top:8px;border-top:1px solid var(--border)}
.cns-mh{display:flex;justify-content:space-between;align-items:baseline;gap:8px;margin-bottom:4px}
.cns-row{display:flex;justify-content:space-between;gap:10px;font-size:13.5px;padding:3px 0}
.cns-row b{font-variant-numeric:tabular-nums}

/* a programme / a menu, looked at before it is assigned */
.pv-day{margin-bottom:8px}
.pv-ex{display:flex;align-items:center;gap:8px;padding:7px 0;border-top:1px solid var(--border)}
.pv-day > .row + .pv-ex, .pv-day > b + .pv-ex{margin-top:6px}
.pv-ex .pill{flex-shrink:0}
.pv-ex.tap{cursor:pointer;border-radius:var(--r-xs);transition:background-color .12s ease}
.pv-ex.tap:active{background:var(--surface-2)}
.pv-day > .pv-ex:first-child{border-top:0;padding-top:2px}

/* ===== Nutrition: one card per meal ===== */
/* The meal is the unit of the day. Each card is there before anything is in
   it; the header carries the meal's own total and the ✓ that logs it as the
   menu has it, the rows carry a pencil and a bin, the foot the two ways in. */
.meals-head{display:flex;align-items:baseline;justify-content:space-between;gap:10px;margin:24px 4px 8px}
.meals-head h2{margin:0;font-size:15px;font-weight:600;color:var(--text-2)}
.meals-head .link{display:inline-flex;align-items:center;gap:5px;font-weight:600;white-space:nowrap}
.meals-head .link svg{width:15px;height:15px}
/* one meal = one tile */
.meal-card{background:var(--surface);border:0;border-radius:var(--r-xl);margin-bottom:10px;overflow:hidden}
.mc-head{display:flex;align-items:center;gap:12px;padding:14px 16px 12px}
.mc-ic{width:26px;height:40px;background:none;color:var(--text-3);
  display:grid;place-items:center;flex:none}
.mc-ic svg{width:21px;height:21px}
.mc-title{flex:1;min-width:0}
.mc-title>b{font-size:16.5px;font-weight:600;display:block;letter-spacing:-.01em}
.mc-sub{font-size:12.5px;color:var(--text-3);margin-top:2px}
.mc-sub .k{color:var(--text);font-weight:600;font-variant-numeric:tabular-nums}
.mc-sub .p{color:var(--secondary-text);font-weight:600}
.mc-prog{font-size:11.5px;color:var(--text-3);margin-top:3px}
.mc-prog.done{color:var(--secondary-text);font-weight:600}
.mc-prog svg{width:12px;height:12px;vertical-align:-1px}
.mc-bar{height:3px;border-radius:3px;background:var(--surface-2);margin-top:6px;overflow:hidden}
.mc-bar i{display:block;height:100%;background:var(--secondary-deep);border-radius:3px}
.mc-row{display:flex;align-items:center;gap:8px;padding:10px 16px;border-top:1px solid var(--border)}
.mc-row .nm{flex:1;min-width:0}
.mc-row .nm b{font-size:14.5px;font-weight:500}
.mc-row .nm .tiny{margin-top:2px}
.mc-row .kc{font-weight:600;font-variant-numeric:tabular-nums;font-size:14.5px;min-width:34px;text-align:left}
.mc-act{width:36px;height:36px;display:grid;place-items:center;border-radius:10px;color:var(--text-3);flex:none}
.mc-act:active{background:var(--surface-2)}
.mc-act svg{width:18px;height:18px}
.mc-act.del:hover{color:var(--danger)}
.mc-foot{display:grid;grid-template-columns:1fr 1fr;border-top:1px solid var(--border);background:transparent}
.mc-foot.one{grid-template-columns:1fr}
.mc-foot button{display:flex;align-items:center;justify-content:center;gap:6px;padding:13px 6px;
  font-weight:600;font-size:14px;color:var(--secondary-text);min-height:46px}
.mc-foot button+button{border-inline-start:1px solid var(--border)}
.mc-foot button:active{background:var(--bg-2)}
.mc-foot svg{width:17px;height:17px}

/* ===== Nutrition: today's totals + macro rings ===== */
/* ===== Nutrition: today's totals — a white tile, one bar for calories, three for macros ===== */
.nut-hero{position:relative}
.nut-hero .eyebrow{color:var(--text-3)}
.nut-big{font-family:var(--serif);font-size:34px;font-weight:500;letter-spacing:-.02em;line-height:1.1;margin:2px 0 3px;font-variant-numeric:tabular-nums}
.nut-big span{font-size:15px;font-weight:400;color:var(--text-3);letter-spacing:0}
.nut-hero .small{color:var(--text-2)}
.nut-hero .warn-text{color:var(--text);font-weight:600}
.nut-cal-bar{height:6px;border-radius:3px;background:var(--surface-2);margin:12px 0 2px;overflow:hidden}
.nut-cal-bar i{display:block;height:100%;border-radius:3px;background:var(--bar-strong);transition:width .6s var(--ease-out)}
.nut-cal-bar.over i{background:var(--decor)}   /* over the target: ink words, a mustard mark */
.nut-rings{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin-top:16px}
.nut-macro{min-width:0}
.nut-macro-lbl{font-size:12.5px;color:var(--text-3);font-weight:500}
.nut-over{font-size:10.5px;font-weight:600;color:var(--text);background:var(--decor-tint);border-radius:999px;padding:1px 6px}
.nut-macro-n{margin:2px 0 6px;white-space:nowrap}
.nut-macro-n b{font-size:19px;font-weight:600;font-variant-numeric:tabular-nums}
.nut-macro-n span{font-size:12px;color:var(--text-3)}
.nut-macro-bar{height:3px;border-radius:2px;background:var(--surface-2);overflow:hidden}
.nut-macro-bar i{display:block;height:100%;border-radius:2px}

/* 0-10 questionnaire slider */
.q-slider{-webkit-appearance:none;appearance:none;width:100%;height:5px;border-radius:999px;
  background:var(--bg-2);outline:none;margin:8px 0 4px}
.q-slider::-webkit-slider-thumb{-webkit-appearance:none;width:26px;height:26px;border-radius:50%;
  background:#fff;box-shadow:0 3px 8px rgba(0,0,0,.18),0 0 0 1px rgba(0,0,0,.04);cursor:pointer}
.q-slider::-moz-range-thumb{width:26px;height:26px;border:none;border-radius:50%;background:#fff;
  box-shadow:0 3px 8px rgba(0,0,0,.18);cursor:pointer}

/* ═══════════ REPORT LAYER — editorial document style for data screens ═══════════
   Numbered sections, hairline rules, label→value rows, thin 0-10 bars.
   Sits on top of the iOS foundation (SF type, rounded cards, blue accent). */
.report{background:var(--surface);border:0;border-radius:var(--r-xl);
  padding:22px 20px;margin-bottom:14px;box-shadow:var(--sh)}
.report-head{border-bottom:2px solid var(--text);padding-bottom:12px;margin-bottom:4px}
.report-title{font-family:var(--serif);font-size:27px;font-weight:800;letter-spacing:-.9px;margin:0}
.report-meta{font-size:12.5px;color:var(--text-2);margin-top:5px;display:flex;gap:7px;flex-wrap:wrap}
.report-meta b{color:var(--text);font-weight:700}

.rsec{padding:20px 0 4px;border-bottom:1px solid var(--border)}
.rsec:last-child{border-bottom:none}
.rsec-head{display:flex;align-items:baseline;gap:9px;margin-bottom:12px}
.rsec-no{font-size:12px;font-weight:800;color:var(--accent);letter-spacing:.5px;font-variant-numeric:tabular-nums}
.rsec-title{font-size:16px;font-weight:800;letter-spacing:-.3px}

/* label → value row */
.rrow{display:flex;align-items:center;justify-content:space-between;gap:12px;
  padding:11px 0;border-bottom:1px solid var(--border)}
.rrow:last-child{border-bottom:none}
.rrow .rlabel{font-size:14px;color:var(--text-2)}
.rrow .rval{font-size:16px;font-weight:800;font-variant-numeric:tabular-nums;letter-spacing:-.3px}
.rrow .rval .sub{font-size:12px;font-weight:600;color:var(--text-3);margin-inline-start:4px}

/* 0-10 metric with bar underneath */
.rbar-item{padding:12px 0;border-bottom:1px solid var(--border)}
.rbar-item:last-child{border-bottom:none}
.rbar-top{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:7px}
.rbar-top .rlabel{font-size:14px;color:var(--text-2)}
.rbar-top .rval{font-size:15px;font-weight:800;font-variant-numeric:tabular-nums}
.rbar{height:5px;border-radius:999px;background:var(--bg-2);overflow:hidden}
.rbar i{display:block;height:100%;border-radius:999px;background:var(--text);
  transition:width .7s var(--ease)}
.rbar.pos i{background:var(--success)}
.rbar.warn i{background:var(--decor)}

/* side-by-side comparison cards (this week vs last week) */
.rcompare{display:grid;grid-template-columns:1fr 1fr;gap:11px;margin:4px 0 8px}
.rcard{background:var(--surface);border:0;border-radius:var(--r-lg);
  padding:16px 12px;text-align:center;box-shadow:var(--sh-sm)}
.rcard .rc-ic{color:var(--accent);margin-bottom:6px}
.rcard .rc-ic svg{width:24px;height:24px}
.rcard.muted-card .rc-ic{color:var(--text-3)}
.rcard .rc-val{font-family:var(--serif);font-size:26px;font-weight:800;letter-spacing:-1px;
  font-variant-numeric:tabular-nums;line-height:1.1}
.rcard .rc-lbl{font-size:12px;color:var(--text-2);margin-top:3px}
.rcard .rc-delta{font-size:13px;font-weight:800;margin-top:5px;display:inline-flex;align-items:center;gap:3px}
.rc-delta.good{color:var(--success)}
.rc-delta.bad{color:var(--danger-text)}
.rc-delta.flat{color:var(--text-2)}

/* free-text answers from the questionnaire */
.rquote{background:var(--bg-2);border-radius:var(--r);padding:12px 14px;margin:8px 0 4px;
  font-size:14px;line-height:1.65}
.rquote-label{font-size:12px;color:var(--text-3);font-weight:700;margin-top:12px}

/* ===== Superset picker (program builder) ===== */
.ss-pill{background:var(--accent-tint);color:var(--gold-deep);border:1px solid rgba(var(--accent-rgb),.25)}
body.dark .ss-pill{background:var(--accent-tint);color:var(--accent);border-color:rgba(var(--accent-rgb),.4)}
.ss-list{display:flex;flex-direction:column;gap:2px;margin-bottom:4px}
.ss-item{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 12px;
  border-radius:var(--r-sm);background:var(--bg-2);cursor:pointer;transition:background .15s var(--ease)}
.ss-item:active{background:var(--border)}
.ss-item span{font-size:14px;font-weight:500;display:flex;align-items:center;gap:6px}
.ss-item input{width:20px;height:20px;flex:0 0 20px;accent-color:var(--accent);cursor:pointer}

/* ===== Semantic tint surfaces — always readable in light AND dark =====
   Use these instead of hardcoded light hexes in inline styles. */
.tint-pos{background:var(--accent-tint) !important;border-color:rgba(var(--accent-rgb),.22) !important}
.tint-warn{background:var(--decor-tint) !important;border-color:rgba(214,164,25,.4) !important}
.tint-info{background:var(--accent-tint) !important;border-color:rgba(var(--accent-rgb),.22) !important}
body.dark .tint-pos{background:var(--accent-tint) !important;border-color:rgba(var(--accent-rgb),.35) !important}
body.dark .tint-warn{background:var(--decor-tint) !important;border-color:rgba(226,185,59,.4) !important}
body.dark .tint-info{background:var(--accent-tint) !important;border-color:rgba(var(--accent-rgb),.4) !important}
body.dark .tint-pos b{color:var(--accent)}
body.dark .tint-warn b{color:var(--text)}

/* ===== Guided tour — moving spotlight + floating tip card ===== */
.tour-backdrop{position:fixed;inset:0;z-index:90}
.tour-spot{position:fixed;border-radius:20px;pointer-events:none;
  box-shadow:0 0 0 9999px rgba(0,0,0,.58), 0 0 0 3px var(--accent), 0 0 24px rgba(var(--accent-rgb),.5);
  transition:top .45s var(--ease), left .45s var(--ease), width .45s var(--ease), height .45s var(--ease)}
.tour-tip{position:fixed;left:50%;transform:translateX(-50%);width:min(92vw,400px);
  background:var(--surface);border-radius:var(--r-lg);padding:16px 16px 14px;box-shadow:var(--sh-lg);z-index:95;
  animation:obIn .3s var(--ease)}
.tour-tip b{font-size:16.5px}
.tour-count{font-size:11px;font-weight:800;letter-spacing:.5px;color:var(--accent);margin-bottom:3px}
body.dark .tour-spot{box-shadow:0 0 0 9999px rgba(0,0,0,.72), 0 0 0 3px var(--accent), 0 0 24px rgba(var(--accent-rgb),.55)}

/* ===== Interactive onboarding wizard ===== */
.ob-wrap{max-width:460px;padding-top:calc(30px + var(--safe-t))}
.ob-progress{display:flex;gap:6px;margin-bottom:26px}
.ob-seg{flex:1;height:5px;border-radius:999px;background:var(--border-2);transition:background .35s var(--ease)}
.ob-seg.on,.ob-seg.done{background:var(--accent)}
.ob-head{margin-bottom:22px}
.ob-count{font-size:12px;font-weight:700;letter-spacing:.4px;color:var(--accent);text-transform:uppercase}
.ob-head h1{font-family:var(--serif);font-size:30px;font-weight:800;letter-spacing:-1px;margin:5px 0 6px;line-height:1.1}
.ob-head p{margin:0;font-size:14.5px}
.ob-step{animation:obIn .38s var(--ease)}
@keyframes obIn{from{opacity:0;transform:translateX(18px)}to{opacity:1;transform:none}}
.goal-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}
.goal-pick{padding:14px 12px;border-radius:var(--r);border:1.5px solid var(--border-2);background:var(--surface);
  font-weight:600;font-size:14px;color:var(--text);text-align:center;transition:.16s var(--ease);cursor:pointer}
.goal-pick:active{transform:scale(.97)}
.goal-pick.on{border-color:var(--accent);background:var(--accent-tint);color:var(--gold-deep);box-shadow:0 0 0 3px rgba(var(--accent-rgb),.12)}
.parq-q{padding:13px 0;border-bottom:1px solid var(--border)}
.parq-q:last-child{border-bottom:none}
.consent-row{display:flex;gap:11px;padding:11px 0;align-items:flex-start;cursor:pointer}
.consent-row input{margin-top:3px;width:20px;height:20px;flex:0 0 20px;accent-color:var(--accent)}
.ob-nav{display:flex;gap:10px;margin-top:26px}
.ob-nav .ob-next{flex:1}
.ob-nav .btn.ghost{min-width:104px}
.ob-nav .btn.ghost svg{transform:scaleX(-1)}

/* switch */
.switch input{appearance:none;-webkit-appearance:none;width:51px;height:31px;border-radius:999px;background:rgba(120,120,128,.32);position:relative;transition:background .22s var(--ease);cursor:pointer;flex-shrink:0}
.switch input:checked{background:var(--success-vivid)}
.switch input::after{content:"";position:absolute;top:2px;inset-inline-end:2px;width:27px;height:27px;border-radius:50%;background:#fff;box-shadow:0 3px 8px rgba(0,0,0,.15),0 1px 1px rgba(0,0,0,.06);transition:inset-inline-end .22s var(--ease)}
.switch input:checked::after{inset-inline-end:22px}


/* ── menu sectors ──────────────────────────────────────────────────────────
   A meal reads as protein → carb → veg → fat → sauce rather than as one flat
   list. The dot carries the sector, so the heading stays quiet: colour is the
   index, not decoration, and the label still says it for anyone who can't
   separate the hues. */
.meal-sec{margin-top:6px}
.meal-sec + .meal-sec{margin-top:10px}
.sec-head{display:flex;align-items:center;gap:7px;font-size:11px;font-weight:700;
  letter-spacing:.04em;color:var(--text-2);padding:2px 0 4px}
.sec-head .sec-cal{margin-inline-start:auto;font-weight:600;letter-spacing:0}
.sec-dot{width:8px;height:8px;border-radius:50%;flex:0 0 8px;background:var(--sec-other)}
.sec-protein{background:var(--sec-protein)} .sec-carb{background:var(--sec-carb)}
.sec-veg{background:var(--sec-veg)}         .sec-fruit{background:var(--sec-fruit)}
.sec-fat{background:var(--sec-fat)}         .sec-sauce{background:var(--sec-sauce)}
.mi-row{display:flex;align-items:center;gap:8px;padding:7px 0;border-bottom:1px solid var(--border)}
.mi-row:last-child{border-bottom:0}
.mi-main{flex:1;min-width:0}
.mi-main b{display:block;font-weight:600}
.mi-acts{display:flex;gap:6px;align-items:center;flex:0 0 auto}

/* ── muscle map ────────────────────────────────────────────────────────────
   The worked muscle contracts: a slow pulse in opacity and scale, so the
   diagram reads as "this is what the exercise does" rather than as a static
   legend. Two tiers, deliberately out of phase — the primary leads and the
   assisting muscles answer at half the amplitude, which separates them at a
   glance without needing the legend. transform-box:fill-box is what makes a
   scale on an SVG shape pivot on itself instead of on the viewBox origin. */
.mm-wrap{display:block}
.mm-svg{width:100%;max-width:280px;display:block;margin:0 auto}
.mm-svg .mm-p,.mm-svg .mm-s{transform-box:fill-box;transform-origin:center;will-change:opacity,transform}
.mm-svg .mm-p{animation:mmPulse 1.9s ease-in-out infinite}
.mm-svg .mm-s{animation:mmPulseSoft 1.9s ease-in-out infinite;animation-delay:.42s}
@keyframes mmPulse{
  0%,100%{opacity:.62;transform:scale(1)}
  46%    {opacity:1;  transform:scale(1.09)}
}
@keyframes mmPulseSoft{
  0%,100%{opacity:.45;transform:scale(1)}
  46%    {opacity:.85;transform:scale(1.04)}
}
/* the "התפריט שלי" entry on the nutrition screen: a row, not a sentence in a button */
.plan-entry{cursor:pointer;font:inherit;color:var(--text)}
.plan-entry-ic{width:26px;height:38px;background:none;color:var(--text-3);display:grid;place-items:center;flex:0 0 26px}
.plan-entry-ic svg{width:20px;height:20px}
/* ── the body figure (body.js) ─────────────────────────────────────────── */
.bf-svg{width:100%;max-width:340px;display:block;margin:0 auto}
/* a light grey body, pale blue-grey muscles with white seams — the way an
   anatomy chart reads; a chosen muscle goes navy */
.bf-body{fill:#EDF0F5;stroke:none}
.bf-m{fill:#D3DCEA;stroke:#fff;stroke-width:1.3;stroke-linejoin:round;transition:fill .18s var(--ease),opacity .18s var(--ease)}
body.dark .bf-body{fill:#1A2740}
body.dark .bf-m{fill:#2C3D60;stroke:#121C30}
.bf-cap{font-size:12px;fill:var(--text-3)}
/* an exercise's muscles: worked (pulse) and helping (softer pulse) */
.bf-m.bf-p{fill:var(--mm-p);opacity:1}
.bf-m.bf-s{fill:var(--mm-s);opacity:.9}
.mm-svg .bf-p,.mm-svg .bf-s{transform-box:fill-box;transform-origin:center;will-change:opacity,transform}
.mm-svg .bf-p{animation:mmPulse 1.9s ease-in-out infinite}
.mm-svg .bf-s{animation:mmPulseSoft 1.9s ease-in-out infinite;animation-delay:.42s}
/* a tappable figure: hover lifts, chosen fills with the accent and reads
   clearly against the grey of everything not chosen */
.bf-interactive .bf-m{cursor:pointer}
.bf-interactive .bf-m:hover{fill:var(--secondary)}
.bf-interactive .bf-m.bf-on{fill:var(--accent);opacity:1;stroke:var(--surface)}
.bf-interactive .bf-m:focus-visible{outline:none;stroke:var(--gold);stroke-width:2.5}
.bf-hint{display:flex;justify-content:center;gap:8px;flex-wrap:wrap;margin-top:8px}
.bf-hint .chip{pointer-events:none}
@media (prefers-reduced-motion: reduce){ .mm-svg .bf-p,.mm-svg .bf-s{animation:none;transform:none} }
.mm-legend{display:flex;gap:14px;justify-content:center;flex-wrap:wrap;
  margin-top:6px;font-size:11px;color:var(--text-2)}
.mm-legend span{display:inline-flex;align-items:center;gap:5px}
.mm-key{width:9px;height:9px;border-radius:50%;display:inline-block}
.mm-legend .mm-p{background:var(--mm-p);animation:none;opacity:1}
.mm-legend .mm-s{background:var(--mm-s);animation:none;opacity:.75}

/* A pulsing diagram is motion for its own sake to anyone who asked for less of
   it — hold the highlight, drop the animation. The colour still says which. */
@media (prefers-reduced-motion: reduce){
  .mm-svg .mm-p,.mm-svg .mm-s{animation:none;opacity:1;transform:none}
}

/* a swapped slot: the client's choice reads normally, the prescription behind
   it stays one tap away rather than being lost */
.mi-row.mi-swapped{border-inline-start:2px solid var(--accent);padding-inline-start:8px;
  margin-inline-start:-10px;border-radius:2px}
.mi-tag{display:inline-block;margin-inline-start:6px;padding:1px 6px;border-radius:6px;
  background:var(--accent-tint);color:var(--accent);font-size:10px;font-weight:700;
  vertical-align:middle;letter-spacing:.02em}
.mi-revert{display:block;margin-top:3px;padding:0;background:none;border:0;
  color:var(--accent);font:inherit;font-size:11px;text-align:start;cursor:pointer;
  text-decoration:underline;text-underline-offset:2px}
.mi-note{display:flex;align-items:center;gap:4px;margin-top:3px;color:var(--accent)}
.mi-note svg{width:12px;height:12px;flex:0 0 12px}

/* ── the set just landed ───────────────────────────────────────────────────
   logSet() re-renders the entire workout screen, so the row cannot animate
   across the change — it is a different element. Instead the new row is born
   with .just-logged and plays its confirmation once: a green sweep along the
   row and a check that snaps into place. This is the app's most repeated
   moment and it had no feedback at all. */
.wk .set-row.just-logged{animation:setLandRow .5s var(--ease) both}
.wk .set-row.just-logged .center{animation:setLandTick .42s var(--ease-spring) both .06s}
.wk .set-row.just-logged .set-in{animation:setLandField .5s var(--ease) both}
@keyframes setLandRow{
  0%  {background:rgba(176,200,255,.30)}
  60% {background:rgba(176,200,255,.14)}
  100%{background:transparent}
}
@keyframes setLandTick{
  0%  {transform:scale(.4) rotate(-14deg); opacity:0}
  100%{transform:scale(1)   rotate(0);     opacity:1}
}
@keyframes setLandField{
  0%  {transform:translateY(-2px)}
  100%{transform:translateY(0)}
}
@media (prefers-reduced-motion: reduce){
  .wk .set-row.just-logged,
  .wk .set-row.just-logged .center,
  .wk .set-row.just-logged .set-in{animation:none}
}

/* Sheet close button — the only always-visible way out.
   inset-inline-end resolves to the LEFT in this RTL app, which is where a
   mirrored iOS sheet puts its dismiss control. Sticky rather than absolute so
   it stays reachable while a long sheet scrolls; 40px box inside a 44pt row. */
.sheet{position:relative}
.sheet-x{position:sticky;top:-4px;float:inline-end;z-index:3;
  width:34px;height:34px;margin:-6px -4px 0 0;display:grid;place-items:center;
  border-radius:999px;border:none;cursor:pointer;
  background:var(--bg-2);color:var(--text-2);
  transition:background .16s var(--ease),color .16s var(--ease),transform .16s var(--ease)}
.sheet-x svg{width:17px;height:17px;stroke-width:2.2}
.sheet-x:hover{background:var(--border-2);color:var(--text)}
.sheet-x:active{transform:scale(.9)}
.sheet-x:focus-visible{outline:none;box-shadow:var(--ring)}
/* the grab handle sat on its own line; keep it centred beside the floated X */
.sheet .grab{clear:none}

/* Unit chips — the food's own household measures, one tap each. They replaced a
   <select>, where saying "one tablespoon" cost three taps and a native picker. */
.unit-chips{gap:6px}
.unit-chips .chip{padding:9px 13px;min-height:40px}

/* ═══════════════════════════ INTAKE WIZARD ═══════════════════════════
   One question per screen. The header carries the section name and a bar of
   segments (one per section, the current one filling as its questions pass);
   the question sits high; the answers sit low, where a thumb reaches them;
   the primary button is grey until an answer exists. */
.iw{position:fixed;inset:0;display:flex;flex-direction:column;background:var(--bg);z-index:60}
.iw-top{display:flex;align-items:center;gap:10px;padding:14px 16px 10px;border-bottom:1px solid var(--border);
  padding-top:calc(14px + env(safe-area-inset-top))}
.iw-back,.iw-x{width:40px;height:40px;border:0;background:transparent;color:var(--text);display:grid;place-items:center;
  border-radius:12px;cursor:pointer;flex:0 0 auto}
.iw-back svg{transform:rotate(180deg)}
.iw-back:active,.iw-x:active{background:var(--bg-2)}
.iw-sec{flex:1;display:grid;justify-items:center;gap:7px}
.iw-sec-name{font-size:14px;color:var(--text-2)}
.iw-bar{display:flex;gap:6px;width:min(100%,260px);direction:rtl}
.iw-seg{flex:1;height:3px;border-radius:2px;background:var(--border);position:relative;overflow:hidden}
.iw-seg.done{background:var(--anchor)}
.iw-seg.cur::after{content:'';position:absolute;inset:0;width:var(--fill,0%);background:var(--anchor);
  transition:width .35s var(--ease)}
.iw-body{flex:1;overflow:auto;display:flex;flex-direction:column;padding:22px 18px 8px}
.iw-q{font-size:30px;line-height:1.2;font-weight:700;letter-spacing:-.01em;text-align:center;margin:8px 0 6px;color:var(--text)}
.iw-sub{text-align:center;color:var(--text-2);font-size:14px;margin:0 0 6px}
.iw-answers{margin-top:auto;display:grid;gap:10px;padding-top:24px}
.iw-card{display:flex;align-items:center;gap:12px;text-align:start;width:100%;padding:18px 16px;
  border:1px solid var(--border);border-radius:16px;background:var(--surface);color:var(--text);cursor:pointer;
  font:inherit;transition:background .15s var(--ease),border-color .15s var(--ease),transform .12s var(--ease)}
.iw-card:active{transform:scale(.985)}
.iw-card.on{background:var(--accent-tint);border-color:var(--accent)}
.iw-ico{width:40px;height:40px;border-radius:50%;background:var(--bg-2);display:grid;place-items:center;font-size:19px;flex:0 0 auto}
.iw-card.on .iw-ico{background:var(--surface)}
.iw-lbl{flex:1;display:grid;gap:2px}
.iw-lbl b{font-size:16px;font-weight:600}
.iw-lbl-sub{font-size:13px;color:var(--text-2)}
.iw-tick{width:22px;height:22px;border-radius:50%;border:2px solid var(--border);flex:0 0 auto;display:grid;place-items:center;
  font-size:13px;color:#fff;transition:all .15s var(--ease)}
.iw-card.on .iw-tick{background:var(--anchor);border-color:var(--anchor)}
.iw-card.on .iw-tick::after{content:'✓'}
/* yes / no as two tall squares */
.iw-yn{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.iw-card.iw-big{flex-direction:column;justify-content:center;gap:10px;min-height:180px;text-align:center}
.iw-card.iw-big .iw-tick{display:none}
.iw-circle{width:52px;height:52px;border-radius:50%;background:var(--bg-2);display:grid;place-items:center;font-size:20px;color:var(--text-2)}
.iw-card.on .iw-circle{background:var(--anchor);color:#fff}
/* the body picker in the wizard: the figure fills the card, the chips under it
   are the same choices in words */
.iw-body{margin:4px 0 6px}
.iw-body .bf-svg{max-width:100%;max-height:44vh;width:auto;height:auto;margin:0 auto}
.iw-chips{display:flex;justify-content:center;flex-wrap:wrap;gap:8px;margin-bottom:6px}
.iw-chips .chip.active{background:var(--accent);color:#fff;border-color:var(--accent)}
.iw-quote{position:relative;background:var(--bg-2);border-radius:18px;padding:30px 20px 22px;text-align:center;font-size:16px;
  line-height:1.5;color:var(--text);margin-bottom:auto}
.iw-quote-mark{position:absolute;top:-14px;inset-inline-start:50%;transform:translateX(50%);width:36px;height:36px;border-radius:50%;
  background:var(--bg-2);border:4px solid var(--bg);display:grid;place-items:center;font-size:22px;color:var(--text-3);line-height:1}
/* numbers: the value large, a slider under it */
.iw-num{display:flex;align-items:baseline;justify-content:center;gap:10px;margin:auto 0 10px}
.iw-num-in{width:150px;border:0;border-bottom:1px solid var(--border);background:transparent;font:inherit;font-size:56px;
  font-weight:700;text-align:center;color:var(--text);font-variant-numeric:tabular-nums;padding:6px 0}
.iw-num-in:focus{outline:none;border-bottom-color:var(--accent)}
.iw-unit{font-size:20px;color:var(--text-2)}
.iw-range{width:100%;accent-color:var(--anchor);margin:4px 0 12px}
.iw-date{margin:auto 0;display:grid;justify-items:center}
.iw-date-in{font-size:22px;text-align:center;max-width:280px}
.iw-text{margin-top:auto;min-height:110px}
.iw-consent{display:grid;gap:14px;margin-top:auto}
.iw-check{display:flex;gap:10px;align-items:flex-start;font-size:14px;line-height:1.45;color:var(--text)}
.iw-check input{width:20px;height:20px;accent-color:var(--anchor);flex:0 0 auto;margin-top:1px}
.iw-check a{color:var(--gold-deep);text-decoration:underline}
/* the note card and the button, pinned to the bottom */
.iw-foot{padding:10px 18px calc(16px + env(safe-area-inset-bottom));display:grid;gap:12px;background:var(--bg)}
.iw-note{display:flex;gap:12px;align-items:flex-start;background:var(--bg-2);border-radius:14px;padding:12px 14px;font-size:14px}
.iw-note.good{background:var(--accent-tint)}
.iw-note-ico{width:34px;height:34px;border-radius:50%;background:var(--surface);display:grid;place-items:center;flex:0 0 auto;font-weight:700}
.iw-next{width:100%;padding:17px;border-radius:var(--r-btn);font-size:17px;font-weight:600;background:var(--anchor);color:#fff;border:0;
  transition:background .2s var(--ease),opacity .2s var(--ease)}
.iw-next:disabled{background:#AEB6C2;color:#fff;opacity:1;cursor:not-allowed}
/* In dark the anchor IS a dark surface, so an anchor button vanishes into the
   page and its ink vanished into it. Dark uses the same green CTA as every
   other primary action in the app. */
body.dark .iw-next{background:var(--accent-fill);color:#fff}
body.dark .iw-next:disabled{background:#24324D;color:#7A8496}
body.dark .iw-card.on{background:rgba(var(--accent-rgb),.12)}
body.dark .iw-check a{color:var(--accent)}
@media (min-width:700px){ .iw{max-width:520px;margin:0 auto;inset:0 auto;left:50%;transform:translateX(-50%);border-inline:1px solid var(--border)} }
@media (prefers-reduced-motion:reduce){ .iw-card,.iw-seg.cur::after,.iw-next{transition:none} }
.iw-back[hidden],.iw-x[hidden]{display:none}

/* ═══════════════════════════ AGENT ═══════════════════════════ */
.agent-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
@media (max-width:420px){ .agent-grid{grid-template-columns:1fr} }
.agent-card{display:flex;flex-direction:column;align-items:flex-start}
.agent-ico{width:42px;height:42px;border-radius:13px;background:var(--accent-tint);color:var(--gold-deep);display:grid;place-items:center;margin-bottom:8px}
body.dark .agent-ico{background:rgba(var(--accent-rgb),.12);color:var(--accent)}
.knows-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(130px,1fr));gap:8px 14px}

/* Progressive-overload prompt in the workout: the one line on the dark canvas
   that asks for a decision, so it is the one line in the accent. */
.lasttime.progress-ready{color:var(--text);display:flex;gap:8px;align-items:center;background:var(--accent-tint);padding:10px 13px}
.lasttime.progress-ready .qbtn{flex:0 0 auto}

/* ═══════════════════════════ PRINT ═══════════════════════════ */
.print-page{max-width:760px;margin:0 auto;padding:18px 20px 40px;background:#fff;color:#111;min-height:100vh}
.print-top{display:flex;justify-content:space-between;gap:10px;margin-bottom:14px}
.print-head{border-bottom:2px solid #111;padding-bottom:10px;margin-bottom:16px}
.print-brand{font-weight:800;letter-spacing:.04em;color:var(--anchor)}
.print-head h1{margin:2px 0 0;font-size:24px;color:#111}
.print-sub{color:#555;font-size:13px;margin-top:4px}
.print-block{margin:0 0 18px;break-inside:avoid}
.print-block h2{font-size:17px;margin:0 0 6px;color:#111}
.print-variant{font-size:19px;margin:22px 0 8px;padding-top:12px;border-top:1px dashed #999;color:var(--anchor)}
.print-muted{color:#666;font-size:12px}
.print-table{width:100%;border-collapse:collapse;font-size:13px}
.print-table th,.print-table td{border-bottom:1px solid #ddd;padding:6px 6px;text-align:start;vertical-align:top}
.print-table th{font-size:11px;color:#555;font-weight:600}
.print-slot{margin:6px 0 8px;font-size:13px}
.print-slot ul,.print-block ul{margin:4px 0 0;padding-inline-start:18px}
.print-slot li,.print-block li{margin:2px 0}
.print-foot{margin-top:24px;padding-top:10px;border-top:1px solid #ddd;font-size:12px;color:#666}
/* The designed programme (print.js renderPrintProgram): his look — slate and gold,
   a cover, a page a workout. Fixed colours: it is paper, light in any theme. */
.pp{--pp-ink:#0F172A;--pp-ink2:#1E293B;--pp-gold:#C8A951;--pp-gold-d:#9C7F2C;--pp-gold-t:#F6EFD9;--pp-muted:#64748B;
  --pp-line:#E2E8F0;--pp-bg:#F7F8FA;--pp-drop:#B4232A;--pp-drop-t:#FDECEC;color:var(--pp-ink);font-family:Rubik,system-ui,sans-serif}
.pp .print-head{display:none}
.pp-page{position:relative;margin:0 0 22px}
.pp-eyebrow{font-size:12px;font-weight:700;letter-spacing:.06em;color:var(--pp-gold-d)}
.pp-eyebrow.pp-light{color:var(--pp-gold)}
.pp-hero{background:var(--pp-ink);color:#fff;border-radius:18px;padding:26px 26px 22px;position:relative;overflow:hidden}
.pp-hero:after{content:"";position:absolute;left:-50px;bottom:-50px;width:170px;height:170px;border-radius:50%;border:18px solid rgba(200,169,81,.18)}
.pp-brand{position:absolute;left:24px;top:22px;font-weight:800;font-size:17px;color:var(--pp-gold)}
.pp-hero h1{font-size:44px;font-weight:800;margin:4px 0 12px;line-height:1.05;color:#fff}
.pp-chips{display:flex;flex-wrap:wrap;gap:7px}
.pp-chips span{background:rgba(255,255,255,.1);border:1px solid rgba(255,255,255,.22);border-radius:30px;padding:4px 12px;font-size:13px;font-weight:600}
.pp-block{margin-top:22px}
.pp h3{font-size:18px;font-weight:800;margin:0 0 10px;display:flex;align-items:center;gap:7px;color:var(--pp-ink)}
.pp h3:before{content:"";width:4px;height:18px;background:var(--pp-gold);border-radius:3px}
.pp-week{display:grid;grid-template-columns:repeat(auto-fit,minmax(110px,1fr));gap:9px}
.pp-wk{border:1px solid var(--pp-line);border-radius:12px;padding:9px;text-align:center;background:var(--pp-bg)}
.pp-wk-n{font-size:11px;color:var(--pp-muted);font-weight:600}
.pp-wk-l{font-size:24px;font-weight:800;line-height:1.25}
.pp-wk-t{font-size:11px;color:var(--pp-muted);line-height:1.35}
.pp-note{font-size:12px;color:var(--pp-muted);margin:7px 0 0}
.pp-tips{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:9px}
.pp-tip{border:1px solid var(--pp-line);border-radius:12px;padding:10px 12px}
.pp-tip b{font-size:14px;display:block;margin-bottom:3px}
.pp-tip p,.pp-m p{font-size:12.5px;line-height:1.5;color:#334155;margin:0}
.pp-methods{display:grid;gap:8px}
.pp-m{display:flex;gap:10px;align-items:flex-start;border:1px solid var(--pp-line);border-radius:12px;padding:9px 12px}
.pp-m .pp-badge{flex:none;margin-top:1px}
.pp-badge{display:inline-block;font-size:11.5px;font-weight:700;border-radius:30px;padding:2px 10px;margin-top:5px}
.pp-plain{background:var(--pp-bg);border:1px solid var(--pp-line);color:var(--pp-ink2)}
.pp-ssb{background:var(--pp-gold-t);border:1px solid var(--pp-gold);color:var(--pp-gold-d)}
.pp-drop{background:var(--pp-drop-t);border:1px solid #F3B4B4;color:var(--pp-drop)}
.pp-foot{display:flex;justify-content:space-between;font-size:11.5px;color:var(--pp-muted);border-top:1px solid var(--pp-line);padding-top:7px;margin-top:18px}
.pp-day-h{display:flex;align-items:center;gap:16px;padding-bottom:12px;border-bottom:2px solid var(--pp-ink);margin-bottom:12px}
.pp-letter{min-width:64px;height:64px;padding:0 8px;border-radius:16px;background:var(--pp-ink);color:var(--pp-gold);font-weight:800;font-size:34px;display:grid;place-items:center}
.pp-letter.pp-long{font-size:18px}
.pp-day-h h2{font-size:26px;font-weight:800;line-height:1.15;margin:0;color:var(--pp-ink)}
.pp-meta{font-size:12.5px;color:var(--pp-muted);margin-top:3px}
.pp-list{display:flex;flex-direction:column;gap:9px}
.pp-ex{display:grid;grid-template-columns:30px 1fr 110px 96px;gap:12px;align-items:center;border:1px solid var(--pp-line);border-radius:12px;padding:11px 13px;background:#fff}
.pp-num{width:26px;height:26px;border-radius:50%;background:var(--pp-bg);border:1px solid var(--pp-line);display:grid;place-items:center;font-weight:700;font-size:12.5px}
.pp-name{font-weight:700;font-size:15px;line-height:1.25}
.pp-sub{font-size:12px;color:var(--pp-muted);margin-top:2px}
.pp-rx,.pp-rest{text-align:center}
.pp-big{display:flex;justify-content:center;align-items:baseline;gap:4px}
.pp-big b{font-size:18px;font-weight:800}
.pp-big span{color:var(--pp-muted);font-size:13px}
.pp-rest b{font-size:16px;font-weight:700}
.pp-go{color:var(--pp-gold-d)}
.pp-l{font-size:10.5px;color:var(--pp-muted);margin-top:1px}
.pp-ss{border:2px solid var(--pp-gold);border-radius:14px;padding:8px;background:linear-gradient(0deg,#fff,var(--pp-gold-t) 140%);display:flex;flex-direction:column;gap:7px}
.pp-ss-h{font-size:12px;color:var(--pp-gold-d);font-weight:600;display:flex;align-items:center;gap:7px;padding:0 3px}
.pp-ss-h .pp-badge{margin:0}
.pp-ex.pp-in{border-color:#E9DDB6}
@media (max-width:520px){
  .pp-ex{grid-template-columns:26px 1fr 84px;gap:8px}
  .pp-rest{grid-column:2 / 4;text-align:start;display:flex;gap:6px;align-items:baseline}
  .pp-hero h1{font-size:34px}
}
@media print{
  html,body,#app,main{background:#fff!important}
  .no-print,#offlineBar,.toast-wrap,nav,.tabbar,.topbar,.skip-link{display:none!important}
  *{box-shadow:none!important}
  .print-page{padding:0;max-width:none;min-height:0}
  @page{margin:14mm}
  .pp{-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .pp-page{margin:0}
  .pp-day{break-before:page}
  .pp-ex,.pp-ss,.pp-tip,.pp-m{break-inside:avoid}
  .pp-ex{grid-template-columns:30px 1fr 110px 96px}
  .pp-rest{display:block;text-align:center}
}

/* ===== Terms of use & privacy policy — a document, read before an account exists ===== */
.legal-page{max-width:640px;margin:0 auto;padding:20px 20px 40px;background:var(--surface);min-height:100vh}
.legal-page h1{font-size:28px;margin:14px 0 2px}
.legal-brand{font-family:var(--serif);font-weight:900;font-size:22px;margin-top:10px;color:var(--text)}
.legal-brand span{color:var(--decor)}
.legal-sec{margin-top:18px}
.legal-sec h2{font-size:17px;margin:0 0 6px}
.legal-sec p,.legal-sec li{font-size:15px;line-height:1.65;color:var(--text)}
.legal-sec ul{margin:4px 0;padding-inline-start:20px}
.legal-sec li{margin-bottom:4px}
.legal-draft{margin:14px 0 4px;padding:12px 14px;border-radius:var(--r);background:var(--decor-tint);border:1px solid var(--decor);font-size:14px;line-height:1.55}
.legal-todo{background:var(--decor-tint);border-bottom:1px dashed var(--decor);padding:0 3px}
.legal-other{margin-top:22px}
.legal-other a{color:var(--accent);font-weight:700}
/* the agreement a client signs before using the app: the text scrolls in its
   own box so the signature stays in reach */
.agree-box{margin:14px 0;max-height:46vh;overflow:auto;padding:4px 14px 14px;border:1px solid var(--border-2);border-radius:var(--r);background:var(--surface-2)}
.agree-box .legal-sec:first-child{margin-top:10px}
.agree-box .legal-sec p,.agree-box .legal-sec li{font-size:14px}
.agree-sign{display:flex;flex-direction:column;gap:12px;margin-top:6px}
.agree-sign .field{margin:0}
.auth-legal{text-align:center;margin-top:18px;font-size:12px;color:var(--text-3)}
.auth-legal a{color:var(--text-2);text-decoration:underline}

/* a check-in, as the client wrote it */
.ci-q{background:var(--surface-2);border-radius:10px;padding:7px 10px;margin-bottom:6px}
.ci-img{padding:0;border:0;background:none;cursor:zoom-in;display:block;margin:4px 0 8px}
.ci-img img{max-width:120px;max-height:140px;border-radius:10px;display:block;object-fit:cover}
.ci-still{width:100%;border-radius:12px;display:block;margin:4px 0 8px}
button.photo-cell{padding:0;border:0;font:inherit;cursor:zoom-in;display:block;width:100%}

/* menu library: audience tabs, goal / diet chips, the list under them */
.mlib-tabs{margin:2px 0 12px}
.mlib-tabs .seg-n{font-size:11.5px;font-weight:800;color:var(--text-3);margin-inline-start:4px}
.mlib-tabs button.active .seg-n{color:var(--gold-deep)}
.mlib-lbl{margin:0 2px 4px}
.mlib-chips{padding-bottom:8px}
.mlib-chips .chip{min-height:38px;padding:8px 13px}
.chip-n{font-size:11px;font-weight:800;opacity:.65;margin-inline-start:6px}
.chip.active .chip-n{opacity:.85}
.mlib-head{font-size:13px;font-weight:800;color:var(--text-2);margin:14px 2px 6px}
.mlib-head:first-child{margin-top:4px}

/* builder: how the programme divides the week */
.split-row{display:flex;align-items:center;gap:8px;margin-bottom:10px}
.split-row .chips{padding:2px 0 4px}
.split-row .chip{min-height:34px;padding:6px 12px;font-size:12.5px}
/* every split in sight — "Upper / Lower" sat past the edge of a phone */
#pgSplits{flex-wrap:wrap;overflow:visible}

/* ── Guides (guides.js): library shelf, nutrition tile, reader ── */
.guide-list{padding:4px 16px}
.guide-row,.guide-tile{display:flex;align-items:center;gap:13px;width:100%;text-align:start;color:inherit;font:inherit}
.guide-row{padding:12px 0;border-bottom:1px solid var(--border)}
.guide-row:last-child{border-bottom:none}
.guide-tile{margin-top:14px;padding:14px 16px}
.guide-cover{width:52px;height:68px;border-radius:var(--r-xs);background:var(--bg-2);overflow:hidden;flex-shrink:0;display:grid;place-items:center;color:var(--text-3)}
.guide-cover.sm{width:42px;height:56px}
.guide-cover img{width:100%;height:100%;object-fit:cover;display:block}
.guide-txt{flex:1;display:flex;flex-direction:column;gap:3px;min-width:0}
.guide-txt .pill{align-self:flex-start;margin-top:2px}
.guide-pv{text-align:center}
.guide-pv-cover{width:150px;max-width:50%;border-radius:var(--r);display:block;margin:4px auto 0}
.guide-pages{display:flex;flex-direction:column;gap:10px}
.guide-page{width:100%;height:auto;display:block;border-radius:var(--r);background:var(--bg-2);aspect-ratio:595/842}
