/* =========================================================================
   UI KIT: the shared building blocks the module screens (Agent Hub, Drive, Meetings, Tasks, Studio, Toolbox) are
   laid out with, so they read as one app. Every colour, radius, curve and font is a Studio token from index.html;
   nothing here defines its own. Loaded after workspace.css and before the module stylesheets, which may refine these
   for their own screen but never redefine them.

   Blocks:
     (Tabs, .tabs-line and .seg, live in ui/components/tabs: the underline and segmented variants of one pattern.)
     .hero        the one big card at the top of a dashboard screen: what this screen is for, and its first action.
     .tile-grid   a grid of .tile cards (places in the Drive, samples in the Studio, meetings to join).
     .sec-head    a section's eyebrow, count and trailing action, over a list or grid.
     .empty       an empty state with an icon, a title, one line and (optionally) one action.
     .pill        a small status pill with a dot: .live .ok .warn .quiet.
     .stagger     children fade up one after another on first paint.
   ========================================================================= */

/* ---- The hero card: the same glass as every panel (no tint, no brighter rim), the screen's purpose in the display
   face, one line under it, and the actions in a row. ---- */
.hero{position:relative;overflow:hidden;margin-top:12px;padding:22px 20px 20px;border:1px solid var(--line);border-radius:var(--r-panel);background:var(--gloss),var(--fog),var(--glass-panel);background-origin:border-box;-webkit-backdrop-filter:var(--blur);backdrop-filter:var(--blur);box-shadow:var(--shadow)}
/* .hero.agent is the same glass: one material for every card (the lead, 21 Oct: no tinted glass). The class stays
   so a screen can still mark the agent's card for copy or icon choices. */
.hero .k{margin-bottom:10px}
.hero-title{margin:0;font-family:var(--display);font-size:var(--vx-fs-14);font-weight:600;letter-spacing:-.01em;line-height:1.15}
.hero-text{margin:8px 0 0;max-width:52ch;font-size:var(--vx-fs-9);line-height:1.5;color:var(--text-2)}
.hero-actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:16px}
.hero-actions .btn{flex:1 1 auto}
/* A hero icon at the top right, large and faint, for a sense of place. */
.hero-mark{position:absolute;top:14px;right:14px;width:64px;height:64px;opacity:.16;pointer-events:none}
.hero-mark .icon{width:100%;height:100%}

/* ---- Tiles: a responsive grid of glass cards, two across on a phone, as many as fit from 200px on a desktop.
   A tile is a button or a link: icon in a rounded square, name, one mono line of meta. It lifts on hover and presses
   on tap. .tile.wide spans the row (a featured tile). ---- */
/* Two across on a phone, one under --verser-tile-min (a window under ~310px), never three: the kit grid's two-column form. */
.tile-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(max(var(--verser-tile-min),(100% - 10px) / 2),100%),1fr));gap:10px;margin-top:12px}.tile-grid>*{min-width:0}
.tile{position:relative;display:flex;flex-direction:column;align-items:flex-start;gap:12px;min-height:124px;padding:14px;border:1px solid var(--hairline);border-radius:var(--r-compact);background:var(--gloss),var(--glass-panel);background-origin:border-box;-webkit-backdrop-filter:var(--blur);backdrop-filter:var(--blur);box-shadow:var(--shadow);color:var(--text);font:inherit;text-align:left;text-decoration:none;transition:transform 160ms var(--ease-out),background-color 140ms ease,border-color 140ms ease}
.tile.wide{grid-column:1/-1;flex-direction:row;align-items:center;min-height:0}
.tile-icon{display:grid;place-items:center;flex:none;width:42px;height:42px;border:1px solid var(--icon-edge);border-radius:var(--r-avatar);background:var(--icon-fill)}
.tile-icon .icon{width:22px;height:22px}
.tile-text{display:grid;gap:3px;min-width:0}
.tile-text b{font-size:var(--vx-fs-10);font-weight:600;line-height:1.25;overflow-wrap:anywhere}
.tile-text small{font-family:var(--mono);font-size:var(--vx-fs-4);line-height:1.35;color:var(--text-2)}
.tile .pill{position:absolute;top:12px;right:12px}
.tile:active{transform:scale(.98)}
@media (hover:hover) and (pointer:fine){.tile:hover{transform:translateY(-2px);background:var(--gloss),var(--fill-1);border-color:var(--line)}.tile:hover:active{transform:scale(.98)}}
.tile:focus-visible{outline:var(--ring-width) solid var(--ring);outline-offset:var(--ring-offset)}
.tile[aria-current="true"],.tile.is-on{border-color:var(--vx-hair-2);box-shadow:var(--shadow),0 0 0 1px var(--vx-hair-2) inset}

