/* ==========================================================================
   mannyOS work canvas — system.css
   One source for tokens and shared components. Loaded by every page (index.html,
   project pages). Page files only add their own layout; they never redefine a token
   or restyle a component listed here.
   Dark is the default; html.light swaps the palette (a class, because the artifact
   viewer sets data-theme on its own).
   ========================================================================== */

/* ---------- 1. Tokens ---------- */
:root{
  color-scheme:dark;

  /* color: ground, surfaces, lines */
  --canvas:#1E1E1E;            /* page ground */
  --panel:#2C2C2C;             /* surface: panels, chips, toolbars */
  --line:#3D3D3D;              /* hairlines and outlines */
  --hover:#383838;             /* hover fill on neutral controls */
  --dot:rgba(255,255,255,.10); /* canvas dot grid */
  --ph:#2C2C2C;--ph-line:#3A3A3A;--ph-tx:#7A7A7A;  /* placeholder frames */

  /* color: ink */
  --tx:#FFFFFF;                /* primary text */
  --tx-2:#B3B3B3;              /* secondary text */
  --tx-3:#8A8A8A;              /* labels, captions, meta */

  /* color: accent (chili marks one thing per view: the primary action, the selection, the current item) */
  --brand:#EE3824;             /* chili, the personal brand value (logo ground) */
  --sel:#F2533F;               /* chili for selection and accents on this ground */
  --cta:#DC3420;               /* chili deep enough for white button text to pass AA */
  --on-sel:#FFFFFF;            /* text on chili */
  --btn-line:#5A5A5A;          /* secondary button outline */
  --tab:color-mix(in oklab,var(--tx) 16%,var(--canvas));  /* section tab fill */

  /* color: people and states */
  --chai:#F5A524;              /* Chai's multiplayer color */
  --on-light:#1E1E1E;          /* dark text on light fills (amber label, grey bar segment) */
  --online:#2BB673;            /* presence dot */
  --st-rev:#F5A524;--st-chg:#F2533F;--st-ok:#3DBE7A;--st-redo:#6AA7FF;  /* review statuses */

  /* elevation */
  --sh-float:0 6px 18px rgba(0,0,0,.35);--sh-up:0 -6px 18px rgba(0,0,0,.35);   /* floating controls: toolbar, round buttons, pills */
  --sh-pop:0 18px 40px rgba(0,0,0,.4);     /* popovers and menus */

  /* type: families */
  --d-font:"Big Shoulders Display","Arial Narrow",Arial,sans-serif;  /* display titles, 900 */
  --t-font:"Manrope","Helvetica Neue",Arial,sans-serif;--m-font:ui-monospace,SFMono-Regular,Menlo,Consolas,monospace;              /* everything you read */
  --f-ui:"Inter","Helvetica Neue",Arial,sans-serif;                  /* labels, tags, chrome */
  --d-w:900;--d-ls:0;--d-sz:1.3;--d-lh:.86;                          /* canvas title tuning */

  /* type: roles (page scale; the canvas uses world units, see index.html) */
  --fs-hero:clamp(72px,8.4vw,128px);
  --fs-page:clamp(56px,5.5vw,96px);  /* Dec 1: was clamp(64,7vw,124); the condensed face crowded at that size */    /* page titles: About, project pages */   /* home headline (stacked, 1100 and up) */
  --fs-section:clamp(56px,6.2vw,104px);/* display section headings: index bands, Who I am */
  --fs-band:clamp(34px,3vw,48px);  /* Dec 1: was clamp(40,3.6vw,56) */    /* project page story headings */
  --fs-panel:clamp(32px,2.6vw,40px);   /* display heading inside a panel (Try it right here), a step under story headings */
  --fs-title:clamp(19px,1.8vw,24px);   /* row and item titles */
  --fs-lede:clamp(18px,1.6vw,22px);    /* ledes and intro paragraphs */
  --fs-body:17px;                      /* reading copy */
  --fs-ui:15px;                        /* buttons, chips, controls */
  --fs-label:14px;                     /* labels and meta */
  --fs-tag:12px;                       /* bracket tags */
  /* line-height scale (Nov 28 audit): six steps, unitless so they work at any size */
  --lh-display:.9;   /* display titles */
  --lh-head:.95;     /* Dec 1: page titles and story headings, a touch more air so stacked lines read */
  --lh-none:1;       /* one-line controls, labels, numbers */
  --lh-title:1.2;    /* titles and headings in the reading face */
  --lh-snug:1.3;     /* short UI text, captions under images */
  --lh-copy:1.45;    /* ledes, small running text, list items */
  --lh-read:1.6;     /* body reading text */

  /* shape: radius by height */
  --r-2:2px;   /* stat bar segments on phones, hairline tabs */
  --r-4:4px;   /* small tabs, mini frames */
  --r-6:6px;   /* tags, small tabs */
  --r-10:10px; /* chips, phone buttons */
  --r-12:12px; /* buttons, popover rows, thumbnails */
  --r-14:14px; /* framed media */
  --r-16:16px; /* panels, popovers, viewports */
  --r-pill:999px;  /* round controls and pills */

  /* space: 4pt steps */
  --s-1:4px;--s-2:8px;--s-3:12px;--s-4:16px;--s-5:24px;--s-6:32px;--s-7:48px;--s-8:64px;--s-9:96px;

  /* motion */
  --ease:cubic-bezier(.2,.8,.2,1);
  --dur-fast:.2s;--dur-base:.35s;--dur-slow:.7s;
  /* Nov 30 motion pass: one more step and three named curves, so every interaction draws from the same set.
     fast .2 hovers, presses, small fades; base .35 menus, tips, panels, reveals; move .5 things that travel or change size
     (morphs, slides, springs); slow .7 large reveals and draw-ins. Sequences over a second (intro, camera flies) stay timed by hand */
  --dur-move:.5s;
  --ease-io:cubic-bezier(.65,0,.35,1);   /* both ends eased: camera and board moves, wipes */
  --ease-exit:var(--ease); /* Dec 1: exits ease out like entrances (was a speed-up curve), so leaving never feels sluggish at the start */
  --ease-pop:cubic-bezier(.34,1.56,.5,1); /* a small overshoot: pins, dots, snap-backs */
}
/* light = warm (Nov 25): mannyOS sand ground, cream surfaces, warm ink and shadows; chili unchanged */
html.light{
  color-scheme:light;
  --canvas:#F2EBDD;--panel:#FBF7EF;--line:#E2D7C3;--hover:#EDE4D2;--dot:rgba(60,40,10,.12);
  --ph:#E8DFCD;--ph-line:#DCD0B9;--ph-tx:#968A76;
  --tx:#1F1A14;--tx-2:#574E43;--tx-3:#736757;  /* tx-3 darkened Nov 28 (was #857968, 3.6:1) to pass AA: 4.65:1 on canvas, 5.2:1 on panel */
  
  --sel:#E5341F;--sel-tx:#C42B17;--cta:#D9321E;--btn-line:#CBBFA9;--tab:#E6DCC8;
  --st-rev:#B86E00;--st-chg:#D9321E;--st-ok:#1E8A52;--st-redo:#2D6FD6;
  --glass:color-mix(in srgb,#FFFDF8 62%,transparent);--glass-line:rgba(120,90,50,.14);
  --sh-float:0 8px 24px rgba(70,45,15,.10),0 1px 2px rgba(70,45,15,.06);--sh-up:0 -8px 24px rgba(70,45,15,.10),0 -1px 2px rgba(70,45,15,.06);
  --sh-pop:0 24px 48px rgba(70,45,15,.14),0 2px 6px rgba(70,45,15,.06);
}
/* light glass: panels, scrolled top bar, floating controls and menus blur the sand behind them */
html.light .panel,html.light .top.top-on,html.light .corner > *,html.light .qnav,html.light .qpill,html.light .fpill{
  background:var(--panel)!important;border-color:var(--line)!important}
/* Nov 29: the pressed Overview button keeps its chili fill in light mode (the rule above was flattening it to panel, leaving white text on cream) */
html.light .corner > .ovsw[aria-pressed="true"]{background:var(--sel)!important;border-color:var(--sel)!important}
html.light .panel.l{border-right:1px solid var(--glass-line)}
html.light .panel.r{border-left:1px solid var(--glass-line)}
html.light .ocap,html.light .txl .out{background:var(--panel)}

/* ---------- 2. Base ---------- */
html{background:var(--canvas)}
:focus-visible{outline:2px solid var(--sel);outline-offset:2px}

/* ---------- 3. Components ---------- */

/* Page shell (About, project pages, Behind the lens): one content width, a sticky top bar with the nav on the left and
   the theme toggle on the right, and a footer line with name, Résumé and Copy email. Behavior lives in site.js */
:root{--wrap:1200px;--gut:max(24px,env(safe-area-inset-left,0px));--gutr:max(24px,env(safe-area-inset-right,0px))}
.wrap{box-sizing:border-box;max-width:var(--wrap);margin:0 auto;padding-left:var(--gut);padding-right:var(--gutr)}
body:has(> .top)::before{content:"";position:fixed;inset:0 0 auto;height:env(safe-area-inset-top,0px);z-index:10;background:var(--canvas)}
.top{position:sticky;top:env(safe-area-inset-top,0px);z-index:9;background:transparent;transition:background var(--dur-base) var(--ease),transform var(--dur-base) var(--ease)}
/* hide on scroll down, back on scroll up (topbar.js) */
html.nav-hide body > .top{transform:translateY(calc(-100% - env(safe-area-inset-top,0px)))}
@media (prefers-reduced-motion:reduce){.top{transition:background var(--dur-base) var(--ease)}}
/* the ground and blur arrive once the page has scrolled (topbar.js) */
.top.top-on{background:var(--canvas)}
.top .wrap{display:flex;align-items:center;justify-content:space-between;gap:var(--s-4);height:64px}
.foot{padding-block:var(--s-8) calc(var(--s-7) + env(safe-area-inset-bottom,0px));color:var(--tx-3);font:500 var(--fs-label)/var(--lh-copy) var(--f-ui)}
.foot .wrap{display:flex;flex-wrap:wrap;justify-content:space-between;align-items:center;gap:var(--s-4)}
.foot .ft-cta{display:flex;flex-wrap:wrap;gap:var(--s-3)}

/* Page transitions: the old page fades out while the new one fades up a few pixels, instead of a hard cut. The site nav
   is held still: it swaps in place, so only the current-page underline changes (no stretching or ghosted text).
   A project thumbnail grows into its case page cover (vt.js names the tapped image). Browsers without support just
   load the page; off with reduced motion */
@view-transition{navigation:auto}
/* the old page fades out quickly, then the new one fades up: a short stagger, so the two pages never sit half-transparent on top of each other */
::view-transition-old(root){animation:vt-out var(--dur-fast) var(--ease) both}
::view-transition-new(root){animation:vt-in var(--dur-base) var(--ease) calc(var(--dur-fast) * .5) both}
@keyframes vt-out{to{opacity:0}}
/* Nov 29: board zooms (Overview from a page, or into a page from Overview) hand over with the new page fading in over the old one, held still underneath: the frame and the page sit in the same place, so nothing rises and the screen never dips */
html.vt-zoom::view-transition-old(root){animation:vt-hold 1.2s linear both;mix-blend-mode:normal}
html.vt-zoom::view-transition-new(root){animation:vt-zin var(--dur-fast) var(--ease) both;mix-blend-mode:normal}
html.vt-zoom.vt-wait::view-transition-new(root){animation:none;opacity:0}
@keyframes vt-hold{from,to{opacity:1}}
/* Nov 29: board zooms that carry the real page (window.__vtz in Base.astro drives these groups with keyframes).
   vt-zo is the board's side of a zoom-out: the board itself isn't snapshotted (it renders live and zooms under the
   shrinking page), only the target frame is, as "root" */
html.vt-zo{view-transition-name:none}
html.vt-z::view-transition-group(root),html.vt-z::view-transition-group(board){animation:none;transform-origin:0 0}
html.vt-z::view-transition-image-pair(root),html.vt-z::view-transition-image-pair(board){isolation:auto}
html.vt-z::view-transition-old(root),html.vt-z::view-transition-new(root),html.vt-z::view-transition-old(board){animation:none;mix-blend-mode:normal}
html.vt-zo::view-transition-new(root){opacity:0}
@keyframes vt-zin{from{opacity:0}}
@keyframes vt-in{from{opacity:0;transform:translateY(8px)}}
/* chrome stays put: the whole top bar (nav, blur ground, theme toggle) on inner pages, the nav on Home. It swaps in place, only the brackets move */
/* Top bar mark: the comment pin with Manny's face in it (same pin as the Outcome comments, like a Figma comment avatar) with the name, linking Home. The nav and the
   theme toggle sit together on the right. Phones show the pin only */
.top-m{display:inline-flex;align-items:center;gap:var(--s-3);margin-right:auto;text-decoration:none;color:var(--tx);font:600 var(--fs-ui)/var(--lh-none) var(--t-font)}
.top-m i{display:block;width:32px;height:32px;border-radius:50% 50% 50% 0;background:var(--brand) url(media/pfp-red.webp) center/cover no-repeat;font-size:0;color:transparent;font-style:normal;transition:transform var(--dur-fast) var(--ease)}
.top-m:hover i{transform:rotate(-8deg)}
/* Figma's arrow is the pointer on every page (Nov 28, was Home only); links and buttons keep the hand */
@media (hover:hover) and (pointer:fine){html,body{cursor:url("data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20width%3D%2222%22%20height%3D%2226%22%20viewBox%3D%220%200%2017%2020%22%3E%3Cpath%20d%3D%22M2.6%202.2v15.6l4.6-4.4%206.8-.4z%22%20fill%3D%22%23000%22%20stroke%3D%22%23fff%22%20stroke-width%3D%221.4%22%20stroke-linejoin%3D%22round%22/%3E%3C/svg%3E") 3 3,default}a,button,.btn,[role="button"],summary,label{cursor:pointer}}
/* headline accent (Nov 28): the payoff phrase of a section heading in chili, like the page titles */
/* Nov 28 unslop: section headings stay ink; chili is kept for the page title, the main action and the current item */
.sh em,.pi-h em{font-style:normal;color:var(--sel)}
/* job title under the name (live site, Nov 27); phones hide both */
.top-m span::after{content:"Senior Visual Designer";display:block;margin-top:4px;font:500 var(--fs-tag)/var(--lh-title) var(--f-ui);color:var(--tx-3)}
.top-m:focus-visible{outline:2px solid var(--sel);outline-offset:4px;border-radius:var(--r-4)}
.top .wrap{justify-content:flex-start}
.top .hnav{margin-right:var(--s-5)}
@media (max-width:899px){.top-m span{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.top .hnav{margin-right:var(--s-3);gap:var(--s-4);flex-wrap:nowrap;white-space:nowrap}}
/* nothing scrolls sideways: headings that enter sheared (lean.js) can poke past the edge for a moment */
body{overflow-x:clip}
.top{view-transition-name:site-top}
.hnav:not(.top .hnav){view-transition-name:site-nav}
::view-transition-group(site-top),::view-transition-group(site-nav){animation:none}
::view-transition-old(site-top),::view-transition-old(site-nav){display:none}
::view-transition-new(site-top),::view-transition-new(site-nav){animation:none}
.hero .shot img{view-transition-name:case-cover}
::view-transition-group(case-cover){animation-duration:var(--dur-move);animation-timing-function:var(--ease)}
.sf-c .hnav,.sf-c .top,.sf-c img{view-transition-name:none}  /* the board's live copies of Home must not reuse the names */
@media (prefers-reduced-motion:reduce){::view-transition-group(*),::view-transition-old(*),::view-transition-new(*){animation:none!important}}

/* Page title: display, page size. An <em> inside it turns chili (Behind the lens) */
.pg-title{margin:0;font:900 var(--fs-page)/var(--lh-head) var(--d-font);color:var(--tx);text-wrap:balance}
.pg-title em{font-style:normal;color:var(--sel)}

/* Button, page size. Primary is solid chili; .alt is the secondary outline.
   The canvas frames use the same button at world scale (.cta in index.html). */
.btn{all:unset;box-sizing:border-box;cursor:pointer;position:relative;display:inline-flex;align-items:center;gap:var(--s-3);
  height:52px;padding:0 var(--s-5);border-radius:var(--r-12);border:1.5px solid var(--cta);background:var(--cta);color:var(--on-sel);
  font:600 var(--fs-body)/var(--lh-none) var(--t-font);text-decoration:none;white-space:nowrap;transition:background var(--dur-fast) var(--ease),border-color var(--dur-fast) var(--ease),color var(--dur-fast) var(--ease),scale var(--dur-fast) var(--ease)}
.btn.alt{background:transparent;color:var(--tx);border-color:var(--btn-line)}
.btn:focus-visible{outline:2px solid var(--sel);outline-offset:3px}
.btn svg{width:20px;height:20px;transition:transform var(--dur-base) var(--ease)}
@media (hover:hover){.btn:not(.btn-down):hover>svg:last-child:not(.chev):not(:first-child:not(:only-child)){transform:translateX(4px)}  /* Dec 1: only a trailing arrow nudges; leading icons and chevrons stay put (moving every icon squeezed the label) */}
@media (max-width:899px){.btn{height:48px;padding:0 var(--s-5);font-size:var(--fs-ui);border-radius:var(--r-10)}}
/* .sm: the compact button for inside pills and toolbars. Round, because it nests in round containers */
.btn.sm{height:36px;padding:0 16px;gap:var(--s-2);border-radius:var(--r-pill);font-size:var(--fs-label)}
/* .lg: the hero button, one step up for a page's single main action next to a hero headline (Nov 28) */
.btn.lg{height:64px;padding:0 var(--s-6);font-size:var(--fs-lede);border-radius:var(--r-14)}
@media (max-width:899px){.btn.lg{height:56px;padding:0 var(--s-5);font-size:var(--fs-lede);border-radius:var(--r-12)}}

/* Round icon button (theme toggle and other single-icon controls) */
.thsw{all:unset;box-sizing:border-box;cursor:pointer;display:grid;place-items:center;width:40px;height:40px;border-radius:var(--r-pill);
  background:var(--panel);border:1px solid var(--line);color:var(--tx);box-shadow:var(--sh-float);transition:scale var(--dur-fast) var(--ease)}
.thsw svg{width:18px;height:18px}
@media (hover:hover){.thsw:hover{background:var(--hover)}}
.thsw:focus-visible{outline:2px solid var(--sel);outline-offset:2px}
.thsw.tog[aria-pressed="true"]{color:var(--sel)}  /* .tog: an on/off icon button; chili when on */
.thsw .sun{display:none}html.light .thsw .sun{display:block}html.light .thsw .moon{display:none}

/* Floating pill: a control bar that floats over the page (reading progress). Pages only place it.
   Holds a ring, a label with optional meta (em) and one .btn.sm */
.fpill{display:flex;align-items:center;gap:var(--s-3);box-sizing:border-box;height:48px;max-width:calc(100vw - 32px);padding:5px 5px 5px 8px;border-radius:var(--r-pill);
  background:var(--panel);border:1px solid var(--line);box-shadow:var(--sh-float)}
.fp-lab b{font-weight:inherit}  /* <b> otherwise renders "bolder" (900, synthetic) on top of the 600 label */
.fp-lab{display:inline-flex;align-items:baseline;gap:var(--s-2);min-width:0;overflow:hidden;white-space:nowrap;font:600 var(--fs-label)/var(--lh-snug) var(--t-font);color:var(--tx)}
.fpill:not(:has(.btn)){padding:0 var(--s-5) 0 var(--s-4);gap:var(--s-3)}
.fpill>svg{flex:none;width:18px;height:18px}  /* a tip: label only, even padding */
.fpill>.btn{flex:none;margin-left:auto}  /* the button stays pinned right; when the pill resizes, the gap in the middle opens or closes */
.fp-lab em{font:500 var(--fs-tag)/var(--lh-none) var(--f-ui);font-style:normal;color:var(--tx-3);font-variant-numeric:tabular-nums}
.fpill :is(b,em,.ct){transition:opacity var(--dur-base) var(--ease)}
.fpill .fp-out{opacity:0;transition:none}
/* Soon tip (soon.js): a label-only floating pill that pops under a nav item that isn't live yet */
.soon-tip{position:fixed;z-index:70;opacity:0;transform:translateY(-4px) scale(.96);pointer-events:none;transition:opacity var(--dur-fast) var(--ease),transform var(--dur-base) var(--ease)}
.soon-tip.on{opacity:1;transform:none}
@media (prefers-reduced-motion:reduce){.soon-tip{transition:none}}  /* swapped text starts clear and fades in (see the page script) */

/* Segmented control: a few options in one pill (section switch, view size). Pressed option fills chili. Icon-only options
   get an aria-label. Same look as the canvas view switcher */
.seg{display:inline-flex;gap:var(--s-1);padding:var(--s-1);border-radius:var(--r-pill);background:var(--panel);border:1px solid var(--line)}
.seg button{all:unset;box-sizing:border-box;cursor:pointer;display:inline-flex;align-items:center;gap:var(--s-2);height:32px;padding:0 var(--s-4);border-radius:var(--r-pill);
  font:500 var(--fs-label)/var(--lh-none) var(--f-ui);color:var(--tx-2);white-space:nowrap;transition:background var(--dur-fast) var(--ease),color var(--dur-fast) var(--ease)}
.seg button svg{width:16px;height:16px}
.seg button:has(svg:only-child){padding:0 var(--s-2)}
@media (hover:hover){.seg button:hover{color:var(--tx)}}
.seg button[aria-pressed="true"]{background:var(--cta);color:var(--on-sel)}
/* with site.js running, one chili fill slides between options instead of each option snapping on and off */
.seg{position:relative}
.seg.slide::before{content:"";position:absolute;top:4px;left:0;height:32px;width:var(--sw,0px);transform:translateX(var(--sx,0px));border-radius:var(--r-pill);background:var(--cta);transition:transform var(--dur-base) var(--ease),width var(--dur-base) var(--ease)}
.seg.slide.nofx::before{transition:none}
.seg.slide button{position:relative;z-index:1}
.seg.slide button[aria-pressed="true"]{background:transparent}
@media (prefers-reduced-motion:reduce){.seg.slide::before{transition:none}}
.seg button:focus-visible{outline:2px solid var(--sel);outline-offset:2px}

/* Progress ring: chili arc on a hairline track, filled by --p (0 to 1) */
.ring{flex:none;width:30px;height:30px;overflow:visible;transform:rotate(-90deg)}
.ring circle{fill:none;stroke-width:3}
.ring .bg{stroke:var(--line)}
.ring .arc{stroke:var(--sel);stroke-linecap:round;stroke-dasharray:75.4;stroke-dashoffset:calc(75.4 * (1 - var(--p,0)))}
/* .done: the ring pops, a check draws inside and a chili ripple rings out (same check and pop as Copy email) */
.ring .ck{fill:none;stroke:var(--sel);stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:24;stroke-dashoffset:24;transition:stroke-dashoffset var(--dur-base) var(--ease)}
.ring .arc{transition:stroke-dashoffset .25s linear}
.ring .rip{stroke:var(--sel);stroke-width:2;opacity:0;transform-origin:15px 15px}
.ring.done{animation:ringPop var(--dur-base) var(--ease-pop)}
.ring.done .ck{stroke-dashoffset:0;transition-delay:.15s}
.ring.done .rip{animation:ringRip var(--dur-slow) var(--ease)}
@keyframes ringPop{40%{scale:1.18}}
@keyframes ringRip{0%{opacity:.6;transform:scale(1)}100%{opacity:0;transform:scale(1.9)}}
@media (prefers-reduced-motion:reduce){.ring.done,.ring.done .rip{animation:none}.ring .ck,.ring .arc{transition:none}}

/* Fade-in (fade.js): an image on its placeholder ground fades in once it has loaded. The holder keeps the shape */
.fade-img{opacity:0;transition:opacity var(--dur-slow) var(--ease)}
.fade-img.ld{opacity:1}
@media (prefers-reduced-motion:reduce){.fade-img{transition:none}}

/* Lightbox (lightbox.js): full-size image over the canvas. Counter top left, round close top right,
   round prev/next at the sides (below the image on phones), caption under the image */
.lb-img{cursor:zoom-in}
.lb-img:focus-visible{outline:2px solid var(--sel);outline-offset:3px}
html.lb-open{overflow:hidden}
.lbox{position:fixed;inset:0;z-index:60;display:flex;flex-direction:column;background:var(--canvas);opacity:0;transition:opacity var(--dur-fast) var(--ease)}
.lbox[hidden]{display:none}
.lbox.on{opacity:1}
.lbox:focus{outline:none}
.lb-bar{display:flex;align-items:center;justify-content:space-between;padding:calc(var(--s-4) + env(safe-area-inset-top,0px)) max(var(--s-4),env(safe-area-inset-right,0px)) var(--s-4) max(var(--s-5),env(safe-area-inset-left,0px))}
.lb-stage{flex:1;min-height:0;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:var(--s-5);padding:0 max(var(--s-5),env(safe-area-inset-right,0px)) calc(var(--s-6) + env(safe-area-inset-bottom,0px)) max(var(--s-5),env(safe-area-inset-left,0px))}
.lb-stage figure{margin:0;height:100%;min-height:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:var(--s-4)}
.lb-stage img{max-width:100%;max-height:calc(100% - 3em);object-fit:contain;border-radius:var(--r-14);transform:scale(.98);transition:transform var(--dur-base) var(--ease)}
.lbox.on .lb-stage img{transform:none}
.lb-stage figcaption{max-width:62ch;text-align:center;font:400 var(--fs-label)/var(--lh-copy) var(--t-font);color:var(--tx-2)}
.lbox.solo .lb-prev,.lbox.solo .lb-next{visibility:hidden}
@media (max-width:700px){.lb-stage{grid-template-columns:1fr 1fr;grid-template-rows:minmax(0,1fr) auto}.lb-stage figure{grid-column:1/-1;grid-row:1}
  .lb-prev{grid-row:2;justify-self:end}.lb-next{grid-row:2;justify-self:start}}
@media (prefers-reduced-motion:reduce){.lbox,.lb-stage img{transition:none}}

/* Profile photo: Manny on the chili ground, round. Size with --pfp (.av is the Chai presence avatar on the board) */
.pfp{flex:none;display:block;width:var(--pfp,40px);height:var(--pfp,40px);border-radius:50%;object-fit:cover;background:var(--brand)}

/* Bracket tags: a project's skills, chili, in square brackets. .lg on project heroes */
.tags{display:flex;flex-wrap:wrap;gap:var(--s-1) var(--s-3);font:500 var(--fs-tag)/var(--lh-title) var(--f-ui);color:var(--sel-tx)}
.tags span::before{content:"[";margin-right:2px}.tags span::after{content:"]";margin-left:2px}
.tags.lg{font-size:var(--fs-label);gap:var(--s-2) var(--s-4)}
/* .lead: the first tag is the project's lead skill (chili), the rest support it (grey). Same rule as Mirror */
.tags.lead span{color:var(--tx-3)}.tags.lead span:first-child{color:var(--tx)}

/* Chip: a neutral label on the surface (capabilities, filters) */
.chip{display:inline-flex;align-items:center;padding:var(--s-2) var(--s-4);border-radius:var(--r-10);background:var(--panel);font:500 var(--fs-ui)/var(--lh-title) var(--t-font);color:var(--tx)}

/* Section tab: the Figma section label. Sized by its own font-size, so it scales with whatever holds it */
.stab{display:inline-block;padding:.24em .55em .28em;border-radius:.18em;background:var(--tab);color:var(--tx);font-weight:500;line-height:var(--lh-none);white-space:nowrap}

/* Stat bar: a project's skill mix as segments, lead skill in chili. Sizes live with each page */
.mtrk{display:flex}
.mtrk i{flex:var(--w) 1 0;min-width:0;display:flex;align-items:center;background:var(--c)}
.mtrk i:nth-child(1){--c:var(--sel)}.mtrk i:nth-child(2){--c:var(--tx)}.mtrk i:nth-child(3){--c:var(--tx-3)}
.mtrk b{display:block;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mtrk i:nth-child(1) b{color:var(--on-sel)}.mtrk i:nth-child(2) b{color:var(--canvas)}.mtrk i:nth-child(3) b{color:var(--on-light)}

/* Site nav: plain words, the current page marked with a short chili rule. Used in the home hero and page top bars */
.hnav{display:flex;align-items:center;gap:var(--s-6);font:500 var(--fs-body)/var(--lh-none) var(--t-font)}
.hnav a,.hnav span{position:relative;color:var(--tx-2);text-decoration:none;padding:var(--s-2) 0;transition:color var(--dur-fast) var(--ease)}
.hnav a[aria-current="page"]{color:var(--tx)}
/* current page: chili brackets around the label, borrowed from the project tags; placed absolutely so the nav never shifts */
.hnav a[aria-current="page"]::before,.hnav a[aria-current="page"]::after{content:"[";position:absolute;top:50%;translate:0 -50%;left:calc(-1 * var(--s-3));color:var(--sel);font-weight:400}
.hnav a[aria-current="page"]::after{content:"]";left:auto;right:calc(-1 * var(--s-3))}
/* phones: brackets hug the current link closer, so they don't crowd the next link (Nov 23) */
@media (max-width:899px){.hnav a[aria-current="page"]::before{left:calc(-1 * var(--s-2))}.hnav a[aria-current="page"]::after{right:calc(-1 * var(--s-2))}}
@media (hover:hover){.hnav a:hover{color:var(--tx)}}
.hnav .soon{color:var(--tx-3);cursor:default;display:inline-flex;align-items:center;gap:8px}
.hnav em{font:500 var(--fs-tag)/var(--lh-none) var(--f-ui);font-style:normal;padding:var(--s-1) var(--s-2);border-radius:var(--r-4);background:var(--hover);color:var(--tx-3)}
.hnav a:focus-visible{outline:2px solid var(--sel);outline-offset:4px;border-radius:var(--r-2)}
@media (max-width:899px){.hnav{gap:var(--s-5);font-size:var(--fs-ui)}.hnav .soon em{display:none}}

/* Copy email button: [data-mail] on a .btn. Success state fills chili and draws a check */
.btn[data-mail] .ct{display:inline-flex;align-items:center;justify-content:center;gap:8px}
.btn[data-mail] .ck{flex:none;width:1.05em;height:1.05em}
[data-mail]{transition:background var(--dur-fast) var(--ease),border-color var(--dur-fast) var(--ease),color var(--dur-fast) var(--ease)}
[data-mail].ok{background:var(--cta);border-color:var(--cta);color:var(--on-sel);animation:cpPop var(--dur-base) var(--ease-pop)}
[data-mail] .ct{display:inline-flex;align-items:center;gap:8px}
[data-mail] .ck{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:2.6;stroke-linecap:round;stroke-linejoin:round;stroke-dasharray:24;stroke-dashoffset:24;animation:cpDraw var(--dur-base) .1s var(--ease) forwards}
@keyframes cpPop{40%{transform:scale(1.06)}}@keyframes cpDraw{to{stroke-dashoffset:0}}
@media (prefers-reduced-motion:reduce){[data-mail].ok{animation:none}[data-mail] .ck{animation:none;stroke-dashoffset:0}}

/* Section heading for page sections (About, project pages): display title, optional lede under it */
/* Lean: display headings slant with scroll speed and ease upright when you stop (lean.js sets --lean) */
/* heading motion (lean.js): the heading clips, its content rises out of the mask; page titles on load, sections on scroll */
.ms{overflow:hidden;padding-bottom:.12em;margin-bottom:-.12em}
.ms>.ms-in{display:block;transform:translate3d(0,calc(100% + .35em),0);  /* Nov 30: clears the mask's .12em descender room and the glyph overhang, so no sliver shows before the rise */
 backface-visibility:hidden;transition:transform var(--dur-slow) var(--ease)}
.ms.ms-on>.ms-in{transform:translate3d(0,0,0)}  /* Nov 29: ends on a layer, so no one-pixel snap when the rise finishes */
.sh{margin:0 0 var(--s-6);font:900 var(--fs-band)/var(--lh-display) var(--d-font);color:var(--tx);text-wrap:balance}
.sh-sub{margin:calc(-1 * var(--s-4)) 0 var(--s-6);font:400 var(--fs-lede)/var(--lh-copy) var(--t-font);color:var(--tx-2);max-width:46ch}
.sh-lab{margin:0 0 var(--s-3);font:600 var(--fs-label)/var(--lh-none) var(--f-ui);color:var(--tx-3)}
/* Mobile mode (Nov 21): one type scale under 900. Page titles, then one display size for every section and story
   heading, then titles, ledes, reading copy and labels. Pages use the roles; no page sets its own mobile clamp */
/* phone type scale (locked Nov 23, the "medium" step): about 10 to 12 percent under the old phone scale, for scanning */
@media (max-width:899px){:root{--fs-hero:clamp(36px,calc(14.2vw - 7px),54px);--fs-page:clamp(44px,13vw,54px);--fs-section:clamp(29px,8vw,35px);--fs-band:clamp(29px,8vw,35px);--fs-panel:clamp(26px,7vw,29px);--fs-title:18px;--fs-lede:17px;--fs-body:16px}body{font-size:var(--fs-body)}}
@media (max-width:899px){.sh{font-size:var(--fs-band);margin-bottom:var(--s-5)}.sh-sub{font-size:var(--fs-body);margin:calc(-1 * var(--s-3)) 0 var(--s-5)}}

/* Chip with an icon (tools) */
.chip svg{flex:none;width:18px;height:18px;margin-right:var(--s-2)}

/* Border beam: on hover a soft chili glow travels inside the edge of every button (.btn, and the canvas .cta). The label scales slightly */
 /* border beam option (the border-beam package's inner glow, in chili): a soft glow travels around just inside the CTA's edge.
   Shape, fill, border and type stay the CTA's own; on the chili button the glow is a pale tint so it still reads */
@property --bma{syntax:"<angle>";inherits:true;initial-value:0deg}
.cta,.btn{position:relative;--bmw:2.5px;--bmc:238,56,36;--bmhl:255,255,255;--bmg:255,92,66;animation:bmrun 3.6s linear infinite}
.cta:not(.alt),.btn{--bmc:255,196,186;--bmg:255,214,206}
/* light: chili on a pale button reads strong, so the glow is a touch softer; on the chili button the pale tint sits lighter too */
html.light .cta.alt{--bmg:238,56,36;--bmo:.5}
html.light .cta:not(.alt),html.light .btn{--bmo:.6}
html.light .btn.alt{--bmg:238,56,36;--bmo:.45}
.btn.alt{--bmg:255,92,66}
.btn{--bmw:1.5px}
.cta.alt{animation-delay:-1.8s}
/* chili buttons: the pale glow needs more presence to read on the saturated fill (Nov 28) */
.cta:not(.alt),.btn:not(.alt),html.light .cta:not(.alt),html.light .btn:not(.alt){--bmw:2.4px;--bmg:255,240,234;--bmo:1}
/* the beam only runs while its glow is showing: an always-on loop restyled and repainted every button on the page each
   frame, which stalled scroll animations on phones */
.cta,.btn{animation-play-state:paused}.cta:hover,.btn:hover,.cta:focus-visible,.btn:focus-visible{animation-play-state:running}
/* the glow sits on the border box (inset by minus the border width) so its corners match the button's outer radius exactly */
.cta::before,.btn::before{content:"";position:absolute;inset:calc(-1 * var(--bw,1.5px));border-radius:inherit;pointer-events:none;z-index:1;opacity:0;transition:opacity var(--dur-base) var(--ease);
  box-shadow:inset 0 0 calc(var(--bmw) * 7) calc(var(--bmw) * 1.2) rgba(var(--bmg),var(--bmo,.8));
  -webkit-mask-image:conic-gradient(from var(--bma),transparent 0 22%,rgba(0,0,0,.12) 28%,rgba(0,0,0,.4) 36%,#000 46% 82%,rgba(0,0,0,.4) 88%,rgba(0,0,0,.12) 94%,transparent 97%);
  mask-image:conic-gradient(from var(--bma),transparent 0 22%,rgba(0,0,0,.12) 28%,rgba(0,0,0,.4) 36%,#000 46% 82%,rgba(0,0,0,.4) 88%,rgba(0,0,0,.12) 94%,transparent 97%)}
.cta:hover::before,.btn:hover::before,.cta:focus-visible::before,.btn:focus-visible::before{opacity:1}
@keyframes bmrun{to{--bma:360deg}}
/* Nov 28 unslop: the beam no longer turns; hover shows the same inner glow, still, all the way round */
.cta,.btn{animation:none}
.cta::before,.btn::before{-webkit-mask-image:none;mask-image:none}
@media (prefers-reduced-motion:reduce){.cta,.btn{animation:none}}

.btn .ct{display:inline-block;transition:transform var(--dur-base) var(--ease)}
.btn:not(:has(svg)):hover .ct,.btn:not(:has(svg)):focus-visible .ct{transform:scale(1.06)}  /* Dec 1: the label grows only on text-only buttons; next to an icon it pushed into the icon */


/* Feature list: a few points as icon, bold title, body-size line. Case pages ("calls that shaped it") and About
   ("How I work") */
.moments{display:grid;grid-template-columns:1fr 1fr;gap:var(--s-7);margin-top:var(--s-2)}
.moment svg{width:44px;height:44px;color:var(--sel)}
.moment h3{margin:var(--s-4) 0 0!important;font:600 var(--fs-title)/var(--lh-title) var(--t-font);color:var(--tx)}
.moment p{margin:8px 0 0!important;color:var(--tx-2);max-width:42ch}
@media (max-width:900px){.moments{grid-template-columns:1fr}}

/* Nav hover: each letter rolls up and its copy rolls in from below, one after another (topbar.js splits the labels) */
.hl{display:inline-flex;overflow:hidden;vertical-align:bottom;height:1.3em;line-height:var(--lh-snug);margin-block:-.15em}
.hnav .hl-c{display:inline-flex;flex-direction:column;flex:none;align-self:flex-start;transition:transform var(--dur-move) var(--ease-io);transition-delay:calc(var(--i) * 28ms);white-space:pre}
/* the copy that rolls in is bright, so the flip reads even though the word is the same */
.hnav .hl-c>span+span{color:var(--tx);transition:none}
.hnav .hl-c>span{transition:none}
.hl-c>span{display:block;height:1.3em}
.hnav .hl,.hnav .hl span{padding:0;margin:0;position:static}
@media (hover:hover){.hnav a:hover .hl-c,.hnav a:focus-visible .hl-c{transform:translateY(-1.3em)}}
@media (prefers-reduced-motion:reduce){.hnav .hl-c{transition:none}.hnav a:hover .hl-c{transform:none}}

/* Thank-you clip (ty.js): a small FaceTime-style card that pops when someone taps Résumé. Video 3:4, round icon
   controls top right, captions over a bottom fade. Drag it anywhere; it snaps to the nearest corner */
.ty{position:fixed;z-index:60;contain:paint;isolation:isolate;width:216px;border-radius:var(--r-16);overflow:hidden;background:var(--panel);border:1px solid var(--line);box-shadow:var(--sh-pop);touch-action:none;-webkit-user-select:none;user-select:none;cursor:grab;
  opacity:0;transform:scale(.92);transform-origin:var(--ox,100%) var(--oy,100%);transition:opacity var(--dur-fast) var(--ease),transform var(--dur-base) var(--ease-pop)}
.ty.on{opacity:1;transform:none}
.ty.drag{cursor:grabbing;transition:none}
.ty.snap{transition:left var(--dur-base) var(--ease),top var(--dur-base) var(--ease)}
.ty[hidden]{display:none}
.ty-media{aspect-ratio:3/4;background:var(--brand);overflow:hidden;border-radius:inherit}
.ty-media video{display:block;width:100%;height:100%;object-fit:cover;pointer-events:none}
.ty-ctl{position:absolute;top:var(--s-2);right:var(--s-2);display:flex;gap:var(--s-1)}
.ty-ctl .thsw{width:32px;height:32px}
.ty-ctl .thsw svg{width:16px;height:16px}
.ty-cap{position:absolute;left:0;right:0;bottom:0;margin:0;min-height:3.5em;padding:var(--s-6) var(--s-3) var(--s-3);font:500 var(--fs-label)/var(--lh-snug) var(--t-font);color:var(--on-sel);background:linear-gradient(to top,rgba(0,0,0,.72),transparent)}
@media (max-width:899px){.ty{width:156px}.ty-cap{font-size:var(--fs-tag)}}
@media (prefers-reduced-motion:reduce){.ty{transition:opacity var(--dur-fast) var(--ease)}}
/* Pull quote (case pages, About Kind words); moved here from case.css Nov 28 */
.quote{margin:var(--s-6) 0 0;font:600 var(--fs-title)/var(--lh-snug) var(--t-font);color:var(--tx);text-wrap:balance;max-width:34ch}
.quote em{font-style:normal;color:var(--sel)}
/* Story case pages (Nov 28): components for the one-scroll story layout, first on the finder */
/* Outcome comment at page scale: the board's Outcome card (index.html .ocap is camera-scaled), as the case cover's payoff line */
.ocm{position:relative;display:block;box-sizing:border-box;width:fit-content;max-width:44ch;margin:var(--s-5) 0 0;padding:var(--s-3) var(--s-4) var(--s-4);border-radius:var(--r-12);background:var(--panel);border:1px solid var(--line);box-shadow:var(--sh-pop);font:500 var(--fs-title)/var(--lh-copy) var(--t-font);color:var(--tx);text-wrap:pretty}
.ocm::before{content:"";position:absolute;left:var(--s-4);top:var(--s-3);width:24px;height:24px;border-radius:50% 50% 50% 0;background:var(--brand) url(media/pfp-red.webp) center/cover no-repeat}
.ocm b{display:block;margin-bottom:var(--s-2);padding-left:calc(24px + var(--s-2));font:500 var(--fs-label)/24px var(--f-ui);color:var(--tx-3)}
/* Contents rail: the beat headlines as the page's TL;DR. Dashes mark sections, the current one longer and chili; sections not reached yet in tx-3 */
.rail ol{list-style:none;margin:0;padding:0;display:grid;gap:var(--s-1)}
.rail ol a{display:flex;align-items:center;gap:var(--s-3);padding:var(--s-1) 0;font:500 var(--fs-label)/var(--lh-snug) var(--f-ui);color:var(--tx-3);text-decoration:none;transition:color var(--dur-fast) var(--ease)}
.rail ol a::before{content:"";flex:none;width:12px;height:2px;border-radius:var(--r-2);background:currentColor;transition:width var(--dur-base) var(--ease),background var(--dur-base) var(--ease)}
.rail ol a.seen{color:var(--tx-2)}
.rail ol a[aria-current="true"]{color:var(--tx)}
.rail ol a[aria-current="true"]::before{width:24px;background:var(--sel)}
@media (hover:hover){.rail ol a:hover{color:var(--tx)}}
.rail ol a:focus-visible{outline:2px solid var(--sel);outline-offset:2px;border-radius:var(--r-2)}
/* Image steps: an image with its title and line under it as the caption, no card, no arrows */
.stp{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:var(--s-5);margin-top:var(--s-6)}
.stp figure{margin:0;min-width:0}
.stp img{display:block;width:100%;border-radius:var(--r-12);background:var(--ph)}
.stp figcaption{margin-top:var(--s-3);font:400 var(--fs-label)/var(--lh-copy) var(--t-font);color:var(--tx-2)}
.stp figcaption b{display:block;margin-bottom:2px;font:600 var(--fs-ui)/var(--lh-snug) var(--t-font);color:var(--tx)}
/* Flow chart: lanes of steps in surface cards; space alone separates lanes, no arrows */
.flow{margin:var(--s-6) 0 0;padding:var(--s-5);border-radius:var(--r-16);background:var(--panel)}
.flow>figcaption{margin:0 0 var(--s-5);font:600 var(--fs-ui)/var(--lh-snug) var(--t-font);color:var(--tx)}
.flow ol{list-style:none;margin:0 0 var(--s-5);padding:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--s-3)}
.flow ol:last-child{margin-bottom:0}
.flow li{padding:var(--s-3) var(--s-4) var(--s-4);border-radius:var(--r-12);background:var(--canvas);font:400 var(--fs-label)/var(--lh-copy) var(--t-font);color:var(--tx-2)}
.flow li b{display:block;margin-bottom:2px;font:600 var(--fs-label)/var(--lh-snug) var(--t-font);color:var(--tx)}
/* Lead-in list: a bold lead, then the line */
.tight{list-style:none;margin:var(--s-5) 0 0;padding:0;display:grid;gap:var(--s-4)}
.tight li{max-width:62ch;color:var(--tx-2)}
.tight li b{color:var(--tx);font-weight:600}
@media (max-width:899px){
  .ocm{font-size:var(--fs-body);padding:var(--s-2) var(--s-3) var(--s-3)}
  .ocm::before{left:var(--s-3);top:var(--s-2);width:20px;height:20px}
  .ocm b{padding-left:calc(20px + var(--s-2));line-height:20px;font-size:var(--fs-tag)}
  .flow{padding:var(--s-4)}.flow ol{grid-template-columns:1fr 1fr;gap:var(--s-2)}
}
@media (max-width:560px){
  .stp{grid-template-columns:minmax(0,1fr);gap:var(--s-4)}
  .stp figure{display:grid;grid-template-columns:112px minmax(0,1fr);gap:var(--s-4);align-items:center}
  .stp figcaption{margin:0}
}
.stp.two{grid-template-columns:repeat(2,minmax(0,1fr))}
.stp video{display:block;width:100%;aspect-ratio:4/3;object-fit:cover;border-radius:var(--r-12);background:var(--ph)}
.stp figcaption a{color:inherit}
/* Swatch list: a brand's palette shown as data (the color is the content, so it sits inline) */
.swt{list-style:none;margin:var(--s-6) 0 0;padding:0;display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:var(--s-4)}
.swt i{display:block;aspect-ratio:4/3;border-radius:var(--r-12);margin-bottom:var(--s-3)}
.swt b{display:block;font:600 var(--fs-label)/var(--lh-snug) var(--t-font);color:var(--tx)}
.swt code{font:500 var(--fs-tag)/var(--lh-copy) var(--f-ui);color:var(--tx-3)}
@media (max-width:560px){.swt{grid-template-columns:1fr 1fr}.stp.two{grid-template-columns:minmax(0,1fr)}}

/* Stat grid (About By the numbers, case results; moved from about.html Nov 28): big display number, claim, benchmark. .three = one row of three */
.sbd{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));max-width:880px}
.sbd-c{position:relative;display:grid;align-content:start;gap:var(--s-2);padding:var(--s-5) var(--s-8) var(--s-6) 0;border-bottom:1px solid var(--line)}
.sbd-c:nth-child(even){padding-left:var(--s-5);border-left:1px solid var(--line)}
.sbd-c:nth-child(n+3){border-bottom:0}
.sbd-c b{font:900 var(--fs-band)/var(--lh-display) var(--d-font);color:var(--tx);font-variant-numeric:tabular-nums}
.sbd-c > span{font:500 var(--fs-ui)/var(--lh-copy) var(--t-font);color:var(--tx);max-width:30ch}  /* direct child only: the number's count-up copy is a span inside the <b> (Nov 30 fix) */
.sbd-c em{font:400 var(--fs-label)/var(--lh-copy) var(--t-font);font-style:normal;color:var(--tx-3)}
.sbd.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.sbd.three .sbd-c{border-bottom:0;padding-left:var(--s-5);border-left:1px solid var(--line)}
.sbd.three .sbd-c:first-child{padding-left:0;border-left:0}
@media (max-width:899px){
  .sbd-c,.sbd-c:nth-child(even){padding:var(--s-4) var(--s-3) var(--s-5) 0}
  .sbd-c:nth-child(even){padding-left:var(--s-4)}
  .sbd-c > span{font-size:var(--fs-label)}.sbd-c em{font-size:var(--fs-tag)}
}
@media (max-width:560px){.sbd.three{grid-template-columns:1fr}.sbd.three .sbd-c,.sbd.three .sbd-c:first-child{padding:var(--s-4) 0;border-left:0;border-bottom:1px solid var(--line)}.sbd.three .sbd-c:last-child{border-bottom:0}}
/* Before / after table: rows separated by space, the area in ink, the "after" column in ink, "before" in tx-2 */
.cmpw{margin-top:var(--s-6);overflow-x:auto}
.cmp{width:100%;min-width:520px;border-collapse:collapse;font:400 var(--fs-label)/var(--lh-copy) var(--t-font)}
.cmp th{padding:0 var(--s-4) var(--s-3) 0;text-align:left;font:500 var(--fs-tag)/var(--lh-title) var(--f-ui);color:var(--tx-3)}
.cmp td{padding:var(--s-2) var(--s-4) var(--s-2) 0;vertical-align:top;color:var(--tx-2)}
.cmp td:first-child,.cmp td:last-child{color:var(--tx)}.cmp td:first-child{font-weight:600}
/* Phone CTAs (Nov 28): a page's main action runs full width; a pair splits the width 50/50 (About's pair already did) */
@media (max-width:899px){
  .foot .ft-cta{display:grid;grid-template-columns:1fr 1fr;width:100%}
  .foot .ft-cta .btn,.cta-full{width:100%;justify-content:center;box-sizing:border-box}
}

/* Contact card (Nov 28): phones only, opened by the face pin in the top bar. Comment-card look: panel, hairline, --sh-pop,
   the face pin and name, then three 44px rows (Copy email, LinkedIn, Résumé) */
.ccard{display:none}
@media (max-width:899px){
  .top-m{cursor:pointer}
  .ccard{display:block;position:fixed;z-index:61;top:calc(64px + env(safe-area-inset-top,0px) + var(--s-1));left:max(var(--s-4),env(safe-area-inset-left,0px));width:min(288px,calc(100vw - 2 * var(--s-4)));box-sizing:border-box;padding:var(--s-3) var(--s-2) var(--s-2);border-radius:var(--r-12);background:var(--panel);border:1px solid var(--line);box-shadow:var(--sh-pop);transform-origin:top left;opacity:0;transform:translateY(calc(-1 * var(--s-1))) scale(.97);pointer-events:none;transition:opacity var(--dur-fast) var(--ease),transform var(--dur-base) var(--ease)}
  .ccard.on{opacity:1;transform:none;pointer-events:auto}
  .cc-hd{display:flex;align-items:center;gap:var(--s-3);padding:0 var(--s-2) var(--s-3)}
  .cc-hd i{flex:none;width:24px;height:24px;border-radius:50% 50% 50% 0;background:var(--brand) url(media/pfp-red.webp) center/cover no-repeat}
  .cc-hd b{display:block;font:600 var(--fs-ui)/var(--lh-title) var(--t-font);color:var(--tx)}
  .cc-row{all:unset;box-sizing:border-box;cursor:pointer;display:flex;align-items:center;justify-content:space-between;width:100%;height:44px;padding:0 var(--s-2);border-radius:var(--r-4);font:500 var(--fs-ui)/var(--lh-none) var(--t-font);color:var(--tx);text-decoration:none;transition:background var(--dur-fast) var(--ease)}
  .cc-row svg{width:18px;height:18px;color:var(--tx-3)}
  .cc-row:active{background:var(--hover)}
  .cc-row:focus-visible{outline:2px solid var(--sel);outline-offset:-2px}
  /* Copy email success: label and icon blur from one state into the other, the check draws in */
  .cc-sw,.cc-ic{position:relative;display:inline-grid}
  .cc-sw>span,.cc-ic>span{grid-area:1/1;display:flex;align-items:center;transition:opacity var(--dur-base) var(--ease),filter var(--dur-base) var(--ease),transform var(--dur-base) var(--ease)}
  .cc-ic{justify-items:end}
  .cc-mail .cc-b{opacity:0;filter:blur(6px);transform:translateY(var(--s-1))}
  .cc-mail.ok .cc-a{opacity:0;filter:blur(6px);transform:translateY(calc(-1 * var(--s-1)))}
  .cc-mail.ok .cc-b{opacity:1;filter:blur(0);transform:none}
  .cc-mail .cc-sw .cc-b,.cc-mail.ok .cc-ic svg{color:var(--sel-tx)}
  .cc-mail .cc-ic .cc-b path{stroke-dasharray:24;stroke-dashoffset:24}
  .cc-mail.ok .cc-ic .cc-b path{stroke-dashoffset:0;transition:stroke-dashoffset var(--dur-slow) var(--ease) .12s}
}
@media (max-width:899px) and (prefers-reduced-motion:reduce){.cc-sw>span,.cc-ic>span{transition:none;filter:none!important;transform:none!important}.cc-mail .cc-ic .cc-b path{stroke-dashoffset:0;transition:none}}
@media (max-width:899px) and (prefers-reduced-motion:reduce){.ccard{transition:none}}

/* Down-arrow button (Nov 28, Home View work): the arrow nudges down on hover instead of right */
@media (hover:hover){.btn.btn-down:hover svg{transform:translateY(3px)}}
/* Nov 29: LinkedIn and Résumé sit in the desktop nav after the pages, on the same rhythm as the page links; a small icon says where each goes.
   Phones keep them in the face pin's contact card */
.hnav .nx{display:inline-flex;align-items:center;gap:var(--s-1)}
.hnav .nx svg{width:16px;height:16px;flex:none;color:var(--tx-3);transition:color var(--dur-fast) var(--ease)}
@media (hover:hover){.hnav .nx:hover svg{color:var(--tx)}}
@media (max-width:899px){.hnav .nx{display:none}}
/* Overview button (Nov 29): compact by default, just the zoom-to-fit icon in a 48px round control; the label slides
   out on hover or focus, and stays out while Overview is on. On Home it toggles the board; every other page gets the
   same control (topbar.js) linking to Home's board, zoomed out. Desktop only */
html body .ovsw{gap:0;min-width:48px;justify-content:center;padding:0 var(--s-3);transition:padding var(--dur-base) var(--ease),background var(--dur-fast) var(--ease),opacity var(--dur-base) var(--ease),scale var(--dur-fast) var(--ease)}
.ovsw .ov-l{display:inline-block;max-width:0;opacity:0;overflow:hidden;white-space:nowrap;transition:max-width var(--dur-base) var(--ease),opacity var(--dur-fast) var(--ease),margin var(--dur-base) var(--ease)}
html body .ovsw:hover,html body .ovsw:focus-visible,html body .ovsw[aria-pressed="true"]{padding:0 var(--s-4)}
.ovsw:hover .ov-l,.ovsw:focus-visible .ov-l,.ovsw[aria-pressed="true"] .ov-l{max-width:8em;opacity:1;margin-left:var(--s-3)}
.ovx{position:fixed;right:max(20px,env(safe-area-inset-right,0px));bottom:calc(20px + env(safe-area-inset-bottom,0px));z-index:40;box-sizing:border-box;display:inline-flex;align-items:center;height:48px;border-radius:var(--r-pill);background:var(--panel);border:1px solid var(--line);color:var(--tx);font:600 var(--fs-label)/var(--lh-none) var(--t-font);text-decoration:none;box-shadow:var(--sh-float)}
.ovx svg{width:20px;height:20px;flex:none}
@media (hover:hover){.ovx:hover{background:var(--hover)}}
.ovx:focus-visible{outline:2px solid var(--sel);outline-offset:2px}
@media (max-width:899px){.ovx{display:none}}

/* the pendulum swing a pinned proof makes when it levels out (one overshoot of about a third, settles in 0.9s) */
:root{--swing:linear(0,0.076,0.268,0.521,0.786,1.021,1.199,1.307,1.346,1.326,1.263,1.177,1.085,1.002,0.937,0.897,0.881,0.886,0.906,0.935,0.967,0.996,1.019,1.034,1.041,1.04,1.034,1.024,1.013,1.002,0.994,0.989,0.986,0.986,0.988,0.991,1)}
/* Nov 29: Proof wall components (ported from the previous site's wall, Nov 16).
   Proof: a pinned proof card. Panel, hairline, --r-6, --sh-float; a chili pin; it hangs from the pin with a slight tilt and
   swings level like a pendulum on hover (one overshoot, settles in 0.9s), the shadow deepening to --sh-pop. Dimmed proofs go grey */
.proof{position:absolute;width:240px;box-sizing:border-box;padding:var(--s-3) var(--s-3) var(--s-4);background:var(--panel);border:1px solid var(--line);border-radius:var(--r-6);box-shadow:var(--sh-float);cursor:zoom-in;rotate:var(--tilt,0deg);transform-origin:50% 0;
  transition:rotate var(--dur-base) var(--ease),box-shadow var(--dur-base) var(--ease),opacity var(--dur-base) var(--ease),filter var(--dur-base) var(--ease)}
.proof::before{content:"";position:absolute;top:-5px;left:50%;width:10px;height:10px;margin-left:-5px;border-radius:50%;background:var(--sel);box-shadow:0 1px 2px rgba(0,0,0,.3)}
.proof img{display:block;width:100%;height:auto;border-radius:var(--r-4);background:var(--ph);pointer-events:none;-webkit-user-drag:none}
.proof-cap{display:grid;gap:var(--s-1);margin-top:var(--s-3)}
.proof-cap b{font:600 var(--fs-ui)/var(--lh-snug) var(--t-font);color:var(--tx);text-wrap:balance}
.proof-cap span{font:500 var(--fs-tag)/var(--lh-snug) var(--f-ui);color:var(--tx-3);font-variant-numeric:tabular-nums}
.proof.dim{opacity:.18;filter:grayscale(1)}
.proof:focus-visible{outline:2px solid var(--sel);outline-offset:3px}
@supports (transition-timing-function:linear(0,1)){.proof{transition:rotate .9s var(--swing),box-shadow var(--dur-base) var(--ease),opacity var(--dur-base) var(--ease),filter var(--dur-base) var(--ease)}}
@media (hover:hover){.proof:not(.dim):hover{rotate:0deg;box-shadow:var(--sh-pop)}}
@media (prefers-reduced-motion:reduce){.proof{transition:none}}
/* Menu: a popover of radio rows in groups (the wall's Filter). Panel, hairline, --r-16, --sh-pop. Group label in the label face,
   rows 40 tall (44 on touch), muted until picked; the pick gets a soft chili fill, ink label and a chili dot */
.menu{position:absolute;left:0;top:calc(100% + var(--s-2));z-index:6;display:grid;grid-template-columns:auto auto;column-gap:var(--s-2);align-items:start;padding:var(--s-2);background:var(--panel);border:1px solid var(--line);border-radius:var(--r-16);box-shadow:var(--sh-pop);transform-origin:top left;animation:menu-in var(--dur-fast) var(--ease)}
.menu[hidden]{display:none}
@keyframes menu-in{from{opacity:0;scale:.96}}
.menu-grp{display:grid;gap:2px;min-width:200px}
.menu-grp>span{padding:var(--s-3) var(--s-3) var(--s-1);font:600 var(--fs-tag)/var(--lh-none) var(--f-ui);color:var(--tx-3)}  /* Nov 30: a step smaller than the rows and tucked onto them, so the group label never reads as a row */
.menu button{all:unset;box-sizing:border-box;position:relative;display:flex;align-items:center;gap:var(--s-3);height:40px;padding:0 var(--s-3);border-radius:var(--r-10);font:500 var(--fs-label)/var(--lh-none) var(--t-font);color:var(--tx-2);cursor:pointer}
@media (hover:none){.menu button{height:44px}}
.menu button i{margin-left:auto;font:500 var(--fs-tag)/var(--lh-none) var(--f-ui);font-style:normal;color:var(--tx-3);font-variant-numeric:tabular-nums}
.menu button:is(:hover,:focus-visible):not([aria-checked="true"]){background:var(--hover);color:var(--tx)}
.menu button:focus-visible{outline:2px solid var(--sel);outline-offset:-2px}
.menu button[aria-checked="true"]{background:color-mix(in oklab,var(--sel) 12%,var(--panel));color:var(--tx)}
/* Dec 1: the soft chili fill and ink label mark the pick on their own (the dot was cut) */
@media (max-width:599px){.menu{grid-template-columns:1fr;max-height:calc(100svh - 200px);overflow:auto}}
@media (prefers-reduced-motion:reduce){.menu{animation:none}}
/* the lightbox's link under a caption (the wall's "See the case study") */
.lb-go{display:inline-flex;align-items:center;gap:var(--s-2);margin-left:var(--s-4);min-height:44px;font:600 var(--fs-label)/var(--lh-none) var(--t-font);color:var(--tx);text-decoration:none;vertical-align:middle}
.lb-go svg{width:18px;height:18px;color:var(--sel);transition:transform var(--dur-fast) var(--ease)}
@media (hover:hover){.lb-go:hover svg{transform:translateX(3px)}}
/* Nov 29: visually hidden, still read by screen readers (the About stats' real numbers, the skip link at rest) */
.vh{position:absolute!important;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}
/* Nov 29: skip link, the first Tab stop on every page. A small button parked above the screen until it has focus */
.skip{position:fixed;z-index:200;left:calc(max(0px,(100% - var(--wrap)) / 2) + var(--gut));top:calc(64px + var(--s-2));transform:translateY(calc(-100% - 64px - var(--s-5)));transition:transform var(--dur-fast) var(--ease)}
.skip:focus,.skip:focus-visible{transform:none}
/* Nov 29: the top bar pin waves once on a first phone visit (topbar.js), pivoting on its point */
.top-m i.wave{transform-origin:0 100%;animation:pin-wave var(--dur-slow) var(--ease) both}
@keyframes pin-wave{0%{rotate:0deg}25%{rotate:-14deg}50%{rotate:9deg}75%{rotate:-5deg}100%{rotate:0deg}}
/* Nov 29: press feedback. Buttons dip to 97% while pressed (instant down, eased back up) */
.btn:active,.thsw:active,.ovsw:active,button.rpill:active{scale:.97;transition-duration:0s}
/* Nov 29: instant theme switch. For one frame while the theme flips, nothing transitions, so every color changes at once instead of fading at different speeds */
html.th-flip *,html.th-flip *::before,html.th-flip *::after{transition:none!important}
/* Nov 30: small Outcome (.ocm.sm), for tight spots like the Quick look sheet: UI-size (15px) text, tighter padding, a 20px pin.
   */
.ocm.sm{font-size:var(--fs-ui);padding:var(--s-2) var(--s-3) var(--s-3);box-shadow:var(--sh-float)}
.ocm.sm::before{left:var(--s-3);top:var(--s-2);width:20px;height:20px}
.ocm.sm b{padding-left:calc(20px + var(--s-2));line-height:20px;margin-bottom:var(--s-1)}

/* Chai peek (Nov 30, from the previous site): the sleepy sticker sits on the very bottom of the page, cropped at the bottom
   (object-fit, no transform, so the page does not grow) so her head and paws come up over the page edge. Still, no motion.
   Hover, focus or a tap shows a label-only .fpill above her. About and Photo end with her */
.chai-pk{position:relative;display:block;width:116px;height:60px;margin:var(--s-8) auto 0;outline:0;-webkit-tap-highlight-color:transparent}
.chai-pk>img{display:block;width:100%;height:100%;object-fit:cover;object-position:50% 0}
.chai-pk .chai-tip{position:absolute;left:50%;bottom:calc(100% + var(--s-2));translate:-50% 0;height:auto;padding:var(--s-2) var(--s-4);background:var(--panel);border:1px solid var(--line);box-shadow:var(--sh-float);white-space:nowrap;opacity:0;pointer-events:none;transition:opacity var(--dur-fast) var(--ease)}
.chai-pk:is(:hover,:focus,:active) .chai-tip{opacity:1}
.chai-pk:focus-visible>img{outline:2px solid var(--sel);outline-offset:2px;border-radius:var(--r-4)}
.foot:has(.chai-pk){padding-bottom:0}
.foot .chai-pk{margin-top:var(--s-7)}

/* Pill icon button (Dec 1): the Overview button's look as an in-page control. A 48px round button with an icon that slides its
   label out on hover, keyboard focus, while its menu is open and while it's on (aria-pressed: chili fill). First use: the Work filter */
.fbtn{all:unset;box-sizing:border-box;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;flex:none;height:48px;min-width:48px;padding:0 var(--s-3);border-radius:var(--r-pill);background:var(--panel);border:1px solid var(--line);color:var(--tx);font:600 var(--fs-label)/var(--lh-none) var(--t-font);box-shadow:var(--sh-float);transition:padding var(--dur-base) var(--ease),background var(--dur-fast) var(--ease),scale var(--dur-fast) var(--ease)}
.fbtn svg{width:20px;height:20px;flex:none}
.fbtn .ov-l{display:inline-block;max-width:0;opacity:0;overflow:hidden;white-space:nowrap;transition:max-width var(--dur-base) var(--ease),opacity var(--dur-fast) var(--ease),margin var(--dur-base) var(--ease)}
.fbtn:is(:hover,:focus-visible,[aria-expanded="true"],[aria-pressed="true"]){padding:0 var(--s-4)}
.fbtn:is(:hover,:focus-visible,[aria-expanded="true"],[aria-pressed="true"]) .ov-l{max-width:14em;opacity:1;margin-left:var(--s-3)}
@media (hover:hover){.fbtn:hover{background:var(--hover)}}
.fbtn[aria-pressed="true"]{background:var(--sel)!important;border-color:var(--sel)!important;color:var(--on-sel)}
.fbtn:focus-visible{outline:2px solid var(--sel);outline-offset:2px}
.fbtn:active{scale:.97;transition-duration:0s}
@media (prefers-reduced-motion:reduce){.fbtn,.fbtn .ov-l{transition:none}}
/* Dec 1, touch screens (animation tips pass). A tap leaves :hover stuck on, so hover-only motion is turned back off where
   there's no mouse, and small controls get a 44px tap height without changing how they look */
@media (hover:none){
  .top-m:hover i{transform:none}
  .btn:hover::before,.cta:hover::before{opacity:0}
  .btn:hover .ct{transform:none}
  .fbtn:hover:not([aria-expanded="true"]):not([aria-pressed="true"]){padding:0 var(--s-3)}
  .fbtn:hover:not([aria-expanded="true"]):not([aria-pressed="true"]) .ov-l{max-width:0;opacity:0;margin-left:0}
}
@media (pointer:coarse){
  .thsw{min-width:44px;min-height:44px}
  .top .hnav a{padding-block:12px;margin-block:-12px}
}

/* Dec 1: the old photo during a lightbox step (lightbox.js), fixed over the stage while it crossfades out */
.lb-stage img.lb-ghost{position:fixed;z-index:1;margin:0;max-width:none;max-height:none;object-fit:contain;pointer-events:none;border-radius:var(--r-14);transition:none;will-change:transform,opacity}
.lbox figure img{will-change:transform}

/* Dec 1: motion effects (fx.js) */
#chero h1 em.fx-sweep{background:linear-gradient(105deg,var(--sel) 0 40%,color-mix(in oklab,var(--sel) 25%,#fff) 50%,var(--sel) 60% 100%);background-size:300% 100%;background-position:100% 0;-webkit-background-clip:text;background-clip:text;color:transparent;animation:fx-sweep 1.3s var(--ease) both}
@keyframes fx-sweep{to{background-position:0 0}}
.term .fx-hold{opacity:0;transform:translateY(4px)}
.term .fx-hold,.term-body>*{transition:opacity var(--dur-base) var(--ease),transform var(--dur-base) var(--ease)}
.fx-par{overflow:hidden;border-radius:var(--r-14)}
.fx-par img{will-change:transform;transform-origin:50% 40%}
@media (prefers-reduced-motion:reduce){#chero h1 em.fx-sweep{animation:none;background:none;color:inherit}}

/* Dec 3: Chai chat helper (chai.js). Button: a round icon button with Chai's face. Panel: a comment card (panel, hairline, --r-16, --sh-pop) */
.thsw.chai-b{padding:0;color:var(--tx)}
.chai-b .ov-ic{display:grid;place-items:center}.chai-b .ov-ic>*{grid-area:1/1}.chai-b .ov-ic>svg{width:24px;height:24px}
.chai-pinp{fill:var(--sel)}.chai-d{fill:var(--on-sel);transform-box:fill-box;transform-origin:center}
.chai-b svg{transition:opacity var(--dur-fast) var(--ease),rotate var(--dur-base) var(--ease-pop),scale var(--dur-base) var(--ease-pop)}
.chai-b .chai-ic{transform-origin:12px 21px}
.chai-b .ov-xi{opacity:0;rotate:-90deg;scale:.6;width:20px!important;height:20px!important}
.chai-b[aria-expanded="true"] .chai-ic{opacity:0;rotate:90deg;scale:.6}.chai-b[aria-expanded="true"] .ov-xi{opacity:1;rotate:0deg;scale:1}
.chai-b.wave .chai-d,.chai-b:hover .chai-d{animation:chai-w .9s var(--ease-io)}
.chai-b .chai-d:nth-of-type(2){animation-delay:.12s}.chai-b .chai-d:nth-of-type(3){animation-delay:.24s}
@keyframes chai-w{25%{translate:0 -2.5px}50%{translate:0 0}}
.chai-b:hover .chai-ic{rotate:-6deg}
@media (hover:none){.chai-b:hover .chai-ic{rotate:0deg}.chai-b:hover .chai-d{animation:none}}
@media (prefers-reduced-motion:reduce){.chai-b svg{transition:none}.chai-b .chai-d{animation:none!important}}
/* desktop: a 48px floating circle (panel ring, --sh-float) stacked --s-3 above the Overview circle */

.chai-b img{width:100%;height:100%;object-fit:cover;border-radius:inherit}
.chai{position:fixed;z-index:80;bottom:calc(20px + 96px + var(--s-3) * 2 + env(safe-area-inset-bottom,0px));right:max(20px,env(safe-area-inset-right,0px));width:min(400px,calc(100vw - 40px));height:min(620px,calc(100svh - 230px));
 display:flex;flex-direction:column;box-sizing:border-box;background:var(--panel);border:1px solid var(--line);border-radius:var(--r-16);box-shadow:var(--sh-pop);color:var(--tx);font:500 var(--fs-ui)/var(--lh-copy) var(--t-font);
 opacity:0;translate:0 8px;scale:.98;transform-origin:bottom right;transition:opacity var(--dur-fast) var(--ease),translate var(--dur-base) var(--ease),scale var(--dur-base) var(--ease)}
.chai.on{opacity:1;translate:0;scale:1}
.chai-h{display:flex;align-items:center;gap:var(--s-3);padding:var(--s-4) var(--s-4) var(--s-3) var(--s-5)}
.chai-h div{flex:1;min-width:0;display:flex;flex-direction:column}.chai-h b{font:700 var(--fs-body)/var(--lh-title) var(--t-font)}.chai-h span{font:500 var(--fs-label)/var(--lh-snug) var(--t-font);color:var(--tx-3)}
.chai-av,.chai-pin{flex:none;display:block;border-radius:50% 50% 50% 0;overflow:hidden;background:var(--sel)}
.chai-av{width:36px;height:36px}.chai-pin{width:24px;height:24px;margin-top:2px}.chai-av img,.chai-pin img{width:100%;height:100%;object-fit:cover;display:block}
.chai-log{flex:1;overflow:auto;overscroll-behavior:contain;padding:var(--s-2) var(--s-5) var(--s-4);display:flex;flex-direction:column;gap:var(--s-4);scrollbar-width:thin}
.chai-m.bot{display:flex;gap:var(--s-3);align-items:flex-start}.chai-t{min-width:0;padding-top:2px}
.chai-t p,.chai-m.me p{margin:0}.chai-t p+p,.chai-t ul{margin-top:var(--s-2)}.chai-t ul{padding-left:1.1em;margin-bottom:0}.chai-t li+li{margin-top:var(--s-1)}
.chai-t a{color:var(--sel-tx);text-underline-offset:2px}
.chai-m.me{align-self:flex-end;max-width:85%;padding:var(--s-2) var(--s-4);border-radius:var(--r-12);background:var(--hover)}
.chai-st{display:flex;flex-wrap:wrap;gap:var(--s-2);padding:0 var(--s-5) var(--s-3)}.chai-st:empty{display:none}





.chai-n{margin:var(--s-2) var(--s-5) var(--s-3);font:500 var(--fs-tag)/var(--lh-snug) var(--f-ui);color:var(--tx-3);text-align:center}
.chai-dots{display:inline-flex;gap:4px;padding:8px 0}.chai-dots i{width:6px;height:6px;border-radius:50%;background:var(--tx-3);animation:chai-d 1s var(--ease-io) infinite}
.chai-dots i:nth-child(2){animation-delay:.15s}.chai-dots i:nth-child(3){animation-delay:.3s}@keyframes chai-d{50%{opacity:.3;translate:0 -3px}}
@media (max-width:899px){.chai{top:auto;left:0;right:0;bottom:0;width:auto;height:min(82svh,640px);border-radius:var(--r-16) var(--r-16) 0 0;padding-bottom:env(safe-area-inset-bottom,0px);translate:0 24px;transform-origin:bottom center}}
@media (prefers-reduced-motion:reduce){.chai{transition:opacity var(--dur-fast) linear;translate:none;scale:none}.chai-dots i{animation:none}}

/* Dec 3: Chai navigation: New chat button beside Close, stop while answering, follow-up chips */

.chai-h b{line-height:var(--lh-none)}.chai-h span{margin-top:2px}
.chai-go svg{width:18px;height:18px;grid-area:1/1;transition:opacity var(--dur-fast) var(--ease),scale var(--dur-fast) var(--ease-pop)}.chai-go{display:grid}
.chai-go .chai-sq{opacity:0;scale:.6}.chai-go.stop svg:first-child{opacity:0;scale:.6}.chai-go.stop .chai-sq{opacity:1;scale:1}
.chai-log{transition:opacity var(--dur-fast) var(--ease)}.chai-log.chai-clr{opacity:0}
.chai-m{animation:chai-in var(--dur-base) var(--ease)}@keyframes chai-in{from{opacity:0;translate:0 6px}}
.chai-st .chai-s{animation:chai-in var(--dur-base) var(--ease) both}.chai-st .chai-s:nth-child(2){animation-delay:60ms}.chai-st .chai-s:nth-child(3){animation-delay:120ms}.chai-st .chai-s:nth-child(4){animation-delay:180ms}
@media (prefers-reduced-motion:reduce){.chai-m,.chai-st .chai-s{animation:none}}

/* Dec 3: name mark Ch.ai, the .ai in chili */
.chai-h b em{font-style:normal;color:var(--sel)}
/* Dec 3 phone pass */
.chai-grab{display:none}
@media (max-width:899px){
 .chai{bottom:var(--kb,0px);height:min(86svh,680px,calc(var(--vh,100svh) - 24px));padding-bottom:calc(var(--s-2) + env(safe-area-inset-bottom,0px))}
 .chai-grab{display:block;width:36px;height:4px;margin:var(--s-2) auto 0;border-radius:var(--r-pill);background:var(--line);flex:none}
 .chai-h{padding:var(--s-2) var(--s-3) var(--s-2) var(--s-4);touch-action:none}

 .chai-log{padding:var(--s-2) var(--s-4) var(--s-3)}
 .chai-st{flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;padding:0 var(--s-4) var(--s-3);scroll-padding:0 var(--s-4)}.chai-st::-webkit-scrollbar{display:none}

 
 .chai-n{margin:var(--s-2) var(--s-4) 0}
 html.chai-lock,html.chai-lock body{overflow:hidden;overscroll-behavior:none}
}
/* Dec 3: with Ch.ai in the top bar on phones, round buttons never shrink, and the smallest phones tighten the nav gaps */
.top .thsw{flex:none}
@media (max-width:379px){.top .wrap{gap:var(--s-2);padding-left:16px;padding-right:16px}.top .hnav{gap:var(--s-3);margin-right:var(--s-1)}.top .thsw{width:36px;height:36px}}
/* Dec 3: Ch.ai placement. One inner edge for every row (--pad-card), s-4 between blocks, s-3 inside; the header avatar and reply pins
   share a 36px column so the name and every reply start on one line; the header's buttons end on the same right edge as the field */
.chai .chai-h{padding:var(--s-4) var(--pad-card) var(--s-3);gap:var(--s-3)}
.chai .chai-h .thsw.sm+.thsw.sm{margin-left:calc(var(--s-1) * -1)}
.chai .chai-log{padding:var(--s-2) var(--pad-card) var(--s-4);gap:var(--s-4)}
.chai .chai-m.bot{display:grid;grid-template-columns:36px 1fr;gap:var(--s-3)}
.chai .chai-pin{margin-top:1px}
.chai .chai-st{padding:0 var(--pad-card) var(--s-3);gap:var(--s-2)}
.chai .chai-f{margin:0 var(--pad-card)}
.chai .chai-n{margin:var(--s-3) var(--pad-card) var(--s-4)}
@media (max-width:899px){.chai .chai-h{padding:var(--s-2) var(--pad-card) var(--s-3)}.chai .chai-h .thsw.sm{width:44px;height:44px}.chai .chai-n{margin-bottom:0}.chai .chai-st .chip{flex:none}}
/* Dec 3: size tokens and component variants (from the Ch.ai pass, for reuse anywhere) */
:root{--h-control:52px;--sz-icon:40px;--sz-icon-sm:36px;--pad-card:var(--s-5)}
@media (max-width:899px){:root{--h-control:48px;--pad-card:var(--s-4)}}
/* Small round icon button: inside panels and card headers */
.thsw.sm{width:var(--sz-icon-sm);height:var(--sz-icon-sm);flex:none}.thsw.sm svg{width:18px;height:18px}
/* Outlined chip: a chip on a panel surface, where the filled chip would vanish. Can be a button */
.chip.out{background:none;border:1px solid var(--line);padding:var(--s-2) var(--s-4);font-size:var(--fs-label);line-height:var(--lh-snug);color:var(--tx-2);transition:background var(--dur-fast) var(--ease),color var(--dur-fast) var(--ease)}
button.chip.out{cursor:pointer;-webkit-appearance:none;appearance:none;margin:0}
button.chip.out:hover{background:var(--hover);color:var(--tx)}button.chip.out:focus-visible{outline:2px solid var(--sel);outline-offset:1px}
@media (hover:none){button.chip.out:hover{background:none;color:var(--tx-2)}}
/* Field: a text field with one nested action. Control height, --r-12, inset s-2; the action's radius is the field's minus the inset (--r-4) */
.field{display:flex;align-items:center;gap:var(--s-2);box-sizing:border-box;min-height:var(--h-control);padding:var(--s-2) var(--s-2) var(--s-2) var(--s-4);border:1px solid var(--btn-line);border-radius:var(--r-12);background:var(--canvas)}
.field:focus-within{border-color:var(--tx-3)}
.field>textarea,.field>input{all:unset;flex:1;min-width:0;font:500 16px/var(--lh-copy) var(--t-font);color:var(--tx)}
.field>textarea::placeholder,.field>input::placeholder{color:var(--tx-3)}
.field-go{all:unset;cursor:pointer;flex:none;display:grid;place-items:center;width:var(--sz-icon-sm);height:var(--sz-icon-sm);border-radius:var(--r-4);background:var(--cta);color:var(--on-sel);transition:scale var(--dur-fast) var(--ease)}
.field-go:active{scale:.97;transition-duration:0s}.field-go:focus-visible{outline:2px solid var(--sel);outline-offset:2px}

.chai-f textarea{resize:none;max-height:120px;overflow:auto;padding:var(--s-1) 0}

/* Dec 3: Ch.ai log edge fades: a 48px mask at the bottom (above the suggestions) and 32px at the top, on only while more content sits past that edge */
.chai .chai-log{--ft:0px;--fb:0px;-webkit-mask-image:linear-gradient(to bottom,transparent 0,#000 var(--ft),#000 calc(100% - var(--fb)),transparent 100%);mask-image:linear-gradient(to bottom,transparent 0,#000 var(--ft),#000 calc(100% - var(--fb)),transparent 100%);transition:--ft var(--dur-base) var(--ease),--fb var(--dur-base) var(--ease),opacity var(--dur-fast) var(--ease)}
.chai .chai-log.fade-t{--ft:32px}.chai .chai-log.fade-b{--fb:48px}
@property --ft{syntax:"<length>";inherits:false;initial-value:0px}@property --fb{syntax:"<length>";inherits:false;initial-value:0px}

/* Dec 3: cartoon Chai (chai.js DOG()). Flat shapes in her real colors (Firefly reference, flat version: light cream-tan scalloped curls, a bright white muzzle, darker tan ears, cream muzzle, brown eyes and nose, open smile), a Tiffany-blue collar with her silver bone tag; sits on the chili comment pin.
   Motion: blinks every 5s, an ear twitches every 9s, the head tilts and the eyes look up while she thinks, the tongue comes out for a treat */
:root{--dog-fur:#EFD3AE;--dog-ear:#DDB081;--dog-curl:#DDB081;--dog-face:#F8E7CD;--dog-muzzle:#FFFFFF;--dog-ink:#2A1B12;--dog-iris:#7A3E22;--dog-nose:#5E2E1F;--dog-mouth:#6E2A22;--dog-collar:#2FB8A8;--dog-tag:#C9CED4;--dog-tongue:#E8838E}
.chai-av,.chai-pin{background:var(--brand)}
.dog{display:block;width:100%;height:100%;overflow:visible}
.dog-f{fill:var(--dog-fur)}.dog-e{fill:var(--dog-ear)}.dog-m{fill:var(--dog-muzzle)}.dog-toe,.dog-leg{fill:none;stroke:var(--dog-ear);stroke-width:1.1;stroke-linecap:round}.dog-leg{stroke-width:1.3}.dog-fc{fill:var(--dog-face)}.dog-k{fill:var(--dog-ink)}.dog-w{fill:#fff}.dog-b{fill:none;stroke:var(--dog-collar);stroke-width:2.8;stroke-linecap:round}.dog-i{fill:var(--dog-iris)}.dog-mo{fill:var(--dog-mouth)}.dog-c{fill:none;stroke:var(--dog-curl);stroke-width:1.4;stroke-linecap:round}.dog-tag{fill:var(--dog-tag)}.dog-n{fill:var(--dog-nose)}
.dog-l{fill:none;stroke:var(--dog-ink);stroke-width:1.3;stroke-linecap:round}.dog-t{fill:var(--dog-tongue);transform-origin:50% 0}
.dog-eye,.dog-el,.dog-er,.dog-h,.dog-t{transform-box:fill-box}
.dog-eye{transform-origin:center;animation:dog-blink 5s infinite}
.dog-el{transform-origin:70% 15%;animation:dog-ear 9s var(--ease) infinite}
.dog-h,.dog-el,.dog-er{transition:rotate var(--dur-base) var(--ease-pop),translate var(--dur-base) var(--ease-pop)}.dog-h{transform-origin:50% 90%}
.dog-er{transform-origin:30% 15%}
.dog-ey{transition:translate var(--dur-base) var(--ease)}
@keyframes dog-blink{0%,94%,100%{scale:1 1}96%{scale:1 .1}}
@keyframes dog-ear{0%,88%,100%{rotate:0deg}91%{rotate:-12deg}94%{rotate:4deg}}
.chai.think .chai-av .dog-h{rotate:-8deg}.chai.think .chai-av .dog-ey{translate:0 -1px}.chai.think .chai-av .dog-er{rotate:-10deg}
.chai.happy .chai-av .dog-t{scale:1.25 1.9;transition:scale var(--dur-fast) var(--ease-pop)}.dog-t{transition:scale var(--dur-base) var(--ease)}
.chai.happy .chai-av .dog{animation:dog-hop .5s var(--ease-pop) 2}
@keyframes dog-hop{50%{translate:0 -3px}}
.chai-pin .dog-eye{animation-delay:1.3s}.chai-pin .dog-el{animation:none}
@media (prefers-reduced-motion:reduce){.dog-eye,.dog-el,.chai.happy .chai-av .dog{animation:none}.dog-h,.dog-el,.dog-er,.dog-ey{transition:none}}

/* Dec 3: Chai's card. Her header face is a button; the card covers the chat panel (panel fill, same inner edge),
   with a 120px Chai on the chili pin, name and title, her facts as label and value rows, and a small chili button */
button.chai-av{all:unset;box-sizing:border-box;cursor:pointer;flex:none;width:36px;height:36px;border-radius:50% 50% 50% 0;overflow:hidden;background:var(--brand);transition:scale var(--dur-fast) var(--ease-pop)}
button.chai-av:hover{scale:1.08}button.chai-av:active{scale:.97;transition-duration:0s}button.chai-av:focus-visible{outline:2px solid var(--sel);outline-offset:2px}
.chai-card{position:absolute;inset:0;z-index:2;display:flex;flex-direction:column;align-items:center;box-sizing:border-box;padding:var(--s-7) var(--pad-card) var(--pad-card);border-radius:inherit;background:var(--panel);text-align:center;overflow:auto;
 opacity:0;translate:0 8px;transition:opacity var(--dur-fast) var(--ease),translate var(--dur-base) var(--ease)}
.chai-card[hidden]{display:none}.chai-card.on{opacity:1;translate:0}.chai-cn em{font-style:normal;color:var(--sel)}
.chai-cx{position:absolute;top:var(--s-4);right:var(--pad-card)}
.chai-big{display:block;width:120px;height:120px;border-radius:50% 50% 50% 0;overflow:hidden;background:var(--brand);flex:none}
.chai-cn{margin-top:var(--s-4);font:900 var(--fs-band)/var(--lh-display) var(--d-font)}
.chai-cs{margin-top:var(--s-1);font:500 var(--fs-label)/var(--lh-snug) var(--t-font);color:var(--tx-3)}
.chai-facts{align-self:stretch;margin:var(--s-5) 0 0;text-align:left}
.chai-facts div{display:grid;grid-template-columns:112px 1fr;gap:var(--s-3);padding:var(--s-2) 0}
.chai-facts dt{font:500 var(--fs-label)/var(--lh-snug) var(--t-font);color:var(--tx-3)}.chai-facts dd{margin:0;font:500 var(--fs-ui)/var(--lh-snug) var(--t-font);color:var(--tx)}
.chai-treat{margin-top:var(--s-5)}
.chai-ok{min-height:1.4em;margin-top:var(--s-3);font:500 var(--fs-label)/var(--lh-snug) var(--t-font);color:var(--sel-tx)}
.chai-card .dog-el{animation-duration:6s}
.chai-card.happy .dog-t{scale:1.25 1.9;transition:scale var(--dur-fast) var(--ease-pop)}.chai-card.happy .dog{animation:dog-hop .5s var(--ease-pop) 2}
@media (prefers-reduced-motion:reduce){.chai-card{transition:opacity var(--dur-fast) linear;translate:none}.chai-card.happy .dog{animation:none}}

/* Dec 3: Ch.ai profile aligned to the system: rows sit on a shared baseline (label --fs-label --tx-3, value --fs-ui), s-2 apart,
   no dividers; the main action is a standard .btn at control height; the line under it holds its space */
.chai-card{padding:calc(var(--s-4) + var(--sz-icon-sm) + var(--s-2)) var(--pad-card) var(--pad-card)}
.chai-facts{margin-top:var(--s-6)}.chai-facts div{align-items:baseline;padding:var(--s-1) 0}.chai-facts div+div{margin-top:var(--s-2)}
.chai-cs{margin-top:var(--s-2)}
.chai-treat{margin-top:var(--s-6)}
/* the flung pup cup: flat clip art in tokens (cup in --panel-light paper with a chili stripe, cream swirl) */
.chai-fly{position:absolute;z-index:3;width:30px;height:38px;margin:-19px 0 0 -15px;pointer-events:none}
.chai-fly-y{display:block;width:100%;height:100%}.chai-fly svg{display:block;width:100%;height:100%;overflow:visible}
.cup-c{fill:#F4EEE6}.cup-s{fill:var(--sel)}.cup-w{fill:#FFFFFF}.cup-l{fill:none;stroke:#E2D7C3;stroke-width:1.2;stroke-linecap:round}
/* Dec 3 fix: nothing in Ch.ai's profile shrinks when the panel is short (the column was squeezing the button to 19px); it scrolls instead */
.chai-card>*{flex-shrink:0}
/* Dec 3: the profile fits the panel without scrolling: 104px Chai, s-5 before the facts and the button, rows s-1 apart */
.chai-big{width:104px;height:104px}.chai-facts{margin-top:var(--s-5)}.chai-facts div+div{margin-top:var(--s-1)}.chai-treat{margin-top:var(--s-5)}.chai-ok{margin-top:var(--s-2)}

/* Dec 3: jump to latest: a small round icon button centered over the bottom of the chat log, fades and rises in only while scrolled up */
.chai-jw{position:relative;height:0;flex:none}
.chai-jump{position:absolute;left:50%;bottom:var(--s-3);z-index:1;margin-left:calc(var(--sz-icon-sm) / -2);box-shadow:var(--sh-float);opacity:0;translate:0 6px;pointer-events:none;
 transition:opacity var(--dur-fast) var(--ease),translate var(--dur-base) var(--ease-pop)}
.chai-jump.on{opacity:1;translate:0;pointer-events:auto}
@media (max-width:899px){.chai-jump{width:44px;height:44px;margin-left:-22px}}

/* Dec 3: Chai's state images. Stacked in the avatar; the later image wins: idle, blink (instant), thinking while she answers, happy for a treat.
   The images carry their own chili ground */
.chs{position:relative;display:block;width:100%;height:100%}
.chs img{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover;opacity:0;transition:opacity var(--dur-fast) var(--ease)}
.chs .s-i{opacity:1}
.chai-av.blink .s-b,.chai-big.blink .s-b{opacity:1;transition:none}
.chai.think .chai-av .s-t,.chai.happy .chai-av .s-h,.chai-card.happy .chai-big .s-h{opacity:1}
.chai.happy .chai-av .chs,.chai-card.happy .chai-big .chs{animation:dog-hop .5s var(--ease-pop) 2}
.chai.think .chai-av .chs{animation:chs-tilt 1.6s var(--ease-io) infinite}
@keyframes chs-tilt{50%{rotate:-4deg}}
.chai-av .chs,.chai-big .chs{transform-origin:50% 85%}
@media (prefers-reduced-motion:reduce){.chs img{transition:none}.chai.happy .chai-av .chs,.chai-card.happy .chai-big .chs,.chai.think .chai-av .chs{animation:none}}
/* Dec 3: the art is scaled up a touch past the pin's edges (anchored low), so the hop and the thinking tilt never open a gap at the bottom */
.chai-av .chs,.chai-big .chs{scale:1.1;transform-origin:50% 75%}
@keyframes dog-hop{50%{translate:0 -3%}}

.chai-fly-l{position:absolute;left:0;top:0;width:100%;z-index:3;pointer-events:none}

/* Dec 3: the pup cup button leads with a small pup cup icon (the flung cup's shape, in the label color) instead of an emoji */
.chai-treat{gap:var(--s-2)}.chai-treat .chai-ti{width:18px;height:22px;flex:none}
/* Dec 3: the pup cup button runs the full width of the profile (inside --pad-card), like the main action on phones (.cta-full),
   so it lines up with the facts above and the chat field's edges */
.chai-treat{align-self:stretch;justify-content:center}

/* Dec 3: on desktop the floating Ch.ai button IS the Overview button component (.ovx .ovsw): same look, same "label slides out on hover
   and focus" behavior with "Ask Ch.ai"; it only sits one step higher. Phones keep the round .thsw in the top bar (label hidden) */
.chai-b .ov-l{display:none}.chai-fl .ov-l{display:inline-block}
.ovx.chai-fl{bottom:calc(20px + 48px + var(--s-3) + env(safe-area-inset-bottom,0px));z-index:41;cursor:pointer;font-family:var(--t-font)}
.ovx.chai-fl[aria-expanded="true"] .ov-l{max-width:0;opacity:0;margin-left:0}html body .ovx.chai-fl[aria-expanded="true"]{padding:0;width:48px;justify-content:center}

/* Dec 3: Chai's face on the Ch.ai button: her idle face in the chili comment pin (24px, 28 on desktop); it turns away into the x when the chat opens,
   gives a small hop every 7s while closed, and tilts on hover. A one-time hello (.hello) shows the button's label like a hover */
.chai-bf{display:block;width:24px;height:24px;border-radius:50% 50% 50% 0;overflow:hidden;background:var(--brand)}
.chai-fl .chai-bf{width:28px;height:28px}
.chai-bf img{display:block;width:100%;height:100%;object-fit:cover;scale:1.1;transform-origin:50% 75%}
.chai-b .chai-ic{transition:opacity var(--dur-fast) var(--ease),rotate var(--dur-base) var(--ease-pop),scale var(--dur-base) var(--ease-pop)}

.ovsw.chai-fl.hello{padding:0 var(--s-4)}.ovsw.chai-fl.hello .ov-l{max-width:8em;opacity:1;margin-left:var(--s-3)}
/* Dec 3 fix: Home's own .ovsw rules made the button static (it sat at the end of the page); pin it here, and size it to 48px at rest */
html body .ovx.chai-fl{position:fixed;right:max(20px,env(safe-area-inset-right,0px));bottom:calc(20px + 48px + var(--s-3) + env(safe-area-inset-bottom,0px));left:auto;top:auto;height:48px;padding:0 9px}
html body .ovsw.chai-fl:is(:hover,:focus-visible,.hello):not([aria-expanded="true"]){padding:0 var(--s-4) 0 9px}

.chs video{position:absolute;inset:0;display:block;width:100%;height:100%;object-fit:cover;pointer-events:none}
/* Dec 3: blinks ease instead of cutting: the closed-eye frame fades in fast and out a little slower (fractions of --dur-fast) */
.chs .s-b{transition:opacity calc(var(--dur-fast) * .5) var(--ease)}
.chai-av.blink .s-b,.chai-big.blink .s-b{transition:opacity calc(var(--dur-fast) * .3) var(--ease)}
@media (prefers-reduced-motion:reduce){.chs .s-b{transition:none}}

/* Dec 3: the closed Ch.ai button only blinks (random, same as the header); no hop, no hover tilt */
.chai-bf .chs img{scale:1.1;transform-origin:50% 75%}.chai-bf>.chs{scale:1}
.chai-bf.blink .s-b{opacity:1;transition:opacity calc(var(--dur-fast) * .3) var(--ease)}
.chai-b:not([aria-expanded="true"]):hover .chai-ic{rotate:0deg}
.pstrip .ps-name .ps-f{color:var(--sel-tx)}

/* Dec 3: sideways chip rows fade at an edge only while there are more chips past it (same as the chat log's vertical fades).
   .hfade + .fade-l / .fade-r are set by script from the scroll position */
.hfade{--hfl:0px;--hfr:0px;-webkit-mask-image:linear-gradient(to right,transparent 0,#000 var(--hfl),#000 calc(100% - var(--hfr)),transparent 100%);mask-image:linear-gradient(to right,transparent 0,#000 var(--hfl),#000 calc(100% - var(--hfr)),transparent 100%);transition:--hfl var(--dur-base) var(--ease),--hfr var(--dur-base) var(--ease)}
.hfade.fade-l{--hfl:24px}.hfade.fade-r{--hfr:40px}
@property --hfl{syntax:"<length>";inherits:false;initial-value:0px}@property --hfr{syntax:"<length>";inherits:false;initial-value:0px}

/* Dec 3: the Ch.ai button ships in the top bar markup so phones paint it with the nav (no shift when the script runs);
   on desktop the script moves it out to float, so the top bar copy never shows there */


/* Dec 3: Ch.ai button on phones: the same floating circle, bottom right (16px in, like the phone gutter), raised above Home's project pager
   and the case reading pill when they show; no hover label on touch */
@media (max-width:899px){
 html body .ovx.chai-fl{display:inline-flex;right:max(16px,env(safe-area-inset-right,0px));bottom:calc(16px + env(safe-area-inset-bottom,0px))}
 html body:has(.pstrip.on) .ovx.chai-fl{bottom:calc(44px + var(--s-3) + env(safe-area-inset-bottom,0px))}
 html body:has(.rpill:not(.off)) .ovx.chai-fl{bottom:calc(16px + 48px + var(--s-3) + env(safe-area-inset-bottom,0px))}
 .ovsw.chai-fl .ov-l{display:none}
}
/* Dec 3 fix: on touch screens a tap leaves :hover stuck, which widened the Ch.ai circle; it stays a 48px circle there */
@media (hover:none),(max-width:899px){html body .ovx.ovsw.chai-fl,html body .ovx.ovsw.chai-fl:is(:hover,:focus-visible,.hello,[aria-expanded="true"]){padding:0 9px;width:48px;min-width:48px}
 .ovsw.chai-fl .ov-l{display:none!important}}
/* Dec 3 fix: the closed chat panel must leave the page (its display:flex beat the hidden attribute, so on phones an invisible sheet
   sat over the bottom of the screen and caught taps) */
.chai[hidden]{display:none}

/* Dec 3: phone sheet with the keyboard up: fills the visible area exactly (top and height from the visual viewport), square bottom corners
   against the keyboard, no slide transition while it tracks */
@media (max-width:899px){
 .chai.kb{top:var(--vt,0px);bottom:auto;height:var(--vh,100svh);max-height:none;border-radius:0;padding-bottom:var(--s-2);translate:none;transition:opacity var(--dur-fast) var(--ease)}
 .chai.kb .chai-grab{display:none}
}

/* Dec 3 fix: replies wrap long words and links instead of scrolling the chat sideways */
.chai .chai-log{overflow-x:hidden}.chai-t,.chai-m.me p{overflow-wrap:anywhere;min-width:0}

/* Dec 3: while typing on a phone the chat keeps every pixel for the conversation: the note and the grab handle hide,
   the header tightens, and the suggestions stay one sideways row */
@media (max-width:899px){
 .chai.kb .chai-n{display:none}
 .chai.kb .chai-h{padding-top:var(--s-2);padding-bottom:var(--s-2)}
 .chai.kb .chai-f{margin-bottom:var(--s-2)}
 .chai.kb .chai-st{padding-bottom:var(--s-2)}
}
/* Dec 3 fix: the jump button sits above the chat log so taps reach it (the log's fade mask made its own layer on top of the button) */
.chai .chai-log{position:relative;z-index:0}.chai .chai-jw{z-index:2}
/* Dec 3: calmer blink: the closed eyes ease in over 60% of --dur-fast and out over the full --dur-fast, both ease-in-out */
.chs .s-b{transition:opacity var(--dur-fast) var(--ease-io)}
.chai-av.blink .s-b,.chai-big.blink .s-b,.chai-bf.blink .s-b{transition:opacity calc(var(--dur-fast) * .6) var(--ease-io)}

/* Dec 4: phone scrim behind the Ch.ai sheet, the same dim as the Jump to sheet (msh-scrim), fading on --dur-base; desktop has none */
.chai-scrim{display:none}
@media (max-width:899px){.chai-scrim{display:block;position:fixed;inset:0;z-index:79;background:rgba(0,0,0,.5);opacity:0;pointer-events:none;transition:opacity var(--dur-base) var(--ease)}
 .chai-scrim.on{opacity:1;pointer-events:auto}}
@media (prefers-reduced-motion:reduce){.chai-scrim{transition:none}}

/* Dec 4: small chip, for work types inside list rows: s-1 by s-3, --fs-tag, label face; .on marks the active filter in chili text */
.chip.sm{padding:var(--s-1) var(--s-3);border-radius:var(--r-6);font:500 var(--fs-tag)/var(--lh-snug) var(--f-ui);color:var(--tx-2)}.chip.sm.on{color:var(--sel-tx);background:color-mix(in srgb,var(--sel) 14%,var(--panel))}

/* Dec 4: Ch.ai nudge: a comment card that pops out of the Ch.ai button (panel, hairline, --r-16 with the corner nearest the button at --r-4,
   --sh-pop), Chai's face on the chili pin, "Ch.ai" in the label face and one line. Enters from 92% with a small pop (dur-base, ease-pop) */
.chai-tip{all:unset;box-sizing:border-box;position:fixed;z-index:42;display:flex;align-items:flex-start;gap:var(--s-3);max-width:min(300px,calc(100vw - 32px));padding:var(--s-3) var(--s-4) var(--s-3) var(--s-3);background:var(--panel);border:1px solid var(--line);border-radius:var(--r-16) var(--r-16) var(--r-4) var(--r-16);box-shadow:var(--sh-pop);cursor:pointer;text-align:left;
 opacity:0;transform:translateY(8px) scale(.92);transform-origin:100% 100%;transition:opacity var(--dur-fast) var(--ease),transform var(--dur-fast) var(--ease)}
.chai-tip.on{opacity:1;transform:none;transition:opacity var(--dur-base) var(--ease),transform var(--dur-base) var(--ease-pop)}
.chai-tip:focus-visible{outline:2px solid var(--sel);outline-offset:2px}
.chai-tip .ct-pin{flex:none;width:32px;height:32px;border-radius:var(--r-pill) var(--r-pill) var(--r-pill) var(--r-2);background:var(--brand);overflow:hidden;display:block}
.chai-tip .ct-pin img{display:block;width:100%;height:100%;object-fit:cover;transform:scale(1.1);transform-origin:50% 75%}
.chai-tip .ct-tx{display:flex;flex-direction:column;gap:var(--s-1);min-width:0}
.chai-tip .ct-n{font:600 var(--fs-label)/var(--lh-none) var(--f-ui);color:var(--tx-3);padding-top:2px}.chai-tip .ct-n em{font-style:normal;color:var(--sel-tx)}
.chai-tip .ct-l{font:500 var(--fs-ui)/var(--lh-snug) var(--t-font);color:var(--tx)}
.chai-tip:hover .ct-l{color:var(--tx)}
@media (prefers-reduced-motion:reduce){.chai-tip,.chai-tip.on{transition:none;transform:none}}
