/* ==========================================================================
   tempo theme for SparkyFitness: "Liquid Chalk"
   --------------------------------------------------------------------------
   Makes SparkyFitness look like tempo (~/Projects/OpenGym/app): tempo's
   graphite/chalk palette with gold highlights, Archivo + Big Shoulders Display,
   frosted-glass cards, and the phone tab bar as a floating glass pill.

   How it gets in: nginx (theme/nginx-tempo-theme.conf) adds a <link> to this
   file before </head>. The SparkyFitness image itself is untouched (v1.8.0).

   Why plain selectors win: Tailwind v4 puts every utility in @layer
   utilities, and unlayered rules beat layered ones whatever their
   specificity. So keep selectors NARROW: a broad rule here overrides every
   utility on the elements it matches.

   Tokens are copied from tempo's index.css (the LIQUID CHALK block) and
   prefixed --tp- so they can't collide with SparkyFitness's own variables.
   SparkyFitness marks dark mode with class="dark" on <html>.
   ========================================================================== */

/* ---------------------------------------------------------------- fonts -- */
/* Copied from tempo's @fontsource packages (OFL-1.1, licences in ./fonts). */
@font-face{font-family:'Archivo';font-style:normal;font-display:swap;font-weight:400;src:url(fonts/archivo-latin-400-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Archivo';font-style:normal;font-display:swap;font-weight:400;src:url(fonts/archivo-latin-ext-400-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Archivo';font-style:normal;font-display:swap;font-weight:500;src:url(fonts/archivo-latin-500-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Archivo';font-style:normal;font-display:swap;font-weight:500;src:url(fonts/archivo-latin-ext-500-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Archivo';font-style:normal;font-display:swap;font-weight:600;src:url(fonts/archivo-latin-600-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Archivo';font-style:normal;font-display:swap;font-weight:600;src:url(fonts/archivo-latin-ext-600-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Archivo';font-style:normal;font-display:swap;font-weight:700;src:url(fonts/archivo-latin-700-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Archivo';font-style:normal;font-display:swap;font-weight:700;src:url(fonts/archivo-latin-ext-700-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Big Shoulders Display';font-style:normal;font-display:swap;font-weight:800;src:url(fonts/big-shoulders-display-latin-800-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Big Shoulders Display';font-style:normal;font-display:swap;font-weight:800;src:url(fonts/big-shoulders-display-latin-ext-800-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:'Big Shoulders Display';font-style:normal;font-display:swap;font-weight:900;src:url(fonts/big-shoulders-display-latin-900-normal.woff2) format('woff2');unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:'Big Shoulders Display';font-style:normal;font-display:swap;font-weight:900;src:url(fonts/big-shoulders-display-latin-ext-900-normal.woff2) format('woff2');unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}

/* --------------------------------------------------------------- tokens -- */
/* light (SparkyFitness's default when <html> has no .dark) */
:root{
  --tp-font-display:'Big Shoulders Display',Impact,'Arial Narrow',sans-serif;
  --tp-font-body:'Archivo',-apple-system,BlinkMacSystemFont,system-ui,sans-serif;

  --tp-bg:#d7d7dc; --tp-bg-el:#ececf0;
  --tp-surface:rgba(255,255,255,.42); --tp-surface-2:rgba(255,255,255,.62); --tp-surface-3:rgba(255,255,255,.72);
  --tp-label:#111114; --tp-label-2:rgba(20,20,28,.64); --tp-label-3:rgba(20,20,28,.38); --tp-label-4:rgba(20,20,28,.2);
  --tp-sep:rgba(20,20,28,.12);
  --tp-glass-line:rgba(255,255,255,.75);
  --tp-glass-hi:rgba(255,255,255,.95);
  --tp-glass-drop:0 18px 40px -24px rgba(30,30,40,.45);
  --tp-blob-a:#ffffff; --tp-blob-b:#a4a4ac; --tp-blob-c:#f6f6f9;
  /* tempo's default accent, "chalk": graphite on light */
  --tp-acc:#161619; --tp-acc-2:#34343b; --tp-on-acc:#ffffff;
  /* the system yellow is ~1.4:1 on this pale glass; tempo's deep gold reads (~5:1) */
  --tp-gold:#7a5c00; --tp-gold-2:#5c4500; --tp-on-gold:#ffffff;
  --tp-red:#ff3b30;
  --tp-field:rgba(255,255,255,.62);
  --tp-track:rgba(120,120,128,.2);       /* segmented-control and switch tracks */
  --tp-seg-on:#ffffff;                    /* the selected segment */
  --tp-scrim:rgba(190,190,198,.38);

  /* motion (tempo's springs) */
  --tp-ease:cubic-bezier(.32,.72,0,1);
  --tp-spring:cubic-bezier(.34,1.4,.64,1);
  --tp-ease-pop:cubic-bezier(.34,1.7,.64,1);
  --tp-ease-exit:cubic-bezier(.22,.61,.36,1);

  --tp-pill-w:min(calc(100vw - 28px),420px);
}
:root.dark{
  --tp-bg:#0d0d0f; --tp-bg-el:#17171a;
  --tp-surface:rgba(255,255,255,.07); --tp-surface-2:rgba(255,255,255,.12); --tp-surface-3:rgba(255,255,255,.17);
  --tp-label:#f2f2f5; --tp-label-2:rgba(236,236,242,.62); --tp-label-3:rgba(236,236,242,.36); --tp-label-4:rgba(236,236,242,.2);
  --tp-sep:rgba(255,255,255,.12);
  --tp-glass-line:rgba(255,255,255,.16);
  --tp-glass-hi:rgba(255,255,255,.36);
  --tp-glass-drop:0 22px 44px -24px rgba(0,0,0,.8);
  --tp-blob-a:#5e5e66; --tp-blob-b:#3a3a41; --tp-blob-c:#76767e;
  /* chalk: silver on dark */
  --tp-acc:#ececf1; --tp-acc-2:#c9c9d0; --tp-on-acc:#0d0d0f;
  --tp-gold:#ffd60a; --tp-gold-2:#e6c000; --tp-on-gold:#0d0d0f;
  --tp-red:#ff453a;
  --tp-field:rgba(255,255,255,.07);
  --tp-track:rgba(255,255,255,.1);
  --tp-seg-on:rgba(255,255,255,.16);
  --tp-scrim:rgba(6,6,8,.42);
}

/* ------------------------------------- SparkyFitness's theme, remapped -- */
/* Tailwind v4 reads every colour through --color-*, so these take any CSS
   colour, translucent ones included. */
:root{
  --color-background:var(--tp-bg);
  --color-foreground:var(--tp-label);
  --color-card:var(--tp-surface);
  --color-card-foreground:var(--tp-label);
  --color-popover:var(--tp-bg-el);
  --color-popover-foreground:var(--tp-label);
  --color-primary:var(--tp-acc);
  --color-primary-foreground:var(--tp-on-acc);
  --color-secondary:var(--tp-surface-2);
  --color-secondary-foreground:var(--tp-label);
  --color-muted:var(--tp-surface-2);
  --color-muted-foreground:var(--tp-label-2);
  --color-accent:var(--tp-surface-2);
  --color-accent-foreground:var(--tp-label);
  --color-destructive:var(--tp-red);
  --color-destructive-foreground:#ffffff;
  --color-border:var(--tp-sep);
  --color-input:var(--tp-sep);
  --color-ring:var(--tp-gold);

  --font-sans:var(--tp-font-body);
  --radius:14px;            /* rounded-lg 14, -md 12 (tempo's control radius), -sm 10 */
  --radius-xl:20px;

  /* SparkyFitness's blue-tinted greys become tempo's neutral graphite (iOS greys) */
  --color-gray-50:#f2f2f7;  --color-slate-50:#f2f2f7;
  --color-gray-100:#ececef; --color-slate-100:#ececef;
  --color-gray-200:#e3e3e8; --color-slate-200:#e3e3e8;
  --color-gray-300:#c7c7cc; --color-slate-300:#c7c7cc;
  --color-gray-400:#aeaeb2; --color-slate-400:#aeaeb2;
  --color-gray-500:#8e8e93; --color-slate-500:#8e8e93;
  --color-gray-600:#636366; --color-slate-600:#636366;
  --color-gray-700:#48484a; --color-slate-700:#48484a;
  --color-gray-800:#2a2a2d; --color-slate-800:#2a2a2d;
  --color-gray-900:#17171a; --color-slate-900:#17171a;
  --color-gray-950:#0d0d0f; --color-slate-950:#0d0d0f;

  /* The raw shadcn values, for the few rules that read them directly
     (hsl(var(--muted)) and the like). Opaque stand-ins for the glass above. */
  --background:240 6% 85%; --foreground:240 8% 7%;
  --card:240 7% 90%; --card-foreground:240 8% 7%;
  --popover:240 11% 93.5%; --popover-foreground:240 8% 7%;
  --primary:240 6% 9%; --primary-foreground:0 0% 100%;
  --secondary:240 7% 93%; --secondary-foreground:240 8% 7%;
  --muted:240 7% 93%; --muted-foreground:240 5% 34%;
  --accent:240 7% 93%; --accent-foreground:240 8% 7%;
  --destructive:3 100% 59%; --destructive-foreground:0 0% 100%;
  --border:240 5% 77%; --input:240 5% 77%; --ring:45 100% 24%;
}
:root.dark{
  --background:240 7% 5.5%; --foreground:240 14% 95.5%;
  --card:240 3% 12.5%; --card-foreground:240 14% 95.5%;
  --popover:240 6% 9.6%; --popover-foreground:240 14% 95.5%;
  --primary:240 13% 93%; --primary-foreground:240 7% 5.5%;
  --secondary:240 2% 17%; --secondary-foreground:240 14% 95.5%;
  --muted:240 2% 17%; --muted-foreground:240 4% 62%;
  --accent:240 2% 17%; --accent-foreground:240 14% 95.5%;
  --destructive:3 100% 61%; --destructive-foreground:0 0% 100%;
  --border:240 3% 20%; --input:240 3% 20%; --ring:50 100% 52%;
}

/* ----------------------------------------------------------- the ground -- */
html{background:var(--tp-bg)}
body{
  font-family:var(--tp-font-body);background:transparent;letter-spacing:-.005em;
  -webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale;
}
/* The soft grey shapes the glass has something to refract (tempo's body::before).
   Painted gradients, not blurred elements, so they cost nothing to scroll over. */
body::before{
  content:'';position:fixed;inset:0;z-index:-1;pointer-events:none;
  background:
    radial-gradient(38% 30% at 88% 4%,var(--tp-blob-a) 0%,transparent 70%),
    radial-gradient(40% 26% at 0% 52%,var(--tp-blob-b) 0%,transparent 72%),
    radial-gradient(36% 26% at 92% 86%,var(--tp-blob-c) 0%,transparent 70%),
    linear-gradient(166deg,transparent 18%,color-mix(in srgb,var(--tp-blob-b) 45%,transparent) 24%,transparent 31%),
    var(--tp-bg);
  opacity:.85;
}
/* page wrappers paint a solid colour over the whole screen; let the ground show */
#root .min-h-screen.bg-background,#root > .bg-background,#root > .min-h-screen{background-color:transparent}
/* sticky in-page headers: frosted instead of a solid band */
.sticky.top-0.bg-background{
  background:color-mix(in srgb,var(--tp-bg) 78%,transparent);
  -webkit-backdrop-filter:blur(20px) saturate(170%);backdrop-filter:blur(20px) saturate(170%);
}
::selection{background:color-mix(in srgb,var(--tp-gold) 32%,transparent)}

/* ------------------------------------------------------------ the glass -- */
/* blur what's behind, a hairline edge and a lit top rim */
:is(.rounded-lg,.rounded-xl,.rounded-2xl).border.bg-card{
  background-color:var(--tp-surface);
  -webkit-backdrop-filter:blur(22px) saturate(170%);backdrop-filter:blur(22px) saturate(170%);
  border-color:var(--tp-glass-line);
  box-shadow:inset 0 1px 0 var(--tp-glass-hi),var(--tp-glass-drop);
  border-radius:22px;
}
/* a card inside a card keeps the edge but not a second blur or drop */
.bg-card :is(.rounded-lg,.rounded-xl,.rounded-2xl).border.bg-card{
  -webkit-backdrop-filter:none;backdrop-filter:none;
  box-shadow:inset 0 1px 0 var(--tp-glass-hi);
  border-radius:18px;
}
/* settings sections are accordion items, not cards; same glass */
div[data-orientation][data-state].border.rounded-lg{
  background-color:var(--tp-surface);
  -webkit-backdrop-filter:blur(22px) saturate(170%);backdrop-filter:blur(22px) saturate(170%);
  border-color:var(--tp-glass-line);
  box-shadow:inset 0 1px 0 var(--tp-glass-hi),var(--tp-glass-drop);
  border-radius:22px;
}
/* The dashboard puts each widget's card inside a frame (itself a card) and strips the inner
   one with [&>*]:border-0 [&>*]:bg-transparent [&>*]:shadow-none. Keep that, or the widget
   shows a second, square-cornered panel inside the glass. */
.\[\&\>\*\]\:bg-transparent > :is(.rounded-lg,.rounded-xl,.rounded-2xl).border.bg-card{
  background:transparent;border-color:transparent;box-shadow:none;
  -webkit-backdrop-filter:none;backdrop-filter:none;
}

/* SparkyFitness's light-only tinted panels (bg-blue-50 and friends without a dark: variant)
   glare in dark mode; give them tempo's tinted glass instead, and lift their text to match. */
.dark :is(.bg-blue-50,.bg-blue-100,.bg-sky-50,.bg-indigo-50):not([class*="dark:bg-"]){background-color:color-mix(in srgb,#0a84ff 15%,transparent)}
.dark :is(.bg-green-50,.bg-green-100,.bg-emerald-50,.bg-emerald-100,.bg-teal-50):not([class*="dark:bg-"]){background-color:color-mix(in srgb,#30d158 14%,transparent)}
.dark :is(.bg-amber-50,.bg-amber-100,.bg-yellow-50,.bg-yellow-100,.bg-orange-50,.bg-orange-100):not([class*="dark:bg-"]){background-color:color-mix(in srgb,#ff9f0a 14%,transparent)}
.dark :is(.bg-red-50,.bg-red-100,.bg-rose-50,.bg-rose-100,.bg-pink-50):not([class*="dark:bg-"]){background-color:color-mix(in srgb,#ff453a 14%,transparent)}
.dark :is(.bg-purple-50,.bg-purple-100,.bg-violet-50):not([class*="dark:bg-"]){background-color:color-mix(in srgb,#bf5af2 15%,transparent)}
.dark :is(.bg-gray-50,.bg-gray-100,.bg-slate-50,.bg-slate-100):not([class*="dark:bg-"]){background-color:var(--tp-surface-2)}
.dark :is(.text-blue-600,.text-blue-700,.text-blue-800,.text-indigo-700):not([class*="dark:text-"]){color:#64a8ff}
.dark :is(.text-green-700,.text-green-800,.text-emerald-700,.text-emerald-800):not([class*="dark:text-"]){color:#5fe08a}
.dark :is(.text-amber-700,.text-amber-800,.text-yellow-700,.text-yellow-800,.text-orange-700):not([class*="dark:text-"]){color:#ffc164}
.dark :is(.text-red-700,.text-red-800,.text-rose-700):not([class*="dark:text-"]){color:#ff7b73}
.dark :is(.text-gray-700,.text-gray-800,.text-gray-900,.text-slate-700,.text-slate-800,.text-slate-900):not([class*="dark:text-"]){color:var(--tp-label)}
/* ...and the boxes it paints light grey on purpose in dark mode (dark:bg-slate-300 + black text) */
.dark .dark\:bg-slate-300{background-color:var(--tp-surface-2)}
.dark .dark\:text-black{color:var(--tp-label)}
/* titles it dims to slate-300 in dark mode read as tempo's full-strength label */
.dark .dark\:text-slate-300{color:var(--tp-label)}

/* dialogs: tempo's centred sheet */
[role=dialog].bg-background,[role=alertdialog].bg-background{
  background:color-mix(in srgb,var(--tp-bg-el) 97%,transparent);
  -webkit-backdrop-filter:blur(24px) saturate(170%);backdrop-filter:blur(24px) saturate(170%);
  border:1px solid var(--tp-glass-line);
  box-shadow:inset 0 1px 0 var(--tp-glass-hi),0 24px 60px -16px rgba(0,0,0,.55);
  border-radius:24px;
}
.fixed.inset-0.z-50.bg-black\/80{
  background:var(--tp-scrim);
  -webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);
}

/* menus, selects, popovers: tempo's island panel */
.bg-popover:not(.inset-0){
  background:color-mix(in srgb,var(--tp-bg-el) 93%,transparent);
  -webkit-backdrop-filter:blur(24px) saturate(170%);backdrop-filter:blur(24px) saturate(170%);
  border-color:var(--tp-glass-line);
  box-shadow:inset 0 1px 0 var(--tp-glass-hi),0 24px 48px -20px rgba(0,0,0,.6);
}
.bg-popover.p-1:not(.inset-0),[role=listbox].bg-popover,.max-h-96.bg-popover{border-radius:18px}
:is([role=option],[role=menuitem],[role=menuitemcheckbox],[role=menuitemradio]).rounded-sm{border-radius:11px}

/* the phone "Add" sheet */
.fixed.inset-0.z-40.bg-black{background:var(--tp-scrim)}
.rounded-t-3xl.border-t-4{
  background:color-mix(in srgb,var(--tp-bg-el) 92%,transparent);
  border-top:1px solid var(--tp-glass-line);
  box-shadow:inset 0 1px 0 var(--tp-glass-hi),0 -20px 40px -20px rgba(0,0,0,.5);
  border-radius:24px 24px 0 0;
}
.rounded-t-3xl.border-t-4 button.h-24{
  border-radius:18px;border-color:var(--tp-glass-line);
  box-shadow:inset 0 1px 0 var(--tp-glass-hi);
}

/* toasts */
ol li.group.pointer-events-auto:not(.destructive){
  background:color-mix(in srgb,var(--tp-bg-el) 90%,transparent);
  -webkit-backdrop-filter:blur(20px) saturate(180%);backdrop-filter:blur(20px) saturate(180%);
  border-color:var(--tp-glass-line);
  box-shadow:inset 0 1px 0 var(--tp-glass-hi),0 10px 30px -6px rgba(0,0,0,.5);
  border-radius:20px;
}
ol li.group.pointer-events-auto.destructive{border-radius:20px}

/* chart tooltips are styled inline by recharts, hence !important */
.recharts-default-tooltip{
  background:color-mix(in srgb,var(--tp-bg-el) 94%,transparent)!important;
  border:1px solid var(--tp-glass-line)!important;border-radius:12px!important;
  box-shadow:0 6px 18px -4px rgba(0,0,0,.4);color:var(--tp-label);
}
.recharts-cartesian-grid line{stroke:var(--tp-sep)}
/* progress-ring tracks (the diary's calorie ring): gray-200 vanishes on light glass */
svg :is(circle,path).text-gray-200{color:var(--tp-label-4)}
.recharts-cartesian-axis-tick-value{fill:var(--tp-label-3)}

/* ------------------------------------------------------------- controls -- */
/* buttons (shadcn's cva base always carries ring-offset-background) */
button.ring-offset-background.inline-flex{
  transition:background-color .14s,color .14s,border-color .14s,box-shadow .14s,opacity .14s,scale .56s var(--tp-ease-pop);
}
button.ring-offset-background.inline-flex:active{scale:.975;transition:background-color .14s,color .14s,scale 90ms var(--tp-ease-exit)}
/* primary: chalk. SparkyFitness hard-codes slate-800 for it in dark mode. */
button.bg-primary.text-primary-foreground{
  background-color:var(--tp-acc);color:var(--tp-on-acc);font-weight:600;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.5);
}
button.bg-primary.text-primary-foreground:hover{background-color:var(--tp-acc-2)}
/* outline: a glass chip */
button.border.border-input.bg-background{
  background-color:var(--tp-surface);border-color:var(--tp-glass-line);
  box-shadow:inset 0 1px 0 var(--tp-glass-hi);
}
button.border.border-input.bg-background:hover{background-color:var(--tp-surface-2)}
/* Buttons in a card's header are its side actions (the five per meal, "edit goals"...).
   As chalk they shout; tempo draws those as glass chips. */
.flex-col.space-y-1\.5 button.bg-primary.text-primary-foreground{
  background-color:var(--tp-surface-2);color:var(--tp-label);font-weight:500;
  box-shadow:inset 0 1px 0 var(--tp-glass-hi),inset 0 0 0 1px var(--tp-glass-line);
}
.flex-col.space-y-1\.5 button.bg-primary.text-primary-foreground:hover{background-color:var(--tp-surface-3)}
/* link buttons and links: gold, so they read apart from chalk text */
button.text-primary.underline-offset-4,a.text-primary{color:var(--tp-gold)}

/* text fields and select triggers. A field SparkyFitness makes transparent on purpose (the
   onboarding's big calorie number) stays transparent, and one that opts out of the focus
   ring (focus-visible:ring-0) gets no glow. */
:is(input,textarea).border-input,button[role=combobox].border-input{border-color:var(--tp-sep)}
:is(input,textarea).border-input:not(.bg-transparent),button[role=combobox].border-input{background-color:var(--tp-field)}
:is(input,textarea).border-input::placeholder{color:var(--tp-label-3)}
:is(input,textarea).border-input:not(.focus-visible\:ring-0):focus-visible,button[role=combobox].border-input:focus{
  border-color:transparent;
  box-shadow:0 0 0 1.5px var(--tp-gold),0 0 0 5px color-mix(in srgb,var(--tp-gold) 22%,transparent);
}

/* number fields with the unit inside them (UnitInput: "kg", "cm", "st"...): the browser's
   spinner sat on top of the unit. tempo's own steppers hide it too. */
input[type=number]:is(.pr-8,.pr-9){-moz-appearance:textfield;appearance:textfield}
input[type=number]:is(.pr-8,.pr-9)::-webkit-inner-spin-button,
input[type=number]:is(.pr-8,.pr-9)::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}

/* segmented tabs */
[role=tablist].bg-muted{background:var(--tp-track);border-radius:12px;padding:3px}
[role=tab].rounded-sm{border-radius:9px;transition:background-color .22s var(--tp-ease),color .14s,box-shadow .22s}
[role=tab][data-state=active].rounded-sm{
  background:var(--tp-seg-on);color:var(--tp-label);
  box-shadow:inset 0 1px 0 var(--tp-glass-hi),0 3px 8px rgba(0,0,0,.12),0 1px 1px rgba(0,0,0,.06);
}
[role=tab][data-state=inactive]{color:var(--tp-label-2)}

/* switch: tempo's track, a white knob that turns on-accent when on */
button[role=switch][data-state=unchecked]{background-color:var(--tp-track)}
button[role=switch][data-state=checked]{background-color:var(--tp-acc)}
button[role=switch] > span{
  background:#ffffff;box-shadow:0 3px 8px rgba(0,0,0,.15),0 1px 1px rgba(0,0,0,.16);
  transition:transform .22s var(--tp-ease),background-color .22s;
}
button[role=switch][data-state=checked] > span{background:var(--tp-on-acc)}
/* checkboxes are round in tempo */
button[role=checkbox].rounded-sm{border-radius:50%;border-color:var(--tp-label-4)}
button[role=checkbox][data-state=checked]{border-color:var(--tp-acc)}
/* slider knob */
[role=slider].rounded-full{
  background:#ffffff;border:none;
  box-shadow:0 4px 10px rgba(0,0,0,.22),0 1px 2px rgba(0,0,0,.16);
}

/* ------------------------------------------------------------ the type --- */
/* Iron & Chalk: condensed uppercase display for titles and big numerals */
img[src="/images/SparkyFitness.webp"] + h1{
  font-family:var(--tp-font-display);font-weight:900;font-size:30px;line-height:.9;
  letter-spacing:.005em;text-transform:uppercase;color:var(--tp-label);
}
@media (min-width:640px){img[src="/images/SparkyFitness.webp"] + h1{font-size:42px}}

/* ------------------------------------------------------------- pace -- */
/* SparkyFitness is "pace" here (tempo's partner: tempo.tempoandpace.online and
   pace.tempoandpace.online). theme/web/pace.js renames the text; this swaps the flame logo for
   pace's logo (icons/pace.svg, approved 14 Oct; the old placeholder is in icons/placeholder). */
img[src="/images/SparkyFitness.webp"]{content:url(/tempo-theme/icons/pace.svg?v=2);object-fit:contain}
img[src="/images/SparkyFitness.webp"] + h1{margin-left:10px}
img[src="/images/SparkyFitness.webp"]:has(+ h1){width:44px;height:44px;border-radius:11px;box-shadow:0 6px 16px -6px rgba(0,0,0,.45)}
@media (min-width:640px){img[src="/images/SparkyFitness.webp"]:has(+ h1){width:52px;height:52px;border-radius:13px}}
/* the header's GitHub-stars, Docs and Translate pills advertise SparkyFitness; the credit
   lives in the footer instead ("pace · powered by SparkyFitness v1.8.0") */
img[src="/images/SparkyFitness.webp"] + h1 ~ *{display:none}
/* sign-in: tempo's own sign-in layout (icon over a lowercase bold name over the tagline) */
div:has(> img[src="/images/SparkyFitness.webp"].h-10){flex-direction:column;gap:14px}
img[src="/images/SparkyFitness.webp"].h-10{width:84px;height:84px;margin:0;border-radius:20px;box-shadow:0 14px 30px -12px rgba(0,0,0,.6)}
div:has(> img[src="/images/SparkyFitness.webp"].h-10) > :not(img){
  font-family:var(--tp-font-body);font-weight:700;font-size:34px;line-height:1;letter-spacing:-.02em;
  text-transform:none;color:var(--tp-label);
}
/* ...and the credit under the sign-in card (CSS text, so pace.js leaves it alone) */
#root > .min-h-screen:has(img[src="/images/SparkyFitness.webp"].h-10){flex-direction:column;gap:18px}
#root > .min-h-screen:has(img[src="/images/SparkyFitness.webp"].h-10)::after{
  content:'pace · powered by SparkyFitness';font-size:12px;letter-spacing:.02em;color:var(--tp-label-3);
}

/* card titles (shadcn's CardTitle is an h3 with tracking-tight; some pages resize it) */
.font-semibold.leading-none.tracking-tight,h3.tracking-tight:is(.font-semibold,.font-bold){
  font-family:var(--tp-font-display);font-weight:800;letter-spacing:.012em;
}
h3.tracking-tight:is(.text-sm,.text-base){font-size:20px;line-height:1.1}
/* big numbers and sheet titles */
:is(.text-2xl,.text-3xl,.text-4xl,.text-5xl).font-bold{
  font-family:var(--tp-font-display);font-weight:900;letter-spacing:.01em;
}
.rounded-t-3xl.border-t-4 h2,[role=dialog] h2.font-semibold{
  font-family:var(--tp-font-display);font-weight:900;letter-spacing:.01em;text-transform:uppercase;
}
[role=dialog] h2.font-semibold{font-size:26px;line-height:1}
/* "— OR SIGN IN WITH —" dividers mask their line with a solid label background,
   which shows as a box on glass. Draw the line either side of the label instead. */
div.relative:has(> .absolute.inset-0 > span.w-full.border-t) > .absolute.inset-0{display:none}
div.relative:has(> .absolute.inset-0 > span.w-full.border-t) > .relative.justify-center{align-items:center;gap:12px}
div.relative:has(> .absolute.inset-0 > span.w-full.border-t) > .relative.justify-center::before,
div.relative:has(> .absolute.inset-0 > span.w-full.border-t) > .relative.justify-center::after{
  content:'';flex:1;height:1px;background:var(--tp-sep);
}
div.relative:has(> .absolute.inset-0 > span.w-full.border-t) > .relative.justify-center > span{
  background:transparent;padding:0;font-size:11px;font-weight:600;letter-spacing:.16em;color:var(--tp-label-3);
}
/* form labels: tempo's small tracked section label */
label.leading-none.font-medium:not(.text-base):not(.text-lg){
  font-size:11.5px;font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:var(--tp-label-2);
}

/* ---------------------------------------------------------- onboarding -- */
/* The new-user onboarding and its save-preset dialog are the one place SparkyFitness spends
   its brand green: progress bar, selected answers, unit toggles, the "No" button, the daily
   budget, the meal-split total, the API-key links. Both carry an inline green --color-ring,
   and nothing else in v1.8.0 does, so that scopes it: inside, green is tempo's gold. Green
   used as a data colour elsewhere (kcal eaten and so on) is left alone. */
[style*="--color-ring"]{
  --color-ring:var(--tp-gold)!important;      /* !important: beats the inline value */
  --color-green-400:var(--tp-gold);
  --color-green-500:var(--tp-gold);
  --color-green-600:var(--tp-gold);
  --color-green-700:var(--tp-gold-2);
}
/* solid gold carries dark text on dark, white on light (white on #ffd60a is unreadable) */
[style*="--color-ring"] :is(.bg-green-500,.bg-green-600){color:var(--tp-on-gold)}
[style*="--color-ring"] .bg-green-500 svg{color:var(--tp-on-gold)}
/* answer cards: tempo's rounder glass, gold edge when chosen */
[style*="--color-ring"] button.border-2.bg-card{border-radius:18px;box-shadow:inset 0 1px 0 var(--tp-glass-hi)}
/* the daily budget: tempo's big numerals, centred, no spinner pushing it left */
[style*="--color-ring"] input[type=number].text-6xl{
  font-family:var(--tp-font-display);font-weight:900;letter-spacing:.01em;text-align:center;
  -moz-appearance:textfield;appearance:textfield;
}
[style*="--color-ring"] input[type=number].text-6xl::-webkit-inner-spin-button,
[style*="--color-ring"] input[type=number].text-6xl::-webkit-outer-spin-button{-webkit-appearance:none;margin:0}

/* -------------------------------------------------------------- the nav -- */
/* tempo's new dock (Nov 2026, from tempo's live build): a floating glass pill of tabs where
   the current tab grows into a capsule with its name, and on phones a separate round chalk
   action button beside it (tempo's "start a workout"; here SparkyFitness's Add). Same 64px
   height, glass, spring and shadows as tempo. Whole-pixel sizes and no resting transforms,
   so edges and icons stay sharp. pace.js names the current tab (--tp-tab). */
:root{
  --tp-dock-h:64px;
  --tp-dock-b:max(12px,calc(env(safe-area-inset-bottom,0px) - 10px));
  --tp-dock-glass:rgba(250,250,252,.62);
  --tp-dock-on:rgba(255,255,255,.95);
  --tp-dock-spring:cubic-bezier(.34,1.25,.64,1);
  --tp-dock-shadow:inset 0 1px 0 var(--tp-glass-hi),0 16px 36px -20px rgba(30,30,40,.45);
}
:root.dark{
  --tp-dock-glass:rgba(30,30,34,.55);
  --tp-dock-on:rgba(255,255,255,.14);
  --tp-dock-shadow:inset 0 1px 0 var(--tp-glass-hi),0 20px 40px -16px rgba(0,0,0,.8);
}
/* the page fades out under the dock (tempo's .dock-fade) */
body:has(nav.apple-safe-area.fixed)::after,body:has(nav.relative.border.sm\:grid)::after{
  content:'';position:fixed;left:0;right:0;bottom:0;z-index:45;pointer-events:none;
  height:calc(var(--tp-dock-b) + var(--tp-dock-h) + 56px);
  background:linear-gradient(to top,var(--tp-bg) 0,color-mix(in srgb,var(--tp-bg) 86%,transparent) calc(var(--tp-dock-b) + 20px),transparent 100%);
}

/* phone */
nav.apple-safe-area.fixed.bottom-0{
  left:16px;right:16px;width:auto;max-width:420px;margin:0 auto;
  bottom:var(--tp-dock-b);height:var(--tp-dock-h);padding:0;
  border:0;background:transparent;box-shadow:none;overflow:visible;
}
nav.apple-safe-area.fixed.bottom-0 > div.h-14{
  display:flex;align-items:center;height:var(--tp-dock-h);padding:0 0 0 5px;isolation:isolate;
}
/* the pill, drawn behind the tabs and stopping short of the round button */
nav.apple-safe-area.fixed.bottom-0 > div.h-14::before{
  content:'';position:absolute;z-index:-1;top:0;bottom:0;left:0;right:calc(var(--tp-dock-h) + 12px);
  border-radius:calc(var(--tp-dock-h) / 2);border:1px solid var(--tp-glass-line);
  background:var(--tp-dock-glass);
  -webkit-backdrop-filter:blur(26px) saturate(170%);backdrop-filter:blur(26px) saturate(170%);
  box-shadow:var(--tp-dock-shadow);
}
nav.apple-safe-area.fixed.bottom-0 > div.h-14:not(:has(svg:is(.lucide-plus,.lucide-x))){padding-right:5px}
nav.apple-safe-area.fixed.bottom-0 > div.h-14:not(:has(svg:is(.lucide-plus,.lucide-x)))::before{right:0}
/* past/future dates keep their tint and edge, now in the pill's shape */
nav.apple-safe-area.fixed.bottom-0 > div.absolute.inset-0{right:calc(var(--tp-dock-h) + 12px);border-radius:calc(var(--tp-dock-h) / 2)}
nav.apple-safe-area.fixed.bottom-0[class*="border-date-past"] > div.h-14::before{border-color:hsl(var(--date-past) / .8)}
nav.apple-safe-area.fixed.bottom-0[class*="border-date-future"] > div.h-14::before{border-color:hsl(var(--date-future) / .6)}

/* tabs, shared by phone and desktop */
nav.apple-safe-area.fixed.bottom-0 button,nav.relative.border:is(.sm\:grid) > button{
  flex:1 1 0;min-width:0;height:calc(var(--tp-dock-h) - 10px);margin:0;padding:0;
  border-radius:calc((var(--tp-dock-h) - 10px) / 2);
  display:flex;flex-direction:row;align-items:center;justify-content:center;gap:0;
  color:var(--tp-label-2);background:transparent;box-shadow:none;
  font-family:var(--tp-font-body);font-size:11px;font-weight:600;letter-spacing:.07em;text-transform:uppercase;line-height:1;
  -webkit-touch-callout:none;
  transition:flex-grow .5s var(--tp-dock-spring),gap .4s var(--tp-ease),color .22s var(--tp-ease),background-color .22s var(--tp-ease),box-shadow .22s var(--tp-ease),scale .56s var(--tp-ease-pop);
}
nav.apple-safe-area.fixed.bottom-0 button:hover,nav.relative.border:is(.sm\:grid) > button:hover{background:transparent;color:var(--tp-label)}
nav.apple-safe-area.fixed.bottom-0 button:active,nav.relative.border:is(.sm\:grid) > button:active{scale:.92;transition:flex-grow .5s var(--tp-dock-spring),scale 90ms var(--tp-ease-exit)}
nav.apple-safe-area.fixed.bottom-0 button svg,nav.relative.border:is(.sm\:grid) > button svg{width:23px;height:23px;flex:none;stroke-width:1.7}
/* the current tab: a capsule that grows to show its name */
nav.apple-safe-area.fixed.bottom-0 button.text-primary,nav.relative.border:is(.sm\:grid) > button.bg-background{
  flex-grow:2.4;gap:7px;color:var(--tp-label);background:var(--tp-dock-on);
  box-shadow:inset 0 1px 0 color-mix(in srgb,var(--tp-glass-hi) 80%,transparent);
}
:root:not(.dark) nav.apple-safe-area.fixed.bottom-0 button.text-primary,
:root:not(.dark) nav.relative.border:is(.sm\:grid) > button.bg-background{box-shadow:inset 0 1px 0 #fff,0 4px 12px -6px rgba(30,30,40,.35)}
nav.apple-safe-area.fixed.bottom-0 button.text-primary svg,nav.relative.border:is(.sm\:grid) > button.bg-background svg{stroke-width:2}
/* the name: phone tabs have none in the markup, so pace.js supplies it */
nav.apple-safe-area.fixed.bottom-0 button.text-primary::after{
  content:var(--tp-tab,'');display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:76px;
}
nav.relative.border:is(.sm\:grid) > button > span{
  display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:0;opacity:0;
  transition:max-width .5s var(--tp-dock-spring),opacity .25s var(--tp-ease-exit);
}
nav.relative.border:is(.sm\:grid) > button.bg-background > span{max-width:120px;opacity:1;transition:max-width .5s var(--tp-dock-spring),opacity .3s var(--tp-ease-exit) 80ms}

/* Add: tempo's round chalk action button, beside the pill */
nav.apple-safe-area.fixed.bottom-0 button:has(> svg:is(.lucide-plus,.lucide-x)){
  order:99;flex:none;width:var(--tp-dock-h);height:var(--tp-dock-h);margin-left:17px;
  border-radius:calc(var(--tp-dock-h) / 2);color:var(--tp-on-acc);
  background:linear-gradient(180deg,color-mix(in srgb,var(--tp-acc) 82%,#fff) 0%,var(--tp-acc-2) 100%);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.6),inset 0 -2px 5px rgba(0,0,0,.16),0 18px 34px -14px rgba(0,0,0,.8);
}
nav.apple-safe-area.fixed.bottom-0 button:has(> svg:is(.lucide-plus,.lucide-x)):hover{color:var(--tp-on-acc);background:linear-gradient(180deg,color-mix(in srgb,var(--tp-acc) 82%,#fff) 0%,var(--tp-acc-2) 100%)}
nav.apple-safe-area.fixed.bottom-0 button:has(> svg:is(.lucide-plus,.lucide-x)) svg{width:26px;height:26px;stroke-width:2.1}
nav.apple-safe-area.fixed.bottom-0 button:has(> svg:is(.lucide-plus,.lucide-x))::after{content:none}

/* desktop: the tab row leaves the top of the page and becomes the same floating dock */
@media (min-width:640px){
  nav.relative.border:is(.sm\:grid){
    position:fixed;z-index:50;left:16px;right:16px;width:auto;max-width:680px;margin:0 auto;
    bottom:var(--tp-dock-b);height:var(--tp-dock-h);
    display:flex;align-items:center;gap:0;padding:0 5px;
    border:1px solid var(--tp-glass-line);border-radius:calc(var(--tp-dock-h) / 2);
    background:var(--tp-dock-glass);
    -webkit-backdrop-filter:blur(26px) saturate(170%);backdrop-filter:blur(26px) saturate(170%);
    box-shadow:var(--tp-dock-shadow);
  }
  nav.relative.border:is(.sm\:grid)[class*="border-date-past"]{border-color:hsl(var(--date-past) / .8)}
  nav.relative.border:is(.sm\:grid)[class*="border-date-future"]{border-color:hsl(var(--date-future) / .6)}
}
/* room for the dock under the page */
#root .pb-16.sm\:pb-0{padding-bottom:calc(var(--tp-dock-h) + var(--tp-dock-b) + 40px)}
#root footer{padding-bottom:calc(var(--tp-dock-h) + var(--tp-dock-b) + 24px)}
@media (max-width:639px){#root .container.px-2{padding-left:12px;padding-right:12px}}

/* -------------------------------------------------------------- motion --- */
/* Blocks rise in as a page assembles (tempo's "rise"). `translate`/`scale`, not
   `transform`, and fill "backwards" only, so nothing is left overriding the
   inline transforms the dashboard's drag-and-drop puts on cards. */
@media (prefers-reduced-motion:no-preference){
  @keyframes tp-rise{from{opacity:0;translate:0 14px;scale:.985}}
  #root :is(.rounded-lg,.rounded-xl,.rounded-2xl).border.bg-card{animation:tp-rise .52s var(--tp-spring) backwards}
  #root .bg-card :is(.rounded-lg,.rounded-xl,.rounded-2xl).border.bg-card{animation:none}
}
@media (prefers-reduced-motion:reduce){
  button.ring-offset-background.inline-flex:active,nav.apple-safe-area.fixed.bottom-0 button:active{scale:1}
}

/* ======================================================= UI pass, 20 Nov 2026 ============
   Found on real signed-in screens (the local preview copy, ../preview). */

/* --- Section rows (Settings, Admin, and every other accordion) ---------------------------
   SparkyFitness stacks each section's icon above its title and lets the description wrap
   centred. tempo lists sections as rows: icon tile, title, one-line description, chevron.
   The title is a bare text node, so grid auto-placement puts it beside the icon. */
h3.flex > button[data-radix-collection-item]{padding:14px 16px;gap:12px;text-align:left;text-decoration:none}
h3.flex > button[data-radix-collection-item] > div.flex.flex-col.items-start:has(> svg:first-child){
  display:grid;grid-template-columns:38px minmax(0,1fr);column-gap:12px;row-gap:1px;align-items:center;
  text-align:left;font:600 16px/1.25 var(--tp-font-body);letter-spacing:-.01em;color:var(--tp-label);min-width:0}
h3.flex > button[data-radix-collection-item] > div.flex.flex-col.items-start > svg:first-child{
  grid-column:1;grid-row:1 / span 2;width:38px;height:38px;padding:9px;border-radius:12px;
  background:var(--tp-surface-2);box-shadow:inset 0 1px 0 var(--tp-glass-hi);color:var(--tp-label)}
h3.flex > button[data-radix-collection-item] > div.flex.flex-col.items-start > span{
  grid-column:2;font:400 13px/1.35 var(--tp-font-body);letter-spacing:0;color:var(--tp-label-2);
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:100%}
h3.flex > button[data-radix-collection-item] > svg:last-child{opacity:.45}
div[data-orientation][data-state].border.rounded-lg{border-radius:20px}

/* --- Admin: what Patrick uses first; the rest behind "Show advanced" ---------------------
   The Admin page is the only column holding both User Management (user-cog) and Global Data
   Providers (database). Order: users, login methods, backups; then the toggle (pace.js adds
   it); then OIDC (lock), global AI (globe) and data providers, hidden until it's switched on. */
div.flex.flex-col.space-y-4:has(> * h3 svg.lucide-user-cog):has(> * h3 svg.lucide-database){display:flex;gap:12px}
div.flex.flex-col.space-y-4:has(> * h3 svg.lucide-user-cog):has(> * h3 svg.lucide-database) > *{margin:0!important}
div.flex.flex-col.space-y-4:has(> * h3 svg.lucide-database) > :has(h3 svg.lucide-user-cog){order:1}
div.flex.flex-col.space-y-4:has(> * h3 svg.lucide-database) > :has(h3 svg.lucide-info){order:2}
div.flex.flex-col.space-y-4:has(> * h3 svg.lucide-database) > :has(h3 svg.lucide-shield){order:3}
div.flex.flex-col.space-y-4:has(> * h3 svg.lucide-database) > .tp-adv{order:4}
div.flex.flex-col.space-y-4:has(> * h3 svg.lucide-database) > :has(h3 svg:is(.lucide-lock,.lucide-globe,.lucide-database)){order:5}
html:not(.tp-admin-adv) div.flex.flex-col.space-y-4:has(> * h3 svg.lucide-database) > :has(h3 svg:is(.lucide-lock,.lucide-globe,.lucide-database)){display:none}
.tp-adv{align-self:center;display:inline-flex;align-items:center;gap:8px;margin:6px 0 2px!important;padding:9px 16px;border:0;border-radius:999px;
  background:var(--tp-surface);box-shadow:inset 0 1px 0 var(--tp-glass-hi);color:var(--tp-label-2);font:600 13px/1 var(--tp-font-body);cursor:pointer}
.tp-adv::after{content:'';width:7px;height:7px;border:solid currentColor;border-width:0 1.6px 1.6px 0;transform:translateY(-2px) rotate(45deg);transition:transform .25s var(--tp-ease)}
html.tp-admin-adv .tp-adv::after{transform:translateY(2px) rotate(-135deg)}

/* --- Footer: keep the credit line, drop the GitHub stars / Docs / Translate badges ------- */
#root footer div.flex.flex-wrap.justify-center.gap-2:has(> a[href*="github.com"]){display:none}

/* --- Diary header: the date is the control; "Customize layout" becomes an icon ----------- */
#root div.flex.flex-col.gap-4.pb-2.border-b:has(button > svg.lucide-pencil){border-bottom:0;padding-bottom:0}
#root div.flex.flex-col.gap-4.pb-2.border-b:has(button > svg.lucide-pencil) > div.flex.min-w-0.flex-wrap{flex-wrap:nowrap;flex-direction:row-reverse;width:100%}
#root div.flex.flex-col.gap-4.pb-2.border-b:has(button > svg.lucide-pencil) > div.flex.min-w-0.flex-wrap > *{flex:1 1 auto;min-width:0}
#root div.flex.flex-col.gap-4.pb-2.border-b:has(button > svg.lucide-pencil) > div.flex.min-w-0.flex-wrap > :has(> * > button > svg.lucide-pencil){flex:0 0 auto}
#root button:has(> svg.lucide-pencil.mr-2){font-size:0;gap:0;width:48px;height:48px;padding:0;border-radius:999px}
#root button:has(> svg.lucide-pencil.mr-2) > svg{margin:0;width:18px;height:18px}
#root div.relative.flex.items-center.rounded-full.overflow-hidden.h-12:has(svg.lucide-chevron-left){width:100%;justify-content:space-between}

/* --- Colours: tempo's chalk + gold instead of SparkyFitness's rainbow ---------------------
   Numbers read in the label colour; the one accent is gold. Progress bars get tempo's dim
   track (bg-gray-200 drew them solid white in dark mode) and a gold fill. */
#root .grid.grid-cols-3 > div > div:is(.text-green-600,.text-orange-600){color:var(--tp-label)}
#root .grid.grid-cols-3 > div > div:is(.text-green-600,.text-orange-600) > svg{color:var(--tp-gold)}
#root .bg-card h3 svg:is(.text-green-500,.text-green-600,.text-teal-500,.text-teal-600,.text-blue-500,.text-blue-600,.text-emerald-500){color:var(--tp-gold)}
#root .text-center:has(> div[title]) > div:first-child:is([class*="text-blue-"],[class*="text-orange-"],[class*="text-yellow-"],[class*="text-green-"],[class*="text-pink-"],[class*="text-purple-"],[class*="text-red-"],[class*="text-amber-"]){color:var(--tp-label)}
#root .w-full.bg-gray-200.rounded-full{background:var(--tp-track)}
#root .w-full.bg-gray-200.rounded-full > div[style*="background-color"]{background-color:var(--tp-gold)!important}
#root .text-center.p-2.bg-blue-50.rounded-lg{background:var(--tp-surface-2)!important}
#root .text-center.p-2.bg-blue-50.rounded-lg > :is(.text-blue-700,.text-blue-600){color:var(--tp-label-2)}
#root .text-center.p-2.bg-blue-50.rounded-lg > .text-blue-700{color:var(--tp-label)}

/* --- Meal cards: the five actions as round glass buttons, lined up under the title -------- */
#root .flex.flex-col.space-y-1\.5.p-6 > .flex.flex-col.justify-between:has(> .flex.flex-wrap > button[title]) > .flex.flex-wrap{justify-content:flex-start;gap:8px}
#root .flex.flex-col.space-y-1\.5.p-6 .flex.flex-wrap > button[title].bg-primary{
  width:40px;height:40px;padding:0;border-radius:999px;background:var(--tp-surface-2);color:var(--tp-label);
  box-shadow:inset 0 1px 0 var(--tp-glass-hi);border:0}
#root .flex.flex-col.space-y-1\.5.p-6 .flex.flex-wrap > button[title].bg-primary:hover{background:var(--tp-surface-3)}
/* a section with no description: the title centres on the icon */
h3.flex > button[data-radix-collection-item] > div.flex.flex-col.items-start:not(:has(> span)) > svg:first-child{grid-row:1}
div.flex.flex-col.space-y-4:has(> * h3 svg.lucide-database) div[data-orientation][data-state].border.rounded-lg.mb-4{margin-bottom:0}

/* Diary, second look */
/* the date pill starts at the card edge: drop the empty spacer before it */
#root div.grid-cols-none.flex.items-center.gap-2 > div.flex.justify-end:empty{display:none}
/* card-header icons in the gold accent, not teal / green / blue */
#root .bg-card .flex.items-center.gap-2 > svg:is(.text-teal-500,.text-teal-600,.text-green-500,.text-green-600,.text-blue-500,.text-blue-600,.text-emerald-500,.text-purple-500,.text-orange-500){color:var(--tp-gold)}
/* Nutrition Summary: title on one line, its three actions as round icon buttons */
#root .flex.flex-col.space-y-1\.5.p-6 > .flex.items-center.justify-between:has(> .flex.items-center.gap-2 > button.bg-primary){gap:10px}
#root .flex.flex-col.space-y-1\.5.p-6 > .flex.items-center.justify-between > h3{white-space:nowrap}
#root .flex.flex-col.space-y-1\.5.p-6 > .flex.items-center.justify-between > .flex.items-center.gap-2 > button.bg-primary{
  font-size:0;gap:0;width:40px;height:40px;padding:0;border-radius:999px;border:0;
  background:var(--tp-surface-2);color:var(--tp-label);box-shadow:inset 0 1px 0 var(--tp-glass-hi)}
#root .flex.flex-col.space-y-1\.5.p-6 > .flex.items-center.justify-between > .flex.items-center.gap-2 > button.bg-primary > svg{margin:0}
/* Water: chalk bottle, gold water (it was all Tailwind blue) */
#root .bg-card:has(h3 > svg.lucide-droplet) :is(.border-blue-400){border-color:var(--tp-label-3)}
#root .bg-card:has(h3 > svg.lucide-droplet) .bg-blue-400{background:var(--tp-label-3)}
#root .bg-card:has(h3 > svg.lucide-droplet) .relative.w-16.h-32{background:var(--tp-surface)}
#root .bg-card:has(h3 > svg.lucide-droplet) .bg-gray-100{background:var(--tp-surface-2)}
#root .bg-card:has(h3 > svg.lucide-droplet) .bg-gradient-to-t{background:linear-gradient(0deg,var(--tp-gold-2),var(--tp-gold))}
#root .bg-card:has(h3 > svg.lucide-droplet) .bg-blue-200{background:var(--tp-label-4)}
#root .bg-card:has(h3 > svg.lucide-droplet) :is(.text-blue-600,.text-blue-400){color:var(--tp-gold)}
#root .bg-card:has(h3 > svg.lucide-droplet) .text-orange-400,#root .bg-card:has(h3 > svg.lucide-droplet) .text-yellow-400{color:var(--tp-gold)}
/* an empty meal is one quiet line, not a tall blank panel */
#root .bg-card > .p-6.pt-0 > .text-center.py-8.text-gray-500{padding:4px 0 2px;text-align:left;font-size:14px;color:var(--tp-label-3)}
/* Settings and Reports: their section tabs in one row that scrolls sideways, not ragged rows */
@media (max-width:767px){
  :is(#root div.flex.flex-wrap.items-center.justify-center.gap-2,#root div.flex.flex-wrap.items-center.justify-center.gap-1.flex-1):has(> button:nth-child(4) > svg){
    flex-wrap:nowrap;justify-content:flex-start;overflow-x:auto;scrollbar-width:none;
    margin-left:-16px;margin-right:-16px;padding:2px 16px;scroll-padding:16px;-webkit-mask:linear-gradient(90deg,transparent,#000 16px,#000 calc(100% - 16px),transparent)}
  :is(#root div.flex.flex-wrap.items-center.justify-center.gap-2,#root div.flex.flex-wrap.items-center.justify-center.gap-1.flex-1):has(> button:nth-child(4) > svg)::-webkit-scrollbar{display:none}
  :is(#root div.flex.flex-wrap.items-center.justify-center.gap-2,#root div.flex.flex-wrap.items-center.justify-center.gap-1.flex-1):has(> button:nth-child(4) > svg) > button{flex:0 0 auto}
}
@media (min-width:640px){
  #root div.flex.flex-col.gap-4.pb-2.border-b:has(button > svg.lucide-pencil) > div.flex.min-w-0.flex-wrap{justify-content:flex-start}
  #root div.flex.flex-col.gap-4.pb-2.border-b:has(button > svg.lucide-pencil) > div.flex.min-w-0.flex-wrap > *{flex:0 1 auto}
  #root div.relative.flex.items-center.rounded-full.overflow-hidden.h-12:has(svg.lucide-chevron-left){width:auto;min-width:300px}
}
#root div.flex.flex-wrap.items-center.justify-center.gap-1.flex-1:has(> button:nth-child(4) > svg){max-width:calc(100% + 32px);align-self:stretch}
#root .bg-card svg:is(.text-purple-500,.text-purple-600,.text-indigo-500,.text-violet-500):not(.recharts-surface){color:var(--tp-gold)}
/* charts drawn in Tailwind's default blue take the gold accent (multi-colour charts keep theirs) */
#root .recharts-line-curve:is([stroke="#3b82f6"],[stroke="#2563eb"],[stroke="#8884d8"]){stroke:var(--tp-gold)}
#root .recharts-bar-rectangle path:is([fill="#3b82f6"],[fill="#8884d8"]){fill:var(--tp-gold)}

/* ===================================================== Option C, 22 Nov 2026 =============
   Patrick picked "option C, tempo family" from the mockups: pace reads as tempo's sibling.
   tempo's header (a big PACE wordmark with today's date under it, a round button), tempo's
   small tracked section labels instead of poster-font card titles, the condensed face kept
   for the wordmark and big numbers only, a third less padding, and the calorie ring turned
   into tempo's big number over a thin gold bar. Gold stays pace's one accent. */

/* --- header: the wordmark, with the date under it ----------------------------------------- */
#root .container > div.flex.justify-between.items-center.mb-6{align-items:flex-start;margin-bottom:18px;padding-top:6px}
#root .container > div.flex.justify-between.items-center.mb-6 img[src="/images/SparkyFitness.webp"]{display:none}
#root img[src="/images/SparkyFitness.webp"] + h1{
  margin-left:0;font-size:52px;line-height:.86;letter-spacing:.005em}
#root img[src="/images/SparkyFitness.webp"] + h1::after{
  content:var(--tp-today,'');display:block;margin-top:7px;
  font:400 15px/1.2 var(--tp-font-body);letter-spacing:-.005em;text-transform:none;color:var(--tp-label-2)}
@media (min-width:640px){#root img[src="/images/SparkyFitness.webp"] + h1{font-size:60px}}
/* its buttons: tempo's round glass buttons (sign out keeps its words on desktop) */
#root .container > div.flex.justify-between.items-center.mb-6 button.border-input{
  height:44px;min-width:44px;border-radius:999px;padding:0 12px}
#root .container > div.flex.justify-between.items-center.mb-6 button.border-input svg{width:19px;height:19px}

/* --- card titles: tempo's small tracked label, not a poster headline ----------------------- */
#root :is(.font-semibold.leading-none.tracking-tight,h3.tracking-tight:is(.font-semibold,.font-bold)){
  font:600 12px/1.2 var(--tp-font-body);letter-spacing:.16em;text-transform:uppercase;color:var(--tp-label-2)}
#root h3.tracking-tight :is(span,a){color:inherit;font:inherit;letter-spacing:inherit}
#root h3.tracking-tight > svg:first-child{display:none}
#root h3.tracking-tight.space-x-2 > * + *{margin-left:0}

/* --- density: a third less padding ------------------------------------------------------ */
#root .bg-card > .flex.flex-col.space-y-1\.5.p-6{padding:16px 18px 12px}
#root .bg-card > .p-6.pt-0{padding:0 18px 16px}
#root .bg-card > .p-6:not(.pt-0):not(.flex){padding:16px 18px}
#root .container > div.flex.justify-between + *{margin-top:0}
@media (max-width:639px){#root .container.px-2{padding-left:14px;padding-right:14px;padding-top:10px}}
#root .italic{font-style:normal}

/* --- Daily Energy Goal: tempo's big number over a thin gold bar ---------------------------- */
#root .flex.items-center.justify-center:has(> .relative.w-32.h-32 > svg.-rotate-90){justify-content:flex-start}
#root .relative.w-32.h-32:has(> svg.-rotate-90){width:auto;height:auto}
#root .relative.w-32.h-32 > svg.-rotate-90{display:none}
#root .relative.w-32.h-32 > svg.-rotate-90 + .absolute.inset-0{
  position:static;flex-direction:row;align-items:baseline;justify-content:flex-start;gap:9px}
#root .relative.w-32.h-32 > svg.-rotate-90 + .absolute.inset-0 > .text-xl.font-bold{
  font:900 64px/.85 var(--tp-font-display);letter-spacing:.01em;color:var(--tp-label)}
#root .relative.w-32.h-32 > svg.-rotate-90 + .absolute.inset-0 > .text-xs{
  font:600 12px/1 var(--tp-font-body);letter-spacing:.14em;text-transform:uppercase;color:var(--tp-label-2)}
/* eaten / burned / goal: left-aligned condensed numerals, no icons */
#root .grid.grid-cols-3.text-center:has(svg.lucide-flame){text-align:left;gap:0}
#root .grid.grid-cols-3.text-center:has(svg.lucide-flame) > div > div:first-child{
  justify-content:flex-start;font:900 28px/1 var(--tp-font-display);letter-spacing:.01em;color:var(--tp-label)}
#root .grid.grid-cols-3.text-center:has(svg.lucide-flame) > div > div:first-child > svg{display:none}
#root .grid.grid-cols-3.text-center:has(svg.lucide-flame) > div > div.text-xs{
  font-size:11px;font-weight:600;letter-spacing:.12em;text-transform:uppercase;color:var(--tp-label-2)}
/* the two big tinted boxes repeat what the numbers already say */
#root .space-y-4:has(svg.lucide-flame) > .text-center.p-2.rounded-lg{display:none}
/* daily progress: tempo's dim track with a gold fill */
#root .space-y-4:has(svg.lucide-flame) [role=progressbar]{height:6px;background:var(--tp-track)}
#root .space-y-4:has(svg.lucide-flame) [role=progressbar] > div{background:var(--tp-gold)}
#root .space-y-4:has(svg.lucide-flame) > .space-y-1 > .flex.justify-between.text-xs{
  font-size:11px;font-weight:600;letter-spacing:.14em;text-transform:uppercase;color:var(--tp-label-2)}
#root .space-y-4:has(svg.lucide-flame) > .pt-3.border-t button{font-weight:500;font-size:13px}

/* --- Check-In's section tabs: one sideways-scrolling row on phones, like Settings ----------- */
@media (max-width:767px){
  #root div.flex.flex-wrap.items-center.justify-center.gap-1:has(> button:nth-child(4) > svg){
    flex-wrap:nowrap;justify-content:flex-start;overflow-x:auto;scrollbar-width:none;
    margin-left:-14px;margin-right:-14px;padding:2px 14px;-webkit-mask:linear-gradient(90deg,transparent,#000 14px,#000 calc(100% - 14px),transparent)}
  #root div.flex.flex-wrap.items-center.justify-center.gap-1:has(> button:nth-child(4) > svg)::-webkit-scrollbar{display:none}
  #root div.flex.flex-wrap.items-center.justify-center.gap-1:has(> button:nth-child(4) > svg) > button{flex:0 0 auto}
}

/* card headers with actions: every action a round icon button, and a long title ellipsises
   instead of pushing them off the card (Nutrition Summary's "Edit" was cut off) */
#root .flex.flex-col.space-y-1\.5.p-6 > .flex.items-center.justify-between > h3{min-width:0;overflow:hidden;text-overflow:ellipsis}
#root .flex.flex-col.space-y-1\.5.p-6 > .flex.items-center.justify-between > .flex.items-center.gap-2{flex:none}
#root .flex.flex-col.space-y-1\.5.p-6 > .flex.items-center.justify-between > .flex.items-center.gap-2 > button.border-input{
  font-size:0;gap:0;width:40px;height:40px;padding:0;border-radius:999px}
#root .flex.flex-col.space-y-1\.5.p-6 > .flex.items-center.justify-between > .flex.items-center.gap-2 > button.border-input > svg{margin:0}

/* Foods and Meals: search on its own line, then both filters and the actions on one row */
#root .flex.flex-row.flex-wrap.items-center.gap-4:has(> .relative.flex-1 > svg.lucide-search){gap:8px}
#root .flex.flex-row.flex-wrap.items-center.gap-4:has(> .relative.flex-1 > svg.lucide-search) > .relative.flex-1{flex-basis:100%}
#root .flex.flex-row.flex-wrap.items-center.gap-4:has(> .relative.flex-1 > svg.lucide-search) > div > svg.lucide-funnel{display:none}
#root .flex.flex-row.flex-wrap.items-center.gap-4:has(> .relative.flex-1 > svg.lucide-search) button[role=combobox]{width:auto;min-width:0;gap:8px}
/* empty lists: a quiet line, not a tall dashed box */
#root .bg-card .border-dashed{border:0;min-height:0;padding:10px 0;color:var(--tp-label-3)}