/* ---- Section head: eyebrow left, mono count beside it, an action at the right end. ---- */
.sec-head{display:flex;align-items:center;gap:10px;min-height:40px;margin-top:18px;padding:0 2px}
.sec-head .k{margin:0}
.sec-head .count{font-family:var(--mono);font-size:var(--vx-fs-5);font-weight:500;color:var(--text-2)}
.sec-head .count:empty{display:none}
.sec-head .sec-action{margin-left:auto;min-height:36px;padding:0 12px;border:0;border-radius:var(--r-pill);background:none;color:var(--link);font:inherit;font-size:var(--vx-fs-7);font-weight:600;display:inline-flex;align-items:center;gap:6px}
.sec-head .sec-action .icon{width:16px;height:16px}
@media (hover:hover) and (pointer:fine){.sec-head .sec-action:hover{background:var(--fill-1)}}

/* ---- Empty state: centred, with room around it. The icon sits in a faint ring, the title is short, the one line
   says what will appear here, the optional button says how to make it appear. ---- */
.empty{display:grid;justify-items:center;gap:6px;padding:36px 20px 32px;text-align:center}
.empty-icon{display:grid;place-items:center;width:56px;height:56px;margin-bottom:8px;border:1px solid var(--line);border-radius:var(--radius-round);background:var(--fill-1)}
.empty-icon .icon{width:26px;height:26px;opacity:.9}
.empty b{font-size:var(--vx-fs-12);font-weight:600;line-height:1.3}
.empty p{margin:0;max-width:36ch;font-size:var(--vx-fs-8);line-height:1.5;color:var(--text-2)}
.empty .btn{margin-top:12px}
.empty.compact{padding:20px 12px 18px}
.empty.compact .empty-icon{width:44px;height:44px}

/* ---- Status pill: a dot and a word. ---- */
.pill{display:inline-flex;align-items:center;gap:6px;height:24px;padding:0 10px 0 8px;border:1px solid var(--line);border-radius:var(--r-pill);background:var(--chip-fill);font-family:var(--mono);font-size:var(--vx-fs-3);font-weight:500;line-height:1;color:var(--text);white-space:nowrap}
.pill::before{content:"";width:7px;height:7px;border-radius:var(--radius-round);background:var(--text-2);flex:none}
.pill.ok::before{background:var(--green)}
.pill.warn::before{background:var(--warn)}
.pill.quiet{color:var(--text-2)}
.pill.live{border-color:transparent;background:var(--live-fill);color:var(--on-live)}
.pill.live::before{background:var(--on-live);animation:verser-dot-pulse 1.5s ease-in-out infinite alternate}
@media (prefers-reduced-motion:reduce){.pill.live::before{animation:none}}

/* ---- Stagger: the first paint of a list or grid, each child 40ms after the one before, 8px up. Decorative, never
   blocks a tap; reduced motion keeps the fade only. ---- */
.stagger>*{animation:kit-rise 320ms var(--ease-out) both}
.stagger>:nth-child(2){animation-delay:40ms}.stagger>:nth-child(3){animation-delay:80ms}.stagger>:nth-child(4){animation-delay:120ms}
.stagger>:nth-child(5){animation-delay:160ms}.stagger>:nth-child(6){animation-delay:200ms}.stagger>:nth-child(7){animation-delay:240ms}
.stagger>:nth-child(n+8){animation-delay:280ms}
@keyframes kit-rise{from{opacity:0;transform:translateY(8px)}}
@media (prefers-reduced-motion:reduce){.stagger>*{animation-name:kit-fade}@keyframes kit-fade{from{opacity:0}}}

/* ---- On a desktop (body.desk, desktop.css): tiles fill from 200px, heroes take the row, tabs keep their size. ---- */
body.desk .tile-grid{grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:12px}
body.desk .hero{padding:26px 26px 22px}
body.desk .hero-title{font-size:26px}
body.desk .hero-actions .btn{flex:0 0 auto}
/* Two columns for a dashboard: the main column and a narrower side column, each a stack. */
body.desk .desk-two{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(300px,1fr);column-gap:20px;align-items:start}
body.desk .desk-two>.desk-side{position:sticky;top:16px}

/* =========================================================================
   ONE FAMILY (2026-10-21, the lead: "theyre good but theyre not uniform"). The parts every module screen shares, so
   the Agent Hub, Drive, Meetings, Tasks and Toolbox read as one product on a phone and on a desktop.
   ========================================================================= */

/* body's overflow-x:hidden (index.html) makes it a scroll box that never scrolls, so nothing in it could stick; clip
   cuts the sides the same way and lets every screen's tabs stick (the Hub and desktop.css did this on their own). */
body{overflow-x:clip}

/* ---- Chip: one glass pill for every filter, sort, when and pick control (.tasks-chip on Tasks and the Drive, .hub-chip
   in the Hub's sheets share it). 44px on a phone, 36px on a desktop; picked is the user's violet rim on the pressed
   fill, never the bone of the primary button. .mono for counts and short codes. The Tasks filter row's chips (#tasksTools) are the kit's
   chip since the layout pass (TK-7), drawn by the kit alone. ---- */
.chip,.tasks-chip:where(:not(#tasksTools *)),.hub-chip{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-height:44px;padding:0 14px;border:1px solid var(--line);border-radius:var(--r-pill);background:var(--gloss),var(--fill-1);background-origin:border-box;color:var(--text);font:inherit;font-size:var(--vx-fs-7);font-weight:600;line-height:1.2;white-space:nowrap;cursor:pointer;transition:background-color 140ms ease,border-color 140ms ease,color 140ms ease,transform 160ms var(--ease-out)}
.chip.mono,.hub-chip{font-family:var(--mono);font-size:var(--vx-fs-5);font-weight:500}
.chip .icon,.tasks-chip:where(:not(#tasksTools *)) .icon{flex:none;width:16px;height:16px}
:is(.chip,.tasks-chip:where(:not(#tasksTools *)),.hub-chip):is([aria-pressed="true"],.is-on,[aria-current="page"],[data-selected]){border-color:var(--selected-edge);background:var(--gloss),var(--pressed);color:var(--text)}
:is(.chip,.tasks-chip:where(:not(#tasksTools *)),.hub-chip):active:not(:disabled){transform:scale(.97)}
:is(.chip,.tasks-chip:where(:not(#tasksTools *)),.hub-chip):disabled{opacity:.4;cursor:default}
:is(.chip,.tasks-chip:where(:not(#tasksTools *)),.hub-chip):focus-visible{outline:var(--ring-width) solid var(--ring);outline-offset:var(--ring-offset)}
@media (hover:hover) and (pointer:fine){:is(.chip,.tasks-chip:where(:not(#tasksTools *)),.hub-chip):not([aria-pressed="true"]):not(.is-on):not([data-selected]):not(:disabled):hover{background:var(--gloss),var(--fill-2)}}
/* A touch tablet in desktop mode (an iPad) keeps the 44px targets; only a mouse or trackpad gets the smaller ones. */
@media (pointer:fine){body.desk :is(.chip,.tasks-chip:where(:not(#tasksTools *)),.hub-chip){min-height:36px}}
body.desk :where(.chip,.tasks-chip:not(#tasksTools *),.hub-chip){padding:0 12px}

/* ---- Section head: every list's head is the same mono eyebrow (minimal.css .k) with its count beside it and an action
   at the end. The head sits on the backdrop; the rows under it sit in one glass card (.row-card). ---- */
.sec-head>.k{margin:0;font-size:var(--vx-fs-5)}
.sec-head .count{font-variant-numeric:tabular-nums}

/* ---- Row card: a list's rows in one glass card, hairlines between them (Toolbox, Drive files, Meetings, Tasks).
   A row: a 42px icon square, the title 15/600, one mono meta line at 12.5. ---- */
.row-card{margin-top:6px;padding:2px 14px;border:1px solid var(--line);border-radius:var(--r-panel);background:var(--gloss),var(--fog),var(--glass-panel);background-origin:border-box;-webkit-backdrop-filter:var(--blur);backdrop-filter:var(--blur);box-shadow:var(--shadow)}

/* ---- A row that scrolls sideways (chips, tiles, scrolling tabs: .scroll-row, and the rows named here): each end fades
   while there is more to see that way, so a cut-off item reads as more to scroll. The fade follows the row's own
   scroll, so a row that fits never fades; without scroll timelines the far end keeps a plain fade. A stuck row
   (.tabs-line.sticks) runs its glass animation instead and the two do not paint together; the kit's tabs fade such a
   row themselves (ui/components/tabs). ---- */
@property --scroll-row-start{syntax:"<length>";inherits:false;initial-value:0px}
@property --scroll-row-end{syntax:"<length>";inherits:false;initial-value:0px}
@keyframes scroll-row-edges{from{--scroll-row-start:0px;--scroll-row-end:28px}10%{--scroll-row-start:16px}90%{--scroll-row-end:28px}to{--scroll-row-start:16px;--scroll-row-end:0px}}
:where(.scroll-row,.strip-fade,.tabs-line.scrolls:not(.sticks),.drive-quick-row,.hub-lives){-webkit-mask-image:linear-gradient(90deg,transparent 0,var(--mask-opaque) var(--scroll-row-start),var(--mask-opaque) calc(100% - var(--scroll-row-end)),transparent);mask-image:linear-gradient(90deg,transparent 0,var(--mask-opaque) var(--scroll-row-start),var(--mask-opaque) calc(100% - var(--scroll-row-end)),transparent);animation:scroll-row-edges linear both;animation-timeline:scroll(self inline)}
:where(.scroll-row,.strip-fade,.tabs-line.scrolls:not(.sticks),.drive-quick-row,.hub-lives):dir(rtl){-webkit-mask-image:linear-gradient(270deg,transparent 0,var(--mask-opaque) var(--scroll-row-start),var(--mask-opaque) calc(100% - var(--scroll-row-end)),transparent);mask-image:linear-gradient(270deg,transparent 0,var(--mask-opaque) var(--scroll-row-start),var(--mask-opaque) calc(100% - var(--scroll-row-end)),transparent)}
@supports not (animation-timeline:scroll()){:where(.scroll-row,.strip-fade,.tabs-line.scrolls:not(.sticks),.drive-quick-row,.hub-lives){--scroll-row-end:28px}}
/* On the desktop layout with a mouse the chips and tabs wrap onto a second line instead, so none sits out of reach; the
   Drive's quick access wraps its tiles. The Tasks filters stay one row (fading if they overflow). */
@media (pointer:fine){
  body.desk :is(.scroll-row,.strip-fade,.drive-quick-row):not(#tasksFilters){flex-wrap:wrap;overflow:visible;-webkit-mask-image:none;mask-image:none;animation:none}
}
/* The Drive's quick access and the Hub's live row snap to each card. */
.strip-fade,.drive-quick-row,.hub-lives{scroll-snap-type:x mandatory;scroll-padding-inline:16px}
.strip-fade>*,.drive-quick-row>*,.hub-lives>*{scroll-snap-align:start}
